5

I have this...

\documentclass{standalone} 
\usepackage{tikz}
\usetikzlibrary{positioning,shapes.geometric,decorations.pathmorphing,decorations.pathreplacing,decorations.shapes,decorations.markings,patterns,calc,fit,arrows}

\begin{document}

\begin{tikzpicture}[>=latex',auto,inner sep=2mm,node distance=2cm and 3cm,scale=1]

%set styles for the axis between turbine and pump and for the boxes

\tikzset{box1/.style={draw,minimum width=2.5cm,rectangle,thick}}
\tikzset{deco/.style={decoration={markings,
                       mark=at position #1 with {\arrow{>}}},
                       postaction={decorate}}}
\tikzset{turb/.style={draw,trapezium,shape border rotate=90,inner sep=1pt,minimum width=2.5cm,trapezium stretches=true,trapezium angle=80,on grid}}   

% draw nodes
\node[turb] (turbine) {Turbine};
\node[box1,on grid,below left=of turbine] (condenser){Condenser};
%connections
\begin{scope}[>=triangle 45]
 \draw [deco=0.6]  (turbine.bottom left corner) |- (condenser);
 \end{scope}
%
\end{tikzpicture}
\end{document} 

enter image description here

But i need this way...new pink connection

enter image description here

Is it possible to connect near the end (Red line). say 1 or 2 mm away from turbine.bottom left corner...

enter image description here

5

($(turbine)!.5!(condenser)$) calculates the middle (0.5) between turbine and condenser.

turbine.south is equivalent to turbine.-90 (-90 is an angle) and condenser.east is equivalent to condenser.0.

So, here, two others possibilities:

\documentclass{standalone} 
\usepackage{tikz}
\usetikzlibrary{%
  positioning,shapes.geometric,decorations.pathmorphing,%
  decorations.pathreplacing,decorations.shapes,%
  decorations.markings,patterns,calc,fit,arrows,%
}

\begin{document}

\begin{tikzpicture}%
  [>=latex',auto,inner sep=2mm,node distance=2cm and 3cm,scale=1]

  % set styles for the axis between turbine and pump and for the boxes

  \tikzset{box1/.style={draw,minimum width=2.5cm,rectangle,thick}}
  \tikzset{
    deco/.style={%
      decoration={%
        markings,
        mark=at position #1 with {\arrow{>}}
      },
      postaction={decorate},
    },
    turb/.style={%
      draw,trapezium,shape border rotate=90,
      inner sep=1pt,minimum width=2.5cm,
      trapezium stretches=true,trapezium angle=80,on grid,
    }
  }   

  % draw nodes
  \node[turb] (turbine) {Turbine};
  \node[box1,on grid,below left=of turbine] (condenser){Condenser};
  % connections
  \begin{scope}[>=triangle 45]

    \draw [deco=0.5,red] (turbine.south)
    |- ($(turbine.south)!.5!(condenser.north)$)
    -| (condenser.north);

    \draw [deco=0.5,violet] (turbine.-70) |- (condenser.10);
  \end{scope}
%
\end{tikzpicture}
\end{document}

enter image description here

11

Adding

\draw [deco=0.7,pink] (turbine.south) |- ++(-1,-0.2) -| (condenser);

to the last scope is sufficient.

enter image description here

  • 4
    A variant (without absolute coordinate) uses: \draw [deco=0.5,red] (turbine) |- ($(turbine)!.5!(condenser)$) -| (condenser); – Paul Gaborit Jun 8 '12 at 6:32
  • 1
    Very fine idea, with ($(turbine)!.5!(condenser)$) it's very easy to adjust the connection. Another possibility is (turbine.south) --++(0,-1em) -| (condenser); . – Alain Matthes Jun 8 '12 at 6:42
  • @PolGab: THis also works well...Thank you. But ($(turbine)!.5!(condenser)$) is calc operation. i do not know the meaning... – sandu Jun 8 '12 at 6:45
  • Can we use like numerical values like (0,-1em) instead of (turbine.south) – sandu Jun 8 '12 at 7:03
  • You can use angle arguments such as \draw [deco=0.7,pink] (turbine.-70) |- (condenser.north east); for your edited question. – percusse Jun 8 '12 at 7:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.