Skip to content

Conversation

@SiboVG
Copy link
Member

@SiboVG SiboVG commented Aug 22, 2022

This PR fixes #1315. New behavior for all mass objects:

  • If the 'Auto' checkbox at (packed) diameter is unchecked:
    • No special behavior; you can just edit the diameter and length as you please
  • If you then enable the 'Auto' checkbox:
    • The diameter will change to fit the parent component
    • The length will change in such a way that the (packed) volume after enabling the 'Auto' checkbox is the same as the (packed) volume before enabling the checkbox. E.g. if the diameter is 5 cm before, length 5 cm (volume of 98.17 cm^3), enabling the 'Auto' checkbox changes the diameter to 10 cm, and the length to 1.25 cm (volume still 98.17 cm^3)
    • You can still change the length in the auto mode, but this will now change the volume of the (packed) mass object. So let's say the diameter in auto mode was 10 cm and the length 1.25 cm, if you now set the length to 2.5 cm, the volume changes to 196.35 cm^3. If you now disable the auto setting, again, the volume between auto-mode and non auto-mode will be preserved. So after disabling the 'Auto' checkbox, the diameter falls back to 5 cm, and to keep the volume at 196.35 cm^3, the length will be set to 10 cm.
    • When changing the parent diameter, the volume of the mass object will also be preserverd, so the length of the mass object dynamically changes with the (auto) diameter

In short: there is a preservation of the mass object's volume when converting from auto mode to non auto mode and vice versa. There is a preservation of volume when in auto mode and the parent's diameter is altered.

Demo:

Screen.Recording.2022-08-22.at.09.51.34.mp4

@hcraigmiller
Copy link
Collaborator

Functions as expected, no anomalies found. Very nice.

Build 931
[Windows 11 Pro; Version 21H2; OS Build 22000.739; Windows Feature Experience Pack 1000.22000.739.0]
[Java "11.0.15" 2022-04-19 LTS; Java(TM) SE Runtime Environment 18.9 (build 11.0.15+8-LTS-149)]

@JoePfeiffer JoePfeiffer merged commit 5e20c5c into openrocket:unstable Aug 28, 2022
@SiboVG SiboVG mentioned this pull request Sep 10, 2022
@SiboVG SiboVG deleted the issue-1315 branch September 30, 2022 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Changes to parachute automatic resizing feature related to parachute length

3 participants