Skip to content

Find the best orientation for 3D printing (FFF/FDM) STL files using constrained global nonlinear optimization (DIRECT algorithm)

License

Notifications You must be signed in to change notification settings

sameer/orient-stl

Repository files navigation

orient-stl: MATH4630 Nonlinear Optimization Final Project

See proposal.pdf and 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.

Running

Orient an STL file

python main.py examples/cube.stl orient

Plot the objective function value for an STL file

python main.py examples/cube.stl plot

Demo with cut cylinder.stl

Original part orientation

figures/Figure_1.png

Corrected part orientation

> 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`

figures/Figure_2.png

Function value plot

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

figures/Figure_3.png

About

Find the best orientation for 3D printing (FFF/FDM) STL files using constrained global nonlinear optimization (DIRECT algorithm)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages