jithenderchoudary commited on
Commit
479542b
·
verified ·
1 Parent(s): eb49869

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
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
  """