PMI (Product and Manufacturing Information) refers to the annotations and attributes that compliment the geometric definitions of a CAD model. Often PMI is used in conjunction with the 3D model within the model-based definition workflow to fully describe a 3D model without the need for 2D drawings.
In HOOPS Communicator PMI markup can be associated with specific components within the model hierarchy including faces or edges within a part. Often PMI elements are associated to CAD Views, in particular, annotation-views representing a specific state of the assembly.
By default, converter automatically imports all PMI elements from a CAD model. If you don’t want any PMI to be imported, you can specify "–import_pmi false" in the command line.
If you want PMI to be imported but want to exclude it only when generating a SC model you can specify "--sc_export_pmi false". If want to exclude PMI only when generating a PNG image, you can specify "--png_export_pmi false".
You can author your own PMI either with libsc or directly in the HOOPS Web Viewer. To find out more please refer to the libs and HOOPS Web Viewer Reference Manual.
Retrieving PMI Elements
To retrieve all PMI Elements associated with a specific CAD View you can use the getCadViewPmis() function which will return a list of PMI node ids.
[7, 19, 21, 23, 25, 27, 31, 33, 35, 37, 39, 43, 45, 47, 49, 55, 57, 59, 61, 63, 65, 67, 69, 71, 73]
When iterating over the model tree or handling selection events you can identify if a node refers to a PMI element with the getNodeType() function. If the node is a PMI element you can then identify the type of PMI as well as its subtype.
It is important to note that the meaning of the value returned by getPmiSubtype depends on the type of PMI.
See below for a list of PMI types. For a list of subtypes please refer to the HOOPS Web Viewer Reference manual
Additional information about a PMI element can be retrieved with the getNodeProperties() function.
Setting PMI Color
All PMI Elements have a color value associated with them which has been defined in the CAD System or during authoring. However, in some cases it might be desirable to override this default color values and instead display all PMI elements in the model with the same color. To do that you can specify the PMI color for the whole model with setPmiColor() and then enable the PMI Color override with SetPmiColorOverride().
The code above sets the PMI color to black and enables the PMI Color override resulting in every PMI in the model turning black. You can reset the PMI to their default color with setPmiColorOverride(false)