Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 2016-04-07
0002 // Copyright (c) 2016 OPEN CASCADE SAS
0003 // Created by: Oleg AGASHIN
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _IMeshData_Wire_HeaderFile
0017 #define _IMeshData_Wire_HeaderFile
0018 
0019 #include <IMeshData_TessellatedShape.hxx>
0020 #include <IMeshData_StatusOwner.hxx>
0021 #include <Standard_Type.hxx>
0022 #include <TopoDS_Wire.hxx>
0023 #include <TopoDS.hxx>
0024 #include <IMeshData_Types.hxx>
0025 
0026 
0027 //! Interface class representing discrete model of a wire.
0028 //! Wire should represent an ordered set of edges.
0029 class IMeshData_Wire : public IMeshData_TessellatedShape, public IMeshData_StatusOwner
0030 {
0031 public:
0032 
0033   //! Destructor.
0034   virtual ~IMeshData_Wire()
0035   {
0036   }
0037 
0038   //! Returns TopoDS_Face attached to model.
0039   const TopoDS_Wire& GetWire () const
0040   {
0041     return TopoDS::Wire (GetShape ());
0042   }
0043 
0044   //! Returns number of edges.
0045   Standard_EXPORT virtual Standard_Integer EdgesNb () const = 0;
0046 
0047   //! Adds new discrete edge with specified orientation to wire chain.
0048   //! @return index of added edge in wire chain.
0049   Standard_EXPORT virtual Standard_Integer AddEdge (
0050     const IMeshData::IEdgePtr& theDEdge,
0051     const TopAbs_Orientation   theOrientation) = 0;
0052 
0053   //! Returns discrete edge with the given index.
0054   Standard_EXPORT virtual const IMeshData::IEdgePtr& GetEdge (
0055     const Standard_Integer theIndex) const = 0;
0056 
0057   //! Returns True if orientation of discrete edge with the given index is forward.
0058   Standard_EXPORT virtual TopAbs_Orientation GetEdgeOrientation (
0059     const Standard_Integer theIndex) const = 0;
0060 
0061   DEFINE_STANDARD_RTTIEXT(IMeshData_Wire, IMeshData_TessellatedShape)
0062 
0063 protected:
0064 
0065   //! Constructor.
0066   //! Initializes empty model.
0067   IMeshData_Wire(const TopoDS_Wire& theWire)
0068     : IMeshData_TessellatedShape(theWire)
0069   {
0070   }
0071 };
0072 
0073 #endif