I would like to use simple macros within tikz commands, but it seems tikz doesn't expand them in the ways I would expect.
For instance, the code
\pgfpointcurveattime{.25}{\pgfpoint{0cm}{0cm}}{\pgfpoint{0cm}{1cm}}{\pgfpoint{1cm}{1cm}}{\pgfpoint{1cm}{0cm}}
nicely returns the point one quarter of the way along the bezier curve specified by those four points. However the code
\newcommand{\bcurve}{{\pgfpoint{0cm}{0cm}}{\pgfpoint{0cm}{1cm}}{\pgfpoint{1cm}{1cm}}{\pgfpoint{1cm}{0cm}}}
\pgfpointcurveattime{.25}\bcurve
gives an error, even though it expands to the same string. Putting braces around \bcurve doesn't help.
What is the cause of this trouble, and more generally how can you use a macro in such a situation in tikz?
tl_replace
andregex_replace
(andexp_args
for the auxiliary function method)