Skip to content

Add rasterXY serpentine raster path generator#126

Open
sina1988 wants to merge 1 commit into
FullControlXYZ:masterfrom
sina1988:feature/rasterxy
Open

Add rasterXY serpentine raster path generator#126
sina1988 wants to merge 1 commit into
FullControlXYZ:masterfrom
sina1988:feature/rasterxy

Conversation

@sina1988

Copy link
Copy Markdown

This PR adds a new rasterXY(...) helper to fullcontrol.geometry.waves.

Why:

  • squarewaveXY(...) was not flexible enough for my use case
  • I needed a simple serpentine raster over a rectangular XY area
  • the final pass is forced onto max_y

Notes:

  • alternates direction on each pass
  • intended for roughing / raster-style toolpaths

@AndyGlx

AndyGlx commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

This looks good. Before I merge, what do you think about forcing step-over distance to be equal throughout? At the moment, the last raster is spaced up to 1.999999 times the normal raster spacing in order to fill the space. But it might be nive to distribute that gap across all rasters (and maybe print out the actual raster spacing for the user to see). Then you would have an extra line something like:

stepover_to_fill = (max_y - min_y)/n_passes

and then in the for loop:

y = min_y + i * stepover_to_fill

or this could be added as a toggle for something like auto_stepover with default value False

@sina1988

Copy link
Copy Markdown
Author

Thanks, sounds good. I agree an auto_stepover=False toggle is better.

Small point: since there are n_passes - 1 gaps, I think it should be:

stepover_to_fill = (max_y - min_y) / (n_passes - 1)

@AndyGlx

AndyGlx commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Yep definitely. Good maths!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants