pcb

centroid file top and bottom orientation differ by 90 degrees

Bug #756972 reported by Robert Jenssen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pcb
New
Undecided
Unassigned

Bug Description

I am using PCB version 1.99z. I have attached a small double sided example pcb with one component on each side. The file->export->bom xy-file is:
# RefDes, Description, Value, X, Y, rotation, top/bottom
# X,Y in mils. rotation in degrees.
# --------------------------------------------
RN314,"CAT16_4","10k",100.00,200.00,0,bottom
RN315,"CAT16_4","10k",300.00,200.00,270,top

The locations are correct but the top is rotated 90 degrees wrt the
bottom.

I think the "heuristic" approach to determining the device orientation in the gEDA pcb code is mistaken (see src/hid/bom/bom.c and pcb.pdf section "E.3 Computation of Centroid and Rotation"). The orientation is assumed to be that between pins 1 and 2. Unfortunately, IC manufacturers are not consistent in the orientation of these pins. For example in one of my designs I have DIL pin-outs like:

1 2
3 4
5 6

and

1 6
2 5
3 4

and 4-sided SMT packages like:

  3 2 1 20 19
4
5
6

and

    144 143 142
1
2
3

ScreamingCircuits gives a guide to its expectations of device orientation in a centroid file in "http://i.screamingcircuits.com/docs/Understanding%20the%20Centroid%20file.pdf"

To do centroid output reliably, gEDA pcb should maintain an internal record of the rotation that has been applied to each footprint.

Tags: xy-export
Revision history for this message
Robert Jenssen (r-jenssen) wrote :
Revision history for this message
Bert Timmerman (bert-timmerman) wrote :

Hi,

You might want to have a look at:

http://www.fed.de/downloads/The_CAD_Library_of_the_Future.pdf

AFAICT, this one follows the IPC rules and "defacto standards" of the industry.

Kind regards, Bert Timmerman

Revision history for this message
Robert Jenssen (r-jenssen) wrote :

Hi,

Assuming only 0,90,180 and 270 degree orientations are allowed, one way to record the orientation is to add 4 mutually exclusive flag bits to the element flags, possibly with symbolic names "Up","Down","Left" and "Right". src/rotate.c:RotateElementLowLevel() can update the element flags, src/hid/bom/bom.c:PrintBOM() can echo the element orientation to an XY file and src/report.c:ReportDialog() can report the element orientation. Sound reasonable?

Regards, Rob Jenssen

Revision history for this message
Robert Jenssen (r-jenssen) wrote :

Here is a simple patch that adds three element flag bits for orientation right, left and down. Rotating the footprint modifies these flag bits in the corresponding pcb element. This patch assumes that the editor of the footprint library is responsible for producing footprints that have a centroid (mark) and orientation that suits the pick-and-place machine. The attached tgz file contains a simple example.

Traumflug (mah-jump-ing)
Changed in geda-project:
importance: Undecided → Wishlist
tags: added: xy-export
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.