brepjs 12.9.1 → 12.10.0

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 (173) hide show
  1. package/dist/2d/blueprints/{approximations.d.ts → blueprintApproximations.d.ts} +1 -1
  2. package/dist/2d/blueprints/blueprintApproximations.d.ts.map +1 -0
  3. package/dist/2d/blueprints/{customCorners.d.ts → blueprintCustomCorners.d.ts} +1 -1
  4. package/dist/2d/blueprints/blueprintCustomCorners.d.ts.map +1 -0
  5. package/dist/2d/blueprints/blueprintFns.d.ts +17 -3
  6. package/dist/2d/blueprints/blueprintFns.d.ts.map +1 -1
  7. package/dist/2d/blueprints/{offset.d.ts → blueprintOffset.d.ts} +1 -1
  8. package/dist/2d/blueprints/blueprintOffset.d.ts.map +1 -0
  9. package/dist/2d/blueprints/index.d.ts +4 -4
  10. package/dist/2d/blueprints/index.d.ts.map +1 -1
  11. package/dist/2d/lib/Curve2D.d.ts +1 -1
  12. package/dist/2d/lib/Curve2D.d.ts.map +1 -1
  13. package/dist/2d-CzEysb7A.js +108 -0
  14. package/dist/2d-DCxS_sb_.cjs +107 -0
  15. package/dist/2d.cjs +24 -88
  16. package/dist/2d.d.ts +1 -1
  17. package/dist/2d.js +33 -98
  18. package/dist/{Blueprint-CUyXM6CV.cjs → Blueprint-BoC0DsDm.cjs} +7 -7
  19. package/dist/{Blueprint-1HGbugaC.js → Blueprint-CQNRtmYG.js} +12 -12
  20. package/dist/{boolean2D-CR4efa35.js → boolean2D-DXAt4GAK.js} +131 -61
  21. package/dist/{boolean2D-9OnbotKT.cjs → boolean2D-N9Pgumgg.cjs} +112 -42
  22. package/dist/{booleanFns-Br2KdGJq.js → booleanFns-BXV7Oh0h.js} +6 -6
  23. package/dist/{booleanFns-BBd2oTvv.cjs → booleanFns-CxArUj_q.cjs} +6 -6
  24. package/dist/brepjs.cjs +120 -146
  25. package/dist/brepjs.js +1216 -1241
  26. package/dist/core/errors.d.ts +6 -0
  27. package/dist/core/errors.d.ts.map +1 -1
  28. package/dist/core.cjs +3 -3
  29. package/dist/core.js +18 -18
  30. package/dist/{curveFns-BwLvO_Ia.cjs → curveFns-CWZRuXQ3.cjs} +2 -2
  31. package/dist/{curveFns-1u0oZ0u0.js → curveFns-OmbtFSG8.js} +2 -2
  32. package/dist/{drawFns-B0na6sbo.js → drawFns-8S0ULGRj.js} +142 -114
  33. package/dist/{drawFns-CzlEePor.cjs → drawFns-voV2wEp8.cjs} +148 -120
  34. package/dist/{faceFns-DGMp47Os.js → faceFns-Bn2seBfp.js} +15 -23
  35. package/dist/{faceFns-BAKkZG6D.cjs → faceFns-CmIrjdt1.cjs} +2 -10
  36. package/dist/{helpers-sJjnIXDA.js → helpers-CEn618MW.js} +10 -7
  37. package/dist/{helpers-DVdscQxW.cjs → helpers-mipaxDTy.cjs} +10 -7
  38. package/dist/index.d.ts +11 -9
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/io/gltfImportFns.d.ts +18 -0
  41. package/dist/io/gltfImportFns.d.ts.map +1 -0
  42. package/dist/io/ioUtils.d.ts +16 -0
  43. package/dist/io/ioUtils.d.ts.map +1 -0
  44. package/dist/io/objImportFns.d.ts.map +1 -1
  45. package/dist/io/threemfImportFns.d.ts.map +1 -1
  46. package/dist/io.cjs +4 -4
  47. package/dist/io.js +4 -4
  48. package/dist/kernel/brepkitWasmTypes.d.ts +2 -2
  49. package/dist/kernel/brepkitWasmTypes.d.ts.map +1 -1
  50. package/dist/kernel/index.d.ts +1 -1
  51. package/dist/kernel/index.d.ts.map +1 -1
  52. package/dist/kernel/interfaces/{construction-ops.d.ts → builder-ops.d.ts} +2 -21
  53. package/dist/kernel/interfaces/builder-ops.d.ts.map +1 -0
  54. package/dist/kernel/interfaces/core.d.ts +1 -16
  55. package/dist/kernel/interfaces/core.d.ts.map +1 -1
  56. package/dist/kernel/interfaces/curve-ops.d.ts +41 -0
  57. package/dist/kernel/interfaces/curve-ops.d.ts.map +1 -0
  58. package/dist/kernel/interfaces/index.d.ts +13 -5
  59. package/dist/kernel/interfaces/index.d.ts.map +1 -1
  60. package/dist/kernel/interfaces/primitive-ops.d.ts +13 -0
  61. package/dist/kernel/interfaces/primitive-ops.d.ts.map +1 -0
  62. package/dist/kernel/interfaces/{geometry-ops.d.ts → surface-ops.d.ts} +7 -34
  63. package/dist/kernel/interfaces/surface-ops.d.ts.map +1 -0
  64. package/dist/kernel/interfaces/transform-ops.d.ts +15 -0
  65. package/dist/kernel/interfaces/transform-ops.d.ts.map +1 -1
  66. package/dist/measurement/measureCache.d.ts +11 -9
  67. package/dist/measurement/measureCache.d.ts.map +1 -1
  68. package/dist/measurement/measureFns.d.ts +23 -70
  69. package/dist/measurement/measureFns.d.ts.map +1 -1
  70. package/dist/measurement/measureTypes.d.ts +30 -0
  71. package/dist/measurement/measureTypes.d.ts.map +1 -0
  72. package/dist/{measurement-C7o5jE6G.js → measurement-fJWDEpz0.js} +53 -34
  73. package/dist/measurement-ph-kanQ7.cjs +154 -0
  74. package/dist/measurement.cjs +2 -1
  75. package/dist/measurement.d.ts +1 -1
  76. package/dist/measurement.d.ts.map +1 -1
  77. package/dist/measurement.js +4 -3
  78. package/dist/{meshFns-7dgZgNYK.cjs → meshFns-B9p4EVV8.cjs} +3 -3
  79. package/dist/{meshFns-CtUl9fGY.js → meshFns-D0qIoxm-.js} +3 -3
  80. package/dist/operations/convexHullFns.d.ts +21 -0
  81. package/dist/operations/convexHullFns.d.ts.map +1 -0
  82. package/dist/operations/straightSkeleton.d.ts.map +1 -1
  83. package/dist/{operations-DisJ5F8s.js → operations-DX_qy_TB.js} +29 -230
  84. package/dist/{operations-DwZ-RBO1.cjs → operations-Ds4xoyxR.cjs} +6 -207
  85. package/dist/operations.cjs +6 -10
  86. package/dist/operations.d.ts +0 -2
  87. package/dist/operations.d.ts.map +1 -1
  88. package/dist/operations.js +26 -30
  89. package/dist/{originTrackingFns-NJ1dWoiF.js → originTrackingFns-BOCAMfd0.js} +2 -2
  90. package/dist/{originTrackingFns-dhaCe8Yb.cjs → originTrackingFns-SPU7ly3_.cjs} +2 -2
  91. package/dist/query/shapeFinders.d.ts +1 -1
  92. package/dist/query/shapeFinders.d.ts.map +1 -1
  93. package/dist/query.cjs +1 -1
  94. package/dist/query.js +2 -2
  95. package/dist/{result-DtuwWSUD.js → result-CoDaWsvc.js} +12 -3
  96. package/dist/{result-DJAAj1yb.cjs → result-DULetAht.cjs} +9 -0
  97. package/dist/result.cjs +1 -1
  98. package/dist/result.js +4 -4
  99. package/dist/{shapeFns-BJbua5kT.js → shapeFns-BZ6zk7nd.js} +3 -3
  100. package/dist/{shapeFns-w9tWELHX.cjs → shapeFns-bRkrwI8R.cjs} +3 -3
  101. package/dist/{shapeTypes-owrg2MNK.cjs → shapeTypes-T0n6mRmt.cjs} +226 -254
  102. package/dist/{shapeTypes-CAEAyk8j.js → shapeTypes-dhhm-T5A.js} +17 -45
  103. package/dist/sketching/CompoundSketch.d.ts +4 -4
  104. package/dist/sketching/CompoundSketch.d.ts.map +1 -1
  105. package/dist/sketching/Sketch.d.ts +3 -3
  106. package/dist/sketching/Sketch.d.ts.map +1 -1
  107. package/dist/sketching/Sketches.d.ts +1 -1
  108. package/dist/sketching/Sketches.d.ts.map +1 -1
  109. package/dist/sketching/draw.d.ts +1 -20
  110. package/dist/sketching/draw.d.ts.map +1 -1
  111. package/dist/sketching/draw3d.d.ts +22 -0
  112. package/dist/sketching/draw3d.d.ts.map +1 -0
  113. package/dist/sketching/sketchFns.d.ts +3 -3
  114. package/dist/sketching/sketchFns.d.ts.map +1 -1
  115. package/dist/sketching/sketchLib.d.ts +2 -2
  116. package/dist/sketching/sketchLib.d.ts.map +1 -1
  117. package/dist/sketching.cjs +2 -2
  118. package/dist/sketching.d.ts +2 -1
  119. package/dist/sketching.d.ts.map +1 -1
  120. package/dist/sketching.js +2 -2
  121. package/dist/{solidBuilders-BLQ4I6Ig.cjs → solidBuilders-BEAoLYvr.cjs} +3 -3
  122. package/dist/{solidBuilders-BS-1220W.js → solidBuilders-tVmD3R7Z.js} +12 -12
  123. package/dist/{surfaceBuilders-KU_7OD2q.cjs → surfaceBuilders-DYS8AMSS.cjs} +3 -3
  124. package/dist/{surfaceBuilders-Dj6AjhOv.js → surfaceBuilders-Dl0ATFbO.js} +15 -15
  125. package/dist/sweepFns-BKnQs59A.js +215 -0
  126. package/dist/sweepFns-COqeYIUp.cjs +214 -0
  127. package/dist/text/textBlueprints.d.ts +4 -3
  128. package/dist/text/textBlueprints.d.ts.map +1 -1
  129. package/dist/topology/cast.d.ts +1 -5
  130. package/dist/topology/cast.d.ts.map +1 -1
  131. package/dist/topology/curveFns.d.ts +1 -1
  132. package/dist/topology/curveFns.d.ts.map +1 -1
  133. package/dist/topology/index.d.ts +2 -2
  134. package/dist/topology/index.d.ts.map +1 -1
  135. package/dist/topology/{colorFns.d.ts → metadata/colorFns.d.ts} +2 -2
  136. package/dist/topology/metadata/colorFns.d.ts.map +1 -0
  137. package/dist/topology/{faceTagFns.d.ts → metadata/faceTagFns.d.ts} +2 -2
  138. package/dist/topology/metadata/faceTagFns.d.ts.map +1 -0
  139. package/dist/topology/{metadataPropagation.d.ts → metadata/metadataPropagation.d.ts} +2 -2
  140. package/dist/topology/metadata/metadataPropagation.d.ts.map +1 -0
  141. package/dist/topology/{originTrackingFns.d.ts → metadata/originTrackingFns.d.ts} +2 -2
  142. package/dist/topology/metadata/originTrackingFns.d.ts.map +1 -0
  143. package/dist/topology/shapeFns.d.ts +1 -1
  144. package/dist/topology/shapeFns.d.ts.map +1 -1
  145. package/dist/{topology-D6LeuhI_.js → topology-C1oUQXZS.js} +10 -10
  146. package/dist/{topology-CyPHYYjV.cjs → topology-xyDYbkHW.cjs} +10 -10
  147. package/dist/topology.cjs +7 -7
  148. package/dist/topology.js +20 -20
  149. package/dist/{topologyQueryFns-fz5kz5e1.cjs → topologyQueryFns-0IptTUCo.cjs} +3 -3
  150. package/dist/{topologyQueryFns-De439iBP.js → topologyQueryFns-Dj4Xd5kx.js} +3 -3
  151. package/dist/{vectors-DTREgnVp.js → vectors-B8juLsQB.js} +1 -1
  152. package/dist/{vectors-C8N_QeEX.cjs → vectors-I_0zdD3O.cjs} +1 -1
  153. package/dist/vectors.cjs +1 -1
  154. package/dist/vectors.js +1 -1
  155. package/package.json +8 -8
  156. package/dist/2d/blueprints/approximations.d.ts.map +0 -1
  157. package/dist/2d/blueprints/customCorners.d.ts.map +0 -1
  158. package/dist/2d/blueprints/offset.d.ts.map +0 -1
  159. package/dist/core/definitionMaps.d.ts +0 -5
  160. package/dist/core/definitionMaps.d.ts.map +0 -1
  161. package/dist/kernel/interfaces/construction-ops.d.ts.map +0 -1
  162. package/dist/kernel/interfaces/geometry-ops.d.ts.map +0 -1
  163. package/dist/loft-BNvBZzqe.cjs +0 -227
  164. package/dist/loft-D0aCZRaB.js +0 -228
  165. package/dist/measurement-DZcaxo1A.cjs +0 -135
  166. package/dist/operations/extrude.d.ts +0 -62
  167. package/dist/operations/extrude.d.ts.map +0 -1
  168. package/dist/operations/loft.d.ts +0 -19
  169. package/dist/operations/loft.d.ts.map +0 -1
  170. package/dist/topology/colorFns.d.ts.map +0 -1
  171. package/dist/topology/faceTagFns.d.ts.map +0 -1
  172. package/dist/topology/metadataPropagation.d.ts.map +0 -1
  173. package/dist/topology/originTrackingFns.d.ts.map +0 -1
