update
This commit is contained in:
@@ -268,9 +268,13 @@ class exportDXF:
|
||||
})
|
||||
|
||||
def createPolyline(self, wire):
|
||||
data = getWire(wire.Shape)
|
||||
lwp = self.msp.add_lwpolyline(data)
|
||||
return lwp
|
||||
try:
|
||||
data = getWire(wire.Shape)
|
||||
lwp = self.msp.add_lwpolyline(data)
|
||||
return lwp
|
||||
except Exception as e:
|
||||
print("Error creating polyline:", e)
|
||||
return None
|
||||
|
||||
|
||||
def getWire(wire, nospline=False, width=.0):
|
||||
@@ -519,7 +523,8 @@ class _PVPlantExportDXF(QtGui.QWidget):
|
||||
|
||||
def writeArea(self):
|
||||
pol = self.exporter.createPolyline(FreeCAD.ActiveDocument.Site.Boundary)
|
||||
pol.dxf.layer = "boundary"
|
||||
if pol:
|
||||
pol.dxf.layer = "boundary"
|
||||
|
||||
for area in FreeCAD.ActiveDocument.Boundaries.Group:
|
||||
pol = self.exporter.createPolyline(area)
|
||||
|
||||
Reference in New Issue
Block a user