Organize and Share your Electronics the way you want. Sign-Up for a free account now. It takes only 30 seconds!

How to measure laser cut length or time?

How to measure laser cut length or time?

To price laser cutting online we need to extract two pieces of info from uploaded design files. The area of a box surrounding the design, called the bounding box, is the amount of material needed. The length of all the cuts in the design can be used as a rough estimate of the cutting time consumed. Here’s where we’re at…

A dirty cheap laser cut service has been “coming very soon” for far too long. We planned to take SVG files and use a friend’s script to measure the bounding box and cut lengths. Unfortunately we never found a laser cut supplier willing to take low volume/high-mix orders and provide all the pricing info to give instant quotes.

Last week a comment at Hack a Day mentioned that dirty laser cutting is taking forever. Surprised by the interest, we asked around and found some willing suppliers. However, these suppliers only accept dxf, dwg, pdf, eps, and ps formats. SVG won’t do. Now we have a supplier but no way to give instant online quotes.

Conversion

Converting to and from SVG is plagued with wrecked arcs and curves. Potential customer dissatisfaction factor is super high. Absolutely not reliable enough for a commercial service or even for pricing.

Extracting info from CAD programs

Inkscape loads all the above formats, but we were not able to extract total path length from the command line or the shell interface. Autocad.io is an online version of AutoCAD that might be able to provide the design stats and a nice rendering, but if the API is slow or busy are customers supposed to wait minutes for their quotes?

A couple CAD programs seemed promising, but eventually we couldn’t find anything that runs on Linux and can extract the stats we need via the command line.

Measuring scripts

The script that measures PCBs in our store and at DirtyPCBs combines a bit of gerber code knowledge with some math to crank out basic stats without ever loading a CAD program. A small script to extract path length and bounding box size from dxf is very doable after a quick thumb through the spec, however nothing seems to exist online.

The learning curve to implement the dxf format and the debug time to perfect it puts this in the labor of love category. It would be a blast if we really wanted to do it, but since it’s standing in the way of a dirt cheap service that will likely never turn a profit (laser cutting is cheap and common…) there’s no resources to dedicate to writing our own.

Create g-code and simulate the cut

G-code is a popular way to control CNC mills and 3D printers. A CAM processor (yes, like the one in Cadsoft Eagle) combines information about the machine, such as cut speed, with the path in the design file to create a series of cutting steps or instructions. G-code is accepted universally, much like gerber files.

Lots of existing scripts convert dxf/pdf/eps/ps files to g-code. Once the design is in g-code there are several programs that simulate the cut and estimate the cut time (or filament used, etc). This seems like the proper way to do it. As a bonus, it lays the framework to calculate cut time and difficulty for a future DirtyCNC and DirtyInjectionMolding service.

This is as far as we’ve gotten. A dozen Python scripts on github look promising, but nothing directly outputs the info we need without a bit of hacking. We’ll continue to knock together a solution in the next few days.

Please shout out in the comments if you have thoughts on any of these methods or experience with any tool chains that might work. Help us get laser cutting online and we’ll reward you with – what else – free laser cutting service!

Image source: Adam Dingley CC BY SA

Read more Here







 

More Articles to Read

Design for a Wideband, Differential Transimpedance DAC Output
Design for a Wideband, Differential Transimpedance DAC Output
Wrist thrusters let you fly through the water effortlessly
Wrist thrusters let you fly through the water effortlessly
Bertan/Spellman 225-20R HV power supply teardown
Bertan/Spellman 225-20R HV power supply teardown
Blinking Christmas Lights
Blinking Christmas Lights
Adjusting clock with alarm, hygrometer & thermometer on 1.8″ ST7735 display
Adjusting clock with alarm, hygrometer & thermometer on 1.8″ ST7735 display
Adding an “extra sense” with rangefinders
Adding an “extra sense” with rangefinders
This wireless game controller looks like a rug
This wireless game controller looks like a rug
How to run your ESP8266 for years on a battery
How to run your ESP8266 for years on a battery
Calibration of a 3-Phase Energy Meter Board on the ADE7754
Calibration of a 3-Phase Energy Meter Board on the ADE7754
Making beats on a tiny Arduino DJ controller
Making beats on a tiny Arduino DJ controller
Qinsi-QS5100 Sn63Pb37 solder profile
Qinsi-QS5100 Sn63Pb37 solder profile
Water Detection System
Water Detection System
Professional Hi-Fi 15W Tube Amplifier circuit
Professional Hi-Fi 15W Tube Amplifier circuit
This Arduino machine will judge how sick your ollies are
This Arduino machine will judge how sick your ollies are
Turn an old payphone into a boombox for ’90s hits
Turn an old payphone into a boombox for ’90s hits
Big F’n 3D printer build
Big F’n 3D printer build
Temperature alarm for boiling milk
Temperature alarm for boiling milk
QuadBot is a 3D-printable walking robot for everyone
QuadBot is a 3D-printable walking robot for everyone
MicroConverter I2C Compatible Interface
MicroConverter I2C Compatible Interface
An Arduino tachometer for your older vehicle
An Arduino tachometer for your older vehicle

Top


Shares