In this GH-script the clash component only works correctly if I add 2 to the index, why?
test clash component.gh (197.8 KB)
In this GH-script the clash component only works correctly if I add 2 to the index, why?
test clash component.gh (197.8 KB)
The problem you see is due to duplicates. Once you cull the duplicates, the indices are correct.
You get 45 collisions because the inputs require meshes and the planar rectangles are converted into planar meshes.
If you want to extract just the rectangles that collide with the rectangle, you can either extrude the polylines vertically so you get open meshes or you could also use the Collision One | Many component.
test clash component mrtn.gh (203.3 KB)
Thanks!
Both solutions worked for me. I chose to use Collision One|Many with a grafted input, because that component is faster than the Clash component.