From 4778057ae07496bd949147dd9ef5f891846700b8 Mon Sep 17 00:00:00 2001 From: nikhilsrajan <32177856+nikhilsrajan@users.noreply.github.com> Date: Wed, 23 Oct 2019 14:52:43 +0530 Subject: [PATCH] After adding edges in Ng_STL_InitSTLGeometry, set readedges size to 0. The global variable readedges that the API uses doesn't clear itself after the Ng_STL_Geometry * has been initialized. It would cause problems for people who wish to initialize another Ng_STL_Geometry if they used Ng_STL_AddEdge in before their previous initialization. --- nglib/nglib.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/nglib/nglib.cpp b/nglib/nglib.cpp index a988b106..8e080266 100644 --- a/nglib/nglib.cpp +++ b/nglib/nglib.cpp @@ -632,6 +632,7 @@ namespace nglib } */ geo->AddEdges(readedges); + readedges.SetSize(0); } if (geo->GetStatus() == STLTopology::STL_GOOD || geo->GetStatus() == STLTopology::STL_WARNING) return NG_OK;