653 Commits

Author SHA1 Message Date
Billy Olsen
7015d8617b Fix scaling on high dpi monitors
GLJPanel handles display scaling better than the GLCanvas does natively.
Change to use the GLJPanel always when rendering in 3D mode. FBO
(offscreen rendering) will be set on the GLJPanel via the
GLCapabilities.

Also, ensure when creating a Graphics2D object from a GLOverlay to set
the current transform to the default transform for the component. The
default transform of the swing components will take into account the
scaling of the screen that it is rendered on. By setting the transform
of the overlay, we can be sure that it gets the scaling information as
well.

Fixes #854

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2021-06-04 16:54:45 -07:00
Joe Pfeiffer
8519e831cf
Merge pull request #893 from wolsen/fix-bug-reporter
Update Bug report dialog
2021-05-20 19:49:48 -06:00
JoePfeiffer
df38b95ea7 fix typo that called generateSeries() with thrust curve index instead of plot index.
Also added comment explaining necessity of really awkward coding
2021-03-10 09:28:22 -07:00
JoePfeiffer
3e3b854ce9 Invalidate MotorInformationPanel when updating (fixes #885)
Calls invalidate() as the last action inside MotorInformationPanel.updateData(), forcing a redraw of the panel.  This makes sure the panel is large enough to display all of its contents

Also, clean up display of the compatible cases a little bit by adding a space between cases, and wrapping in <html></html> tags to allow line breaks.
2021-03-09 19:37:56 -07:00
Billy Olsen
f71ae2bb40 Resize space.jpg for display
Resize space.jpg to be 1024x1024 to resolve rendering issues on MacOS.

Fixes #861

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2021-02-23 13:19:35 -07:00
Billy Olsen
741db61320 Update Bug report dialog
Updates the Bug report dialog to send users to either raise issues
via the github issues URL for OpenRocket or to send an email to the
forum.

This removes code to auto-submit bugs from the bug report dialog. The
service does not appear to be working and github issues cannot be
anonymous which complicates auto-submission. Instead, just direct users
to the right place.

Fix #860

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2021-02-20 12:09:17 -07:00
Billy Olsen
cde986136e Add extra spacing for stability information text
The GlyphVector.getVisualBounds() does not include leading or trailing
spaces. Account for this when drawing stability information by
increasing the unitwidth by the length of one space.

Additionally, the code is inefficient in that it creates a new Font
object each and every time a new text string is created for graphical
display. This is unnecessary and adds overhead to the VM memory
requirements.

Fixes #880

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2021-02-01 20:27:43 -07:00
Billy Olsen
f2c0e6bbd1 Force a .rkt extension rather than .ork on export
Exporting the rocket to a rocksim format should use the extension .rkt
rather than .ork. However, refactoring the code between save as and
export in commit 4924773 in correctly used the .ork extension in the
exportAsAction.

Fixes #872

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2021-01-03 19:40:55 -07:00
Billy Olsen
3499146a81 Set the glViewport size on reshape
Explicitly set the glViewport size on reshape in order to ensure it is
rendered at the full scale of the viewport. Not doing so causes the
display to render very small.

Fixes #790

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-12-21 20:32:45 -07:00
Billy Olsen
d8e809c579 Make points on fin red for usability
Make the points in the fin point scale figure red (once again) to better
show the location of the points.

Fixes #856

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-12-21 20:32:27 -07:00
Billy Olsen
347ec93c0c Fix rocket scaling in 3D views
When setting up the view for 3D figures, the Y span is doubled
incorrectly. This appears to be legacy behavior and the BoundingBox
itself accounts for the full span. Removing the 2x scaling resolves the
rocket scaling appropriately.

Fixes #788

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-12-19 13:12:34 -07:00
Billy Olsen
f23ec0bdec Adjust grid in freeform fin editor
Adjust the colors in the freeform fin editor to use a blue hue as
was used in previous releases. Major grid lines are slightly darker
than minor grid lines. Also Adjust selected point color to be red.

Additionally, adjust the minor and major tick size to scale with the
current selection.

Fixes #836
Fixes #837

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-12-19 13:11:46 -07:00
JoePfeiffer
f8430c6504 Calculate fintab height from body radii at for and aft fintab extents, instead
of assuming constant radius body tube
2020-12-12 19:13:08 -07:00
JoePfeiffer
0dd878d1f4 Calculate fintab height after calculating length and position. 2020-12-12 19:13:08 -07:00
Joe Pfeiffer
bd251831f7
Merge pull request #832 from wolsen/bug/785
Fix offset locations of mass components
2020-12-03 11:28:53 -07:00
Joe Pfeiffer
a6d4425c28
Merge pull request #820 from wolsen/bug/776
Only draw carets in 3d when length > 0
2020-12-03 11:25:03 -07:00
Billy Olsen
628a593550 Fix offset locations of mass components
2D side view renderings of mass components within body tubes
were adjusted forward based off the radius of the object. This
change corrects the X position adjustement and makes it consistent
with 15.03 and 3D renderings.

Closes #785
Closes #828

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-12-02 19:38:44 -07:00
Billy Olsen
e4bbd09889 Only draw carets in 3d when length > 0
Only set the CG and CP for the 3D renderings when the length
is greater than 0. This makes the 3D rendering behavior consistent
with the 2D side view

Fixes #776

Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2020-11-11 15:37:47 -07:00
Daniel_M_Williams
eceaff6408 [fixes #810] Selecting 'Save As...' > 'All Files' no longer throws an unneccessary exception 2020-11-07 10:19:01 -05:00
Daniel_M_Williams
565bd6ac6a [fixes #808] Fixes rotation slider in RailButtonConfig 2020-11-07 09:51:04 -05:00
Daniel_M_Williams
c54059a54e [fixes #752] Fixes rotation slider in LaunchLugConfig 2020-11-01 19:56:27 -05:00
Daniel_M_Williams
cf8b40229b [fixes #751] Unifies angle-offset labels to 'Rotation' for component config dialogs 2020-11-01 19:51:13 -05:00
Daniel_M_Williams
c9d408a8ee [fix #801] eliminate redundant angle-offset property in LaunchLug component 2020-11-01 19:38:16 -05:00
Daniel Williams
67fed96137
Merge pull request #672 from JoePfeiffer/use-simulation-options
Use simulation options (addresses
2020-11-01 18:54:10 -05:00
Daniel_M_Williams
5b0cd95cba [fixes# 786] Updates config when drawing extras on 2D RocketFigure 2020-10-18 12:20:37 -04:00
Daniel_M_Williams
92cd7cc9e7 [fix #777] Railbuttons now correctly render in rear-view, when rotated 2020-09-26 10:45:20 -04:00
JoePfeiffer
b64a3b3fa8 The simulation now uses mass data from the entire motor as a unit,
rather than separating out the propellant data.  This commit clarifies
the code by replacing instances of "propellant" with "motor" in
variable names and messages where appropriate.

It does not update the translations into other languages.
2020-09-09 17:10:29 -06:00
Daniel_M_Williams
2150223cb1 [fix][ui][graphics] Mass components now display their Radial / Angle position in Back Views 2020-09-02 21:36:58 -04:00
Daniel_M_Williams
01562d6ae1 [fix][ui][graphics] Mass components now display their Radial / Angle position in Side Views 2020-09-02 21:36:58 -04:00
Daniel_M_Williams
58712cb69f [fix] RocketFigure now zooms to whole rocket extents even iff stages are deactivated 2020-09-01 19:14:19 -04:00
Daniel_M_Williams
a00636a1ed [fix] migrates calls from 'simulation.rocket.selected' -> 'simulation.activeconfig' 2020-08-23 22:00:53 -04:00
Daniel_M_Williams
d3a66294d1 [rm][refactor] Optimization Dialog now allows optimizing only on existing, defined simulations 2020-08-23 22:00:53 -04:00
Daniel_M_Williams
73e8caa0e5 [tweak] adjusted default size for the optimization dialog 2020-08-23 22:00:52 -04:00
Daniel_M_Williams
1d552f99f9 [fix] 'Edit Simulation' Dialog now correctly displays the associated flight configuration 2020-08-23 22:00:51 -04:00
Daniel_M_Williams
70cbc54daf [cleanup] Applies a bunch of changes suggested by the linter in the Optimization Code 2020-08-22 11:18:03 -04:00
Daniel_M_Williams
9f8ed13713 [fix][optimizer] update the in-dialog figure when the user clicks 'apply optimization' 2020-08-22 09:47:22 -04:00
Daniel_M_Williams
d7c0e9d8ac [fix] prevented exception when you remove a optimization row while editing it. 2020-08-22 09:47:22 -04:00
Daniel_M_Williams
28ba049975 [fix] Fixed compile issues; Dialog now opens cleanly 2020-08-22 09:47:22 -04:00
Daniel_M_Williams
748a871e57 [fix] limits a FreeformFinSet maximum size to 2.5m x 2.5m. This prevents a stack-overflow while editing 2020-08-14 16:38:39 -04:00
Daniel_M_Williams
b960d37a4a [fix] dragging fin points will now drag the view pane (preventing a user from dragging a point out of view) 2020-08-14 16:37:45 -04:00
Daniel_M_Williams
08c5ecafdf [fix] zooming in and out now zooms center-to-center 2020-08-09 15:18:54 -04:00
Daniel_M_Williams
ae83846e4e [fix] restored autozoom behavior on figures -- particularly FinPointFigure 2020-08-09 11:07:35 -04:00
Daniel_M_Williams
a1f17b8f7f [fix] resolves issue #699, fixes PR #738, which only partially selected the first stage 2020-08-09 11:06:11 -04:00
Daniel_M_Williams
4cd56c1616 [fixes #699] preselect first AxialStage on Rocket-Open 2020-08-08 18:26:12 -04:00
Daniel Williams
b17d03138a
Merge pull request #731 from teyrana/fix/726-positioning
[Fixes #726] Fixes multiple issues when changing Fin-Offset-Methods
2020-08-08 11:25:26 -04:00
Daniel_M_Williams
0a0fcc96a9 [fixes #724] Fixes unit-updating in rocket-motor-selection 2020-08-03 23:23:40 -04:00
Daniel_M_Williams
1a261a7c75 [fixes #733] fixes rare bug -- rocket sometimes sends events to deleted ComponentConfigDialog instances 2020-08-02 17:40:09 -04:00
Daniel_M_Williams
aeae4b1e03 [refactor] ported reduce360 -> reduce2Pi. Because the units are in radians 2020-08-02 16:49:32 -04:00
Daniel_M_Williams
6931f7f13f [fix] Fixes multiple updating issues when changing Fin-Offset-Methods 2020-08-02 16:25:00 -04:00
Daniel Williams
908cd3e619
Merge pull request #728 from teyrana/fix/723-scaling
[Fixes #723] Fix scaling crashes in some circumstances
2020-08-02 16:12:25 -04:00