Mesh: [skip ci] allow to set custom size for asymptote output

This commit is contained in:
wmayer
2020-08-29 19:05:28 +02:00
parent 4c233cd9e9
commit 9dfd40e4d3
5 changed files with 86 additions and 1 deletions

View File

@@ -28,6 +28,7 @@
#include <Base/Console.h>
#include <Base/Interpreter.h>
#include <App/Application.h>
#include "Mesh.h"
#include "MeshPy.h"
@@ -57,6 +58,11 @@ PyMOD_INIT_FUNC(Mesh)
// NOTE: To finish the initialization of our own type objects we must
// call PyType_Ready, otherwise we run into a segmentation fault, later on.
// This function is responsible for adding inherited slots from a type's base class.
ParameterGrp::handle handle = App::GetApplication().GetParameterGroupByPath
("User parameter:BaseApp/Preferences/Mod/Mesh");
ParameterGrp::handle asy = handle->GetGroup("Asymptote");
MeshCore::MeshOutput::SetAsymptoteSize(asy->GetASCII("Width", "500"),
asy->GetASCII("Height"));
// add mesh elements
Base::Interpreter().addType(&Mesh::MeshPointPy ::Type,meshModule,"MeshPoint");