I am trying to modify the Fault tree e.g. from Tikz where the nodes are the objects like gates instead of text boxes, and would even elimiate text boxes from few paths if possible. This is my code so far.
\documentclass[border=10pt]{standalone}
\usepackage{tikz}
\usetikzlibrary{trees,calc,shadings,shapes.gates.logic.US,positioning,arrows}
\usetikzlibrary{shapes,snakes}
\begin{document}
\begin{tikzpicture}
[
% Gates and symbols style
and/.style={and gate US,thick,draw,fill=red!60,rotate=90,
anchor=east,xshift=-1mm},
or/.style={or gate US,thick,draw,fill=blue!60,rotate=90,
anchor=east,xshift=-1mm},
be/.style={circle,thick,draw,fill=green!60,anchor=north,
minimum width=0.7cm},
tr/.style={buffer gate US,thick,draw,fill=purple!60,rotate=90,
anchor=east,minimum width=0.8cm},
sq/.style={regular polygon,regular polygon sides=4,thick,draw,fill=orange!60,anchor=north, scale=0.2},
% Label style
label distance=3mm, every label/.style={blue},
% Event style
event/.style={rectangle,thick,draw,fill=yellow!20,text width=2cm, text centered,font=\sffamily,anchor=north},
event2/.style={rectangle,draw=white, fill=white,},
and2/.style={and gate US,draw,fill=red!60,rotate=90, scale=0.5 },
% Children and edges style
edge from parent/.style={very thick,draw=black!70},
edge from parent path={(\tikzparentnode.south) -- ++(0,-1.05cm)-| (\tikzchildnode.north)},
level 1/.style={sibling distance=4cm,level distance=1.5cm, growth parent anchor=south,nodes=event},
level 2/.style={sibling distance=3cm, level distance=2cm},
level 3/.style={sibling distance=3cm},
level 4/.style={sibling distance=3cm}
]
%% Draw events and edges
\node (g1) [event] {System Failure}
child {node (e1) {Midplane}}
child {node [event] (e2) {k/n}
child {node [sq] (e2a) {1}}
child {node [sq] (e2b) {2}}
child[level distance=20mm] {node (e2c) [or, scale=0.4] {}
child {node [sq] (e2c1) {x}}
child {node [sq] (e2c2) {y}}
}
child {node [sq] (e2d) {4}}
}
child {node (e3) {Cooling}}
child {node (e4) {Power domain 1}}
;
% Remove what follows if no gates are required
\node [or] at (g1.south) [] {};
\node [be] at (e1.south) [] {};
\node [and] at (e2.south) [] {};
\node [be] at (e3.south) {};
\node [be] at (e4.south) {};
\end{tikzpicture}
\end{document}
As you can see, i am clearly struggling with the blue OR gate in the middle. Where am I going wrong?