Tikz: 矢印の幅のエッジ (角度付き) にヘッドレス矢印を作成する方法はありますか?

Tikz: 矢印の幅のエッジ (角度付き) にヘッドレス矢印を作成する方法はありますか?

ノードで使用すると正常に動作するこの矢印があります:

\node[draw, single arrow,
        minimum height=9mm, minimum width=1mm,
        single arrow head extend=0mm,
        anchor=west]

しかし、 と を使用した同じ矢印を の\drawような「角度付き」バージョンで取得するにはどうすればよいでしょうか(a) |- (b)?

答え1

私が OP を正しく理解していれば、これが私の試みです:

\documentclass[border=3mm]{standalone}
\usepackage{tikz}
\newcommand{\angledArrowDown}[3]{
\coordinate (A) at #2;
\coordinate (B) at #3;
\node[anchor=south west,inner sep=#1/4] (StPoint-1)at (A){};
\node[anchor=north west,inner sep=#1/4] (StPoint-2) at (A){};
\node[anchor=south west,inner sep=#1/2] (EndPoint-1)at (B){};
\node[anchor=south east,inner sep=#1/2] (EndPoint-2) at (B){};
\draw (StPoint-1.north west) -| (EndPoint-1.north) -- (EndPoint-1.north east) -- (B) 
-- (EndPoint-2.north west) -- (EndPoint-2.north) |- (StPoint-2.south west) -- cycle;}

\newcommand{\angledArrowUp}[3]{
\coordinate (A) at #2;
\coordinate (B) at #3;
\node[anchor=south west,inner sep=#1/4] (StPoint-1)at (A){};
\node[anchor=north west,inner sep=#1/4] (StPoint-2) at (A){};
\node[anchor=north east,inner sep=#1/2] (EndPoint-1)at (B){};
\node[anchor=north west,inner sep=#1/2] (EndPoint-2) at (B){};
\draw (StPoint-1.north west) -| (EndPoint-1.south) -- (EndPoint-1.south west) -- (B) 
-- (EndPoint-2.south east) -- (EndPoint-2.south) |- (StPoint-2.south west) -- cycle;}
\begin{document}
\begin{tikzpicture}
%\angledArrowDown{thick}{star point}{end point below start point}
\angledArrowDown{5mm}{(0,1)}{(1,-1)}

%\angledArrowUp{thick}{star point}{end point above start point}
\angledArrowUp{5mm}{(0,-3)}{(1,-1)}
\end{tikzpicture}
\end{document}

ここに画像の説明を入力してください

答え2

ちょっとした楽しみのために、このような矢印スタイルをいくつか紹介します。利点は、次のような簡単なコマンドで矢印を描画できることです。

\draw[outlined arrow] (-1,3) -| (0,0);  

欠点は、vi paの素晴らしい答えまたはこの答え内部を白く塗りつぶします。外観はさまざまな pgf キーによって制御されます (シフトされたスコープの例を参照)。

\documentclass[tikz,border=3mm]{standalone}
\usetikzlibrary{arrows.meta}
\begin{document}
\begin{tikzpicture}[outlined arrow/.code={\tikzset{oarrow/.cd,#1},
    \def\pv##1{\pgfkeysvalueof{/tikz/oarrow/##1}}%
    \edef\locallw{\the\pgflinewidth}%
    \tikzset{-{Triangle[open,fill=white,line width=\locallw,
        length=\pv{head length},width=\pv{head width}]},
    line width=\pv{line width},
    postaction={-,draw=white,line width=\pv{line width}-2*\locallw,
        shorten <=\locallw,shorten >=\pv{head length}-1.5*\locallw}%
    }},oarrow/.cd,line width/.initial=0.6cm,head width/.initial=1.2cm,
    head length/.initial=1cm]
 \draw[outlined arrow] (-1,3) -| (0,0); 
 \draw[outlined arrow] (-1,-3) -| (0,0);
 \begin{scope}[xshift=5cm]
  \draw[blue,thick,outlined arrow={line width=0.7cm,head width=1.4cm}] (-1,3) -| (0,0); 
  \draw[red,outlined arrow={line width=0.5cm,head length=0.8cm}] (-1,-3) -| (0,0);
 \end{scope}
\end{tikzpicture}
\end{document}

ここに画像の説明を入力してください

曲線矢印はこのスタイルでは機能しません。例えば、ここ曲線矢印を作成するための可能な方法について。

関連情報