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
|
// 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 <Adaptor2d_Curve2d.hxx>
#include <Adaptor3d_Curve.hxx>
#include <Adaptor3d_Surface.hxx>
// module includes
#include <IVtkVTK_ShapeData.hxx>
#include <IVtkVTK_View.hxx>
// template related includes
// user-defined pre
#include "OCP_specific.inc"
// user-defined inclusion per module
#include <vtkRenderer.h>
#include "vtk_pybind.h"
// Module definiiton
void register_IVtkVTK(py::module &main_module) {
py::module m = static_cast<py::module>(main_module.attr("IVtkVTK"));
py::object klass;
//Python trampoline classes
// classes
// Class IVtkVTK_ShapeData from ./opencascade/IVtkVTK_ShapeData.hxx
klass = m.attr("IVtkVTK_ShapeData");
// nested enums
static_cast<py::class_<IVtkVTK_ShapeData ,opencascade::handle<IVtkVTK_ShapeData> , IVtk_IShapeData >>(klass)
// constructors
.def(py::init< >() )
// custom constructors
// methods
.def("InsertPoint",
(IVtk_PointId (IVtkVTK_ShapeData::*)( const gp_Pnt & , const NCollection_Vec3<float> & ) ) static_cast<IVtk_PointId (IVtkVTK_ShapeData::*)( const gp_Pnt & , const NCollection_Vec3<float> & ) >(&IVtkVTK_ShapeData::InsertPoint),
R"#(Insert a coordinate)#" , py::arg("thePnt"), py::arg("theNorm")
)
.def("InsertVertex",
(void (IVtkVTK_ShapeData::*)( const IVtk_IdType , const IVtk_PointId , const IVtk_MeshType ) ) static_cast<void (IVtkVTK_ShapeData::*)( const IVtk_IdType , const IVtk_PointId , const IVtk_MeshType ) >(&IVtkVTK_ShapeData::InsertVertex),
R"#(Insert a vertex.)#" , py::arg("theShapeID"), py::arg("thePointId"), py::arg("theMeshType")
)
.def("InsertLine",
(void (IVtkVTK_ShapeData::*)( const IVtk_IdType , const IVtk_PointId , const IVtk_PointId , const IVtk_MeshType ) ) static_cast<void (IVtkVTK_ShapeData::*)( const IVtk_IdType , const IVtk_PointId , const IVtk_PointId , const IVtk_MeshType ) >(&IVtkVTK_ShapeData::InsertLine),
R"#(Insert a line.)#" , py::arg("theShapeID"), py::arg("thePointId1"), py::arg("thePointId2"), py::arg("theMeshType")
)
.def("InsertLine",
(void (IVtkVTK_ShapeData::*)( const IVtk_IdType , const NCollection_List<IVtk_PointId> * , const IVtk_MeshType ) ) static_cast<void (IVtkVTK_ShapeData::*)( const IVtk_IdType , const NCollection_List<IVtk_PointId> * , const IVtk_MeshType ) >(&IVtkVTK_ShapeData::InsertLine),
R"#(Insert a poly-line.)#" , py::arg("theShapeID"), py::arg("thePointIds"), py::arg("theMeshType")
)
.def("InsertTriangle",
(void (IVtkVTK_ShapeData::*)( const IVtk_IdType , const IVtk_PointId , const IVtk_PointId , const IVtk_PointId , const IVtk_MeshType ) ) static_cast<void (IVtkVTK_ShapeData::*)( const IVtk_IdType , const IVtk_PointId , const IVtk_PointId , const IVtk_PointId , const IVtk_MeshType ) >(&IVtkVTK_ShapeData::InsertTriangle),
R"#(Insert a triangle)#" , py::arg("theShapeID"), py::arg("thePointId1"), py::arg("thePointId2"), py::arg("thePointId3"), py::arg("theMeshType")
)
.def("getVtkPolyData",
(vtkPolyData * (IVtkVTK_ShapeData::*)() const) static_cast<vtkPolyData * (IVtkVTK_ShapeData::*)() const>(&IVtkVTK_ShapeData::getVtkPolyData),
R"#(Get VTK PolyData.)#"
)
// methods using call by reference i.s.o. return
// static methods
.def_static("ARRNAME_SUBSHAPE_IDS_s",
(const char * (*)() ) static_cast<const char * (*)() >(&IVtkVTK_ShapeData::ARRNAME_SUBSHAPE_IDS),
R"#(None)#"
)
.def_static("ARRNAME_MESH_TYPES_s",
(const char * (*)() ) static_cast<const char * (*)() >(&IVtkVTK_ShapeData::ARRNAME_MESH_TYPES),
R"#(None)#"
)
.def_static("get_type_name_s",
(const char * (*)() ) static_cast<const char * (*)() >(&IVtkVTK_ShapeData::get_type_name),
R"#(None)#"
)
.def_static("get_type_descriptor_s",
(const opencascade::handle<Standard_Type> & (*)() ) static_cast<const opencascade::handle<Standard_Type> & (*)() >(&IVtkVTK_ShapeData::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> & (IVtkVTK_ShapeData::*)() const) static_cast<const opencascade::handle<Standard_Type> & (IVtkVTK_ShapeData::*)() const>(&IVtkVTK_ShapeData::DynamicType),
R"#(None)#"
)
;
// Class IVtkVTK_View from ./opencascade/IVtkVTK_View.hxx
klass = m.attr("IVtkVTK_View");
// nested enums
static_cast<py::class_<IVtkVTK_View ,opencascade::handle<IVtkVTK_View> , IVtk_IView >>(klass)
// constructors
.def(py::init< vtkRenderer * >() , py::arg("theRenderer") )
// custom constructors
// methods
.def("IsPerspective",
(bool (IVtkVTK_View::*)() const) static_cast<bool (IVtkVTK_View::*)() const>(&IVtkVTK_View::IsPerspective),
R"#(Returns true if this is a perspective view, and false otherwise.)#"
)
.def("GetDistance",
(double (IVtkVTK_View::*)() const) static_cast<double (IVtkVTK_View::*)() const>(&IVtkVTK_View::GetDistance),
R"#(Returns The focal distance of the view)#"
)
.def("GetEyePosition",
(void (IVtkVTK_View::*)( double & , double & , double & ) const) static_cast<void (IVtkVTK_View::*)( double & , double & , double & ) const>(&IVtkVTK_View::GetEyePosition),
R"#(Returns The world coordinates of the camera position)#" , py::arg("theX"), py::arg("theY"), py::arg("theZ")
)
.def("GetPosition",
(void (IVtkVTK_View::*)( double & , double & , double & ) const) static_cast<void (IVtkVTK_View::*)( double & , double & , double & ) const>(&IVtkVTK_View::GetPosition),
R"#(Returns The world coordinates of the view position)#" , py::arg("theX"), py::arg("theY"), py::arg("theZ")
)
.def("GetViewUp",
(void (IVtkVTK_View::*)( double & , double & , double & ) const) static_cast<void (IVtkVTK_View::*)( double & , double & , double & ) const>(&IVtkVTK_View::GetViewUp),
R"#(Returns The "view up" direction of the view)#" , py::arg("theDx"), py::arg("theDy"), py::arg("theDz")
)
.def("GetDirectionOfProjection",
(void (IVtkVTK_View::*)( double & , double & , double & ) const) static_cast<void (IVtkVTK_View::*)( double & , double & , double & ) const>(&IVtkVTK_View::GetDirectionOfProjection),
R"#(Returns The projection direction vector of this view)#" , py::arg("theDx"), py::arg("theDy"), py::arg("theDz")
)
.def("GetScale",
(void (IVtkVTK_View::*)( double & , double & , double & ) const) static_cast<void (IVtkVTK_View::*)( double & , double & , double & ) const>(&IVtkVTK_View::GetScale),
R"#(Returns Three doubles containing scale components of the view transformation)#" , py::arg("theX"), py::arg("theY"), py::arg("theZ")
)
.def("GetParallelScale",
(double (IVtkVTK_View::*)() const) static_cast<double (IVtkVTK_View::*)() const>(&IVtkVTK_View::GetParallelScale),
R"#(Returns The current view's zoom factor (for parallel projection))#"
)
.def("GetViewAngle",
(double (IVtkVTK_View::*)() const) static_cast<double (IVtkVTK_View::*)() const>(&IVtkVTK_View::GetViewAngle),
R"#(Returns The current view angle (for perspective projection))#"
)
.def("GetClippingRange",
(void (IVtkVTK_View::*)( double & , double & ) const) static_cast<void (IVtkVTK_View::*)( double & , double & ) const>(&IVtkVTK_View::GetClippingRange),
R"#(Returns The location of the near and far clipping planes along the direction of projection)#" , py::arg("theZNear"), py::arg("theZFar")
)
.def("GetAspectRatio",
(double (IVtkVTK_View::*)() const) static_cast<double (IVtkVTK_View::*)() const>(&IVtkVTK_View::GetAspectRatio),
R"#(Returns The current view the aspect ratio)#"
)
.def("GetViewCenter",
(void (IVtkVTK_View::*)( double & , double & ) const) static_cast<void (IVtkVTK_View::*)( double & , double & ) const>(&IVtkVTK_View::GetViewCenter),
R"#(Returns Two doubles containing the display coordinates of the view window center)#" , py::arg("theX"), py::arg("theY")
)
.def("GetWindowSize",
(void (IVtkVTK_View::*)( int & , int & ) const) static_cast<void (IVtkVTK_View::*)( int & , int & ) const>(&IVtkVTK_View::GetWindowSize),
R"#(Gets window size in screen coordinates in pixels)#" , py::arg("theX"), py::arg("theY")
)
.def("DisplayToWorld",
(bool (IVtkVTK_View::*)( const gp_XY & , gp_XYZ & ) const) static_cast<bool (IVtkVTK_View::*)( const gp_XY & , gp_XYZ & ) const>(&IVtkVTK_View::DisplayToWorld),
R"#(Converts 3D display coordinates into 3D world coordinates.)#" , py::arg("theDisplayPnt"), py::arg("theWorldPnt")
)
// methods using call by reference i.s.o. return
.def("GetCamera",
[]( IVtkVTK_View &self , NCollection_Mat4<Standard_Real> & theProj,NCollection_Mat4<Standard_Real> & theOrient ){
Standard_Boolean theIsOrtho;
self.GetCamera(theProj,theOrient,theIsOrtho);
return std::make_tuple(theIsOrtho); },
R"#(Gets camera projection and orientation matrices)#" , py::arg("theProj"), py::arg("theOrient")
)
.def("GetViewport",
[]( IVtkVTK_View &self ){
Standard_Real theX;
Standard_Real theY;
Standard_Real theWidth;
Standard_Real theHeight;
self.GetViewport(theX,theY,theWidth,theHeight);
return std::make_tuple(theX,theY,theWidth,theHeight); },
R"#(Gets viewport coordinates)#"
)
// static methods
.def_static("get_type_name_s",
(const char * (*)() ) static_cast<const char * (*)() >(&IVtkVTK_View::get_type_name),
R"#(None)#"
)
.def_static("get_type_descriptor_s",
(const opencascade::handle<Standard_Type> & (*)() ) static_cast<const opencascade::handle<Standard_Type> & (*)() >(&IVtkVTK_View::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> & (IVtkVTK_View::*)() const) static_cast<const opencascade::handle<Standard_Type> & (IVtkVTK_View::*)() const>(&IVtkVTK_View::DynamicType),
R"#(None)#"
)
;
// functions
// ./opencascade/IVtkVTK_ShapeData.hxx
// ./opencascade/IVtkVTK_View.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
|