fluidcad 0.0.38 → 0.0.39

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.
Files changed (98) hide show
  1. package/lib/dist/core/2d/aline.d.ts +0 -8
  2. package/lib/dist/core/2d/aline.js +3 -22
  3. package/lib/dist/core/2d/arc.d.ts +1 -23
  4. package/lib/dist/core/2d/arc.js +11 -28
  5. package/lib/dist/core/2d/circle.d.ts +1 -8
  6. package/lib/dist/core/2d/circle.js +7 -24
  7. package/lib/dist/core/2d/ellipse.d.ts +1 -17
  8. package/lib/dist/core/2d/ellipse.js +7 -45
  9. package/lib/dist/core/2d/hline.d.ts +0 -7
  10. package/lib/dist/core/2d/hline.js +5 -27
  11. package/lib/dist/core/2d/intersect.d.ts +0 -7
  12. package/lib/dist/core/2d/intersect.js +0 -13
  13. package/lib/dist/core/2d/line.d.ts +1 -8
  14. package/lib/dist/core/2d/line.js +6 -24
  15. package/lib/dist/core/2d/offset.d.ts +1 -11
  16. package/lib/dist/core/2d/offset.js +0 -16
  17. package/lib/dist/core/2d/polygon.d.ts +1 -17
  18. package/lib/dist/core/2d/polygon.js +18 -37
  19. package/lib/dist/core/2d/project.d.ts +0 -7
  20. package/lib/dist/core/2d/project.js +0 -13
  21. package/lib/dist/core/2d/rect.d.ts +1 -9
  22. package/lib/dist/core/2d/rect.js +0 -19
  23. package/lib/dist/core/2d/slot.d.ts +0 -23
  24. package/lib/dist/core/2d/slot.js +18 -37
  25. package/lib/dist/core/2d/text.d.ts +0 -7
  26. package/lib/dist/core/2d/text.js +0 -14
  27. package/lib/dist/core/2d/vline.d.ts +0 -7
  28. package/lib/dist/core/2d/vline.js +5 -23
  29. package/lib/dist/core/fillet.js +7 -0
  30. package/lib/dist/core/index.d.ts +1 -1
  31. package/lib/dist/core/interfaces.d.ts +43 -0
  32. package/lib/dist/features/2d/connect.d.ts +2 -0
  33. package/lib/dist/features/2d/connect.js +3 -0
  34. package/lib/dist/features/2d/intersect.js +4 -1
  35. package/lib/dist/features/frozen-geometry.d.ts +29 -0
  36. package/lib/dist/features/frozen-geometry.js +62 -0
  37. package/lib/dist/features/loft.d.ts +38 -1
  38. package/lib/dist/features/loft.js +133 -8
  39. package/lib/dist/features/rib.js +11 -1
  40. package/lib/dist/features/shell.d.ts +1 -1
  41. package/lib/dist/features/shell.js +9 -0
  42. package/lib/dist/features/sweep.d.ts +11 -1
  43. package/lib/dist/features/sweep.js +43 -7
  44. package/lib/dist/helpers/clone-transform.js +62 -5
  45. package/lib/dist/helpers/scene-helpers.d.ts +12 -0
  46. package/lib/dist/helpers/scene-helpers.js +26 -0
  47. package/lib/dist/math/bspline-interpolation.d.ts +33 -6
  48. package/lib/dist/math/bspline-interpolation.js +187 -84
  49. package/lib/dist/oc/loft/constrained-loft.d.ts +32 -0
  50. package/lib/dist/oc/loft/constrained-loft.js +61 -0
  51. package/lib/dist/oc/loft/curve-data.d.ts +18 -0
  52. package/lib/dist/oc/loft/curve-data.js +54 -0
  53. package/lib/dist/oc/loft/curve-eval.d.ts +23 -0
  54. package/lib/dist/oc/loft/curve-eval.js +84 -0
  55. package/lib/dist/oc/loft/guided-loft.d.ts +89 -0
  56. package/lib/dist/oc/loft/guided-loft.js +368 -0
  57. package/lib/dist/oc/loft/section-compatibility.d.ts +131 -0
  58. package/lib/dist/oc/loft/section-compatibility.js +481 -0
  59. package/lib/dist/oc/loft/section-curve.d.ts +53 -0
  60. package/lib/dist/oc/loft/section-curve.js +264 -0
  61. package/lib/dist/oc/loft/skinning.d.ts +104 -0
  62. package/lib/dist/oc/loft/skinning.js +299 -0
  63. package/lib/dist/oc/loft-ops.d.ts +28 -1
  64. package/lib/dist/oc/loft-ops.js +31 -1
  65. package/lib/dist/oc/ncollection.d.ts +19 -0
  66. package/lib/dist/oc/ncollection.js +69 -0
  67. package/lib/dist/oc/rib-ops.js +5 -17
  68. package/lib/dist/oc/wire-extend-ops.d.ts +12 -0
  69. package/lib/dist/oc/wire-extend-ops.js +42 -0
  70. package/lib/dist/oc/wire-ops.d.ts +11 -0
  71. package/lib/dist/oc/wire-ops.js +33 -0
  72. package/lib/dist/oc/wrap-ops.js +8 -15
  73. package/lib/dist/tests/features/2d/circle.test.js +0 -10
  74. package/lib/dist/tests/features/2d/ellipse.test.js +0 -30
  75. package/lib/dist/tests/features/2d/line.test.js +0 -5
  76. package/lib/dist/tests/features/2d/offset.test.js +0 -10
  77. package/lib/dist/tests/features/2d/polygon.test.js +0 -16
  78. package/lib/dist/tests/features/2d/rect.test.js +0 -11
  79. package/lib/dist/tests/features/2d/slot.test.js +0 -8
  80. package/lib/dist/tests/features/fillet2d.test.js +37 -1
  81. package/lib/dist/tests/features/loft-conditions.test.d.ts +1 -0
  82. package/lib/dist/tests/features/loft-conditions.test.js +246 -0
  83. package/lib/dist/tests/features/loft-guides.test.d.ts +1 -0
  84. package/lib/dist/tests/features/loft-guides.test.js +276 -0
  85. package/lib/dist/tests/features/repeat-sweep-borrowed-path.test.d.ts +1 -0
  86. package/lib/dist/tests/features/repeat-sweep-borrowed-path.test.js +35 -0
  87. package/lib/dist/tests/features/rib.test.js +50 -0
  88. package/lib/dist/tests/features/shell.test.js +35 -1
  89. package/lib/dist/tests/features/sweep.test.js +81 -0
  90. package/lib/dist/tests/features/text.test.js +33 -14
  91. package/lib/dist/tests/math/bspline-interpolation.test.js +97 -1
  92. package/lib/dist/tsconfig.tsbuildinfo +1 -1
  93. package/llm-docs/api/index.json +1 -1
  94. package/llm-docs/api/types/loft.md +36 -1
  95. package/llm-docs/api/types/sweep.md +13 -1
  96. package/llm-docs/api/types/text.md +2 -2
  97. package/llm-docs/index.json +5 -5
  98. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-06-21T11:15:51.248Z",
