Skip to content

Commit 970c610

Browse files
committed
Fixed issue with printing frame
1 parent 796ecf9 commit 970c610

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

mpldxf/backend_dxf.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,9 +182,12 @@ def _draw_mpl_lwpoly(self, gc, path, transform, obj):
182182

183183
else:
184184
if isinstance(vertices[0][0], float or np.float64):
185-
entity = self.modelspace.add_lwpolyline(
186-
points=vertices, close=False, dxfattribs=dxfattribs
187-
) # set close to false because it broke some arrows
185+
if vertices[0][0] != 0:
186+
entity = self.modelspace.add_lwpolyline(
187+
points=vertices, close=False, dxfattribs=dxfattribs
188+
) # set close to false because it broke some arrows
189+
else:
190+
entity = None
188191

189192
else:
190193
entity = [

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "mpldxf"
3-
version = "0.2.0"
3+
version = "0.3.0"
44
description = "A fork of mpldxf - a matplotlib backend to write DXF drawings. Modified by NGI to handle geotechnical plots"
55
authors = ["David Kent",
66
"Jon-Michael Josefsen <[email protected]>",

0 commit comments

Comments
 (0)