From 2cf02e543f24c504f14f2e869a854d933eeef6e9 Mon Sep 17 00:00:00 2001 From: Tuomas Karna <tuomas.karna@uclouvain.be> Date: Mon, 18 Oct 2010 11:35:29 +0000 Subject: [PATCH] fixed MLine lua binding bug --- Geo/MLine.cpp | 6 +++++- Geo/MPrism.cpp | 1 - 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Geo/MLine.cpp b/Geo/MLine.cpp index 5eaed4c836..4771a12613 100644 --- a/Geo/MLine.cpp +++ b/Geo/MLine.cpp @@ -62,7 +62,11 @@ double MLine::getInnerRadius() #include "Bindings.h" static MLine* MLine_binding(std::vector<MVertex*> v) { - return new MLine(v); + if (v.size() == 2) + return new MLine(v); + if (v.size() == 3) + return new MLine3(v); + return new MLineN(v); } void MLine::registerBindings(binding *b) diff --git a/Geo/MPrism.cpp b/Geo/MPrism.cpp index d29fbe12dd..22586f844d 100644 --- a/Geo/MPrism.cpp +++ b/Geo/MPrism.cpp @@ -181,7 +181,6 @@ void MPrism::registerBindings(binding *b) cb = b->addClass<MPrism18>("MPrism18"); cb->setDescription("A mesh second-order prism."); cm = cb->addMethod("MPrism18",&MPrism18_binding); - // cm = cb->setConstructor<MPrism18_binding,std::vector<MVertex*> >(); cm->setArgNames("vectorOfVertices", NULL); cm->setDescription("Create a new prism with vertices in vectorV (length=18)."); cb->setParentClass<MPrism>(); -- GitLab