Name | mesh2vec JSON |
Version |
1.1.2
JSON |
| download |
home_page | |
Summary | mesh2vec |
upload_time | 2023-12-14 06:20:11 |
maintainer | |
docs_url | None |
author | Renumics GmbH |
requires_python | >=3.8,<3.12 |
license | |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
Mesh2Vec
========
Quickstart
-----------
<h1 align="center">mesh2vec</h1>
<p align="center">Turn CAE mesh data into aggregated element feature vectors for ML</p>
<p align="center">
<a href="https://github.com/renumics/mesh2vec"><img src="https://img.shields.io/github/license/renumics/mesh2vec" height="20"/></a>
<a href="https://github.com/renumics/mesh2vec"><img src="https://img.shields.io/pypi/pyversions/mesh2vec" height="20"/></a>
<a href="https://github.com/renumics/mesh2vec"><img src="https://img.shields.io/pypi/wheel/mesh2vec" height="20"/></a>
</p>
<h3 align="center">
<a href="https://renumics.github.io/mesh2vec/"><b>Latest Documentation</b></a>
</h3>
## 🚀 Introduction
Mesh2vec is a tool that facilitates the import of Computer-Aided Engineering (CAE) mesh data from [LS-DYNA](https://www.ansys.com/de-de/products/structures/ansys-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
1. Create and activate a [virtual environment](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/).
2. Use the following command to install mesh2vec into your environment:
```bash
pip install mesh2vec
```
3. 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.
4. You may temporarily need to set an environment variable SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True.
### Load Mesh
```python
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
```python
m2v.add_features_from_ansa(
["aspect", "warpage"],
Path("data/hat/Hatprofile.k"),
json_mesh_file=Path("data/hat/cached_hat_key.json"))
```
### Aggregate
```python
import numpy as np
m2v.aggregate("aspect", [0,2,3], np.nanmean)
```
### Extract Feature Vectors
```python
m2v.to_dataframe()
```
![data frame with feature vectors](docs/source/_static/m2v.to_df.png)
### Optional: Visualize a single aggregated feature on mesh
```python
m2v.get_visualization_plotly("aspect-nanmean-2")
```
![3d mesh plot of agggredated](docs/source/_static/hat_aspect_3_plot.png)
Raw data
{
"_id": null,
"home_page": "",
"name": "mesh2vec",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<3.12",
"maintainer_email": "",
"keywords": "",
"author": "Renumics GmbH",
"author_email": "info@renumics.com",
"download_url": "",
"platform": null,
"description": "Mesh2Vec\n========\n\nQuickstart\n-----------\n\n<h1 align=\"center\">mesh2vec</h1>\n<p align=\"center\">Turn CAE mesh data into aggregated element feature vectors for ML</p>\n\n<p align=\"center\">\n\t<a href=\"https://github.com/renumics/mesh2vec\"><img src=\"https://img.shields.io/github/license/renumics/mesh2vec\" height=\"20\"/></a> \n \t<a href=\"https://github.com/renumics/mesh2vec\"><img src=\"https://img.shields.io/pypi/pyversions/mesh2vec\" height=\"20\"/></a> \n \t<a href=\"https://github.com/renumics/mesh2vec\"><img src=\"https://img.shields.io/pypi/wheel/mesh2vec\" height=\"20\"/></a> \n</p>\n<h3 align=\"center\">\n <a href=\"https://renumics.github.io/mesh2vec/\"><b>Latest Documentation</b></a>\n</h3>\n\n## \ud83d\ude80 Introduction\nMesh2vec is a tool that facilitates the import of Computer-Aided Engineering (CAE) mesh data from [LS-DYNA](https://www.ansys.com/de-de/products/structures/ansys-ls-dyna).\nIt 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.\n\n## \u23f1\ufe0f Quickstart\n\n\n### Installation\n1. Create and activate a [virtual environment](https://packaging.python.org/en/latest/guides/installing-using-pip-and-virtual-environments/).\n2. Use the following command to install mesh2vec into your environment:\n\n```bash\npip install mesh2vec\n```\n3. 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.\n4. You may temporarily need to set an environment variable SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL=True.\n\n### Load Mesh\n```python\n\nfrom pathlib import Path\nfrom mesh2vec.mesh2vec_cae import Mesh2VecCae\nm2v = Mesh2VecCae.from_ansa_shell(4,\n Path(\"data/hat/Hatprofile.k\"),\n json_mesh_file=Path(\"data/hat/cached_hat_key.json\"))\n```\n\n### Add element features\n```python\nm2v.add_features_from_ansa(\n [\"aspect\", \"warpage\"],\n Path(\"data/hat/Hatprofile.k\"),\n json_mesh_file=Path(\"data/hat/cached_hat_key.json\"))\n```\n\n### Aggregate\n```python\nimport numpy as np\nm2v.aggregate(\"aspect\", [0,2,3], np.nanmean)\n```\n\n### Extract Feature Vectors\n```python\nm2v.to_dataframe()\n```\n![data frame with feature vectors](docs/source/_static/m2v.to_df.png)\n\n### Optional: Visualize a single aggregated feature on mesh\n```python\nm2v.get_visualization_plotly(\"aspect-nanmean-2\")\n```\n![3d mesh plot of agggredated](docs/source/_static/hat_aspect_3_plot.png)\n\n\n\n",
"bugtrack_url": null,
"license": "",
"summary": "mesh2vec",
"version": "1.1.2",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "875e1340bc001f08cd7ac7b6a3c0ffb770721b703f245a3aa057f4aa4374aa69",
"md5": "034aaa9b447daa496f3de252feba2d79",
"sha256": "3a7e1fb216a7cc4cecf1fe3ee49ca45e340ece1a270139ff8ad774624df331d5"
},
"downloads": -1,
"filename": "mesh2vec-1.1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "034aaa9b447daa496f3de252feba2d79",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<3.12",
"size": 23496,
"upload_time": "2023-12-14T06:20:11",
"upload_time_iso_8601": "2023-12-14T06:20:11.347146Z",
"url": "https://files.pythonhosted.org/packages/87/5e/1340bc001f08cd7ac7b6a3c0ffb770721b703f245a3aa057f4aa4374aa69/mesh2vec-1.1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-14 06:20:11",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "mesh2vec"
}