OpenGL canvas Update


#41

I admit, I don’t know what might be going on at the fine-scale with the KiCad programming and why there are two different libraries (v4 and v5) now.
I can readily understand that v5 can directly use *.step files, whereas v4 can only use *.wrl files.
The *.step files are of course preferable for many reasons.
But the v5 packages3d directory contains both *.step and *.wrl files ----the presence of the *.wrl doesn’t cause the program to implode.

So the obvious question is: Why not simply merge the old and new libraries into one? In that way, you’d have only one Path regardless of what version of KiCad was initially used to produce the Project, and those projects could find their *.wrl files whenever they required them.

I put this question to the Forum as a sort of “straw man”, because

  • it’s likely there is a good reason why these were not merged from the start; and,
  • the answer to the question might give useful insights into the internal workings of V5 versus V4

#42

Just to clear something up:
Kicad version 5 can still handle the files of the old version.

The library team however decided to raise the quality standards for models included in the new library.

The switch to version 5 just has been a good time to implement that. (The fact that kicad now officially supports step made the decision a lot easier. As the old wrongly scaled models are not compatible with that feature in mind.)


#43

Rather than relegating the old, “low-quality” items to the dustbin, my view on this would’ve been to keep them but “tag” them (i.e., put them in a publicly available list) so that the community could peck away at the list and update the library with new models…But that’s just an opinion, based on the observation that the decision is poised to create repeated problems for everyone editing old v4 KiCad files in v5.


#44

The problem is that these models are scaled wrong. The footprints would need a scaling factor for such models. This would result in the footprint lib having different scaling factors depending if an old model was used or a new one.
If then later a correct model is submitted we would need to update the footprints in the lib. (Resulting in problems for users)
It also means that for these footprints users can not add personal step models if they find them for example on the manufacturer page.

It is just not worth investing our scares resources into getting wrl only models up to scratch. (meaning scaling the models themselves such that they can at least be used with the footprints.)


#45

Clearly, this was not an easy decision and either way it fell, there would be problems.
As I am curious about this problem and trying to be helpful, I did a Google search regarding the scaling of VMRL files and discovered this link, which suggests that the improperly scaled *.wrl files could be batch-processed to bring them into conformity with the v5 system:


#46

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.


#47

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…


#48

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.


#49

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


#50

you can reach the main guidelines at:


#51

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:


#52

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.


#53

: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


#54

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


#55

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).

#56

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?

#57

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…


#58

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.


#59

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.


#60

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.