texlive[63875] Master: luamesh (11jul22)

commits+karl at tug.org commits+karl at tug.org
Mon Jul 11 22:32:11 CEST 2022


Revision: 63875
          http://tug.org/svn/texlive?view=revision&revision=63875
Author:   karl
Date:     2022-07-11 22:32:11 +0200 (Mon, 11 Jul 2022)
Log Message:
-----------
luamesh (11jul22)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/lualatex/luamesh/README
    trunk/Master/texmf-dist/doc/lualatex/luamesh/biblio.bib
    trunk/Master/texmf-dist/doc/lualatex/luamesh/luamesh-doc.pdf
    trunk/Master/texmf-dist/doc/lualatex/luamesh/luamesh-doc.tex
    trunk/Master/texmf-dist/doc/lualatex/luamesh/luameshdoc.cls
    trunk/Master/texmf-dist/scripts/luamesh/luamesh-tex.lua
    trunk/Master/texmf-dist/tex/lualatex/luamesh/luamesh.sty
    trunk/Master/tlpkg/libexec/ctan2tds

Added Paths:
-----------
    trunk/Master/texmf-dist/metapost/luamesh/
    trunk/Master/texmf-dist/metapost/luamesh/luamesh.mp

Removed Paths:
-------------
    trunk/Master/texmf-dist/doc/lualatex/luamesh/dum.tex

Modified: trunk/Master/texmf-dist/doc/lualatex/luamesh/README
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/luamesh/README	2022-07-11 20:31:00 UTC (rev 63874)
+++ trunk/Master/texmf-dist/doc/lualatex/luamesh/README	2022-07-11 20:32:11 UTC (rev 63875)
@@ -1,6 +1,6 @@
 -*- coding: utf-8 -*-
 luamesh package by Maxime Chupin
-Version 0.6 dated 2020/06/06
+Version 0.7 dated 2022/07/08
 
 The LuaLaTeX package luamesh allows to compute and draw 2D Delaunay triangulation.
 The algorithm is written with lua, and depending on the choice of the “engine”,
@@ -22,8 +22,6 @@
 README
 animation-crop.pdf
 biblio.bib
-dum.bbl
-dum.tex
 fond.mp
 fond.pdf
 luameshdoc.cls
@@ -43,6 +41,9 @@
 
 ===== Files for LuaLaTeX =====
 luamesh.sty
+
+===== File for MetaPost
+luamesh.mp
 ==================
 
-The archive luamesh-v0-6.zip contains all the files to insert into your texmf.
+The archive luamesh-v0-7.zip contains all the files to insert into your texmf.

Modified: trunk/Master/texmf-dist/doc/lualatex/luamesh/biblio.bib
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/luamesh/biblio.bib	2022-07-11 20:31:00 UTC (rev 63874)
+++ trunk/Master/texmf-dist/doc/lualatex/luamesh/biblio.bib	2022-07-11 20:32:11 UTC (rev 63875)
@@ -35,32 +35,36 @@
   Pages                    = {848},
   Url                      = {http://dx.doi.org/10.1002/9780470611166}
 }
