OpenLexocad  27.1
Shape.h
Go to the documentation of this file.
1 #pragma once
2 #pragma warning(disable : 4251)
3 
4 #include <Base/Base.h>
5 #include <Base/Enums.h>
6 #include <Core/DbgInfo.h>
7 #include <Core/Settings.h>
8 #include <Core/Variant.h>
9 #include <Geom/Bnd_Box.h>
10 #include <Geom/Dir.h>
11 #include <Geom/IndexedMesh.h>
12 #include <Geom/Pnt.h>
13 #include <Geom/Trsf.h>
14 
15 #include <memory>
16 #include <vector>
17 
18 namespace Core
19 {
20 class Variant;
21 class DbgInfo;
22 } // namespace Core
23 
24 namespace Topo
25 {
26 class TopologicalItem;
27 class Shape;
28 class LazyFacetedBrepShape;
29 class MeshShape;
30 class Compound;
31 class ShapeSet;
32 class Solid;
33 class Shell;
34 class Face;
35 class Wire;
36 class Edge;
37 class Coedge;
38 class Vertex;
39 class Geometry;
40 class ShapeAttributes;
41 
42 class FacetedShape;
43 class IndexedDrawable;
44 struct GeometricInformation;
45 
46 enum class ShapeType
47 {
48  MESH,
49  COMPOUND,
50  COMPSOLID,
51  NCOMPOUND,
52  SOLID,
53  SHELL,
54  FACE,
55  WIRE,
56  EDGE,
57  VERTEX,
58  SHAPE,
59  UNDEFINED
60 };
61 
62 enum class OrientationType
63 {
64  UNDEFINED,
65  FORWARD,
66  REVERSED,
67  INTERNAL,
68  EXTERNAL
69 };
70 
71 } // namespace Topo
72 
73 typedef std::shared_ptr<Base::BaseClass> pBaseClass;
74 typedef std::shared_ptr<Topo::TopologicalItem> pTopologicalItem;
75 typedef std::shared_ptr<Topo::Shape> pShape;
76 typedef std::shared_ptr<Topo::LazyFacetedBrepShape> pLazyFacetedBrepShape;
77 typedef std::shared_ptr<Topo::MeshShape> pMesh;
78 typedef std::shared_ptr<Topo::Compound> pCompound;
79 typedef std::shared_ptr<Topo::Solid> pSolid;
80 typedef std::shared_ptr<Topo::Shell> pShell;
81 typedef std::shared_ptr<Topo::Face> pFace;
82 typedef std::shared_ptr<Topo::Wire> pWire;
83 typedef std::shared_ptr<Topo::Edge> pEdge;
84 typedef std::shared_ptr<Topo::Coedge> pCoedge;
85 typedef std::shared_ptr<Topo::Vertex> pVertex;
86 typedef std::shared_ptr<Topo::IndexedDrawable> pIndexedDrawable;
87 
88 typedef std::shared_ptr<Base::BaseClass const> pConstBaseClass;
89 typedef std::shared_ptr<Topo::TopologicalItem const> pConstTopologicalItem;
90 typedef std::shared_ptr<Topo::Shape const> pConstShape;
91 typedef std::shared_ptr<Topo::LazyFacetedBrepShape const> pConstLazyFacetedBrepShape;
92 typedef std::shared_ptr<Topo::MeshShape const> pConstMesh;
93 typedef std::shared_ptr<Topo::Compound const> pConstCompound;
94 typedef std::shared_ptr<Topo::Solid const> pConstSolid;
95 typedef std::shared_ptr<Topo::Shell const> pConstShell;
96 typedef std::shared_ptr<Topo::Face const> pConstFace;
97 typedef std::shared_ptr<Topo::Wire const> pConstWire;
98 typedef std::shared_ptr<Topo::Edge const> pConstEdge;
99 typedef std::shared_ptr<Topo::Coedge const> pConstCoedge;
100 typedef std::shared_ptr<Topo::Vertex const> pConstVertex;
101 
102 typedef std::unique_ptr<Base::BaseClass> uniqueBaseClass;
103 typedef std::unique_ptr<Topo::TopologicalItem> uniqueTopologicalItem;
104 typedef std::unique_ptr<Topo::Shape> uniqueShape;
105 typedef std::unique_ptr<Topo::MeshShape> uniqueMesh;
106 typedef std::unique_ptr<Topo::Compound> uniqueCompound;
107 typedef std::unique_ptr<Topo::ShapeSet> uniqueShapeSet;
108 typedef std::unique_ptr<Topo::Solid> uniqueSolid;
109 typedef std::unique_ptr<Topo::Shell> uniqueShell;
110 typedef std::unique_ptr<Topo::Face> uniqueFace;
111 typedef std::unique_ptr<Topo::Wire> uniqueWire;
112 typedef std::unique_ptr<Topo::Edge> uniqueEdge;
113 typedef std::unique_ptr<Topo::Coedge> uniqueCoedge;
114 typedef std::unique_ptr<Topo::Vertex> uniqueVertex;
115 typedef std::unique_ptr<Topo::FacetedShape> uniqueFacetedShape;
116 
117 
118 class CA_Detail;
119 class CA_Snap;
120 class ENTITY;
121 
122 namespace Acis
123 {
124 class AcisShapeTool;
125 class AcisElementTool;
126 class AcisWireTool;
127 class AcisFaceTool;
128 class AcisEdgeTool;
129 class AcisVertexTool;
130 } // namespace Acis
131 
132 namespace Topo
133 {
134 class ShapeTool;
135 class MeshTool;
136 class CompoundTool;
137 class SolidTool;
138 class ShellTool;
139 class FaceTool;
140 class WireTool;
141 class EdgeTool;
142 class VertexTool;
143 class Shape;
144 class ShapeVariantHandler;
145 
146 class LX_TOPO_EXPORT ShapeTessellationQuality
147 {
148 public:
153 };
154 
155 class LX_TOPO_EXPORT ShapeFactory
156 {
157 public:
158  friend class Shape;
159  static std::map<std::string, ShapeFactory*> registry;
160  static pShape read(const std::string& format, const std::string& data, int version);
161  static pShape read(const std::string& format, std::istream& reader);
162  static pShape read(const std::string& format, const Base::String& fileName);
163 
164 private:
165  virtual pShape read(const std::string& data, int version) = 0;
166  virtual pShape read(std::istream& reader) = 0;
167  virtual pShape read(const Base::String& fileName) = 0;
168 };
169 
175 class LX_TOPO_EXPORT TopologicalItem
176 
177 #ifndef SWIG
178  : public Base::BaseClass
179 #endif
180 
181 {
183 
184 public:
186  virtual ~TopologicalItem(void) {}
187 
188  enum class MesherType
189  {
190  Default_Mesher,
191  Acis_Mesher,
192  Compound_Mesher
193  };
194 
195  enum class ModellingKernel
196  {
197  OCC,
198  ACIS,
199  CARVE,
200  MIXED, // -> for compound
201  UNKNOWN
202  };
203 
204  virtual Topo::TopologicalItem::MesherType getMesherType() const = 0;
205  virtual Topo::TopologicalItem::ModellingKernel getModellingKernel() const = 0;
207  virtual pConstTopologicalItem getOwner() const = 0;
208  virtual Topo::ShapeTool* getShapeTool() const = 0;
209  virtual ENTITY* getEntity() const { return 0; };
210  virtual bool getGeometricInformation(Topo::GeometricInformation&) const = 0;
211 
212 
213 protected:
214  TopologicalItem(ENTITY* /*ent*/) {}
215 
217 
218 private:
219 };
220 
227 class LX_TOPO_EXPORT Shape : public Topo::TopologicalItem
228 
229 #ifndef SWIG
230  ,
231  public std::enable_shared_from_this<Topo::Shape>
232 #endif
233 
234 {
236 
237 public:
238  Shape(void);
239  Shape(pConstShape rhs);
240  virtual ~Shape(void);
241 
242  friend class ShapeTool;
243  friend class FaceTool;
244 
246  {
249  Unchecked
250  };
251 
252  mutable std::set<Core::DocObject*> m_appGeometryBackLinks;
253 
254 
255  virtual void transform(const Geom::Trsf& t);
256  virtual Geom::Trsf getTransform() const;
257  virtual Topo::ShapeType getShapeType() const = 0;
258 
259  // virtual bool isEqual(pConstShape rhs) const = 0;
260 
262  operator Core::Variant() const;
263  virtual pConstTopologicalItem getOwner() const;
264 
266  bool hasShapeAttributes() const;
268  Topo::ShapeAttributes* getShapeAttributes() const;
270  void addShapeAttributes(Topo::ShapeAttributes* atts);
272  void releaseShapesAttributes();
274  virtual Geom::Bnd_Box getBoundingBox() const = 0;
275 
276  virtual void setIndexMesh(pIndexedMesh m);
277  virtual pIndexedMesh getIndexedMesh() const;
278  virtual bool createIndexedMesh(pIndexedMesh m) const;
279 
280  virtual void setIndexedDrawable(pIndexedDrawable);
281  virtual pIndexedDrawable getIndexedDrawable() const;
282 
283  virtual std::shared_ptr<Core::DbgInfo> getDbgInfo() const;
284  virtual Topo::Shape* clone(bool deepcopy) const = 0;
285 
286  virtual bool getGeometricInformation(Topo::GeometricInformation&) const { return false; };
287 
288  virtual bool wasCreatedWithProblems() const { return false; }
289  virtual void setWasCreatedWithProblems(bool) {}
290 
291  // virtual setIndexedMesh( )
292 
293 
294 protected:
295  Shape(ENTITY* ent);
296 
297  virtual void copyFrom(pConstShape rhs, bool deepCopy = true) = 0;
298  virtual bool isSingleFace() const;
299  virtual bool isSingleWire() const;
300  virtual bool isSingleEdge() const;
301  virtual bool isSingleVertex() const;
302  virtual bool isSolid() const;
303  virtual bool isClosedSolid() const;
304  virtual bool isWire() const;
305  virtual bool isCompound() const;
306  virtual bool isMesh() const { return false; }
307 
308  bool _copy(const Topo::Shape* rhs, bool deepCopy = true);
309 
310 
311 private:
313  static Topo::ShapeVariantHandler* _vHnd;
314  Topo::ShapeAttributes* _myAtts = nullptr;
315  pIndexedMesh _indexedMesh;
316  pIndexedDrawable _indexedDrawable;
317 };
318 
319 class LX_TOPO_EXPORT LazyFacetedBrepShape : public Topo::Shape
320 {
322 
323 public:
324  LazyFacetedBrepShape(void);
326  virtual ~LazyFacetedBrepShape(void);
327 };
328 
329 class LX_TOPO_EXPORT FacetedShape
330 {
331 public:
332  FacetedShape(void);
333  virtual ~FacetedShape(void);
334 
335  std::vector<Geom::Pnt> face_vertices;
336  std::vector<long> face_coordinateIndices;
337  std::vector<Geom::Dir> face_per_vertex_normals;
338 
339  std::vector<Geom::Pnt> wire_vertices;
340  std::vector<long> wire_coordinateIndices;
341 };
342 
343 
349 class LX_TOPO_EXPORT MeshShape : public Topo::Shape
350 {
352 
353 public:
354  typedef std::vector<int> MeshModel;
355  typedef std::vector<MeshModel> SubMeshModels;
356 
357  MeshShape(void);
358  MeshShape(pConstMesh rhs, bool deepCopy = true);
359  virtual ~MeshShape(void);
360 
361  friend class MeshTool;
362  virtual void copyFrom(pConstMesh rhs, bool deepCopy = true) = 0;
363 
364 
365 
367  virtual Geom::Bnd_Box getBoundingBox() const = 0;
369  virtual pConstBrepData getMeshAsBrepData() const = 0;
370  virtual void getTextureCoordinates(std::vector<Geom::Pnt2d>& textureCoordinates, std::vector<int>& textureIndices) const = 0;
371  virtual bool calculateDetail(CA_Detail& detail, const CA_Snap& theSnap) = 0;
372  virtual void getEdges(std::vector<std::pair<Geom::Pnt, Geom::Pnt> >& lines) const = 0;
373  virtual void getPoints(std::vector<Geom::Pnt>& points) const = 0;
374  virtual void getModel(Topo::MeshShape::MeshModel& model) const = 0;
375  virtual std::vector<Geom::Pnt> getNormals() const = 0;
376  virtual void getOuterBoundaries(std::vector<Geom::Pnt>& points, std::vector<int>& edges) const = 0;
377  virtual void getFacePoints(int index, std::vector<Geom::Pnt>& points) const = 0;
378  virtual bool getGeometricInformation(Topo::GeometricInformation&) const { return false; };
379 
380 protected:
381  virtual Topo::MeshTool* getMeshTool() const = 0;
382 
383 private:
384  void copyFrom(pConstShape rhs, bool deepCopy = true);
385 };
386 
393 class LX_TOPO_EXPORT Compound : public Topo::Shape
394 {
396 
397 public:
398  Compound(void);
399  Compound(pConstCompound rhs, bool deepCopy = true);
400  virtual ~Compound(void);
401 
402  friend class CompoundTool;
403  virtual void copyFrom(pConstCompound rhs, bool deepCopy = true) = 0;
404  virtual void transform(const Geom::Trsf&) {}
405  virtual bool getGeometricInformation(Topo::GeometricInformation&) const { return false; };
406 
407 protected:
408  Compound(ENTITY* ent) : Shape(ent) {}
409  virtual Topo::CompoundTool* getCompoundTool() const = 0;
410 
411 private:
412 };
413 
420 class LX_TOPO_EXPORT Solid : public Topo::Shape
421 {
423 
424 public:
425  Solid(void);
426  Solid(pConstSolid rhs, bool deepCopy = true);
427  virtual ~Solid(void);
428 
429  friend class SolidTool;
430  virtual void copyFrom(pConstSolid rhs, bool deepCopy = true) = 0;
431  virtual bool getGeometricInformation(Topo::GeometricInformation&) const { return false; };
432 
433 protected:
434  Solid(ENTITY* ent) : Shape(ent) {}
435  virtual Topo::SolidTool* getSolidTool() const = 0;
436 };
437 
444 class LX_TOPO_EXPORT Shell : public Topo::TopologicalItem
445 
446 #ifndef SWIG
447  ,
448  public std::enable_shared_from_this<Topo::Shell>
449 #endif
450 
451 {
453 
454 public:
455  Shell(void);
456  Shell(pConstShell rhs, bool deepCopy = true);
457  virtual ~Shell(void);
458 
459  friend class ShellTool;
460  virtual void copyFrom(pConstShell rhs, bool deepCopy = true) = 0;
461  virtual bool getGeometricInformation(Topo::GeometricInformation&) const { return false; };
462 
463 protected:
464  Shell(ENTITY* ent) : TopologicalItem(ent) {}
465  virtual Topo::ShellTool* getShellTool() const = 0;
466 
467 private:
468  virtual void transform(const Geom::Trsf&) {}
469 };
470 
471 
478 class LX_TOPO_EXPORT Face : public Topo::TopologicalItem
479 
480 #ifndef SWIG
481  ,
482  public std::enable_shared_from_this<Topo::Face>
483 #endif
484 
485 {
487 
488 public:
489  Face(void);
490  Face(pConstFace rhs, bool deepCopy = false);
491  virtual ~Face(void);
492 
493  friend class FaceTool;
494 
496  virtual bool getFaceNormal(const Geom::Pnt& pnt, Geom::Dir& dir, Geom::Pnt& pointOnFace) const = 0;
497  virtual Core::DocObject* getGeometry() const;
498  virtual void transform(const Geom::Trsf&) {}
499  virtual bool getGeometricInformation(Topo::GeometricInformation&) const { return false; };
500 
501 protected:
502  Face(ENTITY* ent) : TopologicalItem(ent) {}
503  virtual Topo::FaceTool* getFaceTool() const = 0;
504 
505 private:
506 };
507 
514 class LX_TOPO_EXPORT Wire : public Topo::TopologicalItem
515 
516 #ifndef SWIG
517  ,
518  public std::enable_shared_from_this<Topo::Wire>
519 #endif
520 
521 {
523 
524 public:
525  Wire(void);
526  Wire(pConstWire rhs, bool deepCopy = false);
527  virtual ~Wire(void);
528 
529  friend class WireTool;
530  friend class Acis::AcisWireTool;
531 
532  virtual void copyFrom(pConstWire rhs, bool deepCopy = true) = 0;
533  virtual int getEdgeCount() const = 0;
534  virtual pConstEdge getEdgeByIndex(int idx) const = 0;
535  virtual void transform(const Geom::Trsf&) {}
536  virtual bool isLoop() const;
537  virtual bool getGeometricInformation(Topo::GeometricInformation&) const { return false; };
538 
539 protected:
540  Wire(ENTITY* ent) : TopologicalItem(ent) {}
541  virtual Topo::WireTool* getWireTool() const = 0;
542 
543 private:
544 };
545 
552 class LX_TOPO_EXPORT Edge : public Topo::TopologicalItem
553 
554 #ifndef SWIG
555  ,
556  public std::enable_shared_from_this<Topo::Edge>
557 #endif
558 
559 {
561 
562 public:
563  Edge(void);
564  Edge(pConstEdge rhs, bool deepCopy = true);
565  virtual ~Edge(void);
566 
567  friend class EdgeTool;
568 
569  virtual void copyFrom(pConstEdge rhs, bool deepCopy = true) = 0;
571  operator Core::Variant() const;
572  virtual void transform(const Geom::Trsf&) {}
573  virtual bool getGeometricInformation(Topo::GeometricInformation&) const { return false; };
574 
575 protected:
576  Edge(ENTITY* ent) : TopologicalItem(ent) {}
577  virtual Topo::EdgeTool* getEdgeTool() const = 0;
578 
579 private:
580  double _passagePntParam;
581  bool _hasPassagePntParam;
582 };
583 
590 class LX_TOPO_EXPORT Coedge : public Topo::TopologicalItem
591 
592 #ifndef SWIG
593  ,
594  public std::enable_shared_from_this<Topo::Coedge>
595 #endif
596 
597 {
599 
600 public:
601  Coedge(void);
602  Coedge(pConstCoedge rhs, bool deepCopy = true);
603  virtual ~Coedge(void);
604 
605  friend class EdgeTool;
606 
607  virtual void copyFrom(pConstCoedge rhs, bool deepCopy = true) = 0;
609  operator Core::Variant() const;
610  virtual void transform(const Geom::Trsf&) {}
611  virtual pConstEdge getEdge() const = 0;
612  virtual bool getGeometricInformation(Topo::GeometricInformation&) const { return false; };
613 
614 protected:
615  Coedge(ENTITY* ent) : TopologicalItem(ent) {}
616  virtual Topo::EdgeTool* getEdgeTool() const = 0;
617 
618 private:
619  double _passagePntParam;
620  bool _hasPassagePntParam;
621 };
622 
629 class LX_TOPO_EXPORT Vertex : public Topo::TopologicalItem
630 
631 #ifndef SWIG
632  ,
633  public std::enable_shared_from_this<Topo::Vertex>
634 #endif
635 
636 {
638 
639 public:
640  Vertex(void);
641  Vertex(pConstVertex rhs, bool deepCopy = true);
642  virtual ~Vertex(void);
643 
644  friend class VertexTool;
645 
646  virtual void copyFrom(pConstVertex rhs, bool deepCopy = true) = 0;
647  virtual Geom::Pnt getPoint() const = 0;
648  virtual void transform(const Geom::Trsf&) {}
649  virtual bool getGeometricInformation(Topo::GeometricInformation&) const { return false; };
650 
651 protected:
652  Vertex(ENTITY* ent) : TopologicalItem(ent) {}
653  virtual Topo::VertexTool* getVertexTool() const = 0;
654 
655 private:
656 };
657 
658 
659 class LX_TOPO_EXPORT ShapeVariantHandler : public Core::VariantHandler
660 {
661 public:
662  Core::Variant create();
663  bool isEqual(const Core::Variant& v1, const Core::Variant& v2, double /*tolerance*/ = 1E-06) const
664  {
665  bool ok1, ok2;
666  if (v1.getValue<pShape>(&ok1) == v2.getValue<pShape>(&ok2) && ok1 && ok2)
667  return true;
668  else
669  return false;
670  }
671  int getType() { return (int)Core::Variant::Shape; }
672  Base::String getAsString(const Core::Variant& v) const;
673 };
674 
675 class LX_TOPO_EXPORT ConstShapeVariantHandler : public Core::VariantHandler
676 {
677 public:
678  Core::Variant create();
679  bool isEqual(const Core::Variant& v1, const Core::Variant& v2, double /*tolerance*/ = 1E-06) const
680  {
681  bool ok1, ok2;
682  if (v1.getValue<pConstShape>(&ok1) == v2.getValue<pConstShape>(&ok2) && ok1 && ok2)
683  return true;
684  else
685  return false;
686  }
687  int getType() { return (int)Core::Variant::ConstShape; }
688  Base::String getAsString(const Core::Variant& v) const;
689 };
690 
691 
692 
693 class LX_TOPO_EXPORT ToolOutcome
694 {
695 public:
696  ToolOutcome();
697  ToolOutcome(bool okay);
698  ~ToolOutcome();
699 
700  bool isOkay();
701  void setOkay(bool ok);
702 
703 private:
704  bool _okay;
705 };
706 
708 {
709 public:
710  virtual Geom::SurfaceType getSurfaceType() const = 0;
711 };
712 
714 {
715 public:
718  double radius;
719 };
720 
722 {
723 public:
726  double angle;
727  double radius;
728 };
729 
730 class LX_TOPO_EXPORT IndexedFace
731 {
732 public:
733  IndexedFace();
734  IndexedFace(const IndexedFace& rhs);
735  std::vector<Geom::Pnt> vertices;
736  std::vector<Geom::Dir> verticesNormals;
737  std::vector<int> coordinateIndices;
738  int index;
739  std::shared_ptr<Topo::SpecialFaceInfo> info;
740  void dump() const;
741 };
742 
743 class LX_TOPO_EXPORT IndexedEdge
744 {
745 public:
746  IndexedEdge();
747  IndexedEdge(const IndexedEdge& rhs);
748  std::vector<Geom::Pnt> vertices;
749  std::vector<int> edge_coordinateIndices;
750  int index;
751  void dump() const;
752 };
753 
754 
755 class LX_TOPO_EXPORT IndexedDrawable
756 {
757 public:
758  IndexedDrawable(void);
759  IndexedDrawable(const IndexedDrawable& rhs);
760  virtual ~IndexedDrawable(void);
761  std::vector<IndexedFace> faces;
762  std::vector<IndexedEdge> edges;
763  void clean();
764  std::string createMD5();
765  void create_IndexedMesh(Geom::IndexedMesh& mesh);
766  // void* faces_root = 0;
767  // void* edges_root = 0;
768  // std::string md5;
769  virtual void transform(Geom::Trsf& t);
770  void dump();
771 };
772 
773 } // namespace Topo
774 
775 #define REGISTER_SHAPE_FACTORY(_factoryName_, _shapeFormat_) Topo::ShapeFactory::registry[_shapeFormat_] = (Topo::ShapeFactory*)new _factoryName_();
std::shared_ptr< Topo::Wire const > pConstWire
Definition: Shape.h:97
virtual bool wasCreatedWithProblems() const
Definition: Shape.h:288
LX_GEOM_EXPORT Point getPoint(const Geom::Pnt &p)
Tools for creating, manipulating and querying Meshes.
Definition: MeshTool.h:41
std::shared_ptr< Topo::LazyFacetedBrepShape > pLazyFacetedBrepShape
Definition: Shape.h:76
virtual void setWasCreatedWithProblems(bool)
Definition: Shape.h:289
Definition: Shape.h:146
std::shared_ptr< Topo::Solid const > pConstSolid
Definition: Shape.h:94
Definition: Shape.h:552
std::shared_ptr< Topo::Shape > pShape
Definition: Shape.h:75
std::vector< Geom::Pnt > vertices
Definition: Shape.h:735
Definition: Shape.h:514
std::shared_ptr< Topo::Solid > pSolid
Definition: Shape.h:79
std::shared_ptr< Topo::Compound > pCompound
Definition: Shape.h:78
Definition: Shape.h:721
std::vector< long > wire_coordinateIndices
Definition: Shape.h:340
virtual bool getGeometricInformation(Topo::GeometricInformation &) const
Definition: Shape.h:405
Definition: Shape.h:319
std::vector< int > MeshModel
Definition: Shape.h:354
Wire(ENTITY *ent)
Definition: Shape.h:540
std::shared_ptr< Base::BaseClass > pBaseClass
Definition: Shape.h:73
Tools for creating, manipulating and querying Vertices.
Definition: VertexTool.h:24
Definition: Shape.h:478
Tools for creating, manipulating and querying Compounds.
Definition: CompoundTool.h:12
TopologicalItem(ENTITY *)
Definition: Shape.h:214
Defines a non-persistent 3D Cartesian point.
Definition: Pnt.h:43
ModellingKernel
Definition: Shape.h:195
Definition: Shape.h:444
std::shared_ptr< Topo::Shape const > pConstShape
Definition: Shape.h:90
std::shared_ptr< Topo::Vertex > pVertex
Definition: Shape.h:85
Definition: Shape.h:590
ShapeTessellationMode
Definition: Settings.h:93
CheckShape
Definition: Shape.h:245
std::shared_ptr< Topo::Edge const > pConstEdge
Definition: Shape.h:98
Face(ENTITY *ent)
Definition: Shape.h:502
Edge(ENTITY *ent)
Definition: Shape.h:576
std::unique_ptr< Topo::FacetedShape > uniqueFacetedShape
Definition: Shape.h:115
bool isEqual(const Core::Variant &v1, const Core::Variant &v2, double=1E-06) const
Definition: Shape.h:679
std::unique_ptr< Base::BaseClass > uniqueBaseClass
Definition: Shape.h:102
virtual bool getGeometricInformation(Topo::GeometricInformation &) const
Definition: Shape.h:537
virtual ~TopologicalItem(void)
Definition: Shape.h:186
virtual bool getGeometricInformation(Topo::GeometricInformation &) const
Definition: Shape.h:431
Definition: Shape.h:675
Definition: Shape.h:329
std::shared_ptr< Topo::TopologicalItem const > pConstTopologicalItem
Definition: Shape.h:89
double radius
Definition: Shape.h:727
std::vector< Geom::Pnt > vertices
Definition: Shape.h:748
Definition: Shape.h:420
std::unique_ptr< Topo::Face > uniqueFace
Definition: Shape.h:110
Core::Settings::ShapeTessellationMode mode
Definition: Shape.h:150
virtual void transform(const Geom::Trsf &)
Definition: Shape.h:648
int index
Definition: Shape.h:750
Definition: Shape.h:227
Definition: Shape.h:693
virtual bool getGeometricInformation(Topo::GeometricInformation &) const
Definition: Shape.h:499
std::shared_ptr< Topo::Face const > pConstFace
Definition: Shape.h:96
std::shared_ptr< Topo::LazyFacetedBrepShape const > pConstLazyFacetedBrepShape
Definition: Shape.h:91
pConstTopologicalItem source
Definition: Shape.h:216
Definition: Bnd_Box.h:63
std::vector< int > edge_coordinateIndices
Definition: Shape.h:749
std::shared_ptr< Topo::Face > pFace
Definition: Shape.h:81
Geom::Ax2 position
Definition: Shape.h:717
Vertex(ENTITY *ent)
Definition: Shape.h:652
bool isEqual(const Core::Variant &v1, const Core::Variant &v2, double=1E-06) const
Definition: Shape.h:663
Core::Settings::ShapeTessellationQuality quality
Definition: Shape.h:149
A Utf-16 (windows) or ucs4 (unix) encoded string class.
Definition: String.h:23
virtual void transform(const Geom::Trsf &)
Definition: Shape.h:572
virtual void transform(const Geom::Trsf &)
Definition: Shape.h:498
std::shared_ptr< Topo::IndexedDrawable > pIndexedDrawable
Definition: Shape.h:86
double radius
Definition: Shape.h:718
LX_CORE_EXPORT Version & version
Definition: Shape.h:175
Tools for creating, manipulating and querying Solids.
Definition: SolidTool.h:15
std::shared_ptr< Topo::Coedge > pCoedge
Definition: Shape.h:84
Definition: Shape.h:659
std::unique_ptr< Topo::Shape > uniqueShape
Definition: Shape.h:104
void transform(Container container, OutputIt out, BinaryFunction function)
Definition: Algorithms.h:29
Definition: Variant.h:87
Definition: Shape.h:743
std::shared_ptr< Topo::Shell > pShell
Definition: Shape.h:80
std::unique_ptr< Topo::Solid > uniqueSolid
Definition: Shape.h:108
Tools for creating, manipulating and querying Shapes.
Definition: ShapeTool.h:85
Definition: GeometricInformation.h:6
T getValue(bool *ok) const
Definition: Variant.h:325
ShapeType
Definition: Shape.h:46
Definition: ShapeAttributes.h:13
virtual Geom::SurfaceType getSurfaceType() const =0
virtual bool getGeometricInformation(Topo::GeometricInformation &) const
Definition: Shape.h:649
Geom::SurfaceType getSurfaceType() const
Definition: Shape.h:716
Definition: Ax2.h:67
std::shared_ptr< Topo::Shell const > pConstShell
Definition: Shape.h:95
std::unique_ptr< Topo::Shell > uniqueShell
Definition: Shape.h:109
std::vector< IndexedFace > faces
Definition: Shape.h:761
std::unique_ptr< Topo::Coedge > uniqueCoedge
Definition: Shape.h:113
std::shared_ptr< Topo::TopologicalItem > pTopologicalItem
Definition: Shape.h:74
Definition: Trsf.h:57
Definition: Dir.h:45
BaseClass class and root of the type system.
Definition: Base.h:85
std::shared_ptr< const Geom::BrepData > pConstBrepData
Definition: BrepData.h:31
Definition: Shape.h:155
int getType()
Definition: Shape.h:687
Definition: Base.h:12
virtual ENTITY * getEntity() const
Definition: Shape.h:209
Definition: Shape.h:393
Definition: Shape.h:755
std::shared_ptr< Geom::IndexedMesh > pIndexedMesh
Definition: IndexedMesh.h:55
std::shared_ptr< Base::BaseClass const > pConstBaseClass
Definition: Shape.h:88
virtual bool getGeometricInformation(Topo::GeometricInformation &) const
Definition: Shape.h:286
Definition: Shape.h:707
OrientationType
Definition: Shape.h:62
Definition: Shape.h:730
std::unique_ptr< Topo::Compound > uniqueCompound
Definition: Shape.h:106
std::shared_ptr< Topo::MeshShape > pMesh
Definition: Shape.h:77
Tools for creating, manipulating and querying Shells.
Definition: ShellTool.h:13
std::vector< int > coordinateIndices
Definition: Shape.h:737
Shell(ENTITY *ent)
Definition: Shape.h:464
MesherType
Definition: Shape.h:188
Definition: Variant.h:55
Definition: Variant.h:151
std::shared_ptr< Topo::Coedge const > pConstCoedge
Definition: Shape.h:99
bool globalMeshMode
Definition: Shape.h:151
std::vector< Geom::Dir > verticesNormals
Definition: Shape.h:736
std::unique_ptr< Topo::Wire > uniqueWire
Definition: Shape.h:111
std::unique_ptr< Topo::Edge > uniqueEdge
Definition: Shape.h:112
std::shared_ptr< Topo::Vertex const > pConstVertex
Definition: Shape.h:100
std::vector< MeshModel > SubMeshModels
Definition: Shape.h:355
Coedge(ENTITY *ent)
Definition: Shape.h:615
Definition: Variant.h:152
Definition: Shape.h:349
std::shared_ptr< Topo::Compound const > pConstCompound
Definition: Shape.h:93
Tools for creating, manipulating and querying Faces.
Definition: FaceTool.h:50
std::vector< Geom::Pnt > face_vertices
Definition: Shape.h:335
SurfaceType
Definition: GeomEnums.h:23
Definition: Shape.h:248
Tools for creating, manipulating and querying Wires.
Definition: WireTool.h:23
virtual bool getGeometricInformation(Topo::GeometricInformation &) const
Definition: Shape.h:461
std::unique_ptr< Topo::Vertex > uniqueVertex
Definition: Shape.h:114
std::shared_ptr< Topo::Wire > pWire
Definition: Shape.h:82
ShapeTessellationQuality
Definition: Settings.h:84
TopologicalItem()
Definition: Shape.h:185
Definition: IndexedMesh.h:10
MD5 LX_BASE_EXPORT createMD5(const std::string &filename)
virtual void transform(const Geom::Trsf &)
Definition: Shape.h:404
std::shared_ptr< Topo::SpecialFaceInfo > info
Definition: Shape.h:739
Tools for creating, manipulating and querying Edges.
Definition: EdgeTool.h:39
int index
Definition: Shape.h:738
std::unique_ptr< Topo::TopologicalItem > uniqueTopologicalItem
Definition: Shape.h:103
double angle
Definition: Shape.h:726
std::shared_ptr< Topo::Shape const > pConstShape
Definition: Variant.h:77
std::vector< Geom::Dir > face_per_vertex_normals
Definition: Shape.h:337
Definition: Shape.h:713
virtual void transform(const Geom::Trsf &)
Definition: Shape.h:535
Solid(ENTITY *ent)
Definition: Shape.h:434
std::shared_ptr< Topo::MeshShape const > pConstMesh
Definition: Shape.h:92
std::vector< long > face_coordinateIndices
Definition: Shape.h:336
Geom::Ax2 position
Definition: Shape.h:725
std::vector< Geom::Pnt > wire_vertices
Definition: Shape.h:339
Definition: Shape.h:629
virtual bool getGeometricInformation(Topo::GeometricInformation &) const
Definition: Shape.h:612
std::unique_ptr< Topo::ShapeSet > uniqueShapeSet
Definition: Shape.h:107
std::set< Core::DocObject * > m_appGeometryBackLinks
Definition: Shape.h:252
int getType()
Definition: Shape.h:671
Base::String fileName
Definition: CoreDocument.h:186
static std::map< std::string, ShapeFactory * > registry
Definition: Shape.h:159
virtual void transform(const Geom::Trsf &)
Definition: Shape.h:610
virtual bool getGeometricInformation(Topo::GeometricInformation &) const
Definition: Shape.h:573
TYPESYSTEM_HEADER()
std::unique_ptr< Topo::MeshShape > uniqueMesh
Definition: Shape.h:105
virtual bool getGeometricInformation(Topo::GeometricInformation &) const
Definition: Shape.h:378
Compound(ENTITY *ent)
Definition: Shape.h:408
std::vector< IndexedEdge > edges
Definition: Shape.h:762
Definition: DocObject.h:51
std::shared_ptr< Topo::Shape > pShape
Definition: Variant.h:76
virtual bool isMesh() const
Definition: Shape.h:306
std::shared_ptr< Topo::Edge > pEdge
Definition: Shape.h:83
Geom::SurfaceType getSurfaceType() const
Definition: Shape.h:724