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.0.2.tar.gz (11.1 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.0.2-py3-none-any.whl (17.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for evo_data_converters_obj-0.0.2.tar.gz
Algorithm Hash digest
SHA256 a92dc4f3ed1746b61168849a5b6e31312f4d3346a37985c2ce8f7c62366ef839
MD5 e842ec48e2576d4f26967a34a39a6d0f
BLAKE2b-256 f619d2e7605907181cd5e995497e213ccc53b89bc7c73793afc361bb204e0600

See more details on using hashes here.

Provenance

The following attestation bundles were made for evo_data_converters_obj-0.0.2.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.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for evo_data_converters_obj-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4675fa62c9ec4d441d6b3898d5a2baa943ef4a272252c1e378ef0f44bac76568
MD5 6331a909061209383c448c45bb31e8f7
BLAKE2b-256 773f840e8ab2c7613b24e175e8eb9875c8cad6667954129667ab027f7c45015c

See more details on using hashes here.

Provenance

The following attestation bundles were made for evo_data_converters_obj-0.0.2-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