Skip to main content

Library for manipulating (Translate, Rotate and Scale) 3D data using numpy.

Project description

# Python Mesh Library
This library enable you to load stl file (both binary and ascii), manipulate the loaded data (translate, scale and rotate) and export the data in memory to stl file (both binary and ascii).

This library is inspired by [numpy-stl](https://github.com/WoLpH/numpy-stl).

## Feature
- Supported format
- STL(Binary, ASCII)
- OBJ(Wavefront, no material supported)

- Manipulation: Support affine transform
- Translate
- Rotate
- Scale

- Numpy is used for inner calculation so that it runs fast.

## Install
```
pip install pymesh
```

## Requirement
[numpy](http://www.numpy.org/) is required.

## Usage
### Load data
```
# STL
from mesh import stl
m = stl.Stl("sample.stl")

# OBJ
from mesh import obj
m = obj.Obj("sample.obj")
```

### Save data
```
# STL
m.save_stl("out.stl")

# OBJ
m.save_obj("out.obj")
```

### Transform
```
# Translate
m.translate_x(10)

# Rotate
m.rotate_y(30)

# Scale
m.scale(1, 2, 1)
```

## LICENSE
[MIT License](http://takuro.mit-license.org/)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pymesh, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size pymesh-0.1.0.tar.gz (4.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page