Spaces:
Sleeping
Sleeping
ArrcttacsrjksX
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -110,8 +110,9 @@ def convert_lwpolylines_to_polylines(dxf_file):
|
|
110 |
|
111 |
# Find all LWPOLYLINE entities and convert them to POLYLINE entities
|
112 |
for lwpline in doc.modelspace().query('LWPOLYLINE'):
|
113 |
-
# Create a POLYLINE entity
|
114 |
-
|
|
|
115 |
|
116 |
# Copy attributes from the LWPOLYLINE to the new POLYLINE
|
117 |
polyline.dxf.layer = lwpline.dxf.layer
|
|
|
110 |
|
111 |
# Find all LWPOLYLINE entities and convert them to POLYLINE entities
|
112 |
for lwpline in doc.modelspace().query('LWPOLYLINE'):
|
113 |
+
# Create a POLYLINE entity from the LWPOLYLINE's vertices
|
114 |
+
vertices = lwpline.vertices() # Call the method to get vertices
|
115 |
+
polyline = doc.modelspace().add_polyline2d(vertices)
|
116 |
|
117 |
# Copy attributes from the LWPOLYLINE to the new POLYLINE
|
118 |
polyline.dxf.layer = lwpline.dxf.layer
|