+ at manual{luamplib,
+title = {The Luamplib package},
+subtitle = {Use Lua\TeX{}’s built-in MetaPost interpreter},
+author = {Gesang, Philipp and Hagen, Hans and Roux, Élie and Kim, Dohyun and Hoekwater, Taco and Pégourié-Gonnard, Manuel},
+url = {https://ctan.org/pkg/luamplib},
+urldate = {2022-07-11},
+date = {2022-01-12},
+version = {2.23.0},
+}
 
- at Manual{luamplib,
-  Title                    = {luamplib – Use LuaTeX's built-in METAPOST interpreter},
-  Author                   = {Hagen, Hans and Hoekwater, Taco and  Roux, Élie   and Pégourié-Gonnard, Manuel and  Gesang, Philipp and Kim, Dohyun},
-  Note                     = {v. 2.11.3},
-  Year                     = {2016},
 
-  Owner                    = {chupin},
-  Timestamp                = {2016.11.28}
+ at manual{animate,
+title = {The Animate package},
+subtitle = {Create PDF and SVG animations from graphics files and inline graphics},
+author = {Grahn, Alexander},
+url = {https://ctan.org/pkg/animate},
+urldate = {2022-07-11},
+date = {2022-02-21},
+version = {},
 }
 
- at Manual{animate,
-  Title                    = {The animate Package},
-  Author                   = {Grahn, Alexander},
-  Note                     = {},
-  Year                     = {2016},
-}
-
 @Manual{tikz,
-  Title                    = {pgf – Create PostScript and PDF graphics in TeX},
-  Author                   = {Tantau, Till and Feuersänger, Christian},
-  Note                     = {v. 3.0.1a},
-  Year                     = {2015},
-
+title = {The Pgf package},
+subtitle = {Create PostScript and PDF graphics in \TeX},
+author = {Menke, Henri and {The PGF/TikZ Team} and Feuersänger, Christian and Tantau, Till},
+  Year                     = {2022},
+  url = {https://ctan.org/pkg/pgf},
   Owner                    = {chupin},
-  Timestamp                = {2016.11.28}
+  Timestamp                = {2022-07-11},
+  version = {3.1.9a},
 }
 @Manual{gmsh,
   Title                    = {Gmsh Reference Manual},
@@ -90,3 +94,13 @@
   Mrnumber                 = {619577},
   Url                      = {http://dx.doi.org/10.1093/comjnl/24.2.167}
 }
+
+ at manual{tkzeuclide,
+title = {The Tkz-euclide package},
+subtitle = {Tools for drawing Euclidean geometry},
+author = {Matthes, Alain},
+url = {http://altermundus.fr},
+urldate = {2022-07-11},
+date = {2022-02-25},
+version = {4.051b},
+}

Deleted: trunk/Master/texmf-dist/doc/lualatex/luamesh/dum.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/luamesh/dum.tex	2022-07-11 20:31:00 UTC (rev 63874)
+++ trunk/Master/texmf-dist/doc/lualatex/luamesh/dum.tex	2022-07-11 20:32:11 UTC (rev 63875)
@@ -1,6 +0,0 @@
-\documentclass{article}
-\begin{document}
-\nocite{*}
-\bibliography{biblio}
-\bibliographystyle{plain}
-\end{document}
\ No newline at end of file

Modified: trunk/Master/texmf-dist/doc/lualatex/luamesh/luamesh-doc.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/lualatex/luamesh/luamesh-doc.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/luamesh/luamesh-doc.tex	2022-07-11 20:31:00 UTC (rev 63874)
+++ trunk/Master/texmf-dist/doc/lualatex/luamesh/luamesh-doc.tex	2022-07-11 20:32:11 UTC (rev 63875)
@@ -18,6 +18,7 @@
 \author{Maxime Chupin \email{notezik at gmail.com}}
 \date{\today}
 
+\addbibresource{biblio.bib}
 
 \definecolor{darkred}{rgb}{0.8,0.1,0.1}
 
@@ -137,7 +138,7 @@
 
 \lstset{moredelim=*[s][\color{red}\rmfamily\itshape]{<}{>}}
 \lstset{moredelim=*[s][\color{blue}\rmfamily\itshape]{<<}{>>}}
-\usepackage[colorlinks=true]{hyperref}
+
 \begin{document}
 %% === Page de garde ===================================================
 \thispagestyle{empty}
@@ -167,7 +168,7 @@
 }
 \vfill
 \begin{center}
-  Version 0.6, 2020, June, 6th \\
+  Version 0.7, 2022, July, 8th \\
   \url{https://plmlab.math.cnrs.fr/mchupin/luamesh}
 \end{center}
 %% == Page de garde ====================================================
@@ -186,14 +187,18 @@
   set of points, or a particular step of the algorithm.
 \end{abstract}
 
-I would like to thank Jean-Michel Sarlat, who hosts the development
-with a git project on the \Verb+melusine+ machine:
+I would like to thank Jean-Michel Sarlat, who hosts first the development
+with a git project on the \Verb+melusine+ machine. Now the project is hosted
+here :
 \begin{center}
-  \url{https://melusine.eu.org/syracuse/G/delaunay/}
+  \url{https://plmlab.math.cnrs.fr/mchupin/luamesh}
 \end{center}
 I would also like to thank the first user, an intensive
 \emph{test} user, and a very kind English corrector: Nicole Spillane.
 
+For the references of the algorithm, see~\cite{Bowyer,Watson} and a reference about
+mesh is~\cite{Frey}.
+
 \tableofcontents
 
 
@@ -206,11 +211,7 @@
   \url{https://www.ctan.org/pkg/luamesh}
 \end{center}
 
-Of course, you can just put the two files \Verb+luamesh.lua+ and
-\Verb+luamesh.sty+ in the working directory but this is not
-recommended.
 
-
 \subsection{With \TeX live and Linux or Mac OSX}
 
 To install \luamesh with \TeX live, you have to create the local
@@ -225,12 +226,15 @@
 \begin{center}
   \Verb+~/texmf/tex/latex/luamesh/+
 \end{center}
-and the \Verb+luamesh.lua+, the \Verb+luamesh-tex.lua+ and the
+the \Verb+luamesh.lua+, the \Verb+luamesh-tex.lua+ and the
 \Verb-luamesh-polygon.lua+ files must be in directory:
 \begin{center}
   \Verb+~/texmf/scripts/luamesh/+
 \end{center}
-
+and the \Verb+luamesh.mp+ file must be in directory:
+\begin{center}
+  \Verb+~/texmf/metapost/luamesh/+
+\end{center}
 Once you have done this, \luamesh can be included in your document
 with
 \begin{latexcode}
@@ -262,9 +266,9 @@
 draw the
 triangulations :
 \begin{enumerate}
-\item \Verb+luamplib+ to use MetaPost via the \luatex library
+\item \Verb+luamplib+ to use MetaPost~\cite{luamplib} via the \luatex library
   \Verb+mplib+;
-\item \Verb+tikz+.
+\item \Verb+tikz+~\cite{tikz}.
 \end{enumerate}
 We will see how to choose between these two \emph{drawing engines}.
 Moreover, the following packages are necessary:
@@ -285,7 +289,7 @@
 \commande|\buildMeshBW[«options»]{«list of points» or «file name»}|\medskip
 
 This macro produces the Delaunay triangulation (using the Bowyer and
-Watson algorithm) of the given \meta{list of points}. The list of
+Watson algorithm, \cite[Bowyer]) of the given \meta{list of points}. The list of
 points must be given in the following way :
 \begin{center}
   \verb+(x1,y1);(x2,y2);(x3,y3);...;(xn,yn)+
@@ -339,6 +343,9 @@
   the scale at which the picture is drawn (the same for both
   axes). It must contain the unit of length (cm,
   pt, etc.).
+\item[thickness = \meta{value} (default: 0.4pt):] The thickness option defines
+  the thickness of the lines. It must contain the unit of length (cm,
+  pt, etc.).
 \end{optionsenum}
 
 To illustrate the options, let us show you an example. We consider a
@@ -362,6 +369,7 @@
   print = points,
   meshpoint = x,
   scale = 1.3cm,
+  thickness = 1pt
   ]{mesh.txt}
 \end{Exemple}
 
@@ -541,6 +549,16 @@
   the scale at which the picture is drawn (the same for both
   axis). It must contain the unit of length (cm,
   pt, etc.).
+  \item[thickness = \meta{value} (default: 0.4pt):] The thickness option defines
+  the thickness of the lines for the mesh. It must contain the unit of length (cm,
+  pt, etc.).
+\item[thicknessNew = \meta{value} (default: 0.4pt):] The thickness option defines
+  the thickness of the lines for the polygon and the \emph{new} elements. It
+  must contain the unit of length (cm,
+  pt, etc.).
+\item[thicknessCircle = \meta{value} (default: 0.4pt):] The thickness option defines
+  the thickness of the lines of the circles. It must contain the unit of length (cm,
+  pt, etc.).
 \end{optionsenum}
 
 Here is an example of customizing the drawing. First, recall that
@@ -568,7 +586,11 @@
   colorBbox = black!20,
   bbox = show,
   scale=1.4cm,
-  step=badtriangles]
+  step=badtriangles,
+  thickness=0.2pt,
+  thicknessCircle=1pt,
+  thicknessNew=3pt % useless because this step
+  ]
   {mesh.txt}{6}
 \end{Exemple}
 
@@ -653,6 +675,12 @@
   allows to specify the mode of generation of the grid points. The
   value \Verb+rect+ produces a simple rectangular grid, and the value
   \Verb+pertub+ randomly perturbs the rectangular grid.
+\item[thickness = \meta{value} (default: 0.4pt):] The thickness option defines
+  the thickness of the lines of the mesh. It must contain the unit of length (cm,
+  pt, etc.).
+\item[thicknessPolygon = \meta{value} (default: 0.4pt):] The thickness option defines
+  the thickness of the lines of the polygon. It must contain the unit of length (cm,
+  pt, etc.).
 \end{optionsenum}
 
 Here is an example of customizing the drawing.
@@ -665,7 +693,9 @@
   scale=4cm,
   step=mesh,
   print=points,
-  gridpoints=perturb]
+  gridpoints=perturb,
+  thickness=0.5pt,
+  thicknessPolygon=1pt]
   {(0,0);(1,0);(1,0.5);(0,0.5);(-0.20,0.35);(-0.25,0.25);(-0.20,0.15)}
 \end{Exemple}
 
@@ -675,7 +705,8 @@
 The three macros presented in the above sections have complementary
 macros, with the suffix \Verb+inc+ that allow the user to add code
 (MetaPost or \Verb+tikz+, depending of the drawing engine) before and
-after the code generated by \luamesh.
+after the code generated by \luamesh. These commands have the same options as
+the non \emph{inc} one.
 
 The three macros are:\medskip
 
@@ -775,7 +806,8 @@
 colorBbox = blue!30,
 print = points,
 meshpoint = x,
-scale=0.8cm
+scale=0.8cm,
+thickness = 1.4pt
 ]{(0.3,0.3);(1.5,1);(4,0);(4.5,2.5);(1.81,2.14);(2.5,0.5);(2.8,1.5)}%
 {% code before
   beginfig(0);
@@ -876,7 +908,8 @@
   colorBbox = blue!30,
   print = points,
   meshpoint = x,
-  scale=0.8cm
+  scale=0.8cm,
+  thickness=1pt
   ]{(0.3,0.3);(1.5,1);(4,0);(4.5,2.5);(1.81,2.14);(2.5,0.5);(2.8,1.5)}%
   {% code before
   }
@@ -887,7 +920,7 @@
 
 \section{Voronoï Diagrams}
 
-Another interesting feature of b Delaunay triangulation is that its
+Another interesting feature of the Delaunay triangulation is that its
 \emph{dual} is the so-called Voronoï diagram. More precisely, for a
 finite set of
 points $\{p_{1},\ldots, p_{n}\}$ in the Euclidean plane, the Voronoï
@@ -936,11 +969,11 @@
   triangulation. By default, these points are removed at the end of
   the algorithm.
 \item[color = \meta{value} (default: black):] The color of the
-  drawing.
+  drawing of the Delaunay mesh.
 \item[colorBbox = \meta{value} (default: black):] The color of the
   drawing for the elements (points and triangles) belonging to the
   bounding box.
-\item[colorVoronoi = \meta{value} (default: black):] The color of the
+\item[colorVoronoi = \meta{value} (default: red):] The color of the
   drawing for the elements (points and polygons) belonging to the
   Voronoï diagram.
 \item[print = none (default) \textme{or} points:] To label the
@@ -970,10 +1003,20 @@
   allows to draw the Delaunay triangulation in dashed lines.
 \item[styleVoronoi = none (default) \textme{or} dashed:] This option
   allows to draw the Voronoï edges in dashed lines.
+\item[thickness = \meta{value} (default: 0.4pt):] The thickness option defines
+  the thickness of the lines of the mesh (if plotted). It must contain the unit of length (cm,
+  pt, etc.).
+\item[thicknessVoronoi = \meta{value} (default: 0.4pt):] The thickness option defines
+  the thickness of the lines of the Voronoï diagram. It must contain the unit of length (cm,
+  pt, etc.).
 \end{optionsenum}
 
 \begin{Exemple}
-  \buildVoronoiBW[tikz,delaunay=show,styleDelaunay=dashed]
+  \buildVoronoiBW[tikz,
+  delaunay=show,
+  styleDelaunay=dashed,
+  thickness = 1pt,
+  thicknessVoronoi=2pt]
   {(0.3,0.3);(1.5,1);(4,0);(4.5,2.5);(1.81,2.14);(2.5,0.5);(2.8,1.5);(0.1,2);(1.5,-0.3)}
 \end{Exemple}
 
@@ -980,7 +1023,8 @@
 \subsection{The \emph{inc} variant}
 
 Once again, a variant of the macros is available allowing the user to
-add code before and after the code produced by \luamesh. We refer to
+add code before and after the code produced by \luamesh (with the same options
+as the non \emph{inc} command). We refer to
 section~\ref{sec:inc} because it works the same way.
 
 Let us note that:
@@ -1001,7 +1045,7 @@
 
 \section{With Gmsh}
 
-Gmsh is an open source efficient software that produces meshes. The
+Gmsh~\cite{gmsh} is an open source efficient software that produces meshes. The
 exporting format is the \emph{MSH ASCII file format} and can be easily
 read by a Lua program. \luamesh provides the user with dedicated
 macros to read and draw meshes coming from a Gmsh exportation.\bigskip
@@ -1045,10 +1089,13 @@
   the scale at which the picture is drawn (the same for both
   axes). It must contain the unit of length (cm,
   pt, etc.).
+\item[thickness = \meta{value} (default: 0.4pt):] The thickness option defines
+  the thickness of the lines of the mesh. It must contain the unit of length (cm,
+  pt, etc.).
 \end{optionsenum}
 Here is an example:
 \begin{Exemple}
-  \drawGmsh[scale=2cm,print=points, color=blue!30]{maillage.msh}
+  \drawGmsh[scale=2cm,print=points, color=blue!30,thickness=0.8pt]{maillage.msh}
 \end{Exemple}
 
 \subsection{Gmsh and Voronoï Diagrams}
@@ -1069,8 +1116,8 @@
 There are several options to customize the drawing.
 \begin{optionsenum}
 \item[color = \meta{value} (default: black):] The color of the
-  drawing.
-\item[colorVoronoi = \meta{value} (default: black):] The color of the
+  drawing of the Delaunay mesh.
+\item[colorVoronoi = \meta{value} (default: red):] The color of the
   drawing for the elements (points and polygons) belonging to the
   Voronoï diagram.
 \item[print = none (default) \textme{or} points:] To label the vertices of the
@@ -1100,16 +1147,28 @@
   allows to draw the Delaunay triangulation in dashed lines.
 \item[styleVoronoi = none (default) \textme{or} dashed] This option
   allows to draw the Voronoï edges in dashed lines.
+\item[thickness = \meta{value} (default: 0.4pt):] The thickness option defines
+  the thickness of the lines of the mesh (if plotted). It must contain the unit of length (cm,
+  pt, etc.).
+\item[thicknessVoronoi = \meta{value} (default: 0.4pt):] The thickness option defines
+  the thickness of the lines of the Voronoï diagram. It must contain the unit of length (cm,
+  pt, etc.).
 \end{optionsenum}
 
 \begin{Exemple}
-  \gmshVoronoi[tikz,scale=3cm, delaunay=show,styleVoronoi=dashed]{maillagev4.msh}
+  \gmshVoronoi[tikz,
+  scale=4cm,
+  delaunay=show,
+  styleVoronoi=dashed,
+  thickness=0.4pt,
+  thicknessVoronoi=2pt
+  ]{maillagev4.msh}
 \end{Exemple}
 
 
 \subsection{The \emph{inc} variants}
 
-Once again, there exist \emph{inc} variant macros:\bigskip
+Once again, there exist \emph{inc} variant macros (with the same options):\bigskip
 
 \commande|\drawGmshinc[«options»]{«file name»}{«code before»}{«code after»}|\medskip
 
@@ -1118,13 +1177,38 @@
 We refer to the previous sections for explanations.
 
 
+\section{\texttt{mplibcode} environments}
 
+All the \Verb+mplibcode+ environments produced by this package use instance
+mechanism provided by the \Verb+luamplib+ package~\cite{luamplib}. The name of
+the instance is \verb+luamesh+.
+
+\subsection{A MetaPost package}
+
+This package comes with a \Verb+luamesh.mp+ file. This file provide for the
+moment only one macro to draw circumscribed circles of three points. All of the
+\Verb+luamesh+ instances of \Verb+mplibcode+ environments include the MetaPost
+\Verb+luamesh.mp+ package.
+\bigskip
+
+\commande|circumcircle(«pair1»,«pair2»,«pair3»)|\medskip
+
+This macro returns a \Verb+path+: the circumscribed circle passing by the three
+argument \Verb+pair+s.\footnote{For the tikz users, we refer to
+  \texttt{tkz-euclide}~\cite{tkzeuclide} package that provides a large number of tools including
+  on to draw circumscribed circles.}
+
+\begin{Exemple}
+\buildVoronoiBWinc{(0, 0);(6,0);(2,4);(1.5,2);(2.,0.5);(3,2.6);(3.5,1);(5,3.);(0.3,3.2)}{beginfig(0);}{draw circumcircle(MeshPoints1,MeshPoints2,MeshPoints3);endfig;}
+\end{Exemple}
+
+
 \section{Gallery}
 \subsection{With Animate}
 
-If you use \emph{Adobe Acrobat reader}, you can easily produce an
+If you use \emph{Adobe Acrobat reader} or \emph{Okular}, you can easily produce an
 animation of the Bowyer and Watson algorithm with the package
-\Verb+animate+.
+\Verb+animate+~\cite{animate}.
 
 For example, the following code (in a file name \Verb+animation.tex+):
 \begin{latexcode}
@@ -1225,6 +1309,8 @@
 \section{History}
 
 \begin{itemize}
+\item July, 2022, v~0.7, adding of thickness options, creation of the MetaPost
+  package, and improvement of the documentation.
 \item June, 6th, 2020, v 0.6, correction of bug produced by the
   deleted \Verb+\mplibcolor+ function of \Verb+luamplib+ package.
 \item June, 6th, 2020, v 0.6, add support of version 4 of the
@@ -1232,7 +1318,7 @@
 \end{itemize}
 
 
-\input{dum.bbl}
+\printbibliography
 
 \end{document}
 

Modified: trunk/Master/texmf-dist/doc/lualatex/luamesh/luameshdoc.cls
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/luamesh/luameshdoc.cls	2022-07-11 20:31:00 UTC (rev 63874)
+++ trunk/Master/texmf-dist/doc/lualatex/luamesh/luameshdoc.cls	2022-07-11 20:32:11 UTC (rev 63875)
@@ -1,4 +1,4 @@
-% copy of the private class for lualatex-doc, lltxdoc.sty. 2017 version. 
+% copy of the private class for lualatex-doc, lltxdoc.sty. 2017 version.
 % see lualatex-doc.tex for copying conditions
 % Manuel Pégourié-Gonnard
 
@@ -8,8 +8,11 @@
 \RequirePackage{luamesh}
 \RequirePackage{fontspec}
 \RequirePackage{metalogo, xspace, ifmtarg, xargs, fancyvrb}
-\RequirePackage[french,english]{babel}
+\RequirePackage[backend=biber,sorting=ynt]{biblatex}
+\RequirePackage[english]{babel}
+
 \RequirePackage[colorlinks=true]{hyperref}
+
 %\RequirePackage{bookmark}
 
 \defaultfontfeatures{Ligatures=TeX, Scale=MatchLowercase}

Added: trunk/Master/texmf-dist/metapost/luamesh/luamesh.mp
===================================================================
--- trunk/Master/texmf-dist/metapost/luamesh/luamesh.mp	                        (rev 0)
+++ trunk/Master/texmf-dist/metapost/luamesh/luamesh.mp	2022-07-11 20:32:11 UTC (rev 63875)
@@ -0,0 +1,22 @@
+% metapost library for the lualatex package luamesh
+%
+vardef circumcircle(expr M,N,P)=
+   % Compute center and radius of the circoncircle of the triangle M N P
+  save a,b,c,circle,rad,center,x,y;
+  path circle;
+  pair  center;
+  numeric a,b,c,x[],y[];
+  x1 := xpart M;
+  y1 := ypart M;
+  x2 := xpart N;
+  y2 := ypart N;
+  x3 := xpart P;
+  y3 := ypart P;
+  2*x1*a+2*y1*b+c=-(x1**2+y1**2);
+  2*x2*a+2*y2*b+c=-(x2**2+y2**2);
+  2*x3*a+2*y3*b+c=-(x3**2+y3**2);
+  center := (-a,-b);
+  rad := sqrt(a**2+b**2-c**2);
+  circle := fullcircle scaled (2.0*rad) shifted center;
+  circle
+enddef


Property changes on: trunk/Master/texmf-dist/metapost/luamesh/luamesh.mp
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/scripts/luamesh/luamesh-tex.lua
===================================================================
--- trunk/Master/texmf-dist/scripts/luamesh/luamesh-tex.lua	2022-07-11 20:31:00 UTC (rev 63874)
+++ trunk/Master/texmf-dist/scripts/luamesh/luamesh-tex.lua	2022-07-11 20:32:11 UTC (rev 63875)
@@ -4,7 +4,7 @@
 --       AUTHOR:  Maxime Chupin
 -----------------------------------------------------------------------
 -- trace Voronoi with MP
-function traceVoronoiMP(listPoints, triangulation,listVoronoi, points, tri,styleD,styleV)
+function traceVoronoiMP(listPoints, triangulation,listVoronoi, points, tri,styleD,styleV,thickness,thicknessVoronoi)
    if(styleD == "dashed") then
       sDelaunay = "dashed evenly"
    else
@@ -31,9 +31,13 @@
          PointJ = listPoints[triangulation[i][2]]
          PointK = listPoints[triangulation[i][3]]
          if(triangulation[i].type == "bbox") then
-            output = output .. "draw (".. PointI.x ..",".. PointI.y ..")*u--("..PointJ.x..",".. PointJ.y ..")*u--("..PointK.x..",".. PointK.y ..")*u--cycle "..sDelaunay.." withcolor \\luameshmpcolorBbox;"
+            output = output .. "draw (".. PointI.x ..",".. PointI.y
+               ..")*u--("..PointJ.x..",".. PointJ.y
+               ..")*u--("..PointK.x..",".. PointK.y ..")*u--cycle"..sDelaunay.." withcolor \\luameshmpcolorBbox withpen pencircle scaled "..thickness..";"
          else
-            output = output .. "draw (".. PointI.x ..",".. PointI.y ..")*u--("..PointJ.x..",".. PointJ.y ..")*u--("..PointK.x..",".. PointK.y ..")*u--cycle "..sDelaunay.." withcolor \\luameshmpcolor;"
+            output = output .. "draw (".. PointI.x ..",".. PointI.y
+               ..")*u--("..PointJ.x..",".. PointJ.y
+               ..")*u--("..PointK.x..",".. PointK.y ..")*u--cycle"..sDelaunay.." withcolor \\luameshmpcolor withpen pencircle scaled "..thickness..";"
          end
       end
    end
@@ -40,7 +44,8 @@
    for i=1,#listVoronoi do
       PointI = listCircumC[listVoronoi[i][1]]
       PointJ = listCircumC[listVoronoi[i][2]]
-      output = output .. "draw (".. PointI.x ..",".. PointI.y ..")*u--("..PointJ.x..",".. PointJ.y ..")*u "..sVoronoi.." withcolor \\luameshmpcolorVoronoi;"
+      output = output .. "draw (".. PointI.x ..",".. PointI.y
+         ..")*u--("..PointJ.x..",".. PointJ.y ..")*u "..sVoronoi.." withcolor \\luameshmpcolorVoronoi withpen pencircle scaled "..thicknessVoronoi..";"
    end
    if(points=="points") then
       j=1
@@ -75,7 +80,7 @@
 
 
 -- trace Voronoi with TikZ
-function traceVoronoiTikZ(listPoints, triangulation,listVoronoi, points, tri,color,colorBbox,colorVoronoi,styleD,styleV)
+function traceVoronoiTikZ(listPoints, triangulation,listVoronoi, points, tri,color,colorBbox,colorVoronoi,styleD,styleV,thickness,thicknessVoronoi)
    if(styleD == "dashed") then
       sDelaunay = ",dashed"
    else
@@ -100,9 +105,9 @@
          PointJ = listPoints[triangulation[i][2]]
          PointK = listPoints[triangulation[i][3]]
          if(triangulation[i].type == "bbox") then
-            output = output .. "\\draw[color="..colorBbox..sDelaunay.."] (".. PointI.x ..",".. PointI.y ..")--("..PointJ.x..",".. PointJ.y ..")--("..PointK.x..",".. PointK.y ..")--cycle;"
+            output = output .. "\\draw[color="..colorBbox..sDelaunay..",line width="..thickness..",rounded corners=0.4pt] (".. PointI.x ..",".. PointI.y ..")--("..PointJ.x..",".. PointJ.y ..")--("..PointK.x..",".. PointK.y ..")--cycle;"
          else
-            output = output .. "\\draw[color="..color..sDelaunay.."] (".. PointI.x ..",".. PointI.y ..")--("..PointJ.x..",".. PointJ.y ..")--("..PointK.x..",".. PointK.y ..")--cycle;"
+            output = output .. "\\draw[color="..color..sDelaunay..",line width="..thickness..",rounded corners=0.4pt] (".. PointI.x ..",".. PointI.y ..")--("..PointJ.x..",".. PointJ.y ..")--("..PointK.x..",".. PointK.y ..")--cycle;"
          end
       end
    end
@@ -109,7 +114,7 @@
    for i=1,#listVoronoi do
       PointI = listCircumC[listVoronoi[i][1]]
       PointJ = listCircumC[listVoronoi[i][2]]
-      output = output .. "\\draw[color="..colorVoronoi..sVoronoi.."] (".. PointI.x ..",".. PointI.y ..")--("..PointJ.x..",".. PointJ.y ..");"
+      output = output .. "\\draw[color="..colorVoronoi..sVoronoi..",line width="..thicknessVoronoi..",rounded corners=0.4pt] (".. PointI.x ..",".. PointI.y ..")--("..PointJ.x..",".. PointJ.y ..");"
    end
    if(points=="points") then
       j=1
@@ -144,43 +149,43 @@
 
 
 -- buildVoronoi with MP
-function buildVoronoiMPBW(chaine,mode,points,bbox,scale,tri,styleD,styleV)
+function buildVoronoiMPBW(chaine,mode,points,bbox,scale,tri,styleD,styleV,thickness,thicknessVoronoi)
    local listPoints = buildList(chaine, mode)
    local triangulation = BowyerWatson(listPoints,bbox)
    local listVoronoi = buildVoronoi(listPoints, triangulation)
-   output = traceVoronoiMP(listPoints,triangulation,listVoronoi,points,tri,styleD,styleV)
-   output = "\\leavevmode\\begin{mplibcode}beginfig(0);u:="..scale.. ";" .. output .."endfig;\\end{mplibcode}"
+   output = traceVoronoiMP(listPoints,triangulation,listVoronoi,points,tri,styleD,styleV,thickness,thicknessVoronoi)
+   output = "\\leavevmode\\begin{mplibcode}[luamesh]beginfig(0);u:="..scale.. ";" .. output .."endfig;\\end{mplibcode}"
    tex.sprint(output)
 end
 
 
 -- buildVoronoi with TikZ
-function buildVoronoiTikZBW(chaine,mode,points,bbox,scale,tri,color,colorBbox,colorVoronoi,styleD,styleV)
+function buildVoronoiTikZBW(chaine,mode,points,bbox,scale,tri,color,colorBbox,colorVoronoi,styleD,styleV,thickness,thicknessVoronoi)
    local listPoints = buildList(chaine, mode)
    local triangulation = BowyerWatson(listPoints,bbox)
    local listVoronoi = buildVoronoi(listPoints, triangulation)
-   output = traceVoronoiTikZ(listPoints,triangulation,listVoronoi,points,tri,color,colorBbox,colorVoronoi,styleD,styleV)
+   output = traceVoronoiTikZ(listPoints,triangulation,listVoronoi,points,tri,color,colorBbox,colorVoronoi,styleD,styleV,thickness,thicknessVoronoi)
    output = "\\noindent\\begin{tikzpicture}[x=" .. scale .. ",y=" .. scale .."]" .. output .."\\end{tikzpicture}"   tex.sprint(output)
 end
 
 
 -- buildVoronoi with MP
-function buildVoronoiMPBWinc(chaine,beginning, ending,mode,points,bbox,scale,tri,styleD,styleV)
+function buildVoronoiMPBWinc(chaine,beginning, ending,mode,points,bbox,scale,tri,styleD,styleV,thickness,thicknessVoronoi)
    local listPoints = buildList(chaine, mode)
    local triangulation = BowyerWatson(listPoints,bbox)
    local listVoronoi = buildVoronoi(listPoints, triangulation)
-   output = traceVoronoiMP(listPoints,triangulation,listVoronoi,points,tri,styleD,styleV)
-   output = "\\leavevmode\\begin{mplibcode}u:="..scale..";"..beginning .. output .. ending .. "\\end{mplibcode}"
+   output = traceVoronoiMP(listPoints,triangulation,listVoronoi,points,tri,styleD,styleV,thickness,thicknessVoronoi)
+   output = "\\leavevmode\\begin{mplibcode}[luamesh]u:="..scale..";"..beginning .. output .. ending .. "\\end{mplibcode}"
    tex.sprint(output)
 end
 
 
 -- buildVoronoi with TikZ
-function buildVoronoiTikZBWinc(chaine,beginning, ending,mode,points,bbox,scale,tri,color,colorBbox,colorVoronoi)
+function buildVoronoiTikZBWinc(chaine,beginning, ending,mode,points,bbox,scale,tri,color,colorBbox,colorVoronoi,styleD,styleV,thickness,thicknessVoronoi)
    local listPoints = buildList(chaine, mode,styleD,styleV)
    local triangulation = BowyerWatson(listPoints,bbox)
    local listVoronoi = buildVoronoi(listPoints, triangulation)
-   output = traceVoronoiTikZ(listPoints,triangulation,listVoronoi,points,tri,color,colorBbox,colorVoronoi,styleD,styleV)
+   output = traceVoronoiTikZ(listPoints,triangulation,listVoronoi,points,tri,color,colorBbox,colorVoronoi,styleD,styleV,thickness,thicknessVoronoi)
    output = "\\noindent\\begin{tikzpicture}[x=" .. scale .. ",y=" .. scale .."]" ..beginning.. output..ending .."\\end{tikzpicture}"
    tex.sprint(output)
 end
@@ -188,7 +193,7 @@
 
 
 -- trace a triangulation with TikZ
-function traceMeshTikZ(listPoints, triangulation,points,color,colorBbox)
+function traceMeshTikZ(listPoints, triangulation,points,color,colorBbox,thickness)
    output = ""
    for i=1,#listPoints do
       output = output .. "\\coordinate (MeshPoints".. i .. ") at  (" .. listPoints[i].x .. "," .. listPoints[i].y .. ");"
@@ -198,9 +203,9 @@
       PointJ = listPoints[triangulation[i][2]]
       PointK = listPoints[triangulation[i][3]]
       if(triangulation[i].type == "bbox") then
-         output = output .. "\\draw[color="..colorBbox.."] (".. PointI.x ..",".. PointI.y ..")--("..PointJ.x..",".. PointJ.y ..")--("..PointK.x..",".. PointK.y ..")--cycle;"
+         output = output .. "\\draw[color="..colorBbox..",line width="..thickness..",rounded corners=0.4pt] (".. PointI.x ..",".. PointI.y ..")--("..PointJ.x..",".. PointJ.y ..")--("..PointK.x..",".. PointK.y ..")--cycle;"
       else
-         output = output .. "\\draw[color="..color.."] (".. PointI.x ..",".. PointI.y ..")--("..PointJ.x..",".. PointJ.y ..")--("..PointK.x..",".. PointK.y ..")--cycle;"
+         output = output .. "\\draw[color="..color..",line width="..thickness..",rounded corners=0.4pt] (".. PointI.x ..",".. PointI.y ..")--("..PointJ.x..",".. PointJ.y ..")--("..PointK.x..",".. PointK.y ..")--cycle;"
       end
    end
    if(points=="points") then
@@ -207,10 +212,10 @@
       j=1
       for i=1,#listPoints do
          if(listPoints[i].type == "bbox") then
-            output = output .. "\\draw[color="..colorBbox.."] (" .. listPoints[i].x ..",".. listPoints[i].y .. ") node {$\\bullet$} node[anchor=north east] {$\\MeshPoint^*_{" .. j .. "}$};"
+            output = output .. "\\draw[color="..colorBbox..",line width="..thickness..",rounded corners=0.4pt] (" .. listPoints[i].x ..",".. listPoints[i].y .. ") node {$\\bullet$} node[anchor=north east] {$\\MeshPoint^*_{" .. j .. "}$};"
             j=j+1
          else
-            output = output .. "\\draw[color="..color.."] (" .. listPoints[i].x ..",".. listPoints[i].y .. ") node {$\\bullet$} node[anchor=north east] {$\\MeshPoint_{" .. i .. "}$};"
+            output = output .. "\\draw[color="..color..",line width="..thickness..",rounded corners=0.4pt] (" .. listPoints[i].x ..",".. listPoints[i].y .. ") node {$\\bullet$} node[anchor=north east] {$\\MeshPoint_{" .. i .. "}$};"
          end
       end
    end
@@ -230,7 +235,7 @@
 
 
 -- trace a triangulation with MP
-function traceMeshMP(listPoints, triangulation,points)
+function traceMeshMP(listPoints, triangulation,points,thickness)
    output = "";
    output = output .. " pair MeshPoints[];"
    for i=1,#listPoints do
@@ -241,9 +246,13 @@
       PointJ = listPoints[triangulation[i][2]]
       PointK = listPoints[triangulation[i][3]]
       if(triangulation[i].type == "bbox") then
-         output = output .. "draw (".. PointI.x ..",".. PointI.y ..")*u--("..PointJ.x..",".. PointJ.y ..")*u--("..PointK.x..",".. PointK.y ..")*u--cycle withcolor \\luameshmpcolorBbox;"
+         output = output .. "draw (".. PointI.x ..",".. PointI.y
+            ..")*u--("..PointJ.x..",".. PointJ.y
+            ..")*u--("..PointK.x..",".. PointK.y ..")*u--cycle withcolor \\luameshmpcolorBbox withpen pencircle scaled "..thickness..";"
       else
-         output = output .. "draw (".. PointI.x ..",".. PointI.y ..")*u--("..PointJ.x..",".. PointJ.y ..")*u--("..PointK.x..",".. PointK.y ..")*u--cycle withcolor \\luameshmpcolor;"
+         output = output .. "draw (".. PointI.x ..",".. PointI.y
+            ..")*u--("..PointJ.x..",".. PointJ.y
+            ..")*u--("..PointK.x..",".. PointK.y ..")*u--cycle withcolor \\luameshmpcolor withpen pencircle scaled "..thickness..";"
       end
    end
    if(points=="points") then
@@ -273,37 +282,37 @@
 
 
 -- buildMesh with MP
-function buildMeshMPBW(chaine,mode,points,bbox,scale)
+function buildMeshMPBW(chaine,mode,points,bbox,scale,thickness)
    local listPoints = buildList(chaine, mode)
    local triangulation = BowyerWatson(listPoints,bbox)
-   output = traceMeshMP(listPoints, triangulation,points)
-   output = "\\leavevmode\\begin{mplibcode}beginfig(0);u:="..scale.. ";" .. output .."endfig;\\end{mplibcode}"
+   output = traceMeshMP(listPoints, triangulation,points,thickness)
+   output = "\\leavevmode\\begin{mplibcode}[luamesh]beginfig(0);u:="..scale.. ";" .. output .."endfig;\\end{mplibcode}"
    tex.sprint(output)
 end
 
 -- buildMesh with MP include code
-function buildMeshMPBWinc(chaine,beginning, ending,mode,points,bbox,scale)
+function buildMeshMPBWinc(chaine,beginning, ending,mode,points,bbox,scale,thickness)
    local listPoints = buildList(chaine, mode)
    local triangulation = BowyerWatson(listPoints,bbox)
-   output = traceMeshMP(listPoints, triangulation,points)
-   output = "\\leavevmode\\begin{mplibcode}u:="..scale..";"..beginning .. output .. ending .. "\\end{mplibcode}"
+   output = traceMeshMP(listPoints, triangulation,points,thickness)
+   output = "\\leavevmode\\begin{mplibcode}[luamesh]u:="..scale..";"..beginning .. output .. ending .. "\\end{mplibcode}"
    tex.sprint(output)
 end
 
 -- buildMesh with TikZ
-function buildMeshTikZBW(chaine,mode,points,bbox,scale,color,colorBbox)
+function buildMeshTikZBW(chaine,mode,points,bbox,scale,color,colorBbox,thickness)
    local listPoints = buildList(chaine, mode)
    local triangulation = BowyerWatson(listPoints,bbox)
-   output = traceMeshTikZ(listPoints, triangulation,points,color,colorBbox)
+   output = traceMeshTikZ(listPoints, triangulation,points,color,colorBbox,thickness)
    output = "\\noindent\\begin{tikzpicture}[x=" .. scale .. ",y=" .. scale .."]" .. output .."\\end{tikzpicture}"
    tex.sprint(output)
 end
 
 -- buildMesh with TikZ
-function buildMeshTikZBWinc(chaine,beginning, ending,mode,points,bbox,scale,color,colorBbox)
+function buildMeshTikZBWinc(chaine,beginning, ending,mode,points,bbox,scale,color,colorBbox,thickness)
    local listPoints = buildList(chaine, mode)
    local triangulation = BowyerWatson(listPoints,bbox)
-   output = traceMeshTikZ(listPoints, triangulation,points,color,colorBbox)
+   output = traceMeshTikZ(listPoints, triangulation,points,color,colorBbox,thickness)
    output = "\\noindent\\begin{tikzpicture}[x=" .. scale .. ",y=" .. scale .."]" ..beginning.. output..ending .."\\end{tikzpicture}"
    tex.sprint(output)
 end
@@ -373,7 +382,7 @@
       listPoints = buildBoundingBox(listPoints)
    end
    output = tracePointsMP(listPoints,points)
-   output = "\\leavevmode\\begin{mplibcode}beginfig(0);u:="..scale.. ";" .. output .."endfig;\\end{mplibcode}"
+   output = "\\leavevmode\\begin{mplibcode}[luamesh]beginfig(0);u:="..scale.. ";" .. output .."endfig;\\end{mplibcode}"
    tex.sprint(output)
 end
 
@@ -385,7 +394,7 @@
       listPoints = buildBoundingBox(listPoints)
    end
    output = tracePointsMP(listPoints,points)
-   output = "\\leavevmode\\begin{mplibcode}u:="..scale..";"..beginning .. output .. ending .. "\\end{mplibcode}"
+   output = "\\leavevmode\\begin{mplibcode}[luamesh]u:="..scale..";"..beginning .. output .. ending .. "\\end{mplibcode}"
    tex.sprint(output)
 end
 
@@ -422,7 +431,8 @@
 
 
 --
-function TeXaddOnePointTikZ(listPoints,P,step,bbox,color,colorBack, colorNew, colorCircle,colorBbox)
+function TeXaddOnePointTikZ(listPoints,P,step,bbox,color,colorBack, colorNew,
+                            colorCircle,colorBbox,thickness,thicknessCircle,thicknessAdd)
    output = ""
    -- build the triangulation
    local triangulation = BowyerWatson(listPoints,bbox)
@@ -437,9 +447,9 @@
          PointJ = listPoints[triangulation[i][2]]
          PointK = listPoints[triangulation[i][3]]
          if(triangulation[i].type == "bbox") then
-            output = output .. "\\draw[color="..colorBbox.."] (".. PointI.x ..",".. PointI.y ..")--("..PointJ.x..",".. PointJ.y ..")--("..PointK.x..",".. PointK.y ..")--cycle;"
+            output = output .. "\\draw[color="..colorBbox..",line width="..thickness.."] (".. PointI.x ..",".. PointI.y ..")--("..PointJ.x..",".. PointJ.y ..")--("..PointK.x..",".. PointK.y ..")--cycle;"
          else
-            output = output .. "\\draw[color="..color.."] (".. PointI.x ..",".. PointI.y ..")--("..PointJ.x..",".. PointJ.y ..")--("..PointK.x..",".. PointK.y ..")--cycle;"
+            output = output .. "\\draw[color="..color..",line width="..thickness.."] (".. PointI.x ..",".. PointI.y ..")--("..PointJ.x..",".. PointJ.y ..")--("..PointK.x..",".. PointK.y ..")--cycle;"
          end
       end
       -- draw and fill the bad triangle
@@ -447,7 +457,7 @@
          PointI = listPoints[triangulation[badTriangles[i]][1]]
          PointJ = listPoints[triangulation[badTriangles[i]][2]]
          PointK = listPoints[triangulation[badTriangles[i]][3]]
-         output = output .. "\\draw[fill="..colorBack.."] (".. PointI.x ..",".. PointI.y ..")--("..PointJ.x..",".. PointJ.y ..")--("..PointK.x..",".. PointK.y ..")--cycle;"
+         output = output .. "\\draw[fill="..colorBack..",line width="..thickness.."] (".. PointI.x ..",".. PointI.y ..")--("..PointJ.x..",".. PointJ.y ..")--("..PointK.x..",".. PointK.y ..")--cycle;"
       end
       -- draw the circoncircle
       for i=1,#badTriangles do
@@ -455,7 +465,7 @@
          PointJ = listPoints[triangulation[badTriangles[i]][2]]
          PointK = listPoints[triangulation[badTriangles[i]][3]]
          center, radius = circoncircle(PointI, PointJ, PointK)
-         output = output .. "\\draw[dashed, color="..colorCircle.."] ("..center.x .. "," .. center.y .. ") circle ("..radius ..");"
+         output = output .. "\\draw[dashed, color="..colorCircle..",line width="..thicknessCircle.."] ("..center.x .. "," .. center.y .. ") circle ("..radius ..");"
       end
       -- mark the points
       j=1
@@ -482,9 +492,9 @@
          PointJ = listPoints[triangulation[i][2]]
          PointK = listPoints[triangulation[i][3]]
          if(triangulation[i].type == "bbox") then
-            output = output .. "\\draw[color="..colorBbox.."] (".. PointI.x ..",".. PointI.y ..")--("..PointJ.x..",".. PointJ.y ..")--("..PointK.x..",".. PointK.y ..")--cycle;"
+            output = output .. "\\draw[color="..colorBbox..",line width="..thickness.."] (".. PointI.x ..",".. PointI.y ..")--("..PointJ.x..",".. PointJ.y ..")--("..PointK.x..",".. PointK.y ..")--cycle;"
          else
-            output = output .. "\\draw[color="..color.."] (".. PointI.x ..",".. PointI.y ..")--("..PointJ.x..",".. PointJ.y ..")--("..PointK.x..",".. PointK.y ..")--cycle;"
+            output = output .. "\\draw[color="..color..",line width="..thickness.."] (".. PointI.x ..",".. PointI.y ..")--("..PointJ.x..",".. PointJ.y ..")--("..PointK.x..",".. PointK.y ..")--cycle;"
          end
       end
       -- fill and draw the cavity
@@ -493,7 +503,7 @@
          PointI = listPoints[polyNew[i]]
          path = path .. "(".. PointI.x ..",".. PointI.y ..")--"
       end
-      output = output .. "\\draw[color="..colorNew..",fill ="..colorBack..", thick] " .. path .. "cycle;"
+      output = output .. "\\draw[color="..colorNew..",fill ="..colorBack..",line width="..thicknessAdd.."] " .. path .. "cycle;"
       -- mark the points of the mesh
       j=1
       for i=1,#listPoints do
@@ -519,9 +529,9 @@
          PointJ = listPoints[triangulation[i][2]]
          PointK = listPoints[triangulation[i][3]]
          if(triangulation[i].type == "bbox") then
-            output = output .. "\\draw[color="..colorBbox.."] (".. PointI.x ..",".. PointI.y ..")--("..PointJ.x..",".. PointJ.y ..")--("..PointK.x..",".. PointK.y ..")--cycle;"
+            output = output .. "\\draw[color="..colorBbox..",line width="..thickness.."] (".. PointI.x ..",".. PointI.y ..")--("..PointJ.x..",".. PointJ.y ..")--("..PointK.x..",".. PointK.y ..")--cycle;"
          else
-            output = output .. "\\draw[color="..color.."] (".. PointI.x ..",".. PointI.y ..")--("..PointJ.x..",".. PointJ.y ..")--("..PointK.x..",".. PointK.y ..")--cycle;"
+            output = output .. "\\draw[color="..color..",line width="..thickness.."] (".. PointI.x ..",".. PointI.y ..")--("..PointJ.x..",".. PointJ.y ..")--("..PointK.x..",".. PointK.y ..")--cycle;"
          end
       end
       -- fill and draw the cavity
@@ -530,12 +540,12 @@
          PointI = listPoints[polyNew[i]]
          path = path .. "(".. PointI.x ..",".. PointI.y ..")--"
       end
-      output = output .. "\\draw[color="..colorNew..",fill ="..colorBack..", thick] " .. path .. "cycle;"
+      output = output .. "\\draw[color="..colorNew..",fill ="..colorBack..",line width="..1.1*thickWithoutPT.."pt] " .. path .. "cycle;"
       -- draw the new triangles composed by the edges of the polygon and the added point
       for i=1,#polygon do
-         output = output .. "\\draw[color=TeXCluaMeshNewTikZ, thick]".."(".. listPoints[polygon[i][1]].x .. "," .. listPoints[polygon[i][1]].y .. ") -- (" .. listPoints[polygon[i][2]].x .. "," .. listPoints[polygon[i][2]].y ..");"
-         output = output .. "\\draw[color="..colorNew..", thick]".."(".. listPoints[polygon[i][1]].x .. "," .. listPoints[polygon[i][1]].y .. ") -- (" .. P.x .. "," .. P.y ..");"
-         output = output .. "\\draw[color="..colorNew..", thick]".."(".. listPoints[polygon[i][2]].x .. "," .. listPoints[polygon[i][2]].y .. ") -- (" .. P.x .. "," .. P.y ..");"
+         output = output .. "\\draw[color=TeXCluaMeshNewTikZ,line width="..thicknessAdd.."]".."(".. listPoints[polygon[i][1]].x .. "," .. listPoints[polygon[i][1]].y .. ") -- (" .. listPoints[polygon[i][2]].x .. "," .. listPoints[polygon[i][2]].y ..");"
+         output = output .. "\\draw[color="..colorNew..",line width="..thicknessAdd.."]".."(".. listPoints[polygon[i][1]].x .. "," .. listPoints[polygon[i][1]].y .. ") -- (" .. P.x .. "," .. P.y ..");"
+         output = output .. "\\draw[color="..colorNew..",line width="..thicknessAdd.."]".."(".. listPoints[polygon[i][2]].x .. "," .. listPoints[polygon[i][2]].y .. ") -- (" .. P.x .. "," .. P.y ..");"
       end
       -- mark points
       j=1
@@ -553,7 +563,7 @@
    return output
 end
 
-function TeXaddOnePointMPBW(listPoints,P,step,bbox)
+function TeXaddOnePointMPBW(listPoints,P,step,bbox,thickness,thicknessCircle,thicknessAdd)
    output = "";
    output = output .. "pair MeshPoints[];"
    -- build the triangulation
@@ -571,9 +581,9 @@
          PointJ = listPoints[triangulation[i][2]]
          PointK = listPoints[triangulation[i][3]]
          if(triangulation[i].type == "bbox") then
-            output = output .. "draw (".. PointI.x ..",".. PointI.y ..")*u--("..PointJ.x..",".. PointJ.y ..")*u--("..PointK.x..",".. PointK.y ..")*u--cycle withcolor \\luameshmpcolorBbox;"
+            output = output .. "draw (".. PointI.x ..",".. PointI.y ..")*u--("..PointJ.x..",".. PointJ.y ..")*u--("..PointK.x..",".. PointK.y ..")*u--cycle withcolor \\luameshmpcolorBbox  withpen pencircle scaled"..thickness..";"
          else
-            output = output .. "draw (".. PointI.x ..",".. PointI.y ..")*u--("..PointJ.x..",".. PointJ.y ..")*u--("..PointK.x..",".. PointK.y ..")*u--cycle withcolor \\luameshmpcolor;"
+            output = output .. "draw (".. PointI.x ..",".. PointI.y ..")*u--("..PointJ.x..",".. PointJ.y ..")*u--("..PointK.x..",".. PointK.y ..")*u--cycle withcolor \\luameshmpcolor  withpen pencircle scaled"..thickness..";"
          end
       end
       -- draw and fill the bad triangle
@@ -581,8 +591,8 @@
          PointI = listPoints[triangulation[badTriangles[i]][1]]
          PointJ = listPoints[triangulation[badTriangles[i]][2]]
          PointK = listPoints[triangulation[badTriangles[i]][3]]
-         output = output .. "draw (".. PointI.x ..",".. PointI.y ..")*u--("..PointJ.x..",".. PointJ.y ..")*u--("..PointK.x..",".. PointK.y ..")*u--cycle withcolor \\luameshmpcolor;"
          output = output .. "fill (".. PointI.x ..",".. PointI.y ..")*u--("..PointJ.x..",".. PointJ.y ..")*u--("..PointK.x..",".. PointK.y ..")*u--cycle withcolor \\luameshmpcolorBack;"
+         output = output .. "draw (".. PointI.x ..",".. PointI.y ..")*u--("..PointJ.x..",".. PointJ.y ..")*u--("..PointK.x..",".. PointK.y ..")*u--cycle withcolor \\luameshmpcolor  withpen pencircle scaled"..thickness..";"
       end
       -- draw the circoncircle
       for i=1,#badTriangles do
@@ -590,7 +600,7 @@
          PointJ = listPoints[triangulation[badTriangles[i]][2]]
          PointK = listPoints[triangulation[badTriangles[i]][3]]
          center, radius = circoncircle(PointI, PointJ, PointK)
-         output = output .. "draw fullcircle scaled ("..radius .."*2u) shifted ("..center.x .. "*u," .. center.y .. "*u) dashed evenly withcolor \\luameshmpcolorCircle;"
+         output = output .. "draw fullcircle scaled ("..radius .."*2u) shifted ("..center.x .. "*u," .. center.y .. "*u) dashed evenly withcolor \\luameshmpcolorCircle  withpen pencircle scaled"..thicknessCircle..";"
       end
       -- mark the points
       j=1
@@ -617,9 +627,9 @@
          PointJ = listPoints[triangulation[i][2]]
          PointK = listPoints[triangulation[i][3]]
          if(triangulation[i].type == "bbox") then
-            output = output .. "draw (".. PointI.x ..",".. PointI.y ..")*u--("..PointJ.x..",".. PointJ.y ..")*u--("..PointK.x..",".. PointK.y ..")*u--cycle withcolor \\luameshmpcolorBbox;"
+            output = output .. "draw (".. PointI.x ..",".. PointI.y..")*u--("..PointJ.x..",".. PointJ.y ..")*u--("..PointK.x..",".. PointK.y..")*u--cycle withcolor \\luameshmpcolorBbox withpen pencircle scaled"..thickness..";"
          else
-            output = output .. "draw (".. PointI.x ..",".. PointI.y ..")*u--("..PointJ.x..",".. PointJ.y ..")*u--("..PointK.x..",".. PointK.y ..")*u--cycle withcolor \\luameshmpcolor;"
+            output = output .. "draw (".. PointI.x ..",".. PointI.y..")*u--("..PointJ.x..",".. PointJ.y ..")*u--("..PointK.x..",".. PointK.y ..")*u--cycle withcolor \\luameshmpcolor withpen pencircle scaled"..thickness..";"
          end
       end
       -- fill and draw the cavity
@@ -629,7 +639,7 @@
          path = path .. "(".. PointI.x ..",".. PointI.y ..")*u--"
       end
       output = output .. "fill " .. path .. "cycle withcolor \\luameshmpcolorBack;"
-      output = output .. "draw " .. path .. "cycle withcolor \\luameshmpcolorNew  withpen pencircle scaled 1pt;"
+      output = output .. "draw " .. path .. "cycle withcolor \\luameshmpcolorNew  withpen pencircle scaled"..thicknessAdd..";"
       -- mark the points of the mesh
       j=1
       for i=1,#listPoints do
@@ -655,9 +665,9 @@
          PointJ = listPoints[triangulation[i][2]]
          PointK = listPoints[triangulation[i][3]]
          if(triangulation[i].type == "bbox") then
-            output = output .. "draw (".. PointI.x ..",".. PointI.y ..")*u--("..PointJ.x..",".. PointJ.y ..")*u--("..PointK.x..",".. PointK.y ..")*u--cycle withcolor \\luameshmpcolorBbox;"
+            output = output .. "draw (".. PointI.x ..",".. PointI.y ..")*u--("..PointJ.x..",".. PointJ.y ..")*u--("..PointK.x..",".. PointK.y ..")*u--cycle withcolor \\luameshmpcolorBbox withpen pencircle scaled"..thickness..";"
          else
-            output = output .. "draw (".. PointI.x ..",".. PointI.y ..")*u--("..PointJ.x..",".. PointJ.y ..")*u--("..PointK.x..",".. PointK.y ..")*u--cycle withcolor \\luameshmpcolor;"
+            output = output .. "draw (".. PointI.x ..",".. PointI.y ..")*u--("..PointJ.x..",".. PointJ.y ..")*u--("..PointK.x..",".. PointK.y ..")*u--cycle withcolor \\luameshmpcolor withpen pencircle scaled"..thickness..";"
          end
       end
       -- fill  the cavity
@@ -669,9 +679,9 @@
       output = output .. "fill " .. path .. "cycle withcolor \\luameshmpcolorBack;"
       -- draw the new triangles composed by the edges of the polygon and the added point
       for i=1,#polygon do
-         output = output .. "draw".."(".. listPoints[polygon[i][1]].x .. "," .. listPoints[polygon[i][1]].y .. ")*u -- (" .. listPoints[polygon[i][2]].x .. "," .. listPoints[polygon[i][2]].y ..")*u withcolor \\luameshmpcolorNew  withpen pencircle scaled 1pt;"
-         output = output .. "draw".."(".. listPoints[polygon[i][1]].x .. "," .. listPoints[polygon[i][1]].y .. ")*u -- (" .. P.x .. "," .. P.y ..")*u withcolor \\luameshmpcolorNew withpen pencircle scaled 1pt;"
-         output = output .. "draw".."(".. listPoints[polygon[i][2]].x .. "," .. listPoints[polygon[i][2]].y .. ")*u -- (" .. P.x .. "," .. P.y ..")*u withcolor \\luameshmpcolorNew withpen pencircle scaled 1pt;"
+         output = output .. "draw".."(".. listPoints[polygon[i][1]].x .. "," .. listPoints[polygon[i][1]].y .. ")*u -- (" .. listPoints[polygon[i][2]].x .. "," .. listPoints[polygon[i][2]].y ..")*u withcolor \\luameshmpcolorNew withpen pencircle scaled"..thicknessAdd..";"
+         output = output .. "draw".."(".. listPoints[polygon[i][1]].x .. "," .. listPoints[polygon[i][1]].y .. ")*u -- (" .. P.x .. "," .. P.y ..")*u withcolor \\luameshmpcolorNew withpen pencircle scaled"..thicknessAdd..";"
+         output = output .. "draw".."(".. listPoints[polygon[i][2]].x .. "," .. listPoints[polygon[i][2]].y .. ")*u -- (" .. P.x .. "," .. P.y ..")*u withcolor \\luameshmpcolorNew withpen pencircle scaled"..thicknessAdd..";"
       end
       -- mark points
       j=1
@@ -690,7 +700,8 @@
 end
 
 
-function TeXOnePointTikZBW(chaine,point,step,scale,mode,bbox,color,colorBack,colorNew,colorCircle,colorBbox)
+function
+   TeXOnePointTikZBW(chaine,point,step,scale,mode,bbox,color,colorBack,colorNew,colorCircle,colorBbox,thickness,thicknessCircle,thicknessAdd)
    local listPoints = {}
    if(mode=="int") then
       Sx,Sy=string.match(point,"%((.+),(.+)%)")
@@ -700,12 +711,12 @@
       -- point is a number
       P, listPoints = buildListExt(chaine,tonumber(point))
    end
-   output = TeXaddOnePointTikZ(listPoints,P,step,bbox,color,colorBack,colorNew,colorCircle,colorBbox)
+   output = TeXaddOnePointTikZ(listPoints,P,step,bbox,color,colorBack,colorNew,colorCircle,colorBbox,thickness,thicknessCircle,thicknessAdd)
    output = "\\noindent\\begin{tikzpicture}[x="..scale..",y="..scale.."]".. output .. "\\end{tikzpicture}"
    tex.sprint(output)
 end
 
-function TeXOnePointTikZBWinc(chaine,point,beginning, ending,step,scale,mode,bbox,color,colorBack,colorNew,colorCircle,colorBbox)
+function TeXOnePointTikZBWinc(chaine,point,beginning, ending,step,scale,mode,bbox,color,colorBack,colorNew,colorCircle,colorBbox,thickness,thicknessCircle,thicknessAdd)
    local listPoints = {}
    if(mode=="int") then
       Sx,Sy=string.match(point,"%((.+),(.+)%)")
@@ -715,12 +726,12 @@
       -- point is a number
       P, listPoints = buildListExt(chaine,tonumber(point))
    end
-   output = TeXaddOnePointTikZ(listPoints,P,step,bbox,color,colorBack,colorNew,colorCircle,colorBbox)
+   output = TeXaddOnePointTikZ(listPoints,P,step,bbox,color,colorBack,colorNew,colorCircle,colorBbox,thickness,thicknessCircle,thicknessAdd)
    output = "\\noindent\\begin{tikzpicture}[x="..scale..",y="..scale.."]".. beginning..output ..ending.. "\\end{tikzpicture}"
    tex.sprint(output)
 end
 
-function TeXOnePointMPBW(chaine,point,step,scale,mode,bbox)
+function TeXOnePointMPBW(chaine,point,step,scale,mode,bbox,thickness,thicknessCircle,thicknessAdd)
    local listPoints = {}
    if(mode=="int") then
       Sx,Sy=string.match(point,"%((.+),(.+)%)")
@@ -730,12 +741,12 @@
       -- point is a number
       P, listPoints = buildListExt(chaine,tonumber(point))
    end
-   output = TeXaddOnePointMPBW(listPoints,P,step,bbox)
-   output = "\\leavevmode\\begin{mplibcode}beginfig(0);u:="..scale..";".. output .. "endfig;\\end{mplibcode}"
+   output = TeXaddOnePointMPBW(listPoints,P,step,bbox,thickness,thicknessCircle,thicknessAdd)
+   output = "\\leavevmode\\begin{mplibcode}[luamesh]beginfig(0);u:="..scale..";".. output .. "endfig;\\end{mplibcode}"
    tex.sprint(output)
 end
 
-function TeXOnePointMPBWinc(chaine,point,beginning,ending,step,scale,mode,bbox)
+function TeXOnePointMPBWinc(chaine,point,beginning,ending,step,scale,mode,bbox,thickness,thicknessCircle,thicknessAdd)
    local listPoints = {}
    if(mode=="int") then
       Sx,Sy=string.match(point,"%((.+),(.+)%)")
@@ -745,23 +756,23 @@
       -- point is a number
       P, listPoints = buildListExt(chaine,tonumber(point))
    end
-   output = TeXaddOnePointMPBW(listPoints,P,step,bbox)
-   output = "\\begin{mplibcode}u:="..scale..";"..beginning .. output .. ending .. "\\end{mplibcode}"
+   output = TeXaddOnePointMPBW(listPoints,P,step,bbox,thickness,thicknessCircle,thicknessAdd)
+   output = "\\begin{mplibcode}[luamesh]u:="..scale..";"..beginning .. output .. ending .. "\\end{mplibcode}"
    tex.sprint(output)
 end
 
 
-function drawGmshMP(file,points,scale)
+function drawGmshMP(file,points,scale,thickness)
    local listPoints,triangulation = readGmsh(file)
-   output = traceMeshMP(listPoints,triangulation,points)
-   output = "\\leavevmode\\begin{mplibcode}beginfig(0);u:="..scale.. ";" .. output .."endfig;\\end{mplibcode}"
+   output = traceMeshMP(listPoints,triangulation,points,thickness)
+   output = "\\leavevmode\\begin{mplibcode}[luamesh]beginfig(0);u:="..scale.. ";" .. output .."endfig;\\end{mplibcode}"
    tex.sprint(output)
 end
 
-function drawGmshMPinc(file,beginning,ending,points,scale)
+function drawGmshMPinc(file,beginning,ending,points,scale,thickness)
    local listPoints,triangulation = readGmsh(file)
-   output = traceMeshMP(listPoints,triangulation,points)
-   output = "\\leavevmode\\begin{mplibcode}u:="..scale..";"..beginning .. output .. ending .. "\\end{mplibcode}"
+   output = traceMeshMP(listPoints,triangulation,points,thickness)
+   output = "\\leavevmode\\begin{mplibcode}[luamesh]u:="..scale..";"..beginning .. output .. ending .. "\\end{mplibcode}"
    tex.sprint(output)
 end
 
@@ -768,17 +779,17 @@
 
 
 --
-function drawGmshTikZ(file,points,scale,color)
+function drawGmshTikZ(file,points,scale,color,thickness)
    local listPoints,triangulation = readGmsh(file)
-   output = traceMeshTikZ(listPoints, triangulation,points,color,colorBbox)
+   output = traceMeshTikZ(listPoints, triangulation,points,color,colorBbox,thickness)
    output = "\\noindent\\begin{tikzpicture}[x=" .. scale .. ",y=" .. scale .."]" .. output .."\\end{tikzpicture}"
    tex.sprint(output)
 end
 
 --
-function drawGmshTikZinc(file,beginning, ending,points,scale,color)
+function drawGmshTikZinc(file,beginning, ending,points,scale,color,thickness)
    local listPoints,triangulation = readGmsh(file)
-   output = traceMeshTikZ(listPoints, triangulation,points,color,colorBbox)
+   output = traceMeshTikZ(listPoints, triangulation,points,color,colorBbox,thickness)
    output = "\\noindent\\begin{tikzpicture}[x=" .. scale .. ",y=" .. scale .."]" ..beginning.. output..ending .."\\end{tikzpicture}"
    tex.sprint(output)
 end
@@ -785,39 +796,39 @@
 
 
 -- buildVoronoi with MP
-function gmshVoronoiMP(file,points,scale,tri,styleD,styleV)
+function gmshVoronoiMP(file,points,scale,tri,styleD,styleV,thickness,thicknessVoronoi)
    local listPoints,triangulation = readGmsh(file)
    local listVoronoi = buildVoronoi(listPoints, triangulation)
-   output = traceVoronoiMP(listPoints,triangulation,listVoronoi,points,tri,styleD,styleV)
-   output = "\\leavevmode\\begin{mplibcode}beginfig(0);u:="..scale.. ";" .. output .."endfig;\\end{mplibcode}"
+   output = traceVoronoiMP(listPoints,triangulation,listVoronoi,points,tri,styleD,styleV,thickness,thicknessVoronoi)
+   output = "\\leavevmode\\begin{mplibcode}[luamesh]beginfig(0);u:="..scale.. ";" .. output .."endfig;\\end{mplibcode}"
    tex.sprint(output)
 end
 
 
 -- buildVoronoi with TikZ
-function gmshVoronoiTikZ(file,points,scale,tri,color,colorVoronoi,styleD,styleV)
+function gmshVoronoiTikZ(file,points,scale,tri,color,colorVoronoi,styleD,styleV,thickness,thicknessVoronoi)
    local listPoints,triangulation = readGmsh(file)
    local listVoronoi = buildVoronoi(listPoints, triangulation)
-   output = traceVoronoiTikZ(listPoints,triangulation,listVoronoi,points,tri,color,colorBbox,colorVoronoi,styleD,styleV)
+   output = traceVoronoiTikZ(listPoints,triangulation,listVoronoi,points,tri,color,colorBbox,colorVoronoi,styleD,styleV,thickness,thicknessVoronoi)
    output = "\\noindent\\begin{tikzpicture}[x=" .. scale .. ",y=" .. scale .."]" .. output .."\\end{tikzpicture}"   tex.sprint(output)
 end
 
 
 -- buildVoronoi with MP
-function gmshVoronoiMPinc(file,beginning, ending,points,scale,tri,styleD,styleV)
+function gmshVoronoiMPinc(file,beginning, ending,points,scale,tri,styleD,styleV,thickness,thicknessVoronoi)
    local listPoints,triangulation = readGmsh(file)
    local listVoronoi = buildVoronoi(listPoints, triangulation)
-   output = traceVoronoiMP(listPoints,triangulation,listVoronoi,points,tri,styleD,styleV)
-   output = "\\leavevmode\\begin{mplibcode}u:="..scale..";"..beginning .. output .. ending .. "\\end{mplibcode}"
+   output = traceVoronoiMP(listPoints,triangulation,listVoronoi,points,tri,styleD,styleV,thickness,thicknessVoronoi)
+   output = "\\leavevmode\\begin{mplibcode}[luamesh]u:="..scale..";"..beginning .. output .. ending .. "\\end{mplibcode}"
    tex.sprint(output)
 end
 
 
 -- buildVoronoi with TikZ
-function gmshVoronoiTikZinc(file,beginning, ending,points,scale,tri,color,colorVoronoi,styleD,styleV)
+function gmshVoronoiTikZinc(file,beginning, ending,points,scale,tri,color,colorVoronoi,styleD,styleV,thickness,thicknessVoronoi)
    local listPoints,triangulation = readGmsh(file)
    local listVoronoi = buildVoronoi(listPoints, triangulation)
-   output = traceVoronoiTikZ(listPoints,triangulation,listVoronoi,points,tri,color,colorBbox,colorVoronoi,styleD,styleV)
+   output = traceVoronoiTikZ(listPoints,triangulation,listVoronoi,points,tri,color,colorBbox,colorVoronoi,styleD,styleV,thickness,thicknessVoronoi)
    output = "\\noindent\\begin{tikzpicture}[x=" .. scale .. ",y=" .. scale .."]" ..beginning.. output..ending .."\\end{tikzpicture}"
    tex.sprint(output)
 end
@@ -852,12 +863,12 @@
 end
 
 
-function  tracePolygonTikZ(polygon,points, colorPoly)
+function  tracePolygonTikZ(polygon,points, colorPoly,polygonThickness)
    output = "";
    for i=1,#polygon do
       output = output .. "\\coordinate (polygon".. i .. ") at  (" .. polygon[i].x .. "," .. polygon[i].y .. ");"
    end
-   output = output .. "\\draw[color=".. colorPoly .. ", thick]"
+   output = output .. "\\draw[color=".. colorPoly .. ", ,line width="..polygonThickness.."]"
    for i=1,#polygon do
       output = output .. "(" .. polygon[i].x .. "," .. polygon[i].y .. ") -- "
    end
@@ -878,7 +889,7 @@
 
 
 function drawMeshPolygonMP(chaine,mode,h,step,
-                             points,scale,random)
+                             points,scale,random,thickness,polygonThickness)
    local polygon = buildList(chaine, mode)
    polygon = addPointsPolygon(polygon,h)
    local grid = buildGrid(polygon,h,random)
@@ -900,11 +911,11 @@
    if(step=="mesh") then
       -- polygon + mesh
       triangulation = BowyerWatson(listPoints,"none") -- no bbox
-      output = traceMeshMP(listPoints,triangulation,points)
+      output = traceMeshMP(listPoints,triangulation,points,thickness)
       output = output .. tracePolygonMP(polygon,points)
    end
 
-   output = "\\leavevmode\\begin{mplibcode}beginfig(0);u:="..scale.. ";" .. output .."endfig;\\end{mplibcode}"
+   output = "\\leavevmode\\begin{mplibcode}[luamesh]beginfig(0);u:="..scale.. ";" .. output .."endfig;\\end{mplibcode}"
    tex.sprint(output)
 end
 
@@ -911,7 +922,7 @@
 
 
 function drawMeshPolygonTikZ(chaine,mode,h,step,
-                             points,scale,color,colorPoly,random)
+                             points,scale,color,colorPoly,random,thickness,polygonThickness)
    local polygon = buildList(chaine, mode)
    polygon = addPointsPolygon(polygon,h)
    local grid = buildGrid(polygon,h,random)
@@ -918,23 +929,23 @@
    local listPoints = addGridPoints(polygon,grid,h)
    if(step=="polygon") then
       -- the polygon
-      output = tracePolygonTikZ(polygon,points,colorPoly)
+      output = tracePolygonTikZ(polygon,points,colorPoly,polygonThickness)
    end
    if(step=="grid") then
       -- polygon + grid
       output = tracePointsTikZ(grid,points,color,"none") -- none for colorBbox
-      output = output .. tracePolygonTikZ(polygon,points,colorPoly)
+      output = output .. tracePolygonTikZ(polygon,points,colorPoly,polygonThickness)
    end
    if(step=="points") then
       -- polygon + only grid points inside the polygon
       output = tracePointsTikZ(listPoints,points,color,"none")
-      output = output .. tracePolygonTikZ(polygon,points,colorPoly)
+      output = output .. tracePolygonTikZ(polygon,points,colorPoly,polygonThickness)
    end
    if(step=="mesh") then
       -- polygon + mesh
       triangulation = BowyerWatson(listPoints,"none") -- no bbox
-      output = traceMeshTikZ(listPoints,triangulation,points,color,"none")
-      output = output .. tracePolygonTikZ(polygon,points,colorPoly)
+      output = traceMeshTikZ(listPoints,triangulation,points,color,"none",thickness)
+      output = output .. tracePolygonTikZ(polygon,points,colorPoly,polygonThickness)
    end
    output = "\\noindent\\begin{tikzpicture}[x=" .. scale .. ",y=" .. scale .."]" .. output .."\\end{tikzpicture}"
    tex.sprint(output)
@@ -941,7 +952,7 @@
 end
 
 function drawMeshPolygonMPinc(chaine,beginning,ending,mode,h,step,
-                             points,scale,random)
+                             points,scale,random,thickness,polygonThickness)
    local polygon = buildList(chaine, mode)
    polygon = addPointsPolygon(polygon,h)
    local grid = buildGrid(polygon,h,random)
