AssemblyTree API. More...

#include <sc_assemblytree.h>

Classes

class  Walker
 

Public Types

enum  AttributeType : uint8_t {
  AttributeTypeUndefined = 0, AttributeTypeInt, AttributeTypeFloat, AttributeTypeTime,
  AttributeTypeString, AttributeTypeIgnored
}
 Type of attributes to set on nodes. More...
 

Public Member Functions

bool AddAttribute (NodeId nodeID, const char *attributeName, AttributeType attributeType, const char *attributeValue)
 
bool AddAttribute (NodeId nodeID, const char *attributeSetName, const char *attributeName, AttributeType attributeType, const char *attributeValue)
 
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)
 
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)
 
bool AddEdgeAttribute (NodeId bodyNodeID, uint32_t edgeIndex, const char *attributeName, AssemblyTree::AttributeType attributeType, const char *attributeValue)
 
bool AddEdgeAttribute (NodeId bodyNodeID, uint32_t edgeIndex, const char *attributeSetName, const char *attributeName, AssemblyTree::AttributeType attributeType, const char *attributeValue)
 
bool AddFaceAttribute (NodeId bodyNodeID, uint32_t faceIndex, const char *attributeName, AssemblyTree::AttributeType attributeType, const char *attributeValue)
 
bool AddFaceAttribute (NodeId bodyNodeID, uint32_t faceIndex, const char *attributeSetName, const char *attributeName, AssemblyTree::AttributeType attributeType, const char *attributeValue)
 
bool AddFilterToNode (NodeId nodeID, const FilterData &filterData)
 
bool AddLayerToNode (NodeId nodeID, LayerId layerId, const char *layerName)
 
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)
 
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)
 
bool AddPointAttribute (NodeId bodyNodeID, uint32_t pointIndex, const char *attributeName, AssemblyTree::AttributeType attributeType, const char *attributeValue)
 
bool AddPointAttribute (NodeId bodyNodeID, uint32_t pointIndex, const char *attributeSetName, const char *attributeName, AssemblyTree::AttributeType attributeType, const char *attributeValue)
 
bool AddRelationshipToNode (NodeId nodeID, const RelationshipData &relationshipData)
 
bool AddUserData (NodeId nodeID, UserDataIndex index, const uint8_t *dataBegin, const uint8_t *dataEnd)
 
 AssemblyTree (Logger const &logger, MemoryDevice *memory_device=nullptr)
 Constructor. More...
 
 AssemblyTree (AssemblyTree &&other)
 Constructor. More...
 
bool BuildMasterAssemblyModel (const char *modelsPathUTF8, const char *assemblyModelPathUTF8, const char *workingDirectoryUTF8, bool create_scz, bool compress_scz=true)
 
bool CreateAndAddBody (NodeId partNodeID, NodeId &outBodyNodeID, BodyType bodyType=BodyTypeNotSet)
 
bool CreateAndAddBodyInstance (NodeId nodeID, NodeId &outBodyInstanceNodeID)
 
bool CreateAndAddDrawingSheet (NodeId parentNodeID, NodeId &outIDDrawingSheet)
 
bool CreateAndAddDrawingView (NodeId drawingSheetNodeID, NodeId &outIDDrawingView)
 
bool CreateAssemblyTreeRoot (NodeId &outIDRoot)
 
bool CreateChild (NodeId parentNodeID, NodeId &outIDChild, bool isAConfigurationNode=false, bool isADefaultNode=false)
 
NodeId CreatePart ()
 
bool DeserializeFromXML (const char *inputXMLFilePathUTF8)
 
void operator= (AssemblyTree &&other)
 
bool SerializeToModel (Model &model)
 
bool SerializeToXML (const char *outputXMLFilePathUTF8, const char *shatteredSearchDir=nullptr)
 
bool SetBlend01FaceMeasurementData (NodeId bodyNodeID, uint32_t faceIndex)
 
bool SetBlend02FaceMeasurementData (NodeId bodyNodeID, uint32_t faceIndex)
 
bool SetBlend03FaceMeasurementData (NodeId bodyNodeID, uint32_t faceIndex)
 
