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);
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>,"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:
Axis vector, used if axistype is cartesian.
Rotation axis. Vector has length 3 if axistype is cartesian, and length 2 if axistype is spherical. Alias for ax2 and ax3.
x | y | z | cartesian | spherical
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.
Edge selection. Used when specify is set to edge.
Intrinsic Z-X-Z Euler angles α, β, and γ, used if specify is set to eulerang.
on | off
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.
axis | eulerang | edge
xyplane | work-plane feature tag
this | part-instance feature tag
For information about the selresult and contributeto properties, see Selections of Geometric Entities.
Additional properties are available with the Design Module, see Rotate.
The following attributes are available:
Table 3-152: 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.
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, RigidTransform