{"id":13823194,"url":"https://github.com/c3m-labs/ImportMesh","last_synced_at":"2025-07-08T16:31:11.434Z","repository":{"id":202111350,"uuid":"118913863","full_name":"c3m-labs/ImportMesh","owner":"c3m-labs","description":"Utilities for importing FEM meshes to Mathematica","archived":false,"fork":false,"pushed_at":"2021-04-20T19:59:41.000Z","size":362,"stargazers_count":14,"open_issues_count":0,"forks_count":6,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-08-05T09:11:36.645Z","etag":null,"topics":["finite-element-methods","mathematica","mesh-import","wolfram-language"],"latest_commit_sha":null,"homepage":null,"language":"Mathematica","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/c3m-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-01-25T13:06:20.000Z","updated_at":"2021-05-14T02:40:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"f5d4571b-5086-4ca2-8a98-d596e62c2e5d","html_url":"https://github.com/c3m-labs/ImportMesh","commit_stats":null,"previous_names":["c3m-labs/importmesh"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c3m-labs%2FImportMesh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c3m-labs%2FImportMesh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c3m-labs%2FImportMesh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c3m-labs%2FImportMesh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/c3m-labs","download_url":"https://codeload.github.com/c3m-labs/ImportMesh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225449314,"owners_count":17476069,"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":["finite-element-methods","mathematica","mesh-import","wolfram-language"],"created_at":"2024-08-04T09:00:24.356Z","updated_at":"2024-11-20T00:30:55.008Z","avatar_url":"https://github.com/c3m-labs.png","language":"Mathematica","readme":"# ImportMesh\n\n__This package is obsolete.__\n__Its functionality, with additional upgrades, is now included in__\n__[FEMAddOns](https://github.com/WolframResearch/FEMAddOns) from Wolfram Research.__\n\nUtilities for importing FEM meshes to Mathematica. Currently supported file formats:\n\n- .inp ([Abaqus](https://www.3ds.com/products-services/simulia/products/abaqus/))\n- .mes ([Elfen](http://www.rockfieldglobal.com/))\n- .msh ([Gmsh](http://gmsh.info/))\n- .mphtxt ([Comsol](https://www.comsol.com/))\n\n## Installation\n\nThe following description is for people who just want to use the package functionality and\nare not interested in package development.\n\nTo use _ImportMesh_ package you need Mathematica version 11. or later.\n\n_ImportMesh_ package is released in the `.paclet` file format, which contains code,\ndocumentation and other necessary resources.\nDownload the latest `.paclet` file from the repository [\"releases\"](https://github.com/c3m-labs/ImportMesh/releases) page\nto your computer and install it by evaluating the following command in the Mathematica:\n\n````mathematica\n(* This built-in package is usually loaded automatically at kernel startup. *)\nNeeds[\"PacletManager`\"]\n\n(* Path to .paclet file downloaded from repository \"releases\" page. *)\nPacletInstall[\"full/path/to/ImportMesh-X.Y.Z.paclet\"]\n````\n\nThis will permanently install the _ImportMesh_ package to `$UserBasePacletsDirectory`.\nTo update the documentation it may be necessary to restart Mathematica.\nMathematica will always use the latest installed version of package and all installed versions\ncan be enumerated by evaluating `PacletFind[\"ImportMesh\"]`.\nYou can get more detailed information about the package with `PacletInformation[\"ImportMesh\"]`.\nAll versions can be uninstalled with:\n\n````mathematica\nPacletUninstall[\"ImportMesh\"]\n````\n\nAlternately load the package directly from online repository by running\n`Get[\"https://raw.githubusercontent.com/c3m-labs/ImportMesh/master/ImportMesh.wl\"]`.\n\n## Usage\n\n### Basic\n\nThe only (currently) public function is  `ImportMesh`. It creates `ElementMesh` object from a text file:\n\n````mathematica\nGet[\"ImportMesh`\"]\n\nmesh=ImportMesh[\"path/to/your_mesh_file\"];\nmesh[\"Wireframe\"]\n````\n\n![screenshot](https://imgur.com/aq92uqA.gif \"Geometry source: https://grabcad.com/library/goose-2\")\n\n### Advanced\n\nThere are also functions in the ``\"`Package`\"`` subcontext that implement `ImportMesh`.\nSimilarly, support is added for `Import` registration, so it is possible to import a file as an\n`\"ElementMesh\"` and get it to work as expected. For example:\n\n````mathematica\n$repURL = \"https://raw.githubusercontent.com/c3m-labs/ImportMesh/master\";\nfile = URLDownload@($repURL \u003c\u003e \"/Tests/Gmsh/Hex8_box.msh\");\n\nmesh = Import[file, \"ElementMesh\"];\npic = mesh[\"Wireframe\"[\"MeshElementStyle\" -\u003e FaceForm@LightBlue]]\n````\n\n![example](Images/Example1.png \"Import base\")\n\nSupport is also provided for import as a string if the format type of the file is known:\n\n````mathematica\ninputText = ReadString@($repURL \u003c\u003e \"/Tests/Abaqus/Quad4_annulus.inp\");\nmesh = ImportString[inputText, \"AbaqusMesh\"];\npic = mesh[\"Wireframe\"[\"MeshElementStyle\" -\u003e FaceForm@LightBlue]]\n````\n\n![example](Images/Example2.png \"Import string\")\n\nSpecific elements may also be extracted when the format is known:\n\n````mathematica\nImportString[inpText, {\"AbaqusMesh\", \"Elements\"}]\n(* {\"Mesh\", \"MeshNodes\", \"MeshElements\"} *)\n````\n\n````mathematica\nImportString[inpText, {\"AbaqusMesh\", \"MeshNodes\"}]\n(* {{0.,1.}, {0., 1.4375}, ... } *)\n````\n\nMore information on how to manipulate and visualize `ElementMesh` objects is available in official\n[documentation](https://reference.wolfram.com/language/FEMDocumentation/tutorial/ElementMeshVisualization.html)\n\n## Contributing and bug reports\n\nYou can open a new [issue](https://github.com/c3m-labs/ImportMesh/issues/new) with bug report or feature request.\n\nContributions to ImportMesh package are very welcome.\nGuidelines on how to build paclet file from source code can be found in [CONTRIBUTING.md]( CONTRIBUTING.md ) file.\nThese are some things you can help with:\n\n- Test package with different mesh files\n- Provide sample mesh files from other, not yet supported, software\n- Propose code improvements (style or performance)\n","funding_links":[],"categories":["Finite Element Method Analysis"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc3m-labs%2FImportMesh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc3m-labs%2FImportMesh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc3m-labs%2FImportMesh/lists"}