MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0031809Community[OCCT] OCCT:Visualizationpublic2020-09-30 20:192020-10-13 09:34
Reportera3an 
Assigned Toa3an 
PrioritynormalSeverityminor 
StatusfeedbackResolutionunable to reproduce 
PlatformOSFedora Linux 32OS Versionkernel 5.8.10
Product Version[OCCT] 7.4.0 
Target VersionFixed in Version 
Summary0031809: Regression v.6.9.1-7.4.0: colors no longer showing on certain STEP files
DescriptionOpening the 3D view of a layout that worked fine in KiCad version v5.0.2 shows a one of the models in grey only on KiCad v.5.1.6. This specific model (attached) was created by and downloaded from SnapEDA. All the other components (from the KiCad 3D library) are having no issues at all as far as I can see.
The issue was initially reported here:
https://gitlab.com/kicad/code/kicad/-/issues/5163 [^]
Turns out that FreeCAD (versions 0.19-16540 and 0.18-16110 AppImages) has the same problem with this file, so turning to OpenCascade now.
Steps To Reproduce
pload XDE OCAF VISUALIZATION
ReadStep D SnapEDA-ABXS002A3X41-SRZ-3DModel-STEP-56544.step
#XShow D; vsetdispmode 1
XDisplay -dispMode 1 D
vfit
vviewparams -scale 36 -proj 0.5 0.8 0.3 -up -0.4 0.5 -0.8 -at 0.7 3.1 0.3


Always the same issue after opening the layout file in KiCad's 3D viewer.
Also checked the 3D preview in the footprint editor (Footprint Properties -> 3D Settings), and there the model is grey-colored too.
I've already reset the Viewer settings (Preferences -> Reset to Default Settings), to no avail.
TagsNo tags attached.
Test case number
Attached Files? file icon SnapEDA-ABXS002A3X41-SRZ-3DModel-STEP-56544.step (483,878 bytes) 2020-09-30 20:19
png file icon KiCad-screenshot1.png (259,203 bytes) 2020-09-30 20:22
png file icon KiCad-screenshot2.png (92,968 bytes) 2020-09-30 20:22
png file icon KiCad-screenshot3.png (280,527 bytes) 2020-09-30 20:23
png file icon FreeCAD-screenshot4.png (111,072 bytes) 2020-09-30 20:23
png file icon plate700_OK.png (9,028 bytes) 2020-09-30 20:31
png file icon plate710_KO.png (7,821 bytes) 2020-09-30 20:32
png file icon plate730_KO.png (7,821 bytes) 2020-09-30 20:32
png file icon plate740_OK.png (9,028 bytes) 2020-09-30 20:32
png file icon plate_cadass.png (76,179 bytes) 2020-09-30 20:33
png file icon plate_cadass_lin.png (92,227 bytes) 2020-09-30 20:47
png file icon draw_fedora32_step.png (87,496 bytes) 2020-10-12 19:51

- Relationships

-  Notes
(0095507)
kgv (developer)
2020-09-30 20:39
edited on: 2020-09-30 20:39

I'm unable reproducing the issue using OCCT viewer - colors present in OCCT 7.4.0+ in Draw Harness (XCAFPrs_AISObject presentation)
and in CAD Assistant (see attached screenshots), although OCCT versions 7.1.0-7.3.0 (but not OCCT 7.0.0) lose some colors:

pload XDE OCAF VISUALIZATION
ReadStep D SnapEDA-ABXS002A3X41-SRZ-3DModel-STEP-56544.step
vclear
vinit View1
XDisplay -dispMode 1 D
vfit


(0095512)
a3an (reporter)
2020-10-01 00:18

Anything I can do here to better pinpoint this issue?
I don't think the OpenCascade packages for Fedora come with any executable/viewer, just libraries?
(0095530)
kgv (developer)
2020-10-01 15:35
edited on: 2020-10-01 16:27

