@urpflanze/gcode-exporter
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

GCODE-Exporter

This is a tool to export the urpflanze scene to GCODE

Install with npm

npm i -S @urpflanze/gcode-exporter

Import GCODEExporter:

import { Scene } from '@urpflanze/core'
import { GCODEExporter } from '@urpflanze/gcode-exporter'
// or const { GCODEExporter } = require('@urpflanze/gcode-exporter')

const scene = new Urpflanze.Scene()

// creating a scene

scene.update()

const gcode = GCODEExporter.parse(scene /*, config*/)

You can pass machine configuration with the second argument of parse

{
	// Draw Area
	unit: 'millimeters' | 'inches'
	minX: number
	minY: number
	maxX: number
	maxY: number

	// feedrate mm/m
	velocity: number

	// Pen
	penUpCommand: string
	penDownCommand: string

	// Rounding off values
	decimals: number
}

Default values A4 (horizontal):

{
    unit: 'millimeters',
    minX: 0,
    minY: 0,
    maxX: 297,
    maxY: 210,
    velocity: 1500,
    penUpCommand: 'M3 S30',
    penDownCommand: 'M3 S0',
    decimals: 2,
}

Package Sidebar

Install

npm i @urpflanze/gcode-exporter

Weekly Downloads

8

Version

0.0.7

License

GPL-3.0-or-later

Unpacked Size

326 kB

Total Files

43

Last publish

Collaborators

  • genbs