Cables Tutorial 2 : Creating Hooks and Loops

Cables Tutorial 2 : Creating Hooks and Loops

In this tutorial, you will learn how to use hook and loop groups to attach and detach objects during runtime. We will define attachment points, create hook and loop groups, and define the logic required to connect and disconnect them following user input.

For more information, refer to the documentation about Hook and Loop Groups.

Requirements

This module assumes that Cables Tutorial 1: Creating a Cable System is completed and you have a functional mobile crane with a cable system. If this module is not completed, you can use the mobile crane.vxmechanism located in the samples (<Vortex Demo Scenes Folder>\Equipment\MobileCrane\Dynamic\Design\mobile crane.vxmechanism) and skip steps 1-6.

Adding Attachment Points

In this step, we will add attachment points to the mobile crane's hook, the spreader bar, and the concrete pipe. These will be used to determine the location of the attachment(s) between the mechanisms.

  1. Open the Mobile Crane mechanism completed in Cables Tutorial 1: Creating a Cable System

  2. Under the Assemblies folder in the Explorer, open the Weight Hook assembly by double-clicking on it.

  3. In the Dynamics section of the Toolbox, insert an Attachment Point. Rename it 'Hook Attachment'

  4. Under Parameters in the Hook Attachment properties, set the Parent Part to Hook Shackle.

  5. Under Inputs, modify the translation component of its Local Transform to [-0.017 m, 0.000 m, -0.329 m]



  6. Save (Ctrl + S) and close the Weight Hook assembly.

  7. Open the SpreaderBar_Rigging_Workshop mechanism (<Vortex Sample Folder>\Equipment\SlingCable\Dynamic\Design\SpreaderBar_Rigging_Workshop.vxmechanism)

  8. Open the SpreaderBar assembly.

  9. Insert an attachment point to each of these parts :

    • Loop

    • Hook_Rear

    • Hook_Front

  10. Rename the attachments Loop_att, Hook_Rear_att, Hook_Front_att. Keep the translation component of their local transform at [0,0,0]

  11. Save (Ctrl + S) and close the SpreaderBar assembly.



  12. Open the Concrete Pipe Large_Workshop mechanism (<Vortex Demo Scenes Folder>\Equipment\SlingCable\Dynamic\Design\Concrete Pipe Large_Workshop.vxmechanism)

  13. Open its assembly (Concrete Pipe Large_Workshop_Assembly.vxassembly).

  14. Insert two Attachment Points to the only part in the assembly :

    • Pipe_Front [4.123 m, 0.000 m, 1.128 m]

    • Pipe_Rear [-4.179 m, 0.000 m, 1.114 m]

  15. Save (Ctrl + S) and close the Concrete Pipe Large assembly.

Defining Loop Groups

 

In this section, we define loop groups for the concrete pipe and the spreader bar. A loop group and a hook group that have the same label can be attached to each other.

Note

In this training exercise, loop groups are defined at the scene level for simplicity. If there were multiple instances of the concrete pipe or the spreader bar, it would've been more efficient to define the loop groups at the mechanism level. That way, there is no need to create loop groups for every instance, since they already exist in the mechanism. The same principle applies for Hook Groups.

  1. Open the Mobile Crane Workshop scene (<Vortex Sample Folder>\Scenario\MobileCrane Scene\MobileCrane Weight Hook Pipe_Workshop.vxscene)

  2. Insert the Mobile Crane, SpreaderBar_Rigging_Workshop, and Concrete Pipe Large_Workshop mechanisms in the scene. Those are the three mechanisms to which we added attachment points in the previous section.

  3. Using the Move (Ctrl + 2) and Rotate (Ctrl + 3) tools, place them in the scene to match the layout shown in the image :



  4. In the Dynamics section of the Toolbox, insert a Loop Group. Rename it "Pipe Loop Front".



  5. Under Parameters > Anchoring Points, change the size to 1.

  6. Set the Anchoring Point to the Pipe_Front attachment point, found in the Concrete Pipe Large assembly.

  7. Under Labels, change the size to 1. Name the label 0 to "Concrete Pipe Label"



  8. Duplicate (Ctrl + D) the Loop Group and rename it "Pipe Loop Rear"

  9. Change the Anchoring Point to the Pipe_Rear attachment point, found in the Concrete Pipe Large assembly.

  10. Repeat steps 4 to 7 for the Spreader Loop Group using these values:

    • Name: "Spreader Loop"

    • Anchoring Point: Loop_att, under the SpreaderBar assembly

    • Label: "Spreader Label"

Defining Hook Groups

In this step, we define hook groups for the spreader bar and the mobile crane hook block.

  1. In the Dynamics section of the Toolbox, insert a Hook Group. Rename it "Spreader Hook Front".



  2. Under Parameters > Anchoring Points, change the size to 1.

  3. Set the Anchoring Point to the Hook_Front_att attachment point, found in the SpreaderBar assembly.

  4. Under Labels, change the size to 1. Name the label 0 to "Concrete Pipe Label"

  5. Duplicate (Ctrl + D) the Hook Group and rename it "Spreader Hook Rear"

  6. Change the Anchoring Point to the Hook_Rear_att attachment point, found in the SpreaderBar assembly.

  7. Repeat steps 1 to 4 for the Mobile Crane Hook group using these values:

    • Name: "Mobile Crane Hook"

    • Anchoring Point: Hook Attachment, under the Weight Hook assembly of the Mobile Crane.

    • Label: "Spreader Label"

  8. Save (Ctrl + S) the scene.