FreeCAD: Unable to import STEP files

  • Done
  • quality assurance status badge
Details
2 participants
  • Guillaume Le Vaillant
  • Jacob Hrbek
Owner
unassigned
Submitted by
Jacob Hrbek
Severity
normal
J
J
Jacob Hrbek wrote on 15 Feb 2022 15:56
(address . bug-guix@gnu.org)
e171f40a-85a6-0d58-97f0-5010b0036fc0@rixotstudio.cz
Importing zipped STEP file: 15:50:27 Traceback (most recent call last):

File "<string>", line 1, in <module>

File
"/gnu/store/aps2s0h5l3a9w30qrsygpc0prhrmp5ap-python-shiboken-2-5.15.2/lib/python3.9/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py",
line 142, in _import

return original_import(name, *args, **kwargs)

File
"/gnu/store/ixxbw9l65pdaa99xijmn8hwycvsshgv2-freecad-0.19.2/Mod/Arch/importSH3D.py",
line 27, in <module>

import
os,zipfile,xml.sax,FreeCAD,Part,Draft,Arch,Mesh,tempfile,math,Sketcher

File
"/gnu/store/aps2s0h5l3a9w30qrsygpc0prhrmp5ap-python-shiboken-2-5.15.2/lib/python3.9/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py",
line 142, in _import

return original_import(name, *args, **kwargs)

File
"/gnu/store/ixxbw9l65pdaa99xijmn8hwycvsshgv2-freecad-0.19.2/Mod/Arch/Arch.py",
line 51, in <module>

from ArchWindow import *

File
"/gnu/store/aps2s0h5l3a9w30qrsygpc0prhrmp5ap-python-shiboken-2-5.15.2/l
ib/python3.9/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py",
line 142, in _import

return original_import(name, *args, **kwargs)

File
"/gnu/store/ixxbw9l65pdaa99xijmn8hwycvsshgv2-freecad-0.19.2/Mod/Arch/ArchWindow.py",
line 30, in <module>

from PySide import QtCore, QtGui, QtSvg

File
"/gnu/store/aps2s0h5l3a9w30qrsygpc0prhrmp5ap-python-shiboken-2-5.15.2/lib/python3.9/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py",
line 142, in _import

return original_import(name, *args, **kwargs)

File
"/gnu/store/ixxbw9l65pdaa99xijmn8hwycvsshgv2-freecad-0.19.2/Ext/PySide/QtSvg.py",
line 1, in <module>

from PySide2.QtSvg import *

File
"/gnu/store/aps2s0h5l3a9w30qrsygpc0prhrmp5ap-python-shiboken-2-5.15.2/lib/python3.9/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py",
line 142, in _import

return original_import(name, *args, **kwargs)

<class 'ModuleNotFoundError'>: No module named 'PySide2.QtSvg'

Importi
ng extracted STEP file: 15:53:40 Traceback (most recent call last):

File "<string>", line 1, in <module>

File
"/gnu/store/aps2s0h5l3a9w30qrsygpc0prhrmp5ap-python-shiboken-2-5.15.2/lib/python3.9/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py",
line 142, in _import

return original_import(name, *args, **kwargs)

<class 'ImportError'>:
/gnu/store/ixxbw9l65pdaa99xijmn8hwycvsshgv2-freecad-0.19.2/lib/Import.so:
undefined symbol:
_ZN3tbb6detail2r122cancel_group_executionERNS0_2d118task_group_contextE

Steps to reproduce: 1. Get the CAD/VORON2_v2.4_Assembly.step.zip from
https://github.com/VoronDesign/Voron-2and try to import it to FreeCAD
ran using `guix shell freecad -- FreeCAD` 2. Get the
CAD/VORON2_v2.4_Assembly.step.zip from
https://github.com/VoronDesign/Voron-2,extract it so that you have the
unzipped STEP file and try to import it to FreeCAD ran using `guix shell
freecad -- FreeCAD` Expect failure above for both cases Expected: Just

