summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/tikz3d-fr/tex/tikz3d-fr.sty
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/pgf/contrib/tikz3d-fr/tex/tikz3d-fr.sty')
-rw-r--r--graphics/pgf/contrib/tikz3d-fr/tex/tikz3d-fr.sty27
1 files changed, 14 insertions, 13 deletions
diff --git a/graphics/pgf/contrib/tikz3d-fr/tex/tikz3d-fr.sty b/graphics/pgf/contrib/tikz3d-fr/tex/tikz3d-fr.sty
index 6ee9118c66..5056c951a8 100644
--- a/graphics/pgf/contrib/tikz3d-fr/tex/tikz3d-fr.sty
+++ b/graphics/pgf/contrib/tikz3d-fr/tex/tikz3d-fr.sty
@@ -3,8 +3,9 @@
% or later, see http://www.latex-project.org/lppl.txtf
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{tikz3d-fr}[2023/05/24 0.1.1 Aide pour l'utilisation de TikZ 3D]
-%0.1.1 Segments avec line cap=round
+\ProvidesPackage{tikz3d-fr}[2023/07/22 0.1.2 Aide pour l'utilisation de TikZ 3D]
+%0.1.2 Option pour l'épaisseur des traits + [line join=round] pour les cubes
+%0.1.1 Segments avec [line cap=round]
%0.1.0 Version initiale
%------Packages utiles
@@ -255,18 +256,18 @@
\end{tikzpicture}
}
-\NewDocumentCommand\PetitCube{ O{cyan} m }{%
- \StrBefore[1]{#2}{,}[\xtmp]%
- \StrBetween[1,2]{#2}{,}{,}[\ytmp]%
- \StrBehind[2]{#2}{,}[\ztmp]%
- \draw[fill=#1!70,very thin,line join=bevel] ({\xtmp+1},\ytmp,\ztmp)--++(0,1,0)--++(0,0,-1)--++(0,-1,0)--cycle;
- \draw[fill=#1!80,very thin,line join=bevel] (\xtmp,{\ytmp+1},\ztmp)--++(1,0,0)--++(0,0,-1)--++(-1,0,0)--cycle;
- \draw[fill=#1!35!white,very thin,line join=bevel] (\xtmp,\ytmp,\ztmp)--++(1,0,0)--++(0,1,0)--++(-1,0,0)--cycle;
+\NewDocumentCommand\PetitCube{ O{cyan} O{0.2pt} m }{%
+ \StrBefore[1]{#3}{,}[\xtmp]%
+ \StrBetween[1,2]{#3}{,}{,}[\ytmp]%
+ \StrBehind[2]{#3}{,}[\ztmp]%
+ \draw[fill=#1!70,line width=#2,line join=round,line cap=round] ({\xtmp+1},\ytmp,\ztmp)--++(0,1,0)--++(0,0,-1)--++(0,-1,0)--cycle;
+ \draw[fill=#1!80,line width=#2,line join=round,line cap=round] (\xtmp,{\ytmp+1},\ztmp)--++(1,0,0)--++(0,0,-1)--++(-1,0,0)--cycle;
+ \draw[fill=#1!35!white,line width=#2,line join=round,line cap=round] (\xtmp,\ytmp,\ztmp)--++(1,0,0)--++(0,1,0)--++(-1,0,0)--cycle;
}
\newcounter{lgblocs}%compteur des lignes, qui sera incrémenté
\NewDocumentCommand\PlaqueVide{ O{1} }{\addtocounter{lgblocs}{#1}}%passer une plaque
-\NewDocumentCommand\PlaquePetitsCubes{ O{cyan} m }{%poser un cube (attention à l'ordre)
+\NewDocumentCommand\PlaquePetitsCubes{ O{cyan} m O{0.2pt} }{%poser un cube (attention à l'ordre)
\setsepchar[.]{/}
%lecture des couleurs
\readlist*\ListeCouleurs{#1}
@@ -288,13 +289,13 @@
{}%
{%
\itemtomacro\ListeCouleurs[\elementtmp]{\elementcouleur}
- \PetitCube[\elementcouleur]{-\j,\y,\i}
+ \PetitCube[\elementcouleur][#3]{-\j,\y,\i}
}%
}%
}%
}
-\NewDocumentCommand\BlocPetitsCubes{ s O{cyan} m }{%
+\NewDocumentCommand\BlocPetitsCubes{ s O{cyan} m O{0.2pt} }{%
%*pour autonome
%2=couleur unique
%3=liste des hauteurs (attention à l'ordre)
@@ -318,7 +319,7 @@
\xintifboolexpr{\Hauteur == 0}%
{}%
{%
- \foreach \z in {1,...,\Hauteur}{\PetitCube[#2]{-\x,\y,\z}}
+ \foreach \z in {1,...,\Hauteur}{\PetitCube[#2][#4]{-\x,\y,\z}}
}%
}%
}%