Grasshopper

algorithmic modeling for Rhino

Hey,

This is both a narrow and a broad question. What is the difference between polyline and polylinecurve? When I do a=rhino.geometry.polyline(mypoints) the output is a bunch of points, but when I do a=rhino.geometry.polylinecurve(mypoints) the output is a polyline?

Before I figured out you could generate geometry right from Rhinocommon I had always assumed rhinoscriptsyntax was the only way. But funny things would happen when I tried to mix Rhinocommon and rhinoscriptsyntax. Are they not compatible? 

example:

mypolyline=rhinoscriptsyntax.addpolyline(mypoints)

length=mypolyline.Length (and this is where they become incompatible, cannot get length)

When would one use Rhinoscriptsyntax over rhinocommon?

Views: 940

Replies to This Discussion

Geometry in the rhino 3dm document must derive from the GeometryBase abstract class. And curves must derive from the Curve class. However this would be overkill for some simple geometry types which are used a lot in algorithms besides the rhino document. For example Point3d, Circle, Line, Polyline, Sphere, Cone, etc. these are implemented directly in .NET without the overhead required by GeometryBase.

If you use the geometry yourself, you're usually better off with Point3d, Polyline and Circle. If Rhino deals with geometry it'll use Point, PolylineCurve, and ArcCurve respectively.

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