How to remove lines not fully within Brep

I’m trying to create a lattice within a volume. To make it easier to work with I’m building this lattice with lines then using TrimWithBrep to cut the lines and using only those within the brep. This however leaves behind the trimmed sections which connect to nothing and are a pain to go back and delete after. Is there a function to only select those curves that are fully within the brep and remove any that are outside/partially outside the brep?

Examples in images. 1st image here shows a few curves that are left after the cut. Is there a way to simply delete any curves that are outside of the brep as well as any curves that intersect the brep? My use of “TrimWithBrep” removes any curves outside of the brep and trims any curves that intersect the brep but leaves the internal curve behind. This often leads to floating lines and unsupported lattice segments.
CuttingvsRemovingLinesExample CuttingvsRemovingLinesExample2 !

CuttingvsRemovingLinesExample3|548x375 (20.7 KB)

Thanks for your help.

Check this out for lattice structure.

Food4Rhino – 2 Aug 18


Dendro is a volumetric modeling plug-in for Grasshopper built on top of the OpenVDB library.

To provide right solution you definitely need to upload your gh file and related pics.

Thanks for the feedback. I have now uploaded some sample code and images to better describe my problem.

Just use the Collision Many | Many component (20.1 KB)

Michael, Thanks for your fast response.

This function works well for deleting any of the free floating bodies, however the “Collision Many/Many” function still cuts the curves that intersect with the Brep. What I’m looking for is more of a internal select command that simply deletes any curves that are not fully within the Brep. Do you know if there is a function that does this?

In any case, I appreciate the help. I’m very new to grasshopper and still learning what all of the commands are and what they are called. “Collision Many/Many” will be very helpful in removing any stray filaments.

I see, then just test that both the start and end point of each line is in the box. (22.9 KB)

Almost simoultaneously :slight_smile:
Same approach as @Michael_Pryor (50.9 KB)

This worked great. You guys are amazing. Thanks so much for your help.