Fabrication files, plot files dimensioning


#1

New user, still learning… I have a design with many components. I will need an Autocad or DXF drawing showing the exact dimensions (positions) of many of the parts. I know all of the library parts have a ‘center’, which defines where they are placed on the grid. Is there any way to make the center marks appear in the dxf output file?

My alternative is to make a library part that is just a ‘cross hair’, but I would like the dimensioning crosshair on one of the user layers (dwgs.user, eco.user), so that I can selectively disable them, but these are grayed out in the footprint editor. I have created the crosshair, using the f.fab layer, is it possible to place these parts and then manually change the layer to the one/s I want? This is still tedious since each marker will have to be manually placed in the desired position. Frustrating since I know there is an exact center mark hiding somewhere in the library part. Eagle had the ‘wrench’ function that let you change layers freely, can’t seem to make it happen with K.
Version 4/0.5, WinXP sp3

Comments appreciated,
Harry


#2

For really custom (switch ON/OFF) marks I’d take the EcoX layers.

But going back a little, can you reiterate a bit more on this part (essentially, what you want to do)?

Maybe you should check out the STEP export ability?
That won’t give you the centers either, but the actual devices on the pcb in a 3D format, so you can work with it in a CAD tool to get the job done you actually want to do?


#3

Part location marks will only appear if you put them in place. That means opening each of your footprints in the footprint editor and adding an appropriate mark - cross, “X”, small circle, etc - at the desired location. Then you export the layer containing these marks to your *.DXF drawing.

Kicad doesn’t have any unnamed “technical layers” (or “mechanical layers”, as they are called in some layout programs) several of the named layers can be pressed into service to carry your location markers. These include “Dwgs.User”, “Cmts.User”, “ECO1.User”, “ECO2.User” and “Margin”. In the official KiCAD footprints, “F.Fab” carries an image of the component’s outline, but you may want to add a location mark to that layer.

For example, all of my Mounting Hole footprints have a small cross marking their center, drawn on the “Dwgs.User” layer because that’s the layer I always use to create a dimensioned drawing of the board’s outline - including locations of the mounting holes. (The general drawing notes also live on “Dwgs.User”.) My “ECO1.User” is a crude assembly drawing, containing cartoon-like sketches of the installed components along with their values and reference designators. “Margin” may carry an imported *.DXF of the enclosure my board mounts into, or the mechanical interface to things like switches, connectors, pots, etc.

In the “File” > “Fabrication Outputs” drop-down you will find a tool to create a “Footprint Position (*.pos)” file. I have not yet used this feature but it creates a file showing locations of footprints, so that components can be put into position by pick-and-place manufacturing machinery. (This file has some subtle nuances that you’ll appreciate after you understand how automated assembly machinery is used. Search this Forum for details.)

The values reported by the *.POS file are the locations of each footprint’s reference location, or “anchor”, as they fall on the board’s co-ordinate system. The anchor, in turn, is specified by KLC:

Footprint anchor should be placed in the middle of the footprint (IPC-7351). Generally this is the centroid calculated with respect to the device lead ends. However, if the datasheet specifies an origin for Pick-and-Place, this should be used.

The problem is that the footprints’ anchors have not followed uniform standards over the years. Many of them have their anchor on the part’s centroid, but a significant number center the anchor over Pin 1, or at some other convenient location (such as a positioning peg for a connector).

Dale

P.S. - [quote=“hsieber, post:1, topic:7064”]
Version 4/0.5, WinXP sp3

Comments appreciated,
[/quote]

Habit, fear, inertia, and prejudice are powerful forces. As somebody who stuck with Win2K until after the release of Win7, I’d advise you to upgrade to Win7 as soon as practical.


#4

Little OT:
And when you do, hurry up to get the last of the cpu/motheboards for that OS that MS still supports (Intel LGA1150) as long as they are available ‘new’.

https://support.microsoft.com/en-US/help/4012982/the-processor-is-not-supported-together-with-the-windows-version-that

I’m currently swapping 3 computers from LGA775 to LGA1150. :wink:


#5

Thank you Dale and all. The easiest solution will be to edit the footprints, as suggested. There are only two footprints in question, but there are about 52 instances of them scattered across the board. They all need to be dimensioned at an exact center point, since another designer will be making a matching plastic faceplate. Plan is to export brd files to .dxf, then edit with Acad. I will need to do more reading to find the best way to export the ‘pcb fab’ drawing with holes and dimensions, and the ‘assembly’ drawing, with component outlines, crude or exact. Past CAD tools had a layer for these component outlines, associated with the footprint. Maybe one in Kicad, more RTFM!
Thanks,
Harry


KiCAD to dxf or dwg
#6

After you add the location marks to the footprints you can update all 52 instances on the board with one click.

Adding all of those dimension lines and values is not as easy. It may be more efficient to only add the location marks in KiCAD, then export a *.DXF and do the actual dimensioning in a mechanical CAD program (where there is more elegant support for things like dimension lines).

I am not pleased with KiCAD’s *.DXF exports! Another Forum member created a Python script that produces a MUCH better *.DXF file. You can see details at DXF exporter for mechanical layers of kicad_pcb board . (Please read through the whole thread.) I run the script using the following batch file, which I call " KiCAD2DXF_Batch.cmd ":

REM  Save the python script "kicadpcb2dxf.py" from: 