bool SetBodyInstanceMeshInstanceKey (NodeId nodeID, InstanceInc const &meshInstanceKey)
 
bool SetBoundingBox (NodeId nodeID, SC::Store::BBox bbox)
 
bool SetCADViewFlags (NodeId CADViewNodeID, bool bIsCameraSet=true, bool bIsPMIFilteringSet=true, bool bIsGeomFilteringSet=true, bool bIsCrosssectionSet=true, bool bIsExplosionSet=true, bool bIsCombineState=false)
 
bool SetCircleEdgeMeasurementData (NodeId bodyNodeID, uint32_t edgeIndex, float radius, Point const &origin, Vector const &normal)
 
bool SetColorMaterialAndStyleTable (std::vector< double > const &colors, std::vector< MaterialData > const &materials, std::vector< StyleData > const &styles)
 
bool SetConeFaceMeasurementData (NodeId bodyNodeID, uint32_t faceIndex, float radius, Point const &origin, Vector const &normal, float halfAngle)
 
bool SetCylinderFaceMeasurementData (NodeId bodyNodeID, uint32_t faceIndex, float radius, Point const &origin, Vector const &normal)
 
bool SetCylindricalFaceMeasurementData (NodeId bodyNodeID, uint32_t faceIndex)
 
bool SetDefaultCamera (Camera const &camera)
 
bool SetExternalModel (NodeId assemblyNodeID, const char *name)
 
bool SetExtrusionFaceMeasurementData (NodeId bodyNodeID, uint32_t faceIndex)
 
bool SetFromCurvesFaceMeasurementData (NodeId bodyNodeID, uint32_t faceIndex)
 
bool SetGenericId (NodeId nodeID, const char *id)
 
bool SetGenericType (NodeId nodeID, const char *type)
 
bool SetLineEdgeMeasurementData (NodeId bodyNodeID, uint32_t edgeIndex, float length)
 
bool SetNodeExchangeId (NodeId nodeID, const char *exchangeId)
 
bool SetNodeFilePath (NodeId nodeID, const char *filePath)
 
bool SetNodeLayerId (NodeId nodeID, LayerId layerId)
 
bool SetNodeLocalTransform (NodeId nodeID, Matrix3d const &localTransform)
 
bool SetNodeLocalTransform (NodeId nodeID, DMatrix3d const &localTransform)
 
bool SetNodeMaterial (NodeId nodeID, SC::Store::Material const &material)
 
bool SetNodeMaterial (NodeId nodeID, uint32_t styleIndex, uint16_t behavior)
 
bool SetNodeName (NodeId nodeID, const char *name)
 
bool SetNodeUnit (NodeId nodeID, double unit)
 
bool SetNodeVisibility (NodeId nodeID, bool visible)
 
bool SetNodeWasRemoved (NodeId nodeID, bool removed)
 
bool SetNurbsFaceMeasurementData (NodeId bodyNodeID, uint32_t faceIndex)
 
bool SetOffsetFaceMeasurementData (NodeId bodyNodeID, uint32_t faceIndex)
 
void SetOriginalFileName (const char *name)
 
void SetOriginalFileType (FileType type)
 
bool SetOtherEdgeMeasurementData (NodeId bodyNodeID, uint32_t edgeIndex, float length)
 
bool SetPart (NodeId assemblyNodeID, NodeId partNodeID)
 
bool SetPhysicalProperties (NodeId nodeID, SC::Store::DVector gravityCenter, double surfaceArea, double volume)
 
bool SetPipeFaceMeasurementData (NodeId bodyNodeID, uint32_t faceIndex)
 
bool SetPlaneFaceMeasurementData (NodeId bodyNodeID, uint32_t faceIndex, Point const &origin, Vector const &normal)
 
bool SetRevolutionFaceMeasurementData (NodeId bodyNodeID, uint32_t faceIndex)
 
bool SetRuledFaceMeasurementData (NodeId bodyNodeID, uint32_t faceIndex)
 
bool SetSphereFaceMeasurementData (NodeId bodyNodeID, uint32_t faceIndex, float radius, Point const &origin, Vector const &normal)
 
