PDA

View Full Version : Vector line length measuring



Pete Andrew
04-29-2009, 10:14 AM
Imagine a silhouette of a bird in a cage with lots of flowers round about, then using the outline of the silhouette as a vector path to cut it out of a piece of thin black card, letter or A4 size. The whole cutting process might take about 2 minutes.

My job is to cut this complicated design out of 5 mm black acrylic, sized 650mm x 450mm. So I can price the job appropriately, I want to know how long it will take, so I set my machine up to run the job with the lid up so no laser was firing, and now 40 minutes later it is still going.

Has anyone found a way, in either Adobe Illustrator or Corel Draw, to find out the combined length of all the vector lines in a file? If there was a way of doing that, I could have an idea of how long each job might take, before having to do the dry run.

Joe Pelonio
04-29-2009, 10:37 AM
I still haven't heard of any such tool.

I've gotten to be pretty accurate estimating based on what you are doing. In other words, let it run with the top open but stop at one minute. Estimate what percentage of the cuts is done.

Rodne Gold
04-29-2009, 10:45 AM
http://www.oberonplace.com/products/curveworks/index.htm
You can use curve statistics
http://www.oberonplace.com/products/curveworks/curvestats.htm
Or you can import into Acad and use the "list" function.
Im not sure if either of these will give you an accumulated length of all curves and vector lines in a drawing however

Andrea Weissenseel
04-29-2009, 11:00 AM
I don' know if I understand this right. Cutting the same design out of cardboard takes 2 min, and acrylic takes > 40 min ?

Andrea

Dan Hintz
04-29-2009, 11:02 AM
Andrea,

You can run cardboard at a significantly faster rate than acrylic, hence the increased runtime.

Steven Wallace
04-29-2009, 11:22 AM
Andrea I am sure that you are also looking a one being roughly 280mm x 216mm rather 640mm x 450mm. Which is also greater than 4 times larger

Doug Griffith
04-29-2009, 11:27 AM
That can be done in earlier versions of Illustrator using a plug in called pathlength. http://www.telegraphics.com.au/sw/info/pathlength.html

I've got a script working on CS1+ that does the same and also allows laser speed to be entered. It then returns the time it takes to cut the part (and is very accurate!). It uses an array of speeds (ie. 12" @ 5sp = 12sec, 12" @ 10sp = 8sec) that is calculated by physically running the length/speed on the machine and hard coding into the script. Once I create an interface where people can enter those values themselves, it will be ready for release. I will also add a rate per minute field which will make cost calculation easy.

Cheers,
Doug

Carl Sewell
04-29-2009, 11:33 AM
Try the attached Macro: CurveLength.gms

Close CorelDraw. Unzip the file. Place the GMS file in your GMS directory (something like: C:\Program Files\Corel\CorelDRAW Graphics Suite 13\Draw\GMS).

Start CorelDraw.
Select one or more curves.
Tools>Visual Basic Play>
Click on the arrow next to "Macros in" for a list of macros.
Run CurveLength

Andrea Weissenseel
04-29-2009, 11:34 AM
I just was not sure if he cut both materials, or just ran the acrylic one.

If the whole cutting process took that long, there could be a problem in the design. When automatically vectorized, you should clean up the nodes in Corel - for some designs that decreased the runtime about 60%

Andrea

