STEP file corrupting on import to Solidworks (but not freecad)

Hi! I have a simple little design I’m doing that will go into an enclosure. I usually just export the PCB early on to try and get the enclosure designed right, but I’m having issues with with the file importing into solidworks. Several of the components are rotated and replaced by other components. The images attached should be fairly self explaining. I have tried removing all the 3d models and putting them back in, to see if I could isolate it down to one malformed STEP file that maybe solidworks doesn’t like, I’m not sure what else to do for debugging it. If it’s just one component causing issues, I would be fine leaving it out, but I only need a few components on this board to show in the 3d model.

Oh, and freecad loads the step file just fine, so I haven’t included a render from that.

[P.S. Edit: I’m happy to share files, but step file is too big]

This may or may-not be of interest…

In FreeCad, using the KSU/StepUp Workbench, you can load the PCB, the Pads and Traces then, build your enclosure around them.

Two videos may inspire you (I haven’t touched Solidworks or Pro-E in 10yrs as FreeCad does everything I need it to do…)

At some point I will hopefully use freecad, but it hasn’t lived up to what I need it to do quite yet. In this particular case, I am meshing with other things already in solidworks, and it’s what I know from work (Which is how I get access to it right now).

If you can get FreeCad to load it then, Export Colored-Step from FreeCad. Perhaps it will load fine in SW…

I tried that, and it still does it. In fact, the picture shown is KicadStep → Freecad → FreecadStep → Solidworks…

What I’ve done since in the interim is to just surpress the few components that are causing problems and import those step files manually and align them, it’s a kludge, but it gets me working, but I’d love to understand the problem further.

Here’s the step file in compressed form that I hope allows for its upload < 4mb

ES-010.tar.gz (711.8 KB)

I’ll look at your file.

Meanwhile, I don’t know if this will help you but, it helped another Kicad user 3yrs ago. Also, don’t know how it may apply to a more current SW version than I used…

Screenshot of old posted info

See following posts for possible solutions:

I opened your file in OpenStep and several times it crashed but, after a few more tries it opened.

It opens okay in FreeCad.

I have ‘dumb’ Kicad footprint that I use to check Step files, It works okay, too.

Look at your SW Import settings - if I remember correctly, SW was picky about which standard it likes (but, again, my SW is now 24yrs old and no longer installed on computer…)

Screenshot of OpenStep (before crash) and, using Dumb Kicad footprint…

ADDED: Added screenshot of it opened in Gmesh. No problem

I opened your STEP file (ES-010) into SolidWorks 2022 SP5.0 and it seems to have imported correctly.

Check if the 3D model of that larger D-connector has the same ID as the push button.

Hmm, okay, I’ll try that. I’ve got SW 2021, maybe need to get the latest…

So when you say ID, you mean in solidworks? It does have the name associated with the filename of the pushbutton, but the pushbutton isn’t displayed, the DSUB is instead…

You can see the original Dsub-15 model 2 lines below as connector_a-df_15blah.step

My answer about “…same ID…” was a bit obtuse.

In the past when I imported multiple PCB assemblies (from STEP files) into a SolidWorks assembly I’ve had problems with SolidWorks changing parts around between the different PCBs. I assumed it was due to different parts having some sort of identical internal ID though I never dug into the specifics.

What I do now is to import the PCB assembly STEP file into a new assembly file in SolidWorks and then save it as a part file (.SLDPRT extension) in SolidWorks.

Try moving your STEP file into its own directory prior to importing it into SolidWorks and then save it back to that directory as a part file. Heck you may even need to close your SolidWorks project prior to doing all this. Maybe even close and restart SolidWorks as well as, in my experience, SolidWorks has a tendency to keep files in memory even after they are closed.

@tryitagain post reminded me to look at my notes about this topic.

I posted screenshot above and now, post these Two additional screenshot’s… Perhaps useless, perhaps useful…


@divermartin I remember SW being picky about the Step standard so, I looked at your STEP file in Text-Editor; it’s a 214 Schema so, try to set that when opening/importing…

Hmm, I don’t get a popup for selecting the assembly template, and it will just save an sldasm file, and no sldprt file. I did try some of the STEP import options to make it a part and a few other things, but they all showed up with the same errors.

I’ve gotten a board imported at least for my needs for now, so I might just chalk this up to an issue with solidworks, and not that kicad is creating a malformed STEP file.

After the assembly is loaded into SolidWorks you can select File->Save As… to save the assembly as a part file.

Use the “Save as type:” drop down in the Save As dialog and select “SOLIDWORKS Part (*.prt, *.sldprt)” to save it as a part file.

@divermartin Lastly, in addition to what @tryitagain suggests, Try this:

Open your good file in FreeCad, switch to Part Workbench (not Part-Design - they have different tools and codes though, several are the same/similar - depends on the Coder).

Then, select all the items and ‘Compound’ it. Then, export it as STEP
(Part-Design has Boolean-Fuse, which is similar to Compound)

Heh, in addition to removing all color information (which isn’t end of world, but it makes for not as nice looking models) it still has the error even after doing that.

Consider it to have been a good test that helps confirm it’s a SolidWorks-related problem (not Kicad).

Of course, it could be more about how it was modeled than it is a SolidWorks-Step export problem…

Clarification: ‘modeled’ applies to the 3D-models in Kicad. Many of the Kicad parts use WRL instead of STEP and that may be a problem. I suggest looking at the footprints and linked step/wrl. Can do simple test with some parts… some of the parts have both step and wrl - you choose…