Grasshopper

algorithmic modeling for Rhino

nesting problem - need to have elements nested one inside the other

 

Hi

I want to achieve smaller elements nested into the holes of bigger ones. Unfortunately, my nesting software treats all closed curves and solids and I don't know how to distinguish the ones with the holes. Do anyone know the way how to achieve it?

Views: 475

Attachments:

Replies to This Discussion

Very easy with code (I'm not interested to attempt it with components, mind).

Notify if you need a demo 

Notify i do. I speak c# so please help

Check Attached: this gets a random List of curves and finds what is inside what (and puts them into a Tree branch).

Note:

1. This DOES not work with nested inclusions (i.e. Curve contains curve (OK) that contains curve (not OK) ... etc, etc). The C# version that does that is strictly internal.

2. If you suspect intersecting events on your curves ... add a continue (or some other logic) to the related if (i.e.  RC == RegionContainment.MutualIntersection) statement (see MakeCurvTree Method).

3. Load first R file for the demos.

4. DO NOT include the out most "sheet" boundary (see 1: 2 level nesting = Adios Amigos) into your curvList.

Pay attention to tolerance matters as well (how "close" the out curves are etc etc). Let them breath a bit.

Attachments:

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