bool SetTorusFaceMeasurementData (NodeId bodyNodeID, uint32_t faceIndex, float majorRadius, float minorRadius, Point const &origin, Vector const &normal)
 
bool SetTransformFaceMeasurementData (NodeId bodyNodeID, uint32_t faceIndex)
 
bool SetViewAxes (DVector const &front, DVector const &up)
 
bool WalkMasterAssemblyModel (Walker const &walker)
 
 ~AssemblyTree ()
 Destructor. More...
 

Static Public Attributes

static const uint32_t MAJOR_VERSION = COMMUNICATOR_VERSION_MAJOR
 Major version number. More...
 
static const uint32_t MINOR_VERSION = COMMUNICATOR_VERSION_MINOR
 Minor version number. More...
 
static const uint32_t PATCH_VERSION = COMMUNICATOR_VERSION_PATCH
 Patch version number. More...
 

Detailed Description

Member Enumeration Documentation

◆ AttributeType

Type of attributes to set on nodes.

Enumerator
AttributeTypeUndefined 
AttributeTypeInt 
AttributeTypeFloat 
AttributeTypeTime 
AttributeTypeString 
AttributeTypeIgnored 

Constructor & Destructor Documentation

◆ AssemblyTree() [1/2]

SC::Store::AssemblyTree::AssemblyTree ( Logger const &  logger,
MemoryDevice memory_device = nullptr 
)

Constructor.

◆ AssemblyTree() [2/2]

SC::Store::AssemblyTree::AssemblyTree ( AssemblyTree &&  other)

Constructor.

◆ ~AssemblyTree()

SC::Store::AssemblyTree::~AssemblyTree ( )

Destructor.

Member Function Documentation

◆ AddAttribute() [1/2]

bool SC::Store::AssemblyTree::AddAttribute ( NodeId  nodeID,
const char *  attributeName,
AttributeType  attributeType,
const char *  attributeValue 
)

Adds an attribute to the node.

Parameters
nodeIDNode ID.
attributeNameAttribute name.
attributeTypeAttribute type.
attributeValueAttribute value.
Returns
true if all went right, false otherwise.

◆ AddAttribute() [2/2]

bool SC::Store::AssemblyTree::AddAttribute ( NodeId  nodeID,
const char *  attributeSetName,
const char *  attributeName,
AttributeType  attributeType,
const char *  attributeValue 
)

Adds an attribute to the node.

Parameters
nodeIDNode ID.
attributeSetNameAttribute set name.
attributeNameAttribute name.
attributeTypeAttribute type.
attributeValueAttribute value.
Returns
true if all went right, false otherwise.

◆ AddCADView() [1/2]

bool SC::Store::AssemblyTree::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 
)

Adds a CAD view on the node.

Parameters
assemblyNodeIDNode id to attach the created view to
viewNameName of the view
cameraCamera that will be set when the view gets activated, pass nullptr if none to set
pmiToShowInstance incs of the PMIs to show for the view
nodesToShowNode IDs of the elements to force visibility on
nodesToHideNode IDs of the elements to force visibility off
nodesIDToLocalTransformMap of node ID and matrix pair, defining specific local transform to apply
cuttingPlanesCutting planes to set when the view gets activated
frameMeshInstanceInc(could be null) Mesh instance inc of the rectangular frame (mostly found on capture views)
frameInitiallyVisibleTells if the rectangular frame is initially visible or not
isAnnotationViewTells if the CAD view is an annotation view or not
outCADViewID(out) An ID to access the created CAD View
Returns
true if all went right, false otherwise.

◆ AddCADView() [2/2]

bool SC::Store::AssemblyTree::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 
)

Adds a CAD view on the node.

Parameters
assemblyNodeIDNode id to attach the created view to
viewNameName of the view
cameraCamera that will be set when the view gets activated, pass nullptr if none to set
pmiToShowInstance incs of the PMIs to show for the view
nodesToShowNode IDs of the elements to force visibility on
nodesToHideNode IDs of the elements to force visibility off
nodesIDToLocalTransformMap of node ID and matrix pair, defining specific local transform to apply
cuttingPlanesCutting planes to set when the view gets activated
frameMeshInstanceInc(could be null) Mesh instance inc of the rectangular frame (mostly found on capture views)
frameInitiallyVisibleTells if the rectangular frame is initially visible or not
isAnnotationViewTells if the CAD view is an annotation view or not
outCADViewID(out) An ID to access the created CAD View
Returns
true if all went right, false otherwise.

