Interesting story.
A rewrite of this specific 'layout' branch ? or are you referring to something else?
A rewrite of this specific 'layout' branch ? or are you referring to something else?
The way I've seen it work is people start to dig and then they ask questions or help with solving a bug or they ask specific technical questions. Mentors aren't hand-holders here...it's more like: 'if you take the time to ask a question that your researched well (which we'll be able to tell by the quality of the question) then we'd enjoy trying to provide a direction on how to solve it'maxlem wrote: ↑Fri Jul 26, 2019 3:53 pm Well, I see lot of people complaining about FreeCad ui in general, I'm a qtquick-for-cad specialist, this layout project is the only qtquick inroad i know of, si here I am.
What I want: learn FreeCAD and be able to improve it
What I need: guidance as to where my efforts would be best spent
Actually it was suprisingly limited to get it working. Lookjing through my own commits I can't really remember everything, but I think I got it working in a few days.Yet I fear it may not be possible without significant changes for FreeCAD core
That could be a good idea. If I remember correctly the drawback of my method was that every 3d render triggert a ui redraw, and every ui redraw triggered a 3d render (as everythign was drawn in a single opengl rendering pass). The problem with that is for large models the ui gets sluggish as the 3d rendering may not be possible with 30Hz... it is rather bad to link ui redrawing with 3d performance. So your idea could decouple that.]The way I know to render opengl in a QtQuickItem is using QQuickFramebufferObject and using a QQuickFramebufferObject::Renderer derivation as a renderer
It depends on how you want to interact with the system. My approach was to not rebuild the UI functionality, just use QML for the layout. That means I reused all the widgets, the tree, property editor etc.: I exposed them as QML types and only changed them slightly to fit visually in. Then in QML I arranged them, added headers for control etc. The advantage for that is that all the complicated UI code did not to be redone. The disadvantage of course was that QML did not have access to any freecad object, so one could not create a real new UI widget.And, hopefully, the FreeCad API will help me talking to the non-qtquick sections of the application through a QObject-API. Like QWidget, QtQuick is based on QObject and does everything through signals and slots, so all should be well.
Yeah, that is definitely the first step. Using the coin3d rendering is actually straigth forward, but of course framebufers are tricky. I highly recomend looking at the View3dInventorViewer code, as it does support rendering to a framebuffer: https://github.com/FreeCAD/FreeCAD/blob ... Viewer.cpp. This could bring you a long way already, maybe even allow simply reusing of the viewer and wrap the QML part around.I still suspect I will have an hard time reaching the holy grail: rendering FreeCad 3d viewport in a QQuickFramebufferObject::Renderer::render() call. That would unlock the whole power of qtquick2.