0031004: Coding - eliminate warnings issued by gcc 9.1.0
[occt.git] / src / IGESToBRep / IGESToBRep_CurveAndSurface.hxx
CommitLineData
42cf5bc1 1// Created on: 1994-03-14
2// Created by: s: Christophe GUYOT & Frederic UNTEREINER
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 _IGESToBRep_CurveAndSurface_HeaderFile
18#define _IGESToBRep_CurveAndSurface_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_Integer.hxx>
27class Geom_Surface;
28class IGESData_IGESModel;
29class Transfer_TransientProcess;
30class TopoDS_Shape;
31class IGESData_IGESEntity;
32class Message_Msg;
33
34
35//! Provides methods to transfer CurveAndSurface from IGES to CASCADE.
36class IGESToBRep_CurveAndSurface
37{
38public:
39
40 DEFINE_STANDARD_ALLOC
41
42
43 //! Creates a tool CurveAndSurface ready to run, with
44 //! epsilons set to 1.E-04, myModeTopo to True, the
45 //! optimization of the continuity to False.
46 Standard_EXPORT IGESToBRep_CurveAndSurface();
47
42cf5bc1 48 //! Creates a tool CurveAndSurface ready to run.
49 Standard_EXPORT IGESToBRep_CurveAndSurface(const Standard_Real eps, const Standard_Real epsGeom, const Standard_Real epsCoeff, const Standard_Boolean mode, const Standard_Boolean modeapprox, const Standard_Boolean optimized);
50
51 //! Initializes the field of the tool CurveAndSurface with
52 //! default creating values.
53 Standard_EXPORT void Init();
54
55 //! Changes the value of "myEps"
56 void SetEpsilon (const Standard_Real eps);
57
58 //! Returns the value of "myEps"
59 Standard_Real GetEpsilon() const;
60
61 //! Changes the value of "myEpsCoeff"
62 void SetEpsCoeff (const Standard_Real eps);
63
64 //! Returns the value of "myEpsCoeff"
65 Standard_Real GetEpsCoeff() const;
66
67 //! Changes the value of "myEpsGeom"
68 Standard_EXPORT void SetEpsGeom (const Standard_Real eps);
69
70 //! Returns the value of "myEpsGeom"
71 Standard_Real GetEpsGeom() const;
72
73 //! Changes the value of "myMinTol"
74 void SetMinTol (const Standard_Real mintol);
75
76 //! Changes the value of "myMaxTol"
77 void SetMaxTol (const Standard_Real maxtol);
78
79 //! Sets values of "myMinTol" and "myMaxTol" as follows
80 //! myMaxTol = Max ("read.maxprecision.val", myEpsGeom * myUnitFactor)
81 //! myMinTol = Precision::Confusion()
82 //! Remark: This method is automatically invoked each time the values
83 //! of "myEpsGeom" or "myUnitFactor" are changed
84 Standard_EXPORT void UpdateMinMaxTol();
85
86 //! Returns the value of "myMinTol"
87 Standard_Real GetMinTol() const;
88
89 //! Returns the value of "myMaxTol"
90 Standard_Real GetMaxTol() const;
91
92 //! Changes the value of "myModeApprox"
93 void SetModeApprox (const Standard_Boolean mode);
94
95 //! Returns the value of "myModeApprox"
96 Standard_Boolean GetModeApprox() const;
97
98 //! Changes the value of "myModeIsTopo"
99 void SetModeTransfer (const Standard_Boolean mode);
100
101 //! Returns the value of "myModeIsTopo"
102 Standard_Boolean GetModeTransfer() const;
103
104 //! Changes the value of "myContIsOpti"
105 void SetOptimized (const Standard_Boolean optimized);
106
107 //! Returns the value of "myContIsOpti"
108 Standard_Boolean GetOptimized() const;
109
110 //! Returns the value of " myUnitFactor"
111 Standard_Real GetUnitFactor() const;
112
113 //! Changes the value of "mySurfaceCurve"
114 void SetSurfaceCurve (const Standard_Integer ival);
115
116 //! Returns the value of " mySurfaceCurve" 0 = value in
117 //! file , 2 = kepp 2d and compute 3d 3 = keep 3d and
118 //! compute 2d
119 Standard_Integer GetSurfaceCurve() const;
120
121 //! Set the value of "myModel"
122 Standard_EXPORT void SetModel (const Handle(IGESData_IGESModel)& model);
123
124 //! Returns the value of "myModel"
125 Handle(IGESData_IGESModel) GetModel() const;
126
127 //! Changes the value of "myContinuity"
128 //! if continuity = 0 do nothing else
129 //! if continuity = 1 try C1
130 //! if continuity = 2 try C2
131 void SetContinuity (const Standard_Integer continuity);
132
133 //! Returns the value of "myContinuity"
134 Standard_Integer GetContinuity() const;
135
136 //! Set the value of "myMsgReg"
137 void SetTransferProcess (const Handle(Transfer_TransientProcess)& TP);
138
139 //! Returns the value of "myMsgReg"
140 Handle(Transfer_TransientProcess) GetTransferProcess() const;
141
142 //! Returns the result of the transfert of any IGES Curve
143 //! or Surface Entity. If the transfer has failed, this
144 //! member return a NullEntity.
145 Standard_EXPORT TopoDS_Shape TransferCurveAndSurface (const Handle(IGESData_IGESEntity)& start);
146
147 //! Returns the result of the transfert the geometry of
148 //! any IGESEntity. If the transfer has failed, this
149 //! member return a NullEntity.
150 Standard_EXPORT TopoDS_Shape TransferGeometry (const Handle(IGESData_IGESEntity)& start);
151
152 //! Records a new Fail message
153 void SendFail (const Handle(IGESData_IGESEntity)& start, const Message_Msg& amsg);
154
155 //! Records a new Warning message
156 void SendWarning (const Handle(IGESData_IGESEntity)& start, const Message_Msg& amsg);
157
158 //! Records a new Information message from the definition
159 //! of a Msg (Original+Value)
160 void SendMsg (const Handle(IGESData_IGESEntity)& start, const Message_Msg& amsg);
161
162 //! Returns True if start was already treated and has a result in "myMap"
163 //! else returns False.
164 Standard_EXPORT Standard_Boolean HasShapeResult (const Handle(IGESData_IGESEntity)& start) const;
165
166 //! Returns the result of the transfer of the IGESEntity "start" contained
167 //! in "myMap" . (if HasShapeResult is True).
168 Standard_EXPORT TopoDS_Shape GetShapeResult (const Handle(IGESData_IGESEntity)& start) const;
169
170 //! set in "myMap" the result of the transfer of the IGESEntity "start".
171 Standard_EXPORT void SetShapeResult (const Handle(IGESData_IGESEntity)& start, const TopoDS_Shape& result);
172
173 //! Returns the number of shapes results contained in "myMap" for the
174 //! IGESEntity start ( type VertexList or EdgeList).
175 Standard_EXPORT Standard_Integer NbShapeResult (const Handle(IGESData_IGESEntity)& start) const;
176
177 //! Returns the numth result of the IGESEntity start (type VertexList or
178 //! EdgeList) in "myMap". (if NbShapeResult is not null).
179 Standard_EXPORT TopoDS_Shape GetShapeResult (const Handle(IGESData_IGESEntity)& start, const Standard_Integer num) const;
180
181 //! set in "myMap" the result of the transfer of the entity of the
182 //! IGESEntity start ( type VertexList or EdgeList).
183 Standard_EXPORT void AddShapeResult (const Handle(IGESData_IGESEntity)& start, const TopoDS_Shape& result);
184
185 Standard_EXPORT void SetSurface (const Handle(Geom_Surface)& theSurface);
186
187 Standard_EXPORT Handle(Geom_Surface) Surface() const;
188
189 Standard_EXPORT Standard_Real GetUVResolution();
190
191
192
193
194protected:
195
196
197
198
199
200private:
201
202
203
204 Standard_Real myEps;
205 Standard_Real myEpsCoeff;
206 Standard_Real myEpsGeom;
207 Standard_Real myMinTol;
208 Standard_Real myMaxTol;
209 Standard_Boolean myModeIsTopo;
210 Standard_Boolean myModeApprox;
211 Standard_Boolean myContIsOpti;
212 Standard_Real myUnitFactor;
213 Standard_Integer mySurfaceCurve;
214 Standard_Integer myContinuity;
215 Handle(Geom_Surface) mySurface;
216 Standard_Real myUVResolution;
217 Standard_Boolean myIsResolCom;
218 Handle(IGESData_IGESModel) myModel;
219 Handle(Transfer_TransientProcess) myTP;
220
221
222};
223
224
225#include <IGESToBRep_CurveAndSurface.lxx>
226
227
228
229
230
231#endif // _IGESToBRep_CurveAndSurface_HeaderFile