+%%%%%%%%%%%%%%%%% the draw Points macro
+%% plot the list of points given in argument
+% the engine
+\define@boolkey{drawPoints}{tikz}[true]{}%
+%% show the bounding box for delaunay
+\define@choicekey*{drawPoints}{bbox}[\val\nr]{none, show}{%
+ \ifcase\nr\relax%
+ \def\luameshval@tp@bbox{none}%
+ \or%
+ \def\luameshval@tp@bbox{bbox}%
+ \fi%
+}%
+%% the scale
+\define@key{drawPoints}{scale}[1cm]{\def\luameshval@tp@scale{#1}}%
+%% print points
+\define@choicekey*{drawPoints}{print}[\val\nr]{none, points}{%
+ \ifcase\nr\relax%
+ \def\luameshval@tp@print{none}%
+ \or%
+ \def\luameshval@tp@print{points}%
+ \fi%
+}%
+%% the name of the point
+\define@key{drawPoints}{meshpoint}[P]{\def\luameshval@tp@meshpoint{#1}}%
+%% the mode for reading the points
+\define@choicekey*{drawPoints}{mode}[\val\nr]{int, ext}{%
+ \ifcase\nr\relax%
+ \def\luameshval@tp@mode{int}%
+ \or%
+ \def\luameshval@tp@mode{ext}%
+ \fi%
+}%
+%% the name of the color of drawing
+\define@key{drawPoints}{color}[black]{\def\luameshval@tp@color{#1}}%
+%% the name of the color of drawing the bbox
+\define@key{drawPoints}{colorBbox}[black]{\def\luameshval@tp@colorbbox{#1}}%
+%
+\presetkeys{drawPoints}{tikz=false,bbox=none,scale, meshpoint,mode=int,print=none,color,colorBbox}{}%
+%
+\newcommand{\drawPointsMesh}[2][]{%
+ % #1 : optionnal arguments
+ % #2 : the string containing the list of points
+ % (x1,y1);(x2,y2);... or the name file containing the points
+ \setkeys{drawPoints}{#1} %
+ \def\MeshPoint{\luameshval@tp@meshpoint}%
+ \ifKV@drawPoints@tikz% if we are using tikz
+ \directlua{%
+ printPointsTikZ("#2","\luameshval@tp@mode","\luameshval@tp@print","\luameshval@tp@bbox","\luameshval@tp@scale","\luameshval@tp@color","\luameshval@tp@colorbbox")%
+ }%
+ \else % we are using MP
+ \mplibcolor{\luameshmpcolor}{\luameshval@tp@color}
+ \mplibcolor{\luameshmpcolorBbox}{\luameshval@tp@colorbbox}
+ \directlua{%
+ printPointsMP("#2","\luameshval@tp@mode","\luameshval@tp@print","\luameshval@tp@bbox","\luameshval@tp@scale")%
+ }%
+ %
+ \fi%
+}%
+%
+
+%%%%%%%%%%%%%%%% the draw Points macro inc with callbacks
+%% engine of drawing
+\define@boolkey{drawPointsInc}{tikz}[true]{}%
+%% show the bounding box for delaunay
+\define@choicekey*{drawPointsInc}{bbox}[\val\nr]{none, show}{%
+ \ifcase\nr\relax%
+ \def\luameshval@tpi@bbox{none}%
+ \or%
+ \def\luameshval@tpi@bbox{bbox}%
+ \fi%
+}%
+%% the scale
+\define@key{drawPointsInc}{scale}[1cm]{\def\luameshval@tpi@scale{#1}}%
+%% print points
+\define@choicekey*{drawPointsInc}{print}[\val\nr]{none, points}{%
+ \ifcase\nr\relax%
+ \def\luameshval@tpi@print{none}%
+ \or%
+ \def\luameshval@tpi@print{points}%
+ \fi%
+}%
+%% the name of the point
+\define@key{drawPointsInc}{meshpoint}[P]{\def\luameshval@tpi@meshpoint{#1}}%
+%% the mode for reading the points
+\define@choicekey*{drawPointsInc}{mode}[\val\nr]{int, ext}{%
+ \ifcase\nr\relax%
+ \def\luameshval@tpi@mode{int}%
+ \or%
+ \def\luameshval@tpi@mode{ext}%
+ \fi%
+}%
+%
+% color
+%% the name of the color of drawing
+\define@key{drawPointsInc}{color}[black]{\def\luameshval@tpi@color{#1}}%
+%% the name of the color of drawing the bbox
+\define@key{drawPointsInc}{colorBbox}[black]{\def\luameshval@tpi@colorbbox{#1}}%
+%
+\presetkeys{drawPointsInc}{tikz=false,bbox=none,scale, meshpoint,mode=int,print=none,color,colorBbox}{}%
+%
+% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\newcommand*{\drawPointsMeshinc}[4][]{%
+ % #1 : optionnal arguments
+ % #2 : the string containing the list of points
+ % (x1,y1);(x2,y2);... or the name file containing the points
+ % #3 : the code to place before the generated one
+ % #4 : the code to place after the generated one
+ \setkeys{drawPointsInc}{#1} %
+ \def\MeshPoint{\luameshval@tpi@meshpoint}%
+ \ifKV@drawPointsInc@tikz% if we are using tikz
+ \directlua{%
+ buildMeshTikZ("#2","\luameshval@tpi@mode","\luameshval@tpi@print","\luameshval@tpi@bbox","full","\luameshval@tpi@sc%ale","\luameshval@tpi@color")%
+ }%
+ \else % we are using MP
+ \mplibcolor{\luameshmpcolor}{\luameshval@tpi@color}
+ \mplibcolor{\luameshmpcolorBbox}{\luameshval@tpi@colorbbox}
+ \directlua{%
+ printPointsMPinc("#2","\luaescapestring{\unexpanded{#3}}","\luaescapestring{\unexpanded{#4}}","\luameshval@tpi@mode","\luameshval@tpi@print","\luameshval@tpi@bbox","\luameshval@tpi@scale")%
+ }%
+ \fi%
+}%
+%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% the meshAddOnePointBW commande