A simple web service which given an STL will produce a pricing quote for a 3D printed part
-
The STL surface is not checked for closeness
-
For speed the STL vertices are duplicated, i.e.
-
The web server is based on Boost asio http server example
-
A 15% margin has been added to the volume at the end.
-
The web server returns just plain text for now. Needs to formated to JSON in future
-
The STL files need to be uploaded to
volumesource\tests
-
Server port is hard coded to http://178.79.141.54:8080
-
The project is only C++11
-
It depends on Boost 1.67.0 and cmake 1.11
-
It was built with cross platform in mind. It is currently built on Windows with Visual Studio 2017, but should work on Linux with minor changes.
-
To build on windows look at bin/build.bat and adapt it for your setup
-
Download boost binaries
boost_1_67_0-msvc-14.1-64.exe
at same level asvolumesource
inboost\1.67.0
. -
To build
cd volumesource
mkdir build
cd build
cmake .. -G "Visual Studio 15 2017 Win64" -DBOOST_ROOT="<path to boost installation>\boost\1.67.0\boost_1_67_0"
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools\VsDevCmd.bat"
cd path\to\build
devenv volumesource.sln /build
cd volumesource
build\Release\volumesource.exe tests\block100.stl
Open browser and enter:
- http://178.79.141.54:8080/volume?filename=block100.stl
- http://178.79.141.54:8080/volume?filename=bottle.stl
- http://178.79.141.54:8080/volume?filename=humanoid.stl
- http://178.79.141.54:8080/volume?filename=magnolia.stl
- http://178.79.141.54:8080/volume?filename=Mario_20170209.STL
- http://178.79.141.54:8080/volume?filename=shoe.stl
- http://178.79.141.54:8080/volume?filename=sphere.stl
- http://178.79.141.54:8080/volume?filename=teapot.stl