# 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 ="Direct Feed Bracket",TooltipLong ="Quick Assembly Direct Feed Bracket",LengthUnit ="mm",Ports ="2")#line:25
@group ("MainDimensions")#line:26
@param (OD1 =LENGTH ,TooltipShort ="Nominal Diameter",TooltipLong ="Nominal Diameter")#line:27
@param (OD2 =LENGTH ,TooltipShort ="Nominal Diameter",TooltipLong ="Nominal Diameter")#line:28
def AX_P1_SIMPLE_BRACKET_76 (OO00OO0OOO0O0OO0O ,OD1 =25 ,OD2 =16.5 ,**O0O0O0OOOOOOO0O0O ):#line:33
	OO0O0O0O00OO00O0O =20.95 #line:36
	OO0OOOOOO0O000O00 =33.25 #line:37
	OOO000OO00000000O =47.80 #line:38
	OO000OOO0OO00OOO0 =59.61 #line:39
	OOOOO0O0O0OOO0O0O =75.18 #line:40
	OOOO0O00O0O0O00O0 =87.88 #line:41
	if OD1 ==25 and OD2 ==16.5 :#line:43
		OO0O0OOOO000O000O =94.0 #line:44
		OOOO0O00O00OOOO0O =34.0 #line:45
		OOO0000OOO0OO00OO =37.0 #line:46
		O0O0O0OOO00000O0O =52.0 #line:47
		O000OO0OOO00000O0 =47.5 #line:48
		OO00OO000OO00OOOO =26.5 #line:49
	elif OD1 ==40 and OD2 ==25 :#line:50
		OO0O0OOOO000O000O =117.0 #line:51
		OOOO0O00O00OOOO0O =45.0 #line:52
		OOO0000OOO0OO00OO =37.0 #line:53
		O0O0O0OOO00000O0O =74.0 #line:54
		O000OO0OOO00000O0 =63.0 #line:55
		OO00OO000OO00OOOO =26.5 #line:56
	elif OD1 ==50 and OD2 ==25 :#line:57
		OO0O0OOOO000O000O =125.0 #line:58
		OOOO0O00O00OOOO0O =45.0 #line:59
		OOO0000OOO0OO00OO =37.0 #line:60
		O0O0O0OOO00000O0O =86.0 #line:61
		O000OO0OOO00000O0 =66.0 #line:62
		OO00OO000OO00OOOO =27.0 #line:63
	elif OD1 ==63 and OD2 ==25 :#line:64
		OO0O0OOOO000O000O =137.0 #line:65
		OOOO0O00O00OOOO0O =45.0 #line:66
		OOO0000OOO0OO00OO =37.0 #line:67
		O0O0O0OOO00000O0O =100.0 #line:68
		O000OO0OOO00000O0 =72.0 #line:69
		OO00OO000OO00OOOO =27.0 #line:70
	elif OD1 ==76 and OD2 ==30 :#line:73
		O0O0O0OO000OOOOOO =OO0OOOOOO0O000O00 #line:74
		O00OO0000OOO0000O =80 #line:75
		OOO0000OOO0OO00OO =137 #line:76
		OO0O0OOOO000O000O =128.0 #line:77
		O0O0O0000OO0OOO00 =22.0 #line:78
		OOO00OO000OOOOO00 =87.0 #line:79
	elif OD1 ==76 and OD2 ==51 :#line:80
		O0O0O0OO000OOOOOO =OO000OOO0OO00OOO0 #line:81
		O00OO0000OOO0000O =102 #line:82
		OOO0000OOO0OO00OO =143 #line:83
		OO0O0OOOO000O000O =128.0 #line:84
		O0O0O0000OO0OOO00 =22.0 #line:85
		OOO00OO000OOOOO00 =87.0 #line:86
	elif OD1 ==100 and OD2 ==30 :#line:87
		O0O0O0OO000OOOOOO =OO0OOOOOO0O000O00 #line:88
		O00OO0000OOO0000O =90 #line:89
		OOO0000OOO0OO00OO =158 #line:90
		OO0O0OOOO000O000O =157.0 #line:91
		O0O0O0000OO0OOO00 =27.0 #line:92
		OOO00OO000OOOOO00 =87.0 #line:93
	elif OD1 ==100 and OD2 ==51 :#line:94
		O0O0O0OO000OOOOOO =OO000OOO0OO00OOO0 #line:95
		O00OO0000OOO0000O =90 #line:96
		OOO0000OOO0OO00OO =158 #line:97
		OO0O0OOOO000O000O =157.0 #line:98
		O0O0O0000OO0OOO00 =27.0 #line:99
		OOO00OO000OOOOO00 =87.0 #line:100
	if OD1 ==168 and OD2 ==51 :#line:102
		O0O0O0OO000OOOOOO =OOO000OO00000000O #line:103
		O00OO0000OOO0000O =90 #line:104
		OOO0000OOO0OO00OO =235 #line:105
		OO0O0OOOO000O000O =231 #line:106
		O000OO0OOO00000O0 =130 #line:107
	elif OD1 ==168 and OD2 ==64 :#line:108
		O0O0O0OO000OOOOOO =OO000OOO0OO00OOO0 #line:109
		O00OO0000OOO0000O =103 #line:110
		OOO0000OOO0OO00OO =235 #line:111
		OO0O0OOOO000O000O =231 #line:112
		O000OO0OOO00000O0 =130 #line:113
	elif OD1 ==168 and OD2 ==70 :#line:114
		O0O0O0OO000OOOOOO =OOOOO0O0O0OOO0O0O #line:115
		O00OO0000OOO0000O =112 #line:116
		OOO0000OOO0OO00OO =235 #line:117
		OO0O0OOOO000O000O =231 #line:118
		O000OO0OOO00000O0 =130 #line:119
	elif OD1 ==168 and OD2 ==90 :#line:120
		O0O0O0OO000OOOOOO =OOOO0O00O0O0O00O0 #line:121
		O00OO0000OOO0000O =132 #line:122
		OOO0000OOO0OO00OO =240 #line:123
		OO0O0OOOO000O000O =231 #line:124
		O000OO0OOO00000O0 =130 #line:125
	if 25 <=OD1 <=63 :#line:129
		O000O0O0000OOO000 =(OD2 /2.0 )+2.0 #line:131
		O00O00OO0O0O00OOO =OO0O0OOOO000O000O *0.40 #line:132
		O0OOO00O0O0OO000O =(OD2 /2.0 )*1.1 #line:133
		OOO00O0O0O00O0O0O =CONE (OO00OO0OOO0O0OO0O ,R1 =O000O0O0000OOO000 ,R2 =OOOO0O00O00OOOO0O /2.0 ,H =O00O00OO0O0O00OOO *0.30 ).rotateY (-90 ).translate (((O000OO0OOO00000O0 +OO00OO000OO00OOOO ),0 ,0 ))#line:137
		O00O0OOO000O00O00 =CYLINDER (OO00OO0OOO0O0OO0O ,R =OOOO0O00O00OOOO0O /2.0 ,H =O00O00OO0O0O00OOO *0.60 ).rotateY (-90 ).translate (((O000OO0OOO00000O0 +OO00OO000OO00OOOO )-O00O00OO0O0O00OOO *0.30 ,0 ,0 ))#line:138
		OOOO0000O00OO00OO =CONE (OO00OO0OOO0O0OO0O ,R1 =OOOO0O00O00OOOO0O /2.0 ,R2 =O0OOO00O0O0OO000O ,H =O00O00OO0O0O00OOO *0.10 ).rotateY (-90 ).translate (((O000OO0OOO00000O0 +OO00OO000OO00OOOO )-O00O00OO0O0O00OOO *0.90 ,0 ,0 ))#line:139
		for OO0O0OO0OOO000O00 in [O00O0OOO000O00O00 ,OOOO0000O00OO00OO ]:#line:140
			OOO00O0O0O00O0O0O .uniteWith (OO0O0OO0OOO000O00 )#line:141
			OO0O0OO0OOO000O00 .erase ()#line:142
		OOO00O0O0O00O0O0O .rotateY (90 )#line:143
		OO000O00OO0OO0O00 =CYLINDER (OO00OO0OOO0O0OO0O ,R1 =OO0O0OOOO000O000O -O000OO0OOO00000O0 -OO00OO000OO00OOOO ,R2 =O0O0O0OOO00000O0O /2.0 ,H =OOO0000OOO0OO00OO ).rotateY (90 ).translate ((-OOO0000OOO0OO00OO /2.0 ,0 ,0 ))#line:145
		O00O00OOOO00O0OOO =CYLINDER (OO00OO0OOO0O0OO0O ,R =O0OOO00O0O0OO000O ,H =O000OO0OOO00000O0 ).rotateY (180 )#line:146
		for OO0O0OO0OOO000O00 in [OO000O00OO0OO0O00 ,O00O00OOOO00O0OOO ]:#line:148
			OOO00O0O0O00O0O0O .uniteWith (OO0O0OO0OOO000O00 )#line:149
			OO0O0OO0OOO000O00 .erase ()#line:150
		OO0OO0O0O0OOOO00O =CYLINDER (OO00OO0OOO0O0OO0O ,R =OD1 /2.0 ,H =OOO0000OOO0OO00OO ).rotateY (90 ).translate ((-OOO0000OOO0OO00OO /2.0 ,0 ,0 ))#line:165
		OOO00O0O0O00O0O0O .subtractFrom (OO0OO0O0O0OOOO00O )#line:166
		OO0OO0O0O0OOOO00O .erase ()#line:167
		OO000OO00OO0OOO00 =CYLINDER (OO00OO0OOO0O0OO0O ,R =OD2 /2.0 ,H =OO00OO000OO00OOOO ).translate ((0 ,0 ,-O000OO0OOO00000O0 -OO00OO000OO00OOOO ))#line:168
		OOO00O0O0O00O0O0O .subtractFrom (OO000OO00OO0OOO00 )#line:169
		OO000OO00OO0OOO00 .erase ()#line:170
		OO0O00OOOO0OO00OO =((O0O0O0OOO00000O0O /2.0 )-(OD1 /2.0 ))/2.0 #line:172
		OO0O0O0OO00O00OO0 =AX_BOXF (OO00OO0OOO0O0OO0O ,W =OOO0000OOO0OO00OO ,L =OO0O00OOOO0OO00OO ,H =OO0O0OOOO000O000O -O000OO0OOO00000O0 -OO00OO000OO00OOOO ,R =0.0 ,T =0 ).translate ((0 ,OO0O00OOOO0OO00OO /2.0 +OD1 /2.0 +OO0O00OOOO0OO00OO *0.60 ,(OD1 /2.0 )*0.60 ))#line:173
		OOO00O0O0O00O0O0O .subtractFrom (OO0O0O0OO00O00OO0 )#line:174
		OO0O0O0OO00O00OO0 .erase ()#line:175
		OO00OO0OOO0O0OO0O .setPoint ((0 ,0 ,0 ),(0 ,0 ,-1 ))#line:177
		OO00OO0OOO0O0OO0O .setPoint ((0 ,0 ,-O000OO0OOO00000O0 ),(0 ,0 ,-1 ))#line:178
	elif 76 <=OD1 <=100 :#line:180
		OO00O00OOOOOOO00O =(OD1 /2.0 )*1.2 #line:182
		O00OO000OOOO00OO0 =O00OO0000OOO0000O *0.60 #line:183
		OOOO0O00OOO0OOO00 =OO00O00OOOOOOO00O -(OD1 /2.0 )#line:184
		OO0OOO0OO00OO0OOO =(OD1 /2.0 )+(OOOO0O00OOO0OOO00 /2.0 )#line:185
		OO000O00OO0OO0O00 =CYLINDER (OO00OO0OOO0O0OO0O ,R =OO00O00OOOOOOO00O ,H =O00OO000OOOO00OO0 ).rotateY (90 ).translate ((-O00OO000OOOO00OO0 /2.0 ,0 ,0 ))#line:187
		OOOO0O00O000OO00O =AX_BOXF (OO00OO0OOO0O0OO0O ,W =OO00O00OOOOOOO00O *2.0 ,L =OO00O00OOOOOOO00O *2.0 ,H =OO00O00OOOOOOO00O ,R =0.0 ,T =0 ).rotateY (180 )#line:188
		OO000O00OO0OO0O00 .subtractFrom (OOOO0O00O000OO00O )#line:189
		OOOO0O00O000OO00O .erase ()#line:190
		OO0O0OOO0OO0OO0O0 =AX_BOXF (OO00OO0OOO0O0OO0O ,W =O00OO000OOOO00OO0 ,L =OOOO0O00OOO0OOO00 ,H =OO00O00OOOOOOO00O *0.60 ,R =0.0 ,T =0 ).rotateY (180 ).translate ((0 ,OO0OOO0OO00OO0OOO ,0 ))#line:192
		O0O000O0OO00O0OOO =AX_BOXF (OO00OO0OOO0O0OO0O ,W =O00OO000OOOO00OO0 ,L =OOOO0O00OOO0OOO00 ,H =OO00O00OOOOOOO00O *0.60 ,R =0.0 ,T =0 ).rotateY (180 ).translate ((0 ,-OO0OOO0OO00OO0OOO ,0 ))#line:193
		O000O0O000OOOOOOO =AX_BOXF (OO00OO0OOO0O0OO0O ,W =O00OO0000OOO0000O ,L =OD1 ,H =OOO00OO000OOOOO00 /2.0 ,R =O00OO0000OOO0000O /8 ,T =4 ).translate ((0 ,0 ,OO00O00OOOOOOO00O -OO0O0OOOO000O000O +O0O0O0000OO0OOO00 ))#line:195
		OOO000O00OOO0O000 =AX_BOXF (OO00OO0OOO0O0OO0O ,W =O00OO0000OOO0000O *0.25 ,L =OOO0000OOO0OO00OO *0.90 ,H =OOO00OO000OOOOO00 *0.15 ,R =(O00OO0000OOO0000O *0.25 )/2.1 ,T =4 ).translate ((0 ,0 ,OO00O00OOOOOOO00O -OO0O0OOOO000O000O +O0O0O0000OO0OOO00 +(OOO00OO000OOOOO00 /2.0 )))#line:198
		O000O000OOO0O0OOO =AX_BOXF (OO00OO0OOO0O0OO0O ,W =O00OO0000OOO0000O *0.40 ,L =OOO0000OOO0OO00OO ,H =OOO00OO000OOOOO00 *0.15 ,R =(O00OO0000OOO0000O *0.40 )/2.1 ,T =4 ).translate ((0 ,0 ,OO00O00OOOOOOO00O -OO0O0OOOO000O000O +O0O0O0000OO0OOO00 ))#line:199
		OO00OOOOO00OOO000 =CONE (OO00OO0OOO0O0OO0O ,R1 =(O00OO0000OOO0000O *0.80 )/2.0 ,R2 =(O00OO0000OOO0000O *0.75 )/2.0 ,H =O0O0O0000OO0OOO00 ).rotateY (180 ).translate ((0 ,0 ,OO00O00OOOOOOO00O -OO0O0OOOO000O000O +O0O0O0000OO0OOO00 ))#line:200
		OO00O00O00OO0O0OO =CBOLT6_001 (OO00OO0OOO0O0OO0O ,D =OOOO0O00OOO0OOO00 ,L =OOO00OO000OOOOO00 -6.0 ,W =0.0 ,H =6.0 ).rotateY (-90 ).translate ((0 ,OO0OOO0OO00OO0OOO +OOOO0O00OOO0OOO00 ,OO00O00OOOOOOO00O -OO0O0OOOO000O000O +O0O0O0000OO0OOO00 ))#line:202
		OO00O0000O00OOO00 =CBOLT6_001 (OO00OO0OOO0O0OO0O ,D =OOOO0O00OOO0OOO00 ,L =OOO00OO000OOOOO00 -6.0 ,W =0.0 ,H =6.0 ).rotateY (-90 ).translate ((0 ,-OO0OOO0OO00OO0OOO -OOOO0O00OOO0OOO00 ,OO00O00OOOOOOO00O -OO0O0OOOO000O000O +O0O0O0000OO0OOO00 ))#line:203
		for OO0O0OO0OOO000O00 in [OO0O0OOO0OO0OO0O0 ,O0O000O0OO00O0OOO ,O000O0O000OOOOOOO ,OOO000O00OOO0O000 ,O000O000OOO0O0OOO ,OO00OOOOO00OOO000 ,OO00O00O00OO0O0OO ,OO00O0000O00OOO00 ]:#line:205
		    OO000O00OO0OO0O00 .uniteWith (OO0O0OO0OOO000O00 )#line:206
		    OO0O0OO0OOO000O00 .erase ()#line:207
		O0O0OOO0O0OOO00O0 =CONE (OO00OO0OOO0O0OO0O ,R1 =O0O0O0OO000OOOOOO /2.0 ,R2 =OD2 /2.0 ,H =O0O0O0000OO0OOO00 +OOO00OO000OOOOO00 /2.0 ).translate ((0 ,0 ,OO00O00OOOOOOO00O -OO0O0OOOO000O000O ))#line:211
		OO000O00OO0OO0O00 .subtractFrom (O0O0OOO0O0OOO00O0 )#line:212
		O0O0OOO0O0OOO00O0 .erase ()#line:213
		OO0OO0O0O0OOOO00O =CYLINDER (OO00OO0OOO0O0OO0O ,R =OD1 /2.0 ,H =O00OO0000OOO0000O ).rotateY (90 ).translate ((-O00OO0000OOO0000O /2.0 ,0 ,0 ))#line:214
		OO000O00OO0OO0O00 .subtractFrom (OO0OO0O0O0OOOO00O )#line:215
		OO0OO0O0O0OOOO00O .erase ()#line:216
		OO00OO0OOO0O0OO0O .setPoint ((0 ,0 ,0 ),(0 ,0 ,-1 ))#line:218
		OO00OO0OOO0O0OO0O .setPoint ((0 ,0 ,OO00O00OOOOOOO00O -OO0O0OOOO000O000O -(O0O0O0000OO0OOO00 /2.0 )),(0 ,0 ,-1 ))#line:219
	elif OD1 ==168 :#line:242
		OOOO0O0000O0O00O0 =O00OO0000OOO0000O *0.60 #line:244
		O00O00O0O000OOO0O =(OD1 /2.0 )*0.80 #line:245
		O00O00OOOO00OOOOO =((OOO0000OOO0OO00OO /2.0 )-(OO0O0OOOO000O000O -O000OO0OOO00000O0 ))#line:246
		O0O0O0OO0OOO0O00O =CYLINDER (OO00OO0OOO0O0OO0O ,R =OO0O0OOOO000O000O -O000OO0OOO00000O0 ,H =OOOO0O0000O0O00O0 ).rotateY (90 ).translate ((-OOOO0O0000O0O00O0 /2.0 ,0 ,0 ))#line:248
		OOOOOO000OO0O00O0 =AX_BOXF (OO00OO0OOO0O0OO0O ,W =OOOO0O0000O0O00O0 ,L =OOO0000OOO0OO00OO ,H =O00O00O0O000OOO0O ,R =2.0 ,T =4 ).translate ((0 ,0 ,-O00O00O0O000OOO0O /2.0 ))#line:249
		OO0OO0000O00O0O00 =PYRAMID (OO00OO0OOO0O0OO0O ,L =O00OO0000OOO0000O ,W =O0O0O0OO000OOOOOO ,H =O000OO0OOO00000O0 /2.0 ,HT =O000OO0OOO00000O0 ).translate ((0 ,0 ,-(OO0O0OOOO000O000O -O000OO0OOO00000O0 )))#line:250
		O00OO000OOOOOO00O =AX_NUTS (OO00OO0OOO0O0OO0O ,D =O0O0O0OO000OOOOOO *1.3 ,O =O0O0O0OO000OOOOOO ,T =O000OO0OOO00000O0 ,F =8.0 ,FI =.0 ).rotateY (-90 )#line:251
		for OO0O0OO0OOO000O00 in [OOOOOO000OO0O00O0 ,OO0OO0000O00O0O00 ,O00OO000OOOOOO00O ]:#line:252
			O0O0O0OO0OOO0O00O .uniteWith (OO0O0OO0OOO000O00 )#line:253
			OO0O0OO0OOO000O00 .erase ()#line:254
		OO0OO0O0O0OOOO00O =CYLINDER (OO00OO0OOO0O0OO0O ,R =OD1 /2.0 ,H =O00OO0000OOO0000O ).rotateY (90 ).translate ((-O00OO0000OOO0000O /2.0 ,0 ,0 ))#line:258
		O0O0O0OO0OOO0O00O .subtractFrom (OO0OO0O0O0OOOO00O )#line:259
		OO0OO0O0O0OOOO00O .erase ()#line:260
		OO00O0000O00OOO00 =CBOLT6_001 (OO00OO0OOO0O0OO0O ,D =O00O00OOOO00OOOOO *0.60 ,L =O00O00O0O000OOO0O *1.3 ,W =O00O00OOOO00OOOOO ,H =0.0 ).rotateY (90 ).translate ((0 ,-OOO0000OOO0OO00OO /2.0 +O00O00OOOO00OOOOO /2.0 ,O00O00O0O000OOO0O /2.0 ))#line:265
		OO00O00O00OO0O0OO =CBOLT6_001 (OO00OO0OOO0O0OO0O ,D =O00O00OOOO00OOOOO *0.60 ,L =O00O00O0O000OOO0O *1.3 ,W =O00O00OOOO00OOOOO ,H =0.0 ).rotateY (90 ).translate ((0 ,OOO0000OOO0OO00OO /2.0 -O00O00OOOO00OOOOO /2.0 ,O00O00O0O000OOO0O /2.0 ))#line:266
		for OO0O0OO0OOO000O00 in [OO00O0000O00OOO00 ,OO00O00O00OO0O0OO ]:#line:267
			O0O0O0OO0OOO0O00O .uniteWith (OO0O0OO0OOO000O00 )#line:268
			OO0O0OO0OOO000O00 .erase ()#line:269
		OO00OO0OOO0O0OO0O .setPoint ((0 ,0 ,0 ),(0 ,0 ,-1 ))#line:271
		OO00OO0OOO0O0OO0O .setPoint ((0 ,0 ,-O000OO0OOO00000O0 +16.0 ),(0 ,0 ,-1 ))#line:272
