Importing Step with Colors

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!
NoTrees
Posts: 19
Joined: Sun Oct 22, 2017 8:34 pm
Location: Upper St Clair, PA

Re: Importing Step with Colors

Post by NoTrees »

OS: Windows 10 Version 2009
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24276 (Git)
Build type: Release
Branch: releases/FreeCAD-0-19
Hash: a88db11e0a908f6e38f92bfc5187b13ebe470438
Python version: 3.8.6+
Qt version: 5.15.1
Coin version: 4.0.1
OCC version: 7.5.0
Locale: English/United States (en_US)

Just some additional anecdotal information pertaining to importing / opening STEP files. I use FreeCAD to view automation components, and get their STEP files. When opening a STEP0214 file, it immediately appear in its colors, then immediately turns to grey. This has happened on multiple attempts, different object files (all STEP0214).

After loading a Part WB, I went to Preferences and saw that in Import/Export, there are additional tabs for various file formats. When opening a file, I selected the STEP0214 version in <Filetype> and it displayed correctly with its intended colors.

The anomaly I noticed is when opening/importing, the colors appear very briefly, then go to gray. When the Part WB is loaded, the intended colors remain.
chrisb
Veteran
Posts: 53919
Joined: Tue Mar 17, 2015 9:14 am

Re: Importing Step with Colors

Post by chrisb »

Please retry with a current version. I have created a Step file from FreeCAD with differently colored faces. When I import it the colors persist. Tested in Draft and PartDesign workbench.
I have left the preferences at their default settings.

I attach the file, in case it is not the import, but rather the export.

OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.20.24825 (Git)
Build type: Release
Branch: master
Hash: ccc4151b3020969450325466e385850783795325
Python version: 3.9.2
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.1
Locale: C/Default (C)
Attachments
colored.step
(37.9 KiB) Downloaded 54 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
grijo
Posts: 75
Joined: Tue Jul 09, 2019 5:05 am

Re: Importing Step with Colors

Post by grijo »

I have also color problems with step import/export.

OS: Windows 10 Version 2009
Word size of FreeCAD: 64-bit
Version: 0.20.26155 (Git)
Build type: Release
Branch: master
Hash: 0926a4148bcff11249fd4f56bc30256102ffe105
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: German/Germany (de_DE)


When i do a doubleclick of the attached color step test file i get an import with colored faces.
When i do a PART-FILE-IMPORT step i get a part without color faces.

And even with the "doubleclick import" part i lose the color information when i do a step export.

What can i try to get colored step models when i do import/export step file?

Image


EDIT: With 0.18 i can import and export colored 3D models without any problem.

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

Re: Importing Step with Colors

Post by easyw-fc »

hi,
I have no issue both in opening or importing the 'colored.step' file from @crisb

Code: Select all

App.newDocument("Unnamed")
Gui.activeDocument().activeView().viewDefaultOrientation()
### End command Std_New
### Begin command Std_Import
import ImportGui
ImportGui.insert(u"c:/Temp/colored.step","Unnamed")
### End command Std_Import
I remember that once I had some issue on step colors because of a messed up configuration file/folder (due to many different FC versions installed)
If you backup your configuration and then delete it, you may solve your issue.

Remember to check the STEP import/export setting after the resetting of the config.
P.S. I also suggest you to uncheck the option to export curve in parametric because it increases a lot the step file size with useless data
grijo
Posts: 75
Joined: Tue Jul 09, 2019 5:05 am

Re: Importing Step with Colors

Post by grijo »

With version 0.18 i was able to download and to start an installation program.

With version 0.20 i find only a zip file, which i extracted. There was no installation necessary.
Could this cause the problem because FC 0.20 is not installed, i just start the FREECAD.EXE
User avatar
easyw-fc
Veteran
Posts: 3629
Joined: Thu Jul 09, 2015 9:34 am

Re: Importing Step with Colors

Post by easyw-fc »

grijo wrote: Mon Nov 29, 2021 10:19 am With version 0.18 i was able to download and to start an installation program.

With version 0.20 i find only a zip file, which i extracted. There was no installation necessary.
Could this cause the problem because FC 0.20 is not installed, i just start the FREECAD.EXE
it shouldn't be an issue...
https://wiki.freecadweb.org/Start_up_and_Configuration
-
fc-config.png
fc-config.png (252.15 KiB) Viewed 1897 times
grijo
Posts: 75
Joined: Tue Jul 09, 2019 5:05 am

Re: Importing Step with Colors

Post by grijo »

What i tried today:

I deinstalled FC 0.18.
I deleted FC 0.20 directory
I downloaded and unzipped FC 0.2. again


I did then an additional test with the colored.fcstd file you have provided.

When i doubleklick on the file and FC is starting, i get the body with colors. ( left side in pic )
When i open FC and i import the step file, or even if i drag and drop it to a running FC window, the body is completly grey. ( right side in pic )

Image


EDIT:

A friend who is working with FC, too, did the test for me to doublecheck.

He has the same behaviour like me, doubleclick is starting the sTEP file with displayed color.
Import or drag&drap is showing the body without color.
User avatar
easyw-fc
Veteran
Posts: 3629
Joined: Thu Jul 09, 2015 9:34 am

Re: Importing Step with Colors

Post by easyw-fc »

UserAppData Path where FreeCAD stores User Related application data.

if you digit in a command prompt:

Code: Select all

%APPDATA%\FreeCAD
it should be in:

Code: Select all

C:\Documents and Settings\YOURUSERNAME\AppData\FreeCAD
1) you should copy the actual FreeCAD User Related Application Data to a backup place (folder)
2) delete the actual FreeCAD User Related Application Data folder
3) launch FC0.20, check the STEP Import/Export settings in FC Gui
4) import the file
grijo
Posts: 75
Joined: Tue Jul 09, 2019 5:05 am

Re: Importing Step with Colors

Post by grijo »

My path is:
c:\users\xxxx\AppData\Roaming\FreeCad

I deleted the ...Roaming/Freecad directory, then i started Freecad.
The Freecad directory was created by FC with 2 subdirectories ( Macro and webdatapersistant, and a user.cfg )
Then i checked the STEP settings and tried to open the step file.

Same behaviour, no colors.

Joachim
grijo
Posts: 75
Joined: Tue Jul 09, 2019 5:05 am

Re: Importing Step with Colors

Post by grijo »

Today i downloaded the last win-conda version from weekly builds download site.

OS: Windows 10 (10.0)
Word size of FreeCAD: 64-bit
Version: 0.20.26683 (Git)
Build type: Release
Python version: 3.8.12
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: German/Germany (de_DE)

Before is installed this verison i deleted all "old" freecad versions and cleaned the registry manually.

Now the step export and import looks fine, i get the colors ex- and imported with the step file.

Joachim
Post Reply