How to share step 3D model with all the components on the PCB too?


#21

Hi @mangelozzi
there are no simple primitive shapes in the libraries I’ve done…
It is quite easy do i.e. a cube in FC, even more simpler with a script to assign it dimensions and export to STEP and VRML… but why are you looking for that?
If you are worried about a fully populated MCAD board, you may consider to configure kicad StepUp tools to create a STEP board and parts applying bounding boxes to i.e. small volume parts (that will calculate the bounding box of your STEP model automatically) or just export board and i.e. connectors or even a more brutal approach: put only STEP models of the desired parts (i.e. connectors) in the wrl folder, then you will get only pcb and those STEP in your conversion

Here an example of a board with small volume parts discarded, bounding boxes on internal parts, and connector as real STEP models

Maurice


#22

@kammutierspule, ProE (or Pro Engineer) has been around for years and one of the industry’s main CAD packages. It’s now called Creo (but uses the same file types as ProE).

Also, just to clarify the questions earlier up:
the modelling is done in ProE - I’ve designed the mechanical chassis, mounting points, etc, in Pro/E. Whilst there is rendering in Pro/E, I don’t use it.

Rendering (as you see in the screenshot above) is done in a separate package called Keyshot. Very easy to use and produces some unbelievably realistic renders given the right source material and some patience tweaking. I recently updated my licence to use the latest version and it’s very quick - I probably spent 15-20 minutes creating that render from the exported model in Pro/E.

@maui: thanks, I’ll try the options some time soon and report how I get on. :slight_smile:


#23

Hi @xavierw would it be possible to share the kicad project with WRML models? So I can test it in new 3d-viewer render? … Your render is good but I am still not very happy with your results… :grin: looks a bit too artificial / “plastic”.

Btw, how long does it take to render your image?

Thks!


#24

One thing I have done in experimenting with FreeCAD and the scripts to convert to VRML: FreeCAD is not very efficient in saving STEP models. They’re often unecessarily huge in file size (and I think produce large VRML files too).
I often use FreeCAD and the Macro tools to arrange the geometric properties and positioning of the shape so it lines up with the PCB footprint and holes. Then save it as a STEP file, then open the STEP file in Creo and save as a STEP again. Often, the reduction in file size is huge!
Then re-open the new STEP file in FreeCAD and use the VRML export tools.

Another point to note: sometimes, I haven’t bothered trying to create a “real” VRML file if the sole purpose is for CAD export: I have cheated / bypassed the proper VRML file and as long as you have the corresponding STEP file name, the export tools will create a CAD model you can use. Of course, doing it this way means the KiCAD 3D viewer isn’t of much use, but if the primary purpose is to generate a MCAD file you can use in another 3D package, then it doesn’t matter :slight_smile:

For example, I used KiCAD’s built-in MLCC cap VRML models, but used a “nicer” looking STEP model (downloaded from 3dcadcentral). The transformers you see in the background I created directly in Creo and exported as a STEP so KiCAD export tools work.

@kammutierspule, I’ll have to see how I can package it up, it’s a bit complicated with path configurations, etc.

Rendering the image depends on resolution and lighting parameters. The HD resolutions above probably took a few minutes on my i5-3570K PC slightly overclocked.


#25

It makes sense, it is something of the external world of kicad.

If it is possible (easier?) as you describe, could you send me just the VRML exported by StepUp from that STEP you said that you assembled?


#26

FreeCAD is adding tessellation properties to STEP as in AP214-AP242 new specifications
http://www.ap242.org/geometry-assembly-pmi-interoperability
`- polylines (points, curves,…) , already use in STEP AP214

  • or tessellated , new in AP242 `
    anyway, as you pointed out, re-opening and saving it in a different CAD will remove tessellated info, reducing heavily the file size

[quote=“xavierw, post:24, topic:2542”]
Then save it as a STEP file, then open the STEP file in Creo and save as a STEP again. Often, the reduction in file size is huge![/quote]

[quote=“xavierw, post:24, topic:2542”]
(and I think produce large VRML files too).[/quote]
for that reason I updated the VRML export tool in kicad StepUp, the VRML model exported is up to 10-20 times reduced and the format is much more compatible (i.e. it is possible to load it in Blender) and can be easily manipulated for adding Material Properties