work(TM) Hypothesis: Probably mising some runtime library, tried to use
`guix shell qtsvg python-pyside-2 freecad -- FreeCAD` without success

--
Jacob Hrbek, In support of ukraine sovereignty #supportUkraine
Attachment: file
Attachment: signature.asc
G
G
Guillaume Le Vaillant wrote on 16 Feb 2022 09:55
(name . Jacob Hrbek)(address . kreyren@rixotstudio.cz)(address . 54011@debbugs.gnu.org)
87tucztc3n.fsf@kitej
Jacob Hrbek <kreyren@rixotstudio.cz> skribis:

Toggle quote (17 lines)
> [[PGP Signed Part:No public key for ADD37D14AB42FCA9 created at 2022-02-15T15:56:38+0100 using EDDSA]]
> Importing zipped STEP file: 15:50:27 Traceback (most recent call last):
>
> [...]
>
> from PySide2.QtSvg import *
>
> File
> "/gnu/store/aps2s0h5l3a9w30qrsygpc0prhrmp5ap-python-shiboken-2-5.15.2/lib/python3.9/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py",
> line 142, in _import
>
> return original_import(name, *args, **kwargs)
>
> <class 'ModuleNotFoundError'>: No module named 'PySide2.QtSvg'
>
> [...]

There is an issue with the python-pyside-2 package. It fails to activate
support for the Qt components that are not in the qtbase package (like
qtxmlpatterns, qtmultimedia, qtsvg, etc):

Toggle snippet (25 lines)
...
-- essential module Qt5Core found (). Looked in: /gnu/store/v8yw01fvwdm95jvqa82sylw6qznmh2mi-qtbase-5.15.2/lib/cmake/Qt5Core
-- essential module Qt5Gui found (). Looked in: /gnu/store/v8yw01fvwdm95jvqa82sylw6qznmh2mi-qtbase-5.15.2/lib/cmake/Qt5Gui
-- essential module Qt5Widgets found (). Looked in: /gnu/store/v8yw01fvwdm95jvqa82sylw6qznmh2mi-qtbase-5.15.2/lib/cmake/Qt5Widgets
-- essential module Qt5PrintSupport found (). Looked in: /gnu/store/v8yw01fvwdm95jvqa82sylw6qznmh2mi-qtbase-5.15.2/lib/cmake/Qt5PrintSupport
-- essential module Qt5Sql found (). Looked in: /gnu/store/v8yw01fvwdm95jvqa82sylw6qznmh2mi-qtbase-5.15.2/lib/cmake/Qt5Sql
-- essential module Qt5Network found (). Looked in: /gnu/store/v8yw01fvwdm95jvqa82sylw6qznmh2mi-qtbase-5.15.2/lib/cmake/Qt5Network
-- essential module Qt5Test found (). Looked in: /gnu/store/v8yw01fvwdm95jvqa82sylw6qznmh2mi-qtbase-5.15.2/lib/cmake/Qt5Test
-- essential module Qt5Concurrent found (). Looked in: /gnu/store/v8yw01fvwdm95jvqa82sylw6qznmh2mi-qtbase-5.15.2/lib/cmake/Qt5Concurrent
-- skipped module Qt5X11Extras is essential!
We do not guarantee that all tests are working.. Looked in: /gnu/store/3nr3fwrk6bpwrg3s68lrpcj024mpqjvq-qtx11extras-5.15.2/lib/cmake/Qt5X11Extras
-- optional module Qt5Xml found (). Looked in: /gnu/store/v8yw01fvwdm95jvqa82sylw6qznmh2mi-qtbase-5.15.2/lib/cmake/Qt5Xml
-- optional module Qt5XmlPatterns skipped. Looked in: /gnu/store/f96i1vssl11vk483570ki90g56mhpiz1-qtxmlpatterns-5.15.2/lib/cmake/Qt5XmlPatterns
-- optional module Qt5Help skipped. Looked in: /gnu/store/3cpa4lv4gx2nkiyvg4xkcalvvjv6y1vq-qttools-5.15.2/lib/cmake/Qt5Help
-- optional module Qt5Multimedia skipped. Looked in: /gnu/store/dk284553z4sgpd0jivggham4i70z1b65-qtmultimedia-5.15.2/lib/cmake/Qt5Multimedia
-- optional module Qt5MultimediaWidgets skipped. Looked in: /gnu/store/dk284553z4sgpd0jivggham4i70z1b65-qtmultimedia-5.15.2/lib/cmake/Qt5MultimediaWidgets
-- optional module Qt5OpenGL found (). Looked in: /gnu/store/v8yw01fvwdm95jvqa82sylw6qznmh2mi-qtbase-5.15.2/lib/cmake/Qt5OpenGL
-- optional module Qt5OpenGLFunctions found (). Looked in: /gnu/store/v8yw01fvwdm95jvqa82sylw6qznmh2mi-qtbase-5.15.2/lib/cmake/Qt5Gui
-- optional module Qt5Positioning skipped. Looked in: /gnu/store/9f37skxk4yjfqfhv96a74q1yjk3mflbj-qtlocation-5.15.2/lib/cmake/Qt5Positioning
-- optional module Qt5Location skipped. Looked in: /gnu/store/9f37skxk4yjfqfhv96a74q1yjk3mflbj-qtlocation-5.15.2/lib/cmake/Qt5Location
-- optional module Qt5Qml skipped. Looked in: /gnu/store/19bs1fiffjv2p9m0l7qvf7myv5k8yi1g-qtdeclarative-5.15.2/lib/cmake/Qt5Qml
-- optional module Qt5Quick skipped. Looked in: /gnu/store/19bs1fiffjv2p9m0l7qvf7myv5k8yi1g-qtdeclarative-5.15.2/lib/cmake/Qt5Quick
...

