orca: review fix -- fins that reach no layer say nothing was added, not N walls

This commit is contained in:
matthewtrahan authored and Matthew Trahan committed 2026-10-01 07:33:44 -05:00
1 parent 520a271a77
commit 07160d659f
2 files changed
+12 -1

No files matched your search

+4 -1
View File
@@ -318,7 +318,10 @@ def inject_fins(print_object, cfg, layer_height, unit, log=None):
touched += 1
log["layers"].append([round(z, 4), round(sum(e.area() for e in expolys) * unit * unit, 4)])
log["layers_touched"] = touched
return host_report(stats) # the same line every plugin shows
report = host_report(stats) # the same line every plugin shows
if touched == 0: # placed, but no layer took them: the overhangs are still bare
report += "; none of it reached a layer, so nothing was added (see support_fins_log.jsonl)"
return report
class SupportFinsSlicing(orca.slicing.SlicingPipelineCapabilityBase):
+8
View File
@@ -124,6 +124,14 @@ def test_no_fins_still_reports_overhangs_left_bare(monkeypatch):
assert SF.inject_fins(po, dict(SF._DEFAULTS), 0.2, 1e-6) == "no fins needed"
def test_fins_that_reach_no_layer_are_not_reported_as_added(monkeypatch):
part = trimesh.load(MODELS / "cube.stl")
po = fake_orca.FakePrintObject(part, rot_x(45, (50, 50, 0)))
far = np.array([[[0, 0, 900.0], [1, 0, 900.0], [0, 1, 901.0]]]) # above every layer
monkeypatch.setattr(SF, "compute_fins", lambda *a: (far, {"braces": 1, "tines": 2}))
assert "nothing was added" in SF.inject_fins(po, dict(SF._DEFAULTS), 0.2, 1e-6)
def test_fins_actually_add_material_under_the_overhang():
po, res, want, _ = run_case("cube", rot_x(45, (50, 50, 0)))
part_only = fake_orca.FakePrintObject(trimesh.load(MODELS / "cube.stl"), rot_x(45, (50, 50, 0)))