I'm currently in the planning stages for a 3D milling machine, laying out all the java necessary before I actually build the robot. I plan on making it carve the models according to the process below (open to suggestions):
* Generate model in 3D CG Software (Maya, Blender, Autocad, etc.)
* Take a screenshot of model against black bg with a light in the scene to highlight model
* Crop image to a reasonably small image (whatever the NXT can hold in its limited memory, still researching that component)
* Place image on NXT memory
* Read image, pixel by pixel in JAVA (and move plotter in a similar way), and get the "shade" of each pixel
* According to this shade, adjust the Z axis of the drillbit. (white = less carving, black = max carving)
Hence, my questions are:
1) Does LEJOS only support xbm? Can it support a grayscale bitmap?
2) If grayscale is accepted, is there a way to get how intense of a shade the current pixel is? (So that I could loop through the image with getPixel())
--
My previous idea was to code a parser into the NXT to handle a language similar to G-Code, outputting files similar to:
- Code: Select all
X2 Y3 Z4
X3 Y3 Z3
//these values being in nm
But I realized the readLine() function has been depreciated, and therefore used a stringBuffer to append file data at the byte level. I'd also like to know which of the two methods you'd recommend if possible (the image approach vs the G-Code approach)
Thanks!
