Grasshopper

algorithmic modeling for Rhino

I am trying to list the side lengths of each of the triangles forming a mesh.

Thanks to tools I found on this forum I went as far as turning all triangular faces into polylines. However, whilst it is easy to list the total lengths of these polylines, I don't know how to break these down into the 3 side lengths (I could obviously explode the polylines but then I probably would lose track of which triangle each line belongs to).

Ideally I would like to generate a list in the form:

(polyline #,a,b,c)

where a, b, c are the 3 side lengths of each triangle.

 

Can anyone help?

Views: 330

Replies to This Discussion

When you explode a list of polylines, the result will be a tree with one branch per polyline containing three lines. So you won't lose track of which line belongs to which triangle.

Exploding will work, because GH will produce a data tree as a result that maintains each triangle's exploded segments in a discrete branch.

Many thanks guys that was really helpful.

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