kopia lustrzana https://github.com/vilemduha/blendercam
- waterline fixes for inverse milling
- option to project paths with waterline is backpull/4/head
rodzic
f4137cfe62
commit
5aad441a10
|
@ -213,7 +213,7 @@ class camOperation(bpy.types.PropertyGroup):
|
|||
|
||||
slice_detail = bpy.props.FloatProperty(name="Distance betwen slices", default=0.001, min=0.00001, max=32,precision=PRECISION, unit="LENGTH")
|
||||
waterline_fill = bpy.props.BoolProperty(name="Fill areas between slices",description="Fill areas between slices in waterline mode", default=True)
|
||||
|
||||
waterline_project = bpy.props.BoolProperty(name="Project paths",description="Project paths in areas between slices", default=True)
|
||||
|
||||
circle_detail = bpy.props.IntProperty(name="Detail of circles used for curve offsets", default=64, min=12, max=512)
|
||||
use_layers = bpy.props.BoolProperty(name="Use Layers",description="Use layers for roughing", default=True)
|
||||
|
@ -1064,7 +1064,7 @@ class CAM_OPERATION_PROPERTIES_Panel(bpy.types.Panel):
|
|||
layout.prop(ao,'waterline_fill')
|
||||
if ao.waterline_fill:
|
||||
layout.prop(ao,'dist_between_paths')
|
||||
|
||||
layout.prop(ao,'waterline_project')
|
||||
layout.prop(ao,'skin')
|
||||
layout.prop(ao,'inverse')
|
||||
elif ao.strategy=='CARVE':
|
||||
|
|
|
@ -4083,7 +4083,7 @@ def getPaths(context,operation):#should do all path calculations.
|
|||
else:
|
||||
restpoly=lastslice-poly#Polygon.Polygon(lastslice)
|
||||
#print('filling between')
|
||||
if (len(poly)==0 and slicesfilled>0):#first slice fill
|
||||
if (not o.inverse and len(poly)==0 and slicesfilled>0) or (o.inverse and len(poly)>0 and slicesfilled==1):#first slice fill
|
||||
restpoly=lastslice
|
||||
#print('filling first')
|
||||
|
||||
|
@ -4093,8 +4093,9 @@ def getPaths(context,operation):#should do all path calculations.
|
|||
while len(restpoly)>0:
|
||||
nchunks=polyToChunks(restpoly,fillz)
|
||||
#project paths TODO: path projection during waterline is not working
|
||||
#nchunks=chunksRefine(nchunks,o)
|
||||
#nchunks=sampleChunks(o,nchunks,layers)
|
||||
if o.waterline_project:
|
||||
nchunks=chunksRefine(nchunks,o)
|
||||
nchunks=sampleChunks(o,nchunks,layers)
|
||||
|
||||
#########################
|
||||
slicechunks.extend(nchunks)
|
||||
|
@ -4105,12 +4106,14 @@ def getPaths(context,operation):#should do all path calculations.
|
|||
i+=1
|
||||
#print(i)
|
||||
i=0
|
||||
if (slicesfilled>0 and layerstepinc==layerstep) or (len(poly)>0 and slicesfilled==1):# fill layers and last slice
|
||||
if (slicesfilled>0 and layerstepinc==layerstep) or (not o.inverse and len(poly)>0 and slicesfilled==1) or (o.inverse and len(poly)==0 and slicesfilled>0):# fill layers and last slice
|
||||
fillz=z
|
||||
layerstepinc=0
|
||||
if o.ambient_behaviour=='AROUND':#TODO: use getAmbient
|
||||
ilim=ceil(o.ambient_radius/o.dist_between_paths)
|
||||
restpoly=poly
|
||||
if (o.inverse and len(poly)==0 and slicesfilled>0):
|
||||
restpoly=lastslice
|
||||
offs=True
|
||||
else:
|
||||
ilim=1000#TODO:this should be replaced... no limit, just check if the shape grows over limits.
|
||||
|
@ -4118,6 +4121,8 @@ def getPaths(context,operation):#should do all path calculations.
|
|||
offs=False
|
||||
boundrect=Polygon.Polygon(((o.min.x,o.min.y),(o.min.x,o.max.y),(o.max.x,o.max.y),(o.max.x,o.min.y)))
|
||||
restpoly=boundrect-poly
|
||||
if (o.inverse and len(poly)==0 and slicesfilled>0):
|
||||
restpoly=boundrect-lastslice
|
||||
|
||||
restpoly=outlinePoly(restpoly,o.dist_between_paths,o,offs)
|
||||
i=0
|
||||
|
|
Ładowanie…
Reference in New Issue