pivy.quarter QuarterWidget

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!
Post Reply
salgerman
Posts: 18
Joined: Sat May 14, 2011 4:10 pm

pivy.quarter QuarterWidget

Post by salgerman »

O.k., so, I am pretty ignorant about 3D modeling as hardly do any, but I would like to and am trying to pick up FreeCAD.

While learning to use FreeCAD as an app and its own friendly Gui is farily easy, I could use a way to implement 3D stuff into my own application, though...so, I am reading all the documentation in this site, yes, really, all of it...I don't mind and picked up key information here and there.

So, I am focusing on scripting, embedding, PyQt, pivy, coin. The new page on embedding is pretty short and does not show how to embed FreeCAD with Gui capabilities, but without the entire Gui. The old one offers four alternative ways to embed; unfortunately, things do not seem to work...in particular, back then they said that one good way to embed was using the quarter module...any ideas where it went, is it gone? is there an equivalent way to achieve the same thing offered then?

I am dreaming of having my own application using FreeCAD without the main menu, maybe some object/view manipulation toolbars and side panel to edit scripted objects View/Data attributes.

Looking for advise.

Thanks

Germán
salgerman
Posts: 18
Joined: Sat May 14, 2011 4:10 pm

Re: pivy.quarter QuarterWidget

Post by salgerman »

Oh, along these new pages, I just run into the same page offering to use pivy.quarter, too...of course, just because I found it, it does not mean it now works.
MarvinK
Posts: 23
Joined: Mon Oct 27, 2014 10:10 am

Re: pivy.quarter QuarterWidget

Post by MarvinK »

I ran into the same problem. Have you solved it?
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: pivy.quarter QuarterWidget

Post by yorik »

This would be far from easy, because freecad does a lot of things besides displaying contents in a 3d view. Once the GUI is up, all the tools will start to expect other pieces of the interface present, such as the task system, the output console, the properties editor, etc. Going through all the code to modify that in order to work with your own interface would be a gigantic work.

I think you have two much easier choices: use the full FreeCAD interface and modify it (with some knowledge of Qt you can do almost anything with it, even from python), or forget about it entirely, and use only the non-Gui (that we call App) part of FreeCAD, and build an interface from scratch.

*EDIT* Oops... old post :)
MarvinK
Posts: 23
Joined: Mon Oct 27, 2014 10:10 am

Re: pivy.quarter QuarterWidget

Post by MarvinK »

I found an easy way to use only the 3D-Viewer in the GUI of my own Python-App.
The important parts are :

import FreeCAD
importFreeCADGui
FreeCADGui.showMainWindow()
mw = FreeCADGui.getMainWindow()

.
.
.

mdi = mw.findChild(QMdiArea)
w = MainWindow()
w.setCentralWidget(mdi)
w.show()
mw.hide()

MainWindow is my own gui-class, which embedds the 3D-viewer of the FreeCADGui.
MattWood4
Posts: 7
Joined: Thu May 21, 2015 11:33 am

Re: pivy.quarter QuarterWidget

Post by MattWood4 »

I found an easy way to use only the 3D-Viewer in the GUI of my own Python-App.
The important parts are :

import FreeCAD
importFreeCADGui
FreeCADGui.showMainWindow()
mw = FreeCADGui.getMainWindow()

.
.
.

mdi = mw.findChild(QMdiArea)
w = MainWindow()
w.setCentralWidget(mdi)
w.show()
mw.hide()

MainWindow is my own gui-class, which embedds the 3D-viewer of the FreeCADGui.
Do the keyboard shortcuts (del, ctrl + z etc.) work with this method?
Post Reply