42cf5bc1 |
1 | // Created on: 1992-02-18 |
2 | // Created by: Christophe MARION |
3 | // Copyright (c) 1992-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 under |
9 | // the terms of the GNU Lesser General Public License 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 | #ifndef _HLRBRep_PolyAlgo_HeaderFile |
18 | #define _HLRBRep_PolyAlgo_HeaderFile |
19 | |
681f3919 |
20 | #include <HLRAlgo_PolyInternalNode.hxx> |
21 | |
22 | #include <HLRAlgo_Array1OfTData.hxx> |
23 | #include <HLRAlgo_Array1OfPISeg.hxx> |
24 | #include <HLRAlgo_Array1OfPINod.hxx> |
42cf5bc1 |
25 | #include <Standard.hxx> |
26 | #include <Standard_Type.hxx> |
27 | |
28 | #include <HLRAlgo_Projector.hxx> |
29 | #include <Standard_Real.hxx> |
30 | #include <TopTools_SequenceOfShape.hxx> |
31 | #include <TopTools_IndexedMapOfShape.hxx> |
32 | #include <Standard_Boolean.hxx> |
33 | #include <BRepAdaptor_Surface.hxx> |
34 | #include <BRepAdaptor_Curve.hxx> |
35 | #include <BRepAdaptor_Curve2d.hxx> |
25e59720 |
36 | #include <Standard_Transient.hxx> |
42cf5bc1 |
37 | #include <Standard_Integer.hxx> |
38 | #include <TColStd_Array1OfTransient.hxx> |
39 | #include <TColStd_Array1OfInteger.hxx> |
40 | #include <TopTools_MapOfShape.hxx> |
42cf5bc1 |
41 | #include <HLRAlgo_ListOfBPoint.hxx> |
42 | #include <TopTools_ListOfShape.hxx> |
43 | #include <GeomAbs_Shape.hxx> |
681f3919 |
44 | |
42cf5bc1 |
45 | class HLRAlgo_PolyAlgo; |
46 | class Geom_Surface; |
47 | class Standard_OutOfRange; |
48 | class TopoDS_Shape; |
49 | class HLRAlgo_Projector; |
50 | class TopoDS_Edge; |
51 | class HLRAlgo_PolyInternalData; |
52 | class HLRAlgo_EdgeStatus; |
681f3919 |
53 | struct HLRAlgo_TriangleData; |
42cf5bc1 |
54 | |
55 | |
56 | class HLRBRep_PolyAlgo; |
25e59720 |
57 | DEFINE_STANDARD_HANDLE(HLRBRep_PolyAlgo, Standard_Transient) |
42cf5bc1 |
58 | |
59 | //! to remove Hidden lines on Shapes with Triangulations. |
60 | //! A framework to compute the shape as seen in |
61 | //! a projection plane. This is done by calculating |
62 | //! the visible and the hidden parts of the shape. |
63 | //! HLRBRep_PolyAlgo works with three types of entity: |
64 | //! - shapes to be visualized (these shapes must |
65 | //! have already been triangulated.) |
66 | //! - edges in these shapes (these edges are |
67 | //! defined as polygonal lines on the |
68 | //! triangulation of the shape, and are the basic |
69 | //! entities which will be visualized or hidden), and |
70 | //! - triangles in these shapes which hide the edges. |
71 | //! HLRBRep_PolyAlgo is based on the principle |
72 | //! of comparing each edge of the shape to be |
73 | //! visualized with each of the triangles produced |
74 | //! by the triangulation of the shape, and |
75 | //! calculating the visible and the hidden parts of each edge. |
76 | //! For a given projection, HLRBRep_PolyAlgo |
77 | //! calculates a set of lines characteristic of the |
78 | //! object being represented. It is also used in |
79 | //! conjunction with the HLRBRep_PolyHLRToShape extraction |
80 | //! utilities, which reconstruct a new, simplified |
81 | //! shape from a selection of calculation results. |
82 | //! This new shape is made up of edges, which |
83 | //! represent the shape visualized in the projection. |
84 | //! HLRBRep_PolyAlgo works with a polyhedral |
85 | //! simplification of the shape whereas |
86 | //! HLRBRep_Algo takes the shape itself into |
87 | //! account. When you use HLRBRep_Algo, you |
88 | //! obtain an exact result, whereas, when you use |
89 | //! HLRBRep_PolyAlgo, you reduce computation |
90 | //! time but obtain polygonal segments. |
91 | //! An HLRBRep_PolyAlgo object provides a framework for: |
92 | //! - defining the point of view |
93 | //! - identifying the shape or shapes to be visualized |
94 | //! - calculating the outlines |
95 | //! - calculating the visible and hidden lines of the shape. |
96 | //! Warning |
97 | //! - Superimposed lines are not eliminated by this algorithm. |
98 | //! - There must be no unfinished objects inside the shape you wish to visualize. |
99 | //! - Points are not treated. |
100 | //! - Note that this is not the sort of algorithm |
101 | //! used in generating shading, which calculates |
102 | //! the visible and hidden parts of each face in a |
103 | //! shape to be visualized by comparing each |
104 | //! face in the shape with every other face in the same shape. |
25e59720 |
105 | class HLRBRep_PolyAlgo : public Standard_Transient |
42cf5bc1 |
106 | { |
107 | |
108 | public: |
109 | |
110 | |
111 | //! Constructs an empty framework for the |
112 | //! calculation of the visible and hidden lines of a shape in a projection. |
113 | //! Use the functions: |
114 | //! - Projector to define the point of view |
115 | //! - Load to select the shape or shapes to be visualized |
116 | //! - Update to compute the visible and hidden lines of the shape. |
117 | //! Warning |
118 | //! The shape or shapes to be visualized must have already been triangulated. |
119 | Standard_EXPORT HLRBRep_PolyAlgo(); |
120 | |
121 | Standard_EXPORT HLRBRep_PolyAlgo(const Handle(HLRBRep_PolyAlgo)& A); |
122 | |
123 | Standard_EXPORT HLRBRep_PolyAlgo(const TopoDS_Shape& S); |
124 | |
125 | Standard_Integer NbShapes() const; |
126 | |
127 | Standard_EXPORT TopoDS_Shape& Shape (const Standard_Integer I); |
128 | |
129 | //! remove the Shape of Index <I>. |
130 | Standard_EXPORT void Remove (const Standard_Integer I); |
131 | |
132 | //! return the index of the Shape <S> and return 0 if |
133 | //! the Shape <S> is not found. |
134 | Standard_EXPORT Standard_Integer Index (const TopoDS_Shape& S) const; |
135 | |
136 | //! Loads the shape S into this framework. |
137 | //! Warning S must have already been triangulated. |
138 | void Load (const TopoDS_Shape& S); |
139 | |
140 | Standard_EXPORT Handle(HLRAlgo_PolyAlgo) Algo() const; |
141 | |
142 | //! Sets the parameters of the view for this framework. |
143 | //! These parameters are defined by an HLRAlgo_Projector object, |
144 | //! which is returned by the Projector function on a Prs3d_Projector object. |
145 | const HLRAlgo_Projector& Projector() const; |
146 | |
147 | void Projector (const HLRAlgo_Projector& P); |
148 | |
149 | Standard_Real Angle() const; |
150 | |
151 | void Angle (const Standard_Real Ang); |
152 | |
153 | Standard_Real TolAngular() const; |
154 | |
155 | void TolAngular (const Standard_Real Tol); |
156 | |
157 | Standard_Real TolCoef() const; |
158 | |
159 | void TolCoef (const Standard_Real Tol); |
160 | |
161 | //! Launches calculation of outlines of the shape |
162 | //! visualized by this framework. Used after setting the point of view and |
163 | //! defining the shape or shapes to be visualized. |
164 | Standard_EXPORT void Update(); |
165 | |
166 | void InitHide(); |
167 | |
168 | Standard_Boolean MoreHide() const; |
169 | |
170 | void NextHide(); |
171 | |
681f3919 |
172 | Standard_EXPORT HLRAlgo_BiPoint::PointsT& Hide ( |
173 | HLRAlgo_EdgeStatus& status, |
174 | TopoDS_Shape& S, |
175 | Standard_Boolean& reg1, |
176 | Standard_Boolean& regn, |
177 | Standard_Boolean& outl, |
178 | Standard_Boolean& intl); |
42cf5bc1 |
179 | |
180 | void InitShow(); |
181 | |
182 | Standard_Boolean MoreShow() const; |
183 | |
184 | void NextShow(); |
185 | |
681f3919 |
186 | Standard_EXPORT HLRAlgo_BiPoint::PointsT& Show (TopoDS_Shape& S, Standard_Boolean& reg1, Standard_Boolean& regn, Standard_Boolean& outl, Standard_Boolean& intl); |
42cf5bc1 |
187 | |
188 | //! Make a shape with the internal outlines in each |
189 | //! face. |
190 | Standard_EXPORT TopoDS_Shape OutLinedShape (const TopoDS_Shape& S) const; |
191 | |
192 | Standard_Boolean Debug() const; |
193 | |
194 | void Debug (const Standard_Boolean B); |
195 | |
196 | |
197 | |
198 | |
25e59720 |
199 | DEFINE_STANDARD_RTTIEXT(HLRBRep_PolyAlgo,Standard_Transient) |
42cf5bc1 |
200 | |
201 | protected: |
202 | |
203 | |
204 | |
205 | |
206 | private: |
207 | |
208 | |
209 | Standard_EXPORT TopoDS_Shape MakeShape() const; |
210 | |
211 | Standard_EXPORT Standard_Integer InitShape (const TopoDS_Shape& Shape, Standard_Boolean& IsoledF, Standard_Boolean& IsoledE); |
212 | |
213 | Standard_EXPORT void StoreShell (const TopoDS_Shape& Shape, Standard_Integer& iShell, TColStd_Array1OfTransient& Shell, const Standard_Boolean IsoledF, const Standard_Boolean IsoledE, TColStd_Array1OfInteger& ES, TColStd_Array1OfTransient& PD, TColStd_Array1OfTransient& PID, TopTools_MapOfShape& ShapeMap1, TopTools_MapOfShape& ShapeMap2); |
214 | |
681f3919 |
215 | Standard_EXPORT Standard_Boolean Normal (const Standard_Integer iNode, HLRAlgo_PolyInternalNode::NodeIndices& theNodIndices, HLRAlgo_PolyInternalNode::NodeData& Nod1RValues, HLRAlgo_Array1OfTData*& TData, HLRAlgo_Array1OfPISeg*& PISeg, HLRAlgo_Array1OfPINod*& PINod, const Standard_Boolean orient) const; |
42cf5bc1 |
216 | |
681f3919 |
217 | Standard_EXPORT Standard_Boolean AverageNormal (const Standard_Integer iNode, HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices, HLRAlgo_Array1OfTData*& TData, HLRAlgo_Array1OfPISeg*& PISeg, HLRAlgo_Array1OfPINod*& PINod, Standard_Real& X, Standard_Real& Y, Standard_Real& Z) const; |
218 | |
219 | Standard_Boolean AverageNormal (const Standard_Integer iNode, HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices, HLRAlgo_Array1OfTData*& TData, HLRAlgo_Array1OfPISeg*& PISeg, HLRAlgo_Array1OfPINod*& PINod, gp_XYZ& theNormal) const |
220 | { |
221 | return AverageNormal (iNode, theNodeIndices, TData, PISeg, PINod, theNormal.ChangeCoord(1), theNormal.ChangeCoord(2), theNormal.ChangeCoord(3)); |
222 | } |
223 | |
224 | Standard_EXPORT void AddNormalOnTriangle (const Standard_Integer iTri, const Standard_Integer iNode, Standard_Integer& jNode, HLRAlgo_Array1OfTData*& TData, HLRAlgo_Array1OfPINod*& PINod, Standard_Real& X, Standard_Real& Y, Standard_Real& Z, Standard_Boolean& OK) const; |
42cf5bc1 |
225 | |
226 | Standard_EXPORT void InitBiPointsWithConnexity (const Standard_Integer e, TopoDS_Edge& E, HLRAlgo_ListOfBPoint& List, TColStd_Array1OfTransient& PID, TopTools_ListOfShape& LS, const Standard_Boolean connex); |
227 | |
681f3919 |
228 | Standard_EXPORT void Interpolation (HLRAlgo_ListOfBPoint& List, Standard_Real& X1, Standard_Real& Y1, Standard_Real& Z1, Standard_Real& X2, Standard_Real& Y2, Standard_Real& Z2, Standard_Real& XTI1, Standard_Real& YTI1, Standard_Real& ZTI1, Standard_Real& XTI2, Standard_Real& YTI2, Standard_Real& ZTI2, const Standard_Integer e, Standard_Real& U1, Standard_Real& U2, HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices1, HLRAlgo_PolyInternalNode::NodeData& Nod11RValues, HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices2, HLRAlgo_PolyInternalNode::NodeData& Nod12RValues, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i1, const Handle(HLRAlgo_PolyInternalData)& pid1, HLRAlgo_Array1OfTData*& TData1, HLRAlgo_Array1OfPISeg*& PISeg1, HLRAlgo_Array1OfPINod*& PINod1) const; |
42cf5bc1 |
229 | |
681f3919 |
230 | Standard_EXPORT void Interpolation (HLRAlgo_ListOfBPoint& List, Standard_Real& X1, Standard_Real& Y1, Standard_Real& Z1, Standard_Real& X2, Standard_Real& Y2, Standard_Real& Z2, Standard_Real& XTI1, Standard_Real& YTI1, Standard_Real& ZTI1, Standard_Real& XTI2, Standard_Real& YTI2, Standard_Real& ZTI2, const Standard_Integer e, Standard_Real& U1, Standard_Real& U2, const GeomAbs_Shape rg, HLRAlgo_PolyInternalNode::NodeIndices& Nod11Indices, HLRAlgo_PolyInternalNode::NodeData& Nod11RValues, HLRAlgo_PolyInternalNode::NodeIndices& Nod12Indices, HLRAlgo_PolyInternalNode::NodeData& Nod12RValues, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i1, const Handle(HLRAlgo_PolyInternalData)& pid1, HLRAlgo_Array1OfTData*& TData1, HLRAlgo_Array1OfPISeg*& PISeg1, HLRAlgo_Array1OfPINod*& PINod1, HLRAlgo_PolyInternalNode::NodeIndices& Nod21Indices, HLRAlgo_PolyInternalNode::NodeData& Nod21RValues, HLRAlgo_PolyInternalNode::NodeIndices& Nod22Indices, HLRAlgo_PolyInternalNode::NodeData& Nod22RValues, const Standard_Integer i2p1, const Standard_Integer i2p2, const Standard_Integer i2, const Handle(HLRAlgo_PolyInternalData)& pid2, HLRAlgo_Array1OfTData*& TData2, HLRAlgo_Array1OfPISeg*& PISeg2, HLRAlgo_Array1OfPINod*& PINod2) const; |
42cf5bc1 |
231 | |
681f3919 |
232 | Standard_EXPORT Standard_Boolean Interpolation (const Standard_Real U1, const Standard_Real U2, HLRAlgo_PolyInternalNode::NodeData& Nod1RValues, HLRAlgo_PolyInternalNode::NodeData& Nod2RValues, Standard_Real& X3, Standard_Real& Y3, Standard_Real& Z3, Standard_Real& XT3, Standard_Real& YT3, Standard_Real& ZT3, Standard_Real& coef3, Standard_Real& U3, Standard_Boolean& mP3P1) const; |
42cf5bc1 |
233 | |
681f3919 |
234 | Standard_EXPORT void MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List, Standard_Real& X1, Standard_Real& Y1, Standard_Real& Z1, Standard_Real& X2, Standard_Real& Y2, Standard_Real& Z2, Standard_Real& XTI1, Standard_Real& YTI1, Standard_Real& ZTI1, Standard_Real& XTI2, Standard_Real& YTI2, Standard_Real& ZTI2, const Standard_Integer e, Standard_Real& U1, Standard_Real& U2, HLRAlgo_PolyInternalNode::NodeIndices& Nod11Indices, HLRAlgo_PolyInternalNode::NodeData& Nod11RValues, HLRAlgo_PolyInternalNode::NodeIndices& Nod12Indices, HLRAlgo_PolyInternalNode::NodeData& Nod12RValues, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i1, const Handle(HLRAlgo_PolyInternalData)& pid1, HLRAlgo_Array1OfTData*& TData1, HLRAlgo_Array1OfPISeg*& PISeg1, HLRAlgo_Array1OfPINod*& PINod1, const Standard_Real X3, const Standard_Real Y3, const Standard_Real Z3, const Standard_Real XT3, const Standard_Real YT3, const Standard_Real ZT3, const Standard_Real coef3, const Standard_Real U3, const Standard_Boolean insP3, const Standard_Boolean mP3P1, const Standard_Integer flag) const; |
42cf5bc1 |
235 | |
681f3919 |
236 | Standard_EXPORT void MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List, Standard_Real& X1, Standard_Real& Y1, Standard_Real& Z1, Standard_Real& X2, Standard_Real& Y2, Standard_Real& Z2, Standard_Real& XTI1, Standard_Real& YTI1, Standard_Real& ZTI1, Standard_Real& XTI2, Standard_Real& YTI2, Standard_Real& ZTI2, const Standard_Integer e, Standard_Real& U1, Standard_Real& U2, HLRAlgo_PolyInternalNode::NodeIndices& Nod11Indices, HLRAlgo_PolyInternalNode::NodeData& Nod11RValues, HLRAlgo_PolyInternalNode::NodeIndices& Nod12Indices, HLRAlgo_PolyInternalNode::NodeData& Nod12RValues, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i1, const Handle(HLRAlgo_PolyInternalData)& pid1, HLRAlgo_Array1OfTData*& TData1, HLRAlgo_Array1OfPISeg*& PISeg1, HLRAlgo_Array1OfPINod*& PINod1, HLRAlgo_PolyInternalNode::NodeIndices& Nod21Indices, HLRAlgo_PolyInternalNode::NodeData& Nod21RValues, HLRAlgo_PolyInternalNode::NodeIndices& Nod22Indices, HLRAlgo_PolyInternalNode::NodeData& Nod22RValues, const Standard_Integer i2p1, const Standard_Integer i2p2, const Standard_Integer i2, const Handle(HLRAlgo_PolyInternalData)& pid2, HLRAlgo_Array1OfTData*& TData2, HLRAlgo_Array1OfPISeg*& PISeg2, HLRAlgo_Array1OfPINod*& PINod2, const Standard_Real X3, const Standard_Real Y3, const Standard_Real Z3, const Standard_Real XT3, const Standard_Real YT3, const Standard_Real ZT3, const Standard_Real coef3, const Standard_Real U3, const Standard_Boolean insP3, const Standard_Boolean mP3P1, const Standard_Integer flag) const; |
42cf5bc1 |
237 | |
681f3919 |
238 | Standard_EXPORT void MoveOrInsertPoint (HLRAlgo_ListOfBPoint& List, Standard_Real& X1, Standard_Real& Y1, Standard_Real& Z1, Standard_Real& X2, Standard_Real& Y2, Standard_Real& Z2, Standard_Real& XTI1, Standard_Real& YTI1, Standard_Real& ZTI1, Standard_Real& XTI2, Standard_Real& YTI2, Standard_Real& ZTI2, const Standard_Integer e, Standard_Real& U1, Standard_Real& U2, HLRAlgo_PolyInternalNode::NodeIndices& Nod11Indices, HLRAlgo_PolyInternalNode::NodeData& Nod11RValues, HLRAlgo_PolyInternalNode::NodeIndices& Nod12Indices, HLRAlgo_PolyInternalNode::NodeData& Nod12RValues, const Standard_Integer i1p1, const Standard_Integer i1p2, const Standard_Integer i1, const Handle(HLRAlgo_PolyInternalData)& pid1, HLRAlgo_Array1OfTData*& TData1, HLRAlgo_Array1OfPISeg*& PISeg1, HLRAlgo_Array1OfPINod*& PINod1, HLRAlgo_PolyInternalNode::NodeIndices& Nod21Indices, HLRAlgo_PolyInternalNode::NodeData& Nod21RValues, HLRAlgo_PolyInternalNode::NodeIndices& Nod22Indices, HLRAlgo_PolyInternalNode::NodeData& Nod22RValues, const Standard_Integer i2p1, const Standard_Integer i2p2, const Standard_Integer i2, const Handle(HLRAlgo_PolyInternalData)& pid2, HLRAlgo_Array1OfTData*& TData2, HLRAlgo_Array1OfPISeg*& PISeg2, HLRAlgo_Array1OfPINod*& PINod2, const Standard_Real X3, const Standard_Real Y3, const Standard_Real Z3, const Standard_Real XT3, const Standard_Real YT3, const Standard_Real ZT3, const Standard_Real coef3, const Standard_Real U3, const Standard_Boolean insP3, const Standard_Boolean mP3P1, const Standard_Real X4, const Standard_Real Y4, const Standard_Real Z4, const Standard_Real XT4, const Standard_Real YT4, const Standard_Real ZT4, const Standard_Real coef4, const Standard_Real U4, const Standard_Boolean insP4, const Standard_Boolean mP4P1, const Standard_Integer flag) const; |
42cf5bc1 |
239 | |
240 | Standard_EXPORT void InsertOnOutLine (TColStd_Array1OfTransient& PID); |
241 | |
242 | Standard_EXPORT void CheckFrBackTriangles (HLRAlgo_ListOfBPoint& List, TColStd_Array1OfTransient& PID); |
243 | |
681f3919 |
244 | Standard_EXPORT void FindEdgeOnTriangle (const HLRAlgo_TriangleData& theTriangle, const Standard_Integer ip1, const Standard_Integer ip2, Standard_Integer& jtrouv, Standard_Boolean& isDirect) const; |
42cf5bc1 |
245 | |
681f3919 |
246 | Standard_EXPORT void ChangeNode (const Standard_Integer ip1, const Standard_Integer ip2, HLRAlgo_PolyInternalNode::NodeIndices& Nod1Indices, HLRAlgo_PolyInternalNode::NodeData& Nod1RValues, HLRAlgo_PolyInternalNode::NodeIndices& Nod2Indices, HLRAlgo_PolyInternalNode::NodeData& Nod2RValues, const Standard_Real coef1, const Standard_Real X3, const Standard_Real Y3, const Standard_Real Z3, const Standard_Boolean first, HLRAlgo_Array1OfTData*& TData, HLRAlgo_Array1OfPISeg*& PISeg, HLRAlgo_Array1OfPINod*& PINod) const; |
42cf5bc1 |
247 | |
681f3919 |
248 | Standard_EXPORT void UpdateAroundNode (const Standard_Integer iNode, HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices, HLRAlgo_Array1OfTData* TData, HLRAlgo_Array1OfPISeg* PISeg, HLRAlgo_Array1OfPINod* PINod) const; |
42cf5bc1 |
249 | |
681f3919 |
250 | Standard_EXPORT void OrientTriangle (const Standard_Integer iTri, HLRAlgo_TriangleData& theTriangle, HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices1, HLRAlgo_PolyInternalNode::NodeData& Nod1RValues, HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices2, HLRAlgo_PolyInternalNode::NodeData& Nod2RValues, HLRAlgo_PolyInternalNode::NodeIndices& theNodeIndices3, HLRAlgo_PolyInternalNode::NodeData& Nod3RValues) const; |
42cf5bc1 |
251 | |
681f3919 |
252 | Standard_EXPORT Standard_Boolean Triangles (const Standard_Integer ip1, const Standard_Integer ip2, HLRAlgo_PolyInternalNode::NodeIndices& Nod1Indices, HLRAlgo_Array1OfPISeg*& PISeg, Standard_Integer& iTri1, Standard_Integer& iTri2) const; |
42cf5bc1 |
253 | |
681f3919 |
254 | Standard_EXPORT Standard_Boolean NewNode (HLRAlgo_PolyInternalNode::NodeData& Nod1RValues, HLRAlgo_PolyInternalNode::NodeData& Nod2RValues, Standard_Real& coef1, Standard_Boolean& moveP1) const; |
42cf5bc1 |
255 | |
681f3919 |
256 | Standard_EXPORT void UVNode (HLRAlgo_PolyInternalNode::NodeData& Nod1RValues, HLRAlgo_PolyInternalNode::NodeData& Nod2RValues, const Standard_Real coef1, Standard_Real& U3, Standard_Real& V3) const; |
42cf5bc1 |
257 | |
681f3919 |
258 | Standard_EXPORT void CheckDegeneratedSegment (HLRAlgo_PolyInternalNode::NodeIndices& Nod1Indices, HLRAlgo_PolyInternalNode::NodeData& Nod1RValues, HLRAlgo_PolyInternalNode::NodeIndices& Nod2Indices, HLRAlgo_PolyInternalNode::NodeData& Nod2RValues) const; |
42cf5bc1 |
259 | |
260 | Standard_EXPORT void UpdateOutLines (HLRAlgo_ListOfBPoint& List, TColStd_Array1OfTransient& PID); |
261 | |
262 | Standard_EXPORT void UpdateEdgesBiPoints (HLRAlgo_ListOfBPoint& List, const TColStd_Array1OfTransient& PID, const Standard_Boolean closed); |
263 | |
264 | Standard_EXPORT void UpdatePolyData (TColStd_Array1OfTransient& PD, TColStd_Array1OfTransient& PID, const Standard_Boolean closed); |
265 | |
266 | Standard_EXPORT void TMultiply (Standard_Real& X, Standard_Real& Y, Standard_Real& Z, const Standard_Boolean VecPartOnly = Standard_False) const; |
681f3919 |
267 | |
268 | void TMultiply(gp_XYZ& thePoint, const Standard_Boolean VecPartOnly = Standard_False) const |
269 | { |
270 | TMultiply(thePoint.ChangeCoord(1), thePoint.ChangeCoord(2), thePoint.ChangeCoord(3), VecPartOnly); |
271 | } |
272 | |
42cf5bc1 |
273 | Standard_EXPORT void TTMultiply (Standard_Real& X, Standard_Real& Y, Standard_Real& Z, const Standard_Boolean VecPartOnly = Standard_False) const; |
681f3919 |
274 | |
275 | void TTMultiply (gp_XYZ& thePoint, const Standard_Boolean VecPartOnly = Standard_False) const |
276 | { |
277 | TTMultiply(thePoint.ChangeCoord(1), thePoint.ChangeCoord(2), thePoint.ChangeCoord(3), VecPartOnly);\ |
278 | } |
279 | |
42cf5bc1 |
280 | Standard_EXPORT void TIMultiply (Standard_Real& X, Standard_Real& Y, Standard_Real& Z, const Standard_Boolean VecPartOnly = Standard_False) const; |
281 | |
681f3919 |
282 | void TIMultiply (gp_XYZ& thePoint, const Standard_Boolean VecPartOnly = Standard_False) const |
283 | { |
284 | TIMultiply(thePoint.ChangeCoord(1), thePoint.ChangeCoord(2), thePoint.ChangeCoord(3), VecPartOnly); |
285 | } |
286 | |
42cf5bc1 |
287 | HLRAlgo_Projector myProj; |
288 | Standard_Real TMat[3][3]; |
289 | Standard_Real TLoc[3]; |
290 | Standard_Real TTMa[3][3]; |
291 | Standard_Real TTLo[3]; |
292 | Standard_Real TIMa[3][3]; |
293 | Standard_Real TILo[3]; |
294 | TopTools_SequenceOfShape myShapes; |
295 | TopTools_IndexedMapOfShape myEMap; |
296 | TopTools_IndexedMapOfShape myFMap; |
297 | Handle(HLRAlgo_PolyAlgo) myAlgo; |
298 | Standard_Boolean myDebug; |
299 | Standard_Real myAngle; |
300 | Standard_Real myTolSta; |
301 | Standard_Real myTolEnd; |
302 | Standard_Real myTolAngular; |
303 | Handle(Geom_Surface) myGSurf; |
304 | BRepAdaptor_Surface myBSurf; |
305 | BRepAdaptor_Curve myBCurv; |
306 | BRepAdaptor_Curve2d myPC; |
307 | |
308 | |
309 | }; |
310 | |
311 | |
312 | #include <HLRBRep_PolyAlgo.lxx> |
313 | |
314 | |
315 | |
316 | |
317 | |
318 | #endif // _HLRBRep_PolyAlgo_HeaderFile |