 Timestamp:
 Feb 2, 2018 8:26:07 AM (5 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

sans/Dev/trunk/NCNR_User_Procedures/Reduction/VSANS/VC_FrontView_Deg.ipf
r1062 r1081 36 36 37 37 // get the values from the panel 38 Variable F_L R_sep,F_TB_sep, F_SDD, F_offset39 Variable M_L R_sep,M_TB_sep, M_SDD, M_offset38 Variable F_L_sep,F_R_sep,F_T_sep, F_B_sep,F_SDD 39 Variable M_L_sep,M_R_sep,M_T_sep, M_B_sep, M_SDD 40 40 Variable B_SDD, B_offset 41 41 Variable axisRange … … 49 49 //front 50 50 ControlInfo/W=VCALC VCALCCtrl_2a 51 F_LR_sep = V_Value 51 F_L_sep = V_Value 52 ControlInfo/W=VCALC VCALCCtrl_2aa 53 F_R_sep = V_Value 52 54 ControlInfo/W=VCALC VCALCCtrl_2b 53 F_TB_sep = V_Value 54 ControlInfo/W=VCALC VCALCCtrl_2c 55 F_offset = V_Value 55 F_T_sep = V_Value 56 ControlInfo/W=VCALC VCALCCtrl_2bb 57 F_B_sep = V_Value 58 56 59 ControlInfo/W=VCALC VCALCCtrl_2d 57 60 F_SDD = V_Value … … 59 62 //middle 60 63 ControlInfo/W=VCALC VCALCCtrl_3a 61 M_LR_sep = V_Value 64 M_L_sep = V_Value 65 ControlInfo/W=VCALC VCALCCtrl_3aa 66 M_R_sep = V_Value 62 67 ControlInfo/W=VCALC VCALCCtrl_3b 63 M_TB_sep = V_Value 64 ControlInfo/W=VCALC VCALCCtrl_3c 65 M_offset = V_Value 68 M_T_sep = V_Value 69 ControlInfo/W=VCALC VCALCCtrl_3bb 70 M_B_sep = V_Value 71 66 72 ControlInfo/W=VCALC VCALCCtrl_3d 67 73 M_SDD = V_Value … … 115 121 tmp_x1 = atan(M_TB_w/2/(M_SDD+middle_SDDsetback))*(180/pi) // x symmetric y is not 116 122 tmp_x2 = tmp_x1 117 tmp_y1 = atan(M_T B_sep/2/(M_SDD+middle_SDDsetback))*(180/pi)118 tmp_y2 = atan((M_T B_sep/2+M_TB_h)/(M_SDD+middle_SDDsetback))*(180/pi)123 tmp_y1 = atan(M_T_sep/(M_SDD+middle_SDDsetback))*(180/pi) 124 tmp_y2 = atan((M_T_sep+M_TB_h)/(M_SDD+middle_SDDsetback))*(180/pi) 119 125 120 126 // Print tmp_x1,tmp_x2,tmp_y1,tmp_y2 … … 124 130 125 131 // BOTTOM (x unchanged, negate and swap y1,y2) 126 tmp_y1 = atan((M_TB_sep/2+M_TB_h)/(M_SDD+middle_SDDsetback))*(180/pi)127 tmp_y2 = atan(M_TB_sep/2/(M_SDD+middle_SDDsetback))*(180/pi)132 tmp_y1 = atan((M_B_sepM_TB_h)/(M_SDD+middle_SDDsetback))*(180/pi) 133 tmp_y2 = atan(M_B_sep/(M_SDD+middle_SDDsetback))*(180/pi) 128 134 SetDrawEnv/W=VCALC#FrontView xcoord= bottom,ycoord= left,fillfgc= (1,16019,65535) 129 135 DrawRect/W=VCALC#FrontView tmp_x1,tmp_y2,tmp_x2,tmp_y1 130 136 131 137 // LEFT 132 tmp_x1 = atan((M_LR_w+M_LR_sep/2)/(M_SDD))*(180/pi) // y symmetric x is not133 tmp_x2 = atan((M_LR_sep/2)/(M_SDD))*(180/pi)138 tmp_x1 = atan((M_L_sepM_LR_w)/(M_SDD))*(180/pi) // y symmetric x is not 139 tmp_x2 = atan((M_L_sep)/(M_SDD))*(180/pi) 134 140 tmp_y1 = atan(M_LR_h/2/(M_SDD))*(180/pi) 135 141 tmp_y2 = tmp_y1 … … 137 143 DrawRect/W=VCALC#FrontView tmp_x1,tmp_y2,tmp_x2,tmp_y1 138 144 // RIGHT (x changes, y the same) 139 tmp_x1 = atan((M_ LR_sep/2)/(M_SDD))*(180/pi) // y symmetric x is not140 tmp_x2 = atan((M_LR_w+M_ LR_sep/2)/(M_SDD))*(180/pi)145 tmp_x1 = atan((M_R_sep)/(M_SDD))*(180/pi) // y symmetric x is not 146 tmp_x2 = atan((M_LR_w+M_R_sep)/(M_SDD))*(180/pi) 141 147 SetDrawEnv/W=VCALC#FrontView xcoord= bottom,ycoord= left,fillfgc= (65535,0,0) 142 148 DrawRect/W=VCALC#FrontView tmp_x1,tmp_y2,tmp_x2,tmp_y1 … … 150 156 tmp_x1 = atan(F_TB_w/2/(F_SDD+front_SDDsetback))*(180/pi) // x symmetric y is not 151 157 tmp_x2 = tmp_x1 152 tmp_y1 = atan(F_T B_sep/2/(F_SDD+front_SDDsetback))*(180/pi)153 tmp_y2 = atan((F_T B_sep/2+F_TB_h)/(F_SDD+front_SDDsetback))*(180/pi)158 tmp_y1 = atan(F_T_sep/(F_SDD+front_SDDsetback))*(180/pi) 159 tmp_y2 = atan((F_T_sep+F_TB_h)/(F_SDD+front_SDDsetback))*(180/pi) 154 160 155 161 // Print tmp_x1,tmp_x2,tmp_y1,tmp_y2 … … 159 165 160 166 // BOTTOM (x unchanged, negate and swap y1,y2) 161 tmp_y1 = atan((F_TB_sep/2+F_TB_h)/(F_SDD+front_SDDsetback))*(180/pi)162 tmp_y2 = atan(F_TB_sep/2/(F_SDD+front_SDDsetback))*(180/pi)167 tmp_y1 = atan((F_B_sepF_TB_h)/(F_SDD+front_SDDsetback))*(180/pi) 168 tmp_y2 = atan(F_B_sep/(F_SDD+front_SDDsetback))*(180/pi) 163 169 SetDrawEnv/W=VCALC#FrontView xcoord= bottom,ycoord= left,fillfgc= (1,52428,26586) 164 170 DrawRect/W=VCALC#FrontView tmp_x1,tmp_y2,tmp_x2,tmp_y1 165 171 166 172 // LEFT 167 tmp_x1 = atan((F_LR_w+F_LR_sep/2)/(F_SDD))*(180/pi) // y symmetric x is not168 tmp_x2 = atan((F_LR_sep/2)/(F_SDD))*(180/pi)173 tmp_x1 = atan((F_L_sepF_LR_w)/(F_SDD))*(180/pi) // y symmetric x is not 174 tmp_x2 = atan((F_L_sep)/(F_SDD))*(180/pi) 169 175 tmp_y1 = atan(F_LR_h/2/(F_SDD))*(180/pi) 170 176 tmp_y2 = tmp_y1 … … 172 178 DrawRect/W=VCALC#FrontView tmp_x1,tmp_y2,tmp_x2,tmp_y1 173 179 // RIGHT (x changes, y the same) 174 tmp_x1 = atan((F_ LR_sep/2)/(F_SDD))*(180/pi) // y symmetric x is not175 tmp_x2 = atan((F_LR_w+F_ LR_sep/2)/(F_SDD))*(180/pi)180 tmp_x1 = atan((F_R_sep)/(F_SDD))*(180/pi) // y symmetric x is not 181 tmp_x2 = atan((F_LR_w+F_R_sep)/(F_SDD))*(180/pi) 176 182 SetDrawEnv/W=VCALC#FrontView xcoord= bottom,ycoord= left,fillfgc= (39321,26208,1) 177 183 DrawRect/W=VCALC#FrontView tmp_x1,tmp_y2,tmp_x2,tmp_y1
Note: See TracChangeset
for help on using the changeset viewer.