Commit | Line | Data |
---|---|---|
b311480e | 1 | -- Created on: 2008-10-28 |
2 | -- Copyright (c) 2008-2012 OPEN CASCADE SAS | |
3 | -- | |
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. | |
8 | -- | |
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. | |
11 | -- | |
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. | |
18 | ||
7fd59977 | 19 | |
20 | private class FastDiscretFace from BRepMesh inherits TShared from MMgt | |
21 | ||
703a6abd O |
22 | ---Purpose: Algorithm to mesh a face with respect of the |
23 | -- frontier the deflection and by option the shared | |
24 | -- components. | |
7fd59977 | 25 | |
26 | ||
27 | uses Boolean from Standard, | |
703a6abd O |
28 | Integer from Standard, |
29 | Real from Standard, | |
30 | Face from TopoDS, | |
31 | Edge from TopoDS, | |
32 | Vertex from TopoDS, | |
33 | Pnt from gp, | |
34 | Pnt2d from gp, | |
7fd59977 | 35 | XY from gp, |
703a6abd O |
36 | HSurface from BRepAdaptor, |
37 | Delaun from BRepMesh, | |
38 | DataStructureOfDelaun from BRepMesh, | |
39 | DataMapOfVertexInteger from BRepMesh, | |
40 | DataMapOfIntegerListOfXY from BRepMesh, | |
41 | DataMapOfShapeReal from TopTools, | |
d00cba63 | 42 | MutexForShapeProvider from TopTools, |
703a6abd O |
43 | ListOfVertex from BRepMesh, |
44 | ClassifierPtr from BRepMesh, | |
45 | Triangle from BRepMesh, | |
46 | Edge from BRepMesh, | |
47 | Vertex from BRepMesh, | |
48 | FaceAttribute from BRepMesh, | |
49 | ListOfInteger from TColStd, | |
0d88155b | 50 | BaseAllocator from BRepMesh, |
703a6abd O |
51 | DataMapOfIntegerPnt from BRepMesh, |
52 | IndexedMapOfInteger from TColStd, | |
7fd59977 | 53 | IndexedMapOfReal from TColStd, |
703a6abd O |
54 | DataMapOfShapePairOfPolygon from BRepMesh, |
55 | Triangulation from Poly, | |
56 | Location from TopLoc | |
57 | ||
7fd59977 | 58 | is |
59 | ||
703a6abd O |
60 | Create (theAngle : Real from Standard; |
61 | theWithShare : Boolean from Standard=Standard_True) | |
62 | returns mutable FastDiscretFace from BRepMesh; | |
63 | ||
64 | ||
65 | ||
66 | ||
67 | Add (me : mutable; | |
68 | theFace : Face from TopoDS; | |
69 | theAttrib : FaceAttribute from BRepMesh; | |
d00cba63 | 70 | theMapDefle : DataMapOfShapeReal from TopTools; |
71 | theMutexProvider : MutexForShapeProvider from TopTools) | |
703a6abd O |
72 | is static; |
73 | ||
74 | ||
75 | Add (me : mutable; | |
76 | theVert : Vertex from TopoDS; | |
77 | theFace : Face from TopoDS; | |
78 | theSFace : HSurface from BRepAdaptor) is private; | |
79 | ||
80 | RestoreStructureFromTriangulation | |
81 | (me: mutable; | |
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; | |
f67d0512 | 87 | theLoc : Location from TopLoc; |
88 | theMutexProvider: MutexForShapeProvider from TopTools) | |
703a6abd O |
89 | returns Boolean from Standard is protected; |
90 | ||
7fd59977 | 91 | |
703a6abd O |
92 | InternalVertices (me : mutable; |
93 | theCaro : HSurface from BRepAdaptor; | |
94 | theInternalV : in out ListOfVertex from BRepMesh; | |
95 | theDefFace : Real from Standard; | |
96 | theClassifier : ClassifierPtr from BRepMesh) | |
97 | is static private; | |
98 | ||
99 | ||
100 | Control (me : mutable; | |
101 | theCaro : HSurface from BRepAdaptor; | |
102 | theDefFace : Real from Standard; | |
103 | theInternalV : in out ListOfVertex from BRepMesh; | |
104 | theBadTriangles : in out ListOfInteger from TColStd; | |
105 | theNulTriangles : in out ListOfInteger from TColStd; | |
106 | theTrigu : in out Delaun from BRepMesh; | |
107 | theIsFirst : Boolean from Standard) | |
108 | returns Real from Standard is static; | |
109 | ||
110 | FindUV (myclass; | |
111 | theV : Vertex from TopoDS; | |
112 | theXY : Pnt2d from gp; | |
113 | theIp : Integer from Standard; | |
114 | theSFace : HSurface from BRepAdaptor; | |
115 | theMinDist : Real from Standard; | |
116 | theLocation2dMap: in out DataMapOfIntegerListOfXY from BRepMesh) | |
117 | returns XY from gp; | |
118 | ||
119 | AddInShape (me: mutable; | |
120 | theFace : Face from TopoDS; | |
d00cba63 | 121 | theDefFace: Real from Standard; |
122 | theMutexProvider: MutexForShapeProvider from TopTools) | |
703a6abd | 123 | is static private; |
7fd59977 | 124 | |
125 | ||
126 | -- Output : | |
127 | ||
703a6abd O |
128 | Triangle (me; |
129 | theIndex : Integer from Standard) | |
130 | ---Purpose: Gives the triangle of <Index>. | |
131 | ---C++: return const & | |
132 | returns Triangle from BRepMesh | |
133 | is static; | |
134 | ||
135 | Edge (me; | |
136 | theIndex : Integer from Standard) | |
137 | ---Purpose: Gives the edge of index <Index>. | |
138 | ---C++: return const & | |
139 | returns Edge from BRepMesh | |
140 | is static; | |
141 | ||
142 | ||
143 | Vertex (me; | |
144 | theIndex : Integer from Standard) | |
145 | ---Purpose: Gives the vertex of <Index>. | |
146 | ---C++: return const & | |
147 | returns Vertex from BRepMesh | |
148 | is static; | |
149 | ||
150 | Pnt (me; | |
151 | theIndex : Integer from Standard) | |
152 | ---Purpose: Gives the location3d of the vertex of <Index>. | |
153 | ---C++: return const & | |
154 | returns Pnt from gp | |
155 | is static; | |
7fd59977 | 156 | |
157 | fields | |
703a6abd O |
158 | myAngle : Real from Standard; |
159 | myWithShare : Boolean from Standard; | |
160 | myVertices : DataMapOfVertexInteger from BRepMesh; | |
161 | myInternaledges : DataMapOfShapePairOfPolygon from BRepMesh; | |
162 | myNbLocat : Integer from Standard; | |
163 | myLocation3d : DataMapOfIntegerPnt from BRepMesh; | |
164 | myStructure : DataStructureOfDelaun from BRepMesh; | |
165 | myListver : ListOfVertex from BRepMesh; | |
166 | myVemap : IndexedMapOfInteger from TColStd; | |
167 | myLocation2d : DataMapOfIntegerListOfXY from BRepMesh; | |
168 | myAttrib : FaceAttribute from BRepMesh; | |
169 | myInternalVerticesMode : Boolean from Standard; --mode to accounting internal vertices | |
170 | myUParam : IndexedMapOfReal from TColStd; | |
171 | myVParam : IndexedMapOfReal from TColStd; | |
0d88155b | 172 | myAllocator : BaseAllocator from BRepMesh; |
7fd59977 | 173 | |
174 | end FastDiscretFace; |