Can't scale image plane

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!
skoczo
Posts: 6
Joined: Mon Jan 10, 2022 8:29 pm

Can't scale image plane

Post by skoczo »

Hi. I'm trying to use image as template. I successfully imported image but can't scale it. When i choose image scaling option i'm getting following exception

Code: Select all

Running the Python command 'Image_Scaling' failed:
Traceback (most recent call last):
  File "/home/skoczo/freecad-git/build/Mod/Image/ImageTools/_CommandImageScaling.py", line 68, in Activated
    cmdCreateImageScaling(name="ImageScaling", trackers=trackers)
  File "/home/skoczo/freecad-git/build/Mod/Image/ImageTools/_CommandImageScaling.py", line 214, in cmdCreateImageScaling
    ui.setupUi(d)
  File "/home/skoczo/freecad-git/build/Mod/Image/ImageTools/_CommandImageScaling.py", line 138, in setupUi
    self.tracker = trackers.lineTracker(scolor=(1,0,0))
  File "/home/skoczo/freecad-git/build/Mod/Draft/draftguitools/gui_trackers.py", line 181, in __init__
    line.numVertices.setValue(2)
  File "/usr/lib/python3.10/site-packages/pivy/coin.py", line 3989, in __getattr__
    field = self.getField(name)
  File "/usr/lib/python3.10/site-packages/pivy/coin.py", line 3873, in getField
    return _coin.SoFieldContainer_getField(self, name)

<built-in function SoFieldContainer_getField> returned a result with an exception set<class 'SystemError'>
<class 'SystemError'>
<class 'SystemError'>
<class 'SystemError'>
I'm using manjaro and free cad from manjaro repo but i also built freecad from git and i have the same error.
This is info from my git build

Code: Select all

OS: Manjaro Linux (GNOME/gnome)
Word size of FreeCAD: 64-bit
Version: 0.20.27075 (Git)
Build type: Release
Branch: master
Hash: 089b18f8686ac03da749b916ab304f1c13f79d21
Python version: 3.10.1
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.3
Locale: Polish/Poland (pl_PL)
Do you know what might be a problem here?
chrisb
Veteran
Posts: 54293
Joined: Tue Mar 17, 2015 9:14 am

Re: Can't scale image plane

Post by chrisb »

Works perfect here. Perhaps an issue with the image?

OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.20.27008 (Git)
Build type: Release
Python version: 3.9.9
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: C/Default (C)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
skoczo
Posts: 6
Joined: Mon Jan 10, 2022 8:29 pm

Re: Can't scale image plane

Post by skoczo »

chrisb wrote: Sat Jan 15, 2022 2:01 pm Works perfect here. Perhaps an issue with the image?

OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.20.27008 (Git)
Build type: Release
Python version: 3.9.9
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: C/Default (C)
Should it be some specific image format?
chrisb
Veteran
Posts: 54293
Joined: Tue Mar 17, 2015 9:14 am

Re: Can't scale image plane

Post by chrisb »

I tested with a jpeg.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
chrisb
Veteran
Posts: 54293
Joined: Tue Mar 17, 2015 9:14 am

Re: Can't scale image plane

Post by chrisb »

Tried with the gear from the homepage. Works as well. Image
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
user1234
Veteran
Posts: 3512
Joined: Mon Jul 11, 2016 5:08 pm

Re: Can't scale image plane

Post by user1234 »

Python version: 3.10.1

There are pivy/coin issues with python > 3.9

Greetings
user1234

edit: typo
skoczo
Posts: 6
Joined: Mon Jan 10, 2022 8:29 pm

Re: Can't scale image plane

Post by skoczo »

user1234 wrote: Sat Jan 15, 2022 2:16 pm Python version: 3.10.1

There are pivy/coin issues with python > 3.9

Greetings
user1234

edit: typo
I installed pyenv and set python 3.9.9 as default. Now in bash i have python in version 3.9.9 but in freecad there is still version 3.10.1. How to change that?

I tried to build it with 3.9.9 but it looks like 3.10 is minimum

Code: Select all

cmake ../FreeCAD/ -DPYTHON_EXECUTABLE=/home/skoczo/.pyenv/shims/python3.9

Code: Select all

-- Checking for module 'Coin'
--   Found Coin, version 4.0.1
-- Coin3D libraries found
-- Shiboken2Config: Using default python: .cpython-310-x86_64-linux-gnu
-- Found PythonInterp: /home/skoczo/.pyenv/shims/python3.9 (found suitable version "3.9.9", minimum required is "3") 
CMake Error at /usr/lib64/cmake/Shiboken2-5.15.2/shiboken_helpers.cmake:468 (message):
  The detected Python minor version is not compatible with the Python minor
  version which was used when Shiboken was built.  Consider building shiboken
  with FORCE_LIMITED_API set to '1', so that only the Python major version
  matters.

  Built with: '3.10' Detected: '3.9'
Call Stack (most recent call first):
  /usr/lib64/cmake/Shiboken2-5.15.2/Shiboken2Config.cpython-310-x86_64-linux-gnu.cmake:55 (shiboken_check_if_built_and_target_python_are_compatible)
  /usr/lib64/cmake/Shiboken2-5.15.2/Shiboken2Config.cmake:5 (include)
  cMake/FreeCAD_Helpers/SetupShibokenAndPyside.cmake:13 (find_package)
  CMakeLists.txt:75 (SetupShibokenAndPyside)


-- Configuring incomplete, errors occurred!
skoczo
Posts: 6
Joined: Mon Jan 10, 2022 8:29 pm

Re: Can't scale image plane

Post by skoczo »

chrisb wrote: Sat Jan 15, 2022 2:12 pm Tried with the gear from the homepage. Works as well. Image
Which version of python do you have?
chrisb
Veteran
Posts: 54293
Joined: Tue Mar 17, 2015 9:14 am

Re: Can't scale image plane

Post by chrisb »

OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.20.27008 (Git)
Build type: Release
Python version: 3.9.9
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: C/Default (C)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
skoczo
Posts: 6
Joined: Mon Jan 10, 2022 8:29 pm

Re: Can't scale image plane

Post by skoczo »

chrisb wrote: Sat Jan 15, 2022 6:56 pm OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.20.27008 (Git)
Build type: Release
Python version: 3.9.9
Qt version: 5.12.9
Coin version: 4.0.0
OCC version: 7.5.3
Locale: C/Default (C)
So it looks like my problem might be with wrong python version. Now i need to find out how to force freecad to use 3.9.9 instead of 3.10.1
Post Reply