MuhammadSajid commited on
Commit
e431d54
·
verified ·
1 Parent(s): 30315b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -78,13 +78,15 @@ def create_dxf_capacitor_bank(capacitors):
78
  for cap in capacitors:
79
  label = f"{cap} kVAR"
80
  msp.add_lwpolyline([(x, 0), (x+10, 0), (x+10, 10), (x, 10), (x, 0)])
81
- msp.add_text(label, (x, 12), dxfattribs={'height': 2.5}) # <-- fixed line
 
82
  x += 15
83
  output_path = "/mnt/data/capacitor_bank.dxf"
84
  doc.saveas(output_path)
85
  return output_path
86
 
87
 
 
88
  def reactive_power_first(voltage, current, power_factor):
89
  power_results = calculate_power_parameters(voltage, current, power_factor)
90
  if power_results:
 
78
  for cap in capacitors:
79
  label = f"{cap} kVAR"
80
  msp.add_lwpolyline([(x, 0), (x+10, 0), (x+10, 10), (x, 10), (x, 0)])
81
+ text_entity = msp.add_text(label, dxfattribs={'height': 2.5})
82
+ text_entity.dxf.insert = (x, 12)
83
  x += 15
84
  output_path = "/mnt/data/capacitor_bank.dxf"
85
  doc.saveas(output_path)
86
  return output_path
87
 
88
 
89
+
90
  def reactive_power_first(voltage, current, power_factor):
91
  power_results = calculate_power_parameters(voltage, current, power_factor)
92
  if power_results: