Translations:Basic Part Design Tutorial 019/38/en

From FreeCAD Documentation
  1. The three vertical and horizontal constraints you see in the image should have been added automatically provided you drew those lines that way. If you didn't you need to add them.
  2. Select the point P2 and the Y axis of the sketch and apply a Point onto object constraint. Because the sketch is attached to the YZ_Plane, the Y axis of the sketch does not match the Y axis of the body.
  3. Select the origin and the point P1 and apply a Horizontal constraint. Why not a Coincident constraint? you might ask. Try it (and undo). The sketch will turn orange and a solver message Redundant constraints will appear. Because the line P1 to P2 has already been constrained to be vertical, the only remaining degree of freedom is P1's Y coordinate. The coincidence constraint sets both the X and Y coordinates to zero, but the X coordinate is already determined. The horizontal constraint, on the other hand, only sets the Y coordinate to zero, which is sufficient.
  4. Select the line defined by the points P2 and P3, apply a Horizontal distance constraint, and assign Length = 5 mm.
  5. Select the line defined by the points P1 and P2, apply a Vertical distance constraint, and assign Length = 26 mm.
  6. Select the line defined by the points P1 and P4 and apply a Horizontal distance constraint:
    1. For this value you will use a named constraint using Expressions. To do so you have to click the little button in the Length input field: .
    2. You will be presented with a new dialog named Formula editor that contains an input field and a Result: label, similar to the image below:

      When you start typing in the input field, you will be presented with some autocompletions.
    3. Select the label of the sketch. In our case we want <<Sketch>>.. Note the period after the label.
    4. To select the named constraint "width", you first have to enter Constraints. with the period. Here autocomplete works.
    5. To add "width", as yet autocompletion is not available, so complete the cell to read <<Sketch>>.Constraints.width. If all went well the red error message after Result: has been replaced by the correct value as in the image below:
    6. Click OK to close the Formula editor dialog.
    7. Click OK to close the Insert length dialog.
  7. You should have a fully constrained sketch similar to Fig: MP2.
  8. Note the different colors used for distance constraints assigned using expressions, and those assigned specifying a length.