diff --git a/.github/OpenRocket_home.png b/.github/OpenRocket_home.png deleted file mode 100644 index 613f283a2..000000000 Binary files a/.github/OpenRocket_home.png and /dev/null differ diff --git a/.github/OpenRocket_home_2D.png b/.github/OpenRocket_home_2D.png new file mode 100644 index 000000000..57e1297eb Binary files /dev/null and b/.github/OpenRocket_home_2D.png differ diff --git a/.github/OpenRocket_home_3D.png b/.github/OpenRocket_home_3D.png new file mode 100644 index 000000000..c971f1cbe Binary files /dev/null and b/.github/OpenRocket_home_3D.png differ diff --git a/.github/OpenRocket_sim.png b/.github/OpenRocket_sim.png new file mode 100644 index 000000000..0088dbe88 Binary files /dev/null and b/.github/OpenRocket_sim.png differ diff --git a/README.md b/README.md index f5216d7f0..e39097ea7 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,9 @@ Overview OpenRocket is a free, fully featured model rocket simulator that allows you to design and simulate your rockets before actually building and flying them. -![Home page OpenRocket](.github/OpenRocket_home.png) +![Three-stage rocket - 2D](.github/OpenRocket_home_2D.png) +![Three-stage rocket - 3D](.github/OpenRocket_home_3D.png) +![Three-stage rocket - Simulation plot](.github/OpenRocket_sim.png) The main features include: diff --git a/ReleaseNotes.md b/ReleaseNotes.md index d62abfbd9..f3a06a816 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,6 +1,71 @@ Release Notes ============= +OpenRocket 22.02.beta.05 (2022-09-28) +------------------------ +(through PR1688) + +## New Features +* **C_D Override for subassemblies now implemented. Please test!** [See this wiki help page](http://wiki.openrocket.info/Overrides_and_Surface_Finish#How_and_Why_to_Use_Surface_Finish_Settings_and_Coefficient_of_Drag_.28CD.29_Overrides) for important instructions (fixes #1171) +* Simulations now properly account for disabled stages (fixes #1477 and #1460) +* Rail Button improvements: + * Additional parameters for rail buttons (fixes #1537) + * Added rail buttons to preset parts database + * Scaling now supported for rail buttons (fixes #1661) +* Don't include inactive stages in calculations. Disabling stages using the stage selector buttons now also affects the simulation results. (fixes #1477 and #1460) +* Mass objects maintain fixed volume when container diameter changes in auto mode (fixes #1315) +* Inner tubes can have custom inner/outer appearance (fixes #1509) + +## UI Improvements +* Visually select child components of assembly components when selecting the parent (fixes #1489). Try selecting a pod, stage, or booster and see. +* Significant improvements to preset selection window (fixes #1481) +* Added sliders to Photo Studio settings (fixes #1524) +* Show markers for pods and boosters in rocket side view (fixes #1146) +* Major improvements to focus behavior. Keyboard navigation in the Component Config dialog is now _much_ more convenient. + * When setting focus to a spinner field, select the entire field by default (fixes #1506) + * After selecting a preset, automatically highlight most commonly edited parameter (fixes #1488). So, for example, after selecting a body tube preset the Length parameter will be selected by default. + * Restore focus to motors, recovery, stage and simulation tables after table action and others (fixes #1558). Simply put, you shouldn't need to click in the table areas just to enable keyboard shortcuts to work. + * Use tab and arrow keys to traverse sim table (fixes #1552) +* Added and/or improved hover texts on a bunch of different buttons and controls +* Apply preset after double-clicking (fixes #1539) +* Pre-check diameter filters in preset chooser (fixes #1480) +* Preset selection window opens larger, and remembers column widths (fixes #1305). Separate column widths are remembered for each component type. +* Ctrl/Cmd+A (select all) keyboard shortcut in component tree, simulation and motor configuration tables (fixes #1549) + +## Notable Bug Fixes +* **Scripting now works again. Please test!** (fixes #308, #826, #1108, and #1270) +* Don't re-run simulations when new sim is created with same motor (fixes #1510) +* Ensure simulations finish when running from scripts (fixes #1575) +* Fixed Cd reporting for fin sets (fixes #1440) +* Move component config window back to same monitor as main app window first time it is opened. No more lost config windows! (fixes #1470) +* Rocket side view updates + * Don't recenter rocket when zooming (fixes #1464) + * Ensure full rocket is always visible and positioned correctly in rocket side view (fixes #1465) +* Fixed root edge display in 3D view and fin templates (fixes #1227). This matters when you are attaching fins to a nose cone or transition. +* Numerous bug fixes in component scaling (fixes #1649, #1651, #1653, #1661, #1662, and #1663) +* Better register of double-clicks in 3D view (fixes #1054) +* Increased component analysis drag precision to three decimal digits (fixes #1476) +* Select recovery device/stage after config panel select (fixes #1490) +* Fixed an exception when scaling freeform fins (fixes #1520) +* Improved performance of freeform fin shape editor (fixes #1533) +* Better automatic calculation of fin tab sizes (fixes #1600) +* Fixed simulation errors when there were empty stages in the design (fixes #1617) +* Fixed stage activeness not updating when moving, deleting, or copying stages (fixes #1680) +* Fixed exception for zero-length transitions and nose cones (fixes #1677) + +## Other +* Don't open motor selection dialog when duplicating motor configurations (fixes #1555) +* A bunch of updated component icons +* Added icons to most buttons +* Improvements to Undo behavior when adding new components (fixes #1513) +* Improvements to scale dialog (fixes #411) +* Component tree now set to reasonable minimum width (fixes #1648) +* Removed "show all compatible" option in preset chooser (fixes #1405) +* Cleaned up several of the example rockets +* Added warning to launch preferences that changes only affect new sims (fixes #1497) +* Fixed overlapping labels in motor selection diameter filter slider (fixes #1643) +* More Russian translation updates + OpenRocket 22.02.beta.04 (2022-06-17) ------------------------ (through PR1456) diff --git a/core/resources-src/pix/splashscreen-2.png b/core/resources-src/pix/splashscreen-2.png new file mode 100644 index 000000000..d6b4793e3 Binary files /dev/null and b/core/resources-src/pix/splashscreen-2.png differ diff --git a/core/resources-src/pix/splashscreen-2.xcf b/core/resources-src/pix/splashscreen-2.xcf new file mode 100644 index 000000000..49cbb7338 Binary files /dev/null and b/core/resources-src/pix/splashscreen-2.xcf differ diff --git a/core/resources/build.properties b/core/resources/build.properties index d4ba26e90..7a49d2a88 100644 --- a/core/resources/build.properties +++ b/core/resources/build.properties @@ -1,6 +1,6 @@ # The OpenRocket build version -build.version=22.02.beta.04 +build.version=22.02.beta.05 # The copyright year for the build. Displayed in the about dialog. # Will show as Copyright 2013-${build.copyright} diff --git a/core/resources/datafiles/thrustcurves/thrustcurves.ser b/core/resources/datafiles/thrustcurves/thrustcurves.ser index 47d789a83..e102dc03e 100644 Binary files a/core/resources/datafiles/thrustcurves/thrustcurves.ser and b/core/resources/datafiles/thrustcurves/thrustcurves.ser differ diff --git a/core/resources/l10n/messages.properties b/core/resources/l10n/messages.properties index b1719fd2f..4b1c2b4b8 100644 --- a/core/resources/l10n/messages.properties +++ b/core/resources/l10n/messages.properties @@ -64,6 +64,8 @@ RocketPanel.lbl.Stability = Stability: RocketPanel.checkbox.ShowCGCP = Show CG/CP RocketPanel.checkbox.ShowCGCP.ttip = Disabling this checkbox hides the CG and CP markings in the rocket view. RocketPanel.lbl.Stages = Stages: +RocketPanel.btn.Stages.Toggle.ttip = Toggle this button to activate or deactivate the corresponding stage in your design. +RocketPanel.btn.Stages.NoChildren.ttip = This stages does not have any child components and is therefore marked as inactive.
Add components to the stage to activate it. RocketPanel.ttip.Rotation = Change the rocket's roll rotation (only affects the rocket view) ! BasicFrame diff --git a/core/resources/pix/splashscreen.png b/core/resources/pix/splashscreen.png index 32b5c97c5..d6b4793e3 100644 Binary files a/core/resources/pix/splashscreen.png and b/core/resources/pix/splashscreen.png differ diff --git a/core/src/net/sf/openrocket/rocketcomponent/AxialStage.java b/core/src/net/sf/openrocket/rocketcomponent/AxialStage.java index 8e0f533c5..df2285c37 100644 --- a/core/src/net/sf/openrocket/rocketcomponent/AxialStage.java +++ b/core/src/net/sf/openrocket/rocketcomponent/AxialStage.java @@ -1,8 +1,5 @@ package net.sf.openrocket.rocketcomponent; -import java.util.ArrayList; -import java.util.Collection; - import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.rocketcomponent.position.AxialMethod; import net.sf.openrocket.startup.Application; @@ -11,8 +8,7 @@ import net.sf.openrocket.util.Coordinate; public class AxialStage extends ComponentAssembly implements FlightConfigurableComponent { private static final Translator trans = Application.getTranslator(); - //private static final Logger log = LoggerFactory.getLogger(AxialStage.class); - + /** list of separations to be happening*/ protected FlightConfigurableParameterSet separations; /** number of stages */ @@ -96,7 +92,6 @@ public class AxialStage extends ComponentAssembly implements FlightConfigurableC copy.separations = new FlightConfigurableParameterSet(separations); return copy; } - /** * Stages may be positioned relative to other stages. In that case, this will set the stage number diff --git a/core/src/net/sf/openrocket/rocketcomponent/FlightConfiguration.java b/core/src/net/sf/openrocket/rocketcomponent/FlightConfiguration.java index 72fdacac1..10c302735 100644 --- a/core/src/net/sf/openrocket/rocketcomponent/FlightConfiguration.java +++ b/core/src/net/sf/openrocket/rocketcomponent/FlightConfiguration.java @@ -46,22 +46,23 @@ public class FlightConfiguration implements FlightConfigurableParameter stages = new HashMap(); // Map of stage number to StageFlags of the corresponding stage + final protected Map stages = new HashMap<>(); // Map of stage number to StageFlags of the corresponding stage final protected Map motors = new HashMap(); final private Collection activeMotors = new ConcurrentLinkedQueue(); final private InstanceMap activeInstances = new InstanceMap(); @@ -130,7 +131,7 @@ public class FlightConfiguration implements FlightConfigurableParameter 0 && + stages.get(stageNumber) != null && stages.get(stageNumber).active; } public Collection getAllComponents() { @@ -370,7 +373,7 @@ public class FlightConfiguration implements FlightConfigurableParameter getAllStages() { List stages = new ArrayList<>(); for (StageFlags flags : this.stages.values()) { - stages.add( rocket.getStage(flags.stageNumber)); + stages.add( rocket.getStage(flags.stageId)); } return stages; } @@ -379,8 +382,8 @@ public class FlightConfiguration implements FlightConfigurableParameter activeStages = new ArrayList<>(); for (StageFlags flags : this.stages.values()) { - if (flags.active) { - AxialStage stage = rocket.getStage(flags.stageNumber); + if (isStageActive(flags.stageNumber)) { + AxialStage stage = rocket.getStage(flags.stageId); if (stage == null) { continue; } @@ -392,13 +395,7 @@ public class FlightConfiguration implements FlightConfigurableParameter stagesBackup = new HashMap<>(this.stages); this.stages.clear(); for (AxialStage curStage : this.rocket.getStageList()) { if (curStage == null) continue; - StageFlags flagsToAdd = new StageFlags( curStage.getStageNumber(), true); + boolean active = true; + for (FlightConfiguration.StageFlags flag : stagesBackup.values()) { + if (flag.stageId.equals(curStage.getID())) { + active = flag.active; + break; + } + } + StageFlags flagsToAdd = new StageFlags(curStage.getStageNumber(), curStage.getID(), active); this.stages.put(curStage.getStageNumber(), flagsToAdd); } } @@ -850,8 +851,8 @@ public class FlightConfiguration implements FlightConfigurableParameter - + @@ -18,7 +18,7 @@ - + diff --git a/install4j/README.md b/install4j/README.md index 45f4ef249..29633da7c 100644 --- a/install4j/README.md +++ b/install4j/README.md @@ -17,12 +17,12 @@ to publish installers for the following platforms. # Instructions on updating the macOS drag-and-drop installer This is an example of updating the installer from 22.02.beta.01 to 22.02.beta.02: -1. Download the 22.02.beta.01.dmg file -2. Make a read/write .dmg file using the terminal command `hdiutil convert OpenRocket_macos_22_02_beta_01.dmg -format UDRW -o 22.02.beta.01_rw.dmg` -3. Enlarge the writable DMG, by first checking the current size: `hdiutil resize OpenRocket_macos_22_02_beta_01_rw.dmg`, e.g. you get 370000 in the 'cur' column, then just resize it to e.g. 400000: `hdiutil resize -sectors 400000 OpenRocket_macos_22_02_beta_01_rw.dmg` -4. Mount the DMG: `hdiutil attach OpenRocket_macos_22_02_beta_01_rw.dmg` +1. Download the OpenRocket-22.02.beta.01-macOS.dmg file +2. Make a read/write .dmg file using the terminal command `hdiutil convert OpenRocket-22.02.beta.01-macOS.dmg -format UDRW -o 22.02.beta.01_rw.dmg` +3. Enlarge the writable DMG, by first checking the current size: `hdiutil resize 22.02.beta.01_rw.dmg`, e.g. you get 370000 in the 'cur' column, then just resize it to e.g. 400000: `hdiutil resize -sectors 400000 22.02.beta.01_rw.dmg` +4. Mount the DMG: `hdiutil attach 22.02.beta.01_rw.dmg` 5. Open the OpenRocket-disk from your desktop and change the app name from 22.02.beta.01 to 22.02.beta.02 6. Copy the .DS_Store to `openrocket/install4j/22.xx/macOS_resources` by running the command `cp /Volumes/OpenRocket/.DS_Store openrocket/install4j/22.xx/macOS_resources/DS_Store` 7. Eject the OpenRocket DMG disk from your desktop (important step) -8. Delete `OpenRocket_macos_22_02_beta_01_rw.dmg` +8. Delete `22.02.beta.01_rw.dmg` 9. You're all done! diff --git a/swing/src/net/sf/openrocket/gui/components/StageSelector.java b/swing/src/net/sf/openrocket/gui/components/StageSelector.java index da1aace86..f0e9ce289 100644 --- a/swing/src/net/sf/openrocket/gui/components/StageSelector.java +++ b/swing/src/net/sf/openrocket/gui/components/StageSelector.java @@ -11,18 +11,21 @@ import javax.swing.JToggleButton; import net.miginfocom.swing.MigLayout; import net.sf.openrocket.gui.widgets.SelectColorToggleButton; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.rocketcomponent.AxialStage; import net.sf.openrocket.rocketcomponent.BodyTube; import net.sf.openrocket.rocketcomponent.ComponentChangeEvent; import net.sf.openrocket.rocketcomponent.FlightConfiguration; import net.sf.openrocket.rocketcomponent.Rocket; import net.sf.openrocket.rocketcomponent.RocketComponent; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.util.StateChangeListener; @SuppressWarnings("serial") public class StageSelector extends JPanel implements StateChangeListener { + private static final Translator trans = Application.getTranslator(); private final Rocket rocket; private List buttons = new ArrayList(); @@ -61,9 +64,16 @@ public class StageSelector extends JPanel implements StateChangeListener { private class StageAction extends AbstractAction { private final AxialStage stage; - + public StageAction(final AxialStage stage) { this.stage = stage; + if (this.stage.getChildCount() == 0) { + putValue(SHORT_DESCRIPTION, trans.get("RocketPanel.btn.Stages.NoChildren.ttip")); + setEnabled(false); + } else { + putValue(SHORT_DESCRIPTION, trans.get("RocketPanel.btn.Stages.Toggle.ttip")); + } + updateUI(); } @Override @@ -77,6 +87,15 @@ public class StageSelector extends JPanel implements StateChangeListener { @Override public void actionPerformed(ActionEvent e) { + // Don't toggle the state if the stage has no children (and is therefore inactive) + if (stage.getChildCount() == 0) { + putValue(SHORT_DESCRIPTION, trans.get("RocketPanel.btn.Stages.NoChildren.ttip")); + setEnabled(false); + return; + } else { + setEnabled(true); + putValue(SHORT_DESCRIPTION, trans.get("RocketPanel.btn.Stages.Toggle.ttip")); + } rocket.getSelectedConfiguration().toggleStage(stage.getStageNumber()); rocket.fireComponentChangeEvent(ComponentChangeEvent.AEROMASS_CHANGE | ComponentChangeEvent.MOTOR_CHANGE ); }