makechamfer.Add(double,edge) needs newer occ version

This commit is contained in:
Joachim Schoeberl 2021-09-28 20:11:32 +02:00
parent 0862327937
commit 8760559690

View File

@ -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<TopoDS_Shape> 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<TopoDS_Shape> facestoremove,