Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thibauts/remove-orphan-vertices
Removes orphan vertices in a simplicial complex
https://github.com/thibauts/remove-orphan-vertices
Last synced: 3 months ago
JSON representation
Removes orphan vertices in a simplicial complex
- Host: GitHub
- URL: https://github.com/thibauts/remove-orphan-vertices
- Owner: thibauts
- License: mit
- Created: 2015-03-01T13:53:32.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-01T13:53:55.000Z (almost 10 years ago)
- Last Synced: 2024-08-09T11:44:20.808Z (5 months ago)
- Language: JavaScript
- Size: 102 KB
- Stars: 6
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
remove-orphan-vertices
======================
### Removes orphan vertices in a simplicial complexCompletely reindexes positions and removes ununsed vertices along the way.
Install
-------```bash
$ npm install remove-orphan-vertices
```Usage
-----```javascript
var removeOrphanVertices = require('remove-orphan-vertices');var mesh = {
cells: [
[0, 2, 3]
],
positions: [
[0, 0, 0],
[1, 0, 0], // <- unused
[1, 0, 0],
[0, 1, 0],
[0, 0, 0] // <- unused
]
}mesh = removeOrphanVertices(mesh.cells, mesh.positions);
console.log(mesh);
/*
{
cells: [
[0, 1, 2]
],
positions: [
[0, 0, 0],
[1, 0, 0],
[0, 1, 0]
]
}
*/
```