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.1.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.1-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: evo_data_converters_obj-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 587a75a3dc0cc00684ccce653888d49b6d3d271fadb8525f1b3100d4b1e0443d
MD5 b0d4193838cea46622397f79ac73cd0a
BLAKE2b-256 a3c8682883dce887ceb809ff4b4c99240592b8d01b5eb912cdf851eae0e1b5d3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for evo_data_converters_obj-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b32977e94d8d35bbbd5b42f6ea25b877bae1971446c6e6549ff1b3c990466028
MD5 97acb52d26b75c164cdeddc5a1168732
BLAKE2b-256 b7c777719234f64ba4c3e9a72f6d11c245e99d2548b42f179ef89bbd71deb5bb

See more details on using hashes here.

Provenance

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