Grasshopper

algorithmic modeling for Rhino

Hi guys,

I would like to write a script in which I can extract triangular meshes from a mesh according to a certain flatness in relation to the XY plane... Any ideas how i could start ?

Many thanks,

Arthur

Views: 354

Replies to This Discussion

I'd start by comparing the normals of each plane to the world z axis. There's a handly little function that Dale wrote for comparing the angle between two vectors. The "flatness" would basically just be testing to see if that angle is below a certain threshold. One last note, sometimes the normal direction (z vector) of a plane can point down, so I would check and see if the z component of the z vector of your plane is positive or not. If it is, then just call myOn3dVector.Reverse to get it to point "up"
Solution without scripting:

http://en.wiki.mcneel.com/content/upload/files/MeshFaceCuller.ghx

--
David Rutten
david@mcneel.com
Poprad, Slovakia
Thanks David but the link doesn't work and i couldnt find it there:(

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service