GithubHelp home page GithubHelp logo

plloppii / modelplacement Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 7.05 MB

C++ application that takes in 3D STL model files, parses them, then auto orients them onto a desired build platform

C++ 100.00%

modelplacement's Introduction

Auto Layout Algorithm
Noah Pan

References:
STL Formating Info
https://all3dp.com/what-is-stl-file-format-extension-3d-printing/
Bin Packing Algorithm
http://blackpawn.com/texts/lightmaps/default.html
https://codeincomplete.com/posts/bin-packing/

Summary of Code:
1) Take in a series of models and parse them to extact the width and length details. 
2) Models are sorted according to the max(width, length)
3) Call Buildplatform object
4) Take in each model and place each one on the buildplatform creating a tree structure
5) Function that inserts node into tree is called recursively to divide the buildplatform into smaller rectangular sections. (see design notes)


Design Notes:
-A previous algorithm can be implemented before the packing algorithm to orient the model in it's optimal printing orientation. This algorithm would first look for the largest collection of triangles that are parallel. The area with the largest surface area would be the surface that would stick the best to the build surface.
-Another method of model orientation would be to calculate the orientation with the least amount of overhangs (angles greater than 45 degrees).
-The tree structure would be created based on keeping the total model width and length as square as possible.


Incomplete Tasks:
-Finish implementation of tree data structure
-Turning the algorithm into a templated class. 

Assumptions:
Binary STL file used
Models are orieted in the optimal printing orientation


File Structure:
Buildplatform.h -> Node.h -> Model.h -> Triangle.h -> Point.h
						  \->Rectangle2D.h



Directions for Compliation:
Compile with: g++ -Wall -o Makefile.exe main.cpp Triangle.cpp Point.cpp Model.cpp Buildplatform.cpp Rectangle2D.cpp Node.cpp

Running output file:
./Makefile.exe

modelplacement's People

Contributors

plloppii avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.