If we can get python-pyside-2 to detect Qt modules and their headers
correctly, it should fix FreeCAD automatically.
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCYgy+fA8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j8yNAEAoxfz8Bd9h0MN4SndgzYJdSkB8nnQU5gkrL/2
8e1VC1gA/25ICuoj9wXtWteTbYN0o9lwk3QpMoX1ZdsxHfG+V5m1
=hRxI
-----END PGP SIGNATURE-----

G
G
Guillaume Le Vaillant wrote on 16 Feb 2022 14:45
(name . Jacob Hrbek)(address . kreyren@rixotstudio.cz)(address . 54011@debbugs.gnu.org)
87pmnmudcq.fsf@kitej
Guillaume Le Vaillant <glv@posteo.net> skribis:

Toggle quote (25 lines)
> Jacob Hrbek <kreyren@rixotstudio.cz> skribis:
>
>> [[PGP Signed Part:No public key for ADD37D14AB42FCA9 created at 2022-02-15T15:56:38+0100 using EDDSA]]
>> Importing zipped STEP file: 15:50:27 Traceback (most recent call last):
>>
>> [...]
>>
>> from PySide2.QtSvg import *
>>
>> File
>> "/gnu/store/aps2s0h5l3a9w30qrsygpc0prhrmp5ap-python-shiboken-2-5.15.2/lib/python3.9/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py",
>> line 142, in _import
>>
>> return original_import(name, *args, **kwargs)
>>
>> <class 'ModuleNotFoundError'>: No module named 'PySide2.QtSvg'
>>
>> [...]
>
> There is an issue with the python-pyside-2 package. It fails to activate
> support for the Qt components that are not in the qtbase package (like
> qtxmlpatterns, qtmultimedia, qtsvg, etc):
>
> ...

I pushed a fix for python-pyside-2, but importing the STEP file in
freecad still fails because of other errors.

When importing the zip file:

