Clash Improvement requests

Why on Earth is there no way to find clashes between members of a single group of objects instead of having to input two groups? If you input your single group into both inputs you get duplicate object intersections that are self-intersections, defeating the exercise.

I’m currently using a Python script for this simple task:

import Rhino
import winsound

OFFSET_BREPS_CONTAINER =
INTERSECTION_CURVES_CONTAINER =
COLLIDING_BREPS_CONTAINER =

for b in Breps:
OFFSET_BREPS_CONTAINER.append(Rhino.Geometry.Brep.CreateOffsetBrep(b, -0.01, False, True, 0.001)[0][0])

OffsetBreps = OFFSET_BREPS_CONTAINER

for ob1 in OffsetBreps:
for ob2 in OffsetBreps:
if ob1 != ob2:
intersection = Rhino.Geometry.Intersect.Intersection.BrepBrep(ob1, ob2, 0.005)
try:
for ic in intersection[1]:
INTERSECTION_CURVES_CONTAINER.append(ic)
if ob1 not in COLLIDING_BREPS_CONTAINER:
COLLIDING_BREPS_CONTAINER.append(ob1)
except:
print “None”

IntersectionCurves = INTERSECTION_CURVES_CONTAINER
CollidingBreps = COLLIDING_BREPS_CONTAINER

if len(Breps) != 0:
frequency = 2500 # Set Frequency To 2500 Hertz
duration = 1000 # Set Duration To 1000 ms == 1 second
winsound.Beep(frequency, duration)

It is setup to test to systems in a building or ship for conflict. For instance Beams vs ductwork Or pipes vs floors.

Depending on the number of objects there are a few other intersect commands that could be used for intersections between a single group if objects.

I tried to use it in the context of a building.
Let me tell you that it is utterly useless.

@vectorabc

Could you post another version of this this script? I tried to copy/paste the above into the python editor but it’s not working.

As you mentioned, I need to find clashes between a single set of geometry instead of 2 input groups.

Thanks,

Dan

Mutual Collision Detection.gh (8.8 KB)

1 Like

@vectorabc

Thanks, it even beeps!

Dan

I Have found it useful. Please be polite and build this place.
If you want you can write your goal & we can try together.

Hi @scottd , do you know any way that we can detect clashes but not contact points? Thank you!

For me, It’s strange that Clash can’t recognize if one object is completely inside another. It should be possible at least as an option. I need an ultra fast method for that (and regular collision too) I was hoping that Grasshopper Clash component would be an answer.

1 Like