Grasshopper

algorithmic modeling for Rhino

BREP / BREP proximity

Does anyone know of a solution to find the two closest points in between two surfaces / BREP? Something like curve proximity component but for two surfaces...

It can be done with Galapagos, however a solution without would be more streamlined.

Is there a way to do this with a custom component, python or anything like that?

Thanks

Views: 2188

Replies to This Discussion

I was thinking that one the other day. Here's an extra "brute"/naive way (sure David Rutten can think a far better way, but anyway) to do it:

1. See this attached : it finds the closest par within a given collection of random pts.

2. So ... here comes the brutus maximus "method" (I do hope that no pro reads this, he he): we modify this with a few lines of code more i.e. we spread random pts on the breps and then we calculate the closet pair between the 1st List against the 2nd.

Yes I know that's Neanderthal (and utterly naive) but if nobody else doesn't provide a more elegant solution ... I could easily convert that C# for doing the brep-to-brep closest pair thingy.

Attachments:

Here is the same method like Peter's just with breps instead of points.
Basically it replicates the David's solution, posted some year ago on forum.

Attachments:

Indeed it's the same ... but give me some minutes to do this for Lists (BTW: loops reach a threshold quite fast: say 5 to 6, after that: CPU waist time).

more ASAP

Er ... hmm ... ASAP takes a totally different meaning when in my practice: ( Boss I want to divide by zero: is this doable? yes it is, what's next?).

Back to our business: Q for David, Djordje, Martin and Pieter: open script to see the question, he he.

Attachments:

Hi Martin (Hi Peter & Djordje),

I was thinking of using a kangaroo spring (but didn't think too much about possible exceptions~)

Attachments:

You could also bounce a Brep Closest point back and forth a few times, that gives the same effect and has the same limitations; it gets stuck in local optima.

Ah! Indeed:) I was kind of hoping that Martin's breps would be convex. I tried your approach with two banana shapes:
Edit: is it just me, or did that image somehow get too dark?

The end times are nigh...

this comment needs Danny's links to explanations :-)

Okay, so it's not just me.
I figured something like this was coming, I see it everywhere now ...
See you on the other side:)

for a moment i though my screens gamma had reseted. could that be the reason in your case? (system gamma)

Seems to be a bug with Ning. Every image that is uploaded gets mangled somehow. I'll inform them.

by June Lee

by June Lee

• View All