ArrcttacsrjksX commited on
Commit
d9aa302
·
verified ·
1 Parent(s): 7ddaef9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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
- polyline = doc.modelspace().add_polyline2d(lwpline.vertices)
 
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