[Solved] Missing method in Matrix form Python API

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
dpoen
Posts: 49
Joined: Wed Feb 02, 2022 10:26 pm

[Solved] Missing method in Matrix form Python API

Post by dpoen »

Hello,

Correct me if I'm wrong, (I'm not very used to the python API build system), but it's seems like some methods don't show up in the Python API.
For instance, the trace() method is does not exist (i.e. calling FreeCAD.Matrix.trace yield a "not found" error), but the MatrixPy.xml define it (line 102-109) and the MatrixPyImp.cpp actually implement it (line 481-490).

Do I miss something ?

OS: Debian GNU/Linux 11 (bullseye) (XFCE/xfce)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Python version: 3.9.2
Qt version: 5.15.2
Coin version: 4.0.0
OCC version: 7.5.1
Locale: English/United States (en_US)
Last edited by dpoen on Mon Jun 20, 2022 1:32 pm, edited 2 times in total.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Missing method in Matrix form Python API

Post by Kunda1 »

Please add you full About info to your OP please
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
onekk
Veteran
Posts: 6205
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Missing method in Matrix form Python API

Post by onekk »

dpoen wrote: Mon Jun 20, 2022 10:05 am ...

OS: Debian GNU/Linux 11 (bullseye) (XFCE/xfce)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Python version: 3.9.2
Qt version: 5.15.2
Coin version: 4.0.0
OCC version: 7.5.1
Locale: English/United States (en_US)

What source you are using to affirm the above. If you refer to GitHub usually you are in the developing version (now it is not far from the 0.20 just released) and not the 0.19 you have in the infos above.

Probably you have to state even from what source you will derive information above and affirm that they are wrong.

Regards

Carlo D.
Last edited by onekk on Mon Jun 20, 2022 1:04 pm, edited 1 time in total.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
dpoen
Posts: 49
Joined: Wed Feb 02, 2022 10:26 pm

Re: Missing method in Matrix form Python API

Post by dpoen »

I'm actually reading the code of origin/master at 588331515d9c1a08a174123b80a6d94b49cd9ed2, and using FreeCAD freshly build using this.
User avatar
onekk
Veteran
Posts: 6205
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Missing method in Matrix form Python API

Post by onekk »

OK so the info above are not correct, you are using 0.20 ?
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
dpoen
Posts: 49
Joined: Wed Feb 02, 2022 10:26 pm

Re: Missing method in Matrix form Python API

Post by dpoen »

Well, first, I have to figure out why the hell I'm at this commit, it about 4 month old... git fetch don't update my local :/ I will work on it, and I will be back !

EDIT: Call me dumb, I didn't update my fork since then...
I update, rebuild, and come back
dpoen
Posts: 49
Joined: Wed Feb 02, 2022 10:26 pm

Re: Missing method in Matrix form Python API

Post by dpoen »

Ok nevermind, just **correctly** built 0.21, and trace() show up

Sorry for the inconvenience !
User avatar
onekk
Veteran
Posts: 6205
Joined: Sat Jan 17, 2015 7:48 am
Contact:

Re: Missing method in Matrix form Python API

Post by onekk »

dpoen wrote: Mon Jun 20, 2022 1:05 pm Well, first, I have to figure out why the hell I'm at this commit, it about 4 month old... git fetch don't update my local :/ I will work on it, and I will be back !

EDIT: Call me dumb, I didn't update my fork since then...
I update, rebuild, and come back
git fetch will not update sources, it downloads the changed data.

git pull usually do fetch and merge changes.

But I'm not a git expert (I usually made big messes when collaborating with git).

Regards

Carlo D.
GitHub page: https://github.com/onekk/freecad-doc.
- In deep articles on FreeCAD.
- Learning how to model with scripting.
- Various other stuffs.

Blog: https://okkmkblog.wordpress.com/
dpoen
Posts: 49
Joined: Wed Feb 02, 2022 10:26 pm

Re: Missing method in Matrix form Python API

Post by dpoen »

onekk wrote: Mon Jun 20, 2022 1:35 pm git fetch will not update sources, it downloads the changed data.
Git was acting fine, in fact, it's just that it was fetching the fork I use to make pull request, and I didn't update my fork since February to stay up to date with the FreeCAD origin (I've basically forgot his existence, and assumed I was pulling from FreeCAD repo...)
Post Reply