Wiki

Clone wiki

GCode Editor / gen / Editor

Documentation

public class ArbitraryAdditionOperation implements Operation

An operation for inserting a single (non-moving) command before an element

  • Author: Groomblecom

public ArbitraryAdditionOperation(ArrayList<Command> selected, Command c)

Constructs a new operation which will add the toAdd element before the 0th entry in selected. The 0th entry is computed here, but 'before' in computed every time this operation is performed.

  • Parameters:
  • selected — a non-empty, non-null ArrayList.
  • c — the command to add.

public class InsertSingleMovementOperation implements Operation

Inserts a single absolute MovementCommand to the specified position and adds a G92 to reset the extruder's coordinate to prevent odd side effects.

  • Author: groomblecom

public InsertSingleMovementOperation(int insertIndex, float[] newPos, float[] oldPos)

Constructs (but does not execute) a new InsertSingleMovementOperation

  • Parameters:
  • insertIndex — the index to insert the MovementCommand
  • newPos — the float[4] position to move to. This class will ignore the E value in favor of computing the correct E value (based on prior MovementCommand's E/mm ratio).
  • oldPos — the float[4] position to move from. Used to compute the E value.

public MovementCommand getLastAddedMovementCommand()

Gets the last added movement command.

  • Returns: the MovementCommand last added. This command will be an absolute movement (unless a subclass overrides perform()).

public Editor(Renderer renderer)

Creates a new Editor object which will use the Program and operate on the selectedList of the passed renderer.

  • Parameters: renderer

private void generateShape(Command c)

Generates a shape for a command and stores it in the selection lookup table.

  • Parameters: c — the command to process

public void addArbitraryCommandAtSelected(Command c)

Queues and runs a operation to insert the command before the selection.

  • Parameters: c — the non-movement command to insert.

public void setSelectingDiscontinuities(boolean isSelecting)

Sets whether this editor is selecting discontinuityMarkerCommands, or selecting other types of commands

  • Parameters: isSelecting — true if selecting discontinuities, false otherwise.

Updated