forked from PrinceofOrange/FreeCAD-macros
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScrewMaker.FCMacro
2897 lines (2529 loc) · 116 KB
/
ScrewMaker.FCMacro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# -*- coding: utf-8 -*-
"""
Macro to generate screws with FreeCAD.
* Versions:
- 1.7 from April 2014
fixed bool type error. (int is not anymore accepted at linux)
fixed starting point of real thread at some screw types.
- 1.6 from 15th of March 2014
Added PySide support
- 1.5 from 23rd of December 2013
Corrected hex-heads above M12 not done.
- 1.4 from 1st of September 2013
***************************************************************************
* Copyright (c) 2013 Ulrich Brammer <ulrich1a[at]users.sourceforge.net> *
* *
* This file is a supplement to the FreeCAD CAx development system. *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License (LGPL) *
* as published by the Free Software Foundation; either version 2 of *
* the License, or (at your option) any later version. *
* for detail see the LICENCE text file. *
* *
* This software is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this macro; if not, write to the Free Software *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 *
* USA *
* *
***************************************************************************
"""
__Comment__ = 'Generate a screw'
__Web__ = 'http://freecadweb.org/wiki/index.php?title=Macro_screw_maker1_2'
__Wiki__ = 'http://freecadweb.org/wiki/index.php?title=Macro_screw_maker1_2'
__Icon__ = ''
__Help__ = 'Select the characteristics of the screw and click on the create button'
__Author__ = "Ulrich Brammer <ulrich1a@users.sourceforge.net>"
__Version__ = 1.7
__Status__ = 'alpha'
__Requires__ = ''
import FreeCAD, Part, math
from FreeCAD import Base
import DraftVecUtils
try:
#from PyQt4 import QtCore, QtGui
from PySide import QtCore, QtGui
FreeCAD.Console.PrintMessage("PySyde is used" + "\n")
except:
#from PySide import QtCore, QtGui
FreeCAD.Console.PrintMessage("PyQt4 is needed" + "\n")
from PyQt4 import QtCore, QtGui
DEBUG = True # set to True to show debug messages
# Diameters included in this library/macro
# The ISO-standards may include more diameters!
# Dictionary used for user messages
standard_diameters = {
'ISO4017': ('M1.6', 'M36'), # ISO 4017 Hex-head-screw
'ISO4014': ('M4', 'M30'), # ISO 4014 Hex-head-bolt
'EN1662': ('M5', 'M16'), # EN 1662 Hexagon bolts with flange, small series
'EN1665': ('M5', 'M20'), # EN 1665 Hexagon bolts with flange, heavy series
'ISO4762': ('M1.6', 'M36'), # ISO 4762 Hexagon socket head cap screws
'ISO2009': ('M1.6', 'M10'), # ISO 2009 Slotted countersunk flat head screws
'ISO2010': ('M1.6', 'M10'), # ISO 2010 Slotted raised countersunk head screws
'ISO1580': ('M1.6', 'M10'), # ISO 1580 Slotted pan head screws
'ISO7045': ('M1.6', 'M10'), # ISO 7045 Pan head screws type H cross recess
'ISO7046': ('M1.6', 'M10'),
'ISO7047': ('M1.6', 'M10'),
'ISO1207': ('M3', 'M10'), # ISO 1207 Slotted cheese head screws
'ISO7048': ('M2.5', 'M8'), # ISO 7048 Cross-recessed cheese head screws with type H cross recess
'ISO7380': ('M3', 'M12'), # ISO 7380 Hexagon socket button head screws
'ISO10642':('M3', 'M20'), # ISO 10642 Hexagon socket countersunk head screws
'ISO14579':('M2', 'M20'), # ISO 14579 Hexalobular socket head cap screws
'ISO14580':('M2', 'M10'), # ISO 14580 Hexalobular socket cheese head screws
'ISO14583':('M2', 'M10'), # ISO 14583 Hexalobular socket pan head screws
'ISO7089': ('M1.6', 'M36')} # Washer
# ISO 4017 Hex-head-screw
# P, c, dw, e, k, r, s
iso4017head={
'M1.6':(0.35, 0.2, 2.3, 3.4, 1.1, 0.1, 3.2),
'M2': (0.40, 0.2, 3.0, 4.4, 1.4, 0.1, 4.0),
'M2.5':(0.45, 0.2, 4.0, 5.5, 1.7, 0.1, 5.0),
'M3': (0.5, 0.2, 4.6, 6.1, 2.0, 0.1, 5.5),
'M4': (0.7, 0.2, 5.9, 7.7, 3.5, 0.2, 7.0),
'M5': (0.8, 0.2, 6.9, 8.9, 3.5, 0.2, 8.0),
'M6': (1.0, 0.2, 8.9, 11.05, 4.0, 0.25, 10.0),
'M8': (1.25, 0.3, 11.7, 14.5, 5.3, 0.25, 13.0),
'M10': (1.50, 0.3, 14.7, 17.9, 6.4, 0.4, 16.0),
'M12': (1.75, 0.3, 16.7, 20.1, 7.5, 0.6, 18.0),
'M14': (2.00, 0.3, 20.5, 24.5, 8.8, 0.6, 22.0),
'M16': (2.00, 0.4, 22.4, 26.9, 10.0, 0.6, 24.0),
'M20': (2.50, 0.4, 28.2, 33.7, 12.5, 0.8, 30.0),
'M24': (3.00, 0.4, 33.7, 40.1, 15.0, 0.8, 36.0),
'M27': (3.00, 0.4, 38.0, 45.2, 17.0, 1.0, 41.0),
'M30': (3.50, 0.4, 42.8, 50.9, 18.7, 1.0, 46.0), #dw not in class A, e not in class A
'M36': (4.00, 0.4, 51.2, 61.0, 22.5, 1.0, 55.0), #dw not in class A, e not in class A
'M42': (4.50, 0.7, 60.0, 71.3, 26.0, 1.2, 65.0),
'M48': (5.00, 0.7, 69.5, 82.6, 30.0, 1.6, 75.0),
'M56': (5.50, 0.7, 78.7, 93.6, 35.0, 2.0, 85.0),
'M64': (6.00, 0.7, 88.2,104.9, 40.0, 2.0, 95.0)
}
iso4017length = {
'2': ( 1.8, 2.2),
'3': ( 2.8, 3.2),
'4': ( 3.76, 4.24),
'5': ( 4.76, 5.24),
'6': ( 5.76, 6.24),
'8': ( 7.71, 8.29),
'10':( 9.71, 10.29),
'12':(11.65, 12.35),
'14':(13.65, 14.35),
'16':(15.65, 16.35),
'20':(19.58, 20.42),
'25':(24.58, 25.42),
'30':(29.58, 30.42),
'35':(34.5, 35.5),
'40':(39.5, 40.5),
'45':(44.5, 45.5),
'50':(49.5, 50.5),
'55':(54.4, 55.6),
'60':(59.4, 60.6),
'65':(64.4, 65.6),
'70':(69.4, 70.6),
'80':(79.4, 80.6),
'100':(99.3, 100.7),
'110':(109.3, 110.7),
'120':(119.3, 120.7),
'130':(129.2, 130.8),
'140':(139.2, 130.8),
'150':(149.2, 150.8),
'160':(159.2, 160.8),
'180':(179.2, 180.8),
'200':(199.1, 200.9)
}
# range of typical srew lengths
# min_length, max_length
iso4017range = {
'M1.6': ('2', '16'),
'M2': ('4', '20'),
'M2.5': ('5', '25'),
'M3': ('5', '30'),
'M4': ('6', '40'),
'M5': ('8', '50'),
'M6': ('12', '60'),
'M8': ('16', '80'),
'M10':('20', '100'),
'M12':('25','120'),
'M14':('25','100'), # www.agriti.com
'M16':('30','150'),
'M20':('40','160'),
'M24':('50','180'),
'M27':('50','100'),
'M30':('60','200'),
'M36':('70','200'),
'M42':('70','200'),
'M48':('100','200'),
'M56':('110','200'),
'M64':('120','200')
}
# ISO 4014 Hex-head-bolt
# P, b1, b2, b3, c, dw, e, k, r, s
iso4014head={
'M4': (0.70, 14.0, 0.0, 0.0, 0.2, 5.9, 7.7, 3.5, 0.2, 7.0),
'M5': (0.80, 16.0, 0.0, 0.0, 0.2, 6.9, 8.9, 3.5, 0.2, 8.0),
'M6': (1.00, 18.0, 24.0, 37.0, 0.2, 8.9, 11.05, 4.0, 0.25, 10.0),
'M8': (1.25, 22.0, 28.0, 41.0, 0.3, 11.7, 14.5, 5.3, 0.4, 13.0),
'M10':(1.50, 26.0, 32.0, 45.0, 0.3, 14.7, 17.9, 6.4, 0.4, 16.0),
'M12':(1.75, 30.0, 36.0, 49.0, 0.3, 16.7, 20.1, 7.5, 0.6, 18.0),
'M14':(2.00, 34.0, 40.0, 0.0, 0.3, 20.5, 24.5, 8.8, 0.6, 22.0),
'M16':(2.00, 38.0, 44.0, 57.0, 0.4, 22.4, 26.9, 10.0, 0.6, 24.0),
'M20':(2.50, 46.0, 52.0, 65.0, 0.4, 28.2, 33.7, 12.5, 0.8, 30.0),
'M24':(3.00, 54.0, 60.0, 73.0, 0.4, 33.7, 40.1, 15.0, 0.8, 36.0),
'M27':(3.00, 60.0, 66.0, 79.0, 0.4, 38.0, 45.2, 17.0, 1.0, 41.0),
'M30':(3.50, 66.0, 72.0, 85.0, 0.4, 42.8, 50.9, 18.7, 1.0, 46.0)} #dw not in class A, e not in class A
#'M36':( , 0.4, 51.2, 61.0, 22.5, 55.0)} #dw not in class A, e not in class A
iso4014length = {
'25':(24.58, 25.42),
'30':(29.58, 30.42),
'35':(34.5, 35.5),
'40':(39.5, 40.5),
'45':(44.5, 45.5),
'50':(49.5, 50.5),
'55':(54.4, 55.6),
'60':(59.4, 60.6),
'65':(64.4, 65.6),
'70':(69.4, 70.6),
'80':(79.4, 80.6),
'100':(99.3, 100.7),
'110':(109.3, 110.7),
'120':(119.3, 120.7),
'130':(129.2, 130.8),
'140':(139.2, 130.8),
'150':(149.2, 150.8),
'160':(159.2, 160.8),
'180':(179.2, 180.8),
'200':(199.1, 200.9),
'220':(219.1, 220.9)
}
# range of typical srew lengths
# min_length, max_length
iso4014range = {
'M4': ('25', '50'),
'M5': ('25', '50'),
'M6': ('30', '130'),
'M8': ('30', '180'),
'M10':('35', '150'),
'M12':('50','150'),
'M14':('50','160'),
'M16':('55','200'),
'M20':('60','300'),
'M24':('80','220'),
'M27':('90', '220'),
'M30':('90', '220')}
# EN 1662 Hexagon bolts with flange, small series
# P, b0, b1, b2, b3, c, dc, dw, e, k, kw, lf, r1, s
en1662def={
'M5': (0.80, 25.0, 16.0, 0.0, 0.0, 1.0, 11.4, 9.4, 7.59, 5.6, 2.3, 1.4, 0.2, 7.0),
'M6': (1.00, 30.0, 18.0, 0.0, 0.0, 1.1, 13.6, 11.6, 8.71, 6.9, 2.9, 1.6, 0.25, 8.0),
'M8': (1.25, 35.0, 22.0, 28.0, 0.0, 1.2, 17.0, 14.9, 10.95, 8.5, 3.8, 2.1, 0.4, 10.0),
'M10':(1.50, 40.0, 26.0, 32.0, 0.0, 1.5, 20.8, 18.7, 14.26, 9.7, 4.3, 2.1, 0.4, 13.0),
'M12':(1.75, 45.0, 30.0, 36.0, 0.0, 1.8, 24.7, 22.5, 17.62, 12.1, 5.4, 2.1, 0.6, 16.0),
'M14':(2.00, 50.0, 34.0, 40.0, 0.0, 2.1, 28.6, 26.4, 19.86, 12.9, 5.6, 2.1, 0.6, 18.0),
'M16':(2.00, 55.0, 38.0, 44.0, 57.0, 2.4, 32.8, 30.6, 23.15, 15.2, 6.8, 3.2, 0.6, 21.0)}
# range of typical srew lengths
# min_length, max_length
en1662range = {
'M5': ('10', '50'),
'M6': ('12', '60'),
'M8': ('16', '80'),
'M10':('20','100'),
'M12':('25','120'),
'M14':('30','140'),
'M16':('35','160')
}
en1662length = {
'10':( 9.71, 10.29),
'12':(11.65, 12.35),
'16':(15.65, 16.35),
'20':(19.58, 20.42),
'25':(24.58, 25.42),
'30':(29.58, 30.42),
'35':(34.5, 35.5),
'40':(39.5, 40.5),
'45':(44.5, 45.5),
'50':(49.5, 50.5),
'55':(54.4, 55.6),
'60':(59.4, 60.6),
'65':(64.4, 65.6),
'70':(69.4, 70.6),
'80':(79.4, 80.6),
'90':(89.3, 90.7),
'100':(99.3, 100.7),
'110':(109.3, 110.7),
'120':(119.3, 120.7),
'130':(129.2, 130.8),
'140':(139.2, 130.8),
'150':(149.2, 150.8),
'160':(159.2, 160.8)
}
# EN 1665 Hexagon bolts with flange, heavy series
# P, b0, b1, b2, b3, c, dc, dw, e, k, kw, lf, r1, s
en1665def={
'M5': (0.80, 25.0, 16.0, 0.0, 0.0, 1.0, 11.8, 9.8, 8.71, 5.8, 2.6, 1.4, 0.2, 8.0),
'M6': (1.00, 30.0, 18.0, 0.0, 0.0, 1.1, 14.2, 12.2, 10.95, 6.6, 3.0, 1.6, 0.25,10.0),
'M8': (1.25, 35.0, 22.0, 28.0, 0.0, 1.2, 18.0, 15.8, 14.26, 8.1, 3.9, 2.1, 0.4, 13.0),
'M10':(1.50, 40.0, 26.0, 32.0, 0.0, 1.5, 22.3, 19.6, 17.62, 10.4, 4.1, 2.1, 0.4, 16.0),
'M12':(1.75, 45.0, 30.0, 36.0, 0.0, 1.8, 26.6, 23.8, 19.86, 11.8, 5.6, 2.1, 0.6, 18.0),
'M14':(2.00, 50.0, 34.0, 40.0, 0.0, 2.1, 30.5, 27.6, 23.15, 13.7, 6.5, 2.1, 0.6, 21.0),
'M16':(2.00, 55.0, 38.0, 44.0, 57.0, 2.4, 35.0, 31.9, 26.51, 15.4, 7.3, 3.2, 0.6, 24.0),
'M20':(2.50, 65.0, 46.0, 52.0, 65.0, 3.0, 43.0, 39.9, 33.23, 18.9, 8.9, 4.2, 0.8, 30.0)}
# range of typical srew lengths
# min_length, max_length
en1665range = {
'M5': ('10', '50'),
'M6': ('12', '60'),
'M8': ('16', '80'),
'M10':('20','100'),
'M12':('25','120'),
'M14':('30','140'),
'M16':('35','160'),
'M20':('65','200')
}
en1665length = {
'10':( 9.71, 10.29),
'12':(11.65, 12.35),
'16':(15.65, 16.35),
'20':(19.58, 20.42),
'25':(24.58, 25.42),
'30':(29.58, 30.42),
'35':(34.5, 35.5),
'40':(39.5, 40.5),
'45':(44.5, 45.5),
'50':(49.5, 50.5),
'55':(54.4, 55.6),
'60':(59.4, 60.6),
'65':(64.4, 65.6),
'70':(69.4, 70.6),
'80':(79.4, 80.6),
'90':(89.3, 90.7),
'100':(99.3, 100.7),
'110':(109.3, 110.7),
'120':(119.3, 120.7),
'130':(129.2, 130.8),
'140':(139.2, 130.8),
'150':(149.2, 150.8),
'160':(159.2, 160.8),
'180':(179.2, 180.8),
'200':(199.1, 200.9)
}
# ISO 1207 definitions Class A, Slotted cheese head screws
# P, a, b, dk, dk_mean, da, k, n_min, r, t_min, x
iso1207def={
'M1.6':(0.35, 0.7, 25.0, 3.0, 2.9, 2.0, 1.1, 0.46, 0.1, 0.45, 0.9),
'M2': (0.40, 0.8, 25.0, 3.8, 3.7, 2.6, 1.4, 0.56, 0.1, 0.6, 1.0),
'M2.5':(0.45, 0.9, 25.0, 4.5, 4.4, 3.1, 1.8, 0.66, 0.1, 0.7, 1.1),
'M3': (0.50, 1.0, 25.0, 5.5, 5.4, 3.6, 2.0, 0.86, 0.1, 0.85, 1.25),
'M3.5':(0.60, 1.2, 38.0, 6.0, 5.9, 4.1, 2.4, 1.06, 0.1, 1.0, 1.5),
'M4': (0.70, 1.4, 38.0, 7.0, 6.9, 4.7, 2.6, 1.26, 0.2, 1.1, 1.75),
'M5': (0.80, 1.6, 38.0, 8.5, 8.4, 5.7, 3.3, 1.26, 0.2, 1.3, 2.0),
'M6': (1.00, 2.0, 38.0, 10.0, 9.9, 6.8, 3.9, 1.66, 0.25,1.6, 2.5),
'M8': (1.25, 2.5, 38.0, 13.0, 12.85, 9.2, 5.0, 2.06, 0.4, 2.0, 3.2),
'M10': (1.50, 3.0, 38.0, 16.0, 15.85, 11.2,6.0, 2.56, 0.4, 2.4, 3.8)}
# range of typical srew lengths
# min_length, max_length
iso1207range = {
'M1.6':('2', '16'),
'M2': ('3', '20'),
'M2.5':('3', '25'),
'M3': ('4', '30'),
'M3.5':('5', '35'),
'M4': ('5', '40'),
'M5': ('6', '50'),
'M6': ('8', '60'),
'M8': ('10', '80'),
'M10':('12', '80')}
# slotted cheese head screws
# nom length: l_min, l_max
iso1207length = {
'2': (1.8, 2.2),
'3': ( 2.8, 3.2),
'4': ( 3.76, 4.24),
'5': ( 4.76, 5.24),
'6': ( 5.76, 6.24),
'8': ( 7.71, 8.29),
'10':( 9.71, 10.29),
'12':(11.65, 12.35),
'14':(13.65, 14.35),
'16':(15.65, 16.35),
'20':(19.58, 20.42),
'25':(24.58, 25.42),
'30':(29.58, 30.42),
'35':(34.5, 35.5),
'40':(39.5, 40.5),
'45':(44.5, 45.5),
'50':(49.5, 50.5),
'55':(54.05, 55.95),
'60':(59.05, 60.95),
'65':(64.05, 65.95),
'70':(69.05, 70.95),
'75':(74.05, 75.95),
'80':(79.05, 80.95)
}
# ISO 14580 definitions , Hexalobular socket cheese head screws
# P, a, b, dk, dk_mean, da, k, n_min, r, t_min, x
# tt, k, A, t_mean
iso14580def={
'M2': ('T6', 1.55, 1.75, 0.8),
'M2.5':('T8', 1.85, 2.40, 0.9),
'M3': ('T10', 2.40, 2.80, 1.2),
'M3.5':('T15', 2.60, 3.35, 1.3),
'M4': ('T20', 3.10, 3.95, 1.5),
'M5': ('T25', 3.65, 4.50, 1.7),
'M6': ('T30', 4.40, 5.60, 2.1),
'M8': ('T45', 5.80, 7.95, 2.9),
'M10': ('T50', 6.90, 8.95, 3.3)}
# range of typical srew lengths
# min_length, max_length
# iso14580range = iso1207range
# nom length: l_min, l_max
iso14580length = {
'3': ( 2.8, 3.2),
'4': ( 3.76, 4.24),
'5': ( 4.76, 5.24),
'6': ( 5.76, 6.24),
'8': ( 7.71, 8.29),
'10':( 9.71, 10.29),
'12':(11.65, 12.35),
'14':(13.65, 14.35),
'16':(15.65, 16.35),
'20':(19.58, 20.42),
'25':(24.58, 25.42),
'30':(29.58, 30.42),
'35':(34.5, 35.5),
'40':(39.5, 40.5),
'45':(44.5, 45.5),
'50':(49.5, 50.5),
'55':(54.05, 55.95),
'60':(59.05, 60.95),
'65':(64.05, 65.95),
'70':(69.05, 70.95),
'75':(74.05, 75.95),
'80':(79.05, 80.95)
}
# ISO 7048 definitions Class A,
# Cross-recessed cheese head screws with type H or Z cross recess
# P, a, b, dk, dk_mean, da, k, r, x, cT, mH, mZ
iso7048def={
'M2.5':(0.45, 0.9, 25.0, 4.5, 4.4, 3.1, 1.8, 0.1, 1.1, '1', 2.7, 2.4),
'M3': (0.50, 1.0, 25.0, 5.5, 5.4, 3.6, 2.0, 0.1, 1.25,'2', 3.5, 3.5),
'M3.5':(0.60, 1.2, 38.0, 6.0, 5.9, 4.1, 2.4, 0.1, 1.5, '2', 3.8, 3.7),
'M4': (0.70, 1.4, 38.0, 7.0, 6.9, 4.7, 2.6, 0.2, 1.75,'2', 4.1, 4.0),
'M5': (0.80, 1.6, 38.0, 8.5, 8.4, 5.7, 3.3, 0.2, 2.0, '2', 4.8, 4.6),
'M6': (1.00, 2.0, 38.0, 10.0, 9.9, 6.8, 3.9, 0.25,2.5, '3', 6.2, 6.1),
'M8': (1.25, 2.5, 38.0, 13.0, 12.85, 9.2, 5.0, 0.4, 3.2, '3', 7.7, 7.5)
}
# range of typical srew lengths
# min_length, max_length
iso7048range = {
'M2.5':('3', '25'),
'M3': ('4', '30'),
'M3.5':('5', '35'),
'M4': ('5', '40'),
'M5': ('6', '50'),
'M6': ('8', '60'),
'M8': ('10', '80')}
# nom length: l_min, l_max
iso7048length = {
'3': ( 2.8, 3.2),
'4': ( 3.76, 4.24),
'5': ( 4.76, 5.24),
'6': ( 5.76, 6.24),
'8': ( 7.71, 8.29),
'10':( 9.71, 10.29),
'12':(11.65, 12.35),
'16':(15.65, 16.35),
'20':(19.58, 20.42),
'25':(24.58, 25.42),
'30':(29.58, 30.42),
'35':(34.5, 35.5),
'40':(39.5, 40.5),
'45':(44.5, 45.5),
'50':(49.5, 50.5),
'60':(59.05, 60.95),
'70':(69.05, 70.95),
'80':(79.05, 80.95)
}
# Button Head Screw
# nom length: l_min, l_max
iso7380length = {
#'2.5':(2.3, 2.7),
#'3': ( 2.8, 3.2),
'4': ( 3.76, 4.24),
'5': ( 4.76, 5.24),
'6': ( 5.76, 6.24),
'8': ( 7.71, 8.29),
'10':( 9.71, 10.29),
'12':(11.65, 12.35),
'14':(13.65, 14.35),
'16':(15.65, 16.35),
'20':(19.58, 20.42),
'25':(24.58, 25.42),
'30':(29.58, 30.42),
'35':(34.5, 35.5),
'40':(39.5, 40.5),
'45':(44.5, 45.5),
'50':(49.5, 50.5),
'55':(54.05, 55.95),
'60':(59.05, 60.95)
}
# ISO 7380 definitions Class A
# http://www.agrati.com/it/unificati/it/gamma/unificati/home02.htm
# P, a, da, dk, dk_mean,s_mean,t_min, r, k, e, w,
iso7380def={
'M3': (0.50, 1.0, 3.6, 5.7, 5.5, 2.03, 1.04, 0.1, 1.65, 2.3, 0.2),
'M4': (0.70, 1.4, 4.7, 7.6, 7.4, 2.54, 1.30, 0.2, 2.20, 2.87, 0.3),
'M5': (0.80, 1.6, 5.7, 9.5, 9.3, 3.05, 1.56, 0.2, 2.75, 3.44, 0.38),
'M6': (1.00, 2.0, 6.8, 10.5, 10.3, 4.05, 2.08, 0.25,3.3, 4.58, 0.74),
'M8': (1.25, 2.5, 9.2, 14.0, 13.8, 5.05, 2.60, 0.4, 4.4, 5.72, 1.05),
'M10': (1.50, 3.0, 11.2, 17.5, 17.3, 6.05, 3.12, 0.4, 5.5, 6.86, 1.45),
'M12': (1.75, 3.5, 13.7, 21.0, 20.7, 8.06, 4.16, 0.6, 6.6, 9.15, 1.63),
'M16': (1.75, 3.5, 18.2, 28.0, 27.8, 10.06,5.20, 0.6, 8.8, 9.15, 2.25)
}
# range of typical srew lengths
# min_length, max_length
iso7380range = {
'M3': ('5', '25'),
'M4': ('5', '40'),
'M5': ('6', '40'),
'M6': ('8', '60'),
'M8': ('10', '60'),
'M10':('12', '60'),
'M12':('16', '60'),
'M16':('20', '60')}
L_iso2009length =['2.5','3','4','5','6','8','10','12','14','16','20', \
'25','30','35','40','45','50','55','60','65','70','75','80']
# nom length: l_min, l_max
iso2009length = {
'2.5':(2.3, 2.7),
'3': ( 2.8, 3.2),
'4': ( 3.76, 4.24),
'5': ( 4.76, 5.24),
'6': ( 5.76, 6.24),
'8': ( 7.71, 8.29),
'10':( 9.71, 10.29),
'12':(11.65, 12.35),
'14':(13.65, 14.35),
'16':(15.65, 16.35),
'20':(19.58, 20.42),
'25':(24.58, 25.42),
'30':(29.58, 30.42),
'35':(34.5, 35.5),
'40':(39.5, 40.5),
'45':(44.5, 45.5),
'50':(49.5, 50.5),
'55':(54.05, 55.95),
'60':(59.05, 60.95),
'65':(64.05, 65.95),
'70':(69.05, 70.95),
'75':(74.05, 75.95),
'80':(79.05, 80.95)
}
# ISO 2009 definitions Class A
# P, a, b, dk_theo, dk_mean, k, n_min, r, t_mean, x
iso2009def={
'M1.6':(0.35, 0.7, 25, 3.6, 2.8, 1.0, 0.46, 0.4, 0.4, 0.9),
'M2': (0.40, 0.8, 25, 4.4, 3.6, 1.2, 0.56, 0.5, 0.5, 1.0),
'M2.5':(0.45, 0.9, 25, 5.5, 4.5, 1.5, 0.66, 0.6, 0.6, 1.1),
'M3': (0.50, 1.0, 25, 6.3, 5.3, 1.65, 0.86, 0.8, 0.7, 1.25),
'M3.5':(0.60, 1.2, 38, 8.2, 7.1, 2.35, 1.06, 0.9, 1.0, 1.5),
'M4': (0.70, 1.4, 38, 9.4, 8.2, 2.7, 1.26, 1.0, 1.1, 1.75),
'M5': (0.80, 1.6, 38,10.4, 9.2, 2.7, 1.26, 1.3, 1.2, 2.0),
'M6': (1.00, 2.0, 38,12.6, 11.2, 3.3, 1.66, 1.5, 1.4, 2.5),
'M8': (1.25, 2.5, 38,17.3, 15.6, 4.65, 2.06, 2.0, 2.0, 3.2),
'M10': (1.50, 3.0, 38,20.0, 18.1, 5.0, 2.56, 2.5, 2.3, 3.8)}
# range of typical srew lengths
# min_length, max_length
iso2009range = {
'M1.6':('2.5', '16'),
'M2': ('3', '20'),
'M2.5':('4', '25'),
'M3': ('5', '30'),
'M3.5':('6', '35'),
'M4': ('6', '40'),
'M5': ('8', '50'),
'M6': ('8', '60'),
'M8': ('10', '80'),
'M10':('12', '80')}
# ISO 7046 definitions Class A
# ISO 7046 Countersunk flat head srews (common head style)
# with type H or type Z cross recess
# Parameters P, a, b, dk_theo, dk_mean, k, r, x to be read from iso2009def
# Length = iso7045length
# cT, mH, mZ
iso7046def={
'M1.6':('0', 1.6, 1.6),
'M2': ('0', 1.9, 1.9),
'M2.5':('1', 2.9, 2.8),
'M3': ('1', 3.2, 3.0),
'M3.5':('2', 4.4, 4.1),
'M4': ('2', 4.6, 4.4),
'M5': ('2', 5.2, 4.0),
'M6': ('3', 6.8, 6.6),
'M8': ('4', 8.9, 8.8),
'M10': ('4', 10.0,9.8)}
# range of typical srew lengths
# min_length, max_length
iso7046range = {
'M1.6':('3', '16'),
'M2': ('3', '20'),
'M2.5':('3', '25'),
'M3': ('4', '30'),
'M3.5':('5', '35'),
'M4': ('5', '40'),
'M5': ('6', '50'),
'M6': ('8', '60'),
'M8': ('10', '60'),
'M10':('12', '60')}
# ISO 2010, ISO 7047 definitions Class A: Raised Countersunk head srews
# ISO 2010 slotted screws (common head style) range = iso2009range
# ISO 7047 with type H or type Z cross recess range = iso7046range
# Parameters P, a, b, dk_theo, dk_mean, k, r, x to be read from iso2009def
# Length = iso7045length
# rf, t_mean, cT, mH, mZ
Raised_countersunk_def={
'M1.6':(3.0, 0.7, '0', 1.9, 1.9),
'M2': (4.0, 0.9, '0', 2.0, 2.2),
'M2.5':(5.0, 1.1, '1', 3.0, 2.8),
'M3': (6.0, 1.3, '1', 3.4, 3.1),
'M3.5':(8.5, 1.5, '2', 4.8, 4.6),
'M4': (9.5, 1.8, '2', 5.2, 5.0),
'M5': (9.5, 2.2, '2', 5.4, 5.3),
'M6': (12.0, 2.6, '3', 7.3, 7.1),
'M8': (16.5, 3.5, '4', 9.6, 9.5),
'M10': (19.5, 4.1, '4', 10.4,10.3)}
# ISO 1580 definitions Class A, Slotted pan head screws
# P, a, b, dk_max,da, k, n_min, r, rf, t_mean, x
iso1580def={
'M1.6':(0.35, 0.7, 25, 3.2, 2.0, 1.0, 0.46, 0.1, 0.5, 0.4, 0.9),
'M2': (0.4, 0.8, 25, 4.0, 2.6, 1.3, 0.56, 0.1, 0.6, 0.5, 1.0),
'M2.5':(0.45, 0.9, 25, 5.0, 3.1, 1.5, 0.66, 0.1, 0.8, 0.6, 1.1),
'M3': (0.5, 1.0, 25, 5.6, 3.6, 1.8, 0.86, 0.1, 0.9, 0.7, 1.25),
'M3.5':(0.6, 1.2, 38, 7.0, 4.1, 2.1, 1.06, 0.1, 1.0, 0.8, 1.5),
'M4': (0.7, 1.4, 38, 8.0, 4.7, 2.4, 1.26, 0.2, 1.2, 1.0, 1.75),
'M5': (0.8, 1.6, 38, 9.5, 5.7, 3.0, 1.26, 0.2, 1.5, 1.2, 2.0),
'M6': (1.0, 2.0, 38, 12.0, 6.8, 3.6, 1.66, 0.25,1.8, 1.4, 2.5),
'M8': (1.25, 2.5, 38, 16.0, 9.2, 4.8, 2.06, 0.4, 2.4, 1.9, 3.2),
'M10': (1.50, 3.0, 38, 20.0,11.2, 6.0, 2.56, 0.4, 3.0, 2.4, 3.8)}
# ISO 7045 definitions Class A, Pan head screws with type H or type Z
# partly used also for ISO 14583 Hexalobular socket pan head screws
# cross recess; cT = size of cross recess
# P, a, b, dk_max,da, k, r, rf, x, cT, mH, mZ
iso7045def={
'M1.6':(0.35, 0.7, 25, 3.2, 2.0, 1.3, 0.1, 2.5, 0.9, '0', 1.7, 1.6),
'M2': (0.4, 0.8, 25, 4.0, 2.6, 1.6, 0.1, 3.2, 1.0, '0', 1.9, 2.1),
'M2.5':(0.45, 0.9, 25, 5.0, 3.1, 2.1, 0.1, 4.0, 1.1, '1', 2.7, 2.6),
'M3': (0.5, 1.0, 25, 5.6, 3.6, 2.4, 0.1, 5.0, 1.25,'1', 3.0, 2.8),
'M3.5':(0.6, 1.2, 38, 7.0, 4.1, 2.6, 0.1, 6.0, 1.5, '2', 3.9, 3.9),
'M4': (0.7, 1.4, 38, 8.0, 4.7, 3.1, 0.2, 6.5, 1.75,'2', 4.4, 4.3),
'M5': (0.8, 1.6, 38, 9.5, 5.7, 3.7, 0.2, 8.0, 2.0, '2', 4.9, 4.7),
'M6': (1.0, 2.0, 38, 12.0, 6.8, 4.6, 0.25,10., 2.5, '3', 6.9, 6.7),
'M8': (1.25, 2.5, 38, 16.0, 9.2, 6.0, 0.4, 13., 3.2, '4', 9.0, 8.8),
'M10': (1.50, 3.0, 38, 20.0,11.2, 7.5, 0.4, 16., 3.8, '4', 10.1,9.9)}
# nom length: l_min, l_max
iso7045length = {
'3': ( 2.8, 3.2),
'4': ( 3.76, 4.24),
'5': ( 4.76, 5.24),
'6': ( 5.76, 6.24),
'8': ( 7.71, 8.29),
'10':( 9.71, 10.29),
'12':(11.65, 12.35),
'14':(13.65, 14.35),
'16':(15.65, 16.35),
'20':(19.58, 20.42),
'25':(24.58, 25.42),
'30':(29.58, 30.42),
'35':(34.5, 35.5),
'40':(39.5, 40.5),
'45':(44.5, 45.5),
'50':(49.5, 50.5),
'55':(54.05, 55.95),
'60':(59.05, 60.95)
}
# range of typical srew lengths
# min_length, max_length
iso7045range = {
'M1.6':('3', '16'),
'M2': ('3', '20'),
'M2.5':('3', '25'),
'M3': ('4', '30'),
'M3.5':('5', '35'),
'M4': ('5', '40'),
'M5': ('6', '45'),
'M6': ('8', '60'),
'M8': ('10', '60'),
'M10':('12', '60')}
# ISO 14583 Hexalobular socket pan head screws
# hexalobular recess; tt = size of hexalobular recess
# tt, A, t_mean
iso14583def={
'M2': ('T6', 1.75, 0.7),
'M2.5':('T8', 2.40, 1.0),
'M3': ('T10', 2.80, 1.2),
'M3.5':('T15', 3.35, 1.3),
'M4': ('T20', 3.95, 1.5),
'M5': ('T25', 4.50, 1.7),
'M6': ('T30', 5.60, 2.2),
'M8': ('T45', 7.95, 3.0),
'M10': ('T50', 8.95, 3.8)}
#iso14583range = iso7046range
#iso14583length = iso7045length
# ISO 4762 Hexagon socket head cap screws ( Allan screw)
# ISO 4762 definitions
# P, b, dk_max, da, ds_min, e, lf, k, r, s_mean, t, v, dw, w
iso4762def={
'M1.6':(0.35, 15.0, 3.0, 2.0, 1.46, 1.73, 0.34, 1.6, 0.1, 1.56, 0.7, 0.16, 2.72, 0.55),
'M2': (0.40, 16.0, 3.8, 2.6, 1.86, 1.73, 0.51, 2.0, 0.1, 1.56, 1.0, 0.2, 3.48, 0.55),
'M2.5':(0.45, 17.0, 4.5, 3.1, 2.36, 2.30, 0.51, 2.5, 0.1, 2.06, 1.1, 0.25, 4.18, 0.85),
'M3': (0.50, 18.0, 5.5, 3.6, 2.86, 2.87, 0.51, 3.0, 0.1, 2.56, 1.3, 0.3, 5.07, 1.15),
'M4': (0.70, 20.0, 7.0, 4.7, 3.82, 3.44, 0.60, 4.0, 0.2, 3.06, 2.0, 0.4, 6.53, 1.40),
'M5': (0.80, 22.0, 8.5, 5.7, 4.82, 4.58, 0.60, 5.0, 0.2, 4.06, 2.5, 0.5, 8.03, 1.9),
'M6': (1.00, 24.0, 10.0, 6.8, 5.82, 5.72, 0.68, 6.0, 0.25, 5.06, 3.0, 0.6, 9.38, 2.3),
'M8': (1.25, 28.0, 13.0, 9.2, 7.78, 6.86, 1.02, 8.0, 0.4, 6.06, 4.0, 0.8, 12.33, 3.3),
'M10': (1.50, 32.0, 16.0, 11.2, 9.78, 9.15, 1.02, 10.0, 0.4, 8.07, 5.0, 1.0, 15.33, 4.0),
'M12': (1.75, 36.0, 18.0, 13.7, 11.73, 11.43, 1.45, 12.0, 0.6, 10.07, 6.0, 1.2, 17.23, 4.8),
'M14': (2.00, 40.0, 21.0, 15.7, 13.73, 13.72, 1.45, 14.0, 0.6, 12.07, 7.0, 1.4, 20.17, 5.8),
'M16': (2.00, 44.0, 24.0, 17.7, 15.73, 16.00, 1.45, 16.0, 0.6, 14.08, 8.0, 1.6, 23.17, 6.8),
'M20': (2.50, 52.0, 30.0, 22.4, 19.67, 19.44, 2.04, 20.0, 0.8, 17.10, 10.0, 2.0, 28.87, 8.6),
'M24': (3.00, 60.0, 36.0, 26.4, 23.67, 21.73, 2.04, 24.0, 0.8, 19.15, 12.0, 2.0, 34.81, 10.4),
'M30': (3.50, 72.0, 45.0, 33.4, 29.67, 25.15, 2.89, 30.0, 1.0, 22.15, 15.5, 2.4, 43,61, 13.1),
'M36': (4.00, 84.0, 54.0, 39.4, 35.61, 30.85, 2.89, 36.0, 1.0, 27.15, 19.0, 3.0, 52.54, 15.3)}
# nom length: l_min, l_max
iso4762length = {
'2.5':(2.3, 2.7),
'3': ( 2.8, 3.2),
'4': ( 3.76, 4.24),
'5': ( 4.76, 5.24),
'6': ( 5.76, 6.24),
'8': ( 7.71, 8.29),
'10':( 9.71, 10.29),
'12':(11.65, 12.35),
'14':(13.65, 14.35),
'16':(15.65, 16.35),
'20':(19.58, 20.42),
'25':(24.58, 25.42),
'30':(29.58, 30.42),
'35':(34.5, 35.5),
'40':(39.5, 40.5),
'45':(44.5, 45.5),
'50':(49.5, 50.5),
'55':(54.4, 55.6),
'60':(59.4, 60.6),
'65':(64.4, 65.6),
'70':(69.4, 70.6),
'75':(74.4, 75.6),
'80':(79.4, 80.6),
'100':(99.3, 100.7),
'110':(109.3, 110.7),
'120':(119.3, 120.7),
'130':(129.2, 130.8),
'140':(139.2, 130.8),
'150':(149.2, 150.8),
'160':(159.2, 160.8),
'180':(179.2, 180.8),
'200':(199.1, 200.9)
}
# range of typical srew lengths
# min_length, max_length
iso4762range = {
'M1.6':('2.5', '16'),
'M2': ('3', '20'),
'M2.5':('4', '25'),
'M3': ('5', '30'),
'M3.5':('6', '35'),
'M4': ('6', '40'),
'M5': ('8', '50'),
'M6': ('8', '60'),
'M8': ('10', '80'),
'M10':('16', '100'),
'M12':('20', '120'),
'M14':('25', '140'),
'M16':('25', '160'),
'M20':('16', '100'),
'M24':('40', '200'),
'M30':('45', '200'),
'M36':('55', '200')
}
# ISO 14579 Hexalobular socket head cap screws
# hexalobular recess; tt = size of hexalobular recess
# tt, A, t_mean
iso14579def={
'M2': ( 'T6', 1.75, 0.8),
'M2.5':( 'T8', 2.40, 1.0),
'M3': ('T10', 2.80, 1.2),
'M4': ('T20', 3.95, 1.7),
'M5': ('T25', 4.50, 1.9),
'M6': ('T30', 5.60, 2.3),
'M8': ('T45', 7.95, 3.2),
'M10': ('T50', 8.95, 3.8),
'M12': ('T55', 11.35, 5.0),
'M14': ('T60', 13.45, 5.8),
'M16': ('T70', 15.70, 6.8),
#'M18': ('T80', 17.75, 7.8),
'M20': ('T90', 20.20, 9.0),
}
# range of typical srew lengths
# min_length, max_length
iso14579range = {
'M2': ('3', '20'),
'M2.5':('4', '25'),
'M3': ('5', '30'),
'M4': ('6', '40'),
'M5': ('8', '50'),
'M6': ('10', '60'),
'M8': ('12', '80'),
'M10':('16','100'),
'M12':('20','120'),
'M14':('25','140'),
'M16':('25','160'),
#'M18':('30','180'),
'M20':('30','200'),
}
iso14579length = {
'3': ( 2.8, 3.2),
'4': ( 3.76, 4.24),
'5': ( 4.76, 5.24),
'6': ( 5.76, 6.24),
'8': ( 7.71, 8.29),
'10':( 9.71, 10.29),
'12':(11.65, 12.35),
'16':(15.65, 16.35),
'20':(19.58, 20.42),
'25':(24.58, 25.42),
'30':(29.58, 30.42),
'35':(34.5, 35.5),
'40':(39.5, 40.5),
'45':(44.5, 45.5),
'50':(49.5, 50.5),
'55':(54.4, 55.6),
'60':(59.4, 60.6),
'65':(64.4, 65.6),
'70':(69.4, 70.6),
'80':(79.4, 80.6),
'90':(89.3, 90.7),
'100':(99.3, 100.7),
'110':(109.3, 110.7),
'120':(119.3, 120.7),
'130':(129.2, 130.8),
'140':(139.2, 130.8),
'150':(149.2, 150.8),
'160':(159.2, 160.8),
'180':(179.2, 180.8),
'200':(199.1, 200.9)
}
# ISO 10642 Hexagon socket countersunk head screws ( Allan screw)
# ISO 10642 definitions
# P, b, dk_theo, dk_mean,da, ds_min, e, k, r, s_mean, t, w
iso10642def={
'M3': (0.50, 18.0, 6.72, 6.0, 3.3, 2.86, 2.31, 1.86, 0.1, 2.06, 1.1, 0.25),
'M4': (0.70, 20.0, 8.96, 8.0, 4.4, 3.82, 2.88, 2.48, 0.2, 2.56, 1.5, 0.45),
'M5': (0.80, 22.0, 11.20, 10.0, 5.5, 4.82, 3.45, 3.10, 0.2, 3.06, 1.9, 0.66),
'M6': (1.00, 24.0, 13.44, 12.0, 6.6, 5.82, 4.59, 3.72, 0.25, 4.06, 2.2, 0.70),
'M8': (1.25, 28.0, 17.92, 16.0, 8.54, 7.78, 5.73, 4.96, 0.4, 5.06, 3.0, 1.16),
'M10': (1.50, 32.0, 22.40, 20.5, 10.62, 9.78, 6.87, 6.20, 0.4, 6.06, 3.6, 1.62),
'M12': (1.75, 36.0, 26.88, 25.0, 13.5, 11.73, 9.15, 7.44, 0.6, 8.07, 4.3, 1.80),
'M14': (2.00, 40.0, 30.80, 28.4, 15.5, 13.73, 11.43, 8.40, 0.6, 10.07, 4.5, 1.62),
'M16': (2.00, 44.0, 33.60, 31.0, 17.5, 15.73, 11.43, 8.80, 0.6, 10.07, 4.8, 2.20),
'M20': (2.50, 52.0, 40.32, 38.0, 22.0, 19.67, 13.72, 10.16, 0.8, 12.10, 5.6, 2.20)}
# range of typical srew lengths
# min_length, max_length
iso10642range = {
'M3': ('8', '30'),
'M4': ('8', '40'),
'M5': ('8', '50'),
'M6': ('8', '60'),
'M8': ('10', '80'),
'M10':('12','100'),
'M12':('20','100'),
'M14':('25','100'),
'M16':('30','100'),
'M20':('35','100'),
}
iso10642length = {
'8': ( 7.71, 8.29),
'10':( 9.71, 10.29),
'12':(11.65, 12.35),
'16':(15.65, 16.35),
'20':(19.58, 20.42),
'25':(24.58, 25.42),
'30':(29.58, 30.42),
'35':(34.5, 35.5),
'40':(39.5, 40.5),
'45':(44.5, 45.5),
'50':(49.5, 50.5),
'55':(54.4, 55.6),
'60':(59.4, 60.6),
'65':(64.4, 65.6),
'70':(69.4, 70.6),
'80':(79.4, 80.6),
'90':(89.3, 90.7),
'100':(99.3, 100.7),
}
# ISO 7089 definitions Washer
# d1_min, d2_max, h, h_max
iso7089def={
'M1.6':( 1.7, 4.0, 0.3, 0.35),
'M2': ( 2.2, 5.0, 0.3, 0.35),
'M2.5':( 2.7, 6.0, 0.5, 0.55),
'M3': ( 3.2, 7.0, 0.5, 0.55),
'M4': ( 4.3, 9.0, 0.8, 0.90),
'M5': ( 5.3, 10.0, 1.0, 1.10),
'M6': ( 6.4, 12.0, 1.6, 1.80),
'M8': ( 8.4, 16.0, 1.6, 1.80),
'M10': (10.5, 20.0, 2.0, 2.20),
'M12': (13.0, 24.0, 2.5, 2.70),
'M16': (17.0, 30.0, 3.0, 3.30),
'M20': (21.0, 37.0, 3.0, 3.30),
'M24': (25.0, 44.0, 4.0, 4.30),
'M30': (31.0, 56.0, 4.0, 4.30),
'M36': (37.0, 66.0, 5.0, 5.60),
'M42': (45.0, 78.0, 8.0, 9.0),
'M48': (52.0, 92.0, 8.0, 9.0),
'M56': (62.0,105.0,10.0, 11.0),
'M64': (70.0,115.0,10.0, 11.0)
}
# ISO 4757:1983 Definition of cross recess type H
# b, e_min, g, f_mean, r, t1, alpha, beta
iso4757def = {
'0': (0.61, 0.26, 0.81, 0.34, 0.3, 0.22, 138.0, 7.0 ),
'1': (0.97, 0.41, 1.27, 0.54, 0.5, 0.34, 138.0, 7.0 ),
'2': (1.47, 0.79, 2.29, 0.70, 0.6, 0.61, 140.0, 5.75),
'3': (2.41, 1.98, 3.81, 0.83, 0.8, 1.01, 146.0, 5.75),
'4': (3.48, 2.39, 5.08, 1.23, 1.0, 1.35, 153.0, 7.0 )
}
# ISO 10664 Hexalobular internal driving feature for bolts and screws
# A, B, Re
iso10664def = {
'T6': ( 1.75, 1.205, 0.14),
'T8': ( 2.40, 1.67, 0.20),
'T10':( 2.80, 1.98, 0.24),
'T15':( 3.35, 2.35, 0.28),
'T20':( 3.95, 2.75, 0.32),
'T25':( 4.50, 3.16, 0.39),
'T30':( 5.60, 3.95, 0.46),
'T40':( 6.75, 4.76, 0.56),
'T45':( 7.93, 5.55, 0.59),
'T50':( 8.95, 6.36, 0.78),