Mesh: [skip ci] allow to set custom size for asymptote output
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user