[#2217] Whoops, my bad, component volume is for all instances
This commit is contained in:
parent
7956867dd9
commit
d58b856acc
@ -102,7 +102,7 @@ public abstract class ExternalComponent extends RocketComponent {
|
||||
*/
|
||||
@Override
|
||||
public double getComponentMass() {
|
||||
return material.getDensity() * getComponentVolume() * getInstanceCount();
|
||||
return material.getDensity() * getComponentVolume();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -215,7 +215,7 @@ public class LaunchLug extends Tube implements AnglePositionable, BoxBounded, Li
|
||||
|
||||
@Override
|
||||
public double getComponentVolume() {
|
||||
return length * Math.PI * (MathUtil.pow2(radius) - MathUtil.pow2(radius - thickness));
|
||||
return length * Math.PI * (MathUtil.pow2(radius) - MathUtil.pow2(radius - thickness)) * getInstanceCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -304,7 +304,8 @@ public class RailButton extends ExternalComponent implements AnglePositionable,
|
||||
final double volInner = Math.PI*Math.pow( innerDiameter_m/2, 2)*getInnerHeight();
|
||||
final double volStandoff = Math.PI*Math.pow( outerDiameter_m/2, 2)* baseHeight_m;
|
||||
final double volScrew = 2f/3 * Math.PI * MathUtil.pow2(outerDiameter_m/2) * screwHeight_m;
|
||||
return volOuter + volInner + volStandoff + volScrew;
|
||||
final double volInstance = volOuter + volInner + volStandoff + volScrew;
|
||||
return volInstance * getInstanceCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user