Grasshopper

algorithmic modeling for Rhino

I tried to define polylinecurve inside a class. I couldn't get the polyline curve out of four points. I dont get any error. "Execution completed successfully." but i don't get any geometry (curve) out. I tried two method with rg.polyline and rg.polylinecurve

I am hoping I will able to loft two sets of geometries defined in class.

def DrawPolyline (self):
self.Polyline2 = rg.Polyline ([self.Pts [0], self.Pts [1], self.Pts [2], self.Pts [3], self.Pts [0]])
self.Polyline1 = rg.PolylineCurve ([self.Pts [0], self.Pts [1], self.Pts [2], self.Pts [3], self.Pts [0]])
self.Polyline.Add(Polyline2)

eem = eeModule (VERTICES)

p = ghdoc[eem.Polyline]

or 

p=eem.Polyline

Thank you,

Views: 694

Replies to This Discussion

This might help with the construction of polylines. As for the rest I think you might need to narrow down where the problem is. I find that using print type(object) is a good way of figuring out if a function is returning what you're expecting.

Thank you for the answer. I've tried to do step by step, input vertices from a surface then I understood I have data management problem. I have just changed List Access Item for input points. Long way to go !

That seems to be a pretty common mistake actually. In continuation of that, since you're using RhinoCommon functions (I assume) you might also want to add a type hint using the right-click context menu on the input (like Point3D) . Else, you will get GUIDs which you will most likely have to cooerce to get the geometry object for use with RhinoCommon functions. If you have more issues try uploading a file, makes it much easier to troubleshoot.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service