Workaround: PCB STEP export into Solidworks


#1

When I try to export a PCB from PCBnew into a STEP file and then subsequently import it into Solidworks I get all kinds of funky stuff. Sometimes majority of components show up with errors in the tree and are not showing up in the model itself. Sometimes all the the parts get replaced with a single random model (like resistors get replaced with a chip model or something to that effect). In short - it is messed up. I do have all the models for the components in step format.

As a work around I’ve been using the following sequence. Open the exported file from KiCad in FreeCAD, export it into STEP again from FreeCAD, then open that STEP in Solidworks. The file would still have some weird things in it, but at least it will open and you can us it in an assembly.

I did submit a bug report Feel free to vote it up by clicking on “this bug affects me”…if it actually does.

Just noticed something in the bug description. Apparently, I was trying to include STEP file into maniacal assemblies :grin: May be that was the problem in the first place?


OpenGL canvas Update
#2

Hey there Art … been using McCAD PCB ST for 12 years, works fine for what I need.

However, I must switch to new schematic and PCB software so that I may do 3D models.

KiCad looks promising, but I must be sure that it will allow me to generate an output file for Solidworks.

Will the output file show up in Solidworks as a 3D model of PCB and all components?

Respectfully,
Mark


#3

I have a colleague who uses Solidworks, He has been using my stepup exported boards for 1 year with no problems :slight_smile:


#4

Shack … thank you kindly for the response.


#5

You can try for yourself, this board is exported to step directly from kicad pcbnew (nightly)

IGBT_board.step.zip (2.7 MB)

Let me know how it goes.


#7

It seems to be having the same issues. The underlying problem is that there is a suppressed solid that’s included called SOLID_25 and then it gets included in every other solid as well, so all of them generate errors. Sometimes the board still builds fine (like in this case, and sometimes it gets all messed up. Regardless, even if it does, having a model in an assembly with errors in it will bug the crap out of any ME.


#8

@ArtG
would you mind to have a try with FreeCAD and StepUp?
You only need to configure your KISYS3DMOD var inside the configuration file…

If you will use FC 0.17, your step model will have hierarchy for Board, Top, Bottom & Virtual parts

Here some tips


#9

I’m not quite sure what you are asking. Like I stated in the original post if you run the file first through FreeCAD then it opens fine in Solidworks. It still would have that Solid_25 suppressted with an error, but it wouldn’t have it included in every solid in the the board, so it is easy to delete and use the model.


#10

I’m suggesting to use StepUp to convert the KiCad pcb board file to STEP instead of using the internal exporter.

StepUp is the really first STEP exporter for KiCad and it has offered the option to have a STEP model of the kicad board since July 2015 also for KiCad 4 stable release.

If you download the Marcos’s project here


or Icezum project here

you can just test StepUp without the need to even touch any configuration file…
(download all the git project which includes 3D models and kicad_pcb file and unzip those locally)
Just use FC Tools Menu to install KiCad StepUp workbench, restart FC and open directly in FC a Kicad_pcb board file.

Maurice


#11

I downloaded the file and opened in SW2017. The only error was in the transformer model. Something in the geometry shown below that caused floating bodies.


I was able to heal with the import diagnostics and no longer have any errors in the file.


#12

Thanks for the feedback guys.

@kiki that transformer model was edited with freecad before including the model to the kicad board, so that in particular is not a kicad issue.


#13

Now that’s interesting. I’m using SW2017 as well. Can you post a screen capture of your FeatureManager Design Tree?


#14

good catch.
I analyzed the built geometries with different CADs (DSM, VariCAD) but I didn’t found any issue…
Only analyzing the single transformer I get the errors in the geometry

Not even a FreeCAD issue probably, but the issue is in the boolean Cut operation done on the transformer inside FC…

Anyway, each CAD STEP parser has its own peculiarity…
For that reason a well formed and checked MCAD library is a must for KiCAD.

It is enough to have a single wrong model to mess up the all assembly result.
That is why we put a big effort on the 3D model library at GitHub…


#15

Art,


#16

I agree. I’ve never had an issue with a Github model exporting to SW.


#17

Thanks! That’s just weird.


#18

Hi,

I too have seen random parts being replaced to the wrong ones in Solidworks. In my case it was actually solidworks not handling the files properly. The first time i opened an exported design solidworks would save the parts as templates, if i then updated the design in kicad and did a new export solidworks would load the previously saved templates instead of the new components. This made some parts show completely different models than what they should. Clearing the solidworks template folder inbetween exports would fix this issue.

Solidworks also seems a lot more picky when it comes to STEP files than for example freecad, some of my models would consistently load with errors in solidworks, but not in freecad. Even when the STEP model exported by kicad was made by solidworks it would throw errors.


#19

At risk of turning this into a SW thread…

I have my default templates to “Prompt user to select document template”. I think I had to do this to overcome the error @Gustavxerxes is referring to, but wouldn’t guarantee that will fix it.


#20

It is very important to check each new 3d step model that has been generated before include this in the exporter…
Since the very first FC step exporter, there were no issues in the STEP generated board and parts if each single model included had no geometric issues…
https://lists.launchpad.net/kicad-developers/msg19243.html
There were positive feedback for:
Catia V5, PTC Creo Parametrics V2, Solid Edge ST7, Siemens NX10 and Solid Works
So I imagine that the main issue one can find would be related to the quality of each single model.


#21

Thank you kindly for interest I helping with this problem.
Like I stated … I am on imac.
The PC step is not avail for Mac.
Issue still very much an unresolved obstacle.