Grasshopper

algorithmic modeling for Rhino

Daniel, thanks for making this library available. Another great addition to your highly appreciated tools. 

I have some questions:

Usually, when I want fine control over a mesh, I also want to assign specific attributes to vertices, faces or edges. Things like vertex radius when doing circle packing, length of edges when the distance measure is something other than pure euclidean distance etc...  Now I just maintain lists of these values alongside the mesh/vertex/edge objects, but it would be cleaner if I could store such attributes in the object that they belong to.

Extending a class should be simple, but because all the classes refer to each other (planktonMesh refers to planktonVertex, etc) , simply extending one would likely break the connection to the other ones. In other words, planktonMesh would not know about the existence of my new extended vertex class. Is there an elegant way around this?

And secondly, it seems that when I get the vertices from a planktonMesh, they arrive in a different order than they were originally added to the mesh. Which makes it hard to keep track of the relation between vertices and those attribute values I now store in lists. Is this correct?

If you have any insights on those two points, they are more than welcome.

Jack Bakker

Views: 721

Replies to This Discussion

Hi Jack,

Sorry I missed this discussion earlier. I agree that an easy way of adding custom attributes will be very useful for many things, and it is definitely on the to-do list (also remember the whole project is up on GitHub, so if anyone feels inspired to make additions or improvements, please go ahead and submit a pull-request).

and yes - you are right that the current Rhino mesh to Plankton mesh constructor doesn't preserve the vertex order. However, it does preserve the TopologyVertex order, which you could use to make a map from one to the other.

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