@@ -963,10 +974,10 @@
    if(step=="mesh") then
       -- polygon + mesh
       triangulation = BowyerWatson(listPoints,"none") -- no bbox
-      output = traceMeshMP(listPoints,triangulation,points)
+      output = traceMeshMP(listPoints,triangulation,points,thickness)
       output = output .. tracePolygonMP(polygon,points)
    end
-   output = "\\begin{mplibcode}u:="..scale..";"..beginning .. output .. ending .. "\\end{mplibcode}"
+   output = "\\begin{mplibcode}[luamesh]u:="..scale..";"..beginning .. output .. ending .. "\\end{mplibcode}"
    tex.sprint(output)
 end
 
@@ -973,7 +984,7 @@
 
 
 function drawMeshPolygonTikZinc(chaine,beginning,ending,mode,h,step,
-                             points,scale,color,colorPoly,random)
+                             points,scale,color,colorPoly,random,thickness,polygonThickness)
    local polygon = buildList(chaine, mode)
    polygon = addPointsPolygon(polygon,h)
    local grid = buildGrid(polygon,h,random)
@@ -995,7 +1006,7 @@
    if(step=="mesh") then
       -- polygon + mesh
       triangulation = BowyerWatson(listPoints,"none") -- no bbox
-      output = traceMeshTikZ(listPoints,triangulation,points,color,"none")
+      output = traceMeshTikZ(listPoints,triangulation,points,color,"none",thickness)
       output = output .. tracePolygonTikZ(polygon,points,colorPoly)
    end
    output = "\\noindent\\begin{tikzpicture}[x="..scale..",y="..scale.."]".. beginning..output ..ending.. "\\end{tikzpicture}"

