Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,8 @@ public double sceneToWorldFixedXY_WP(Point2D scenePixel, double fixedX, double f
else
t = ((fixedX - ox) * dx + (fixedY - oy) * dy) / denom;

return localOrigin.getZ() + t * localDir.z;
// Limit range to within -1200 and +1200mm
return Math.max(-1200, Math.min(localOrigin.getZ() + t * localDir.z, 1200));

} catch (NonInvertibleTransformException e) {
return 0;
Expand Down