I have a basic script that draws a poly line through points, then revolves to make a closed poly surface.
Is there a more efficient way to do the points, like a list for example? If so. is it possible to make 3-4 lists of different points and chose one of them to revolve in the same script?
import rhinoscriptsyntax as rs pt1 = (0,0,0) pt2 = (-3.6,0,0) pt3 = (-3.6,0,1.2) pt4 = (-2.4,0,1.2) pt5 = (-2.4,0,3.8) pt6 = (-6,0,3.8) pt7 = (-6,0,5.5) pt8 = (-5.3,0,5.5) pt9 = (-5.3,0,4.5) pt10 = (0,0,4.5) curve = rs.AddPolyline((pt1, pt2, pt3, pt4, pt5, pt6, pt7, pt8, pt9, pt10)) layer01 = rs.AddLayer("pop outline") rs.ObjectLayer(curve, layer01) if not rs.IsLayer(layer01): rs.AddLayer(layer01, (0,127,0)) polysurface = rs.AddRevSrf( curve, ((0,0,0), (0,0,1)) ) layer02 = rs.AddLayer("pop") rs.ObjectLayer(polysurface, layer02) if not rs.IsLayer(layer02): rs.AddLayer(layer02, (0,0,0)) rs.LayerVisible(layer01, 0) rs.PurgeLayer("pop outline")
Question 2: I get a different object when I run this script on Windows than when I run it on my Mac. Windows gives my a polysurface, which is what I would expect.
While on my Mac I get a single surface. I haven’t run this in a while but it seems to me it used to be a polysurface on my Mac as well.
popInclear.py (666 Bytes)
Plug-Windows.3dm (131.0 KB)
Plug-Mac.3dm (125.2 KB)