Merge pull request #1016 from SiboVG/issue-1003

[fixes #1003] Fix FinSet point clipping when further than parent body
This commit is contained in:
Joe Pfeiffer 2021-11-08 12:02:50 -07:00 committed by GitHub
commit e2035bc918
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

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

View File

@ -32,9 +32,9 @@ public class FinSetShapes extends RocketComponentShape {
final Transformation compositeTransform = transformation.applyTransformation(cantRotation);
Coordinate finPoints[] = finset.getFinPoints();
Coordinate tabPoints[] = finset.getTabPoints();
Coordinate rootPoints[] = finset.getRootPoints();
Coordinate[] finPoints = finset.getFinPoints();
Coordinate[] tabPoints = finset.getTabPoints();
Coordinate[] rootPoints = finset.getRootPoints();
// Translate & rotate points into place
finPoints = compositeTransform.transform( finPoints );