Skip to content

Conversation

@jura0207
Copy link
Contributor

@jura0207 jura0207 commented Jan 15, 2023

This fixes #1970 - [Feature request] Change Inner Tube cluster tube separation from unitless to distance unit

The problem was that the distance between multiple clusters inside the tube were measured by scaling the outer diameter of the tubes in the cluster. The more precise solution is to make the distance a length unit.

This was implemented by changing the unit from scaling to length. Frontend was also adjusted to implement this with adding a measurement unit and adjusted slider. Saving and loading .ork now have both clusterScale and clusterSeparation variables so that the older supported versions would also work. Language tooltip was removed since there is no more scaling in the menu.

jar file

…ation from unitless to distance unit - language changes
@SiboVG SiboVG self-requested a review January 15, 2023 22:38
@SiboVG
Copy link
Member

SiboVG commented Jan 15, 2023

Thank you for your changes @jura0207! Looks very good overall, just a couple of small notes (see my review).

However, I may have been too quick with posting issue #1970. I know see some logic as to why cluster scale was used before, instead of just cluster separation (in distance). If you change the diameter of the inner tube, and want the tubes to be touching, then always you have to update the cluster separation value...

Screen.Recording.2023-01-16.at.00.45.00.mov

Not entirely sure on what the best behavior would be (maybe add a radio button to switch between cluster scale/cluster separation?), I'll ping @hcraigmiller, @neilweinstock and @JoePfeiffer.

@SiboVG
Copy link
Member

SiboVG commented Jan 15, 2023

And by the way, RockSim functionality functions as expected.

…ation from unitless to distance unit - Added todo-s for removing clusterScale
@jura0207
Copy link
Contributor Author

Changes were implemented.

Thank you for your changes @jura0207! Looks very good overall, just a couple of small notes (see my review).

However, I may have been too quick with posting issue #1970. I know see some logic as to why cluster scale was used before, instead of just cluster separation (in distance). If you change the diameter of the inner tube, and want the tubes to be touching, then always you have to update the cluster separation value...

Screen.Recording.2023-01-16.at.00.45.00.mov
Not entirely sure on what the best behavior would be (maybe add a radio button to switch between cluster scale/cluster separation?), I'll ping @hcraigmiller, @neilweinstock and @JoePfeiffer.

You're welcome! I'm glad I could help a little. :D

Would adding something like:
clusterSeparation = clusterSeparation * (r / outerRadius); where r is new radius
in the ThicknessRingComponent.java in setOuterRadius fix this?
Or maybe better add a function that does that in case the cluster exists.
I'm not sure this is the right approach since this function is used in a lot of other places and both the scope and risk would be too big.

@JoePfeiffer
Copy link
Contributor

I'm thinking of a number of use cases for which either the old or the new could make sense. I think we do want that checkbox.

I do wonder what the semantics of "separation" should be -- to me, that should be the distance between motor tubes, not the distance between their centers (so a separation of 0 would have touching motor mounts). That would also eliminate the issue of needing to change separation with changes in motor tube diameter. Would that be reasonable?

@SiboVG SiboVG marked this pull request as draft January 18, 2023 16:21
@SiboVG
Copy link
Member

SiboVG commented Jan 18, 2023

I do wonder what the semantics of "separation" should be -- to me, that should be the distance between motor tubes, not the distance between their centers (so a separation of 0 would have touching motor mounts). That would also eliminate the issue of needing to change separation with changes in motor tube diameter. Would that be reasonable?

Sounds like a good idea. I would suggest adding radio buttons to switch between absolute and relative separation. For relative separation, I would keep the "1 == tubes touching", since that's the standard that OR uses right now. For absolute separation, 0 cm == tubes touching.
Screenshot 2023-01-18 at 17 24 1@jura0207

@jura0207 do you feel like implementing this? If this PR became more than you bargained for, that's also fine, then we can pitch in and finish it.

@SiboVG
Copy link
Member

SiboVG commented Jul 23, 2023

Superseded by #2269.

@SiboVG SiboVG closed this Jul 23, 2023
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.

[Feature request] Change Inner Tube cluster tube separation from unitless to distance unit

3 participants