Skip to content
Snippets Groups Projects
Commit e58363c4 authored by Emilie Marchandise's avatar Emilie Marchandise
Browse files

Added lua Binding for reinitialisation of options gmshOptions:initOptions()

parent b8e0e5c9
No related branches found
No related tags found
No related merge requests found
......@@ -116,3 +116,4 @@ int CTX::unpackAlpha(unsigned int X)
else
return ( ( (X) >> 24 ) & 0xff );
}
......@@ -11,6 +11,8 @@
#include "CGNSOptions.h"
#include "meshPartitionOptions.h"
class binding;
// The interface-independent context.
struct contextMeshOptions {
......@@ -242,6 +244,7 @@ class CTX {
int unpackGreen(unsigned int X);
int unpackBlue(unsigned int X);
int unpackAlpha(unsigned int X);
};
#endif
......@@ -29,6 +29,7 @@
#include "Bindings.h"
#include "GmshMessage.h"
#include "linearSystem.h"
#include "Options.h"
#if defined(HAVE_OPENGL)
#include "drawContext.h"
......@@ -83,6 +84,11 @@ class gmshOptions {
{
GmshSetOption(category, name, value, index);
}
void initOptions(){
ReInitOptions(0);
InitOptionsGUI(0);
}
static void registerBindings(binding *b)
{
classBinding *cb = b->addClass<gmshOptions>("gmshOptions");
......@@ -112,6 +118,11 @@ class gmshOptions {
mb->setDescription("return the value of a string option. This is equivalent "
"to category[index].name");
mb->setArgNames("category", "index", "name", NULL);
mb = cb->addMethod("initOptions", &gmshOptions::initOptions);
mb->setDescription("Re-initialize option file");
mb->setArgNames(NULL);
mb = cb->setConstructor<gmshOptions>();
mb->setDescription("an instance of gmshOptions is needed to access the database");
}
......
......@@ -1461,7 +1461,7 @@ GPoint GFaceCompound::point(double par1, double par2) const
//curved PN triangle
//-------------------------
printf("normals size=%d vertex=%d \n", _normals.size(), lt->tri->getVertex(0)->getNum());
const SVector3 n1 = _normals[lt->tri->getVertex(0)];
const SVector3 n2 = _normals[lt->tri->getVertex(1)];
const SVector3 n3 = _normals[lt->tri->getVertex(2)];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment