Go to the documentation of this file.
1 #pragma once
2 
3 #include "sc_store.h"
4 #include <map>
5 #include <string>
6 
7 namespace SC { namespace Store {
8 
10 using NodeId = uint32_t;
11 
13 using LayerId = uint32_t;
14 
16 using GenericTypeKey = uint32_t;
17 
19 using UserDataIndex = uint64_t; // Note: This is unsigned because deserialization in JS becomes
20  // complicated otherwise (despite it being signed in HPS).
21 
22 using FileType = uint32_t;
23 
25 enum BodyType : uint8_t {
27  BRep = 1,
29  Wireframe = 3,
30  PointCloud = 4,
31 };
32 
34 enum PMIType : uint32_t {
36  Text = 1,
37  Dimension = 2,
38  Arrow = 3,
39  Balloon = 4,
41  Coordinate = 6,
42  Datum = 7,
43  Fastener = 8,
44  Gdt = 9,
45  Locator = 10,
47  Roughness = 12,
48  Welding = 13,
49  Table = 14,
50  Other = 15,
52 };
53 
55 enum PMISubType : uint32_t {
56  SubTypeUnknown = 0, // Unknown value
57 
58  DatumIdent = 1,
60 
80 
81  GdtFcf = 1,
82 
85 
91 };
92 
94 enum PMITopoRef : uint8_t {
95  Context = 1,
96  Item = 2,
98  UniqueVertex = 4,
100  WireEdge = 5,
101  Edge = 6,
102  CoEdge = 7,
103  Loop = 8,
104  Face = 9,
105  Shell = 10,
106  Connex = 11,
107  Body = 12,
109  BrepData = 14,
110  // = 15,
111  // = 16,
112  WireBody = 17,
113 };
114 
116 enum SelectionBits : uint8_t {
120 };
121 
126  uint32_t index;
127 
130  , type(type)
131  , index(index)
132  {}
133 };
134 
136 struct Plane {
138  double d;
139 
141  : normal(0.0, 1.0, 0.0)
142  , d(0.0)
143  {}
144 
145  Plane(DPoint const& point, DVector const& normal)
146  : normal(normal)
147  {
148  d = -(point.x * normal.x + point.y * normal.y + point.z * normal.z);
149  }
150 };
151 
153 struct BBox {
154  double xmin, xmax, ymin, ymax, zmin, zmax;
155 
157  : xmin(0.0)
158  , xmax(0.0)
159  , ymin(0.0)
160  , ymax(0.0)
161  , zmin(0.0)
162  , zmax(0.0)
163  {}
164 
165  BBox(double _xmin, double _xmax, double _ymin, double _ymax, double _zmin, double _zmax)
166  {
167  xmin = _xmin;
168  xmax = _xmax;
169  ymin = _ymin;
170  ymax = _ymax;
171  zmin = _zmin;
172  zmax = _zmax;
173  }
174 };
175 
179 struct MaterialData {
180  uint32_t ambientRGBIndex;
181  uint32_t diffuseRGBIndex;
183  uint32_t emissiveRGBIndex;
185  uint32_t specularRGBIndex;
187  double ambientAlpha;
189  double diffuseAlpha;
190  double emissiveAlpha;
191  double specularAlpha;
192  double shininess;
193 
195  : ambientRGBIndex(0)
196  , diffuseRGBIndex(0)
197  , emissiveRGBIndex(0)
198  , specularRGBIndex(0)
199  , ambientAlpha(1.0)
200  , diffuseAlpha(1.0)
201  , emissiveAlpha(1.0)
202  , specularAlpha(1.0)
203  , shininess(0.0)
204  {}
205 };
206 
210 struct StyleData {
211  double width;
212  bool isMaterial;
213  uint32_t rgbColorOrMaterialIndex;
216  uint8_t m_ucTransparency;
218 
220  : width(1.0)
221  , isMaterial(false)
223  , m_ucTransparency(255)
224  {}
225 };
226 
227 struct LayerData {
229  std::string layerName;
230 
232  : layerId(~(LayerId)0u)
233  {}
234 };
235 
238  std::vector<LayerId> layers;
239 };
240 
243  std::vector<NodeId> nodes;
244 };
245 
246 struct FilterData {
248  std::string filterName;
249  bool isActive;
252 };
253 
254 enum class RelationshipType : uint32_t {
256  Aggregates,
257  VoidsElement,
258  FillsElement,
260 };
261 
263  std::string uid;
264  std::string name;
266 };
267 
271  std::vector<RelationshipElement> related;
272 };
273 
276  class Impl;
277  Impl* _pImpl;
278 
279  AssemblyTree(AssemblyTree const&) = delete;
280  void operator=(AssemblyTree const&) = delete;
281 
282 public:
284  static const uint32_t MAJOR_VERSION = COMMUNICATOR_VERSION_MAJOR;
285 
287  static const uint32_t MINOR_VERSION = COMMUNICATOR_VERSION_MINOR;
288 
290  static const uint32_t PATCH_VERSION = COMMUNICATOR_VERSION_PATCH;
291 
293  enum AttributeType : uint8_t {
300  };
301 
303  AssemblyTree(Logger const& logger, MemoryDevice* memory_device = nullptr);
304 
306  AssemblyTree(AssemblyTree&& other);
307 
309  ~AssemblyTree();
310 
311  void operator=(AssemblyTree&& other);
312 
316  void SetOriginalFileName(const char* name);
317 
321  void SetOriginalFileType(FileType type);
322 
326  bool CreateAssemblyTreeRoot(NodeId& outIDRoot);
327 
334  bool CreateChild(
335  NodeId parentNodeID,
336  NodeId& outIDChild,
337  bool isAConfigurationNode = false,
338  bool isADefaultNode = false);
339 
344  bool SetNodeName(NodeId nodeID, const char* name);
345 
350  bool SetNodeLocalTransform(NodeId nodeID, Matrix3d const& localTransform);
351 
356  bool SetNodeLocalTransform(NodeId nodeID, DMatrix3d const& localTransform);
357 
362  bool SetNodeMaterial(NodeId nodeID, SC::Store::Material const& material);
363 
373  bool SetNodeMaterial(NodeId nodeID, uint32_t styleIndex, uint16_t behavior);
374 
379  bool SetNodeVisibility(NodeId nodeID, bool visible);
380 
388  bool SetNodeWasRemoved(NodeId nodeID, bool removed);
389 
394  bool SetNodeUnit(NodeId nodeID, double unit);
395 
400  bool SetNodeFilePath(NodeId nodeID, const char* filePath);
401 
408  bool AddAttribute(
409  NodeId nodeID,
410  const char* attributeName,
411  AttributeType attributeType,
412  const char* attributeValue);
413 
421  bool AddAttribute(
422  NodeId nodeID,
423  const char* attributeSetName,
424  const char* attributeName,
425  AttributeType attributeType,
426  const char* attributeValue);
427 
432  bool SetGenericId(NodeId nodeID, const char* id);
433 
438  bool SetGenericType(NodeId nodeID, const char* type);
439 
446  bool AddUserData(
447  NodeId nodeID, UserDataIndex index, const uint8_t* dataBegin, const uint8_t* dataEnd);
448 
456  bool AddFaceAttribute(
457  NodeId bodyNodeID,
458  uint32_t faceIndex,
459  const char* attributeName,
460  AssemblyTree::AttributeType attributeType,
461  const char* attributeValue);
462 
471  bool AddFaceAttribute(
472  NodeId bodyNodeID,
473  uint32_t faceIndex,
474  const char* attributeSetName,
475  const char* attributeName,
476  AssemblyTree::AttributeType attributeType,
477  const char* attributeValue);
478 
486  bool AddEdgeAttribute(
487  NodeId bodyNodeID,
488  uint32_t edgeIndex,
489  const char* attributeName,
490  AssemblyTree::AttributeType attributeType,
491  const char* attributeValue);
492 
501  bool AddEdgeAttribute(
502  NodeId bodyNodeID,
503  uint32_t edgeIndex,
504  const char* attributeSetName,
505  const char* attributeName,
506  AssemblyTree::AttributeType attributeType,
507  const char* attributeValue);
508 
516  bool AddPointAttribute(
517  NodeId bodyNodeID,
518  uint32_t pointIndex,
519  const char* attributeName,
520  AssemblyTree::AttributeType attributeType,
521  const char* attributeValue);
522 
531  bool AddPointAttribute(
532  NodeId bodyNodeID,
533  uint32_t pointIndex,
534  const char* attributeSetName,
535  const char* attributeName,
536  AssemblyTree::AttributeType attributeType,
537  const char* attributeValue);
538 
546  NodeId nodeID, SC::Store::DVector gravityCenter, double surfaceArea, double volume);
547 
552  bool SetBoundingBox(NodeId nodeID, SC::Store::BBox bbox);
553 
558  bool SetNodeExchangeId(NodeId nodeID, const char* exchangeId);
559 
564  bool AddFilterToNode(NodeId nodeID, const FilterData& filterData);
565 
570  bool SetNodeLayerId(NodeId nodeID, LayerId layerId);
571 
577  bool AddLayerToNode(NodeId nodeID, LayerId layerId, const char* layerName);
578 
583  bool AddRelationshipToNode(NodeId nodeID, const RelationshipData& relationshipData);
584 
589  bool CreateAndAddBodyInstance(NodeId nodeID, NodeId& outBodyInstanceNodeID);
590 
595  bool SetBodyInstanceMeshInstanceKey(NodeId nodeID, InstanceInc const& meshInstanceKey);
596 
600  NodeId CreatePart();
601 
606  bool SetPart(NodeId assemblyNodeID, NodeId partNodeID);
607 
613  bool SetExternalModel(NodeId assemblyNodeID, const char* name);
614 
621  bool
622  CreateAndAddBody(NodeId partNodeID, NodeId& outBodyNodeID, BodyType bodyType = BodyTypeNotSet);
623 
629  bool SetLineEdgeMeasurementData(NodeId bodyNodeID, uint32_t edgeIndex, float length);
638  NodeId bodyNodeID,
639  uint32_t edgeIndex,
640  float radius,
641  Point const& origin,
642  Vector const& normal);
649  bool SetOtherEdgeMeasurementData(NodeId bodyNodeID, uint32_t edgeIndex, float length);
650 
659  NodeId bodyNodeID,
660  uint32_t faceIndex,
661  float radius,
662  Point const& origin,
663  Vector const& normal);
671  NodeId bodyNodeID, uint32_t faceIndex, Point const& origin, Vector const& normal);
681  NodeId bodyNodeID,
682  uint32_t faceIndex,
683  float radius,
684  Point const& origin,
685  Vector const& normal,
686  float halfAngle);
695  NodeId bodyNodeID,
696  uint32_t faceIndex,
697  float radius,
698  Point const& origin,
699  Vector const& normal);
709  NodeId bodyNodeID,
710  uint32_t faceIndex,
711  float majorRadius,
712  float minorRadius,
713  Point const& origin,
714  Vector const& normal);
720  bool SetBlend01FaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex);
726  bool SetBlend02FaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex);
732  bool SetBlend03FaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex);
738  bool SetNurbsFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex);
744  bool SetCylindricalFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex);
750  bool SetOffsetFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex);
756  bool SetPipeFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex);
762  bool SetRuledFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex);
768  bool SetRevolutionFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex);
774  bool SetExtrusionFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex);
780  bool SetFromCurvesFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex);
786  bool SetTransformFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex);
787 
804  bool AddCADView(
805  NodeId assemblyNodeID,
806  const char* viewName,
807  SC::Store::Camera const* camera,
808  SC::Store::InstanceIncs const& pmiToShow,
809  std::vector<NodeId> const& nodesToShow,
810  std::vector<NodeId> const& nodesToHide,
811  std::map<NodeId, SC::Store::Matrix3d> const& nodesIDToLocalTransform,
812  std::vector<SC::Store::Plane> const& cuttingPlanes,
813  SC::Store::InstanceInc const* frameMeshInstanceInc,
814  bool frameInitiallyVisible,
815  bool isAnnotationView,
816  NodeId& outCADViewID);
817 
834  bool AddCADView(
835  NodeId assemblyNodeID,
836  const char* viewName,
837  SC::Store::Camera const* camera,
838  SC::Store::InstanceIncs const& pmiToShow,
839  std::vector<NodeId> const& nodesToShow,
840  std::vector<NodeId> const& nodesToHide,
841  std::map<NodeId, SC::Store::DMatrix3d> const& nodesIDToLocalTransform,
842  std::vector<SC::Store::Plane> const& cuttingPlanes,
843  SC::Store::InstanceInc const* frameMeshInstanceInc,
844  bool frameInitiallyVisible,
845  bool isAnnotationView,
846  NodeId& outCADViewID);
847 
858  bool SetCADViewFlags(
859  NodeId CADViewNodeID,
860  bool bIsCameraSet = true,
861  bool bIsPMIFilteringSet = true,
862  bool bIsGeomFilteringSet = true,
863  bool bIsCrosssectionSet = true,
864  bool bIsExplosionSet = true,
865  bool bIsCombineState = false);
866 
878  bool AddPMI(
879  NodeId assemblyNodeID,
880  const char* name,
881  SC::Store::InstanceInc const& meshInstanceInc,
882  bool initiallyVisible,
883  PMIType pmiType,
884  PMISubType pmiSubType,
885  std::vector<RefOnTopoItem> const& refOnTopoItems,
886  NodeId& outPMIID);
887 
899  bool AddPMI(
900  NodeId assemblyNodeID,
901  const char* name,
902  std::vector<SC::Store::InstanceInc> const& meshInstanceIncs,
903  bool initiallyVisible,
904  PMIType pmiType,
905  PMISubType pmiSubType,
906  std::vector<RefOnTopoItem> const& refOnTopoItems,
907  NodeId& outPMIID);
908 
919  std::vector<double> const& colors,
920  std::vector<MaterialData> const& materials,
921  std::vector<StyleData> const& styles);
922 
927  bool SetViewAxes(DVector const& front, DVector const& up);
928 
932  bool SetDefaultCamera(Camera const& camera);
933 
937  bool SerializeToModel(Model& model);
938 
943  bool
944  SerializeToXML(const char* outputXMLFilePathUTF8, const char* shatteredSearchDir = nullptr);
945 
949  bool DeserializeFromXML(const char* inputXMLFilePathUTF8);
950 
958  const char* modelsPathUTF8,
959  const char* assemblyModelPathUTF8,
960  const char* workingDirectoryUTF8,
961  bool create_scz,
962  bool compress_scz = true);
963 
970  bool CreateAndAddDrawingSheet(NodeId parentNodeID, NodeId& outIDDrawingSheet);
971 
978  bool CreateAndAddDrawingView(NodeId drawingSheetNodeID, NodeId& outIDDrawingView);
979 
980  class Walker {
981  public:
982  virtual ~Walker() {}
983  virtual void
984  Node(NodeId nodeID, const char* model_name, DMatrix3d const& matrix, double unit) const = 0;
985  };
986 
990  bool WalkMasterAssemblyModel(Walker const& walker);
991 };
992 }} // namespace SC::Store
bool SetExtrusionFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex)
bool SetBlend01FaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex)
Definition: sc_assemblytree.h:297
Dimension radius subtype.
Definition: sc_assemblytree.h:69
Body comes from a tessellated model.
Definition: sc_assemblytree.h:28
Plain text.
Definition: sc_assemblytree.h:36
PMITopoRef
Definition: sc_assemblytree.h:94
SelectionBits
Definition: sc_assemblytree.h:116
Definition: sc_store.h:1019
Definition: sc_assemblytree.h:236
uint32_t emissiveRGBIndex
Definition: sc_assemblytree.h:184
uint32_t rgbColorOrMaterialIndex
Definition: sc_assemblytree.h:215
bool SetFromCurvesFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex)
double z
Definition: sc_store.h:972
Not defined.
Definition: sc_assemblytree.h:26
Locator.
Definition: sc_assemblytree.h:45
double y
Definition: sc_store.h:971
bool SetCylinderFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex, float radius, Point const &origin, Vector const &normal)
The Material class is used to define a MaterialKey.
Definition: sc_store.h:1548
bool SetNodeExchangeId(NodeId nodeID, const char *exchangeId)
Balloon.
Definition: sc_assemblytree.h:39
uint8_t m_ucTransparency
From 0 (transparent) to 255 (opaque). Default value is 255.
Definition: sc_assemblytree.h:217
Center of circle.
Definition: sc_assemblytree.h:40
Geometric reference, other subtype.
Definition: sc_assemblytree.h:89
Definition: sc_store.h:1904
bool SetOffsetFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex)
std::vector< LayerId > layers
Definition: sc_assemblytree.h:238
uint32_t diffuseRGBIndex
Definition: sc_assemblytree.h:182
Datum.
Definition: sc_assemblytree.h:42
StyleData()
Definition: sc_assemblytree.h:219
bool CreateAndAddBody(NodeId partNodeID, NodeId &outBodyNodeID, BodyType bodyType=BodyTypeNotSet)
bool SetPhysicalProperties(NodeId nodeID, SC::Store::DVector gravityCenter, double surfaceArea, double volume)
std::string uid
Definition: sc_assemblytree.h:263
virtual ~Walker()
Definition: sc_assemblytree.h:982
uint32_t ambientRGBIndex
Definition: sc_assemblytree.h:180
PMITopoRef type
Could be face, edge...
Definition: sc_assemblytree.h:125
Line welding subtype.
Definition: sc_assemblytree.h:83
bool SetPlaneFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex, Point const &origin, Vector const &normal)
Dimension ordinate subtype.
Definition: sc_assemblytree.h:66
Unknown value.
Definition: sc_assemblytree.h:35
double x
Definition: sc_store.h:1036
bool SetCylindricalFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex)
Dimension.
Definition: sc_assemblytree.h:37
Usage of an edge in a loop.
Definition: sc_assemblytree.h:102
AttributeType
Type of attributes to set on nodes.
Definition: sc_assemblytree.h:293
void SetOriginalFileName(const char *name)
bool AddFilterToNode(NodeId nodeID, const FilterData &filterData)
Topological shell (open or closed)
Definition: sc_assemblytree.h:105
bool AddPointAttribute(NodeId bodyNodeID, uint32_t pointIndex, const char *attributeName, AssemblyTree::AttributeType attributeType, const char *attributeValue)
std::vector< InstanceInc > InstanceIncs
A std::vector of InstanceInc.
Definition: sc_store.h:522
std::string layerName
Definition: sc_assemblytree.h:229
double width
Line width in mm.
Definition: sc_assemblytree.h:211
bool isDisplayFilter
Definition: sc_assemblytree.h:247
bool SetBoundingBox(NodeId nodeID, SC::Store::BBox bbox)
bool SetBlend03FaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex)
Array of co-edges that delimit a face.
Definition: sc_assemblytree.h:103
bool DeserializeFromXML(const char *inputXMLFilePathUTF8)
Definition: sc_assemblytree.h:97
Region symbol, other subtype.
Definition: sc_assemblytree.h:90
bool isInclusive
Definition: sc_assemblytree.h:237
Body comes from a brep.
Definition: sc_assemblytree.h:27
uint32_t GenericTypeKey
Definition: sc_assemblytree.h:16
Dimension distance subtype.
Definition: sc_assemblytree.h:61
bool SetSphereFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex, float radius, Point const &origin, Vector const &normal)
Plane(DPoint const &point, DVector const &normal)
Definition: sc_assemblytree.h:145
std::string filterName
Definition: sc_assemblytree.h:248
PMISubType
Definition: sc_assemblytree.h:55
bool SetNodeVisibility(NodeId nodeID, bool visible)
bool AddEdgeAttribute(NodeId bodyNodeID, uint32_t edgeIndex, const char *attributeName, AssemblyTree::AttributeType attributeType, const char *attributeValue)
User symbol, other subtype.
Definition: sc_assemblytree.h:86
Dimension diameter subtype.
Definition: sc_assemblytree.h:73
Plane()
Definition: sc_assemblytree.h:140
bool SerializeToModel(Model &model)
Dimension length subtype.
Definition: sc_assemblytree.h:76
double emissiveAlpha
Emissive alpha value (valid values between 0.0 and 1.0)
Definition: sc_assemblytree.h:190
Definition: sc_store.h:953
RefOnTopoItem(SC::Store::InstanceInc const &meshInstanceKey, PMITopoRef type, uint32_t index)
Definition: sc_assemblytree.h:128
bool SetRevolutionFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex)
Definition: sc_assemblytree.h:246
Plane.
Definition: sc_assemblytree.h:136
bool isInclusive
Definition: sc_assemblytree.h:242
double diffuseAlpha
Diffuse alpha value (valid values between 0.0 and 1.0)
Definition: sc_assemblytree.h:189
Dimension distance subtype.
Definition: sc_assemblytree.h:63
Single wire body.
Definition: sc_assemblytree.h:108
uint32_t LayerId
Definition: sc_assemblytree.h:13
bool AddAttribute(NodeId nodeID, const char *attributeName, AttributeType attributeType, const char *attributeValue)
bool AddRelationshipToNode(NodeId nodeID, const RelationshipData &relationshipData)
Definition: sc_assemblytree.h:299
bool SetConeFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex, float radius, Point const &origin, Vector const &normal, float halfAngle)
Definition: sc_assemblytree.h:268
Dimension diameter subtype.
Definition: sc_assemblytree.h:75
bool SetLineEdgeMeasurementData(NodeId bodyNodeID, uint32_t edgeIndex, float length)
Dimension length subtype.
Definition: sc_assemblytree.h:77
Dimension diameter subtype.
Definition: sc_assemblytree.h:72
Table.
Definition: sc_assemblytree.h:49
bool WalkMasterAssemblyModel(Walker const &walker)
double ymax
Definition: sc_assemblytree.h:154
bool SetBlend02FaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex)
BBox()
Definition: sc_assemblytree.h:156
double z
Definition: sc_store.h:1038
bool SetExternalModel(NodeId assemblyNodeID, const char *name)
bool CreateAndAddDrawingSheet(NodeId parentNodeID, NodeId &outIDDrawingSheet)
bool AddLayerToNode(NodeId nodeID, LayerId layerId, const char *layerName)
Dimension diameter subtype.
Definition: sc_assemblytree.h:71
double ymin
Definition: sc_assemblytree.h:154
bool BuildMasterAssemblyModel(const char *modelsPathUTF8, const char *assemblyModelPathUTF8, const char *workingDirectoryUTF8, bool create_scz, bool compress_scz=true)
Definition: sc_store.h:1826
double zmax
Definition: sc_assemblytree.h:154
Dimension chamfer subtype.
Definition: sc_assemblytree.h:64
bool SetNodeName(NodeId nodeID, const char *name)
uint32_t index
Index of the face, edge...
Definition: sc_assemblytree.h:126
bool SetNodeLayerId(NodeId nodeID, LayerId layerId)
Definition: sc_assemblytree.h:210
Dimension radius subtype.
Definition: sc_assemblytree.h:67
RelationshipType type
Definition: sc_assemblytree.h:269
Definition: sc_assemblytree.h:295
Dimension radius subtype.
Definition: sc_assemblytree.h:70
BodyType
Definition: sc_assemblytree.h:25
Dimension slope subtype.
Definition: sc_assemblytree.h:65
bool CreateAndAddBodyInstance(NodeId nodeID, NodeId &outBodyInstanceNodeID)
Dimension angle subtype.
Definition: sc_assemblytree.h:79
Roughness.
Definition: sc_assemblytree.h:47
Definition: sc_assemblytree.h:118
virtual void Node(NodeId nodeID, const char *model_name, DMatrix3d const &matrix, double unit) const =0
static const uint32_t MINOR_VERSION
Minor version number.
Definition: sc_assemblytree.h:287
Definition: sc_store.h:930
bool SetCircleEdgeMeasurementData(NodeId bodyNodeID, uint32_t edgeIndex, float radius, Point const &origin, Vector const &normal)
bool CreateChild(NodeId parentNodeID, NodeId &outIDChild, bool isAConfigurationNode=false, bool isADefaultNode=false)
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 SerializeToXML(const char *outputXMLFilePathUTF8, const char *shatteredSearchDir=nullptr)
Vertex with one set of coordinates (absolute position)
Definition: sc_assemblytree.h:99
LayerData()
Definition: sc_assemblytree.h:231
bool SetBodyInstanceMeshInstanceKey(NodeId nodeID, InstanceInc const &meshInstanceKey)
Abstract root type for any topological entity (body or single item)
Definition: sc_assemblytree.h:96
Coordinate.
Definition: sc_assemblytree.h:41
PMIType
Definition: sc_assemblytree.h:34
bool AddUserData(NodeId nodeID, UserDataIndex index, const uint8_t *dataBegin, const uint8_t *dataEnd)
bool SetNurbsFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex)
uint32_t FileType
Definition: sc_assemblytree.h:22
double xmax
Definition: sc_assemblytree.h:154
std::vector< NodeId > nodes
Definition: sc_assemblytree.h:243
double specularAlpha
Specular alpha value (valid values between 0.0 and 1.0)
Definition: sc_assemblytree.h:191
LayerFilterItemData layerFilterItemData
Definition: sc_assemblytree.h:250
Body comes from a wireframed model.
Definition: sc_assemblytree.h:29
Identifies a reference to an element on a brep.
Definition: sc_assemblytree.h:123
Point.
Definition: sc_assemblytree.h:46
bool SetDefaultCamera(Camera const &camera)
Geometrical tolerance.
Definition: sc_assemblytree.h:51
RelationshipElement relating
Definition: sc_assemblytree.h:270
Dimension distance subtype.
Definition: sc_assemblytree.h:62
bool SetGenericType(NodeId nodeID, const char *type)
std::string name
Definition: sc_assemblytree.h:264
Definition: sc_assemblytree.h:117
Definition: sc_store.h:996
bool SetNodeUnit(NodeId nodeID, double unit)
bool SetPipeFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex)
GD&T.
Definition: sc_assemblytree.h:44
double ambientAlpha
Ambient alpha value (valid values between 0.0 and 1.0)
Definition: sc_assemblytree.h:188
bool SetNodeWasRemoved(NodeId nodeID, bool removed)
Abstract root type for any topological body.
Definition: sc_assemblytree.h:107
Definition: sc_assemblytree.h:227
double xmin
Definition: sc_assemblytree.h:154
uint32_t NodeId
Definition: sc_assemblytree.h:10
LayerId layerId
Definition: sc_assemblytree.h:228
MaterialData()
Definition: sc_assemblytree.h:194
Topological region.
Definition: sc_assemblytree.h:106
std::vector< RelationshipElement > related
Definition: sc_assemblytree.h:271
Self-containing set of topological entities.
Definition: sc_assemblytree.h:95
Main entry to non-wire topology.
Definition: sc_assemblytree.h:109
Utility symbol, other subtype.
Definition: sc_assemblytree.h:87
BBox.
Definition: sc_assemblytree.h:153
uint64_t UserDataIndex
Definition: sc_assemblytree.h:19
static const uint32_t PATCH_VERSION
Patch version number.
Definition: sc_assemblytree.h:290
EntityFilterItemData entityItemData
Definition: sc_assemblytree.h:251
Definition: sc_store.h:879
double shininess
Shininess (valid values between 0.0 and 1.0)
Definition: sc_assemblytree.h:192
Custom symbol, other subtype.
Definition: sc_assemblytree.h:88
Spot welding subtype.
Definition: sc_assemblytree.h:84
bool CreateAndAddDrawingView(NodeId drawingSheetNodeID, NodeId &outIDDrawingView)
bool isActive
Definition: sc_assemblytree.h:249
Definition: sc_assemblytree.h:294
bool isMaterial
Definition: sc_assemblytree.h:212
Main entry to wire topology.
Definition: sc_assemblytree.h:112
Dimension radius subtype.
Definition: sc_assemblytree.h:68
static const uint32_t MAJOR_VERSION
Major version number.
Definition: sc_assemblytree.h:284
Definition: sc_assemblytree.h:262
GD&T Feature control frame subtype.
Definition: sc_assemblytree.h:81
Topological face delimiting a shell.
Definition: sc_assemblytree.h:104
bool SetViewAxes(DVector const &front, DVector const &up)
bool CreateAssemblyTreeRoot(NodeId &outIDRoot)
Other.
Definition: sc_assemblytree.h:50
Definition: sc_store.h:23
bool SetNodeLocalTransform(NodeId nodeID, Matrix3d const &localTransform)
Fastener.
Definition: sc_assemblytree.h:43
uint32_t specularRGBIndex
Definition: sc_assemblytree.h:186
RelationshipType
Definition: sc_assemblytree.h:254
bool AddFaceAttribute(NodeId bodyNodeID, uint32_t faceIndex, const char *attributeName, AssemblyTree::AttributeType attributeType, const char *attributeValue)
bool SetColorMaterialAndStyleTable(std::vector< double > const &colors, std::vector< MaterialData > const &materials, std::vector< StyleData > const &styles)
bool SetPart(NodeId assemblyNodeID, NodeId partNodeID)
AssemblyTree API.
Definition: sc_assemblytree.h:275
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 SetTransformFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex)
Definition: sc_assemblytree.h:241
bool connectedStatus
Definition: sc_assemblytree.h:265
Definition: sc_assemblytree.h:980
bool SetOtherEdgeMeasurementData(NodeId bodyNodeID, uint32_t edgeIndex, float length)
Arrow.
Definition: sc_assemblytree.h:38
void SetOriginalFileType(FileType type)
double zmin
Definition: sc_assemblytree.h:154
bool SetTorusFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex, float majorRadius, float minorRadius, Point const &origin, Vector const &normal)
bool SetRuledFaceMeasurementData(NodeId bodyNodeID, uint32_t faceIndex)
bool SetNodeMaterial(NodeId nodeID, SC::Store::Material const &material)
double y
Definition: sc_store.h:1037
Datum subtype.
Definition: sc_assemblytree.h:59
Edge belonging to a wire body.
Definition: sc_assemblytree.h:100
double d
Definition: sc_assemblytree.h:138
Definition: sc_assemblytree.h:296
Definition: sc_assemblytree.h:56
Dimension diameter subtype.
Definition: sc_assemblytree.h:74
Dimension length subtype.
Definition: sc_assemblytree.h:78
DVector normal
Definition: sc_assemblytree.h:137
Edge belonging to a BrepData body.
Definition: sc_assemblytree.h:101
bool SetCADViewFlags(NodeId CADViewNodeID, bool bIsCameraSet=true, bool bIsPMIFilteringSet=true, bool bIsGeomFilteringSet=true, bool bIsCrosssectionSet=true, bool bIsExplosionSet=true, bool bIsCombineState=false)
~AssemblyTree()
Destructor.
Datum subtype.
Definition: sc_assemblytree.h:58
double x
Definition: sc_store.h:970
BBox(double _xmin, double _xmax, double _ymin, double _ymax, double _zmin, double _zmax)
Definition: sc_assemblytree.h:165
Definition: sc_store.h:27
Definition: sc_store.h:829
Definition: sc_assemblytree.h:179
Definition: sc_assemblytree.h:298
Body comes from a point cloud.
Definition: sc_assemblytree.h:30
bool SetNodeFilePath(NodeId nodeID, const char *filePath)
SC::Store::InstanceInc meshInstanceKey
Instance key of the body.
Definition: sc_assemblytree.h:124
Welding.
Definition: sc_assemblytree.h:48
Definition: sc_assemblytree.h:119
bool SetGenericId(NodeId nodeID, const char *id)
Definition: sc_store.h:1350
std::pair< InclusionKey, InstanceKey > InstanceInc
This is an instance through a specific include.
Definition: sc_store.h:521