Grasshopper

algorithmic modeling for Rhino

Well friends,

I have a List named meshPts  (from some mesh vertices) and I want to use it as input to a Patch. SDK states that the input geometry must be IEnumerable<GeometryBase>.

So far all my attempts failed miserably. How can I do it?

best, Peter

Views: 348

Replies to This Discussion

As the SDK states, CreatePatch requires a lit of Curves, BrepTrims, Points, PointClouds and Meshes. All of which derive from GeometryBase. Casting to BaseType is done as it needs to. You will need a List<Geometrybsae> only if you combine multiple types of geometry. If you have a List<Point>, you can just pass that to CreatePatch.

A quick glace at Point3d will reveal that this is a struct and does not derive from GeometryBase. Any attempt to pass those to CreatePatch must fail. You cannot cast Point3d to GeometryBase. You can either wrap your Point3ds into Rhino.Geometry.Points or just directly pass the mesh you got the points from.

Thanks, indeed that was very stupid from my part. I'll post the whole case soon (creating closed Breps out of meshes - terrains in this occasion)

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