Implemented showing program extents
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
Heightmap probing:
|
||||
1. define the grid:
|
||||
- from: x, y
|
||||
- to: x, y
|
||||
- step every: 5mm?
|
||||
- clearance height: Z1.5
|
||||
- start probing at: Z0.5
|
||||
- max negative z: Z-0.5 (when to fail probing)
|
||||
- z final safety height: Z15
|
||||
|
||||
- from and to can be filled from current project bounding box
|
||||
|
||||
2. probing
|
||||
- machine moves at grid start position (x, y)
|
||||
G0X0Y0
|
||||
- gets down for initial probing
|
||||
G38.2 Z-65 F100
|
||||
- step back a bit (1mm, relative)
|
||||
G91 G0 Z1
|
||||
- seek again with lower feed rate
|
||||
G38.2 Z-5 F5
|
||||
- after first probe ever, this Z becomes reference 0
|
||||
G10 L20 P0 Z0
|
||||
|
||||
- all subsequent probes will be relative to this
|
||||
- for each probing location:
|
||||
- G0 Z"clearance height"
|
||||
- G0 XxxYyyy (next point location)
|
||||
- G0 Z"start probing at"
|
||||
- G38.2 Z-5 F5
|
||||
- store Z offset and place it in the heightmap
|
||||
|
||||
3. modify loaded program with heightmap data
|
||||
- foreach line in program
|
||||
- if line contains a Z coordinate, update the Z according to the X and Y
|
||||
- if line does not contain a Z coordinate, add a Z coordinate according to the X and Y
|
||||
|
||||
Edge finding
|
||||
- prerequisites
|
||||
- which edge to find? -X/+X/-Y/+Y
|
||||
- bit diameter used
|
||||
- put the
|
||||
|
||||
Corner finding
|
||||
- which corner are we probing: up left, up right, bottom left, bottom right
|
||||
- need to know the bit diameter
|
||||
- use G38.2 to probe X edge and set that as current X - diam/2
|
||||
|
||||
|
||||
DONE - Show program extents
|
||||
|
||||
Render program extents
|
||||
- show a blue bounding box for the program extents
|
||||
Reference in New Issue
Block a user