https://github.com/sameer/orient-stl
Find the best orientation for 3D printing (FFF/FDM) STL files using constrained global nonlinear optimization (DIRECT algorithm)
https://github.com/sameer/orient-stl
3d-printing mathematica matplotlib nonlinear-optimization openscad python stl
Last synced: 10 months ago
JSON representation
Find the best orientation for 3D printing (FFF/FDM) STL files using constrained global nonlinear optimization (DIRECT algorithm)
- Host: GitHub
- URL: https://github.com/sameer/orient-stl
- Owner: sameer
- License: mit
- Created: 2019-02-22T19:28:08.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-07-06T21:33:49.000Z (over 2 years ago)
- Last Synced: 2025-04-11T00:49:56.938Z (10 months ago)
- Topics: 3d-printing, mathematica, matplotlib, nonlinear-optimization, openscad, python, stl
- Language: Mathematica
- Homepage:
- Size: 6.01 MB
- Stars: 10
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# orient-stl: MATH4630 Nonlinear Optimization Final Project
See [proposal.pdf](proposal.pdf) and [report.pdf](report.pdf) for more details on implementation and theory.
## Calculations in Mathematica
To verify the correctness of my objective function, I also mostly implemented it in Mathematica. See [calculations.pdf](calculations.pdf).
## Running
### Orient an STL file
```bash
python main.py examples/cube.stl orient
```
### Plot the objective function value for an STL file
```bash
python main.py examples/cube.stl plot
```
## Demo with cut cylinder.stl
### Original part orientation

### Corrected part orientation
```bash
> python main.py examples/cut cylinder.stl orientplot
`File "examples/cut cylinder.stl" oriented with angles [-2.62 -0. ] and value 0.12231975793838501 in 586 ms`
```

### Function value plot
```bash
> python main.py examples/cut cylinder.stl plot
Plotting function value for examples/cut cylinder.stl
Minimum value of 1.2497923374176025 found
```
