/* OCP.BRepBndLib — bounding box of a shape. Only Add is used. ``useTriangulation`` matters to callers: with an existing mesh it is both faster and tighter than the default, which enlarges the box by the surfaces' own tolerance. */ #include "../common/occt_module.h" #include "../common/occt_policies.h" #include #include #include void register_BRepBndLib(nb::module_ &root) { nb::module_ m = ocp_submodule(root, "BRepBndLib"); nb::class_ cls(m, "BRepBndLib"); OCP_DEF_S( cls, "Add", [](const TopoDS_Shape &S, Bnd_Box &B, Standard_Boolean useTriangulation) { BRepBndLib::Add(S, B, useTriangulation); }, "S"_a, "B"_a, "useTriangulation"_a = Standard_True, OCP_NOGIL); OCP_DEF_S( cls, "AddOptimal", [](const TopoDS_Shape &S, Bnd_Box &B, Standard_Boolean useTriangulation, Standard_Boolean useShapeTolerance) { BRepBndLib::AddOptimal(S, B, useTriangulation, useShapeTolerance); }, "S"_a, "B"_a, "useTriangulation"_a = Standard_True, "useShapeTolerance"_a = Standard_False, OCP_NOGIL); }