Difference between revisions of "Nested Shapes"
Line 29: | Line 29: | ||
</(Parent_Shape)> | </(Parent_Shape)> | ||
Any shape type can be nested with another shape with the only restriction being that you cannot mix [[2D MPM Shape Commands|2D]] or [[3D MPM Shape Commands|3D shape commands]]. In other words, only 2D shapes can be nested in 2D shapes and only 3D shapes can be nested in 3D shapes. | == Notes == | ||
# Any shape type can be nested with another shape with the only restriction being that you cannot mix [[2D MPM Shape Commands|2D]] or [[3D MPM Shape Commands|3D shape commands]]. In other words, only 2D shapes can be nested in 2D shapes and only 3D shapes can be nested in 3D shapes. |
Revision as of 21:56, 5 December 2016
By nesting shapes, you can create new shapes for creating material points or creating an FEA mesh.
Subordinate Shapes
By nesting one shape inside another, you can create a new shape. The new shape will be the parent shape minus the area intersected by the child shape, or subordinate shape. You can nest any number of shapes in a parent shape. Furthermore, the child shapes can have their own nested shapes. This second level of nesting will remove intersected area of that shape from the child shape which will have the net effect of adding that area back to the child's parent shape. You can continue nesting to any number of levels and each level will alternate between removing and adding area to the final shape.
Using Nested Shapes
In scripted files, shapes are nested using the Cut command:
(Parent_Shape) Cut (Child_Shape) Cut Cut (Child_Shape) … Cut (Child_Shape)
The (Parent_Shape) is created with any shape command (such as 2D or 3D shape commands). To add a child, or subordinate shape, to the (Parent_Shape), use any (Child_Shape), but preface the standard shape command with a single Cut command. To add a subordinate shape to a shape that is already a subordinate shape, preface the shape command with two Cuts or with Cut Cut. You can continue nesting shapes to any level by using the required number of Cut commands (separated by spaces).
Subordinate shapes must be properly nested. For proper nesting, the number of Cuts must be less than or equal to previous command plus one. For example a shape prefaced with a single Cut can be followed by a shape with Cut Cut for a subordinate shape, a shape with Cut for another shape in the same parent shape, or a new shape with no Cuts to start a new parent shape. The shape cannot be followed by a shape with Cut Cut Cut or with more than three Cuts.
in XML input files, shapes are nested by nesting them within XML elements of other shape commands
<(Parent_Shape)> <(Child_Shape> <(Child_Shape/> </(Child_Shape)> ... <(Child_Shape)/> </(Parent_Shape)>
Notes
- Any shape type can be nested with another shape with the only restriction being that you cannot mix 2D or 3D shape commands. In other words, only 2D shapes can be nested in 2D shapes and only 3D shapes can be nested in 3D shapes.