OpenGL canvas Update

The new 3D library has started with a firm purpose:
adopt only precise mechanical models for gaining the ability to make an ECAD MCAD collaboration/designing.
kicad-packages3D README
If you search at the forum or in internet, you will see that:

  1. the previous wrl models were not uniformed built
  2. there is no way to convert a wrl to a mechanical useful model

Then the decision to switch to a new and improved version of the 3D library has been done at the right moment and with a minimum inconvenience, compared to what has been gained.

Moreover WRL models, if derived by a mechanical counterpart, can add a nicer 3D rendering and a better raytracing result.

That is why we have both models in the new libraries.

4 Likes

Thanks—it looks like the only thing to do is to roll up the sleeves and get to the task!

As my previous (v4) project had some torroidal inductors which are not in the V5 library, I have already gone ahead and created one model:


which I can modify to be entirely parametric and driven by a “design table”, generating any number of dimensional variants.
If anybody can supply a reference for the dimensions of the torroidal coils missing from v5, this can be at least one of my contributions…

2 Likes

That must be a massive model. The choice is always eye candy beauty vs file size and rendering speed.
I have managed to reliably crash SolidWorks when the KiCad STEP export gets too complex, so I had to ask my ME to simplify some models.

Are there any published guidelines that creators should strive for with regards to the STEP files?

you can reach the main guidelines at:

This is strange… I don’t use the internal step exporter, but I generate very big assemblies with StepUp and I never had issue reported…
Have you a PC with enough resources? Big assemblies may be resource eating…
Or may be you have some (geometry) errors on your models that will push errors into the assembly…
Here you may find some useful tips:

SolidWorks segfaulted, so I never found the error.
The PC has 32GB ram, so plenty there.
The offending parts that had to be simplified were circular military connectors with the thread fully modeled.
I think that they were drawn in house, so maybe not right.

:rofl:

Thread for screws are a source for issues also for FreeCAD, particularly when exporting the model to STEP…
They had dedicated a full Wiki though
https://freecadweb.org/wiki/Thread_for_Screw_Tutorial

I like the concentric circles trick.
I wonder what @von_Whimhurst did with the toroidal choke, dragging this thread back on course.

I am not sure what you’re asking when you say, “did with the torroidal choke” but if that is a segue from the discussion of “threads” , perhaps you are thinking that the “coil” in the model is a helix.
For the sake of simplification, it isn’t a helix (which would use more resources for rebuilding etc).
The entire model consists of only 3 operations:

  1. a circular profile, swept around a rectangular loop with rounded corners (this produces something that looks like a single wire wrap)
  2. a rounded rectangular profile, revolved around a central axis (this forms the torroidal core)
  3. A circular repeated pattern of the wire loop (choose the number of loops you want…depending on the level of realism desired).

What I had in mind were some suggestions, or limits, on the individual file size. This would help to answer the question of when the ‘simplification’ of CAD models is really necessary.

I also have these observations:

  1. I created models in Solidworks that are fully coloured but when exported as STEP files and viewed in KiCad footprints, the colours are gone (they are displayed only in grey-scale).
  2. In the new (“v5” or Nightly) Footprint Libraries, every footprint that I have viewed so far has an associated 3d file (inspectable via the Properties dialogue-box). Now…although all the discussion we’ve seen in this topic’s Thread would seem to indicate that v5 is now heavily tied to using STEP files, all of the Footprints I’ve viewed in the new library are associated with *.wrl files (not their equivalent STEP files). What am I missing here?

If you read the
Preferred method to create 3D models
you should be fine. Particularly avoid text on models to limit file size.

About file size, have a look at something similar in the repo and check if your model has a similar weight…

About STEP colors, you missed to read the preferred method above…

This is a bit of a legacy thing. in reality kicad replaces the file ending if you switch it to step.

The official lib still requires a wrl model in addition to the step model. (wrl is for the marketing guy who wants nice pictures, step is for the engineer who needs a valid model usable in any MCAD tool)

The wrl model must be scaled correctly and should have good colors assigned. The best way to achieve correct models is by using kicad-stepup (a freecad extension) to create the models.

So in that case export your model to step from solid works, import that step file into freecad and create the step/wrl pair for kicad.

Rene–thanks for the reply. I am not sure what you mean by “switch it to step”. Do you mean that there is a setting somewhere to toggle the default 3d between *.wrl and *.step?

This still doesn’t explain why, when I view the Footprint with the 3d viewer, it does NOT render the associated *.wrl image.

In the past the kicad viewer could be switched to use step models. I can not find this switch anymore in the current nightly builds. So it seems the step model will only be used for exporting the board.


As explained above, kicad does not support any wrl model. export it by using freecad stepup and it should work.

OK, now you’ve really lost me:

  1. First of all, I am told it is impossible to convert a *.wrl to *.step, and here you seem to indicate that FreeCad StepUp should be used to perform that function
  1. while here, you seem to suggest that the *.step file has no function within KiCad (and yet, once it is correctly associated, it does appear in the KiCad 3d Viewer)

I think you are implying here that the *.step exporting functions of my $10k worth of Solidworks software pale in comparison to $0 FreeCad with the StepUp add-in? I am not insulted, but that stings me in the wallet!

If this is the case, Would it not be sensible to run some sort of batch-process to disassociate the *.wrl files from their footprints throughout the Libraries that are in the current (nightly) distribution, and switch the association to the corresponding *.step files?

It is possible to go from step to wrl but not the other way round (step includes information that is not included in wrl. This information can not be recreated uniquely from the wrl file.)

i should have been clearer. with “kicad does not support any wrl model” i meant that not all wrl options are supported.
wrl is a quite varied file format. only a subset of it is supported by kicad. The best guarantee is to use the freecad extension kicad-stepup. (This tool includes its own wrl generator that is tailored for what kicad supports.) But there are for sure other ways to achieve the same.

Only if you assign a step file in the footprint. I was under the (wrong) impression that if no wrl file is found kicad automatically checks for a step file with the same name. (sadly that algorithm is only used for the step export.)

2 Likes

So do you think the same for $0 KiCad? :thinking::stuck_out_tongue_winking_eye: