Skip to main content

Python data converters for Wavefront Technologies OBJ/MTL file to Evo geoscience objects

Project description

Seequent logo

PyPI - Version

Seequent Developer PortalSeequent CommunitySeequent website

Evo

Evo is a unified platform for geoscience teams. It enables access, connection, computation, and management of subsurface data. This empowers better decision-making, simplified collaboration, and accelerated innovation. Evo is built on open APIs, allowing developers to build custom integrations and applications. Our open schemas, code examples, and SDK are available for the community to use and extend.

Evo is powered by Seequent, a Bentley organisation.

Pre-requisites

  • Python virtual environment with Python 3.10, 3.11, or 3.12
  • Git

Installation

pip install evo-data-converters-obj

OBJ

The OBJ 3D mesh format is a legacy of Wavefront Technologies, but is now a common format for specifying polygon meshes, optionally with texture data (stored in a separate MTL file).

Implementations

The Python Trimesh package is used to work with OBJ files by default, for import and export. There is a second importer implementation that uses TinyOBJ. TinyOBJ might be more suitable for very large meshes.

To use TinyOBJ, it will have to be installed. Once it is installed, you can specify the TinyOBJ backend via a parameter to convert_obj(): convert_obj(..., implementation="tinyobj").

Installing tinyobjloader

The TinyOBJ library is good, but the PyPI release has unstable Python bindings. This version was found to work. You will have to do it after every uv sync:

uv pip install tinyobjloader@git+https://github.com/tinyobjloader/tinyobjloader.git#a4e519b0a0f29c790464fcfeadfe25a7f9fa15ff

Alternatively, you can edit packages/obj/pyproject.toml:

[project.optional-dependencies]
optional_parsers = [
    # v2 is not yet stable, the current release (2.0.0rc13) doesn't work
    "tinyobjloader@git+https://github.com/tinyobjloader/tinyobjloader.git#a4e519b0a0f29c790464fcfeadfe25a7f9fa15ff",
]

Then do uv sync --extra optional_parsers.

Publish geoscience objects from an OBJ file

The evo-sdk-common Python library can be used to sign in. After successfully signing in, the user can select an organisation, an Evo hub, and a workspace. Use evo-objects to get an ObjectAPIClient, and evo-data-converters-common to convert your file.

Have a look at the code-samples/publish-obj.ipynb Notebook for an example of how to publish an OBJ (and related) files.

Also see the code-samples/publish-obj-script.py example of using convert_obj() inside a python script.

Exporting Triangle Mesh objects to OBJ

To export Triangle Mesh objects from Evo to an OBJ file, call await export_obj() supplying an output file path and a list of EvoObjectMetadata containing the UUIDs of the Evo objects.

EvoObjectMetadata can also specify the version of each object to export. If not specified, so it will export the latest version.

See documentation on the ObjectAPIClient for listing objects and getting their IDs and versions.

You will need the same selection of organisation, Evo hub, and workspace that is needed for importing objects.

See the code-samples/export-obj.ipynb Notebook for an example of how to download a Evo Geoscience object to an OBJ.

Also see the code-samples/export-obj-script.py example of using export_obj() inside a python script.

Code of conduct

We rely on an open, friendly, inclusive environment. To help us ensure this remains possible, please familiarise yourself with our code of conduct.

License

Evo data converters are open source and licensed under the Apache 2.0 license.

Copyright © 2025 Bentley Systems, Incorporated.

Licensed under the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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

evo_data_converters_obj-0.1.0.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

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

evo_data_converters_obj-0.1.0-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file evo_data_converters_obj-0.1.0.tar.gz.

File metadata

  • Download URL: evo_data_converters_obj-0.1.0.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for evo_data_converters_obj-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8cd201d9e4bcd58e3d07dee609aefc4e54804f301e353a38fed50d2671e7e7e1
MD5 a0c5bbd0f2cec49977b703c6c014bda6
BLAKE2b-256 beace40cfc39f63b48e97898db66d2e1ee2b11640e71719a22aa0ef0c0d94d10

See more details on using hashes here.

Provenance

The following attestation bundles were made for evo_data_converters_obj-0.1.0.tar.gz:

Publisher: publish-obj.yaml on SeequentEvo/evo-data-converters

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file evo_data_converters_obj-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for evo_data_converters_obj-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7cac9031457a615f1ad29ac1dee90f201e5bfd90d56c03cefe5191d236ac47ab
MD5 dfc922a51ea624b7cd42517888ac26b5
BLAKE2b-256 7f4883215c820a1ff00fe3002e1f68e9987394a4e9da6ab525df4e3f7f6840da

See more details on using hashes here.

Provenance

The following attestation bundles were made for evo_data_converters_obj-0.1.0-py3-none-any.whl:

Publisher: publish-obj.yaml on SeequentEvo/evo-data-converters

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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