Mirror
Reflect (mirror) objects in a plane (3D), a line (2D), or a point (1D).
Syntax
model.component(<ctag>).geom(<tag>).create(<ftag>,"Mirror");
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>,"Mirror") to mirror geometry objects.
Use model.component(<ctag>).geom(<tag>).feature(<ftag>).selection("input") to select the objects to mirror. 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 of the selection, either given as an integer indicating a color in the color theme, or as a custom color in the customcolor property. Coloring is only available when selresult in active. 2D and 3D only.
The color to use. Active when color is set to custom. 2D and 3D only.
Edge selection. Used when specify is set to edge.
on | off
{0 0 1} (3D)
{1 0} (2D)
{1} (1D)
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.
In 3D, the input objects are reflected in the plane through pos with normal vector axis. In 2D, the input objects are reflected in the line through pos with normal vector axis. In 1D, the input objects are reflected in the point pos.
For information about the selresult and contributeto properties, see Selections of Geometric Entities.
Additional properties are available with the Design Module, see Mirror.
The following attributes are available:
Table 3-111: 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 property out is no longer available.
Example
A 2D example, mirroring a rectangle:
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("r1","Rectangle");
g.create("m1","Mirror");
g.feature("m1").selection("input").set("r1");
g.feature("m1").set("pos","2 2");
g.feature("m1").set("axis","1 1");
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('r1','Rectangle');
g.create('m1','Mirror');
g.feature('m1').selection('input').set('r1');
g.feature('m1').set('pos','2 2');
g.feature('m1').set('axis','1 1');
g.run;
A 3D example, mirroring a block:
Code for Use with Java
Model model = ModelUtil.create("Model1");
model.component().create("comp1");
GeomSequence g = model.component("comp1").geom().create("geom1",3);
g.create("blk1","Block");
g.create("m1","Mirror");
g.feature("m1").selection("input").set("blk1");
g.feature("m1").set("pos","2 2 2");
g.feature("m1").set("axis","1 1 1");
g.run();
Code for Use with MATLAB
model = ModelUtil.create('Model1');
model.component.create('comp1');
g = model.component('comp1').geom.create('geom1',3);
g.create('blk1','Block');
g.create('m1','Mirror');
g.feature('m1').selection('input').set('blk1');
g.feature('m1').set('pos','2 2 2');
g.feature('m1').set('axis','1 1 1');
g.run;
See Also
Move, Copy, Rotate, Scale, RigidTransform