/* dans plain_paths.asy, sont définis : le type : struct slice { path before,after; } et les fonctions : slice cut(path p, path knife, int n) slice firstcut(path p, path knife) slice lastcut(path p, path knife) */ size(7.5cm,0); path ligne=(-3,1){dir(45)}..(-1,2)..{dir(10)}(4,0), couteau=(-3,-1){dir(45)}..(0,3)..(1.5,-1)..{dir(80)}(3,2), morceau1=cut(ligne,couteau,1).before, morceau2=cut(ligne,couteau,1).after; // cut(ligne,couteau,n) est de type slice // cut(ligne,couteau,n).before et cut(ligne,couteau,n).after // sont de type path. draw(couteau,dashed+orange); draw(morceau1,2bp+green); draw(morceau2,2bp+blue); shipout(bbox(3mm,white));