diff --git a/bazaar/DXF/LwPolyline.cpp b/bazaar/DXF/LwPolyline.cpp index 242287456..9bfa4486b 100644 --- a/bazaar/DXF/LwPolyline.cpp +++ b/bazaar/DXF/LwPolyline.cpp @@ -301,6 +301,17 @@ DXFLwPolyline &DXFLwPolyline::AddArcCenter(Pointf const ¢er, Pointf const &p return *this; } +// adds an arc with point and bulge; if bulge is null, just add a line segment +DXFLwPolyline &DXFLwPolyline::AddArc(Pointf const &p, double bulge) +{ + if(!vertices.GetCount()) + return AddPoints(p); + bulges.Top() = bulge; + vertices.Add(T(p)); + bulges.Add(0); + return *this; +} + // close/open polyline DXFLwPolyline &DXFLwPolyline::Close(void) { diff --git a/bazaar/DXF/LwPolyline.h b/bazaar/DXF/LwPolyline.h index c600ac390..bda556e47 100644 --- a/bazaar/DXF/LwPolyline.h +++ b/bazaar/DXF/LwPolyline.h @@ -64,6 +64,9 @@ class DXFLwPolyline : public DXFEntity // if no previous point, simply add a point DXFLwPolyline &AddArcCenter(Pointf const ¢er, Pointf const &p, bool big = false); + // adds an arc with point and bulge; if bulge is null, just add a line segment + DXFLwPolyline &AddArc(Pointf const &p, double bulge); + // close/open polyline DXFLwPolyline &Close(void); DXFLwPolyline &Open(void);