Moving Home from Center to Bottom Left

Shop Forum Makelangelo Polargraph Art Robot Moving Home from Center to Bottom Left

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #5907
    Anonymous
    Inactive

    Hi,

    I was wondering if it would be possible to edit the code to move home (as in the “THIS IS HOME” AND “GO HOME” buttons in the java GUI) from the center of the image to the bottom left of the image?

    I’ve been generating my own gcode files using a combination of StippleGen 2 (http://www.evilmadscientist.com/2012/stipplegen2/) and the Gcodetools extension for Inkscape, which all works very well except for the fact that the gcode it generates starts from the bottom left rather than the center of the image.

    Thanks!

    #6322
    Anonymous
    Inactive

    Hi, arve.

    For the longest time I had a more complicated setup routine that would let you change the homing position. I kept simplifying the setup screen because it was a mess. Now it’s so simple no one can adjust the starting point.

    I can add a command to tell the robot “the new home spot is here”. It would still start drawing from the middle of the picture BUT it would understand that you want – for example – bottom left as your “home” position. If you are working with v1 then that’s a bit of a downer because the first line will be halfway across your page. Note that’s bottom left on the MACHINE, not bottom left PAPER.

    I have written the preliminary code to make this change and will be testing it soon. Right now my stomach is angry with me for eating way too much indian food. I’ll post to the blog as soon as I release the update.

    As it happens, being able to move the starting point is good because I’m planning some very large drawings and I can’t reach the center for some of them.

    #6323
    Anonymous
    Inactive

    Can you share your method for using stipplegen? I’d like to see if I can make it work, too, and then add it to the instructions.

    Thanks!

    #6324
    Anonymous
    Inactive

    Sure, happy to share my approach to generating the gcode. I’m new to all this, so this will be far from authoritative. Ultimately, I run an image through 3 types of software before it’s ready to be opened in the drawbot software:

    1. I use Gimp to edit images to a two-layer stencil-type black and white images and export as a .jpg

    2. I open the .jpg in StippleGen2. Using the control panel, I use the lowest minimum dot size (0.50), 0.0 dot size range, and a white cutoff of 0.01 or 0.02. I also usually use more stipples than the 2000 stipple default setting; say, 8000 or so usually. I let it run a few generations and then hit the ‘PAUSE (TO CALCULATE TSP PATH)’ button and let that run for a bit until there aren’t many crossing lines or odd jumps in the path that seem unlikely for an optimal traveling sales man path. Once the TSP path has settled, I save the file using the ‘SAVE “TSP” PATH (.SVG FORMAT)” button.

    3. Then I open the .svg file in Inkscape, and scale the image layer (from the drop down menu, Object–>Transform–>Scale tab) as needed for whatever paper size and orientation I’m trying to use. Next, I select the TSP path image and using the Gcodetools extension for Inkscape, select ‘Path to Gcode…’. From there I let her rip. Other than setting up a directory for where to save the .ngc file that is produced, I haven’t fiddled with the settings in Gcodetools.

    From there I can open the resulting .ngc file in the drawbot/makelangelo gui software and get to draw, with the glitch noted in the previous post about how the gcode that is generated starts from the bottom left corner of the image rather than the center, which is home for the drawbot. I’ve experimented with configuring the limits of the paper to be four times the size of the actual paper and then placing the paper in the upper left quadrant of where I’ve set the limit such that what the drawbot considers home is actually the bottom left corner of the actual paper, from whence the gcode starts. This works okay, although the proportions of the image seem to distort towards the edge of the paper. I’ve done a good deal of fiddling with the limits as part of this process and am a bit befuddled, but I’ll save that for another day / thread.

    The other approach I’ve been considering but haven’t tried yet is simply editing the gcode to include at the start a movement from the center of the paper to the bottom left of the paper.

    Anyway, that’s where I’m at. Holler if you have any questions or suggestions.

    Thanks!

    #6325
    Anonymous
    Inactive

    if you select everything in inkscape you can see in one of the info boxes the width, height, and position. if you set the X to be -width/2 and Y to be -height/2 the picture will be 3/4 off the “paper” but the gcode will turn out to be correctly centered on the makelangelo. Let me know if that works for you, I’d love to have it confirmed.

    I’ve got the code written and I’ve done some testing on it. I’m having issues with my demo machine but as soon as that’s sorted I’ll have visual confirmation that everything works and I can release the patch to start at the lower left corner (or any corner) of the paper. I know earlier I said machine limits but after playing with it I realized that was a pain in the ass and worth the effort to make it better.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.