diff --git a/librecad/src/lib/engine/rs_polyline.cpp b/librecad/src/lib/engine/rs_polyline.cpp index e311fca4db..e3c7d2dbf6 100644 --- a/librecad/src/lib/engine/rs_polyline.cpp +++ b/librecad/src/lib/engine/rs_polyline.cpp @@ -39,7 +39,8 @@ RS_PolylineData::RS_PolylineData(): startpoint(false), endpoint(false), thickness(0.0), - elevation(0.0) + elevation(0.0), + consistwidth(0.0) { } @@ -49,7 +50,8 @@ RS_PolylineData::RS_PolylineData(const RS_Vector& _startpoint, startpoint(_startpoint), endpoint(_endpoint), thickness(0.0), - elevation(0.0) + elevation(0.0), + consistwidth(0.0) { if (_closed) { @@ -63,6 +65,7 @@ std::ostream& operator << (std::ostream& os, "/" << pd.endpoint << ", thickness " << pd.thickness << ", elevation " << pd.elevation << + ", consistwidth " << pd.consistwidth << ")"; return os; } diff --git a/librecad/src/lib/engine/rs_polyline.h b/librecad/src/lib/engine/rs_polyline.h index 62b92f5b34..773736b45b 100644 --- a/librecad/src/lib/engine/rs_polyline.h +++ b/librecad/src/lib/engine/rs_polyline.h @@ -48,6 +48,7 @@ struct RS_PolylineData : public RS_Flags { // persist potentially existing polyline data double thickness; double elevation; + double consistwidth; }; std::ostream& operator << (std::ostream& os, const RS_PolylineData& pd); diff --git a/librecad/src/lib/filters/rs_filterdxfrw.cpp b/librecad/src/lib/filters/rs_filterdxfrw.cpp index 2f5bb23cdd..763474390e 100644 --- a/librecad/src/lib/filters/rs_filterdxfrw.cpp +++ b/librecad/src/lib/filters/rs_filterdxfrw.cpp @@ -533,6 +533,7 @@ void RS_FilterDXFRW::addLWPolyline(const DRW_LWPolyline& data) { // persist potentially existing polyline data d.elevation=data.elevation; d.thickness=data.thickness; + d.consistwidth=data.width; RS_Polyline *polyline = new RS_Polyline(currentContainer, d); setEntityAttributes(polyline, &data); @@ -2153,6 +2154,7 @@ void RS_FilterDXFRW::writeLWPolyline(RS_Polyline* l) { if (l) { pol.elevation=(l->getData()).elevation; pol.thickness=(l->getData()).thickness; + pol.width=(l->getData()).consistwidth; } for (RS_Entity* e=l->firstEntity(RS2::ResolveNone);