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 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360
|
// 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_Surface.hxx>
#include <LProp_BadContinuity.hxx>
#include <LProp_NotDefined.hxx>
#include <LProp3d_CurveTool.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_Surface.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <Adaptor2d_Curve2d.hxx>
#include <Adaptor2d_Curve2d.hxx>
// module includes
#include <LProp3d_CLProps.hxx>
#include <LProp3d_CurveTool.hxx>
#include <LProp3d_SLProps.hxx>
#include <LProp3d_SurfaceTool.hxx>
// template related includes
// user-defined pre
#include "OCP_specific.inc"
// user-defined inclusion per module
// Module definiiton
void register_LProp3d(py::module &main_module) {
py::module m = static_cast<py::module>(main_module.attr("LProp3d"));
py::object klass;
//Python trampoline classes
// classes
// Class LProp3d_CLProps from ./opencascade/LProp3d_CLProps.hxx
klass = m.attr("LProp3d_CLProps");
// nested enums
static_cast<py::class_<LProp3d_CLProps , shared_ptr<LProp3d_CLProps> >>(klass)
// constructors
.def(py::init< const opencascade::handle<Adaptor3d_Curve> &,const Standard_Integer,const Standard_Real >() , py::arg("C"), py::arg("N"), py::arg("Resolution") )
.def(py::init< const opencascade::handle<Adaptor3d_Curve> &,const Standard_Real,const Standard_Integer,const Standard_Real >() , py::arg("C"), py::arg("U"), py::arg("N"), py::arg("Resolution") )
.def(py::init< const Standard_Integer,const Standard_Real >() , py::arg("N"), py::arg("Resolution") )
// custom constructors
// methods
.def("SetParameter",
(void (LProp3d_CLProps::*)( const Standard_Real ) ) static_cast<void (LProp3d_CLProps::*)( const Standard_Real ) >(&LProp3d_CLProps::SetParameter),
R"#(Initializes the local properties of the curve for the parameter value <U>.)#" , py::arg("U")
)
.def("SetCurve",
(void (LProp3d_CLProps::*)( const opencascade::handle<Adaptor3d_Curve> & ) ) static_cast<void (LProp3d_CLProps::*)( const opencascade::handle<Adaptor3d_Curve> & ) >(&LProp3d_CLProps::SetCurve),
R"#(Initializes the local properties of the curve for the new curve.)#" , py::arg("C")
)
.def("IsTangentDefined",
(Standard_Boolean (LProp3d_CLProps::*)() ) static_cast<Standard_Boolean (LProp3d_CLProps::*)() >(&LProp3d_CLProps::IsTangentDefined),
R"#(Returns True if the tangent is defined. For example, the tangent is not defined if the three first derivatives are all null.)#"
)
.def("Tangent",
(void (LProp3d_CLProps::*)( gp_Dir & ) ) static_cast<void (LProp3d_CLProps::*)( gp_Dir & ) >(&LProp3d_CLProps::Tangent),
R"#(output the tangent direction <D>)#" , py::arg("D")
)
.def("Curvature",
(Standard_Real (LProp3d_CLProps::*)() ) static_cast<Standard_Real (LProp3d_CLProps::*)() >(&LProp3d_CLProps::Curvature),
R"#(Returns the curvature.)#"
)
.def("Normal",
(void (LProp3d_CLProps::*)( gp_Dir & ) ) static_cast<void (LProp3d_CLProps::*)( gp_Dir & ) >(&LProp3d_CLProps::Normal),
R"#(Returns the normal direction <N>.)#" , py::arg("N")
)
.def("CentreOfCurvature",
(void (LProp3d_CLProps::*)( gp_Pnt & ) ) static_cast<void (LProp3d_CLProps::*)( gp_Pnt & ) >(&LProp3d_CLProps::CentreOfCurvature),
R"#(Returns the centre of curvature <P>.)#" , py::arg("P")
)
// methods using call by reference i.s.o. return
// 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
.def("Value",
(const gp_Pnt & (LProp3d_CLProps::*)() const) static_cast<const gp_Pnt & (LProp3d_CLProps::*)() const>(&LProp3d_CLProps::Value),
R"#(Returns the Point.)#"
)
.def("D1",
(const gp_Vec & (LProp3d_CLProps::*)() ) static_cast<const gp_Vec & (LProp3d_CLProps::*)() >(&LProp3d_CLProps::D1),
R"#(Returns the first derivative. The derivative is computed if it has not been yet.)#"
)
.def("D2",
(const gp_Vec & (LProp3d_CLProps::*)() ) static_cast<const gp_Vec & (LProp3d_CLProps::*)() >(&LProp3d_CLProps::D2),
R"#(Returns the second derivative. The derivative is computed if it has not been yet.)#"
)
.def("D3",
(const gp_Vec & (LProp3d_CLProps::*)() ) static_cast<const gp_Vec & (LProp3d_CLProps::*)() >(&LProp3d_CLProps::D3),
R"#(Returns the third derivative. The derivative is computed if it has not been yet.)#"
)
;
// Class LProp3d_CurveTool from ./opencascade/LProp3d_CurveTool.hxx
klass = m.attr("LProp3d_CurveTool");
// default constructor
register_default_constructor<LProp3d_CurveTool , shared_ptr<LProp3d_CurveTool>>(m,"LProp3d_CurveTool");
// nested enums
static_cast<py::class_<LProp3d_CurveTool , shared_ptr<LProp3d_CurveTool> >>(klass)
// constructors
// custom constructors
// methods
// methods using call by reference i.s.o. return
// static methods
.def_static("Value_s",
(void (*)( const opencascade::handle<Adaptor3d_Curve> & , const Standard_Real , gp_Pnt & ) ) static_cast<void (*)( const opencascade::handle<Adaptor3d_Curve> & , const Standard_Real , gp_Pnt & ) >(&LProp3d_CurveTool::Value),
R"#(Computes the point <P> of parameter <U> on the HCurve <C>.)#" , py::arg("C"), py::arg("U"), py::arg("P")
)
.def_static("D1_s",
(void (*)( const opencascade::handle<Adaptor3d_Curve> & , const Standard_Real , gp_Pnt & , gp_Vec & ) ) static_cast<void (*)( const opencascade::handle<Adaptor3d_Curve> & , const Standard_Real , gp_Pnt & , gp_Vec & ) >(&LProp3d_CurveTool::D1),
R"#(Computes the point <P> and first derivative <V1> of parameter <U> on the HCurve <C>.)#" , py::arg("C"), py::arg("U"), py::arg("P"), py::arg("V1")
)
.def_static("D2_s",
(void (*)( const opencascade::handle<Adaptor3d_Curve> & , const Standard_Real , gp_Pnt & , gp_Vec & , gp_Vec & ) ) static_cast<void (*)( const opencascade::handle<Adaptor3d_Curve> & , const Standard_Real , gp_Pnt & , gp_Vec & , gp_Vec & ) >(&LProp3d_CurveTool::D2),
R"#(Computes the point <P>, the first derivative <V1> and second derivative <V2> of parameter <U> on the HCurve <C>.)#" , py::arg("C"), py::arg("U"), py::arg("P"), py::arg("V1"), py::arg("V2")
)
.def_static("D3_s",
(void (*)( const opencascade::handle<Adaptor3d_Curve> & , const Standard_Real , gp_Pnt & , gp_Vec & , gp_Vec & , gp_Vec & ) ) static_cast<void (*)( const opencascade::handle<Adaptor3d_Curve> & , const Standard_Real , gp_Pnt & , gp_Vec & , gp_Vec & , gp_Vec & ) >(&LProp3d_CurveTool::D3),
R"#(Computes the point <P>, the first derivative <V1>, the second derivative <V2> and third derivative <V3> of parameter <U> on the HCurve <C>.)#" , py::arg("C"), py::arg("U"), py::arg("P"), py::arg("V1"), py::arg("V2"), py::arg("V3")
)
.def_static("Continuity_s",
(Standard_Integer (*)( const opencascade::handle<Adaptor3d_Curve> & ) ) static_cast<Standard_Integer (*)( const opencascade::handle<Adaptor3d_Curve> & ) >(&LProp3d_CurveTool::Continuity),
R"#(returns the order of continuity of the HCurve <C>. returns 1 : first derivative only is computable returns 2 : first and second derivative only are computable. returns 3 : first, second and third are computable.)#" , py::arg("C")
)
.def_static("FirstParameter_s",
(Standard_Real (*)( const opencascade::handle<Adaptor3d_Curve> & ) ) static_cast<Standard_Real (*)( const opencascade::handle<Adaptor3d_Curve> & ) >(&LProp3d_CurveTool::FirstParameter),
R"#(returns the first parameter bound of the HCurve.)#" , py::arg("C")
)
.def_static("LastParameter_s",
(Standard_Real (*)( const opencascade::handle<Adaptor3d_Curve> & ) ) static_cast<Standard_Real (*)( const opencascade::handle<Adaptor3d_Curve> & ) >(&LProp3d_CurveTool::LastParameter),
R"#(returns the last parameter bound of the HCurve. FirstParameter must be less than LastParamenter.)#" , py::arg("C")
)
// 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 LProp3d_SLProps from ./opencascade/LProp3d_SLProps.hxx
klass = m.attr("LProp3d_SLProps");
// nested enums
static_cast<py::class_<LProp3d_SLProps , shared_ptr<LProp3d_SLProps> >>(klass)
// constructors
.def(py::init< const opencascade::handle<Adaptor3d_Surface> &,const Standard_Real,const Standard_Real,const Standard_Integer,const Standard_Real >() , py::arg("S"), py::arg("U"), py::arg("V"), py::arg("N"), py::arg("Resolution") )
.def(py::init< const opencascade::handle<Adaptor3d_Surface> &,const Standard_Integer,const Standard_Real >() , py::arg("S"), py::arg("N"), py::arg("Resolution") )
.def(py::init< const Standard_Integer,const Standard_Real >() , py::arg("N"), py::arg("Resolution") )
// custom constructors
// methods
.def("SetSurface",
(void (LProp3d_SLProps::*)( const opencascade::handle<Adaptor3d_Surface> & ) ) static_cast<void (LProp3d_SLProps::*)( const opencascade::handle<Adaptor3d_Surface> & ) >(&LProp3d_SLProps::SetSurface),
R"#(Initializes the local properties of the surface S for the new surface.)#" , py::arg("S")
)
.def("SetParameters",
(void (LProp3d_SLProps::*)( const Standard_Real , const Standard_Real ) ) static_cast<void (LProp3d_SLProps::*)( const Standard_Real , const Standard_Real ) >(&LProp3d_SLProps::SetParameters),
R"#(Initializes the local properties of the surface S for the new parameter values (<U>, <V>).)#" , py::arg("U"), py::arg("V")
)
.def("IsTangentUDefined",
(Standard_Boolean (LProp3d_SLProps::*)() ) static_cast<Standard_Boolean (LProp3d_SLProps::*)() >(&LProp3d_SLProps::IsTangentUDefined),
R"#(returns True if the U tangent is defined. For example, the tangent is not defined if the two first U derivatives are null.)#"
)
.def("TangentU",
(void (LProp3d_SLProps::*)( gp_Dir & ) ) static_cast<void (LProp3d_SLProps::*)( gp_Dir & ) >(&LProp3d_SLProps::TangentU),
R"#(Returns the tangent direction <D> on the iso-V.)#" , py::arg("D")
)
.def("IsTangentVDefined",
(Standard_Boolean (LProp3d_SLProps::*)() ) static_cast<Standard_Boolean (LProp3d_SLProps::*)() >(&LProp3d_SLProps::IsTangentVDefined),
R"#(returns if the V tangent is defined. For example, the tangent is not defined if the two first V derivatives are null.)#"
)
.def("TangentV",
(void (LProp3d_SLProps::*)( gp_Dir & ) ) static_cast<void (LProp3d_SLProps::*)( gp_Dir & ) >(&LProp3d_SLProps::TangentV),
R"#(Returns the tangent direction <D> on the iso-V.)#" , py::arg("D")
)
.def("IsNormalDefined",
(Standard_Boolean (LProp3d_SLProps::*)() ) static_cast<Standard_Boolean (LProp3d_SLProps::*)() >(&LProp3d_SLProps::IsNormalDefined),
R"#(Tells if the normal is defined.)#"
)
.def("IsCurvatureDefined",
(Standard_Boolean (LProp3d_SLProps::*)() ) static_cast<Standard_Boolean (LProp3d_SLProps::*)() >(&LProp3d_SLProps::IsCurvatureDefined),
R"#(returns True if the curvature is defined.)#"
)
.def("IsUmbilic",
(Standard_Boolean (LProp3d_SLProps::*)() ) static_cast<Standard_Boolean (LProp3d_SLProps::*)() >(&LProp3d_SLProps::IsUmbilic),
R"#(returns True if the point is umbilic (i.e. if the curvature is constant).)#"
)
.def("MaxCurvature",
(Standard_Real (LProp3d_SLProps::*)() ) static_cast<Standard_Real (LProp3d_SLProps::*)() >(&LProp3d_SLProps::MaxCurvature),
R"#(Returns the maximum curvature)#"
)
.def("MinCurvature",
(Standard_Real (LProp3d_SLProps::*)() ) static_cast<Standard_Real (LProp3d_SLProps::*)() >(&LProp3d_SLProps::MinCurvature),
R"#(Returns the minimum curvature)#"
)
.def("CurvatureDirections",
(void (LProp3d_SLProps::*)( gp_Dir & , gp_Dir & ) ) static_cast<void (LProp3d_SLProps::*)( gp_Dir & , gp_Dir & ) >(&LProp3d_SLProps::CurvatureDirections),
R"#(Returns the direction of the maximum and minimum curvature <MaxD> and <MinD>)#" , py::arg("MaxD"), py::arg("MinD")
)
.def("MeanCurvature",
(Standard_Real (LProp3d_SLProps::*)() ) static_cast<Standard_Real (LProp3d_SLProps::*)() >(&LProp3d_SLProps::MeanCurvature),
R"#(Returns the mean curvature.)#"
)
.def("GaussianCurvature",
(Standard_Real (LProp3d_SLProps::*)() ) static_cast<Standard_Real (LProp3d_SLProps::*)() >(&LProp3d_SLProps::GaussianCurvature),
R"#(Returns the Gaussian curvature)#"
)
// methods using call by reference i.s.o. return
// 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
.def("Value",
(const gp_Pnt & (LProp3d_SLProps::*)() const) static_cast<const gp_Pnt & (LProp3d_SLProps::*)() const>(&LProp3d_SLProps::Value),
R"#(Returns the point.)#"
)
.def("D1U",
(const gp_Vec & (LProp3d_SLProps::*)() ) static_cast<const gp_Vec & (LProp3d_SLProps::*)() >(&LProp3d_SLProps::D1U),
R"#(Returns the first U derivative. The derivative is computed if it has not been yet.)#"
)
.def("D1V",
(const gp_Vec & (LProp3d_SLProps::*)() ) static_cast<const gp_Vec & (LProp3d_SLProps::*)() >(&LProp3d_SLProps::D1V),
R"#(Returns the first V derivative. The derivative is computed if it has not been yet.)#"
)
.def("D2U",
(const gp_Vec & (LProp3d_SLProps::*)() ) static_cast<const gp_Vec & (LProp3d_SLProps::*)() >(&LProp3d_SLProps::D2U),
R"#(Returns the second U derivatives The derivative is computed if it has not been yet.)#"
)
.def("D2V",
(const gp_Vec & (LProp3d_SLProps::*)() ) static_cast<const gp_Vec & (LProp3d_SLProps::*)() >(&LProp3d_SLProps::D2V),
R"#(Returns the second V derivative. The derivative is computed if it has not been yet.)#"
)
.def("DUV",
(const gp_Vec & (LProp3d_SLProps::*)() ) static_cast<const gp_Vec & (LProp3d_SLProps::*)() >(&LProp3d_SLProps::DUV),
R"#(Returns the second UV cross-derivative. The derivative is computed if it has not been yet.)#"
)
.def("Normal",
(const gp_Dir & (LProp3d_SLProps::*)() ) static_cast<const gp_Dir & (LProp3d_SLProps::*)() >(&LProp3d_SLProps::Normal),
R"#(Returns the normal direction.)#"
)
;
// Class LProp3d_SurfaceTool from ./opencascade/LProp3d_SurfaceTool.hxx
klass = m.attr("LProp3d_SurfaceTool");
// default constructor
register_default_constructor<LProp3d_SurfaceTool , shared_ptr<LProp3d_SurfaceTool>>(m,"LProp3d_SurfaceTool");
// nested enums
static_cast<py::class_<LProp3d_SurfaceTool , shared_ptr<LProp3d_SurfaceTool> >>(klass)
// constructors
// custom constructors
// methods
// methods using call by reference i.s.o. return
// static methods
.def_static("Value_s",
(void (*)( const opencascade::handle<Adaptor3d_Surface> & , const Standard_Real , const Standard_Real , gp_Pnt & ) ) static_cast<void (*)( const opencascade::handle<Adaptor3d_Surface> & , const Standard_Real , const Standard_Real , gp_Pnt & ) >(&LProp3d_SurfaceTool::Value),
R"#(Computes the point <P> of parameter <U> and <V> on the HSurface <S>.)#" , py::arg("S"), py::arg("U"), py::arg("V"), py::arg("P")
)
.def_static("D1_s",
(void (*)( const opencascade::handle<Adaptor3d_Surface> & , const Standard_Real , const Standard_Real , gp_Pnt & , gp_Vec & , gp_Vec & ) ) static_cast<void (*)( const opencascade::handle<Adaptor3d_Surface> & , const Standard_Real , const Standard_Real , gp_Pnt & , gp_Vec & , gp_Vec & ) >(&LProp3d_SurfaceTool::D1),
R"#(Computes the point <P> and first derivative <D1*> of parameter <U> and <V> on the HSurface <S>.)#" , py::arg("S"), py::arg("U"), py::arg("V"), py::arg("P"), py::arg("D1U"), py::arg("D1V")
)
.def_static("D2_s",
(void (*)( const opencascade::handle<Adaptor3d_Surface> & , const Standard_Real , const Standard_Real , gp_Pnt & , gp_Vec & , gp_Vec & , gp_Vec & , gp_Vec & , gp_Vec & ) ) static_cast<void (*)( const opencascade::handle<Adaptor3d_Surface> & , const Standard_Real , const Standard_Real , gp_Pnt & , gp_Vec & , gp_Vec & , gp_Vec & , gp_Vec & , gp_Vec & ) >(&LProp3d_SurfaceTool::D2),
R"#(Computes the point <P>, the first derivative <D1*> and second derivative <D2*> of parameter <U> and <V> on the HSurface <S>.)#" , py::arg("S"), py::arg("U"), py::arg("V"), py::arg("P"), py::arg("D1U"), py::arg("D1V"), py::arg("D2U"), py::arg("D2V"), py::arg("DUV")
)
.def_static("DN_s",
(gp_Vec (*)( const opencascade::handle<Adaptor3d_Surface> & , const Standard_Real , const Standard_Real , const Standard_Integer , const Standard_Integer ) ) static_cast<gp_Vec (*)( const opencascade::handle<Adaptor3d_Surface> & , const Standard_Real , const Standard_Real , const Standard_Integer , const Standard_Integer ) >(&LProp3d_SurfaceTool::DN),
R"#(None)#" , py::arg("S"), py::arg("U"), py::arg("V"), py::arg("IU"), py::arg("IV")
)
.def_static("Continuity_s",
(Standard_Integer (*)( const opencascade::handle<Adaptor3d_Surface> & ) ) static_cast<Standard_Integer (*)( const opencascade::handle<Adaptor3d_Surface> & ) >(&LProp3d_SurfaceTool::Continuity),
R"#(returns the order of continuity of the HSurface <S>. returns 1 : first derivative only is computable returns 2 : first and second derivative only are computable.)#" , py::arg("S")
)
// static methods using call by reference i.s.o. return
.def_static("Bounds_s",
[](const opencascade::handle<Adaptor3d_Surface> & S ){
Standard_Real U1;
Standard_Real V1;
Standard_Real U2;
Standard_Real V2;
LProp3d_SurfaceTool::Bounds(S,U1,V1,U2,V2);
return std::make_tuple(U1,V1,U2,V2); },
R"#(returns the bounds of the HSurface.)#" , py::arg("S")
)
// operators
// additional methods and static methods
// properties
// methods returning by ref wrapped as properties
;
// functions
// ./opencascade/LProp3d_CLProps.hxx
// ./opencascade/LProp3d_CurveTool.hxx
// ./opencascade/LProp3d_SLProps.hxx
// ./opencascade/LProp3d_SurfaceTool.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
|