von BlackDevil » So 20. Okt 2013, 13:30
Dann werde ich mich wohl da mal anmelden

Aber nicht jetzt, heute Abend oder morgen..
%------------------------------------------------
% Pipe
%------------------------------------------------
% \pipe{start}{end}[insulation][heated]
%
\def\pgfdecoratedcontourdistance{0pt}
\pgfkeys{/pgf/decoration/contour distance/.code={%
\pgfmathparse{#1}%
\let\pgfdecoratedcontourdistance=\pgfmathresult}%
}
\pgfdeclaredecoration{contour lineto}{start}
{
\state{start}[next state=draw, width=0pt]{
\pgfpathmoveto{\pgfpoint{0pt}{\pgfdecoratedcontourdistance}}%
}
\state{draw}[next state=draw, width=\pgfdecoratedinputsegmentlength]{
\pgfmathparse{-\pgfdecoratedcontourdistance*cot(-\pgfdecoratedangletonextinputsegment/2+90)}%
\let\shorten=\pgfmathresult%
\pgfpathlineto{\pgfpoint{\pgfdecoratedinputsegmentlength+\shorten}{\pgfdecoratedcontourdistance}}%
}
\state{final}{
\pgfpathlineto{\pgfpoint{\pgfdecoratedinputsegmentlength}{\pgfdecoratedcontourdistance}}%
}
}
\newdimen\HelpVarA
\newdimen\HelpVarB
\newdimen\HelpVarC
\newdimen\HelpVarD
\newcommand*{\ExtractCoordinate}[3]{\path (#1); \pgfgetlastxy{#2}{#3};}%
\newcommandx{\pipe}[4][3=0,4=0]
{
% \draw [ultra thick] (#1) -- (#2);
\draw [ultra thick] (#1) |- (#2);
\ifthenelse{\equal{#4}{1}}{ % Heated
% \draw [thick, dashdotted] ($(#1)-0.15*(0,1)$) |- ($(#2)-0.15*(0,1)$);
\draw [thick, postaction={decoration={contour lineto, contour distance=-0.1cm},draw=black, dashdotted, decorate}] (#1) |- (#2);
}{}
\ifthenelse{\equal{#3}{1}}{ % Isolation
% \draw [pattern = north east lines] ($(#1)+0.1*(1,0)-0.2*(0,1)$) rectangle ($(#2)-0.1*(1,0)+0.2*(0,1)$);
% \draw [pattern = north east lines] let \p1=(#1),
% \p2=(#2) in
% ($(\x1,\y1)+0.1*(1,0)-0.2*(0,1)$) rectangle ($(\x1,\y2)-0.1*(1,0)+0.2*(0,1)$);
% \draw [pattern = north east lines] let \p1=(#1),
% \p2=(#2) in
% ($(\x1,\y2)+0.1*(1,0)-0.2*(0,1)$) rectangle ($(\x2,\y2)-0.1*(1,0)+0.2*(0,1)$);
\ExtractCoordinate{#1}{\HelpVarA}{\HelpVarB};
\ExtractCoordinate{#2}{\HelpVarC}{\HelpVarD};
\ifthenelse{\equal{\HelpVarB}{\HelpVarD}}
{
\draw [pattern = north east lines] let \p1=(#1),
\p2=(#2) in
($(\x1,\y2)+0.2*(1,0)-0.2*(0,1)$) rectangle ($(\x2,\y2)-0.2*(1,0)+0.2*(0,1)$);
}
{
\ifthenelse{\equal{\HelpVarA}{\HelpVarC}}
{
\draw [pattern = north east lines] let \p1=(#1),
\p2=(#2) in
($(\x1,\y1)-0.2*(1,0)+0.2*(0,1)$) rectangle ($(\x2,\y2)+0.2*(1,0)-0.2*(0,1)$);
}
{
\draw [pattern = north east lines] let \p1=(#1),
\p2=(#2) in
($(\x1,\y2)+0.1*(1,0)-0.2*(0,1)$) rectangle ($(\x2,\y2)-0.1*(1,0)-0.2*(0,1)$);
\draw [pattern = north east lines] let \p1=(#1),
\p2=(#2) in
($(\x1,\y1)!0.2cm!(\x1,\y2)!-0.2cm!(\x2,\y1)$) rectangle ($(\x1,\y2)!0.2cm!(\x2,\y2)!0.2cm!(\x1,\y1)$);
\draw [pattern = north east lines] let \p1=(#1),
\p2=(#2) in
($(\x1,\y2)+0.2*(1,0)-0.2*(0,1)$) rectangle ($(\x2,\y2)-0.2*(1,0)+0.2*(0,1)$);
}
}
}{}
}
Rohre gehen nun auch. Hab mir mit Google ein recht ... ansehnliches Konstrukt zusammen geschustert ^^[/code]
Dann werde ich mich wohl da mal anmelden ;) Aber nicht jetzt, heute Abend oder morgen..
[code] %------------------------------------------------
% Pipe
%------------------------------------------------
% \pipe{start}{end}[insulation][heated]
%
\def\pgfdecoratedcontourdistance{0pt}
\pgfkeys{/pgf/decoration/contour distance/.code={%
\pgfmathparse{#1}%
\let\pgfdecoratedcontourdistance=\pgfmathresult}%
}
\pgfdeclaredecoration{contour lineto}{start}
{
\state{start}[next state=draw, width=0pt]{
\pgfpathmoveto{\pgfpoint{0pt}{\pgfdecoratedcontourdistance}}%
}
\state{draw}[next state=draw, width=\pgfdecoratedinputsegmentlength]{
\pgfmathparse{-\pgfdecoratedcontourdistance*cot(-\pgfdecoratedangletonextinputsegment/2+90)}%
\let\shorten=\pgfmathresult%
\pgfpathlineto{\pgfpoint{\pgfdecoratedinputsegmentlength+\shorten}{\pgfdecoratedcontourdistance}}%
}
\state{final}{
\pgfpathlineto{\pgfpoint{\pgfdecoratedinputsegmentlength}{\pgfdecoratedcontourdistance}}%
}
}
\newdimen\HelpVarA
\newdimen\HelpVarB
\newdimen\HelpVarC
\newdimen\HelpVarD
\newcommand*{\ExtractCoordinate}[3]{\path (#1); \pgfgetlastxy{#2}{#3};}%
\newcommandx{\pipe}[4][3=0,4=0]
{
% \draw [ultra thick] (#1) -- (#2);
\draw [ultra thick] (#1) |- (#2);
\ifthenelse{\equal{#4}{1}}{ % Heated
% \draw [thick, dashdotted] ($(#1)-0.15*(0,1)$) |- ($(#2)-0.15*(0,1)$);
\draw [thick, postaction={decoration={contour lineto, contour distance=-0.1cm},draw=black, dashdotted, decorate}] (#1) |- (#2);
}{}
\ifthenelse{\equal{#3}{1}}{ % Isolation
% \draw [pattern = north east lines] ($(#1)+0.1*(1,0)-0.2*(0,1)$) rectangle ($(#2)-0.1*(1,0)+0.2*(0,1)$);
% \draw [pattern = north east lines] let \p1=(#1),
% \p2=(#2) in
% ($(\x1,\y1)+0.1*(1,0)-0.2*(0,1)$) rectangle ($(\x1,\y2)-0.1*(1,0)+0.2*(0,1)$);
% \draw [pattern = north east lines] let \p1=(#1),
% \p2=(#2) in
% ($(\x1,\y2)+0.1*(1,0)-0.2*(0,1)$) rectangle ($(\x2,\y2)-0.1*(1,0)+0.2*(0,1)$);
\ExtractCoordinate{#1}{\HelpVarA}{\HelpVarB};
\ExtractCoordinate{#2}{\HelpVarC}{\HelpVarD};
\ifthenelse{\equal{\HelpVarB}{\HelpVarD}}
{
\draw [pattern = north east lines] let \p1=(#1),
\p2=(#2) in
($(\x1,\y2)+0.2*(1,0)-0.2*(0,1)$) rectangle ($(\x2,\y2)-0.2*(1,0)+0.2*(0,1)$);
}
{
\ifthenelse{\equal{\HelpVarA}{\HelpVarC}}
{
\draw [pattern = north east lines] let \p1=(#1),
\p2=(#2) in
($(\x1,\y1)-0.2*(1,0)+0.2*(0,1)$) rectangle ($(\x2,\y2)+0.2*(1,0)-0.2*(0,1)$);
}
{
\draw [pattern = north east lines] let \p1=(#1),
\p2=(#2) in
($(\x1,\y2)+0.1*(1,0)-0.2*(0,1)$) rectangle ($(\x2,\y2)-0.1*(1,0)-0.2*(0,1)$);
\draw [pattern = north east lines] let \p1=(#1),
\p2=(#2) in
($(\x1,\y1)!0.2cm!(\x1,\y2)!-0.2cm!(\x2,\y1)$) rectangle ($(\x1,\y2)!0.2cm!(\x2,\y2)!0.2cm!(\x1,\y1)$);
\draw [pattern = north east lines] let \p1=(#1),
\p2=(#2) in
($(\x1,\y2)+0.2*(1,0)-0.2*(0,1)$) rectangle ($(\x2,\y2)-0.2*(1,0)+0.2*(0,1)$);
}
}
}{}
}
[/code]
Rohre gehen nun auch. Hab mir mit Google ein recht ... ansehnliches Konstrukt zusammen geschustert ^^[/code]