# Constraints examples / challenges

Continuing the discussion from Rhino WIP Feature: Constraints:

Let s use this topic to collect nice challenges / examples and hope constraints will come some…

I think this is a nice example / problem that can / should be possible to solve with constraints.
(it can be solved by math / geometry…)
EDIT: more precise description of the challenge
it s a rectangle (constraints vertical / horizontal, parallel)
a circle
4 tangents and 3 lengths (27,24,44) (constrains coincident, tangent, length)
the sketch is under-defined - will have degree of freedom, but the length (?) that is searched is fixed.
this problem can be solved for example in onshape with constraints quite easy.

2 Likes

Nice collection of more engineering examples from Solidworks
There is always a “Phase2” Challenge - which is somehow related to nice setup of sketches and parameters.

1 Like

Another geometrical construction I came across in a interior design project.
(actually it s the 2d footprint of a 3d problem)

given a fixed rectangular Polyline “L”
and a fixed point.

a rectangle with fixed dimensions has to “fit”, two corners on the L, one edge on the fixed point.
(there is a second solution)

2 Likes

Nice puzzle
Here snapping between the 2 solutions.

constraint_rectangle.gh (8.5 KB)

2 Likes

Interesting thread, so the only constraints here are those 3 angles? Plus 4 90’s too maybe …

Oh I see ‘under-defined’, yeah I’d still have to mess with that sketch though

Would be cool if Rhino could calculate the degrees of freedom (DOF).

Awesome

I had fun messing with it. Looks super complicated to me:

kangaroo is very interesting to me.

3 length, 4th length is searched. updated the description in the initial post.

1 Like

Another example could be to solve multiple hinges and rods together

This is a trial with kangaroo … And we know kangaroo IK is the base of constraints.

1 Like

for those kinetic simulations there is a promising tool:
https://motiongen.io

1 Like

45.70… with Kangaroo again

45.70.gh (27.3 KB)

4 Likes

yep - nice.

but I think the idea about constraints and sketches is not “can rhino do it ?” (yes - as you showed)

constraints / sketches is a very accessible interface to get this kind of complex geometrical conditions in a nice “drawing like” interface. with a few mouse clicks on the drawing itself:

constraints in onshape vs grasshopper will look like this…

1 Like

I’ve never test the constraint feature. I’m still using R7 and I saw that Constraint is now part of Rhino9WIP…
It could look cleaner, but that will depend on the degree of complexity and reuse to build a system in gh.

yeah could scare and more if you use text instead of icons.

Anyway I’d like to see the challenges in Rhino like the really nice @Joshua_Kennedy examples.

1 Like

That’s really cool. So something that’s been on my mind is how these things can become those Eto Frameworks I’ve been hearing about …

That’s what I like to see

Very good point here. Need that spaghetti to be Eto Framework? lol

I should clarify - I posted that example in grasshopper just because it seemed a nice challenge and to show that the solver can handle these types of problems, but obviously it’s not the most convenient UI for these - that’s the aim with the Rhino Constraints project - to make setting up these sorts of constrained sketches more direct.

5 Likes

Some time ago I did this linkage with Kangaroo.

Will have to try with constraints in the new WIP…

And another one:

1 Like

Grasshopper is the only way I currently know I could attempt this, so I appreciate anything anyone shares on this matter.

I suppose I could try learning any other methods in C++ Rhino commons or something too

Yeah, amazing work.

Do you think that if constraints were available would be easier to solve this kind of things?

1 Like

this is something I would love to see in the context of constraints (+ configurations / variables + history (revolve))

be able to design / search for proportions in 2d and 3d.

stuff like this is quite easy to get without (visual) programming in parametric / feature tree / implicit CAD.
Example is done in Onshape, but sure other programs can do the same.

please note that there are two hierarchical sketches, where the first one just creates some guides.
the second creates the used profile but by linking the constraints to the underlaying first sketch:

would love to see this power in rhino

3 Likes

constraints!

ahh beautiful

I agree.

I’d also love to see Rhino do that, but in a way that hasn’t really been done before – the ‘3d all the time’ way.

The paradox of being constrained to a sketch interface in order to derive constraints, is too constraining

If Rhino could merely do it in 3d all the time, that would be great

2d/3d sketches are cool, but 3d all the time is more fluent imo.

I remember back in the day trying to be economical, and using alibre design to try referencing 2d sketches with 3d sketches etc, and it was just silly and didn’t really work. Even higher level programs didn’t make it easy in their own GUI ways.

3d all the time is the occam’s razor way imo. Maybe someday if GH can do loops.

Constraints would enhance many ways to construct Arcs and Circles… (all those options of _arc and _circle command)
I started another topic focusing on this - not explicit in the context of constraints… looking forward to see your Arc / Circle challenges there:

1 Like