Many laser scripts used by the various labs or in VisiCut's examples contain similar if not the same code all over again. For instance, drawing figures or characters inspired by a seven segment display (which I find relatively limited and will soon extend to a 14 or 16 segment one), a simple but useful focus gauge to include in other scripts, etc.
I would like to be able to define those functions once and then import the functionality into other scripts, either from a global utility script exposing functions into the global namespace or by explicitly importing script files (the latter allowing users to maintain their own scripts while also allowing them to import a global one).
There are so many advantages of such a scenario: not only will the copy-pasta between scripts end which often causes inconsistencies. When going for the import feature, one could recycle functionality from a script in another one or add different "frontends", e.g., one asking prompts, the other one using some quick defaults.
Many laser scripts used by the various labs or in VisiCut's examples contain similar if not the same code all over again. For instance, drawing figures or characters inspired by a seven segment display (which I find relatively limited and will soon extend to a 14 or 16 segment one), a simple but useful focus gauge to include in other scripts, etc.
I would like to be able to define those functions once and then import the functionality into other scripts, either from a global utility script exposing functions into the global namespace or by explicitly importing script files (the latter allowing users to maintain their own scripts while also allowing them to import a global one).
There are so many advantages of such a scenario: not only will the copy-pasta between scripts end which often causes inconsistencies. When going for the import feature, one could recycle functionality from a script in another one or add different "frontends", e.g., one asking prompts, the other one using some quick defaults.
What do you think?