1
/***************************************************************************
2
* Copyright (c) 2022 Werner Mayer <wmayer[at]users.sourceforge.net> *
4
* This file is part of the FreeCAD CAx development system. *
6
* This library is free software; you can redistribute it and/or *
7
* modify it under the terms of the GNU Library General Public *
8
* License as published by the Free Software Foundation; either *
9
* version 2 of the License, or (at your option) any later version. *
11
* This library is distributed in the hope that it will be useful, *
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14
* GNU Library General Public License for more details. *
16
* You should have received a copy of the GNU Library General Public *
17
* License along with this library; see the file COPYING.LIB. If not, *
18
* write to the Free Software Foundation, Inc., 59 Temple Place, *
19
* Suite 330, Boston, MA 02111-1307, USA *
21
***************************************************************************/
23
#include "PreCompiled.h"
25
# include <Interface_Static.hxx>
33
/* Further parameters from
34
* https://dev.opencascade.org/doc/overview/html/occt_user_guides__step.html and
35
* https://dev.opencascade.org/doc/overview/html/occt_user_guides__iges.html
41
* read.maxprecision.mode
42
* read.maxprecision.val
43
* read.stdsameparameter.mode
44
* read.surfacecurve.mode
45
* read.encoderegularity.angle
48
* write.precision.mode
50
* write.surfacecurve.mode
54
* read.stepcaf.subshapes.name
55
* write.stepcaf.subshapes.name
56
* write.convertsurface.mode
57
* write.step.nonmanifold
58
* read.iges.onlyvisible
59
* write.iges.offset.mode
60
* write.iges.plane.mode
65
* read.step.resource.name
67
* read.step.product.mode
68
* read.step.product.context
69
* read.step.shape.repr
70
* read.step.assembly.level
71
* read.step.shape.relationship
72
* read.step.shape.aspect
73
* read.step.constructivegeom.relationship
74
* read.step.tessellated
76
* write.step.resource.name
78
* write.step.vertex.mode
79
* write.step.tessellated
83
* read.iges.bspline.continuity
84
* read.iges.bspline.approxd1.mode
85
* read.iges.resource.name
88
* write.iges.header.receiver
89
* write.iges.resource.name
93
void Interface::writeStepAssembly(Interface::Assembly mode)
95
Interface_Static::SetIVal("write.step.assembly", static_cast<int>(mode));
98
Standard_CString Interface::writeStepScheme()
100
return Interface_Static::CVal("write.step.schema");
103
bool Interface::writeStepScheme(Standard_CString scheme)
105
return Interface_Static::SetCVal("write.step.schema", scheme);
108
bool Interface::writeStepUnit(Standard_CString unit)
110
return Interface_Static::SetCVal("write.step.unit", unit);
113
bool Interface::writeStepUnit(Interface::Unit unit)
116
case Interface::Unit::Meter:
117
return Interface_Static::SetCVal("write.step.unit","M");
118
case Interface::Unit::Inch:
119
return Interface_Static::SetCVal("write.step.unit","INCH");
121
return Interface_Static::SetCVal("write.step.unit","MM");
125
Standard_CString Interface::writeStepUnit()
127
return Interface_Static::CVal("write.step.unit");
130
Standard_CString Interface::writeStepHeaderProduct()
132
return Interface_Static::CVal("write.step.product.name");
135
bool Interface::writeStepHeaderProduct(Standard_CString name)
137
return Interface_Static::SetCVal("write.step.product.name", name);
140
Standard_CString Interface::writeIgesHeaderAuthor()
142
return Interface_Static::CVal("write.iges.header.author");
145
bool Interface::writeIgesHeaderAuthor(Standard_CString name)
147
return Interface_Static::SetCVal("write.iges.header.author", name);
150
Standard_CString Interface::writeIgesHeaderCompany()
152
return Interface_Static::CVal("write.iges.header.company");
155
bool Interface::writeIgesHeaderCompany(Standard_CString name)
157
return Interface_Static::SetCVal("write.iges.header.company", name);
160
Standard_CString Interface::writeIgesHeaderProduct()
162
return Interface_Static::CVal("write.iges.header.product");
165
bool Interface::writeIgesHeaderProduct(Standard_CString name)
167
return Interface_Static::SetCVal("write.iges.header.product", name);
170
bool Interface::writeIgesUnit(Standard_CString unit)
172
return Interface_Static::SetCVal("write.iges.unit", unit);
175
bool Interface::writeIgesUnit(Interface::Unit unit)
179
return Interface_Static::SetCVal("write.iges.unit","M");
181
return Interface_Static::SetCVal("write.iges.unit","INCH");
183
return Interface_Static::SetCVal("write.iges.unit","MM");
187
Standard_CString Interface::writeIgesUnit()
189
return Interface_Static::CVal("write.iges.unit");
192
int Interface::writeIgesBrepMode()
194
return Interface_Static::IVal("write.iges.brep.mode");
197
bool Interface::writeIgesBrepMode(int mode)
199
return Interface_Static::SetIVal("write.iges.brep.mode", mode);