Scale
Scale objects around a point.
Syntax
model.component(<ctag>).geom(<tag>).create(<ftag>,"Scale");
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>,"Scale") to scale geometry objects.
Use model.component(<ctag>).geom(<tag>).feature(<ftag>).selection("input") to select the objects to scale. 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 to use. Active when color is set to custom.
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
If factor is an array, the inputs are scaled by the factor[i] in the ith coordinate.
For information about the selresult and contributeto properties, see Selections of Geometric Entities.
Example
The sequence below scales the unit circle by (1, 2) 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("c1","Circle");
g.create("s1","Scale");
g.feature("s1").selection("input").set("c1");
g.feature("s1").set("factor", "1,2");
g.feature("s1").set("pos",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('s1','Scale');
g.feature('s1').selection('input').set('c1');
g.feature('s1').set('factor', '1,2');
g.feature('s1').set('pos',[2,3]);
g.run;
Compatibility
The property out is no longer available.
See Also
Mirror, Move, Copy, Rotate, RigidTransform