|
|
| Menu location |
|---|
| Sketch → Sketcher constraints → Constrain distance |
| Workbenches |
| Sketcher |
| Default shortcut |
| Shift + D |
| Introduced in version |
| - |
| See also |
| Constrain horizontal distance, Constrain vertical distance |
Constrain distance constrânge lungimea unei linii, distanța perpendiculară dintre un punct și o linie sau distanța dintre două puncte pentru a avea o valoare specificată.
See also: Drawing aids.
See Sketcher Dimension.
Distance from origin:
Sketch.addConstraint(Sketcher.Constraint('Distance', Edge, PointOfEdge, -1, 1, App.Units.Quantity('123.0 mm')))
Distance between two vertices:
Sketch.addConstraint(Sketcher.Constraint('Distance', Edge1, PointOfEdge1, Edge2, PointOfEdge2, App.Units.Quantity('123.0 mm')))
Length of line (the GUI allows selecting the edge itself, but it is just a shorthand for using the two extremities of the same line):
Sketch.addConstraint(Sketcher.Constraint('Distance', Line, 1, Line, 2, App.Units.Quantity('123.0 mm')))
Distance from point (Edge, PointOfEdge) to perpendicular point on line (Line):
Sketch.addConstraint(Sketcher.Constraint('Distance', Edge, PointOfEdge, Line, 0, App.Units.Quantity('123.0 mm')))
Distance between the edges of two circles:
Sketch.addConstraint(Sketcher.Constraint('Distance', Circle1, 0, Circle2, 0, App.Units.Quantity('123.0 mm')))
The Sketcher scripting page explains the values which can be used for Edge, Edge1, Edge2, PointOfEdge, PointOfEdge1, PointOfEdge2, Line, Circle1 and Circle2, and contains further examples on how to create constraints from Python scripts.