From c975e393652badd58b4507a5cb618386aa80a4f1 Mon Sep 17 00:00:00 2001 From: abosafia Date: Fri, 29 Nov 2024 14:14:58 +0200 Subject: [PATCH] clear leftover material when using ramp with closed curves --- scripts/addons/cam/strategy.py | 12 ++++++++---- scripts/addons/cam/ui/panels/movement.py | 9 ++++++++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/scripts/addons/cam/strategy.py b/scripts/addons/cam/strategy.py index 7244568bf..0d9cf8e1a 100644 --- a/scripts/addons/cam/strategy.py +++ b/scripts/addons/cam/strategy.py @@ -246,12 +246,16 @@ async def cutout(o): for chl in extendorder: chunk = chl[0] layer = chl[1] - if chunk.closed: - chunk.rampContour(layer[0], layer[1], o) - chunks.append(chunk) - else: + if o.movement.Zigzag_ramp: chunk.rampZigZag(layer[0], layer[1], o) chunks.append(chunk) + else: + if chunk.closed: + chunk.rampContour(layer[0], layer[1], o) + chunks.append(chunk) + else: + chunk.rampZigZag(layer[0], layer[1], o) + chunks.append(chunk) else: for chl in extendorder: chunks.append(chl[0]) diff --git a/scripts/addons/cam/ui/panels/movement.py b/scripts/addons/cam/ui/panels/movement.py index 55f4aff93..54dbae7d8 100644 --- a/scripts/addons/cam/ui/panels/movement.py +++ b/scripts/addons/cam/ui/panels/movement.py @@ -140,7 +140,12 @@ class CAM_MOVEMENT_Properties(PropertyGroup): default=False, update=update_operation, ) - + Zigzag_ramp: BoolProperty( + name="Zigzag_ramp - EXPERIMENTAL", + description="Ramps down the whole contour, so the cutline looks " "like zigzag_", + default=False, + update=update_operation, + ) ramp_out: BoolProperty( name="Ramp-out - EXPERIMENTAL", description="Ramp out to not leave mark on surface", @@ -350,6 +355,8 @@ def draw(self, context): subcol = panel.column(align=True) subcol.enabled = self.op.movement.ramp row = subcol.row() + row.prop(self.op.movement, "Zigzag_ramp", text="Zigzag Ramp") + row = subcol.row() row.use_property_split = True row.prop(self.op.movement, "ramp_in_angle", text="In Angle") subheader, subpanel = subcol.panel("ramps_o", default_closed=True)