# w-mesh-gms

> A tool for GMS data.

Latest version **1.0.25** (published 2026-09-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install w-mesh-gms
pnpm add w-mesh-gms
yarn add w-mesh-gms
bun add w-mesh-gms
```

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads; no types; no esm support.

## Facts

| | |
|---|---|
| Version | 1.0.25 |
| Published | 2026-09-18 |
| First published | 2023-11-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 1.3 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | yuda-lyu |
| Maintainers | semisphere |
| Keywords | package, tool, gms, nodejs |

## Links

- npm: https://www.npmjs.com/package/w-mesh-gms
- Repository: https://github.com/yuda-lyu/w-mesh-gms
- Homepage: https://github.com/yuda-lyu/w-mesh-gms#readme
- Issues: https://github.com/yuda-lyu/w-mesh-gms/issues
- npm.io page: https://npm.io/package/w-mesh-gms

## Dependencies (1)

- [wsemi](https://npm.io/package/wsemi.md) ^1.9.1

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 1.0.25 (latest) — 2026-09-18
- 1.0.24 — 2026-09-18
- 1.0.23 — 2026-09-13
- 1.0.22 — 2026-09-05
- 1.0.21 — 2026-09-02
- 1.0.20 — 2026-09-01
- 1.0.19 — 2026-08-26
- 1.0.18 — 2026-08-21
- 1.0.17 — 2026-08-19
- 1.0.16 — 2026-08-18
- 1.0.15 — 2026-08-18
- 1.0.14 — 2026-08-18
- 1.0.13 — 2026-08-18
- 1.0.12 — 2026-08-08
- 1.0.11 — 2026-08-08
- … 11 more at https://npm.io/package/w-mesh-gms/versions

## README

# w-mesh-gms
A tool for GMS data.

![language](https://img.shields.io/badge/language-JavaScript-orange.svg) 
[![npm version](http://img.shields.io/npm/v/w-mesh-gms.svg?style=flat)](https://npmjs.org/package/w-mesh-gms) 
[![license](https://img.shields.io/npm/l/w-mesh-gms.svg?style=flat)](https://npmjs.org/package/w-mesh-gms) 
[![npm download](https://img.shields.io/npm/dt/w-mesh-gms.svg)](https://npmjs.org/package/w-mesh-gms) 
[![npm download](https://img.shields.io/npm/dm/w-mesh-gms.svg)](https://npmjs.org/package/w-mesh-gms) 
[![jsdelivr download](https://img.shields.io/jsdelivr/npm/hm/w-mesh-gms.svg)](https://www.jsdelivr.com/package/npm/w-mesh-gms)

## Documentation
To view documentation or get support, visit [docs](https://yuda-lyu.github.io/w-mesh-gms/global.html).

## Installation

### Using npm(ES6 module):
```alias
npm i w-mesh-gms
```

#### Example for read:
> **Link:** [[dev source code](https://github.com/yuda-lyu/w-mesh-gms/blob/master/g-read.mjs)]
```alias
import fs from 'fs'
import _ from 'lodash-es'
import wmg from './src/WMeshGms.mjs'


function ttc(name, nodes, eles) {

    //head
    let head = `TITLE = "Mesh" VARIABLES = "X", "Y", "Z", "M"`

    //c
    let c = head + '\n'

    //h
    let h = `ZONE T="${name}",N=${_.size(nodes)}, E=${_.size(eles)}, F=fepoint, ET=brick`
    c += h + '\n'

    _.each(nodes, (node) => {
        let vs = [
            node.x,
            node.y,
            node.z,
            node.mat,
            // v1,
            // v2,
            // v3,
        ]
        let t = _.join(vs, ' ')
        c += t + '\n'
    })

    _.each(eles, (ele) => {
        let vs = ele.nodes
        let t = _.join(vs, ' ')
        c += t + '\n'
    })

    return c
}

let fpXyz = './_mesh/YiLan_xyz.txt'
let fpTop = './_mesh/YiLan_top.txt'
let fpBot = './_mesh/YiLan_bot.txt'
let fpMat = './_mesh/YiLan_mat.txt'
let fpOut = './_mesh/cv2tecplot.dat'
let name = 'cv2tecplot'

console.log('reading...')
wmg.readGms(fpXyz, fpTop, fpBot, fpMat)
    .then((r) => {

        console.log('converting...')
        let tc = ttc(name, r.nodes, r.eles)

        console.log('writing...')
        fs.writeFileSync(fpOut, tc, 'utf8')

        console.log('finish.')
    })
    .catch((err) => {
        console.log(err)
    })
```

#### Example for write:
> **Link:** [[dev source code](https://github.com/yuda-lyu/w-mesh-gms/blob/master/g-write.mjs)]
```alias
尚待開發
```

---
_Source: https://npm.io/package/w-mesh-gms · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
