Metadata-Version: 2.1
Name: stl2obj
Version: 0.2.dev0
Summary: C++ std to obj converter for Python
Home-page: https://github.com/Neizvestnyj/stl-to-obj
Author: Neizvestnyj
License: GPL-3
Keywords: python,c++,cython,std2obj
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Operating System :: OS Independent
Classifier: Operating System :: Android
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: POSIX :: BSD :: FreeBSD
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: iOS
Classifier: Operating System :: MacOS
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Environment :: MacOS X
Classifier: Environment :: Win32 (MS Windows)
Classifier: Environment :: X11 Applications
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Software Development :: User Interfaces
Classifier: Topic :: Scientific/Engineering :: Human Machine Interfaces
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE

# stl-to-obj

## What is it?
It is powerful python tool to convert stl file to obj using c++ in backend and built 
with cython for all platforms

[![PyPI version](https://img.shields.io/pypi/v/stl2obj.svg)](https://pypi.org/project/stl2obj)
[![Documentation Status](https://readthedocs.org/projects/stl-to-obj/badge/?version=latest)](https://stl-to-obj.readthedocs.io/en/latest/?badge=latest)
[![Supported Python versions](https://img.shields.io/pypi/pyversions/stl2obj.svg)](https://pypi.org/project/stl2obj)
[![Downloads](https://pepy.tech/badge/stl2obj)](https://pepy.tech/project/stl2obj)
[![Repository size](https://img.shields.io/github/repo-size/Neizvestnyj/stl-to-obj.svg)](https://pypi.python.org/pyp/stl-to-obj)

## Build pure c++
1. Install [CMake](https://cmake.org/install/)
2. Then run
    1. **Winows:** `build.cmd` and in `build\Debug` folder you will find **exe** file
    2. **Linux/macOS:** `sh build.sh` and you will find runnable `stl2obj` in `build` folder
3. In terminal type 
```bash
# Windows
stl2obj.exe <src> <dst>
# Linux/MacOS
./stl2obj <src> <dst>
```
4. Enjoy fast conversion!

## Installation
From [pypi](https://pypi.org/project/stl2obj/)
```bash
pip install stl2obj
```

From [GitHub](https://github.com) directly
```bash
pip install https://github.com/Neizvestnyj/stl-to-obj/archive/master.zip
```
**OR**

if needed `python setup.py clean --all`
```bash
git clone https://github.com/Neizvestnyj/stl-to-obj.git
cd stl-to-obj-master
python setup.py install
```

## Usage
```py
from stl2obj import Stl2Obj

stl = 'path-to-stl-file'
obj = 'path-to-obj-file'
callback = lambda code: print(code)

Stl2Obj().convert(stl, obj, callback)
```

## Usage with [python-for-android](https://github.com/kivy/python-for-android)
### Installation
```bash
pip install buildozer
```

### buildozer.spec
```
requirements = kivy, stl2obj
p4a.local_recipes = <path-to-stl2obj-recipe-folder>
```

**in console**
```bash
buildozer android debug deploy run logcat
```

or just copy *recipes* to *examples/kivy_example* folder and run `buildozer android debug deploy run logcat`

## Usage with [kivy-ios](https://github.com/kivy/kivy-ios)
### Installation

```bash
pip install git+https://github.com/kivy/kivy-ios.git
```

**in console**
```bash
toolchain build python3 kivy
toolchain build stl2obj --add-custom-recipe=recipes/ios/stl2obj
toolchain create Stl-to-obj examples/kivy_example
```

## Authors

[Neizvestnyj](https://github.com/Neizvestnyj), [psychowasp](https://github.com/psychowasp), [Amir Baserinia](https://github.com/baserinia)
