Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-29 09:19:41

0001 // Created on: 2015-02-18
0002 // Created by: Nikolai BUKHALOV
0003 // Copyright (c) 1992-1999 Matra Datavision
0004 // Copyright (c) 1999-2015 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_PointLine_HeaderFile
0018 #define _IntPatch_PointLine_HeaderFile
0019 
0020 #include <Adaptor3d_Surface.hxx>
0021 #include <IntPatch_Line.hxx>
0022 
0023 class gp_Pnt;
0024 class gp_Pnt2d;
0025 class IntSurf_PntOn2S;
0026 class IntSurf_LineOn2S;
0027 class IntPatch_Point;
0028 
0029 //! Definition of an intersection line between two
0030 //! surfaces.
0031 //! A line defined by a set of points
0032 //! (e.g. coming from a walking algorithm) as
0033 //! defined in the class WLine or RLine (Restriction line).
0034 class IntPatch_PointLine : public IntPatch_Line
0035 {
0036 public:
0037   //! Adds a vertex in the list. If theIsPrepend == TRUE the new
0038   //! vertex will be added before the first element of vertices sequence.
0039   //! Otherwise, to the end of the sequence
0040   Standard_EXPORT virtual void AddVertex(const IntPatch_Point& Pnt,
0041                                          const bool            theIsPrepend = false) = 0;
0042 
0043   //! Returns the number of intersection points.
0044   Standard_EXPORT virtual int NbPnts() const = 0;
0045 
0046   //! Returns number of vertices (IntPatch_Point) of the line
0047   Standard_EXPORT virtual int NbVertex() const = 0;
0048 
0049   //! Returns the intersection point of range Index.
0050   Standard_EXPORT virtual const IntSurf_PntOn2S& Point(const int Index) const = 0;
0051 
0052   //! Returns the vertex of range Index on the line.
0053   Standard_EXPORT virtual const IntPatch_Point& Vertex(const int Index) const = 0;
0054 
0055   //! Returns the vertex of range Index on the line.
0056   virtual IntPatch_Point& ChangeVertex(const int Index) = 0;
0057 
0058   //! Removes vertices from the line
0059   Standard_EXPORT virtual void ClearVertexes() = 0;
0060 
0061   //! Removes single vertex from the line
0062   Standard_EXPORT virtual void RemoveVertex(const int theIndex) = 0;
0063 
0064   //! Returns set of intersection points
0065   Standard_EXPORT virtual occ::handle<IntSurf_LineOn2S> Curve() const = 0;
0066 
0067   //! Returns TRUE if P1 is out of the box built from
0068   //! the points on 1st surface
0069   Standard_EXPORT virtual bool IsOutSurf1Box(const gp_Pnt2d& P1) const = 0;
0070 
0071   //! Returns TRUE if P2 is out of the box built from
0072   //! the points on 2nd surface
0073   Standard_EXPORT virtual bool IsOutSurf2Box(const gp_Pnt2d& P2) const = 0;
0074 
0075   //! Returns TRUE if P is out of the box built from 3D-points.
0076   Standard_EXPORT virtual bool IsOutBox(const gp_Pnt& P) const = 0;
0077 
0078   //! Returns the radius of curvature of
0079   //! the intersection line in given point.
0080   //! Returns negative value if computation is not possible.
0081   Standard_EXPORT static double CurvatureRadiusOfIntersLine(
0082     const occ::handle<Adaptor3d_Surface>& theS1,
0083     const occ::handle<Adaptor3d_Surface>& theS2,
0084     const IntSurf_PntOn2S&                theUVPoint);
0085 
0086   DEFINE_STANDARD_RTTIEXT(IntPatch_PointLine, IntPatch_Line)
0087 
0088 protected:
0089   //! To initialize the fields, when the transitions
0090   //! are In or Out.
0091   Standard_EXPORT IntPatch_PointLine(const bool              Tang,
0092                                      const IntSurf_TypeTrans Trans1,
0093                                      const IntSurf_TypeTrans Trans2);
0094 
0095   //! To initialize the fields, when the transitions
0096   //! are Touch.
0097   Standard_EXPORT IntPatch_PointLine(const bool              Tang,
0098                                      const IntSurf_Situation Situ1,
0099                                      const IntSurf_Situation Situ2);
0100 
0101   //! To initialize the fields, when the transitions
0102   //! are Undecided.
0103   Standard_EXPORT IntPatch_PointLine(const bool Tang);
0104 };
0105 
0106 #endif // _IntPatch_PointLine_HeaderFile