@hendoi/henmesh 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +136 -73
- package/dist/client.d.ts +2 -2
- package/dist/client.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,125 +1,188 @@
|
|
|
1
|
-
# @hendoi/henmesh
|
|
1
|
+
# @hendoi/henmesh
|
|
2
2
|
|
|
3
|
-
Official
|
|
3
|
+
**Official JavaScript / TypeScript SDK for [HENMESH](https://henmesh.hendoi.com)** — HENDOI’s mesh / grid-prep product.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**Version 0.1.2** · [npm package page](https://www.npmjs.com/package/@hendoi/henmesh)
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
---
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## Why this package exists (purpose)
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Before CFD or FEA, you need a **mesh** you can trust enough for screening — 2-D airfoil/section grids, quality checks, independence / GCI, and 3-D wing meshes.
|
|
12
|
+
|
|
13
|
+
This npm package lets you run HENMESH **from code**:
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
- Generate 2-D / 3-D meshes
|
|
16
|
+
- Check quality and independence
|
|
17
|
+
- Build FSI maps
|
|
18
|
+
- Ask for CAD formats
|
|
14
19
|
|
|
15
|
-
`@hendoi/henmesh`
|
|
20
|
+
**In one sentence:** use `@hendoi/henmesh` when you want mesh prep automation in Node/TypeScript — same cloud product as the website.
|
|
16
21
|
|
|
17
|
-
|
|
22
|
+
It does **not** install HyperMesh on your PC. It calls the HENMESH cloud API.
|
|
18
23
|
|
|
19
|
-
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Who should use it (applications)
|
|
20
27
|
|
|
21
|
-
|
|
|
28
|
+
| You are… | You use this package to… |
|
|
22
29
|
|---|---|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
|
|
|
27
|
-
|
|
30
|
+
| CFD prep engineer | Script 2-D / 3-D mesh generate + quality |
|
|
31
|
+
| Automation developer | Overnight mesh independence / GCI jobs |
|
|
32
|
+
| FSI workflow owner | Map fluid ↔ structure meshes |
|
|
33
|
+
| Stack user | Mesh after HENFOIL/HENSYNTH, before HENFLOW |
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Where you use it
|
|
38
|
+
|
|
39
|
+
1. Your Node/TypeScript project
|
|
40
|
+
2. Production host `https://henmesh.hendoi.com`
|
|
41
|
+
3. API key starting with `hmk_…`
|
|
42
|
+
|
|
43
|
+
Website links:
|
|
44
|
+
|
|
45
|
+
- Product: [hendoi.com/products/henmesh](https://hendoi.com/products/henmesh)
|
|
46
|
+
- App: [henmesh.hendoi.com](https://henmesh.hendoi.com)
|
|
47
|
+
- Complete guide: [hendoi.com/blog/henmesh-complete-product-guide](https://hendoi.com/blog/henmesh-complete-product-guide)
|
|
48
|
+
- Help: [hendoi.com/help/henmesh](https://hendoi.com/help/henmesh)
|
|
49
|
+
- FAQ: [hendoi.com/faq](https://hendoi.com/faq)
|
|
50
|
+
- Pricing: [hendoi.com/pricing](https://hendoi.com/pricing)
|
|
51
|
+
- API overview: [api.hendoi.com/?doc=henmesh-overview](https://api.hendoi.com/?doc=henmesh-overview)
|
|
52
|
+
- Auth: [api.hendoi.com/?doc=henmesh-authentication](https://api.hendoi.com/?doc=henmesh-authentication)
|
|
53
|
+
- All JS SDKs: [api.hendoi.com/?doc=javascript-sdk](https://api.hendoi.com/?doc=javascript-sdk)
|
|
54
|
+
|
|
55
|
+
---
|
|
28
56
|
|
|
29
|
-
|
|
57
|
+
## What you need
|
|
30
58
|
|
|
31
|
-
|
|
59
|
+
- HENMESH key `hmk_…`
|
|
60
|
+
- Node.js **18+**
|
|
32
61
|
|
|
33
|
-
|
|
34
|
-
- HENMESH API key `hmk_…`
|
|
35
|
-
- License: **LicenseRef-Proprietary** (HENDOI)
|
|
62
|
+
---
|
|
36
63
|
|
|
37
64
|
## Install
|
|
38
65
|
|
|
39
66
|
```bash
|
|
67
|
+
# PURPOSE: add the HENMESH SDK
|
|
40
68
|
npm install @hendoi/henmesh
|
|
41
|
-
npm install @hendoi/henmesh@0.1.
|
|
69
|
+
npm install @hendoi/henmesh@0.1.2
|
|
42
70
|
```
|
|
43
71
|
|
|
44
|
-
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Set your API key
|
|
45
75
|
|
|
46
76
|
```bash
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
# local: export HENMESH_API_URL=http://localhost:8005
|
|
77
|
+
# PURPOSE: authenticate HENMESH calls
|
|
78
|
+
export HENMESH_API_KEY=hmk_YOUR_KEY_HERE
|
|
50
79
|
```
|
|
51
80
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
81
|
+
PowerShell:
|
|
82
|
+
|
|
83
|
+
```powershell
|
|
84
|
+
$env:HENMESH_API_KEY="hmk_YOUR_KEY_HERE"
|
|
55
85
|
```
|
|
56
86
|
|
|
57
|
-
|
|
87
|
+
```bash
|
|
88
|
+
export HENMESH_API_URL=https://henmesh.hendoi.com
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## How to run — get output
|
|
94
|
+
|
|
95
|
+
### 1) Check usage
|
|
58
96
|
|
|
59
|
-
|
|
97
|
+
**Purpose:** confirm the key and remaining budget.
|
|
98
|
+
|
|
99
|
+
```js
|
|
60
100
|
import { Client } from "@hendoi/henmesh";
|
|
61
101
|
|
|
62
102
|
const c = new Client();
|
|
63
|
-
console.log(await c.usage());
|
|
103
|
+
console.log(JSON.stringify(await c.usage(), null, 2));
|
|
64
104
|
console.log(await c.methods());
|
|
105
|
+
```
|
|
65
106
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
});
|
|
69
|
-
const quality = await c.mesh2dQuality({ meshId: mesh.id /* … */ });
|
|
70
|
-
console.log(quality);
|
|
107
|
+
```bash
|
|
108
|
+
node check-usage.mjs
|
|
71
109
|
```
|
|
72
110
|
|
|
73
|
-
|
|
111
|
+
### 2) Generate a 2-D airfoil mesh + quality
|
|
112
|
+
|
|
113
|
+
**Purpose:** create a screening mesh, then ask HENMESH how good it is.
|
|
74
114
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
| `usage` / `job` / `cancelJob` | Meters & jobs | `/usage` · `/jobs/:id` |
|
|
78
|
-
| `methods` | Mesh method catalogue | `GET /mesh/methods` |
|
|
79
|
-
| `projects` / `createProject` | Projects | `/projects*` |
|
|
80
|
-
| `mesh2dAirfoil` / `mesh2dSection` | 2-D generate | `/mesh/2d/*/generate` |
|
|
81
|
-
| `mesh2dQuality` / `mesh2dIndependence` | Quality / GCI | `/mesh/2d/quality` · `independence` |
|
|
82
|
-
| `mesh3dWing` / `mesh3dQuality` | 3-D wing | `/mesh/3d/*` |
|
|
83
|
-
| `meshFsiMap` | FSI mapping | `/mesh/fsi/map` |
|
|
84
|
-
| `cadFormats` | CAD import formats | `GET /cad/formats` |
|
|
115
|
+
```js
|
|
116
|
+
import { Client } from "@hendoi/henmesh";
|
|
85
117
|
|
|
86
|
-
|
|
118
|
+
const c = new Client();
|
|
87
119
|
|
|
88
|
-
|
|
120
|
+
// PURPOSE: generate 2-D airfoil mesh (body = same fields as API / UI)
|
|
121
|
+
const mesh = await c.mesh2dAirfoil({
|
|
122
|
+
// e.g. coordinates, spacing requests — see API docs
|
|
123
|
+
});
|
|
124
|
+
console.log("mesh keys:", Object.keys(mesh));
|
|
89
125
|
|
|
90
|
-
|
|
126
|
+
// PURPOSE: quality explain (skew / aspect / ortho style gates)
|
|
127
|
+
const quality = await c.mesh2dQuality({
|
|
128
|
+
// pass mesh id / payload from previous step
|
|
129
|
+
});
|
|
130
|
+
console.log("quality keys:", Object.keys(quality));
|
|
91
131
|
|
|
92
|
-
|
|
132
|
+
// PURPOSE: independence / GCI-style scrub before citing a soft residual
|
|
133
|
+
// const indep = await c.mesh2dIndependence({ … });
|
|
134
|
+
```
|
|
93
135
|
|
|
94
|
-
|
|
136
|
+
### 3) 3-D wing + FSI map
|
|
95
137
|
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
|
|
138
|
+
```js
|
|
139
|
+
const wing = await c.mesh3dWing({ /* … */ });
|
|
140
|
+
console.log("wing mesh keys:", Object.keys(wing));
|
|
141
|
+
|
|
142
|
+
const fsi = await c.meshFsiMap({ /* … */ });
|
|
143
|
+
console.log("fsi keys:", Object.keys(fsi));
|
|
99
144
|
```
|
|
100
145
|
|
|
101
|
-
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Commands cheat-sheet
|
|
102
149
|
|
|
103
|
-
|
|
|
150
|
+
| Call | Purpose |
|
|
104
151
|
|---|---|
|
|
105
|
-
|
|
|
106
|
-
|
|
|
107
|
-
|
|
|
108
|
-
|
|
|
109
|
-
|
|
|
152
|
+
| `npm install @hendoi/henmesh` | Install SDK |
|
|
153
|
+
| `export HENMESH_API_KEY=hmk_…` | Auth |
|
|
154
|
+
| `await c.usage()` | Budget check |
|
|
155
|
+
| `await c.mesh2dAirfoil({…})` | 2-D airfoil mesh |
|
|
156
|
+
| `await c.mesh2dSection({…})` | 2-D section mesh |
|
|
157
|
+
| `await c.mesh2dQuality({…})` | Quality report |
|
|
158
|
+
| `await c.mesh2dIndependence({…})` | Independence / GCI |
|
|
159
|
+
| `await c.mesh3dWing({…})` | 3-D wing mesh |
|
|
160
|
+
| `await c.mesh3dQuality({…})` | 3-D quality |
|
|
161
|
+
| `await c.meshFsiMap({…})` | FSI map |
|
|
162
|
+
| `await c.cadFormats()` | Supported CAD formats |
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Honest limits
|
|
110
167
|
|
|
111
|
-
|
|
168
|
+
Not HyperMesh / Pointwise certification meshing. Screening grids + honesty explain only. See the [product guide](https://hendoi.com/blog/henmesh-complete-product-guide).
|
|
112
169
|
|
|
113
|
-
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Sister packages
|
|
173
|
+
|
|
174
|
+
| Need | Package |
|
|
114
175
|
|---|---|
|
|
115
|
-
|
|
|
116
|
-
|
|
|
117
|
-
|
|
|
118
|
-
|
|
|
119
|
-
|
|
|
120
|
-
| Platform JS docs | https://api.hendoi.com/?doc=javascript-sdk |
|
|
121
|
-
| Support | support@hendoi.com |
|
|
176
|
+
| Section | [@hendoi/henfoil](https://www.npmjs.com/package/@hendoi/henfoil) |
|
|
177
|
+
| Aircraft | [@hendoi/hensynth](https://www.npmjs.com/package/@hendoi/hensynth) |
|
|
178
|
+
| CFD | [@hendoi/henflow](https://www.npmjs.com/package/@hendoi/henflow) |
|
|
179
|
+
| FEA | [@hendoi/henstruct](https://www.npmjs.com/package/@hendoi/henstruct) |
|
|
180
|
+
| Python | [henmesh on PyPI](https://pypi.org/project/henmesh/) |
|
|
122
181
|
|
|
123
182
|
---
|
|
124
183
|
|
|
125
|
-
|
|
184
|
+
## Support
|
|
185
|
+
|
|
186
|
+
support@hendoi.com · [FAQ](https://hendoi.com/faq) · [Help](https://hendoi.com/help/henmesh)
|
|
187
|
+
|
|
188
|
+
© HENDOI TECHNOLOGIES PRIVATE LIMITED · LicenseRef-Proprietary — see `LICENSE`.
|
package/dist/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/** HTTP client for HENMESH /api/v1 — HM-JS-SDK-001 (0.1.
|
|
2
|
-
export declare const CLIENT_VERSION = "0.1.
|
|
1
|
+
/** HTTP client for HENMESH /api/v1 — HM-JS-SDK-001 (0.1.2). */
|
|
2
|
+
export declare const CLIENT_VERSION = "0.1.2";
|
|
3
3
|
export type Json = Record<string, unknown>;
|
|
4
4
|
export declare class HenmeshError extends Error {
|
|
5
5
|
status: number;
|
package/dist/client.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/** HTTP client for HENMESH /api/v1 — HM-JS-SDK-001 (0.1.
|
|
2
|
-
export const CLIENT_VERSION = "0.1.
|
|
1
|
+
/** HTTP client for HENMESH /api/v1 — HM-JS-SDK-001 (0.1.2). */
|
|
2
|
+
export const CLIENT_VERSION = "0.1.2";
|
|
3
3
|
const DEVELOPERS_HELP = "Create a hmk_… key: sign in at https://hendoi.com/login → open HENMESH → " +
|
|
4
4
|
"Developers (or Settings → API) → copy the key → export HENMESH_API_KEY=hmk_…";
|
|
5
5
|
export class HenmeshError extends Error {
|