f717fe3f610e0053797e26e0e1a61df180e7de01
[occt.git] / src / BRepMesh / BRepMesh_IncrementalMesh.cdl
1 -- Created on: 1995-06-20
2 -- Created by: Stagiaire Alain JOURDAIN <ajo@phobox>
3 -- Copyright (c) 1995-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
5 --
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
10 --
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 --
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
20
21
22 class IncrementalMesh from BRepMesh
23
24 inherits DiscretRoot from BRepMesh
25
26     ---Purpose: Builds the mesh of a shape with respect of their
27     --          correctly triangulated parts
28     --
29
30 uses
31     Box from Bnd,
32     Shape from TopoDS,
33     Face  from TopoDS,
34     Edge  from TopoDS,
35     MapOfShape  from TopTools,
36     IndexedDataMapOfShapeListOfShape from TopTools,
37     DataMapOfShapeReal from TopTools,
38     FastDiscret  from BRepMesh,
39     Status       from BRepMesh,
40     PDiscretRoot from BRepMesh
41
42 is
43     Create
44         returns IncrementalMesh from BRepMesh;
45     ---C++: alias "Standard_EXPORT virtual ~BRepMesh_IncrementalMesh();"
46
47     Create (S       : Shape   from TopoDS;
48             D       : Real    from Standard;
49             Relatif : Boolean from Standard = Standard_False;
50             Ang     : Real    from Standard = 0.5)
51         returns IncrementalMesh from BRepMesh;
52     ---Purpose: If the  boolean    <Relatif>   is  True,    the
53     --          deflection used   for the polygonalisation   of
54     --          each edge will be <D> * Size of Edge.
55     --          the deflection used for the faces will be the maximum
56     --          deflection of their edges.
57
58     SetRelative (     me : mutable;
59                  theFlag : Boolean from Standard);
60
61     Relative (me)
62         returns Boolean from Standard;
63
64     Init (me : mutable)
65         is redefined protected;
66
67     Perform (me : mutable)
68         is redefined;
69
70     Update (me : mutable;
71              S : Shape from TopoDS)
72         is static;
73     ---Purpose: Builds the incremental mesh of the shape
74
75     IsModified (me)
76         returns Boolean from Standard
77         is static;
78
79     Update (me : mutable;
80             E  : Edge from TopoDS)
81         is static private;
82     ---Purpose: Locate a correct discretisation if it exists
83     --          Set no one otherwise
84
85     Update (me : mutable;
86             F  : Face from TopoDS)
87         is static private;
88     ---Purpose: If the face is  not correctly triangulated, or
89     --          if  one  of its edges  is  to be discretisated
90     --          correctly, the triangulation  of this face  is
91     --          built.
92
93     GetStatusFlags (me)
94         returns Integer from Standard
95         is static;
96
97     SetParallel (           me : mutable;
98                  theInParallel : Boolean from Standard);
99     ---Purpose:
100     -- Request algorithm to launch in multiple threads to improve performance.
101
102     IsParallel (me)
103         returns Boolean from Standard;
104     ---Purpose:
105     -- Returns the multi-threading usage flag.
106
107     --
108     --  Plugin interface
109     --
110     Discret (myclass;
111              theShape      : Shape from TopoDS;
112              theDeflection : Real from Standard;
113              theAngle      : Real from Standard;
114              theAlgo       : out PDiscretRoot from BRepMesh)
115         returns Integer from Standard;
116     ---Purpose:
117     -- Plugin interface for the Mesh Factories.
118
119     IsParallelDefault (myclass)
120         returns Boolean from Standard;
121     ---Purpose:
122     -- Returns multi-threading usage flag set by default in
123     -- Discret() static method (thus applied only to Mesh Factories).
124
125     SetParallelDefault (myclass;
126                         theInParallel : Boolean from Standard);
127     ---Purpose:
128     -- Setup multi-threading usage flag set by default in
129     -- Discret() static method (thus applied only to Mesh Factories).
130
131 fields
132     myRelative   : Boolean     from Standard is protected;
133     myInParallel : Boolean     from Standard is protected;
134     myMap        : MapOfShape  from TopTools is protected;
135     myMesh       : FastDiscret from BRepMesh is protected;
136     myModified   : Boolean     from Standard is protected;
137     mymapedge    : DataMapOfShapeReal from TopTools is protected;
138     myancestors  : IndexedDataMapOfShapeListOfShape from TopTools is protected;
139     mydtotale    : Real from Standard is protected;
140     myBox        : Box  from Bnd is protected;
141     myStatus     : Integer from Standard is protected;
142
143 end IncrementalMesh;