|
- %&tex
- \documentclass{standalone}
- \usepackage{tikz}
- \usepackage{siltex}
- \usetikzlibrary {calc,arrows.meta,positioning,patterns,math}
- %\input{graphics/tics.tikz}
-
- \begin{document}
- \begin{tikzpicture}[x=0.6cm, y=0.6cm]
- \def \markerradius {0.5};
- \def \angle {40};
- \def \startangle {-90-\angle};
- \def \stopangle {-90+\angle};
- \def \length{4};
- \def \thick{0.3};
- \def \clampoffset{2};
- \pgfmathsetmacro{\clamppos}{\clampoffset-\markerradius*sin(\angle)};
- \pgfmathsetmacro{\side}{\markerradius*(1-cos(\angle))};
- \def \clampsection {++(${\side}*(0,1)$) arc[start angle=\startangle,end angle=\stopangle,radius=\markerradius] -- ++(${-1*\side}*(0,1)$)};
- \def \blockdistance {2.8}
- \def \blockpos {(0,0)};
- \def \markerdrop {0.5};
- \def \spacing {5.5};
- \def \yspacing {3.9};
- \tikzset{
- block/.pic=
- {
- \def \height {1.5};
- \def \width {1};
- \draw[pattern = north west lines] (\clamppos,-1) -- (\clamppos,-\markerdrop) -- \clampsection -- ++(0,-0.2) -- (\blockdistance,-\markerdrop-0.2) -- (\blockdistance,1) -- (\blockdistance+\width,1) -- (\blockdistance+\width,-1);
- },
- upperclamp/.pic=
- {
- \def \startangle {90+\angle};
- \def \stopangle {90-\angle};
- \def \side {-\markerradius*(1-cos(\angle))};
- \draw[fill=lightgray] (0,0) -- (${\clamppos}*(1,0)$) coordinate(a) -- \clampsection coordinate(b) -- (\length,0) -- ++(0,\thick) -- (0,\thick);
- },
- lowerclamp/.pic=
- {
- \draw[fill=lightgray] (0,0) -- (${\clamppos}*(1,0)$) -- \clampsection -- ++(0,-\thick) -- (0,-\thick);
- },
- marker/.pic=
- {
- \draw[fill=gray] (0,0) circle(\markerradius);
- }
- }
- \def \nodepos {(\blockdistance+1,1.9)};
- \begin{scope}[shift={(0*\spacing,0)}]
- \def \eex {1.3};
- \def \eey {-0.5};
- \pgfmathsetmacro{\clampangle}{max(0,atan2(\eey,{\blockdistance+\eex}))};
- \draw \blockpos pic {block};
- \node at \nodepos {1.};
- \draw (2-\eex,{\markerradius+\eey*-1}) pic {marker};
- \begin{scope}[shift={(-\eex,-\eey)}]
- \draw (0,0) pic {lowerclamp};
- \draw (0,1) pic[rotate=\clampangle] {upperclamp};
- \end{scope}
- \end{scope}
- \begin{scope}[shift={(1*\spacing,0)}]
- \def \eex {0};
- \def \eey {0};
- \pgfmathsetmacro{\clampangle}{max(0,atan2(\eey,{\blockdistance+\eex}))};
- \draw \blockpos pic {block};
- \node at \nodepos {2.};
- \draw (2,\markerradius) pic {marker};
- \begin{scope}[shift={(-\eex,-\eey)}]
- \draw (0,0) pic {lowerclamp};
- \draw (0,1) pic[rotate=\clampangle] {upperclamp};
- \end{scope}
- \end{scope}
- \begin{scope}[shift={(2*\spacing,0)}]
- \def \eex {0};
- \def \eey {0.5};
- \pgfmathsetmacro{\clampangle}{max(0,atan2(\eey,{\blockdistance+\eex}))};
- \draw \blockpos pic {block};
- \node at \nodepos {3.};
- \draw (2,\markerradius-\markerdrop) pic {marker};
- \begin{scope}[shift={(-\eex,-\eey)}]
- \draw (0,0) pic {lowerclamp};
- \draw (0,1) pic[rotate=\clampangle] {upperclamp};
- \end{scope}
- \end{scope}
- \begin{scope}[shift={(0*\spacing,-\yspacing)}]
- \def \eex {0};
- \def \eey {0.7};
- \pgfmathsetmacro{\clampangle}{max(0,atan2(\eey,{\blockdistance+\eex}))};
- \draw \blockpos pic {block};
- \node at \nodepos {4.};
- \draw (2,\markerradius-\markerdrop) pic {marker};
- \begin{scope}[shift={(-\eex,-\eey)}]
- \draw (0,0) pic {lowerclamp};
- \draw (0,1) pic[rotate=\clampangle] {upperclamp};
- \end{scope}
- \end{scope}
- \begin{scope}[shift={(1*\spacing,-\yspacing)}]
- \def \eex {1};
- \def \eey {0.7};
- \pgfmathsetmacro{\clampangle}{max(0,atan2(\eey,{\blockdistance+\eex}))};
- \draw \blockpos pic {block};
- \node at \nodepos {5.};
- \draw (2,\markerradius-\markerdrop) pic {marker};
- \begin{scope}[shift={(-\eex,-\eey)}]
- \draw (0,0) pic {lowerclamp};
- \draw (0,1) pic[rotate=\clampangle] {upperclamp};
- \end{scope}
- \end{scope}
- \begin{scope}[shift={(2*\spacing,-\yspacing)}]
- \def \eex {1};
- \def \eey {0};
- \pgfmathsetmacro{\clampangle}{max(0,atan2(\eey,{\blockdistance-\eex}))};
- \draw \blockpos pic {block};
- \node at \nodepos {6.};
- \draw (2,\markerradius-\markerdrop) pic {marker};
- \begin{scope}[shift={(-\eex,-\eey)}]
- \draw (0,0) pic {lowerclamp};
- \draw (0,1) pic[rotate=\clampangle] {upperclamp};
- \end{scope}
- \end{scope}
-
- \draw (4.2,-1.3*\yspacing) -- ++(0,1.9*\yspacing);
- \draw[shift={(\spacing,0)}] (4.2,-1.3*\yspacing) -- ++(0,1.9*\yspacing);
- \draw(-1.4,-1.5) -- ++(3*\spacing,0);
-
- \end{tikzpicture}
- \end{document}
|