add skin to ui for project curve to surface

add limit curve the ui for waterline as it works there aswell
also fix waterline skin thickness in the z direction by moving the slice
line down by the skin thickness.
pull/292/head
Fredrik Hansson 2025-01-09 19:25:32 +01:00
rodzic 88ecd37d3e
commit eb5244ed2a
4 zmienionych plików z 10 dodań i 7 usunięć

Wyświetl plik

@ -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...
@ -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)
@ -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)
@ -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)

Wyświetl plik

@ -100,7 +100,7 @@ class CAM_AREA_Panel(CAMParentPanel, Panel):
# 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)

Wyświetl plik

@ -125,6 +125,7 @@ class CAM_OPERATION_PROPERTIES_Panel(CAMParentPanel, Panel):
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")
@ -192,6 +193,7 @@ class CAM_OPERATION_PROPERTIES_Panel(CAMParentPanel, Panel):
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)

Wyświetl plik

@ -120,6 +120,6 @@ class CAM_OPERATIONS_Panel(CAMParentPanel, Panel):
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")