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
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 #ifndef _IntPatch_ImpPrmIntersection_HeaderFile
18 #define _IntPatch_ImpPrmIntersection_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <Standard_Boolean.hxx>
25 #include <IntPatch_SequenceOfPoint.hxx>
26 #include <IntPatch_SequenceOfLine.hxx>
27 #include <IntPatch_TheSOnBounds.hxx>
28 #include <IntPatch_TheSearchInside.hxx>
29 #include <Standard_Real.hxx>
30 #include <Standard_Integer.hxx>
31 class StdFail_NotDone;
32 class Standard_OutOfRange;
33 class Standard_DomainError;
34 class Standard_ConstructionError;
35 class Adaptor3d_HSurface;
36 class Adaptor3d_TopolTool;
41 //! Implementation of the intersection between a natural
42 //! quadric patch : Plane, Cone, Cylinder or Sphere and
43 //! a bi-parametrised surface.
44 class IntPatch_ImpPrmIntersection
51 Standard_EXPORT IntPatch_ImpPrmIntersection();
53 Standard_EXPORT IntPatch_ImpPrmIntersection(const Handle(Adaptor3d_HSurface)& Surf1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& Surf2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, const Standard_Real Fleche, const Standard_Real Pas);
55 //! to search for solution from the given point
56 Standard_EXPORT void SetStartPoint (const Standard_Real U, const Standard_Real V);
58 Standard_EXPORT void Perform (const Handle(Adaptor3d_HSurface)& Surf1, const Handle(Adaptor3d_TopolTool)& D1, const Handle(Adaptor3d_HSurface)& Surf2, const Handle(Adaptor3d_TopolTool)& D2, const Standard_Real TolArc, const Standard_Real TolTang, const Standard_Real Fleche, const Standard_Real Pas);
60 //! Returns true if the calculus was succesfull.
61 Standard_Boolean IsDone() const;
63 //! Returns true if the is no intersection.
64 Standard_Boolean IsEmpty() const;
66 //! Returns the number of "single" points.
67 Standard_Integer NbPnts() const;
69 //! Returns the point of range Index.
70 //! An exception is raised if Index<=0 or Index>NbPnt.
71 const IntPatch_Point& Point (const Standard_Integer Index) const;
73 //! Returns the number of intersection lines.
74 Standard_Integer NbLines() const;
76 //! Returns the line of range Index.
77 //! An exception is raised if Index<=0 or Index>NbLine.
78 const Handle(IntPatch_Line)& Line (const Standard_Integer Index) const;
93 Standard_Boolean done;
94 Standard_Boolean empt;
95 IntPatch_SequenceOfPoint spnt;
96 IntPatch_SequenceOfLine slin;
97 IntPatch_TheSOnBounds solrst;
98 IntPatch_TheSearchInside solins;
99 Standard_Boolean myIsStartPnt;
100 Standard_Real myUStart;
101 Standard_Real myVStart;
107 #include <IntPatch_ImpPrmIntersection.lxx>
113 #endif // _IntPatch_ImpPrmIntersection_HeaderFile