twlostow / assygen Goto Github PK
View Code? Open in Web Editor NEWPCB Assembly drawing generator
PCB Assembly drawing generator
In Kicad 5, the '.pos' file format appears to have changed and is no longer possible to import it directly using your script. The original format (from the Freewatch project) appears to be in the following form;
Ref Val Package PosX PosY Rot Side
C14 100nF Capacitors_SMD:c 106.3036 -107.7576 270.0 B.Cu
C18 10pF Capacitors_SMD:c 108.0780 -101.9337 0.0 B.Cu
Under Kicad 5, the pos file is now exportable as either a .csv file (in the following format)
Ref,Val,Package,PosX,PosY,Rot,Side
"C1","470nF","C_0805_2012Metric",8.255000,-27.940000,0.000000,top
"C2","47uF","CP_Elec_5x5.3",20.193000,-22.098000,270.000000,top
or as an 'ascii' format (which more closely approximates the original format with some extra header lines).
### Module positions - created on Wednesday, 19 December 2018 at 14:31:31 ###
### Printed by Pcbnew version kicad (5.0.2-4-gb601aea34)
## Unit = mm, Angle = deg.
## Side : All
# Ref Val Package PosX PosY Rot Side
C21 100nF C_0805_2012Metric -133.5278 -80.0100 315.0000 bottom
C22 100nF C_0805_2012Metric -135.9916 -82.4992 315.0000 bottom
C1 100uF CP_Elec_5x5.3 94.2000 -75.6920 180.0000 top
C2 100uF CP_Elec_5x5.3 94.2000 -69.7500 180.0000 top
Two further points of note;
The names of the exported layers seem to have changed from the names of the copper layers to either 'top' or 'bottom'.
The working precision for rotation is now 6dp for the cvs format and 4dp for the ascii format. The original formal was 4dp only and 1dp only for rotation.
even after fixing the file naming issues and the mix of tabs and spaces I can't get it to process the position file.
Traceback (most recent call last):
File "./assygen.py", line 294, in
producePrintoutsForLayer(sys.argv[1], "Top", canv)
File "./assygen.py", line 268, in producePrintoutsForLayer
pf = PickAndPlaceFileKicad('/home/sirus/G3_future/outputs/G3_future.CSV')
File "./assygen.py", line 147, in init
i_dsg = rows[0].index('Ref')
ValueError: 'Ref' is not in list
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.