From d1f8375f0613fda135b99614bdac92a976ab6b25 Mon Sep 17 00:00:00 2001 From: Max Orok <maxwellorok@gmail.com> Date: Fri, 16 Jul 2021 17:56:49 -0400 Subject: [PATCH] Implement addPoint for non-geo scripts --- Geo/scriptStringInterface.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Geo/scriptStringInterface.cpp b/Geo/scriptStringInterface.cpp index aa1b4319ea..37708c0e0e 100644 --- a/Geo/scriptStringInterface.cpp +++ b/Geo/scriptStringInterface.cpp @@ -445,7 +445,11 @@ void scriptAddPoint(const std::string &fileName, const std::string &x, sstream << "};"; } else { - // TODO + std::string addPointStr = "gmsh/model/" + currentFactory + "/addPoint"; + std::ostringstream args; + args << x << ", " << y << ", " << z; + if(lc.size()) args << ", " << lc; + sstream << api(addPointStr, args.str(), lang); } scriptAddCommand(sstream.str(), fileName, lang); } -- GitLab