| 1 |
.PS |
| 2 |
# ASME_Y14-5.m4 |
| 3 |
# https://en.wikipedia.org/wiki/Geometric_dimensioning_and_tolerancing |
| 4 |
cct_init |
| 5 |
sinclude(ASME_Y14-5.m4def) |
| 6 |
sinclude(../ASME_Y14-5.m4def) |
| 7 |
ifsvg(`svg_font(sans-serif,12bp__,3bp__)', |
| 8 |
`textht = 11bp__*2/3 |
| 9 |
iflatex(`command "{\sf"')') |
| 10 |
|
| 11 |
boxht = 7.5/0.5*textht |
| 12 |
boxwid = 15/7.5 * boxht |
| 13 |
circlerad = 2.3/0.5*textht*0.5 |
| 14 |
thicklines_(1) |
| 15 |
# ASME Y14.5 specs: |
| 16 |
arrowht = textht*0.8 |
| 17 |
arrowwid = textht*0.6 |
| 18 |
|
| 19 |
Box: box |
| 20 |
Circle: circle at Box.c; {CM: move from Circle.se down textht right textht} |
| 21 |
thinlines_ |
| 22 |
CLU: ctrline( up_ Box.ht with .c at Box.c, Box.ht/2 ) |
| 23 |
CLH: ctrline( right Box.ht with .c at Box.c, Box.ht/2 ) |
| 24 |
|
| 25 |
dimension_(from Box.nw to Box.n,Box.ht/6) |
| 26 |
thicklines_(1) |
| 27 |
{Y14_frame("10") with .s at AS_C+(0,textht/2)} |
| 28 |
thinlines_ |
| 29 |
line from 3rd last line.start to CLU.end |
| 30 |
dimension_(from Box.w to Box.nw,Box.ht/6) |
| 31 |
thicklines_(1) |
| 32 |
{Y14_frame("5") with .e at AS_C+(-textht/2,0)} |
| 33 |
thinlines_ |
| 34 |
line from 4th last line.start to CLH.start |
| 35 |
|
| 36 |
thicklines_ |
| 37 |
DA: Y14_frame("A") at Box.ne+(-textht*1.5,textht*5) |
| 38 |
datumarrow(from DA.s to (DA,Box.n)) |
| 39 |
DB: Y14_frame("B") at Box.sw+(-textht*5,textht*2) |
| 40 |
datumarrow(from DB.e to (Box.w,DB)) |
| 41 |
|
| 42 |
F: Y14_frame(Y14_pos_, |
| 43 |
Y14_dia_;"0.03";"(M)", |
| 44 |
"A","B","C") with .w at Box.se+(-textht*4,-textht*2) |
| 45 |
G: Y14_frame(Y14_fla_,Y14_cyl_,Y14_lin_, |
| 46 |
Y14_sur_,Y14_per_,Y14_ang_, |
| 47 |
Y14_par_) with .nw at F.sw+(0,-0.1) |
| 48 |
H: Y14_frame(Y14_pos_,Y14_cir_,Y14_tot_,Y14_dia_) \ |
| 49 |
with .nw at G.sw+(0,-0.1) |
| 50 |
|
| 51 |
{ CB: move left textht from F.w } |
| 52 |
arrow <- from Circle.se to Intersect_(CM,CB) then to F.w |
| 53 |
|
| 54 |
command iflatex(`"}"',ifsvg(`"</g>"')) |
| 55 |
.PE |