◆ AddEdgeAttribute() [1/2]

bool SC::Store::AssemblyTree::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
bodyNodeIDBody Node ID.
edgeIndexEdge Index.
attributeNameAttribute name.
attributeTypeAttribute type.
attributeValueAttribute value.
Returns
true if all went right, false otherwise.

◆ AddEdgeAttribute() [2/2]

bool SC::Store::AssemblyTree::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
bodyNodeIDBody Node ID.
edgeIndexEdge Index.
attributeSetNameAttribute set name.
attributeNameAttribute name.
attributeTypeAttribute type.
attributeValueAttribute value.
Returns
true if all went right, false otherwise.

◆ AddFaceAttribute() [1/2]

bool SC::Store::AssemblyTree::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
bodyNodeIDBody Node ID.
faceIndexFace Index.
attributeNameAttribute name.
attributeTypeAttribute type.
attributeValueAttribute value.
Returns
true if all went right, false otherwise.

◆ AddFaceAttribute() [2/2]

bool SC::Store::AssemblyTree::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
bodyNodeIDBody Node ID.
faceIndexFace Index.
attributeSetNameAttribute set name.
attributeNameAttribute name.
attributeTypeAttribute type.
attributeValueAttribute value.
Returns
true if all went right, false otherwise.

◆ AddFilterToNode()

bool SC::Store::AssemblyTree::AddFilterToNode ( NodeId  nodeID,
const FilterData filterData 
)

Add Filter to the node.

Parameters
nodeIDNode ID.
filterDatadata of the filter
Returns
true if all went right, false otherwise.

◆ AddLayerToNode()

bool SC::Store::AssemblyTree::AddLayerToNode ( NodeId  nodeID,
LayerId  layerId,
const char *  layerName 
)

Add Layer to the layer list of the node.

Parameters
nodeIDNode ID.
layerId
layerName
Returns
true if all went right, false otherwise.

◆ AddPMI() [1/2]

bool SC::Store::AssemblyTree::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
assemblyNodeIDNode id to attach the created PMI to
nameName of the PMI
meshInstanceIncPMI graphic representation mesh instance inc
initiallyVisibleTells if the PMI is initially visible or not
pmiTypesee PMIType enum (Datum, Gdt, Dimension...)
pmiSubTypesee PMISubType enum (DatumTarget, GdtFcf, DimensionDistance...)
refOnTopoItemssee 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.

◆ AddPMI() [2/2]

bool SC::Store::AssemblyTree::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
assemblyNodeIDNode id to attach the created PMI to
nameName of the PMI
meshInstanceIncsPMI graphic representation mesh instance incs
initiallyVisibleTells if the PMI is initially visible or not
pmiTypesee PMIType enum (Datum, Gdt, Dimension...)
pmiSubTypesee PMISubType enum (DatumTarget, GdtFcf, DimensionDistance...)
refOnTopoItemssee 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.

◆ AddPointAttribute() [1/2]

bool SC::Store::AssemblyTree::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
bodyNodeIDBody Node ID.
pointIndexPoint Index.
attributeNameAttribute name.
attributeTypeAttribute type.
attributeValueAttribute value.
Returns
true if all went right, false otherwise.

◆ AddPointAttribute() [2/2]

bool SC::Store::AssemblyTree::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
bodyNodeIDBody Node ID.
pointIndexPoint Index.
attributeSetNameAttribute set name.
attributeNameAttribute name.
attributeTypeAttribute type.
attributeValueAttribute value.
Returns
true if all went right, false otherwise.

◆ AddRelationshipToNode()

bool SC::Store::AssemblyTree::AddRelationshipToNode ( NodeId  nodeID,
const RelationshipData relationshipData 
)

Add Relationship to the relationship list of the node.

Parameters
nodeIDNode ID.
relationshipDatadata of the relationship
Returns
true if all went right, false otherwise.

