GridSpace / grid-apps

Browser-based Slicer for 3D Printing, CAM, Laser (Kiri:Moto) and mesh editor (Mesh:Tool)
https://grid.space/
MIT License
459 stars 143 forks source link

Proof of concept of configurable "Ease-Down" with a slope and start Z #282

Closed thingsapart closed 3 months ago

thingsapart commented 3 months ago

Ease down along the desired polygonal path - slight modification of the original code to support an angle and a "start offset Z" above desired Z (rampZ in the code).

Recap of the code/algo:

  1. Travel from first (ie. starting) fromPoint to closest point on polygon at rampZ above that that point,
  2. ease-down along one or more points of the polygon, decreasing Z at a fixed slope until target Z is reached, a. if a long move with desired slope would overshoot target Z, break it up to just hit target Z,
  3. note touchdown point and then follow the rest of the path and repeat segments at target Z until touchdown point is reached again (this ensures that the initial ramp is fully cleared at target Z height where needed).

Caveats:

Example: rampZ = 2, degree = 1.

p1

stewartoallen commented 3 months ago

this is great. I haven't forgotten about this and hope to work through getting this integrated in the next few days.