Skip to content

3D view, despite many attempts at circumventing the problem, is still unstable. #25

@SuzanneSoy

Description

@SuzanneSoy

Proper fix would likely require the ability to create a 3D viewer from Python without creating a tab at the same time. Most of the hoops I've jumped through are to attempt to prevent the tab from being garbage-collected, which crashes the viewer.

https://freecad-python-stubs.readthedocs.io/en/latest/autoapi/FreeCADGui/#FreeCADGui.createViewer is the only function that opens a viewer, and does so as a tab containing one or two viewers.

Additionally, while someone's exposing this in the FreeCAD API, it would be nice to have access to some of the QuarterWidget API, at least enough to save a screenshot/PNG render of a 3D view (preferably without having to make it visible on-screen) would be a good start, as currently the 3D view is an (ironically) opaque object.

If we could have access to the full customized-by-freecad QuarterWidget library's Python bindings, that would be wonderful.

To quote a comment in the source code of this addon:

FreeCAD uses a modified version of QuarterWidget, so the import pivy.quarter one will cause segfaults.
FreeCAD's FreeCADGui.createViewer() puts the viewer widget inside an MDI window, and detaching it without causing segfaults on exit is tricky.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions