Yet another "threading" post by a FreeCAD NOOB...

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!
blacey
Posts: 370
Joined: Tue Dec 08, 2015 11:28 pm

Yet another "threading" post by a FreeCAD NOOB...

Postby blacey » Sat Dec 12, 2015 2:41 am

I am new to FreeCAD and am trying to do what I think should be fairly simple but I am completely stumped how to subtract a helix swept with an ISO thread sketch from a shaft. I am not making this request without having done proper due diligence - I have watched every threading tutorial and other tutorials I can find, read the open CASCADE object transformation sections in http://www.opencascade.com/doc/occt-6.9 ... odalg_3b_1, and gleaned anything I could find in the forums, including this exhaustive post on threading - viewtopic.php?f=3&t=6506 which was helpful for other reasons but didn't resolve my issue, and I have tried both the latest Mac OS X build and Linux build.

Goal:

Design a shaft with a gear on one side and a collar that will mesh a 13 mm ID bearing and opposing thread to accept a locknut with a collar on the other side of the bearing. All of the modeling is complete except when I attempt to subtract the thread from the shaft - it either fails as an improper cut (hint?) or the resulting solid is not what I would have expected… I have tried several approaches including manual boolean operations instead of part WB cut and the dependency graph appears normal so I must be missing something fundamental… I have attached the model that is in the "ready to cut" state and would appreciate any hints or tips that will unblock me. Also, given that I am new to FreeCAD, if there is a better way to accomplish my end goal or you see problems with the modeling approach, then by all means let me know. ;)

On another note, why does the element ordering in the combo view change if you "undo" an operation? The dependency graph shows the underlying dependencies haven't actually changed but the combo view suggests that they have because they are re-ordered… Is this a visual cue that I need to understand or a UI feature?

Feel free to point me to good documentation/materials on the FreeCAD conceptual model so I can build my understanding of how best to model in FreeCAD so something like this is less of a mystery.

Thanks in advance,
Bruce

Versions used:

Code: Select all

OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.4945 (Git)
Build type: Release
Branch: master
Hash: 6cd9220079a1efb1a2f33842fa614521a31bf0d5
Python version: 2.7.9
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

Code: Select all

OS: Ubuntu 14.04.3 LTS
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.16.6037 (Git)
Build type: None
Branch: master
Hash: be9920a132b57fbcf049d6a53d17cc34df1cbe30
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Attachments
Shaft Gear.FCStd
Gear model
(310.56 KiB) Downloaded 12 times
Screen Shot 2015-12-11 at 6.20.28 PM.png
Screenshot
Screen Shot 2015-12-11 at 6.20.28 PM.png (88.92 KiB) Viewed 1419 times
User avatar
tanderson69
Posts: 1530
Joined: Thu Feb 18, 2010 1:07 am

Re: Yet another "threading" post by a FreeCAD NOOB...

Postby tanderson69 » Sat Dec 12, 2015 3:14 am

go here http://www.freecadweb.org/wiki/index.ph ... w_Tutorial and search the page for 'Rule 1'
mario52
Posts: 2919
Joined: Wed May 16, 2012 2:13 pm

Re: Yet another "threading" post by a FreeCAD NOOB...

Postby mario52 » Sat Dec 12, 2015 11:09 am

Maybe you need a special feature, go into Macros_recipes and Code_snippets, Dialog creation. My macros on Gist.github.
User avatar
ppemawm
Posts: 644
Joined: Fri May 17, 2013 3:54 pm
Location: Manhattan New York

Re: Yet another "threading" post by a FreeCAD NOOB...

Postby ppemawm » Sat Dec 12, 2015 3:20 pm

blacey wrote:when I attempt to subtract the thread from the shaft - it either fails as an improper cut (hint?)
This is simply a case of self intersection, a common sweep error. The width of the thread is larger than the pitch of the helix. If you increase the pitch, for example, to 1.76 mm you should be able to make the cut and have a valid solid. So, recheck your width and/or pitch.
Picture2.jpg
Picture2.jpg (24.32 KiB) Viewed 1367 times
Other than that, your modelling approach is quite good.
blacey wrote:On another note, why does the element ordering in the combo view change if you "undo" an operation?
I will have to leave this question to one of the developers. I am also curious.

OS: Windows 8.1
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.5958 (Git)
Build type: Release
Branch: master
Hash: b3e0e8272f0ed017caf7644808e929c87a85937e
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
Last edited by ppemawm on Sat Dec 12, 2015 5:25 pm, edited 1 time in total.
"It is a poor workman who blames his tools..." ;)
blacey
Posts: 370
Joined: Tue Dec 08, 2015 11:28 pm

Re: Yet another "threading" post by a FreeCAD NOOB...

Postby blacey » Sat Dec 12, 2015 4:49 pm

Wow everyone, thanks for prompt and constructive replies! The overlapping helix was clearly the root cause but now my resulting solid has air gaps... It is almost like my swept helix is filled so when I cut it from the shaft, it removes the shaft material all the way to the surface of the shaft pocket. Below are three screenshots:

1) View of the non-overlapping swept helix (slight transparency in view settings for outer and inner model features)
2) View of helix on shaft before cut
3) View of resulting solid (I show the boolean operation in the combo view for reference)
Screen Shot 2015-12-12 at 8.24.41 AM.png
Swept Helix
Screen Shot 2015-12-12 at 8.24.41 AM.png (426.78 KiB) Viewed 1347 times
Screen Shot 2015-12-12 at 8.25.02 AM.png
Helix on shaft before cut
Screen Shot 2015-12-12 at 8.25.02 AM.png (159.45 KiB) Viewed 1347 times
Screen Shot 2015-12-12 at 8.34.21 AM.png
Resulting solid from cut
Screen Shot 2015-12-12 at 8.34.21 AM.png (369.87 KiB) Viewed 1347 times
Thanks again for the pointers so far. Honestly, I was to the point where I might have bailed if it weren't for you guys.
OS: Mac OS X
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.4945 (Git)
Build type: Release
Branch: master
Hash: 6cd9220079a1efb1a2f33842fa614521a31bf0d5
Python version: 2.7.9
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
User avatar
ppemawm
Posts: 644
Joined: Fri May 17, 2013 3:54 pm
Location: Manhattan New York

Re: Yet another "threading" post by a FreeCAD NOOB...

Postby ppemawm » Sat Dec 12, 2015 5:27 pm

It would be helpful if you can attach your file.
You may have to rotate the helix about its axis a small amount. Thread cuts are always a bit tricky and not guaranteed.
"It is a poor workman who blames his tools..." ;)
blacey
Posts: 370
Joined: Tue Dec 08, 2015 11:28 pm

Re: Yet another "threading" post by a FreeCAD NOOB...

Postby blacey » Sat Dec 12, 2015 5:35 pm

ppemawm wrote:It would be helpful if you can attach your file.
You may have to rotate the helix about its axis a small amount. Thread cuts are always a bit tricky and not guaranteed.
D'oh! Here it is :)
Attachments
Shaft Gear.FCStd
(424.18 KiB) Downloaded 15 times
User avatar
ppemawm
Posts: 644
Joined: Fri May 17, 2013 3:54 pm
Location: Manhattan New York

Re: Yet another "threading" post by a FreeCAD NOOB...

Postby ppemawm » Sun Dec 13, 2015 1:23 pm

Recomputing the thread cut in your latest file, without any modification, works OK for me using the following version:

OS: Windows 8.1
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.5958 (Git)
Build type: Release
Branch: master
Hash: b3e0e8272f0ed017caf7644808e929c87a85937e
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17


Perhaps another user can confirm?
"It is a poor workman who blames his tools..." ;)
jmaustpc
Posts: 9638
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Yet another "threading" post by a FreeCAD NOOB...

Postby jmaustpc » Sun Dec 13, 2015 2:33 pm

I forced a recompute by changing the Pad "Shaft" from 13 to 14mm and back again...then the cut worked correctly.

OS: Ubuntu 12.04.5 LTS
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6048 (Git)
Build type: Debug
Branch: master
Hash: f26844e1bc177ceb2808bc6e31d14ad557176e0a
Python version: 2.7.3
Qt version: 4.8.2
Coin version: 3.1.3
OCC version: 6.8.0.oce-0.17-dev
blacey
Posts: 370
Joined: Tue Dec 08, 2015 11:28 pm

Re: Yet another "threading" post by a FreeCAD NOOB...

Postby blacey » Sun Dec 13, 2015 10:08 pm

Thanks everyone. I loaded FreeCAD into a Ubuntu VM and the cut worked as expected so this is either an old bug that has been resolved in the newer builds or a Mac OS X bug. This inspired me to compile from source... I have everything working except libarea... I was able to resolve the issue blocking peterl94's travisci builds and sent a private PM to him so I am hoping we will see new Mac builds soon ;)

Code: Select all

OS: Ubuntu 14.04.3 LTS
Word size of OS: 32-bit
Word size of FreeCAD: 32-bit
Version: 0.16.6037 (Git)
Build type: None
Branch: master
Hash: be9920a132b57fbcf049d6a53d17cc34df1cbe30
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17