As Sergey Alyoshin wrote: > > Thus, I think the really only safe option is to compare for less than > > a small epsilon rather than equality. > > Maybe for clarity check against DBL_EPSILON instead of 1e-6?
DBL_EPSILON didn't help … so I analyzed a bit more – and found it. The issue is that this is a project loaded from a .gvp file. Inside the .gvp file, you can find the following: (define-layer! 73 (cons 'filename "HP10466A/HP10466A-B.SilkS.gbo") (cons 'visible #f) (cons 'color #(47802 47802 47802)) (cons 'translate #(5.688976 2.283465)) (cons 'rotation #(1.570796)) And that's exactly what you can find in trans->rotation then: 1.570796. That explains why all the comparisons fail. Thus, either the .gvp file needs to store full double precision, or we must be tolerant in the comparison when producing the merged Gerber layer. -- cheers, Joerg .-.-. --... ...-- -.. . DL8DTL http://www.sax.de/~joerg/ Never trust an operating system you don't have sources for. ;-) ------------------------------------------------------------------------------ _______________________________________________ Gerbv-devel mailing list Gerbv-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gerbv-devel