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 samples/publish-obj.ipynb Notebook for an example of how to publish an OBJ (and related) files.

Also see the 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 samples/export-obj.ipynb Notebook for an example of how to download a Evo Geoscience object to an OBJ.

Also see the 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.1.tar.gz (10.8 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.1-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: evo_data_converters_obj-0.0.1.tar.gz
  • Upload date:
  • Size: 10.8 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.1.tar.gz
Algorithm Hash digest
SHA256 fd926d655f2554d440f06eb9037e3fafd11d991a00e816616d1c6121aae217c3
MD5 65a62001adce5a4718d7af70fc31fa05
BLAKE2b-256 97049b3fcaf78dd7f62db8fb27bb860bd2a8d303989a776da80fe88a0f8f71a9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for evo_data_converters_obj-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 da1414b6a94c2761fb3bdd4a63f0bb5c71c6b2cf68f05b4fdc6af5a5140e243d
MD5 72b290cfc9ecc7f6fa59c1242c065e17
BLAKE2b-256 13a3ee30f50a1759a8d87b10d77711ac9f601fccf4ea1341d42657d7b5f385dd

See more details on using hashes here.

Provenance

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