1 -- Created on: 2008-10-28
2 -- Copyright (c) 2008-2012 OPEN CASCADE SAS
4 -- The content of this file is subject to the Open CASCADE Technology Public
5 -- License Version 6.5 (the "License"). You may not use the content of this file
6 -- except in compliance with the License. Please obtain a copy of the License
7 -- at http://www.opencascade.org and read it completely before using this file.
9 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
10 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
12 -- The Original Code and all software distributed under the License is
13 -- distributed on an "AS IS" basis, without warranty of any kind, and the
14 -- Initial Developer hereby disclaims all such warranties, including without
15 -- limitation, any warranties of merchantability, fitness for a particular
16 -- purpose or non-infringement. Please see the License for the specific terms
17 -- and conditions governing the rights and limitations under the License.
20 private class FastDiscretFace from BRepMesh inherits TShared from MMgt
22 ---Purpose: Algorithm to mesh a face with respect of the
23 -- frontier the deflection and by option the shared
27 uses Boolean from Standard,
28 Integer from Standard,
36 HSurface from BRepAdaptor,
38 DataStructureOfDelaun from BRepMesh,
39 DataMapOfVertexInteger from BRepMesh,
40 DataMapOfIntegerListOfXY from BRepMesh,
41 DataMapOfShapeReal from TopTools,
42 MutexForShapeProvider from TopTools,
43 ListOfVertex from BRepMesh,
44 ClassifierPtr from BRepMesh,
45 Triangle from BRepMesh,
48 FaceAttribute from BRepMesh,
49 ListOfInteger from TColStd,
50 BaseAllocator from BRepMesh,
51 DataMapOfIntegerPnt from BRepMesh,
52 IndexedMapOfInteger from TColStd,
53 IndexedMapOfReal from TColStd,
54 DataMapOfShapePairOfPolygon from BRepMesh,
55 Triangulation from Poly,
60 Create (theAngle : Real from Standard;
61 theWithShare : Boolean from Standard=Standard_True)
62 returns mutable FastDiscretFace from BRepMesh;
68 theFace : Face from TopoDS;
69 theAttrib : FaceAttribute from BRepMesh;
70 theMapDefle : DataMapOfShapeReal from TopTools;
71 theMutexProvider : MutexForShapeProvider from TopTools)
76 theVert : Vertex from TopoDS;
77 theFace : Face from TopoDS;
78 theSFace : HSurface from BRepAdaptor) is private;
80 RestoreStructureFromTriangulation
82 theEdge : Edge from TopoDS;
83 theFace : Face from TopoDS;
84 theSurf : HSurface from BRepAdaptor;
85 theTrigu : Triangulation from Poly;
86 theDefEdge : Real from Standard;
87 theLoc : Location from TopLoc)
88 returns Boolean from Standard is protected;
91 InternalVertices (me : mutable;
92 theCaro : HSurface from BRepAdaptor;
93 theInternalV : in out ListOfVertex from BRepMesh;
94 theDefFace : Real from Standard;
95 theClassifier : ClassifierPtr from BRepMesh)
99 Control (me : mutable;
100 theCaro : HSurface from BRepAdaptor;
101 theDefFace : Real from Standard;
102 theInternalV : in out ListOfVertex from BRepMesh;
103 theBadTriangles : in out ListOfInteger from TColStd;
104 theNulTriangles : in out ListOfInteger from TColStd;
105 theTrigu : in out Delaun from BRepMesh;
106 theIsFirst : Boolean from Standard)
107 returns Real from Standard is static;
110 theV : Vertex from TopoDS;
111 theXY : Pnt2d from gp;
112 theIp : Integer from Standard;
113 theSFace : HSurface from BRepAdaptor;
114 theMinDist : Real from Standard;
115 theLocation2dMap: in out DataMapOfIntegerListOfXY from BRepMesh)
118 AddInShape (me: mutable;
119 theFace : Face from TopoDS;
120 theDefFace: Real from Standard;
121 theMutexProvider: MutexForShapeProvider from TopTools)
128 theIndex : Integer from Standard)
129 ---Purpose: Gives the triangle of <Index>.
130 ---C++: return const &
131 returns Triangle from BRepMesh
135 theIndex : Integer from Standard)
136 ---Purpose: Gives the edge of index <Index>.
137 ---C++: return const &
138 returns Edge from BRepMesh
143 theIndex : Integer from Standard)
144 ---Purpose: Gives the vertex of <Index>.
145 ---C++: return const &
146 returns Vertex from BRepMesh
150 theIndex : Integer from Standard)
151 ---Purpose: Gives the location3d of the vertex of <Index>.
152 ---C++: return const &
157 myAngle : Real from Standard;
158 myWithShare : Boolean from Standard;
159 myVertices : DataMapOfVertexInteger from BRepMesh;
160 myInternaledges : DataMapOfShapePairOfPolygon from BRepMesh;
161 myNbLocat : Integer from Standard;
162 myLocation3d : DataMapOfIntegerPnt from BRepMesh;
163 myStructure : DataStructureOfDelaun from BRepMesh;
164 myListver : ListOfVertex from BRepMesh;
165 myVemap : IndexedMapOfInteger from TColStd;
166 myLocation2d : DataMapOfIntegerListOfXY from BRepMesh;
167 myAttrib : FaceAttribute from BRepMesh;
168 myInternalVerticesMode : Boolean from Standard; --mode to accounting internal vertices
169 myUParam : IndexedMapOfReal from TColStd;
170 myVParam : IndexedMapOfReal from TColStd;
171 myAllocator : BaseAllocator from BRepMesh;