Modified: trunk/Master/texmf-dist/tex/lualatex/luamesh/luamesh.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/luamesh/luamesh.sty	2022-07-11 20:31:00 UTC (rev 63874)
+++ trunk/Master/texmf-dist/tex/lualatex/luamesh/luamesh.sty	2022-07-11 20:32:11 UTC (rev 63875)
@@ -1,27 +1,19 @@
 \NeedsTeXFormat{LaTeX2e}%
 \def\PackageName{luamesh}%
-\def\fileversion{v0.6}%
-\def\filedate{2020/06/06}%
+\def\fileversion{v0.7}%
+\def\filedate{2022/07/08}%
 \ProvidesPackage{luamesh}[\filedate\space\fileversion]%
 %
 % package to load
 \RequirePackage{xkeyval,xcolor,ifthen}%
-%% one global option: mp or tikz
-%\newif\ifluameshmp%
-%\define at key{luamesh.sty}{mp}[]{\luameshmptrue}%
-%\define at key{luamesh.sty}{tikz}[]{\luameshmpfalse}%
+\RequirePackage{luamplib}%
+\RequirePackage{tikz}%
+
 %
-%\RequirePackage{etoolbox} % pour robustifier les commandes
-%
-%
-%\ifluameshmp%
-   \RequirePackage{luamplib}%
-%\else%
-   \RequirePackage{tikz}%
-%\fi%
-%
 % load the lua code
 \directlua{require("luamesh.lua")}%
