Difference between revisions of "Nested Shapes"

From OSUPDOCS
Jump to navigation Jump to search
(Created page with "By nesting shapes, you can create new shapes for creating material points or creating and FEA mesh.")
 
 
(16 intermediate revisions by the same user not shown)
Line 1: Line 1:
By nesting shapes, you can create new shapes for creating material points or creating and FEA mesh.
By nesting shapes, you can create new shapes for [[MPM Region and Hole Commands|creating material points]] or [[Create a Mesh with Images and Shapes|creating an FEA mesh]].
__TOC__
== 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 area back the intersected area between the second level shape and the main 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 <tt>Cut</tt> command:
 
(Parent_Shape)
Cut (Child_Shape)
Cut Cut (Child_Shape)
Cut (Child_Shape)
 
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 a single <tt>Cut</tt> command. To add a 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 and separated by a space with the shape command).
 
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 with <tt>Cut Cut Cut</tt> or with more than three <tt>Cut</tt>s.
 
in <tt>XML</tt> input files, shapes are nested by nesting them within <tt>XML</tt> 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 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.

Latest revision as of 17:33, 11 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 area back the intersected area between the second level shape and the main 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 and separated by a space with the shape command).

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

  1. 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.