Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-23 09:17:03

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 _BRepMeshData_Wire_HeaderFile
0017 #define _BRepMeshData_Wire_HeaderFile
0018 
0019 #include <IMeshData_Wire.hxx>
0020 #include <IMeshData_Types.hxx>
0021 
0022 //! Default implementation of wire data model entity.
0023 class BRepMeshData_Wire : public IMeshData_Wire
0024 {
0025 public:
0026   DEFINE_INC_ALLOC
0027 
0028   //! Constructor.
0029   Standard_EXPORT BRepMeshData_Wire(const TopoDS_Wire&                           theWire,
0030                                     const int                                    theEdgeNb,
0031                                     const occ::handle<NCollection_IncAllocator>& theAllocator);
0032 
0033   //! Destructor.
0034   Standard_EXPORT ~BRepMeshData_Wire() override;
0035 
0036   //! Gets number of children.
0037   Standard_EXPORT int EdgesNb() const override;
0038 
0039   //! Adds new discrete edge with specified orientation to wire chain.
0040   //! @return index of added edge in wire chain.
0041   Standard_EXPORT int AddEdge(const IMeshData::IEdgePtr& theDEdge,
0042                               const TopAbs_Orientation   theOrientation) override;
0043 
0044   //! Gets edge with the given index.
0045   Standard_EXPORT const IMeshData::IEdgePtr& GetEdge(const int theIndex) const override;
0046 
0047   //! Returns True if orientation of discrete edge with the given index is forward.
0048   Standard_EXPORT TopAbs_Orientation GetEdgeOrientation(const int theIndex) const override;
0049 
0050   DEFINE_STANDARD_RTTIEXT(BRepMeshData_Wire, IMeshData_Wire)
0051 
0052 private:
0053   IMeshData::VectorOfIEdgePtrs   myDEdges;
0054   IMeshData::VectorOfOrientation myDEdgesOri;
0055 };
0056 
0057 #endif