-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve bend offset calculations when angle isn't 90deg. #452
base: master
Are you sure you want to change the base?
Conversation
Thanks!
|
One more observation reopening the project with modified sheetmetal WB and running recompute doesn't cause the sheetmetal part to change. Only if I modify some property of base shape like the material thickness it actually recomputes and updates the shape. Saying this only for the purpose of testing, I am not suggesting that relying on this for project compatibility. |
This looks like a complex effort. Thank you for all the work you've done so far 🙏 |
Now that face reference changes are done I guess this is unblocked. Next steps would be:
Like suggested i am thinking of adding two new modes and renaming the old modes since any new project should probably prefer new modes. I hope that the mode names in project and UI strings are separate. If the list of modes gets's too long/messy then the legacy modes can be hidden by default showing only for objects which had chosen them in older workbench versions. |
Yes. Hope rebasing will not make many conflicts |
415c0ae
to
35dab59
Compare
Rebased and added the fixed calculations as new modes. Within task GUI old modes are labelled as "Thickness Outside (legacy)". Unfortunately the property view directly displays the internal names used by code, so it's a bit more confusing there. But the property view also doesn't use localized strings. After playing with the feature more noticed that there is one aspect of non 90° that would be good to discuss early, as attempting to fix later will introduce more breaking changes in behavior. If you compare to face reference modes, setting angle to something like 45° essentially establishes a plane. The non obvious part is which of the two planes (going through left corner, or right corner of wall before adding the new bend). I can think of at least 3 if not more somewhat logical ways it could behave: For 90° bends there is no choice since there is single plane going through both corners. For a) and c) has nice property that it matters less how exactly bend was created. Maybe I should try implementing b) and c) to see how useful they are in practice when you try to more complex shapes. |
IMO the most important thing is that it is consistent and simple to explain. I does not have to be powerful or make assumptions, or relay on user selecting edges. |
Currently I am leaning more towards a). Seems like each CAD uses slightly different naming and each provides different subset of choices:
??? - it's unclear whether Onshape Outside behaves like "Material Inside (Outside corner)", "Material Inside (Inside corner)" or something else since the docs only showed 90° flange, same for "Inside". Autodesk inventor -> 4 choices corresponding to main modes + hidden checkbox called "Old method" which based on illustration probably changes the inside corner/outside corner choice. I had noticed before that the old "Material Inside" behavior for sharp angles made at least some sense. Should probably rename it from "Material Inside (legecy)" to something else, might be worth keeping it not just for backwards compatibility. |
TODO: will prepare test project and screenshots tomorrow.
Previously when doing bend using "Make wall" command "Material Inside" and "Material Outside" modes didn't take into account the angle.
Test plan:
In each of the cases above changing radius should not affect endpoint
During the 3 cases described above the shape should change smoothly, negative angles should look the same as positive angle reversed.