FreeCAD OCAF and reinventing the wheel

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!
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: FreeCAD OCAF and reinventing the wheel

Post by triplus »

triplus wrote: Fri May 10, 2019 4:07 pm Qt 6 has plans for further bringing QML/Qt 3D together. That i guess would allow us to have a rather good control over FreeCAD viewport and beyond.
Introducing Qt Quick 3D: A high-level 3D API for Qt Quick
At the time of writing of this post we are only providing a QML API, but the goal in the future is to provide a public C++ API as well.
Yes, this is an interesting aspect. Currently more or less no FreeCAD developer uses QML, having an option to use C++ would therefore certainly help. Maybe some day Python will get supported too (similar to the Pivy and Coin3D situation).

Image
4 views of the same Teapot scene. Also changing between 3 Cameras in the Perspective view.
User avatar
yorik
Founder
Posts: 13660
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: FreeCAD OCAF and reinventing the wheel

Post by yorik »

Interesting. If they come to port it to C++ in no time there will be Python bindings for it :) To keep under our radar...
ezzieyguywuf
Posts: 656
Joined: Tue May 19, 2015 1:11 am

Re: FreeCAD OCAF and reinventing the wheel

Post by ezzieyguywuf »

The blog post linked appears to be specific to "Qt 3d Quick".

However, there does seem to be some good documentation for the "non-quick", regular "Qt 3D" here
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: FreeCAD OCAF and reinventing the wheel

Post by triplus »

Yes, currently FreeCAD user interface is Qt Widgets based and Coin3D is used for viewport purposes. Likely things will stay like that in foreseeable future. Hence we are having a more theoretical discussions, on what could be used, if FreeCAD would need to migrate, due to some i guess emerged technical issues. Like Qt dropping Qt Widgets or Coin3D not being able to support some emerging technology (graphics API). The above blog post is therefore talking about one possible option, that is to use Qt Quick for creating the user interface and mentioned new high level API (API utilizing Qt 3D) for the 3D viewport purposes. Currently (Qt 6) still less powerful, compared to utilizing the Qt 3D directly, but more straightforward and integrated in Qt Quick.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: FreeCAD OCAF and reinventing the wheel

Post by triplus »

Qt 3D actually does already have Python bindings:

https://www.riverbankcomputing.com/soft ... qt3d/intro

Sample application:

https://github.com/AgentRev/GyroLog
Post Reply