[#1613] Fix auto-calc not working for unequally sized rings

This commit is contained in:
SiboVG 2022-08-25 21:23:52 +02:00
parent 22281b3f09
commit 0416328097

View File

@ -272,12 +272,16 @@ public abstract class FinSetConfig extends RocketComponentConfig {
CenteringRing ring = (CenteringRing) rocketComponent; CenteringRing ring = (CenteringRing) rocketComponent;
if (ring.getOuterRadius() > maxRingRad) { if (ring.getOuterRadius() > maxRingRad) {
maxRingRad = ring.getOuterRadius(); maxRingRad = ring.getOuterRadius();
rings.clear(); }
rings.add(ring);
} else if (ring.getOuterRadius() == maxRingRad) {
rings.add(ring); rings.add(ring);
} }
} }
// Remove rings that are smaller than the maximum inner tube radius
for (CenteringRing ring : new ArrayList<>(rings)) {
if (ring.getOuterRadius() <= maxTubeRad) {
rings.remove(ring);
}
} }
//Figure out position and length of the fin tab //Figure out position and length of the fin tab