Circle
Create a circle or disk in 2D.
Syntax
model.component(<ctag>).geom(<tag>).create(<ftag>,"Circle");
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>,"Circle") to create a disk in 2D. The following properties are available:
corner | center
Positions the object either centered about pos or with the lower-left corner of a surrounding box in pos
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.
solid | curve
on | off
all | obj | dom | bnd | 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.
For information about the selresult and contributeto properties, see Selections of Geometric Entities.
Additional properties are available with the Design Module, see Circle.
The following attributes are available:
Table 3-37: Valid attributes
on | off
Compatibility
model.component(<ctag>).geom(<tag>).create(<ftag>,"circ2") creates a solid disk.
model.component(<ctag>).geom(<tag>).create(<ftag>,"circ1") creates a circle curve.
The following properties are also available:
x, y
The property const is no longer available.
Example
The sequence below creates a unit disk (solid circle object).
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.feature("c1").set("pos",new double[]{2,3});
String base = g.feature("c1").getString("base");
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.feature('c1').set('pos',[2,3]);
base = g.feature('c1').getString('base');
g.run;
See Also
Ellipse