Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,6 +1,16 @@
|
|
| 1 |
import FreeCAD, Fem, FemGui
|
| 2 |
from FreeCAD import Gui
|
| 3 |
import os
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
def run_fea(step_file, output_dir):
|
| 6 |
"""
|
|
|
|
| 1 |
import FreeCAD, Fem, FemGui
|
| 2 |
from FreeCAD import Gui
|
| 3 |
import os
|
| 4 |
+
import sys
|
| 5 |
+
sys.path.append(r"C:\Program Files\FreeCAD 1.0\bin") # Path to FreeCAD's Python library
|
| 6 |
+
sys.path.append(r"C:\Program Files\FreeCAD 1.0\lib") # Additional FreeCAD modules
|
| 7 |
+
|
| 8 |
+
try:
|
| 9 |
+
import FreeCAD, Fem, FemGui
|
| 10 |
+
print("FreeCAD modules imported successfully.")
|
| 11 |
+
except ImportError as e:
|
| 12 |
+
print(f"Error importing FreeCAD modules: {e}")
|
| 13 |
+
|
| 14 |
|
| 15 |
def run_fea(step_file, output_dir):
|
| 16 |
"""
|