← Back to team overview

kicad-developers team mailing list archive

Re: Export to Solidworks

 

Hi  Saumell,

sorry for lacking in documentation, but the script is just new... I'm going to add it, but just refer to README.txt as a base

Kicad 3d rendering is based on VRML engine and exporting VRML 3D artwork of board and models was the way to exchange 3D data with other CADs and the standard modeler is Wings3D, which cannot export the model in STEP. Unfortunately, there is no way (as per my knowledge) to convert VRML models to 3D solid models, without having generated a bunch of triangles.

The procedure that I used to give MCAD people something enough usable was:
- export board and models from kicad to VRML
- scale and convert it to collada (dae) format with Meshlab
- open collada in FreeCAD and create shape from mesh
- export part to STEP
but the result was a solid, but quite big in byte dimensions, with a lot of faces and not really suitable for MCAD environment, but good enough to have the the size of your board and modules in MCAD.

When I discovered that the recent version of Kicad and FreeCAD where compatible I developed the script... When I say compatible I mean that kicad can read and display correctly any VRML 3D model exported from FreeCAD

So now you will have the two words with the same appearance; one can design in kicad EDA and transfer the artwork to MCAD (FreeCAD) smoothly
WYSIWYG :)

to have the script ready to go you need to have a library with STEP models and VRML models located at the usual kicad path.

You can find a lot of STEP models at 3dcontentcentral or RScomponents site... the license, it seems to me, allows the user to download these models for MCAD purposes, but they stated that you cannot make an online repo. Many of these models also are multipart and they cannot always correctly fused by freecad
So these models are not suitable to be used in kicad repos.

for that reason I would like to have a kicad repo with freecad models...
FreeCAD can create parametric MCAD models to be fully aligned to the component datasheet, and can be fully scripted to generate components
and it is open source :)

Please let me know if you model some components in FreeCAD and if you like to share these with kicad's people...

here there is an example of model done in FreeCAD at the official repo
https://github.com/KiCad/kicad-library/blob/master/modules/packages3d/Displays_7-Segment.3dshapes/Cx56-12.fcstd

exported to vrml
https://github.com/KiCad/kicad-library/blob/master/modules/packages3d/Displays_7-Segment.3dshapes/Cx56-12.wrl

and ready to go for the script
https://github.com/easyw/kicad-3d-models-in-freecad/raw/master/misc/Cx56-12.step

thank you
Maurice


On 05/08/2015 21.29, Jose A. Saumell wrote:
Hi Maurice, Cirilo and everyone,

Thanks for the advise.

I was able to run the demo with FreeCAD script, as was shown in youtube
video.

