I am trying to develop a workflow whereby a footprint can be designed using Fusion 360 with, for example, a 3D step model as the starting point.
This presumably involves (as I have done) then using Inkscape together with its associated svg2shenzhen extension to generate the Kicad-format footprint file.
Depending on the starting point, an alternative workflow would be to design the footprint in Inkscape (as an SVG file), again using the associated svg2shenzhen extension to generate the Kicad-format footprint (.kicad_mod) file.
Although I have achieved an end-result, for practical purposes, it seems pretty much useless as a result of apparent limitations of import/ export performance of the tools!
I shall document my efforts to-date based on the Fusion 360 starting point and provide the set of files so that anybody interested could follow along and, hopefully, define an improved workflow with an end-result that is satisfactory.
The question could be asked: “Why would one want to design a footprint outside of Kicad using Fusion 360?”
Two examples address that question.
-
If a 3D step model is available, then using Fusion 360, a projected sketch can be used to easily define the footprint.
This could be a useful approach especially where the footprint is of a complex shape.
I shall describe the example based on a connector in the following.
I accept that this particular relatively simple example could easily be done directly within Kicad - but it serves as a means to define a possible workflow that could be useful for more complex footprints. -
I shall shortly need to define a complex heatsink which includes 6x IGBTs, 2x bridge rectifiers and temperature sensors mounted on it.
The heatsink will be a custom design to be CNC machined.
Consequently, a 3D (Fusion 360) model is required.
The 3D model can also define where the 7 or more devices are to be mounted on it, together with their mounting holes on the heatsink.
It will be desirable to generate a footprint of the complex heatsink + mounted devices.
Ideally, the Kicad composite footprint would be produced directly from the Fusion 360 model.
After importing into Kicad, the footprint (i.e., heatsink plus 7 devices as a single composite footprint) could be moved about to the preferred position on the PCB.
In that way, there would be no risk of the device locations becoming separated from where they are to mount on the heatsink.
During routing within Kicad, it may be found desirable to change the position of one or more of the devices.
The intention is that such changes could easily be made within Fusion 360 followed by repetition of the workflow to generate an updated footprint for Kicad.
In this way, consistency between the 3D model and the footprint would be maintained.
[This methodology only makes sense if the workflow is simple and involves a minimal need for tweaking during each step - which, unfortunately, does not currently appear to be the case ]
Other reasons to favour the approach is that Fusion 360 provides the benefits of parametric modelling; if I should decide to change a dimension of the heatsink, everything else would be updated in the model.
Returning to the example of the connector which I have been using, the starting point is:
07JQ-BT.step (348.6 KB)
eJQ.pdf (398.7 KB)
I imported the step model into Fusion 360 and created a projected sketch, refer graphic:
This includes an offset outline (as would be used for the courtyard of the footprint) which is very easy to do in Fusion.
The PCB pin positions are shown - the sketch defines points corresponding to the pin centres.
My thinking was that it would be simplest to add the pads themselves after the conversions and import into Kicad.
[Hopefully, the pads could also be done in Fusion 360 or Inkscape in the future - at this stage I didn’t want to complicate matters during testing of the basic workflow!]
I added a rectangle of 30 x 15mm for the purpose of being able to check for accuracy of conversions after the export/ import operations.
The sketch can be easily exported from Fusion 360 as a DXF file.
07JQ-BT.dxf (13.0 KB)
There are no options for the export (so aspects such as the particular version of DXF file or how scaling/ dimensioning is managed by Fusion 360 are unknown).
The svg2shenzhen extension for Inkscape needs to be downloaded and added to Inkscape, as documented at
Using the svg2shenzhen extension, the process within Inkscape involves first using the extension’s “Prepare Document”, which defines the area onto which the imported dxf is to be placed; I don’t think the size is important as long as it is sufficiently large. The preparation process also involves defining the particular layers that the drawings will relate to in Kicad.
[Subsequently, elements of the drawing need to be relocated to the layers - either within Inkscape or could be relocated between Kicad layers after importation of the generated footprint into Kicad).
The next step is to import the dxf into Inkscape, refer graphic:
I found that with “Method of Scaling” set to “Read from file” the imported sketch was much too large (so apparently Fusion 360 doesn’t properly provide the units and/ or dimensions).
However, by using “Manual scale” as shown on the graphic, the imported dimensions were correct.
Within Inkscape, it is also worth checking the “File … Document Properties” which includes unit value (mm) and scaling options that would likely also influence the result, refer
The imported sketch needs to be tweaked in various ways within Inkscape, including at least:
a) Reducing the line width to, for example 0.1mm.
Following the import of the dxf file, the lines were excessively thick.
b) Relocating to layers, such as F.SilkS, which are subsequently to be used in the export to Kicad process.
[I kept things ‘simple’ by moving everything to that single layer, with the thinking that it would be simpler for an Inkscape beginner such as myself to subsequently do duplications/ deletion of elements and their relocations between layers from within Kicad).
c) Everything needs to be converted to a path.
In prior tests, if for example a simple rectangle is drawn within Inkscape, it doesn’t show up in the generated Kicad footprint.
The process involves converting that rectangle to a path.
As an aside, I don’t understand why clever people write complex software such as svg2shenzhen, which presumably involves a lot of time and effort, make it publicly available, yet make minimal attempt to properly document it!!!
Inkscape SVG file:
[Why does that file show only as an image, rather than an uploaded file?!]
At this stage, the result within Inkscape is as follows:
This is then “Export[ed] to Kicad” using the second facility of the svg2shenzhen extension.
07JQ-BT.kicad_mod (19.6 KB)
The resulting file 07JQ-BT.kicad_mod is then added to Kicad and appears as follows:
The first impression is that everything is fine!
However, by clicking on elements of the footprint, it is apparent that most aspects involve excessive smaller elements, refer:
Even the simple rectangle that was used for the purpose of checking dimensions seems to comprise double lines, apparently involving the inside and outside of the strokes, refer
Consequently, much rework will be required to produce a footprint in which all the excesses and issues are resolved!
The conclusion is that despite all the effort, the workflow/ toolset appear to be of little or no use!!
Looking on the web, I investigated the svg2shenzhen extension in more detail.
Reading the “issues” on its github page, one learns that the process involves “vector to bitmap to vector” conversions.
Consequently, it is hardly surprising that numerous artifacts are being introduced in the conversion process.
Obviously, it makes little sense to involve bitmaps!!!
It would be useful if the author of a tool would clearly define its limitations and issues, thereby avoiding wastage of time and effort by potential users!
There is a more recent fork of this Inkscape extension by drayde
I haven’t tried that version.
It appears to be based on the same “vector to bitmap to vector” conversions although may resolve some of the other issues for a practical usage?
There is also svg2mod
[Maybe svg2shenzhen is partly based on or depends on this?]
The latest (forked) maintainedversion seems to be at
[The original/ now un-maintained version is at GitHub - mtl/svg2mod: Convert Inkscape SVG drawings to KiCad footprint modules ]
This svg2mod appears to offer the potential for being more useable than the svg2shenzhen extension.
Apparently, svg2mod does not involve going through a bitmap stage in the conversion process so hopefully doesn’t introduce the resulting artifacts in the result of the conversion.
Has anybody tried this svg2mod ?
Changing the subject somewhat (probably deserves a separate forum topic?), I am also interested in the workflow for producing the best quality graphics.
I need to design a PCB-based front panel for which the highest resolution achievable for the silkscreen text is desirable.
The text and graphics could be designed in Inkscape as an SVG file.
In theory, the svg2shenzhen extension could be used to produce a Kicad file.
In practice, the “vector to bitmap to vector” conversion process of that tool may degrade the quality?
Of course, the actual silkscreen will be screen-printed or sprayed so is a bitmap so the quality may be okay?
My question here is: "Can anybody recommend the best methodology/ tools to achieve optimal resolution of a Kicad silkscreen? (Probably starting with an SVG file.)