@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 CHANGED
@@ -1,125 +1,188 @@
1
- # @hendoi/henmesh — JavaScript / TypeScript SDK (HM-JS-SDK-001)
1
+ # @hendoi/henmesh
2
2
 
3
- Official headless HTTPS client for production **[HENMESH](https://henmesh.hendoi.com)** — HENDOI’s mesh / Δs₁ prep workspace.
3
+ **Official JavaScript / TypeScript SDK for [HENMESH](https://henmesh.hendoi.com)** — HENDOI’s mesh / grid-prep product.
4
4
 
5
- Same REST surface as the workspace: 2-D airfoil/section mesh → quality / GCI independence → 3-D wing mesh → FSI map → CAD formats.
5
+ **Version 0.1.2** · [npm package page](https://www.npmjs.com/package/@hendoi/henmesh)
6
6
 
7
- **Version 0.1.1** · **npm:** [@hendoi/henmesh](https://www.npmjs.com/package/@hendoi/henmesh) · **API docs:** [henmesh-overview](https://api.hendoi.com/?doc=henmesh-overview) · **Python twin:** [henmesh on PyPI](https://pypi.org/project/henmesh/)
7
+ ---
8
8
 
9
- Every request sends `X-Henmesh-Client: henmesh-js/0.1.1`.
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
- ## What this package is
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` automates HENMESH mesh generation and quality gates over HTTPS from Node.js / TypeScript. Use it to script screening grids before CFD/FEA — not as a local HyperMesh replacement.
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
- Host: `https://henmesh.hendoi.com` · key prefix: `hmk_…`
22
+ It does **not** install HyperMesh on your PC. It calls the HENMESH cloud API.
18
23
 
19
- ## Where it is used
24
+ ---
25
+
26
+ ## Who should use it (applications)
20
27
 
21
- | Context | Typical use |
28
+ | You are… | You use this package to… |
22
29
  |---|---|
23
- | **Pre-CFD mesh prep** | `mesh2dAirfoil` / `mesh2dSection` then quality |
24
- | **Independence / GCI scrub** | `mesh2dIndependence` before citing soft residuals |
25
- | **Wing block prep** | `mesh3dWing` + `mesh3dQuality` |
26
- | **FSI map** | `meshFsiMap` before structure handoff |
27
- | **Stack** | After HENFOIL/HENSYNTH · before HENFLOW/HENSTRUCT |
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
- Product page: [hendoi.com/products/henmesh](https://hendoi.com/products/henmesh)
57
+ ## What you need
30
58
 
31
- ## Requirements
59
+ - HENMESH key `hmk_…`
60
+ - Node.js **18+**
32
61
 
33
- - **Node.js ≥ 18**
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.1
69
+ npm install @hendoi/henmesh@0.1.2
42
70
  ```
43
71
 
44
- ## Auth & environment
72
+ ---
73
+
74
+ ## Set your API key
45
75
 
46
76
  ```bash
47
- export HENMESH_API_KEY=hmk_YOUR_KEY
48
- # export HENMESH_API_URL=https://henmesh.hendoi.com
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
- ```ts
53
- import { Client } from "@hendoi/henmesh";
54
- const c = new Client({ apiKey: "hmk_…" });
81
+ PowerShell:
82
+
83
+ ```powershell
84
+ $env:HENMESH_API_KEY="hmk_YOUR_KEY_HERE"
55
85
  ```
56
86
 
57
- ## Quick start
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
- ```ts
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
- const mesh = await c.mesh2dAirfoil({
67
- // coordinates / airfoil payload per API docs
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
- ## Core features (method map)
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
- | Method | What it does | REST notes |
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
- ## Errors
118
+ const c = new Client();
87
119
 
88
- Throws `HenmeshError` (`.status`, `.body`, `.quotaExceeded`).
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
- ## What it cannot claim
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
- Not HyperMesh / Pointwise certification meshing. Screening grids and honesty gates only.
132
+ // PURPOSE: independence / GCI-style scrub before citing a soft residual
133
+ // const indep = await c.mesh2dIndependence({ … });
134
+ ```
93
135
 
94
- ## TypeScript
136
+ ### 3) 3-D wing + FSI map
95
137
 
96
- ```ts
97
- import { Client, HenmeshError, CLIENT_VERSION } from "@hendoi/henmesh";
98
- import type { ClientOptions, Json } from "@hendoi/henmesh";
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
- ## Sister SDKs
146
+ ---
147
+
148
+ ## Commands cheat-sheet
102
149
 
103
- | Python | JavaScript |
150
+ | Call | Purpose |
104
151
  |---|---|
105
- | [`henmesh`](https://pypi.org/project/henmesh/) | [`@hendoi/henmesh`](https://www.npmjs.com/package/@hendoi/henmesh) |
106
- | [`henfoil`](https://pypi.org/project/henfoil/) | [`@hendoi/henfoil`](https://www.npmjs.com/package/@hendoi/henfoil) |
107
- | [`hensynth`](https://pypi.org/project/hensynth/) | [`@hendoi/hensynth`](https://www.npmjs.com/package/@hendoi/hensynth) |
108
- | [`henflow`](https://pypi.org/project/henflow/) | [`@hendoi/henflow`](https://www.npmjs.com/package/@hendoi/henflow) |
109
- | [`henstruct`](https://pypi.org/project/henstruct/) | [`@hendoi/henstruct`](https://www.npmjs.com/package/@hendoi/henstruct) |
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
- ## Links
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
- | **npm** | https://www.npmjs.com/package/@hendoi/henmesh |
116
- | Product app | https://henmesh.hendoi.com |
117
- | Marketing | https://hendoi.com/products/henmesh |
118
- | API overview | https://api.hendoi.com/?doc=henmesh-overview |
119
- | Auth | https://api.hendoi.com/?doc=henmesh-authentication |
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
- © HENDOI TECHNOLOGIES PRIVATE LIMITED. Proprietary — see `LICENSE`.
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.1). */
2
- export declare const CLIENT_VERSION = "0.1.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.1). */
2
- export const CLIENT_VERSION = "0.1.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 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hendoi/henmesh",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Official HENMESH JavaScript/TypeScript SDK — 2-D/3-D mesh, quality, GCI, FSI map.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",