kicad StepUp: ECAD MCAD bidirectional collaboration

Show off your FreeCAD projects here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
drmacro
Veteran
Posts: 8864
Joined: Sun Mar 02, 2014 4:35 pm

Re: kicad StepUp: ECAD MCAD bidirectional collaboration

Post by drmacro »

Not sure this thread is the right place for this question...

When I installed kicad stepup it apparently populated the 3D Prefix for KISYS3DMOD. (I don't remember setting it...)

- did it indeed get this automagically when I got the WB from AddOnManager?

I found I was missing some part models when loading a PCB and had to set the ALT3DMOD to my local packages3d directory.

I have a variable in KiCAD preferences that points to my local models...but, it was created long before I knew of the stepup workbench.

- If the KISYS3DMOD variable was imported automagically, is it possible to have all KiCAD paths imported?
- is ALT3DMOD a KiCAD standard that I don't know of...and I should update my world accordingly?
- if I'd had a KiCAD variable named ALT3DMOD would it have happened automagically?

This is mostly just my musings...not suggesting bugs or new functionality.

OS: Ubuntu 19.04 (XFCE/ubuntustudio)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Python version: 3.7.3
Qt version: 5.12.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
User avatar
easyw-fc
Veteran
Posts: 3629
Joined: Thu Jul 09, 2015 9:34 am

Re: kicad StepUp: ECAD MCAD bidirectional collaboration

Post by easyw-fc »

drmacro wrote: Wed Jan 08, 2020 4:24 pm When I installed kicad stepup it apparently populated the 3D Prefix for KISYS3DMOD. (I don't remember setting it...)

- did it indeed get this automagically when I got the WB from AddOnManager?
StepUp simply writes the default 3D paths as the ones defined by KiCAD on different OSes.
drmacro wrote: Wed Jan 08, 2020 4:24 pm - If the KISYS3DMOD variable was imported automagically, is it possible to have all KiCAD paths imported?
Only two paths are user configurable in StepUp
drmacro wrote: Wed Jan 08, 2020 4:24 pm - is ALT3DMOD a KiCAD standard that I don't know of...and I should update my world accordingly?
No, it is just a short name for Alternate 3DMod folder
drmacro
Veteran
Posts: 8864
Joined: Sun Mar 02, 2014 4:35 pm

Re: kicad StepUp: ECAD MCAD bidirectional collaboration

Post by drmacro »

easyw-fc wrote: Wed Jan 08, 2020 9:05 pm
drmacro wrote: Wed Jan 08, 2020 4:24 pm - is ALT3DMOD a KiCAD standard that I don't know of...and I should update my world accordingly?
No, it is just a short name for Alternate 3DMod folder
Ok, I just wondered if it was some informal standard in the KiCAD world that I'd never found. 8-)

Thanks
Star Trek II: The Wrath of Khan: Spock: "...His pattern indicates two-dimensional thinking."
MrKenSan
Posts: 1
Joined: Tue Jun 23, 2020 4:54 am

Re: kicad StepUp: ECAD MCAD bidirectional collaboration

Post by MrKenSan »

Hello Folks, and especially @easy-fc!

I am working on a humanitarian project which required moving a number of hobby module PCBs from KiCad into STEP, so we could then use them as "components". As I started the process, I was tickled by the functionality of the system. As I dug in a little deeper I realized there was some space for a few improvements. My background is electrical engineering and embedded systems. I've used other ECAD-MCAD interchange, and was always left a little short in one way or another.

In this case, there were some clear places where the tool as it stands could benefit from some extra enhancement. In the end, we were able to rejigger the PCB import to provide some new and nice enhancements to make the resulting boards more realistic. We also fixed a couple bugs in the process.

Unfortunately, we don't have time to properly go through the process of formulating change lists for each of the fixes and submitting them to github, but we think these enhancements would be appealing to the larger audience who uses this tool. All of our energy right now is focused on our humanitarian project related to COVID patient relief.

So the question for this forum is if there is someone out there would would be willing to take a tarball of the changes (to about 6ish files) and formulate the diffs into change lists for the project so these enhancements could be included?

Much of the work we did was to the Tracks subsystem (it's a lot shorter now). We added 3D traces which are configured in the preferences based on the "oz copper weight" (just like a real PCB). We added a number of pad finishes (ENIG, HASL, raw copper, etc...) We modularized color setting, and added colors which resemble actual PCBs (taken from photos). We fixed round pads not rendering properly, and now Vias make holes in the PCB, as one would expect. Components are placed on top of the copper instead of flush with the FR4. We cleaned up the Preferences, and added a bunch of configuration which was not there. The result expands the ways a board can be imported.

Those the the high points. It was about a week's worth of work understanding the code and making the changes.

When there is time again, we hope to render the traces on a board "By Net", meaning one could select a particular object representing an actual netlist and have it as its own object. This is very handy when checking and validating boards (and finding problems). We even thought about rendering "inner layers" of a multi-layer board. The goal being to create the most realistic possible PCBA.

So, if there is someone out there interested in this and would like to do the work to integrate this into the main project, we would be happy to send along a tarball of the work we did.

Best Regards,

ken
User avatar
easyw-fc
Veteran
Posts: 3629
Joined: Thu Jul 09, 2015 9:34 am

Re: kicad StepUp: ECAD MCAD bidirectional collaboration

Post by easyw-fc »

MrKenSan wrote: Tue Jun 23, 2020 5:20 am Hello Folks, and especially @easy-fc!
...
So, if there is someone out there interested in this and would like to do the work to integrate this into the main project, we would be happy to send along a tarball of the work we did.
Hi ken,
don't you have a github or gitlab repository?
You can send me the tarball to have a look at... just PM me with a link to the download file (you can use i.e. https://send.firefox.com/ no need to register)
pkoning2
Posts: 17
Joined: Sun Jan 12, 2014 6:37 pm

Re: kicad StepUp: ECAD MCAD bidirectional collaboration

Post by pkoning2 »

This looks like a great tool. I've been tinkering a bit with the "export STEP" feature in the current KiCAD, but this is much more convenient.
One nit, though: KiCAD for some reason likes WRL format 3d models, and it seems that the current StepUp doesn't handle those. That's a bit odd given that FreeCAD can import those. Could this be added?
pkoning2
Posts: 17
Joined: Sun Jan 12, 2014 6:37 pm

Re: kicad StepUp: ECAD MCAD bidirectional collaboration

Post by pkoning2 »

How/where do I report issues? I've seen a couple.
I tried to import silkscreen layers. That fails because the legacy importer Python file is broken. It would be nice to import silkscreens directly from the board file.
Another: I tried to import tracks. That seems to complete the import, and it starts to display things, but then FreeCAD crashes. This is the 0.19 release on Mac OS.
Could StepUp read the library pointers out of the board file? I had trouble with system 3d model references until I discovered it's a StepUp preferences setting, and the library paths in the board file are not used.
pkoning2
Posts: 17
Joined: Sun Jan 12, 2014 6:37 pm

Re: kicad StepUp: ECAD MCAD bidirectional collaboration

Post by pkoning2 »

More: I got silkscreen import to work once I removed an old (Python 2) copy of the dxf library. But the resulting silkscreen is the wrong size and in the wrong location.
I set the board origin in KiCAD since StepUp told me so. The result is that now the board appears at 0,0,0 as expected. But the tracks do not. I can't tell where because FreeCAD still crashes, but it plots the tracks (or some of them anyway) before it does, and they are not in the right spot. Before I set board origin they did match.
What does it mean when StepUp pops up a message (warning?) saying "Multi-part objects found"?
User avatar
easyw-fc
Veteran
Posts: 3629
Joined: Thu Jul 09, 2015 9:34 am

Re: kicad StepUp: ECAD MCAD bidirectional collaboration

Post by easyw-fc »

pkoning2 wrote: Mon Jun 28, 2021 3:03 pm One nit, though: KiCAD for some reason likes WRL format 3d models, and it seems that the current StepUp doesn't handle those. That's a bit odd given that FreeCAD can import those. Could this be added?
Hi @pkoning2
1) wrl models are not for mechanical purposes... StepUp simply builds a 3D copy of the kicad board, adding 3d step models having the same file name of the wrl counterparts... this is due to the history of kicad that didn't handle step format
Please have a look at this FAQ at kicad info forum
what-is-the-difference-between-step-and-wrl-3d-models

I tried to import silkscreen layers. That fails because the legacy importer Python file is broken. It would be nice to import silkscreens directly from the board file.
2) that is not trivial, importing from a DXF file is instead quite straight to implement.

More: I got silkscreen import to work once I removed an old (Python 2) copy of the dxf library. But the resulting silkscreen is the wrong size and in the wrong location.
I set the board origin in KiCAD since StepUp told me so. The result is that now the board appears at 0,0,0 as expected. But the tracks do not.
3) it is because you forgot to read the manual...
https://github.com/easyw/kicadStepUpMod ... -sheet.pdf
When you export the dxf you need to export it in millimiters not in inches.

What does it mean when StepUp pops up a message (warning?) saying "Multi-part objects found"?
4) That means one or more of your 3d models are not a single shape, but are a composition of multiple 3d objects
pkoning2
Posts: 17
Joined: Sun Jan 12, 2014 6:37 pm

Re: kicad StepUp: ECAD MCAD bidirectional collaboration

Post by pkoning2 »

Thanks, that helps a lot. I now get a clean model and the silk screen is the way it should be. Nice!

Does the "multi-part" object indicate a problem, or is it just information? Some of my models indeed are done that way, for example a connector with 40 pins. It seems sensible so they can separately have material assigned to them.

Any idea about the crash?
Post Reply