On Sat, Nov 19, 2016 at 12:20 AM, Joerg Wunsch <j...@uriah.heep.sax.de> wrote:
> 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.

As this explain 1e-6 in you patch, I think you should add #define
GERBV_PROJECT_PRECISION 1e-6 in gerbv.h

------------------------------------------------------------------------------
_______________________________________________
Gerbv-devel mailing list
Gerbv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gerbv-devel

Reply via email to