Wiki
Clone wikiGCode Editor / gen / DiscontinuityMarkerCommand
Documentation
public static DiscontinuityMarkerCommand[] generatePair(Program p, float[] startPos, float[] endPos)
Convenience method to create a matched pair of markers
- Parameters:
endPos
— The ending position to give to the discontinuitystartPos
— The starting position to give to the discontinuityp
— a program to pass to the DiscontinuityMarkerCommands; however, they are not added top
's command list.- Returns: a length-2 array of markers, already matched, the element in [0] having the startPos and [1] having the endPos.
private void setOtherSide(DiscontinuityMarkerCommand o)
Sets other side to this marker. It does not make this the other side of the passed command.
- Parameters:
o
— new other side
public float[] getCommandPos()
Gets the position of this discontinuity in absolute coordinates. This exists so that the renderer & simulator may 'jump' over a cut region instead of trying to stretch commands to fit.
- Returns: the position
public static void makePair(DiscontinuityMarkerCommand a, DiscontinuityMarkerCommand b)
This makes a the other side of b and vice versa, and at the same time makes b.otherSide
the other side of a.otherSide
and vice versa, thus preserving the integrity of pairings.
- Parameters:
a
— The first discontinuity marker (index relationships do not matter, these arguments are arbitrarily ordered)b
— The second discontinuity marker (index relationships do not matter, these arguments are arbitrarily ordered)
public void setCommandPos(float[] newPos)
Sets the position where the discontinuity ends/starts
- Parameters:
newPos
— a length-4 xyze vector representing the start/stop position
Updated