Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-02 08:50:16

0001 // Created on: 1992-05-07
0002 // Created by: Jacques GOUSSARD
0003 // Copyright (c) 1992-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _IntPatch_ImpPrmIntersection_HeaderFile
0018 #define _IntPatch_ImpPrmIntersection_HeaderFile
0019 
0020 #include <Adaptor3d_Surface.hxx>
0021 #include <IntPatch_SequenceOfPoint.hxx>
0022 #include <IntPatch_SequenceOfLine.hxx>
0023 #include <IntPatch_TheSOnBounds.hxx>
0024 #include <IntPatch_TheSearchInside.hxx>
0025 
0026 class Adaptor3d_TopolTool;
0027 
0028 //! Implementation of the intersection between a natural
0029 //! quadric patch : Plane, Cone, Cylinder or Sphere and
0030 //! a bi-parametrised surface.
0031 class IntPatch_ImpPrmIntersection
0032 {
0033 public:
0034   DEFINE_STANDARD_ALLOC
0035 
0036   Standard_EXPORT IntPatch_ImpPrmIntersection();
0037 
0038   Standard_EXPORT IntPatch_ImpPrmIntersection(const Handle(Adaptor3d_Surface)&   Surf1,
0039                                               const Handle(Adaptor3d_TopolTool)& D1,
0040                                               const Handle(Adaptor3d_Surface)&   Surf2,
0041                                               const Handle(Adaptor3d_TopolTool)& D2,
0042                                               const Standard_Real                TolArc,
0043                                               const Standard_Real                TolTang,
0044                                               const Standard_Real                Fleche,
0045                                               const Standard_Real                Pas);
0046 
0047   //! to search for solution from the given point
0048   Standard_EXPORT void SetStartPoint(const Standard_Real U, const Standard_Real V);
0049 
0050   Standard_EXPORT void Perform(const Handle(Adaptor3d_Surface)&   Surf1,
0051                                const Handle(Adaptor3d_TopolTool)& D1,
0052                                const Handle(Adaptor3d_Surface)&   Surf2,
0053                                const Handle(Adaptor3d_TopolTool)& D2,
0054                                const Standard_Real                TolArc,
0055                                const Standard_Real                TolTang,
0056                                const Standard_Real                Fleche,
0057                                const Standard_Real                Pas);
0058 
0059   //! Returns true if the calculus was successful.
0060   Standard_Boolean IsDone() const;
0061 
0062   //! Returns true if the is no intersection.
0063   Standard_Boolean IsEmpty() const;
0064 
0065   //! Returns the number of "single" points.
0066   Standard_Integer NbPnts() const;
0067 
0068   //! Returns the point of range Index.
0069   //! An exception is raised if Index<=0 or Index>NbPnt.
0070   const IntPatch_Point& Point(const Standard_Integer Index) const;
0071 
0072   //! Returns the number of intersection lines.
0073   Standard_Integer NbLines() const;
0074 
0075   //! Returns the line of range Index.
0076   //! An exception is raised if Index<=0 or Index>NbLine.
0077   const Handle(IntPatch_Line)& Line(const Standard_Integer Index) const;
0078 
0079 protected:
0080 private:
0081   Standard_Boolean         done;
0082   Standard_Boolean         empt;
0083   IntPatch_SequenceOfPoint spnt;
0084   IntPatch_SequenceOfLine  slin;
0085   IntPatch_TheSOnBounds    solrst;
0086   IntPatch_TheSearchInside solins;
0087   Standard_Boolean         myIsStartPnt;
0088   Standard_Real            myUStart;
0089   Standard_Real            myVStart;
0090 };
0091 
0092 #include <IntPatch_ImpPrmIntersection.lxx>
0093 
0094 #endif // _IntPatch_ImpPrmIntersection_HeaderFile