Numbering all over the place

Hello, I am having issues numbering my surfaces in a better way than grasshopper does itself.

Currently this is the numbers.

And I would love for them to be sorted in a more “organized way”

Numbering Script.gh (133.6 KB)
scraped model.3dm (11.1 MB)

DISCLAMER: This script is heavy, so be ready to wait a little haha

I re-wrote the portion of your file that puts the notches in your shapes. The file now opens in ~3 seconds (was ~2 minutes).

In order to number the surfaces, you need to get them grouped and/or sorted in some meaningful way.

I sorted and grouped them by the Y-position of their centroids and then sorted them by angle (angles measured from group bounding box center to part bounding box center):

Combined branch numbers with angle of each part within the branch to make the labels:

Divided angles into 8 zones identified by letters to keep the labels short (limited space on parts for labels):

Zone Greater Than Less Than Or Equal To
A 45°
B 45° 90°
C 90° 135°
D 135° 180°
E 180° 225°
F 225° 270°
G 270° 315°
H 315° 360°

OpenNest plug-in was used to make the text labels and determine their locations (I noticed you had OpenNest components in your file).

You didn’t ask about nesting, but I also added code using OpenNest to pack and nest the surfaces.

The OpenNest component produces overlapping shapes when the Rotations input is set to 16. I checked for problems with the curves or DataTrees but couldn’t find anything wrong. Different shapes overlap with different Seed inputs.

I left code in the file to check for collisions in the nested shapes.

Nesting produces no overlapping shapes with the Rotations input set to 8:

Numbering_Script_re.gh (506.3 KB)
All geometry internalized in GH file.

Nesting will not start until you change the Iterations input to a non-zero value or toggle the Run input to True. One nesting iteration takes ~2 minutes, five iterations takes ~5.5 minutes.

-Kevin

5 Likes

so rare to see someone uses pnc component, what a great job

Kevin… This is amazing! You added much more than I could ever ask!
Thank you!

I have one problem though, it seems like “InscribeCircle” is not a part of my opennest version, is there any way to get InscribeCircle?

I figured it out