diff --git a/libsrc/occ/python_occ_shapes.cpp b/libsrc/occ/python_occ_shapes.cpp index 76949344..795a7947 100644 --- a/libsrc/occ/python_occ_shapes.cpp +++ b/libsrc/occ/python_occ_shapes.cpp @@ -1964,21 +1964,21 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m) }) .def("Edge", [](Handle(Geom2d_Curve) curve) { // static Geom_Plane surf{gp_Ax3()}; // crashes in nbconvert ??? - static auto surf = new Geom_Plane{gp_Ax3()}; + static auto surf = Handle(Geom_Plane)(new Geom_Plane{gp_Ax3()}); auto edge = BRepBuilderAPI_MakeEdge(curve, surf).Edge(); BRepLib::BuildCurves3d(edge); return edge; }) .def("Wire", [](Handle(Geom2d_Curve) curve) { // static Geom_Plane surf{gp_Ax3()}; // crashes in nbconvert ??? - static auto surf = new Geom_Plane{gp_Ax3()}; + static auto surf = Handle(Geom_Plane)(new Geom_Plane{gp_Ax3()}); auto edge = BRepBuilderAPI_MakeEdge(curve, surf).Edge(); BRepLib::BuildCurves3d(edge); return BRepBuilderAPI_MakeWire(edge).Wire(); }) .def("Face", [](Handle(Geom2d_Curve) curve) { // static Geom_Plane surf{gp_Ax3()}; // crashes in nbconvert ??? - static auto surf = new Geom_Plane{gp_Ax3()}; + static auto surf = Handle(Geom_Plane)(new Geom_Plane{gp_Ax3()}); auto edge = BRepBuilderAPI_MakeEdge(curve, surf).Edge(); BRepLib::BuildCurves3d(edge); auto wire = BRepBuilderAPI_MakeWire(edge).Wire();