mirror of
https://github.com/NGSolve/netgen.git
synced 2025-05-04 17:50:50 +05:00
Fix segfault in occ (use Handle when creating new Geom_Plane)
This commit is contained in:
parent
6ea09e1151
commit
1fc382867d
@ -1964,21 +1964,21 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m)
|
|||||||
})
|
})
|
||||||
.def("Edge", [](Handle(Geom2d_Curve) curve) {
|
.def("Edge", [](Handle(Geom2d_Curve) curve) {
|
||||||
// static Geom_Plane surf{gp_Ax3()}; // crashes in nbconvert ???
|
// 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();
|
auto edge = BRepBuilderAPI_MakeEdge(curve, surf).Edge();
|
||||||
BRepLib::BuildCurves3d(edge);
|
BRepLib::BuildCurves3d(edge);
|
||||||
return edge;
|
return edge;
|
||||||
})
|
})
|
||||||
.def("Wire", [](Handle(Geom2d_Curve) curve) {
|
.def("Wire", [](Handle(Geom2d_Curve) curve) {
|
||||||
// static Geom_Plane surf{gp_Ax3()}; // crashes in nbconvert ???
|
// 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();
|
auto edge = BRepBuilderAPI_MakeEdge(curve, surf).Edge();
|
||||||
BRepLib::BuildCurves3d(edge);
|
BRepLib::BuildCurves3d(edge);
|
||||||
return BRepBuilderAPI_MakeWire(edge).Wire();
|
return BRepBuilderAPI_MakeWire(edge).Wire();
|
||||||
})
|
})
|
||||||
.def("Face", [](Handle(Geom2d_Curve) curve) {
|
.def("Face", [](Handle(Geom2d_Curve) curve) {
|
||||||
// static Geom_Plane surf{gp_Ax3()}; // crashes in nbconvert ???
|
// 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();
|
auto edge = BRepBuilderAPI_MakeEdge(curve, surf).Edge();
|
||||||
BRepLib::BuildCurves3d(edge);
|
BRepLib::BuildCurves3d(edge);
|
||||||
auto wire = BRepBuilderAPI_MakeWire(edge).Wire();
|
auto wire = BRepBuilderAPI_MakeWire(edge).Wire();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user