summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/pas-cours/macro-patrons.tex
blob: a682bb6f7d6be9c1761ac3a52855affaa35e32bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
% Fichiers comprenant les macros de construction des patrons de solides

% \patronprismereg[	n = nombre de côtés de la base,
%					h = hauteur du prisme,
%					r = rayon du cercle circonscrit à la base,
%					pos = 1 ou 2 ou ... ou n (position de la face du haut)
%					legende (booléen)]

\define@cmdkey [PAS] {patronprismereg} {r}{}
\define@cmdkey [PAS] {patronprismereg} {h}{}
\define@cmdkey [PAS] {patronprismereg} {n}{}
\define@cmdkey [PAS] {patronprismereg} {pos}{}
\define@boolkey[PAS] {patronprismereg} {legende}[true]{}

\presetkeys    [PAS] {patronprismereg} {
										n = 3,
										r = 3,
										h = 5,
										pos = 1,
										legende = false}{}

\newcommand*{\patronprismereg}[1][]{\pasPatronprismereg[#1]}

\def\pasPatronprismereg[#1]{
	\setkeys[PAS]{patronprismereg}{#1}
	\pgfmathparse{360/\cmdPAS@patronprismereg@n}\let\angle\pgfmathresult
	\foreach \i in {1,...,\cmdPAS@patronprismereg@n}
		{
			\pgfmathparse{\cmdPAS@patronprismereg@r*cos(\angle*(\i-1))}\let\x\pgfmathresult
			\pgfmathparse{\cmdPAS@patronprismereg@r*sin(\angle*(\i-1))}\let\y\pgfmathresult
			\coordinate (A\i) at (\x,\y);
			
			\pgfmathparse{\cmdPAS@patronprismereg@r*cos(\angle*\i)}\let\x\pgfmathresult
			\pgfmathparse{\cmdPAS@patronprismereg@r*sin(\angle*\i)}\let\y\pgfmathresult
			\coordinate (D\i) at (\x,\y);

			\pgfmathparse{\cmdPAS@patronprismereg@h*cos(\angle/2+(\i-1)*\angle)}\let\x\pgfmathresult
			\pgfmathparse{\cmdPAS@patronprismereg@h*sin(\angle/2+(\i-1)*\angle)}\let\y\pgfmathresult
			\coordinate (B\i) at ($(A\i)+(\x,\y)$);
			\coordinate (C\i) at ($(D\i)+(\x,\y)$);
			
			\draw (A\i) -- (D\i) -- (C\i) -- (B\i) -- cycle;
		}
		
	\ifPAS@patronprismereg@legende
			\draw[dotted] (D1) -- (0,0) -- (A1);
			\pgfmathparse{.5*cos(\angle/2)}\let\x\pgfmathresult
			\pgfmathparse{.5*sin(\angle/2)}\let\y\pgfmathresult
			\draw[dotted,<->,>=stealth'] (.5,0) arc (0:\angle:.5cm);
			\node[right,scale=.5] at (\x,\y) {\angle $^{\circ}$};
			\node[below,scale=.5] at (\cmdPAS@patronprismereg@r/2,0) {\cmdPAS@patronprismereg@r};
			\coordinate (M) at (barycentric cs:A1=1,D1=1);
			\coordinate (N) at (barycentric cs:B1=1,C1=1);
			\draw[<->,>=stealth',dotted] (M) -- (N) node[midway,above,scale=.5,rotate=\angle/2] {\cmdPAS@patronprismereg@h};
	\fi
		
	% Face du haut
	\pgfmathparse{2*\cmdPAS@patronprismereg@r*cos(\angle/2)+\cmdPAS@patronprismereg@h}\let\d\pgfmathresult
	\pgfmathparse{\d*cos(\angle/2+(\cmdPAS@patronprismereg@pos-1)*\angle)}\let\tx\pgfmathresult
	\pgfmathparse{\d*sin(\angle/2+(\cmdPAS@patronprismereg@pos-1)*\angle)}\let\ty\pgfmathresult
	\coordinate (O) at (\tx,\ty);
	\foreach \i in {1,...,\cmdPAS@patronprismereg@n}
		{
			\coordinate (C\i) at ($(A\i)+(\tx,\ty)$);
			\coordinate (B\i) at (barycentric cs:C\i=1,O=-2);
		}
		
	\draw (B1) \foreach \i in {2,...,\cmdPAS@patronprismereg@n}{-- (B\i)} -- cycle;
}

% \patronpyramreg[	n = nombre de côtés de la base,
%					h = hauteur de la pyramide,
%					r = rayon du cercle circonscrit à la base,
%					legende (booléen)]

\define@cmdkey [PAS] {patronpyramreg} {r}{}
\define@cmdkey [PAS] {patronpyramreg} {h}{}
\define@cmdkey [PAS] {patronpyramreg} {n}{}
\define@boolkey[PAS] {patronpyramreg} {legende}[true]{}

\presetkeys    [PAS] {patronpyramreg} {
								n = 3,
								r = 3,
								h = 5,
 							 	legende = false}{}

\newcommand*{\patronpyramreg}[1][]{\pasPatronpyramreg[#1]}

\def\pasPatronpyramreg[#1]{
	\setkeys[PAS]{patronpyramreg}{#1}
	\foreach \i in {1,...,\cmdPAS@patronpyramreg@n}
		{
			\pgfmathparse{\cmdPAS@patronpyramreg@r*cos((360/\cmdPAS@patronpyramreg@n)*(\i-1))}\let\x\pgfmathresult
			\pgfmathparse{\cmdPAS@patronpyramreg@r*sin((360/\cmdPAS@patronpyramreg@n)*(\i-1))}\let\y\pgfmathresult
			\coordinate (A\i) at (\x,\y);
			\pgfmathparse{(\cmdPAS@patronpyramreg@h+\cmdPAS@patronpyramreg@r*cos(180/\cmdPAS@patronpyramreg@n))*cos((360/\cmdPAS@patronpyramreg@n)*(\i-1)+(180/\cmdPAS@patronpyramreg@n))}\let\x\pgfmathresult
			\pgfmathparse{(\cmdPAS@patronpyramreg@h+\cmdPAS@patronpyramreg@r*cos(180/\cmdPAS@patronpyramreg@n))*sin((360/\cmdPAS@patronpyramreg@n)*(\i-1)+(180/\cmdPAS@patronpyramreg@n))}\let\y\pgfmathresult
			\coordinate (S\i) at (\x,\y);
		}
	\draw (A1) -- (S1) \foreach \i in {2,...,\cmdPAS@patronpyramreg@n} {-- (A\i) -- (S\i)} -- cycle;
	\draw (A1) \foreach \i in {2,...,\cmdPAS@patronpyramreg@n} {-- (A\i)} -- cycle;
	\ifPAS@patronpyramreg@legende
			\draw[dotted] (A1) -- (0,0) -- (A2);
			\pgfmathparse{360/\cmdPAS@patronpyramreg@n}\let\angle\pgfmathresult
			\pgfmathparse{.5*cos(180/\cmdPAS@patronpyramreg@n)}\let\x\pgfmathresult
			\pgfmathparse{.5*sin(180/\cmdPAS@patronpyramreg@n)}\let\y\pgfmathresult
			\draw[dotted,<->,>=stealth'] (.5,0) arc (0:\angle:.5cm);
			\node[right,scale=.5] at (\x,\y) {\angle $^{\circ}$};
			\node[below,scale=.5] at (\cmdPAS@patronpyramreg@r/2,0) {\cmdPAS@patronpyramreg@r};
			\coordinate (M) at (barycentric cs:A1=1,A2=1);
			\draw[<->,>=stealth',dotted] (M) -- (S1) node[midway,above,scale=.5,rotate=\angle/2] {\cmdPAS@patronpyramreg@h};
	\fi
}

% \patroncone
% Synthaxe : \patroncone[	r = rayon de la base,
%							h = hauteur du cône,
%							legende (booléen)]

\define@cmdkey [PAS] {patroncone} {r}{}
\define@cmdkey [PAS] {patroncone} {h}{}
\define@boolkey[PAS] {patroncone} {legende}[true]{}

\presetkeys    [PAS] {patroncone} {
								r = 3,
								h = 5,
 							 	legende = false}{}

\newcommand*{\patroncone}[1][]{\pasPatroncone[#1]}

\def\pasPatroncone[#1]{
	\setkeys[PAS]{patroncone}{#1}
	\pgfmathparse{360*\cmdPAS@patroncone@r/\cmdPAS@patroncone@h}\let\angle\pgfmathresult
	\draw (0,-\cmdPAS@patroncone@h-\cmdPAS@patroncone@r) circle (\cmdPAS@patroncone@r cm);
	\pgfmathparse{\cmdPAS@patroncone@h*cos(270-\angle/2)}\let\x\pgfmathresult
	\pgfmathparse{\cmdPAS@patroncone@h*sin(270-\angle/2)}\let\y\pgfmathresult
	\draw (0,0) -- (\x,\y) arc (270-\angle/2:270+\angle/2:\cmdPAS@patroncone@h cm) -- cycle;
	\ifPAS@patroncone@legende
			\node[below] at (\x/2,\y/2) {\cmdPAS@patroncone@h};
			\node[below] at (-\x/2,\y/2) {\cmdPAS@patroncone@h};
			\pgfmathparse{cos(270-\angle/2)}\let\x\pgfmathresult
			\pgfmathparse{sin(270-\angle/2)}\let\y\pgfmathresult
			\draw[<->,>=stealth'] (\x,\y) arc (270-\angle/2:270+\angle/2:1cm);
			\node[above,scale=.5] at (0,-1.3) {\angle $^{\circ}$};
			\pgfmathparse{\cmdPAS@patroncone@r*cos(-30)}\let\x\pgfmathresult
			\pgfmathparse{\cmdPAS@patroncone@r*sin(-30)-\cmdPAS@patroncone@h-\cmdPAS@patroncone@r}\let\y\pgfmathresult
			\draw[<->,>=stealth'] (0,-\cmdPAS@patroncone@h-\cmdPAS@patroncone@r) -- (\x,\y) node[midway,above] {\cmdPAS@patroncone@r};
	\fi
}

% \patroncylindre
% Synthaxe : \patroncylindre[	r = rayon de la base,
%								h = hauteur du cône,
%								legende (booléen)]

\define@cmdkey [PAS] {patroncylindre} {r}{}
\define@cmdkey [PAS] {patroncylindre} {h}{}
\define@boolkey[PAS] {patroncylindre} {legende}[true]{}

\presetkeys    [PAS] {patroncylindre} {
								r = 2,
								h = 5,
 							 	legende = false}{}

\newcommand*{\patroncylindre}[1][]{\pasPatroncylindre[#1]}

\def\pasPatroncylindre[#1]{
	\setkeys[PAS]{patroncylindre}{#1}
	\draw (0,\cmdPAS@patroncylindre@h+\cmdPAS@patroncylindre@r) circle (\cmdPAS@patroncylindre@r cm);
	\draw (0,-\cmdPAS@patroncylindre@r) circle (\cmdPAS@patroncylindre@r cm);
	\pgfmathparse{\cmdPAS@patroncylindre@r*3.19159}\let\demilongueur\pgfmathresult
	\draw (-\demilongueur,0) rectangle +(2*\demilongueur,\cmdPAS@patroncylindre@h);
	\ifPAS@patroncylindre@legende
			\draw[<->,>=stealth'] (-\demilongueur,-2*\cmdPAS@patroncylindre@r-1) -- (\demilongueur,-2*\cmdPAS@patroncylindre@r-1) node[midway,fill=white] {$2\pi \times \cmdPAS@patroncylindre@r$};
			\draw[dotted] (-\demilongueur,0) -- (-\demilongueur,-2*\cmdPAS@patroncylindre@r-1);
			\draw[dotted] (\demilongueur,0) -- (\demilongueur,-2*\cmdPAS@patroncylindre@r-1);
			\draw[<->,>=stealth'] (\demilongueur+1,0) -- (\demilongueur+1,\cmdPAS@patroncylindre@h) node[midway,right] {\cmdPAS@patroncylindre@h};
			\draw[dotted] (\demilongueur,0) -- (\demilongueur+1,0);
			\draw[dotted] (\demilongueur,\cmdPAS@patroncylindre@h) -- (\demilongueur+1,\cmdPAS@patroncylindre@h);
			\draw[<->,>=stealth'] (0,\cmdPAS@patroncylindre@h+\cmdPAS@patroncylindre@r) -- (\cmdPAS@patroncylindre@r,\cmdPAS@patroncylindre@h+\cmdPAS@patroncylindre@r) node[midway,fill=white] {\cmdPAS@patroncylindre@r};
			\draw[<->,>=stealth'] (0,-\cmdPAS@patroncylindre@r) -- (\cmdPAS@patroncylindre@r,-\cmdPAS@patroncylindre@r) node[midway,fill=white] {\cmdPAS@patroncylindre@r};
	\fi
}


% \patronpave : dessine un patron de pavé droit
% Synthaxe : \patronpave[	a = dimension 1,
%							b = dimension 2,
%							c = dimension 3,
%							pos = position des rabats (1, 2, 3 ou 4),
%							codages (booléen),
%							legende (booléen)]

\define@cmdkey [PAS] {patronpave} {a}{}
\define@cmdkey [PAS] {patronpave} {b}{}
\define@cmdkey [PAS] {patronpave} {c}{}
\define@cmdkey [PAS] {patronpave} {pos}{}
\define@boolkey[PAS] {patronpave} {codages}[true]{}
\define@boolkey[PAS] {patronpave} {legende}[true]{}

\presetkeys    [PAS] {patronpave} {
								a = 3,
								b = 3,
 							 	c = 3,
								pos = 2,
 							 	codages = false,
 							 	legende = false}{}

\newcommand*{\patronpave}[1][]{\pasPatronpave[#1]}

\def\pasPatronpave[#1]{
	\setkeys[PAS]{patronpave}{#1}
	\draw (0,0) rectangle +(2*\cmdPAS@patronpave@c+2*\cmdPAS@patronpave@a,\cmdPAS@patronpave@b);
	\draw (\cmdPAS@patronpave@c,0) -- (\cmdPAS@patronpave@c,\cmdPAS@patronpave@b);
	\draw (\cmdPAS@patronpave@a+\cmdPAS@patronpave@c,0) -- (\cmdPAS@patronpave@a+\cmdPAS@patronpave@c,\cmdPAS@patronpave@b);
	\draw (\cmdPAS@patronpave@a+2*\cmdPAS@patronpave@c,0) -- (\cmdPAS@patronpave@a+2*\cmdPAS@patronpave@c,\cmdPAS@patronpave@b);
	\ifPAS@patronpave@codages
			\node[scale=.5] at (\cmdPAS@patronpave@c/2,\cmdPAS@patronpave@b) {///};
			\node[scale=.5] at (\cmdPAS@patronpave@c/2,0) {///};
			\node[scale=.5] at (3*\cmdPAS@patronpave@c/2+\cmdPAS@patronpave@a,\cmdPAS@patronpave@b) {///};
			\node[scale=.5] at (3*\cmdPAS@patronpave@c/2+\cmdPAS@patronpave@a,0) {///};
			\node[scale=.5] at (\cmdPAS@patronpave@c+\cmdPAS@patronpave@a/2,0) {/};
			\node[scale=.5] at (\cmdPAS@patronpave@c+\cmdPAS@patronpave@a/2,\cmdPAS@patronpave@b) {/};
			\node[scale=.5] at (2*\cmdPAS@patronpave@c+3*\cmdPAS@patronpave@a/2,0) {/};
			\node[scale=.5] at (2*\cmdPAS@patronpave@c+3*\cmdPAS@patronpave@a/2,\cmdPAS@patronpave@b) {/};
			\node[rotate=90,scale=.5] at (0,\cmdPAS@patronpave@b/2) {//};
			\node[rotate=90,scale=.5] at (\cmdPAS@patronpave@c,\cmdPAS@patronpave@b/2) {//};
			\node[rotate=90,scale=.5] at (\cmdPAS@patronpave@c+\cmdPAS@patronpave@a,\cmdPAS@patronpave@b/2) {//};
			\node[rotate=90,scale=.5] at (2*\cmdPAS@patronpave@c+\cmdPAS@patronpave@a,\cmdPAS@patronpave@b/2) {//};
			\node[rotate=90,scale=.5] at (2*\cmdPAS@patronpave@c+2*\cmdPAS@patronpave@a,\cmdPAS@patronpave@b/2) {//};
	\fi
	\IfStrEq{\cmdPAS@patronpave@pos}{1}
		{
			\draw (0,\cmdPAS@patronpave@b+\cmdPAS@patronpave@a) rectangle +(\cmdPAS@patronpave@c,-2*\cmdPAS@patronpave@a-\cmdPAS@patronpave@b);
			\ifPAS@patronpave@codages
				\node[scale=.5,rotate=90] at (0,\cmdPAS@patronpave@b+\cmdPAS@patronpave@a/2) {/};
				\node[scale=.5] at (\cmdPAS@patronpave@c/2,\cmdPAS@patronpave@a+\cmdPAS@patronpave@b) {///};
				\node[scale=.5,rotate=90] at (\cmdPAS@patronpave@c,\cmdPAS@patronpave@b+\cmdPAS@patronpave@a/2) {/};
				\node[scale=.5,rotate=90] at (0,-\cmdPAS@patronpave@a/2) {/};
				\node[scale=.5] at (\cmdPAS@patronpave@c/2,-\cmdPAS@patronpave@a) {///};
				\node[scale=.5,rotate=90] at (\cmdPAS@patronpave@c,-\cmdPAS@patronpave@a/2) {/};
			\fi
			\ifPAS@patronpave@legende
				\draw[gray,dotted] (0,\cmdPAS@patronpave@b+\cmdPAS@patronpave@a) -- (0,\cmdPAS@patronpave@b+\cmdPAS@patronpave@a+1);
				\draw[gray,dotted] (\cmdPAS@patronpave@c,\cmdPAS@patronpave@b+\cmdPAS@patronpave@a) -- (\cmdPAS@patronpave@c,\cmdPAS@patronpave@b+\cmdPAS@patronpave@a+1);
				\draw[<->,>=stealth'] (0,\cmdPAS@patronpave@b+\cmdPAS@patronpave@a+1) -- (\cmdPAS@patronpave@c,\cmdPAS@patronpave@b+\cmdPAS@patronpave@a+1) node[midway,above] {\cmdPAS@patronpave@c};
				\draw[gray,dotted] (\cmdPAS@patronpave@a+2*\cmdPAS@patronpave@c,0) -- (2*\cmdPAS@patronpave@c+\cmdPAS@patronpave@a,-1);
				\draw[gray,dotted] (2*\cmdPAS@patronpave@c+2*\cmdPAS@patronpave@a,0) -- (2*\cmdPAS@patronpave@c+2*\cmdPAS@patronpave@a,-1);
				\draw[<->,>=stealth'] (2*\cmdPAS@patronpave@c+\cmdPAS@patronpave@a,-1) -- (2*\cmdPAS@patronpave@c+2*\cmdPAS@patronpave@a,-1) node[midway,below] {\cmdPAS@patronpave@a};
			\fi
		}
		{
			\IfStrEq{\cmdPAS@patronpave@pos}{2}
			{
				\draw (\cmdPAS@patronpave@c,\cmdPAS@patronpave@b+\cmdPAS@patronpave@c) rectangle +(\cmdPAS@patronpave@a,-2*\cmdPAS@patronpave@c-\cmdPAS@patronpave@b);
				\ifPAS@patronpave@codages
					\node[scale=.5,rotate=90] at (\cmdPAS@patronpave@c,\cmdPAS@patronpave@b+\cmdPAS@patronpave@c/2) {///};
					\node[scale=.5] at (\cmdPAS@patronpave@a/2+\cmdPAS@patronpave@c,\cmdPAS@patronpave@c+\cmdPAS@patronpave@b) {/};
					\node[scale=.5,rotate=90] at (\cmdPAS@patronpave@c+\cmdPAS@patronpave@a,\cmdPAS@patronpave@b+\cmdPAS@patronpave@c/2) {///};
					\node[scale=.5,rotate=90] at (\cmdPAS@patronpave@c,-\cmdPAS@patronpave@c/2) {///};
					\node[scale=.5] at (\cmdPAS@patronpave@a/2+\cmdPAS@patronpave@c,-\cmdPAS@patronpave@c) {/};
					\node[scale=.5,rotate=90] at (\cmdPAS@patronpave@c+\cmdPAS@patronpave@a,-\cmdPAS@patronpave@c/2) {///};
				\fi
				\ifPAS@patronpave@legende
					\draw[gray,dotted] (\cmdPAS@patronpave@c,\cmdPAS@patronpave@b+\cmdPAS@patronpave@c) -- (\cmdPAS@patronpave@c,\cmdPAS@patronpave@b+\cmdPAS@patronpave@c+1);
					\draw[gray,dotted] (\cmdPAS@patronpave@c+\cmdPAS@patronpave@a,\cmdPAS@patronpave@b+\cmdPAS@patronpave@c) -- (\cmdPAS@patronpave@c+\cmdPAS@patronpave@a,\cmdPAS@patronpave@b+\cmdPAS@patronpave@c+1);
					\draw[<->,>=stealth'] (\cmdPAS@patronpave@c,\cmdPAS@patronpave@b+\cmdPAS@patronpave@c+1) -- (\cmdPAS@patronpave@c+\cmdPAS@patronpave@a,\cmdPAS@patronpave@b+\cmdPAS@patronpave@c+1) node[midway,above] {\cmdPAS@patronpave@a};
					\draw[gray,dotted] (2*\cmdPAS@patronpave@c+\cmdPAS@patronpave@a,\cmdPAS@patronpave@b) -- (2*\cmdPAS@patronpave@c+\cmdPAS@patronpave@a,\cmdPAS@patronpave@b+1);
					\draw[<->,>=stealth'] (\cmdPAS@patronpave@c+\cmdPAS@patronpave@a,\cmdPAS@patronpave@b+1) -- (2*\cmdPAS@patronpave@c+\cmdPAS@patronpave@a,\cmdPAS@patronpave@b+1) node[midway,above] {\cmdPAS@patronpave@c};
				\fi
			}
			{
				\IfStrEq{\cmdPAS@patronpave@pos}{3}
				{
					\draw (\cmdPAS@patronpave@c+\cmdPAS@patronpave@a,\cmdPAS@patronpave@b+\cmdPAS@patronpave@a) rectangle +(\cmdPAS@patronpave@c,-2*\cmdPAS@patronpave@a-\cmdPAS@patronpave@b);
					\ifPAS@patronpave@codages
						\node[scale=.5,rotate=90] at (\cmdPAS@patronpave@a+\cmdPAS@patronpave@c,\cmdPAS@patronpave@b+\cmdPAS@patronpave@a/2) {/};
						\node[scale=.5] at (\cmdPAS@patronpave@a+\cmdPAS@patronpave@c+\cmdPAS@patronpave@c/2,\cmdPAS@patronpave@a+\cmdPAS@patronpave@b) {///};
						\node[scale=.5,rotate=90] at (\cmdPAS@patronpave@a+2*\cmdPAS@patronpave@c,\cmdPAS@patronpave@b+\cmdPAS@patronpave@a/2) {/};
						\node[scale=.5,rotate=90] at (\cmdPAS@patronpave@a+\cmdPAS@patronpave@c,-\cmdPAS@patronpave@a/2) {/};
						\node[scale=.5] at (\cmdPAS@patronpave@a+3*\cmdPAS@patronpave@c/2,-\cmdPAS@patronpave@a) {///};
						\node[scale=.5,rotate=90] at (\cmdPAS@patronpave@a+2*\cmdPAS@patronpave@c,-\cmdPAS@patronpave@a/2) {/};
					\fi
					\ifPAS@patronpave@legende
						\draw[gray,dotted] (\cmdPAS@patronpave@c+\cmdPAS@patronpave@a,\cmdPAS@patronpave@b+\cmdPAS@patronpave@a) -- (\cmdPAS@patronpave@c+\cmdPAS@patronpave@a,\cmdPAS@patronpave@b+\cmdPAS@patronpave@a+1);
						\draw[gray,dotted] (2*\cmdPAS@patronpave@c+\cmdPAS@patronpave@a,\cmdPAS@patronpave@b+\cmdPAS@patronpave@a) -- (2*\cmdPAS@patronpave@c+\cmdPAS@patronpave@a,\cmdPAS@patronpave@b+\cmdPAS@patronpave@a+1);
						\draw[<->,>=stealth'] (\cmdPAS@patronpave@c+\cmdPAS@patronpave@a,\cmdPAS@patronpave@b+\cmdPAS@patronpave@a+1) -- (2*\cmdPAS@patronpave@c+\cmdPAS@patronpave@a,\cmdPAS@patronpave@b+\cmdPAS@patronpave@a+1) node[midway,above] {\cmdPAS@patronpave@c};
						\draw[gray,dotted] (2*\cmdPAS@patronpave@c+2*\cmdPAS@patronpave@a,\cmdPAS@patronpave@b) -- (2*\cmdPAS@patronpave@c+2*\cmdPAS@patronpave@a,\cmdPAS@patronpave@b+1);
						\draw[<->,>=stealth'] (2*\cmdPAS@patronpave@c+\cmdPAS@patronpave@a,\cmdPAS@patronpave@b+1) -- (2*\cmdPAS@patronpave@c+2*\cmdPAS@patronpave@a,\cmdPAS@patronpave@b+1) node[midway,above] {\cmdPAS@patronpave@a};
					\fi
				}
				{
					\draw (2*\cmdPAS@patronpave@c+\cmdPAS@patronpave@a,\cmdPAS@patronpave@b+\cmdPAS@patronpave@c) rectangle +(\cmdPAS@patronpave@a,-2*\cmdPAS@patronpave@c-\cmdPAS@patronpave@b);
					\ifPAS@patronpave@codages
						\node[scale=.5,rotate=90] at (2*\cmdPAS@patronpave@c+\cmdPAS@patronpave@a,\cmdPAS@patronpave@b+\cmdPAS@patronpave@c/2) {///};
						\node[scale=.5] at (2*\cmdPAS@patronpave@c+3*\cmdPAS@patronpave@a/2,\cmdPAS@patronpave@c+\cmdPAS@patronpave@b) {/};
						\node[scale=.5,rotate=90] at (2*\cmdPAS@patronpave@c+2*\cmdPAS@patronpave@a,\cmdPAS@patronpave@b+\cmdPAS@patronpave@c/2) {///};
						\node[scale=.5,rotate=90] at (2*\cmdPAS@patronpave@c+\cmdPAS@patronpave@a,-\cmdPAS@patronpave@c/2) {///};
						\node[scale=.5] at (2*\cmdPAS@patronpave@c+3*\cmdPAS@patronpave@a/2,-\cmdPAS@patronpave@c) {/};
						\node[scale=.5,rotate=90] at (2*\cmdPAS@patronpave@c+2*\cmdPAS@patronpave@a,-\cmdPAS@patronpave@c/2) {///};
					\fi
					\ifPAS@patronpave@legende
						\draw[gray,dotted] (2*\cmdPAS@patronpave@c+\cmdPAS@patronpave@a,\cmdPAS@patronpave@b+\cmdPAS@patronpave@c) -- (2*\cmdPAS@patronpave@c+\cmdPAS@patronpave@a,\cmdPAS@patronpave@b+\cmdPAS@patronpave@c+1);
						\draw[gray,dotted] (2*\cmdPAS@patronpave@c+2*\cmdPAS@patronpave@a,\cmdPAS@patronpave@b+\cmdPAS@patronpave@c) -- (2*\cmdPAS@patronpave@c+2*\cmdPAS@patronpave@a,\cmdPAS@patronpave@b+\cmdPAS@patronpave@c+1);
						\draw[<->,>=stealth'] (2*\cmdPAS@patronpave@c+\cmdPAS@patronpave@a,\cmdPAS@patronpave@b+\cmdPAS@patronpave@c+1) -- (2*\cmdPAS@patronpave@c+2*\cmdPAS@patronpave@a,\cmdPAS@patronpave@b+\cmdPAS@patronpave@c+1) node[midway,above] {\cmdPAS@patronpave@a};
						\draw[gray,dotted] (0,0) -- (0,-1);
						\draw[gray,dotted] (\cmdPAS@patronpave@c,0) -- (\cmdPAS@patronpave@c,-1);
						\draw[<->,>=stealth'] (0,-1) -- (\cmdPAS@patronpave@c,-1) node[midway,below] {\cmdPAS@patronpave@c};
					\fi
				}
			}
		}
		\ifPAS@patronpave@legende
			\draw[gray,dotted] (2*\cmdPAS@patronpave@c+2*\cmdPAS@patronpave@a,\cmdPAS@patronpave@b) -- (2*\cmdPAS@patronpave@c+2*\cmdPAS@patronpave@a+1,\cmdPAS@patronpave@b);
			\draw[gray,dotted] (2*\cmdPAS@patronpave@c+2*\cmdPAS@patronpave@a,0) -- (2*\cmdPAS@patronpave@c+2*\cmdPAS@patronpave@a+1,0);
			\draw[<->,>=stealth'] (2*\cmdPAS@patronpave@c+2*\cmdPAS@patronpave@a+1,\cmdPAS@patronpave@b) -- (2*\cmdPAS@patronpave@c+2*\cmdPAS@patronpave@a+1,0) node[midway,right] {\cmdPAS@patronpave@b};
		\fi
}