42cf5bc1 |
1 | // Created on: 1994-11-15 |
2 | // Created by: Marie Jose MARTZ |
3 | // Copyright (c) 1994-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_BREntity_HeaderFile |
18 | #define _BRepToIGES_BREntity_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <Standard_Real.hxx> |
25 | #include <Standard_Boolean.hxx> |
26 | #include <Standard_CString.hxx> |
27 | class IGESData_IGESModel; |
28 | class Transfer_FinderProcess; |
29 | class IGESData_IGESEntity; |
30 | class TopoDS_Shape; |
31 | class Standard_Transient; |
32 | |
33 | |
34 | //! provides methods to transfer BRep entity from CASCADE to IGES. |
35 | class BRepToIGES_BREntity |
36 | { |
37 | public: |
38 | |
39 | DEFINE_STANDARD_ALLOC |
40 | |
41 | |
42 | //! Creates a tool BREntity |
43 | Standard_EXPORT BRepToIGES_BREntity(); |
44 | |
45 | //! Initializes the field of the tool BREntity with |
46 | //! default creating values. |
47 | Standard_EXPORT void Init(); |
48 | |
49 | //! Set the value of "TheModel" |
50 | Standard_EXPORT void SetModel (const Handle(IGESData_IGESModel)& model); |
51 | |
52 | //! Returns the value of "TheModel" |
53 | Standard_EXPORT Handle(IGESData_IGESModel) GetModel() const; |
54 | |
55 | //! Returns the value of the UnitFlag of the header of the model |
56 | //! in meters. |
57 | Standard_EXPORT Standard_Real GetUnit() const; |
58 | |
59 | //! Set the value of "TheMap" |
60 | Standard_EXPORT void SetTransferProcess (const Handle(Transfer_FinderProcess)& TP); |
61 | |
62 | //! Returns the value of "TheMap" |
63 | Standard_EXPORT Handle(Transfer_FinderProcess) GetTransferProcess() const; |
64 | |
65 | //! Returns the result of the transfert of any Shape |
66 | //! If the transfer has failed, this member return a NullEntity. |
67 | Standard_EXPORT virtual Handle(IGESData_IGESEntity) TransferShape (const TopoDS_Shape& start); |
68 | |
69 | //! Records a new Fail message |
70 | Standard_EXPORT void AddFail (const TopoDS_Shape& start, const Standard_CString amess); |
71 | |
72 | //! Records a new Warning message |
73 | Standard_EXPORT void AddWarning (const TopoDS_Shape& start, const Standard_CString amess); |
74 | |
75 | //! Records a new Fail message |
76 | Standard_EXPORT void AddFail (const Handle(Standard_Transient)& start, const Standard_CString amess); |
77 | |
78 | //! Records a new Warning message |
79 | Standard_EXPORT void AddWarning (const Handle(Standard_Transient)& start, const Standard_CString amess); |
80 | |
81 | //! Returns True if start was already treated and has a result in "TheMap" |
82 | //! else returns False. |
83 | Standard_EXPORT Standard_Boolean HasShapeResult (const TopoDS_Shape& start) const; |
84 | |
85 | //! Returns the result of the transfer of the Shape "start" contained |
86 | //! in "TheMap" . (if HasShapeResult is True). |
87 | Standard_EXPORT Handle(Standard_Transient) GetShapeResult (const TopoDS_Shape& start) const; |
88 | |
89 | //! set in "TheMap" the result of the transfer of the Shape "start". |
90 | Standard_EXPORT void SetShapeResult (const TopoDS_Shape& start, const Handle(Standard_Transient)& result); |
91 | |
92 | //! Returns True if start was already treated and has a result in "TheMap" |
93 | //! else returns False. |
94 | Standard_EXPORT Standard_Boolean HasShapeResult (const Handle(Standard_Transient)& start) const; |
95 | |
96 | //! Returns the result of the transfer of the Transient "start" contained |
97 | //! in "TheMap" . (if HasShapeResult is True). |
98 | Standard_EXPORT Handle(Standard_Transient) GetShapeResult (const Handle(Standard_Transient)& start) const; |
99 | |
100 | //! set in "TheMap" the result of the transfer of the Transient "start". |
101 | Standard_EXPORT void SetShapeResult (const Handle(Standard_Transient)& start, const Handle(Standard_Transient)& result); |
102 | |
103 | //! Returns mode for conversion of surfaces |
104 | //! (value of parameter write.convertsurface.mode) |
105 | Standard_EXPORT Standard_Boolean GetConvertSurfaceMode() const; |
106 | |
107 | //! Returns mode for writing pcurves |
108 | //! (value of parameter write.surfacecurve.mode) |
109 | Standard_EXPORT Standard_Boolean GetPCurveMode() const; |
110 | |
e6f550da |
111 | Standard_EXPORT virtual ~BRepToIGES_BREntity(); |
42cf5bc1 |
112 | |
113 | private: |
42cf5bc1 |
114 | Handle(IGESData_IGESModel) TheModel; |
115 | Standard_Real TheUnitFactor; |
116 | Standard_Boolean myConvSurface; |
117 | Standard_Boolean myPCurveMode; |
118 | Handle(Transfer_FinderProcess) TheMap; |
42cf5bc1 |
119 | }; |
120 | |
42cf5bc1 |
121 | #endif // _BRepToIGES_BREntity_HeaderFile |