Rotate
Rotate objects about a point in 2D or an axis in 3D.
Syntax
model.component(<ctag>).geom(<tag>).create(<ftag>,"Rotate");
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>,"Rotate") to rotate geometry objects.
Use model.component(<ctag>).geom(<tag>).feature(<ftag>).selection("input") to select the objects to rotate. The default selection is empty.
The following properties are available:
Table 3-94: Valid Properties
Rotation axis in 3D. Vector has length 3 if axistype is cartesian, and length 2 if axistype is spherical.
x | y | z | cartesian | spherical
on | off
on | off
all | obj | dom | bnd | edg | pnt | off
Show selections, if selresult is on, in physics, materials, and so on; in part instances; or in 3D from a plane geometry. obj is not available in a component’s geometry. dom, bnd, and edg are not available in all features.
this | Part Instance feature
xyplane | Work plane feature
For information about the selresult and contributeto properties, see Selections of Geometric Entities.
Compatibility
The possibility to set and get a rotation matrix has been removed.
The property out is no longer available.
Example
The commands below create and then rotate an ellipse by 10 degrees about (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("e1","Ellipse");
g.feature("e1").set("semiaxes","1 3");
g.create("r1","Rotate");
g.feature("r1").selection("input").set("e1");
g.feature("r1").set("rot",10);
g.feature("r1").set("pos", "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('e1','Ellipse');
g.feature('e1').set('semiaxes','1 3');
g.create('r1','Rotate');
g.feature('r1').selection('input').set('e1');
g.feature('r1').set('rot',10);
g.feature('r1').set('pos', '2 3');
g.run;
See Also
Mirror, Move, Copy, Scale