0000672: Loading Example Drawing extraction crashes at Baseclass.cpp line 115
This commit is contained in:
@@ -57,6 +57,7 @@
|
||||
#include "DrawingView.h"
|
||||
#include <Base/Stream.h>
|
||||
#include <Base/gzstream.h>
|
||||
#include <Base/PyObjectBase.h>
|
||||
#include <Gui/FileDialog.h>
|
||||
#include <Gui/WaitCursor.h>
|
||||
|
||||
@@ -434,4 +435,9 @@ void DrawingView::viewAll()
|
||||
m_view->fitInView(m_view->scene()->sceneRect(), Qt::KeepAspectRatio);
|
||||
}
|
||||
|
||||
PyObject* DrawingView::getPyObject()
|
||||
{
|
||||
Py_Return;
|
||||
}
|
||||
|
||||
#include "moc_DrawingView.cpp"
|
||||
|
||||
@@ -93,6 +93,7 @@ public:
|
||||
void printPdf();
|
||||
void printPreview();
|
||||
void print(QPrinter* printer);
|
||||
PyObject* getPyObject();
|
||||
|
||||
protected:
|
||||
void contextMenuEvent(QContextMenuEvent *event);
|
||||
|
||||
@@ -100,6 +100,9 @@ int TopoShapeShellPy::PyInit(PyObject* args, PyObject* /*kwd*/)
|
||||
shape = sewShell.ApplySewing(shell);
|
||||
}
|
||||
|
||||
if (shape.IsNull())
|
||||
Standard_Failure::Raise("Shape is null");
|
||||
|
||||
if (shape.ShapeType() != TopAbs_SHELL)
|
||||
Standard_Failure::Raise("Shape is not a shell");
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import FreeCAD,FreeCADGui
|
||||
FreeCADGui.activateWorkbench("DrawingWorkbench")
|
||||
FreeCAD.open(FreeCAD.getResourceDir()+"examples/DrawingExample.FCStd")
|
||||
FreeCADGui.SendMsgToActiveView("ViewFit")
|
||||
FreeCADGui.activeDocument().activeView().viewAxometric()
|
||||
FreeCADGui.activeDocument().sendMsgToViews("ViewFit")
|
||||
FreeCADGui.activeDocument().sendMsgToViews("ViewAxo")
|
||||
|
||||
Reference in New Issue
Block a user