0029296: Data Exchange - implement import of mesh data from files in OBJ format
[occt.git] / src / BRepMesh / BRepMesh_ShapeVisitor.hxx
CommitLineData
7bd071ed 1// Created on: 2016-04-07
2// Copyright (c) 2016 OPEN CASCADE SAS
3// Created by: Oleg AGASHIN
4//
5// This file is part of Open CASCADE Technology software library.
6//
7// This library is free software; you can redistribute it and/or modify it under
8// the terms of the GNU Lesser General Public License version 2.1 as published
9// by the Free Software Foundation, with special exception defined in the file
10// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11// distribution for complete text of the license and disclaimer of any warranty.
12//
13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
15
16#ifndef _BRepMesh_ShapeVisitor_HeaderFile
17#define _BRepMesh_ShapeVisitor_HeaderFile
18
19#include <IMeshTools_ShapeVisitor.hxx>
20#include <IMeshData_Model.hxx>
21#include <Standard_Transient.hxx>
22#include <Standard_Type.hxx>
23#include <IMeshTools_Parameters.hxx>
24#include <IMeshData_Types.hxx>
25
26class TopoDS_Face;
27class TopoDS_Edge;
28class TopoDS_Wire;
29class IMeshTools_Context;
30class IMeshData_Wire;
31
32//! Builds discrete model of a shape by adding faces and free edges.
33//! Computes deflection for corresponded shape and checks whether it
34//! fits existing polygonal representation. If not, cleans shape from
35//! outdated info.
36class BRepMesh_ShapeVisitor : public IMeshTools_ShapeVisitor
37{
38public:
39
40 //! Constructor.
41 Standard_EXPORT BRepMesh_ShapeVisitor (const Handle (IMeshData_Model)& theModel);
42
43 //! Destructor.
44 Standard_EXPORT virtual ~BRepMesh_ShapeVisitor ();
45
46 //! Handles TopoDS_Face object.
47 Standard_EXPORT virtual void Visit (const TopoDS_Face& theFace) Standard_OVERRIDE;
48
49 //! Handles TopoDS_Edge object.
50 Standard_EXPORT virtual void Visit (const TopoDS_Edge& theEdge) Standard_OVERRIDE;
51
52 DEFINE_STANDARD_RTTI_INLINE(BRepMesh_ShapeVisitor, IMeshTools_ShapeVisitor)
53
54private:
55
56 //! Adds wire to face discrete model.
57 Standard_Boolean addWire (
58 const TopoDS_Wire& theWire,
59 const IMeshData::IFaceHandle& theDFace);
60
61private:
62
63 Handle (IMeshData_Model) myModel;
64 IMeshData::DMapOfShapeInteger myDEdgeMap;
65};
66
67#endif