Spaces:
Build error
Build error
Update utils/ Utility scripts_cad_operations.py
Browse files
utils/ Utility scripts_cad_operations.py
CHANGED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import FreeCAD
|
| 2 |
+
import Part
|
| 3 |
+
|
| 4 |
+
def create_cad_model(length, width, height, material):
|
| 5 |
+
"""
|
| 6 |
+
Create a basic 3D box based on user input (dimensions, material).
|
| 7 |
+
In a real-world scenario, this function can be extended to handle more complex geometry.
|
| 8 |
+
"""
|
| 9 |
+
# Creating a 3D box
|
| 10 |
+
box = Part.makeBox(length, width, height)
|
| 11 |
+
Part.show(box)
|
| 12 |
+
return box
|