Rodne Gold
04-29-2009, 12:32 PM
Even if you did get the curve length , there are ramping issues to consider
The length at the speed of head travel (like 3" per sec) will not be a constant. IE you cant say 100" at 3" per sec = 33.3 secs. It might well be 3x that if the curves are "curvy" etc.

James Mooney
04-29-2009, 1:35 PM
That can be done in earlier versions of Illustrator using a plug in called pathlength. http://www.telegraphics.com.au/sw/info/pathlength.html

I've got a script working on CS1+ that does the same and also allows laser speed to be entered. It then returns the time it takes to cut the part (and is very accurate!). It uses an array of speeds (ie. 12" @ 5sp = 12sec, 12" @ 10sp = 8sec) that is calculated by physically running the length/speed on the machine and hard coding into the script. Once I create an interface where people can enter those values themselves, it will be ready for release. I will also add a rate per minute field which will make cost calculation easy.

Cheers,
Doug
Doug,
I'd really interested in that if it comes together for you.

Doug Griffith
04-29-2009, 1:42 PM
I ran 2 files on my Epilog Mini. One consisted of a 12" x 24" rectangle. The other consisted of a curved shape that looked more or less like a scribble. Both line lengths equaled exactly 72". The time to cut both files was within seconds. I think that variation would be acceptable for job estimating.

Also, if you think about it, the material you are cutting doesn't care if its curvy or straight. So theoretically, if speed changes with curves, an oval (not an ellipse) would cut differently on the curves than the straights. If a setting was set where the beam just barely cut through on the curves, it would not cut through on the straights. I've never seen this.

I can see where a lot of sharp directional changes such as a star might have a more radical effect. Rapid moves from shape to shape would be a bigger issue.

I think 2 setting files could be ran for each speed setting. One straight, one curvy/spiky. Then a slider on the "estimator" could be added to help the user guestimate the time/cost. Settings between those manually entered would be dynamically calculated.

Also, I only have experience with Epilog. Other manufacturers may (and probably do) have more variation.

Cheers,
Doug

Rodne Gold
04-29-2009, 2:53 PM
Doug , I dont think I made myself that clear , lets say your laser does 40" per sec and you using 50% speed , theoretically it should be 20" per sec , and if you have a 100" curve it should take 5 secs , but the advertised or computed linear speed is not the same as what it actually takes , the linear speed is max speed on a st line.
Lasers slow down on curves and corners and take time to reach their max speed according to your setting of it , most also automatically adjust power in slow sections or corners. Some lasers call it "ramping"

Michael Simpson Virgina
04-29-2009, 2:58 PM
Also don't forget you have the time it takes the laser to get from object to object. There is no way to figure this in.

Universal has a real good simulator as it actually runs through the machine without moving the head at several times the speed. From what I have heard and seen it is very accurate.

Doug Griffith
04-29-2009, 3:56 PM
Doug , I dont think I made myself that clear , lets say your laser does 40" per sec and you using 50% speed , theoretically it should be 20" per sec , and if you have a 100" curve it should take 5 secs , but the advertised or computed linear speed is not the same as what it actually takes , the linear speed is max speed on a st line.
Lasers slow down on curves and corners and take time to reach their max speed according to your setting of it , most also automatically adjust power in slow sections or corners. Some lasers call it "ramping"

I agree that to mathematically calculate times based on a single speed won't work. There are just too many variables. My work around is to run the same test file at multiple speeds (ie. 10,20,30,40,50...) and enter the time it takes into an array. This array is used as a speed "curve" when calculating cut times. 2 "curves" could be used - one straight and one curvy to give a more accurate result. I know it will never be perfect but close enough to estimate a job.

Attached is a zip file containing 2 eps files. One is straights and one is curves. Both begin and end at the same position. Both have the same path length (within .003 mm). I'm curious if others find a large difference in the time it takes to run.

I did not know lasers automatically adjusted their power to compensate for slowing in curves. Interesting.

Cheers,
Doug

Doug Griffith
04-29-2009, 4:03 PM
Also don't forget you have the time it takes the laser to get from object to object. There is no way to figure this in.

I agree. That is what I referred to as "rapid moves".

There would have to be a "guestimate rapids" slider as well.

My reasoning for wanting to be able to estimate cut times through Illustrator/Corel is to give better quotes. I quite often find myself giving quotes when I have my laptop but am not near my machine. With my script, I load their file, run the script, enter the speed at the prompt, and am returned the cut time. This gives me a good starting point.

Cheers,
Doug

Dave Adams
04-29-2009, 7:55 PM
I have a stained/leaded glass business. The graphic program for my stained glass patterns is 'Glass Eye' by dragonfly software (www.dfly.com (http://www.dfly.com)). There is a calculator for lead came usage built into the program - so I save my Corel file as a dxf and import it into Glass Eye. I then enter it into a Excel speadsheet that has inches per second calculated from timed tests at different speeds. I have found that it is very accurate and a quick and easy way to quote jobs.

Pete Andrew
05-02-2009, 6:49 AM
Well you've all been very helpful here. It is obviously something that has been thought through by a few of you, though only by Universal lasers (by the sounds) in terms of manufacturers. I have a Laser Pro Mercury, or I believe they are called Pinnacle in the states.

Doug - that sounds like a really interesting script you are developing there - I too would love to know more when it's finished. I know very little about scripts or scripting, but am sure I should....

Rodne - both initial links you sent are for downloads for Corel Draw 10 and up. For reasons that even I am finding hard to justify, I run my laser from a laptop running Corel Draw 9. It is never updated, doesn't know the internet exists, and keeps doing what I ask it to. My window on the world is via, now, a Mac. So I am learning Illustrator CS4.

And thanks Carl, but I won't be trying the macro you attached as my Draw9 will probably rebel at a Suite 13 macro - (are they up to Suite 16 yet? - ah those were the days.....)

Andrea - it is just the increase in size and the reduction in speed required to cut the acrylic that has made the job take longer, but you are correct in the idea of node clean up being a good thing - but this job has the right number of nodes, thank you!

Dave - that sounds like a pretty good workaround - if only I had a copy of Glass Eye.......!

Which is why the pathlength plug in Doug mentioned may be the way ahead, if it is usable in CS4. That or a call to the suppliers of Laserpro machines in the UK. Which will I think prove fruitless. I will have to do a bit of digging and report back if I find anything out.

Otherwise, I would welcome any more suggestions....!

Carl Sewell
05-02-2009, 8:43 AM
And thanks Carl, but I won't be trying the macro you attached as my Draw9 will probably rebel at a Suite 13 macro

What a shame. It's not even worth a few moments of your time to try? Then again, it is possible that it will destroy your computer configuration, so you'd better not.

For what it is worth, VBA (Visual Basic for Applications) was added to version 9 of CorelDraw. VBA macros are NOT version specific like CDR files. A macro written with X3 will work with earlier versions of CorelDraw provided commands specific to newer versions were not used. Not all VBA macros work across all versions of CorelDraw.

Pete Andrew
05-10-2009, 11:43 AM
For those of you who use Illustrator CS4, there is a way to find the length of the paths in your files that i have just found out on the adobe site.

Click on Window and check on Document Info. On that little palette that comes up, the document info includes under Paths, the length of (and other info concerning) the selected paths.

However - of course the rest of you are right in that the rapid moves etc aren't factored in, but it is a start at any rate.