Gallery details
–BioReactor Energy Distribution System – ElectroChemical Actuators for door opening of Emergent Soft/Rigid Car Design – Design + Video by LQ
Recreates a series of polylines based on an animated series of deformed geometry. Post deformation the geometry is in very bad shape, this script rebuilds the base polylines to reInput into the next scripts–
Research and Development by Luis Quinones and Tom Wiscombe @ Emergent Architecture
PYTHON CODE
"""Recreates a series of polylines based on an animated series of deformed geometry. Post deformation the geometry is in very bad shape, this script rebuilds the base polylines to reInput into the next scripts""" import rhinoscriptsyntax as rs strNewLayer = rs.AddLayer("Plines",[255,255,255]) layerChoose = rs.GetLayer("ChooseLayer") strMesh = rs.ObjectsByLayer(layerChoose) print len(strMesh) #rs.EnableRedraw (False) faceVert = [0,1] newPts = [] faceVert[0] = [0,1,2,3] faceVert[1] = [0,3,4,4] for z in range (len(strMesh)): #print layerName strLayer = rs.AddLayer('frame'+ str(z+1),[255,255,255]) arrFaces = rs.MeshFaces(strMesh[z],True) print (len(arrFaces)) i = 0 while (i < len(arrFaces)): face = arrFaces[i],arrFaces[i+1],arrFaces[i+2],arrFaces[i+3] #face[0] = arrFaces[i] #face[1] = arrFaces[i+1] #face[2] = arrFaces[i+2] #face[3] = arrFaces[i+3] newLine = rs.AddLine(face[0],face[1]) rs.ObjectLayer(newLine,strLayer) i += 4 crvs = rs.ObjectsByLayer(strLayer,True) if not crvs: print "negative" rs.Command("Join") rs.UnselectAllObjects() arrCrvTest = rs.ObjectsByLayer(strLayer) if arrCrvTest: for curve in arrCrvTest : newPts2 = [] crvPts = rs.CurvePoints(curve) #print crvPts[0] #crvPts.pop(-1) if crvPts : meshTest = rs.AddMesh(crvPts,faceVert) areatest = rs.MeshArea(meshTest) #print areatest[1] if areatest[1] == 0: print "One Failed" rs.DeleteObject(curve) rs.DeleteObject(meshTest) rs.UnselectAllObjects() arrCrvs = rs.ObjectsByLayer(strLayer) if arrCrvs: for curves in arrCrvs: crvPts = rs.CurvePoints(curves) if crvPts: meshTest = rs.AddMesh(crvPts,faceVert) centroid = rs.MeshAreaCentroid(meshTest) newPts2.append(centroid) newPts.append(rs.AddPoint(centroid)) rs.DeleteObject(meshTest) rs.DeleteObjects(newPts) if newPts: pline = rs.AddPolyline(newPts2) else: print" RIGHT--->WROONGG!" if pline: rs.RebuildCurve(pline,2,40) print "rebuilt @ 2,40" rs.ObjectLayer(pline,strNewLayer) rs.LayerVisible(strLayer,False) rs.LayerVisible(layerChoose,False) #rs.EnableRedraw (True) Update
Recently in Portfolio
- Nike A.I.R Prototypes
- HE.6 2020 Prototype
- [A]nisochromatic Meshing
- PYTORCH-CLASSIFIER
- CULEBRA.NET
- Nike Zoom Superfly Elite
- Nike Footscape Flyknit DM
- Jordan Hyperdunk React
- KA-HELMET
- PARAPRAXIS
- [001.HRR] CONCEPT BIKE
- [C]ucarachas
- [S]eeker
- BENGBU CITY OPERA
- [O]h Baby
- [E]l Papa
- [S]hatter.Brain
- [S]tigmergy
- [F]orces
- CULEBRA.JAVA
- [C]ulebra.MultiBehaviors
- 2040:LUNAR.OUTPOST[a]
- [S]ticky Stuff
- [S]entinels
- [G]allopingTopiary
- [P]erlin
- [E]ternal Wanderers
- [W]heelie
- [M]esh Crawlers
- [E]l Nino
- [L]a Silla
- [3]D BabyMaking Trackstars
- [3]D Trackers
- [2]D BabyMaking Trackers
- [T]rackers
- CULEBRA GRASSHOPPER
- culebra.[M]eshCrawlers.3D
- culebra.[H]ybrid.3D
- culebra.[F]lorgy
- culebra.[F]ockers.3D
- culebra.[F]ockers.2D
- culebra.[N]oisey.3D
- culebra.[S]elfOrg
- [D]rippin
- [S]labacube
- culebra.[N]oisey.2D
- [C]reepyCrawlers
- [J]eepresesCreepers
- [C]reepers
- [T]2000
- RELUXOED
- [SRC] . Semi Rigid Car
- PUFFER PLEATNESS
- EMERGEN[CY]
- [L]iquified
- [S]uckedComp
- [X]plosion
- MR. EW
- [H]airGoo
- [B]alled
- [n]injaStars
- [b]loomer
- [t]rip city
- TAPE GUNNED
- [B]oom
- [M]iller Time
- [D]elamjam
- [B]rain Zapper
- [B]ig Bird
- IIIIIIII 00137
- [E]gg Tube Pavillion
- [A]llice’s Easter Tree
- [S]weet Honey
- [U]M.Urgent
- [t]oo.urgent
- [B]onnie..+..Clyde
- [B]io Mess
- [EL]Mojado.Virus
- [W]HAT the …!
- [H]ot Lava
- [P]leat Diddy
- [t]erminator easter egg
- Mr. BB
- [B]less You
- [J]acky Jack
- [F]antastic + Interactive
- [S]oo_Minimally_Pathed
- [P]uffer Fish.Fab
- [M]an Eater
- [F]ace Sukka
- [W]eave Machine
- Sportbike Racing
- Grappling
- Kart Racing
Leave a reply