Trying to emulate "Line Tangent Perpendicular"

Hi !

I’m trying to emulate Rhino’s “Line Tangent Perpendicular” tool in GH with Kangaroo.

I’m struggling to find the right set of constraints to make Kangaroo find the line that will be both tangent to a circle and perpendicular to a curve.

Actually, I guess that I don’t understand how Kangaroo gives priorities to constraints, other than using “strength”.
The results I get seem to respect some constraints and completely dis-regard others.

Help !

Line Tangent Perpendicular.gh (9.5 KB)

Hi Olivier,

There are a few immediate issues I see - the centre of the circle is not anchored, which is why it is moving away.
Also, in Kangaroo 2 there is no need to use the Grasshopper timer - the solver component will automatically iterate until convergence.
Regarding the strength - for a geometric constraint solving application like this, if it is possible to set up the goals in a way that they are all satisfied exactly, then the relative strengths of the different goals won’t affect the solution it reaches.

As for this specific construction - I think it will require an additional goal for perpendicularity/tangency to a NURBS curve. I’ll have a look at writing this.

Hi Daniel, thanks for chiming in.
I figured that I could simulate a perpendicular constraint that way, but it didn’t pan out very well :

The idea is to create an angular equality using the main line I want to form-find and two tiny lines on the curve, one on each side.

By the way, what ever happened to the “2D constraints” ?

2 Likes

Daniel, WHAT HAPPENED TO 2D CONSTRAINTS ?

Everything in that video is possible with the current release.
Here’s an example of some simple 2d constraints like that.
sketch_constraints.gh (12.5 KB)

1 Like

Daniel, I appreciate your efforts, but one can hardly imagine to make a custom definition each time 2D constraints can be helpful (and in my case, it’s almost all the time).
I was a long time user of SolidWorks, and that is probably the feature I miss the most.
My hopes when I saw your video was that your solver skills would benefit Rhino by integration to it’s interface for V6, which in itself would have justified the upgrade for me.
Even silly old AutoCad has had that feature for 8 years now !
At some point, I even tried to bring McNeel and Jonathan Westhues of Solvespace to strike an agreement, but it failed, like any previous attempts to dust off the Rhinoceros.

I completely agree that having to set up the definition like this is far from ideal for many applications of constraints, and do aim to improve the interface for this to make it faster and more direct to specify them while drawing.

1 Like

What I would like to know is if you are officialy part of the McNeel development team, and whether the fruit of your work will one day be incorporated in Rhino.

I download " [sketch_constraints.gh]" but I cant move the points on drawing… Why it can be?