667 Commits

Author SHA1 Message Date
Billy Olsen
3b16a68fb3 Use xdg-open on Linux Snaps to open PDFs for printing/previews
The Desktop.open() method does not work within a Snap confined
application because it uses gnome apis which are restricted or
only defined within the snap itself. The confined snaps allow
for xdg-open to open the default application to handle opening
the specified mime-type (application/pdf) for print previews and
printing.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-06-13 14:43:14 -07:00
Billy Olsen
cb11d18aaf Check to see if column index is valid
Check to see if column index returned from the FlightConfigurationTable
model is referencing a valid column before getting the column data.
Additionally, the FlightConfigurationTableModel was not adequately
accounting for the FCID table column when returning the column.

Fixes #677

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-06-09 20:38:24 -07:00
Daniel_M_Williams
31b2f8b8be [fix 524][ui] Recovery Devices update their name in the 'Recovery' tab 2020-05-24 20:04:11 -04:00
Daniel Williams
16300941c7
Merge pull request #665 from wolsen/add-print-progress-dialog
[Fixes 637] Update print dialog to allow simulation control
2020-05-24 13:46:33 -04:00
Billy Olsen
b673a591f2 Update print dialog to allow simulation control
Updates the print dialog to allow for simulations to be re-run
or not. Selecting the "Update simulation data" checkbox will
re-run any out of date simulations prior to generating the
design report.

