0028643: Coding rules - eliminate GCC compiler warnings -Wmisleading-indentation
[occt.git] / src / IntPatch / IntPatch_ImpImpIntersection.hxx
CommitLineData
42cf5bc1 1// Created on: 1992-05-07
2// Created by: Jacques GOUSSARD
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 _IntPatch_ImpImpIntersection_HeaderFile
18#define _IntPatch_ImpImpIntersection_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <Standard_Boolean.hxx>
25#include <IntPatch_SequenceOfPoint.hxx>
26#include <IntPatch_SequenceOfLine.hxx>
27#include <IntPatch_TheSOnBounds.hxx>
28#include <Standard_Real.hxx>
29#include <Standard_Integer.hxx>
30class StdFail_NotDone;
31class Standard_OutOfRange;
32class Standard_DomainError;
33class Standard_ConstructionError;
34class Adaptor3d_HSurface;
35class Adaptor3d_TopolTool;
36class IntPatch_Point;
37class IntPatch_Line;
38
39
40//! Implementation of the intersection between two
41//! quadric patches : Plane, Cone, Cylinder or Sphere.
42class IntPatch_ImpImpIntersection
43{
44public:
45
46 DEFINE_STANDARD_ALLOC
47
e146ef9a 48 enum IntStatus
49 {
50 //! OK. Good intersection result.
51 IntStatus_OK,
52
53 //! Intersection curve is too long (e.g. as in the bug #26894).
54 //! We cannot provide precise computation of value and
55 //! derivatives of this curve having used floating-point model
56 //! determined by IEEE 754 standard. As result, OCCT algorithms
57 //! cannot work with that curve correctly.
58 IntStatus_InfiniteSectionCurve,
59
60 //! Algorithm cannot finish correctly.
61 IntStatus_Fail
62 };
63
42cf5bc1 64 Standard_EXPORT IntPatch_ImpImpIntersection();
65
e146ef9a 66 //! Flag theIsReqToKeepRLine has been entered only for
42cf5bc1 67 //! compatibility with TopOpeBRep package. It shall be deleted
68 //! after deleting TopOpeBRep.
69 //! When intersection result returns IntPatch_RLine and another
70 //! IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE)
71 //! will always keep both lines even if they are coincided.
72 Standard_EXPORT IntPatch_ImpImpIntersection(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, const Standard_Boolean theIsReqToKeepRLine = Standard_False);
73
e146ef9a 74 //! Flag theIsReqToKeepRLine has been entered only for
42cf5bc1 75 //! compatibility with TopOpeBRep package. It shall be deleted
76 //! after deleting TopOpeBRep.
77 //! When intersection result returns IntPatch_RLine and another
78 //! IntPatch_Line (not restriction) we (in case of theIsReqToKeepRLine==TRUE)
79 //! will always keep both lines even if they are coincided.
d30895f5 80 Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& S1,
81 const Handle(Adaptor3d_TopolTool)& D1,
82 const Handle(Adaptor3d_HSurface)& S2,
83 const Handle(Adaptor3d_TopolTool)& D2,
84 const Standard_Real TolArc,
85 const Standard_Real TolTang,
86 const Standard_Boolean theIsReqToKeepRLine =
87 Standard_False);
42cf5bc1 88
e146ef9a 89 //! Returns True if the calculus was successful.
90 Standard_Boolean IsDone() const;
91
92 //! Returns status
93 IntStatus GetStatus() const;
42cf5bc1 94
95 //! Returns true if the is no intersection.
96 Standard_Boolean IsEmpty() const;
97
98 //! Returns True if the two patches are considered as
d30895f5 99 //! entirely tangent, i.e every restriction arc of one
100 //! patch is inside the geometric base of the other patch.
42cf5bc1 101 Standard_Boolean TangentFaces() const;
102
103 //! Returns True when the TangentFaces returns True and the
104 //! normal vectors evaluated at a point on the first and the
105 //! second surface are opposite.
106 //! The exception DomainError is raised if TangentFaces
107 //! returns False.
108 Standard_Boolean OppositeFaces() const;
109
110 //! Returns the number of "single" points.
111 Standard_Integer NbPnts() const;
112
113 //! Returns the point of range Index.
114 //! An exception is raised if Index<=0 or Index>NbPnt.
115 const IntPatch_Point& Point (const Standard_Integer Index) const;
116
117 //! Returns the number of intersection lines.
118 Standard_Integer NbLines() const;
119
120 //! Returns the line of range Index.
121 //! An exception is raised if Index<=0 or Index>NbLine.
122 const Handle(IntPatch_Line)& Line (const Standard_Integer Index) const;
123
124
125
126
127protected:
128
129
130
131
132
133private:
134
135
136
e146ef9a 137 IntStatus myDone;
42cf5bc1 138 Standard_Boolean empt;
139 Standard_Boolean tgte;
140 Standard_Boolean oppo;
141 IntPatch_SequenceOfPoint spnt;
142 IntPatch_SequenceOfLine slin;
143 IntPatch_TheSOnBounds solrst;
144
145
146};
147
148
149#include <IntPatch_ImpImpIntersection.lxx>
150
151
152
153
154
155#endif // _IntPatch_ImpImpIntersection_HeaderFile