Toggle snippet (15 lines)
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/gnu/store/pd0pxvnr3qdgcz37p80v6q8p0wk9xyfh-freecad-0.19.3-0.09a05a9/Mod/Arch/importSH3D.py", line 47, in open
read(filename)
File "/gnu/store/pd0pxvnr3qdgcz37p80v6q8p0wk9xyfh-freecad-0.19.3-0.09a05a9/Mod/Arch/importSH3D.py", line 79, in read
homexml = z.read("Home.xml")
File "/gnu/store/mhbnni58w5hvpr304jxc5kws1vrp2l1i-python-3.9.9/lib/python3.9/zipfile.py", line 1463, in read
with self.open(name, "r", pwd) as fp:
File "/gnu/store/mhbnni58w5hvpr304jxc5kws1vrp2l1i-python-3.9.9/lib/python3.9/zipfile.py", line 1502, in open
zinfo = self.getinfo(name)
File "/gnu/store/mhbnni58w5hvpr304jxc5kws1vrp2l1i-python-3.9.9/lib/python3.9/zipfile.py", line 1429, in getinfo
raise KeyError(
<class 'KeyError'>: "There is no item named 'Home.xml' in the archive"

When decompressing the zip file and importing the STEP file:

Toggle snippet (7 lines)
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/gnu/store/cwfgf3xb2vfqckxqv196jz8xpbigxkqj-python-shiboken-2-5.15.2/lib/python3.9/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
return original_import(name, *args, **kwargs)
<class 'ImportError'>: /gnu/store/pd0pxvnr3qdgcz37p80v6q8p0wk9xyfh-freecad-0.19.3-0.09a05a9/lib/Import.so: undefined symbol: _ZN3tbb6detail2r122cancel_group_executionERNS0_2d118task_group_contextE

I guess now we have to find where
'_ZN3tbb6detail2r122cancel_group_executionERNS0_2d118task_group_contextE'
is coming from.
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCYg0B5Q8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j81JwEAo0AraY3mHHGFOU8aP24sJ7oHIRwTMvZwTnYk
FbLreWwA/0heU+/Yo1K2QKTJz5LdXe4ViRgozbmLhi4sK9nWIBmc
=JCoG
-----END PGP SIGNATURE-----

G
G
Guillaume Le Vaillant wrote on 18 Feb 2022 17:00
(name . Jacob Hrbek)(address . kreyren@rixotstudio.cz)(address . 54011-done@debbugs.gnu.org)
871r00noss.fsf@kitej
Guillaume Le Vaillant <glv@posteo.net> skribis:

Toggle quote (12 lines)
> When decompressing the zip file and importing the STEP file:
>
> Traceback (most recent call last):
> File "<string>", line 1, in <module>
> File "/gnu/store/cwfgf3xb2vfqckxqv196jz8xpbigxkqj-python-shiboken-2-5.15.2/lib/python3.9/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
> return original_import(name, *args, **kwargs)
> <class 'ImportError'>: /gnu/store/pd0pxvnr3qdgcz37p80v6q8p0wk9xyfh-freecad-0.19.3-0.09a05a9/lib/Import.so: undefined symbol: _ZN3tbb6detail2r122cancel_group_executionERNS0_2d118task_group_contextE
>
> I guess now we have to find where
> '_ZN3tbb6detail2r122cancel_group_executionERNS0_2d118task_group_contextE'
> is coming from.

It was coming from the fact that the freecad package had the tbb package
as dependency, but it also depends on opencascade-occt which depends on
tbb-2020.
Fix pushed as 27a91b2f57bd0bf7efab77eaeb4b920f162bf8c8.
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCYg/Dsw8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j+cOQD/VlYImUPpvtOyxbV2dJCG3sKW4xu4taD/UVWX
Q3LA05IA/0rI6eEeVWajT2mU6J7jEpNVWwF19tegxj0HqUU0qXKa
=fWml
-----END PGP SIGNATURE-----

Closed
J
J
Jacob Hrbek wrote on 18 Feb 2022 17:07
(name . Guillaume Le Vaillant)(address . glv@posteo.net)(address . 54011-done@debbugs.gnu.org)
b668d13d-faf4-b315-f07f-6ba795543620@rixotstudio.cz
Thanks for working on it!

On 2/18/22 17:00, Guillaume Le Vaillant wrote:
Toggle quote (15 lines)
> Guillaume Le Vaillant <glv@posteo.net> skribis:
>
>> When decompressing the zip file and importing the STEP file:
>>
>> Traceback (most recent call last):
>> File "<string>", line 1, in <module>
>> File "/gnu/store/cwfgf3xb2vfqckxqv196jz8xpbigxkqj-python-shiboken-2-5.15.2/lib/python3.9/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py", line 142, in _import
>> return original_import(name, *args, **kwargs)
>> <class 'ImportError'>: /gnu/store/pd0pxvnr3qdgcz37p80v6q8p0wk9xyfh-freecad-0.19.3-0.09a05a9/lib/Import.so: undefined symbol: _ZN3tbb6detail2r122cancel_group_executionERNS0_2d118task_group_contextE
>>
>> I guess now we have to find where
>> '_ZN3tbb6detail2r122cancel_group_executionERNS0_2d118task_group_contextE'
>> is coming from.
> It was coming from the fact that the freecad package had the tbb package
> as dependency, but it also depends on opencascade-occt whic
h depends on
Toggle quote (3 lines)
> tbb-2020.
> Fix pushed as 27a91b2f57bd0bf7efab77eaeb4b920f162bf8c8.

--
Jacob Hrbek, In support of ukraine sovereignty #supportUkraine
Attachment: signature.asc
Closed
J
J
Jacob Hrbek wrote on 19 Feb 2022 22:55
(name . Guillaume Le Vaillant)(address . glv@posteo.net)(address . 54011-done@debbugs.gnu.org)
35df298a-b8a4-fae8-d712-6695842b2e88@rixotstudio.cz
That patch seems to have broken something in FreeCAD as i have issues
with fonts^ and keybinds:
To reproduce:
a) Run `guix shell freecad -- FreeCAD` and notice that the texts are
missing on the title page
b) Open a new project
1. Part Design workbench
2. Tasks and create a new body
3. Create a sketch
4. In a sketch environment use `R`-key and notice that it no longer
works to make a rectangle
On 2/18/22 17:06, Jacob Hrbek wrote:
Toggle quote (27 lines)
> Thanks for working on it!
>
> On 2/18/22 17:00, Guillaume Le Vaillant wrote:
>> Guillaume Le Vaillant <glv@posteo.net> skribis:
>>
>>> When decompressing the zip file and importing the STEP file:
>>>
>>> Traceback (most recent call last):
>>>    File "<string>", line 1, in <module>
>>>    File
>>> "/gnu/store/cwfgf3xb2vfqckxqv196jz8xpbigxkqj-python-shiboken-2-5.15.2/lib/python3.9/site-packages/shiboken2/files.dir/shibokensupport/__feature__.py",
>>> line 142, in _import
>>>      return original_import(name, *args, **kwargs)
>>> <class 'ImportError'>:
>>> /gnu/store/pd0pxvnr3qdgcz37p80v6q8p0wk9xyfh-freecad-0.19.3-0.09a05a9/lib/Import.so:
>>> undefined symbol:
>>> _ZN3tbb6detail2r122cancel_group_executionERNS0_2d118task_group_contextE
>>>
>>> I guess now we have to find where
>>> '_ZN3tbb6detail2r122cancel_group_executionERNS0_2d118task_group_contextE'
>>>
>>> is coming from.
>> It was coming from the fact that the freecad package had the tbb package
>> as dependency, but it also depends on opencascade-occt which depends on
>> tbb-2020.
>> Fix pushed as 27a91b2f57bd0bf7efab77eaeb4b920f162bf8c8.
>
--
Jacob Hrbek, In support of ukraine sovereignty #supportUkraine
Attachment: file
Attachment: signature.asc
Closed
G
G
Guillaume Le Vaillant wrote on 19 Feb 2022 23:48
(name . Jacob Hrbek)(address . kreyren@rixotstudio.cz)(address . 54011@debbugs.gnu.org)
871qzya1sd.fsf@kitej
Jacob Hrbek <kreyren@rixotstudio.cz> skribis:

