CrossSection
Create a 2D geometry from a cross section of a 3D geometry.
Syntax
model.component(<ctag>).geom(<tag>).create(<ftag>,"CrossSection");
model.component(<ctag>).geom(<tag>).feature(<ftag>).selection("input");
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
In a 2D geometry, use model.component(<ctag>).geom(<tag>).create(<ftag>,"CrossSection") to create 2D geometry objects by intersecting 3D geometry objects with a work plane. Select the work plane using the workplane property, whose value is the 3D sequence’s tag followed by a slash and the work plane feature’s tag, for example geom1/wp1. By default, you get the last work plane in the last 3D geometry.
In a 2D sequence of a work plane feature, use model.component(<ctag>).geom(<tag>).feature(<wptag>).geom().create(<ftag>,"CrossSection") to create 2D geometry objects by intersecting 3D geometry objects with the work plane.
By default, you get the intersection for all 3D objects that were generated by the features preceding the work plane feature. To select a subset of these objects, set the intersect property to selected, and use the property input to select the 3D objects to intersect.
The following properties are available:
...geom(<tag>).
absRepairTol()
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.
all | selected
...geom(<tag>).
repairTol()
auto | relative | absolute
...geom(<tag>).
repairTolType()
true | false
true | false
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.
The following attributes are available:
Table 3-56: 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.
Example
Create a work plane though the axis of a torus. In a 2D axisymmetric geometry, create the cross section of the torus using the work plane. Note that the last run() command removes the part of the cross section that falls in the region r<0.
Code for Use with Java
Model model = ModelUtil.create("Model");
model.component().create("comp1");
GeomSequence g1 = model.component("comp1").geom().create("geom1", 3);
g1.create("tor1", "Torus");
g1.run("tor1");
g1.create("wp1", "WorkPlane");
g1.feature("wp1").set("planetype", "circularedge");
g1.feature("wp1").selection("circedge").set("tor1", 15);
 
model.component().create("comp2");
GeomSequence g2 =model.component("comp2").geom().create("geom2", 2);
g2.axisymmetric(true);
g2.create("cro1", "CrossSection");
g2.run("cro1"); // Two circles
g2.run(); // One circle
Code for Use with MATLAB
model = ModelUtil.create('Model');
model.component.create('comp1');
g1 = model.component('comp1').geom.create('geom1', 3);
g1.create('tor1', 'Torus');
g1.run('tor1');
g1.create('wp1', 'WorkPlane');
g1.feature('wp1').set('planetype', 'circularedge');
g1.feature('wp1').selection('circedge').set('tor1', 15);
 
model.component.create('comp2');
g2 = model.component('comp2').geom.create('geom2', 2);
g2.axisymmetric(true);
g2.create('cro1', 'CrossSection');
g2.run('cro1'); % Two circles
g2.run; % One circle
See Also
Projection, WorkPlane