Skip to content

Permit vpype-gcode expression substitution into patterns. #29

@tatarize

Description

@tatarize

If, we, for example needed gcode that set some value 20mm over per layer_id currently there is no set of methods that would allow this.

So the template would have something like %layer_id*20*mm% and that would be substituted by the correct value.

  • We could have some kind of "preamble" config in the TOML that could be basically arbitrary python code.
  • We could be to reword/improve the -d option so that you can set arbitrary variable (drawback: untyped, so not ideal for int/float)
  • We could add a -e, --execute option to feed code for the expression interpreter, which would make it very easy to set parameter value, e.g. -e "offset=10*cm". ... etc.

Breaking changes

Using expression substitution from vpype proper requires that any direct use of % must be %% to avoid parsing confusion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions