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);
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:
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.
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