0031668: Visualization - WebGL sample doesn't work on Emscripten 1.39
[occt.git] / src / BRepToIGESBRep / BRepToIGESBRep_Entity.hxx
CommitLineData
42cf5bc1 1// Created on: 1995-04-25
2// Created by: Marie Jose MARTZ
3// Copyright (c) 1995-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
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.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _BRepToIGESBRep_Entity_HeaderFile
18#define _BRepToIGESBRep_Entity_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_DefineAlloc.hxx>
22#include <Standard_Handle.hxx>
23
24#include <TopTools_IndexedMapOfShape.hxx>
25#include <TColStd_IndexedMapOfTransient.hxx>
26#include <BRepToIGES_BREntity.hxx>
27#include <Standard_Integer.hxx>
28#include <Standard_Real.hxx>
29class IGESSolid_EdgeList;
30class IGESSolid_VertexList;
31class TopoDS_Vertex;
32class TopoDS_Edge;
33class IGESData_IGESEntity;
34class TopoDS_Shape;
35class TopoDS_Face;
36class IGESSolid_Loop;
37class TopoDS_Wire;
38class IGESSolid_Face;
39class IGESSolid_Shell;
40class TopoDS_Shell;
41class IGESSolid_ManifoldSolid;
42class TopoDS_Solid;
43class TopoDS_CompSolid;
44class TopoDS_Compound;
45
46
47//! provides methods to transfer BRep entity from CASCADE to IGESBRep.
48class BRepToIGESBRep_Entity : public BRepToIGES_BREntity
49{
50public:
51
52 DEFINE_STANDARD_ALLOC
53
54
55 //! Creates a tool Entity
56 Standard_EXPORT BRepToIGESBRep_Entity();
57
58 //! Clears the contents of the fields
59 Standard_EXPORT void Clear();
60
61 //! Create the VertexList entity
62 Standard_EXPORT void TransferVertexList();
63
64 //! Returns the index of <myvertex> in "myVertices"
65 Standard_EXPORT Standard_Integer IndexVertex (const TopoDS_Vertex& myvertex) const;
66
67 //! Stores <myvertex> in "myVertices"
68 //! Returns the index of <myvertex>.
69 Standard_EXPORT Standard_Integer AddVertex (const TopoDS_Vertex& myvertex);
70
71 //! Transfert an Edge entity from TopoDS to IGES
72 Standard_EXPORT void TransferEdgeList();
73
74 //! Returns the index of <myedge> in "myEdges"
75 Standard_EXPORT Standard_Integer IndexEdge (const TopoDS_Edge& myedge) const;
76
77 //! Stores <myedge> in "myEdges" and <mycurve3d> in "myCurves".
78 //! Returns the index of <myedge>.
79 Standard_EXPORT Standard_Integer AddEdge (const TopoDS_Edge& myedge, const Handle(IGESData_IGESEntity)& mycurve3d);
80
81 //! Returns the result of the transfert of any Shape
82 //! If the transfer has failed, this member return a NullEntity.
83 Standard_EXPORT virtual Handle(IGESData_IGESEntity) TransferShape (const TopoDS_Shape& start) Standard_OVERRIDE;
84
85 //! Transfert an Edge entity from TopoDS to IGES
86 //! If this Entity could not be converted, this member returns a NullEntity.
87 Standard_EXPORT Handle(IGESData_IGESEntity) TransferEdge (const TopoDS_Edge& myedge);
88
89 //! Transfert an Edge entity from TopoDS to IGES
90 //! If this Entity could not be converted, this member returns a NullEntity.
91 Standard_EXPORT Handle(IGESData_IGESEntity) TransferEdge (const TopoDS_Edge& myedge, const TopoDS_Face& myface, const Standard_Real length);
92
93 //! Transfert a Wire entity from TopoDS to IGES.
94 //! Returns the curve associated to mywire in the parametric space of myface.
95 //! If this Entity could not be converted, this member returns a NullEntity.
96 Standard_EXPORT Handle(IGESSolid_Loop) TransferWire (const TopoDS_Wire& mywire, const TopoDS_Face& myface, const Standard_Real length);
97
98 //! Transfert a Face entity from TopoDS to IGES
99 //! If this Entity could not be converted, this member returns a NullEntity.
100 Standard_EXPORT Handle(IGESSolid_Face) TransferFace (const TopoDS_Face& start);
101
102 //! Transfert an Shell entity from TopoDS to IGES
103 //! If this Entity could not be converted, this member returns a NullEntity.
104 Standard_EXPORT Handle(IGESSolid_Shell) TransferShell (const TopoDS_Shell& start);
105
106 //! Transfert a Solid entity from TopoDS to IGES
107 //! If this Entity could not be converted, this member returns a NullEntity.
108 Standard_EXPORT Handle(IGESSolid_ManifoldSolid) TransferSolid (const TopoDS_Solid& start);
109
110 //! Transfert an CompSolid entity from TopoDS to IGES
111 //! If this Entity could not be converted, this member returns a NullEntity.
112 Standard_EXPORT Handle(IGESData_IGESEntity) TransferCompSolid (const TopoDS_CompSolid& start);
113
114 //! Transfert a Compound entity from TopoDS to IGES
115 //! If this Entity could not be converted, this member returns a NullEntity.
116 Standard_EXPORT Handle(IGESData_IGESEntity) TransferCompound (const TopoDS_Compound& start);
117
118
119
120
121protected:
122
123
124
125
126
127private:
128
129
130
131 TopTools_IndexedMapOfShape myVertices;
132 TopTools_IndexedMapOfShape myEdges;
133 TColStd_IndexedMapOfTransient myCurves;
134 Handle(IGESSolid_EdgeList) myEdgeList;
135 Handle(IGESSolid_VertexList) myVertexList;
136
137
138};
139
140
141
142
143
144
145
146#endif // _BRepToIGESBRep_Entity_HeaderFile