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)

Constraint_challenge_fit_rectangle.3dm (3.0 MB)

2 Likes

Nice puzzle
Here snapping between the 2 solutions.
constraintrect
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 :slightly_smiling_face:

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

Awesome :sunglasses:

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


:sweat_smile: :beers: 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 :sweat_smile: again
ezgif.com-video-to-gif
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.

2 Likes

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 :star_struck:

Very good point here. :sweat_smile: 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 :sweat_smile:

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.

as this is about constraints:
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! :smiley:

ahh beautiful :star_struck:

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 :sweat_smile:

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

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. :upside_down_face:

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

Wanted to continue this discussion as well.

From my perspective working in interior design and architecture, constraints are critical much like they are in manufacturing tolerances.

I don’t get to decide if a railing meets code by being “close enough” or that a door is at least 4" from an adjacent wall, or that studs are 16 or 24" on center, etc. those are numbers that I always have to meet.

Managing drawings and checking for things like this is of course laborious when you find something that is off and need to update it. Sure, there’s gumball, move tool, sub-object selection move, etc. but multiple a single operation across an entire wall assembly like wall stud framing and suddenly moving 1 isn’t so simple where as an EQ/EQ/EQ across 6’ or 24",24",24" collection of constraints is so much better to update.

Revit does part of this quite well but also goes overboard with its over-constraint marshalling and having too much of its constraints logic plane based.

I really like the list I saw in the WIP of things like offset constraints, horz, vert, point on curve, line, etc.
A lot of GREAT use cases in architecture for those kinds of relationships.

Here’s a simple architectural example with a tapered joist diagram with D as a varying depth, we would have a length constraint formula of (D x 3) for the top and (D x .5) for the side or more complexly could be described with a range/domain of (0 to (D x 3)) for the top and ((D x .5) To D) for the side constraint. D would be a “linked constraint variable” (more on that below)

Back to a door example:
I would much rather have a constraint at each door frame that I could simply click into, set the proper distance and move on.

Furthermore if I had multiple “doors” selected all with a constraint coming off the right side of the door let’s say, I would like to have the option to update 1 value and have it update all others that are selected and/or linked to that constraint. I realize that is an additional layer of complexity.

Perhaps constraints could have the ability to be “instanced” from one another, bucketed into groups, named the same or something like that so that it would behave like a block instance where when 1 updates all instanced update.

I would call this feature “chain constraint” or something like that, where you add a constraint to the list of constraints, give the “chain” a name like “DOOR SIDE TYP.” and any linear dimension constraint that has that chain constraint with matching name or key/value would get updated because it is “linked”.

@Joshua_Kennedy curious about your thoughts on “connecting” or “chaining” constraints across objects.

You could do some cool stuff with objects sharing certain constraints but having unique instances of other constraints.

That’s just my wish.

Constraints was one of the features I was most looking forward to in Rhino and was bummed it got pulled from R8.

6 Likes