CLI Reference
vpype read input.svg gscrib
Generate G-Code for CNC machines.
This command processes a vpype Document and generates G-Code from it using the Gscrib library. The ouput can be sent to the teminal, a file or to a connected device using Gscrib’s direct write mode.
The command accepts a number of options that can be used to configure the G-Code generation process. They can be provided in the command line as global defaults or in a TOML file than contains specific settings for each layer of the document.
vpype read input.svg gscrib [OPTIONS]
Options
- --version
Show the version and exit.
- --output <output>
File path where the generated G-Code will be saved. If not specified, the G-Code will be printed to the terminal. [default: None]
- --print-lines
Always output G-Code lines to the terminal, even if the output file is specified or direct write is enabled.
- --config <config>
Path to a TOML file containing configuration settings specific to the document and each of its layers. [default: None]
- --length-units <length_units>
Choose the unit of measurement for the output G-Code. Choices: inches, millimeters. [default: millimeters]
- --time-units <time_units>
Choose the unit of time for the output G-Code. Used to specify program execution delays. Choices: seconds, milliseconds. [default: seconds]
- --head-type <head_type>
Specifies the head type for G-code generation. The head determines how axis movements are generated and coordinated. Choices: standard, auto-leveling. [default: standard]
- --tool-type <tool_type>
Specifies the tool type for G-code generation. The generated code adapts to the selected tool type. Choices: beam, blade, extruder, heated-extruder, adaptive-beam, marker, spindle. [default: marker]
- --rack-type <rack_type>
Specifies if tool changes are needed between layers or if the machine can handle multiple tools. Choices: off, manual, automatic. [default: manual]
- --coolant-type <coolant_type>
Selects the type of coolant used during operation. Choices: off, mist, flood. [default: off]
- --fan-type <fan_type>
Selects the type of fan used during operation. Choices: off, cooling. [default: off]
- --bed-type <bed_type>
Selects the type of bed used for operation. Choices: off, heated. [default: off]
- --work-speed <work_speed>
The speed at which the tool moves while performing an operation (cutting, drawing, etc). Measured in units per minute. [default: 500.0mm]
- --plunge-speed <plunge_speed>
The speed at which the tool moves during the plunging phase, where it enters the material. The plunge is typically slower than the work speed to ensure controlled entry. Measured in units per minute. [default: 100.0mm]
- --travel-speed <travel_speed>
The speed at which the tool moves between operations, without interacting with the material or work surface. Measured in units per minute. [default: 1000.0mm]
- --fan-speed <fan_speed>
The speed at which the fan rotates during operations. A value of 0 turns off the fan, while a value of 255 sets it to its maximum speed. Measured in units per minute. [default: 255]
- --hotend-temperature <hotend_temperature>
The temperature at which the hotend is set during operation. Measured in degrees Celsius (°C). [default: 120]
- --bed-temperature <bed_temperature>
The temperature at which the heated bed is set during operation. Measured in degrees Celsius (°C). [default: 60]
- --power-level <power_level>
Controls the intensity of energy-based tools such as laser cutters, plasma cutters, or 3D printer extruders. [default: 50.0]
- --spindle-rpm <spindle_rpm>
Controls the rotational speed of the spindle, used for rotating tools such as mills, drills, and routers. The value is measured in revolutions per minute (RPM). [default: 1000]
- --spin-mode <spin_mode>
Sets the rotation direction of the spindle. Choices: off, clockwise, counter. [default: clockwise]
- --power-mode <power_mode>
Sets the power mode of the tool. Choices: off, constant, dynamic. [default: constant]
- --warmup-delay <warmup_delay>
Time to wait in seconds after tool activation or deactivation before starting any movement. This ensures the tool reaches its target state (power, speed, etc) before operating. [default: 2.0]
- --tool-number <tool_number>
Specify the tool number to be used for machining operations. [default: 1]
- --work-z <work_z>
The Z-axis height at which the tool will perform its active work (cutting, drawing, printing, etc). [default: 0.0mm]
- --plunge-z <plunge_z>
The Z-axis height at which the tool begins plunging into the material. This is usually just above the final work Z, allowing the tool to gradually enter the material. [default: 1.0mm]
- --safe-z <safe_z>
The Z-axis height the tool moves to when traveling between operations, ensuring it does not collide with the material. [default: 10.0mm]
- --park-z <park_z>
The Z-axis parking height where the tool retracts for maintenance operations, such as tool changes and program completion. [default: 50.0mm]
- --resolution <resolution>
Sets the minimum length for segments when smoothing or breaking down paths. Lower resolutions create more accurate paths. [default: 0.1mm]
- --height-map-path <height_map_path>
Path to a height map file (image or CSV-like) defining surface variations across the work area for adjusting various parameters during operation, such as tool height or power levels. [default: None]
- --height-map-scale <height_map_scale>
Scaling factor applied to Z values in the height map. If the height map was read from an image file, Z values are normalized in the range 0 to 1, and this scale can be used to convert them into actual work units. [default: 1.0]
- --height-map-tolerance <height_map_tolerance>
Minimum height difference threshold used when sampling points from the height map. Points with height differences below this value will be filtered out. [default: 0.1mm]
- --layer-height <layer_height>
The height of each extruded layer. This parameter is used to determine how much filament is extruded per layer. [default: 0.2mm]
- --nozzle-diameter <nozzle_diameter>
The diameter of the 3D printer’s extrusion nozzle. This determines the width of the extruded filament and affects the extrusion rate. [default: 0.4mm]
- --filament-diameter <filament_diameter>
The diameter of the filament used for extrusion. This affects the volume of plastic extruded. [default: 1.75mm]
- --retract-length <retract_length>
The length of filament that is retracted to reduce stringing and oozing during non-extrusion moves. [default: 1.5mm]
- --retract-speed <retract_speed>
The speed at which the filament is retracted. Higher speeds help prevent stringing but may cause filament grinding. Measured in units per minute. [default: 2100.0mm]
- --direct-write <direct_write>
Sends the generated G-Code directly to a connected machine via a socket or serial connection. Choices: off, socket, serial. [default: off]
- --host <host>
The hostname or IP address of the machine when using direct writing over a network. [default: localhost]
- --port <port>
The port used for network communication with the machine when using direct writing. [default: 8000]
- --baudrate <baudrate>
The communication speed (baud rate) for a serial connection to the machine when using direct writing. [default: 250000]
- --decimal-places <decimal_places>
Maximum number of decimal places to include in G-Code coordinates and other numeric values. [default: 5]
- --comment-symbols <comment_symbols>
Defines the characters used to mark comments in the generated G-Code. For example, use –comment-symbols=”(” to enclose the comments in parentheses. [default: (]
- --line-endings <line_endings>
Specifies the line-ending characters for the generated G-Code. Use ‘os’ to match your system’s default. [default: os]
- --x-axis <x_axis>
Custom label for the machine’s X axis in the generated G-Code. [default: X]
- --y-axis <y_axis>
Custom label for the machine’s Y axis in the generated G-Code. [default: Y]
- --z-axis <z_axis>
Custom label for the machine’s Z axis in the generated G-Code. [default: Z]