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