# rounded corners with two 45° bends

Does a solution already exist for this feature request? I want to draw 90°-corners with two 45°-bends w/o doing it manually (quite tedious). I am looking for something similar to rounded corners like "bended corners".

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[bended corners=0.1cm] (0,0) rectangle (5,5);
\end{tikzpicture}
\end{document}


The result should like the one of this code:

\documentclass{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
%\draw[bended corners=0.1cm] (0,0) rectangle (5,5);
\draw (0,0) -- (0.9,0) -- (1,0.1) -- (1,1);
\end{tikzpicture}
\end{document}


May be I don't understand the question but what's the difference between OP's bended corners and already defined rounded corners?

\documentclass[border=1cm]{standalone}
\usepackage{tikz}
\begin{document}
\begin{tikzpicture}
\draw[help lines] (0,0) grid[step=.5cm] (5,5);
\draw[thick, blue, rounded corners=1cm] (0,0) rectangle (5,5);
\draw[red, opacity=.5, ultra thick] (4,5) arc(90:45:1);
\draw[green, opacity=.5, ultra thick] (5,4) arc(0:45:1);
\end{tikzpicture}
\end{document}


Update: After second code, I think OP wants a chamfered rectangle

\documentclass[border=2mm]{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes.misc}

\begin{document}
\begin{tikzpicture}
%\draw[bended corners=0.1cm] (0,0) rectangle (5,5);
\node[draw, minimum size=3cm, chamfered rectangle] {};
\end{tikzpicture}
\end{document}


• I added a second code to my question. Mar 12 at 8:40
• @Rmano Yes. I've updated the answer with an example. Mar 12 at 8:51
• That's really fine, thanks a lot. What do I have to do if I don't want a whole rectangle but only an open path (see second code in OP)? Mar 12 at 10:46