Skip to content
Find the best orientation for 3D printing (FFF/FDM) STL files using constrained global nonlinear optimization (DIRECT algorithm)
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
figures
.gitignore
LICENSE
README.md
calculations.nb
calculations.pdf
direct.py
main.py
objective_function.py
plot.py
proposal.pdf
requirements.txt

README.md

orient-stl: MATH4630 Nonlinear Optimization Final Project

Project Proposal

See proposal.pdf

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

You can’t perform that action at this time.