mesh2vec
Project description
Mesh2Vec
Quickstart
mesh2vec
Turn CAE Mesh Data Into Vectors
Latest Documentation
🚀 Introduction
Mesh2vec is a tool that facilitates the import of Computer-Aided Engineering (CAE) mesh data from LS-DYNA . It utilizes various metrics of elements and their surrounding neighborhood to aggregate feature vectors for each element.
⏱️ 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.
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")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
mesh2vec-1.0.1-py3-none-any.whl
(19.8 kB
view hashes)