File: VrmlAPI.cpp

package info (click to toggle)
python-ocp 7.8.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 64,720 kB
  • sloc: cpp: 362,337; pascal: 33; python: 23; makefile: 4
file content (279 lines) | stat: -rw-r--r-- 13,545 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279

// std lib related includes
#include <tuple>

// pybind 11 related includes
#include <pybind11/pybind11.h>
#include <pybind11/stl.h>

namespace py = pybind11;

// Standard Handle
#include <Standard_Handle.hxx>


// includes to resolve forward declarations
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_Surface.hxx>
#include <TopoDS_Shape.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_Surface.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_Surface.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_Surface.hxx>
#include <Vrml_Material.hxx>
#include <TopoDS_Shape.hxx>
#include <TDocStd_Document.hxx>

// module includes
#include <VrmlAPI.hxx>
#include <VrmlAPI_CafReader.hxx>
#include <VrmlAPI_RepresentationOfShape.hxx>
#include <VrmlAPI_Writer.hxx>

// template related includes


// user-defined pre
#include "OCP_specific.inc"

// user-defined inclusion per module
#include <VrmlConverter_Drawer.hxx>

// Module definiiton
void register_VrmlAPI(py::module &main_module) {


py::module m = static_cast<py::module>(main_module.attr("VrmlAPI"));
py::object klass;

//Python trampoline classes

// classes

    // Class VrmlAPI from ./opencascade/VrmlAPI.hxx
    klass = m.attr("VrmlAPI");

    // default constructor
    register_default_constructor<VrmlAPI , shared_ptr<VrmlAPI>>(m,"VrmlAPI");

    // nested enums

    static_cast<py::class_<VrmlAPI , shared_ptr<VrmlAPI>  >>(klass)
    // constructors
    // custom constructors
    // methods
    // methods using call by reference i.s.o. return
    // static methods
        .def_static("Write_s",
                    (Standard_Boolean (*)( const TopoDS_Shape & ,  const Standard_CString ,  const Standard_Integer  ) ) static_cast<Standard_Boolean (*)( const TopoDS_Shape & ,  const Standard_CString ,  const Standard_Integer  ) >(&VrmlAPI::Write),
                    R"#(With help of this class user can change parameters of writing. Converts the shape aShape to VRML format of the passed version and writes it to the file identified by aFileName using default parameters.)#"  , py::arg("aShape"),  py::arg("aFileName"),  py::arg("aVersion")=static_cast<const Standard_Integer>(2)
          )
    // static methods using call by reference i.s.o. return
    // operators
    // additional methods and static methods
    // properties
    // methods returning by ref wrapped as properties
;

    // Class VrmlAPI_CafReader from ./opencascade/VrmlAPI_CafReader.hxx
    klass = m.attr("VrmlAPI_CafReader");

    // default constructor
    register_default_constructor<VrmlAPI_CafReader ,opencascade::handle<VrmlAPI_CafReader>>(m,"VrmlAPI_CafReader");

    // nested enums

    static_cast<py::class_<VrmlAPI_CafReader ,opencascade::handle<VrmlAPI_CafReader>  >>(klass)
    // constructors
    // custom constructors
    // methods
    // methods using call by reference i.s.o. return
    // static methods
        .def_static("get_type_name_s",
                    (const char * (*)() ) static_cast<const char * (*)() >(&VrmlAPI_CafReader::get_type_name),
                    R"#(None)#" 
          )
        .def_static("get_type_descriptor_s",
                    (const opencascade::handle<Standard_Type> & (*)() ) static_cast<const opencascade::handle<Standard_Type> & (*)() >(&VrmlAPI_CafReader::get_type_descriptor),
                    R"#(None)#" 
          )
    // static methods using call by reference i.s.o. return
    // operators
    // additional methods and static methods
    // properties
    // methods returning by ref wrapped as properties
       .def("DynamicType",
             (const opencascade::handle<Standard_Type> & (VrmlAPI_CafReader::*)() const) static_cast<const opencascade::handle<Standard_Type> & (VrmlAPI_CafReader::*)() const>(&VrmlAPI_CafReader::DynamicType),
             R"#(None)#"
             
         )
;

    // Class VrmlAPI_Writer from ./opencascade/VrmlAPI_Writer.hxx
    klass = m.attr("VrmlAPI_Writer");


    // nested enums

    static_cast<py::class_<VrmlAPI_Writer , shared_ptr<VrmlAPI_Writer>  >>(klass)
    // constructors
        .def(py::init<  >()  )
    // custom constructors
    // methods
        .def("ResetToDefaults",
             (void (VrmlAPI_Writer::*)() ) static_cast<void (VrmlAPI_Writer::*)() >(&VrmlAPI_Writer::ResetToDefaults),
             R"#(Resets all parameters (representation, deflection) to their default values..)#" 
          )
        .def("Drawer",
             (opencascade::handle<VrmlConverter_Drawer> (VrmlAPI_Writer::*)() const) static_cast<opencascade::handle<VrmlConverter_Drawer> (VrmlAPI_Writer::*)() const>(&VrmlAPI_Writer::Drawer),
             R"#(Returns drawer object)#" 
          )
        .def("SetDeflection",
             (void (VrmlAPI_Writer::*)( const Standard_Real  ) ) static_cast<void (VrmlAPI_Writer::*)( const Standard_Real  ) >(&VrmlAPI_Writer::SetDeflection),
             R"#(Sets the deflection aDef of the mesh algorithm which is used to compute the shaded representation of the translated shape. The default value is -1. When the deflection value is less than 0, the deflection is calculated from the relative size of the shaped.)#"  , py::arg("aDef")
          )
        .def("SetRepresentation",
             (void (VrmlAPI_Writer::*)( const VrmlAPI_RepresentationOfShape  ) ) static_cast<void (VrmlAPI_Writer::*)( const VrmlAPI_RepresentationOfShape  ) >(&VrmlAPI_Writer::SetRepresentation),
             R"#(Sets the representation of the shape aRep which is written to the VRML file. The three options are : - shaded - wireframe - both shaded and wireframe (default) defined through the VrmlAPI_RepresentationOfShape enumeration.)#"  , py::arg("aRep")
          )
        .def("GetRepresentation",
             (VrmlAPI_RepresentationOfShape (VrmlAPI_Writer::*)() const) static_cast<VrmlAPI_RepresentationOfShape (VrmlAPI_Writer::*)() const>(&VrmlAPI_Writer::GetRepresentation),
             R"#(Returns the representation of the shape which is written to the VRML file. Types of representation are set through the VrmlAPI_RepresentationOfShape enumeration.)#" 
          )
        .def("GetFrontMaterial",
             (opencascade::handle<Vrml_Material> (VrmlAPI_Writer::*)() const) static_cast<opencascade::handle<Vrml_Material> (VrmlAPI_Writer::*)() const>(&VrmlAPI_Writer::GetFrontMaterial),
             R"#(None)#" 
          )
        .def("GetPointsMaterial",
             (opencascade::handle<Vrml_Material> (VrmlAPI_Writer::*)() const) static_cast<opencascade::handle<Vrml_Material> (VrmlAPI_Writer::*)() const>(&VrmlAPI_Writer::GetPointsMaterial),
             R"#(None)#" 
          )
        .def("GetUisoMaterial",
             (opencascade::handle<Vrml_Material> (VrmlAPI_Writer::*)() const) static_cast<opencascade::handle<Vrml_Material> (VrmlAPI_Writer::*)() const>(&VrmlAPI_Writer::GetUisoMaterial),
             R"#(None)#" 
          )
        .def("GetVisoMaterial",
             (opencascade::handle<Vrml_Material> (VrmlAPI_Writer::*)() const) static_cast<opencascade::handle<Vrml_Material> (VrmlAPI_Writer::*)() const>(&VrmlAPI_Writer::GetVisoMaterial),
             R"#(None)#" 
          )
        .def("GetLineMaterial",
             (opencascade::handle<Vrml_Material> (VrmlAPI_Writer::*)() const) static_cast<opencascade::handle<Vrml_Material> (VrmlAPI_Writer::*)() const>(&VrmlAPI_Writer::GetLineMaterial),
             R"#(None)#" 
          )
        .def("GetWireMaterial",
             (opencascade::handle<Vrml_Material> (VrmlAPI_Writer::*)() const) static_cast<opencascade::handle<Vrml_Material> (VrmlAPI_Writer::*)() const>(&VrmlAPI_Writer::GetWireMaterial),
             R"#(None)#" 
          )
        .def("GetFreeBoundsMaterial",
             (opencascade::handle<Vrml_Material> (VrmlAPI_Writer::*)() const) static_cast<opencascade::handle<Vrml_Material> (VrmlAPI_Writer::*)() const>(&VrmlAPI_Writer::GetFreeBoundsMaterial),
             R"#(None)#" 
          )
        .def("GetUnfreeBoundsMaterial",
             (opencascade::handle<Vrml_Material> (VrmlAPI_Writer::*)() const) static_cast<opencascade::handle<Vrml_Material> (VrmlAPI_Writer::*)() const>(&VrmlAPI_Writer::GetUnfreeBoundsMaterial),
             R"#(None)#" 
          )
        .def("Write",
             (Standard_Boolean (VrmlAPI_Writer::*)( const TopoDS_Shape & ,  const Standard_CString ,  const Standard_Integer  ) const) static_cast<Standard_Boolean (VrmlAPI_Writer::*)( const TopoDS_Shape & ,  const Standard_CString ,  const Standard_Integer  ) const>(&VrmlAPI_Writer::Write),
             R"#(Converts the shape aShape to VRML format of the passed version and writes it to the file identified by aFile.)#"  , py::arg("aShape"),  py::arg("aFile"),  py::arg("aVersion")=static_cast<const Standard_Integer>(2)
          )
        .def("WriteDoc",
             (Standard_Boolean (VrmlAPI_Writer::*)( const opencascade::handle<TDocStd_Document> & ,  const Standard_CString ,  const Standard_Real  ) const) static_cast<Standard_Boolean (VrmlAPI_Writer::*)( const opencascade::handle<TDocStd_Document> & ,  const Standard_CString ,  const Standard_Real  ) const>(&VrmlAPI_Writer::WriteDoc),
             R"#(Converts the document to VRML format of the passed version and writes it to the file identified by aFile.)#"  , py::arg("theDoc"),  py::arg("theFile"),  py::arg("theScale")
          )
    // methods using call by reference i.s.o. return
        .def("SetTransparencyToMaterial",
             []( VrmlAPI_Writer &self , Vrml_Material& aMaterial,const Standard_Real aTransparency ){
                 opencascade::handle<Vrml_Material>  aMaterial_ptr; aMaterial_ptr = &aMaterial;

                 self.SetTransparencyToMaterial(aMaterial_ptr,aTransparency);
                 if ( aMaterial_ptr.get() != &aMaterial ) copy_if_copy_constructible(aMaterial, *aMaterial_ptr);

                 return std::make_tuple(); },
             R"#(Set transparency to given material)#"  , py::arg("aMaterial"),  py::arg("aTransparency")
          )
        .def("SetShininessToMaterial",
             []( VrmlAPI_Writer &self , Vrml_Material& aMaterial,const Standard_Real aShininess ){
                 opencascade::handle<Vrml_Material>  aMaterial_ptr; aMaterial_ptr = &aMaterial;

                 self.SetShininessToMaterial(aMaterial_ptr,aShininess);
                 if ( aMaterial_ptr.get() != &aMaterial ) copy_if_copy_constructible(aMaterial, *aMaterial_ptr);

                 return std::make_tuple(); },
             R"#(None)#"  , py::arg("aMaterial"),  py::arg("aShininess")
          )
        .def("SetAmbientColorToMaterial",
             []( VrmlAPI_Writer &self , Vrml_Material& aMaterial,const opencascade::handle<Quantity_HArray1OfColor> & Color ){
                 opencascade::handle<Vrml_Material>  aMaterial_ptr; aMaterial_ptr = &aMaterial;

                 self.SetAmbientColorToMaterial(aMaterial_ptr,Color);
                 if ( aMaterial_ptr.get() != &aMaterial ) copy_if_copy_constructible(aMaterial, *aMaterial_ptr);

                 return std::make_tuple(); },
             R"#(None)#"  , py::arg("aMaterial"),  py::arg("Color")
          )
        .def("SetDiffuseColorToMaterial",
             []( VrmlAPI_Writer &self , Vrml_Material& aMaterial,const opencascade::handle<Quantity_HArray1OfColor> & Color ){
                 opencascade::handle<Vrml_Material>  aMaterial_ptr; aMaterial_ptr = &aMaterial;

                 self.SetDiffuseColorToMaterial(aMaterial_ptr,Color);
                 if ( aMaterial_ptr.get() != &aMaterial ) copy_if_copy_constructible(aMaterial, *aMaterial_ptr);

                 return std::make_tuple(); },
             R"#(None)#"  , py::arg("aMaterial"),  py::arg("Color")
          )
        .def("SetSpecularColorToMaterial",
             []( VrmlAPI_Writer &self , Vrml_Material& aMaterial,const opencascade::handle<Quantity_HArray1OfColor> & Color ){
                 opencascade::handle<Vrml_Material>  aMaterial_ptr; aMaterial_ptr = &aMaterial;

                 self.SetSpecularColorToMaterial(aMaterial_ptr,Color);
                 if ( aMaterial_ptr.get() != &aMaterial ) copy_if_copy_constructible(aMaterial, *aMaterial_ptr);

                 return std::make_tuple(); },
             R"#(None)#"  , py::arg("aMaterial"),  py::arg("Color")
          )
        .def("SetEmissiveColorToMaterial",
             []( VrmlAPI_Writer &self , Vrml_Material& aMaterial,const opencascade::handle<Quantity_HArray1OfColor> & Color ){
                 opencascade::handle<Vrml_Material>  aMaterial_ptr; aMaterial_ptr = &aMaterial;

                 self.SetEmissiveColorToMaterial(aMaterial_ptr,Color);
                 if ( aMaterial_ptr.get() != &aMaterial ) copy_if_copy_constructible(aMaterial, *aMaterial_ptr);

                 return std::make_tuple(); },
             R"#(None)#"  , py::arg("aMaterial"),  py::arg("Color")
          )
    // static methods
    // static methods using call by reference i.s.o. return
    // operators
    // additional methods and static methods
    // properties
    // methods returning by ref wrapped as properties
;

// functions
// ./opencascade/VrmlAPI.hxx
// ./opencascade/VrmlAPI_CafReader.hxx
// ./opencascade/VrmlAPI_RepresentationOfShape.hxx
// ./opencascade/VrmlAPI_Writer.hxx

// Additional functions

// operators

// register typdefs


// exceptions

// user-defined post-inclusion per module in the body

};

// user-defined post-inclusion per module

// user-defined post