AssemblyTree
Types
uint8_t |
Fields
const uint32_t |
|
const uint32_t |
|
const uint32_t |
Functions
void |
|
void |
|
void |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
|
bool |
Detailed Description
-
class AssemblyTree
AssemblyTree API.
Public Types
Public Functions
-
AssemblyTree(Logger const &logger, MemoryDevice *memory_device = nullptr)
Constructor.
-
AssemblyTree(AssemblyTree &&other)
Constructor.
-
~AssemblyTree()
Destructor.
-
void operator=(AssemblyTree &&other)
-
void SetOriginalFileName(const char *name)
Store the full path and name of the file that has been converted.
- Parameters
name – Name of the node.
- Returns
none.
-
void SetOriginalFileType(FileType type)
Store the type of the file that has been converted.
- Parameters
Type – of the file that has been converted.
- Returns
none.
-
bool CreateAssemblyTreeRoot(NodeId &outIDRoot)
Creates a root node for the assembly.
- Parameters
outIDRoot – (out) a node ID to access the created node.
- Returns
true if all went right, false otherwise.
-
bool CreateChild(NodeId parentNodeID, NodeId &outIDChild, bool isAConfigurationNode = false, bool isADefaultNode = false)
Creates a child node linked with its parent.
- Parameters
parentNodeID – (in) ID of the parent node.
outIDChild – (out) a node ID to access the created node.
isAConfigurationNode – (in) optional parameter telling if the node is a CAD configuration node.
- Returns
true if all went right, false otherwise.
-
bool SetNodeName(NodeId nodeID, const char *name)
Name a node.
- Parameters
nodeID – Node ID.
name – Name of the node.
- Returns
true if all went right, false otherwise.
-
bool SetNodeLocalTransform(NodeId nodeID, Matrix3d const &localTransform)
Set the local transform of the node.
- Parameters
nodeID – Node ID.
localTransform – Matrix representing the local transform of the node.
- Returns
true if all went right, false otherwise.
-
bool SetNodeLocalTransform(NodeId nodeID, DMatrix3d const &localTransform)
Set the local transform of the node.
- Parameters
nodeID – Node ID.
localTransform – Matrix representing the local transform of the node.
- Returns
true if all went right, false otherwise.
-
bool SetNodeMaterial(NodeId nodeID, SC::Store::Material const &material)
Set the material of the node.
- Parameters
nodeID – Node ID.
material – Material to set on the node.
- Returns
true if all went right, false otherwise.
-
bool SetNodeMaterial(NodeId nodeID, uint32_t styleIndex, uint16_t behavior)
Set the material of the node.
- Parameters
nodeID – Node ID.
styleIndex – Index of the display style in the global style array. Comes from the HOOPS Exchange definition. Please refer to the Exchange documentation for more information: http://docs.techsoft3d.com/exchange/latest/build/struct_a3_d_graphics_data.html
behavior – Behavior comes from the HOOPS Exchange definition. Please refer to the Exchange documentation for more information: http://docs.techsoft3d.com/exchange/latest/build/group__a3d__graphicsbits.html
- Returns
true if all went right, false otherwise.
-
bool SetNodeVisibility(NodeId nodeID, bool visible)
Set if the node is visible or not.
- Parameters
nodeID – Node ID.
visible – true if visible, false if not.
- Returns
true if all went right, false otherwise.
-
bool SetNodeWasRemoved(NodeId nodeID, bool removed)
Set if the node has been set as “removed”. It reflects the fact that some objects in a CAD system could be set as removed, meaning they’re still here but not interacting in any way with the existing scene. Corresponds to the removed boolean available in the HOOPS Exchange API (http://docs.techsoft3d.com/exchange/latest/build/struct_a3_d_misc_cascaded_attributes_data.html)
- Parameters
nodeID – Node ID.
removed – true if “removed”, false if not.
- Returns
true if all went right, false otherwise.
-
bool SetNodeUnit(NodeId nodeID, double unit)
Set node unit.
- Parameters
nodeID – Node ID.
unit – multiplier of millimeters (for example inches will be 25.4).
- Returns
true if all went right, false otherwise.
-
bool SetNodeFilePath(NodeId nodeID, const char *filePath)
Set node file path.
- Parameters
nodeID – Node ID.
filePath – CAD file file path that node came from.
- Returns
true if all went right, false otherwise.
-
bool AddAttribute(NodeId nodeID, const char *attributeName, AttributeType attributeType, const char *attributeValue)
Adds an attribute to the node.
- Parameters
nodeID – Node ID.
attributeName – Attribute name.
attributeType – Attribute type.
attributeValue – Attribute value.
- Returns
true if all went right, false otherwise.
-
bool AddAttribute(NodeId nodeID, const char *attributeSetName, const char *attributeName, AttributeType attributeType, const char *attributeValue, std::vector<SC::Store::UnitData> attributeUnit)
Adds an attribute to the node.
- Parameters
nodeID – Node ID.
attributeSetName – Attribute set name.
attributeName – Attribute name.
attributeType – Attribute type.
attributeValue – Attribute value.
- Returns
true if all went right, false otherwise.
-
bool SetGenericId(NodeId nodeID, const char *id)
Set a Generic ID to the node.
- Parameters
nodeID – Node ID.
id – generic id.
- Returns
true if all went right, false otherwise.
-
bool SetGenericType(NodeId nodeID, const char *type)
Set a Generic Type to the node.
- Parameters
nodeID – Node ID.
type – generic type.
- Returns
true if all went right, false otherwise.
-
bool AddUserData(NodeId nodeID, UserDataIndex index, const uint8_t *dataBegin, const uint8_t *dataEnd)
Adds user data to the node.
- Parameters
nodeID – Node ID.
userDataIndex – The index of the user data.
dataBegin – The start pointer of the user data bytes.
dataEnd – The end pointer of the user data bytes.
- Returns
true if all went right, false otherwise.
-
bool AddFaceAttribute(NodeId bodyNodeID, uint32_t faceIndex, const char *attributeName, AssemblyTree::AttributeType attributeType, const char *attributeValue)
Adds an attribute to a face of the node.
- Parameters
bodyNodeID – Body Node ID.
faceIndex – Face Index.
attributeName – Attribute name.
attributeType – Attribute type.
attributeValue – Attribute value.
- Returns
true if all went right, false otherwise.
-
bool AddFaceAttribute(NodeId bodyNodeID, uint32_t faceIndex, const char *attributeSetName, const char *attributeName, AssemblyTree::AttributeType attributeType, const char *attributeValue)
Adds an attribute to a face of the node.
- Parameters
bodyNodeID – Body Node ID.
faceIndex – Face Index.
attributeSetName – Attribute set name.
attributeName – Attribute name.
attributeType – Attribute type.
attributeValue – Attribute value.
- Returns
true if all went right, false otherwise.
-
bool AddEdgeAttribute(NodeId bodyNodeID, uint32_t edgeIndex, const char *attributeName, AssemblyTree::AttributeType attributeType, const char *attributeValue)
Adds an attribute to an edge of the node.
- Parameters
bodyNodeID – Body Node ID.
edgeIndex – Edge Index.
attributeName – Attribute name.
attributeType – Attribute type.
attributeValue – Attribute value.
- Returns
true if all went right, false otherwise.
-
bool AddEdgeAttribute(NodeId bodyNodeID, uint32_t edgeIndex, const char *attributeSetName, const char *attributeName, AssemblyTree::AttributeType attributeType, const char *attributeValue)
Adds an attribute to an edge of the node.
- Parameters
bodyNodeID – Body Node ID.
edgeIndex – Edge Index.
attributeSetName – Attribute set name.
attributeName – Attribute name.
attributeType – Attribute type.
attributeValue – Attribute value.
- Returns
true if all went right, false otherwise.
-
bool AddPointAttribute(NodeId bodyNodeID, uint32_t pointIndex, const char *attributeName, AssemblyTree::AttributeType attributeType, const char *attributeValue)
Adds an attribute to a point of the node.
- Parameters
bodyNodeID – Body Node ID.
pointIndex – Point Index.
attributeName – Attribute name.
attributeType – Attribute type.
attributeValue – Attribute value.
- Returns
true if all went right, false otherwise.
-
bool AddPointAttribute(NodeId bodyNodeID, uint32_t pointIndex, const char *attributeSetName, const char *attributeName, AssemblyTree::AttributeType attributeType, const char *attributeValue)
Adds an attribute to a point of the node.
- Parameters
bodyNodeID – Body Node ID.
pointIndex – Point Index.
attributeSetName – Attribute set name.
attributeName – Attribute name.
attributeType – Attribute type.
attributeValue – Attribute value.
- Returns
true if all went right, false otherwise.
-
bool SetPhysicalProperties(NodeId nodeID, SC::Store::DVector gravityCenter, double surfaceArea, double volume)
Sets physical properties (volume, area, gravity center) to the node.
- Parameters
nodeID – Node ID.
gravityCenter – gravity center in local coordinates.
surfaceArea – surface area, in squared current unit.
volume – volume, in cubed current unit.
- Returns
true if all went right, false otherwise.
-
bool SetBoundingBox(NodeId nodeID, SC::Store::BBox bbox)
Sets BoundingBox to the node.
- Parameters
nodeID – Node ID.
BBox – in current unit
- Returns
true if all went right, false otherwise.
-
bool SetNodeExchangeId(NodeId nodeID, const char *exchangeId)
Sets ExchangeId to the node.
- Parameters
nodeID – Node ID.
exchangeId –
- Returns
true if all went right, false otherwise.
-
bool AddFilterToNode(NodeId nodeID, const FilterData &filterData)
Add Filter to the node.
- Parameters
nodeID – Node ID.
filterData – data of the filter
- Returns
true if all went right, false otherwise.
-
bool SetNodeLayerId(NodeId nodeID, LayerId layerId)
Sets LayerId to the node.
- Parameters
nodeID – Node ID.
layerId –
- Returns
true if all went right, false otherwise.
-
bool AddLayerToNode(NodeId nodeID, LayerId layerId, const char *layerName)
Add Layer to the layer list of the node.
- Parameters
nodeID – Node ID.
layerId –
layerName –
- Returns
true if all went right, false otherwise.
-
bool AddRelationshipToNode(NodeId nodeID, const RelationshipData &relationshipData)
Add Relationship to the relationship list of the node.
- Parameters
nodeID – Node ID.
relationshipData – data of the relationship
- Returns
true if all went right, false otherwise.
-
bool CreateAndAddBodyInstance(NodeId nodeID, NodeId &outBodyInstanceNodeID)
Creates a body instance on a assembly node.
- Parameters
nodeID – Assembly node ID.
outBodyInstanceNodeID – (out) a node ID to access the created body instance.
- Returns
true if all went right, false otherwise.
-
bool SetBodyInstanceMeshInstanceKey(NodeId nodeID, InstanceInc const &meshInstanceKey)
Set mesh instance key on a body instance node.
- Parameters
nodeID – Body instance node ID.
meshInstanceKey – Instance key of the mesh.
- Returns
true if all went right, false otherwise.
-
bool SetBodyInstanceRef(NodeId nodeID, NodeId const &bodyRef)
Set referenced body id on a body instance node.
- Parameters
nodeID – Body instance node ID.
bodyRef – Instance key of the referred body.
- Returns
true if all went right, false otherwise.
-
NodeId CreatePart()
Creates an part node.
- Parameters
none. –
- Returns
a node ID to access the created part node.
-
bool SetPart(NodeId assemblyNodeID, NodeId partNodeID)
Set a part on an assembly node.
- Parameters
assemblyNodeID – ID of the assembly node.
partNodeID – ID of the part node.
- Returns
true if all went right, false otherwise.
-
bool SetExternalModel(NodeId assemblyNodeID, const char *name)
Set a link to an external model file (the model will then be included during BuildMasterAssemblyModel() call).
- Parameters
assemblyNodeID – ID of the assembly node.
name – Name of the model.
- Returns
true if all went right, false otherwise.
-
bool CreateAndAddBody(NodeId partNodeID, NodeId &outBodyNodeID, BodyType bodyType = BodyTypeNotSet)
Creates a body on a part.
- Parameters
partNodeID – (in) ID of the part node.
outBodyNodeID – (out) a node ID to access the created body.
bodyType – (in) optional parameter to specify which type of body it is (brep, tess, wireframe, points).
- Returns
true if all went right, false otherwise.
-
bool SetLineEdgeMeasurementData(NodeId bodyNodeID, uint32_t edgeIndex, float length)
Method to set Line measurement information on a specified body.
- Parameters
bodyNodeID – Body node ID.
edgeIndex – Edge index.
length – Length of line.
- Returns
true if all went right, false otherwise.
-
bool SetCircleEdgeMeasurementData(NodeId bodyNodeID, uint32_t edgeIndex, float radius, Point const &origin, Vector const &normal)
Method to set Circle measurement information on a specified body.
- Parameters
bodyNodeID – Body node ID.
edgeIndex – Edge index.
radius – Radius of circle.
origin – Center of circle.
normal – Normal (orientation) of circle
- Returns
true if all went right, false otherwise.
-
bool SetOtherEdgeMeasurementData(NodeId bodyNodeID, uint32_t edgeIndex, float length)
Method to set Measurement information on a specified body of edge that is non-standard.
- Parameters
bodyNodeID – Body node ID.
edgeIndex – Edge index.
length – Length of edge.
- Returns
true if all went right, false otherwise.
-
bool SetCylinderFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex, float radius, Point const &origin, Vector const &normal)
Method to set Cylindrical face measurement information on a specified body.
- Parameters
bodyNodeID – Body node ID.
faceIndex – Face index.
radius – Radius of Cylinder.
origin – Center point of Cylinder.
normal – Orientation of Cylinder
- Returns
true if all went right, false otherwise.
-
bool SetPlaneFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex, Point const &origin, Vector const &normal)
Method to set planar face measurement information on a specified body.
- Parameters
bodyNodeID – Body node ID.
faceIndex – Face index.
origin – Origin of plane.
normal – Plane normal.
- Returns
true if all went right, false otherwise.
-
bool SetConeFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex, float radius, Point const &origin, Vector const &normal, float halfAngle)
Method to set cone measurement information on a specified body.
- Parameters
bodyNodeID – Body node ID.
faceIndex – Face index.
radius – Radius of Cone.
origin – Center point of Cone.
normal – Orientation of Cone.
halfAngle – Half Angle of cone.
- Returns
true if all went right, false otherwise.
-
bool SetSphereFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex, float radius, Point const &origin, Vector const &normal)
Method to set spherical face measurement information on a specified body.
- Parameters
bodyNodeID – Body node ID.
faceIndex – Face index.
radius – Radius of sphere.
origin – Center point of sphere.
normal – Normal of sphere.
- Returns
true if all went right, false otherwise.
-
bool SetTorusFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex, float majorRadius, float minorRadius, Point const &origin, Vector const &normal)
Method to set torus measurement information on a specified body.
- Parameters
bodyNodeID – Body node ID.
faceIndex – Face index.
majorRadius – Major Radius of Torus.
minorRadius – Minor Radius of Torus.
origin – Center point of Torus.
normal – Orientation of Torus.
- Returns
true if all went right, false otherwise.
-
bool SetBlend01FaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex)
Method to set faceIndex and bodyNodeID on a blend01 (more parameters for additional data will be available in a future release).
- Parameters
bodyNodeID – Body node ID.
faceIndex – Face index.
- Returns
true if all went right, false otherwise.
-
bool SetBlend02FaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex)
Method to set faceIndex and bodyNodeID on a blend02 (more parameters for additional data will be available in a future release).
- Parameters
bodyNodeID – Body node ID.
faceIndex – Face index.
- Returns
true if all went right, false otherwise.
-
bool SetBlend03FaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex)
Method to set faceIndex and bodyNodeID on a blend03 (more parameters for additional data will be available in a future release).
- Parameters
bodyNodeID – Body node ID.
faceIndex – Face index.
- Returns
true if all went right, false otherwise.
-
bool SetNurbsFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex)
Method to set faceIndex and bodyNodeID on a NURBS body (more parameters for additional data will be available in a future release).
- Parameters
bodyNodeID – Body node ID.
faceIndex – Face index.
- Returns
true if all went right, false otherwise.
-
bool SetCylindricalFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex)
Method to set faceIndex and bodyNodeID on a cylinder body (more parameters for additional data will be available in a future release).
- Parameters
bodyNodeID – Body node ID.
faceIndex – Face index.
- Returns
true if all went right, false otherwise.
-
bool SetOffsetFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex)
Method to set faceIndex and bodyNodeID on an Offset body (more parameters for additional data will be available in a future release).
- Parameters
bodyNodeID – Body node ID.
faceIndex – Face index.
- Returns
true if all went right, false otherwise.
-
bool SetPipeFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex)
Method to set faceIndex and bodyNodeID on a Pipe body (more parameters for additional data will be available in a future release).
- Parameters
bodyNodeID – Body node ID.
faceIndex – Face index.
- Returns
true if all went right, false otherwise.
-
bool SetRuledFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex)
Method to set faceIndex and bodyNodeID on a Ruled body (more parameters for additional data will be available in a future release).
- Parameters
bodyNodeID – Body node ID.
faceIndex – Face index.
- Returns
true if all went right, false otherwise.
-
bool SetRevolutionFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex)
Method to set faceIndex and bodyNodeID on a Revolution body (more parameters for additional data will be available in a future release).
- Parameters
bodyNodeID – Body node ID.
faceIndex – Face index.
- Returns
true if all went right, false otherwise.
-
bool SetExtrusionFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex)
Method to set faceIndex and bodyNodeID on an Extrusion body (more parameters for additional data will be available in a future release).
- Parameters
bodyNodeID – Body node ID.
faceIndex – Face index.
- Returns
true if all went right, false otherwise.
-
bool SetFromCurvesFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex)
Method to set faceIndex and bodyNodeID on a Curves body (more parameters for additional data will be available in a future release).
- Parameters
bodyNodeID – Body node ID.
faceIndex – Face index.
- Returns
true if all went right, false otherwise.
-
bool SetTransformFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex)
Method to set faceIndex and bodyNodeID on a Transform body (more parameters for additional data will be available in a future release).
- Parameters
bodyNodeID – Body node ID.
faceIndex – Face index.
- Returns
true if all went right, false otherwise.
-
bool AddCADView(NodeId assemblyNodeID, const char *viewName, SC::Store::Camera const *camera, SC::Store::InstanceIncs const &pmiToShow, std::vector<NodeId> const &nodesToShow, std::vector<NodeId> const &nodesToHide, std::map<NodeId, SC::Store::Matrix3d> const &nodesIDToLocalTransform, std::vector<SC::Store::Plane> const &cuttingPlanes, SC::Store::InstanceInc const *frameMeshInstanceInc, bool frameInitiallyVisible, bool isAnnotationView, NodeId &outCADViewID, std::vector<uint32_t> const &filtersToShowOrHide)
Adds a CAD view on the node.
- Parameters
assemblyNodeID – Node id to attach the created view to
viewName – Name of the view
camera – Camera that will be set when the view gets activated, pass nullptr if none to set
pmiToShow – Instance incs of the PMIs to show for the view
nodesToShow – Node IDs of the elements to force visibility on
nodesToHide – Node IDs of the elements to force visibility off
nodesIDToLocalTransform – Map of node ID and matrix pair, defining specific local transform to apply
cuttingPlanes – Cutting planes to set when the view gets activated
frameMeshInstanceInc – (could be null) Mesh instance inc of the rectangular frame (mostly found on capture views)
frameInitiallyVisible – Tells if the rectangular frame is initially visible or not
isAnnotationView – Tells if the CAD view is an annotation view or not
outCADViewID – (out) An ID to access the created CAD View
filtersToShowOrHide – View filters: a map of layer id’s to show or hide
- Returns
true if all went right, false otherwise.
-
bool AddCADView(NodeId assemblyNodeID, const char *viewName, SC::Store::Camera const *camera, SC::Store::InstanceIncs const &pmiToShow, std::vector<NodeId> const &nodesToShow, std::vector<NodeId> const &nodesToHide, std::map<NodeId, SC::Store::DMatrix3d> const &nodesIDToLocalTransform, std::vector<SC::Store::Plane> const &cuttingPlanes, SC::Store::InstanceInc const *frameMeshInstanceInc, bool frameInitiallyVisible, bool isAnnotationView, NodeId &outCADViewID, std::vector<uint32_t> const &filtersToShowOrHide)
Adds a CAD view on the node.
- Parameters
assemblyNodeID – Node id to attach the created view to
viewName – Name of the view
camera – Camera that will be set when the view gets activated, pass nullptr if none to set
pmiToShow – Instance incs of the PMIs to show for the view
nodesToShow – Node IDs of the elements to force visibility on
nodesToHide – Node IDs of the elements to force visibility off
nodesIDToLocalTransform – Map of node ID and matrix pair, defining specific local transform to apply
cuttingPlanes – Cutting planes to set when the view gets activated
frameMeshInstanceInc – (could be null) Mesh instance inc of the rectangular frame (mostly found on capture views)
frameInitiallyVisible – Tells if the rectangular frame is initially visible or not
isAnnotationView – Tells if the CAD view is an annotation view or not
outCADViewID – (out) An ID to access the created CAD View
filtersToShowOrHide – View filters: a map of layer id’s to show or hide
- Returns
true if all went right, false otherwise.
-
bool SetCADViewFlags(NodeId CADViewNodeID, bool bIsCameraSet = true, bool bIsPMIFilteringSet = true, bool bIsGeomFilteringSet = true, bool bIsCrosssectionSet = true, bool bIsExplosionSet = true, bool bIsCombineState = false)
Set a CAD view Flags.
- Parameters
CADViewNideID – Node id of the CADView to set flags (must already exist)
bIsCameraSet – The View as a Camera, default: true
bIsPMIFilteringSet – The View handle PMI visibility, default: true
bIsGeomFilteringSet – The View handle Geometry visibility, default: true (not handled for now)
bIsCrosssectionSet – The View has a crosssection set, default: true (not handled for now)
bIsExplosionSet – The View has an explosion set, default: true (not handled for now)
bIsCombineState – This is a Combine State, default: false (not handled for now)
- Returns
true if all went right, false otherwise.
-
bool AddPMI(NodeId assemblyNodeID, const char *name, SC::Store::InstanceInc const &meshInstanceInc, bool initiallyVisible, PMIType pmiType, PMISubType pmiSubType, std::vector<RefOnTopoItem> const &refOnTopoItems, NodeId &outPMIID)
Adds a PMI instance with a single mesh instance.
- Parameters
assemblyNodeID – Node id to attach the created PMI to
name – Name of the PMI
meshInstanceInc – PMI graphic representation mesh instance inc
initiallyVisible – Tells if the PMI is initially visible or not
pmiType – see PMIType enum (Datum, Gdt, Dimension…)
pmiSubType – see PMISubType enum (DatumTarget, GdtFcf, DimensionDistance…)
refOnTopoItems – see RefOnTopoItem. It defines the PMI links to a body element, like a face or an edge
outPMIID – (out) An ID to access the created PMI
- Returns
true if all went right, false otherwise.
-
bool AddPMI(NodeId assemblyNodeID, const char *name, std::vector<InstanceData> const &instanceDatas, bool initiallyVisible, PMIType pmiType, PMISubType pmiSubType, std::vector<RefOnTopoItem> const &refOnTopoItems, NodeId &outPMIID)
Adds a PMI instance with one or more mesh instances.
- Parameters
assemblyNodeID – Node id to attach the created PMI to
name – Name of the PMI
instanceDatas – PMI graphic representation mesh instances
initiallyVisible – Tells if the PMI is initially visible or not
pmiType – see PMIType enum (Datum, Gdt, Dimension…)
pmiSubType – see PMISubType enum (DatumTarget, GdtFcf, DimensionDistance…)
refOnTopoItems – see RefOnTopoItem. It defines the PMI links to a body element, like a face or an edge
outPMIID – (out) An ID to access the created PMI
- Returns
true if all went right, false otherwise.
-
bool AddPMI(NodeId assemblyNodeID, const char *name, std::vector<SC::Store::InstanceInc> const &meshInstanceIncs, bool initiallyVisible, PMIType pmiType, PMISubType pmiSubType, std::vector<RefOnTopoItem> const &refOnTopoItems, NodeId &outPMIID)
Adds a PMI instance with one or more mesh instances.
- Parameters
assemblyNodeID – Node id to attach the created PMI to
name – Name of the PMI
meshInstanceIncs – PMI graphic representation mesh instance incs
initiallyVisible – Tells if the PMI is initially visible or not
pmiType – see PMIType enum (Datum, Gdt, Dimension…)
pmiSubType – see PMISubType enum (DatumTarget, GdtFcf, DimensionDistance…)
refOnTopoItems – see RefOnTopoItem. It defines the PMI links to a body element, like a face or an edge
outPMIID – (out) An ID to access the created PMI
- Returns
true if all went right, false otherwise.
-
bool SetColorMaterialAndStyleTable(std::vector<double> const &colors, std::vector<MaterialData> const &materials, std::vector<StyleData> const &styles)
Register the global color, material and style tables.
- Parameters
colors – R,G,B one double for each.
materials – The materials table comes from the HOOPS Exchange definition. Please refer to Exchange documentation for more information: http://docs.techsoft3d.com/exchange/latest/build/struct_a3_d_graph_material_data.html
styles – The styles table comes from the HOOPS Exchange definition. Please refer to Exchange documentation for more information: http://docs.techsoft3d.com/exchange/latest/build/struct_a3_d_graph_style_data.html
- Returns
true if all went right, false otherwise.
-
bool SetViewAxes(DVector const &front, DVector const &up)
Set the Front and Up vector for the AssemblyTree
- Parameters
front – vector
up – vector
- Returns
true if all went right, false otherwise.
-
bool SetDefaultCamera(Camera const &camera)
Set the default camera for the AssemblyTree
- Parameters
camera – Camera to be set as default
- Returns
true if all went right, false otherwise.
-
bool SetIsDefaultView(NodeId CADViewNodeID, bool bIsdefault)
Set the default cad view for the AssemblyTree
- Parameters
CadViewNodeID – CAd view ID to be set as default
- Returns
true if all went right, false otherwise.
-
bool SerializeToModel(Model &model)
Serialize data into a given model.
- Parameters
model – Model to serialize into.
- Returns
true if all went right, false otherwise.
-
bool SerializeToXML(const char *outputXMLFilePathUTF8, const char *shatteredSearchDir = nullptr)
Serialize data into a XML file.
- Parameters
outputXMLFilePathUTF8 – File path of the xml file to output into.
shatteredSearchDir – Directory path of the shattered models written to XML.
- Returns
true if all went right, false otherwise.
-
bool SerializeToMeasurementJSONZip(const char *outputJSONFilePathUTF8)
-
bool DeserializeFromXML(const char *inputXMLFilePathUTF8)
De-serialize data from a XML file and create the assembly tree.
- Parameters
inputXMLFilePathUTF8 – File path of the xml file to read from.
- Returns
true if all went right, false otherwise.
-
bool BuildMasterAssemblyModel(const char *modelsPathUTF8, const char *assemblyModelPathUTF8, const char *workingDirectoryUTF8, bool create_scz, bool compress_scz = true)
Will gather shattered part model files and create the master assembly model.
- Parameters
modelsPathUTF8 – A path containing the models to assemble.
assemblyModelPathUTF8 – Full path of the assembly model to build.
create_scz – Controls if the created master will be a .scz file.
compress_scz – Controls if the created .scz will be compressed.
- Returns
true if all went right, false otherwise.
-
bool CreateAndAddDrawingSheet(NodeId parentNodeID, NodeId &outIDDrawingSheet)
Creates a drawing sheet. You can find more information in the HOOPS Exchange documentation: http://docs.techsoft3d.com/exchange/latest/build/group__a3d__drawing__sheet.html
- Parameters
parentNodeID – (in) ID of the parent node.
outIDSheet – (out) a node ID to access the created drawing sheet.
- Returns
true if all went right, false otherwise.
-
bool CreateAndAddDrawingView(NodeId drawingSheetNodeID, NodeId &outIDDrawingView)
Creates a drawing view. You can find more information in the HOOPS Exchange documentation: http://docs.techsoft3d.com/exchange/latest/build/group__a3d__drawing__view.html
- Parameters
sheetNodeID – (in) ID of the sheet that will hold the view.
outIDDrawing – (out) a node ID to access the created drawing view.
- Returns
true if all went right, false otherwise.
Public Static Attributes
-
static const uint32_t MAJOR_VERSION = 25
Major version number.
-
static const uint32_t MINOR_VERSION = 1
Minor version number.
-
static const uint32_t PATCH_VERSION = 0
Patch version number.
-
class Walker
-
AssemblyTree(Logger const &logger, MemoryDevice *memory_device = nullptr)