ID: | 3697 |
From: | ge...@igor2.repo.hu |
Date: | Sat, 18 Jan 2020 11:28:19 +0100 (CET) |
Subject: | Re: [pcb-rnd] Wishlist: improve arc resolution. |
in-reply-to: | 3696 from Gabriel Paubert <pa...@iram.es> |
replies: | 3698 from Gabriel Paubert <pa...@iram.es> , 3737 from ge...@igor2.repo.hu |
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-804056570-1579343299=:2358 Content-Type: TEXT/PLAIN; charset=US-ASCII Hi Gabriel, On Sat, 18 Jan 2020, Gabriel Paubert wrote: > Hi, > >The basic reason is that the file format only puts arc endpoint angles >rounding to the nearest degree, without any decimal place: when you draw >the line, the accuracy is great, the loss happens when saving the file. <snip> >I don't know whether this can be solved with a trivial file format >change, of if this needs much more surgery, and perhaps even a file >version bump. Good catch, thanks! Fortunately the data model and the file format both allow floating point there. The loader loads non-integer angles properly. It's only the write code that rounds it. So no need to change anything deep. This is a trivial bug in pcb_printf, format %ma (for angles) which accidentally truncates angles to integer instead of truncating them to 3 digits. You can apply the attached patch locally as a quick fix until it can be commited in the next cycle. Added it to the TODO so it won't be forgotten. Best regards, Igor2 --0-804056570-1579343299=:2358 Content-Type: TEXT/x-diff; name=printf.patch Content-Transfer-Encoding: BASE64 Content-ID: <alpine.DEB.2.00.2001181128190.2358@igor2priv> Content-Description: Content-Disposition: attachment; filename=printf.patch SW5kZXg6IHBjYi1wcmludGYuYw0KPT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQ0K LS0tIHBjYi1wcmludGYuYwkocmV2aXNpb24gMjkxNjYpDQorKysgcGNiLXBy aW50Zi5jCSh3b3JraW5nIGNvcHkpDQpAQCAtNjk2LDcgKzY5Niw3IEBADQog CQkJCWNhc2UgJ2EnOg0KIAkJCQkJaWYgKHNhZmUgJiBQQ0JfU0FGRVBSSU5U X0NPT1JEX09OTFkpDQogCQkJCQkJcmV0dXJuIC0xOw0KLQkJCQkJaWYgKGdk c19hcHBlbmRfbGVuKCZzcGVjLCAiLjBmIiwgMykgIT0gMCkgZ290byBlcnI7 DQorCQkJCQlpZiAoZ2RzX2FwcGVuZF9sZW4oJnNwZWMsICIuMDNmIiwgNCkg IT0gMCkgZ290byBlcnI7DQogCQkJCQlpZiAoc3VmZml4ID09IFBDQl9VTklU X1NVRkZJWCkNCiAJCQkJCQlpZiAoZ2RzX2FwcGVuZF9sZW4oJnNwZWMsICIg ZGVnIiwgNCkgIT0gMCkgZ290byBlcnI7DQogCQkJCQl0bXBsZW4gPSBzcHJp bnRmKHRtcCwgc3BlYy5hcnJheSwgKGRvdWJsZSkgdmFfYXJnKGFyZ3MsIHBj Yl9hbmdsZV90KSk7DQo= --0-804056570-1579343299=:2358--
Reply subtree:
3697 Re: [pcb-rnd] Wishlist: improve arc resolution. from ge...@igor2.repo.hu
3698 Re: [pcb-rnd] Wishlist: improve arc resolution. from Gabriel Paubert <pa...@iram.es>
3699 Re: [pcb-rnd] Wishlist: improve arc resolution. from ge...@igor2.repo.hu
3737 Re: [pcb-rnd] Wishlist: improve arc resolution. from ge...@igor2.repo.hu
3740 Re: [pcb-rnd] Wishlist: improve arc resolution. from Gabriel Paubert <pa...@iram.es>