pcb

Route styles are not properly loaded after nm conversion

Bug #882712 reported by Milan Prochac
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
pcb
Fix Released
Undecided
Unassigned

Bug Description

The route styles ("Styles" item in .pcb file) are saved with unit specified (mil), but they are always read in cmils.

For example, 10mil line is saved as 10.00mil, when opened again the line width is read as 0.10 mil (10cmil), it is saved as 0.10mil and subsequently read as 0 ...

Applies to git HEAD.

Milan Prochac (milan-x)
description: updated
Revision history for this message
Richard Barlow (richardpbarlow) wrote :

Found the problem. The attached patch should fix it.

Revision history for this message
Bert Timmerman (bert-timmerman) wrote :

Hi Richard,
This seems to work without any side effects.
If in mm units parameters are written to pcb file in mm, if in mil they are written in mil, I didn't test for nm units (yet).
It looks like reading pcb files made with old releases (such as "example/LED2.pcb") keeps having problems loading the style parameters the first time (loads with errors, probably due to unitless parameters in the pcb file).
To solve this requires another patch.
Kind regards, Bert Timmerman.

Changed in pcb:
status: New → Confirmed
status: Confirmed → In Progress
Revision history for this message
Richard Barlow (richardpbarlow) wrote :

Hi Bert,

The incorrect loading of route styles without units was a side effect of my patch, when there are no units detected s_len is set to 0 and therefore strncmp always returns 0.

I've fixed this and uploaded a new patch.

Revision history for this message
Bert Timmerman (bert-timmerman) wrote :

Hi Richard,
I can confirm that this latest patch works for me too.
Thanks, Bert Timmerman.

Changed in pcb:
status: In Progress → Fix Committed
milestone: none → next-bug-release
Revision history for this message
Milan Prochac (milan-x) wrote :

I can confirm too - works fine now.

Thank you

Changed in pcb:
status: Fix Committed → Fix Released
Changed in pcb:
milestone: next-bug-release → pcb-20140316
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.