5

I need to mimic in Tikz the arrow tip created by most CAD packages for engineering drawings. The targeted arrow tip is an elongated sharp triangle, with an angle of about 17 degrees. The desired shape would be approximately the equivalent of "triangle 17" as shown in the arrow library (link below), but the length of the tip is also about three times the width (the short side of the triangle).

List of available TikZ libraries with a short introduction

I have found below an example of a customized arrow tip, but do not have the skills to convert the code in a way solving my problem.

Customizing arrows with Tikz

Yves
  • 2,825
  • I guess tikz's stealth arrows, while an improvement, are still not sufficient for your needs? – Steven B. Segletes Jun 05 '13 at 20:06
  • 1
    Related : http://tex.stackexchange.com/questions/52786/din-conform-arrowheads-and-hatching-in-tikz look at the accepted answer arrow heads. – percusse Jun 05 '13 at 20:42
  • 1
    Can you show an image of the type of arrow that you want? Your link gives a list of google results rather than a specific document – Aditya Jun 05 '13 at 21:24
  • @Aditya I have edited my qustion to delete the link that did not work, as it implied a re-direction.The document showing examples of engineerng arrows can be found by googling "technical drawing specification resource" The arrows (red) are seen on page 16. – Yves Jun 06 '13 at 05:41
  • @Yves, all we need to know is that you need a 3mm-long by 1mm-wide arrow head, according to the picture in the reference. – Luigi Jun 06 '13 at 07:10

1 Answers1

6

Here it is a 3mm x 1mm arrow head: enter image description here

\documentclass[border=1mm]{standalone}
\usepackage{tikz}
\makeatletter
\pgfarrowsdeclare{AS arrow}{AS arrow}
{
    \pgfarrowsleftextend{+-0.5\pgflinewidth}
    \pgfutil@tempdima=3mm%
    \advance\pgfutil@tempdima by -0.5\pgflinewidth%   
    \pgfarrowsrightextend{+\pgfutil@tempdima}
}
{
    \pgfutil@tempdima=3mm%
    \advance\pgfutil@tempdima by -3.54138\pgflinewidth%
    \pgfsetdash{}{+0pt}
    \pgfsetmiterjoin
    \pgftransformxshift{\pgfutil@tempdima}
    \pgfutil@tempdima=1.01379\pgfutil@tempdima%       
    \pgfpathmoveto{\pgfqpointpolar{170.53768}{\pgfutil@tempdima}}
    \pgfpathlineto{\pgfpointorigin}
    \pgfpathlineto{\pgfqpointpolar{-170.53768}{\pgfutil@tempdima}}
    \pgfpathclose
    \pgfusepathqfillstroke
}
\makeatother

\begin{document}
\begin{tikzpicture}
\draw [help lines, step=1mm] (0,-0.5) grid (1,0.5);
\draw[-AS arrow]                 (0,0.2)  -- (1,0.2);
\draw[-AS arrow, fill opacity=0] (0,-0.2) -- (1,-0.2);
\end{tikzpicture}
\end{document}
Luigi
  • 6,325