Skip to main content

A minimalistic Python library for loading Wavefront OBJ files.

Project description

miniobj

Minimum wavefront .obj file parser in Python

Installation

pip install miniobj

Usage

from miniobj import MiniObj

obj_mesh = MiniObj("mesh.obj")
# convert quad faces to triangles, ngon faces are not supported yet
obj_mesh.load(as_triangles=False)

obj_mesh.export("output.obj")

Quantization

obj_mesh.scale_unit() # scale min coord to 0, max coord to 1
obj_mesh.quantize(bins=64) # quantize to 64x64x64
obj_mesh.export("output.obj")

Check out main.py for more examples.

Project details


Download files

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

Source Distribution

miniobj-0.0.2.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

miniobj-0.0.2-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file miniobj-0.0.2.tar.gz.

File metadata

  • Download URL: miniobj-0.0.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for miniobj-0.0.2.tar.gz
Algorithm Hash digest
SHA256 d79961d18a7bd2ae35883c820dcaf6e23ddb52e68bcb61b2b02c03cc4a1da1fd
MD5 aca07f3814ffab53b8b26df8bc63060d
BLAKE2b-256 d560b516b4e0572dd122d17d37196f35f4d7f6628b1ec2e94a47127a023c103b

See more details on using hashes here.

File details

Details for the file miniobj-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: miniobj-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for miniobj-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2632cdf61cccf1efad152ea630b593f360f4e5bfa7663fc5c627771cb8c082c9
MD5 d40b14989beae78af236f9b85d1e3b42
BLAKE2b-256 545fbe89962bcc2dbda8e863a6db2e25ae643ceba61a1514096c577c557da2cc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page