Grasshopper remove lines from contour


(Design) #1

Hi hopperverse!

I’m here asking for guidance. I’m attaching an image showing a countour applied to a brep. I want to remove just the small horizontal lines at the top. I exploded the polylines to get each individual line. Then I tried List Item but I can’t select the lines. It might help that all the lines to be removed are at level z=0. Please help.

(David Rutten) #2

It might. I can think of some ways to test for them:

  1. Compare the length of the segments to a numeric range, i.e. remove all segments that longer than x units but shorter than y units.
  2. Test the z-elevation of the end-points of all segments, i.e. both the start and end points z value must be in the 0 \pm tolerance range.

Once you have performed these tests and you have a list of true/false values (one for each segment), you can then use the Cull Pattern component to remove the short segments.


coudnt you before contouring extract the face causing the lines?

(Design) #4

Hi David, thanks for your reply. Your approach helped me move forward. I know this was a noob question. Would keep improving my skills.