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);
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:
Table 3-81: Valid Properties
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
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 i:th 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.
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