Consider the following MWE:
\documentclass{article}
\usepackage{amsmath}
\usepackage{l3draw,xparse}
\ExplSyntaxOn
%---------------------------------------------------------
\box_new:N \default_math_plus
\hbox_set:Nn \default_math_plus {$+$}
\box_new:N \cplus_box
\dim_new:N \l__default_math_plus_width
\dim_set:Nn \l__default_math_plus_width { \box_wd:N \default_math_plus}
\fp_new:N \l__expl_cplus_fp
\cs_new_protected:Nn \expl_cplus:
{
\draw_begin:
\draw_linewidth:n { \l__expl_cplus_fp }
\draw_cap_round:
\draw_join_round:
\draw_path_moveto:n { 0.5\l__default_math_plus_width , 0.0\l__default_math_plus_width }
\draw_path_lineto:n { 0.5\l__default_math_plus_width , 1.0\l__default_math_plus_width }
\draw_path_use_clear:n { stroke }
\draw_path_moveto:n { 0.0\l__default_math_plus_width , 0.5\l__default_math_plus_width }
\draw_path_lineto:n { 1.0\l__default_math_plus_width , 0.5\l__default_math_plus_width }
\draw_path_use_clear:n { stroke }
\draw_path_circle:nn { 0.5\l__default_math_plus_width , 0.5\l__default_math_plus_width } {0.25\l__default_math_plus_width}
\draw_path_use_clear:n { stroke }
\draw_end:
}
\NewDocumentCommand{\explcplus}{}
{
\mathbin
{
\fp_set:Nn \l__expl_cplus_fp { 0.08ex }
\hbox_set:Nn \cplus_box { $\mspace{1mu}$ \expl_cplus: $\mspace{1mu}$ }
\box_move_down:nn { \box_dp:N \default_math_plus }{ \box_use:N \cplus_box }
}
}
%---------------------------------------------------------
\ExplSyntaxOff
\begin{document}
$a+b\explcplus c_{+\explcplus}$
$a\explcplus b+c_{+\explcplus}$
\medskip
% test for larger size
{\LARGE$a\explcplus b+c_{+\explcplus}$}
\end{document}
I am trying to recreate what @egreg did in his answer to: https://tex.stackexchange.com/a/397806/10898 but I cannot seem to get the correct math spaces and depth.
What am I doing wrong? Or how can correctly calculate the + dimensions?
The scaling in the last image is off and seems not to be defined as ex for it to scale appropriately.

+when the macro is called, otherwise you always get the same size independently on the current font size. – egreg Nov 09 '20 at 17:36\hbox_set:Nn \default_math_plus {$+$}. Once a box has been set, it never changes. By the way, the names are non conformant and “default” is not really a good prefix. – egreg Nov 09 '20 at 18:08+have differenthtandwd? – azetina Nov 09 '20 at 18:23