Difference between revisions of "Nested Shapes"
Line 17: | Line 17: | ||
The <tt>(Parent_Shape)</tt> is created with any shape command (such as [[2D MPM Shape Commands|2D]] or [[3D MPM Shape Commands|3D shape commands]]. To add a child, or subordinate shape, to the <tt>(Parent_Shape)</tt>, use any <tt>(Child_Shape)</tt>, but preface the standard shape command with <tt>Cut</tt> command. To add subordinate shape to a shape that is already a subordinate shape, preface the shape command with two <tt>Cut</tt>s or with <tt>Cut Cut</tt>. You can continue nesting shapes to any level by using the required number of <tt>Cut</tt> commands (separated by spaces). | The <tt>(Parent_Shape)</tt> is created with any shape command (such as [[2D MPM Shape Commands|2D]] or [[3D MPM Shape Commands|3D shape commands]]. To add a child, or subordinate shape, to the <tt>(Parent_Shape)</tt>, use any <tt>(Child_Shape)</tt>, but preface the standard shape command with <tt>Cut</tt> command. To add subordinate shape to a shape that is already a subordinate shape, preface the shape command with two <tt>Cut</tt>s or with <tt>Cut Cut</tt>. You can continue nesting shapes to any level by using the required number of <tt>Cut</tt> commands (separated by spaces). | ||
Subordinate shapes must be properly nested. For proper nesting, the number of <tt>Cut</tt>s must be less than or equal to previous command plus one. For example a shape | Subordinate shapes must be properly nested. For proper nesting, the number of <tt>Cut</tt>s must be less than or equal to previous command plus one. For example a shape prefaced with a single <tt>Cut</tt> can be followed by a shape with <tt>Cut Cut</tt> for a subordinate shape, a shape with <tt>Cut</tt> for another shape in the same parent shape, or a new shape with no <tt>Cut</tt>s to start a new parent shape. The shape cannot be followed by a shape <tt>Cut Cut Cut</tt> r more than three <tt>Cut</tt>s. |
Revision as of 20:54, 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 covered 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 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 are 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 Cut command. To add 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 Cut Cut Cut r more than three Cuts.