Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-25 10:09:37

0001 // Created on: 1993-02-22
0002 // Created by: Jacques GOUSSARD
0003 // Copyright (c) 1993-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 _IntSurf_LineOn2S_HeaderFile
0018 #define _IntSurf_LineOn2S_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 
0022 #include <Bnd_Box.hxx>
0023 #include <Bnd_Box2d.hxx>
0024 #include <IntSurf_PntOn2S.hxx>
0025 #include <NCollection_Sequence.hxx>
0026 #include <Standard_Transient.hxx>
0027 #include <IntSurf_Allocator.hxx>
0028 #include <Standard_Integer.hxx>
0029 #include <Standard_Real.hxx>
0030 class IntSurf_PntOn2S;
0031 
0032 class IntSurf_LineOn2S : public Standard_Transient
0033 {
0034 
0035 public:
0036   Standard_EXPORT IntSurf_LineOn2S(const IntSurf_Allocator& theAllocator = nullptr);
0037 
0038   //! Adds a point in the line.
0039   Standard_EXPORT void Add(const IntSurf_PntOn2S& P);
0040 
0041   //! Returns the number of points in the line.
0042   int NbPoints() const;
0043 
0044   //! Returns the point of range Index in the line.
0045   const IntSurf_PntOn2S& Value(const int Index) const;
0046 
0047   //! Reverses the order of points of the line.
0048   void Reverse();
0049 
0050   //! Keeps in <me> the points 1 to Index-1, and returns
0051   //! the items Index to the end.
0052   Standard_EXPORT occ::handle<IntSurf_LineOn2S> Split(const int Index);
0053 
0054   //! Replaces the point of range Index in the line.
0055   void Value(const int Index, const IntSurf_PntOn2S& P);
0056 
0057   //! Sets the 3D point of the Index-th PntOn2S
0058   Standard_EXPORT void SetPoint(const int Index, const gp_Pnt& thePnt);
0059 
0060   //! Sets the parametric coordinates on one of the surfaces
0061   //! of the point of range Index in the line.
0062   Standard_EXPORT void SetUV(const int Index, const bool OnFirst, const double U, const double V);
0063 
0064   void Clear();
0065 
0066   Standard_EXPORT void InsertBefore(const int I, const IntSurf_PntOn2S& P);
0067 
0068   Standard_EXPORT void RemovePoint(const int I);
0069 
0070   //! Returns TRUE if theP is out of the box built from
0071   //! the points on 1st surface
0072   Standard_EXPORT bool IsOutSurf1Box(const gp_Pnt2d& theP);
0073 
0074   //! Returns TRUE if theP is out of the box built from
0075   //! the points on 2nd surface
0076   Standard_EXPORT bool IsOutSurf2Box(const gp_Pnt2d& theP);
0077 
0078   //! Returns TRUE if theP is out of the box built from 3D-points.
0079   Standard_EXPORT bool IsOutBox(const gp_Pnt& theP);
0080 
0081   DEFINE_STANDARD_RTTIEXT(IntSurf_LineOn2S, Standard_Transient)
0082 
0083 private:
0084   NCollection_Sequence<IntSurf_PntOn2S> mySeq;
0085   Bnd_Box2d                             myBuv1;
0086   Bnd_Box2d                             myBuv2;
0087   Bnd_Box                               myBxyz;
0088 };
0089 
0090 #include <IntSurf_LineOn2S.lxx>
0091 
0092 #endif // _IntSurf_LineOn2S_HeaderFile