Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-02 08:22:57

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