-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for exporting GCODE #59
Comments
I'd love to do this and it seems quite easy to do, but I don't have a CNC. If I write the code, will you test it for me? It may take a few trials and errors before we get this right. |
You don't need any hardware. Have a look at camotics.org to simulate a 3 axis CNC via OSS. With this software, you can test the GCODE output all day long... ;-) |
Markus, thanks! Unfortunately, Camotics doesn't work for me out of the box, it gets stuck in an infinite loop. I'll have to build and debug it, apparently. |
Long time that I used this program. Last time the name was still OpenSCAM, probably good idea to rename it. The Debian package I just downloaded from the web site and installed is definitely not up to the Debian standards... I had to manually install libv8-3.14.5... but after that it started up and it's running ok. I'm using Linux Mint 18.3. What OS are you using? |
I'm currently digging into this, and I wonder; is there anything other than surface speed that I should let the user choose (when working with laser cutters)? |
I would say you can use X and Y speed to change things (cutting/scoring) for some machines that have manual laser power settings. But many lasers have strength settings that can also be controlled via GCODE. You also want a travel speed setting when not cutting. The Z axis may need to be set on the beginning so the laser focuses on the paper and one more time on the end to move out of the way. But again not all machines have a Z axis. I'm not the expert anyway, if someone is reading this that knows more please add to the conversation. I have a project here on Github that converts bitmaps to gcode for laser engraving. You may want to have a look at that. |
I meant what variables are important for the user to set while exporting? So far I came up with; |
@alpharesearch are laser cutters able to cut at an angle? |
The feed rate G01 is used for cutting or with a laser on, this is normally slower than feed (seek) rate G00 that is used to rapidly reposition. On GCODE lines you can overwrite the default feed rate with the F parameter.
Regarding the angle, most laser cutters are 2 (XY) or 3 axes (XYZ), the laser is positioned above the XY and shines straight down. There is no 4 or 5 axis to rotate the laser as far as I know. With the Z axis, you focus the laser by moving up/down. But if you look at cutting a circular look at G02/G03. And G04 can be used to dwell. |
@alpharesearch with feedrate I meant G99 and could you explain to me what it actually does? CAMotics throws an error if I don't define a feedrate.
|
Ooooh engraving would be usefull for the numbers, arrows, and other text |
Check out this Wikipedia GCODE link. Looks like G99 is for lathes and the feedrate per revolution... not sure why CAMotics needs this? |
@alpharesearch I was already using that link 😄 |
@alpharesearch I did some more research and G96 doesn't do anything on laser cutters (or milling machines) as both already have a constant speed so I will just use G97 :) |
That also means I will use G94 to control feedrate |
My GRBL laser mode test from 2014 shows some GCODE on it's page. GRBL has a native laser mode now that is more advanced but works the same way. I have a ShapeOko V1 CNC with a 3 watt laser diode. It will cut paper and cardboard.
|
Very cool that you're working on this! I actually have gotten a decent workflow going for this using this plugin combined with: https://github.com/LaserWeb/LaserWeb4... and Here is the low price laser cutter I am using: This cutter is my first experience with laser cutting and I have had no major problems with it, and it seems to work well with cardstock, but I haven't tried with anything heavier due to ventilation constraints in my apartment. But fair warning if you do get one! Use the goggles, since sometimes it will boot with the laser at full power for no good reason, so you really have to pay attention when using it! First off, here are a few objects I've scored and cut on cardstock using my workflow: https://files.slack.com/files-pri/T02GC8M7E-FBAV7LQ77/20180620_045949.jpg Here is a screenshot for an intermediate tool I wrote to do some processing on the output SVG , but I ended up not neccessarily needing it, once I figured out I could change the different line colors on the object export.. more on this in a sec... https://files.slack.com/files-pri/T02GC8M7E-FBA4GAEAC/image.png Let me describe my workflow and perhaps it will give you some ideas... I first export the object with rgb pure red for the object perimeter lines, green for valley folds and blue for the mountain folds... (in practice I treat both fold types the same since the laser cutter can only score one side... This is neccesary so that LaserWeb can be configured to use different laser energies for each line type.. since it can key off the line color to select the laser power. So then in LaserWeb, I create 2 different operation configuration sets... One called "laser cut" and the other called "laser score" I then make two instances of the "score" operation, and one of the "cut" operation. I've arranged it like this so that the scoring of the interior lines happens first, because if the cuts happened first, the piece could fall out of the cardstock and shift position, and screw up the positioning of the subsequent scoring operations.. so Scoring happens First (at low laser power) and Exterior cutting happens Last and 100% laser power. My settings for the 2 operation types are as follows: Scoring: Cutting: So from the settings above you can see that cutting vs scoring is controlled both by the laser intensity AND the Cutting rate which is the speed the printer moves the head... The segment length controls the size of the minimum feature.. this turned out to be important because otherwise the generated gcode can program the path to do Very small movements, which cause the laser to dwell near the same spot for too long, and will overburn. this mostly happens at the vertices of objects, but setting the minimum feature size to 0.3 mm mostly fixed that, and now I get pretty clean and uniform cuts. For reference, each of the objects in the screenshot above took just a couple minutes each to cut. Assembly is what takes the most time. |
@manthrax could the overburn problem also be fixed by making the gcode print those edges at different moments or would that not make a difference (ie if you have a sharp angle it cuts one edge, then cuts some other stuff, then cuts that edge at a later moment)? If not, what does "minimum feature size" do on that program? Does it ignore smaller lines completely, or does it remove them and bring the closest two edges together, or does it increase their size? If you're not sure, what do you think would give the best results? Does it do anything about sharp angles? If so, what? |
In a perfect world.. I could take these designs and send the gcode to my cutter/engraver! The interior polygons could use 50% laser strength to merely score the material, and then the end of the cutting pass would cut out the exterior at full power. This would be soo cool, since you could completely automate the process of turning a Blender model into a craftable object!
LOVE THIS PLUGIN BTW!!
The text was updated successfully, but these errors were encountered: