AdjacentSelection
Create a selection of entities or objects that are adjacent to given selections.
Syntax
model.component(<ctag>).geom(<tag>).create(<ftag>,"AdjacentSelection");
model.component(<ctag>).geom(<tag>).feature(<ftag>).set(property,<value>);
model.component(<ctag>).geom(<tag>).feature(<ftag>).getType(property);
Description
AdjacentSelection creates a selection of all entities of dimension outputdim that are adjacent to at least one entity in the input selections. If the output selection has lower dimension than the input selections, you can use the exterior and interior properties to exclude or include output entities that are exterior/interior to the union of the input selections.
The following properties are available:
none | custom | integer between 1 and the number of colors in the current theme
The color to use. Active when color is set to custom.
0 | 1 | 2 | 3
on | off
on | off
0 | 1 | 2 | 3
on | off
on | off
See Selections of Geometric Entities for general information about selections.
Example
Code for Use with Java
Model model = ModelUtil.create("Model");
model.component().create("comp1");
GeomSequence g = model.component("comp1").geom().create("geom1", 3);
g.create("sph1", "Sphere");
g.run("sph1");
g.create("sel1", "ExplicitSelection");
g.feature("sel1").selection("selection").init(0);
g.feature("sel1").selection("selection").set("sph1", new int[]{4});
g.create("adjsel1", "AdjacentSelection");
g.feature("adjsel1").set("entitydim", 0);
g.feature("adjsel1").set("input", new String[]{"sel1"});
g.run("adjsel1");
g.create("del1", "Delete");
g.feature("del1").selection("input").named("adjsel1");
g.run("del1");
Code for Use with MATLAB
model = ModelUtil.create('Model');
model.component.create('comp1');
g = model.component('comp1').geom.create('geom1', 3);
g.create('sph1', 'Sphere');
g.run('sph1');
g.create('sel1', 'ExplicitSelection');
g.feature('sel1').selection('selection').init(0);
g.feature('sel1').selection('selection').set('sph1', 4);
g.create('adjsel1', 'AdjacentSelection');
g.feature('adjsel1').set('entitydim', 0);
g.feature('adjsel1').set('input', 'sel1');
g.run('adjsel1');
g.create('del1', 'Delete');
g.feature('del1').selection('input').named('adjsel1');
g.run('del1');
See Also
BallSelection, BoxSelection, CylinderSelection, Disk Selection, ExplicitSelection, UnionSelection, IntersectionSelection, DifferenceSelection, ComplementSelection