{"id":16201449,"url":"https://github.com/renumics/mesh2vec","last_synced_at":"2025-03-19T05:31:08.070Z","repository":{"id":70734316,"uuid":"604077004","full_name":"Renumics/mesh2vec","owner":"Renumics","description":"Turn CAE mesh data =\u003e aggregated element feature vectors for ML","archived":false,"fork":false,"pushed_at":"2024-02-29T15:03:14.000Z","size":15169,"stargazers_count":12,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-08T00:15:38.289Z","etag":null,"topics":["cae","d3plot","deep-learning","dyna","ls-dyna","machine-learning","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Renumics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-20T09:34:47.000Z","updated_at":"2024-06-19T12:12:45.456Z","dependencies_parsed_at":"2023-04-12T19:34:32.899Z","dependency_job_id":"7c429fa1-ef9f-4cd9-aa47-ba8176f761d3","html_url":"https://github.com/Renumics/mesh2vec","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Renumics%2Fmesh2vec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Renumics%2Fmesh2vec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Renumics%2Fmesh2vec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Renumics%2Fmesh2vec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Renumics","download_url":"https://codeload.github.com/Renumics/mesh2vec/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243971180,"owners_count":20376784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cae","d3plot","deep-learning","dyna","ls-dyna","machine-learning","python"],"created_at":"2024-10-10T09:38:07.934Z","updated_at":"2025-03-19T05:31:05.569Z","avatar_url":"https://github.com/Renumics.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Mesh2Vec\n========\n\nQuickstart\n-----------\n\n\u003ch1 align=\"center\"\u003emesh2vec\u003c/h1\u003e\n\u003cp align=\"center\"\u003eTurn CAE mesh data into aggregated element feature vectors for ML\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://github.com/renumics/mesh2vec\"\u003e\u003cimg src=\"https://img.shields.io/github/license/renumics/mesh2vec\" height=\"20\"/\u003e\u003c/a\u003e    \n \t\u003ca href=\"https://github.com/renumics/mesh2vec\"\u003e\u003cimg src=\"https://img.shields.io/pypi/pyversions/mesh2vec\" height=\"20\"/\u003e\u003c/a\u003e   \n \t\u003ca href=\"https://github.com/renumics/mesh2vec\"\u003e\u003cimg src=\"https://img.shields.io/pypi/wheel/mesh2vec\" height=\"20\"/\u003e\u003c/a\u003e   \n\u003c/p\u003e\n\u003ch3 align=\"center\"\u003e\n   \u003ca href=\"https://renumics.github.io/mesh2vec/\"\u003e\u003cb\u003eLatest Documentation\u003c/b\u003e\u003c/a\u003e\n\u003c/h3\u003e\n\n## 🚀 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## ⏱️ 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","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenumics%2Fmesh2vec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frenumics%2Fmesh2vec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenumics%2Fmesh2vec/lists"}