def ball_basis(dict, upst, downst): holeupst = np.empty([3]) holedownst = np.empty([3]) slotupst = np.empty([3]) slotdownst = np.empty([3]) holeupst[0] = dict[upst + ' hole ball reference']['X Location'][1] holeupst[1] = dict[upst + ' hole ball reference']['Y Location'][1] holeupst[2] = dict[upst + ' hole ball reference']['Z Location'][1] holedownst[0] = dict[downst + ' hole ball reference']['X Location'][1] holedownst[1] = dict[downst + ' hole ball reference']['Y Location'][1] holedownst[2] = dict[downst + ' hole ball reference']['Z Location'][1] slotupst[0] = dict[upst + ' slot ball reference']['X Location'][1] slotupst[1] = dict[upst + ' slot ball reference']['Y Location'][1] slotupst[2] = dict[upst + ' slot ball reference']['Z Location'][1] slotdownst[0] = dict[downst + ' slot ball reference']['X Location'][1] slotdownst[1] = dict[downst + ' slot ball reference']['Y Location'][1] slotdownst[2] = dict[downst + ' slot ball reference']['Z Location'][1] basis = ogp_util.make_uch_basis(holeupst, holedownst, slotupst, slotdownst) return basis
def ball_basis(dict, upst, downst): holeupst = np.empty([3]) holedownst = np.empty([3]) slotupst = np.empty([3]) slotdownst = np.empty([3]) holeupst[0]=dict[upst+' hole ball reference']['X Location'][1] holeupst[1]=dict[upst+' hole ball reference']['Y Location'][1] holeupst[2]=dict[upst+' hole ball reference']['Z Location'][1] holedownst[0]=dict[downst+' hole ball reference']['X Location'][1] holedownst[1]=dict[downst+' hole ball reference']['Y Location'][1] holedownst[2]=dict[downst+' hole ball reference']['Z Location'][1] slotupst[0]=dict[upst+' slot ball reference']['X Location'][1] slotupst[1]=dict[upst+' slot ball reference']['Y Location'][1] slotupst[2]=dict[upst+' slot ball reference']['Z Location'][1] slotdownst[0]=dict[downst+' slot ball reference']['X Location'][1] slotdownst[1]=dict[downst+' slot ball reference']['Y Location'][1] slotdownst[2]=dict[downst+' slot ball reference']['Z Location'][1] basis = ogp_util.make_uch_basis(holeupst,holedownst,slotupst,slotdownst) return basis
slotupst = np.empty([3]) slotdownst = np.empty([3]) holeupst[0]=ballsdict['L1 hole ball']['X Location'][1] holeupst[1]=ballsdict['L1 hole ball']['Y Location'][1] holeupst[2]=ballsdict['L1 hole ball']['Z Location'][1] holedownst[0]=ballsdict['L3 hole ball']['X Location'][1] holedownst[1]=ballsdict['L3 hole ball']['Y Location'][1] holedownst[2]=ballsdict['L3 hole ball']['Z Location'][1] slotupst[0]=ballsdict['L1 slot ball']['X Location'][1] slotupst[1]=ballsdict['L1 slot ball']['Y Location'][1] slotupst[2]=ballsdict['L1 slot ball']['Z Location'][1] slotdownst[0]=ballsdict['L3 slot ball']['X Location'][1] slotdownst[1]=ballsdict['L3 slot ball']['Y Location'][1] slotdownst[2]=ballsdict['L3 slot ball']['Z Location'][1] ball_basis = ogp_util.make_uch_basis(holeupst,holedownst,slotupst,slotdownst) #ball basis in U-channel survey frame: ball +Z is survey +Y, ball +Y is survey +/-Z, survey origin is L2 hole pin #print ball_basis #print modulesurvey_basis l1_basis = ogp_util.get_uch_mount(noballsdict,'L1') #pin basis in U-channel survey frame: l1, l2, l3 all the same, pin +Y is survey +Z, pin +Z is survey +/-Y, survey origin is L2 hole pin #print l1_basis l3_basis = ogp_util.get_uch_mount(noballsdict,'L3') l1_basis_trans = ogp_util.transform_basis(ball_basis,modulesurvey_basis,l1_basis) #pin basis in module survey frame: pin +Y is survey +Z, pin +Z is survey +/-Y #print l1_basis_trans l2_basis_trans = ogp_util.transform_basis(ball_basis,modulesurvey_basis,l2_basis) #print l2_basis_trans l3_basis_trans = ogp_util.transform_basis(ball_basis,modulesurvey_basis,l3_basis) #print l3_basis_trans
slotupst = np.empty([3]) slotdownst = np.empty([3]) holeupst[0]=ballsdict['L4 hole ball']['X Location'][1] holeupst[1]=ballsdict['L4 hole ball']['Y Location'][1] holeupst[2]=ballsdict['L4 hole ball']['Z Location'][1] holedownst[0]=ballsdict['L6 hole ball']['X Location'][1] holedownst[1]=ballsdict['L6 hole ball']['Y Location'][1] holedownst[2]=ballsdict['L6 hole ball']['Z Location'][1] slotupst[0]=ballsdict['L4 slot ball']['X Location'][1] slotupst[1]=ballsdict['L4 slot ball']['Y Location'][1] slotupst[2]=ballsdict['L4 slot ball']['Z Location'][1] slotdownst[0]=ballsdict['L6 slot ball']['X Location'][1] slotdownst[1]=ballsdict['L6 slot ball']['Y Location'][1] slotdownst[2]=ballsdict['L6 slot ball']['Z Location'][1] ball_basis = ogp_util.make_uch_basis(holeupst,holedownst,slotupst,slotdownst) #ball basis in U-channel survey frame: ball +Z is survey +Y, ball +Y is survey +/-Z, survey origin is L5 hole pin #print ball_basis #print modulesurvey_basis l4_basis = ogp_util.get_uch_mount(noballsdict,'L4') #pin basis in U-channel survey frame: l4, l5, l6 all the same, pin +Y is survey +Z, pin +Z is survey +/-Y, survey origin is L2 hole pin #print l4_basis l6_basis = ogp_util.get_uch_mount(noballsdict,'L6') l4_basis_trans = ogp_util.transform_basis(ball_basis,modulesurvey_basis,l4_basis) #pin basis in module survey frame: pin +Y is survey +Z, pin +Z is survey +/-Y #print l1_basis_trans l5_basis_trans = ogp_util.transform_basis(ball_basis,modulesurvey_basis,l5_basis) #print l2_basis_trans l6_basis_trans = ogp_util.transform_basis(ball_basis,modulesurvey_basis,l6_basis)