110 for ( i = [0:max($children-1, len(list)-1)] )
131 frame=
false, window=
false
205 table_check( r=draft_sheet_config_tr, c=draft_sheet_config_tc );
206 table_check( r=draft_sheet_size_tr, c=draft_sheet_size_tc );
248 ldx = sll ? sdy : sdx;
249 ldy = sll ? sdx : sdy;
291 for ( ix = [0:len(zlx)-1], iyo = [1,-1] )
293 x = ix * fdx/len(zlx) - fdx/2;
294 yo = iyo * (fdy/2 - szm/2);
297 draft_line( l=[ [x, yo-szm/2], [x, yo+szm/2] ], w=zone_w, s=zone_s );
299 zlt = (zox > 0) ? zlx[ix] : zlx[len(zlx)-1-ix];
300 translate( [x + fdx/len(zlx)/2, yo] )
301 text(zlt, font=zrf, size=szm*zfs, halign=
"center", valign=
"center");
305 for ( iy = [0:len(zly)-1], ixo = [1,-1] )
307 y = iy * fdy/len(zly) - fdy/2;
308 xo = ixo * (fdx/2 - szm/2);
311 draft_line( l=[ [xo-szm/2, y], [xo+szm/2, y] ], w=zone_w, s=zone_s );
313 zlt = (zoy > 0) ? zly[iy] : zly[len(zly)-1-iy];
314 translate( [xo, y + fdy/len(zly)/2] )
315 text(zlt, font=zrf, size=szm*zfs, halign="center", valign="center");
328 for ( ix = [1:len(zlx)-1], iyo = [1,-1] )
330 x = ix * fdx/len(zlx) - fdx/2;
331 draft_line( l=[ [x, -fdy/2], [x, fdy/2] ], w=grid_w, s=grid_s );
334 for ( iy = [1:len(zly)-1], ixo = [1,-1] )
336 y = iy * fdy/len(zly) - fdy/2;
337 draft_line( l=[ [-fdx/2, y], [fdx/2, y] ], w=grid_w, s=grid_s );
355 l=ix*[[fdx/2-szm, 0], [fdx/2-szm*origin_l, 0]],
356 w=origin_w, s=origin_s, a2=origin_a
363 l=iy*[[0, fdy/2-szm], [0, fdy/2-szm*origin_l]],
364 w=origin_w, s=origin_s, a2=origin_a
441 ldx = sll ? sdy : sdx,
442 ldy = sll ? sdx : sdy,
449 [fdx/2-szm, fdy/2-szm];
482 text(
third(i), valign=
"center", halign=
"center", size=ts);
533 ul =
length(mark_size, units);
545 for ( i=[marks/2:groups*marks], j=[0, 1] )
551 (i%marks == marks/2) ? s*2/3
555 p1 = (j == 0) ? [p, 0] : [0, p],
560 draft_line (l=l, w=(i%marks) ? w/2 : w, s=1 );
563 if ((i == groups*marks) && !label_hide)
571 (j == 0 ? [offset, 0] : [0, offset])
573 rotate( (j == 0) ? 0 : 90 )
581 valign=
"center", size=s*label_scale
666 for( i=[0:len(rows)+2] )
672 lc = (i == 0) ? hlines[0]
673 : (i == len(rows)+2) ? hlines[1]
674 : (i == 1) ? hlines[2]
675 : (i == 2) ? hlines[3]
683 ls = (is_undef(title) && (i==1)) ? 0
684 : (is_undef(heads) && (i==2)) ? 0
687 ip = draft_table_get_point( ix=ic, iy=i, map=map, fmap=fmap );
688 tp = draft_table_get_point( ix=tc, iy=i, map=map, fmap=fmap );
694 for( i=[0:len(cols)] )
696 ic = (i==0||i==len(cols)) ? 0 : 1;
700 lc = (i == 0) ? vlines[0]
701 : (i == len(cols)) ? vlines[1]
707 ip = draft_table_get_point( ix=i, iy=ic, map=map, fmap=fmap );
708 tp = draft_table_get_point( ix=i, iy=tc, map=map, fmap=fmap );
717 for ( c = [0:len(cols)-1] )
721 for ( r = [2:len(rows)+1], c = [0:len(cols)-1] )
791 for( i=[0:len(hldata)-1] )
793 ic = hldata[i][1][0];
794 tc = hldata[i][1][1];
798 ip = draft_ztable_get_point( ix=ic, iy=i, map=map );
799 tp = draft_ztable_get_point( ix=tc, iy=i, map=map );
806 translate(tp + [lts, lts/2, 0])
807 text(str(
"H", i), size=lts);
812 for( i=[0:len(vldata)-1] )
814 ic = vldata[i][1][0];
815 tc = vldata[i][1][1];
819 ip = draft_ztable_get_point( ix=i, iy=ic, map=map );
820 tp = draft_ztable_get_point( ix=i, iy=tc, map=map );
827 translate(ip - [lts/2, -lts, 0]) rotate(90)
828 text(str(
"V", i), size=lts);
833 for( i=[0:len(zddata)-1] )
835 hidden = zddata[i][2];
846 text ( str(
"Z", i ), valign=
"center", halign=
"right", size=lts );
853 et = (
is_empty(text[i]) || is_undef(text[i])) ?
917 lnc = is_list(lnd[0]) ? [lnd[0], lnd[1]] : [lnd, lnd];
935 [
"vlines",
consts(3,lnc[0])]
946 map=map, fmap=fmap, zp=zp, window=window, layers=layers
975 text=text, map=map, zp=zp, number=number, window=window, layers=layers
x_axis_ci
<integer> The coordinate axis index for the Euclidean space x-axis.
y_axis_ci
<integer> The coordinate axis index for the Euclidean space y-axis.
x_axis2d_uv
<vector-2d> The unit vector of the positive x-axis in 2d Euclidean space.
y_axis2d_uv
<vector-2d> The unit vector of the positive y-axis in 2d Euclidean space.
pi
<decimal> The ratio of a circle's circumference to its diameter.
empty_str
<string> A string with no characters (the empty string).
empty_lst
<list> A list with no values (the empty list).
function line_tp(l)
Return the terminal point of a line or vector.
function line_ip(l)
Return the initial point of a line or vector.
function line2d_new(m=1, a=0, p1=origin2d, p2, v)
Construct a 2 dimensional directed line.
function defined_e_or(v, i, d)
Return an element of an iterable when it exists or a default value otherwise.
function third(v)
Return the third element of an iterable value.
function second(v)
Return the second element of an iterable value.
function first(v)
Return the first element of an iterable value.
function all_numbers(v, c=0)
Test if all elements of an iterable value are numbers.
function is_empty(v)
Test if an iterable value is empty.
function all_strings(v, c=0)
Test if all elements of an iterable value are strings.
function consts(l, v, u=false)
Create a list of constant or incrementing elements.
function map_get_value(m, k)
Get the map value associated with a key.
function map_get_firstof2_or(m1, m2, k, d)
Get the the first value associated with an existing key in one of two maps.
function defined_or(v, d)
Return given value, if defined, or a secondary value, if primary is not defined.
function is_defined(v)
Test if a value is defined.
function table_exists(r, c, ri, ci)
Test the existence of a table row identifier, table column identifier, or both.
module table_check(r, c, verbose=false)
Perform basic format checks on a table and output errors to console.
function length(v, from=length_unit_default, to=length_unit_base, d=1)
Convert a value from from one units to another with dimensions.