STEP File output

I am having an unusual problem with the STEP file output from KiCAD.

I am creating the STEP file which appears to go okay. A lot of the components are not coming up but that’s likely my library for those parts isn’t up to date with the STEP information.

The problem is occurring when I import them into SOLIDWORKS to make a model of my entire device.

I have 2 boards of different sizes. I can open them individually and they appear okay.

Picture2

Picture1

The problem comes when I try to open two of them. When I open the second one, Solidworks asks to rebuild the file and then the second file will change the PCB to the shape of the first file opened.

Picture3

In the structure of the assembly, both have an element called COMPOUND.step which appears to be the board itself. Inside that element is a sub element that is the same name as the filename of the board itself (look down in the lower left corner of the image).

Picture4

When the second one opens, it is changing to the name of the first board.

Picture5

I have no idea why SOLIDWORKS is somehow linking the two items from two different files but it blows up my attempt at making an assembly of all my boards.

Yea so this is a SolidWorks “feature” and KiCad “laziness”.

Though I’m having trouble fixing it because there appears to be a bug in opencascade where it’s ignoring labels set on entities spawned from a compound that’s generated rather than loaded extenrally.

Solidworks is unforunately trying to “deduplicate” the models so when it sees two assemblies in step with the same name, it tries to reuse what it knows about the first one :confused: The only workaround is load the first step, rename the dumb entity to a unique name and save it. Before loading the 2nd model.

Alternatively, open a text editor and find the PRODUCT('COMPOUND','COMPOUND','',(#10211));
and replace ‘compound’ in both instances with the same unique string i.e. ‘BOARD 35192-421’

This comes from how SolidWorks normally works with their own format files and the assumed designed paradigm for how mechies separate their design work in parts and assemblies.

There’s no right or wrong here for KiCad unforunately.

2 Likes

???
So if you accidentally happen to rename a Solidworks object to an already existing name, then it just throws your object in the garbage bin because it can’t be bothered to even look at what shape the object is?

A bit simplified, I draw a nail and a hammer, and rename the “nail” object to “hammer”, and I have two identical objects left, not knowing whether the hammer or the nail is trhown away?

This sounds quite absurd.
It seems logical that Solidworks has an option somewhere to disable this “deduplicate feature”. Not an optimal solution, but a partial fix / workaround.

Yea? But this is only during STEP imports. STEP doesn’t quite match how solidworks itself works which is parametric modeling. So it’s making inferences on how to convert it to it’s internal format, how the STEP file assemblies work vs. how SOLIDWORK assemblies work.

SW itself won’t let you rename to conflicting names in its own formats

My experience is that Solidworks STEP import is buggy and easily broken by certain 3rd party manufacturers component models used on the PCB.

there is a similar thread here:

with an external solution:

• I created a simple PCB in Kicad (some footprints and holes). Did not bother to add traces…

• I exported Step file from Kicad

• Here’s the ‘Trick’ for SolidWorks:

• Open the file (not import)
• Open the file again
• Create New Assy or open exisiting Assy
• Cascade the Windows and resize (to see them)
• Drag Top Label from one opened file containing the Step, into the Top Label of the Assy
• Do it for the Second opened Step file

Result: An Assy with both Step files.

Naturally, you can name them before opening in SolidWorks or, not bother (I did NOT bother to rename them)

Screenshots.

1 Like

Look at you…using SolidWorks 2000

I paid $3,600 for it in 1999. Been using it since and never a problem.

I moved over to FreeCad 8 yrs ago so, for most of my projects, I seldom bother with SolidWorks but, having taught and used it, along with several other CAD App’s leaves me with notes on problems and solutions…

1 Like

I have fixed the export to name the bare boards other than a generic name. It will use the name of the board file which is somewhat more fitting. You can see it in my screenshot.

Now to fix the fact the default colorization is broken.

2 Likes

I was able to edit the STEP files as you suggested and that worked. Thank you for your assistance! I’ll update my KiCAD as soon as I can.

Ahhhh…

Perhaps I spoke too soon.

I just noticed that another issue was popping up. I have a bunch of headers on the board and in the structure of the header object there is a SOLID-1.step and beneath that is another STEP reference associated with the particular board I am opening. In some cases it doesn’t appear to cause a problem as I am using the same type header at some locations. But there are a locations where the header is changing from say a 1x3 to a 1x10 and a 2x3 to a 2x10.

Picture6

So it would appear there is a naming convention for the parts being used on the board that is adopting the name of the board which will also overwrite the part when another board is opened.

I find it easiest to open the step file in solidworks
save as a sldprt
close the assembly without saving
open the sldprt

In addition, for complex boards, I usually delete most of the smt components and apply a green color to the PCB.
More recently I have been experimenting with outputting a jpeg image from Kicad 3d viewer and applying this to the PCB as a decal in Solidworks so I can see the silkscreen and, albeit flat, deleted components.

Here’s an example

Thanks, Nick! That did work saving it as an SLDPRT.