diff options
Diffstat (limited to 'Project/Workspace.cpp')
-rw-r--r-- | Project/Workspace.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Project/Workspace.cpp b/Project/Workspace.cpp index e668bf3..d09efad 100644 --- a/Project/Workspace.cpp +++ b/Project/Workspace.cpp @@ -15,6 +15,7 @@ #include "Text.h" #include "PowerFlow.h" +#include "Fault.h" // Camera Camera::Camera() @@ -1413,3 +1414,18 @@ std::vector<Element*> Workspace::GetAllElements() const return allElements; } + +bool Workspace::RunFault() +{ + Fault fault(m_elementList); + bool result = fault.RunFaultCalculation(100e6); + if(!result) { + wxMessageDialog msgDialog(this, fault.GetErrorMessage(), _("Error"), wxOK | wxCENTRE | wxICON_ERROR); + msgDialog.ShowModal(); + } + + UpdateTextElements(); + Redraw(); + + return result; +} |