◆ AddUserData()

bool SC::Store::AssemblyTree::AddUserData ( NodeId  nodeID,
UserDataIndex  index,
const uint8_t *  dataBegin,
const uint8_t *  dataEnd 
)

Adds user data to the node.

Parameters
nodeIDNode ID.
userDataIndexThe index of the user data.
dataBeginThe start pointer of the user data bytes.
dataEndThe end pointer of the user data bytes.
Returns
true if all went right, false otherwise.

◆ BuildMasterAssemblyModel()

bool SC::Store::AssemblyTree::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
modelsPathUTF8A path containing the models to assemble.
assemblyModelPathUTF8Full path of the assembly model to build.
create_sczControls if the created master will be a .scz file.
compress_sczControls if the created .scz will be compressed.
Returns
true if all went right, false otherwise.

◆ CreateAndAddBody()

bool SC::Store::AssemblyTree::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.

◆ CreateAndAddBodyInstance()

bool SC::Store::AssemblyTree::CreateAndAddBodyInstance ( NodeId  nodeID,
NodeId outBodyInstanceNodeID 
)

Creates a body instance on a assembly node.

Parameters
nodeIDAssembly node ID.
outBodyInstanceNodeID(out) a node ID to access the created body instance.
Returns
true if all went right, false otherwise.

◆ CreateAndAddDrawingSheet()

bool SC::Store::AssemblyTree::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.

◆ CreateAndAddDrawingView()

bool SC::Store::AssemblyTree::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.

◆ CreateAssemblyTreeRoot()

bool SC::Store::AssemblyTree::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.

◆ CreateChild()

bool SC::Store::AssemblyTree::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.

◆ CreatePart()

NodeId SC::Store::AssemblyTree::CreatePart ( )

Creates an part node.

Parameters
none.
Returns
a node ID to access the created part node.

◆ DeserializeFromXML()

bool SC::Store::AssemblyTree::DeserializeFromXML ( const char *  inputXMLFilePathUTF8)

De-serialize data from a XML file and create the assembly tree.

Parameters
inputXMLFilePathUTF8File path of the xml file to read from.
Returns
true if all went right, false otherwise.

◆ operator=()

void SC::Store::AssemblyTree::operator= ( AssemblyTree &&  other)

◆ SerializeToModel()

bool SC::Store::AssemblyTree::SerializeToModel ( Model model)

Serialize data into a given model.

Parameters
modelModel to serialize into.
Returns
true if all went right, false otherwise.

◆ SerializeToXML()

bool SC::Store::AssemblyTree::SerializeToXML ( const char *  outputXMLFilePathUTF8,
const char *  shatteredSearchDir = nullptr 
)

Serialize data into a XML file.

Parameters
outputXMLFilePathUTF8File path of the xml file to output into.
shatteredSearchDirDirectory path of the shattered models written to XML.
Returns
true if all went right, false otherwise.

◆ SetBlend01FaceMeasurementData()

bool SC::Store::AssemblyTree::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
bodyNodeIDBody node ID.
faceIndexFace index.
Returns
true if all went right, false otherwise.

◆ SetBlend02FaceMeasurementData()

bool SC::Store::AssemblyTree::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
bodyNodeIDBody node ID.
faceIndexFace index.
Returns
true if all went right, false otherwise.

◆ SetBlend03FaceMeasurementData()

bool SC::Store::AssemblyTree::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
bodyNodeIDBody node ID.
faceIndexFace index.
Returns
true if all went right, false otherwise.

◆ SetBodyInstanceMeshInstanceKey()

bool SC::Store::AssemblyTree::SetBodyInstanceMeshInstanceKey ( NodeId  nodeID,
InstanceInc const &  meshInstanceKey 
)

Set mesh instance key on a body instance node.

Parameters
nodeIDBody instance node ID.
meshInstanceKeyInstance key of the mesh.
Returns
true if all went right, false otherwise.

◆ SetBoundingBox()

bool SC::Store::AssemblyTree::SetBoundingBox ( NodeId  nodeID,
SC::Store::BBox  bbox 
)

Sets BoundingBox to the node.