Toggle quote (13 lines)
> That patch seems to have broken something in FreeCAD as i have issues with fonts^ and keybinds:
>
> To reproduce:
> a) Run `guix shell freecad -- FreeCAD` and notice that the texts are missing on the title page
> b) Open a new project
> 1. Part Design workbench
> *
> 2. Tasks and create a new body
> *
> 3. Create a sketch
> *
> 4. In a sketch environment use `R`-key and notice that it no longer works to make a rectangle

On my machine, the start page was not displayed properly even before the
patch for STEP files, so it's probably a different issue with HTML rendering.

There are indeed no keyboard shortcuts by default for creating cercles,
rectangles, etc. in part design. But you can still configure them in
"Tools -> Customize -> Keyboard -> Sketcher".
Maybe these shortcuts are missing because the version we are currently
using is not an official release (because of compatibility issues with
boost, opencascade-occt and vtk) and there's a bug in it, or maybe
upstream decided not to set them by default anymore...
-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCYhF5cg8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j+8ugEAkC23oChxf0mpDqzf+w+Z5PjQBVJ0s/qSD8m/
LZmNL7oA/jEx5eeYDVBWpVGwHE0w4DpaA6R5nlsYgcB53VAcn8UT
=byMy
-----END PGP SIGNATURE-----

