FCGear: Aligning with the back of a gear rack

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!
Post Reply
joshualibrarian
Posts: 13
Joined: Mon Sep 05, 2022 5:05 pm

FCGear: Aligning with the back of a gear rack

Post by joshualibrarian »

Okay, so I've created a simple pinion and rack using those buttons in the Gear workbench. I've got them nicely aligned to each other, but I also want to attach an arbitrary piece of geometry (in the screenshots, the example cube) to the end of the rack. I am trying to align the adjacent cube on both the Y (green) and X (red) axes, but I can't accurately identify the geometry defining the origin point of the rack! The Y dimension is fine (half the `transverse_pitch`), as shown in the screenshot, but, in the X dimension, My understanding is that this point is on the "reference diameter" (or whatever you call that for a rack, in which there is no circle, hence presumably no diameter), which is why the gears are meshing so nicely, but when I presume that the distance in question is the distance from the root of the teeth (`InvoluteGear.df`) to said reference diameter (`InvoluteGear.dw`), as shown in the screenshot, it still doesn't line up. I've tried many permutations, and I can't manage to align anything to the back side of that rack.

Anyone have any insight on this problem, is there a computed value in there somewhere I can use, or what formula?
Attachments
Screen Shot 2022-09-22 at 3.33.02 PM.png
Screen Shot 2022-09-22 at 3.33.02 PM.png (44.63 KiB) Viewed 1585 times
Screen Shot 2022-09-22 at 3.58.13 PM.png
Screen Shot 2022-09-22 at 3.58.13 PM.png (222.61 KiB) Viewed 1585 times
Screen Shot 2022-09-22 at 4.04.32 PM.png
Screen Shot 2022-09-22 at 4.04.32 PM.png (270.97 KiB) Viewed 1585 times
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: FCGear: Aligning with the back of a gear rack

Post by chrisb »

joshualibrarian wrote: Thu Sep 22, 2022 11:28 pm I also want to attach an arbitrary piece of geometry (in the screenshots, the example cube) to the end of the rack.
Attach the cube directly to the rack:
Attachments
SnipScreenshot-a485cb.png
SnipScreenshot-a485cb.png (32.66 KiB) Viewed 1567 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
joshualibrarian
Posts: 13
Joined: Mon Sep 05, 2022 5:05 pm

Re: FCGear: Aligning with the back of a gear rack

Post by joshualibrarian »

This cube is just an example, and for my actual model, which is very parametric based on spreadsheet values, I need to be able to calculate this distance, as I need to fit it into a whole bunch of other calculated measurements... I had earlier placed it as you say, but I still want to understand the math of it's placement and it's origin.
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: FCGear: Aligning with the back of a gear rack

Post by chrisb »

joshualibrarian wrote: Thu Sep 22, 2022 11:52 pm I had earlier placed it as you say, but I still want to understand the math of it's placement and it's origin.
@looo can probably explain.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
joshualibrarian
Posts: 13
Joined: Mon Sep 05, 2022 5:05 pm

Re: FCGear: Aligning with the back of a gear rack

Post by joshualibrarian »

It seems that when I use `InvoluteGear.da - InvoluteGear.dw` it comes closer to aligning, but still not quite. The only conclusion I can come to is that the values I'm getting from the pinion gear (with the exact same module as the rack gear) do not accurately describe the dimensions of the teeth on the rack gear, which kinda makes sense, but how then do I get those analogous values for the rack, since that object doesn't have any of those values?Image
Attachments
Screen Shot 2022-09-22 at 6.49.04 PM.png
Screen Shot 2022-09-22 at 6.49.04 PM.png (306.71 KiB) Viewed 1476 times
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: FCGear: Aligning with the back of a gear rack

Post by Roy_043 »

I have no experience with gears. But just playing with the numbers I am able to get this result.
Attachments
InvoluteRack_Box.png
InvoluteRack_Box.png (19.87 KiB) Viewed 1408 times
InvoluteRack_Box.FCStd
(14.43 KiB) Downloaded 12 times
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: FCGear: Aligning with the back of a gear rack

Post by Roy_043 »

Hmm, forgot the add the Placement of the Rack...
User avatar
papyblaise
Veteran
Posts: 7864
Joined: Thu Jun 13, 2019 4:28 pm
Location: France

Re: FCGear: Aligning with the back of a gear rack

Post by papyblaise »

obviously, you don't know the standards of the sprockets, it doesn't matter, it's not a reproach, everyone is not lucky to have been in a technical school
the height of the tooth above the reference diameter is 1pitch, and 1.25 pitch below, this is true for a pinion whatever the pitch as for a rack
my screenshot confirms it
if this is not directly readable on the left data table in the case of the cogwheel, you probably still have a paper and a pencil to do the calculation, failing that, your smartphone
Attachments
pignons.JPG
pignons.JPG (30.16 KiB) Viewed 1357 times
pignon2.JPG
pignon2.JPG (52.04 KiB) Viewed 1357 times
pignon.FCStd
(33.04 KiB) Downloaded 13 times
joshualibrarian
Posts: 13
Joined: Mon Sep 05, 2022 5:05 pm

Re: FCGear: Aligning with the back of a gear rack

Post by joshualibrarian »

Thank you all for the very informative responses. Though I don't fully understand what @papyblaise means about "1pitch", I do understand now that the gears on the rack (with the matching module) do indeed correspond to the values of the pinion, so I can use `da`, `dw` and `df` to adjust my geometry, as shown in the attached screenshot. As I understand it:

"tooth tip height" = (da - dw)/2
"tooth root height" = (dw - df)/2
"tooth height" = (da - df)/2 = tip + root

Holding true for both the rack and the pinion (damn it would be really convenient if these values were available in the gear objects).

I am using here my original formulas, just actually working now. The response of @Roy_043 does indeed work... though I am baffled as to exactly why. The only number I remain unclear about in the InvoluteGear object is that `clearance` variable. I'm not clear which dimension this actually represents, based on it's name, I would expect it to be the distance from the tip of a tooth to the expected back of the adjoining tooth, but it doesn't seem to be.
Screen Shot 2022-09-24 at 1.10.42 PM.png
Screen Shot 2022-09-24 at 1.10.42 PM.png (305.19 KiB) Viewed 1266 times
However, now that I've got it working in the test file, and the cube positioned exactly where I want it (see screenshot above), I'm trying to reproduce that in my actual model, but something is very weird. I think my InvoluteGear is somehow broken. See in the below screenshot with the properties of the gear... according to the documentation, `df` is the root of the tooth, `da` is the tip, and `dw` is the "working pitch"... this working pitch must ALWAYS be between the others, right? So it should always be `da > dw > df`... unless I'm really confused?

But in this gear, it's gotten itself in a state where no matter many teeth I set it to, it is showing `dw` to be LOWER than `df`... it doesn't seem to be updating the view either as I change it, so definitely broken somewhere, but no indication of where or how, so what's up? 🤔

I also notice that the icons for both the rack and pinion gears start out as the appropriate "gear" icons, but then eventually (I think after closing and opening the file) to be generic cube icons... not sure if this is relevant or not, but seems to happen in all my files.
Screen Shot 2022-09-24 at 1.22.41 PM.png
Screen Shot 2022-09-24 at 1.22.41 PM.png (180.73 KiB) Viewed 1266 times
joshualibrarian
Posts: 13
Joined: Mon Sep 05, 2022 5:05 pm

Re: FCGear: Aligning with the back of a gear rack

Post by joshualibrarian »

For what it's worth, and for all those who find this thread in the future, deleting and re-making both gears eventually did the trick, presumably this is some weird subtle bug that will one day be fixed, but I can't reproduce anything cleanly and I'm glad it's all working now! I've learned a lot and really appreciate everyone's input. 🍻
Screen Shot 2022-09-25 at 3.12.02 PM.png
Screen Shot 2022-09-25 at 3.12.02 PM.png (140.52 KiB) Viewed 1139 times
Screen Shot 2022-09-25 at 3.12.13 PM.png
Screen Shot 2022-09-25 at 3.12.13 PM.png (57.96 KiB) Viewed 1139 times
Post Reply