Parameters
nodeIDNode ID.
BBoxin current unit
Returns
true if all went right, false otherwise.

◆ SetCADViewFlags()

bool SC::Store::AssemblyTree::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
CADViewNideIDNode id of the CADView to set flags (must already exist)
bIsCameraSetThe View as a Camera, default: true
bIsPMIFilteringSetThe View handle PMI visibility, default: true
bIsGeomFilteringSetThe View handle Geometry visibility, default: true (not handled for now)
bIsCrosssectionSetThe View has a crosssection set, default: true (not handled for now)
bIsExplosionSetThe View has an explosion set, default: true (not handled for now)
bIsCombineStateThis is a Combine State, default: false (not handled for now)
Returns
true if all went right, false otherwise.

◆ SetCircleEdgeMeasurementData()

bool SC::Store::AssemblyTree::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
bodyNodeIDBody node ID.
edgeIndexEdge index.
radiusRadius of circle.
originCenter of circle.
normalNormal (orientation) of circle
Returns
true if all went right, false otherwise.

◆ SetColorMaterialAndStyleTable()

bool SC::Store::AssemblyTree::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
colorsR,G,B one double for each.
materialsThe 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
stylesThe 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.

◆ SetConeFaceMeasurementData()

bool SC::Store::AssemblyTree::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
bodyNodeIDBody node ID.
faceIndexFace index.
radiusRadius of Cone.
originCenter point of Cone.
normalOrientation of Cone.
halfAngleHalf Angle of cone.
Returns
true if all went right, false otherwise.

◆ SetCylinderFaceMeasurementData()

bool SC::Store::AssemblyTree::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
bodyNodeIDBody node ID.
faceIndexFace index.
radiusRadius of Cylinder.
originCenter point of Cylinder.
normalOrientation of Cylinder
Returns
true if all went right, false otherwise.

◆ SetCylindricalFaceMeasurementData()

bool SC::Store::AssemblyTree::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
bodyNodeIDBody node ID.
faceIndexFace index.
Returns
true if all went right, false otherwise.

◆ SetDefaultCamera()

bool SC::Store::AssemblyTree::SetDefaultCamera ( Camera const &  camera)

Set the default camera for the AssemblyTree

Parameters
cameraCamera to be set as default
Returns
true if all went right, false otherwise.

◆ SetExternalModel()

bool SC::Store::AssemblyTree::SetExternalModel ( NodeId  assemblyNodeID,
const char *  name 
)

Set a link to an external model file (the model will then be included during BuildMasterAssemblyModel() call).

Parameters
assemblyNodeIDID of the assembly node.
nameName of the model.
Returns
true if all went right, false otherwise.

◆ SetExtrusionFaceMeasurementData()

bool SC::Store::AssemblyTree::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
bodyNodeIDBody node ID.
faceIndexFace index.
Returns
true if all went right, false otherwise.

◆ SetFromCurvesFaceMeasurementData()

bool SC::Store::AssemblyTree::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
bodyNodeIDBody node ID.
faceIndexFace index.
Returns
true if all went right, false otherwise.

◆ SetGenericId()

bool SC::Store::AssemblyTree::SetGenericId ( NodeId  nodeID,
const char *  id 
)

Set a Generic ID to the node.

Parameters
nodeIDNode ID.
idgeneric id.
Returns
true if all went right, false otherwise.

◆ SetGenericType()

bool SC::Store::AssemblyTree::SetGenericType ( NodeId  nodeID,
const char *  type 
)

Set a Generic Type to the node.

Parameters
nodeIDNode ID.
typegeneric type.
Returns
true if all went right, false otherwise.

◆ SetLineEdgeMeasurementData()

bool SC::Store::AssemblyTree::SetLineEdgeMeasurementData ( NodeId  bodyNodeID,
uint32_t  edgeIndex,
float  length 
)

Method to set Line measurement information on a specified body.

Parameters
bodyNodeIDBody node ID.
edgeIndexEdge index.
lengthLength of line.
Returns
true if all went right, false otherwise.

◆ SetNodeExchangeId()

bool SC::Store::AssemblyTree::SetNodeExchangeId ( NodeId  nodeID,
const char *  exchangeId 
)

