feat(ops): cut_rsolid_list keeps every piece; cut_rsolid refuses to drop pieces
A cut that splits the body returned only the first solid from cut_rsolid, silently losing the rest (a slot through a bar reported half the volume). cut_rsolid_list returns all pieces (empty when the body is consumed), is recorded as make_cut_rsolid_list and replays. cut_rsolid now raises when the result is not exactly one solid and names cut_rsolid_list. Tests that relied on the dropped sliver of a tangent cut use a tool that does not touch the walls. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -473,6 +473,17 @@ void bind_booleans(py::module_& m) {
|
||||
py::kw_only(), py::arg("skip_non_intersecting") = true, py::arg("tracking_policy") = "full",
|
||||
"Compute the boolean difference of solids: the first is the base, the rest are subtracted in order.");
|
||||
|
||||
m.def(
|
||||
"cut_rsolid_list",
|
||||
[](const py::args& solids, bool skip_non_intersecting, const py::object& tracking_policy) {
|
||||
const std::vector<Solid> operands = flattened(solids, "cut_rsolid_list");
|
||||
const CutOptions options{skip_non_intersecting, policy_text(tracking_policy)};
|
||||
return solids_to_py(unlocked(false, [&] { return cut_rsolid_list(operands, options); }));
|
||||
},
|
||||
py::kw_only(), py::arg("skip_non_intersecting") = true, py::arg("tracking_policy") = "full",
|
||||
"Compute the boolean difference of solids and keep every piece: a cut that splits the body returns each part, "
|
||||
"and one that consumes the body returns an empty list.");
|
||||
|
||||
m.def(
|
||||
"intersect_rsolid",
|
||||
[](const py::args& solids) {
|
||||
|
||||
Reference in New Issue
Block a user