solver::verticalDistanceFunction in std::solver
Constrain the vertical distance between two points.
The distance is signed, so the order of the points matters: the value set
with == equals the second point's Y coordinate minus the first point's
Y coordinate. A positive value places the second point at a greater Y
than the first, and swapping the points negates the sign. For example,
verticalDistance([ORIGIN, point]) == 5mm places point at Y = 5mm,
while verticalDistance([point, ORIGIN]) == 5mm places it at Y = -5mm.
Arguments
| Name | Type | Description | Required |
|---|---|---|---|
points | [Segment or Point2d; 2] | Two sketch points, or one sketch point and ORIGIN. The value set with == equals the second point's Y coordinate minus the first point's Y coordinate, so the order of the points determines the sign. | Yes |
labelPosition | Point2d | Optional position for the displayed constraint label in the sketch's local 2D coordinate system. | No |