Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-03 09:16:35

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 //! Interface class representing discrete model of a wire.
0027 //! Wire should represent an ordered set of edges.
0028 class IMeshData_Wire : public IMeshData_TessellatedShape, public IMeshData_StatusOwner
0029 {
0030 public:
0031   //! Destructor.
0032   ~IMeshData_Wire() override = default;
0033 
0034   //! Returns TopoDS_Face attached to model.
0035   const TopoDS_Wire& GetWire() const { return TopoDS::Wire(GetShape()); }
0036 
0037   //! Returns number of edges.
0038   Standard_EXPORT virtual int EdgesNb() const = 0;
0039 
0040   //! Adds new discrete edge with specified orientation to wire chain.
0041   //! @return index of added edge in wire chain.
0042   Standard_EXPORT virtual int AddEdge(const IMeshData::IEdgePtr& theDEdge,
0043                                       const TopAbs_Orientation   theOrientation) = 0;
0044 
0045   //! Returns discrete edge with the given index.
0046   Standard_EXPORT virtual const IMeshData::IEdgePtr& GetEdge(const int theIndex) const = 0;
0047 
0048   //! Returns True if orientation of discrete edge with the given index is forward.
0049   Standard_EXPORT virtual TopAbs_Orientation GetEdgeOrientation(const int theIndex) const = 0;
0050 
0051   DEFINE_STANDARD_RTTIEXT(IMeshData_Wire, IMeshData_TessellatedShape)
0052 
0053 protected:
0054   //! Constructor.
0055   //! Initializes empty model.
0056   IMeshData_Wire(const TopoDS_Wire& theWire)
0057       : IMeshData_TessellatedShape(theWire)
0058   {
0059   }
0060 };
0061 
0062 #endif