It is powerful python tool to convert .stl file to .obj and .obj file to .stl using c++ in backend and built with cython for all platforms
- Install CMake
- Then run
- Winows:
build.cmdand inbuild\Debugfolder you will find exe file - Linux/macOS:
sh build.shand you will find runnablestl2objinbuildfolder
- Winows:
- In terminal type
# Windows
stl2obj.exe <src> <dst>
# Linux/MacOS
./stl2obj <src> <dst>- Enjoy fast conversion!
From pypi
pip install stl2objFrom GitHub directly
pip install https://github.com/Neizvestnyj/stl-to-obj/archive/master.zipOR
if needed python setup.py clean --all
git clone https://github.com/Neizvestnyj/stl-to-obj.git
cd stl-to-obj-master
python setup.py installfrom stl2obj import Stl2Obj
src = 'path-to-src-file' # may be stl or obj
dst = 'path-to-dst-file' # may be stl or obj
callback = lambda code: print(code)
Stl2Obj().convert(src, dst, callback)Usage with python-for-android
pip install buildozerrequirements = kivy, stl2obj
p4a.local_recipes = <path-to-stl2obj-recipe-folder>
in console
buildozer android debug deploy run logcator just copy recipes to examples/kivy_example folder and run buildozer android debug deploy run logcat
Usage with kivy-ios
pip install git+https://github.com/kivy/kivy-ios.gitin console
toolchain build python3 kivy
toolchain build stl2obj --add-custom-recipe=recipes/ios/stl2obj
toolchain create Stl-to-obj examples/kivy_example