summaryrefslogtreecommitdiff
path: root/inc/BRepMesh_IncrementalMesh.hxx
blob: 00c804cbea52374d279907946f0721c32b73b8b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _BRepMesh_IncrementalMesh_HeaderFile
#define _BRepMesh_IncrementalMesh_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_DefineHandle_HeaderFile
#include <Standard_DefineHandle.hxx>
#endif
#ifndef _Handle_BRepMesh_IncrementalMesh_HeaderFile
#include <Handle_BRepMesh_IncrementalMesh.hxx>
#endif

#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _TopTools_MapOfShape_HeaderFile
#include <TopTools_MapOfShape.hxx>
#endif
#ifndef _Handle_BRepMesh_FastDiscret_HeaderFile
#include <Handle_BRepMesh_FastDiscret.hxx>
#endif
#ifndef _TopTools_DataMapOfShapeReal_HeaderFile
#include <TopTools_DataMapOfShapeReal.hxx>
#endif
#ifndef _TopTools_IndexedDataMapOfShapeListOfShape_HeaderFile
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Bnd_Box_HeaderFile
#include <Bnd_Box.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _BRepMesh_DiscretRoot_HeaderFile
#include <BRepMesh_DiscretRoot.hxx>
#endif
#ifndef _BRepMesh_PDiscretRoot_HeaderFile
#include <BRepMesh_PDiscretRoot.hxx>
#endif
class BRepMesh_FastDiscret;
class TopoDS_Shape;
class TopoDS_Edge;
class TopoDS_Face;


//! Builds the mesh of a shape with respect of their <br>
//!          correctly triangulated parts <br>
class BRepMesh_IncrementalMesh : public BRepMesh_DiscretRoot {

public:

  
  Standard_EXPORT   BRepMesh_IncrementalMesh();
Standard_EXPORT virtual ~BRepMesh_IncrementalMesh();
  //! If the  boolean    <Relatif>   is  True,    the <br>
//!          deflection used   for the polygonalisation   of <br>
//!          each edge will be <D> * Size of Edge. <br>
//!          the deflection used for the faces will be the maximum <br>
//!          deflection of their edges. <br>
  Standard_EXPORT   BRepMesh_IncrementalMesh(const TopoDS_Shape& S,const Standard_Real D,const Standard_Boolean Relatif = Standard_False,const Standard_Real Ang = 0.5);
  
  Standard_EXPORT     void SetRelative(const Standard_Boolean theFlag) ;
  
  Standard_EXPORT     Standard_Boolean Relative() const;
  
  Standard_EXPORT   virtual  void Perform() ;
  //! Builds the incremental mesh of the shape <br>
  Standard_EXPORT     void Update(const TopoDS_Shape& S) ;
  
  Standard_EXPORT     Standard_Boolean IsModified() const;
  
  Standard_EXPORT     Standard_Integer GetStatusFlags() const;
  
//! Request algorithm to launch in multiple threads to improve performance. <br>
  Standard_EXPORT     void SetParallel(const Standard_Boolean theInParallel) ;
  
//! Returns the multi-threading usage flag. <br>
  Standard_EXPORT     Standard_Boolean IsParallel() const;
  
//! Plugin interface for the Mesh Factories. <br>
  Standard_EXPORT   static  Standard_Integer Discret(const TopoDS_Shape& theShape,const Standard_Real theDeflection,const Standard_Real theAngle,BRepMesh_PDiscretRoot& theAlgo) ;
  
//! Returns multi-threading usage flag set by default in <br>
//! Discret() static method (thus applied only to Mesh Factories). <br>
  Standard_EXPORT   static  Standard_Boolean IsParallelDefault() ;
  
//! Setup multi-threading usage flag set by default in <br>
//! Discret() static method (thus applied only to Mesh Factories). <br>
  Standard_EXPORT   static  void SetParallelDefault(const Standard_Boolean theInParallel) ;




  DEFINE_STANDARD_RTTI(BRepMesh_IncrementalMesh)

protected:

  
  Standard_EXPORT   virtual  void Init() ;

Standard_Boolean myRelative;
Standard_Boolean myInParallel;
TopTools_MapOfShape myMap;
Handle_BRepMesh_FastDiscret myMesh;
Standard_Boolean myModified;
TopTools_DataMapOfShapeReal mymapedge;
TopTools_IndexedDataMapOfShapeListOfShape myancestors;
Standard_Real mydtotale;
Bnd_Box myBox;
Standard_Integer myStatus;


private: 

  //! Locate a correct discretisation if it exists <br>
//!          Set no one otherwise <br>
  Standard_EXPORT     void Update(const TopoDS_Edge& E) ;
  //! If the face is  not correctly triangulated, or <br>
//!          if  one  of its edges  is  to be discretisated <br>
//!          correctly, the triangulation  of this face  is <br>
//!          built. <br>
  Standard_EXPORT     void Update(const TopoDS_Face& F) ;



};





// other Inline functions and methods (like "C++: function call" methods)


#endif