Lines Matching +full:3 +full:- +full:ring
20 RING = "R"; MOL = "M"; BOND = "B"; OTHER = "O" # manifests
30 cr = scale * 0.08 # rad of invis circles at ring vertices
31 crh = scale * 0.16 # ht of invis ellipse at ring vertices
34 dew = scale * 0.02 # east-west shift for left of/right of
48 $1 == "pic" { shiftfields(1); print; next } # pic pass-thru
60 $1 ~ /^[A-Z].*:$/ { # label; falls thru after shifting left
61 lastname = substr($1, 1, length($1)-1)
73 $1 ~ /ring|benz/ { ring($1); next }
77 $1 ~ /^[A-Z]/ { molecule(); next }
81 $1 == "right" { bracket(); stack--; next }
96 NF = i - 1
102 if ($cf ~ /(\+|-)?[0-9]+|up|down|right|left|ne|se|nw|sw/)
141 if (n ~ /^\.[A-Z]/) # "from .V" => "from Last.V.s"
143 if (n ~ /^[A-Z][^.]*\.[A-Z][^.]*$/) # "from X.V" => "from X.V.s"
145 return fields(cf-1, NF)
156 printf("%s from last [].se-(%g,0) to last [].se to last [].ne to last [].ne-(%g,0)\n",
158 if ($3 == "sub")
171 gsub(/[^A-Za-z0-9]/, "", n) # for stuff like C(OH3): zap non-alnum
176 printf("Last: %s: %s with .n at %s.s\n", n, $1, $3)
178 printf("Last: %s: %s with .s at %s.n\n", n, $1, $3)
179 else if ($2 == "left" && $3 == "of")
181 else if ($2 == "right" && $3 == "of")
182 printf("Last: %s: %s with .w at %s.e-(%g,0)\n", n, $1, $4, dew)
192 if (substr(labtype[$2], 1, 1) != RING)
193 error(sprintf("%s is not a ring", $2))
197 printf("\"\\s-3%d\\s0\" at 0.%d<%s.C,%s.V%d>\n", i, v+2, $2, $2, i)
201 function ring(type, typeint, pt, verts, i) { function
203 if (type ~ /[1-8]$/)
234 typeint = RING verts pt # RING | verts | dir
252 a = ((i-1) / v * 360 + pt) / deg
276 if (type ~ /flat/ && i == 3) {
293 2-rat, i, 2-rat, j, c1, c2
303 if (type ~ /flat/ && i == 3) {
311 2-rat, i, 2-rat, j
333 gsub(/[^A-Za-z0-9]/, "", m)
339 function joinring(type, dir, last) { # join a ring to something
340 if (substr(last, 1, 1) == RING) { # ring to ring
341 if (substr(type, 3) == substr(last, 3)) # fails if not 6-sided
353 if (substr(last, 1, 1) == RING)
373 function ringleave(last, d, rd, verts) { # return vertex of ring in dir d
375 rd = substr(last, 3)
376 return sprintf("V%d.%s", int(reduce(d-rd)/(360/verts)) + 1, corner(d))
390 for (cf++; $cf ~ /^[1-9]/; cf++) {
392 v2 = substr($cf,3,1)
393 if (v2 == v1+1 || v1 == v && v2 == 1) # e.g., 2,3 or 5,1
395 else if (v1 == v2+1 || v2 == v && v1 == 1) # e.g., 3,2 or 1,5
405 if ($cf ~ /^[+\-]?[0-9]+/)
417 d -= 360
432 if (substr(s, i, 1) !~ /[A-Z]/) {
437 gsub(/([0-9]+\.[0-9]+)|([0-9]+)/, "\\s-3\\d&\\u\\s+3", s)
438 if (s ~ /([^0-9]\.)|(\.[^0-9])/) # centered dot
439 gsub(/\./, "\\v#-.3m#.\\v#.3m#", s)
441 s, (n-nsub/2)*cwid, textht, (cloc-nsubc/2-0.5)*cwid, crh, crw, dav)
447 while ((n = match(s, /!?[A-Z][A-Za-z]*(([0-9]+\.[0-9]+)|([0-9]+))/)) > 0) {
448 os = os substr(s, 1, n-1) # prefix
453 gsub(/([0-9]+\.[0-9]+)|([0-9]+)/, "\\s-3\\d&\\u\\s+3", s1)
454 if (s1 ~ /([^0-9]\.)|(\.[^0-9])/) # centered dot
455 gsub(/\./, "\\v#-.3m#.\\v#.3m#", s1)
465 function shiftfields(n, i) { # move $n+1..$NF to $n..$NF-1, zap $NF
469 NF--