Sketcher Micro Tutorial - Constraint Practices: Difference between revisions

From FreeCAD Documentation
(<translate>)
(Marked this version for translation)
Line 1: Line 1:
<translate>
<translate>
<!--T:1-->
{{TutorialInfo|Class=Modeling|Level=Beginner|Author=Mark Stephen ([[User:Quick61|Quick61]])|Time=Less than 15 minutes|FCVersion=0.15.4671 Release or greater}}
{{TutorialInfo|Class=Modeling|Level=Beginner|Author=Mark Stephen ([[User:Quick61|Quick61]])|Time=Less than 15 minutes|FCVersion=0.15.4671 Release or greater}}


== Welcome ==
== Welcome == <!--T:2-->
Welcome. This tutorial is designed to help the new FreeCAD user become familiar with the techniques and best practices constraining a sketch. This micro tutorial is basically an enhanced copy from a post on the subject in the FreeCAD forum and placed here for more universal and convenient access.
Welcome. This tutorial is designed to help the new FreeCAD user become familiar with the techniques and best practices constraining a sketch. This micro tutorial is basically an enhanced copy from a post on the subject in the FreeCAD forum and placed here for more universal and convenient access.


== A Quick Explanation ==
== A Quick Explanation == <!--T:3-->
There is a general rule with FreeCAD's sketcher constraints, the fewer amount of dimensional constraints, the better. It is always preferable to use a geometric constraint in place of a dimensional one if possible. This has to do with the internal workings of Sketcher's solver.
There is a general rule with FreeCAD's sketcher constraints, the fewer amount of dimensional constraints, the better. It is always preferable to use a geometric constraint in place of a dimensional one if possible. This has to do with the internal workings of Sketcher's solver.


== First Approach ==
== First Approach == <!--T:4-->
As an example, take a square sketch. In the first screenshot, the sketch is fully constrained, but is using only dimensional, (distance), constraints. this is OK, but overly complicated, cluttered, and more math intensive for the solver. While this is not an issue with such a simple example, it can become one with more complex sketches.
As an example, take a square sketch. In the first screenshot, the sketch is fully constrained, but is using only dimensional, (distance), constraints. this is OK, but overly complicated, cluttered, and more math intensive for the solver. While this is not an issue with such a simple example, it can become one with more complex sketches.
</translate>
</translate>
Line 15: Line 16:


<translate>
<translate>
== A Better Way ==
== A Better Way == <!--T:5-->
The next screenshot is the same square, constrained using some geometric constraints. Using the horizontal and vertical geometric constraints, along with dimensional, (distance), constraints. By just using the horizontal and vertical geometric constraints, you can see the number of required dimensional constraints have been reduced. This is a better constrained sketch than the first, but is still not the optimum constraining scheme for this square.
The next screenshot is the same square, constrained using some geometric constraints. Using the horizontal and vertical geometric constraints, along with dimensional, (distance), constraints. By just using the horizontal and vertical geometric constraints, you can see the number of required dimensional constraints have been reduced. This is a better constrained sketch than the first, but is still not the optimum constraining scheme for this square.
</translate>
</translate>
Line 22: Line 23:


<translate>
<translate>
== Optimum Scheme ==
== Optimum Scheme == <!--T:6-->
Now, in this last screenshot, there is only 1 dimensional, (distance), constraint, with the remaining constraints being geometrical. This is the best way to constrain this sketch. While with a simple sketch like this, one way or the other is no big deal, on larger and more complex sketches, sticking to the minimum dimensions rule will prove out to be beneficial to you and your endeavors constructing geometry with sketches. The geometrical constraints used in this sketch are horizontal, vertical, equal, and symmetry.
Now, in this last screenshot, there is only 1 dimensional, (distance), constraint, with the remaining constraints being geometrical. This is the best way to constrain this sketch. While with a simple sketch like this, one way or the other is no big deal, on larger and more complex sketches, sticking to the minimum dimensions rule will prove out to be beneficial to you and your endeavors constructing geometry with sketches. The geometrical constraints used in this sketch are horizontal, vertical, equal, and symmetry.
</translate>
</translate>
Line 29: Line 30:


<translate>
<translate>
== Additional Resources ==
== Additional Resources == <!--T:7-->


<!--T:8-->
[[Sketcher Workbench|Sketcher]]
[[Sketcher Workbench|Sketcher]]


<!--T:9-->
[[Sketcher Tutorial|Sketcher Tutorial]]
[[Sketcher Tutorial|Sketcher Tutorial]]


<!--T:10-->
[[Category:Tutorials]]
[[Category:Tutorials]]



Revision as of 22:01, 18 July 2015

Tutorial
Topic
{{{Topic}}}
Level
Beginner
Time to complete
Less than 15 minutes
Authors
Mark Stephen (Quick61)
FreeCAD version
0.15.4671 Release or greater
Example files
None
See also
None

Welcome

Welcome. This tutorial is designed to help the new FreeCAD user become familiar with the techniques and best practices constraining a sketch. This micro tutorial is basically an enhanced copy from a post on the subject in the FreeCAD forum and placed here for more universal and convenient access.

A Quick Explanation

There is a general rule with FreeCAD's sketcher constraints, the fewer amount of dimensional constraints, the better. It is always preferable to use a geometric constraint in place of a dimensional one if possible. This has to do with the internal workings of Sketcher's solver.

First Approach

As an example, take a square sketch. In the first screenshot, the sketch is fully constrained, but is using only dimensional, (distance), constraints. this is OK, but overly complicated, cluttered, and more math intensive for the solver. While this is not an issue with such a simple example, it can become one with more complex sketches.

File:Constrain1.png

A Better Way

The next screenshot is the same square, constrained using some geometric constraints. Using the horizontal and vertical geometric constraints, along with dimensional, (distance), constraints. By just using the horizontal and vertical geometric constraints, you can see the number of required dimensional constraints have been reduced. This is a better constrained sketch than the first, but is still not the optimum constraining scheme for this square.

File:Constrain2.png

Optimum Scheme

Now, in this last screenshot, there is only 1 dimensional, (distance), constraint, with the remaining constraints being geometrical. This is the best way to constrain this sketch. While with a simple sketch like this, one way or the other is no big deal, on larger and more complex sketches, sticking to the minimum dimensions rule will prove out to be beneficial to you and your endeavors constructing geometry with sketches. The geometrical constraints used in this sketch are horizontal, vertical, equal, and symmetry.

Additional Resources

Sketcher

Sketcher Tutorial