From: Bill Kuker Date: Wed, 22 Apr 2009 20:25:09 +0000 (+0000) Subject: Made shape protected X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=32a580977748d9f5766d1b72a4609f1c61c2f20a;p=sw%2Fmotorsim Made shape protected Fixed bug in extruded --- diff --git a/src/com/billkuker/rocketry/motorsim/grain/ExtrudedShapeGrain.java b/src/com/billkuker/rocketry/motorsim/grain/ExtrudedShapeGrain.java index 36d95ff..e934c1a 100644 --- a/src/com/billkuker/rocketry/motorsim/grain/ExtrudedShapeGrain.java +++ b/src/com/billkuker/rocketry/motorsim/grain/ExtrudedShapeGrain.java @@ -35,7 +35,7 @@ public class ExtrudedShapeGrain extends MotorPart implements Grain { } }; - BurningShape xsection = new BurningShape(); + protected BurningShape xsection = new BurningShape(); Amount length = Amount.valueOf(25, SI.MILLIMETER); @@ -48,7 +48,7 @@ public class ExtrudedShapeGrain extends MotorPart implements Grain { public Amount surfaceArea(Amount regression) { Amount zero = Amount.valueOf(0, Area.UNIT); - if (regression.isGreaterThan(webThickness)) + if (regression.isGreaterThan(webThickness())) return zero; Amount rLen = length; diff --git a/src/com/billkuker/rocketry/motorsim/grain/RotatedShapeGrain.java b/src/com/billkuker/rocketry/motorsim/grain/RotatedShapeGrain.java index b6f8f85..0e45060 100644 --- a/src/com/billkuker/rocketry/motorsim/grain/RotatedShapeGrain.java +++ b/src/com/billkuker/rocketry/motorsim/grain/RotatedShapeGrain.java @@ -30,8 +30,8 @@ public class RotatedShapeGrain implements Grain { Shape outside = new Rectangle2D.Double(0,0,15,70); shape.add( outside ); shape.inhibit( outside ); - shape.subtract( new Rectangle2D.Double(0,50,5,70)); - //shape.subtract(new Rectangle2D.Double(0, -10, 15, 10)); + shape.subtract( new Rectangle2D.Double(0,0,5,70)); + shape.subtract(new Rectangle2D.Double(0, -10, 15, 10)); shape.subtract(new Rectangle2D.Double(0, 70, 15, 10)); } catch ( Exception e ){ throw new Error(e); @@ -39,6 +39,8 @@ public class RotatedShapeGrain implements Grain { } }; + + public enum Quality { High() {{ @@ -62,7 +64,7 @@ public class RotatedShapeGrain implements Grain { Quality quality = Quality.Low; - BurningShape shape = new BurningShape(); + protected BurningShape shape = new BurningShape(); Amount web = null;