Could you please point out which release of Fedora you are using and how you have installed Open CASCADE Technology there (regardless of AppImage for FreeCAD, which I suppose is shipped with it's own version of OCCT)?

I'm not very familiar with RPM-based distros...

(0095553)
a3an (reporter)
2020-10-02 10:41

Running the latest Fedora F32 here.

These are the OpenCascade packages installed on my fairly basic workstation:
opencascade-foundation.x86_64 7.4.0-3.fc32 @fedora
opencascade-modeling.x86_64 7.4.0-3.fc32 @fedora
opencascade-ocaf.x86_64 7.4.0-3.fc32 @fedora
opencascade-visualization.x86_64 7.4.0-3.fc32 @fedora

KiCad version:
kicad.x86_64 1:5.1.6-1.fc32 @updates
kicad-doc.noarch 1:5.1.6-1.fc32 @updates
kicad-packages3d.noarch 1:5.1.6-1.fc32 @updates

FreeCAD version:
freecad.x86_64 1:0.18.4-10.fc32 @updates
freecad-data.noarch 1:0.18.4-10.fc32 @updates

These versions of KiCad and FreeCAD both have the same issue with this specific STEP file: all colors lost.

In addition, I just checked the latest FreeCAD AppImages, downloaded from here:
https://wiki.freecadweb.org/AppImage [^]
FreeCAD_0.18-16146-Linux-Conda_Py3Qt5_glibc2.12-x86_64.AppImage
FreeCAD_0.19-22522-Linux-Conda_glibc2.12-x86_64.AppImage

I assume they come with their own stand-alone OpenCascade libs included. Same issue in FreeCAD AppImage v.18, but _all_colors_there_ in v.19!

Clicking Help -> About FreeCAD -> Libraries shows:
FreeCAD AppImage v.18: Open CASCADE Technology 7.3.0
FreeCAD AppImage v.19: Open CASCADE Technology 7.4.0

Maybe it's not in the OpenCascade lib itself but in the way it's used/called by these programs?
(0095559)
kgv (developer)
2020-10-02 11:14
edited on: 2020-10-02 11:15

> I assume they come with their own stand-alone OpenCascade libs included.
> Same issue in FreeCAD AppImage v.18, but _all_colors_there_ in v.19!
> - FreeCAD AppImage v.18: Open CASCADE Technology 7.3.0
> - FreeCAD AppImage v.19: Open CASCADE Technology 7.4.0
As you can see on attached screenshots plate730_KO.png and plate740_OK.png - there was indeed some issue corrected in OCCT 7.4.0 release affecting colors.
So that newer FreeCAD based on OCCT 7.4.0 seems to be affected by this fix (or has their own bug-fix)...

But what does FreeCAD is not necessary the same as KiCad.
STEP files might define colors in different ways, so that propagating these colors might be tricky and error-prone.
If KiCad uses it's own way for dispatching colors from STEP file, this code might contain a bug.

(0095560)
kgv (developer)
2020-10-02 11:15

> These are the OpenCascade packages installed on my fairly basic workstation:
> opencascade-foundation.x86_64 7.4.0-3.fc32 @fedora
I cannot find any "opencascade" packages in Software Manager in Fedora - do I need adding some additional repositories?
(0095562)
a3an (reporter)
2020-10-02 11:31

> I cannot find any "opencascade" packages in Software Manager in Fedora -
> do I need adding some additional repositories?

The easiest is to install FreeCAD and KiCad from the command line:
  dnf install freecad*
  dnf install kicad*
All dependencies including OpenCascade will be selected for installation as well.
(0095564)
a3an (reporter)
2020-10-02 11:45

>> I assume they come with their own stand-alone OpenCascade libs included.
>> Same issue in FreeCAD AppImage v.18, but _all_colors_there_ in v.19!
>> - FreeCAD AppImage v.18: Open CASCADE Technology 7.3.0
>> - FreeCAD AppImage v.19: Open CASCADE Technology 7.4.0
> As you can see on attached screenshots plate730_KO.png and plate740_OK.png -
> there was indeed some issue corrected in OCCT 7.4.0 release affecting colors.
> So that newer FreeCAD based on OCCT 7.4.0 seems to be affected by this fix (or has their own bug-fix)...

I haven't seen here what's shown in plate730_KO.png: it's all gray in FreeCAD ImageApp v.0.18 (7.3.0) and fully colored in ImageApp v.0.19 (7.4.0).
In the FreeCAD 0.18 that comes with F32 and uses the shared libraries (7.4.0) everything is gray, just like in KiCad using these shared libs.

Let me check if I can install the KiCad nightly on this system to see what happens.
(0095568)
a3an (reporter)
2020-10-02 12:02

> Let me check if I can install the KiCad nightly on this system to see what happens.

Just checked the latest KiCad nightly version:
x86_64 100:r20392-12a30c43.fc32 @copr:copr.fedorainfracloud.org:group_kicad:kicad
Same issue: this specific step component all gray
(0095571)
kgv (developer)
2020-10-02 12:34

> In the FreeCAD 0.18 that comes with F32 and uses the shared libraries (7.4.0) everything is gray, just like in KiCad using these shared libs.

In that case, I suppose, that FreeCAD team has fixed some bug in their code.
(0095886)
a3an (reporter)
2020-10-12 14:37

Going back to the KiCad people with this one...
(0095904)
kgv (developer)
2020-10-12 20:00
edited on: 2020-10-12 21:35

Installed Draw Harness in Fedora 32:
sudo dnf install opencascade-draw
sudo dnf install opencascade-devel 
dnf info opencascade-draw


As Draw Harness package is broken in Fedora, reconstruct minimal environment for loading plugins and start DRAWEXE:
export CSF_OCCTResourcePath=/usr/share/opencascade/resources
export DRAWHOME="${CSF_OCCTResourcePath}/DrawResources"
export CSF_DrawPluginDefaults=${DRAWHOME}
DRAWEXE


Execute Tcl script in Draw:
pload XDE OCAF VISUALIZATION
ReadStep D $::env(HOME)/Downloads/SnapEDA-ABXS002A3X41-SRZ-3DModel-STEP-56544.step
vinit View1
XDisplay -dispMode 1 D
vfit
vviewparams -scale 36 -proj 0.5 0.8 0.3 -up -0.4 0.5 -0.8 -at 0.7 3.1 0.3
dver


STEP file is opened colored - so either KiCad has error in logic, or it uses some OCCT function affected by problem, but not used by XDisplay (I don't know if such function exists). So it would be useful to find out the code responsible for reading STEP / taking colors in KiCad.

It is weird that OCCT on Fedora is built without FreeImage (necessary for image loading/saving), but with TBB (optional)....
Draw[1]> Draw[2]> dver
Open CASCADE Technology 7.4.0.beta
TBB enabled (HAVE_TBB)
FreeImage disabled
FFmpeg disabled
OpenGL: desktop
RapidJSON disabled
VTK enabled (HAVE_VTK)
Exceptions enabled
Compiler: GCC 10.0.1
Architecture: AMD64
OS: Linux


(0095914)
abv (manager)
2020-10-13 09:34

I also remark that it is a beta version!

- Issue History
Date Modified Username Field Change
2020-09-30 20:19 a3an New Issue
2020-09-30 20:19 a3an Assigned To => kgv
2020-09-30 20:19 a3an File Added: SnapEDA-ABXS002A3X41-SRZ-3DModel-STEP-56544.step
2020-09-30 20:22 a3an File Added: KiCad-screenshot1.png
2020-09-30 20:22 a3an File Added: KiCad-screenshot2.png
2020-09-30 20:23 a3an File Added: KiCad-screenshot3.png
2020-09-30 20:23 a3an File Added: FreeCAD-screenshot4.png
2020-09-30 20:31 kgv File Added: plate700_OK.png
2020-09-30 20:32 kgv File Added: plate710_KO.png
2020-09-30 20:32 kgv File Added: plate730_KO.png
2020-09-30 20:32 kgv File Added: plate740_OK.png
2020-09-30 20:33 kgv File Added: plate_cadass.png
2020-09-30 20:34 kgv Steps to Reproduce Updated View Revisions
2020-09-30 20:39 kgv Note Added: 0095507
2020-09-30 20:39 kgv Assigned To kgv => a3an
2020-09-30 20:39 kgv Status new => feedback
2020-09-30 20:39 kgv Note Edited: 0095507 View Revisions
2020-09-30 20:47 kgv File Added: plate_cadass_lin.png
2020-09-30 20:56 kgv Resolution open => unable to reproduce
2020-10-01 00:18 a3an Note Added: 0095512
2020-10-01 15:35 kgv Note Added: 0095530
2020-10-01 16:27 kgv Note Edited: 0095530 View Revisions
2020-10-01 16:27 kgv Note Edited: 0095530 View Revisions
2020-10-02 10:41 a3an Note Added: 0095553
2020-10-02 11:14 kgv Note Added: 0095559
2020-10-02 11:15 kgv Note Added: 0095560
2020-10-02 11:15 kgv Note Edited: 0095559 View Revisions
2020-10-02 11:31 a3an Note Added: 0095562
2020-10-02 11:45 a3an Note Added: 0095564
2020-10-02 12:02 a3an Note Added: 0095568
2020-10-02 12:34 kgv Note Added: 0095571
2020-10-02 12:36 kgv Relationship added related to 0030856
2020-10-12 14:37 a3an Note Added: 0095886
2020-10-12 19:51 kgv File Added: draw_fedora32_step.png
2020-10-12 20:00 kgv Note Added: 0095904
2020-10-12 21:35 kgv Note Edited: 0095904 View Revisions
2020-10-13 09:34 abv Note Added: 0095914


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker