Hello,
I'd like to be able to read a component from gerber files, find its
centroid, and be able to move it around on top of an existing pcb layout.
Basically, say i'm viewing solder and silk masks for a large circuit. I want
to read in the gerber to some single component and be able to 'display' it
so that i can see how it fits in a given area, to see what's around it, etc.
My approach so far has to been to use some tool to export individual
packages (e.g. SOT23, 0603, etc) to individual sets of gerber files
containing only that component, then read these in and try to display them
on top of some loaded pcb layout. I'm building on top of the GUI in
doc/example-code/example6.c. I've found that i can 'move' these components
around by adjusting their netlist. Hover, I dont quite understand how a
netlist is populated well enough to do this moving with precision.
Ideally, i'd be able to find the centoid, or some corner of this component,
then be able to place it in any specified location on my PCB by adjusting
the component's netlist appropriately.
Below, i've printed out the netlist for the solder layer of a component. It
has 3 solder pads. I dont understand how to make sense of "netlist [1]
variables" below.
What does it mean that start_y is 0, while stop_y is 8.826?
This is a relatively small component consisting of 3 little solder pads...
so what can be 8.8 units long?
Next mystery is netlist [3] where a component's start_x and stop_x are
equal.
The boundingBoxes seem to look more reasonable.
Printing netlist [0] variables:
start_x: 0
start_y: 0
stop_x: 0
stop_y: 0
boundingBox.left: 0
boundingBox.right: 0
boundingBox.bottom: 0
boundingBox.top: 0
aperture: 0
label: 0
Printing netlist [1] variables:
start_x: 0
start_y: 0
stop_x: 0.821
stop_y: 8.862
boundingBox.left: 0.8035
boundingBox.right: 0.8385
boundingBox.bottom: 8.846
boundingBox.top: 8.878
aperture: 16
label: 0
Printing netlist [2] variables:
start_x: 0.821
start_y: 8.862
stop_x: 0.9
stop_y: 8.825
boundingBox.left: 0.8825
boundingBox.right: 0.9175
boundingBox.bottom: 8.809
boundingBox.top: 8.841
aperture: 16
label: 0
Printing netlist [3] variables:
start_x: 0.9
start_y: 8.825
stop_x: 0.9
stop_y: 8.9
boundingBox.left: 0.8825
boundingBox.right: 0.9175
boundingBox.bottom: 8.884
boundingBox.top: 8.916
aperture: 16
label: 0
Is there a better way to achieve my objectives or is there an explanation of
netlist logic that i can be pointed to?
thanks,
aM
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:
Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Gerbv-devel mailing list
Gerbv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gerbv-devel