kopia lustrzana https://github.com/vilemduha/blendercam
Medial axis is now limited by cutter diameter
Before, it was going always in the middle which was non-sense... now, it can be combined with a reasonably set pocket operation for milling stamps and similar.pull/25/head
rodzic
775ee04081
commit
1c469394d7
|
|
@ -101,11 +101,13 @@ def shapelyToCoords(anydata):
|
|||
clen=0
|
||||
seq=[]
|
||||
#print(p.boundary.coordsd)
|
||||
for sp in p:
|
||||
for sp in p:#TODO
|
||||
#seq.append(shapelyToCoords(sp))
|
||||
clen+=len(sp.exterior.coords)
|
||||
seq.append(sp.exterior.coords)
|
||||
for interior in sp.interiors:
|
||||
seq.extend(interior.coords)
|
||||
|
||||
#for g in p.geom:
|
||||
# print(g.type)
|
||||
|
||||
|
|
|
|||
|
|
@ -2974,10 +2974,18 @@ def getPath3axis(context, operation):
|
|||
filteredEdgs.append(((vertr[e[0]][1],vertr[e[1]][1])))
|
||||
ledges.append(sgeometry.LineString((filteredPts[vertr[e[0]][1]],filteredPts[vertr[e[1]][1]])))
|
||||
#print(ledges[-1].has_z)
|
||||
|
||||
|
||||
|
||||
bufpoly = poly.buffer(-o.cutter_diameter/2, resolution = 64)
|
||||
|
||||
lines = shapely.ops.linemerge(ledges)
|
||||
#shapelyToCurve('test',lines,0)
|
||||
#print(lines.type)
|
||||
|
||||
if bufpoly.type=='Polygon' or bufpoly.type=='MultiPolygon':
|
||||
lines=lines.difference(bufpoly)
|
||||
chunks.extend(shapelyToChunks(bufpoly,maxdepth))
|
||||
chunks.extend( shapelyToChunks(lines,0))
|
||||
|
||||
#segments=[]
|
||||
#processEdges=filteredEdgs.copy()
|
||||
#chunk=camPathChunk([])
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue