Fasteners workbench based on screw-maker

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Modeler
Posts: 43
Joined: Fri Feb 19, 2021 4:42 pm

Re: 1/4 bolt problem - Shape is not a shell

Postby Modeler » Mon May 03, 2021 5:35 pm

Syres wrote:
Mon May 03, 2021 3:07 pm

It isn't an issue with the workbench as such, the specific screws work with thread = true using OCC 7.3.0 but don't using OCC 7.5.0
Thanks for the info.

I see you are using the same FreeCAD version I am but you are using OCC 7.3 while I am at 7.5. How do I move back to OCC 7.3?

Thanks,

Colin
Syres
Posts: 1008
Joined: Thu Aug 09, 2018 11:14 am

Re: 1/4 bolt problem - Shape is not a shell

Postby Syres » Tue May 04, 2021 9:21 am

Modeler wrote:
Mon May 03, 2021 5:35 pm
I see you are using the same FreeCAD version I am but you are using OCC 7.3 while I am at 7.5. How do I move back to OCC 7.3?
Not quite it's 9 commits older but the best advice I can give is download 0.18.4 https://github.com/FreeCAD/FreeCAD/releases/tag/0.18.4 (FreeCAD-0.18.4.980bf90-WIN-x64-portable.7z) which can be extracted into it's own folder and then you can run both versions side-by-side. Only use 0.18.4 for operations such as these, create the fastener required and save the file, close 0.18.4 and open 0.19.1 and load the file. As long as you don't change any of the settings for that fastener it will be OK.
Modeler
Posts: 43
Joined: Fri Feb 19, 2021 4:42 pm

Re: 1/4 bolt problem - Shape is not a shell

Postby Modeler » Tue May 04, 2021 9:14 pm

Syres wrote:
Tue May 04, 2021 9:21 am
Modeler wrote:
Mon May 03, 2021 5:35 pm
I see you are using the same FreeCAD version I am but you are using OCC 7.3 while I am at 7.5. How do I move back to OCC 7.3?
Not quite it's 9 commits older but the best advice I can give is download 0.18.4 https://github.com/FreeCAD/FreeCAD/releases/tag/0.18.4 (FreeCAD-0.18.4.980bf90-WIN-x64-portable.7z) which can be extracted into it's own folder and then you can run both versions side-by-side. Only use 0.18.4 for operations such as these, create the fastener required and save the file, close 0.18.4 and open 0.19.1 and load the file. As long as you don't change any of the settings for that fastener it will be OK.
I am assuming you compiled yours yourself?
jmaustpc
Posts: 10990
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Fasteners workbench based on screw-maker

Postby jmaustpc » Tue May 04, 2021 10:21 pm

Syres wrote:
Tue May 04, 2021 9:21 am
Modeler wrote:
Mon May 03, 2021 5:35 pm
I see you are using the same FreeCAD version I am but you are using OCC 7.3 while I am at 7.5. How do I move back to OCC 7.3?
Not quite it's 9 commits older but the best advice I can give is download 0.18.4 https://github.com/FreeCAD/FreeCAD/releases/tag/0.18.4 (FreeCAD-0.18.4.980bf90-WIN-x64-portable.7z) which can be extracted into it's own folder and then you can run both versions side-by-side. Only use 0.18.4 for operations such as these, create the fastener required and save the file, close 0.18.4 and open 0.19.1 and load the file. As long as you don't change any of the settings for that fastener it will be OK.
That is not a good idea, maybe as an absolute last resort but even then problematic. 0.18 can not reliably open files from 0.19. Sketches will likely fail amongst other things.

Even going back to a FreeCAD compiled against an older OCC has issues, maybe you might find it has resolved this issue if it is caused by a regression in a newer OCC (in a general sense, it may or may not, be more complex than that, for example how FreeCAD attempts to work with changes in OCC rather than a real bug), the newer OCC has other new features and bug fixes so it is possible going back might fix one thing but create more issues elsewhere.

I have to go right now...
jmaustpc
Posts: 10990
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Fasteners workbench based on screw-maker

Postby jmaustpc » Tue May 04, 2021 11:44 pm

back again, school bus has come and gone. :)

I have not looked at any code and this is just off the top of my head however it may or may not be a useful tip.

There has been a change in recent OCC with regards to helix generation.

Basic history around Part Helix. A very long time ago (must be close to a decade ago) Helix had been implemented in Part WB but it did not at that time work. So one day I decided to look into it and see if I could fix it. FreeCAD code was infinitely more simple in those days and hence easier to understand for someone beginning to learn C++ etc. Much to my own surprise, I managed to workout why it didn't work and how to fix it. OCC created the Helix by first creating a plane then a diagonal line attached to that plane, then curved that plane, hence you end up with a helix. Sometime later (maybe year or years, I don't remember, but still many years ago from now) it was noticed that after a considerable number of rotations A Helix would begin to degenerate. A developer looked into it and decided the issue was within OCC (I think it was Werner, but it could have been someone else) so for a work around the current code was written where a helix is made up as a wire from multiple helical edges, rather than a single edge.

This is a screen shot, showing one single helix (a wire containing three edges) with three rotations hence three edges, with one green selected, one yellow pre-selected , and one black not selected.
Screenshot_20210505_090820.png
Screenshot_20210505_090820.png (27.93 KiB) Viewed 119 times
If FreeCAD compiled from master today, there is now a new property for Part Helix which allows a user to control how many edges are in the Helix. In this example I have set in to 0.5 so each edge is half a rotation, but I also tried 0 to confirm it produces one single edge. Here is a screenshot of that
Screenshot_20210505_091405.png
Screenshot_20210505_091405.png (104.32 KiB) Viewed 119 times
Another tip, in current FreeCAD master and 0.19 there is an advanced property for Helix (right click on the property editor in Combo view and click on "show all" to see it) it is named "Style" and has option of old style or new style. I don't know what this does, the difference was not visually obvious on my test example with a default Part Helix.
Screenshot_20210505_092304.png
Screenshot_20210505_092304.png (47.08 KiB) Viewed 119 times

Recently someone on the Help forum had a problem where a Helical sweep in Part WB using the Part Helix as a path was failing when the cross section was reduced below a given size. Someone else discovered that the issue was resolved in FreeCAD from master by changing the Helix to one segment, by making that property 0. I could be wrong about this next comment but I think someone said in that topic that the equivalent Helical feature in PartDesign did not see the same issue. If that is true then perhaps comparing the code may suggest a fix.

I have mentioned all this about Helix as a thread will be using it. The issue you are talking about seems to appear as you get smaller when you reach some threshold in size, which is what that other topic was seeing with a Part Sweep along a helix. I am assuming that you have reduced the size of the "cutting" cross section for the smaller threads so that it does not self intersect as it is swept around the helical path?

Maybe some part of my comments might help someone else to fix this issue.

Jim