I would simply like to compute the euclidean distance between 2 points and keep it in a variable.
This is what I did
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shapes.geometric,calc}
\def\klen{10em}
\begin{document}
\begin{tikzpicture}
\node[
draw,
regular polygon,
regular polygon sides=5,
minimum size=\klen,
] (P1) {};
\newlength{\kside}
\setlength{\kside}{let \p1=(P1.corner 1), \p2=(P1.corner 2), \kside={veclen(\x1-\x2,\y1-\y2)}}
\end{tikzpicture}
\end{document}
What's my error here ? Shouldn't be ok to compute something inside curly braces ?
Given a shape drawn with shapes.geometric is possible to retrieve its side ?

P1.corner 1is. I tried several pgf utility functions/macros but nothing works. I would like some hints for my specific case. – pafao Apr 27 '22 at 07:24