Move, Copy
Move or copy geometry objects by translation.
Syntax
model.component(<ctag>).geom(<tag>).create(<ftag>,"Move");
model.component(<ctag>).geom(<tag>).create(<ftag>,"Copy");
model.component(<ctag>).geom(<tag>).feature(<ftag>).selection(property);
model.component(<ctag>).geom(<tag>).feature(<ftag>).set(property,<value>);
model.component(<ctag>).geom(<tag>).feature(<ftag>).getType(property);
model.component(<ctag>).geom(<tag>).feature(<ftag>).setAttribute(attribute,<value>);
model.component(<ctag>).geom(<tag>).feature(<ftag>).getAttribute(attribute);
Description
Use model.component(<ctag>).geom(<tag>).create(<ftag>,"Move") to move geometry objects.
Use model.component(<ctag>).geom(<tag>).create(<ftag>,"Copy") to move a copy of geometry objects.
Use model.component(<ctag>).geom(<tag>).feature(<ftag>).selection("input") to select the objects to move or copy. The default selection is empty.
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.
vertices | coord
vertex | coord
on | off
on | off
all | obj | dom | bnd | edg | pnt | off
Show selections, if selresult is on, of resulting objects in physics, materials, and so on, or in part instances. obj is not available in a component’s geometry. dom, bnd, and edg are not available in all features.
displ | pos
this | part-instance feature
xyplane | work-plane feature
If displ is a one-dimensional array, a single copy of each input object is created using the translation vector displ. If displ is a two-dimensional array, several copies can be created, where the nth copy has translation displ[i][n] in the ith coordinate.
For information about the selresult and contributeto properties, see Selections of Geometric Entities.
Additional properties are available with the Design Module, see Move, and Copy.
The following attributes are available:
Table 3-115: Valid attributes
on | off | inherit
Designate the resulting objects as construction geometry. Use inherit to set the construction geometry attribute only if all input objects are construction geometry.
Example
The sequence below moves a circle from the origin to (2, 3):
Code for Use with Java
Model model = ModelUtil.create("Model1");
model.component().create("comp1");
GeomSequence g = model.component("comp1").geom().create("geom1",2);
g.create("c1","Circle");
g.create("m1","Move");
g.feature("m1").selection("input").set("c1");
g.feature("m1").set("displ", new double[][]{{2},{3}});
g.run();
Code for Use with MATLAB
model = ModelUtil.create('Model1');
model.component.create('comp1');
g = model.component('comp1').geom.create('geom1',2);
g.create('c1','Circle');
g.create('m1','Move');
g.feature('m1').selection('input').set('c1');
g.feature('m1').set('displ', [2,3]);
g.run;
See Also
Array, Mirror, Rotate, Scale, RigidTransform