tomate писал(а):It would easier if these custom tags could be accessible in the "Object Properties" window.
There was a kind of feature in Gcodetools which took Object Properties. We can try to use them.
tomate писал(а):Anyway, I made a working version of this feature.
I think the best solution will be adding another argument to that lambda function to make it able to use that defined depth.
I.e. we've got to change this two lines:
Код: Выделить всё
depth_func = eval('lambda c,d,s: ' + self.options.path_to_gcode_depth_function.strip('"'))
to
depth_func = eval('lambda c,d,s,optd: ' + self.options.path_to_gcode_depth_function.strip('"'))
...............
and
...............
[id_, depth_func(c,zd,zs), comment],
to
[id_, depth_func(c,zd,zs,optd), comment],
and define value for opt_d. Then we can just use opt_d as depth_function for your needs.