How to exclude contour lines along box edges

A very newbie question:

I’m contouring a simple box in Grasshopper (see attached image and definition) to divide it into equal segments, but the Contour component keeps drawing curves right along the box edges. What’s the best way to exclude those edge-lying contours—filter them out or offset the planes slightly? Any suggestions on a clean, reliable approach would be greatly appreciated!

Contour lines:


contours.gh (9.9 KB)

Add purple group to compute a Contour start ‘Point’.


contour_box_2025Apr23a.gh (17.9 KB)

I would remove Addition of one when computing the Contour ‘Distance’.


contour_box_2025Apr23b.gh (17.1 KB)

Thank you both – ill work with adjusting the starting point or culling indices. I am still curious though how to avoid contours from drawing on the edges – maybe adding a slight epsilon would help though feels inaccurate

Isn’t that your original point? Moving the start point is the answer. Or ignoring contour curves that are near the edges (distane equals zero).

Like this. Your original code is in the gray group at the top. I added the white group below.


contour_box_2025Apr25a.gh (23.4 KB)