Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:04

0001 // Created by: Peter KURNEV
0002 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0003 //
0004 // This file is part of Open CASCADE Technology software library.
0005 //
0006 // This library is free software; you can redistribute it and/or modify it under
0007 // the terms of the GNU Lesser General Public License version 2.1 as published
0008 // by the Free Software Foundation, with special exception defined in the file
0009 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0010 // distribution for complete text of the license and disclaimer of any warranty.
0011 //
0012 // Alternatively, this file may be used under the terms of Open CASCADE
0013 // commercial license or contractual agreement.
0014 
0015 #ifndef _BOPDS_Curve_HeaderFile
0016 #define _BOPDS_Curve_HeaderFile
0017 
0018 #include <Standard.hxx>
0019 #include <Standard_DefineAlloc.hxx>
0020 #include <Standard_Handle.hxx>
0021 
0022 #include <Bnd_Box.hxx>
0023 #include <BOPDS_ListOfPaveBlock.hxx>
0024 #include <IntTools_Curve.hxx>
0025 #include <NCollection_BaseAllocator.hxx>
0026 #include <TColStd_ListOfInteger.hxx>
0027 class IntTools_Curve;
0028 class Bnd_Box;
0029 class BOPDS_PaveBlock;
0030 
0031 
0032 
0033 //! The class BOPDS_Curve is to store
0034 //! the information about intersection curve
0035 class BOPDS_Curve 
0036 {
0037 public:
0038 
0039   DEFINE_STANDARD_ALLOC
0040 
0041   
0042 
0043   //! Empty constructor
0044   BOPDS_Curve();
0045 
0046   virtual ~BOPDS_Curve();
0047   
0048 
0049   //! Constructor
0050   //! @param theAllocator the allocator to manage the memory
0051   BOPDS_Curve(const Handle(NCollection_BaseAllocator)& theAllocator);
0052   
0053 
0054   //! Modifier
0055   //! Sets the curve <theC>
0056     void SetCurve (const IntTools_Curve& theC);
0057   
0058 
0059   //! Selector
0060   //! Returns the curve
0061     const IntTools_Curve& Curve() const;
0062   
0063 
0064   //! Modifier
0065   //! Sets the bounding box <theBox> of the curve
0066     void SetBox (const Bnd_Box& theBox);
0067   
0068 
0069   //! Selector
0070   //! Returns the bounding box of the curve
0071     const Bnd_Box& Box() const;
0072   
0073 
0074   //! Selector/Modifier
0075   //! Returns the bounding box of the curve
0076     Bnd_Box& ChangeBox();
0077   
0078   void SetPaveBlocks (const BOPDS_ListOfPaveBlock& theLPB);
0079   
0080 
0081   //! Selector
0082   //! Returns the list of pave blocks
0083   //! of the curve
0084     const BOPDS_ListOfPaveBlock& PaveBlocks() const;
0085   
0086 
0087   //! Selector/Modifier
0088   //! Returns the list of pave blocks
0089   //! of the curve
0090     BOPDS_ListOfPaveBlock& ChangePaveBlocks();
0091   
0092 
0093   //! Creates  initial pave block
0094   //! of the curve
0095     void InitPaveBlock1();
0096   
0097 
0098   //! Selector/Modifier
0099   //! Returns  initial pave block
0100   //! of the curve
0101     Handle(BOPDS_PaveBlock)& ChangePaveBlock1();
0102   
0103 
0104   //! Selector
0105   //! Returns list of indices of technologic vertices
0106   //! of the curve
0107     const TColStd_ListOfInteger& TechnoVertices() const;
0108   
0109 
0110   //! Selector/Modifier
0111   //! Returns list of indices of technologic vertices
0112   //! of the curve
0113     TColStd_ListOfInteger& ChangeTechnoVertices();
0114   
0115 
0116   //! Query
0117   //! Returns true if at least one pave block of the curve
0118   //! has edge
0119     Standard_Boolean HasEdge() const;
0120 
0121   //! Sets the tolerance for the curve.
0122   void SetTolerance(const Standard_Real theTol)
0123   {
0124     myTolerance = theTol;
0125   }
0126 
0127   //! Returns the tolerance of the curve
0128   Standard_Real Tolerance() const
0129   {
0130     return myTolerance;
0131   }
0132 
0133   //! Returns the tangential tolerance of the curve
0134   Standard_Real TangentialTolerance() const
0135   {
0136     return myCurve.TangentialTolerance();
0137   }
0138 
0139 protected:
0140 
0141   Handle(NCollection_BaseAllocator) myAllocator;
0142   IntTools_Curve myCurve;
0143   BOPDS_ListOfPaveBlock myPaveBlocks;
0144   TColStd_ListOfInteger myTechnoVertices;
0145   Bnd_Box myBox;
0146   Standard_Real myTolerance;
0147 
0148 private:
0149 
0150 };
0151 
0152 #include <BOPDS_Curve.lxx>
0153 
0154 #endif // _BOPDS_Curve_HeaderFile