optimize

package
v0.0.0-...-51c6363 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2020 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OptBogusMoves

func OptBogusMoves(machine *vm.Machine)

Kills redundant partial moves. Calculates the unit-vector, and kills all incremental moves between A and B. Deprecated by OptVector.

func OptDrillSpeed

func OptDrillSpeed(machine *vm.Machine, feedrate float64, rapid bool)

OptDrillSpeed detects a previous drill, and uses rapid move or higher feedrate to the previous known depth. Scans through all Z-descent moves, logs its height, and ensures that any future move at that location will use vm.MoveModeRapid to go to the deepest previous known Z-height.

func OptFloatingZ

func OptFloatingZ(machine *vm.Machine, minDistOverZ float64)

OptFloatingZ eliminates any bogus moves above minDistOverZ, and makes the remaining move rapid.

The machine positions are searched in pairs. If any of the two positions are below minDistOverZ, the pair is left untouched. Otherwise, the first position in the pair is removed, the movemode is set to rapid, and the remaining position is paired up with the next position. This process repeats until there are no positions left.

func OptLiftSpeed

func OptLiftSpeed(machine *vm.Machine)

Uses rapid move for all Z-up only moves. Scans all positions for moves that only change the z-axis in a positive direction, and sets the moveMode to vm.MoveModeRapid.

func OptPathGrouping

func OptPathGrouping(machine *vm.Machine, tolerance float64) (err error)

Reduces moves between paths. It does this by scanning through position stack, grouping moves that move from >= Z0 to < Z0. These moves are then sorted after closest to previous position, starting at X0 Y0, and moves to groups recalculated as they are inserted in a new stack. This optimization pass bails if the Z axis is moved simultaneously with any other axis, or the input ends with the drill below Z0, in order to play it safe. This pass is new, and therefore slightly experimental.

func OptPrepareTool

func OptPrepareTool(machine *vm.Machine)

func OptVector

func OptVector(machine *vm.Machine, tolerance float64)

Kills redundant partial moves. Calculates the unit-vector, and kills all incremental moves between A and B.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL