# By Axelerator AB All rights reserved
# Author Marcus Isaksson
from varmain .primitiv import *#line:5
from varmain .custom import *#line:6
from varmain .var_basic import *#line:7
from varmain .dummy_var import *#line:8
from aqa .math import *#line:9
import math #line:10
import sys ,os #line:11
from varmain .divsub .cbolt6_001 import *#line:13
if not os .path .dirname (os .path .abspath (__file__ ))in sys .path :#line:17
			   sys .path .append (os .path .dirname (os .path .abspath (__file__ )))#line:18
from AX_BOXF import *#line:21
from AX_NUTS import *#line:22
@activate (Group ="Olet",TooltipShort ="QA Bracket RA65",TooltipLong ="QA Bracket RA65",LengthUnit ="mm",Ports ="2")#line:25
@group ("MainDimensions")#line:26
@param (OD =LENGTH ,TooltipShort ="Nominal Diameter",TooltipLong ="Nominal Diameter")#line:27
@param (C =LENGTH ,TooltipShort ="Thread Diameter",TooltipLong ="Thread Diameter")#line:28
def AX_P1_QA_DFB_FEMALE (OOO0O0OO0O000OOOO ,OD =25 ,C =0.5 ,**O00000000OOO0OOO0 ):#line:33
	if OD ==25 and C ==0.5 :#line:41
		O000O0OO0OO00OOO0 =86.0 #line:42
		O00OO000OOOOOOO0O =37.0 #line:43
		OO000O0OO0000OO0O =52.0 #line:44
		OOO00OO0OOOO0O0O0 =20.95 #line:45
	elif OD ==40 and C ==0.5 :#line:46
		O000O0OO0OO00OOO0 =100.0 #line:47
		O00OO000OOOOOOO0O =37.0 #line:48
		OO000O0OO0000OO0O =74.0 #line:49
		OOO00OO0OOOO0O0O0 =20.95 #line:50
	elif OD ==50 and C ==0.5 :#line:51
		O000O0OO0OO00OOO0 =115.0 #line:52
		O00OO000OOOOOOO0O =37.0 #line:53
		OO000O0OO0000OO0O =86.0 #line:54
		OOO00OO0OOOO0O0O0 =20.95 #line:55
	elif OD ==50 and C ==1.0 :#line:56
		O000O0OO0OO00OOO0 =129.0 #line:57
		O00OO000OOOOOOO0O =37.0 #line:58
		OO000O0OO0000OO0O =86.0 #line:59
		OOO00OO0OOOO0O0O0 =33.25 #line:60
	elif OD ==63 and C ==0.5 :#line:61
		O000O0OO0OO00OOO0 =126.0 #line:62
		O00OO000OOOOOOO0O =37.0 #line:63
		OO000O0OO0000OO0O =100.0 #line:64
		OOO00OO0OOOO0O0O0 =20.95 #line:65
	elif OD ==63 and C ==1.0 :#line:66
		O000O0OO0OO00OOO0 =140.0 #line:67
		O00OO000OOOOOOO0O =37.0 #line:68
		OO000O0OO0000OO0O =100.0 #line:69
		OOO00OO0OOOO0O0O0 =33.25 #line:70
	O0OOO000OO0OO00O0 =OD *1.3 #line:72
	O0000O00OOOOOOOOO =O000O0OO0OO00OOO0 -O0OOO000OO0OO00O0 #line:73
	OOOOO0O00000000O0 =(O0OOO000OO0OO00O0 /2.0 +OD /20.0 +O0000O00OOOOOOOOO )#line:74
	O0O00OOO00O000O00 =CYLINDER (OOO0O0OO0O000OOOO ,R1 =OO000O0OO0000OO0O /2.0 ,R2 =O0OOO000OO0OO00O0 /2.0 ,H =O00OO000OOOOOOO0O ).rotateY (90 ).rotateX (90 ).translate ((-O00OO000OOOOOOO0O /2.0 ,OD /5.0 ,-OD /20.0 ))#line:76
	OOO0O0O0OO0O00O00 =CYLINDER (OOO0O0OO0O000OOOO ,R =(OOO00OO0OOOO0O0O0 +6.0 )/2.0 ,H =O0000O00OOOOOOOOO *0.40 ).translate ((0 ,0 ,-OOOOO0O00000000O0 +O0000O00OOOOOOOOO *0.30 ))#line:77
	O000O00O00O00OO00 =CBOLT6_001 (OOO0O0OO0O000OOOO ,D =OOO00OO0OOOO0O0O0 ,L =O0000O00OOOOOOOOO ,W =OOO00OO0OOOO0O0O0 +4.0 ,H =O0000O00OOOOOOOOO *0.20 ).rotateY (-90 ).rotateZ (90 ).translate ((0 ,0 ,O0000O00OOOOOOOOO *0.30 -OOOOO0O00000000O0 ))#line:78
	O00O0000O0O0000O0 =CBOLT6_001 (OOO0O0OO0O000OOOO ,D =OOO00OO0OOOO0O0O0 ,L =O0000O00OOOOOOOOO ,W =OOO00OO0OOOO0O0O0 +2.0 ,H =O0000O00OOOOOOOOO *0.10 ).rotateY (-90 ).translate ((0 ,0 ,O0000O00OOOOOOOOO *0.10 -OOOOO0O00000000O0 ))#line:79
	for OOOO0000OOO0OO00O in [OOO0O0O0OO0O00O00 ,O000O00O00O00OO00 ,O00O0000O0O0000O0 ]:#line:80
		O0O00OOO00O000O00 .uniteWith (OOOO0000OOO0OO00O )#line:81
		OOOO0000OOO0OO00O .erase ()#line:82
	OO0O000O00OOOO0OO =CYLINDER (OOO0O0OO0O000OOOO ,R =OOO00OO0OOOO0O0O0 /2.0 ,H =O0000O00OOOOOOOOO *0.15 ).translate ((0 ,0 ,-OOOOO0O00000000O0 ))#line:84
	O0000000OOOOOOO0O =AX_BOXF (OOO0O0OO0O000OOOO ,W =O00OO000OOOOOOO0O ,L =OO000O0OO0000OO0O ,H =3.0 ,R =0.0 ,T =0 ).translate ((0 ,OO000O0OO0000OO0O /2.0 ,-1.5 ))#line:85
	O0OOOOO0O0OO0OOO0 =CYLINDER (OOO0O0OO0O000OOOO ,R =OD /2.0 ,H =O00OO000OOOOOOO0O ).rotateY (90 ).translate ((-O00OO000OOOOOOO0O /2.0 ,0 ,0 ))#line:86
	for OOOO0000OOO0OO00O in [OO0O000O00OOOO0OO ,O0000000OOOOOOO0O ,O0OOOOO0O0OO0OOO0 ]:#line:87
		O0O00OOO00O000O00 .subtractFrom (OOOO0000OOO0OO00O )#line:88
		OOOO0000OOO0OO00O .erase ()#line:89
	OOO0O0OO0O000OOOO .setPoint ((0 ,0 ,0 ),(0 ,0 ,-1 ))#line:103
	OOO0O0OO0O000OOOO .setPoint ((0 ,0 ,-OOOOO0O00000000O0 +O0000O00OOOOOOOOO *0.15 ),(0 ,0 ,-1 ))#line:104
