gcode-preview - v3.0.0-alpha.6
    Preparing search index...

    Function toMillimeters

    • Converts a command distance to millimeters

      Parameters

      • value: number

        A distance in the current units, or undefined when the command omits the word

      • units: Units

        The units the value is expressed in

      Returns number

      The distance in millimeters, or undefined for an omitted word

      Everything downstream of the interpreter works in millimeters; converting at the command boundary keeps inch files (G20) from leaking their units into the state, the paths or the rendered geometry.