From f887c60bde033fef7ca4daad528a8a45f112144f Mon Sep 17 00:00:00 2001 From: Christopher Lackner Date: Thu, 22 May 2025 13:57:46 +0200 Subject: [PATCH] add SetTolerance to shape --- libsrc/occ/python_occ_shapes.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libsrc/occ/python_occ_shapes.cpp b/libsrc/occ/python_occ_shapes.cpp index 1a487aa6..a91d2405 100644 --- a/libsrc/occ/python_occ_shapes.cpp +++ b/libsrc/occ/python_occ_shapes.cpp @@ -783,6 +783,12 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m) fix.LimitTolerance(self, tmin, tmax, type); }, py::arg("tmin"), py::arg("tmax")=0., py::arg("type")=TopAbs_SHAPE, "limit tolerance of shape to range [tmin, tmax]") + .def("SetTolerance", [](TopoDS_Shape& self, double tol, + TopAbs_ShapeEnum stype) + { + ShapeFix_ShapeTolerance fix; + fix.SetTolerance(self, tol, stype); + }, py::arg("tol"), py::arg("stype")=TopAbs_SHAPE, "set (enforce) tolerance of shape to 't'") .def("Properties", [] (const TopoDS_Shape & shape) {