1 // Created on: 1995-01-27
2 // Created by: Jacques GOUSSARD
3 // Copyright (c) 1995-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #include <IntPatch_Point.hxx>
18 #include <Geom_Surface.hxx>
21 //=======================================================================
22 //function : GeomInt_IntSS
24 //=======================================================================
25 inline GeomInt_IntSS::GeomInt_IntSS ()
33 //=======================================================================
34 //function : GeomInt_IntSS
36 //=======================================================================
37 inline GeomInt_IntSS::GeomInt_IntSS (const Handle(Geom_Surface)& S1,
38 const Handle(Geom_Surface)& S2,
39 const Standard_Real Tol,
40 const Standard_Boolean Approx,
41 const Standard_Boolean ApproxS1,
42 const Standard_Boolean ApproxS2)
49 Perform(S1,S2,Tol,Approx,ApproxS1,ApproxS2);
52 //=======================================================================
54 //purpose : Intersection of Adapted surfaces
55 //=======================================================================
56 inline void GeomInt_IntSS::Perform(const Handle(GeomAdaptor_HSurface)& HS1,
57 const Handle(GeomAdaptor_HSurface)& HS2,
58 const Standard_Real Tol,
59 const Standard_Boolean Approx,
60 const Standard_Boolean ApproxS1,
61 const Standard_Boolean ApproxS2)
65 InternalPerform(Tol,Approx,ApproxS1,ApproxS2,Standard_False,0.,0.,0.,0.);
68 //=======================================================================
70 //purpose : Intersection of Adapted surfaces with a Starting Point
71 //=======================================================================
72 inline void GeomInt_IntSS::Perform(const Handle(GeomAdaptor_HSurface)& HS1,
73 const Handle(GeomAdaptor_HSurface)& HS2,
74 const Standard_Real Tol,
75 const Standard_Real U1, const Standard_Real V1,
76 const Standard_Real U2, const Standard_Real V2,
77 const Standard_Boolean Approx,
78 const Standard_Boolean ApproxS1,
79 const Standard_Boolean ApproxS2)
83 InternalPerform(Tol,Approx,ApproxS1,ApproxS2,Standard_True,U1,V1,U2,V2);
86 //=======================================================================
89 //=======================================================================
90 inline Standard_Boolean GeomInt_IntSS::IsDone () const
92 return myIntersector.IsDone();
95 //=======================================================================
96 //function : TolReached2d
98 //=======================================================================
99 inline Standard_Real GeomInt_IntSS::TolReached2d () const
101 return myTolReached2d;
104 //=======================================================================
105 //function : TolReached3d
107 //=======================================================================
108 inline Standard_Real GeomInt_IntSS::TolReached3d () const
110 return myTolReached3d;
113 //=======================================================================
116 //=======================================================================
117 inline Standard_Integer GeomInt_IntSS::NbLines () const
119 return sline.Length()-myNbrestr;
122 //=======================================================================
123 //function : NbBoundaries
125 //=======================================================================
126 inline Standard_Integer GeomInt_IntSS::NbBoundaries () const
128 StdFail_NotDone_Raise_if (!myIntersector.IsDone(), "GeomInt_IntSS::NbBoundaries() - no result");
132 //=======================================================================
133 //function : NbPoints
135 //=======================================================================
136 inline Standard_Integer GeomInt_IntSS::NbPoints () const
138 return myIntersector.NbPnts();
141 //=======================================================================
144 //=======================================================================
145 inline gp_Pnt GeomInt_IntSS::Point (const Standard_Integer Index) const
147 return myIntersector.Point(Index).Value();