0031939: Coding - correction of spelling errors in comments [part 4]
[occt.git] / src / IntPatch / IntPatch_Intersection.hxx
CommitLineData
42cf5bc1 1// Created on: 1993-01-21
2// Created by: Jacques GOUSSARD
3// Copyright (c) 1993-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 _IntPatch_Intersection_HeaderFile
18#define _IntPatch_Intersection_HeaderFile
19
c22b52d6 20#include <Adaptor3d_Surface.hxx>
42cf5bc1 21#include <IntPatch_SequenceOfPoint.hxx>
22#include <IntPatch_SequenceOfLine.hxx>
42cf5bc1 23#include <IntSurf_ListOfPntOn2S.hxx>
24#include <GeomAbs_SurfaceType.hxx>
c22b52d6 25
42cf5bc1 26class Adaptor3d_TopolTool;
42cf5bc1 27
28
29//! This class provides a generic algorithm to intersect
30//! 2 surfaces.
31class IntPatch_Intersection
32{
33public:
34
35 DEFINE_STANDARD_ALLOC
36
37
38 Standard_EXPORT IntPatch_Intersection();
39
c22b52d6 40 Standard_EXPORT IntPatch_Intersection(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang);
42cf5bc1 41
c22b52d6 42 Standard_EXPORT IntPatch_Intersection(const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Standard_Real TolArc, const Standard_Real TolTang);
42cf5bc1 43
44 //! Set the tolerances used by the algorithms:
45 //! --- Implicit - Parametric
46 //! --- Parametric - Parametric
47 //! --- Implicit - Implicit
48 //!
49 //! TolArc is used to compute the intersections
50 //! between the restrictions of a surface and a
51 //! walking line.
52 //!
53 //! TolTang is used to compute the points on a walking
54 //! line, and in geometric algorithms.
55 //!
56 //! Fleche is a parameter used in the walking
57 //! algorithms to provide small curvatures on a line.
58 //!
59 //! UVMaxStep is a parameter used in the walking
60 //! algorithms to compute the distance between to
7797eb38 61 //! points in their respective parametric spaces.
42cf5bc1 62 Standard_EXPORT void SetTolerances (const Standard_Real TolArc, const Standard_Real TolTang, const Standard_Real UVMaxStep, const Standard_Real Fleche);
63
7797eb38 64 //! Flag theIsReqToKeepRLine has been entered only for
42cf5bc1 65 //! compatibility with TopOpeBRep package. It shall be deleted
66 //! after deleting TopOpeBRep.
67 //! When intersection result returns IntPatch_RLine and another
68 //! IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE)
69 //! will always keep both lines even if they are coincided.
7797eb38 70 //! Flag theIsReqToPostWLProc has been entered only for
4e14c88f 71 //! compatibility with TopOpeBRep package. It shall be deleted
72 //! after deleting TopOpeBRep.
73 //! If theIsReqToPostWLProc == FALSE, then we will work with Walking-line
0177fe26 74 //! obtained after intersection algorithm directly (without any post-processing).
c22b52d6 75 Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, const Standard_Boolean isGeomInt = Standard_True, const Standard_Boolean theIsReqToKeepRLine = Standard_False, const Standard_Boolean theIsReqToPostWLProc = Standard_True);
42cf5bc1 76
77 //! If isGeomInt == Standard_False, then method
78 //! Param-Param intersection will be used.
7797eb38 79 //! Flag theIsReqToKeepRLine has been entered only for
4e14c88f 80 //! compatibility with TopOpeBRep package. It shall be deleted
81 //! after deleting TopOpeBRep.
82 //! When intersection result returns IntPatch_RLine and another
83 //! IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE)
84 //! will always keep both lines even if they are coincided.
7797eb38 85 //! Flag theIsReqToPostWLProc has been entered only for
4e14c88f 86 //! compatibility with TopOpeBRep package. It shall be deleted
87 //! after deleting TopOpeBRep.
88 //! If theIsReqToPostWLProc == FALSE, then we will work with Walking-line
7797eb38 89 //! obtained after intersection algorithm directly (without any post-processing).
c22b52d6 90 Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, IntSurf_ListOfPntOn2S& LOfPnts, const Standard_Boolean isGeomInt = Standard_True, const Standard_Boolean theIsReqToKeepRLine = Standard_False, const Standard_Boolean theIsReqToPostWLProc = Standard_True);
42cf5bc1 91
4e14c88f 92 //! Perform with start point
c22b52d6 93 Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real U1, const Standard_Real V1, const Standard_Real U2, const Standard_Real V2, const Standard_Real TolArc, const Standard_Real TolTang);
42cf5bc1 94
4e14c88f 95 //! Uses for finding self-intersected surfaces.
c22b52d6 96 Standard_EXPORT void Perform (const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Standard_Real TolArc, const Standard_Real TolTang);
42cf5bc1 97
7797eb38 98 //! Returns True if the calculus was successful.
42cf5bc1 99 Standard_Boolean IsDone() const;
100
101 //! Returns true if the is no intersection.
102 Standard_Boolean IsEmpty() const;
103
104 //! Returns True if the two patches are considered as
7797eb38 105 //! entirely tangent, i-e every restriction arc of one
42cf5bc1 106 //! patch is inside the geometric base of the other patch.
107 Standard_Boolean TangentFaces() const;
108
109 //! Returns True when the TangentFaces returns True and the
110 //! normal vectors evaluated at a point on the first and the
111 //! second surface are opposite.
112 //! The exception DomainError is raised if TangentFaces
113 //! returns False.
114 Standard_Boolean OppositeFaces() const;
115
116 //! Returns the number of "single" points.
117 Standard_Integer NbPnts() const;
118
119 //! Returns the point of range Index.
120 //! An exception is raised if Index<=0 or Index>NbPnt.
121 const IntPatch_Point& Point (const Standard_Integer Index) const;
122
123 //! Returns the number of intersection lines.
124 Standard_Integer NbLines() const;
125
126 //! Returns the line of range Index.
127 //! An exception is raised if Index<=0 or Index>NbLine.
128 const Handle(IntPatch_Line)& Line (const Standard_Integer Index) const;
129
130 Standard_EXPORT const IntPatch_SequenceOfLine& SequenceOfLine() const;
131
132 //! Dump of each result line.
133 //! Mode for more accurate dumps.
c22b52d6 134 Standard_EXPORT void Dump (const Standard_Integer Mode, const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& D2) const;
42cf5bc1 135
136
137
138
139protected:
140
141
142
143
144
145private:
146
147
c22b52d6 148 Standard_EXPORT void ParamParamPerfom (const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, IntSurf_ListOfPntOn2S& LOfPnts, const GeomAbs_SurfaceType typs1, const GeomAbs_SurfaceType typs2);
42cf5bc1 149
7797eb38 150 //! Flag theIsReqToKeepRLine has been entered only for
42cf5bc1 151 //! compatibility with TopOpeBRep package. It shall be deleted
152 //! after deleting TopOpeBRep.
153 //! When intersection result returns IntPatch_RLine and another
154 //! IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE)
155 //! will always keep both lines even if they are coincided.
c22b52d6 156 Standard_EXPORT void GeomGeomPerfom (const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, IntSurf_ListOfPntOn2S& LOfPnts, const GeomAbs_SurfaceType typs1, const GeomAbs_SurfaceType typs2, const Standard_Boolean theIsReqToKeepRLine);
42cf5bc1 157
c22b52d6 158 Standard_EXPORT void GeomParamPerfom (const Handle(Adaptor3d_Surface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_Surface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Boolean isNotAnalitical, const GeomAbs_SurfaceType typs1, const GeomAbs_SurfaceType typs2);
42cf5bc1 159
160
161 Standard_Boolean done;
162 Standard_Boolean empt;
163 Standard_Boolean tgte;
164 Standard_Boolean oppo;
165 IntPatch_SequenceOfPoint spnt;
166 IntPatch_SequenceOfLine slin;
167 Standard_Real myTolArc;
168 Standard_Real myTolTang;
169 Standard_Real myUVMaxStep;
170 Standard_Real myFleche;
171 Standard_Boolean myIsStartPnt;
172 Standard_Real myU1Start;
173 Standard_Real myV1Start;
174 Standard_Real myU2Start;
175 Standard_Real myV2Start;
176
177
178};
179
180
181#include <IntPatch_Intersection.lxx>
182
183
184
185
186
187#endif // _IntPatch_Intersection_HeaderFile