# How to delete colinear lines that are not identical

I have produced this 3D Voronoi structure and deconstructed it into its base lines (left picture), and I want to delete all the small line segments created along the edges of the bounding box (highlighted in green in right picture).

What I tried:
1- Since the edges obtained from deconstructing the bounding box aren’t identical to those in the Voronoi structure, I haven’t been able to treat them as duplicates to cull them out.
2- I tried writing different python scripts, but since I am only looping through the deconstructed points not the lines, all I could do was delete the points that fall along the lines I want to delete. But this doesn’t work in my case because this would also delete all other lines (not of interest) that are connected to that point.

• find all orthogonal small edges, do this by converting them to vectors and selecting by length and when 2 components of the 3 (x,y,z) are equal to 0
• collapse each small segment into a single point, do this by finding the mid point. Doing this also create 2 vectors, point from each ends of the small segment to the mid point
• apply “point deform” to all other segments using the just created vectors

This would probably works better iteratively.

1 Like

Or, delete those line segments where midpoint of line segment intersects the bounding box of the volume. Ricardo’s idea is more elegant though