@simzero/cfdutils
v1.1.4
Published
A set of JS utils for CFD
Downloads
5
Readme
cfdutils-js
WIP
Usage:
import cfdutils from '@simzero/cfdutils
import fs from 'fs'
(async () => {
await cfdutils.ready;
const converters = new cfdutils.converters();
const stlName = "square";
const stlData = fs.readFileSync(stlName + ".stl")
const stlToVtkData = converters.stlToVtk(stlData);
fs.writeFileSync("stlToVtk.vtk", stlToVtkData);
const stlToVtpData = converters.stlToVtp(stlData);
fs.writeFileSync("stlToVtp.vtp", stlToVtpData);
const vtkToStlData = converters.vtkToStl(stlToVtkData);
fs.writeFileSync("vtkToStl.stl", vtkToStlData);
const vtpToStlData = converters.vtpToStl(stlToVtpData);
fs.writeFileSync("vtkToStl.stl", vtpToStlData);
})();