2018-12-19 15:23:27 +01:00
%% symbol library for TikZ track schematics
%
2019-07-21 19:28:30 +02:00
% Copyright 2019 Martin Scheidt (ISC license)
%
2018-12-19 15:23:27 +01:00
% Permission to use, copy, modify, and/or distribute this file for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
2019-07-21 19:28:30 +02:00
\ProvidesFileRCS { tikzlibrarytrackschematic.construction.code.tex}
\colorlet { background} { white}
\colorlet { foreground} { black}
2018-12-19 15:23:27 +01:00
\tikzset {
2019-07-21 19:28:30 +02:00
pics/platform_ left/.default=4,
2018-12-19 15:23:27 +01:00
pics/platform_ left/.style n args={ 1} {
code={
2019-07-20 16:38:49 +02:00
\path [draw, line width=0.75pt,foreground] (0,0.5) -- ++(0,-0.3) -- ++(#1,0) -- ++(0,0.3);
\path [draw, line width=0.75pt,foreground] (0,0.3) -- ++(#1,0);
2018-12-19 15:23:27 +01:00
}
} ,
}
2019-07-21 19:28:30 +02:00
2018-12-19 15:23:27 +01:00
\tikzset {
2019-07-21 19:28:30 +02:00
pics/platform_ right/.default=4,
2018-12-19 15:23:27 +01:00
pics/platform_ right/.style n args={ 1} {
code={
2019-07-20 16:38:49 +02:00
\path [draw, line width=0.75pt,foreground] (0,-0.5) -- ++(0,0.3) -- ++(#1,0) -- ++(0,-0.3);
\path [draw, line width=0.75pt,foreground] (0,-0.3) -- ++(#1,0);
2018-12-19 15:23:27 +01:00
}
} ,
}
2019-07-21 19:28:30 +02:00
2018-12-19 15:23:27 +01:00
\tikzset {
level_ crossing_ barrier_ left/.pic={
{ % road
2019-07-20 16:38:49 +02:00
\path [draw, line width=1pt,foreground] (-0.2, 0.8) -- ++(0,-0.6);
\path [draw, line width=1pt,foreground] ( 0.2, 0.8) -- ++(0,-0.6);
2018-12-19 15:23:27 +01:00
}
{ % barrier
2019-07-20 16:38:49 +02:00
\filldraw [foreground] (-0.4,0.5) circle (0.05);
\path [draw, line width=1pt,foreground] (-0.4,0.5) -- ++(0.39,0);
2018-12-19 15:23:27 +01:00
}
} ;
}
2019-07-21 19:28:30 +02:00
2018-12-19 15:23:27 +01:00
\tikzset {
level_ crossing_ barrier_ right/.pic={
{ % road
2019-07-20 16:38:49 +02:00
\path [draw, line width=1pt,foreground] (-0.2,-0.8) -- ++(0, 0.6);
\path [draw, line width=1pt,foreground] ( 0.2,-0.8) -- ++(0, 0.6);
2018-12-19 15:23:27 +01:00
}
{ % barrier
2019-07-20 16:38:49 +02:00
\filldraw [foreground] (0.4,-0.5) circle (0.05);
\path [draw, line width=1pt,foreground] (0.4,-0.5) -- ++(-0.39,0);
2018-12-19 15:23:27 +01:00
}
} ;
}
2019-07-21 19:28:30 +02:00
2018-12-19 15:23:27 +01:00
\tikzset {
level_ crossing/.pic={
{ % road
2019-07-20 16:38:49 +02:00
\path [draw, line width=1pt,foreground] (-0.2,-0.8) -- ++(0, 0.6);
\path [draw, line width=1pt,foreground] ( 0.2,-0.8) -- ++(0, 0.6);
2018-12-19 15:23:27 +01:00
}
} ;
}
2019-07-21 19:28:30 +02:00
2018-12-19 15:23:27 +01:00
\tikzset {
pics/bridge_ left/.style n args={ 1} {
code={
2019-07-20 16:38:49 +02:00
\path [draw, line width=0.75pt,foreground] (-0.1,0.48) -- ++(0.08,-0.08) -- ++(#1,0) -- ++(0.08,0.08);
2018-12-19 15:23:27 +01:00
}
} ,
pics/bridge_ left/.default=3,
}
2019-07-21 19:28:30 +02:00
2018-12-19 15:23:27 +01:00
\tikzset {
2019-07-21 19:28:30 +02:00
pics/bridge_ right/.default=3,
2018-12-19 15:23:27 +01:00
pics/bridge_ right/.style n args={ 1} {
code={
2019-07-20 16:38:49 +02:00
\path [draw, line width=0.75pt,foreground] (-0.1,-0.48) -- ++(0.08,0.08) -- ++(#1,0) -- ++(0.08,-0.08);
2018-12-19 15:23:27 +01:00
}
} ,
}
2019-07-21 19:28:30 +02:00
2019-04-04 11:28:45 +02:00
\tikzset {
interlocking/.pic={
{
2019-07-20 16:38:49 +02:00
\path [draw, line width=1pt,foreground] (-0.6,-0.4 ) rectangle ++(1.2,0.8); % building
\path [draw, fill,foreground] (-0.5,-0.3 ) rectangle ++(1.0,0.2); % table
\path [draw, fill,foreground] ( 0 , 0.15) circle (0.15); % human dot
2019-04-04 11:28:45 +02:00
}
} ;
}
2019-07-21 19:28:30 +02:00
2019-04-04 11:28:45 +02:00
\tikzset {
hump/.pic={
{ % upper side
2019-07-20 16:38:49 +02:00
\path [draw, line width=0.75pt,foreground] (-0.3, 0.1) -- ++(0,0.05);
\path [draw, line width=0.75pt,foreground] (-0.2, 0.1) -- ++(0,0.15);
\path [draw, line width=0.75pt,foreground] (-0.1, 0.1) -- ++(0,0.25);
\path [draw, line width=0.75pt,foreground] ( 0.0, 0.1) -- ++(0,0.35);
\path [draw, line width=0.75pt,foreground] ( 0.1, 0.1) -- ++(0,0.25);
\path [draw, line width=0.75pt,foreground] ( 0.2, 0.1) -- ++(0,0.15);
\path [draw, line width=0.75pt,foreground] ( 0.3, 0.1) -- ++(0,0.05);
2019-04-04 11:28:45 +02:00
% lower side
2019-07-20 16:38:49 +02:00
\path [draw, line width=0.75pt,foreground] (-0.3,-0.1) -- ++(0,-0.05);
\path [draw, line width=0.75pt,foreground] (-0.2,-0.1) -- ++(0,-0.15);
\path [draw, line width=0.75pt,foreground] (-0.1,-0.1) -- ++(0,-0.25);
\path [draw, line width=0.75pt,foreground] ( 0.0,-0.1) -- ++(0,-0.35);
\path [draw, line width=0.75pt,foreground] ( 0.1,-0.1) -- ++(0,-0.25);
\path [draw, line width=0.75pt,foreground] ( 0.2,-0.1) -- ++(0,-0.15);
\path [draw, line width=0.75pt,foreground] ( 0.3,-0.1) -- ++(0,-0.05);
2019-04-04 11:28:45 +02:00
}
} ;
}
2019-07-21 19:28:30 +02:00
\endinput