REM DXF exporter for mechanical layers of kicad_pcb board
REM to a suitable location, e.g., C:\Applications\KiCad\share\kicad\User_Libs\Scripting
REM Copy this batch file “KiCAD2DXF_Batch.cmd” to the project directory of your KiCAD project
REM Drag the *.kicad_pcb file onto this batch file, or run it from a DOS command-line
REM with the *.kicad_pcb file listed as the first argument.

SETLOCAL ENABLEEXTENSIONS

REM Edit following path variables to match local installation:
SET path_to_kicad_bin=C:\Applications\kicad\bin
SET path_k2dxf_script=C:\Applications\KiCad\share\kicad\User_Libs\Scripting

REM Following line uses “kicadpcb2dxf.py” script to create a *.dxf file
REM from the *.kicad_pcb file named in the first argument
%path_to_kicad_bin%\python.exe %path_k2dxf_script%\kicadpcb2dxf.py -f %1

REM pause 

REM Un-comment above line for debugging script

REM Following line opens the *.dxf file just created, using the default application
REM for *.dxf files (CADStd, LibreCAD, etc)
start “” %~p1%~n1.dxf

(Yeah, you need Python . . . . and a Python script . . . . and a batch file . . . . and a bunch of fully-qualified file paths. :weary: )

Dale


Creating "zone outlines" for odd shaped PCB's(Or just have them to be the shape of the cutouts)
#7

Almost there! I added the desired cross marks to the footprints, on the .fab layer. This works perfectly, all of the index marks are added when the board is updated. I continue to have trouble updating library parts, I had a temporary line that somehow became part of the footprint, cvpcb kept adding this line (which I had deleted in the footprint editor). I had to individually edit each part and ‘exchange footprint’ (with itself, same lib name), which updated the placed footprints correctly- weird. Also it seems that cvpcb must be closed and re-launched to pick edited footprint changes??? Is there a protocol to make sure edits are found, maybe edit footprint->save edits->run netlist on schematic->run cvpcb->another netlist->import netlist in board??

As suggested I will export to dxf for dimensioning, much easier with autodimensioning feature of ACAD. Ultimately the dimensions will need to be in a .dxf or .dwg format for the other designer(s) to use and modify later. I will try the Python script, the native dxf export is strange, for one thing the plot is expanded to about 100x correct size, I have to re-scale for dimensioning to work.

This is another subject, but this board has been hard to make a 1x check plot for- the printer is HP laser, only does ‘A’ size, drawing is bigger than page, had to monkey with placement of board in display window to get it to plot the desired area. If possible I like to verify footprints with actual parts on a 1:1 plot, maybe a little OCD but saves disaster down the road. Final gripe/question, cvpcb takes 75 seconds to load, do I have too many libraries enabled? Where do you take unused ones out, and will that speed up loading?

Your patience and good answers are appreciated, I know most of this is in the manual or already posted here…

Thanks again,
Harry

ps apologies if I have posted in the wrong area or barged in on a thread


#8

[quote=“hsieber, post:7, topic:7064”]
has been hard to make a 1x check plot for- the printer is HP laser, only does ‘A’ size, drawing is bigger than page, had to monkey with placement of board in display window to get it to plot the desired area. If possible I like to verify footprints with actual parts on a 1:1 plot, maybe a little OCD but saves disaster down the road. [/quote]
I also like 1:1 check-prints. Yes, getting placement and scaling correct can be difficult. I use the “Plot” menu (not “Print”) to create a *.PDF file, then print from the Adobe reader where I have a few more options to work with. I recall a Forum post from many months back where a user printed to *.PDF, or possibly Postscript, then used image editing programs to create a hardcopy with the desired placement, scaling, etc.

In PCBNew, use “Preferences” > “Footprint Libraries Manager” and “Footprint Libraries Wizard” The “slow loading” problem gets mentioned on this Forum at least every week or so. Many of us (most of us?) operate from local copies of the github libraries even if we don’t create and maintain our own libraries, partly to avoid this loading delay.

Dale


#9

Well this project has been a learning experience, albeit a painful one. It took some effort to get a good 1:1 check plot, and to export a .dxf file into Acad for editing. However the most valuable lesson is to be very careful with associating footprints with symbols. Of course this area always calls for careful scrutiny, but having a free association between the two is a mixed blessing. While it gives you lots of latitude in assignment, it is easy to make mistakes. For instance, there were two parts with SOT23 footprints, mosfets and magnetic detectors. Wow, there’s already a SOT footprint in the library, along with corresponding symbols! After finishing placement and routing, the final sanity check revealed that the pin assignments were wrong, actually different for each type of part. OK, well we can use the global footprint exchange. Oops, that re-names all of the connected nets! You can’t edit them, re-name them, or have them automatically pick up the net name of the part. You can’t even route over them because of the ‘real-time’ DRC. So all these tracks so painfully placed have to be deleted and re-routed from scratch.There is probably a nice solution to this dilemma that I will learn in time, along with all the other tips and tricks that any sophisticated CAD system requires.
Apologies for the cvpcb slow load question, I see that one’s been beaten to death and is well covered here and in the doc.
Thanks,
Harry


#10

The solution to getting reassign nets in pcbnew is to disable DRC, then reread the netlist.

In OpenGL view, go to Preferences > Interactive Routing

Select “Hightlight collistions” and “Allow DRC violations”

Route as desired.

Reread the netlist from the schematic.

After those steps, you can select “Shove” and deselect “Allow DRC violations” to get back to “normal”.

Hope this helps!


#11

I should have consulted the forum before doing things by hand, the recommended method looks a lot easier. I didn’t know you could disable DRC. This will go on my ‘tips and tricks’ sheet. Thanks!
Harry