Skip to main content

Path.shiftAlong()

The Path.shiftAlong() method returns a point that lies at distance travelled along the path.

Signature

Point path.shiftAlong(float distance, int stepsPerMm = 10)

The second parameter controls the precision by which the path will be walked. By default, we'll divide it into 10 steps per mm.

If you don't need that precision, you can pass a lower number. If you need more precision, you can pass a higher number. For most cases, the default will be fine.

Example

2 cm 9 cm

Example of the Path.shiftAlong() method