Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-29 10:54:08

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_Point.hxx>
0022 #include <NCollection_Sequence.hxx>
0023 #include <IntPatch_Line.hxx>
0024 #include <IntPatch_TheSOnBounds.hxx>
0025 #include <IntPatch_TheSearchInside.hxx>
0026 
0027 class Adaptor3d_TopolTool;
0028 
0029 //! Implementation of the intersection between a natural
0030 //! quadric patch : Plane, Cone, Cylinder or Sphere and
0031 //! a bi-parametrised surface.
0032 class IntPatch_ImpPrmIntersection
0033 {
0034 public:
0035   DEFINE_STANDARD_ALLOC
0036 
0037   Standard_EXPORT IntPatch_ImpPrmIntersection();
0038 
0039   Standard_EXPORT IntPatch_ImpPrmIntersection(const occ::handle<Adaptor3d_Surface>&   Surf1,
0040                                               const occ::handle<Adaptor3d_TopolTool>& D1,
0041                                               const occ::handle<Adaptor3d_Surface>&   Surf2,
0042                                               const occ::handle<Adaptor3d_TopolTool>& D2,
0043                                               const double                            TolArc,
0044                                               const double                            TolTang,
0045                                               const double                            Fleche,
0046                                               const double                            Pas);
0047 
0048   //! to search for solution from the given point
0049   Standard_EXPORT void SetStartPoint(const double U, const double V);
0050 
0051   Standard_EXPORT void Perform(const occ::handle<Adaptor3d_Surface>&   Surf1,
0052                                const occ::handle<Adaptor3d_TopolTool>& D1,
0053                                const occ::handle<Adaptor3d_Surface>&   Surf2,
0054                                const occ::handle<Adaptor3d_TopolTool>& D2,
0055                                const double                            TolArc,
0056                                const double                            TolTang,
0057                                const double                            Fleche,
0058                                const double                            Pas);
0059 
0060   //! Returns true if the calculus was successful.
0061   bool IsDone() const;
0062 
0063   //! Returns true if the is no intersection.
0064   bool IsEmpty() const;
0065 
0066   //! Returns the number of "single" points.
0067   int NbPnts() const;
0068 
0069   //! Returns the point of range Index.
0070   //! An exception is raised if Index<=0 or Index>NbPnt.
0071   const IntPatch_Point& Point(const int Index) const;
0072 
0073   //! Returns the number of intersection lines.
0074   int NbLines() const;
0075 
0076   //! Returns the line of range Index.
0077   //! An exception is raised if Index<=0 or Index>NbLine.
0078   const occ::handle<IntPatch_Line>& Line(const int Index) const;
0079 
0080 private:
0081   bool                                             done;
0082   bool                                             empt;
0083   NCollection_Sequence<IntPatch_Point>             spnt;
0084   NCollection_Sequence<occ::handle<IntPatch_Line>> slin;
0085   IntPatch_TheSOnBounds                            solrst;
0086   IntPatch_TheSearchInside                         solins;
0087   bool                                             myIsStartPnt;
0088   double                                           myUStart;
0089   double                                           myVStart;
0090 };
0091 
0092 #include <IntPatch_ImpPrmIntersection.lxx>
0093 
0094 #endif // _IntPatch_ImpPrmIntersection_HeaderFile