Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-19 09:27:27

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 _BRepMesh_ShapeVisitor_HeaderFile
0017 #define _BRepMesh_ShapeVisitor_HeaderFile
0018 
0019 #include <IMeshTools_ShapeVisitor.hxx>
0020 #include <IMeshData_Model.hxx>
0021 #include <Standard_Transient.hxx>
0022 #include <Standard_Type.hxx>
0023 #include <IMeshTools_Parameters.hxx>
0024 #include <IMeshData_Types.hxx>
0025 
0026 class TopoDS_Face;
0027 class TopoDS_Edge;
0028 class TopoDS_Wire;
0029 
0030 //! Builds discrete model of a shape by adding faces and free edges.
0031 //! Computes deflection for corresponded shape and checks whether it
0032 //! fits existing polygonal representation. If not, cleans shape from
0033 //! outdated info.
0034 class BRepMesh_ShapeVisitor : public IMeshTools_ShapeVisitor
0035 {
0036 public:
0037   //! Constructor.
0038   Standard_EXPORT BRepMesh_ShapeVisitor(const occ::handle<IMeshData_Model>& theModel);
0039 
0040   //! Destructor.
0041   Standard_EXPORT ~BRepMesh_ShapeVisitor() override;
0042 
0043   //! Handles TopoDS_Face object.
0044   Standard_EXPORT void Visit(const TopoDS_Face& theFace) override;
0045 
0046   //! Handles TopoDS_Edge object.
0047   Standard_EXPORT void Visit(const TopoDS_Edge& theEdge) override;
0048 
0049   DEFINE_STANDARD_RTTIEXT(BRepMesh_ShapeVisitor, IMeshTools_ShapeVisitor)
0050 
0051 private:
0052   //! Adds wire to face discrete model.
0053   bool addWire(const TopoDS_Wire& theWire, const IMeshData::IFaceHandle& theDFace);
0054 
0055 private:
0056   occ::handle<IMeshData_Model>  myModel;
0057   IMeshData::DMapOfShapeInteger myDEdgeMap;
0058 };
0059 
0060 #endif