Fix drawing of angle constraints beyond the centerpoint and for negative angles

This commit is contained in:
Matthias Danner
2025-08-05 20:12:03 +02:00
committed by Kacper Donat
parent 8786cac938
commit 377ccbdf54

View File

@@ -1692,8 +1692,9 @@ SoDatumLabel::AngleGeometry SoDatumLabel::calculateAngleGeometry(const SbVec3f*
geom.v1 = SbVec3f(cos(geom.startangle), sin(geom.startangle), 0);
geom.v2 = SbVec3f(cos(geom.endangle), sin(geom.endangle), 0);
if (geom.range < 0) {
if (geom.range < 0 || geom.length < 0) {
std::swap(geom.v1, geom.v2);
geom.textMargin = -geom.textMargin;
}
geom.pnt1 = geom.p0 + (geom.r - geom.endLineLength1) * geom.v1;