Geometry > Geometry Commands > Move, Copy

Move, Copy
Move or copy geometry objects by translation.
Syntax
model.geom(<tag>).create(<ftag>,"Move");
model.geom(<tag>).create(<ftag>,"Copy");
model.geom(<tag>).feature(<ftag>).selection(property);
model.geom(<tag>).feature(<ftag>).set(property,<value>);
model.geom(<tag>).feature(<ftag>).getType(property);
Description
Use model.geom(<tag>).create(<ftag>,"Move") to move geometry objects.
Use model.geom(<tag>).create(<ftag>,"Copy") to move a copy of geometry objects.
Use model.geom(<tag>).feature(<ftag>).selection("input") to select the objects to move or copy. The default selection is empty.
The following properties are available:
Table 3-75: Valid Properties
on | off
off (Move)
on (Copy)
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.
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.
Example
The sequence below moves a circle from the origin to (2, 3):
Code for use with Java
Model model = ModelUtil.create("Model1");
GeomSequence g = model.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');
g = model.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