Re: Creating Panels in CAD
Posted: September 14th, 2016, 11:50 pm
like a quick sketch in a new medium it's not perfect, but here's a script I cobbled that I think almost does what you want ( you still have to press enter once per curve and it exports AI files) you can use it as a base for yours...
Code: Select all
# The Monet script by Keno Leon # Notes: # Exports profile curves from polysurfaces # Substitute your DirectoryPath # hide or delete curves, leave only polysurfaces # Select profile view # RUN script # Press enter a bunch # has a minor bug on export # provided as is no guarantees Tested on Rhino for Mac v 5.2.2 OS X El Capitan import rhinoscriptsyntax as rs meshes = rs.AllObjects() for solid in (meshes): rs.SelectObject(solid) rs.Command("_MeshOutline _EnterEnd" ) rs.UnselectAllObjects() polys = rs.ObjectsByType(16, True) rs.Command("_Hide") curves = rs.ObjectsByType(4, False) for index, curve in enumerate(curves): print index, curve rs.SelectObject(curve) DirectoryPath = '/Users/theMonet/Desktop/Dev/RhinoPython/' fileName = DirectoryPath + str(index) + '.AI' cmd = "-_Export " + fileName + " _EnterEnd" rs.Command(cmd ) rs.UnselectObject(curve)