42cf5bc1 |
1 | // Created on: 1992-10-14 |
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_CInter_HeaderFile |
18 | #define _HLRBRep_CInter_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <Standard_Real.hxx> |
25 | #include <IntCurve_IntConicConic.hxx> |
26 | #include <HLRBRep_TheIntConicCurveOfCInter.hxx> |
27 | #include <HLRBRep_TheIntPCurvePCurveOfCInter.hxx> |
28 | #include <IntRes2d_Intersection.hxx> |
29 | #include <Standard_Address.hxx> |
30 | #include <Standard_Boolean.hxx> |
31 | #include <Standard_Integer.hxx> |
32 | #include <TColStd_Array1OfReal.hxx> |
33 | class Standard_ConstructionError; |
34 | class HLRBRep_CurveTool; |
35 | class HLRBRep_TheProjPCurOfCInter; |
36 | class HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter; |
37 | class HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter; |
38 | class HLRBRep_TheIntConicCurveOfCInter; |
39 | class HLRBRep_TheIntersectorOfTheIntConicCurveOfCInter; |
40 | class HLRBRep_IntConicCurveOfCInter; |
41 | class HLRBRep_TheIntPCurvePCurveOfCInter; |
42 | class HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter; |
43 | class HLRBRep_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfCInter; |
44 | class HLRBRep_ExactIntersectionPointOfTheIntPCurvePCurveOfCInter; |
45 | class IntRes2d_Domain; |
46 | |
47 | |
48 | |
49 | class HLRBRep_CInter : public IntRes2d_Intersection |
50 | { |
51 | public: |
52 | |
53 | DEFINE_STANDARD_ALLOC |
54 | |
55 | |
36b9ff75 |
56 | //! Empty constructor. |
42cf5bc1 |
57 | HLRBRep_CInter(); |
58 | |
36b9ff75 |
59 | //! Self Intersection of a curve |
42cf5bc1 |
60 | HLRBRep_CInter(const Standard_Address& C, const Standard_Real TolConf, const Standard_Real Tol); |
61 | |
36b9ff75 |
62 | //! Self Intersection of a curve with a domain. |
42cf5bc1 |
63 | HLRBRep_CInter(const Standard_Address& C, const IntRes2d_Domain& D, const Standard_Real TolConf, const Standard_Real Tol); |
64 | |
36b9ff75 |
65 | //! Intersection between 2 curves. |
42cf5bc1 |
66 | HLRBRep_CInter(const Standard_Address& C1, const Standard_Address& C2, const Standard_Real TolConf, const Standard_Real Tol); |
67 | |
36b9ff75 |
68 | //! Intersection between 2 curves. |
42cf5bc1 |
69 | HLRBRep_CInter(const Standard_Address& C1, const IntRes2d_Domain& D1, const Standard_Address& C2, const Standard_Real TolConf, const Standard_Real Tol); |
70 | |
36b9ff75 |
71 | //! Intersection between 2 curves. |
42cf5bc1 |
72 | HLRBRep_CInter(const Standard_Address& C1, const Standard_Address& C2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol); |
73 | |
36b9ff75 |
74 | //! Intersection between 2 curves. |
42cf5bc1 |
75 | HLRBRep_CInter(const Standard_Address& C1, const IntRes2d_Domain& D1, const Standard_Address& C2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol); |
76 | |
36b9ff75 |
77 | //! Intersection between 2 curves. |
42cf5bc1 |
78 | Standard_EXPORT void Perform (const Standard_Address& C1, const IntRes2d_Domain& D1, const Standard_Address& C2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol); |
79 | |
36b9ff75 |
80 | //! Intersection between 2 curves. |
42cf5bc1 |
81 | void Perform (const Standard_Address& C1, const Standard_Address& C2, const Standard_Real TolConf, const Standard_Real Tol); |
82 | |
36b9ff75 |
83 | //! Intersection between 2 curves. |
42cf5bc1 |
84 | Standard_EXPORT void Perform (const Standard_Address& C1, const IntRes2d_Domain& D1, const Standard_Real TolConf, const Standard_Real Tol); |
85 | |
36b9ff75 |
86 | //! Intersection between 2 curves. |
42cf5bc1 |
87 | Standard_EXPORT void Perform (const Standard_Address& C1, const Standard_Real TolConf, const Standard_Real Tol); |
88 | |
36b9ff75 |
89 | //! Intersection between 2 curves. |
42cf5bc1 |
90 | void Perform (const Standard_Address& C1, const IntRes2d_Domain& D1, const Standard_Address& C2, const Standard_Real TolConf, const Standard_Real Tol); |
91 | |
36b9ff75 |
92 | //! Intersection between 2 curves. |
42cf5bc1 |
93 | void Perform (const Standard_Address& C1, const Standard_Address& C2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol); |
94 | |
36b9ff75 |
95 | //! Create a domain from a curve |
42cf5bc1 |
96 | Standard_EXPORT IntRes2d_Domain ComputeDomain (const Standard_Address& C1, const Standard_Real TolDomain) const; |
97 | |
5ae6e53d |
98 | //! Set / get minimum number of points in polygon intersection. |
99 | Standard_EXPORT void SetMinNbSamples (const Standard_Integer theMinNbSamples); |
100 | Standard_EXPORT Standard_Integer GetMinNbSamples () const; |
42cf5bc1 |
101 | |
102 | |
103 | protected: |
104 | |
105 | |
106 | |
107 | |
108 | |
109 | private: |
110 | |
111 | |
36b9ff75 |
112 | //! Intersection between 2 curves. |
42cf5bc1 |
113 | Standard_EXPORT void InternalPerform (const Standard_Address& C1, const IntRes2d_Domain& D1, const Standard_Address& C2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol, const Standard_Boolean Composite); |
114 | |
36b9ff75 |
115 | //! Part of InternalCompositePerform function |
42cf5bc1 |
116 | Standard_EXPORT void InternalCompositePerform_noRecurs (const Standard_Integer NbInterC1, const Standard_Address& C1, const Standard_Integer NumInterC1, const TColStd_Array1OfReal& Tab1, const IntRes2d_Domain& D1, const Standard_Integer NbInterC2, const Standard_Address& C2, const Standard_Integer NumInterC2, const TColStd_Array1OfReal& Tab2, const IntRes2d_Domain& D2, const Standard_Real TolConf, const Standard_Real Tol); |
117 | |
36b9ff75 |
118 | //! Intersection between 2 curves. |
42cf5bc1 |
119 | Standard_EXPORT void InternalCompositePerform (const Standard_Address& C1, const IntRes2d_Domain& D1, const Standard_Integer N1, const Standard_Integer NB1, const TColStd_Array1OfReal& Tab1, const Standard_Address& C2, const IntRes2d_Domain& D2, const Standard_Integer N2, const Standard_Integer NB2, const TColStd_Array1OfReal& Tab2, const Standard_Real TolConf, const Standard_Real Tol, const Standard_Boolean Composite); |
120 | |
121 | |
122 | Standard_Real param1inf; |
123 | Standard_Real param1sup; |
124 | Standard_Real param2inf; |
125 | Standard_Real param2sup; |
126 | IntCurve_IntConicConic intconiconi; |
127 | HLRBRep_TheIntConicCurveOfCInter intconicurv; |
128 | HLRBRep_TheIntPCurvePCurveOfCInter intcurvcurv; |
129 | |
130 | |
131 | }; |
132 | |
133 | #define TheCurve Standard_Address |
134 | #define TheCurve_hxx <Standard_Address.hxx> |
135 | #define TheCurveTool HLRBRep_CurveTool |
136 | #define TheCurveTool_hxx <HLRBRep_CurveTool.hxx> |
137 | #define IntCurve_TheProjPCur HLRBRep_TheProjPCurOfCInter |
138 | #define IntCurve_TheProjPCur_hxx <HLRBRep_TheProjPCurOfCInter.hxx> |
139 | #define IntCurve_TheCurveLocatorOfTheProjPCur HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter |
140 | #define IntCurve_TheCurveLocatorOfTheProjPCur_hxx <HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter.hxx> |
141 | #define IntCurve_TheLocateExtPCOfTheProjPCur HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter |
142 | #define IntCurve_TheLocateExtPCOfTheProjPCur_hxx <HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter.hxx> |
143 | #define IntCurve_TheCurveLocatorOfTheProjPCur HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter |
144 | #define IntCurve_TheCurveLocatorOfTheProjPCur_hxx <HLRBRep_TheCurveLocatorOfTheProjPCurOfCInter.hxx> |
145 | #define IntCurve_TheLocateExtPCOfTheProjPCur HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter |
146 | #define IntCurve_TheLocateExtPCOfTheProjPCur_hxx <HLRBRep_TheLocateExtPCOfTheProjPCurOfCInter.hxx> |
147 | #define IntCurve_TheIntConicCurve HLRBRep_TheIntConicCurveOfCInter |
148 | #define IntCurve_TheIntConicCurve_hxx <HLRBRep_TheIntConicCurveOfCInter.hxx> |
149 | #define IntCurve_TheIntersectorOfTheIntConicCurve HLRBRep_TheIntersectorOfTheIntConicCurveOfCInter |
150 | #define IntCurve_TheIntersectorOfTheIntConicCurve_hxx <HLRBRep_TheIntersectorOfTheIntConicCurveOfCInter.hxx> |
151 | #define IntCurve_TheIntersectorOfTheIntConicCurve HLRBRep_TheIntersectorOfTheIntConicCurveOfCInter |
152 | #define IntCurve_TheIntersectorOfTheIntConicCurve_hxx <HLRBRep_TheIntersectorOfTheIntConicCurveOfCInter.hxx> |
153 | #define IntCurve_IntConicCurve HLRBRep_IntConicCurveOfCInter |
154 | #define IntCurve_IntConicCurve_hxx <HLRBRep_IntConicCurveOfCInter.hxx> |
155 | #define IntCurve_TheIntPCurvePCurve HLRBRep_TheIntPCurvePCurveOfCInter |
156 | #define IntCurve_TheIntPCurvePCurve_hxx <HLRBRep_TheIntPCurvePCurveOfCInter.hxx> |
157 | #define IntCurve_ThePolygon2dOfTheIntPCurvePCurve HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter |
158 | #define IntCurve_ThePolygon2dOfTheIntPCurvePCurve_hxx <HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter.hxx> |
159 | #define IntCurve_TheDistBetweenPCurvesOfTheIntPCurvePCurve HLRBRep_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfCInter |
160 | #define IntCurve_TheDistBetweenPCurvesOfTheIntPCurvePCurve_hxx <HLRBRep_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfCInter.hxx> |
161 | #define IntCurve_ExactIntersectionPointOfTheIntPCurvePCurve HLRBRep_ExactIntersectionPointOfTheIntPCurvePCurveOfCInter |
162 | #define IntCurve_ExactIntersectionPointOfTheIntPCurvePCurve_hxx <HLRBRep_ExactIntersectionPointOfTheIntPCurvePCurveOfCInter.hxx> |
163 | #define IntCurve_ThePolygon2dOfTheIntPCurvePCurve HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter |
164 | #define IntCurve_ThePolygon2dOfTheIntPCurvePCurve_hxx <HLRBRep_ThePolygon2dOfTheIntPCurvePCurveOfCInter.hxx> |
165 | #define IntCurve_TheDistBetweenPCurvesOfTheIntPCurvePCurve HLRBRep_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfCInter |
166 | #define IntCurve_TheDistBetweenPCurvesOfTheIntPCurvePCurve_hxx <HLRBRep_TheDistBetweenPCurvesOfTheIntPCurvePCurveOfCInter.hxx> |
167 | #define IntCurve_ExactIntersectionPointOfTheIntPCurvePCurve HLRBRep_ExactIntersectionPointOfTheIntPCurvePCurveOfCInter |
168 | #define IntCurve_ExactIntersectionPointOfTheIntPCurvePCurve_hxx <HLRBRep_ExactIntersectionPointOfTheIntPCurvePCurveOfCInter.hxx> |
169 | #define IntCurve_IntCurveCurveGen HLRBRep_CInter |
170 | #define IntCurve_IntCurveCurveGen_hxx <HLRBRep_CInter.hxx> |
171 | |
172 | #include <IntCurve_IntCurveCurveGen.lxx> |
173 | |
174 | #undef TheCurve |
175 | #undef TheCurve_hxx |
176 | #undef TheCurveTool |
177 | #undef TheCurveTool_hxx |
178 | #undef IntCurve_TheProjPCur |
179 | #undef IntCurve_TheProjPCur_hxx |
180 | #undef IntCurve_TheCurveLocatorOfTheProjPCur |
181 | #undef IntCurve_TheCurveLocatorOfTheProjPCur_hxx |
182 | #undef IntCurve_TheLocateExtPCOfTheProjPCur |
183 | #undef IntCurve_TheLocateExtPCOfTheProjPCur_hxx |
184 | #undef IntCurve_TheCurveLocatorOfTheProjPCur |
185 | #undef IntCurve_TheCurveLocatorOfTheProjPCur_hxx |
186 | #undef IntCurve_TheLocateExtPCOfTheProjPCur |
187 | #undef IntCurve_TheLocateExtPCOfTheProjPCur_hxx |
188 | #undef IntCurve_TheIntConicCurve |
189 | #undef IntCurve_TheIntConicCurve_hxx |
190 | #undef IntCurve_TheIntersectorOfTheIntConicCurve |
191 | #undef IntCurve_TheIntersectorOfTheIntConicCurve_hxx |
192 | #undef IntCurve_TheIntersectorOfTheIntConicCurve |
193 | #undef IntCurve_TheIntersectorOfTheIntConicCurve_hxx |
194 | #undef IntCurve_IntConicCurve |
195 | #undef IntCurve_IntConicCurve_hxx |
196 | #undef IntCurve_TheIntPCurvePCurve |
197 | #undef IntCurve_TheIntPCurvePCurve_hxx |
198 | #undef IntCurve_ThePolygon2dOfTheIntPCurvePCurve |
199 | #undef IntCurve_ThePolygon2dOfTheIntPCurvePCurve_hxx |
200 | #undef IntCurve_TheDistBetweenPCurvesOfTheIntPCurvePCurve |
201 | #undef IntCurve_TheDistBetweenPCurvesOfTheIntPCurvePCurve_hxx |
202 | #undef IntCurve_ExactIntersectionPointOfTheIntPCurvePCurve |
203 | #undef IntCurve_ExactIntersectionPointOfTheIntPCurvePCurve_hxx |
204 | #undef IntCurve_ThePolygon2dOfTheIntPCurvePCurve |
205 | #undef IntCurve_ThePolygon2dOfTheIntPCurvePCurve_hxx |
206 | #undef IntCurve_TheDistBetweenPCurvesOfTheIntPCurvePCurve |
207 | #undef IntCurve_TheDistBetweenPCurvesOfTheIntPCurvePCurve_hxx |
208 | #undef IntCurve_ExactIntersectionPointOfTheIntPCurvePCurve |
209 | #undef IntCurve_ExactIntersectionPointOfTheIntPCurvePCurve_hxx |
210 | #undef IntCurve_IntCurveCurveGen |
211 | #undef IntCurve_IntCurveCurveGen_hxx |
212 | |
213 | |
214 | |
215 | |
216 | #endif // _HLRBRep_CInter_HeaderFile |