diff --git a/src/fltk/graphicWindow.cpp b/src/fltk/graphicWindow.cpp index 472c6d17ad2c3addcc886013f28dde259f89b017..59c9efa6d12cb99dbc935e719813e5662ef9487f 100644 --- a/src/fltk/graphicWindow.cpp +++ b/src/fltk/graphicWindow.cpp @@ -2639,7 +2639,7 @@ static void mesh_define_transfinite(int dim) Msg::Error("Wrong number of points for mesh constraint"); break; case 3: - if(p.size() == 6 + 1 || p.size() == 8 + 1) + if((p.size() == 0 + 1 || p.size() == 6 + 1 || p.size() == 8 + 1)) scriptSetTransfiniteVolume(p, GModel::current()->getFileName()); else Msg::Error("Wrong number of points for transfinite volume"); diff --git a/src/geo/scriptStringInterface.cpp b/src/geo/scriptStringInterface.cpp index 2719a4c198098cb6b10a14c2a414f5196d102c8c..7c917c67761b5c20aa8609105fe43af51f107b70 100644 --- a/src/geo/scriptStringInterface.cpp +++ b/src/geo/scriptStringInterface.cpp @@ -375,12 +375,16 @@ void scriptSetTransfiniteVolume(std::vector<int> &l, for(auto &lang : CTX::instance()->scriptLang) { std::ostringstream sstream; if(lang == "geo") { - sstream << "Transfinite Volume{" << l[0] << "} = {"; - for(std::size_t i = 1; i < l.size(); i++) { - if(i > 1) sstream << ", "; - sstream << l[i]; + sstream << "Transfinite Volume{" << l[0] << "}"; + if(l.size() > 1) { + sstream << " = {"; + for(std::size_t i = 1; i < l.size(); i++) { + if(i > 1) sstream << ", "; + sstream << l[i]; + } + sstream << "}"; } - sstream << "};"; + sstream << ";"; } else { // TODO