# How to draw a chamfered triangle as a node in tikz?

There are a lot of node shapes provided in the shape library, but I didn't find any chamfered triangles, as the picture shows below. Are there any libraries that provide such shape? Or how to define a new node shape in tikz? Yes it's possible to draw it as pic rather than a node, but it seems that the pic is not as convenient as node in drawing diagrams using tikz.

• Welcome to TeX.SE! Sep 17 at 9:12
• Isn't any convex quadrilateral that's not a parallelogram a chamfered triangle? How is that chamfered triangle defined? Declaring a new node shape isn't easy. It's also a mathematical problem: Usually, node shapes are defined in such a way that its border does not cross the node's text. So you need to fit a rectangle of given dimensions (node text + inner sep) inside a triangle and then you take something from this triangle away. That could lead to text overlapping the shape's border. Maybe we start with a rectangle and just move the corners individually? Sep 17 at 12:13

\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric,calc}
\newcommand{\ChamferTriangleNode}[1]{
\node[shape=trapezium,trapezium left angle=75](n1){#1};
\draw (n1.bottom right corner) -- ($(n1.bottom right corner)!1.2!(n1.top right corner)$)
-- (n1.top left corner) -- (n1.bottom left corner) -- cycle;
}
\begin{document}
\begin{tikzpicture}
\ChamferTriangleNode{sample}
\end{tikzpicture}
\end{document}