[fixes #1003] Use clipping of FinSet points only around edge of part, no further

This commit is contained in:
Sibo Van Gool 2021-09-16 01:53:53 +02:00
parent 4edba14595
commit 9382a3b832

View File

@ -1161,6 +1161,12 @@ public abstract class FinSet extends ExternalComponent implements AxialPositiona
xCur += increment;
}
// correct last point, if beyond a rounding error from body's end.
final int lastIndex = points.length - 1;
if (Math.abs(points[lastIndex].x - body.getLength()) < 0.000001) {
points[lastIndex] = points[lastIndex].setX(body.getLength()).setY(body.getAftRadius());
}
if( 0.0000001 < (Math.abs(xOffset) + Math.abs(yOffset))){
points = translatePoints(points, xOffset, yOffset);
}