Sets ExchangeId to the node.

Parameters
nodeIDNode ID.
exchangeId
Returns
true if all went right, false otherwise.

◆ SetNodeFilePath()

bool SC::Store::AssemblyTree::SetNodeFilePath ( NodeId  nodeID,
const char *  filePath 
)

Set node file path.

Parameters
nodeIDNode ID.
filePathCAD file file path that node came from.
Returns
true if all went right, false otherwise.

◆ SetNodeLayerId()

bool SC::Store::AssemblyTree::SetNodeLayerId ( NodeId  nodeID,
LayerId  layerId 
)

Sets LayerId to the node.

Parameters
nodeIDNode ID.
layerId
Returns
true if all went right, false otherwise.

◆ SetNodeLocalTransform() [1/2]

bool SC::Store::AssemblyTree::SetNodeLocalTransform ( NodeId  nodeID,
Matrix3d const &  localTransform 
)

Set the local transform of the node.

Parameters
nodeIDNode ID.
localTransformMatrix representing the local transform of the node.
Returns
true if all went right, false otherwise.

◆ SetNodeLocalTransform() [2/2]

bool SC::Store::AssemblyTree::SetNodeLocalTransform ( NodeId  nodeID,
DMatrix3d const &  localTransform 
)

Set the local transform of the node.

Parameters
nodeIDNode ID.
localTransformMatrix representing the local transform of the node.
Returns
true if all went right, false otherwise.

◆ SetNodeMaterial() [1/2]

bool SC::Store::AssemblyTree::SetNodeMaterial ( NodeId  nodeID,
SC::Store::Material const &  material 
)

Set the material of the node.

Parameters
nodeIDNode ID.
materialMaterial to set on the node.
Returns
true if all went right, false otherwise.

◆ SetNodeMaterial() [2/2]

bool SC::Store::AssemblyTree::SetNodeMaterial ( NodeId  nodeID,
uint32_t  styleIndex,
uint16_t  behavior 
)

Set the material of the node.

Parameters
nodeIDNode ID.
styleIndexIndex 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
behaviorBehavior 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.

◆ SetNodeName()

bool SC::Store::AssemblyTree::SetNodeName ( NodeId  nodeID,
const char *  name 
)

Name a node.

Parameters
nodeIDNode ID.
nameName of the node.
Returns
true if all went right, false otherwise.

◆ SetNodeUnit()

bool SC::Store::AssemblyTree::SetNodeUnit ( NodeId  nodeID,
double  unit 
)

Set node unit.

Parameters
nodeIDNode ID.
unitmultiplier of millimeters (for example inches will be 25.4).
Returns
true if all went right, false otherwise.

◆ SetNodeVisibility()

bool SC::Store::AssemblyTree::SetNodeVisibility ( NodeId  nodeID,
bool  visible 
)

Set if the node is visible or not.

Parameters
nodeIDNode ID.
visibletrue if visible, false if not.
Returns
true if all went right, false otherwise.

◆ SetNodeWasRemoved()

bool SC::Store::AssemblyTree::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
nodeIDNode ID.
removedtrue if "removed", false if not.
Returns
true if all went right, false otherwise.

◆ SetNurbsFaceMeasurementData()

bool SC::Store::AssemblyTree::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
bodyNodeIDBody node ID.
faceIndexFace index.
Returns
true if all went right, false otherwise.

◆ SetOffsetFaceMeasurementData()

bool SC::Store::AssemblyTree::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
bodyNodeIDBody node ID.
faceIndexFace index.
Returns
true if all went right, false otherwise.

◆ SetOriginalFileName()

void SC::Store::AssemblyTree::SetOriginalFileName ( const char *  name)

Store the full path and name of the file that has been converted.

Parameters
nameName of the node.
Returns
none.

◆ SetOriginalFileType()

void SC::Store::AssemblyTree::SetOriginalFileType ( FileType  type)

Store the type of the file that has been converted.

Parameters
Typeof the file that has been converted.
Returns
none.

◆ SetOtherEdgeMeasurementData()

bool SC::Store::AssemblyTree::SetOtherEdgeMeasurementData ( NodeId  bodyNodeID,
uint32_t  edgeIndex,
float  length 
)

