Hi all,
I have a small problem with intersection between a sphere and a brep.
I have a sphere which is moving on a set curve. The curve is surrounded by many spheres (I have set them as a multiple brep in my file).
I am trying to only show a moment in which a sphere intersects with the biggest amount of breps (the amount doesn’t matter, only that it is the biggest amount of them).
I have tried few possibilities but I’m lost now.
I hope I’ve explained myself well.
I would appreciate some help.
Thanks!!
Agata
collision with breps.3dm (4.6 MB)
collision with breps.gh (11.9 KB)
maybe you can use data recorder and you move the point manually and slowly.
as you see in the image when the sphere intersect with 3 trees you will see the point above them
i don’t know if there is a method to make the point moved automatically than you need to split the data result to find the maximum amount of the word Referenced Brep and their points
I’m not sure I understand what you wrote,
could you explain it again?
it’s just an idea ; when you move the sphere manually data recorder will record where the sphere intersect with the trees
than you can find the moment or the position where the sphere intersects with the biggest amount of trees
Hi @a.slusarek1
Are your collisions always between spheres and spheres? then you could calculate from center point and radius if a colision occurs given a point on the curve.
Also, have you used galapagos before? it comes with grasshopper and is a solver for exactly problems like this one, i show you how it can work on your problem in this file:
collision with breps.gh (12.7 KB)
No I’ve never heard of it, but I’ll have a look!
Thank you!
See attached as well (The def existed already written for similar cases) . It doesn’t give you any clue about how it works (it’s code) but is very fast: 2 milliseconds for querys related with 120 spheres (classic BrepBrep ccx events take far more time, mind).
Brep_QueryIntersections_V1.gh (125.7 KB)