Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-12-03 10:54:31

0001 // Created on: 1993-02-05
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 _Contap_Line_HeaderFile
0018 #define _Contap_Line_HeaderFile
0019 
0020 #include <Contap_IType.hxx>
0021 #include <Contap_Point.hxx>
0022 #include <NCollection_Sequence.hxx>
0023 #include <NCollection_HSequence.hxx>
0024 #include <gp_Dir.hxx>
0025 #include <gp_Pnt.hxx>
0026 #include <IntSurf_TypeTrans.hxx>
0027 #include <Standard.hxx>
0028 #include <Standard_DefineAlloc.hxx>
0029 #include <Standard_Handle.hxx>
0030 #include <Standard_Integer.hxx>
0031 
0032 class IntSurf_LineOn2S;
0033 class IntSurf_PntOn2S;
0034 class gp_Lin;
0035 class gp_Circ;
0036 class Contap_Point;
0037 
0038 class Contap_Line
0039 {
0040 public:
0041   DEFINE_STANDARD_ALLOC
0042 
0043   Standard_EXPORT Contap_Line();
0044 
0045   Standard_EXPORT void SetLineOn2S(const occ::handle<IntSurf_LineOn2S>& L);
0046 
0047   Standard_EXPORT void Clear();
0048 
0049   const occ::handle<IntSurf_LineOn2S>& LineOn2S() const;
0050 
0051   Standard_EXPORT void ResetSeqOfVertex();
0052 
0053   void Add(const IntSurf_PntOn2S& P);
0054 
0055   Standard_EXPORT void SetValue(const gp_Lin& L);
0056 
0057   Standard_EXPORT void SetValue(const gp_Circ& C);
0058 
0059   Standard_EXPORT void SetValue(const occ::handle<Adaptor2d_Curve2d>& A);
0060 
0061   Standard_EXPORT void Add(const Contap_Point& P);
0062 
0063   int NbVertex() const;
0064 
0065   Contap_Point& Vertex(const int Index) const;
0066 
0067   //! Returns Contap_Lin for a line, Contap_Circle for
0068   //! a circle, and Contap_Walking for a Walking line,
0069   //! Contap_Restriction for a part of boundary.
0070   Contap_IType TypeContour() const;
0071 
0072   int NbPnts() const;
0073 
0074   const IntSurf_PntOn2S& Point(const int Index) const;
0075 
0076   gp_Lin Line() const;
0077 
0078   gp_Circ Circle() const;
0079 
0080   Standard_EXPORT const occ::handle<Adaptor2d_Curve2d>& Arc() const;
0081 
0082   //! Set The Transition of the line.
0083   Standard_EXPORT void SetTransitionOnS(const IntSurf_TypeTrans T);
0084 
0085   //! returns IN if at the "left" of the line, the normale of the
0086   //! surface is oriented to the observator.
0087   Standard_EXPORT IntSurf_TypeTrans TransitionOnS() const;
0088 
0089 private:
0090   IntSurf_TypeTrans                                Trans;
0091   occ::handle<IntSurf_LineOn2S>                    curv;
0092   occ::handle<NCollection_HSequence<Contap_Point>> svtx;
0093   occ::handle<Adaptor2d_Curve2d>                   thearc;
0094   Contap_IType                                     typL;
0095   gp_Pnt                                           pt;
0096   gp_Dir                                           dir1;
0097   gp_Dir                                           dir2;
0098   double                                           rad;
0099 };
0100 
0101 #include <Contap_Line.lxx>
0102 
0103 #endif // _Contap_Line_HeaderFile