CAD Views


Overview

The term "CAD Views" in HOOPS Communicator refers to a particular representation of a 3D-scene defined by the aggregate of the following states:

  • Camera
  • Cutting Planes
  • Entity Visibility
  • Entity Color
  • Entity Position

A CAD view will often be associated with various PMI elements denoting model dimensions or other properties with parts not relevant to the current view hidden. A series of CAD Views could also comprise a work-instruction by moving parts to different locations and adding text labels and other information for each step.

CAD Views are either imported from CAD models via Converter or can be authored directly via libsc or in the HOOPS Web Viewer.

Example of a CAD View that activates a specific camera & cutting plane and enables various PMI Elements.

Each CAD View is referenced via a nodeid. To query all CAD Views in a model you can use the function getCADViews() which returns a map associating the name of the CAD View with its id.

hwv.model.getCadViewMap()

Result for landinggear contained in the package:

  1. 427: "__STARTING VIEW NOTES # Annotation View"
  2. 429: "__MAIN VIEW # Annotation View"
  3. 431: "__MAIN SECTION # Annotation View"
  4. 433: "__FRONT AXLE SECTION # Annotation View"
  5. 435: "__UPPER AXLE SECTION # Annotation View"
  6. 437: "__REAR AXLE SECTION # Annotation View"
  7. 439: "__SIDE FIXING SECTION # Annotation View"
  8. 441: "__SIDE BOX # Annotation View"
  9. 443: "__RIB HOLE SECTION # Annotation View"
  10. 444: "INITIAL"
  11. 445: "MAIN SECTION"
  12. 446: "FRONT AXLE SECTION"
  13. 447: "UPPER AXLE SECTION"
  14. 448: "REAR AXLE SECTION"
  15. 449: "SIDE FIXING SECTION"
  16. 450: "SIDE BOX"
  17. 451: "RIB HOLE SECTION"
  18. 452: "MAINVIEWFULLPMI"
  19. 453: "TS3D LOGO"
  20. 454: "STARTING VIEW NOTES"

Activating a CAD View

To activate a CAD View via the HOOPS Web Viewer UI simply switch to the Views tab in the Model Tree UI and activate the desired CAD View.

To activate a specific CAD View programmatically simply pass its nodeid to the activateCadView() function as seen below. If the CAD View contains a camera definition the camera of the scene will transition to its new location as soon as this function is called and all entities will be set to the various states listed above (visibility, color, position). The second parameter of this function defines the transition time to the new camera in milliseconds.

hwv.model.activateCadView(449)

Creating a New CAD View

You can create a new CAD View from scratch in the HOOPS Web Viewer with the createCadView() function though you are responsible for saving those CAD Views when the viewing session ends. Creating your own CAD Views in the client is an advanced topic we will not be discussing here in detail. If you simply want to store a specific camera orientation and assign redline and other markup elements to it we suggest using the markup manager discussed in the Markup Basics Programming Guide, for that purpose.

hwv.model.createCadView(hwv.model.getAbsoluteRootNode(), "New View", hwv.view.getCamera())

Other Considerations

CAD Views permanently change the state of various entities and will override any manual attribute changes performed on the model via the HOOPS Communicator API. To reset the model to its original state you can use the reset() function.

top_level:2 prog_guide:3