Update app.py
Browse files
app.py
CHANGED
|
@@ -79,12 +79,14 @@ def create_dxf_capacitor_bank(capacitors):
|
|
| 79 |
label = f"{cap} kVAR"
|
| 80 |
points = [(x, y), (x + 10, y), (x + 10, y + 10), (x, y + 10), (x, y)]
|
| 81 |
msp.add_lwpolyline(points, close=True, dxfattribs={'color': 3})
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
|
|
|
|
|
|
| 88 |
})
|
| 89 |
text.dxf.insert = (x + 5, y + 5)
|
| 90 |
x += row_width
|
|
|
|
| 79 |
label = f"{cap} kVAR"
|
| 80 |
points = [(x, y), (x + 10, y), (x + 10, y + 10), (x, y + 10), (x, y)]
|
| 81 |
msp.add_lwpolyline(points, close=True, dxfattribs={'color': 3})
|
| 82 |
+
text = msp.add_text(label, dxfattribs={
|
| 83 |
+
'height': 2.5,
|
| 84 |
+
'color': 4,
|
| 85 |
+
'style': 'STANDARD',
|
| 86 |
+
'halign': TextEntityAlignment.CENTER,
|
| 87 |
+
'valign': TextEntityAlignment.BASELINE, # ✅ FIXED here
|
| 88 |
+
})
|
| 89 |
+
|
| 90 |
})
|
| 91 |
text.dxf.insert = (x + 5, y + 5)
|
| 92 |
x += row_width
|