flo-mat 3.0.11 → 3.0.13

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 (129) hide show
  1. package/browser/index.js +213 -78
  2. package/browser/index.min.js +1 -1
  3. package/node/cp-node/cp-node-fs.d.ts +4 -4
  4. package/node/cp-node/cp-node-fs.js +4 -4
  5. package/node/cp-node/cp-node.d.ts +8 -10
  6. package/node/cp-node/fs/cp-node-comparator.d.ts +6 -0
  7. package/node/cp-node/fs/cp-node-comparator.js +6 -0
  8. package/node/cp-node/fs/cp-node-comparator.js.map +1 -1
  9. package/node/cp-node/fs/enhance-cp-node.d.ts +5 -2
  10. package/node/cp-node/fs/enhance-cp-node.js +4 -0
  11. package/node/cp-node/fs/enhance-cp-node.js.map +1 -1
  12. package/node/cp-node/fs/get-all-on-circle.d.ts +4 -4
  13. package/node/cp-node/fs/get-all-on-circle.js +4 -4
  14. package/node/cp-node/fs/get-all-on-loop.d.ts +4 -0
  15. package/node/cp-node/fs/get-all-on-loop.js +4 -0
  16. package/node/cp-node/fs/get-all-on-loop.js.map +1 -1
  17. package/node/cp-node/fs/get-boundary-bezier-parts-to-next.d.ts +5 -4
  18. package/node/cp-node/fs/get-boundary-bezier-parts-to-next.js +5 -4
  19. package/node/cp-node/fs/get-boundary-bezier-parts-to-next.js.map +1 -1
  20. package/node/cp-node/fs/get-boundary-beziers-to-next.d.ts +4 -8
  21. package/node/cp-node/fs/get-boundary-beziers-to-next.js +4 -8
  22. package/node/cp-node/fs/get-boundary-beziers-to-next.js.map +1 -1
  23. package/node/cp-node/fs/get-children.d.ts +6 -0
  24. package/node/cp-node/fs/get-children.js +6 -0
  25. package/node/cp-node/fs/get-children.js.map +1 -1
  26. package/node/cp-node/fs/get-edge-direction.d.ts +6 -0
  27. package/node/cp-node/fs/get-edge-direction.js +6 -0
  28. package/node/cp-node/fs/get-edge-direction.js.map +1 -1
  29. package/node/cp-node/fs/get-first-exit.d.ts +4 -0
  30. package/node/cp-node/fs/get-first-exit.js +4 -0
  31. package/node/cp-node/fs/get-first-exit.js.map +1 -1
  32. package/node/cp-node/fs/get-mat-curve-between.d.ts +6 -0
  33. package/node/cp-node/fs/get-mat-curve-between.js +6 -0
  34. package/node/cp-node/fs/get-mat-curve-between.js.map +1 -1
  35. package/node/cp-node/fs/get-mat-curve-to-next.d.ts +6 -0
  36. package/node/cp-node/fs/get-mat-curve-to-next.js +6 -0
  37. package/node/cp-node/fs/get-mat-curve-to-next.js.map +1 -1
  38. package/node/cp-node/fs/get-prong-count.d.ts +8 -0
  39. package/node/cp-node/fs/get-prong-count.js +8 -0
  40. package/node/cp-node/fs/get-prong-count.js.map +1 -1
  41. package/node/cp-node/fs/get-real-prong-count.d.ts +6 -0
  42. package/node/cp-node/fs/get-real-prong-count.js +6 -0
  43. package/node/cp-node/fs/get-real-prong-count.js.map +1 -1
  44. package/node/cp-node/fs/get-vertex-forward-children.d.ts +8 -0
  45. package/node/cp-node/fs/get-vertex-forward-children.js +8 -0
  46. package/node/cp-node/fs/get-vertex-forward-children.js.map +1 -1
  47. package/node/cp-node/fs/is-fully-terminating.d.ts +2 -5
  48. package/node/cp-node/fs/is-fully-terminating.js +2 -5
  49. package/node/cp-node/fs/is-fully-terminating.js.map +1 -1
  50. package/node/cp-node/fs/is-on-same-circle.d.ts +6 -0
  51. package/node/cp-node/fs/is-on-same-circle.js +6 -0
  52. package/node/cp-node/fs/is-on-same-circle.js.map +1 -1
  53. package/node/cp-node/fs/is-one-prong.d.ts +8 -0
  54. package/node/cp-node/fs/is-one-prong.js +8 -0
  55. package/node/cp-node/fs/is-one-prong.js.map +1 -1
  56. package/node/cp-node/fs/is-order-correct.d.ts +1 -1
  57. package/node/cp-node/fs/is-order-correct.js +1 -4
  58. package/node/cp-node/fs/is-order-correct.js.map +1 -1
  59. package/node/cp-node/fs/is-sharp.d.ts +7 -0
  60. package/node/cp-node/fs/is-sharp.js +7 -0
  61. package/node/cp-node/fs/is-sharp.js.map +1 -1
  62. package/node/cp-node/fs/is-special.d.ts +1 -1
  63. package/node/cp-node/fs/is-special.js +1 -3
  64. package/node/cp-node/fs/is-special.js.map +1 -1
  65. package/node/cp-node/fs/is-terminating.d.ts +22 -0
  66. package/node/cp-node/fs/is-terminating.js +22 -0
  67. package/node/cp-node/fs/is-terminating.js.map +1 -1
  68. package/node/cp-node/fs/traverse-cp.d.ts +9 -0
  69. package/node/cp-node/fs/traverse-cp.js +9 -0
  70. package/node/cp-node/fs/traverse-cp.js.map +1 -1
  71. package/node/cp-node/fs/traverse-edges.d.ts +7 -0
  72. package/node/cp-node/fs/traverse-edges.js +7 -0
  73. package/node/cp-node/fs/traverse-edges.js.map +1 -1
  74. package/node/cp-node/fs/traverse-vertices.d.ts +9 -0
  75. package/node/cp-node/fs/traverse-vertices.js +9 -0
  76. package/node/cp-node/fs/traverse-vertices.js.map +1 -1
  77. package/node/find-2-prong/add-2-prong.js +5 -3
  78. package/node/find-2-prong/add-2-prong.js.map +1 -1
  79. package/node/find-2-prong/find-2-prong.d.ts +1 -0
  80. package/node/find-2-prong/find-2-prong.js +2 -1
  81. package/node/find-2-prong/find-2-prong.js.map +1 -1
  82. package/node/find-mat/mat-options.js +1 -1
  83. package/node/find-mat/mat-options.js.map +1 -1
  84. package/node/floyd-warshall/get-graph.d.ts +1 -1
  85. package/node/floyd-warshall/get-graph.js +2 -2
  86. package/node/floyd-warshall/get-graph.js.map +1 -1
  87. package/node/floyd-warshall/get-hole-closer-pairs.d.ts +6 -1
  88. package/node/floyd-warshall/get-hole-closer-pairs.js +8 -0
  89. package/node/floyd-warshall/get-hole-closer-pairs.js.map +1 -1
  90. package/node/mat/add-to-cp-tree.js +1 -3
  91. package/node/mat/add-to-cp-tree.js.map +1 -1
  92. package/node/vertex/remove-vertex.d.ts +5 -0
  93. package/node/vertex/remove-vertex.js +5 -0
  94. package/node/vertex/remove-vertex.js.map +1 -1
  95. package/package.json +3 -3
  96. package/src/cp-node/cp-node-fs.ts +4 -4
  97. package/src/cp-node/cp-node.ts +8 -10
  98. package/src/cp-node/fs/cp-node-comparator.ts +6 -0
  99. package/src/cp-node/fs/enhance-cp-node.ts +4 -0
  100. package/src/cp-node/fs/get-all-on-circle.ts +4 -4
  101. package/src/cp-node/fs/get-all-on-loop.ts +4 -0
  102. package/src/cp-node/fs/get-boundary-bezier-parts-to-next.ts +6 -5
  103. package/src/cp-node/fs/get-boundary-beziers-to-next.ts +4 -8
  104. package/src/cp-node/fs/get-children.ts +6 -0
  105. package/src/cp-node/fs/get-edge-direction.ts +6 -0
  106. package/src/cp-node/fs/get-first-exit.ts +4 -0
  107. package/src/cp-node/fs/get-mat-curve-between.ts +6 -0
  108. package/src/cp-node/fs/get-mat-curve-to-next.ts +6 -0
  109. package/src/cp-node/fs/get-prong-count.ts +8 -0
  110. package/src/cp-node/fs/get-real-prong-count.ts +6 -0
  111. package/src/cp-node/fs/get-vertex-forward-children.ts +8 -0
  112. package/src/cp-node/fs/is-fully-terminating.ts +2 -5
  113. package/src/cp-node/fs/is-on-same-circle.ts +6 -0
  114. package/src/cp-node/fs/is-one-prong.ts +8 -0
  115. package/src/cp-node/fs/is-order-correct.ts +1 -4
  116. package/src/cp-node/fs/is-sharp.ts +7 -0
  117. package/src/cp-node/fs/is-special.ts +2 -3
  118. package/src/cp-node/fs/is-terminating.ts +22 -0
  119. package/src/cp-node/fs/traverse-cp.ts +9 -0
  120. package/src/cp-node/fs/traverse-edges.ts +7 -0
  121. package/src/cp-node/fs/traverse-vertices.ts +9 -0
  122. package/src/find-2-prong/add-2-prong.ts +4 -1
  123. package/src/find-2-prong/find-2-prong.ts +4 -3
  124. package/src/find-mat/mat-options.ts +1 -1
  125. package/src/floyd-warshall/get-graph.ts +3 -3
  126. package/src/floyd-warshall/get-hole-closer-pairs.ts +9 -1
  127. package/src/mat/add-to-cp-tree.ts +1 -2
  128. package/src/vertex/remove-vertex.ts +5 -0
  129. package/src/cp-node/fs/create-cp-node.ts +0 -21
@@ -173,20 +173,20 @@ declare const CpNodeFs: {
173
173
  */
174
174
  clone: typeof clone;
175
175
  /**
176
- * Returns the ordered bezier curves from this CpNode to the next CpNode
176
+ * Returns the ordered bezier curves from this `CpNode` to the next `CpNode`
177
177
  * on the boundary.
178
178
  * @param cpNode
179
179
  */
180
180
  getBoundaryBezierPartsToNext: typeof getBoundaryBezierPartsToNext;
181
181
  /**
182
- * Returns the ordered bezier curves from this CpNode to the next CpNode
182
+ * Returns the ordered bezier curves from this `CpNode` to the next `CpNode`
183
183
  * on the boundary.
184
184
  * @param cpNode
185
185
  */
186
186
  getBoundaryBeziersToNext: typeof getBoundaryBeziersToNext;
187
187
  /**
188
- * Removes a cpNode from the MAT.
189
- * @param cpTree The tree graph holding the `CpNodes` of the MAT.
188
+ * Removes a `CpNode` from the MAT.
189
+ * @param cpTree The tree graph holding the `CpNode`s of the MAT.
190
190
  * @param cpNode The `CpNode` to remove.
191
191
  */
192
192
  removeVertex: typeof removeVertex;
@@ -173,20 +173,20 @@ const CpNodeFs = {
173
173
  */
174
174
  clone,
175
175
  /**
176
- * Returns the ordered bezier curves from this CpNode to the next CpNode
176
+ * Returns the ordered bezier curves from this `CpNode` to the next `CpNode`
177
177
  * on the boundary.
178
178
  * @param cpNode
179
179
  */
180
180
  getBoundaryBezierPartsToNext,
181
181
  /**
182
- * Returns the ordered bezier curves from this CpNode to the next CpNode
182
+ * Returns the ordered bezier curves from this `CpNode` to the next `CpNode`
183
183
  * on the boundary.
184
184
  * @param cpNode
185
185
  */
186
186
  getBoundaryBeziersToNext,
187
187
  /**
188
- * Removes a cpNode from the MAT.
189
- * @param cpTree The tree graph holding the `CpNodes` of the MAT.
188
+ * Removes a `CpNode` from the MAT.
189
+ * @param cpTree The tree graph holding the `CpNode`s of the MAT.
190
190
  * @param cpNode The `CpNode` to remove.
191
191
  */
192
192
  removeVertex,
@@ -52,11 +52,11 @@ interface CpNode {
52
52
  cp: ContactPoint;
53
53
  /** If true, this `CpNode` belongs to a hole-closing maximal disk. */
54
54
  isHoleClosing: boolean;
55
- /** true if this cpNode is at a shape boundary intersection point, false otherwise */
55
+ /** true if this `CpNode` is at a shape boundary intersection point, false otherwise */
56
56
  isIntersection: boolean;
57
- /** The previous (going clockwise around the boundary) contact point (`CpNode`).*/
57
+ /** The previous (going clockwise around the boundary) contact point `CpNode`. */
58
58
  prev: CpNode;
59
- /** The next (going anti-clockwise around the boundary) contact point (`CpNode`). */
59
+ /** The next (going anti-clockwise around the boundary) contact point `CpNode`. */
60
60
  next: CpNode;
61
61
  /**
62
62
  * The previous `CpNode` (going clockwise around the inscribed circle
@@ -69,14 +69,12 @@ interface CpNode {
69
69
  */
70
70
  nextOnCircle: CpNode;
71
71
  /**
72
- * For hole closers only - the next `CpNode` ignoring the hole closer
72
+ * For hole closers only - the twin `CpNode` at the same point, e.g.
73
+ * use `cpNode.holeCloserTwin.next` to skip the hole closer and get to the
74
+ * next `CpNode` on the same loop.
73
75
  */
74
- holeCloserNext?: CpNode | undefined;
75
- /**
76
- * For hole closers only - the prev `CpNode` ignoring the hole closer
77
- */
78
- holeCloserPrev?: CpNode | undefined;
79
- /** Only used in export */
76
+ holeCloserTwin?: CpNode | undefined;
77
+ /** For debugging / easy identification only */
80
78
  id: number;
81
79
  }
82
80
  export { CpNode };
@@ -1,3 +1,9 @@
1
1
  import type { CpNode } from "../cp-node.js";
2
+ /**
3
+ * Primarily for internal use.
4
+ *
5
+ * Compares the order of two `CpNode`s. The order is cyclic and depends
6
+ * on a `CpNode`'s relative position along the shape boundary.
7
+ */
2
8
  declare function cpNodeComparator(a: CpNode, b: CpNode): number;
3
9
  export { cpNodeComparator };
@@ -1,4 +1,10 @@
1
1
  import { compareCps } from "../../contact-point/contact-point.js";
2
+ /**
3
+ * Primarily for internal use.
4
+ *
5
+ * Compares the order of two `CpNode`s. The order is cyclic and depends
6
+ * on a `CpNode`'s relative position along the shape boundary.
7
+ */
2
8
  function cpNodeComparator(a, b) {
3
9
  return compareCps(a.cp, b.cp);
4
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cp-node-comparator.js","sourceRoot":"","sources":["../../../src/cp-node/fs/cp-node-comparator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAGlE,SAAS,gBAAgB,CACjB,CAAS,EACT,CAAS;IAEb,OAAO,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;AAClC,CAAC;AAGD,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
1
+ {"version":3,"file":"cp-node-comparator.js","sourceRoot":"","sources":["../../../src/cp-node/fs/cp-node-comparator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAGlE;;;;;GAKG;AACH,SAAS,gBAAgB,CACjB,CAAS,EACT,CAAS;IAEb,OAAO,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;AAClC,CAAC;AAGD,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
@@ -1,4 +1,8 @@
1
1
  import { CpNode } from "../cp-node.js";
2
+ /**
3
+ * For debugging
4
+ * @param cpNode
5
+ */
2
6
  declare function enhanceCpNode(cpNode: CpNode): {
3
7
  pos: import("../../index.js").PointOnShape;
4
8
  p: number[];
@@ -23,8 +27,7 @@ declare function enhanceCpNode(cpNode: CpNode): {
23
27
  next: CpNode;
24
28
  prevOnCircle: CpNode;
25
29
  nextOnCircle: CpNode;
26
- holeCloserNext?: CpNode | undefined;
27
- holeCloserPrev?: CpNode | undefined;
30
+ holeCloserTwin?: CpNode | undefined;
28
31
  id: number;
29
32
  };
30
33
  export { enhanceCpNode };
@@ -4,6 +4,10 @@ import { getRealProngCount } from "./get-real-prong-count.js";
4
4
  import { isFullyTerminating } from "./is-fully-terminating.js";
5
5
  import { isSharp } from "./is-sharp.js";
6
6
  import { isTerminating } from "./is-terminating.js";
7
+ /**
8
+ * For debugging
9
+ * @param cpNode
10
+ */
7
11
  function enhanceCpNode(cpNode) {
8
12
  const cp = cpNode.cp;
9
13
  const pos = cp.pointOnShape;
@@ -1 +1 @@
1
- {"version":3,"file":"enhance-cp-node.js","sourceRoot":"","sources":["../../../src/cp-node/fs/enhance-cp-node.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,SAAS,aAAa,CAAC,MAAc;IACjC,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC;IACrB,MAAM,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC;IAC5B,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;IAExB,OAAO;QACH,GAAG,MAAM;QACT,GAAG,EAAE,MAAM,CAAC,EAAE,CAAC,YAAY;QAC3B,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC;QAC3B,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC;QAC3B,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC;QACpC,kBAAkB,EAAE,kBAAkB,CAAC,MAAM,CAAC;QAC9C,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC;QACxB,UAAU,EAAE,aAAa,CAAC,MAAM,CAAC;QACjC,iBAAiB,EAAE,iBAAiB,CAAC,MAAM,CAAC;QAC5C,QAAQ,EAAE,iBAAiB,CAAC,MAAM,CAAC;QACnC,KAAK;QACL,IAAI,EAAE,KAAK,CAAC,IAAI;KACnB,CAAA;AACL,CAAC;AAGD,OAAO,EAAE,aAAa,EAAE,CAAA"}
1
+ {"version":3,"file":"enhance-cp-node.js","sourceRoot":"","sources":["../../../src/cp-node/fs/enhance-cp-node.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD;;;GAGG;AACH,SAAS,aAAa,CAAC,MAAc;IACjC,MAAM,EAAE,GAAG,MAAM,CAAC,EAAE,CAAC;IACrB,MAAM,GAAG,GAAG,EAAE,CAAC,YAAY,CAAC;IAC5B,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;IAExB,OAAO;QACH,GAAG,MAAM;QACT,GAAG,EAAE,MAAM,CAAC,EAAE,CAAC,YAAY;QAC3B,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC;QAC3B,CAAC,EAAE,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC;QAC3B,aAAa,EAAE,aAAa,CAAC,MAAM,CAAC;QACpC,kBAAkB,EAAE,kBAAkB,CAAC,MAAM,CAAC;QAC9C,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC;QACxB,UAAU,EAAE,aAAa,CAAC,MAAM,CAAC;QACjC,iBAAiB,EAAE,iBAAiB,CAAC,MAAM,CAAC;QAC5C,QAAQ,EAAE,iBAAiB,CAAC,MAAM,CAAC;QACnC,KAAK;QACL,IAAI,EAAE,KAAK,CAAC,IAAI;KACnB,CAAA;AACL,CAAC;AAGD,OAAO,EAAE,aAAa,EAAE,CAAA"}
@@ -1,9 +1,9 @@
1
1
  import type { CpNode } from "../cp-node.js";
2
2
  /**
3
- * Returns all the `CpNode`s on the same circle.
4
- *
5
- * @param cpNode
6
- * @param exclThis
3
+ * Return this (except if exclThis is truthy) and the the other CpNodes
4
+ * around the maximal disk vertex circle in an anti-clockwise order.
5
+ * @param exclThis If true the returned array does not include this
6
+ * `CpNode`.
7
7
  */
8
8
  declare function getAllOnCircle(cpNode: CpNode, exclThis?: boolean): CpNode[];
9
9
  export { getAllOnCircle };
@@ -1,8 +1,8 @@
1
1
  /**
2
- * Returns all the `CpNode`s on the same circle.
3
- *
4
- * @param cpNode
5
- * @param exclThis
2
+ * Return this (except if exclThis is truthy) and the the other CpNodes
3
+ * around the maximal disk vertex circle in an anti-clockwise order.
4
+ * @param exclThis If true the returned array does not include this
5
+ * `CpNode`.
6
6
  */
7
7
  function getAllOnCircle(cpNode, exclThis = false) {
8
8
  const startCpNode = cpNode;
@@ -1,3 +1,7 @@
1
1
  import type { CpNode } from "../cp-node.js";
2
+ /**
3
+ * Returns all `CpNode`s on the MAT that this `CpNode` is part of
4
+ * starting from the current one and going anti-clockwise around the shape.
5
+ */
2
6
  declare function getAllOnLoop(cpNode: CpNode): CpNode[];
3
7
  export { getAllOnLoop };
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Returns all `CpNode`s on the MAT that this `CpNode` is part of
3
+ * starting from the current one and going anti-clockwise around the shape.
4
+ */
1
5
  function getAllOnLoop(cpNode) {
2
6
  const cpStart = cpNode;
3
7
  const cpNodes = [cpStart];
@@ -1 +1 @@
1
- {"version":3,"file":"get-all-on-loop.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-all-on-loop.ts"],"names":[],"mappings":"AAGA,SAAS,YAAY,CACb,MAAc;IAElB,MAAM,OAAO,GAAG,MAAM,CAAC;IACvB,MAAM,OAAO,GAAa,CAAC,OAAO,CAAC,CAAC;IACpC,IAAI,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC;IAE1B,OAAO,OAAO,KAAK,OAAO,EAAE,CAAC;QACzB,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtB,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAC3B,CAAC;IAED,OAAO,OAAO,CAAC;AACnB,CAAC;AAGD,OAAO,EAAE,YAAY,EAAE,CAAA"}
1
+ {"version":3,"file":"get-all-on-loop.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-all-on-loop.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,SAAS,YAAY,CACb,MAAc;IAElB,MAAM,OAAO,GAAG,MAAM,CAAC;IACvB,MAAM,OAAO,GAAa,CAAC,OAAO,CAAC,CAAC;IACpC,IAAI,OAAO,GAAG,MAAM,CAAC,IAAI,CAAC;IAE1B,OAAO,OAAO,KAAK,OAAO,EAAE,CAAC;QACzB,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACtB,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAC3B,CAAC;IAED,OAAO,OAAO,CAAC;AACnB,CAAC;AAGD,OAAO,EAAE,YAAY,EAAE,CAAA"}
@@ -1,11 +1,12 @@
1
1
  import type { BezierPiece } from 'flo-bezier3';
2
2
  import type { CpNode } from '../cp-node.js';
3
3
  /**
4
- * Returns the boundary beziers pieces between this `CpNode` and the next
5
- * one.
4
+ * Returns the ordered `BezierPiece`s from this `CpNode` to the next `CpNode`
5
+ * on the boundary.
6
6
  *
7
- * * returns `undefined` if the next `CpNode` is on a different loop,
8
- * as this is a hole-closer and there are no boundary beziers between them.
7
+ * * returns `[]` if (and only if) the next `CpNode` is on a different loop;
8
+ * this differs from "returns `[]` if (and only if) the next `CpNode` is a
9
+ * hole-closer" as half of hole-closers are on the same loop.
9
10
  *
10
11
  * @param cpNode
11
12
  */
@@ -1,9 +1,10 @@
1
1
  /**
2
- * Returns the boundary beziers pieces between this `CpNode` and the next
3
- * one.
2
+ * Returns the ordered `BezierPiece`s from this `CpNode` to the next `CpNode`
3
+ * on the boundary.
4
4
  *
5
- * * returns `undefined` if the next `CpNode` is on a different loop,
6
- * as this is a hole-closer and there are no boundary beziers between them.
5
+ * * returns `[]` if (and only if) the next `CpNode` is on a different loop;
6
+ * this differs from "returns `[]` if (and only if) the next `CpNode` is a
7
+ * hole-closer" as half of hole-closers are on the same loop.
7
8
  *
8
9
  * @param cpNode
9
10
  */
@@ -1 +1 @@
1
- {"version":3,"file":"get-boundary-bezier-parts-to-next.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-boundary-bezier-parts-to-next.ts"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AACH,SAAS,4BAA4B,CAC7B,MAAc;IAElB,MAAM,MAAM,GAAG,MAAM,CAAC;IACtB,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC;IAE3B,MAAM,OAAO,GAAG,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC;IACvC,MAAM,OAAO,GAAG,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC;IAEvC,MAAM,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC;IAChC,MAAM,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC;IAEhC,IAAI,SAAS,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI,EAAE,CAAC;QACpC,wEAAwE;QACxE,UAAU;QACV,oBAAoB;QACpB,OAAO,EAAE,CAAC;IACd,CAAC;IAED,MAAM,YAAY,GAAkB,EAAE,CAAC;IAEvC,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC1B,YAAY,CAAC,IAAI,CACb,EAAE,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,CACvD,CAAC;IACN,CAAC;SAAM,CAAC;QACJ,YAAY,CAAC,IAAI,CACb,EAAE,EAAE,EAAE,OAAO,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAC/C,CAAC;QAEF,uBAAuB,CACnB,YAAY,EACZ,OAAO,CAAC,KAAK,EACb,OAAO,CAAC,KAAK,EACb,OAAO,CAAC,CAAC,CACZ,CAAC;IACN,CAAC;IAED,OAAO,YAAY,CAAC;AACxB,CAAC;AAGD;;;GAGG;AACH,SAAS,uBAAuB,CACxB,YAA2B,EAC3B,UAAiB,EACjB,QAAe,EACf,EAAU;IAEd,IAAI,SAAS,GAAG,UAAU,CAAC;IAC3B,GAAG,CAAC;QACA,SAAS,GAAG,SAAS,CAAC,IAAI,CAAC;QAC3B,MAAM,IAAI,GAAG,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7C,YAAY,CAAC,IAAI,CAAC;YACd,EAAE,EAAE,SAAS,CAAC,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC;SAClC,CAAC,CAAC;IACP,CAAC,QAAQ,SAAS,KAAK,QAAQ,EAAE;AACrC,CAAC;AAGD,OAAO,EAAE,4BAA4B,EAAE,CAAA"}
1
+ {"version":3,"file":"get-boundary-bezier-parts-to-next.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-boundary-bezier-parts-to-next.ts"],"names":[],"mappings":"AAKA;;;;;;;;;GASG;AACH,SAAS,4BAA4B,CAC7B,MAAc;IAElB,MAAM,MAAM,GAAG,MAAM,CAAC;IACtB,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC;IAE3B,MAAM,OAAO,GAAG,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC;IACvC,MAAM,OAAO,GAAG,MAAM,CAAC,EAAE,CAAC,YAAY,CAAC;IAEvC,MAAM,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC;IAChC,MAAM,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC;IAEhC,IAAI,SAAS,CAAC,IAAI,KAAK,SAAS,CAAC,IAAI,EAAE,CAAC;QACpC,wEAAwE;QACxE,UAAU;QACV,oBA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// *
6
- // * * returns `[]` if the next `CpNode` is on a different loop,
7
- // * as this is a hole-closer and there are no boundary beziers between them.
8
- // *
9
- // * @param cpNode
10
- // */
3
+ * Returns the ordered bezier curves from this `CpNode` to the next `CpNode`
4
+ * on the boundary.
5
+ * @param cpNode
6
+ */
11
7
  declare function getBoundaryBeziersToNext(cpNode: CpNode): number[][][];
12
8
  export { getBoundaryBeziersToNext };
@@ -1,14 +1,10 @@
1
1
  import { fromTo } from 'flo-bezier3';
2
2
  import { getBoundaryBezierPartsToNext } from './get-boundary-bezier-parts-to-next.js';
3
3
  /**
4
- // * Returns the boundary beziers between this `CpNode` and the next
5
- // * one.
6
- // *
7
- // * * returns `[]` if the next `CpNode` is on a different loop,
8
- // * as this is a hole-closer and there are no boundary beziers between them.
9
- // *
10
- // * @param cpNode
11
- // */
4
+ * Returns the ordered bezier curves from this `CpNode` to the next `CpNode`
5
+ * on the boundary.
6
+ * @param cpNode
7
+ */
12
8
  function getBoundaryBeziersToNext(cpNode) {
13
9
  return getBoundaryBezierPartsToNext(cpNode).map(bp => fromTo(bp.ps, bp.ts[0], bp.ts[1]));
14
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"get-boundary-beziers-to-next.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-boundary-beziers-to-next.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AAGtF;;;;;;;;MAQM;AACN,SAAS,wBAAwB,CACzB,MAAc;IAElB,OAAO,4BAA4B,CAAC,MAAM,CAAC,CAAC,GAAG,CAC3C,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAC1C,CAAC;AACN,CAAC;AAGD,MAAM;AACN,qEAAqE;AACrE,UAAU;AACV,MAAM;AACN,iEAAiE;AACjE,8EAA8E;AAC9E,MAAM;AACN,oBAAoB;AACpB,MAAM;AACN,qCAAqC;AACrC,0CAA0C;AAE1C,8BAA8B;AAC9B,kCAAkC;AAElC,8CAA8C;AAC9C,8CAA8C;AAE9C,uCAAuC;AACvC,uCAAuC;AAEvC,+CAA+C;AAC/C,mFAAmF;AACnF,qBAAqB;AACrB,gCAAgC;AAChC,qBAAqB;AACrB,QAAQ;AAER,wCAAwC;AAExC,qCAAqC;AACrC,wBAAwB;AACxB,6DAA6D;AAC7D,aAAa;AACb,eAAe;AACf,wBAAwB;AACxB,qDAAqD;AACrD,aAAa;AAEb,6BAA6B;AAC7B,uBAAuB;AACvB,6BAA6B;AAC7B,6BAA6B;AAC7B,wBAAwB;AACxB,aAAa;AACb,QAAQ;AAER,sBAAsB;AACtB,IAAI;AAGJ,MAAM;AACN,qCAAqC;AACrC,eAAe;AACf,MAAM;AACN,8BAA8B;AAC9B,iCAAiC;AACjC,6BAA6B;AAC7B,2BAA2B;AAC3B,wBAAwB;AAExB,kCAAkC;AAClC,WAAW;AACX,sCAAsC;AACtC,wDAAwD;AACxD,yBAAyB;AACzB,4CAA4C;AAC5C,aAAa;AACb,wCAAwC;AACxC,IAAI;AAGJ,OAAO,EAAE,wBAAwB,EAAE,CAAA"}
1
+ {"version":3,"file":"get-boundary-beziers-to-next.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-boundary-beziers-to-next.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AAGtF;;;;GAIG;AACH,SAAS,wBAAwB,CACzB,MAAc;IAElB,OAAO,4BAA4B,CAAC,MAAM,CAAC,CAAC,GAAG,CAC3C,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAC1C,CAAC;AACN,CAAC;AAGD,MAAM;AACN,qEAAqE;AACrE,UAAU;AACV,MAAM;AACN,iEAAiE;AACjE,8EAA8E;AAC9E,MAAM;AACN,oBAAoB;AACpB,MAAM;AACN,qCAAqC;AACrC,0CAA0C;AAE1C,8BAA8B;AAC9B,kCAAkC;AAElC,8CAA8C;AAC9C,8CAA8C;AAE9C,uCAAuC;AACvC,uCAAuC;AAEvC,+CAA+C;AAC/C,mFAAmF;AACnF,qBAAqB;AACrB,gCAAgC;AAChC,qBAAqB;AACrB,QAAQ;AAER,wCAAwC;AAExC,qCAAqC;AACrC,wBAAwB;AACxB,6DAA6D;AAC7D,aAAa;AACb,eAAe;AACf,wBAAwB;AACxB,qDAAqD;AACrD,aAAa;AAEb,6BAA6B;AAC7B,uBAAuB;AACvB,6BAA6B;AAC7B,6BAA6B;AAC7B,wBAAwB;AACxB,aAAa;AACb,QAAQ;AAER,sBAAsB;AACtB,IAAI;AAGJ,MAAM;AACN,qCAAqC;AACrC,eAAe;AACf,MAAM;AACN,8BAA8B;AAC9B,iCAAiC;AACjC,6BAA6B;AAC7B,2BAA2B;AAC3B,wBAAwB;AAExB,kCAAkC;AAClC,WAAW;AACX,sCAAsC;AACtC,wDAAwD;AACxD,yBAAyB;AACzB,4CAA4C;AAC5C,aAAa;AACb,wCAAwC;AACxC,IAAI;AAGJ,OAAO,EAAE,wBAAwB,EAAE,CAAA"}
@@ -1,3 +1,9 @@
1
1
  import { CpNode } from "../cp-node.js";
2
+ /**
3
+ * Returns the children of this `CpNode` when seen as a MAT edge. Only
4
+ * children in a 'forward' direction are returned. These include all edges
5
+ * except the 'backward' edge given by `prevOnCircle`, even terminating
6
+ * edges.
7
+ */
2
8
  declare function getChildren(cpNode: CpNode): CpNode[];
3
9
  export { getChildren };
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Returns the children of this `CpNode` when seen as a MAT edge. Only
3
+ * children in a 'forward' direction are returned. These include all edges
4
+ * except the 'backward' edge given by `prevOnCircle`, even terminating
5
+ * edges.
6
+ */
1
7
  function getChildren(cpNode) {
2
8
  const children = [];
3
9
  const cp = cpNode.next;
@@ -1 +1 @@
1
- {"version":3,"file":"get-children.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-children.ts"],"names":[],"mappings":"AAGA,SAAS,WAAW,CAAC,MAAc;IAC/B,MAAM,QAAQ,GAAa,EAAE,CAAC;IAE9B,MAAM,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC;IACvB,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,GAAG,CAAC;QACA,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC;IACnC,CAAC,QAAQ,OAAO,CAAC,YAAY,KAAK,EAAE,EAAE;IAEtC,OAAO,QAAQ,CAAC;AACpB,CAAC;AAGD,OAAO,EAAE,WAAW,EAAE,CAAA"}
1
+ {"version":3,"file":"get-children.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-children.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,SAAS,WAAW,CAAC,MAAc;IAC/B,MAAM,QAAQ,GAAa,EAAE,CAAC;IAE9B,MAAM,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC;IACvB,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,GAAG,CAAC;QACA,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACvB,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC;IACnC,CAAC,QAAQ,OAAO,CAAC,YAAY,KAAK,EAAE,EAAE;IAEtC,OAAO,QAAQ,CAAC;AACpB,CAAC;AAGD,OAAO,EAAE,WAAW,EAAE,CAAA"}
@@ -1,3 +1,9 @@
1
1
  import { CpNode } from '../cp-node.js';
2
+ /**
3
+ * @internal
4
+ * Returns a line segment of unit length starting in the given Vertex center and
5
+ * pointing in the direction of the medial axis (viewed as a rooted tree).
6
+ * @param cpNode
7
+ */
2
8
  declare function getEdgeDirection(cpNode: CpNode): number[][];
3
9
  export { getEdgeDirection };
@@ -1,6 +1,12 @@
1
1
  import { toUnitVector, fromTo, rotate, translate, rotate90Degrees, reverse, dot } from 'flo-vector2d';
2
2
  import { tangent } from 'flo-bezier3';
3
3
  import { isPosSharpCorner } from '../../point-on-shape/is-pos-sharp-corner.js';
4
+ /**
5
+ * @internal
6
+ * Returns a line segment of unit length starting in the given Vertex center and
7
+ * pointing in the direction of the medial axis (viewed as a rooted tree).
8
+ * @param cpNode
9
+ */
4
10
  function getEdgeDirection(cpNode) {
5
11
  const circleCenter = cpNode.cp.circle.center;
6
12
  const cp1 = cpNode;
@@ -1 +1 @@
1
- {"version":3,"file":"get-edge-direction.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-edge-direction.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,OAAO,EAAE,GAAG,EACzE,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAI/E,SAAS,gBAAgB,CAAC,MAAc;IACpC,MAAM,YAAY,GAAG,MAAM,CAAC,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC;IAE7C,MAAM,GAAG,GAAG,MAAM,CAAC;IACnB,MAAM,GAAG,GAAG,MAAM,CAAC,YAAY,CAAC;IAEhC,MAAM,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC,YAAY,CAAC;IACjC,MAAM,IAAI,GAAG,GAAG,CAAC,EAAE,CAAC,YAAY,CAAC;IAEjC,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;IAClB,MAAM,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;IAElB,IAAI,IAAI,CAAC;IAET,IAAI,CAAC,gBAAgB,CAAC,IAAI,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AAC;IACpC,CAAC;IAED,MAAM,CAAC,GAAG,SAAS,CACf,YAAY,CAAC,IAAI,CAAC,EAClB,YAAY,CACf,CAAC;IAEF,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;AAC7B,CAAC;AAGD,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
@@ -1,3 +1,7 @@
1
1
  import { CpNode } from "../cp-node.js";
2
+ /**
3
+ * Returns the first `CpNode` (from this one by successively applying
4
+ * .nextOnCircle) that exits the circle.
5
+ */
2
6
  declare function getFirstExit(cpNode: CpNode): CpNode | undefined;
3
7
  export { getFirstExit };
@@ -1,3 +1,7 @@
1
+ /**
2
+ * Returns the first `CpNode` (from this one by successively applying
3
+ * .nextOnCircle) that exits the circle.
4
+ */
1
5
  function getFirstExit(cpNode) {
2
6
  // const startNode = this as CpNode;
3
7
  const startNode = cpNode;
@@ -1 +1 @@
1
- {"version":3,"file":"get-first-exit.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-first-exit.ts"],"names":[],"mappings":"AAGA,SAAS,YAAY,CAAC,MAAc;IAChC,oCAAoC;IACpC,MAAM,SAAS,GAAG,MAAM,CAAC;IACzB,IAAI,OAAO,GAAG,SAAS,CAAC;IAExB,OAAO,OAAO,CAAC,IAAI,KAAK,OAAO,CAAC,YAAY,EAAE,CAAC;QAC3C,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;QAEvB,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YACxB,mDAAmD;YACnD,OAAO,SAAS,CAAC;QACrB,CAAC;IACL,CAAC;IAED,OAAO,OAAO,CAAC;AACnB,CAAC;AAGD,OAAO,EAAE,YAAY,EAAE,CAAA"}
1
+ {"version":3,"file":"get-first-exit.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-first-exit.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,SAAS,YAAY,CAAC,MAAc;IAChC,oCAAoC;IACpC,MAAM,SAAS,GAAG,MAAM,CAAC;IACzB,IAAI,OAAO,GAAG,SAAS,CAAC;IAExB,OAAO,OAAO,CAAC,IAAI,KAAK,OAAO,CAAC,YAAY,EAAE,CAAC;QAC3C,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;QAEvB,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;YACxB,mDAAmD;YACnD,OAAO,SAAS,CAAC;QACrB,CAAC;IACL,CAAC;IAED,OAAO,OAAO,CAAC;AACnB,CAAC;AAGD,OAAO,EAAE,YAAY,EAAE,CAAA"}
@@ -1,3 +1,9 @@
1
1
  import { CpNode } from '../cp-node.js';
2
+ /**
3
+ * Returns the bezier curve from the maximal disk of one `CpNode` to another
4
+ * `CpNode`'s maximal disk.
5
+ * @param cpNodeFrom
6
+ * @param cpNodeTo
7
+ */
2
8
  declare function getMatCurveBetween(cpNodeFrom: CpNode, cpNodeTo: CpNode): number[][];
3
9
  export { getMatCurveBetween };
@@ -4,6 +4,12 @@ import { getEdgeDirection } from './get-edge-direction.js';
4
4
  const TOLERANCE_ADD_2PRONG = 0.01;
5
5
  /** @internal */
6
6
  const TOLERANCE_USE_LINE = 0.0001; // else cubic
7
+ /**
8
+ * Returns the bezier curve from the maximal disk of one `CpNode` to another
9
+ * `CpNode`'s maximal disk.
10
+ * @param cpNodeFrom
11
+ * @param cpNodeTo
12
+ */
7
13
  function getMatCurveBetween(cpNodeFrom, cpNodeTo) {
8
14
  const fromCc = cpNodeFrom.cp.circle.center;
9
15
  const fromL = getEdgeDirection(cpNodeFrom);
@@ -1 +1 @@
1
- {"version":3,"file":"get-mat-curve-between.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-mat-curve-between.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,eAAe,EAAE,WAAW,EAAE,SAAS,EAC3D,oBAAoB,EACvB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAG3D,gBAAgB;AAChB,MAAM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AC,CAAC,CAAC;QACxC,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAC5B,MAAM,EAAE,GAAG,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;QAC5B,MAAM,EAAE,GAAG,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;QACnB,MAAM,EAAE,GAAG,CAAC,EAAE,EAAC,EAAE,CAAC,CAAC;QACnB,MAAM,IAAI,GAAG,oBAAoB,CAAC,KAAK,EAAE,EAAE,CAAE,CAAC;QAC9C,MAAM,IAAI,GAAG,oBAAoB,CAAC,GAAG,EAAI,EAAE,CAAE,CAAC;QAE9C,OAAO,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;IACtC,CAAC;IAED,uDAAuD;IACvD,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAC1B,CAAC;AAGD,OAAO,EAAE,kBAAkB,EAAE,CAAA"}
@@ -1,4 +1,10 @@
1
1
  import { CpNode } from '../cp-node.js';
2
+ /**
3
+ * Returns the bezier curve from the maximal disk of the given `CpNode` to the
4
+ * next `CpNode`'s maximal disk and thus directly represents a piece of the
5
+ * medial axis.
6
+ * @param cpNode
7
+ */
2
8
  declare function getMatCurveToNext(cpNode: CpNode): number[][];
3
9
  declare const getMatCurveToNext$: typeof getMatCurveToNext & {
4
10
  readonly weakMapS: WeakMap<object, {
@@ -1,5 +1,11 @@
1
1
  import { memoize } from 'flo-memoize';
2
2
  import { getMatCurveBetween } from './get-mat-curve-between.js';
3
+ /**
4
+ * Returns the bezier curve from the maximal disk of the given `CpNode` to the
5
+ * next `CpNode`'s maximal disk and thus directly represents a piece of the
6
+ * medial axis.
7
+ * @param cpNode
8
+ */
3
9
  function getMatCurveToNext(cpNode) {
4
10
  return getMatCurveBetween(cpNode, cpNode.next);
5
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"get-mat-curve-to-next.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-mat-curve-to-next.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAGhE,SAAS,iBAAiB,CAAC,MAAc;IACrC,OAAO,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;AACnD,CAAC;AAGD,MAAM,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAEtD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,CAAA"}
1
+ {"version":3,"file":"get-mat-curve-to-next.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-mat-curve-to-next.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAGhE;;;;;GAKG;AACH,SAAS,iBAAiB,CAAC,MAAc;IACrC,OAAO,kBAAkB,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC;AACnD,CAAC;AAGD,MAAM,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAEtD,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,CAAA"}
@@ -1,3 +1,11 @@
1
1
  import { CpNode } from "../cp-node.js";
2
+ /**
3
+ * Returns the number of contact points on the maximal disk circle implied
4
+ * by this `CpNode`.
5
+ *
6
+ * Note, however, that even one-prongs and sharp corners will return 2 (see
7
+ * `isTerminating` for more details); if this is not desired use
8
+ * `getRealProngCount` instead which will return 1 in these cases.
9
+ */
2
10
  declare function getProngCount(cpNode: CpNode): number;
3
11
  export { getProngCount };
@@ -1,3 +1,11 @@
1
+ /**
2
+ * Returns the number of contact points on the maximal disk circle implied
3
+ * by this `CpNode`.
4
+ *
5
+ * Note, however, that even one-prongs and sharp corners will return 2 (see
6
+ * `isTerminating` for more details); if this is not desired use
7
+ * `getRealProngCount` instead which will return 1 in these cases.
8
+ */
1
9
  function getProngCount(cpNode) {
2
10
  const startCpNode = cpNode;
3
11
  let cpNode_ = startCpNode;
@@ -1 +1 @@
1
- {"version":3,"file":"get-prong-count.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-prong-count.ts"],"names":[],"mappings":"AAGA,SAAS,aAAa,CAAC,MAAc;IACjC,MAAM,WAAW,GAAG,MAAM,CAAC;IAC3B,IAAI,OAAO,GAAG,WAAW,CAAC;IAE1B,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,GAAG,CAAC;QACA,CAAC,EAAE,CAAC;QACJ,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC;IACnC,CAAC,QAAQ,OAAO,KAAK,WAAW,EAAC;IAEjC,OAAO,CAAC,CAAC;AACb,CAAC;AAGD,OAAO,EAAE,aAAa,EAAE,CAAA"}
1
+ {"version":3,"file":"get-prong-count.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-prong-count.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,SAAS,aAAa,CAAC,MAAc;IACjC,MAAM,WAAW,GAAG,MAAM,CAAC;IAC3B,IAAI,OAAO,GAAG,WAAW,CAAC;IAE1B,IAAI,CAAC,GAAG,CAAC,CAAC;IACV,GAAG,CAAC;QACA,CAAC,EAAE,CAAC;QACJ,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC;IACnC,CAAC,QAAQ,OAAO,KAAK,WAAW,EAAC;IAEjC,OAAO,CAAC,CAAC;AACb,CAAC;AAGD,OAAO,EAAE,aAAa,EAAE,CAAA"}
@@ -1,3 +1,9 @@
1
1
  import { CpNode } from "../cp-node.js";
2
+ /**
3
+ * Returns the number of contact points (up to planar coordinates) on the
4
+ * maximal disk circle implied by this `CpNode`.
5
+ *
6
+ * See also `getProngCount`.
7
+ */
2
8
  declare function getRealProngCount(cpNode: CpNode): number;
3
9
  export { getRealProngCount };
@@ -1,5 +1,11 @@
1
1
  import { getAllOnCircle } from "./get-all-on-circle.js";
2
2
  import { isTerminating } from "./is-terminating.js";
3
+ /**
4
+ * Returns the number of contact points (up to planar coordinates) on the
5
+ * maximal disk circle implied by this `CpNode`.
6
+ *
7
+ * See also `getProngCount`.
8
+ */
3
9
  function getRealProngCount(cpNode) {
4
10
  const nonTerminatingCpNodes = getAllOnCircle(cpNode)
5
11
  .filter(cpNode => !isTerminating(cpNode));
@@ -1 +1 @@
1
- {"version":3,"file":"get-real-prong-count.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-real-prong-count.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,SAAS,iBAAiB,CAAC,MAAc;IACrC,MAAM,qBAAqB,GAAG,cAAc,CAAC,MAAM,CAAC;SACnD,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;IAE1C,OAAO,qBAAqB,CAAC,MAAM,CAAC;AACxC,CAAC;AAGD,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
1
+ {"version":3,"file":"get-real-prong-count.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-real-prong-count.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD;;;;;GAKG;AACH,SAAS,iBAAiB,CAAC,MAAc;IACrC,MAAM,qBAAqB,GAAG,cAAc,CAAC,MAAM,CAAC;SACnD,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;IAE1C,OAAO,qBAAqB,CAAC,MAAM,CAAC;AACxC,CAAC;AAGD,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
@@ -1,3 +1,11 @@
1
1
  import { CpNode } from "../cp-node.js";
2
+ /**
3
+ * Similar to `getChildren` but returns the child nodes of the tree when
4
+ * `CpNode` is seen as a MAT vertex point (as opposed to edge). In this
5
+ * way the dual graph of the tree can easily be traversed - see e.g.
6
+ * `traverseVertices`. Generally, however, traversing the edges is
7
+ * preferred as it returns the entire Medial Axis (by utilizing
8
+ * `getMatCurveToNext` on each returned edge).
9
+ */
2
10
  declare function getVertexForwardChildren(cpNode: CpNode): CpNode[];
3
11
  export { getVertexForwardChildren };
@@ -1,4 +1,12 @@
1
1
  import { isTerminating } from "./is-terminating.js";
2
+ /**
3
+ * Similar to `getChildren` but returns the child nodes of the tree when
4
+ * `CpNode` is seen as a MAT vertex point (as opposed to edge). In this
5
+ * way the dual graph of the tree can easily be traversed - see e.g.
6
+ * `traverseVertices`. Generally, however, traversing the edges is
7
+ * preferred as it returns the entire Medial Axis (by utilizing
8
+ * `getMatCurveToNext` on each returned edge).
9
+ */
2
10
  function getVertexForwardChildren(cpNode) {
3
11
  const children = [];
4
12
  const cpStart = cpNode;
@@ -1 +1 @@
1
- {"version":3,"file":"get-vertex-forward-children.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-vertex-forward-children.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,SAAS,wBAAwB,CAAC,MAAc;IAC5C,MAAM,QAAQ,GAAa,EAAE,CAAC;IAE9B,MAAM,OAAO,GAAG,MAAM,CAAC;IAEvB,IAAI,OAAO,GAAG,OAAO,CAAC;IACtB,OAAO,OAAO,KAAK,OAAO,CAAC,YAAY,EAAE,CAAC;QACtC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC;YAC1B,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC;QACD,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC;IACnC,CAAC;IAED,OAAO,QAAQ,CAAC;AACpB,CAAC;AAGD,OAAO,EAAE,wBAAwB,EAAE,CAAA"}
1
+ {"version":3,"file":"get-vertex-forward-children.js","sourceRoot":"","sources":["../../../src/cp-node/fs/get-vertex-forward-children.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD;;;;;;;GAOG;AACH,SAAS,wBAAwB,CAAC,MAAc;IAC5C,MAAM,QAAQ,GAAa,EAAE,CAAC;IAE9B,MAAM,OAAO,GAAG,MAAM,CAAC;IAEvB,IAAI,OAAO,GAAG,OAAO,CAAC;IACtB,OAAO,OAAO,KAAK,OAAO,CAAC,YAAY,EAAE,CAAC;QACtC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC;YAC1B,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAChC,CAAC;QACD,OAAO,GAAG,OAAO,CAAC,YAAY,CAAC;IACnC,CAAC;IAED,OAAO,QAAQ,CAAC;AACpB,CAAC;AAGD,OAAO,EAAE,wBAAwB,EAAE,CAAA"}
@@ -1,10 +1,7 @@
1
1
  import type { CpNode } from "../cp-node.js";
2
2
  /**
3
- * Returns `true` if this `CpNode` is fully terminating, meaning that all
4
- * `CpNode`s (except `CpNode.prevOnCircle`) on the same circle are terminating,
5
- * `false` otherwise.
6
- *
7
- * @param cpNode
3
+ * Like isTerminating() but only returns true if all cpNodes on the circle
4
+ * (except this.prevOnCircle) is terminating.
8
5
  */
9
6
  declare function isFullyTerminating(cpNode: CpNode): boolean;
10
7
  export { isFullyTerminating };
@@ -1,11 +1,8 @@
1
1
  import { getAllOnCircle } from "./get-all-on-circle.js";
2
2
  import { isTerminating } from "./is-terminating.js";
3
3
  /**
4
- * Returns `true` if this `CpNode` is fully terminating, meaning that all
5
- * `CpNode`s (except `CpNode.prevOnCircle`) on the same circle are terminating,
6
- * `false` otherwise.
7
- *
8
- * @param cpNode
4
+ * Like isTerminating() but only returns true if all cpNodes on the circle
5
+ * (except this.prevOnCircle) is terminating.
9
6
  */
10
7
  function isFullyTerminating(cpNode) {
11
8
  const otherOnCircle = getAllOnCircle(cpNode.prevOnCircle, true);
@@ -1 +1 @@
1
- {"version":3,"file":"is-fully-terminating.js","sourceRoot":"","sources":["../../../src/cp-node/fs/is-fully-terminating.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD;;;;;;GAMG;AACH,SAAS,kBAAkB,CAAC,MAAc;IACtC,MAAM,aAAa,GAAG,cAAc,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;IAEhE,OAAO,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;AAC9C,CAAC;AAGD,OAAO,EAAE,kBAAkB,EAAE,CAAA"}
1
+ {"version":3,"file":"is-fully-terminating.js","sourceRoot":"","sources":["../../../src/cp-node/fs/is-fully-terminating.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD;;;GAGG;AACH,SAAS,kBAAkB,CAAC,MAAc;IACtC,MAAM,aAAa,GAAG,cAAc,CAAC,MAAM,CAAC,YAAY,EAAE,IAAI,CAAC,CAAC;IAEhE,OAAO,aAAa,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;AAC9C,CAAC;AAGD,OAAO,EAAE,kBAAkB,EAAE,CAAA"}
@@ -1,3 +1,9 @@
1
1
  import { CpNode } from "../cp-node.js";
2
+ /**
3
+ * Returns true if the 2 given `CpNode`s are on the same maximal disk
4
+ * circle.
5
+ * @param cpNode1 A `CpNode`.
6
+ * @param cpNode2 Another `CpNode`
7
+ */
2
8
  declare function isOnSameCircle(cpNode1: CpNode, cpNode2: CpNode): boolean;
3
9
  export { isOnSameCircle };
@@ -1,4 +1,10 @@
1
1
  import { getAllOnCircle } from "./get-all-on-circle.js";
2
+ /**
3
+ * Returns true if the 2 given `CpNode`s are on the same maximal disk
4
+ * circle.
5
+ * @param cpNode1 A `CpNode`.
6
+ * @param cpNode2 Another `CpNode`
7
+ */
2
8
  function isOnSameCircle(cpNode1, cpNode2) {
3
9
  // const cpNodes = getAllOnCircle(cpNode1, true);
4
10
  const cpNodes = getAllOnCircle(cpNode1);