DesignSeries00022.pngStep 2: Create and Copy a Wrapper Node

Wrapping a network of nodes serves a dual purpose of making the script more readable on the monitor, and allowing code to be duplicated without cluttering the drawing area.

To create a wrapper node:

  1. Right-click (Windows) or Ctrl-click (Mac) on any node in the network, and select Wrap Marionette Network from the context menu.

  2. Wrapper.png 

    The network becomes a wrapper node.

    To allow inputs and outputs to the wrapper, the wrapped nodes must be named. In this example, you need to provide access to the origin of the rectangular prism, its dimensions (width, depth, and height), and the resulting extruded object.

  3. Double click on the wrapper to enter object editing mode and access the Marionette script inside the wrapper.

  4. Select each node listed, and enter its Name in the Object Info palette.

  5. Node
    Name

    Get XYZ

    Origin

    Pass (attached to width input on Rectangle node)

    Width

    Pass (attached to height input on Rectangle node)

    Depth

    Pass (attached to top input on Extrude node)

    Height

    Extrude

    obj

    NameNodes.png 

  6. Click Exit Marionette Script to return to your drawing. The wrapped network displays with the named nodes that can be accessed.

  7. ExitScript.png 

  8. Select the wrapper node, and enter the Name “Rectangular Prism Body” in the Object Info palette.

  9. Make two copies of the Rectangular Prism Body wrapper. These will serve as the basis for the cabinet top and cavity in future steps; the parameters will be redefined for each piece of the cabinet.

  10. ThreeCopies.png 

  11. On the original wrapper node (the body), attach a 3D Point node to the Origin port of the Rectangular Prism Body wrapper and a Dim node to each of the other ports. Connect the wires.

  12. BodyWrapNode.png 

  13. Select each Dim node, and assign the following names and dimension values in the Object Info palette.

  14. Body Prism Port
    Dim Node Name
    Value

    Width

    Body Width

    3 feet

    Depth

    Body Depth

    2 feet

    Height

    Body Height

    3.5 feet

    NodeDims.png 

  15. Select a node and click Run from the Object Info palette.

A rectangular prism displays at the assigned origin (0,0,0) with the prescribed dimensions. This is the cabinet base. The prisms that compose the cabinet top and cavity are defined relative to the location and size of this base object.

CabinetBase.png 

You can download the tutorial at this stage here (internet access required).

~~~~~~~~~~~~~~~~~~~~~~~~~

Step 3: Add a Top

Was this page helpful?

vectorworks.net