Skip to content

Commit

Permalink
Merge pull request #214 from abosafia/master
Browse files Browse the repository at this point in the history
fix ramp if contour
  • Loading branch information
pppalain authored Nov 29, 2024
2 parents 35d065d + c975e39 commit b79e000
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
12 changes: 8 additions & 4 deletions scripts/addons/cam/strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down
9 changes: 8 additions & 1 deletion scripts/addons/cam/ui/panels/movement.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit b79e000

Please sign in to comment.