when saving file, angles are rounded to nearest degree

Bug #1270886 reported by Andrew Armenia on 2014-01-20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gEDA project
Bert Timmerman

Bug Description

Pcb will happily read a file with a hand-created outline layer containing arcs with non-integer StartAngles and DeltaAngles. But when saving the file, these angles get rounded to the nearest degree. This is problematic, for example, when creating board outlines containing large-radius arcs. I've attached a trivial patch to write out angles to the nearest thousandth of a degree, instead of the nearest degree, when saving a file.

The current version 20110603 of the file format does read
floating-point angles correctly. The previous version
20100606 appears to me to read floating-point angles without
error, though it rounds them to the nearest integer.

The previous version to that, 20070407, is the same. (This
version bump was due to Peter Clifton's polygon improvements.)

So I'd be happy to see this patch pushed. (When I get a chance
to actually compile a 2007 pcb and confirm what I wrote above,
I may do it myself.)

Andrew Poelstra
Email: apoelstra at wpsoftware.net
Web: http://www.wpsoftware.net/andrew

Andrew Poelstra (asp11) on 2014-01-20
Changed in pcb:
assignee: nobody → Andrew Poelstra (asp11)
status: New → Confirmed
Andrew Poelstra (asp11) wrote :

Ok, so unfortunately pcb 20100929 cannot read files with decimal arc lengths. (Version 20100929 actually locks up, earlier versions politely give a syntax error.) The latest released version 20110918 is OK.

So at this time I can't accept the patch for backward-compatibility reasons. It'd be OK for the next (after pcb 2014whatever) version, though hopefully by that point somebody has time to develop a new and more extensible format.

Traumflug (mah-jump-ing) on 2015-09-27
Changed in geda-project:
importance: Undecided → Medium
status: New → Confirmed
KaiMartin (kmk-familieknaak) wrote :

We just stumbled on this bug in a real world project. The design asked for a D shaped hole to take a BNC feed-thru. The current GUI supports 90° arcs only. So we edited the source of the layout to make the arc go from -22.5° to 22.5°. This arc showed up in pcb just fine. The line tool snapped happily to the ends of the arc to complete a nice D shaped contour.

However, in the gerbers derived from the layout the straight line was sort of disconnected from the arc. And alarmingly, upon reload of the layout, the lines did not connect anymore in pcb, either. A quick web search returned with this bug report. The patch by Andrew Armenia applied nicely to git head, compiled fine and did indeed solve the problem.

Debian/stable, the arguably most conservative of the larger distros is on 20140316 since quite some time, now. Arguably, the circumstances where the patch may yield unexpected results become quite exotic.

  1) apply the Andrew Armenia's patch to git head
  2) push the version requirement of the pcb format to 20110603


Bert Timmerman (bert-timmerman) wrote :

Hi Kai-Martin,

Do you happen to have a test file suitable for testing the above mentioned patch ?

TIA and kind regards,

Bert Timmerman.

Bert Timmerman (bert-timmerman) wrote :

Oh, and BTW: looking at the patch ... are we sure that 3 decimals is accurate enough ?

Changed in pcb:
milestone: none → next-bug-release
importance: Undecided → Medium
status: Confirmed → In Progress
assignee: Andrew Poelstra (asp11) → Bert Timmerman (bert-timmerman)
Bert Timmerman (bert-timmerman) wrote :

Oh, and BTW2: any chance of a patch for the second action regarding the version requirement ?

tags: added: core file-format
Bert Timmerman (bert-timmerman) wrote :

Have a look at topic branch "home/bert/LP1270886" and happy testing.

Kind regards,

Bert Timmerman.

Changed in pcb:
milestone: next-bug-release → future-bug-release
Bert Timmerman (bert-timmerman) wrote :

Topic branch is renamed to "LP1270886".

Kind regards,

Bert Timmerman.

Topic "LP1270886" branch is rebased and updated.

Please review.

Kind regards,

Bert Timmerman.

Changed in pcb:
milestone: pcb-4.1.1 → pcb-4.1.0
Changed in pcb:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Related blueprints