[TD]fix angle dim in detail view

This commit is contained in:
wandererfan
2025-11-05 12:46:35 -06:00
committed by Chris Hennes
parent f2d60d7abe
commit 37af704998
2 changed files with 8 additions and 22 deletions
+2 -16
View File
@@ -1238,7 +1238,6 @@ anglePoints DrawViewDimension::getAnglePointsTwoEdges(ReferenceVector references
farPoint0 = generic0->getStartPoint();
}
// pick the end of generic1 farthest from the apex
Base::Vector3d farPoint1{generic1->getEndPoint()};
if ((generic1->getStartPoint() - apex).Length()
@@ -1246,22 +1245,9 @@ anglePoints DrawViewDimension::getAnglePointsTwoEdges(ReferenceVector references
farPoint1 = (generic1->getStartPoint());
}
Base::Vector3d leg0Dir = (farPoint0 - apex).Normalize();
Base::Vector3d leg1Dir = (farPoint1 - apex).Normalize();
Base::Vector3d extenPoint0 = farPoint0; // extension line points
Base::Vector3d extenPoint1 = farPoint1;
double extenRadius = std::min(extenPoint0.Length(),
extenPoint1.Length());
if (extenRadius == 0) {
// one of the legs has 0 length??
throw Base::RuntimeError("No extension point radius!!");
}
anglePoints pts;
pts.first(apex + leg0Dir * extenRadius);
pts.second(apex + leg1Dir * extenRadius);
pts.first(farPoint0);
pts.second(farPoint1);
pts.vertex(apex);
return pts;
}