Method to set Measurement information on a specified body of edge that is non-standard.

Parameters
bodyNodeIDBody node ID.
edgeIndexEdge index.
lengthLength of edge.
Returns
true if all went right, false otherwise.

◆ SetPart()

bool SC::Store::AssemblyTree::SetPart ( NodeId  assemblyNodeID,
NodeId  partNodeID 
)

Set a part on an assembly node.

Parameters
assemblyNodeIDID of the assembly node.
partNodeIDID of the part node.
Returns
true if all went right, false otherwise.

◆ SetPhysicalProperties()

bool SC::Store::AssemblyTree::SetPhysicalProperties ( NodeId  nodeID,
SC::Store::DVector  gravityCenter,
double  surfaceArea,
double  volume 
)

Sets physical properties (volume, area, gravity center) to the node.

Parameters
nodeIDNode ID.
gravityCentergravity center in local coordinates.
surfaceAreasurface area, in squared current unit.
volumevolume, in cubed current unit.
Returns
true if all went right, false otherwise.

◆ SetPipeFaceMeasurementData()

bool SC::Store::AssemblyTree::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
bodyNodeIDBody node ID.
faceIndexFace index.
Returns
true if all went right, false otherwise.

◆ SetPlaneFaceMeasurementData()

bool SC::Store::AssemblyTree::SetPlaneFaceMeasurementData ( NodeId  bodyNodeID,
uint32_t  faceIndex,
Point const &  origin,
Vector const &  normal 
)

Method to set planar face measurement information on a specified body.

Parameters
bodyNodeIDBody node ID.
faceIndexFace index.
originOrigin of plane.
normalPlane normal.
Returns
true if all went right, false otherwise.

◆ SetRevolutionFaceMeasurementData()

bool SC::Store::AssemblyTree::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
bodyNodeIDBody node ID.
faceIndexFace index.
Returns
true if all went right, false otherwise.

◆ SetRuledFaceMeasurementData()

bool SC::Store::AssemblyTree::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
bodyNodeIDBody node ID.
faceIndexFace index.
Returns
true if all went right, false otherwise.

◆ SetSphereFaceMeasurementData()

bool SC::Store::AssemblyTree::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
bodyNodeIDBody node ID.
faceIndexFace index.
radiusRadius of sphere.
originCenter point of sphere.
normalNormal of sphere.
Returns
true if all went right, false otherwise.

◆ SetTorusFaceMeasurementData()

bool SC::Store::AssemblyTree::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
bodyNodeIDBody node ID.
faceIndexFace index.
majorRadiusMajor Radius of Torus.
minorRadiusMinor Radius of Torus.
originCenter point of Torus.
normalOrientation of Torus.
Returns
true if all went right, false otherwise.

◆ SetTransformFaceMeasurementData()

bool SC::Store::AssemblyTree::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
bodyNodeIDBody node ID.
faceIndexFace index.
Returns
true if all went right, false otherwise.

◆ SetViewAxes()

bool SC::Store::AssemblyTree::SetViewAxes ( DVector const &  front,
DVector const &  up 
)

Set the Front and Up vector for the AssemblyTree

Parameters
frontvector
upvector
Returns
true if all went right, false otherwise.

◆ WalkMasterAssemblyModel()

bool SC::Store::AssemblyTree::WalkMasterAssemblyModel ( Walker const &  walker)

Walks the assembly tree created from a XML file.

Parameters
WalkerAn overloaded class that is callback as the assembly tree is walked.
Returns
true if all went right, false otherwise.

Member Data Documentation

◆ MAJOR_VERSION

const uint32_t SC::Store::AssemblyTree::MAJOR_VERSION = COMMUNICATOR_VERSION_MAJOR
static

Major version number.

◆ MINOR_VERSION

const uint32_t SC::Store::AssemblyTree::MINOR_VERSION = COMMUNICATOR_VERSION_MINOR
static

Minor version number.

◆ PATCH_VERSION

const uint32_t SC::Store::AssemblyTree::PATCH_VERSION = COMMUNICATOR_VERSION_PATCH
static

Patch version number.