From 876055969036df203187e2468ef12448192225f7 Mon Sep 17 00:00:00 2001 From: Joachim Schoeberl Date: Tue, 28 Sep 2021 20:11:32 +0200 Subject: [PATCH] makechamfer.Add(double,edge) needs newer occ version --- libsrc/occ/python_occ_shapes.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libsrc/occ/python_occ_shapes.cpp b/libsrc/occ/python_occ_shapes.cpp index cae7b0bf..ee013c83 100644 --- a/libsrc/occ/python_occ_shapes.cpp +++ b/libsrc/occ/python_occ_shapes.cpp @@ -1073,10 +1073,14 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m) }, py::arg("edges"), py::arg("r"), "make fillets for edges 'edges' of radius 'r'") .def("MakeChamfer", [](const TopoDS_Shape & shape, std::vector edges, double d) { +#if OCC_VERSION_MAJOR>=7 && OCC_VERSION_MINOR>=4 BRepFilletAPI_MakeChamfer mkChamfer(shape); for (auto e : edges) mkChamfer.Add (d, TopoDS::Edge(e)); return mkChamfer.Shape(); +#else + throw Exception("MakeChamfer not available"); +#endif }, py::arg("edges"), py::arg("d"), "make symmetric chamfer for edges 'edges' of distrance 'd'") .def("MakeThickSolid", [](const TopoDS_Shape & body, std::vector facestoremove,