Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-29 08:16:28

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