Scaling problem between STEP and WRL

Today may be my first succesful creation of a 3D model for KiCad.
I created a simple box in FreeCAD and exported both STEP (in metric) and WRL (no export options). In KiCad these look quite different. The step model has the expected size, while the WRL is far to big. Apparently WRL uses it’s own banana units where each unit is 2.54mm, but as it’s the same model exported from FreeCAD, I expected this to be handled automatically.

A short check strongly suggests that a scaling factor of 1/2.54 = 0.39 works for forcing some decency into the WRL banana. Does anyone know a decent way to handle this? Is it FreeCAD export, or KiCad import?

And the whole test project:
2023-08-20_3d_incuctor.zip (30.9 KB)

(I’m guessing that the continuing failure of some country to finally fully adopt metric continues to waste Millions of engineering hours world wide each year.)

I tried to change it manually, but no luck.
The best way is to use KiCadStepUp add-on in FreeCAD and export it via Export 3D Model button / option as shown below (a black IC icon with blue cube and green arrow):
image

1 Like

.

Is it FreeCAD export, or KiCad import?

it is K importing

I confirm that FreeCAD correctly Exports and Imports sizes.
Screenshot shows three Cubes, as follows:
Bottom = the Padded Part/Body
Top = exported WRL of Padded Part/Body
Middle = exported STEP of Padded Part/Body

They are all 1 inch cubes.

Kicad Footprint’s use of the STEP is correct.
Kicad Footprint’s use of the WRL is Not Correct.

In looking into this, I compared a couple of Stock Kicad Model files and see that those I checked are Already scaled ‘Down’.
If loading a users WRL, it gets the scale by Kicad’s method of dealing with WRL’s. STEP’s get the Scale it was exported with by FreeCAD (1:1).

So, looks like Kicad is doing the WRL tweaks before packaging their WRL’s (or, it has some coding to determine what to do with WRL…).

Images show FreeCAD’s import of Stock model (WRL) and STEP at scale=1.
Naturally, user can set the Scale to 0.03937 (1/25.4)

Here’s the STEP and WRL (exported by FreeCAD that gets Kicad’s upscaling)…

And, here’s a link to older discussion on topic…

So, after reading BobC’s comment in that 2017 thread it all depends on the size of your banana.

As I wrote in my opening post, a scale factor of 0.39 seemed to get it pretty close in KiCad.

Also had a look at wikipeda, and it does not mention a unit size for that file format.

And there is no chance in hell that I’m even going to spend a dime for the file standard.

Instead, I’d rather consider sending them a bill for wasting my time.

< Sigh >

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.