Fix finset print resolution
This commit is contained in:
parent
a7a73e9949
commit
5492029a69
@ -1244,7 +1244,7 @@ public abstract class FinSet extends ExternalComponent implements AxialPositiona
|
|||||||
// for anything more complicated, increase the count:
|
// for anything more complicated, increase the count:
|
||||||
if ((body instanceof Transition) && (((Transition)body).getType() != Shape.CONICAL)) {
|
if ((body instanceof Transition) && (((Transition)body).getType() != Shape.CONICAL)) {
|
||||||
// the maximum precision to enforce when calculating the areas of fins (especially on curved parent bodies)
|
// the maximum precision to enforce when calculating the areas of fins (especially on curved parent bodies)
|
||||||
final double xWidth = 0.005; // width (in meters) of each individual iteration
|
final double xWidth = 0.0025; // width (in meters) of each individual iteration
|
||||||
divisionCount = (int) Math.ceil(intervalLength / xWidth);
|
divisionCount = (int) Math.ceil(intervalLength / xWidth);
|
||||||
|
|
||||||
// When creating body curves, don't create more than this many divisions. -- only relevant on very large components
|
// When creating body curves, don't create more than this many divisions. -- only relevant on very large components
|
||||||
@ -1271,7 +1271,8 @@ public abstract class FinSet extends ExternalComponent implements AxialPositiona
|
|||||||
points[lastIndex] = points[lastIndex].setX(body.getLength()).setY(body.getAftRadius());
|
points[lastIndex] = points[lastIndex].setX(body.getLength()).setY(body.getAftRadius());
|
||||||
}
|
}
|
||||||
|
|
||||||
if( 0.0000001 < (Math.abs(xOffset) + Math.abs(yOffset))){
|
// translate the points if needed
|
||||||
|
if ((Math.abs(xOffset) + Math.abs(yOffset)) > 0.0000001) {
|
||||||
points = translatePoints(points, xOffset, yOffset);
|
points = translatePoints(points, xOffset, yOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -48,7 +48,7 @@ public class PrintableFinSet extends AbstractPrintable<FinSet> {
|
|||||||
|
|
||||||
Coordinate[] points = component.getFinPointsWithTab();
|
Coordinate[] points = component.getFinPointsWithTab();
|
||||||
|
|
||||||
polygon = new GeneralPath(GeneralPath.WIND_EVEN_ODD, points.length);
|
polygon = new GeneralPath(GeneralPath.WIND_NON_ZERO, points.length);
|
||||||
polygon.moveTo(0, 0);
|
polygon.moveTo(0, 0);
|
||||||
|
|
||||||
minX = 0;
|
minX = 0;
|
||||||
@ -57,8 +57,8 @@ public class PrintableFinSet extends AbstractPrintable<FinSet> {
|
|||||||
int maxY = 0;
|
int maxY = 0;
|
||||||
|
|
||||||
for (Coordinate point : points) {
|
for (Coordinate point : points) {
|
||||||
final long x = (long)PrintUnit.METERS.toPoints(point.x);
|
final float x = (float) PrintUnit.METERS.toPoints(point.x);
|
||||||
final long y = (long)PrintUnit.METERS.toPoints(point.y);
|
final float y = (float) PrintUnit.METERS.toPoints(point.y);
|
||||||
minX = (int) Math.min(x, minX);
|
minX = (int) Math.min(x, minX);
|
||||||
minY = (int) Math.min(y, minY);
|
minY = (int) Math.min(y, minY);
|
||||||
maxX = (int) Math.max(x, maxX);
|
maxX = (int) Math.max(x, maxX);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user