I made fully constrained sketches today... why?

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Absinthe
Posts: 46
Joined: Thu May 17, 2018 12:20 am

I made fully constrained sketches today... why?

Post by Absinthe »

So today, I started a project and made two items. When doing so, I fully constrained the sketches. One thing after the other, until finally I got "fully constrained".

Why did I do that? What specific purpose does it serve? How is it useful?
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: I made fully constrained sketches today... why?

Post by adrianinsaval »

fully constraining a sketch is not mandatory, it is just good practice so your sketches won't move in unexpected ways if you edit some constraint value, the idea is to fully define the sketch so it can be edited in a more predictable way. What is usually actually necessary is to have proper coincidence constraints where two edges meet, this is because otherwise they may appear coincident to you but may be considered as open profiles by the machine if it's out of tolerance. You shouldn't just apply random constraints for the sake of constraining until you get an all green sketch, you need to apply logical constraint that have the actually meaningful relationships defining your object.
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: I made fully constrained sketches today... why?

Post by thomas-neemann »

Absinthe wrote: Tue Aug 02, 2022 3:50 am ...

Why did I do that? What specific purpose does it serve? How is it useful?
in my opinion, the effort only makes sense if parametric models are required. if the priority is speed, i would use draft to create the "sketches" for part and part design
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
User avatar
Shalmeneser
Veteran
Posts: 9474
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: I made fully constrained sketches today... why?

Post by Shalmeneser »

You can detect invisible error (eg. non coincidental vertex) when your sketch doesn't want to be fully constrained.
You can detect geometrical constraints missing for the same reason.
You can detect logic of constraints problems.

It's helpful even if not needful.
User avatar
NewJoker
Veteran
Posts: 3017
Joined: Sun Oct 11, 2020 7:49 pm

Re: I made fully constrained sketches today... why?

Post by NewJoker »

Absinthe wrote: Tue Aug 02, 2022 3:50 am Why did I do that? What specific purpose does it serve? How is it useful?
Pretty much all CAD experts say that it's a good practice. Some reasons were already mentioned in previous replies but the main idea is that fully constrained sketches are needed in case some modifications have to be made to dimensions in the sketch (after all, we use parametric CAD software to be able to make such changes without redrawing everything). Otherwise, the sketch may easily brake, requiring additional changes. The same applies to assemblies - you don't have to constrain them, you could just position the parts properly. But once you modify something, you may get exploded assembly without even using a special workbench for that ;-)
drmacro
Veteran
Posts: 8865
Joined: Sun Mar 02, 2014 4:35 pm

Re: I made fully constrained sketches today... why?

Post by drmacro »

There is a bit of misconception about the state "fully constrained". It really means all DOF's have a constraint applied and there are no redundant, over constraints, etc. situations.

A haphazard constraint scheme (i.e. constraints applied simply to get to the fully constrained state as fast as possible) won't guarantee the shape won't change in unexpected ways when changes are made.
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
Absinthe
Posts: 46
Joined: Thu May 17, 2018 12:20 am

Re: I made fully constrained sketches today... why?

Post by Absinthe »

I am probably not doing it correctly.

I had to go back and modify a sketch. The piece had to be exteded by perhaps a couple mm to fit. In order to do that, I had to find enough constraints to remove so that I could actually modify the sketch.

When adding the constraints, some of them make some sense, but others just simply junk up the screen. After all once they are all in there, it is a giant cluster of overlapping nonsense.

As for being parametric, does this in some way help me to do that? I would assume that ultimately everything should start off in a database. With some base value, and everything else some factor of that? This is a guess, I have yet to do such a thing, but it would make sense. I am looking to make certain things, that I would like to say, "I like that at 6" long, now I want a 4" long one to go with it." Does this in some way help me? From what I can tell, the majority of the constraints are lengths and widths. I would only assume to resize something would involve removing most of the constraints and starting over.

This constraint concept is a new one to me. Perhaps that is why it feels so odd. But so is, I assume, parametric CAD. Normally, I would work in 2D in Inkscape. If I had something that made a 6" item, and I wanted a 4" one, I would simply select it and scale it to 4" and hit print.

