Revert "little shapely functions"

This reverts commit 17e3770bfa.
pull/7/merge
vilemnovak 2015-12-07 11:08:18 +01:00
rodzic 17e3770bfa
commit 585e39a21a
3 zmienionych plików z 1 dodań i 32 usunięć

Plik binarny nie jest wyświetlany.

Wyświetl plik

@ -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=[]

Wyświetl plik

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