bug#54011: FreeCAD: Unable to import STEP files

2022-02-19 Thread Jacob Hrbek

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)
      (url "https://git.savannah.gnu.org/git/guix.git";)
      (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:

Jacob Hrbek  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



publickey - kreyren@rixotstudio.cz - 1677db82.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


bug#54011: FreeCAD: Unable to import STEP files

2022-02-19 Thread Guillaume Le Vaillant
Jacob Hrbek  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...


signature.asc
Description: PGP signature


bug#54011: FreeCAD: Unable to import STEP files

2022-02-18 Thread Jacob Hrbek

Thanks for working on it!

On 2/18/22 17:00, Guillaume Le Vaillant wrote:

Guillaume Le Vaillant  skribis:


When decompressing the zip file and importing the STEP file:

Traceback (most recent call last):
   File "", line 1, in 
   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)
: 
/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

tbb-2020.
Fix pushed as 27a91b2f57bd0bf7efab77eaeb4b920f162bf8c8.


--
Jacob Hrbek, In support of ukraine sovereignty #supportUkraine



publickey - kreyren@rixotstudio.cz - 1677db82.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


bug#54011: FreeCAD: Unable to import STEP files

2022-02-18 Thread Guillaume Le Vaillant
Guillaume Le Vaillant  skribis:

> When decompressing the zip file and importing the STEP file:
>
> Traceback (most recent call last):
>   File "", line 1, in 
>   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)
> : 
> /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.


signature.asc
Description: PGP signature


bug#54011: FreeCAD: Unable to import STEP files

2022-02-16 Thread Guillaume Le Vaillant
Guillaume Le Vaillant  skribis:

> Jacob Hrbek  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)
>>
>> : 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:

--8<---cut here---start->8---
Traceback (most recent call last):
  File "", line 1, in 
  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(
: "There is no item named 'Home.xml' in the archive"
--8<---cut here---end--->8---

When decompressing the zip file and importing the STEP file:

--8<---cut here---start->8---
Traceback (most recent call last):
  File "", line 1, in 
  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)
: 
/gnu/store/pd0pxvnr3qdgcz37p80v6q8p0wk9xyfh-freecad-0.19.3-0.09a05a9/lib/Import.so:
 undefined symbol: 
_ZN3tbb6detail2r122cancel_group_executionERNS0_2d118task_group_contextE
--8<---cut here---end--->8---

I guess now we have to find where
'_ZN3tbb6detail2r122cancel_group_executionERNS0_2d118task_group_contextE'
is coming from.


signature.asc
Description: PGP signature


bug#54011: FreeCAD: Unable to import STEP files

2022-02-16 Thread Guillaume Le Vaillant
Jacob Hrbek  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)
>
> : 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):

--8<---cut here---start->8---
...
-- 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
...
--8<---cut here---end--->8---

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


signature.asc
Description: PGP signature


bug#54011: FreeCAD: Unable to import STEP files

2022-02-15 Thread Jacob Hrbek

Importing zipped STEP file: 15:50:27 Traceback (most recent call last):

File "", line 1, in 

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 

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 

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 

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 

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)

: No module named 'PySide2.QtSvg'

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

File "", line 1, in 

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)

:
/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-2 and 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


publickey - kreyren@rixotstudio.cz - 1677db82.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature