|
|
| Menu location |
|---|
| Sketch → Constraints → Perpendicular Constraint |
| Workbenches |
| Sketcher |
| Default shortcut |
| N |
| Introduced in version |
| - |
| See also |
| Sketcher ConstrainAngle |
The Sketcher ConstrainPerpendicular tool constrains two lines to be perpendicular, or two edges, or an edge and an axis, to be perpendicular at their intersection. Lines are treated as infinite, and open curves are virtually extended as well. The constraint can also connect two edges, forcing them to be perpendicular at the joint.
See also: Drawing aids.
The two edges are made perpendicular at their (virtual) intersection. If one of the edges is a conic, a point object that has a point-on-object constraint with both (extended) edges is added.
The endpoints are made coincident, and the edges are made perpendicular at that point.
The endpoint of one edge is constrained to lie on the other edge, and the edges are made perpendicular at that point.
The two edges are made perpendicular at a given point. The point can be any point, e.g. the center of a circle, the endpoint of an edge, or the origin, it can belong to one of the edges, and it can also be a point object. If required point-on-object constraint(s) are added to ensure the point lies on both (extended) edges. These additional constraints are called helper constraints.
introduced in 26.3: The direction from the first selected point to the second is constrained to be perpendicular to the straight line. The points can be sketch points or points belonging to geometry, such as endpoints. No connecting line is created between them. For example, select the centers of two circles and then a straight edge to keep the centers aligned perpendicular to that edge.
Perpendicular Constraint can be created from macros and from the python console by using the following:
# direct perpendicularity
Sketch.addConstraint(Sketcher.Constraint('Perpendicular',icurve1,icurve2))
# point-to-point perpendicularity
Sketch.addConstraint(Sketcher.Constraint('Perpendicular',icurve1,pointpos1,icurve2,pointpos2))
# point-to-curve perpendicularity
Sketch.addConstraint(Sketcher.Constraint('Perpendicular',icurve1,pointpos1,icurve2))
# perpendicular-via-point (plain constraint, helpers are not added automatically)
Sketch.addConstraint(Sketcher.Constraint('PerpendicularViaPoint',icurve1,icurve2,geoidpoint,pointpos))
# direction between two points perpendicular to a straight line (26.3)
Sketch.addConstraint(Sketcher.Constraint('Perpendicular',igeo1,pointpos1,igeo2,pointpos2,iline))
where:
Sketch is a sketch objecticurve1, icurve2 are two integers identifying the curves to be made perpendicular. The integers are indexes in the sketch (the value, returned by Sketch.addGeometry).pointpos1, pointpos2 should be 1 for start point and 2 for end point. In the two-points-and-line form, 3 for center point can also be used.geoidpoint and pointpos in PerpendicularViaPoint are the indexes specifying the point of perpendicularity.igeo1 and igeo2 identify the geometry containing the two points, pointpos1 and pointpos2 identify those points, and iline identifies the straight line in the two-points-and-line form.The Sketcher scripting page explains the values which can be used for icurve1, icurve2, pointpos1, pointpos2 and geoidpoint, and contains further examples on how to create constraints from Python scripts.