I want to implement JCIS (Japanese Camera Industry Standard) screws. The standards are found here: here (bottom of the page under CIPA AD-001 to -003). The threads are metric (although it uses 1.4, 1.7, 2.0, 2.3 and 2.6 nominal diameters).
I followed the contributing guidelines as far as I could, meaning writing the tables and entries into the various .py files. The one thing I'm not able to do is actually writing the code. I have zero experience programming a shape for FreeCAD. And because the code in screw_maker.py is not well enough documented so that I could understand what's going on, I'm having issues starting.
I'll attach what I've done so far. I'll include the specsheets and two FC models made according to them.
Regarding my thought process with the non-Phillips-head driver: A "punch" is easy to model by the specsheet, as I've done. I thought of boolean-cutting the recess out of the screws using the "T"-depth from the specsheet. This seems to me to be the easiest way to achieve the recess. The screws themselves seem similar, but not equal to, the ISO7045 to -48 standards.
Again, modeling would not be a prob
lem; understanding and reconstructing the code is. Any help so that I could do it would be appreciated. FastenersWB-JCIS.zip
This happens when using metric threaded fasteners (not sure about ASME screws).
This happens when you select "Match screws by outer thread diameter (pass holes)"
If the diameter of the hole is exactly the same as the outer diameter of the thread of a fastener, Fasteners will automatically select that fastener size (e.g. using a M10 bolt on a ⌀10mm hole), even if in real life, due to tolerances, it's usually recommended to use a smaller bolt in this case. This does only happen when the holes were not done with the Hole tool, since the diameters for pass holes in the hole tool include the required clearance. However, if working with models imported to FreeCAD, where the designer didn't follow DIN/ISO norms, it is possible to end up with such situations
Kunda1 wrote: ↑Wed Mar 30, 2022 12:38 pm
@ToniTen please edit your post to include full About info which will also let us know the Fasteners version you're using
Sorry, fixed that already. I thought that since I had already posted that earlier, that would be sufficient, but I was wrong, since both FreeCAD Fasteners have been updated since.
I am also attaching a file that shows the issue. If you want to reproduce it follow these steps:
Remove or hide the screw
Switch to Fasteners
Make sure select "Match screws by outer thread diameter (pass holes)"
Select the edge of the hole or the face where the hole is
ToniTen wrote: ↑Wed Mar 30, 2022 9:51 am
If the diameter of the hole is exactly the same as the outer diameter of the thread of a fastener, Fasteners will automatically select that fastener size (e.g. using a M10 bolt on a ⌀10mm hole), even if in real life, due to tolerances, it's usually recommended to use a smaller bolt in this case.
ISO Standard states a maximum of D-major (thread max width) to be slightly less than the M value, and the minimum considerably less.
In practicality most vendors tend to use diameters closer to minimum (probably to allow more tolerance) I have tested many M3 - M6 samples I have and found them to be 0.1 - 0.15 m less than the M value. I never had an issue inserting an Mx screw into an x hole.
shaise wrote: ↑Wed Mar 30, 2022 1:47 pm
ISO Standard states a maximum of D-major (thread max width) to be slightly less than the M value, and the minimum considerably less.
In practicality most vendors tend to use diameters closer to minimum (probably to allow more tolerance) I have tested many M3 - M6 samples I have and found them to be 0.1 - 0.15 m less than the M value. I never had an issue inserting an Mx screw into an x hole.
shai
There are multiple reasons why the screw should be smaller than the hole:
Tolerances: if the hole is ⌀10±0.1, and your M10 screw is just slightly under 10mm, then it might not fit
Many parts are modelled and drawn as they need to be machined, but then get painted/coated with a corrosion resistant layer
It's not just that the screw needs to be able to go through the through hole, it's that it sometimes needs to go into a tapped hole in another part, and then you also need to take into account the tolerances in position for both the through hole and the tapped hole: imagine you have 4 holes that need a screw, to join two parts (say a motor and a flange). Holes are in a square pattern, with a side of 200mm±0.1 for both through holes and tapped holes. Holes are 10mm±0.1, and painted, with a coat of paint whose thickness can reach 0.1mm. In the worst case scenario, you might end up with 9.8mm through holes that are 199.9m apart (centre to centre) while tapped holes are 200.1mm apart (centre to centre again). That won't work. The screw will scrape the paint and compromise the corrosion resistance. The holes on the parts won't line up, and there will be no play in the holes to compensate. This is obviously a worst case scenario, and I'm pulling numbers out of thin air, but these things happen. Sure, you could have tighter tolerances, but that makes the machining process a lot more costly (if outsourced) or finicky (if done in house).
14:18:24 At /home/hubertz/.local/share/FreeCAD/Mod/fasteners/./FSChangeParams.py Line 361
14:18:24 At /home/hubertz/.local/share/FreeCAD/Mod/fasteners/./ScrewMaker.py Line 207
14:18:24 At /home/hubertz/.local/share/FreeCAD/Mod/fasteners/./FastenerBase.py Line 208
14:18:24 'float' object has no attribute 'strip': Attribute not found.
how to reproduce: create a new document, insert a screw, edit the screw's parameters, and change only the length (to 20mm for ex). The code at line 208 is:
Here I've made a proposal to add thread functionality from my ThreadMaker tool into Fasteners Workbench, if that can be done without too much disruption. ThreadMaker does what the Fastener Threaded Rod object does, generating only thread bodies (no nuts, no bolt heads). It's features are described in the linked post.
Shaise, feel free to reply either here or there, wherever you prefer to discuss. Thanks!
P.S.- I discovered where Fasteners code is on my hard drive, then discovered the CONTRIBUTING.md file. I'm reading it now... Awesome! This workbench just became my Python/FreeCAD API training project.
May whatever Higher Power you believe in bless the Ukrainians. They are a decent people who never hurt anybody.