STEP Export/Import colors override (?)

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
andr.syn
Posts: 7
Joined: Thu Sep 09, 2021 8:01 pm

STEP Export/Import colors override (?)

Post by andr.syn »

Hello, everyone!
Does anyone notice that colors in STEP models exported from FreeCAD are wrong?
I mean the case when you open them in a different program (if you import those STEPs back in FreeCAD colors would be the same).
But opened with another program, colors do not just look differently at the screen, they have different RGB values.

This problem began from FreeCAD version 0.19, and version 0.20 still has it.
Wile using version 0.18 I did not see such a problem.

I use STEP models made in FreeCAD for my Altium Designer projects.
Here is a simple example of how it looks.
In attached picture Cubes_FreeCAD.png you can see 3 cubes as they look on the FreeCAD screen.

The RGB values for each cube are as follows:
Grey: 128, 128, 128.
Orange: 210, 120, 20.
Blue: 0, 50, 160.

Then I export all 3 cubes into STEP file and open it in Altium Designer (add them on the PCB surface).

In attached picture Cubes_AD.png you can see 2 rows of cubes. Upper one is this STEP file from FreeCAD. In the bottom row are 3 cubes made in Altium Designer directly with the same RGB values.

As you can see the colors in upper row (FreeCAD) and bottom row (AD) are altogether different.
STEP models from FreeCAD look much lighter (brighter).

In the beginning I thought that colors in STEP just got lighter (multiplied by some coefficient) keeping same relations between RGB values. But it turned out that relations are also changed. So the colors become completely different.

And similar color transformation occurs in reverse, when I import (open) in FreeCAD a STEP model exported from Altium Designer.
But in this case colors in FreeCAD, in opposite, become darker than they were in AD, RGB values are lower, and the relations between them are changed.

I do not mean "Appearance" or how they look at the screen, I mean the change of main color (which should not be changed, in my opinion). In Appearance settings this color is called "Diffuse". And that is the same color which is accessible for setting values through model parameters panel: View / Object Style / Shape Color.

Again, with FreeCAD v.0.18 I did not have such problem. STEP models from FreeCAD (opened in AD) had exactly the same colors as objects made in AD with the same RGB components values.

As I understand in import/export process there is a color override mechanism. What is it for?

I am a pretty weak user of FreeCAD, so I apologize ahead if it is not the issue of the CAD but of myself.
But if it is an issue, I am quite surprised that no one else spoke about it before.

Thanks,
Andrey
Attachments
Cubes_FreeCAD.png
Cubes_FreeCAD.png (26.71 KiB) Viewed 3910 times
Cubes_AD.png
Cubes_AD.png (31.42 KiB) Viewed 3910 times
Last edited by andr.syn on Tue Oct 12, 2021 11:07 pm, edited 4 times in total.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: STEP Export/Import colors override (?)

Post by GeneFC »

Your google drive requires a login. NG

It is greatly preferred to post the images directly here. Use the Attachments tab below the edit window.

Gene
andr.syn
Posts: 7
Joined: Thu Sep 09, 2021 8:01 pm

Re: STEP Export/Import colors override (?)

Post by andr.syn »

Hallo Gene,
Thank you for the support. I made some changes in this message.

Andrey
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: STEP Export/Import colors override (?)

Post by easyw-fc »

andr.syn wrote: Thu Sep 09, 2021 11:02 pm Then I export all 3 cubes into STEP file and open it in Altium Designer (add them on the PCB surface).
would you please post:
1) original FC file
2) STEP file exported by FC 0.19
3) STEP file exported by FC 0.18
That would help in checking your issue
(you can attach them to your reply at the forum)
andr.syn
Posts: 7
Joined: Thu Sep 09, 2021 8:01 pm

Re: STEP Export/Import colors override (?)

Post by andr.syn »

Hello easyw-fc,

Currently I am using a portable version (the latest one) FreeCAD_0.20.25645_Win-LPv12.5.4_vc17.x-x86-64
So I can send only original FC v.0.20 and STEP exported from FC v.0.20.
No other version of FreeCAD is installed in my computer now.

I can find a couple of files for another model (not these cubes) made earlier in FC 0.18.
Let me know if it is necessary.

I liked everything what became better in FC 0.19 in compare to FC 0.18 but the colors issue is a real problem for me.

Andrey
Attachments
Cubes_(export from FC v.0.20).step
(49.89 KiB) Downloaded 56 times
Cubes.FCStd
(6.71 KiB) Downloaded 57 times
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: STEP Export/Import colors override (?)

Post by easyw-fc »

andr.syn wrote: Fri Sep 10, 2021 4:50 pm Hello easyw-fc,

Currently I am using a portable version (the latest one) FreeCAD_0.20.25645_Win-LPv12.5.4_vc17.x-x86-64
Try to download a portable version of FC0.18, open your Cubes file and export it as FC0.18
https://github.com/FreeCAD/FreeCAD/releases
i.e.: https://github.com/FreeCAD/FreeCAD/rele ... ortable.7z

I liked everything what became better in FC 0.19 in compare to FC 0.18 but the colors issue is a real problem for me.
Andrey
STEP files are text files, so you can open them with a text editor and check inside 'COLOUR_RGB' to see the colors assigned to the cubes and compare if there are differences.
If so we should check if the way colors are assigned when exporting is changed from 0.18 to 0.19 and 0.20
EDIT: checking the two step files coming from FC0.18 and FC0.20 in CAD Assistant from OCC I can confirm the issue
https://www.opencascade.com/products/cad-assistant/
cube-colors-comparing.png
cube-colors-comparing.png (190.41 KiB) Viewed 3811 times
EDIT2:
and the same importing the two generated STEP files in FC 0.20
Attachments
cube-colors-comparing-in-FC.png
cube-colors-comparing-in-FC.png (273.54 KiB) Viewed 3804 times
andr.syn
Posts: 7
Joined: Thu Sep 09, 2021 8:01 pm

Re: STEP Export/Import colors override (?)

Post by andr.syn »

Well, thank you. And what to do next?

Andrey
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: STEP Export/Import colors override (?)

Post by easyw-fc »

andr.syn wrote: Fri Sep 10, 2021 6:12 pm Well, thank you. And what to do next?
we need to investigate with more 3d models (i.e. a single cube, a cube in a Part and a nested Part in Part) and check what happens with color...
We would also need a main developer to peek in to see if STEP format has changed recently...
andr.syn
Posts: 7
Joined: Thu Sep 09, 2021 8:01 pm

Re: STEP Export/Import colors override (?)

Post by andr.syn »

Should I open a new task in tracker?
User avatar
easyw-fc
Veteran
Posts: 3633
Joined: Thu Jul 09, 2015 9:34 am

Re: STEP Export/Import colors override (?)

Post by easyw-fc »

andr.syn wrote: Fri Sep 10, 2021 9:55 pm Should I open a new task in tracker?
I think so... please include sample files and full FC info
Post Reply