Fixes #637

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-05-23 15:41:44 -07:00
JoePfeiffer
228df78fd4 If a FlightConfiguration has an existing simulation, use it to update
the data in the RocketPanel
2020-05-20 09:37:48 -06:00
Daniel Williams
a1a777266b
Merge pull request #664 from wolsen/619-fix-graphics-launcher-osx
Use the open -a prefix to commands on OSX
2020-05-12 22:43:12 -04:00
Billy Olsen
e0982935e1 Use the open -a prefix to commands on OSX
On the OSX platform, the command editor needs to open the program
with using the 'open' command.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-05-10 19:23:09 -07:00
Joe Pfeiffer
4eab059b1b
Merge pull request #661 from teyrana/fix-spelling
[fix][i10n] Adjusts Labels for add-component buttons: Stage, Booster, Pods
2020-05-10 19:57:38 -06:00
Daniel_M_Williams
7046d02bae [cleanup] cleans up extra debugging from RocketRenderer, also fixed whitespace 2020-05-10 18:38:41 -07:00
Daniel_M_Williams
dd277b3702 [fix][i10n] Adjusts Labels for multiple add-component-buttons 2020-05-09 18:39:36 -04:00
Daniel Williams
800101e6bb
Merge pull request #659 from teyrana/643-fix-button-formatting
[ui] Moves new assembly buttons to their own row in the New Component panel.
2020-05-09 18:25:56 -04:00
Daniel_M_Williams
bcc5d6bcf8 [fix] Scale Rocket now scales the radial distance of pods & p-stages 2020-05-09 13:33:40 -07:00
Daniel_M_Williams
5c3ce2ec5e [cleanup] removed unnecessary debug lines 2020-05-09 15:20:10 -04:00
Daniel_M_Williams
4ba395ac77 [fix] Rail Buttons now properly display in 2d side views (when the rocket is rotated 2020-05-08 17:35:32 -04:00
Daniel_M_Williams
1c540a8252 [ui] Adjusted spacing of new stage buttons 2020-05-08 13:04:21 -04:00
Daniel Williams
deed818fd3
Merge pull request #655 from teyrana/show-cp-y
[fix] 2D Rocket Figure will now display off-axis CoM and CoP
2020-05-08 11:02:59 -04:00
Daniel Williams
83ce19cac4
Merge pull request #647 from teyrana/645-fix-auto-radius
[Fixes #645] fix auto radius calculation on Symmetric Components
2020-05-07 18:31:48 -04:00
Daniel_M_Williams
ac6ae0b440 [fix] 2D display of Cg and Cp values now respects the rotation slider 2020-05-07 17:47:56 -04:00
Daniel_M_Williams
2a524c2855 [fix] 2D Rocket Figure will now display off-axis CoM and CoP values 2020-05-06 15:26:06 -04:00
JoePfeiffer
51b2f7a03f cp.weight doesn't have any obvious relationahip to mass. We may want to revisit the idea of having a separate minimum cp.weight, but for the moment just making it be MathUtil.EPSILON removes the confusion and doesn't change behavior (MassCalculator.MIN_MASS is set to MathUtil.EPSILON in that class) 2020-05-05 10:37:22 -06:00
Daniel_M_Williams
7b9deff180 [refactor] ComponentPresetChooserDialog now calls SymmetricComponent.get{Next|Prev}SymmetricComponent(...) 2020-05-03 15:30:43 -04:00
Daniel_M_Williams
d038b1b190 [fixes #640] Dialogs should now closing with the [x] button in the corner. (and 'close' button. And ESC) 2020-05-02 11:15:46 -04:00
Daniel_M_Williams
bbe2598454 [ui] removed 'add stage' text button; reordered remaining buttons 2020-04-25 13:15:27 -04:00
JoePfeiffer
b9a881c5c9 The deleted methods (setTotalThrustEstimate(), setBurnTimeEstimate(), setAverageThrustEstimate(), and setMaxThrustEstimate()) were never called. The member variables maxThrust, burnTimeEstimate, averageThrust, totalImpulse are all calculated by computeStatistics() and the values (if any) from the thrustcurve file are ignored. 2020-04-22 09:29:57 -06:00
Daniel Williams
37e1180963
Merge pull request #628 from wolsen/move-unit-test
Move MotorRowFilterTest into correct package
2020-04-19 23:28:11 -04:00
Billy Olsen
bbf60e0bba Move MotorRowFilterTest into correct package
MotorRowFilterTest lives in the wrong package and causes Eclipse
to fail building. Oddly, it still builds using the ant commandline,
but since it declares it should be in the package
net.sf.openrocket.gui.dialogs.motor.thrustcurve this change moves
it to the location it declares.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-04-19 19:58:51 -07:00
Daniel Williams
bd8bef2c85
Merge pull request #602 from wolsen/fix-stage-length
[Fixes 452] Reflect length of selected stages
2020-04-19 22:34:09 -04:00
Billy Olsen
b7345f5c3c Correctly calculate the maximum height for side view.
When calculating the subject dimensions, use the height as the
radius of the circle which intersects all four corners of the
BoundingBox in the Y, Z plane for both the rear view and the
side view. The rear view was already doing this, but it was
non-obvious that the side view should also be using this to
calculate the height.

It becomes obvious if we think about a winged rocket, i.e. a
rocket who's fins in the Z direction are larger than those in
the Y direction. In this configuration, a height based off of
the fins in along the Y-axis alone will result in a "Fit" scaling
which encapuslates the Y-axis fins. However, rotating that
rocket will move the larger wings (the Z-axis fins) into the
view, but the height will not allow for the wings to draw properly
on the screen.

Thusly, using the radius from the circle intersecting the bounding
box along the Y, Z plane will ensure that the widest point from the
body will be able to fit within the side view, regardless of the
rotation around the X axis.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-04-19 19:15:54 -07:00
JoePfeiffer
6dc1f6c194 unit test for MotorRowFilter 2020-04-17 08:44:12 -06:00
JoePfeiffer
839f555d55 Fixed spelling error getTotalImpuse() => getTotalImpulse() 2020-04-16 13:47:45 -06:00
JoePfeiffer
ede47666f9 Modified ThrustCurveMotor to ensure all fields have sane default values
Created MotorRowFilterTest unit test
2020-04-16 11:36:47 -06:00
Daniel Williams
7745563c0d
Merge pull request #614 from itshanney/bugfix/remove-guice-warnings
Update guice library to remove AOP; Fixes issue #609
2020-04-06 21:45:55 -04:00
Daniel_M_Williams
336b899a06 [fix] reworks / fixes the way ComponentConfigDialogs are closed
- Close hooks are now called for all methods of closing a dialog ('close', 'X', and escape)
- Adds a rocket.removeComponentChangeListener to close hook
- removes redundant / buggy methods
2020-04-06 21:25:55 -04:00
Daniel_M_Williams
24ae797959 [fix] Merged duplicate class-instance 'finset' property with parent's 'component' property. 2020-04-06 21:25:55 -04:00
Daniel_M_Williams
644404b070 [fix] Adds duplicate guard when add a 'ComponentChangeListener' to the rocket 2020-04-06 21:25:54 -04:00
Justin Hanney
82a3506157 Adjust .iml files for IntelliJ 2020-04-05 12:36:07 -07:00
Billy Olsen
adf3101315 Don't revalidate/repaint component in Ruler.updateSize()
Analysis from Justin Hanney indicates that the CPU is constantly
processing paint events in the ScaleScrollPane.Ruler. Change the
updateSize method to not revalidate and repaint since the
paintComponent method also invokes the updateSize to ensure it is
drawing components of the right size.

This change also refactors the ChangeListener implementation to
have the RulerClass implement the method instead of using an
anonymous class for event handling when ruler units change.

Additionally, this change adds a revalidate call to the scrollPane
to fix an issue where the ruler is not repainted when switching views
from 3D to 2D.

Fixes #615

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-04-04 14:18:57 -07:00
Billy Olsen
33e912833f Fix stage selection toggle display
Fixes the stage selection buttons to only be active when the stage
is active and properly reflect the displayed stage state.

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-04-03 21:11:19 -07:00
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
Justin Hanney
8302de21b1 Adjust IntelliJ and Eclipse classpaths to new guice 2020-04-02 19:22:42 -07:00
Justin Hanney
0fff7e2d50 Update guice library to remove AOP; Fixes issue #609 2020-04-02 15:56:55 -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