You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the bt.trim() function does not handle polylines correctly. In the following example, as you change the values of t1 and t2, the drawing appears to loop the first line of each square until at each corner.
/*This is a modified version of the following submission:@title: square disarray@author: leomcelroy@snapshot: 0.png*/constwidth=120;constheight=120;constgridsize=2;//smallest grid array setDocDimensions(width,height);constfinalLines=[];// we'll put our final lines hereconstsquareWidth=10constsquareHeight=10for(leti=0;i<gridsize;i++){for(letj=0;j<gridsize;j++){constsquare=rect(squareWidth,squareHeight);bt.translate(square,[(squareWidth)*i,(squareHeight)*j]);bt.join(finalLines,square);}}bt.trim(finalLines,0.00,0.04);drawLines(finalLines);functionrect(w,h){// notice how this is an array of arraysreturn[[[-w/2,h/2],[w/2,h/2],[w/2,-h/2],[-w/2,-h/2],[-w/2,h/2],]]}
Ideally, bt.trim() would not loop between the first elements of each array in the finalLines array.
The text was updated successfully, but these errors were encountered:
Currently, the bt.trim() function does not handle polylines correctly. In the following example, as you change the values of
t1
andt2
, the drawing appears to loop the first line of each square until at each corner.Ideally, bt.trim() would not loop between the first elements of each array in the finalLines array.
The text was updated successfully, but these errors were encountered: