\pgfkeys{ /crusher/dimension/height/.code = {#1}, /crusher/dimension/height/.initial = {0.75 cm}, /crusher/dimension/width top/.code = {#1}, /crusher/dimension/width top/.initial = {1.5 cm}, /crusher/dimension/width bottom/.code = {#1}, /crusher/dimension/width bottom/.initial = {0.75 cm}, /crusher/.is choice, /crusher/basic/.code = {#1}, /crusher/basic/.default = {}, /crusher/hammer/.code = { \pgfkeys{/crusher/basic/.append code = { \pgfpointscale{0.4}{\southeast} \pgf@xa = \pgf@x \pgf@ya = \pgf@y \pgfpointscale{0.2}{\southeast} \pgf@xb = \pgf@x \pgf@yb = \pgf@y \foreach \j in {-1, 1} { \foreach \k in {-1, 1} { \pgfpathmoveto{\pgfpointorigin} \pgfpathlineto{\pgfpoint{\j \pgf@xa}{\k \pgf@ya}} \pgfpathmoveto{\pgfpoint{\j \pgf@xa + \pgf@xb}{\j \pgf@ya - \pgf@yb}} \pgfpathlineto{\pgfpoint{\j \pgf@xa - \pgf@xb}{\j \pgf@ya + \pgf@yb}} } } \pgfpathmoveto{\pgfpoint{\pgf@xa + \pgf@xb}{- \pgf@ya + \pgf@yb}} \pgfpathlineto{\pgfpoint{\pgf@xa - \pgf@xb}{- \pgf@ya - \pgf@yb}} \pgfpathmoveto{\pgfpoint{-\pgf@xa + \pgf@xb}{\pgf@ya + \pgf@yb}} \pgfpathlineto{\pgfpoint{-\pgf@xa - \pgf@xb}{\pgf@ya - \pgf@yb}} } }}, /crusher/impact/.code = { \pgfkeys{/crusher/basic/.append code = { \pgfpointscale{0.3}{\southeast} \pgf@xa = \pgf@x \pgfpathcircle{\pgfpointorigin}{\pgf@xa} \pgfusepath{stroke, clip} \pgfpointscale{0.6}{\southeast} \pgf@xa = \pgf@x \pgf@ya = \pgf@y \pgfpathmoveto{\pgfpoint{-\pgf@xa}{-\pgf@ya}} \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@ya}} \pgfpathmoveto{\pgfpoint{-\pgf@xa}{\pgf@ya}} \pgfpathlineto{\pgfpoint{\pgf@xa}{-\pgf@ya}} } }}, /crusher/jaw/.code = { \pgfkeys{/crusher/basic/.append code = { \southeast \pgfpathmoveto{\pgfpoint{-\pgf@x}{0}} \pgfpathlineto{\pgfpointorigin} \pgfpointscale{0.3}{\southeast} \pgf@xa = \pgf@x \pgfpatharc{180}{540}{\pgf@xa} \pgfpathclose } }}, /crusher/roller/.code = { \pgfkeys{/crusher/basic/.append code = { \pgfpointscale{0.3}{\southeast} \pgf@xa = \pgf@x \pgfpathmoveto{\pgfpointorigin} \pgfpatharc{0}{360}{\pgf@xa} \pgfpathclose \pgfpatharc{180}{540}{\pgf@xa} \pgfpathclose } }}, /crusher/cone/.code = { \pgfkeys{/crusher/basic/.append code = { \pgfpointscale{0.3}{\southeast} \pgf@xa = \pgf@x \pgfpointscale{0.5}{\southeast} \pgf@ya = \pgf@y \pgfpointscale{0.6}{\southeast} \pgf@xb = \pgf@x \pgfpathmoveto{\pgfpoint{\pgf@xb}{\pgf@ya}} \pgfpathlineto{\pgfpoint{\pgf@xa}{-\pgf@ya}} \pgfpathlineto{\pgfpoint{-\pgf@xa}{-\pgf@ya}} \pgfpathlineto{\pgfpoint{-\pgf@xb}{\pgf@ya}} \pgfpathclose } }}, /crusher/.default = {\pgfkeys{/pump/basic}} } \pgfdeclareshape{crusher}{ \savedanchor{\centerpoint}{ \pgfpointorigin } \savedanchor{\north}{ \pgfpointscale{0.5}{\pgfpoint{0}{\pgfkeysvalueof{/crusher/dimension/height}}} } \savedanchor{\northeast}{ \pgfpointscale{0.5}{\pgfpoint{\pgfkeysvalueof{/crusher/dimension/width top}}{\pgfkeysvalueof{/crusher/dimension/height}}} } \savedanchor{\southeast}{ \pgfpointscale{0.5}{\pgfpoint{\pgfkeysvalueof{/crusher/dimension/width bottom}}{\pgfkeysvalueof{/crusher/dimension/height}}} \pgf@y = -\pgf@y } \anchor{center}{ \centerpoint } \anchor{north}{ \north } \anchor{east}{ \southeast \pgfpoint{1.5\pgf@x}{0} } \anchor{west}{ \southeast \pgfpoint{-1.5\pgf@x}{0} } \anchor{south}{ \north \pgfpoint{\pgf@x}{-\pgf@y} } \anchor{northeast}{ \northeast } \anchor{near northeast}{ \northeast \pgf@x = 0.75 \pgf@x } \anchor{northwest}{ \northeast \pgf@x = -\pgf@x } \anchor{near northwest}{ \northeast \pgf@x = -0.75 \pgf@x } \anchor{southeast}{ \southeast } \anchor{southwest}{ \southeast \pgf@x = -\pgf@x } \backgroundpath{ \pgfpathmoveto{\north} \pgfpathlineto{\northeast} \pgfpathlineto{\southeast} \southeast \pgfpathlineto{\pgfpoint{-\pgf@x}{\pgf@y}} \northeast \pgfpathlineto{\pgfpoint{-\pgf@x}{\pgf@y}} \pgfpathclose \southeast \pgf@xa = \pgf@x \pgf@ya = \pgf@y \northeast \pgf@yb = \pgf@y \pgfpathmoveto{\pgfpoint{\pgf@xa}{\pgf@ya}} \pgfpathlineto{\pgfpoint{\pgf@xa}{\pgf@yb}} \pgfpathmoveto{\pgfpoint{-\pgf@xa}{\pgf@ya}} \pgfpathlineto{\pgfpoint{-\pgf@xa}{\pgf@yb}} \pgfkeys{/crusher/basic} \pgfusepath{stroke} } }