Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
What does Fully Defined mean?
I have been using Onshape for just a few weeks. Help me understand what is the downside of leaving sketches not fully defined.
Best Answers
-
_anton Member, Onshape Employees Posts: 413
Your sketch entities have degrees of freedom. E.g., a circle has a center and a diameter. If you constrain those to known references or measurements, then you can be sure that it'll remain constrained to those. If it's not constrained, then future behavior is basically undefined. It may work most of the time, like an uninitialized variable, but upstream input may change in such a way that your sketch goes haywire.
Furthermore, if a sketch entity is underconstrained, then there's something you don't actually know about your design. Say, you can free-hand a rectangle and extrude it, but you didn't specify its dimensions, so those are not known quantities and therefore aren't meaningful nor reusable. It's like defining constants locally in code rather than keeping them in a central place where you know to look.
2 -
Oliver_Couch Member Posts: 226 PRO
The short answer is that 'fully defined' means you have told the program explicitly how to calculate the position of every point, line, arc etc. which exists in your sketch when changes are made to the model. This can be either via geometric relationships (eg. A coincident constraint - this element should always be in the same place as that element), or it can be via dimensional constraints (eg, the end points of this line are always 30mm apart).
To really understand what it means to be fully defined though, you need to go back to some basics of what a 'parametric CAD' program, like onshape, actually is.
The CAD part of the name fundamentally means a piece of software for working on mathematically defined geometry, by drawing geometric elements while it solves the corresponding geometric equations for you (instead of the other way around).
And just what are geometric elements? There are 2 types: points, which are a pair of x and y values (aka coordinates) and equations of x and y (the simplest of which is a straight line).
In traditional cad, the coordinates of points and equations of elements are constant. That is, once set they don't change unless you change each of them directly. InThis is the approach AutoCAD and similar 2D packages used. It's fast to draw but editing can be tedious. In parametric cad, the coordinates depend on parameters (or variables) so you can change one thing and affect many elements for, or you can set them to be constant values (usually by applying a dimension).
Sticking with the simplest element for an example: a line is the series or locus of points which satisfy the equation y=mx+b, where m is the gradient and b is the y-intercept. A line is fully defined once you have an equation (or definition) for both m and b, or equivalently, once you have two points which are both on that line (ie. coincident), or a point and a gradient (value for m). Note that having a value for b is the same as having a point on the line whose x coordinate = 0.
If you have no information about where a line should be it is fully undefined.
If you only have one point, or just the gradient, for a given line, then it is not fully defined - ie there are infinite possible solutions to the equation.
For example, let m=1. Now find the unique value of x such that y=mx+b:
y=x+b (sub in m)
x=y-b (rearrange)
And now we're out of things to do. For any given x, (say x=0, then y=-b) b could be anything. b=1 is a solution, and so is b=1000, as is every real number. There are infinite possible solutions, and no unique solution - it's an impossible task. Indeed, for every point on the plane there is a line that goes through it where m=1.
This means the program cannot calculate where the line should be (since it could be anywhere) and thus the line is partially undefined.
So, when something else changes and the software needs to recalculate where everything should be, it's not possible to do, and there's no way for it to know what it should do.
But in order to show it on the screen it has to do something. Usually, in this case it will just retain its pre-existing value for any undefined part of the equations.This usually results in very strange behaviour or errors in calculating other geometry.
For example, you may have 2 points which are on a circle, but no information constraining possible locations for the circle centre (a circle, requires 3 known points/pieces of information to fully define). If you move those two points the centre will stay where it is - which might cause the radius to change massively, or for the circle to even flip around to the other side.
Then if you used a sketch region for an extrude feature, a sketch region may no longer exist in your sketch, or it may be completely outside of where you later positioned holes to be.
1 -
paul_chastell Onshape Employees Posts: 126
Great discussion with some great comments. I particularly like the yarn & breeze metaphor. These questions have been asked a few times so I made a brief post with my own explanation of what all this is about: https://forum.onshape.com/discussion/25451/fully-defined-sketches-what-are-they-and-why-care/p1?new=1
Paul Chastell
TVP, Onshape R&D2
Answers
If it's not defined, it's not controlled. That means it can change at any time if something else changes, or may not change correctly if another feature changes resulting in errors in your model.
Fully defining your sketches ensures that changes to your model have predictable and desirable results.
I have a bunch of sketches making up a part. There are dimensions and constraints but none of the sketches is fully defined. It all hangs together OK at the moment. But from what you are saying it's not guaranteed to stay that way? If I make no changes to any of the sketches then can I assume that the generated shapes will stay put? Despite that they are not fully defined? Or can other things affect the stability of the part?
Oliver's comments are right on the mark. It is best practice to fully define sketches. Models can be made from under defined sketches, but you get into trouble when you make edits, or make configurations of that model. When you are starting out with simple parts, you don't notice this as a problem (although it's still there) - but as your parts become more complex, having under defined sketches will come back to bite you (and this is hard, and time consuming to correct later). My advice is to get into the habit of "fully defining" your sketches. There may be some extreme case where you wouldn't want to, but I can't think of one.
Hint - If you have a sketch that is difficult to fully define, don't forget to dimension/or constrain, to the origin
It's like cutting up yarn into small lengths and laying the individual pieces on a piece of paper to form a picture with. It's all good, until a breeze comes by and blows all the pieces off.
Correct, the sketch itself won't move on its own, even if its not fully defined.
Usually what will happen is you may change a feature before that sketch, and it will then affect the sketch.
If you make changes upstream and your sketches downstream are not fully defined it might have issues. If you make no changes and only move forward nothing changes
It seems to me that nothing so far has clarified what Fully Defined actually means. Clearly there is an algorithm of some sort defining whether or not to display that message 'Not Fully Defined' and turn the sketch black. What are the key elements of that logic?
I'm very new to CAD but have a background in programming. When I see a message like this that is supported by comments such as "it's good practice" it doesn't help. I know it's good practice and I can see why it would be. But I want to know the rules. Sorry to be pedantic
Oh, I forgot to mention that the hint above about dimensioning/constraining to the origin is very useful. Thanks!
Not fully constrained means that some of the lines/arcs/splines in the sketch can move around. They are not referenced to anything else, be it a plane, origin, prior feature, or other line in the sketch. One way you can see this is to put your mouse on the lines or the end points and try to drag things around.
Your sketch entities have degrees of freedom. E.g., a circle has a center and a diameter. If you constrain those to known references or measurements, then you can be sure that it'll remain constrained to those. If it's not constrained, then future behavior is basically undefined. It may work most of the time, like an uninitialized variable, but upstream input may change in such a way that your sketch goes haywire.
Furthermore, if a sketch entity is underconstrained, then there's something you don't actually know about your design. Say, you can free-hand a rectangle and extrude it, but you didn't specify its dimensions, so those are not known quantities and therefore aren't meaningful nor reusable. It's like defining constants locally in code rather than keeping them in a central place where you know to look.
The short answer is that 'fully defined' means you have told the program explicitly how to calculate the position of every point, line, arc etc. which exists in your sketch when changes are made to the model. This can be either via geometric relationships (eg. A coincident constraint - this element should always be in the same place as that element), or it can be via dimensional constraints (eg, the end points of this line are always 30mm apart).
To really understand what it means to be fully defined though, you need to go back to some basics of what a 'parametric CAD' program, like onshape, actually is.
The CAD part of the name fundamentally means a piece of software for working on mathematically defined geometry, by drawing geometric elements while it solves the corresponding geometric equations for you (instead of the other way around).
And just what are geometric elements? There are 2 types: points, which are a pair of x and y values (aka coordinates) and equations of x and y (the simplest of which is a straight line).
In traditional cad, the coordinates of points and equations of elements are constant. That is, once set they don't change unless you change each of them directly. InThis is the approach AutoCAD and similar 2D packages used. It's fast to draw but editing can be tedious. In parametric cad, the coordinates depend on parameters (or variables) so you can change one thing and affect many elements for, or you can set them to be constant values (usually by applying a dimension).
Sticking with the simplest element for an example: a line is the series or locus of points which satisfy the equation y=mx+b, where m is the gradient and b is the y-intercept. A line is fully defined once you have an equation (or definition) for both m and b, or equivalently, once you have two points which are both on that line (ie. coincident), or a point and a gradient (value for m). Note that having a value for b is the same as having a point on the line whose x coordinate = 0.
If you have no information about where a line should be it is fully undefined.
If you only have one point, or just the gradient, for a given line, then it is not fully defined - ie there are infinite possible solutions to the equation.
For example, let m=1. Now find the unique value of x such that y=mx+b:
y=x+b (sub in m)
x=y-b (rearrange)
And now we're out of things to do. For any given x, (say x=0, then y=-b) b could be anything. b=1 is a solution, and so is b=1000, as is every real number. There are infinite possible solutions, and no unique solution - it's an impossible task. Indeed, for every point on the plane there is a line that goes through it where m=1.
This means the program cannot calculate where the line should be (since it could be anywhere) and thus the line is partially undefined.
So, when something else changes and the software needs to recalculate where everything should be, it's not possible to do, and there's no way for it to know what it should do.
But in order to show it on the screen it has to do something. Usually, in this case it will just retain its pre-existing value for any undefined part of the equations.This usually results in very strange behaviour or errors in calculating other geometry.
For example, you may have 2 points which are on a circle, but no information constraining possible locations for the circle centre (a circle, requires 3 known points/pieces of information to fully define). If you move those two points the centre will stay where it is - which might cause the radius to change massively, or for the circle to even flip around to the other side.
Then if you used a sketch region for an extrude feature, a sketch region may no longer exist in your sketch, or it may be completely outside of where you later positioned holes to be.
The single most helpful insight for me is the second paragraph above: that under-constrained indicates that something about the design is unknown.
This has been a worthwhile exercise for me. Thanks to everyone who commented.
Great discussion with some great comments. I particularly like the yarn & breeze metaphor. These questions have been asked a few times so I made a brief post with my own explanation of what all this is about: https://forum.onshape.com/discussion/25451/fully-defined-sketches-what-are-they-and-why-care/p1?new=1
TVP, Onshape R&D
Paul's post is the definitive answer. Check it out.