3
+ "generatedAt": "2026-07-05T08:56:29.709Z",
4
4
  "symbols": {
5
5
  "arc": "api/arc",
6
6
  "axis": "api/axis",
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  id: api/types/loft
3
3
  title: Loft
4
- summary: "The Loft type. Extends BooleanOperation; adds 11 methods."
4
+ summary: "The Loft type. Extends BooleanOperation; adds 14 methods."
5
5
  tags: [api, type, interface]
6
6
  symbols: [Loft, ILoft]
7
7
  seeAlso: [api/loft, api/types/boolean-operation]
@@ -10,6 +10,9 @@ seeAlso: [api/loft, api/types/boolean-operation]
10
10
 
11
11
  ```ts
12
12
  interface Loft extends BooleanOperation {
13
+ guides(...guides: SceneObject[]): this;
14
+ startCondition(type: LoftConditionType, magnitude?: NumberParam): this;
15
+ endCondition(type: LoftConditionType, magnitude?: NumberParam): this;
13
16
  startFaces(...args: (number | FaceFilter)[]): SceneObject;
14
17
  endFaces(...args: (number | FaceFilter)[]): SceneObject;
15
18
  sideFaces(...args: (number | FaceFilter)[]): SceneObject;
@@ -29,6 +32,38 @@ Extends [[api/types/boolean-operation]].
29
32
 
30
33
  ## Methods
31
34
 
35
+ ### `guides()`
36
+
37
+ Adds side guide curves (rails) the loft surface must follow. Supports one
38
+ or two guides in total; a single argument may carry several separate
39
+ curves (e.g. a sketch holding a curve and its mirror) — each connected
40
+ chain counts as one guide. Every guide must pass through every profile.
41
+ Composes with start/end conditions (the condition fades out around each
42
+ guide's contact point — rails win locally, the condition shapes the
43
+ rest). Cannot be combined with thin mode.
44
+
45
+ | Parameter | Type | Description |
46
+ | --- | --- | --- |
47
+ | `...guides` | [[api/types/scene-object]][] | Sketches or edges forming the guide curves. *(optional)* |
48
+
49
+ ### `startCondition()`
50
+
51
+ Constrains how the surface leaves the first profile.
52
+
53
+ | Parameter | Type | Description |
54
+ | --- | --- | --- |
55
+ | `type` | `LoftConditionType` | `'none'`, `'normal'` or `'tangent'` — see LoftConditionType. |
56
+ | `magnitude` | `NumberParam` | Scales the takeoff strength; defaults to 1. Negative values flip the direction (e.g. inward instead of outward for `'tangent'`). *(optional)* |
57
+
58
+ ### `endCondition()`
59
+
60
+ Constrains how the surface arrives at the last profile.
61
+
62
+ | Parameter | Type | Description |
63
+ | --- | --- | --- |
64
+ | `type` | `LoftConditionType` | `'none'`, `'normal'` or `'tangent'` — see LoftConditionType. |
65
+ | `magnitude` | `NumberParam` | Scales the arrival strength; defaults to 1. Negative values flip the direction (e.g. inward instead of outward for `'tangent'`). *(optional)* |
66
+
32
67
  ### `startFaces()`
33
68
 
34
69
  Selects faces on the first profile plane of the loft.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  id: api/types/sweep
3
3
  title: Sweep
4
- summary: "The Sweep type. Extends BooleanOperation; adds 15 methods."
4
+ summary: "The Sweep type. Extends BooleanOperation; adds 16 methods."
5
5
  tags: [api, type, interface]
6
6
  symbols: [Sweep, ISweep]
7
7
  seeAlso: [api/sweep, api/types/boolean-operation]
@@ -20,6 +20,7 @@ interface Sweep extends BooleanOperation {
20
20
  internalEdges(...args: (number | EdgeFilter)[]): SceneObject;
21
21
  draft(value: NumberParam | [NumberParam, NumberParam]): this;
22
22
  endOffset(value: NumberParam): this;
23
+ extend(side: SweepSide, amount: NumberParam): this;
23
24
  drill(value?: boolean): this;
24
25
  pick(...points: Point2DLike[]): this;
25
26
  thin(offset: NumberParam): this;
@@ -129,6 +130,17 @@ Offsets the end face by a specified distance along the sweep direction.
129
130
  | --- | --- | --- |
130
131
  | `value` | `NumberParam` | The offset distance. |
131
132
 
133
+ ### `extend()`
134
+
135
+ Extends the swept solid beyond the path at the given end by `amount`,
136
+ continuing straight along the path's tangent direction there. Chain twice to
137
+ extend both ends, e.g. `.extend('start', 10).extend('end', 5)`.
138
+
139
+ | Parameter | Type | Description |
140
+ | --- | --- | --- |
141
+ | `side` | `SweepSide` | Which end of the path to extend: `'start'` or `'end'`. |
142
+ | `amount` | `NumberParam` | Distance to extend, in mm (positive; non-positive is a no-op). |
143
+
132
144
  ### `drill()`
133
145
 
134
146
  Enables or disables drill mode.
@@ -15,7 +15,7 @@ interface Text extends ExtrudableGeometry {
15
15
  weight(value: string | number): this;
16
16
  bold(): this;
17
17
  italic(value?: boolean): this;
18
- align(value: "left" | "right" | "center" | "start" | "end" | "space-between" | "space-around"): this;
18
+ align(value: "left" | "right" | "start" | "end" | "center" | "space-between" | "space-around"): this;
19
19
  lineSpacing(value: number): this;
20
20
  letterSpacing(value: number): this;
21
21
  offset(value: number): this;
@@ -82,7 +82,7 @@ synonyms of `"start"` and `"end"`.
82
82
 
83
83
  | Parameter | Type | Description |
84
84
  | --- | --- | --- |
85
- | `value` | `"left"` \| `"right"` \| `"center"` \| `"start"` \| `"end"` \| `"space-between"` \| `"space-around"` | `"left"`/`"start"` (default), `"center"`, `"right"`/`"end"`, `"space-between"`, or `"space-around"`. |
85
+ | `value` | `"left"` \| `"right"` \| `"start"` \| `"end"` \| `"center"` \| `"space-between"` \| `"space-around"` | `"left"`/`"start"` (default), `"center"`, `"right"`/`"end"`, `"space-between"`, or `"space-around"`. |
86
86
 
87
87
  ### `lineSpacing()`
88
88
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
- "generatedAt": "2026-06-21T11:15:51.248Z",
3
+ "generatedAt": "2026-07-05T08:56:29.709Z",
4
4
  "docs": [
5
5
  {
6
6
  "id": "api/arc",
@@ -1289,7 +1289,7 @@
1289
1289
  {
1290
1290
  "id": "api/types/loft",
1291
1291
  "title": "Loft",
1292
- "summary": "The Loft type. Extends BooleanOperation; adds 11 methods.",
1292
+ "summary": "The Loft type. Extends BooleanOperation; adds 14 methods.",
1293
1293
  "tags": [
1294
1294
  "api",
1295
1295
  "type",
@@ -1304,7 +1304,7 @@
1304
1304
  "api/types/boolean-operation"
1305
1305
  ],
1306
1306
  "file": "api/types/loft.md",
1307
- "bodyLength": 4872
1307
+ "bodyLength": 6520
1308
1308
  },
1309
1309
  {
1310
1310
  "id": "api/types/mirror",
@@ -1609,7 +1609,7 @@
1609
1609
  {
1610
1610
  "id": "api/types/sweep",
1611
1611
  "title": "Sweep",
1612
- "summary": "The Sweep type. Extends BooleanOperation; adds 15 methods.",
1612
+ "summary": "The Sweep type. Extends BooleanOperation; adds 16 methods.",
1613
1613
  "tags": [
1614
1614
  "api",
1615
1615
  "type",
@@ -1624,7 +1624,7 @@
1624
1624
  "api/types/boolean-operation"
1625
1625
  ],
1626
1626
  "file": "api/types/sweep.md",
1627
- "bodyLength": 5877
1627
+ "bodyLength": 6391
1628
1628
  },
1629
1629
  {
1630
1630
  "id": "api/types/tangent-arc-two-objects",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluidcad",
3
- "version": "0.0.38",
3
+ "version": "0.0.39",
4
4
  "description": "Parametric CAD modeling library using javascript",
5
5
  "author": "Marwan Aouida <contact@marwan.dev>",
6
6
  "license": "MIT",