Skip to main content

A library that can be used to easily convert a collada file (.dae) to a wavefront file (.obj).

Project description

collada2obj

codecov

This Python library can be used to easily convert collada (i.e., .dae) files to wavefront (i.e., .obj ) files. This transformation between file formats for 3d models is useful for a variety of applications, though this library was motivated by the need for this transformation in some robotics applications.

At the moment, this library is a work in progress and is not yet fully functional. However, the basic functionality is there and the library can be used to convert simple collada files to obj files.

See the examples directory for example usages of the library.

Installation

To install this library, you can use pip:

pip install collada2obj

Local Installation

If you want to install this library locally (recommended only if you want to tweak/play around with collada2obj itself), then you can clone this repository and install it using pip in the following way:

Change to the root directory of this repo and then run the following command:

pip install -e .

Usage

from collada2obj import ColladaFileConverter

def main(input_filename: str = "../convert_base_mesh/base.dae", output_filename: str = "./out.obj"):
    # Setup
    print(
        "Create a converter for the Collada file \"{}\" and export to OBJ file \"{}\"."
        .format(input_filename, output_filename)
    )
    converter = ColladaFileConverter(dae_filename=input_filename, obj_filename=output_filename)
    converter.export_obj()

if __name__ == '__main__':
    main()

Acknowledgements

This library was initially created by the user @georgethrax on GitHub. It was later expanded and refactored by the Wrench Robotics team.

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

collada2obj-0.1.1.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

collada2obj-0.1.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file collada2obj-0.1.1.tar.gz.

File metadata

  • Download URL: collada2obj-0.1.1.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for collada2obj-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1d7250705b2c7dbd51fae8b25deacd530220b193345714389b3dadc0eda7adc7
MD5 61a2ea7248d4dff1a311f02bdf1a243e
BLAKE2b-256 6e74c01e142f7e2128d55c1531b3962ec88ba0537d25bba598a20b72a352054a

See more details on using hashes here.

File details

Details for the file collada2obj-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: collada2obj-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for collada2obj-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 70d4d60777e97af5d66703ee915d8b8f643bc32eced8c1c738ec4b603996e4bb
MD5 35d76ba3c74c3c977b949ec052e00816
BLAKE2b-256 859719a0725a203f86f980f9cc56bc96979fc7d3878e912f7d17535892b226aa

See more details on using hashes here.

Supported by

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