J
J
Jacob Hrbek wrote on 20 Feb 2022 02:05
(name . Guillaume Le Vaillant)(address . glv@posteo.net)(address . 54011@debbugs.gnu.org)
97d77475-d984-a168-01d4-2c04f4d3755e@rixotstudio.cz
Both of those worked for me before the update using this manifest:
  #!/usr/bin/env -S guix shell -m
  !#
  ;;; Recipe to provide GNU Emacs through Guix
  (use-modules
      (guix channels))
  ;; DNR-CI(Krey): Needs handling to keep the hash up-to-date
  (list (channel
         (name 'guix)
          (commit
            "f1bfd9f1948a5ff336d737c0614b9a30c2bb3097")
          (introduction
            (make-channel-introduction
              "9edb3f66fd807b096b48283debdcddccfea34bad"
              (openpgp-fingerprint
                "BBB0 2DDF 2CEA F6A8 0D1D  E643 A2A0 6DF2 A33A 54FA")))))
  (specifications->manifest
      (list
        "freecad"
        ;; DEP(Krey): Used for working with openscad designs
        "openscad"
        ;; DEP(Krey): Required for working with FEM workbench
        "gmsh"))
On 2/19/22 23:48, Guillaume Le Vaillant wrote:
Toggle quote (24 lines)
> Jacob Hrbek <kreyren@rixotstudio.cz> skribis:
>
>> That patch seems to have broken something in FreeCAD as i have issues with fonts^ and keybinds:
>>
>> To reproduce:
>> a) Run `guix shell freecad -- FreeCAD` and notice that the texts are missing on the title page
>> b) Open a new project
>> 1. Part Design workbench
>> *
>> 2. Tasks and create a new body
>> *
>> 3. Create a sketch
>> *
>> 4. In a sketch environment use `R`-key and notice that it no longer works to make a rectangle
> On my machine, the start page was not displayed properly even before the
> patch for STEP files, so it's probably a different issue with HTML rendering.
>
> There are indeed no keyboard shortcuts by default for creating cercles,
> rectangles, etc. in part design. But you can still configure them in
> "Tools -> Customize -> Keyboard -> Sketcher".
> Maybe these shortcuts are missing because the version we are currently
> using is not an official release (because of compatibility issues with
> boost, opencascade-occt and vtk) and there's a bug in it, or maybe
> upstream decided not to set them by default anymore...
--
Jacob Hrbek, In support of ukraine sovereignty #supportUkraine
Attachment: signature.asc
?