Live data from Hacker News

Circles do not exist

nibblestew.blogspot.com

181–190 of 217 posts

Re: Circles do not exist

#181
post #51

Earlier quoted context omitted.

Using a PDF where 0.03% matters is insane no?

Yes, that's the point. 1. PDF is to become a standard CAD interchange format. 2. Using PDF where 0.03% matters is insane. 3. If CAD requires 0.03% tolerance, then using PDF as a standard CAD interchange format is insane. I would imagine you generally want arbitrary precision for CAD.

But is PDF really the standard CAD format for communicating with machines?

For laser cutting, I prefer to use SVG, as it's easier to generate. I had not really thought about precision, but SVG can represent circles directly.

Re: Circles do not exist

#183

Earlier quoted context omitted.

Seems like the real actual data would just be embedded inside the pdf. Hopefully anyway.

I don't think you can represent arbitrary data in a pdf AND have pdf viewers actually render it. If the pdf format screws precision (and I'm not surprised it does, it screws paragraphs and often only contains metadata to reconstruct lines of text), it should not be used as a data interchange format. Pdf is for print and human eyeballs. It's brilliant for those 2 things and not much else.

If I was dead set on using pdf as an interchange format, I'd make the standard that the pdf content was a drawing of the data and then also embed a better representation of the data. So a well formed file can be previewed with any pdf reader, but no problems with data quality when you go to use it for something.

Of course the drawing could then be out of step with the data, but so what.

Re: Circles do not exist

#184

Earlier quoted context omitted.

What the hell are kibi and gibi?

They are IEC prefixes, complementary to the SI prefixes, and they only are defined for positive exponents. kibi : ki : 2^10 mebi : Mi : 2^20 gibi : Gi : 2^30 tebi : Ti : 2^40 ... Conveniently, these numbers are fairly close to 10^3, 10^6, 10^9, and 10^12 respectively (but with increasing error: 2^40 is almost 10% larger than 10^12, whereas 2^10 is only 2.4% larger than 10^3). This leads to a lot of conflation, mess,…

Wait, does MacOS report file sizes in base 10 as well, or just disks?

Re: Circles do not exist

#186
post #159

Earlier quoted context omitted.

It doesn't matter. The error is 0.03% only with one of the most simplistic approximations of 1 Bézier curve per quarter circle. Bump this to 2 or 4 curves, and the error drops to 4.0e-6 or 6.2e-8 ( https://pomax.github.io/bezierinfo/#circles_cubic ) You are going to have a really hard time finding an industrial application where a 6.2e-8 error matters. In fact, check this out: the Epilog Fusion M2 40 laser machine th…

That's the answer to a different question. I was just pointing out that, in most industrial applications, 0.03% tolerances are rarely seen but in the specific question of circular dimensions, it's a pretty common requirement. And while it's possible to approximate with higher bezier curves, PDFs are auto generated with software libraries and it's going to be non-trivial to dive into the guts of a library of a library…

When we're talking about a CO2 laser, the errors from taper, variations in laser power, rigidity, trueness of optical path, etc, etc, far exceed 0.03%.

If you want a circle that's better than a 0.03% tolerance, odds are you're not making it by tracing a circular path in g-code, but instead using something like a lathe.

> And while it's possible to approximate with higher bezier curves, PDFs are auto generated with software libraries and it's going to be non-trivial to dive into the guts of a library of a library of a library and tweak the logic for generating circles for this one specific type of application.

A lot of work on CO2 lasers you do with something like Coreldraw or Inkscape. You absolutely can pick the number of vertices with some slight work.

Lasers are a bit weird in that most of their work is for signmaking. Most end-user use cases are closer to a printer than that of a typical CNC machine. Indeed, it can be annoying to take something from CAD to lasers that want PDF, because you can end up with things like the resultant PDF not joining lines together properly into one shape and the laser "stopping" on each vertex. You end up pretty carefully picking tools and processes for this flow. Ideally you figure out how to give the laser a dxf...

Re: Circles do not exist

#187

Earlier quoted context omitted.

The standard industry term for a thousandth of an inch. Also called a mil. https://en.m.wikipedia.org/wiki/Thousandth_of_an_inch A 1/10th of a thou is 1/10000th of an inch, or 2.54 micrometers. It's insanely small.

> a thousandth of an inch. Also called a mil Why, America... At that point, if it's inventing new units to decimalise USC units, why not just use micrometres?

Because at the time of the invention and adoption of this term of this term in the late 1850s, the metric system didn’t have widespread adoption at all. The treaty of the meter wasn’t until 1875.

So the metric system and decimalization of the inch are roughly contemporaneous and “just use this othe, also brand new system” isn’t an obvious choice at that point.

Re: Circles do not exist

#188
post #91

Earlier quoted context omitted.

Do you think there's a fundamental difference between how CNC, 3d printing, and laser cutting equipment behaves?

CNC and 3d printing typically use G-code, which has dedicated arc commands (G2, G3), and the laser cutter in the article uses PDF, which (apparently) does not, and is the main point of the article. Of course any physical machine is only making an approximation of a circle (even a lathe doesn't turn perfectly round, there is no such thing), but at least for CNC and 3d printing you can specify a perfect circle. In PDF…

> even a lathe doesn't turn perfectly round, there is no such thing

You don’t have to look for long on YouTube to find videos showing lathe tolerances of ten mil or lower.

And things like bearing races, where imperfections are a common failure mode, are turned for polishing if nothing else.

Re: Circles do not exist

#189

Earlier quoted context omitted.

CNC and 3d printing typically use G-code, which has dedicated arc commands (G2, G3), and the laser cutter in the article uses PDF, which (apparently) does not, and is the main point of the article. Of course any physical machine is only making an approximation of a circle (even a lathe doesn't turn perfectly round, there is no such thing), but at least for CNC and 3d printing you can specify a perfect circle. In PDF…

The PDF format was intended to be an explicit per page device independant description of text, line path, and image layout subject to clipping with no "program running" elements to it. It followed PostScript which was a programming language that was intended to be directly undertood and runnable by Postscript enabled printers. Postscript could easily do the job here, it had "arc" drawing primitives that described cir…

SVG would likely be a better target today.

Re: Circles do not exist

#190
post #46

Earlier quoted context omitted.

Look at a coffee cup.

How can I distinguish between errors of perception, errors in manufacturing, and errors of perception of the designer who eyeballed circles on a computer screen with non-square pixels?

With a coffee cup, you should be able to take a micrometer (or a piece of string) and verify roundness of the base object to whatever arbitrary precision your heart desires (and your reality will allow).
Post reply on HN