I can draw one, but I can't parameterize it

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
efair
Posts: 34
Joined: Mon Sep 20, 2021 3:22 pm

I can draw one, but I can't parameterize it

Post by efair »

First things first: I'm fairly new to FreeCAD. I'm probably missing some obvious feature or doing something foolish.

OS: Fedora 34 (Thirty Four) (GNOME/gnome-xorg)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.Unknown
Build type: Unknown
Python version: 3.9.4
Qt version: 5.15.2
Coin version: 4.0.0a
OCC version: 7.5.0
Locale: English/United States (en_US)

I manually created the attached part for discussion. Surely there must be a common name for this type of part? With my limited knowledge, I would call it "a bushing with two opposing helical slots machined into it".

Each slot is defined by a rectangle swept along a helix . There are two helixes and two sketches for two rectangles. The rectangles are the profiles of the sweeps.

While I can easily create this part, I want to parametrize it so that I can adjust critical dimensions without manually recreating the part every time. I am familiar with the Spreadsheet workbench, creating aliases, and using the aliases in the f(x) dialog. However, the rectangles in the sketches do not seem to allow using the aliases or the f(x) dialog.

For example:
- I might need to change the diameter of the tube - this requires changes to the X height of the rectangles.
- I might need to change width of the slots - this requires changes to the Z height of the rectangles.
- I might need to change the height of the tube - this requires changes to the Z position of the rectangles.

In general, I'm looking for a way to fully parametrize the geometry of the slots in my part.

Any suggestions for how to do this?
Attachments
slottedbushing.FCStd
(45.13 KiB) Downloaded 36 times
Bance
Veteran
Posts: 4250
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: I can draw one, but I can't parameterize it

Post by Bance »

You could try to constrain the sketches for a start.

Give the constraints names so you can use them in expressions.
User avatar
Shalmeneser
Veteran
Posts: 9558
Joined: Wed Dec 23, 2020 12:04 am
Location: Fr

Re: I can draw one, but I can't parameterize it

Post by Shalmeneser »

:idea:
Attachments
slottedbushing_SHALM.FCStd
(45.43 KiB) Downloaded 41 times
efair
Posts: 34
Joined: Mon Sep 20, 2021 3:22 pm

Re: I can draw one, but I can't parameterize it

Post by efair »

Shalmeneser wrote: Mon Sep 20, 2021 8:40 pm:idea:
I'm grateful for your time and thoughtful answer!

I opened your model and updated the params spreadsheet to: Bearing OD=20, Bearing ID=16 and the model lost the important details - the slots disappeared. Perhaps I didn't articulate: it was my hope that simply updating the parameters in the spreadsheet would adjust the entire model and preserve the details.
Bance
Veteran
Posts: 4250
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: I can draw one, but I can't parameterize it

Post by Bance »

I refer to my answer above.

If there are no parameters they can't change.
efair
Posts: 34
Joined: Mon Sep 20, 2021 3:22 pm

Re: I can draw one, but I can't parameterize it

Post by efair »

Bance wrote: Mon Sep 20, 2021 11:22 pm I refer to my answer above.

If there are no parameters they can't change.
I will try this next, thanks.
efair
Posts: 34
Joined: Mon Sep 20, 2021 3:22 pm

Re: I can draw one, but I can't parameterize it

Post by efair »

Bance wrote: Mon Sep 20, 2021 11:22 pm I refer to my answer above.

If there are no parameters they can't change.
Yes, thank you. Using a single rectangle and then adding two constraints on the lengths of two sides works well - when adding a length constraint the f(x) control appears and I can again refer to my parameters.

Several scenarios are possible before clicking "Create a new sketch" 1) nothing selected, 2) edge of helix selected, 3) entire helix (including endpoints) selected. Each yields a different dialog. I'll post back here later today.
efair
Posts: 34
Joined: Mon Sep 20, 2021 3:22 pm

Re: I can draw one, but I can't parameterize it

Post by efair »

OK - I've upped my game a little - I couldn't make the arrays work but no matter.

Attached is my effort to define the slots as solids. When I use "part->boolean->boolean->difference" I see an unexpected result, only one slot is "cut".

Do you also see this behavior?
Attachments
Screenshot from 2021-09-21 11-21-53.png
Screenshot from 2021-09-21 11-21-53.png (34.02 KiB) Viewed 1635 times
slottedbushing-cant-take-difference.FCStd
(23.69 KiB) Downloaded 28 times
Bance
Veteran
Posts: 4250
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: I can draw one, but I can't parameterize it

Post by Bance »

I much prefer to use PD WB. It has additive and subtractive tools for these ops.

The tree is much flatter also.
TheMarkster
Veteran
Posts: 5513
Joined: Thu Apr 05, 2018 1:53 am

Re: I can draw one, but I can't parameterize it

Post by TheMarkster »

Sometimes when the faces are coplanar the booleans can fail. When possible always make the cutting tool bigger so it extends beyond the surface to be cut. I always like to center my sketches because it makes things like polar arrays simpler. You have aligned one side of your rectangle to the vertical sketch axis. Extend it some to the right of the axis and the cut will work as expected. This is a flaw in the CAD library that FreeCAD uses (open cascade) and is probably related to the nature of the way floating point values are stored in computer memory. A number with infinite digits can never be stored in its entirety in the finite memory a computer has. For example, how do you represent pi in its entirety? You cannot. You can only represent it to some acceptable arbitrary number of digits.

I made the original edges construction mode so as not to interfere with the constraint and added 3 more edges to extend the rectangle. These extensions should also be constrained, but I am lazy.
Snip macro screenshot-89bdc2.png
Snip macro screenshot-89bdc2.png (19.54 KiB) Viewed 1591 times
Snip macro screenshot-eb0440.png
Snip macro screenshot-eb0440.png (53.73 KiB) Viewed 1591 times
Post Reply