X-Git-Url: https://melusine.eu.org/syracuse/G/git/?p=delaunay.git;a=blobdiff_plain;f=luamesh.sty;h=82e32149f5dc95813b7b4a98485e30fca6b97c66;hp=9d394d9abff82e4ca3f4fe8f289d1dcfc94bf6f1;hb=4b4f6ae2ce34662269e37912c19c856ebf0cde17;hpb=f5b04999414b0f514d2fea252417c05ac2efeeac diff --git a/luamesh.sty b/luamesh.sty index 9d394d9..82e3214 100644 --- a/luamesh.sty +++ b/luamesh.sty @@ -42,45 +42,39 @@ %% show the bounding box for delaunay \define@choicekey*{buildMesh}{bbox}[\val\nr]{none, show}{% \ifcase\nr\relax% - \def\luameshval@bbox{none}% + \def\luameshval@bm@bbox{none}% \or% - \def\luameshval@bbox{bbox}% + \def\luameshval@bm@bbox{bbox}% \fi% }% %% the scale -\define@key{buildMesh}{scale}[1cm]{\def\luameshval@scale{#1}}% +\define@key{buildMesh}{scale}[1cm]{\def\luameshval@bm@scale{#1}}% %% print ponits ? \define@choicekey*{buildMesh}{print}[\val\nr]{none, points}{% \ifcase\nr\relax% - \def\luameshval@print{none}% + \def\luameshval@bm@print{none}% \or% - \def\luameshval@print{points}% + \def\luameshval@bm@print{points}% \fi% }% %% the name of the point -\define@key{buildMesh}{meshpoint}[P]{\def\luameshval@meshpoint{#1}}% +\define@key{buildMesh}{meshpoint}[P]{\def\luameshval@bm@meshpoint{#1}}% %% the mode for reading the points \define@choicekey*{buildMesh}{mode}[\val\nr]{int, ext}{% \ifcase\nr\relax% - \def\luameshval@mode{int}% + \def\luameshval@bm@mode{int}% \or% - \def\luameshval@mode{ext}% + \def\luameshval@bm@mode{ext}% \fi% }% % -%% a complete picture or some code of the engine -\define@choicekey*{buildMesh}{picture}[\val\nr]{full, embedded}{% - \ifcase\nr\relax% - \def\luameshval@picture{full}% - \or% - \def\luameshval@picture{embedded}% - \fi% -}% %color %% the name of the color of drawing -\define@key{buildMesh}{color}[black]{\def\luameshval@color{#1}}% - -\presetkeys{buildMesh}{tikz=false,bbox=none,scale, meshpoint,mode=int,print=none,picture=full,color}{}% +\define@key{buildMesh}{color}[black]{\def\luameshval@bm@color{#1}}% +%% the name of the color of drawing the bbox +\define@key{buildMesh}{colorBbox}[black]{\def\luameshval@bm@colorbbox{#1}}% +% +\presetkeys{buildMesh}{tikz=false,bbox=none,scale, meshpoint,mode=int,print=none,color,colorBbox}{}% % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % the difinition BW Bowyer and Watson algo @@ -88,14 +82,16 @@ % #1 : the string containing the list of points % (x1,y1);(x2,y2);... or the name file containing the points \setkeys{buildMesh}{#1} % - \def\MeshPoint{\luameshval@meshpoint}% + \def\MeshPoint{\luameshval@bm@meshpoint}% \ifKV@buildMesh@tikz% if we are using tikz \directlua{% - buildMeshTikZ("#2","\luameshval@mode","\luameshval@print","\luameshval@bbox","full","\luameshval@scale","\luameshval@color")% + buildMeshTikZ("#2","\luameshval@bm@mode","\luameshval@bm@print","\luameshval@bm@bbox","full","\luameshval@bm@scale","\luameshval@bm@color")% }% \else % we are using MP + \mplibcolor{\luameshmpcolor}{\luameshval@bm@color} + \mplibcolor{\luameshmpcolorBbox}{\luameshval@bm@colorbbox} \directlua{% - buildMeshMPBW("#2","\luameshval@mode","\luameshval@print","\luameshval@bbox","full","\luameshval@scale","\luameshval@color")% + buildMeshMPBW("#2","\luameshval@bm@mode","\luameshval@bm@print","\luameshval@bm@bbox","\luameshval@bm@scale")% }% % \fi% @@ -132,6 +128,8 @@ \define@key{MeshAddOne}{colorNew}[red]{\def\luameshval@colornew{#1}}% %% the color of circoncircle \define@key{MeshAddOne}{colorCircle}[green]{\def\luameshval@colorcircle{#1}}% +%% the name of the color of drawing the bbox +\define@key{MeshAddOne}{colorBbox}[black]{\def\luameshval@colorbbox{#1}}% % %% a complete picture or some code of the engine \define@choicekey*{MeshAddOne}{mode}[\val\nr]{int, ext}{% @@ -148,7 +146,7 @@ \def\luameshval@bbox{bbox}% \fi% }% -\presetkeys{MeshAddOne}{tikz=false,scale, meshpoint,newpoint,color,colorBack,colorNew,colorCircle,step=badtriangles,mode=int,bbox=none}{}% +\presetkeys{MeshAddOne}{tikz=false,scale, meshpoint,newpoint,color,colorBack,colorNew,colorCircle,step=badtriangles,mode=int,bbox=none,colorBbox}{}% % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % the difinition BW Bowyer and Watson algo @@ -167,6 +165,7 @@ \mplibcolor{\luameshmpcolorBack}{\luameshval@colorback} \mplibcolor{\luameshmpcolorNew}{\luameshval@colornew} \mplibcolor{\luameshmpcolorCircle}{\luameshval@colorcircle} + \mplibcolor{\luameshmpcolorBbox}{\luameshval@colorbbox} \directlua{% TeXOnePointMPBW("#2","#3","\luameshval@step","\luameshval@scale","\luameshval@mode","\luameshval@bbox")% }% @@ -202,6 +201,7 @@ \define@key{MeshAddOneBWinc}{colorNew}[red]{\def\luameshval@colornew{#1}}% %% the color of circoncircle \define@key{MeshAddOneBWinc}{colorCircle}[green]{\def\luameshval@colorcircle{#1}}% +\define@key{MeshAddOneBWinc}{colorBbox}[black]{\def\luameshval@colorbbox{#1}}% % %% a complete picture or some code of the engine \define@choicekey*{MeshAddOneBWinc}{mode}[\val\nr]{int, ext}{% @@ -218,7 +218,7 @@ \def\luameshval@bbox{bbox}% \fi% }% -\presetkeys{MeshAddOneBWinc}{tikz=false,scale, meshpoint,newpoint,color,colorBack,colorNew,colorCircle,step=badtriangles,mode=int,bbox=none}{}% +\presetkeys{MeshAddOneBWinc}{tikz=false,scale, meshpoint,newpoint,color,colorBack,colorNew,colorCircle,step=badtriangles,mode=int,bbox=none,colorBbox}{}% % % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % the difinition BW embedded code between the 2 last arguments @@ -237,6 +237,7 @@ \mplibcolor{\luameshmpcolorBack}{\luameshval@colorback} \mplibcolor{\luameshmpcolorNew}{\luameshval@colornew} \mplibcolor{\luameshmpcolorCircle}{\luameshval@colorcircle} + \mplibcolor{\luameshmpcolorBbox}{\luameshval@colorbbox} \directlua{% TeXOnePointMPBWinc("#2","#3","#4","#5","\luameshval@step","\luameshval@scale","\luameshval@mode","\luameshval@bbox")% }%