From 5c47f1acec33f02e75960ee6d7bcd5c688b8e85e Mon Sep 17 00:00:00 2001 From: wandererfan Date: Wed, 30 May 2018 10:04:10 -0400 Subject: [PATCH] Initialize #pts for LWPolyLine --- src/Mod/Import/App/ImpExpDxf.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Mod/Import/App/ImpExpDxf.cpp b/src/Mod/Import/App/ImpExpDxf.cpp index 357687757b..b69d87adfd 100644 --- a/src/Mod/Import/App/ImpExpDxf.cpp +++ b/src/Mod/Import/App/ImpExpDxf.cpp @@ -618,6 +618,7 @@ void ImpExpDxfWrite::exportLWPoly(BRepAdaptor_Curve c) pd.Extr.x = 0.0; pd.Extr.y = 0.0; pd.Extr.z = 1.0; + pd.nVert = 0; GCPnts_UniformAbscissa discretizer; discretizer.Initialize (c, optionMaxLength); @@ -628,6 +629,7 @@ void ImpExpDxfWrite::exportLWPoly(BRepAdaptor_Curve c) gp_Pnt p = c.Value (discretizer.Parameter (i)); pd.Verts.push_back(gPntTopoint3D(p)); } + pd.nVert = discretizer.NbPoints (); WriteLWPolyLine(pd,getLayerName().c_str()); } }