Debugging step export

this is a recursive query… in this case you can simple link a downloading page offered by i.e.google drive or similar on line clouds

Thanks Joan :slight_smile:

Here is the DXF file, lets see if we can replicate it :slight_smile:
main_pcb.DXF (19.8 KB)

Because I see no others joining,
I tested this with the StepUp exporter:
here the kicad_pcb that doesn’t export from internal exporter (created importing the main_pcb.DXF in Kicad dev)
main_pcb.kicad_pcb (6.4 KB)
and the corresponding STEP model created with StepUp in FC0.17
main_pcb_ksu.step (62.8 KB)

1 Like

If I import the DXF it looks good using the OpenGL canvas but the legacy canvas shows some discontinuities. I don’t see the discontinuities in any other programs.

The KiCommand command ‘ends’ will calculate the endpoints of that arc. You can select it, then issue the following command string:

drawings selected ends print

The select the line segment and do the same command. And compare the answers.

I encountered a similar problem with STEP export in version 5. I downloaded the MKRWAN1300 Eagle files and imported them into KiCAD (https://store.arduino.cc/usa/mkr-wan-1300). They import fine. When I try to export the STEP file, I get the following error:

_Executing '"/Applications/KiCad/kicad.app/Contents/MacOS/kicad2step" -f -o "/Users/me/Library/Mobile Documents/com~apple~CloudDocs/Kicad/MKRWANV1.1/MKRWANV1.1.step" "/Users/me/Library/Mobile Documents/com~apple~CloudDocs/Kicad/MKRWANV1.1/_autosave-MKRWANV1.1.kicad_pcb"'_
_Warning: 11:09:49 AM: /vagrant/build/kicad/src/kicad/utils/kicad2step/pcb/oce_utils.cpp: addEdge: 1482_
_Warning: * added an auxiliary segment from 180.687,-92.5036 to 180.687,-92.5036_
_Warning: 0x113d17fcb : Standard_Failure: BRepAdaptor_Curve::No geometry_
_Error: Unable to create STEP file. Check that the board has a valid outline and models._

I noticed something weird with the corners of the board edge. When I zoom in and look at the corner top right corner (note all corners have this anomaly) where the edge is curved, the curve stop and end points are offset by a couple degrees. Might be an Eagle import issue? Not sure if this is causing the issue with exporting the STEP file or not. Here is a screen shot.

I suspect you are experiencing this bug https://bugs.launchpad.net/kicad/+bug/1784626

This is resolved for 5.0.1. You can test this using the 5.0 nightlies at http://downloads.kicad.org/osx/testing/5.0/

1 Like

Thank you @Seth_h. Sounds like this might be the cause. I will download the nightly and give that a try and let you know.

That did it! :grinning:

Thank you @Seth_h

One thing I noticed with a couple exports to STEP is that the pcb copper traces do not appear in the STEP model. Is that a limitation of exporting to STEP or is there a setting to include the copper traces?

This is a deign decision. The step export is intended to help with mechanical integration (mainly making housings)
It is not intended to make realistic looking models of your board.

1 Like

Thanks for the feedback. The traces could be helpful when working to maintain clearance from other mechanical metal components. Not a high priority but if it was simple to do and you could have an option to turn it on that would be great.

if you use FreeCAD, you can import both STEP and WRL model of your pcb, and place the wrl on top of the STEP model, to have a visual feedback of traces too.

Can you export the WRL from FreeCAD to another 3D format? I tried to export the WRL to STEP and did not have any success.

wrl is a completely different file format to step. So much so that you really can not get a valid step file back from it. (There are ways to convert wrl to step but you loose all benefits of step that way. So it really is not worth the effort.)


wrl approximates the surface of a part using a number of triangles. This file format is intended for creating nice renders.

The approximation with triangles means that if you have a cylindrical drill in a block then that drill is no longer a cylindrical hole but a hole with polygonal footprint. (There is no unique way to get back to a cylindrical hole without knowing some additional information not contained in the wrl file.)


Step on the other hand is intended for communication between different MCAD programs. In theory you should not have any downside compared to using the native file format. (Of course you can not easily change step files but all other aspects should behave equal to the native format)

This means you can for example export step in one MCAD program and create manufacturing drawings in another. Or use the imported part in an assembly and set constrains as you would with a native part. All of this relies on a precise representation of all features of the part. (So a cylinder must stay a cylinder)

1 Like

Thanks for the clarification. I did not realize WRL was a mesh format.

If you really want to spend time in including tracks and even silks in STEP model, you can use DXF export from KiCAD and then import DXF technical layers in FC, convert those to Shapes, or even to Surfaces and finally export the result to STEP.

  1. This process is quite CPU intensive & time consuming.
  2. The result STEP file could be from 3 to more than 10 times bigger in file size.

2 Likes

sooo no upcoming support in stepup? :stuck_out_tongue:

That looks pretty cool :slight_smile: Thanks for the tip!

implemented here: