Wie erreiche ich, dass die dünneren Linien normal gezeichnet werden?

alt text

Öffne in Overleaf
Code, hier editierbar zum Übersetzen:
\documentclass[tikz,border=5pt]{standalone}
\usetikzlibrary{shapes, calc}
\begin{document}
\begin{tikzpicture}[]
\pgfmathsetlengthmacro{\M}{1cm}
\pgfmathsetlengthmacro{\B}{5*\M}
\pgfmathsetlengthmacro{\H}{3*\M}
\node[name=s,%shape=rectangle,% draw
minimum height=\H, minimum width=\B,
path picture={
\draw[] ($(s.south east)!2/3!(s.north east)$) -- (s.south east) -- (s.south west)
-- (s.north west)
-- ([yshift=2/3*\H, xshift=1/3*\B]s.south west)
-- ([yshift=0, xshift=1/3*\B]s.north west)
-- ([yshift=2/3*\H, xshift=2/3*\B]s.south west)
-- ([yshift=0, xshift=2/3*\B]s.north west)
-- ([yshift=2/3*\H, xshift=3/3*\B]s.south west) ;
}
] {Fabrik};
\end{tikzpicture}
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

gefragt 14 Feb '19, 19:32

cis's gravatar image

cis
9.6k104460491
Akzeptiert-Rate: 29%


Indem Du dafür sorgst, dass die Linien nicht weggeclippt werden, weil sie aus dem path picture rausschauen.

Öffne in Overleaf
Code, hier editierbar zum Übersetzen:
\documentclass[tikz,border=5pt]{standalone}
\usetikzlibrary{calc} % shapes wird hier nicht gebraucht
\begin{document}
\begin{tikzpicture}[]
\pgfmathsetlengthmacro{\M}{1cm}
\pgfmathsetlengthmacro{\B}{5*\M}
\pgfmathsetlengthmacro{\H}{3*\M}
\node[name=s,%shape=rectangle,% draw
minimum height=\H, minimum width=\B,
path picture={
\draw[]
([xshift=-\pgflinewidth]$(s.south east)!2/3!(s.north east)$)
-- ([xshift=-\pgflinewidth,yshift=\pgflinewidth]s.south east)
-- ([xshift=\pgflinewidth,yshift=\pgflinewidth]s.south west)
-- ([xshift=\pgflinewidth,yshift=-\pgflinewidth]s.north west)
-- ([yshift=2/3*\H, xshift=1/3*\B]s.south west)
-- ([yshift=-\pgflinewidth, xshift=1/3*\B]s.north west)
-- ([yshift=2/3*\H, xshift=2/3*\B]s.south west)
-- ([yshift=-\pgflinewidth, xshift=2/3*\B]s.north west)
-- ([yshift=2/3*\H, xshift=3/3*\B]s.south west) ;
}
] {Fabrik};
\end{tikzpicture}
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

alt text

Die Weise, in der Du den Namen der node mit dem path picture verwurstelst, halte ich übrigens für etwas bedenklich. Ich würde in dem path picture alle s. mit path picture bounding box. ersetzen. Allerdings würde ich persönlich hier eh keine node verwenden, sondern ein pic. Mit local bounding box kannst Du dem auch die üblichen Anker verpassen.

Öffne in Overleaf
Code, hier editierbar zum Übersetzen:
\documentclass[tikz,border=5pt]{standalone}
\begin{document}
\begin{tikzpicture}[pics/.cd,
Fabrik/.style args={%
mit Breite #1 und Hoehe #2 und Text #3}{
code={
\draw (#1/2,#2/6) -- (#1/2,-#2/2) -- (-#1/2,-#2/2) -- (-#1/2,#2/2)
-- (-#1/6,#2/6) -- (-#1/6,#2/2)-- (#1/6,#2/6) -- (#1/6,#2/2) -- cycle;
\node at (0,0) {#3};}}]
\pgfmathsetlengthmacro{\M}{1cm}
\pgfmathsetlengthmacro{\B}{5*\M}
\pgfmathsetlengthmacro{\H}{3*\M}
\pic[local bounding box=FBox] {Fabrik=mit Breite {\B} und Hoehe {\H} und Text
{pic Fabrik}};
\draw[thick,blue,-latex] (FBox.south west) to[bend right]
node[midway,below]{Gell, da schaugst!} (FBox.south east);
\end{tikzpicture}
\end{document}
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

alt text

Permanenter link

beantwortet 15 Feb '19, 02:54

Community's gravatar image

Community
21
Akzeptiert-Rate: 56%

bearbeitet 15 Feb '19, 03:13

Gel%C3%B6scht's gravatar image

Gelöscht
(ausgesetzt)

Es ist wichtig, dass das ganze am Schluß eine node ist. Dazu braucht es wohl diese vielen pgflinwidths.

(15 Feb '19, 11:58) cis
Deine Antwort
[Vorschau ausblenden]

Folgen dieser Frage

Per E-Mail:

Wenn sie sich anmelden, kommen Sie für alle Updates hier in Frage

Per RSS:

Antworten

Antworten und Kommentare

Frage-Themen:

×731

gestellte Frage: 14 Feb '19, 19:32

Frage wurde gesehen: 3,717 Mal

zuletzt geändert: 15 Feb '19, 11:58