kopia lustrzana https://github.com/vilemduha/blendercam
rodzic
17e3770bfa
commit
585e39a21a
Plik binarny nie jest wyświetlany.
|
@ -1,10 +1,4 @@
|
|||
import Polygon
|
||||
|
||||
import shapely
|
||||
from shapely.geometry import polygon as spolygon
|
||||
from shapely import ops
|
||||
from shapely import geometry
|
||||
|
||||
from cam import simple
|
||||
from cam.simple import *
|
||||
|
||||
|
@ -613,27 +607,6 @@ def parentChild(parents, children, o):
|
|||
parent.children.append(child)
|
||||
child.parents.append(parent)
|
||||
|
||||
def chunksToShapely(chunks):#this does more cleve chunks to Poly with hierarchies... ;)
|
||||
#print ('analyzing paths')
|
||||
#verts=[]
|
||||
#pverts=[]
|
||||
polys=[]
|
||||
for ch in chunks:#first convert chunk to poly
|
||||
if len(ch.points)>2:
|
||||
pchunk=[]
|
||||
for v in ch.points:
|
||||
pchunk.append((v[0],v[1]))
|
||||
ch.poly=spolygon.Polygon(pchunk)
|
||||
#ch.poly.simplify()
|
||||
|
||||
|
||||
returnpolys=[]
|
||||
|
||||
for ch in chunks:#export only the booleaned polygons
|
||||
returnpolys.append(ch.poly)
|
||||
#print(len(returnpolys))
|
||||
return returnpolys
|
||||
|
||||
def chunksToPolys(chunks):#this does more cleve chunks to Poly with hierarchies... ;)
|
||||
#print ('analyzing paths')
|
||||
#verts=[]
|
||||
|
|
|
@ -1278,11 +1278,7 @@ def curveToPolys(cob):
|
|||
chunks=curveToChunks(cob)
|
||||
polys=chunksToPolys(chunks)
|
||||
return polys
|
||||
|
||||
def curveToShapely(cob):
|
||||
chunks=curveToChunks(cob)
|
||||
polys=chunksToShapely(chunks)
|
||||
return polys
|
||||
|
||||
#separate function in blender, so you can offset any curve.
|
||||
#FIXME: same algorithms as the cutout strategy, because that is hierarchy-respecting.
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue