File: Geom2dAdaptor.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 (265 lines) | stat: -rw-r--r-- 14,158 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

// 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 <Geom2d_Curve.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_Surface.hxx>
#include <Geom2d_BezierCurve.hxx>
#include <Geom2d_BSplineCurve.hxx>

// module includes
#include <Geom2dAdaptor.hxx>
#include <Geom2dAdaptor_Curve.hxx>

// template related includes


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

// user-defined inclusion per module

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


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

//Python trampoline classes

// classes

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

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

    // nested enums

    static_cast<py::class_<Geom2dAdaptor , shared_ptr<Geom2dAdaptor>  >>(klass)
    // constructors
    // custom constructors
    // methods
    // methods using call by reference i.s.o. return
    // static methods
        .def_static("MakeCurve_s",
                    (opencascade::handle<Geom2d_Curve> (*)( const Adaptor2d_Curve2d &  ) ) static_cast<opencascade::handle<Geom2d_Curve> (*)( const Adaptor2d_Curve2d &  ) >(&Geom2dAdaptor::MakeCurve),
                    R"#(Inherited from GHCurve. Provides a curve handled by reference. Creates a 2d curve from a HCurve2d. This cannot process the OtherCurves.)#"  , py::arg("HC")
          )
    // 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 Geom2dAdaptor_Curve from ./opencascade/Geom2dAdaptor_Curve.hxx
    klass = m.attr("Geom2dAdaptor_Curve");


    // nested enums

    static_cast<py::class_<Geom2dAdaptor_Curve ,opencascade::handle<Geom2dAdaptor_Curve>  , Adaptor2d_Curve2d >>(klass)
    // constructors
        .def(py::init<  >()  )
        .def(py::init< const opencascade::handle<Geom2d_Curve> & >()  , py::arg("C") )
        .def(py::init< const opencascade::handle<Geom2d_Curve> &,const Standard_Real,const Standard_Real >()  , py::arg("C"),  py::arg("UFirst"),  py::arg("ULast") )
    // custom constructors
    // methods
        .def("ShallowCopy",
             (opencascade::handle<Adaptor2d_Curve2d> (Geom2dAdaptor_Curve::*)() const) static_cast<opencascade::handle<Adaptor2d_Curve2d> (Geom2dAdaptor_Curve::*)() const>(&Geom2dAdaptor_Curve::ShallowCopy),
             R"#(Shallow copy of adaptor)#" 
          )
        .def("Reset",
             (void (Geom2dAdaptor_Curve::*)() ) static_cast<void (Geom2dAdaptor_Curve::*)() >(&Geom2dAdaptor_Curve::Reset),
             R"#(Reset currently loaded curve (undone Load()).)#" 
          )
        .def("Load",
             (void (Geom2dAdaptor_Curve::*)( const opencascade::handle<Geom2d_Curve> &  ) ) static_cast<void (Geom2dAdaptor_Curve::*)( const opencascade::handle<Geom2d_Curve> &  ) >(&Geom2dAdaptor_Curve::Load),
             R"#(None)#"  , py::arg("theCurve")
          )
        .def("Load",
             (void (Geom2dAdaptor_Curve::*)( const opencascade::handle<Geom2d_Curve> & ,  const Standard_Real ,  const Standard_Real  ) ) static_cast<void (Geom2dAdaptor_Curve::*)( const opencascade::handle<Geom2d_Curve> & ,  const Standard_Real ,  const Standard_Real  ) >(&Geom2dAdaptor_Curve::Load),
             R"#(Standard_ConstructionError is raised if theUFirst>theULast)#"  , py::arg("theCurve"),  py::arg("theUFirst"),  py::arg("theULast")
          )
        .def("FirstParameter",
             (Standard_Real (Geom2dAdaptor_Curve::*)() const) static_cast<Standard_Real (Geom2dAdaptor_Curve::*)() const>(&Geom2dAdaptor_Curve::FirstParameter),
             R"#(None)#" 
          )
        .def("LastParameter",
             (Standard_Real (Geom2dAdaptor_Curve::*)() const) static_cast<Standard_Real (Geom2dAdaptor_Curve::*)() const>(&Geom2dAdaptor_Curve::LastParameter),
             R"#(None)#" 
          )
        .def("Continuity",
             (GeomAbs_Shape (Geom2dAdaptor_Curve::*)() const) static_cast<GeomAbs_Shape (Geom2dAdaptor_Curve::*)() const>(&Geom2dAdaptor_Curve::Continuity),
             R"#(None)#" 
          )
        .def("NbIntervals",
             (Standard_Integer (Geom2dAdaptor_Curve::*)( const GeomAbs_Shape  ) const) static_cast<Standard_Integer (Geom2dAdaptor_Curve::*)( const GeomAbs_Shape  ) const>(&Geom2dAdaptor_Curve::NbIntervals),
             R"#(If necessary, breaks the curve in intervals of continuity <S>. And returns the number of intervals.)#"  , py::arg("S")
          )
        .def("Intervals",
             (void (Geom2dAdaptor_Curve::*)( NCollection_Array1<Standard_Real> & ,  const GeomAbs_Shape  ) const) static_cast<void (Geom2dAdaptor_Curve::*)( NCollection_Array1<Standard_Real> & ,  const GeomAbs_Shape  ) const>(&Geom2dAdaptor_Curve::Intervals),
             R"#(Stores in <T> the parameters bounding the intervals of continuity <S>.)#"  , py::arg("T"),  py::arg("S")
          )
        .def("Trim",
             (opencascade::handle<Adaptor2d_Curve2d> (Geom2dAdaptor_Curve::*)( const Standard_Real ,  const Standard_Real ,  const Standard_Real  ) const) static_cast<opencascade::handle<Adaptor2d_Curve2d> (Geom2dAdaptor_Curve::*)( const Standard_Real ,  const Standard_Real ,  const Standard_Real  ) const>(&Geom2dAdaptor_Curve::Trim),
             R"#(Returns a curve equivalent of <me> between parameters <First> and <Last>. <Tol> is used to test for 3d points confusion. If <First> >= <Last>)#"  , py::arg("First"),  py::arg("Last"),  py::arg("Tol")
          )
        .def("IsClosed",
             (Standard_Boolean (Geom2dAdaptor_Curve::*)() const) static_cast<Standard_Boolean (Geom2dAdaptor_Curve::*)() const>(&Geom2dAdaptor_Curve::IsClosed),
             R"#(None)#" 
          )
        .def("IsPeriodic",
             (Standard_Boolean (Geom2dAdaptor_Curve::*)() const) static_cast<Standard_Boolean (Geom2dAdaptor_Curve::*)() const>(&Geom2dAdaptor_Curve::IsPeriodic),
             R"#(None)#" 
          )
        .def("Period",
             (Standard_Real (Geom2dAdaptor_Curve::*)() const) static_cast<Standard_Real (Geom2dAdaptor_Curve::*)() const>(&Geom2dAdaptor_Curve::Period),
             R"#(None)#" 
          )
        .def("Value",
             (gp_Pnt2d (Geom2dAdaptor_Curve::*)( const Standard_Real  ) const) static_cast<gp_Pnt2d (Geom2dAdaptor_Curve::*)( const Standard_Real  ) const>(&Geom2dAdaptor_Curve::Value),
             R"#(Computes the point of parameter U on the curve)#"  , py::arg("U")
          )
        .def("D0",
             (void (Geom2dAdaptor_Curve::*)( const Standard_Real ,  gp_Pnt2d &  ) const) static_cast<void (Geom2dAdaptor_Curve::*)( const Standard_Real ,  gp_Pnt2d &  ) const>(&Geom2dAdaptor_Curve::D0),
             R"#(Computes the point of parameter U.)#"  , py::arg("U"),  py::arg("P")
          )
        .def("D1",
             (void (Geom2dAdaptor_Curve::*)( const Standard_Real ,  gp_Pnt2d & ,  gp_Vec2d &  ) const) static_cast<void (Geom2dAdaptor_Curve::*)( const Standard_Real ,  gp_Pnt2d & ,  gp_Vec2d &  ) const>(&Geom2dAdaptor_Curve::D1),
             R"#(Computes the point of parameter U on the curve with its first derivative. Raised if the continuity of the current interval is not C1.)#"  , py::arg("U"),  py::arg("P"),  py::arg("V")
          )
        .def("D2",
             (void (Geom2dAdaptor_Curve::*)( const Standard_Real ,  gp_Pnt2d & ,  gp_Vec2d & ,  gp_Vec2d &  ) const) static_cast<void (Geom2dAdaptor_Curve::*)( const Standard_Real ,  gp_Pnt2d & ,  gp_Vec2d & ,  gp_Vec2d &  ) const>(&Geom2dAdaptor_Curve::D2),
             R"#(Returns the point P of parameter U, the first and second derivatives V1 and V2. Raised if the continuity of the current interval is not C2.)#"  , py::arg("U"),  py::arg("P"),  py::arg("V1"),  py::arg("V2")
          )
        .def("D3",
             (void (Geom2dAdaptor_Curve::*)( const Standard_Real ,  gp_Pnt2d & ,  gp_Vec2d & ,  gp_Vec2d & ,  gp_Vec2d &  ) const) static_cast<void (Geom2dAdaptor_Curve::*)( const Standard_Real ,  gp_Pnt2d & ,  gp_Vec2d & ,  gp_Vec2d & ,  gp_Vec2d &  ) const>(&Geom2dAdaptor_Curve::D3),
             R"#(Returns the point P of parameter U, the first, the second and the third derivative. Raised if the continuity of the current interval is not C3.)#"  , py::arg("U"),  py::arg("P"),  py::arg("V1"),  py::arg("V2"),  py::arg("V3")
          )
        .def("DN",
             (gp_Vec2d (Geom2dAdaptor_Curve::*)( const Standard_Real ,  const Standard_Integer  ) const) static_cast<gp_Vec2d (Geom2dAdaptor_Curve::*)( const Standard_Real ,  const Standard_Integer  ) const>(&Geom2dAdaptor_Curve::DN),
             R"#(The returned vector gives the value of the derivative for the order of derivation N. Raised if the continuity of the current interval is not CN. Raised if N < 1.)#"  , py::arg("U"),  py::arg("N")
          )
        .def("Resolution",
             (Standard_Real (Geom2dAdaptor_Curve::*)( const Standard_Real  ) const) static_cast<Standard_Real (Geom2dAdaptor_Curve::*)( const Standard_Real  ) const>(&Geom2dAdaptor_Curve::Resolution),
             R"#(returns the parametric resolution)#"  , py::arg("Ruv")
          )
        .def("GetType",
             (GeomAbs_CurveType (Geom2dAdaptor_Curve::*)() const) static_cast<GeomAbs_CurveType (Geom2dAdaptor_Curve::*)() const>(&Geom2dAdaptor_Curve::GetType),
             R"#(None)#" 
          )
        .def("Line",
             (gp_Lin2d (Geom2dAdaptor_Curve::*)() const) static_cast<gp_Lin2d (Geom2dAdaptor_Curve::*)() const>(&Geom2dAdaptor_Curve::Line),
             R"#(None)#" 
          )
        .def("Circle",
             (gp_Circ2d (Geom2dAdaptor_Curve::*)() const) static_cast<gp_Circ2d (Geom2dAdaptor_Curve::*)() const>(&Geom2dAdaptor_Curve::Circle),
             R"#(None)#" 
          )
        .def("Ellipse",
             (gp_Elips2d (Geom2dAdaptor_Curve::*)() const) static_cast<gp_Elips2d (Geom2dAdaptor_Curve::*)() const>(&Geom2dAdaptor_Curve::Ellipse),
             R"#(None)#" 
          )
        .def("Hyperbola",
             (gp_Hypr2d (Geom2dAdaptor_Curve::*)() const) static_cast<gp_Hypr2d (Geom2dAdaptor_Curve::*)() const>(&Geom2dAdaptor_Curve::Hyperbola),
             R"#(None)#" 
          )
        .def("Parabola",
             (gp_Parab2d (Geom2dAdaptor_Curve::*)() const) static_cast<gp_Parab2d (Geom2dAdaptor_Curve::*)() const>(&Geom2dAdaptor_Curve::Parabola),
             R"#(None)#" 
          )
        .def("Degree",
             (Standard_Integer (Geom2dAdaptor_Curve::*)() const) static_cast<Standard_Integer (Geom2dAdaptor_Curve::*)() const>(&Geom2dAdaptor_Curve::Degree),
             R"#(None)#" 
          )
        .def("IsRational",
             (Standard_Boolean (Geom2dAdaptor_Curve::*)() const) static_cast<Standard_Boolean (Geom2dAdaptor_Curve::*)() const>(&Geom2dAdaptor_Curve::IsRational),
             R"#(None)#" 
          )
        .def("NbPoles",
             (Standard_Integer (Geom2dAdaptor_Curve::*)() const) static_cast<Standard_Integer (Geom2dAdaptor_Curve::*)() const>(&Geom2dAdaptor_Curve::NbPoles),
             R"#(None)#" 
          )
        .def("NbKnots",
             (Standard_Integer (Geom2dAdaptor_Curve::*)() const) static_cast<Standard_Integer (Geom2dAdaptor_Curve::*)() const>(&Geom2dAdaptor_Curve::NbKnots),
             R"#(None)#" 
          )
        .def("NbSamples",
             (Standard_Integer (Geom2dAdaptor_Curve::*)() const) static_cast<Standard_Integer (Geom2dAdaptor_Curve::*)() const>(&Geom2dAdaptor_Curve::NbSamples),
             R"#(None)#" 
          )
        .def("Bezier",
             (opencascade::handle<Geom2d_BezierCurve> (Geom2dAdaptor_Curve::*)() const) static_cast<opencascade::handle<Geom2d_BezierCurve> (Geom2dAdaptor_Curve::*)() const>(&Geom2dAdaptor_Curve::Bezier),
             R"#(None)#" 
          )
        .def("BSpline",
             (opencascade::handle<Geom2d_BSplineCurve> (Geom2dAdaptor_Curve::*)() const) static_cast<opencascade::handle<Geom2d_BSplineCurve> (Geom2dAdaptor_Curve::*)() const>(&Geom2dAdaptor_Curve::BSpline),
             R"#(None)#" 
          )
    // methods using call by reference i.s.o. return
    // static methods
        .def_static("get_type_name_s",
                    (const char * (*)() ) static_cast<const char * (*)() >(&Geom2dAdaptor_Curve::get_type_name),
                    R"#(None)#" 
          )
        .def_static("get_type_descriptor_s",
                    (const opencascade::handle<Standard_Type> & (*)() ) static_cast<const opencascade::handle<Standard_Type> & (*)() >(&Geom2dAdaptor_Curve::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> & (Geom2dAdaptor_Curve::*)() const) static_cast<const opencascade::handle<Standard_Type> & (Geom2dAdaptor_Curve::*)() const>(&Geom2dAdaptor_Curve::DynamicType),
             R"#(None)#"
             
         )
       .def("Curve",
             (const opencascade::handle<Geom2d_Curve> & (Geom2dAdaptor_Curve::*)() const) static_cast<const opencascade::handle<Geom2d_Curve> & (Geom2dAdaptor_Curve::*)() const>(&Geom2dAdaptor_Curve::Curve),
             R"#(None)#"
             
         )
;

// functions
// ./opencascade/Geom2dAdaptor.hxx
// ./opencascade/Geom2dAdaptor_Curve.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