-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathforlearners.txt
6 lines (4 loc) · 2.03 KB
/
forlearners.txt
1
2
3
4
5
6
Generally how it works is that all sketches are attached to the base planes, and then offset by a calculated variable. For example, the stacking lip is an additive pipe, and its path is a sketch attached to XY-base, and then offset in the z-direction by (7mm * <<spreadsheet>>.z-units). That way it always stays in the right place, and I don't need to make any reference to faces which would break when re-calculating the model with another set of variables.
The "toggling" features are a bit tricky, since FreeCAD currently lacks an option to "supress" features (which is planned for next release though and already available in Realthunder's branch). So here I use the ternary expression (if-then-else), which has a syntax like this: "=[condition] ? [value-if-true] : [value-if-false]". The condition references a value from a user-input field and checks if it's zero or not (=input == 0 ? bla : blabla) So all the variables starting with "eq" are either one value or another, depending on user input.
For subtractive features this means I can change their offset to somewhere far, far away from the main body, which makes them "disappear". For additive features it's a bit tricky - For example in the stacking lip profile sketch, all values get multiplied by 1 if the feature is toggled on, or by 0.0001 if the feature is toggled off. The latter option makes the feature so small that it disappears into the container wall. It's technically still present, just hidden.
For the scoop and the tab features, they both start within one container wall, and their length gets multiplied by 1 or by -1, which makes them point either into the bin or stick out the wall towards the outside. In the latter case they get cut away by a negative feature around the bin (i think it's called edge_trimmer or something like that), which I needed anyway to clean up some protruding details that poked through the corner fillets... I could have used the same method as with the stacking lip here too, but this requires a lot less work to do because I can be more lax with the placement.