tikz-trackschematic/src/graphSymbols.tex

70 lines
1.8 KiB
TeX

%% symbol library for TikZ track schematics
%
% Copyright 2018 Martin Scheidt (ISC license)
% 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.
\tikzset{
pics/node/.style args={#1/#2}{
code={
\path[draw,line width=#2,fill=#1] (0,0) circle (0.1);
}
},
pics/node/.default=white/1pt,
}
\tikzset{
colon/.pic={
\path[draw,line width=1pt,fill=white] (-0.1,0) circle (0.1);
\path[draw,line width=1pt,fill=white] ( 0.1,0) circle (0.1);
};
}
\tikzset{
approach/.pic={
\path[draw, fill=white] (0,-0.1) -- ++(0.1,0.2) -- ++(-0.2,0) -- cycle; % triangle shape
};
}
\tikzset{
tee/.pic={
\path[draw, fill=black] (0,0) circle (0.05);
};
}
\tikzset{
block_start/.pic={
\path[draw, fill=white] (-0.1,-0.1) rectangle ++(0.2,0.2);
};
}
\tikzset{
block_clearing/.pic={
\path[draw, fill=white] (-0.1,-0.1) rectangle ++(0.2,0.2);
\path[draw] (-0.1,-0.1) -- ++(0.2,0.2);
};
}
\tikzset{
route_start/.pic={
\path[draw, fill=white] (0,0) circle (0.1);
};
}
\tikzset{
route_clearing/.pic={
\path [draw, fill=white] (0,0) circle (0.1);
\draw (-0.07,-0.07) -- ++(0.14,0.14);
};
}
\tikzset{
block_end/.pic={
\path[draw, fill=white] (0,-0.1) -- ++(0.1,0.1) -- ++(-0.1,0.1) -- ++(-0.1,-0.1) -- cycle;
};
}
\tikzset{
flank_protection/.pic={
\path[draw, fill=white] (0:0.1) arc (0:180:0.1) -- cycle;
};
}
\tikzset{
train_berth/.pic={
\path[draw, fill=white] (-0.1,-0.15) rectangle ++(0.2,0.3);
\path[draw, line width=0.75pt] (-0.05,-0.1) -- ++(0 ,0.2);
\path[draw, line width=0.75pt] (-0.05, 0 ) -- ++(0.1,0 );
\path[draw, line width=0.75pt] ( 0.05,-0.1) -- ++(0 ,0.2);
};
}