Skip to content

Commit

Permalink
Merge branch 'pppalain:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
SpectralVectors authored Jan 11, 2025
2 parents f14ac5d + 6c9d95d commit 3354d3b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
9 changes: 5 additions & 4 deletions scripts/addons/cam/gcode_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -901,7 +901,8 @@ async def get_path_3_axis(context, operation):
for h in range(0, nslices):
layerstepinc += 1
slicechunks = []
z = o.min_z + h * o.slice_detail
# lower the layer by the skin value so the slice gets done at the tip of the tool
z = o.min_z + h * o.slice_detail - o.skin
if h == 0:
z += 0.0000001
# if people do mill flat areas, this helps to reach those...
Expand All @@ -915,7 +916,7 @@ async def get_path_3_axis(context, operation):

for p in slicepolys.geoms:
poly = poly.union(p) # polygversion TODO: why is this added?
nchunks = shapely_to_chunks(p, z)
nchunks = shapely_to_chunks(p, z + o.skin)
nchunks = limit_chunks(nchunks, o, force=True)
lastchunks.extend(nchunks)
slicechunks.extend(nchunks)
Expand Down Expand Up @@ -951,7 +952,7 @@ async def get_path_3_axis(context, operation):
fillz = z
i = 0
while not restpoly.is_empty:
nchunks = shapely_to_chunks(restpoly, fillz)
nchunks = shapely_to_chunks(restpoly, fillz + o.skin)
# project paths TODO: path projection during waterline is not working
if o.waterline_project:
nchunks = chunks_refine(nchunks, o)
Expand Down Expand Up @@ -993,7 +994,7 @@ async def get_path_3_axis(context, operation):
# 'GeometryCollection':#len(restpoly.boundary.coords)>0:
while not restpoly.is_empty:
# print(i)
nchunks = shapely_to_chunks(restpoly, fillz)
nchunks = shapely_to_chunks(restpoly, fillz + o.skin)
#########################
nchunks = limit_chunks(nchunks, o, force=True)
slicechunks.extend(nchunks)
Expand Down
2 changes: 1 addition & 1 deletion scripts/addons/cam/ui/panels/area_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def draw(self, context):

# Draw Limit Curve
if self.level >= 1:
if self.op.strategy in ["BLOCK", "SPIRAL", "CIRCLES", "PARALLEL", "CROSS"]:
if self.op.strategy in ["BLOCK", "SPIRAL", "CIRCLES", "PARALLEL", "CROSS", "WATERLINE"]:
main.use_property_split = False
col = main.column(align=False)
header, panel = col.panel("limit", default_closed=True)
Expand Down
2 changes: 2 additions & 0 deletions scripts/addons/cam/ui/panels/op_properties_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ def draw(self, context):
if self.op.strategy in ["CARVE"]:
col = box.column(align=True)
col.prop(self.op, "carve_depth", text="Depth")
col.prop(self.op, "skin")
box = col.box()
sub = box.column(align=True)
sub.label(text="Toolpath Distance")
Expand Down Expand Up @@ -192,6 +193,7 @@ def draw(self, context):
row.use_property_split = False
row.prop(self.op, "inverse")
if self.op.strategy in ["PARALLEL", "CROSS"]:
col.prop(self.op, "skin")
col.prop(self.op, "parallel_angle")
box = col.box()
col = box.column(align=True)
Expand Down
4 changes: 2 additions & 2 deletions scripts/addons/cam/ui/panels/operations_panel.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,6 @@ def draw(self, context):
col.prop_search(self.op, "source_image_name", bpy.data, "images")

if self.op.strategy in ["CARVE", "PROJECTED_CURVE"]:
col.prop_search(self.op, "curve_object", bpy.data, "objects")
col.prop_search(self.op, "curve_source", bpy.data, "objects")
if self.op.strategy == "PROJECTED_CURVE":
col.prop_search(self.op, "curve_object1", bpy.data, "objects")
col.prop_search(self.op, "curve_target", bpy.data, "objects")

0 comments on commit 3354d3b

Please sign in to comment.