Probably should be a second post, but what is wrong with Splines, B-Splines and so on. When I started out I was using the heck out of them. Then when I had issues trying to do things such as chamfers and fillets and so on, I got a lot of folks saying how arc's are much better, and FreeCAD doesn't really support the splines so well. I did have someone send me a macro that was supposed to help convert splines into arcs, but it is hit and miss. Sometimes it works, sometimes it just STB. Anyway, since I have most of my body of existing work in SVG in Inkscape, when I try to import any of it as an SVG to convert to sketch, it always seems to come in as lots of splines. :( I just went through all the attempts to use that script, to no avail, then hand traced it into arcs. I just did one earlier that I left the splines in place and was able to do whatever I needed, so I assume they can't be all bad. :)

Recent work modeling slipjoint "Texas Toothpick". Just blade and spring.
Spring and blade in Open config
Spring and blade in Open config
open.png (32.69 KiB) Viewed 1161 times
Spring and blade in Closed config
Spring and blade in Closed config
closed.png (39.45 KiB) Viewed 1161 times
better angle on closed
better angle on closed
aa.png (31.74 KiB) Viewed 1161 times
Spring and blade in HS config
Spring and blade in HS config
halfstop.png (33.38 KiB) Viewed 1161 times
drmacro
Veteran
Posts: 8865
Joined: Sun Mar 02, 2014 4:35 pm

Re: I made fully constrained sketches today... why?

Post by drmacro »

Select the constraints and move to virtual space. Image

Use the Constraint display in the Combo view to Deactivate, Hide, them etc.

Yes, constraints are what will control the parametric changes from your database (spreadsheet, Dynamic Data, named constraints, etc.)
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
adrianinsaval
Veteran
Posts: 5541
Joined: Thu Apr 05, 2018 5:15 pm

Re: I made fully constrained sketches today... why?

Post by adrianinsaval »

Absinthe wrote: Tue Aug 02, 2022 4:33 pm I had to go back and modify a sketch. The piece had to be exteded by perhaps a couple mm to fit. In order to do that, I had to find enough constraints to remove so that I could actually modify the sketch.
You edit by changing the constraint values, usually there's no need to remove any constraint.
When adding the constraints, some of them make some sense, but others just simply junk up the screen. After all once they are all in there, it is a giant cluster of overlapping nonsense.
You might be abusing dimensional constraints, you should use geometrical constraints whenever posible (coincidence, parallel, symmetric, etc.). Never use 0 length dimension constraints (that's what coincidence and point on object are for). It appears you are working with many splines, these can be a pain to fully constrain and it might not be worth it if you are just doing them freehand, just make sure to have coincidence or endpoint tangency at the endpoints to ensure you are sketching a closed profile. See further on how to proportionally scale splines through one defining constraint.
Also you can move constraints that you don't want to see all the time to a different virtual space as pointed out by drmacro, you can also move the labels so they don't overlap.
As for being parametric, does this in some way help me to do that? I would assume that ultimately everything should start off in a database. With some base value, and everything else some factor of that? This is a guess, I have yet to do such a thing, but it would make sense. I am looking to make certain things, that I would like to say, "I like that at 6" long, now I want a 4" long one to go with it." Does this in some way help me?
yes this helps with that, you can use spreasheets and Expressions or just directly constraint values and expressions between them. Did you by any chance make a relatively recent post on the facebook group about modelling knives using splines? I remember I posted an example of a spline controlled through expressions to grow with a given length, here it is:
spline-example.FCStd
(13.19 KiB) Downloaded 10 times
the spline is parametrically controlled through the length constraint, if some of the spline knots where not constrained it wouldn't necessarily grow proportionally and the intended shape would be distorted.
From what I can tell, the majority of the constraints are lengths and widths.
This is usually not a good sign, you want most of your constraints to be geometrical, this is not always possible if you want to fully constrain a spline though.
I would only assume to resize something would involve removing most of the constraints and starting over.
No, you want to edit the values of the existing constraints. Redoing is exactly what we want to avoid.
I would simply select it and scale it to 4" and hit print.
There are direct scaling options in CAD too but is not always the case that you want uniform scaling of all edges.
Absinthe
Posts: 46
Joined: Thu May 17, 2018 12:20 am

Re: I made fully constrained sketches today... why?

Post by Absinthe »

I am in a few FB groups but not sure if I was asking about the splines there.

I will look at the file when I am back at the computer, I am on the phone now.

Obviously, I am doing a bunch wrong.

So let's say I am designing a blade for a folder. The main beginning design is a square centered on the global zero so that I can rotate it later. I can make the corners synch on the center zero. Next I will add in a rectangle butted up against it at one corner but it will be 50% taller and some length. Then I would remove the lines where they overlap.

So that would be a blade and tang. I may want to lengthen the blade but keep the tang exactly the same size. So I could put a length on the rectangle side and if I want it longer I can come in and change that constraint only. In this example let's say the tang (square) is 10x10. That would mean I always want my blade height to be 15 high. Can I do that without a spreadsheet? Or have I now begun things that require a spreadsheet?

Later I will make two arcs sharing an endpoint and constrained to the line that makes up the end of the blade rectangle, with their other endpoints on the top and bottom of the blade rectangle. However, now I want to remove the horizontal and end lines that were the constraints so I trimmed them. Not sure if I get to keep my constraints or have to remove them to now change the blade shape.

I will go try some of this now and see if I can do it.
Post Reply