Grasshopper

algorithmic modeling for Rhino

Hi guys,

Let's say I have to create random points in a brep and I want to put a constraint on some of the random points so that they are on the edges and on the faces of the brep. How do I do it? 

Thanks

Views: 1072

Replies to This Discussion

Complex approach:

  1. Generate X random points on edges using [Populate].
  2. Generate Y random points on faces using [Populate] and using the edge points as the pre-existing population (this prevents points on faces getting too close to edge points).
  3. Generate Z random points in a box volume which contains the entire shape and using edge and face points as pre-existing population.
  4. Remove all box points that are outside the shape.
  5. Merge the three point lists into one.

This approach gives you a lot of control over the number of points on edges and faces, but makes it hard to control the total number of points.

Attachments:

A different approach is to generate all points on the inside first, then that pulling them towards faces and edges. Also sounds like quite a difficult solution, and it's likely to create a 'gap' between the points on the faces and the points in the interior.

File...

Attachments:

Oh sorry, I didn't realise this was posted in the scripting forum, you're probably looking for a programmatic solution? If so, what language?

Thx for this, I forgot to answer last year, I implemented it in c sharp already.

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