What I have now is a complete 3D model of my own board I can view on PCBnew
3D viewer. That looks fine and uses WRL models for each individual
component ( Usually downloaded and modified with FreeCAD and later Wings3D
for WRL.
I've generated an .emn file and run the macro, it gave me an error when it
could not find step files for components.

So, if I understand correctly, I would need two formats for each component,
WRL for kicad 3D viewer and step for the StepUp FreeCAD Macro, correct?.
Apparently going from VRML to STEP is not recommended so I should create
components in STEP format from FreeCAD.

Regarding documentation, I can tell you what my experience has been. I've
followed instructions to get a complete 3D model I could view with PCBnew,
assuming I was going to be able to export that to Solidworks somehow. For
kicad users maybe would be good to know STEP procedure before generating
all WRL models, or generating both at the same time.

It is the first time in my career that I attempt to generate a 3D model of
a PCB and interface with MCAD engineers this way.It is pretty exciting and
should save a lot of time in meetings.

Thanks!






On Wed, Aug 5, 2015 at 5:31 AM easyw <easyw@xxxxxxxxxxxx> wrote:

Hi Saumell,

When you need to give your 3d artwork to MCAD people you have to use
step as interchange format.
Any other format would not be accepted.
Before the kicad stepup script the only way I know to export the pcb
with models was to export vrml and then convert it to step; but any
model converted from vrml would be very un-optimal and not very useful
for mechanical design (I learned the hard way)... the conversion, using
whatever sw you find, will generate a bunch of triangles.

as Cirilo suggested, please have a try with kicad-stepup script:
http://bazaar.launchpad.net/~easyw/kicad-stepup/trunk/files
http://sourceforge.net/projects/kicadstepup/
I'm going to write an howto to be included in kicad doc.
At the moment the README.txt file gives you a small explanation.
@youtube you can see also a small howto video
https://www.youtube.com/watch?v=Ukd47VXYzQU
I've also added the option to move the board and modules to a base
point, and the bounding boxes option (to export all or selected modules
to bbox)

At the moment the kicad library lacks of STEP modules...
I've suggested to add to the 3D repository at least models generated
from FreeCAD
https://github.com/KiCad/kicad-library/issues/186
FreeCAD could be used as second source to model 3D object to kicad, side
by side with wings3d.
Moreover FreeCAD can create parametric model, with real dimensions as
per the physical objects.

Anyway, if you need just a rapid solution, you can get 3d models at
http://3dcontentcentral.com/
the only requirement for the script to work is to have the single models
as a single fused object
you can find some tips to align and use the modules here:

https://forum.kicad.info/t/kicad-stepup-new-exporter-for-3d-mcad-feedbacks-are-welcome/1048

To test the script in real world, I used hackrf-one board and I
generated all 3d vrml modules to be used in kicad, directly from step
modules downloaded from the manufacturers or from 3dcontent central
library.
All the modules converted from FreeCAD to wrl has been used in kicad
3d-viewer without any issue.
The STEP generated model has been tested in Solid Works and it is fine
without any geometry problem.

Could you please give me a feed back of your test, so to improve the
script usability for kicad users?

thank you
Maurice

On 05/08/2015 00.17, Cirilo Bernardo wrote:
There are a number of options:

1. Recently Maurice wrote a script which uses FreeCAD to create a
STEP modelusing the bare board IDF file and other data in the
.kicad_pcb file:

http://bazaar.launchpad.net/~easyw/kicad-stepup/trunk/files

No doubt there are still some issues but this is currently the best
method for exporting a detailed mechanical model.

2. IDF: If you do nothing and simply opt to export the board then
you only get a bare board - this step is necessary anyway if you
use Maurice's script to create a STEP model. If you wish for a more
detailed IDF model you will need to spend some time creating the
associated component outline files.  The official IDF documentation
is here:

https://github.com/ciampix/kicad-doc/tree/master/src/IDF_Exporter

but if you can't generate the documentation and want a PDF version
the original (more inaccurate) version is here:

https://drive.google.com/open?id=0By_XTJN-s8aXbkM5UTE0Zm5SN28

Now for Solidworks to process an IDF file you need CircuitWorks which
is only provided with "Solidworks Premium" - bummer. Fortunately you
can now convert IDF to IGES (which any MCAD can understand) using
the 'idf2igs' tool in the IGES library which is in development:

https://github.com/cbernardo/libIGES

There are also online tools to help such as:
https://www.ecad.io

That site provides all the functionality of CircuitWorks - you can
substitute real models for the simplistic IDF outlines. However, if the
simple IDF outlines are fine for your mechanical work then the
libIGES tool is a completely free solution.

Expect more MCAD exchange features in the future, though the wait
may be a little long due to limited resources. My libIGES already has
the capability to create models of the bare PCB and to add other
existing IGES models to the mechanical assembly and I plan to add
an IGES export to KiCad some time after the pending stable release.
Unfortunately I also need to do some major work on the KiCad code
base before I add this code so it could be another 6 months or more
before you see that feature in KiCad. There have also been discussions
on adding a STEP export facility using the OpenCascade libraries,
but this is also dependent on those code changes which I need to
make to KiCad. So for now, Maurice's scripts are really the best
option for creating a detailed mechanical model.

- Cirilo


On Wed, Aug 5, 2015 at 7:21 AM, Jose A. Saumell <saumell.jose@xxxxxxxxx
<mailto:saumell.jose@xxxxxxxxx>> wrote:

     Hello group,

     I have been trying to export a 3D model of a populated PCB to
     Solidworks and after a few days I want to ask you for help.

     I've generated VRML files for each component and did an export in
     VRML which I can open and see in FreeCAD correctly.

     I need to interface with Mechanical Engineer that has their own
     Solidworks model for the enclosure. He has been able to open the
     populated PCB on Freecad as well. (To achieve this I had to use a
     text editor and modify all the url entries on WRL file with an
     absolute path on his system containing shapes3D folder, at least
     freecad does not seem to work with relative path)

     What he was able to achieve so far is opening the empty PCB in
     solidworks and load each individual component and placing manually
     on the board.

     Is there any other way or tips you can provide? I've read about IDF
     and I may go that route with the next design if it means easier
     interfacing with Solidworks.

     Thanks

     _______________________________________________
     Mailing list: https://launchpad.net/~kicad-developers
     Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
     Unsubscribe : https://launchpad.net/~kicad-developers
     More help   : https://help.launchpad.net/ListHelp




_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp





References