42cf5bc1 |
1 | // Created on: 1995-01-27 |
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 _BRepToIGES_BRWire_HeaderFile |
18 | #define _BRepToIGES_BRWire_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <BRepToIGES_BREntity.hxx> |
25 | #include <Standard_Real.hxx> |
26 | #include <Standard_Boolean.hxx> |
27 | class BRepToIGES_BREntity; |
28 | class IGESData_IGESEntity; |
29 | class TopoDS_Shape; |
30 | class TopoDS_Vertex; |
31 | class TopoDS_Edge; |
32 | class TopoDS_Face; |
33 | class Geom_Surface; |
34 | class TopLoc_Location; |
35 | class gp_Pnt2d; |
36 | class TopoDS_Wire; |
37 | |
38 | |
39 | //! This class implements the transfer of Shape Entities |
40 | //! from Geom To IGES. These can be : |
41 | //! . Vertex |
42 | //! . Edge |
43 | //! . Wire |
44 | class BRepToIGES_BRWire : public BRepToIGES_BREntity |
45 | { |
46 | public: |
47 | |
48 | DEFINE_STANDARD_ALLOC |
49 | |
50 | |
51 | Standard_EXPORT BRepToIGES_BRWire(); |
52 | |
53 | Standard_EXPORT BRepToIGES_BRWire(const BRepToIGES_BREntity& BR); |
54 | |
55 | //! Transfert a Shape entity from TopoDS to IGES |
56 | //! this entity must be a Vertex or an Edge or a Wire. |
57 | //! If this Entity could not be converted, |
58 | //! this member returns a NullEntity. |
59 | Standard_EXPORT Handle(IGESData_IGESEntity) TransferWire (const TopoDS_Shape& start); |
60 | |
61 | //! Transfert a Vertex entity from TopoDS to IGES |
62 | //! If this Entity could not be converted, |
63 | //! this member returns a NullEntity. |
64 | Standard_EXPORT Handle(IGESData_IGESEntity) TransferVertex (const TopoDS_Vertex& myvertex); |
65 | |
66 | //! Transfert a Vertex entity on an Edge from TopoDS to IGES |
67 | //! Returns the parameter of myvertex on myedge. |
68 | //! If this Entity could not be converted, |
69 | //! this member returns a NullEntity. |
70 | Standard_EXPORT Handle(IGESData_IGESEntity) TransferVertex (const TopoDS_Vertex& myvertex, const TopoDS_Edge& myedge, Standard_Real& parameter); |
71 | |
72 | //! Transfert a Vertex entity of an edge on a Face |
73 | //! from TopoDS to IGES |
74 | //! Returns the parameter of myvertex on the pcurve |
75 | //! of myedge on myface |
76 | //! If this Entity could not be converted, |
77 | //! this member returns a NullEntity. |
78 | Standard_EXPORT Handle(IGESData_IGESEntity) TransferVertex (const TopoDS_Vertex& myvertex, const TopoDS_Edge& myedge, const TopoDS_Face& myface, Standard_Real& parameter); |
79 | |
80 | //! Transfert a Vertex entity of an edge on a Surface |
81 | //! from TopoDS to IGES |
82 | //! Returns the parameter of myvertex on the pcurve |
83 | //! of myedge on mysurface |
84 | //! If this Entity could not be converted, |
85 | //! this member returns a NullEntity. |
86 | Standard_EXPORT Handle(IGESData_IGESEntity) TransferVertex (const TopoDS_Vertex& myvertex, const TopoDS_Edge& myedge, const Handle(Geom_Surface)& mysurface, const TopLoc_Location& myloc, Standard_Real& parameter); |
87 | |
88 | //! Transfert a Vertex entity on a Face from TopoDS to IGES |
89 | //! Returns the parameters of myvertex on myface |
90 | //! If this Entity could not be converted, |
91 | //! this member returns a NullEntity. |
92 | Standard_EXPORT Handle(IGESData_IGESEntity) TransferVertex (const TopoDS_Vertex& myvertex, const TopoDS_Face& myface, gp_Pnt2d& mypoint); |
93 | |
94 | //! Transfert an Edge entity from TopoDS to IGES |
95 | //! If this Entity could not be converted, |
96 | //! this member returns a NullEntity. |
97 | //! isBRepMode indicates if write mode is BRep |
98 | //! (True when called from BRepToIGESBRep and False when from BRepToIGES) |
99 | //! If edge is REVERSED and isBRepMode is False 3D edge curve is reversed, |
100 | //! otherwise, not. |
101 | Standard_EXPORT Handle(IGESData_IGESEntity) TransferEdge (const TopoDS_Edge& myedge, const Standard_Boolean isBRepMode); |
102 | |
103 | //! Transfert an Edge entity on a Face from TopoDS to IGES |
104 | //! If this Entity could not be converted, |
105 | //! this member returns a NullEntity. |
106 | //! isBRepMode indicates if write mode is BRep |
107 | //! (True when called from BRepToIGESBRep and False when from BRepToIGES) |
108 | //! passing into Transform2dCurve() |
109 | Standard_EXPORT Handle(IGESData_IGESEntity) TransferEdge (const TopoDS_Edge& myedge, const TopoDS_Face& myface, const Standard_Real length, const Standard_Boolean isBRepMode); |
110 | |
111 | //! Transfert a Wire entity from TopoDS to IGES |
112 | //! If this Entity could not be converted, |
113 | //! this member returns a NullEntity. |
114 | Standard_EXPORT Handle(IGESData_IGESEntity) TransferWire (const TopoDS_Wire& mywire); |
115 | |
116 | //! Transfert a Wire entity from TopoDS to IGES. |
117 | //! Returns the curve associated to mywire in |
118 | //! the parametric space of myface. |
119 | //! If this Entity could not be converted, |
120 | //! this member returns a NullEntity. |
121 | //! Parameter IsRevol is not used anymore |
122 | Standard_EXPORT Handle(IGESData_IGESEntity) TransferWire (const TopoDS_Wire& mywire, const TopoDS_Face& myface, Handle(IGESData_IGESEntity)& mycurve2d, const Standard_Real length); |
123 | |
124 | |
125 | |
126 | |
127 | protected: |
128 | |
129 | |
130 | |
131 | |
132 | |
133 | private: |
134 | |
135 | |
136 | |
137 | |
138 | |
139 | }; |
140 | |
141 | |
142 | |
143 | |
144 | |
145 | |
146 | |
147 | #endif // _BRepToIGES_BRWire_HeaderFile |