Pic one cube and cull it

Hey Guys,
i want to realise the following Task: Delete all cubes which are to be hit by the line!


With cull index i can delete one of the cubes, but i want to choose it bei the line.

How to solve it here? Did you get my problem?
Thx in Advance

try this

Awesome! This is working fine. The component “shape in brep” is also working with other geometrys, so it gives me more possibilitys too. Thanks a lot!