+% load metapost lib
+\everymplib[luamesh]{input luamesh;}
 %
 %%
 % for tikz (default value)
@@ -73,8 +65,10 @@
 \define at key{buildMeshInc}{color}[black]{\def\luameshval at bmi@color{#1}}%
 %% the name of the color of drawing the bbox
 \define at key{buildMeshInc}{colorBbox}[black]{\def\luameshval at bmi@colorbbox{#1}}%
+%% thickness of the drawing (default value of tikz)
+\define at key{buildMeshInc}{thickness}[0.4pt]{\def\luameshval at bm@thickness{#1}}%
 %
-\presetkeys{buildMeshInc}{tikz=false,bbox=none,scale, meshpoint,mode=int,print=none,color,colorBbox}{}%
+\presetkeys{buildMeshInc}{tikz=false,bbox=none,scale, meshpoint,mode=int,print=none,color,colorBbox,thickness}{}%
 %
 \newcommand*{\buildMeshBWinc}[4][]{%
   % #1 : optionnal arguments
@@ -86,13 +80,13 @@
   \def\MeshPoint{\luameshval at bmi@meshpoint}%
   \ifKV at buildMeshInc@tikz% if we are using tikz
   \directlua{%
-    buildMeshTikZBWinc("#2","\luaescapestring{\unexpanded{#3}}","\luaescapestring{\unexpanded{#4}}","\luameshval at bmi@mode","\luameshval at bmi@print","\luameshval at bmi@bbox","\luameshval at bmi@scale","\luameshval at bmi@color","\luameshval at bmi@colorbbox")%
+    buildMeshTikZBWinc("#2","\luaescapestring{\unexpanded{#3}}","\luaescapestring{\unexpanded{#4}}","\luameshval at bmi@mode","\luameshval at bmi@print","\luameshval at bmi@bbox","\luameshval at bmi@scale","\luameshval at bmi@color","\luameshval at bmi@colorbbox","\luameshval at bm@thickness")%
   }%
   \else % we are using MP
   \def\luameshmpcolor{\mpcolor{\luameshval at bmi@color}}%
   \def\luameshmpcolorBbox{\mpcolor{\luameshval at bmi@colorbbox}}%
   \directlua{%
-    buildMeshMPBWinc("#2","\luaescapestring{\unexpanded{#3}}","\luaescapestring{\unexpanded{#4}}","\luameshval at bmi@mode","\luameshval at bmi@print","\luameshval at bmi@bbox","\luameshval at bmi@scale")%
+    buildMeshMPBWinc("#2","\luaescapestring{\unexpanded{#3}}","\luaescapestring{\unexpanded{#4}}","\luameshval at bmi@mode","\luameshval at bmi@print","\luameshval at bmi@bbox","\luameshval at bmi@scale","\luameshval at bm@thickness")%
   }%
   %
   \fi%
@@ -135,8 +129,10 @@
 \define at key{buildMesh}{color}[black]{\def\luameshval at bm@color{#1}}%
 %% the name of the color of drawing the bbox
 \define at key{buildMesh}{colorBbox}[black]{\def\luameshval at bm@colorbbox{#1}}%
+%% thickness of the drawing (default value of tikz)
+\define at key{buildMesh}{thickness}[0.4pt]{\def\luameshval at bm@thickness{#1}}%
 %
-\presetkeys{buildMesh}{tikz=false,bbox=none,scale, meshpoint,mode=int,print=none,color,colorBbox}{}%
+\presetkeys{buildMesh}{tikz=false,bbox=none,scale, meshpoint,mode=int,print=none,color,colorBbox,thickness}{}%
 %
 \newcommand{\buildMeshBW}[2][]{%
   % #1 : optionnal arguments
@@ -146,13 +142,13 @@
   \def\MeshPoint{\luameshval at bm@meshpoint}%
   \ifKV at buildMesh@tikz% if we are using tikz
   \directlua{%
-    buildMeshTikZBW("#2","\luameshval at bm@mode","\luameshval at bm@print","\luameshval at bm@bbox","\luameshval at bm@scale","\luameshval at bm@color","\luameshval at bm@colorbbox")%
+    buildMeshTikZBW("#2","\luameshval at bm@mode","\luameshval at bm@print","\luameshval at bm@bbox","\luameshval at bm@scale","\luameshval at bm@color","\luameshval at bm@colorbbox","\luameshval at bm@thickness")%
   }%
   \else % we are using MP
   \def\luameshmpcolor{\mpcolor{\luameshval at bm@color}}%
   \def\luameshmpcolorBbox{\mpcolor{\luameshval at bm@colorbbox}}%
   \directlua{%
-    buildMeshMPBW("#2","\luameshval at bm@mode","\luameshval at bm@print","\luameshval at bm@bbox","\luameshval at bm@scale")%
+    buildMeshMPBW("#2","\luameshval at bm@mode","\luameshval at bm@print","\luameshval at bm@bbox","\luameshval at bm@scale","\luameshval at bm@thickness")%
   }%
   %
   \fi%
@@ -222,7 +218,13 @@
 %% the name of the color of drawing the bbox
 \define at key{buildVoronoiInc}{colorBbox}[black]{\def\luameshval at bvi@colorbbox{#1}}%
 %
-\presetkeys{buildVoronoiInc}{tikz=false,bbox=none,scale, meshpoint,circumpoint,mode=int,print=none,color,colorVoronoi,colorBbox,delaunay=none,styleDelaunay=none,styleVoronoi=none}{}%
+% thickness
+\define at key{buildVoronoiInc}{thickness}[0.4pt]{\def\luameshval at bvi@thickness{#1}}%
+%% voroni thickness
+\define at key{buildVoronoiInc}{thicknessVoronoi}[0.4pt]{\def\luameshval at bvi@thicknessVoronoi{#1}}%
+\presetkeys{buildVoronoiInc}{tikz=false,bbox=none,scale,
+  meshpoint,circumpoint,mode=int,print=none,color,colorVoronoi,colorBbox,delaunay=none,styleDelaunay=none,styleVoronoi=none,thickness,
+thicknessVoronoi}{}%
 %
 \newcommand*{\buildVoronoiBWinc}[4][]{%
   % #1 : optionnal arguments
@@ -235,7 +237,7 @@
   \def\CircumPoint{\luameshval at bvi@circumpoint}%
   \ifKV at buildVoronoiInc@tikz% if we are using tikz
   \directlua{%
-    buildVoronoiTikZBWinc("#2","\luaescapestring{\unexpanded{#3}}","\luaescapestring{\unexpanded{#4}}","\luameshval at bvi@mode","\luameshval at bvi@print","\luameshval at bvi@bbox","\luameshval at bvi@scale","\luameshval at bvi@delaunay","\luameshval at bvi@color","\luameshval at bvi@colorbbox","\luameshval at bvi@colorvoronoi","\luameshval at bvi@styleDelaunay","\luameshval at bvi@styleVoronoi")%
+    buildVoronoiTikZBWinc("#2","\luaescapestring{\unexpanded{#3}}","\luaescapestring{\unexpanded{#4}}","\luameshval at bvi@mode","\luameshval at bvi@print","\luameshval at bvi@bbox","\luameshval at bvi@scale","\luameshval at bvi@delaunay","\luameshval at bvi@color","\luameshval at bvi@colorbbox","\luameshval at bvi@colorvoronoi","\luameshval at bvi@styleDelaunay","\luameshval at bvi@styleVoronoi","\luameshval at bvi@thickness","\luameshval at bvi@thicknessVoronoi")%
   }%
   \else % we are using MP
   \def\luameshmpcolor{\mpcolor{\luameshval at bvi@color}}%
@@ -242,7 +244,7 @@
   \def\luameshmpcolorBbox{\mpcolor{\luameshval at bvi@colorbbox}}%
   \def\luameshmpcolorVoronoi{\mpcolor{\luameshval at bvi@colorvoronoi}}%
   \directlua{%
-    buildVoronoiMPBWinc("#2","\luaescapestring{\unexpanded{#3}}","\luaescapestring{\unexpanded{#4}}","\luameshval at bvi@mode","\luameshval at bvi@print","\luameshval at bvi@bbox","\luameshval at bvi@scale","\luameshval at bvi@delaunay","\luameshval at bvi@styleDelaunay","\luameshval at bvi@styleVoronoi")%
+    buildVoronoiMPBWinc("#2","\luaescapestring{\unexpanded{#3}}","\luaescapestring{\unexpanded{#4}}","\luameshval at bvi@mode","\luameshval at bvi@print","\luameshval at bvi@bbox","\luameshval at bvi@scale","\luameshval at bvi@delaunay","\luameshval at bvi@styleDelaunay","\luameshval at bvi@styleVoronoi","\luameshval at bvi@thickness","\luameshval at bvi@thicknessVoronoi")%
   }%
   %
   \fi%
@@ -311,9 +313,13 @@
 \define at key{buildVoronoi}{colorVoronoi}[red]{\def\luameshval at bv@colorVoronoi{#1}}%
 %% the name of the color of drawing the bbox
 \define at key{buildVoronoi}{colorBbox}[black]{\def\luameshval at bv@colorbbox{#1}}%
+% thickness
+\define at key{buildVoronoi}{thickness}[0.4pt]{\def\luameshval at bv@thickness{#1}}%
+%% voroni thickness
+\define at key{buildVoronoi}{thicknessVoronoi}[0.4pt]{\def\luameshval at bv@thicknessVoronoi{#1}}%
 %
 \presetkeys{buildVoronoi}{tikz=false,bbox=none,scale,
-  meshpoint,circumpoint,mode=int,print=none,color,colorVoronoi,colorBbox,delaunay=none,styleDelaunay=none, styleVoronoi=none}{}%
+  meshpoint,circumpoint,mode=int,print=none,color,colorVoronoi,colorBbox,delaunay=none,styleDelaunay=none, styleVoronoi=none,thickness,thicknessVoronoi}{}%
 %
 \newcommand{\buildVoronoiBW}[2][]{%
   % #1 : optionnal arguments
@@ -324,7 +330,7 @@
   \def\CircumPoint{\luameshval at bv@circumpoint}%
   \ifKV at buildVoronoi@tikz% if we are using tikz
   \directlua{%
-    buildVoronoiTikZBW("#2","\luameshval at bv@mode","\luameshval at bv@print","\luameshval at bv@bbox","\luameshval at bv@scale","\luameshval at bv@delaunay","\luameshval at bv@color","\luameshval at bv@colorbbox","\luameshval at bv@colorVoronoi","\luameshval at bv@styleDelaunay","\luameshval at bv@styleVoronoi")%
+    buildVoronoiTikZBW("#2","\luameshval at bv@mode","\luameshval at bv@print","\luameshval at bv@bbox","\luameshval at bv@scale","\luameshval at bv@delaunay","\luameshval at bv@color","\luameshval at bv@colorbbox","\luameshval at bv@colorVoronoi","\luameshval at bv@styleDelaunay","\luameshval at bv@styleVoronoi","\luameshval at bv@thickness","\luameshval at bv@thicknessVoronoi")%
   }%
   \else % we are using MP
   \def\luameshmpcolor{\mpcolor{\luameshval at bv@color}}%
@@ -331,7 +337,7 @@
   \def\luameshmpcolorBbox{\mpcolor{\luameshval at bv@colorbbox}}%
   \def\luameshmpcolorVoronoi{\mpcolor{\luameshval at bv@colorVoronoi}}%
   \directlua{%
-    buildVoronoiMPBW("#2","\luameshval at bv@mode","\luameshval at bv@print","\luameshval at bv@bbox","\luameshval at bv@scale","\luameshval at bv@delaunay","\luameshval at bv@styleDelaunay","\luameshval at bv@styleVoronoi")%
+    buildVoronoiMPBW("#2","\luameshval at bv@mode","\luameshval at bv@print","\luameshval at bv@bbox","\luameshval at bv@scale","\luameshval at bv@delaunay","\luameshval at bv@styleDelaunay","\luameshval at bv@styleVoronoi","\luameshval at bv@thickness","\luameshval at bv@thicknessVoronoi")%
   }%
   %
   \fi%
@@ -507,7 +513,12 @@
   \def\luameshval at ap@bbox{bbox}%
   \fi%
 }%
-\presetkeys{MeshAddOneBW}{tikz=false,scale, meshpoint,newpoint,color,colorBack,colorNew,colorCircle,step=badtriangles,mode=int,bbox=none,colorBbox}{}%
+%% thickness for mesh and circle and new elements
+\define at key{MeshAddOneBW}{thickness}[0.4pt]{\def\luameshval at ap@thickness{#1}}%
+\define at key{MeshAddOneBW}{thicknessCircle}[0.4pt]{\def\luameshval at ap@thicknesscircle{#1}}%
+\define at key{MeshAddOneBW}{thicknessNew}[1pt]{\def\luameshval at ap@thicknessnew{#1}}%
+
+\presetkeys{MeshAddOneBW}{tikz=false,scale, meshpoint,newpoint,color,colorBack,colorNew,colorCircle,step=badtriangles,mode=int,bbox=none,colorBbox,thickness,thicknessCircle,thicknessNew}{}%
 %
 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \newcommand*{\meshAddPointBW}[3][]{%
@@ -519,7 +530,7 @@
   \def\NewPoint{\luameshval at ap@newpoint}%
   \ifKV at MeshAddOneBW@tikz% if we are using tikz
   \directlua{%
-    TeXOnePointTikZBW("#2","#3","\luameshval at ap@step","\luameshval at ap@scale","\luameshval at ap@mode","\luameshval at ap@bbox","\luameshval at ap@color","\luameshval at ap@colorback","\luameshval at ap@colornew","\luameshval at ap@colorcircle","\luameshval at ap@colorbbox")%
+    TeXOnePointTikZBW("#2","#3","\luameshval at ap@step","\luameshval at ap@scale","\luameshval at ap@mode","\luameshval at ap@bbox","\luameshval at ap@color","\luameshval at ap@colorback","\luameshval at ap@colornew","\luameshval at ap@colorcircle","\luameshval at ap@colorbbox","\luameshval at ap@thickness","\luameshval at ap@thicknesscircle","\luameshval at ap@thicknessnew")%
   }%
   \else % we are using MP
   \def\luameshmpcolor{\mpcolor{\luameshval at ap@color}}
@@ -528,7 +539,7 @@
   \def\luameshmpcolorCircle{\mpcolor{\luameshval at ap@colorcircle}}
   \def\luameshmpcolorBbox{\mpcolor{\luameshval at ap@colorbbox}}
   \directlua{%
-    TeXOnePointMPBW("#2","#3","\luameshval at ap@step","\luameshval at ap@scale","\luameshval at ap@mode","\luameshval at ap@bbox")%
+    TeXOnePointMPBW("#2","#3","\luameshval at ap@step","\luameshval at ap@scale","\luameshval at ap@mode","\luameshval at ap@bbox","\luameshval at ap@thickness","\luameshval at ap@thicknesscircle","\luameshval at ap@thicknessnew")%
   }%
   %
   \fi%
@@ -563,6 +574,12 @@
 %% the color of circoncircle
 \define at key{MeshAddOneBWinc}{colorCircle}[green]{\def\luameshval at api@colorcircle{#1}}%
 \define at key{MeshAddOneBWinc}{colorBbox}[black]{\def\luameshval at api@colorbbox{#1}}%
+%% thickness for mesh and circle and new elements
+\define at key{MeshAddOneBWinc}{thickness}[0.4pt]{\def\luameshval at api@thickness{#1}}%
+\define at key{MeshAddOneBWinc}{thicknessCircle}[0.4pt]{\def\luameshval at api@thicknesscircle{#1}}%
+\define at key{MeshAddOneBWinc}{thicknessNew}[1pt]{\def\luameshval at api@thicknessnew{#1}}%
+
+
 %
 %% a complete picture or some code of the engine
 \define at choicekey*{MeshAddOneBWinc}{mode}[\val\nr]{int, ext}{%
@@ -579,7 +596,7 @@
   \def\luameshval at api@bbox{bbox}%
   \fi%
 }%
-\presetkeys{MeshAddOneBWinc}{tikz=false,scale, meshpoint,newpoint,color,colorBack,colorNew,colorCircle,step=badtriangles,mode=int,bbox=none,colorBbox}{}%
+\presetkeys{MeshAddOneBWinc}{tikz=false,scale, meshpoint,newpoint,color,colorBack,colorNew,colorCircle,step=badtriangles,mode=int,bbox=none,colorBbox,thickness,thicknessCircle,thicknessNew}{}%
 %
 % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 \newcommand*{\meshAddPointBWinc}[5][]{%
@@ -593,7 +610,7 @@
   \def\NewPoint{\luameshval at api@newpoint}%
   \ifKV at MeshAddOneBWinc@tikz% if we are using tikz
   \directlua{%
-    TeXOnePointTikZBWinc("#2","#3","\luaescapestring{\unexpanded{#4}}","\luaescapestring{\unexpanded{#5}}","\luameshval at ap@step","\luameshval at ap@scale","\luameshval at ap@mode","\luameshval at ap@bbox","\luameshval at ap@color","\luameshval at ap@colorback","\luameshval at ap@colornew","\luameshval at ap@colorcircle","\luameshval at ap@colorbbox")%
+    TeXOnePointTikZBWinc("#2","#3","\luaescapestring{\unexpanded{#4}}","\luaescapestring{\unexpanded{#5}}","\luameshval at api@step","\luameshval at api@scale","\luameshval at api@mode","\luameshval at api@bbox","\luameshval at api@color","\luameshval at api@colorback","\luameshval at api@colornew","\luameshval at api@colorcircle","\luameshval at api@colorbbox","\luameshval at api@thickness","\luameshval at api@thicknesscircle","\luameshval at api@thicknessnew")%
   }%
   \else % we are using MP
   \def\luameshmpcolor{\mpcolor{\luameshval at api@color}}
@@ -602,7 +619,7 @@
   \def\luameshmpcolorCircle{\mpcolor{\luameshval at api@colorcircle}}
   \def\luameshmpcolorBbox{\mpcolor{\luameshval at api@colorbbox}}
   \directlua{%
-    TeXOnePointMPBWinc("#2","#3","\luaescapestring{\unexpanded{#4}}","\luaescapestring{\unexpanded{#5}}","\luameshval at api@step","\luameshval at api@scale","\luameshval at api@mode","\luameshval at api@bbox")%
+    TeXOnePointMPBWinc("#2","#3","\luaescapestring{\unexpanded{#4}}","\luaescapestring{\unexpanded{#5}}","\luameshval at api@step","\luameshval at api@scale","\luameshval at api@mode","\luameshval at api@bbox","\luameshval at api@thickness","\luameshval at api@thicknesscircle","\luameshval at api@thicknessnew")%
   }%
   %
   \fi%
@@ -613,21 +630,23 @@
 %% before and after the generated code
 \define at boolkey{drawGmshInc}{tikz}[true]{}%
 %% the scale
-\define at key{drawGmshInc}{scale}[1cm]{\def\luameshvaldgi at scale{#1}}%
+\define at key{drawGmshInc}{scale}[1cm]{\def\luameshval at dgi@scale{#1}}%
 %% print ponits ?
 \define at choicekey*{drawGmshInc}{print}[\val\nr]{none, points}{%
   \ifcase\nr\relax%
-  \def\luameshvaldgi at print{none}%
+  \def\luameshval at dgi@print{none}%
   \or%
-  \def\luameshvaldgi at print{points}%
+  \def\luameshval at dgi@print{points}%
   \fi%
 }%
 %% the name of the point
-\define at key{drawGmshInc}{meshpoint}[P]{\def\luameshvaldgi at meshpoint{#1}}%
+\define at key{drawGmshInc}{meshpoint}[P]{\def\luameshval at dgi@meshpoint{#1}}%
 %% the name of the color of drawing
-\define at key{drawGmshInc}{color}[black]{\def\luameshvaldgi at color{#1}}%
+\define at key{drawGmshInc}{color}[black]{\def\luameshval at dgi@color{#1}}%
+%% thickness
+\define at key{drawGmshInc}{thickness}[0.4pt]{\def\luameshval at dgi@thickness{#1}}%
 %
-\presetkeys{drawGmshInc}{tikz=false,scale, meshpoint,print=none,color}{}%
+\presetkeys{drawGmshInc}{tikz=false,scale, meshpoint,print=none,color,thickness}{}%
 %
 \newcommand*{\drawGmshinc}[4][]{%
   % #1 : optionnal arguments
@@ -635,15 +654,15 @@
   % #3 : the code to place before the generated one
   % #4 : the code to place after the generated one
   \setkeys{drawGmshInc}{#1} %
-  \def\MeshPoint{\luameshvaldgi at meshpoint}%
+  \def\MeshPoint{\luameshval at dgi@meshpoint}%
   \ifKV at drawGmshInc@tikz% if we are using tikz
   \directlua{%
-    drawGmshTikZinc("#2","\luaescapestring{\unexpanded{#3}}","\luaescapestring{\unexpanded{#4}}","\luameshvaldgi at print","\luameshvaldgi at scale","\luameshvaldgi at color")%
+    drawGmshTikZinc("#2","\luaescapestring{\unexpanded{#3}}","\luaescapestring{\unexpanded{#4}}","\luameshval at dgi@print","\luameshval at dgi@scale","\luameshval at dgi@color","\luameshval at dgi@thickness")%
   }%
   \else % we are using MP
-  \def\luameshmpcolor{\mpcolor{\luameshvaldgi at color}}%
+  \def\luameshmpcolor{\mpcolor{\luameshval at dgi@color}}%
   \directlua{%
-    drawGmshMPinc("#2","\luaescapestring{\unexpanded{#3}}","\luaescapestring{\unexpanded{#4}}","\luameshvaldgi at print","\luameshvaldgi at scale")%
+    drawGmshMPinc("#2","\luaescapestring{\unexpanded{#3}}","\luaescapestring{\unexpanded{#4}}","\luameshval at dgi@print","\luameshval at dgi@scale","\luameshval at dgi@thickness")%
   }%
   %
   \fi%
@@ -653,35 +672,37 @@
 %% the code is complete and we don't have any callbacks
 \define at boolkey{drawGmsh}{tikz}[true]{}%
 %% the scale
-\define at key{drawGmsh}{scale}[1cm]{\def\luameshvaldg at scale{#1}}%
+\define at key{drawGmsh}{scale}[1cm]{\def\luameshval at dg@scale{#1}}%
 %% print points
 \define at choicekey*{drawGmsh}{print}[\val\nr]{none, points}{%
   \ifcase\nr\relax%
-  \def\luameshvaldg at print{none}%
+  \def\luameshval at dg@print{none}%
   \or%
-  \def\luameshvaldg at print{points}%
+  \def\luameshval at dg@print{points}%
   \fi%
 }%
 %% the name of the point
-\define at key{drawGmsh}{meshpoint}[P]{\def\luameshvaldg at meshpoint{#1}}%
+\define at key{drawGmsh}{meshpoint}[P]{\def\luameshval at dg@meshpoint{#1}}%
 %% the name of the color of drawing
-\define at key{drawGmsh}{color}[black]{\def\luameshvaldg at color{#1}}%
+\define at key{drawGmsh}{color}[black]{\def\luameshval at dg@color{#1}}%
+%% thickness
+\define at key{drawGmsh}{thickness}[0.4pt]{\def\luameshval at dg@thickness{#1}}%
 %
-\presetkeys{drawGmsh}{tikz=false,scale, meshpoint,print=none,color}{}%
+\presetkeys{drawGmsh}{tikz=false,scale, meshpoint,print=none,color,thickness}{}%
 %
 \newcommand{\drawGmsh}[2][]{%
   % #1 : optionnal arguments
   % #2 : the gmsh file
   \setkeys{drawGmsh}{#1} %
-  \def\MeshPoint{\luameshvaldg at meshpoint}%
+  \def\MeshPoint{\luameshval at dg@meshpoint}%
   \ifKV at drawGmsh@tikz% if we are using tikz
   \directlua{%
-    drawGmshTikZ("#2","\luameshvaldg at print","\luameshvaldg at scale","\luameshvaldg at color")%
+    drawGmshTikZ("#2","\luameshval at dg@print","\luameshval at dg@scale","\luameshval at dg@color","\luameshval at dg@thickness")%
   }%
   \else % we are using MP
-  \def\luameshmpcolor{\mpcolor{\luameshvaldg at color}}%
+  \def\luameshmpcolor{\mpcolor{\luameshval at dg@color}}%
   \directlua{%
-    drawGmshMP("#2","\luameshvaldg at print","\luameshvaldg at scale")%
+    drawGmshMP("#2","\luameshval at dg@print","\luameshval at dg@scale","\luameshval at dg@thickness")%
   }%
   %
   \fi%
@@ -732,6 +753,11 @@
 \define at key{gmshVoronoiInc}{color}[black]{\def\luameshval at gvi@color{#1}}%
 %% the name of the color of drawing Voronoi
 \define at key{gmshVoronoiInc}{colorVoronoi}[red]{\def\luameshval at gvi@colorvoronoi{#1}}%
+%% thickness
+\define at key{gmshVoronoiInc}{thickness}[0.4pt]{\def\luameshval at gvi@thickness{#1}}%
+%% Voronoi thickness
+\define at key{gmshVoronoiInc}{thicknessVoronoi}[0.4pt]{\def\luameshval at gvi@thicknessVoronoi{#1}}%
+
 %
 \presetkeys{gmshVoronoiInc}{tikz=false,scale,
   meshpoint,circumpoint,print=none,color,colorVoronoi,delaunay=none,styleVoronoi=none, styleDelaunay=none}{}%
@@ -746,13 +772,13 @@
   \def\CircumPoint{\luameshval at gvi@circumpoint}%
   \ifKV at gmshVoronoiInc@tikz% if we are using tikz
   \directlua{%
-    gmshVoronoiTikZinc("#2","\luaescapestring{\unexpanded{#3}}","\luaescapestring{\unexpanded{#4}}","\luameshval at gvi@print","\luameshval at gvi@scale","\luameshval at gvi@delaunay","\luameshval at gvi@color","\luameshval at gvi@colorvoronoi","\luameshval at gvi@styleDelaunay","\luameshval at gvi@styleVoronoi")%
+    gmshVoronoiTikZinc("#2","\luaescapestring{\unexpanded{#3}}","\luaescapestring{\unexpanded{#4}}","\luameshval at gvi@print","\luameshval at gvi@scale","\luameshval at gvi@delaunay","\luameshval at gvi@color","\luameshval at gvi@colorvoronoi","\luameshval at gvi@styleDelaunay","\luameshval at gvi@styleVoronoi","\luameshval at gvi@thickness","\luameshval at gvi@thicknessVoronoi")%
   }%
   \else % we are using MP
   \def\luameshmpcolor{\mpcolor{\luameshval at gvi@color}}%
   \def\luameshmpcolorVoronoi{\mpcolor{\luameshval at gvi@colorvoronoi}}%
   \directlua{%
-    gmshVoronoiMPinc("#2","\luaescapestring{\unexpanded{#3}}","\luaescapestring{\unexpanded{#4}}","\luameshval at gvi@print","\luameshval at gvi@scale","\luameshval at gvi@delaunay","\luameshval at gvi@styleDelaunay","\luameshval at gvi@styleVoronoi")%
+    gmshVoronoiMPinc("#2","\luaescapestring{\unexpanded{#3}}","\luaescapestring{\unexpanded{#4}}","\luameshval at gvi@print","\luameshval at gvi@scale","\luameshval at gvi@delaunay","\luameshval at gvi@styleDelaunay","\luameshval at gvi@styleVoronoi","\luameshval at gvi@thickness","\luameshval at gvi@thicknessVoronoi")%
   }%
   %
   \fi%
@@ -804,8 +830,13 @@
 %% the name of the color of drawing Voronoi
 \define at key{gmshVoronoi}{colorVoronoi}[red]{\def\luameshval at gv@colorVoronoi{#1}}%
 %
-\presetkeys{gmshVoronoi}{tikz=false,scale, meshpoint,circumpoint,print=none,color,colorVoronoi,delaunay=none,styleVoronoi=none, styleDelaunay=none}{}%
+%% thickness
+\define at key{gmshVoronoi}{thickness}[0.4pt]{\def\luameshval at gv@thickness{#1}}%
+%% Voronoi thickness
+\define at key{gmshVoronoi}{thicknessVoronoi}[0.4pt]{\def\luameshval at gv@thicknessVoronoi{#1}}%
 %
+\presetkeys{gmshVoronoi}{tikz=false,scale, meshpoint,circumpoint,print=none,color,colorVoronoi,delaunay=none,styleVoronoi=none, styleDelaunay=none,thickness,thicknessVoronoi}{}%
+%
 \newcommand{\gmshVoronoi}[2][]{%
   % #1 : optionnal arguments
   % #2 : the gmsh file
@@ -814,13 +845,13 @@
   \def\CircumPoint{\luameshval at gv@circumpoint}%
   \ifKV at gmshVoronoi@tikz% if we are using tikz
   \directlua{%
-    gmshVoronoiTikZ("#2","\luameshval at gv@print","\luameshval at gv@scale","\luameshval at gv@delaunay","\luameshval at gv@color","\luameshval at gv@colorVoronoi","\luameshval at gv@styleDelaunay","\luameshval at gv@styleVoronoi")%
+    gmshVoronoiTikZ("#2","\luameshval at gv@print","\luameshval at gv@scale","\luameshval at gv@delaunay","\luameshval at gv@color","\luameshval at gv@colorVoronoi","\luameshval at gv@styleDelaunay","\luameshval at gv@styleVoronoi","\luameshval at gv@thickness","\luameshval at gv@thicknessVoronoi")%
   }%
   \else % we are using MP
   \def\luameshmpcolor{\mpcolor{\luameshval at gv@color}}%
   \def\luameshmpcolorVoronoi{\mpcolor{\luameshval at gv@colorVoronoi}}%
   \directlua{%
-    gmshVoronoiMP("#2","\luameshval at gv@print","\luameshval at gv@scale","\luameshval at gv@delaunay","\luameshval at gv@styleDelaunay","\luameshval at gv@styleVoronoi")%
+    gmshVoronoiMP("#2","\luameshval at gv@print","\luameshval at gv@scale","\luameshval at gv@delaunay","\luameshval at gv@styleDelaunay","\luameshval at gv@styleVoronoi","\luameshval at gv@thickness","\luameshval at gv@thicknessVoronoi")%
   }%
   %
   \fi%
@@ -879,11 +910,15 @@
 
 %% the name of the color of drawing
 \define at key{meshPolygon}{color}[black]{\def\luameshval at mp@color{#1}}%
-%% the name of the color of drawing Voronoi
+%% the name of the color for the polygon
 \define at key{meshPolygon}{colorPolygon}[red]{\def\luameshval at mp@colorPolygon{#1}}%
+%% thickness
+\define at key{meshPolygon}{thickness}[0.4pt]{\def\luameshval at mp@thickness{#1}}%
+%% polygon thickness
+\define at key{meshPolygon}{thicknessPolygon}[0.4pt]{\def\luameshval at mp@polygonThickness{#1}}%
 %% the name of the color of drawing the bbox
 %
-\presetkeys{meshPolygon}{tikz=false,scale,mode=int,step=mesh,print=none,color,colorPolygon,h,meshpoint,gridpoints=rect}{}%
+\presetkeys{meshPolygon}{tikz=false,scale,mode=int,step=mesh,print=none,color,colorPolygon,h,meshpoint,gridpoints=rect,thickness,thicknessPolygon}{}%
 %
 \newcommand{\meshPolygon}[2][]{%
   % #1 : optionnal arguments
@@ -893,13 +928,13 @@
   \def\MeshPoint{\luameshval at mp@meshpoint}%
   \ifKV at meshPolygon@tikz% if we are using tikz
   \directlua{%
-    drawMeshPolygonTikZ("#2","\luameshval at mp@mode","\luameshval at mp@h","\luameshval at mp@step","\luameshval at mp@print","\luameshval at mp@scale","\luameshval at mp@color","\luameshval at mp@colorPolygon","\luameshval at mp@gridpoints")%
+    drawMeshPolygonTikZ("#2","\luameshval at mp@mode","\luameshval at mp@h","\luameshval at mp@step","\luameshval at mp@print","\luameshval at mp@scale","\luameshval at mp@color","\luameshval at mp@colorPolygon","\luameshval at mp@gridpoints","\luameshval at mp@thickness","\luameshval at mp@polygonThickness")%
   }%
   \else % we are using MP
   \def\luameshmpcolor{\mpcolor{\luameshval at mp@color}}%
   \def\luameshmpcolorPoly{\mpcolor{\luameshval at mp@colorPolygon}}%
   \directlua{%
-    drawMeshPolygonMP("#2","\luameshval at mp@mode","\luameshval at mp@h","\luameshval at mp@step","\luameshval at mp@print","\luameshval at mp@scale","\luameshval at mp@gridpoints")%
+    drawMeshPolygonMP("#2","\luameshval at mp@mode","\luameshval at mp@h","\luameshval at mp@step","\luameshval at mp@print","\luameshval at mp@scale","\luameshval at mp@gridpoints","\luameshval at mp@thickness","\luameshval at mp@polygonThickness")%
   }%
   %
   \fi%
@@ -955,12 +990,15 @@
 
 %% the name of the color of drawing
 \define at key{meshPolygonInc}{color}[black]{\def\luameshval at mpi@color{#1}}%
-%% the name of the color of drawing Voronoi
+%% the name of the color for the polygon
 \define at key{meshPolygonInc}{colorPolygon}[red]{\def\luameshval at mpi@colorPolygon{#1}}%
-%% the name of the color of drawing the bbox
+%% thickness
+\define at key{meshPolygonInc}{thickness}[0.4pt]{\def\luameshval at mpi@thickness{#1}}%
+%% polygon thickness
+\define at key{meshPolygonInc}{polygonThickness}[0.4pt]{\def\luameshval at mpi@polygonThickness{#1}}%
+
+\presetkeys{meshPolygonInc}{tikz=false,scale,mode=int,step=mesh,print=none,color,colorPolygon,h,meshpoint,gridpoints=rect,thickness,polygonThickness}{}%
 %
-\presetkeys{meshPolygonInc}{tikz=false,scale,mode=int,step=mesh,print=none,color,colorPolygon,h,meshpoint,gridpoints=rect}{}%
-%
 \newcommand{\meshPolygonInc}[4][]{%
   % #1 : optionnal arguments
   % #2 : the string containing the list of points
@@ -971,14 +1009,14 @@
   \def\MeshPoint{\luameshval at mpi@meshpoint}%
   \ifKV at meshPolygonInc@tikz% if we are using tikz
   \directlua{%
-    drawMeshPolygonTikZinc("#2","\luaescapestring{\unexpanded{#3}}","\luaescapestring{\unexpanded{#4}}","\luameshval at mpi@mode","\luameshval at mpi@h","\luameshval at mpi@step","\luameshval at mpi@print","\luameshval at mpi@scale","\luameshval at mpi@color","\luameshval at mpi@colorPolygon","\luameshval at mpi@gridpoints")%
+    drawMeshPolygonTikZinc("#2","\luaescapestring{\unexpanded{#3}}","\luaescapestring{\unexpanded{#4}}","\luameshval at mpi@mode","\luameshval at mpi@h","\luameshval at mpi@step","\luameshval at mpi@print","\luameshval at mpi@scale","\luameshval at mpi@color","\luameshval at mpi@colorPolygon","\luameshval at mpi@gridpoints","\luameshval at mpi@thickness","\luameshval at mpi@polygonThickness")%
   }%
   \else % we are using MP
   \def\luameshmpcolor{\mpcolor{\luameshval at mpi@color}}%
   \def\luameshmpcolorPoly{\mpcolor{\luameshval at mpi@colorPolygon}}%
   \directlua{%
-    drawMeshPolygonMPinc("#2","\luaescapestring{\unexpanded{#3}}","\luaescapestring{\unexpanded{#4}}","\luameshval at mpi@mode","\luameshval at mpi@h","\luameshval at mpi@step","\luameshval at mpi@print","\luameshval at mpi@scale","\luameshval at mpi@gridpoints")%
+    drawMeshPolygonMPinc("#2","\luaescapestring{\unexpanded{#3}}","\luaescapestring{\unexpanded{#4}}","\luameshval at mpi@mode","\luameshval at mpi@h","\luameshval at mpi@step","\luameshval at mpi@print","\luameshval at mpi@scale","\luameshval at mpi@gridpoints","\luameshval at mpi@thickness","\luameshval at mpi@polygonThickness")%
   }%
   %
   \fi%
-}%
+}%
\ No newline at end of file

Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds	2022-07-11 20:31:00 UTC (rev 63874)
+++ trunk/Master/tlpkg/libexec/ctan2tds	2022-07-11 20:32:11 UTC (rev 63875)
@@ -3219,7 +3219,7 @@
  'hatching',    '[^e].mp',      # no htchuse.mp
  'latexmp',     'latexmp.mp',
  'latex-graphics-companion', 'NULL',    # doc package
- 'luamesh',	'NULL',		# not doc file fond.mp
+ 'luamesh',	'luamesh.mp',		# not doc file fond.mp
  'mcf2graph',	'mcf2graph.mf',	# not the examples
  'metapost-colorbrewer','colorbrewer-[cr].*mp',	# not -sampler
  'metapost-examples',	'NULL',		# doc package



More information about the tex-live-commits mailing list.