Fasteners Workbench thread and head scaling

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
chrisb
Posts: 14522
Joined: Tue Mar 17, 2015 9:14 am

Re: Fasteners Workbench thread and head scaling

Postby chrisb » Fri Jan 05, 2018 11:02 pm

Phew, I thought I had a good printer, but I have some doubts it can do this. I will see tomorrow what will happen here with my 0.4 nozzle and 0.1 layer height. Would you mind uploading the FreeCAD file with your modified parameters for an M4 screw?
User avatar
MostlyHarmless
Posts: 12
Joined: Wed Jan 03, 2018 8:28 pm
Location: Willow Grove, Pennsylvania, USA

Re: Fasteners Workbench thread and head scaling

Postby MostlyHarmless » Fri Jan 05, 2018 11:22 pm

NormandC wrote:
Fri Jan 05, 2018 10:40 pm
M4! No way my 3D printer could do that! It probably could with tinkering, but I'm not much of a tinkerer.
Yes, this printer had a fair amount of tinkering done. It didn't do that out of the box. Well, the box actually contained a 3D puzzle, not a printer.

About a year ago I basically bought the cheapest kit that looked reasonable to work with. Since then
  • the heated print bed got a borosilicate glass plate,
  • belt tension is adjusted with printed tension screws (that's where the printed threads became necessary first),
  • the bed leveling screws got improved with more printed parts
  • and recently I replaced the linear bearings for X and Y with polymer ones (Igus Drylin).
The belt tension screws were the biggest bang for the buck. They cost pennies and improved accuracy the most. The glass plate improves the first layer because the aluminum bed does warp a bit when heated.

Finally not really a printer mod, but the thing is connected to a Raspberry PI that is running Octoprint so I can print directly out of Cura over Wifi. No more running around with micro SD cards. 8-)
User avatar
MostlyHarmless
Posts: 12
Joined: Wed Jan 03, 2018 8:28 pm
Location: Willow Grove, Pennsylvania, USA

Re: Fasteners Workbench thread and head scaling

Postby MostlyHarmless » Sat Jan 06, 2018 4:16 am

chrisb wrote:
Fri Jan 05, 2018 11:02 pm
Phew, I thought I had a good printer, but I have some doubts it can do this. I will see tomorrow what will happen here with my 0.4 nozzle and 0.1 layer height. Would you mind uploading the FreeCAD file with your modified parameters for an M4 screw?
Here they are. However, for those files to work you need to use my modified version of the Fasteners Workbench. The two new parameters require changes to FastenersCMD.py and screw_maker.py. Make sure to checkout or download the "scaling" branch, not "master".

https://github.com/wieck/FreeCAD_Fasten ... ee/scaling

The modifications to the Python code are only a proof of concept working with these specific ISO types. I am already not happy with the values being scaling factors. In reality I don't use a factor but derive it from the difference between a real bolt and a test-print. So that's going to change. But before going further I would like some comments from the Workbench author shaise. In the end this is supposed to become a pull request.

Anyhow, good luck printing.
Attachments
Scaling.fcstd
(1.54 KiB) Downloaded 11 times
M4x12-Screw.fcstd
(131.45 KiB) Downloaded 8 times
M4-Nut.fcstd
(87.6 KiB) Downloaded 9 times
User avatar
shaise
Posts: 334
Joined: Thu Jun 11, 2015 8:11 am

Re: Fasteners Workbench thread and head scaling

Postby shaise » Sun Jan 07, 2018 8:54 am

MostlyHarmless wrote:
Sat Jan 06, 2018 4:16 am
I would like some comments from the Workbench author shaise. In the end this is supposed to become a pull request.
Hi MostlyHarmless,

First of all, thanks for this tweak! using yous suggested 0.98 / 1.05 scaling I was able to print functional M4 fasteners on my original prusa i3 MK2, with the default print settings.
M4_fast.jpg
M4_fast.jpg (233.75 KiB) Viewed 414 times
Regarding pull requests, there are two issues:
1. Backward compatibility: If I use your WB with the 2 new parameters added and try to open an old file with fasteners, I can no longer do modifications to these fasteners, as it produces an error "missing attribute"
2. Any changes to screw_maker.py is also a bit problematic: screw_maker.py is not mine, it was done by the talented ulrich1a. I think now he plans to add non metric fasteners, but he uses his own version and not the one in my repository. When he finishes, it will probably be hard to integrate it with the new modifications.

shai
chrisb
Posts: 14522
Joined: Tue Mar 17, 2015 9:14 am

Re: Fasteners Workbench thread and head scaling

Postby chrisb » Sun Jan 07, 2018 11:37 am

I tried with ABS and the result was very disappointing; will continue trying.
User avatar
MostlyHarmless
Posts: 12
Joined: Wed Jan 03, 2018 8:28 pm
Location: Willow Grove, Pennsylvania, USA

Re: Fasteners Workbench thread and head scaling

Postby MostlyHarmless » Sun Jan 07, 2018 3:36 pm

Hi Shai,

thank you for the quick response.
shaise wrote:
Sun Jan 07, 2018 8:54 am
First of all, thanks for this tweak! using yous suggested 0.98 / 1.05 scaling I was able to print functional M4 fasteners on my original prusa i3 MK2, with the default print settings.
They look even better than mine. Nice!
shaise wrote:
Sun Jan 07, 2018 8:54 am
Regarding pull requests, there are two issues:
1. Backward compatibility: If I use your WB with the 2 new parameters added and try to open an old file with fasteners, I can no longer do modifications to these fasteners, as it produces an error "missing attribute"
I am not very familiar with the FreeCAD internals yet. I read somewhere that the files inside of a .fcstd archive are mostly XML. The objects in existing files of course don't have these attributes. There should be some infrastructure to add a default value for a new attribute to an object type. I'll take a look around. Maybe there is some function that (if exists) will be called after an object is loaded so it can verify the object and fill in missing attributes.
shaise wrote:
Sun Jan 07, 2018 8:54 am
2. Any changes to screw_maker.py is also a bit problematic: screw_maker.py is not mine, it was done by the talented ulrich1a. I think now he plans to add non metric fasteners, but he uses his own version and not the one in my repository. When he finishes, it will probably be hard to integrate it with the new modifications.
This one is far more serious and might be a show stopper at the moment. For the past two days I was browsing around the forum and became aware that the screw_maker.py is imported and that ulrich1a keeps maintaining his original. While maybe technically not accurate, logically that file is maintained "upstream". Making changes to it without feeding them back upstream is a fork. In my 30 years of software development, 21 of them being part of a very large open source project, I have seen too many forks fail because after a while merging becomes a nightmare. My changes are definitely far too invasive to maintain in a fork. If they can't be fed back upstream I need to come up with a different way of doing this.

Thanks for your time and input. Highly appreciated.


Jan
User avatar
MostlyHarmless
Posts: 12
Joined: Wed Jan 03, 2018 8:28 pm
Location: Willow Grove, Pennsylvania, USA

Re: Fasteners Workbench thread and head scaling

Postby MostlyHarmless » Sun Jan 07, 2018 3:41 pm

chrisb wrote:
Sun Jan 07, 2018 11:37 am
I tried with ABS and the result was very disappointing; will continue trying.
Sounds like "tinker time" :D
chrisb
Posts: 14522
Joined: Tue Mar 17, 2015 9:14 am

Re: Fasteners Workbench thread and head scaling

Postby chrisb » Sun Jan 07, 2018 4:20 pm

The material was too weak while printing.
- material: ABS, layer height: 0.06mm
- left: no fan, temparature 230° C -> too hot, due to the low layer time bending of print.
- middle: fan, temp 230° C
- right: fan, temp 210°C, diameter of print: 3.51mm, diameter of model: 3.85 from MostlyHarmless's model

So the adjusting parameter is needed in both ways. Thank you for this printing exercise, it's a fast printing example to adjust printers.
Attachments
SDC12029.JPG
SDC12029.JPG (56.18 KiB) Viewed 379 times
User avatar
shaise
Posts: 334
Joined: Thu Jun 11, 2015 8:11 am

Re: Fasteners Workbench thread and head scaling

Postby shaise » Sun Jan 07, 2018 4:57 pm

ABS is problematic when doing small parts, as it stays melted for long time and warps when next layer is placed. turning on the fan is a good idea, but also try to slow down the print.
User avatar
MostlyHarmless
Posts: 12
Joined: Wed Jan 03, 2018 8:28 pm
Location: Willow Grove, Pennsylvania, USA

Re: Fasteners Workbench thread and head scaling

Postby MostlyHarmless » Sun Jan 07, 2018 7:47 pm

Chrisb,

don't know what slicer you are using, but Cura has settings to force a minimum time per layer. It is actually a whole slew of options. It can slow down the print or it can retract filament, lift extruder and wait. Those options are by default blanked out and need to be enabled in the settings.

Jan