From 585e39a21a082ca158ad697a340e7245fb3ecfec Mon Sep 17 00:00:00 2001 From: vilemnovak Date: Mon, 7 Dec 2015 11:08:18 +0100 Subject: [PATCH] Revert "little shapely functions" This reverts commit 17e3770bfabdf9d52369393f6f939478a4aadb0b. --- config/userpref.blend | Bin 107852 -> 107740 bytes scripts/addons/cam/chunk.py | 27 --------------------------- scripts/addons/cam/utils.py | 6 +----- 3 files changed, 1 insertion(+), 32 deletions(-) diff --git a/config/userpref.blend b/config/userpref.blend index c8102b3509761023af064355d839d8d689358932..feb0ce516e417bedcd2f3f27b8214c1da9802dae 100644 GIT binary patch delta 1330 zcmZ9MKWI}?6vq4PBMqg6prr(f5_nQ&{{Lr z9+l_h+nPnFWUyn$C=Ssns6$4lk}+=@^ zth-LUz3*PR z^G%of6O%NXxjv1UpB&-5UcAs=%go)Ff#;W~{LMT+8mC}+*~ksoV`v0gi-8jNJOcqh z>!meB2|fc505tb4AVwN600BT!0WnhPzGol+7%Ct}>M{TUK;@MkAx6qR@C*b1Jq5%_ z#|%IKkZ;-qG16SgGY|l@wm(GsB1Sr300Myg6AOs(@F53ijsC4&+ZP}0FaTi$=marR zUjP*V468Olj8s_RZBPL~@{s~E;&i2$(t6ZaUVOB$T1@@tZ|M>xhr(6Jv0ML7E0Wnf(y_nJ({YuUD#Yf$Be$*-e__JvN z38L&qF{L&7J>|tm#~Zns_}?&kvbiO1$>%p;Y6{DS(&fTbpiQ}wUp8)Z6PDi?3$WdH(zp>CcSXg72;fsl4iGU?R{#|NNK-yyq-?ctSaYXw bru|@D4k=34`fl>}+dD7f_0RFTle_s3w{Jjm delta 1395 zcmZ9MKWI}?6vq4HwPt7_V9`JxQZ#4=k%~fb5K~DZOCiGxI8>7~c}=THj7|Rpr+`ue zR!uz)88dbfDiO?BoT_w)PC*4bcFdU3b8^p@A#b_weE0W#_q}`HJAc1Vo&1<;T(rWU zFO_U7*xt3TUA89a)0OKtf}8j43BE8^zdab%7<<;eVJ##5JRhDu*jpM3$Illm4IoBJKXx4m06GeYk-7{(0MKlh1Tj)Hp%eD+gTj$ix{cF00aQ_7X}dHhm7l>#(ZZ>12~Av3_t)-FBm|K zbSeod0O*tqAVx~8aDoZ|f=J+zj#iSPv4CJj1K3A%*v5alPnI4n` zQFJvK(i#B=8)gCV(cx-rCiu_%O|b=cp(eiq*VM{86wW86>nCPXMyll4PWgf~Y8 z09D-#F;a~I2qQq35F_;kPyxW1)?%deQ`dn2;34-QX&_>xE&~t%NRtvkj1(;-D4m3H)*fn^P?&LVw?0i`cgQxo3G>H Nm(AkWX3>hx{|6_CCZzxX diff --git a/scripts/addons/cam/chunk.py b/scripts/addons/cam/chunk.py index 13ae58f..d75fb28 100644 --- a/scripts/addons/cam/chunk.py +++ b/scripts/addons/cam/chunk.py @@ -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=[] diff --git a/scripts/addons/cam/utils.py b/scripts/addons/cam/utils.py index 6b9294a..fd40303 100644 --- a/scripts/addons/cam/utils.py +++ b/scripts/addons/cam/utils.py @@ -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.