TriMesh4Js
OpenMesh C++ binding to NodeJS via node-addon-napi
Install / Use
/learn @BiancaZYCao/TriMesh4JsREADME
TriMesh4Js
OpenMesh binding via node-addon-napi
Node.js wrapper for OpenMesh C++ library using node-addon-api.
TriMesh-js is a Node.js addon, written in C++, that can be loaded into Node.js using the require() function, and used just as if they were an ordinary Node.js module.
The aim of the project is to provide a FFI between JavaScript running in Node.js and OpenMesh C++ library.
Prerequisites
Before starting to use this you need to assure you have the following prerequisites:
- Node.js: see download and install Node.js Node.js 14.0 or higher is required.
- node-gyp: see node-gyp
Another Option is Cmake to use CMake.js to build the addon
- CMake: see CMake download
- A proper C/C++ compiler tool: For Mac OS, can be Clang/GCC or CMake/make
- OpenMesh C++: see guide compiling OpenMesh
or you can easily install via brew
brew install open-mesh
Installation
Getting started
Examples
To view the examples, check AddonTriMeshTest.js
Project Status
Plugins implementation - TriMesh:
- [x] Init a TriMesh
- [x] Add Vertex
- [x] Add Face By Vertex Id
- [x] Set Point By Vertex Id
- [x] Add Face
- [x] Set Point
- [x] Get Points
- [x] VertexVertexIter (to find neighbouring vertex)
- [x] BFS NeighWeights (loop through the whole mesh)
- [ ] More Pending ...
Tests
There is a basic test file under /test folder using mocha with assert.
