From 3ab8ffbdc196bf45922d8f9aa6468356df8d2c9c Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Thu, 8 Jun 2023 16:50:53 +0300 Subject: [PATCH] robust Axis to Axes conversion --- libsrc/occ/python_occ_basic.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libsrc/occ/python_occ_basic.cpp b/libsrc/occ/python_occ_basic.cpp index 56322b39..d84e78d1 100644 --- a/libsrc/occ/python_occ_basic.cpp +++ b/libsrc/occ/python_occ_basic.cpp @@ -152,9 +152,7 @@ DLL_HEADER void ExportNgOCCBasic(py::module &m) return gp_Ax3(p,N, Vx); }), py::arg("p")=gp_Pnt(0,0,0), py::arg("n")=gp_Vec(0,0,1), py::arg("h")=gp_Vec(1,0,0)) .def(py::init([](gp_Ax1 ax1) { - gp_Ax3 ax; - ax.SetAxis(ax1); - return ax; + return gp_Ax3(ax1.Location(), ax1.Direction()); }), py::arg("axis")) .def(py::init()) .def_property("p", [](gp_Ax3 & ax) { return ax.Location(); }, [](gp_Ax3&ax, gp_Pnt p) { ax.SetLocation(p); })