0024428: Implementation of LGPL license
[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-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
8 -- This library is free software; you can redistribute it and / or modify it
9 -- under the terms of the GNU Lesser General Public version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 class IncrementalMesh from BRepMesh
18
19 inherits DiscretRoot from BRepMesh
20
21     ---Purpose: Builds the mesh of a shape with respect of their
22     --          correctly triangulated parts
23     --
24
25 uses
26     Box from Bnd,
27     Shape from TopoDS,
28     Face  from TopoDS,
29     Edge  from TopoDS,
30     MapOfShape  from TopTools,
31     IndexedDataMapOfShapeListOfShape from TopTools,
32     DataMapOfShapeReal from TopTools,
33     FastDiscret  from BRepMesh,
34     Status       from BRepMesh,
35     PDiscretRoot from BRepMesh
36
37 is
38     Create
39         returns IncrementalMesh from BRepMesh;
40     ---C++: alias "Standard_EXPORT virtual ~BRepMesh_IncrementalMesh();"
41
42     Create (S          : Shape   from TopoDS;
43             D          : Real    from Standard;
44             Relatif    : Boolean from Standard = Standard_False;
45             Ang        : Real    from Standard = 0.5;
46             InParallel : Boolean from Standard = Standard_False)
47         returns IncrementalMesh from BRepMesh;
48     ---Purpose: If the  boolean    <Relatif>   is  True,    the
49     --          deflection used   for the polygonalisation   of
50     --          each edge will be <D> * Size of Edge.
51     --          the deflection used for the faces will be the maximum
52     --          deflection of their edges.
53
54     SetRelative (     me : mutable;
55                  theFlag : Boolean from Standard);
56
57     Relative (me)
58         returns Boolean from Standard;
59
60     Init (me : mutable)
61         is redefined protected;
62
63     Perform (me : mutable)
64         is redefined;
65
66     Update (me : mutable;
67              S : Shape from TopoDS)
68         is static;
69     ---Purpose: Builds the incremental mesh of the shape
70
71     IsModified (me)
72         returns Boolean from Standard
73         is static;
74
75     Update (me : mutable;
76             E  : Edge from TopoDS)
77         is static private;
78     ---Purpose: Locate a correct discretisation if it exists
79     --          Set no one otherwise
80
81     Update (me : mutable;
82             F  : Face from TopoDS)
83         is static private;
84     ---Purpose: If the face is  not correctly triangulated, or
85     --          if  one  of its edges  is  to be discretisated
86     --          correctly, the triangulation  of this face  is
87     --          built.
88
89     GetStatusFlags (me)
90         returns Integer from Standard
91         is static;
92
93     SetParallel (           me : mutable;
94                  theInParallel : Boolean from Standard);
95     ---Purpose:
96     -- Request algorithm to launch in multiple threads to improve performance.
97
98     IsParallel (me)
99         returns Boolean from Standard;
100     ---Purpose:
101     -- Returns the multi-threading usage flag.
102
103     --
104     --  Plugin interface
105     --
106     Discret (myclass;
107              theShape      : Shape from TopoDS;
108              theDeflection : Real from Standard;
109              theAngle      : Real from Standard;
110              theAlgo       : out PDiscretRoot from BRepMesh)
111         returns Integer from Standard;
112     ---Purpose:
113     -- Plugin interface for the Mesh Factories.
114
115     IsParallelDefault (myclass)
116         returns Boolean from Standard;
117     ---Purpose:
118     -- Returns multi-threading usage flag set by default in
119     -- Discret() static method (thus applied only to Mesh Factories).
120
121     SetParallelDefault (myclass;
122                         theInParallel : Boolean from Standard);
123     ---Purpose:
124     -- Setup multi-threading usage flag set by default in
125     -- Discret() static method (thus applied only to Mesh Factories).
126
127 fields
128     myRelative   : Boolean     from Standard is protected;
129     myInParallel : Boolean     from Standard is protected;
130     myMap        : MapOfShape  from TopTools is protected;
131     myMesh       : FastDiscret from BRepMesh is protected;
132     myModified   : Boolean     from Standard is protected;
133     mymapedge    : DataMapOfShapeReal from TopTools is protected;
134     myancestors  : IndexedDataMapOfShapeListOfShape from TopTools is protected;
135     mydtotale    : Real from Standard is protected;
136     myBox        : Box  from Bnd is protected;
137     myStatus     : Integer from Standard is protected;
138
139 end IncrementalMesh;