2018-12-19 15:23:27 +01:00
%% symbol library for TikZ track schematics
%
2019-07-20 16:38:49 +02:00
% Copyright 2019 Martin Scheidt (ISC license)
2019-07-21 19:28:30 +02:00
%
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.topology.code.tex}
2019-04-04 11:28:45 +02:00
\colorlet { background} { white}
2019-07-20 16:38:49 +02:00
\colorlet { foreground} { black}
2019-07-21 19:28:30 +02:00
\tikzset { MainTrack/.style={ line width=2pt,foreground} } %
2019-08-30 15:29:30 +02:00
\tikzset { SecondaryTrack/.style={ line width=0.7pt,foreground} } %
2019-02-26 14:46:51 +01:00
2019-04-04 11:28:45 +02:00
\tikzset {
2019-07-21 19:28:30 +02:00
pics/track_ number/.default=,
pics/track_ number/.style args={ #1} { %
code={ %
2019-07-20 16:38:49 +02:00
\node [fill=background,font=\sffamily,text=foreground] at (0,0) { #1} ; % speed indicator
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 {
2019-07-21 19:28:30 +02:00
pics/track_ distance/.default=,
2019-04-04 11:28:45 +02:00
pics/track_ distance/.style args={ #1} {
code={
2019-07-20 16:38:49 +02:00
\fill [foreground] (0,0.96) -- ++(-0.1,-0.15) -- ++(0.2,0) -- cycle; % upper triangle
\node [baseline=(current bounding box.center),font=\sffamily,text=foreground] at (0,0.5) { #1} ; % distance indicator
\fill [foreground] (0,0.04) -- ++(-0.1,0.15) -- ++(0.2,0) -- cycle; % lower triangle
2019-04-04 11:28:45 +02: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/turnout_ left_ forward/.default=foreground,
2018-12-19 15:23:27 +01:00
pics/turnout_ left_ forward/.style args={ #1} {
code={
2019-07-20 16:38:49 +02:00
\path [draw=foreground,line width=1pt,fill=#1] (0,0) -- ++(0.4,0.4) -- ++(0,-0.4); % turnout marker
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/turnout_ left_ backward/.default=foreground,
2018-12-19 15:23:27 +01:00
pics/turnout_ left_ backward/.style args={ #1} {
code={
2019-07-20 16:38:49 +02:00
\path [draw=foreground,line width=1pt,fill=#1] (0,0) -- ++(-0.4,-0.4) -- ++(0,0.4); % turnout marker
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/turnout_ right_ forward/.default=foreground,
2018-12-19 15:23:27 +01:00
pics/turnout_ right_ forward/.style args={ #1} {
code={
2019-07-20 16:38:49 +02:00
\path [draw=foreground,line width=1pt,fill=#1] (0,0) -- ++(0.4,-0.4) -- ++(0,0.4); % turnout marker
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/turnout_ right_ backward/.default=foreground,
2018-12-19 15:23:27 +01:00
pics/turnout_ right_ backward/.style args={ #1} {
code={
2019-07-20 16:38:49 +02:00
\path [draw=foreground,line width=1pt,fill=#1] (0,0) -- ++(-0.4,0.4) -- ++(0,-0.4); % turnout marker
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 {
fouling_ point_ right_ backward/.pic={
2019-07-20 16:38:49 +02:00
\path [draw=foreground,line width=0.75pt] (-0.7,0) -- ++(0,0.7); % fouling point indicator
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 {
fouling_ point_ left_ backward/.pic={
2019-07-20 16:38:49 +02:00
\path [draw=foreground,line width=0.75pt] (-0.7,0) -- ++(0,-0.7); % fouling point indicator
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 {
fouling_ point_ right_ forward/.pic={
2019-07-20 16:38:49 +02:00
\path [draw=foreground,line width=0.75pt] (0.7,0) -- ++(0,-0.7); % fouling point indicator
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 {
fouling_ point_ left_ forward/.pic={
2019-07-20 16:38:49 +02:00
\path [draw=foreground,line width=0.75pt] (0.7,0) -- ++(0,0.7); % fouling point indicator
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 {
slip_ left_ forward/.pic={
2019-07-20 16:38:49 +02:00
\path [draw=foreground,line width=0.75pt] (-0.4,0.1) -- (0.3,0.4); % fouling point indicator
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 {
slip_ left_ backward/.pic={
2019-07-20 16:38:49 +02:00
\path [draw=foreground,line width=0.75pt] (-0.3,-0.4) -- (0.4,-0.1); % fouling point indicator
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 {
slip_ right_ forward/.pic={
2019-07-20 16:38:49 +02:00
\path [draw=foreground,line width=0.75pt] (-0.4,-0.1) -- (0.3,-0.4); % fouling point indicator
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 {
slip_ right_ backward/.pic={
2019-07-20 16:38:49 +02:00
\path [draw=foreground,line width=0.75pt] (0.4,0.1) -- (-0.3,0.4); % fouling point indicator
} ;
}
\tikzset {
turnout_ left_ forward_ points_ right/.pic={
\path [draw=foreground,line width=1.5pt] (0,-0.1) -- ++(0.3,0); % points indicator
} ;
}
2019-07-21 19:28:30 +02:00
2019-07-20 16:38:49 +02:00
\tikzset {
turnout_ left_ forward_ points_ left/.pic={
\path [draw=foreground,line width=1.5pt] (-0.035, 0.1) -- ++(0.2,0.2); % points indicator
} ;
}
2019-07-21 19:28:30 +02:00
2019-07-20 16:38:49 +02:00
\tikzset {
turnout_ left_ forward_ points_ moving/.pic={
\fill [foreground] (0.075,-0.1) circle (0.05); % points indicator left
\fill [foreground] (0.225,-0.1) circle (0.05);
\fill [foreground] (0.015, 0.15) circle (0.05); % points indicator right
\fill [foreground] (0.115, 0.25) circle (0.05);
} ;
}
2019-07-21 19:28:30 +02:00
2019-07-20 16:38:49 +02:00
\tikzset {
turnout_ left_ backward_ points_ right/.pic={
\path [draw=foreground,line width=1.5pt] (0,0.1) -- ++(-0.3,0); % points indicator
} ;
}
2019-07-21 19:28:30 +02:00
2019-07-20 16:38:49 +02:00
\tikzset {
turnout_ left_ backward_ points_ left/.pic={
\path [draw=foreground,line width=1.5pt] (0.035,-0.1) -- ++(-0.2,-0.2); % points indicator
} ;
}
2019-07-21 19:28:30 +02:00
2019-07-20 16:38:49 +02:00
\tikzset {
turnout_ left_ backward_ points_ moving/.pic={
\fill [foreground] (-0.075,0.1) circle (0.05); % points indicator left
\fill [foreground] (-0.225,0.1) circle (0.05);
\fill [foreground] (-0.015,-0.15) circle (0.05); % points indicator right
\fill [foreground] (-0.115,-0.25) circle (0.05);
} ;
}
2019-07-21 19:28:30 +02:00
2019-07-20 16:38:49 +02:00
\tikzset {
turnout_ right_ forward_ points_ right/.pic={
\path [draw=foreground,line width=1.5pt] (-0.035,-0.1) -- ++(0.2,-0.2); % points indicator
} ;
}
2019-07-21 19:28:30 +02:00
2019-07-20 16:38:49 +02:00
\tikzset {
turnout_ right_ forward_ points_ left/.pic={
\path [draw=foreground,line width=1.5pt] (0,0.1) -- ++(0.3,0); % points indicator
} ;
}
2019-07-21 19:28:30 +02:00
2019-07-20 16:38:49 +02:00
\tikzset {
turnout_ right_ forward_ points_ moving/.pic={
\fill [foreground] (0.075, 0.1) circle (0.05); % points indicator left
\fill [foreground] (0.225, 0.1) circle (0.05);
\fill [foreground] (0.015,-0.15) circle (0.05); % points indicator right
\fill [foreground] (0.115,-0.25) circle (0.05);
} ;
}
2019-07-21 19:28:30 +02:00
2019-07-20 16:38:49 +02:00
\tikzset {
turnout_ right_ backward_ points_ right/.pic={
\path [draw=foreground,line width=1.5pt] (0.035,0.1) -- ++(-0.2,0.2); % points indicator
} ;
}
2019-07-21 19:28:30 +02:00
2019-07-20 16:38:49 +02:00
\tikzset {
turnout_ right_ backward_ points_ left/.pic={
\path [draw=foreground,line width=1.5pt] (0,-0.1) -- ++(-0.3,0); % points indicator
} ;
}
2019-07-21 19:28:30 +02:00
2019-07-20 16:38:49 +02:00
\tikzset {
turnout_ right_ backward_ points_ moving/.pic={
\fill [foreground] (-0.075,-0.1) circle (0.05); % points indicator left
\fill [foreground] (-0.225,-0.1) circle (0.05);
\fill [foreground] (-0.015,0.15) circle (0.05); % points indicator right
\fill [foreground] (-0.115,0.25) circle (0.05);
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 {
derailer_ right_ forward/.pic={
2019-07-20 16:38:49 +02:00
\path [draw=foreground, line width=1pt] (0,0.2) -- ++(0,-0.4); % derailer marker
\path [draw=foreground,->,>=latex,line width=1pt,dashed] (0,0) -- ++(0.4,-0.4); % derailer arrow
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 {
derailer_ right_ backward/.pic={
2019-07-20 16:38:49 +02:00
\path [draw=foreground, line width=1pt] (0,0.2) -- ++(0,-0.4); % derailer marker
\path [draw=foreground,->,>=latex,line width=1pt,dashed] (0,0) -- ++(-0.4,0.4); % derailer arrow
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 {
derailer_ left_ forward/.pic={
2019-07-20 16:38:49 +02:00
\path [draw=foreground, line width=1pt] (0,0.2) -- ++(0,-0.4); % derailer marker
\path [draw=foreground,->,>=latex,line width=1pt,dashed] (0,0) -- ++(0.4,0.4); % derailer arrow
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 {
derailer_ left_ backward/.pic={
2019-07-20 16:38:49 +02:00
\path [draw=foreground, line width=1pt] (0,0.2) -- ++(0,-0.4); % derailer marker
\path [draw=foreground,->,>=latex,line width=1pt,dashed] (0,0) -- ++(-0.4,-0.4); % derailer arrow
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 {
bufferstop_ forward/.pic={
2019-07-20 16:38:49 +02:00
\path [draw=foreground, line width=1pt] (-0.1,0.2) -- ++(0.1,0) -- ++(0,-0.4) -- ++ (-0.1,0); % bufferstop marker
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 {
bufferstop_ backward/.pic={
2019-07-20 16:38:49 +02:00
\path [draw=foreground, line width=1pt] (0.1,0.2) -- ++(-0.1,0) -- ++(0,-0.4) -- ++ (0.1,0); % bufferstop marker
2018-12-19 15:23:27 +01:00
} ;
}
2019-07-21 19:28:30 +02:00
\endinput