Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The path length estimate is a bit onerous. You should just compute it server side after the file is uploaded and let the user know what it is and how it affects the final price.


A bit onerous indeed. I've been working in vector graphics for over 15 years and I have no idea how I'd get the total path length for a file. I understand automating this on the server would be likewise an onerous development task, but users are going to need something more than "measure this thing you’ve never had to measure before" to start with.


In Rhino you can just select a bunch of curves (lines) and type Length<Return>. Since I construct a lot of wireframes I sometimes do a SelectAll<Return>Length<Return> just to see how many feet/miles of lines I've drawn. I thought it was a fun novelty to do that at the end of a project– partly because I don't know how if it would be so easy in other software.


A quick hack would be to render the outlines to a bitmap. Apply a suitable edge detector that handles filled and unfilled geometry the same and then count active pixels for a ballpark estimate.

With vectors imported into a common data structure you just need to convert curves to line segments with enough segments to maintain a reasonable approximation and then add up their lengths. Cairo and Anti-grain geometry can do the heavy lifting for you there. Anti-grain has example code for doing this adaptively.


Yeap - It would be really nice to be this way but developing such a feature like "auto-quoting" would really increase the costs. It might be a little bit counter-intuitive at the moment, but hopefully we'll be developing this soon.


not having an automated/instant quote system totally kills my interest in this; compare with ponoko or big blue saw, upload a design and it will very easily give exact prices for your design on various materials.


Understood and well noted. If i'm not mistaken though, those services have their own software and some very specific guidelines to follow.


You mean their own design software? You are mistaken. Ponoko provides templates of their default material sizes, and that's about all that's required. Oh, you also need to use the correct color path to indicate between engrave and cut passes.

Either way, clearly you're already calculating this value for billing, no? Or are you just using laser run-time for the bill, and estimating that based on the user's guesstimated path length?


Don't you have to calculate price for every job anyway (in case the user lied or was inaccurate), or are you actually trusting their input to control pricing?


we double check the input data. Totally different to confirm than to wait for a quote.


It seems like you'd be saving yourselves a bit of labor by automating, then.


I have no idea if it works well, but the SVG spec has a .getTotalLength() method for path elements, which should mean it's possible to calculate the total length in a browser quite easily. A decent JavaScript developer should be able to prove whether it works well or not in an hour or two.


A basic quoting system was pretty quick for me to hack together: a couple weeks or so. However, the tricky part was handling all the subtly different output formats of different software, corner cases, ambiguous geometry, and plain mistakes people make when creating a CAD file.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: