476 Commits

Author SHA1 Message Date
Billy Olsen
3f17363807 Use FlightConfiguration.getLength() in RocketPanel
Use the curConfig.getLength() for the length displayed in the
RocketPanel rather than calculating it based off the bounds.
The length method provided by the FlightConfiguration takes
everything into account that is needed (active stages, etc)
to calculate the length.

Closes #452

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-04-03 21:11:19 -07:00
Daniel_M_Williams
4ede3a8c60 [fix][example] Fixes 'High Power Airstart' -- with new motor: I211 2020-03-30 20:21:15 -04:00
Billy Olsen
4e167a5599 Upgrade jogl libraries to 2.4.0-rc-20200306
Update the jogl libraries.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-28 18:59:46 -07:00
Billy Olsen
d98e2cb6f8 Remove unnecessary override of updateFigure in RocketFigure
Previously, updateFigure was overridden in RocketFigure in order to
ensure that all component shapes were added to the rocket prior to
calling the paintComponent method. This is superfluous as the
paintComponent method already adds the shapes prior to rendering.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-28 16:49:36 -07:00
Billy Olsen
5977bfa95a Add scaleFactor back into some shapes
NoseCones aren't rendered correctly when printing/exporting as PDF
due to the scaleFactor not being honored correctly in TransitionShapes.
There was a good refactor to move some of the scaling pieces out,
however the PrintableNoseCone didn't benefit from these changes.

This restores part of the scaleFactor bits to the TransitionShapes
in order to get the printing to correctly work again. This code should
be transitioned to the new method for scaling.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-28 16:49:36 -07:00
Billy Olsen
5bf8a7af15 Update stage logic for DesignReport
Stages need to be activated correctly in order to properly
calculate the mass for all components that contribute to
the current launch scenario.

This change ensures that all of the stages from the top-most
stage to the currently active stage are set as activated when
stage mass is being calculated.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-28 16:49:36 -07:00
Billy Olsen
94534ee8f8 Fix number of motors and stageMass for DesignReport
Fix the number of motors that are reported. A previous change made
the MotorMount.getMotorCount() return the number of motors which
have been configured. However, according to the javadocs of the
MotorMount interface, the getMotorCount() method is supposed to
return the number of motors that a MotorMount can take for
configuring it. This restores the InnerTube and BodyTube getMotorCount
behavior and adds a new getMotorConfigurationCount() method to
provide the new behavior.

Additionally, the stageMass calculations in the DesignReport were
using a deprecated method which does not return proper component
weights. Change this to use the MassCalculator.calculateLaunch(...)
method, which is consistent with the RocketPanel behavior.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-28 16:49:36 -07:00
Billy Olsen
d5598d7380 Clean up some code in DesignReport
Clean up some of the code in DesignReport, including some
refactoring TODOs in the addMotorData method.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-28 16:49:36 -07:00
Billy Olsen
ca64e9e82a Fix issues with drawing rocket diagram in print/pdf
Some refactoring of the code for the RocketFigure class caused
changes which prevent the rocket from being rendered correctly
when printing a report or exporting as PDF. The issue was due
to shapes not being added to the rocket and pixel dimensions
being incorrect for the logic in the DesignReport.

This change ensures that rocket shapes are added when the
RocketFigure's updateFigure method is called. It also modifies
the PrintFigure to expose some of the underlying geometries of
the subject_bounds, which are necessary for the pixel and drawing
calculations used in the DesignReport.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-28 16:49:36 -07:00
Billy Olsen
6dae530acc Fix IllegalStateException when export/print
Correct the logic for detecting if a motor has an invalid
FlightConfigurationId and throw an IllegalStateException only in the
case that it has an error.

Additionally, fix the lookup for the stageMass. The wrong value was
passed to the MassCalculator.getCGAnalysis(..) which resulted in
a NullPointerException.

Fixes #531

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-28 16:49:36 -07:00
Daniel_M_Williams
465989f837 [fixes #565] Fixes display of canted fins 2020-03-22 11:07:55 -04:00
Daniel_M_Williams
d23d25ed15 [fix] Fixes error when loading FinSet angles 2020-03-22 11:07:55 -04:00
Daniel_M_Williams
af3d226b2b [fix #592] Fixes the 'Apocalypse with decals' example rocket 2020-03-21 20:53:40 -04:00
Billy Olsen
c789da0389 Remove OrangeExtensions-1.2.jar from eclipse classpath
Commit a7c0cb2 removed the OrangeExtensions-1.2.jar file from the
swing project, but failed to remove it from the eclipse classpath.
This fixes that.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-21 09:15:15 -07:00
Daniel_M_Williams
cc1e39900a [fix] updates the Boosters example rocket 2020-03-19 18:20:15 -04:00
Daniel_M_Williams
154df7bb34 [fix] updates the Pods example rocket 2020-03-19 18:20:15 -04:00
Daniel_M_Williams
65a4698d37 [fix][Intellij] Intellij now correctly builds jars and tests with all the new libraries 2020-03-19 18:19:07 -04:00
Justin Hanney
b78b07e76e Merge branch 'unstable' into feature/fix-macos-after-java11-upgrade 2020-03-14 12:34:45 -04:00
Daniel Williams
cc8f0caaab
Merge pull request #575 from wolsen/issue-553
Notify all event listeners when DoubleModel.setValue called
2020-03-14 00:21:45 -04:00
Daniel_M_Williams
630b5eca58 [upgrade][jar] upgrades slf4j logging libraries from 1.7.5 => 1.7.30
- updates ant build
- updates Intellij build
- updates Eclipse build
2020-03-13 23:27:34 -04:00
Billy Olsen
a2168ed84f Notify all event listeners when DoubleModel.setValue called
Previous refactoring of the event listeners lost notifications
to classes which care about changes to the DoubleModel. One
such example is the UnitSelector. Ensure that all the
ChangeEventListeners and StateChangeEventListeners are called
when the setValue method is invoked.

Closes #553

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-12 19:48:35 -07:00
Justin Hanney
3d3d9cca90 Revert build.xml source/target back to 1.8 2020-03-11 20:22:10 -04:00
Justin Hanney
a7c0cb2b8a Fix OSXSetup after migration to Java9+ 2020-03-11 20:16:46 -04:00
Daniel Williams
d9a3cbb39c
Merge pull request #574 from wolsen/issue-573
Use AWTTextureIO for creating textures from jpegs
2020-03-11 08:30:32 -04:00
Daniel Williams
7251a63086
Merge pull request #583 from wolsen/fix-eclipse-classpaths
Update eclipse .classpath files
2020-03-11 08:12:33 -04:00
Billy Olsen
51fd9d47dc Update eclipse .classpath files
Update the eclipse .classpath files to point to the new and updated
jar files that were merged as part of the recent upgrade to Java 11/
Java 13 commits.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-10 19:25:44 -07:00
Daniel_M_Williams
92308c7665 [fix][build][ant] Fixes ant builds 2020-03-07 20:27:37 -05:00
Daniel Williams
84203b014b
Travis CI now builds for Java 13 -- and fixed some issues for Java 13 (#572)
* [jar][Upgrade] Upgrade lib-tests libraries

* [fix][jar/upgrade] Upgraded jars in core/lib.  -- fixed Junit Failures due to missing jaxb bindings.

* [fix] Added openjdk 13 to travis auto-builds

* [fix][unittest][java8] fixes automated java8 unittests

* [fix][build][jar] Upgraded logback libraries; moved to core/lib

* [fix][build][jar] removes unused jars: jaxb-jxc.*.jar

* [upgrade][build][jar] Upgrade the guice .jar libraries
2020-03-06 08:52:20 -05:00
Billy Olsen
57b928575f Use AWTTextureIO for creating textures from jpegs
The switch to using JOGL uses the current JPEGs, but these textures
cannot be read using the GL.GL_RGBA format which is eventually
propigated to the user by an error dialog showing a NullPointerException
for the texture which failed to load. Using GL.GL_RGB as the format when
loading the textures will resolve the texture loading issue, but the
images are inverted due to differences between AWT and JOGL
interpretation of where the image starts (top left vs bottom left).

Change instead to use the AWTTextureIO class to create the textures
which solves both problems - the loading of the texture as well as
presenting the image in the appropriate orientation.

Closes #573

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-04 19:35:46 -07:00
Daniel Williams
3aaf8c6802
Merge pull request #556 from neilbalch/java11-upgrade
Upgrade to Java 11/Java 13 and retire Android app
2020-03-03 21:36:44 -05:00
Billy Olsen
e0983c05cc Add back instance panel dropped in previous commit
Adds back the instance options in the previous commit for specifying
instance details about rail buttons. This change adds it back but
slightly tweaks the layout and location in order to keep the config
panel in a 2 column arrangement.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-03 09:37:56 -07:00
Billy Olsen
3995a330da Add new material types for rail buttons
Add two new material types for rail buttons, delrin and nylon.
The material densities are pulled from wikipedia and cross-referenced
with Dupont's material database.

Additionally, set Delrin as the default material for RailButtons.

Closes #554

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-02 20:33:56 -07:00
Billy Olsen
f8993e89db Add rail button presets options
Allow rail buttons to define presets. This change doesn't actually add
any default presets to the library, but enables the ability to add some
preset options for rail buttons.

Partially Closes #554

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-01 18:32:32 -07:00
Billy Olsen
232b363712 Fix large rail button default size.
The default values assigned to RailButton sizes were configured with
a 1.0 meter outer diameter and 0.8 meter internal diameter (for 1010
rail buttons) which resulted in overly large rail buttons when added
using the default values.

Presuming that 1010 rail buttons are the common and an acceptable
default, change the default button sizes to align with the 1010 size.

Additionally, this change fixes some of the layout issues present in
add railbutton dialog.

Closes #554

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-03-01 18:26:30 -07:00
Daniel_M_Williams
5e3dbb6575 [fix] Restores 3d Views to PR #556 -- Java 11 upgrade 2020-02-29 20:44:42 -05:00
Daniel_M_Williams
aeab0c3d81 [fix] added example rockets to jarfile 2020-02-19 22:30:32 -05:00
Daniel Williams
95d497827d
Revert "Fix 525" 2020-02-15 09:23:01 -05:00
JoePfeiffer
85c21e5812 This is a much bigger commit than I like to make, and will result in a much bigger
PR than I like as well.  All I can do is apologize...

Fixes length calculation in RocketPanel.

(1) Finished switching over from deprecated getBounds() function to getBoundingBox().
getBounds() function is removed.

(2) 3D rendering code had its own getBounds().  Switched this over to
RocketComponent:getBoundingBox() as well

(3) Made getBoundingBox() consistently get the bounding box relative to the component.
Implementations for some components were calculating box relative to start of rocket

(4) Used InstanceMap to iterate through all instances of components in creating bounding box.
2019-06-17 15:25:27 -06:00
JoePfeiffer
719576cc62 bunch of changes along the way to fixing length calculation 2019-06-10 17:04:08 -06:00
Wes Cravens
02634fef6f
Merge pull request #533 from teyrana/fix_525_zero_diameter
Fixes #525; Main Figure display rocket diameter again.
2019-04-10 10:47:46 -05:00
Daniel_M_Williams
93a60c94f7 [fixes #525] main window (again) displays max diameter of centerline components
-- added FlightConfiguration::getCoreComponents() method
2019-03-31 09:34:08 -04:00
Daniel_M_Williams
e45e116b97 [graphics] adjusts line color and width in FinPointFigure 2019-02-17 11:33:56 -05:00
Wes Cravens
1abf0d3834
Merge pull request #513 from teyrana/refactor_instance_map
Refactor instance map
2019-01-26 07:14:39 -06:00
Wes Cravens
143afb0fde
Merge pull request #508 from teyrana/fix_482_fin_grid
Fixes #482 // Tweak // Adjusts FinPointFigure background grid to be more useful
2019-01-26 07:14:01 -06:00
Daniel_M_Williams
577b09c4e9 [refactor] switched 2D figure rendering over to new, simpler system 2019-01-25 22:27:23 -05:00
Daniel_M_Williams
0711cb785b [fix] re-implements RocketRenderer-tree-code 2019-01-25 22:27:23 -05:00
Daniel M Williams
3b342391b1 [fix] may now always edit a FreeformFinSet's p[0]. Again. 2019-01-02 19:23:13 -05:00
Daniel M Williams
01fd20ebcc [refactor] added code to tests for negative inertia / intersection case 2019-01-02 19:23:11 -05:00
Daniel_M_Williams
52d1a26cd8 [tweak] Adjusts the spacing between minor gridlines in FinPointFigure 2019-01-02 18:40:09 -05:00
Daniel_M_Williams
9ebf681ee1 [tweak] adds different colors for major and minor grid-lines 2019-01-02 18:40:09 -05:00