Pymesh
Library for manipulating (Translate, Rotate and Scale) 3D data using numpy. Currently, this library supports STL & OBJ.
Install / Use
/learn @taxpon/PymeshREADME
Python Mesh Library
Feature
-
Supported format
- STL(Binary, ASCII)
- OBJ(Wavefront, no material supported)
-
Transform
- Translate
- Rotate
- Scale
-
Join
-
Analyze
- Volume
-
Numpy is used for inner calculation so that it runs fast.
Install
pip install pymesh
Requirement
numpy is required.
Usage
Load data
# STL
from pymesh import stl
m = stl.Stl("sample.stl")
# OBJ
from pymesh import obj
m = obj.Obj("sample.obj")
Save data
# STL
m.save_stl("out.stl")
# OBJ
m.save_obj("out.obj")
Create empty data
# STL
m = stl.Stl()
# OBJ
m = obj.Obj()
Transform
# Translate
m.translate_x(10)
# Rotate
m.rotate_y(30)
# Scale
m.scale(1, 2, 1)
# Method chain supported
m.translate_x(10).rotate_y(30).scale(10, 1, 1)
Join
- Combine multiple mesh data into one mesh
# Join
m.join(another)
Analyze
# Volume
m.get_volume()
Support
- Python 2.7+ and Python 3 are both supported
LICENSE
MISC
This library is inspired by numpy-stl.
Related Skills
openhue
349.9kControl Philips Hue lights and scenes via the OpenHue CLI.
sag
349.9kElevenLabs text-to-speech with mac-style say UX.
weather
349.9kGet current weather and forecasts via wttr.in or Open-Meteo
casdoor
13.3kAn open-source AI-first Identity and Access Management (IAM) /AI MCP & agent gateway and auth server with web UI supporting OpenClaw, MCP, OAuth, OIDC, SAML, CAS, LDAP, SCIM, WebAuthn, TOTP, MFA, Face ID, Google Workspace, Azure AD
