Kaynağa Gözat

restricciones de ipe

dacowars 1 ay önce
ebeveyn
işleme
02a3d4cb72
1 değiştirilmiş dosya ile 6 ekleme ve 0 silme
  1. 6 0
      app_designer.py

+ 6 - 0
app_designer.py

@@ -677,6 +677,12 @@ class SectionDesignerApp(tk.Tk):
             # Validar valores básicos
             if H <= 0 or b <= 0 or tf <= 0 or tw <= 0:
                 return
+            
+            if tf > H/2 or tw > b:
+                tf = min(tf, H/2)
+                tw = min(tw, b)
+                self.entry_tf.set(f"{tf:.6f}")
+                self.entry_tw.set(f"{tw:.6f}")
 
             # Generar puntos y calcular
             self.current_points = generate_ipe_points(H, b, tf, tw)