
    e@Dj	                     &   d Z ddlmZmZmZmZmZ d\  ZZd\  Z	Z
d\  ZZdZdZg dZd	\  ZZd
\  ZZd\  ZZdZdZd ZddZedk(  rKddlZ eej:                        dkD  r eej:                  d         ndZ e ee      ddd        e d       yy)a  
EXACT yoke connector for the ST3215 (STEP servo frame). Bolts to the real horn + idler
bolt circles (extracted from the STEP), no approximation. Output axis +Y through
(AX, AZ)=(-25.5, 0); horn front (y=9.6, holes at y=6), idler back (y=-28.2, holes y=-27.7).
    )BoxCylinderPosRot
export_stl)     9        )g333333#@      @)g333333<g33333;g?g      @))g     @@r	   )r   g      @)r   g      )g     2r	   )g333333@g      "@)g     Fr
   )g      Hg      .g      :@)g      6@g      0@c                 f    t        | ||      t        ddd      z  t        |dz  t        dz        z  S )NZ   r         )r   r   r   PT)xyczdias       5/data/cameron/repos/smith300_para_stuff/yoke_exact.py_hole_along_Yr      s1    q"a=3r1a=(8C!GR!V+DDD         Q@c                    t         t        z   }t        t        dz  z   }|t        dz  z
  }t        t
        z   dz  }t
        t        z
  }t        |z   dz  }t        t        z   |t        z
  z
  }t        t        dz  z
  | dz  z
  }t        ||d      t        |t        t              z  t        ||d      t        |t        t              z  z   t        t        |d      t        t        |t              z  z   t        ||d      t        | t        d   t        d         z  z   }	t        D ]/  \  }
}|	t        |
||t              z  }	|	t        |
||t              z  }	1 |	t        t        |t         t"              z  }	|	t        t        |t         t"              z  }	|	S )Nr   r      )IDLER_Y
IDLER_SNUGHORN_Yr   PLATE_X0PLATE_X1SPINE_XSPINE_Tr   r   PLATE_ZLINK_SECHOLES_XZr   BOLT_DAXAZBORE_D)link_lenidler_yfront_ycback_ycplate_xcplate_xwspine_ycspine_hlink_xcyhxhzs               r   make_yoke_exactr4      si   
"GQHQG8#q(H("H A%H{w|,G!#hl2G	Xx	#c(B&@	@x!$s8R'AA
Bw!$s7GW'EE
F w!$s8Xa[(1+'NN
OA
 B	]2xV44	]2wF33  r8R	00Ar7B	//AHr   __main__Nr   zyoke_exact.stlg?F)	toleranceascii_formatzyoke_exact ok)r   )!__doc__	build123dr   r   r   r   r   r%   r&   r   HORN_HOLE_Yr   IDLER_HOLE_Yr   r   r#   r$   r'   r   r    r   r   r!   r"   r   r4   __name__syslenargvfloatLprint r   r   <module>rD      s   
 : 9	B $ 
D ! (
E. z!#((ma/chhqkTAq!#3sQVW	/	 r   