Mesh2Vec
Quickstart
mesh2vec
Turn CAE mesh data into aggregated element feature vectors for ML
Latest Documentation
🚀 Introduction
Mesh2vec is a tool that facilitates the import of Computer-Aided Engineering (CAE) mesh data from LS-DYNA. It utilizes various quality metrics of elements and their surrounding neighborhood to aggregate feature vectors for each element. These feature vectors are of equal length and can be effectively utilized as inputs for machine learning methods. This represents a simpler and more efficient alternative to traditional mesh and graph-based approaches for automatic mesh quality analysis.
⏱️ Quickstart
Installation
- Create and activate a virtual environment.
- Use the following command to install mesh2vec into your environment:
pip install mesh2vec
- Please make sure you have an environment variable ANSA_EXECUTABLE set pointing to your ANSA executable to use ANSA depended features like shell and feature import.
- You may temporarily need to set an environment variable SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True.
Load Mesh
from pathlib import Path
from mesh2vec.mesh2vec_cae import Mesh2VecCae
m2v = Mesh2VecCae.from_ansa_shell(4,
Path("data/hat/Hatprofile.k"),
json_mesh_file=Path("data/hat/cached_hat_key.json"))
Add element features
m2v.add_features_from_ansa(
["aspect", "warpage"],
Path("data/hat/Hatprofile.k"),
json_mesh_file=Path("data/hat/cached_hat_key.json"))
Aggregate
import numpy as np
m2v.aggregate("aspect", [0,2,3], np.nanmean)
Extract Feature Vectors
m2v.to_dataframe()
Optional: Visualize a single aggregated feature on mesh
m2v.get_visualization_plotly("aspect-nanmean-2")
Metadata
Release files for mesh2vec 1.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mesh2vec-1.3.2-py3-none-any.whl | Python 3 | none | any | Details |
Release files / mesh2vec-1.3.2-py3-none-any.whl
| Download URL | mesh2vec-1.3.2-py3-none-any.whl |
|---|---|
| Size | 24.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
41b17685e83f3c6ec92ce9440f981e6f6a1db4e2972bfb7035cdddf3aed904dd
|
|
BLAKE2b-256 checksum How to use checksums |
bc82551d092c8589ef25921e29ea7a14e9f438bb99e27f59a5d6f5714809a079
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for mesh2vec 1.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.