! TITLE: non-stnd_fill_dist.mac (CALCULATION) ! ! ! OBJECTIVE: ! ! This sub-macro calculates the distance from a non-standard fillet center ! to the the non-tangent fillet endpoint. ! ! ! COMMAND SYNTAX: ! ! (1) (2) ! NON-STND_FILL_DIST, radius, dist_nt2t ! ! ! ARGUMENTS: ! ! (1) radius = fillet radius. ! ! (2) dist_nt2t = distance between non-tangent fillet endpoint and ! tangent line. ! ! ! DESCRIPTION: ! ! A NON-STANDARD FILLET is a fillet that is created at the junction between ! 2 lines where the resulting fillet is not tangent to one, or both, lines. ! In this case, it passes through the endpoint of one, or both, lines, but ! is not tangent at those points. ! ! A STANDARD FILLET is at the junction of 2 lines such that the resulting ! fillet is tangent to both lines at any point along the line lengths. ! ! This macro calculates the distance of a non-standard fillet, such that the ! fillet is tangent to only one line and passing through the endpoint of the ! other, where it is not tangent. ! ! The calculation gives the distance from the fillet center to the non-tangent ! fillet endpoint of one line, as measured along the direction of the other ! (tangent) line. The output is the calculated center distance: ! ! cntr_d ! ! ! *get,prkey_,active,0,prkey /nopr ! rad_=arg1 d_ntp2t_=arg2 ! phi_=acos((rad_-d_ntp2t_)/rad_)*dconv ! ll_=2*rad_*sin((phi_/2)*rconv) ! cntr_d=sqrt((ll_**2)-(d_ntp2t_**2)) ! *set,rad_, *set,d_ntp2t_, *set,phi_, *set,l_, ! *if,prkey_,eq,1,then /go *endif