How to close a LWPOLYLINE ?

622 views
Skip to first unread message

Emmanuel Bardiere

unread,
Mar 22, 2017, 8:23:33 AM3/22/17
to python-ezdxf
Hello,

I'am trying to have closed LWPOLYLINE (see attached file).
But even if first point and last point are the same, it's not closed.
I want to "tag" the polyline to be close. But I fail using  LWPOLYLINE_CLOSED in ezdxf.const.
I really don't know how can I use thes flags.

In advance thank you, Emmanuel.
polyclose.py

Manfred Moitzi

unread,
Mar 22, 2017, 8:45:51 AM3/22/17
to python-ezdxf
http://ezdxf.readthedocs.io/en/latest/entities.html#lwpolyline

LWPolyline.closed is a read/write attribute, close the polyline with lwp.closed=True

lwp = msp.add_lwpolyline(points, dxfattribs={'layer': 'layerTest'})
lwp.closed = True


Best regards,
Manfred

Emmanuel Bardiere

unread,
Mar 22, 2017, 8:55:56 AM3/22/17
to python-ezdxf
Arghh,

I feel stupid... not to have evne test that !

Many thank's
Reply all
Reply to author
Forward
0 new messages