karthikmn commited on
Commit
1b42a61
·
verified ·
1 Parent(s): 6d6d281

Create toolpath_generation.py

Browse files
Files changed (1) hide show
  1. modules/toolpath_generation.py +8 -0
modules/toolpath_generation.py ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ def generate_gcode(model_path):
2
+ try:
3
+ gcode_path = model_path.replace(".scad", ".gcode")
4
+ with open(gcode_path, "w") as f:
5
+ f.write(f"(G-Code generated for {model_path})")
6
+ return f"G-Code generated successfully: {gcode_path}"
7
+ except Exception as e:
8
+ return f"Error in G-Code generation: {str(e)}"