1 // Created on: 1994-11-30
2 // Created by: Frederic MAUPAS
3 // Copyright (c) 1994-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _TopoDSToStep_Tool_HeaderFile
18 #define _TopoDSToStep_Tool_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <MoniTool_DataMapOfShapeTransient.hxx>
25 #include <Standard_Boolean.hxx>
26 #include <Standard_Real.hxx>
27 #include <TopoDS_Shell.hxx>
28 #include <TopoDS_Face.hxx>
29 #include <TopoDS_Wire.hxx>
30 #include <TopoDS_Edge.hxx>
31 #include <TopoDS_Vertex.hxx>
32 #include <Standard_Integer.hxx>
34 class StepShape_TopologicalRepresentationItem;
42 //! This Tool Class provides Information to build
43 //! a ProSTEP Shape model from a Cas.Cad BRep.
44 class TopoDSToStep_Tool
51 Standard_EXPORT TopoDSToStep_Tool();
53 Standard_EXPORT TopoDSToStep_Tool(const MoniTool_DataMapOfShapeTransient& M, const Standard_Boolean FacetedContext);
55 Standard_EXPORT void Init (const MoniTool_DataMapOfShapeTransient& M, const Standard_Boolean FacetedContext);
57 Standard_EXPORT Standard_Boolean IsBound (const TopoDS_Shape& S);
59 Standard_EXPORT void Bind (const TopoDS_Shape& S, const Handle(StepShape_TopologicalRepresentationItem)& T);
61 Standard_EXPORT Handle(StepShape_TopologicalRepresentationItem) Find (const TopoDS_Shape& S);
63 Standard_EXPORT Standard_Boolean Faceted() const;
65 Standard_EXPORT void SetCurrentShell (const TopoDS_Shell& S);
67 Standard_EXPORT const TopoDS_Shell& CurrentShell() const;
69 Standard_EXPORT void SetCurrentFace (const TopoDS_Face& F);
71 Standard_EXPORT const TopoDS_Face& CurrentFace() const;
73 Standard_EXPORT void SetCurrentWire (const TopoDS_Wire& W);
75 Standard_EXPORT const TopoDS_Wire& CurrentWire() const;
77 Standard_EXPORT void SetCurrentEdge (const TopoDS_Edge& E);
79 Standard_EXPORT const TopoDS_Edge& CurrentEdge() const;
81 Standard_EXPORT void SetCurrentVertex (const TopoDS_Vertex& V);
83 Standard_EXPORT const TopoDS_Vertex& CurrentVertex() const;
85 Standard_EXPORT Standard_Real Lowest3DTolerance() const;
87 Standard_EXPORT void SetSurfaceReversed (const Standard_Boolean B);
89 Standard_EXPORT Standard_Boolean SurfaceReversed() const;
91 Standard_EXPORT const MoniTool_DataMapOfShapeTransient& Map() const;
93 //! Returns mode for writing pcurves
94 //! (initialized by parameter write.surfacecurve.mode)
95 Standard_EXPORT Standard_Integer PCurveMode() const;
110 MoniTool_DataMapOfShapeTransient myDataMap;
111 Standard_Boolean myFacetedContext;
112 Standard_Real myLowestTol;
113 TopoDS_Shell myCurrentShell;
114 TopoDS_Face myCurrentFace;
115 TopoDS_Wire myCurrentWire;
116 TopoDS_Edge myCurrentEdge;
117 TopoDS_Vertex myCurrentVertex;
118 Standard_Boolean myReversedSurface;
119 Standard_Integer myPCurveMode;
130 #endif // _TopoDSToStep_Tool_HeaderFile