@faicad/faijs-gears 0.0.0-stage → 0.29.5
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/LICENSE +202 -0
- package/dist/bevel_gear.d.ts +113 -0
- package/dist/bevel_gear.d.ts.map +1 -0
- package/dist/bevel_gear.js +327 -0
- package/dist/bevel_gear.js.map +1 -0
- package/dist/crossed_helical_gear.d.ts +24 -0
- package/dist/crossed_helical_gear.d.ts.map +1 -0
- package/dist/crossed_helical_gear.js +24 -0
- package/dist/crossed_helical_gear.js.map +1 -0
- package/dist/crossed_pair.d.ts +177 -0
- package/dist/crossed_pair.d.ts.map +1 -0
- package/dist/crossed_pair.js +237 -0
- package/dist/crossed_pair.js.map +1 -0
- package/dist/features.d.ts +184 -0
- package/dist/features.d.ts.map +1 -0
- package/dist/features.js +408 -0
- package/dist/features.js.map +1 -0
- package/dist/index.d.ts +178 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +223 -0
- package/dist/index.js.map +1 -0
- package/dist/kernel/gears.d.ts +231 -0
- package/dist/kernel/gears.d.ts.map +1 -0
- package/dist/kernel/gears.js +274 -0
- package/dist/kernel/gears.js.map +1 -0
- package/dist/kernel/index.d.ts +10 -0
- package/dist/kernel/index.d.ts.map +1 -0
- package/dist/kernel/index.js +9 -0
- package/dist/kernel/index.js.map +1 -0
- package/dist/math.d.ts +200 -0
- package/dist/math.d.ts.map +1 -0
- package/dist/math.js +274 -0
- package/dist/math.js.map +1 -0
- package/dist/pairs.d.ts +161 -0
- package/dist/pairs.d.ts.map +1 -0
- package/dist/pairs.js +183 -0
- package/dist/pairs.js.map +1 -0
- package/dist/planetary.d.ts +96 -0
- package/dist/planetary.d.ts.map +1 -0
- package/dist/planetary.js +139 -0
- package/dist/planetary.js.map +1 -0
- package/dist/profile.d.ts +439 -0
- package/dist/profile.d.ts.map +1 -0
- package/dist/profile.js +597 -0
- package/dist/profile.js.map +1 -0
- package/dist/rack_gear.d.ts +125 -0
- package/dist/rack_gear.d.ts.map +1 -0
- package/dist/rack_gear.js +344 -0
- package/dist/rack_gear.js.map +1 -0
- package/dist/ring_gear.d.ts +54 -0
- package/dist/ring_gear.d.ts.map +1 -0
- package/dist/ring_gear.js +133 -0
- package/dist/ring_gear.js.map +1 -0
- package/dist/spline-face.d.ts +99 -0
- package/dist/spline-face.d.ts.map +1 -0
- package/dist/spline-face.js +94 -0
- package/dist/spline-face.js.map +1 -0
- package/dist/spur_gear.d.ts +112 -0
- package/dist/spur_gear.d.ts.map +1 -0
- package/dist/spur_gear.js +206 -0
- package/dist/spur_gear.js.map +1 -0
- package/dist/worm_gear.d.ts +78 -0
- package/dist/worm_gear.d.ts.map +1 -0
- package/dist/worm_gear.js +256 -0
- package/dist/worm_gear.js.map +1 -0
- package/package.json +49 -4
- package/README.md +0 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* index — faijs-gears 公共 API 入口(15 个齿轮类 + contractVersion)
|
|
3
|
+
*
|
|
4
|
+
* ## 现状(2026-09-13)
|
|
5
|
+
*
|
|
6
|
+
* 本包经 `src/kernel/` 的齿轮原语层消费内核(`getGearKernel()`,自 cq-compat
|
|
7
|
+
* 迁入;occt 内核访问统一归属该层),入口签名(参数名逐字沿用 Python、
|
|
8
|
+
* 返回 `Result`)保持不变。
|
|
9
|
+
*
|
|
10
|
+
* 每个导出函数:
|
|
11
|
+
* - 参数名**逐字沿用 Python**(module / teeth_number / width / helix_angle …),见 `profile.ts`;
|
|
12
|
+
* - 返回 `Promise<Result<…>>`:单体齿轮返回 `BrepHandle`;齿轮对/轮系返回具名记录
|
|
13
|
+
* (`{gear, pinion}` / `{gear1, gear2}` / `{sun, planets, ring}`)并挂 `fn.outputs`
|
|
14
|
+
* (`library-dev-guide.md` §2.6 / 方案 §6.4),宿主据此逐件收编、导出 STEP。
|
|
15
|
+
* - `GearAssembly`(`{name, solid}[]`)保留为脚本侧逐件导出的形态(`*ExportParts`)。
|
|
16
|
+
*/
|
|
17
|
+
import type { BrepHandle } from '@faicad/faijs';
|
|
18
|
+
import { type Result } from '@faicad/faijs';
|
|
19
|
+
import { type BuildSpurGearOptions } from './spur_gear.js';
|
|
20
|
+
import { type BuildRingGearOptions } from './ring_gear.js';
|
|
21
|
+
import { type BuildRackGearOptions } from './rack_gear.js';
|
|
22
|
+
import { type BuildWormOptions } from './worm_gear.js';
|
|
23
|
+
import { type BuildBevelGearOptions } from './bevel_gear.js';
|
|
24
|
+
import { type BevelGearPairParams, type BuildBevelGearPairOptions } from './pairs.js';
|
|
25
|
+
import { type CrossedGearPairParams, type HyperbolicGearPairParams, type BuildCrossedGearPairOptions } from './crossed_pair.js';
|
|
26
|
+
import { type PlanetaryGearsetParams, type BuildPlanetaryGearsetOptions } from './planetary.js';
|
|
27
|
+
import type { SpurGearParams, RingGearParams, CrossedHelicalGearParams, RackGearParams, WormParams, BevelGearParams, HyperbolicGearParams } from './profile.js';
|
|
28
|
+
/** 库契约版本(与 faijs 引擎对齐,勿硬编码)。 */
|
|
29
|
+
export declare const contractVersion = 3;
|
|
30
|
+
/** 齿轮对/轮系的逐件导出条目(名字进 STEP 产品名,供逐件等价比对)。 */
|
|
31
|
+
export type GearAssembly = Array<{
|
|
32
|
+
name: string;
|
|
33
|
+
solid: BrepHandle;
|
|
34
|
+
}>;
|
|
35
|
+
/**
|
|
36
|
+
* SpurGear(直齿圆柱齿轮)。
|
|
37
|
+
*
|
|
38
|
+
* @param params 齿轮参数(逐字沿用 Python `SpurGear.__init__`)
|
|
39
|
+
* @param options 构建选项(齿面策略 / 特征字段)
|
|
40
|
+
* @returns `Result<BrepHandle>`——solid 句柄,失败转 `err`
|
|
41
|
+
*/
|
|
42
|
+
export declare function spurGear(params: SpurGearParams, options?: BuildSpurGearOptions): Promise<Result<BrepHandle, string>>;
|
|
43
|
+
/**
|
|
44
|
+
* HerringboneGear(人字齿圆柱齿轮)。
|
|
45
|
+
*
|
|
46
|
+
* @param params 齿轮参数(逐字沿用 Python `HerringboneGear.__init__`)
|
|
47
|
+
* @param options 构建选项(齿面策略 / 特征字段)
|
|
48
|
+
* @returns `Result<BrepHandle>`——solid 句柄,失败转 `err`
|
|
49
|
+
*/
|
|
50
|
+
export declare function herringboneGear(params: SpurGearParams, options?: BuildSpurGearOptions): Promise<Result<BrepHandle, string>>;
|
|
51
|
+
/**
|
|
52
|
+
* RingGear(内齿圈)。
|
|
53
|
+
*
|
|
54
|
+
* @param params 齿轮参数(逐字沿用 Python `RingGear.__init__`)
|
|
55
|
+
* @param options 构建选项(齿面策略 / 特征字段)
|
|
56
|
+
* @returns `Result<BrepHandle>`——solid 句柄,失败转 `err`
|
|
57
|
+
*/
|
|
58
|
+
export declare function ringGear(params: RingGearParams, options?: BuildRingGearOptions): Promise<Result<BrepHandle, string>>;
|
|
59
|
+
/**
|
|
60
|
+
* HerringboneRingGear(人字内齿圈)。
|
|
61
|
+
*
|
|
62
|
+
* @param params 齿轮参数(逐字沿用 Python `HerringboneRingGear.__init__`)
|
|
63
|
+
* @param options 构建选项(齿面策略 / 特征字段)
|
|
64
|
+
* @returns `Result<BrepHandle>`——solid 句柄,失败转 `err`
|
|
65
|
+
*/
|
|
66
|
+
export declare function herringboneRingGear(params: RingGearParams, options?: BuildRingGearOptions): Promise<Result<BrepHandle, string>>;
|
|
67
|
+
/**
|
|
68
|
+
* CrossedHelicalGear(交错轴斜齿轮,单体)。
|
|
69
|
+
*
|
|
70
|
+
* @param params 齿轮参数(逐字沿用 Python `CrossedHelicalGear.__init__`)
|
|
71
|
+
* @param options 构建选项(齿面策略 / 特征字段)
|
|
72
|
+
* @returns `Result<BrepHandle>`——solid 句柄,失败转 `err`
|
|
73
|
+
*/
|
|
74
|
+
export declare function crossedHelicalGear(params: CrossedHelicalGearParams, options?: BuildSpurGearOptions): Promise<Result<BrepHandle, string>>;
|
|
75
|
+
/**
|
|
76
|
+
* HyperbolicGear(双曲面齿轮,单体)。
|
|
77
|
+
*
|
|
78
|
+
* @param params 齿轮参数(逐字沿用 Python `HyperbolicGear.__init__`)
|
|
79
|
+
* @param options 构建选项(齿面策略 / 特征字段)
|
|
80
|
+
* @returns `Result<BrepHandle>`——solid 句柄,失败转 `err`
|
|
81
|
+
*/
|
|
82
|
+
export declare function hyperbolicGear(params: HyperbolicGearParams, options?: BuildSpurGearOptions): Promise<Result<BrepHandle, string>>;
|
|
83
|
+
/**
|
|
84
|
+
* BevelGear(锥齿轮,单体)。
|
|
85
|
+
*
|
|
86
|
+
* @param params 齿轮参数(逐字沿用 Python `BevelGear.__init__`)
|
|
87
|
+
* @param options 构建选项(齿面策略 / bore_d / trim)
|
|
88
|
+
* @returns `Result<BrepHandle>`——solid 句柄,失败转 `err`
|
|
89
|
+
*/
|
|
90
|
+
export declare function bevelGear(params: BevelGearParams, options?: BuildBevelGearOptions): Promise<Result<BrepHandle, string>>;
|
|
91
|
+
/** BevelGearPair 逐件输出(`fn.outputs` 指定的具名记录,方案 §6.4)。 */
|
|
92
|
+
export interface BevelGearPairOutput {
|
|
93
|
+
/** 大轮 solid(未加定位)。 */
|
|
94
|
+
gear?: BrepHandle;
|
|
95
|
+
/** 小轮 solid(**已加**定位,除非 `transformPinion: false`)。 */
|
|
96
|
+
pinion?: BrepHandle;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* BevelGearPair(锥齿轮副,装配体)。
|
|
100
|
+
*
|
|
101
|
+
* @param params 齿轮副参数(逐字沿用 Python `BevelGearPair.__init__`)
|
|
102
|
+
* @param options 构建选项(齿面策略 / bore_d / trim)
|
|
103
|
+
* @returns `Result<BevelGearPairOutput>`——具名记录,失败转 `err`
|
|
104
|
+
*/
|
|
105
|
+
export declare function bevelGearPair(params: BevelGearPairParams, options?: BuildBevelGearPairOptions): Promise<Result<BevelGearPairOutput, string>>;
|
|
106
|
+
/**
|
|
107
|
+
* RackGear(齿条)。
|
|
108
|
+
*
|
|
109
|
+
* @param params 齿条参数(逐字沿用 Python `RackGear.__init__`)
|
|
110
|
+
* @param options 构建选项(齿面策略)
|
|
111
|
+
* @returns `Result<BrepHandle>`——solid 句柄,失败转 `err`
|
|
112
|
+
*/
|
|
113
|
+
export declare function rackGear(params: RackGearParams, options?: BuildRackGearOptions): Promise<Result<BrepHandle, string>>;
|
|
114
|
+
/**
|
|
115
|
+
* HerringboneRackGear(人字齿条)。
|
|
116
|
+
*
|
|
117
|
+
* @param params 齿条参数(逐字沿用 Python `HerringboneRackGear.__init__`)
|
|
118
|
+
* @param options 构建选项(齿面策略;内部强制 `herringbone: true`)
|
|
119
|
+
* @returns `Result<BrepHandle>`——solid 句柄,失败转 `err`
|
|
120
|
+
*/
|
|
121
|
+
export declare function herringboneRackGear(params: RackGearParams, options?: BuildRackGearOptions): Promise<Result<BrepHandle, string>>;
|
|
122
|
+
/**
|
|
123
|
+
* Worm(蜗杆)。
|
|
124
|
+
*
|
|
125
|
+
* @param params 蜗杆参数(逐字沿用 Python `Worm.__init__`)
|
|
126
|
+
* @param options 构建选项(策略默认 grid-approx / 缝合与组线容差 / boreD)
|
|
127
|
+
* @returns `Result<BrepHandle>`——solid 句柄,失败转 `err`
|
|
128
|
+
*/
|
|
129
|
+
export declare function worm(params: WormParams, options?: BuildWormOptions): Promise<Result<BrepHandle, string>>;
|
|
130
|
+
/** CrossedGearPair / HyperbolicGearPair 逐件输出(`fn.outputs` 指定的具名记录,方案 §6.4)。 */
|
|
131
|
+
export interface CrossedGearPairOutput {
|
|
132
|
+
/** 第一齿轮 solid(未定位)。 */
|
|
133
|
+
gear1?: BrepHandle;
|
|
134
|
+
/** 第二齿轮 solid(已按轴交角定位)。 */
|
|
135
|
+
gear2?: BrepHandle;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* CrossedGearPair(交错轴斜齿轮副,装配体)。
|
|
139
|
+
*
|
|
140
|
+
* @param params 齿轮副参数(逐字沿用 Python `CrossedGearPair.__init__`)
|
|
141
|
+
* @param options 构建选项(齿面策略 / 特征字段)
|
|
142
|
+
* @returns `Result<CrossedGearPairOutput>`——具名记录,失败转 `err`
|
|
143
|
+
*/
|
|
144
|
+
export declare function crossedGearPair(params: CrossedGearPairParams, options?: BuildCrossedGearPairOptions): Promise<Result<CrossedGearPairOutput, string>>;
|
|
145
|
+
/**
|
|
146
|
+
* HyperbolicGearPair(双曲面齿轮副,装配体)。
|
|
147
|
+
*
|
|
148
|
+
* @param params 齿轮副参数(逐字沿用 Python `HyperbolicGearPair.__init__`)
|
|
149
|
+
* @param options 构建选项(齿面策略 / 特征字段)
|
|
150
|
+
* @returns `Result<CrossedGearPairOutput>`——具名记录,失败转 `err`
|
|
151
|
+
*/
|
|
152
|
+
export declare function hyperbolicGearPair(params: HyperbolicGearPairParams, options?: BuildCrossedGearPairOptions): Promise<Result<CrossedGearPairOutput, string>>;
|
|
153
|
+
/** PlanetaryGearset 逐件输出(`fn.outputs` 指定的具名记录,方案 §6.4)。 */
|
|
154
|
+
export interface PlanetaryGearsetOutput {
|
|
155
|
+
/** 太阳轮 solid。 */
|
|
156
|
+
sun?: BrepHandle;
|
|
157
|
+
/** 行星轮 solid 列表(planet_01…planet_NN)。 */
|
|
158
|
+
planets: BrepHandle[];
|
|
159
|
+
/** 内齿圈 solid。 */
|
|
160
|
+
ring?: BrepHandle;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* PlanetaryGearset(行星轮系,装配体)。
|
|
164
|
+
*
|
|
165
|
+
* @param params 轮系参数(逐字沿用 Python `PlanetaryGearset.__init__`)
|
|
166
|
+
* @param options 构建选项(齿面策略 / 特征字段)
|
|
167
|
+
* @returns `Result<PlanetaryGearsetOutput>`——具名记录,失败转 `err`
|
|
168
|
+
*/
|
|
169
|
+
export declare function planetaryGearset(params: PlanetaryGearsetParams, options?: BuildPlanetaryGearsetOptions): Promise<Result<PlanetaryGearsetOutput, string>>;
|
|
170
|
+
/**
|
|
171
|
+
* HerringbonePlanetaryGearset(人字行星轮系,装配体)。
|
|
172
|
+
*
|
|
173
|
+
* @param params 轮系参数(逐字沿用 Python `HerringbonePlanetaryGearset.__init__`)
|
|
174
|
+
* @param options 构建选项(齿面策略 / 特征字段)
|
|
175
|
+
* @returns `Result<PlanetaryGearsetOutput>`——具名记录,失败转 `err`
|
|
176
|
+
*/
|
|
177
|
+
export declare function herringbonePlanetaryGearset(params: PlanetaryGearsetParams, options?: BuildPlanetaryGearsetOptions): Promise<Result<PlanetaryGearsetOutput, string>>;
|
|
178
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAW,KAAK,MAAM,EAAoB,MAAM,eAAe,CAAA;AAGtE,OAAO,EAEL,KAAK,oBAAoB,EAC1B,MAAM,aAAa,CAAA;AACpB,OAAO,EAC8C,KAAK,oBAAoB,EAC7E,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAsB,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAC3E,OAAO,EAAkB,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAA;AACnE,OAAO,EAAuB,KAAK,qBAAqB,EAAE,MAAM,cAAc,CAAA;AAC9E,OAAO,EAEL,KAAK,mBAAmB,EAAE,KAAK,yBAAyB,EACzD,MAAM,SAAS,CAAA;AAChB,OAAO,EAEL,KAAK,qBAAqB,EAAE,KAAK,wBAAwB,EAAE,KAAK,2BAA2B,EAC5F,MAAM,gBAAgB,CAAA;AACvB,OAAO,EAEL,KAAK,sBAAsB,EAAE,KAAK,4BAA4B,EAC/D,MAAM,aAAa,CAAA;AAEpB,OAAO,KAAK,EACV,cAAc,EAAE,cAAc,EAAE,wBAAwB,EAAE,cAAc,EACxE,UAAU,EAAE,eAAe,EAAE,oBAAoB,EAClD,MAAM,WAAW,CAA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O,CAAC,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,CAKhD;AAGD,2DAA2D;AAC3D,MAAM,WAAW,sBAAsB;IACrC,iBAAiB;IACjB,GAAG,CAAC,EAAE,UAAU,CAAA;IAChB,yCAAyC;IACzC,OAAO,EAAE,UAAU,EAAE,CAAA;IACrB,iBAAiB;IACjB,IAAI,CAAC,EAAE,UAAU,CAAA;CAClB;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,sBAAsB,EAAE,OAAO,GAAE,4BAAiC,GACzE,OAAO,CAAC,MAAM,CAAC,sBAAsB,EAAE,MAAM,CAAC,CAAC,CAKjD;AAGD;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,sBAAsB,EAAE,OAAO,GAAE,4BAAiC,GACzE,OAAO,CAAC,MAAM,CAAC,sBAAsB,EAAE,MAAM,CAAC,CAAC,CAKjD"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* index — faijs-gears 公共 API 入口(15 个齿轮类 + contractVersion)
|
|
3
|
+
*
|
|
4
|
+
* ## 现状(2026-09-13)
|
|
5
|
+
*
|
|
6
|
+
* 本包经 `src/kernel/` 的齿轮原语层消费内核(`getGearKernel()`,自 cq-compat
|
|
7
|
+
* 迁入;occt 内核访问统一归属该层),入口签名(参数名逐字沿用 Python、
|
|
8
|
+
* 返回 `Result`)保持不变。
|
|
9
|
+
*
|
|
10
|
+
* 每个导出函数:
|
|
11
|
+
* - 参数名**逐字沿用 Python**(module / teeth_number / width / helix_angle …),见 `profile.ts`;
|
|
12
|
+
* - 返回 `Promise<Result<…>>`:单体齿轮返回 `BrepHandle`;齿轮对/轮系返回具名记录
|
|
13
|
+
* (`{gear, pinion}` / `{gear1, gear2}` / `{sun, planets, ring}`)并挂 `fn.outputs`
|
|
14
|
+
* (`library-dev-guide.md` §2.6 / 方案 §6.4),宿主据此逐件收编、导出 STEP。
|
|
15
|
+
* - `GearAssembly`(`{name, solid}[]`)保留为脚本侧逐件导出的形态(`*ExportParts`)。
|
|
16
|
+
*/
|
|
17
|
+
import { ok, err, CONTRACT_VERSION } from '@faicad/faijs';
|
|
18
|
+
import { getGearKernel } from './kernel/index.js';
|
|
19
|
+
import { buildSpurGearSolid, buildHerringboneGearSolid, buildHyperbolicGearSolid, } from './spur_gear.js';
|
|
20
|
+
import { buildRingGearSolid, buildHerringboneRingGearSolid, } from './ring_gear.js';
|
|
21
|
+
import { buildCrossedHelicalSolid } from './crossed_helical_gear.js';
|
|
22
|
+
import { buildRackGearSolid } from './rack_gear.js';
|
|
23
|
+
import { buildWormSolid } from './worm_gear.js';
|
|
24
|
+
import { buildBevelGearSolid } from './bevel_gear.js';
|
|
25
|
+
import { buildBevelGearPair, } from './pairs.js';
|
|
26
|
+
import { buildCrossedGearPair, buildHyperbolicGearPair, } from './crossed_pair.js';
|
|
27
|
+
import { buildPlanetaryGearset, buildHerringbonePlanetaryGearset, } from './planetary.js';
|
|
28
|
+
/** 库契约版本(与 faijs 引擎对齐,勿硬编码)。 */
|
|
29
|
+
export const contractVersion = CONTRACT_VERSION;
|
|
30
|
+
/**
|
|
31
|
+
* 统一内核执行包装:取单例内核、运行构建、失败转 `err`。
|
|
32
|
+
*
|
|
33
|
+
* @param fn 接收原始内核、返回 solid 或装配
|
|
34
|
+
* @returns `Result<T>`
|
|
35
|
+
*/
|
|
36
|
+
async function run(fn) {
|
|
37
|
+
try {
|
|
38
|
+
const kernel = await getGearKernel();
|
|
39
|
+
return ok(fn(kernel));
|
|
40
|
+
}
|
|
41
|
+
catch (e) {
|
|
42
|
+
return err(e instanceof Error ? e.message : String(e));
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
// ── A 族:直纹/扭纹齿面(网格样条曲面)──────────────────────────────────────────
|
|
46
|
+
/**
|
|
47
|
+
* SpurGear(直齿圆柱齿轮)。
|
|
48
|
+
*
|
|
49
|
+
* @param params 齿轮参数(逐字沿用 Python `SpurGear.__init__`)
|
|
50
|
+
* @param options 构建选项(齿面策略 / 特征字段)
|
|
51
|
+
* @returns `Result<BrepHandle>`——solid 句柄,失败转 `err`
|
|
52
|
+
*/
|
|
53
|
+
export function spurGear(params, options = {}) {
|
|
54
|
+
return run((k) => buildSpurGearSolid(k, params, options));
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* HerringboneGear(人字齿圆柱齿轮)。
|
|
58
|
+
*
|
|
59
|
+
* @param params 齿轮参数(逐字沿用 Python `HerringboneGear.__init__`)
|
|
60
|
+
* @param options 构建选项(齿面策略 / 特征字段)
|
|
61
|
+
* @returns `Result<BrepHandle>`——solid 句柄,失败转 `err`
|
|
62
|
+
*/
|
|
63
|
+
export function herringboneGear(params, options = {}) {
|
|
64
|
+
return run((k) => buildHerringboneGearSolid(k, params, options));
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* RingGear(内齿圈)。
|
|
68
|
+
*
|
|
69
|
+
* @param params 齿轮参数(逐字沿用 Python `RingGear.__init__`)
|
|
70
|
+
* @param options 构建选项(齿面策略 / 特征字段)
|
|
71
|
+
* @returns `Result<BrepHandle>`——solid 句柄,失败转 `err`
|
|
72
|
+
*/
|
|
73
|
+
export function ringGear(params, options = {}) {
|
|
74
|
+
return run((k) => buildRingGearSolid(k, params, options));
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* HerringboneRingGear(人字内齿圈)。
|
|
78
|
+
*
|
|
79
|
+
* @param params 齿轮参数(逐字沿用 Python `HerringboneRingGear.__init__`)
|
|
80
|
+
* @param options 构建选项(齿面策略 / 特征字段)
|
|
81
|
+
* @returns `Result<BrepHandle>`——solid 句柄,失败转 `err`
|
|
82
|
+
*/
|
|
83
|
+
export function herringboneRingGear(params, options = {}) {
|
|
84
|
+
return run((k) => buildHerringboneRingGearSolid(k, params, options));
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* CrossedHelicalGear(交错轴斜齿轮,单体)。
|
|
88
|
+
*
|
|
89
|
+
* @param params 齿轮参数(逐字沿用 Python `CrossedHelicalGear.__init__`)
|
|
90
|
+
* @param options 构建选项(齿面策略 / 特征字段)
|
|
91
|
+
* @returns `Result<BrepHandle>`——solid 句柄,失败转 `err`
|
|
92
|
+
*/
|
|
93
|
+
export function crossedHelicalGear(params, options = {}) {
|
|
94
|
+
return run((k) => buildCrossedHelicalSolid(k, params, options));
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* HyperbolicGear(双曲面齿轮,单体)。
|
|
98
|
+
*
|
|
99
|
+
* @param params 齿轮参数(逐字沿用 Python `HyperbolicGear.__init__`)
|
|
100
|
+
* @param options 构建选项(齿面策略 / 特征字段)
|
|
101
|
+
* @returns `Result<BrepHandle>`——solid 句柄,失败转 `err`
|
|
102
|
+
*/
|
|
103
|
+
export function hyperbolicGear(params, options = {}) {
|
|
104
|
+
return run((k) => buildHyperbolicGearSolid(k, params, options));
|
|
105
|
+
}
|
|
106
|
+
// ── B 族:球面渐开线(BevelGear)───────────────────────────────────────────────
|
|
107
|
+
/**
|
|
108
|
+
* BevelGear(锥齿轮,单体)。
|
|
109
|
+
*
|
|
110
|
+
* @param params 齿轮参数(逐字沿用 Python `BevelGear.__init__`)
|
|
111
|
+
* @param options 构建选项(齿面策略 / bore_d / trim)
|
|
112
|
+
* @returns `Result<BrepHandle>`——solid 句柄,失败转 `err`
|
|
113
|
+
*/
|
|
114
|
+
export function bevelGear(params, options = {}) {
|
|
115
|
+
return run((k) => buildBevelGearSolid(k, params, options));
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* BevelGearPair(锥齿轮副,装配体)。
|
|
119
|
+
*
|
|
120
|
+
* @param params 齿轮副参数(逐字沿用 Python `BevelGearPair.__init__`)
|
|
121
|
+
* @param options 构建选项(齿面策略 / bore_d / trim)
|
|
122
|
+
* @returns `Result<BevelGearPairOutput>`——具名记录,失败转 `err`
|
|
123
|
+
*/
|
|
124
|
+
export function bevelGearPair(params, options = {}) {
|
|
125
|
+
return run((k) => {
|
|
126
|
+
const b = buildBevelGearPair(k, params, options);
|
|
127
|
+
return { gear: b.gear, pinion: b.pinion };
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
;
|
|
131
|
+
bevelGearPair.outputs = ['gear', 'pinion'];
|
|
132
|
+
// ── C 族:齿条 / 蜗杆 ───────────────────────────────────────────────────────────
|
|
133
|
+
/**
|
|
134
|
+
* RackGear(齿条)。
|
|
135
|
+
*
|
|
136
|
+
* @param params 齿条参数(逐字沿用 Python `RackGear.__init__`)
|
|
137
|
+
* @param options 构建选项(齿面策略)
|
|
138
|
+
* @returns `Result<BrepHandle>`——solid 句柄,失败转 `err`
|
|
139
|
+
*/
|
|
140
|
+
export function rackGear(params, options = {}) {
|
|
141
|
+
return run((k) => buildRackGearSolid(k, params, options));
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* HerringboneRackGear(人字齿条)。
|
|
145
|
+
*
|
|
146
|
+
* @param params 齿条参数(逐字沿用 Python `HerringboneRackGear.__init__`)
|
|
147
|
+
* @param options 构建选项(齿面策略;内部强制 `herringbone: true`)
|
|
148
|
+
* @returns `Result<BrepHandle>`——solid 句柄,失败转 `err`
|
|
149
|
+
*/
|
|
150
|
+
export function herringboneRackGear(params, options = {}) {
|
|
151
|
+
return run((k) => buildRackGearSolid(k, params, { ...options, herringbone: true }));
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Worm(蜗杆)。
|
|
155
|
+
*
|
|
156
|
+
* @param params 蜗杆参数(逐字沿用 Python `Worm.__init__`)
|
|
157
|
+
* @param options 构建选项(策略默认 grid-approx / 缝合与组线容差 / boreD)
|
|
158
|
+
* @returns `Result<BrepHandle>`——solid 句柄,失败转 `err`
|
|
159
|
+
*/
|
|
160
|
+
export function worm(params, options = {}) {
|
|
161
|
+
return run((k) => buildWormSolid(k, params, options));
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* CrossedGearPair(交错轴斜齿轮副,装配体)。
|
|
165
|
+
*
|
|
166
|
+
* @param params 齿轮副参数(逐字沿用 Python `CrossedGearPair.__init__`)
|
|
167
|
+
* @param options 构建选项(齿面策略 / 特征字段)
|
|
168
|
+
* @returns `Result<CrossedGearPairOutput>`——具名记录,失败转 `err`
|
|
169
|
+
*/
|
|
170
|
+
export function crossedGearPair(params, options = {}) {
|
|
171
|
+
return run((k) => {
|
|
172
|
+
const b = buildCrossedGearPair(k, params, options);
|
|
173
|
+
return { gear1: b.gear1, gear2: b.gear2 };
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
;
|
|
177
|
+
crossedGearPair.outputs = ['gear1', 'gear2'];
|
|
178
|
+
/**
|
|
179
|
+
* HyperbolicGearPair(双曲面齿轮副,装配体)。
|
|
180
|
+
*
|
|
181
|
+
* @param params 齿轮副参数(逐字沿用 Python `HyperbolicGearPair.__init__`)
|
|
182
|
+
* @param options 构建选项(齿面策略 / 特征字段)
|
|
183
|
+
* @returns `Result<CrossedGearPairOutput>`——具名记录,失败转 `err`
|
|
184
|
+
*/
|
|
185
|
+
export function hyperbolicGearPair(params, options = {}) {
|
|
186
|
+
return run((k) => {
|
|
187
|
+
const b = buildHyperbolicGearPair(k, params, options);
|
|
188
|
+
return { gear1: b.gear1, gear2: b.gear2 };
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
;
|
|
192
|
+
hyperbolicGearPair.outputs = ['gear1', 'gear2'];
|
|
193
|
+
/**
|
|
194
|
+
* PlanetaryGearset(行星轮系,装配体)。
|
|
195
|
+
*
|
|
196
|
+
* @param params 轮系参数(逐字沿用 Python `PlanetaryGearset.__init__`)
|
|
197
|
+
* @param options 构建选项(齿面策略 / 特征字段)
|
|
198
|
+
* @returns `Result<PlanetaryGearsetOutput>`——具名记录,失败转 `err`
|
|
199
|
+
*/
|
|
200
|
+
export function planetaryGearset(params, options = {}) {
|
|
201
|
+
return run((k) => {
|
|
202
|
+
const b = buildPlanetaryGearset(k, params, options);
|
|
203
|
+
return { sun: b.sun, planets: b.planets, ring: b.ring };
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
;
|
|
207
|
+
planetaryGearset.outputs = ['sun', 'planets', 'ring'];
|
|
208
|
+
/**
|
|
209
|
+
* HerringbonePlanetaryGearset(人字行星轮系,装配体)。
|
|
210
|
+
*
|
|
211
|
+
* @param params 轮系参数(逐字沿用 Python `HerringbonePlanetaryGearset.__init__`)
|
|
212
|
+
* @param options 构建选项(齿面策略 / 特征字段)
|
|
213
|
+
* @returns `Result<PlanetaryGearsetOutput>`——具名记录,失败转 `err`
|
|
214
|
+
*/
|
|
215
|
+
export function herringbonePlanetaryGearset(params, options = {}) {
|
|
216
|
+
return run((k) => {
|
|
217
|
+
const b = buildHerringbonePlanetaryGearset(k, params, options);
|
|
218
|
+
return { sun: b.sun, planets: b.planets, ring: b.ring };
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
;
|
|
222
|
+
herringbonePlanetaryGearset.outputs = ['sun', 'planets', 'ring'];
|
|
223
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,OAAO,EAAE,EAAE,EAAE,GAAG,EAAe,gBAAgB,EAAE,MAAM,eAAe,CAAA;AACtE,OAAO,EAAE,aAAa,EAAmB,MAAM,UAAU,CAAA;AAEzD,OAAO,EACL,kBAAkB,EAAE,yBAAyB,EAAE,wBAAwB,GAExE,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,kBAAkB,EAAE,6BAA6B,GAClD,MAAM,aAAa,CAAA;AACpB,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAA;AACjE,OAAO,EAAE,kBAAkB,EAA6B,MAAM,aAAa,CAAA;AAC3E,OAAO,EAAE,cAAc,EAAyB,MAAM,aAAa,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C,OAAO,GAAG,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,CAAA"}
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* gears — raw-handle primitives for the cq_gears port (E1–E6 companion layer).
|
|
3
|
+
*
|
|
4
|
+
* cq_gears' tooth faces are B-spline patches built from (u,v) point grids and
|
|
5
|
+
* assembled by sewing — these need raw kernel construction primitives that no
|
|
6
|
+
* Workplane op exposes (bsplineSurface / approximatePoints / interpolatePoints,
|
|
7
|
+
* tolerant edge chaining, sew+makeSolid). The faijs-gears v1 port probed them
|
|
8
|
+
* in its own `kernel.ts` / `geom-build.ts` / `spline-face.ts`; per the port
|
|
9
|
+
* plan (§4) the implementations must live INSIDE cq-compat — this file is that
|
|
10
|
+
* landing spot. faijs-gears only imports from here; it must not touch
|
|
11
|
+
* occt-wasm directly.
|
|
12
|
+
*
|
|
13
|
+
* Everything here is a verbatim port of the proven v1 implementations (same
|
|
14
|
+
* kernel call sequence → bit-identical geometry).
|
|
15
|
+
*/
|
|
16
|
+
import type { BrepEngineApi, BrepHandle, BrepVec3 } from '@faicad/faijs';
|
|
17
|
+
import type { Vec3 } from '../math.js';
|
|
18
|
+
/** Rotation/mirror axis (occt-wasm shape). */
|
|
19
|
+
export interface GearAxis {
|
|
20
|
+
point: BrepVec3;
|
|
21
|
+
direction: BrepVec3;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Raw occt-wasm capability surface — superset of `BrepEngineApi`.
|
|
25
|
+
*
|
|
26
|
+
* Declares exactly the methods the cq_gears port consumes; the probe test in
|
|
27
|
+
* faijs-gears asserts each one exists on the live kernel, so a kernel upgrade
|
|
28
|
+
* that renames a binding turns red immediately instead of failing at runtime
|
|
29
|
+
* with `undefined is not a function`.
|
|
30
|
+
*/
|
|
31
|
+
export type GearKernel = Omit<BrepEngineApi, 'interpolatePoints'> & {
|
|
32
|
+
/** `GeomAPI_PointsToBSplineSurface`: point grid → B-spline surface → Face. */
|
|
33
|
+
bsplineSurface(points: BrepVec3[], rows: number, cols: number): BrepHandle;
|
|
34
|
+
/** `GeomAPI_PointsToBSpline`: point list → approximated B-spline curve (with Tol3D). */
|
|
35
|
+
approximatePoints(points: BrepVec3[], tolerance?: number): BrepHandle;
|
|
36
|
+
/** Cubic B-spline interpolation curve through all points (occt periodic 语义).
|
|
37
|
+
* ⚠️ 收窄后(2026-09-24):type 交叉继承全部 L1 方法,仅 Omit 掉
|
|
38
|
+
* `interpolatePoints`(L1 是 brepkit degree 语义)并覆盖为本包 occt 原生
|
|
39
|
+
* periodic 语义。运行时 kernel 是 raw occt-wasm 平台面,调用不变。 */
|
|
40
|
+
interpolatePoints(points: BrepVec3[], periodic?: boolean): BrepHandle;
|
|
41
|
+
/** `BRepBuilderAPI_Sewing`: faces → sewn shell (cq `make_shell` analogue). */
|
|
42
|
+
sew(shapes: BrepHandle[], tolerance?: number): BrepHandle;
|
|
43
|
+
makeSolid(shell: BrepHandle): BrepHandle;
|
|
44
|
+
/** TopAbs_ShapeEnum type name ("solid" / "shell" / "face" …, for diagnostics/assertions). */
|
|
45
|
+
getShapeType(shape: BrepHandle): string;
|
|
46
|
+
buildSolidFromFaces(faces: BrepHandle[], tolerance?: number): BrepHandle;
|
|
47
|
+
makeNonPlanarFace(wire: BrepHandle): BrepHandle;
|
|
48
|
+
makeFaceOnSurface(face: BrepHandle, wire: BrepHandle): BrepHandle;
|
|
49
|
+
outerWire(face: BrepHandle): BrepHandle;
|
|
50
|
+
healWire(wire: BrepHandle, tolerance?: number): BrepHandle;
|
|
51
|
+
healFace(face: BrepHandle, tolerance?: number): BrepHandle;
|
|
52
|
+
rotate(shape: BrepHandle, axis: GearAxis, angleRad: number): BrepHandle;
|
|
53
|
+
/** `BRepPrimAPI_MakeRevol`: face/wire revolved around `axis` (cq `Workplane.revolve`, 360°=2π). */
|
|
54
|
+
revolve(shape: BrepHandle, axis: GearAxis, angleRad: number): BrepHandle;
|
|
55
|
+
mirror(shape: BrepHandle, point: BrepVec3, normal: BrepVec3): BrepHandle;
|
|
56
|
+
reverseShape(shape: BrepHandle): BrepHandle;
|
|
57
|
+
vertexPosition(vertex: BrepHandle): BrepVec3;
|
|
58
|
+
split(shape: BrepHandle, tools: BrepHandle[]): BrepHandle;
|
|
59
|
+
fillet(solid: BrepHandle, edges: BrepHandle[], radius: number): BrepHandle;
|
|
60
|
+
shell(solid: BrepHandle, facesToRemove: BrepHandle[], thickness: number, tolerance: number): BrepHandle;
|
|
61
|
+
thicken(shape: BrepHandle, thickness: number, tolerance: number): BrepHandle;
|
|
62
|
+
makeCircleArc(center: BrepVec3, normal: BrepVec3, radius: number, startAngle: number, endAngle: number): BrepHandle;
|
|
63
|
+
makeHelixWire(origin: BrepVec3, axis: BrepVec3, pitch: number, height: number, radius: number): BrepHandle;
|
|
64
|
+
getSurfaceArea(shape: BrepHandle): number;
|
|
65
|
+
projectPointOnFace(face: BrepHandle, point: BrepVec3): BrepVec3;
|
|
66
|
+
surfaceType(face: BrepHandle): string;
|
|
67
|
+
subShapeCount(shape: BrepHandle, type: 'vertex' | 'edge' | 'wire' | 'face' | 'shell' | 'solid'): number;
|
|
68
|
+
isFace(shape: BrepHandle): boolean;
|
|
69
|
+
isWire(shape: BrepHandle): boolean;
|
|
70
|
+
isShell(shape: BrepHandle): boolean;
|
|
71
|
+
isEdge(shape: BrepHandle): boolean;
|
|
72
|
+
/** `BRepOffsetAPI_ThruSections`: wires → shell(occt 平台方法,收窄后不在 L1)。 */
|
|
73
|
+
loft(wires: BrepHandle[], isSolid?: boolean, ruled?: boolean): BrepHandle;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Get the raw occt-wasm kernel (process-wide singleton).
|
|
77
|
+
*
|
|
78
|
+
* Same instance as `initOcctWasm()` — this only asserts the richer
|
|
79
|
+
* `GearKernel` type, never constructs a second kernel (handles are indices
|
|
80
|
+
* into one kernel arena and must not cross instances).
|
|
81
|
+
*
|
|
82
|
+
* @returns the raw kernel (promise; initializes wasm on first call)
|
|
83
|
+
*/
|
|
84
|
+
export declare function getGearKernel(): Promise<GearKernel>;
|
|
85
|
+
/** The two endpoints of an edge (order = the edge's parameter direction). */
|
|
86
|
+
export interface GearEdgeEnds {
|
|
87
|
+
edge: BrepHandle;
|
|
88
|
+
a: Vec3;
|
|
89
|
+
b: Vec3;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Endpoints of an edge, via the curve parameter domain.
|
|
93
|
+
*
|
|
94
|
+
* ⚠️ Endpoint red line (probed 2026-09-11): `getSubShapes(edge, 'vertex')`
|
|
95
|
+
* returns fewer than 2 vertices for **B-spline curve edges** (OCCT stores no
|
|
96
|
+
* explicit vertices on them), which used to make edge chaining treat every
|
|
97
|
+
* edge as its own wire. The correct path is `curveParameters(edge)` →
|
|
98
|
+
* `curvePointAtParam(edge, param)` — valid for ALL edge kinds (line / arc /
|
|
99
|
+
* B-spline); the vertex fallback only covers degenerate edges without an
|
|
100
|
+
* underlying curve.
|
|
101
|
+
*
|
|
102
|
+
* @param kernel raw OCCT kernel
|
|
103
|
+
* @param edge edge handle
|
|
104
|
+
* @returns both endpoints (closed edges: first == last)
|
|
105
|
+
*/
|
|
106
|
+
export declare function gearEdgeEnds(kernel: GearKernel, edge: BrepHandle): GearEdgeEnds;
|
|
107
|
+
/**
|
|
108
|
+
* TS port of OCCT `ShapeAnalysis_FreeBounds::ConnectEdgesToWires` — chain
|
|
109
|
+
* unordered edges into wires by endpoint proximity within `tol`.
|
|
110
|
+
*
|
|
111
|
+
* faijs/occt-wasm has no such binding and `makeWire(edges)` is
|
|
112
|
+
* `BRepBuilderAPI_MakeWire` — measured (2026-09-08) to silently drop edges on
|
|
113
|
+
* unordered input (68 edges → 9-edge broken wire). Endpoint pairing is O(n²)
|
|
114
|
+
* (n = 4·z teeth, at most a few hundred — fine).
|
|
115
|
+
*
|
|
116
|
+
* Gaps above OCCT precision (~1e-7) get a bridging line segment, matching
|
|
117
|
+
* upstream ConnectEdgesToWires behaviour.
|
|
118
|
+
*
|
|
119
|
+
* @param kernel raw OCCT kernel
|
|
120
|
+
* @param edges unordered edge set
|
|
121
|
+
* @param tol endpoint pairing tolerance (mm); cq uses `wire_comb_tol = 1e-2`
|
|
122
|
+
* @returns one or more wires, each with its edges chained head-to-tail
|
|
123
|
+
*/
|
|
124
|
+
export declare function connectEdgesToWires(kernel: GearKernel, edges: BrepHandle[], tol: number): BrepHandle[];
|
|
125
|
+
/**
|
|
126
|
+
* cq `Face.makeFromWires(outer, holes)` analogue.
|
|
127
|
+
*
|
|
128
|
+
* @param kernel raw OCCT kernel
|
|
129
|
+
* @param outer outer wire
|
|
130
|
+
* @param holes inner hole wires (may be empty)
|
|
131
|
+
* @returns face handle
|
|
132
|
+
*/
|
|
133
|
+
export declare function gearFaceFromWires(kernel: GearKernel, outer: BrepHandle, holes?: BrepHandle[]): BrepHandle;
|
|
134
|
+
/**
|
|
135
|
+
* cq `make_shell(faces, tol)` + `Solid.makeSolid(shell)` analogue.
|
|
136
|
+
*
|
|
137
|
+
* A non-shell sew result is NOT silently swallowed — that is a construction
|
|
138
|
+
* failure signal.
|
|
139
|
+
*
|
|
140
|
+
* @param kernel raw OCCT kernel
|
|
141
|
+
* @param faces faces to sew
|
|
142
|
+
* @param sewingTol sewing tolerance (mm, cq `shell_sewing_tol`)
|
|
143
|
+
* @returns solid built from the sewn shell
|
|
144
|
+
*/
|
|
145
|
+
export declare function gearShellToSolid(kernel: GearKernel, faces: BrepHandle[], sewingTol: number): BrepHandle;
|
|
146
|
+
/**
|
|
147
|
+
* Tooth-face B-spline face strategies (mirrors cq `Face.makeSplineApprox`).
|
|
148
|
+
*
|
|
149
|
+
* | strategy | how | semantic delta vs cq |
|
|
150
|
+
* |---|---|---|
|
|
151
|
+
* | `grid-approx` | `kernel.bsplineSurface(flat, rows, cols)` (also `GeomAPI_PointsToBSplineSurface`) | OCCT default DegMin/DegMax/Tol3D; cq passes 3/8/1e-2 explicitly |
|
|
152
|
+
* | `row-approx-loft` | per-row `approximatePoints(row, tol)` → `loft(wires, false, false)` | curve-level tol same name/meaning; surface is skinned, not fitted at once |
|
|
153
|
+
* | `row-interp-loft` | per-row `interpolatePoints(row)` → `loft` | passes through every sample point (interpolation) |
|
|
154
|
+
*/
|
|
155
|
+
export type GearSplineFaceStrategy = 'grid-approx' | 'row-approx-loft' | 'row-interp-loft';
|
|
156
|
+
/** All selectable strategies (tests iterate in this order for the deviation table). */
|
|
157
|
+
export declare const GEAR_SPLINE_FACE_STRATEGIES: readonly GearSplineFaceStrategy[];
|
|
158
|
+
/**
|
|
159
|
+
* Default strategy chosen by P0 measurement (2026-09-08).
|
|
160
|
+
*
|
|
161
|
+
* Per the measured table in the faijs-gears spike: S2's area relative
|
|
162
|
+
* deviation is 5.6e-7 / max sample-point distance 2.6e-6 mm — about three
|
|
163
|
+
* orders of magnitude better than S1/S3. See
|
|
164
|
+
* `docs/analysis/2026-09-08-fai-cq-gears-spike.md`.
|
|
165
|
+
*/
|
|
166
|
+
export declare const DEFAULT_GEAR_SPLINE_FACE_STRATEGY: GearSplineFaceStrategy;
|
|
167
|
+
/** Face building options (tolerance + degrees, aligned with cq `makeSplineApprox`). */
|
|
168
|
+
export interface GearSplineFaceOptions {
|
|
169
|
+
/** Approximation tolerance (mm). cq's `spline_approx_tol`, default 1e-2. */
|
|
170
|
+
tolerance?: number;
|
|
171
|
+
/** Surface minimum degree (cq: 3) — only meaningful for grid-approx/row-approx-loft. */
|
|
172
|
+
minDeg?: number;
|
|
173
|
+
/** Surface maximum degree (cq: 8). */
|
|
174
|
+
maxDeg?: number;
|
|
175
|
+
}
|
|
176
|
+
/** A row×col point grid with its dimensions (structural — no gear types here). */
|
|
177
|
+
export interface GearSplineGrid {
|
|
178
|
+
/** `rows` point rows of `cols` points each. */
|
|
179
|
+
points: Vec3[][];
|
|
180
|
+
rows: number;
|
|
181
|
+
cols: number;
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Build a face from a row×col point grid with the given strategy.
|
|
185
|
+
*
|
|
186
|
+
* @throws kernel errors propagate verbatim (never swallowed — red line)
|
|
187
|
+
*
|
|
188
|
+
* @param kernel raw OCCT kernel
|
|
189
|
+
* @param grid row×col point grid
|
|
190
|
+
* @param strategy face building strategy
|
|
191
|
+
* @param options tolerance/degree options
|
|
192
|
+
* @returns single face handle (Face)
|
|
193
|
+
*/
|
|
194
|
+
export declare function buildGearSplineFace(kernel: GearKernel, grid: GearSplineGrid, strategy: GearSplineFaceStrategy, options?: GearSplineFaceOptions): BrepHandle;
|
|
195
|
+
/**
|
|
196
|
+
* Reduce a "single-face shell" to a Face; a Face passes through unchanged.
|
|
197
|
+
*
|
|
198
|
+
* @throws when the face count is not 1 (silently taking the first would mask problems)
|
|
199
|
+
*
|
|
200
|
+
* @param kernel raw OCCT kernel
|
|
201
|
+
* @param shape any shape (Face / single-face shell / …)
|
|
202
|
+
* @returns the sole Face
|
|
203
|
+
*/
|
|
204
|
+
export declare function soleGearFace(kernel: GearKernel, shape: BrepHandle): BrepHandle;
|
|
205
|
+
/** Distance from a point to a face (`projectPointOnFace`).
|
|
206
|
+
*
|
|
207
|
+
* @param kernel raw OCCT kernel
|
|
208
|
+
* @param face target face
|
|
209
|
+
* @param p query point
|
|
210
|
+
* @returns euclidean distance (mm)
|
|
211
|
+
*/
|
|
212
|
+
export declare function gearDistanceToFace(kernel: GearKernel, face: BrepHandle, p: Vec3): number;
|
|
213
|
+
/** Distance statistics (max / RMS / sample count). */
|
|
214
|
+
export interface GearDeviationStats {
|
|
215
|
+
max: number;
|
|
216
|
+
rms: number;
|
|
217
|
+
n: number;
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Distance statistics of reference sample points against a face.
|
|
221
|
+
*
|
|
222
|
+
* Parameterization-independent: samples come from the cq side's (u,v) grid, so
|
|
223
|
+
* the two surfaces may have different parameterizations.
|
|
224
|
+
*
|
|
225
|
+
* @param kernel raw OCCT kernel
|
|
226
|
+
* @param face face under test
|
|
227
|
+
* @param samplePoints reference sample points (3D)
|
|
228
|
+
* @returns max distance / RMS / sample count
|
|
229
|
+
*/
|
|
230
|
+
export declare function gearFaceDeviation(kernel: GearKernel, face: BrepHandle, samplePoints: Vec3[]): GearDeviationStats;
|
|
231
|
+
//# sourceMappingURL=gears.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gears.d.ts","sourceRoot":"","sources":["../../src/kernel/gears.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAEnC,8CAA8C;AAC9C,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE,QAAQ,CAAA;IACf,SAAS,EAAE,QAAQ,CAAA;CACpB;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,EAAE,mBAAmB,CAAC,GAAG;IAElE,8EAA8E;IAC9E,cAAc,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,UAAU,CAAA;IAC1E,wFAAwF;IACxF,iBAAiB,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,UAAU,CAAA;IACrE;;;2DAGuD;IACvD,iBAAiB,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,UAAU,CAAA;IAGrE,8EAA8E;IAC9E,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE,SAAS,CAAC,EAAE,MAAM,GAAG,UAAU,CAAA;IACzD,SAAS,CAAC,KAAK,EAAE,UAAU,GAAG,UAAU,CAAA;IACxC,6FAA6F;IAC7F,YAAY,CAAC,KAAK,EAAE,UAAU,GAAG,MAA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