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_InterCSurf_HeaderFile |
18 | #define _HLRBRep_InterCSurf_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <IntCurveSurface_Intersection.hxx> |
25 | #include <Standard_Address.hxx> |
26 | #include <Standard_Real.hxx> |
27 | #include <TColgp_Array2OfPnt.hxx> |
28 | #include <TColStd_Array1OfReal.hxx> |
29 | class gp_Lin; |
30 | class HLRBRep_LineTool; |
31 | class HLRBRep_SurfaceTool; |
32 | class HLRBRep_ThePolygonOfInterCSurf; |
33 | class HLRBRep_ThePolygonToolOfInterCSurf; |
34 | class HLRBRep_ThePolyhedronOfInterCSurf; |
35 | class HLRBRep_ThePolyhedronToolOfInterCSurf; |
36 | class HLRBRep_TheInterferenceOfInterCSurf; |
37 | class HLRBRep_TheCSFunctionOfInterCSurf; |
38 | class HLRBRep_TheExactInterCSurf; |
39 | class HLRBRep_TheQuadCurvExactInterCSurf; |
40 | class HLRBRep_TheQuadCurvFuncOfTheQuadCurvExactInterCSurf; |
41 | class Bnd_BoundSortBox; |
42 | class gp_Circ; |
43 | class gp_Elips; |
44 | class gp_Parab; |
45 | class gp_Hypr; |
46 | class IntAna_IntConicQuad; |
47 | class Bnd_Box; |
48 | |
49 | |
50 | |
51 | class HLRBRep_InterCSurf : public IntCurveSurface_Intersection |
52 | { |
53 | public: |
54 | |
55 | DEFINE_STANDARD_ALLOC |
56 | |
57 | |
36b9ff75 |
58 | //! Empty Constructor |
42cf5bc1 |
59 | Standard_EXPORT HLRBRep_InterCSurf(); |
60 | |
36b9ff75 |
61 | //! Compute the Intersection between the curve and the |
62 | //! surface |
42cf5bc1 |
63 | Standard_EXPORT void Perform (const gp_Lin& Curve, const Standard_Address& Surface); |
64 | |
36b9ff75 |
65 | //! Compute the Intersection between the curve and |
66 | //! the surface. The Curve is already sampled and |
67 | //! its polygon : <Polygon> is given. |
42cf5bc1 |
68 | Standard_EXPORT void Perform (const gp_Lin& Curve, const HLRBRep_ThePolygonOfInterCSurf& Polygon, const Standard_Address& Surface); |
69 | |
36b9ff75 |
70 | //! Compute the Intersection between the curve and |
71 | //! the surface. The Curve is already sampled and |
72 | //! its polygon : <Polygon> is given. The Surface is |
73 | //! also sampled and <Polyhedron> is given. |
42cf5bc1 |
74 | Standard_EXPORT void Perform (const gp_Lin& Curve, const HLRBRep_ThePolygonOfInterCSurf& ThePolygon, const Standard_Address& Surface, const HLRBRep_ThePolyhedronOfInterCSurf& Polyhedron); |
75 | |
36b9ff75 |
76 | //! Compute the Intersection between the curve and |
77 | //! the surface. The Curve is already sampled and |
78 | //! its polygon : <Polygon> is given. The Surface is |
79 | //! also sampled and <Polyhedron> is given. |
42cf5bc1 |
80 | Standard_EXPORT void Perform (const gp_Lin& Curve, const HLRBRep_ThePolygonOfInterCSurf& ThePolygon, const Standard_Address& Surface, const HLRBRep_ThePolyhedronOfInterCSurf& Polyhedron, Bnd_BoundSortBox& BndBSB); |
81 | |
36b9ff75 |
82 | //! Compute the Intersection between the curve and |
83 | //! the surface. The Surface is already sampled and |
84 | //! its polyhedron : <Polyhedron> is given. |
42cf5bc1 |
85 | Standard_EXPORT void Perform (const gp_Lin& Curve, const Standard_Address& Surface, const HLRBRep_ThePolyhedronOfInterCSurf& Polyhedron); |
86 | |
87 | |
88 | |
89 | |
90 | protected: |
91 | |
92 | |
36b9ff75 |
93 | //! Compute the Intersection between the curve and the |
94 | //! surface |
42cf5bc1 |
95 | Standard_EXPORT void Perform (const gp_Lin& Curve, const Standard_Address& Surface, const Standard_Real U0, const Standard_Real V0, const Standard_Real U1, const Standard_Real V1); |
96 | |
97 | Standard_EXPORT void InternalPerformCurveQuadric (const gp_Lin& Curve, const Standard_Address& Surface); |
98 | |
99 | Standard_EXPORT void InternalPerform (const gp_Lin& Curve, const HLRBRep_ThePolygonOfInterCSurf& Polygon, const Standard_Address& Surface, const HLRBRep_ThePolyhedronOfInterCSurf& Polyhedron, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2); |
100 | |
101 | Standard_EXPORT void InternalPerform (const gp_Lin& Curve, const HLRBRep_ThePolygonOfInterCSurf& Polygon, const Standard_Address& Surface, const HLRBRep_ThePolyhedronOfInterCSurf& Polyhedron, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, Bnd_BoundSortBox& BSB); |
102 | |
103 | Standard_EXPORT void InternalPerform (const gp_Lin& Curve, const HLRBRep_ThePolygonOfInterCSurf& Polygon, const Standard_Address& Surface, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2); |
104 | |
105 | Standard_EXPORT void PerformConicSurf (const gp_Lin& Line, const gp_Lin& Curve, const Standard_Address& Surface, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2); |
106 | |
107 | Standard_EXPORT void PerformConicSurf (const gp_Circ& Circle, const gp_Lin& Curve, const Standard_Address& Surface, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2); |
108 | |
109 | Standard_EXPORT void PerformConicSurf (const gp_Elips& Ellipse, const gp_Lin& Curve, const Standard_Address& Surface, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2); |
110 | |
111 | Standard_EXPORT void PerformConicSurf (const gp_Parab& Parab, const gp_Lin& Curve, const Standard_Address& Surface, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2); |
112 | |
113 | Standard_EXPORT void PerformConicSurf (const gp_Hypr& Hyper, const gp_Lin& Curve, const Standard_Address& Surface, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2); |
114 | |
115 | Standard_EXPORT void AppendIntAna (const gp_Lin& Curve, const Standard_Address& Surface, const IntAna_IntConicQuad& InterAna); |
116 | |
117 | Standard_EXPORT void AppendPoint (const gp_Lin& Curve, const Standard_Real w, const Standard_Address& Surface, const Standard_Real u, const Standard_Real v); |
118 | |
119 | Standard_EXPORT void AppendSegment (const gp_Lin& Curve, const Standard_Real u0, const Standard_Real u1, const Standard_Address& Surface); |
120 | |
121 | |
122 | |
123 | |
124 | private: |
125 | |
126 | |
127 | Standard_EXPORT void DoSurface (const Standard_Address& surface, const Standard_Real u0, const Standard_Real u1, const Standard_Real v0, const Standard_Real v1, TColgp_Array2OfPnt& pntsOnSurface, Bnd_Box& boxSurface, Standard_Real& gap); |
128 | |
129 | Standard_EXPORT void DoNewBounds (const Standard_Address& surface, const Standard_Real u0, const Standard_Real u1, const Standard_Real v0, const Standard_Real v1, const TColgp_Array2OfPnt& pntsOnSurface, const TColStd_Array1OfReal& X, const TColStd_Array1OfReal& Y, const TColStd_Array1OfReal& Z, TColStd_Array1OfReal& Bounds); |
130 | |
131 | |
132 | |
133 | |
134 | }; |
135 | |
136 | |
137 | |
138 | |
139 | |
140 | |
141 | |
142 | #endif // _HLRBRep_InterCSurf_HeaderFile |