[quote=“xavierw, post:24, topic:2542”]
For example, I used KiCAD’s built-in MLCC cap VRML models, but used a “nicer” looking STEP model (downloaded from 3dcadcentral).[/quote]
please be careful that 3dcontentcentral has a very restrictive license
http://www.3dcontentcentral.com/Terms-of-use.aspx
You may use Data for internal computer-aided design use only. You may not (i) distribute Data as part of any service, (ii) copy or post any Data on any Internet site without permission of the owner of the Data, (iii) broadcast Data via any media, or (iv) use the Data in a manner that is competitive with the 3D ContentCentral service.
they are very nice and useful for personal use in MCAD designing, but having a kicad MCAD repository would be the best IMO, particularly if you need to share your MCAD model to third parties or in case i.e. an Open Source Hardware OSH design

Maurice


#27

That may be possible to request author permission to use their models in a new repository…


#28

you need to ask the author of every single model (in same case that will include manufacturers) the authorization… good luck :wink:


#29

Nice models! That is great!

I required a SOT-23 and TO-252-2, but found them in the /demo/shapes folder! Yay! I see they are shown in some of your posts but not in the github folder?


#30

Am I correct in saying KiCAD Step does not perform the same scale, rotation, and offset as specified in the kicad file? A lot of my components where the 1x1x1mm box with custom scaling, which now appears in step up as a 1x1x1mm box. Do I have to make a scaled box for each step up component instead of using the same 1x1x1mm box file?


#31

I haven’t finished the libraries… it is a BIG challenge for just me and @Joan_Sparky :slight_smile:
I’m still hoping it will be an official repo for 3D MCAD models, so there would be more people working on that…


#32

as in the kicad StepUp starter guide
https://sourceforge.net/projects/kicadstepup/files/kicadStepUp-starter-Guide.pdf/download
Note: the macro takes care of 2D footprint rotation of kicad it does take care of vrml model z rotation, it doesn’t take care of x and y 3d model rotation it doesn’t take care of x, y, z 3d model translation this behavior is intentional…
this is also what is applied to the new module and 3D libraries in kicad
(at (xyz 0 0 0)) (scale (xyz 1 1 1)) (rotate (xyz 0 0 0))

[quote=“mangelozzi, post:30, topic:2542”]
Do I have to make a scaled box for each step up component instead of using the same 1x1x1mm box file?[/quote]
yes, you need to have a STEP model of the right size to have a right assembly
the scale is always assumed 1:1 because it is a mechanical design
As I told you you may consider to use bounding box option that will substitute a bbox to your STEP model


#33

Got Step up working with your great library pack on github. Thank you so much. I am sure it will become the official KiCAD MCAD Library. I want to learn FreeCAD, and would be happy to help make libraries, like maybe the diodes.

Here’s a pic of what I got:

But I noticed if I open KiCAD VRML model the PCB looks very beautiful:

I understand maui said…

So I am guessing it is not possible to combine the KiCAD VRML PCB model with the step up components?
… I tried with FreeCAD anyway and got no-where.


#34

Humm this is my first time someone converted the board before seeing it in kicad itself… you have done the more difficult part, then you need to adjust something…
my libraries have already the VRML models coming from STEP models… have you copied them beside STEP models? is your VRML path fine for kicad?
is that image the 3d-viewer internal rendering or the export of VRML from kicad?
in that case have you correctly selected the option to export?

kicad StepUp will give you exactly the same render (pcb + parts, no silk, layers) in kicad pcbnew 3d-viewer and in MCAD sw but you have to read at least one time the guide! :wink:


you are not doing your homework :smiling_imp:

[quote=“mangelozzi, post:33, topic:2542”]
I want to learn FreeCAD, and would be happy to help make libraries, like maybe the diodes.[/quote]
have a look here



#35

Well you are doing a great job of making the libraries.

I see in kicadStepUp-starter-Guide.pdf and in many of links you have posted these pics:

I can not find them here:


I read the “readme.mh”, many links show these but how do you get them?

Kind Regards


#36
  1. first of all you need to adjust your VRML rendering for kicad…
  2. after that you can learn how to create models using my scripted tools
    https://github.com/easyw/kicad-3d-models-in-freecad/tree/master/cadquery/FCAD_script_generator
    but before you need to adjust your VRML rendering for kicad…

still waiting for a reply


#37

Thank you for the info. I dont know how to use FreeCAD yet, And maybe I am slower and not as smart as the other people who have used your great script. I have read many of your posts, but many are all rather similar which state what to do, but not how to do it. I also read the document linked about why MCAD, and I have tried the demo. I have been mainly trying to follow:
kicadStepUp-starter-Guide.pdf because it is the official documentation.
I started at the beginning and am working my way through the document.

This is what I did…

On Page 7, under:

’8. How To (using kicad StepUp the best way)

  1. just copy the STEP 3d models in the same folder in which there are your wrl 3d models"

As a newbie I think what step up 3D models? Isnt that what I am trying to make? I didnt understand step up combines existing models, I am still not sure I do. That’s why I had to ask here. I think it would help greatly to new people if you added a link in the document where to get the models, and that KiCAD step up combines other step up models are a combination of other step up models?

I downloaded these models from:


And placed them in:
C:\Program Files\KiCad\packages3d_MCAD
and
C:\Program Files\KiCad\share\kicad\modules\packages3d

'2. export the STEP models, scaled 1/2.54 to wrl with the same name of the STEP model (e.g. r_0603.wrl # r_0603.step); in this way your 3D board in kicad pcbnew 3d-viewer and in FreeCAD workbench will look perfectly aligned

Confused, I already downloaded the models? Is this for models that aren’t in the library…? Must I open each .VRML and convert it to step with FreeCAD? Since I have the library models I proceeded to step 3…

'3. open in FreeCAD the Macro kicad-StepUp-tools.FCMacro

So I copied kicad-StepUp-tools.FCMacro into my Kicad project folder.
I opened it and saw a green play triangle to run the script… I think that is right…

and edit the config file

ksu-config.ini (which is autogenerate at first running of the macro) with e.g. notepad
changing your model prefix to your KISYS3DMOD path

It is created every time I run kicad-StepUp-tools.FCMacro.
I set in “C:\Users\Me\ksu-config.ini”:
[prefix3D]
prefix3d_1 = c:\program files\kicad\share\kicad\modules\packages3d
In another tutorial I read because the instruction was unclear to me. Is this the KISYS3DMOD path?

'4. clik on the button to open your kicad pcbnew board file

Okay I think this means in FreeCAD, click “load kicad Board with IDF *.emn”. First I had to figure out one must export the .emn file from kicad. Okay.

'5. watch the script assembling your 3D board with 3D models :slight_smile:

Yes It did, that is great. That is the result I got above. Both pics are from within FreeCAD. The first pic was the Step up render, the second pic was me opening KiCADs VRML file.

I am surprised you tell me I do it in a different order to everyone else. As you can see above I was just trying to follow the document.


#38

it is written STEP models, not step up 3D models … STEP models are 3D files with .STEP extension

You don’t need to export IDF (for learn how to kicad has all the info in its manual), it is possible to open directly the kicad_pcb board in the kicad StepUp tools

I think you need a reset in what you did…

  1. have you copied .STEP and .WRL 3D models from the libraries in the same path?
  2. would you mind to share your kicad board? or just a minor version of that (also as PM if you prefer) I would need to see which path you have inserted for your models

[quote=“mangelozzi, post:37, topic:2542”]
Both pics are from within FreeCAD. the second pic was me opening KiCADs VRML file.[/quote]
Now I see … your VRML export is not fine…
but you see correctly your 3d-viewer in kicad isn’t it?
have you correctly selected the option to export? (2nd time)

M


#39

I have been trying to figure out where to set the export options, is it kicad or FreeCAD? I have not seen that screen before.

https://hackaday.io/project/7926-kicad-stepup-script-hacks-mcad-world doesnt mention export options (have not had time to watch the videos there, just read the text because I was replying here), and neither does the kicadStepUp-starter-Guide.pdf. I have also watched a few youtube tutorials. This makes me think I am missing a big piece of the puzzle. What should I be reading? Sorry I have not because I dont know how to.


#40

this is kicad pcbnew basic interface…
Menu

  • File Export
  • VRML
    I cannot include the kicad manual in StepUp guide…
    Can you confirm that in pcbnew 3d-rendering you see the 3D parts correctly?