Partition
Partition 2D and 3D geometry objects using tool objects or a work plane.
Syntax
model.component(<ctag>).geom(<tag>).create(<ftag>,"Partition");
model.component(<ctag>).geom(<tag>).feature().selection(property);
model.component(<ctag>).geom(<tag>).feature().set(property,<value>);
model.component(<ctag>).geom(<tag>).feature().getType(property);
model.component(<ctag>).geom(<tag>).feature(<ftag>).setAttribute(attribute,<value>);
model.component(<ctag>).geom(<tag>).feature(<ftag>).getAttribute(attribute);
Description
The Partition Boolean operation partitions each input object using a set of tool objects or (in 3D only) a work plane. That is, within the input object new boundaries, edges, and vertices are created that come from the tools or the work plane.
The following properties are available:
...geom(<tag>).
absRepairTol()
on | off
on | off
objects | workplane
on | off
...geom(<tag>).
repairTol()
auto | relative | absolute
...geom(<tag>).
repairTolType()
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.
For information about the selresult and contributeto properties, see Selections of Geometric Entities.
The following attributes are available:
Table 3-129: 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 keep property has been deprecated in version 5.3a. Instead, use the new properties keepinput and keeptool. If you set keep to on, both keepinput and keeptool. If you get the value of keep, it is on if keepinput and keeptool are on.
Example
Create an interior boundary in a cylinder by partitioning it with an oblique work plane:
Code for Use with Java
Model model = ModelUtil.create("Model");
model.component().create("comp1");
GeomSequence g = model.component("comp1").geom().create("geom1", 3);
g.create("cyl1", "Cylinder");
g.feature("cyl1").set("h", 10);
g.create("wp1", "WorkPlane");
g.feature("wp1").set("planetype", "general");
g.feature("wp1").setIndex("genpoints", 4, 0, 2);
g.feature("wp1").setIndex("genpoints", 5, 1, 2);
g.feature("wp1").setIndex("genpoints", 5, 2, 2);
g.create("par1", "Partition");
g.feature("par1").selection("input").set("cyl1");
g.feature("par1").set("partitionwith", "workplane");
g.run("par1");
Code for Use with MATLAB
model = ModelUtil.create('Model');
model.component.create('comp1');
g = model.component('comp1').geom.create('geom', 3);
g.create('cyl1', 'Cylinder');
g.feature('cyl1').set('h', 10);
g.create('wp1', 'WorkPlane');
g.feature('wp1').set('planetype', 'general');
g.feature('wp1').setIndex('genpoints', 4, 0, 2);
g.feature('wp1').setIndex('genpoints', 5, 1, 2);
g.feature('wp1').setIndex('genpoints', 5, 2, 2);
g.create('par1', 'Partition');
g.feature('par1').selection('input').set('cyl1');
g.feature('par1').set('partitionwith', 'workplane');
g.run('par1');
See Also
Compose, Union, Intersection, Difference, WorkPlane, PartitionDomains, PartitionEdges