martin2250 / OpenCNCPilot

autolevelling gcode-sender for grbl
MIT License
377 stars 113 forks source link

SurfaceScanning, export result as CSV #82

Open krtschmr opened 5 years ago

krtschmr commented 5 years ago

Is it possible to just run the surface scanning and export the result as a CSV file so we can replicate the surface as a 3D Model in Fusion or somewhere else? should either choose if XML or csv

martin2250 commented 5 years ago

Hi, .hmap files are actually just xml files. They don't use any existing standard, so you can't just plug them into another program, but a quick python script can convert a height map to any format you need.

krtschmr commented 5 years ago

ya, i can do sublime and replace it

<point X="([0-9]+)" Y="([0-9]+)"> with then $1,$2, and then replace </point> withnothing and it's done.

i wonder why the points are starting from 0,0 instead of negative values, so 0,0 would be the center?

martin2250 commented 5 years ago

I can't remember why I did it that way, this entire file format is pretty horrible. The offsets should be stored somewhere in the .hmap.