Back to home page

EIC code displayed by LXR

 
 

    


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

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 
0038   //! Constructor.
0039   Standard_EXPORT BRepMesh_ShapeVisitor (const Handle (IMeshData_Model)& theModel);
0040 
0041   //! Destructor.
0042   Standard_EXPORT virtual ~BRepMesh_ShapeVisitor ();
0043 
0044   //! Handles TopoDS_Face object.
0045   Standard_EXPORT virtual void Visit (const TopoDS_Face& theFace) Standard_OVERRIDE;
0046 
0047   //! Handles TopoDS_Edge object.
0048   Standard_EXPORT virtual void Visit (const TopoDS_Edge& theEdge) Standard_OVERRIDE;
0049 
0050   DEFINE_STANDARD_RTTIEXT(BRepMesh_ShapeVisitor, IMeshTools_ShapeVisitor)
0051 
0052 private:
0053 
0054   //! Adds wire to face discrete model.
0055   Standard_Boolean addWire (
0056     const TopoDS_Wire&            theWire,
0057     const IMeshData::IFaceHandle& theDFace);
0058 
0059 private:
0060 
0061   Handle (IMeshData_Model)      myModel;
0062   IMeshData::DMapOfShapeInteger myDEdgeMap;
0063 };
0064 
0065 #endif