mughal-88 commited on
Commit
2d39ca0
·
verified ·
1 Parent(s): b5fd51c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -55,11 +55,14 @@ def export_model(model, output_format):
55
  """
56
  output_file = f"custom_profile.{output_format}"
57
  if output_format == "step":
58
- model.exportStep(output_file)
 
59
  elif output_format == "stl":
60
- model.exportStl(output_file)
 
61
  elif output_format == "svg":
62
- model.exportSvg(output_file)
 
63
  else:
64
  raise ValueError(f"Unsupported format: {output_format}")
65
  return output_file
 
55
  """
56
  output_file = f"custom_profile.{output_format}"
57
  if output_format == "step":
58
+ model = model.val() # Get the actual shape before exporting
59
+ cq.exporters.export(model, output_file) # Export to STEP format
60
  elif output_format == "stl":
61
+ model = model.val() # Get the actual shape before exporting
62
+ cq.exporters.export(model, output_file) # Export to STL format
63
  elif output_format == "svg":
64
+ model = model.val() # Get the actual shape before exporting
65
+ cq.exporters.export(model, output_file) # Export to SVG format
66
  else:
67
  raise ValueError(f"Unsupported format: {output_format}")
68
  return output_file