Perhaps a bit cumbersome, but... First thing is you have to have an index component on the data. If you don't already have one, you can create one by using Inquire to determine how many cells there are. Then use Enumerate to create the index array. Then put a connections dependency attribute on the array, and Replace the array into the original object:
nCells = Inquire(data, "items", "connections"); a = Enumerate(start=0, count=nCells, delta=1); a = Options(a, "dep", "connections"); data = Replace(a, data, dstName="indices") Now suppose you have a list of cells you want to extract. Create a field containing the list as a "target" component and a data value of 1: n = Inquire(list, "items"); table = Construct([0.0], [1.0], n, 1.0); table = Replace(list, table, dstName="target"); Now use Lookup to look up the indices of the data object in the "target" component of the table, leaving the result in "lookedup", and use Include to get only the ones that successfully looked up a '1': result = Lookup(data, lookup, "data", "target", "data", "lookedup"); result = Mark(result, "lookedup"); result = Include(result, 1, 1); result = Unmark(result); I've attached an example net. I create a 2x2x2 cell grid. There's an IntegerList interactor to allow you to list the cells you want. You see the grid connections of the input grid and the boundary of the selected cells. Greg (See attached file: select.net) Mattijs Janssens <[EMAIL PROTECTED]>@opendx.watson.ibm.com on 07/12/2001 04:32:10 AM Please respond to [email protected] Sent by: [EMAIL PROTECTED] To: [email protected] cc: Subject: Re: [opendx-users] selecting subset Unfortunately my dataset is 3D and very irregular. Is something possible with Select and then creating 'Invalid Connections'? Lloyd A Treinish wrote: > > Try Slab, which will do it one dimension at a time, assuming regular > connections. > > Mattijs Janssens <[EMAIL PROTECTED]>@opendx.watson.ibm.com on > 07/11/2001 05:24:20 PM > > Please respond to [email protected] > > Sent by: [EMAIL PROTECTED] > > To: "[email protected]" > <[email protected]> > cc: > Subject: [opendx-users] selecting subset > > Ls, > > I would like to extract a subset of my mesh by index, e.g. cells with > index 10,12 and 19. > (I know how to extract a subset by value using Include) > > Any ideas? > > Mattijs Janssens
select.net
Description: Binary data