@@ -12,4 +12,4 @@ import { Shape2D } from './boolean2D.js';
12
12
  * @returns A new shape of the same type with SVG-compatible curves.
13
13
  */
14
14
  export declare function approximateForSVG<T extends Shape2D>(bp: T, options: ApproximationOptions): T;
15
- //# sourceMappingURL=approximations.d.ts.map
15
+ //# sourceMappingURL=blueprintApproximations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blueprintApproximations.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/blueprintApproximations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAI5D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAG9C;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,OAAO,EAAE,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,oBAAoB,GAAG,CAAC,CAS5F"}
@@ -26,4 +26,4 @@ export declare function fillet2D(shape: Shape2D, radius: number, finder?: Corner
26
26
  * @returns A new shape with chamfered corners, or `null` if the input is `null`.
27
27
  */
28
28
  export declare function chamfer2D(shape: Shape2D, radius: number, finder?: CornerFilter): Shape2D;
29
- //# sourceMappingURL=customCorners.d.ts.map
29
+ //# sourceMappingURL=blueprintCustomCorners.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blueprintCustomCorners.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/blueprintCustomCorners.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAU,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKrE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAgF9C;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,WAE7E;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,YAAY,WAE9E"}
@@ -1,15 +1,29 @@
1
1
  import { Point2D, BoundingBox2d } from '../lib/index.js';
2
2
  import { default as Blueprint } from './Blueprint.js';
3
+ import { default as CompoundBlueprint } from './CompoundBlueprint.js';
3
4
  import { PointInput } from '../../core/types.js';
4
5
  import { Plane, PlaneName } from '../../core/planeTypes.js';
5
6
  import { Face } from '../../core/shapeTypes.js';
6
7
  import { ScaleMode } from '../curves.js';
8
+ import { Result } from '../../core/result.js';
7
9
  /**
8
10
  * Create a new Blueprint from an ordered array of 2D curves.
9
11
  *
12
+ * Returns a `Result` — use `unwrap()` in tests or `isOk()`/`match()` in
13
+ * production code.
14
+ *
10
15
  * @see {@link Blueprint} constructor.
11
16
  */
12
- export declare function createBlueprint(curves: Blueprint['curves']): Blueprint;
17
+ export declare function createBlueprint(curves: Blueprint['curves']): Result<Blueprint>;
18
+ /**
19
+ * Create a CompoundBlueprint from an outer boundary and optional holes.
20
+ *
21
+ * The first element of `blueprints` is the outer boundary; subsequent
22
+ * elements are subtracted as holes.
23
+ *
24
+ * @see {@link CompoundBlueprint} constructor.
25
+ */
26
+ export declare function createCompoundBlueprint(blueprints: Blueprint[]): Result<CompoundBlueprint>;
13
27
  /** Get the axis-aligned bounding box of a 2D blueprint. */
14
28
  export declare function getBounds2D(bp: Blueprint): BoundingBox2d;
15
29
  /** Get the winding direction of a 2D blueprint. */
@@ -29,7 +43,7 @@ export declare function mirror2D(bp: Blueprint, centerOrDirection: Point2D, orig
29
43
  /** Stretch a 2D blueprint along a direction by a given ratio. */
30
44
  export declare function stretch2D(bp: Blueprint, ratio: number, direction: Point2D, origin?: Point2D): Blueprint;
31
45
  /** Project a blueprint onto a 3D plane, producing sketch data. */
32
- export declare function sketch2DOnPlane(bp: Blueprint, inputPlane?: PlaneName | Plane, origin?: PointInput | number): any;
46
+ export declare function sketchOnPlane2D(bp: Blueprint, inputPlane?: PlaneName | Plane, origin?: PointInput | number): any;
33
47
  /** Map a blueprint onto a 3D face's UV surface, producing sketch data. */
34
- export declare function sketch2DOnFace(bp: Blueprint, face: Face, scaleMode?: ScaleMode): any;
48
+ export declare function sketchOnFace2D(bp: Blueprint, face: Face, scaleMode?: ScaleMode): any;
35
49
  //# sourceMappingURL=blueprintFns.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"blueprintFns.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/blueprintFns.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,C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AAG,KAAK,EAC9B,MAAM,CAAC,EAAE,UAAU,GAAG,MAAM,GAE3B,GAAG,CAEL;AAED,0EAA0E;AAC1E,wBAAgB,cAAc,CAC5B,EAAE,EAAE,SAAS,EACb,IAAI,EAAE,IAAI,EACV,SAAS,CAAC,EAAE,SAAS,GAEpB,GAAG,CAEL"}
@@ -55,4 +55,4 @@ export declare function offsetBlueprint(blueprint: Blueprint, offset: number, of
55
55
  * ```
56
56
  */
57
57
  export default function offset(bp: Shape2D, offsetDistance: number, offsetConfig?: Offset2DConfig): Shape2D;
58
- //# sourceMappingURL=offset.d.ts.map
58
+ //# sourceMappingURL=blueprintOffset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blueprintOffset.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/blueprintOffset.ts"],"names":[],"mappings":"AAKA,OAAO,EAIL,OAAO,EAQR,MAAM,iBAAiB,CAAC;AACzB,OAAO,SAAS,MAAM,gBAAgB,CAAC;AAGvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AA2G9C;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CACxB,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,EACd,YAAY,GAAE,cAAmB,GAChC,OAAO,EAAE,CA2HX;AAOD,8CAA8C;AAC9C,MAAM,WAAW,cAAc;IAC7B,yEAAyE;IACzE,YAAY,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;CAC5C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAC7B,SAAS,EAAE,SAAS,EACpB,MAAM,EAAE,MAAM,EACd,YAAY,GAAE,cAAmB,GAChC,OAAO,CAmGT;AAUD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,OAAO,UAAU,MAAM,CAC5B,EAAE,EAAE,OAAO,EACX,cAAc,EAAE,MAAM,EACtB,YAAY,GAAE,cAAmB,GAChC,OAAO,CAeT"}
@@ -3,13 +3,13 @@ import { default as CompoundBlueprint } from './CompoundBlueprint.js';
3
3
  import { default as Blueprints } from './Blueprints.js';
4
4
  import { DrawingInterface, organiseBlueprints } from './lib.js';
5
5
  import { ScaleMode } from '../curves.js';
6
- import { default as offset } from './offset.js';
6
+ import { default as offset } from './blueprintOffset.js';
7
7
  export { Blueprint, CompoundBlueprint, Blueprints, organiseBlueprints, offset };
8
8
  export type { DrawingInterface, ScaleMode };
9
9
  export * from './cannedBlueprints.js';
10
10
  export * from './booleanOperations.js';
11
11
  export * from './boolean2D.js';
12
- export * from './approximations.js';
13
- export * from './offset.js';
14
- export * from './customCorners.js';
12
+ export * from './blueprintApproximations.js';
13
+ export * from './blueprintOffset.js';
14
+ export * from './blueprintCustomCorners.js';
15
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AACvD,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,MAAM,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,EAAE,CAAC;AAEhF,YAAY,EAAE,gBAAgB,EAAE,SAAS,EAAE,CAAC;AAE5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,aAAa,CAAC;AAC5B,cAAc,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/2d/blueprints/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,iBAAiB,MAAM,wBAAwB,CAAC;AACvD,OAAO,UAAU,MAAM,iBAAiB,CAAC;AACzC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,MAAM,MAAM,sBAAsB,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,EAAE,CAAC;AAEhF,YAAY,EAAE,gBAAgB,EAAE,SAAS,EAAE,CAAC;AAE5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,8BAA8B,CAAC;AAC7C,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { KernelType } from '../../kernel/types.js';
2
- import { CurveType } from '../../core/definitionMaps.js';
2
+ import { CurveType } from '../../core/typeDiscriminants.js';
3
3
  import { Result } from '../../core/result.js';
4
4
  import { BoundingBox2d } from './BoundingBox2d.js';
5
5
  import { Point2D } from './definitions.js';
@@ -1 +1 @@
1
- {"version":3,"file":"Curve2D.d.ts","sourceRoot":"","sources":["../../../src/2d/lib/Curve2D.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,KAAK,MAAM,EAAmB,MAAM,sBAAsB,CAAC;AAMpE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,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B;IAED,4DAA4D;IAC5D,IAAI,cAAc,IAAI,MAAM,CAE3B;IAED,0DAA0D;IAC1D,IAAI,aAAa,IAAI,MAAM,CAE1B;IAED,wFAAwF;IACxF,IAAI,QAAQ,IAAI,SAAS,CAExB;IAED,qDAAqD;IACrD,KAAK,IAAI,OAAO;IAQhB,sDAAsD;IACtD,OAAO,IAAI,IAAI;IAQf,OAAO,CAAC,iBAAiB;IAWzB,OAAO,CAAC,iBAAiB;IAyBzB,gFAAgF;IAChF,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM;IAQhD,8EAA8E;IAC9E,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO;IAIlC;;;;OAIG;IACH,SAAS,CAAC,KAAK,EAAE,OAAO,EAAE,SAAS,SAAO,GAAG,MAAM,CAAC,MAAM,CAAC;IA2B3D;;;;OAIG;IACH,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO;IAe3C;;;;OAIG;IACH,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,EAAE,EAAE,SAAS,SAAO,GAAG,OAAO,EAAE;CAiCnE"}
@@ -0,0 +1,108 @@
1
+ import { B as Blueprint } from "./Blueprint-CQNRtmYG.js";
2
+ import { C as CompoundBlueprint } from "./boolean2D-DXAt4GAK.js";
3
+ import { e as err, v as validationError, B as BrepErrorCode, o as ok } from "./result-CoDaWsvc.js";
4
+ function reverseCurve(curve) {
5
+ const cloned = curve.clone();
6
+ cloned.reverse();
7
+ return cloned;
8
+ }
9
+ function curve2dBoundingBox(curve) {
10
+ return curve.boundingBox;
11
+ }
12
+ function curve2dFirstPoint(curve) {
13
+ return curve.firstPoint;
14
+ }
15
+ function curve2dLastPoint(curve) {
16
+ return curve.lastPoint;
17
+ }
18
+ function curve2dSplitAt(curve, params, precision) {
19
+ return curve.splitAt(params, precision);
20
+ }
21
+ function curve2dParameter(curve, point, precision) {
22
+ return curve.parameter(point, precision);
23
+ }
24
+ function curve2dTangentAt(curve, param) {
25
+ return curve.tangentAt(param);
26
+ }
27
+ function curve2dIsOnCurve(curve, point) {
28
+ return curve.isOnCurve(point);
29
+ }
30
+ function curve2dDistanceFrom(curve, point) {
31
+ return curve.distanceFrom(point);
32
+ }
33
+ function createBlueprint(curves) {
34
+ if (curves.length === 0) {
35
+ return err(
36
+ validationError(BrepErrorCode.BLUEPRINT_EMPTY_CURVES, "createBlueprint: at least one curve is required")
37
+ );
38
+ }
39
+ return ok(new Blueprint(curves));
40
+ }
41
+ function createCompoundBlueprint(blueprints) {
42
+ if (blueprints.length === 0) {
43
+ return err(
44
+ validationError(
45
+ BrepErrorCode.COMPOUND_BLUEPRINT_EMPTY,
46
+ "createCompoundBlueprint: at least one blueprint (outer boundary) is required"
47
+ )
48
+ );
49
+ }
50
+ return ok(new CompoundBlueprint(blueprints));
51
+ }
52
+ function getBounds2D(bp) {
53
+ return bp.boundingBox;
54
+ }
55
+ function getOrientation2D(bp) {
56
+ return bp.orientation;
57
+ }
58
+ function isInside2D(bp, point) {
59
+ return bp.isInside(point);
60
+ }
61
+ function toSVGPathD(bp) {
62
+ return bp.toSVGPathD();
63
+ }
64
+ function translate2D(bp, dx, dy) {
65
+ return bp.translate(dx, dy);
66
+ }
67
+ function rotate2D(bp, angle, center) {
68
+ return bp.rotate(angle, center);
69
+ }
70
+ function scale2D(bp, factor, center) {
71
+ return bp.scale(factor, center);
72
+ }
73
+ function mirror2D(bp, centerOrDirection, origin, mode) {
74
+ return bp.mirror(centerOrDirection, origin, mode);
75
+ }
76
+ function stretch2D(bp, ratio, direction, origin) {
77
+ return bp.stretch(ratio, direction, origin);
78
+ }
79
+ function sketchOnPlane2D(bp, inputPlane, origin) {
80
+ return bp.sketchOnPlane(inputPlane, origin);
81
+ }
82
+ function sketchOnFace2D(bp, face, scaleMode) {
83
+ return bp.sketchOnFace(face, scaleMode);
84
+ }
85
+ export {
86
+ createCompoundBlueprint as a,
87
+ curve2dBoundingBox as b,
88
+ createBlueprint as c,
89
+ curve2dDistanceFrom as d,
90
+ curve2dFirstPoint as e,
91
+ curve2dIsOnCurve as f,
92
+ curve2dLastPoint as g,
93
+ curve2dParameter as h,
94
+ curve2dSplitAt as i,
95
+ curve2dTangentAt as j,
96
+ getBounds2D as k,
97
+ getOrientation2D as l,
98
+ isInside2D as m,
99
+ mirror2D as n,
100
+ rotate2D as o,
101
+ sketchOnFace2D as p,
102
+ sketchOnPlane2D as q,
103
+ reverseCurve as r,
104
+ scale2D as s,
105
+ stretch2D as t,
106
+ toSVGPathD as u,
107
+ translate2D as v
108
+ };
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+ const Blueprint = require("./Blueprint-BoC0DsDm.cjs");
3
+ const boolean2D = require("./boolean2D-N9Pgumgg.cjs");
4
+ const result = require("./result-DULetAht.cjs");
5
+ function reverseCurve(curve) {
6
+ const cloned = curve.clone();
7
+ cloned.reverse();
8
+ return cloned;
9
+ }
10
+ function curve2dBoundingBox(curve) {
11
+ return curve.boundingBox;
12
+ }
13
+ function curve2dFirstPoint(curve) {
14
+ return curve.firstPoint;
15
+ }
16
+ function curve2dLastPoint(curve) {
17
+ return curve.lastPoint;
18
+ }
19
+ function curve2dSplitAt(curve, params, precision) {
20
+ return curve.splitAt(params, precision);
21
+ }
22
+ function curve2dParameter(curve, point, precision) {
23
+ return curve.parameter(point, precision);
24
+ }
25
+ function curve2dTangentAt(curve, param) {
26
+ return curve.tangentAt(param);
27
+ }
28
+ function curve2dIsOnCurve(curve, point) {
29
+ return curve.isOnCurve(point);
30
+ }
31
+ function curve2dDistanceFrom(curve, point) {
32
+ return curve.distanceFrom(point);
33
+ }
34
+ function createBlueprint(curves) {
35
+ if (curves.length === 0) {
36
+ return result.err(
37
+ result.validationError(result.BrepErrorCode.BLUEPRINT_EMPTY_CURVES, "createBlueprint: at least one curve is required")
38
+ );
39
+ }
40
+ return result.ok(new Blueprint.Blueprint(curves));
41
+ }
42
+ function createCompoundBlueprint(blueprints) {
43
+ if (blueprints.length === 0) {
44
+ return result.err(
45
+ result.validationError(
46
+ result.BrepErrorCode.COMPOUND_BLUEPRINT_EMPTY,
47
+ "createCompoundBlueprint: at least one blueprint (outer boundary) is required"
48
+ )
49
+ );
50
+ }
51
+ return result.ok(new boolean2D.CompoundBlueprint(blueprints));
52
+ }
53
+ function getBounds2D(bp) {
54
+ return bp.boundingBox;
55
+ }
56
+ function getOrientation2D(bp) {
57
+ return bp.orientation;
58
+ }
59
+ function isInside2D(bp, point) {
60
+ return bp.isInside(point);
61
+ }
62
+ function toSVGPathD(bp) {
63
+ return bp.toSVGPathD();
64
+ }
65
+ function translate2D(bp, dx, dy) {
66
+ return bp.translate(dx, dy);
67
+ }
68
+ function rotate2D(bp, angle, center) {
69
+ return bp.rotate(angle, center);
70
+ }
71
+ function scale2D(bp, factor, center) {
72
+ return bp.scale(factor, center);
73
+ }
74
+ function mirror2D(bp, centerOrDirection, origin, mode) {
75
+ return bp.mirror(centerOrDirection, origin, mode);
76
+ }
77
+ function stretch2D(bp, ratio, direction, origin) {
78
+ return bp.stretch(ratio, direction, origin);
79
+ }
80
+ function sketchOnPlane2D(bp, inputPlane, origin) {
81
+ return bp.sketchOnPlane(inputPlane, origin);
82
+ }
83
+ function sketchOnFace2D(bp, face, scaleMode) {
84
+ return bp.sketchOnFace(face, scaleMode);
85
+ }
86
+ exports.createBlueprint = createBlueprint;
87
+ exports.createCompoundBlueprint = createCompoundBlueprint;
88
+ exports.curve2dBoundingBox = curve2dBoundingBox;
89
+ exports.curve2dDistanceFrom = curve2dDistanceFrom;
90
+ exports.curve2dFirstPoint = curve2dFirstPoint;
91
+ exports.curve2dIsOnCurve = curve2dIsOnCurve;
92
+ exports.curve2dLastPoint = curve2dLastPoint;
93
+ exports.curve2dParameter = curve2dParameter;
94
+ exports.curve2dSplitAt = curve2dSplitAt;
95
+ exports.curve2dTangentAt = curve2dTangentAt;
96
+ exports.getBounds2D = getBounds2D;
97
+ exports.getOrientation2D = getOrientation2D;
98
+ exports.isInside2D = isInside2D;
99
+ exports.mirror2D = mirror2D;
100
+ exports.reverseCurve = reverseCurve;
101
+ exports.rotate2D = rotate2D;
102
+ exports.scale2D = scale2D;
103
+ exports.sketchOnFace2D = sketchOnFace2D;
104
+ exports.sketchOnPlane2D = sketchOnPlane2D;
105
+ exports.stretch2D = stretch2D;
106
+ exports.toSVGPathD = toSVGPathD;
107
+ exports.translate2D = translate2D;
package/dist/2d.cjs CHANGED
@@ -1,72 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const Blueprint = require("./Blueprint-CUyXM6CV.cjs");
4
- const boolean2D = require("./boolean2D-9OnbotKT.cjs");
5
- function reverseCurve(curve) {
6
- const cloned = curve.clone();
7
- cloned.reverse();
8
- return cloned;
9
- }
10
- function curve2dBoundingBox(curve) {
11
- return curve.boundingBox;
12
- }
13
- function curve2dFirstPoint(curve) {
14
- return curve.firstPoint;
15
- }
16
- function curve2dLastPoint(curve) {
17
- return curve.lastPoint;
18
- }
19
- function curve2dSplitAt(curve, params, precision) {
20
- return curve.splitAt(params, precision);
21
- }
22
- function curve2dParameter(curve, point, precision) {
23
- return curve.parameter(point, precision);
24
- }
25
- function curve2dTangentAt(curve, param) {
26
- return curve.tangentAt(param);
27
- }
28
- function curve2dIsOnCurve(curve, point) {
29
- return curve.isOnCurve(point);
30
- }
31
- function curve2dDistanceFrom(curve, point) {
32
- return curve.distanceFrom(point);
33
- }
34
- function createBlueprint(curves) {
35
- return new Blueprint.Blueprint(curves);
36
- }
37
- function getBounds2D(bp) {
38
- return bp.boundingBox;
39
- }
40
- function getOrientation2D(bp) {
41
- return bp.orientation;
42
- }
43
- function isInside2D(bp, point) {
44
- return bp.isInside(point);
45
- }
46
- function toSVGPathD(bp) {
47
- return bp.toSVGPathD();
48
- }
49
- function translate2D(bp, dx, dy) {
50
- return bp.translate(dx, dy);
51
- }
52
- function rotate2D(bp, angle, center) {
53
- return bp.rotate(angle, center);
54
- }
55
- function scale2D(bp, factor, center) {
56
- return bp.scale(factor, center);
57
- }
58
- function mirror2D(bp, centerOrDirection, origin, mode) {
59
- return bp.mirror(centerOrDirection, origin, mode);
60
- }
61
- function stretch2D(bp, ratio, direction, origin) {
62
- return bp.stretch(ratio, direction, origin);
63
- }
64
- function sketch2DOnPlane(bp, inputPlane, origin) {
65
- return bp.sketchOnPlane(inputPlane, origin);
66
- }
67
- function sketch2DOnFace(bp, face, scaleMode) {
68
- return bp.sketchOnFace(face, scaleMode);
69
- }
3
+ const Blueprint = require("./Blueprint-BoC0DsDm.cjs");
4
+ const boolean2D = require("./boolean2D-N9Pgumgg.cjs");
5
+ const _2d = require("./2d-DCxS_sb_.cjs");
70
6
  exports.Blueprint = Blueprint.Blueprint;
71
7
  exports.BoundingBox2d = Blueprint.BoundingBox2d;
72
8
  exports.Curve2D = Blueprint.Curve2D;
@@ -81,24 +17,24 @@ exports.intersectBlueprints = boolean2D.intersectBlueprints;
81
17
  exports.organiseBlueprints = boolean2D.organiseBlueprints;
82
18
  exports.polysidesBlueprint = boolean2D.polysidesBlueprint;
83
19
  exports.roundedRectangleBlueprint = boolean2D.roundedRectangleBlueprint;
84
- exports.createBlueprint = createBlueprint;
85
- exports.curve2dBoundingBox = curve2dBoundingBox;
86
- exports.curve2dDistanceFrom = curve2dDistanceFrom;
87
- exports.curve2dFirstPoint = curve2dFirstPoint;
88
- exports.curve2dIsOnCurve = curve2dIsOnCurve;
89
- exports.curve2dLastPoint = curve2dLastPoint;
90
- exports.curve2dParameter = curve2dParameter;
91
- exports.curve2dSplitAt = curve2dSplitAt;
92
- exports.curve2dTangentAt = curve2dTangentAt;
93
- exports.getBounds2D = getBounds2D;
94
- exports.getOrientation2D = getOrientation2D;
95
- exports.isInside2D = isInside2D;
96
- exports.mirror2D = mirror2D;
97
- exports.reverseCurve = reverseCurve;
98
- exports.rotate2D = rotate2D;
99
- exports.scale2D = scale2D;
100
- exports.sketch2DOnFace = sketch2DOnFace;
101
- exports.sketch2DOnPlane = sketch2DOnPlane;
102
- exports.stretch2D = stretch2D;
103
- exports.toSVGPathD = toSVGPathD;
104
- exports.translate2D = translate2D;
20
+ exports.createBlueprint = _2d.createBlueprint;
21
+ exports.curve2dBoundingBox = _2d.curve2dBoundingBox;
22
+ exports.curve2dDistanceFrom = _2d.curve2dDistanceFrom;
23
+ exports.curve2dFirstPoint = _2d.curve2dFirstPoint;
24
+ exports.curve2dIsOnCurve = _2d.curve2dIsOnCurve;
25
+ exports.curve2dLastPoint = _2d.curve2dLastPoint;
26
+ exports.curve2dParameter = _2d.curve2dParameter;
27
+ exports.curve2dSplitAt = _2d.curve2dSplitAt;
28
+ exports.curve2dTangentAt = _2d.curve2dTangentAt;
29
+ exports.getBounds2D = _2d.getBounds2D;
30
+ exports.getOrientation2D = _2d.getOrientation2D;
31
+ exports.isInside2D = _2d.isInside2D;
32
+ exports.mirror2D = _2d.mirror2D;
33
+ exports.reverseCurve = _2d.reverseCurve;
34
+ exports.rotate2D = _2d.rotate2D;
35
+ exports.scale2D = _2d.scale2D;
36
+ exports.sketchOnFace2D = _2d.sketchOnFace2D;
37
+ exports.sketchOnPlane2D = _2d.sketchOnPlane2D;
38
+ exports.stretch2D = _2d.stretch2D;
39
+ exports.toSVGPathD = _2d.toSVGPathD;
40
+ exports.translate2D = _2d.translate2D;
package/dist/2d.d.ts CHANGED
@@ -13,7 +13,7 @@
13
13
  export { default as Blueprint } from './2d/blueprints/Blueprint.js';
14
14
  export { default as CompoundBlueprint } from './2d/blueprints/CompoundBlueprint.js';
15
15
  export { default as Blueprints } from './2d/blueprints/Blueprints.js';
16
- export { createBlueprint, getBounds2D, getOrientation2D, isInside2D, toSVGPathD, translate2D, rotate2D, scale2D, mirror2D, stretch2D, sketch2DOnPlane, sketch2DOnFace, } from './2d/blueprints/blueprintFns.js';
16
+ export { createBlueprint, getBounds2D, getOrientation2D, isInside2D, toSVGPathD, translate2D, rotate2D, scale2D, mirror2D, stretch2D, sketchOnPlane2D, sketchOnFace2D, } from './2d/blueprints/blueprintFns.js';
17
17
  export { fuseBlueprints, cutBlueprints, intersectBlueprints, } from './2d/blueprints/booleanOperations.js';
18
18
  export { fuse2D, cut2D, intersect2D, type Shape2D } from './2d/blueprints/boolean2D.js';
19
19
  export { reverseCurve, curve2dBoundingBox, curve2dFirstPoint, curve2dLastPoint, curve2dSplitAt, curve2dParameter, curve2dTangentAt, curve2dIsOnCurve, curve2dDistanceFrom, } from './2d/lib/curve2dFns.js';
package/dist/2d.js CHANGED
@@ -1,105 +1,40 @@
1
- import { B as Blueprint } from "./Blueprint-1HGbugaC.js";
2
- import { d, C } from "./Blueprint-1HGbugaC.js";
3
- import { c, C as C2, d as d2, j, f, k, h, l, o, p, r } from "./boolean2D-CR4efa35.js";
4
- function reverseCurve(curve) {
5
- const cloned = curve.clone();
6
- cloned.reverse();
7
- return cloned;
8
- }
9
- function curve2dBoundingBox(curve) {
10
- return curve.boundingBox;
11
- }
12
- function curve2dFirstPoint(curve) {
13
- return curve.firstPoint;
14
- }
15
- function curve2dLastPoint(curve) {
16
- return curve.lastPoint;
17
- }
18
- function curve2dSplitAt(curve, params, precision) {
19
- return curve.splitAt(params, precision);
20
- }
21
- function curve2dParameter(curve, point, precision) {
22
- return curve.parameter(point, precision);
23
- }
24
- function curve2dTangentAt(curve, param) {
25
- return curve.tangentAt(param);
26
- }
27
- function curve2dIsOnCurve(curve, point) {
28
- return curve.isOnCurve(point);
29
- }
30
- function curve2dDistanceFrom(curve, point) {
31
- return curve.distanceFrom(point);
32
- }
33
- function createBlueprint(curves) {
34
- return new Blueprint(curves);
35
- }
36
- function getBounds2D(bp) {
37
- return bp.boundingBox;
38
- }
39
- function getOrientation2D(bp) {
40
- return bp.orientation;
41
- }
42
- function isInside2D(bp, point) {
43
- return bp.isInside(point);
44
- }
45
- function toSVGPathD(bp) {
46
- return bp.toSVGPathD();
47
- }
48
- function translate2D(bp, dx, dy) {
49
- return bp.translate(dx, dy);
50
- }
51
- function rotate2D(bp, angle, center) {
52
- return bp.rotate(angle, center);
53
- }
54
- function scale2D(bp, factor, center) {
55
- return bp.scale(factor, center);
56
- }
57
- function mirror2D(bp, centerOrDirection, origin, mode) {
58
- return bp.mirror(centerOrDirection, origin, mode);
59
- }
60
- function stretch2D(bp, ratio, direction, origin) {
61
- return bp.stretch(ratio, direction, origin);
62
- }
63
- function sketch2DOnPlane(bp, inputPlane, origin) {
64
- return bp.sketchOnPlane(inputPlane, origin);
65
- }
66
- function sketch2DOnFace(bp, face, scaleMode) {
67
- return bp.sketchOnFace(face, scaleMode);
68
- }
1
+ import { B, d, C } from "./Blueprint-CQNRtmYG.js";
2
+ import { d as d2, C as C2, f, n, g, q, k, s, o, p, c } from "./boolean2D-DXAt4GAK.js";
3
+ import { c as c2, b, d as d3, e, f as f2, g as g2, h, i, j, k as k2, l, m, n as n2, r, o as o2, s as s2, p as p2, q as q2, t, u, v } from "./2d-CzEysb7A.js";
69
4
  export {
70
- Blueprint,
71
- c as Blueprints,
5
+ B as Blueprint,
6
+ d2 as Blueprints,
72
7
  d as BoundingBox2d,
73
8
  C2 as CompoundBlueprint,
74
9
  C as Curve2D,
75
- createBlueprint,
76
- curve2dBoundingBox,
77
- curve2dDistanceFrom,
78
- curve2dFirstPoint,
79
- curve2dIsOnCurve,
80
- curve2dLastPoint,
81
- curve2dParameter,
82
- curve2dSplitAt,
83
- curve2dTangentAt,
84
- d2 as cut2D,
85
- j as cutBlueprints,
86
- f as fuse2D,
87
- k as fuseBlueprints,
88
- getBounds2D,
89
- getOrientation2D,
90
- h as intersect2D,
91
- l as intersectBlueprints,
92
- isInside2D,
93
- mirror2D,
10
+ c2 as createBlueprint,
11
+ b as curve2dBoundingBox,
12
+ d3 as curve2dDistanceFrom,
13
+ e as curve2dFirstPoint,
14
+ f2 as curve2dIsOnCurve,
15
+ g2 as curve2dLastPoint,
16
+ h as curve2dParameter,
17
+ i as curve2dSplitAt,
18
+ j as curve2dTangentAt,
19
+ f as cut2D,
20
+ n as cutBlueprints,
21
+ g as fuse2D,
22
+ q as fuseBlueprints,
23
+ k2 as getBounds2D,
24
+ l as getOrientation2D,
25
+ k as intersect2D,
26
+ s as intersectBlueprints,
27
+ m as isInside2D,
28
+ n2 as mirror2D,
94
29
  o as organiseBlueprints,
95
30
  p as polysidesBlueprint,
96
- reverseCurve,
97
- rotate2D,
98
- r as roundedRectangleBlueprint,
99
- scale2D,
100
- sketch2DOnFace,
101
- sketch2DOnPlane,
102
- stretch2D,
103
- toSVGPathD,
104
- translate2D
31
+ r as reverseCurve,
32
+ o2 as rotate2D,
33
+ c as roundedRectangleBlueprint,
34
+ s2 as scale2D,
35
+ p2 as sketchOnFace2D,
36
+ q2 as sketchOnPlane2D,
37
+ t as stretch2D,
38
+ u as toSVGPathD,
39
+ v as translate2D
105
40
  };
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
- const vectors = require("./vectors-C8N_QeEX.cjs");
3
- const shapeTypes = require("./shapeTypes-owrg2MNK.cjs");
4
- const faceFns = require("./faceFns-BAKkZG6D.cjs");
5
- const curveFns = require("./curveFns-BwLvO_Ia.cjs");
6
- const result = require("./result-DJAAj1yb.cjs");
7
- const helpers = require("./helpers-DVdscQxW.cjs");
2
+ const vectors = require("./vectors-I_0zdD3O.cjs");
3
+ const shapeTypes = require("./shapeTypes-T0n6mRmt.cjs");
4
+ const faceFns = require("./faceFns-CmIrjdt1.cjs");
5
+ const curveFns = require("./curveFns-CWZRuXQ3.cjs");
6
+ const result = require("./result-DULetAht.cjs");
7
+ const helpers = require("./helpers-mipaxDTy.cjs");
8
8
  const types = require("./types-CA_xrgDq.cjs");
9
9
  const vecOps = require("./vecOps-CjRL1jau.cjs");
10
- const surfaceBuilders = require("./surfaceBuilders-KU_7OD2q.cjs");
10
+ const surfaceBuilders = require("./surfaceBuilders-DYS8AMSS.cjs");
11
11
  function isPoint2D(point) {
12
12
  return Array.isArray(point) && point.length === 2 && typeof point[0] === "number" && typeof point[1] === "number";
13
13
  }