@knowvah/dot-engine 2.12.2 → 2.12.4

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 (262) hide show
  1. package/dist/api.js +12 -2
  2. package/dist/api.js.map +2 -2
  3. package/dist/common/clust-map.d.ts +16 -0
  4. package/dist/common/clust-map.d.ts.map +1 -0
  5. package/dist/common/compass-port.d.ts.map +1 -1
  6. package/dist/common/graph-init.d.ts.map +1 -1
  7. package/dist/common/htmltable-emit.d.ts +9 -6
  8. package/dist/common/htmltable-emit.d.ts.map +1 -1
  9. package/dist/common/htmltable-label.d.ts.map +1 -1
  10. package/dist/common/htmltable-lex.d.ts +3 -1
  11. package/dist/common/htmltable-lex.d.ts.map +1 -1
  12. package/dist/common/htmltable-parse-image.d.ts +23 -0
  13. package/dist/common/htmltable-parse-image.d.ts.map +1 -0
  14. package/dist/common/htmltable-parse-state.d.ts +4 -0
  15. package/dist/common/htmltable-parse-state.d.ts.map +1 -1
  16. package/dist/common/htmltable-parse.d.ts +33 -2
  17. package/dist/common/htmltable-parse.d.ts.map +1 -1
  18. package/dist/common/layers.d.ts +9 -0
  19. package/dist/common/layers.d.ts.map +1 -1
  20. package/dist/common/poly-gencode.d.ts.map +1 -1
  21. package/dist/common/poly-inside.d.ts.map +1 -1
  22. package/dist/common/splines-geom.d.ts +2 -1
  23. package/dist/common/splines-geom.d.ts.map +1 -1
  24. package/dist/common/splines-routespl.d.ts +3 -0
  25. package/dist/common/splines-routespl.d.ts.map +1 -1
  26. package/dist/common/xlabels-place.d.ts.map +1 -1
  27. package/dist/gvc/anchor.d.ts +17 -19
  28. package/dist/gvc/anchor.d.ts.map +1 -1
  29. package/dist/gvc/device-cluster.d.ts +9 -0
  30. package/dist/gvc/device-cluster.d.ts.map +1 -1
  31. package/dist/gvc/device.d.ts +2 -1
  32. package/dist/gvc/device.d.ts.map +1 -1
  33. package/dist/gvc/emit-walk.d.ts +7 -0
  34. package/dist/gvc/emit-walk.d.ts.map +1 -1
  35. package/dist/gvc/job.d.ts +13 -6
  36. package/dist/gvc/job.d.ts.map +1 -1
  37. package/dist/gvc/viewport.d.ts +14 -0
  38. package/dist/gvc/viewport.d.ts.map +1 -1
  39. package/dist/index.js +21767 -21607
  40. package/dist/index.js.map +4 -4
  41. package/dist/layout/dot/classify.d.ts.map +1 -1
  42. package/dist/layout/dot/compound.d.ts +0 -4
  43. package/dist/layout/dot/compound.d.ts.map +1 -1
  44. package/dist/layout/dot/edge-route-chain-views.d.ts +35 -0
  45. package/dist/layout/dot/edge-route-chain-views.d.ts.map +1 -0
  46. package/dist/layout/dot/edge-route-chain.d.ts +20 -16
  47. package/dist/layout/dot/edge-route-chain.d.ts.map +1 -1
  48. package/dist/layout/dot/edge-route-faithful.d.ts.map +1 -1
  49. package/dist/layout/dot/flat.d.ts +22 -7
  50. package/dist/layout/dot/flat.d.ts.map +1 -1
  51. package/dist/layout/dot/mincross-flat.d.ts +10 -1
  52. package/dist/layout/dot/mincross-flat.d.ts.map +1 -1
  53. package/dist/layout/dot/mincross.d.ts +6 -1
  54. package/dist/layout/dot/mincross.d.ts.map +1 -1
  55. package/dist/layout/dot/ns-subtree.d.ts +9 -6
  56. package/dist/layout/dot/ns-subtree.d.ts.map +1 -1
  57. package/dist/layout/dot/pack-components.d.ts +4 -3
  58. package/dist/layout/dot/pack-components.d.ts.map +1 -1
  59. package/dist/layout/dot/position-aux.d.ts +62 -20
  60. package/dist/layout/dot/position-aux.d.ts.map +1 -1
  61. package/dist/layout/dot/position-bbox.d.ts.map +1 -1
  62. package/dist/layout/dot/position-ycoords.d.ts.map +1 -1
  63. package/dist/layout/dot/position.d.ts.map +1 -1
  64. package/dist/layout/dot/rank-dot2.d.ts +7 -25
  65. package/dist/layout/dot/rank-dot2.d.ts.map +1 -1
  66. package/dist/layout/dot/self-loop.d.ts +11 -4
  67. package/dist/layout/dot/self-loop.d.ts.map +1 -1
  68. package/dist/layout/dot/splines-flat-multi.d.ts +11 -3
  69. package/dist/layout/dot/splines-flat-multi.d.ts.map +1 -1
  70. package/dist/layout/dot/splines-route.d.ts +6 -3
  71. package/dist/layout/dot/splines-route.d.ts.map +1 -1
  72. package/dist/layout/dot/straight-edges.d.ts.map +1 -1
  73. package/dist/layout/fdp/cluster-edges.d.ts.map +1 -1
  74. package/dist/layout/fdp/tlayout.d.ts +3 -0
  75. package/dist/layout/fdp/tlayout.d.ts.map +1 -1
  76. package/dist/layout/neato/__fixtures__/hier-imds.d.ts +5 -4
  77. package/dist/layout/neato/__fixtures__/hier-imds.d.ts.map +1 -1
  78. package/dist/layout/neato/__fixtures__/hier-majorization.d.ts +6 -5
  79. package/dist/layout/neato/__fixtures__/hier-majorization.d.ts.map +1 -1
  80. package/dist/layout/neato/conjgrad.d.ts +7 -6
  81. package/dist/layout/neato/conjgrad.d.ts.map +1 -1
  82. package/dist/layout/neato/matrix-ops-dense.d.ts +1 -6
  83. package/dist/layout/neato/matrix-ops-dense.d.ts.map +1 -1
  84. package/dist/layout/neato/matrix-ops.d.ts +0 -6
  85. package/dist/layout/neato/matrix-ops.d.ts.map +1 -1
  86. package/dist/layout/neato/quad-prog-vpsc.d.ts.map +1 -1
  87. package/dist/model/cgraph-ops.d.ts +7 -0
  88. package/dist/model/cgraph-ops.d.ts.map +1 -1
  89. package/dist/model/graph.d.ts +12 -2
  90. package/dist/model/graph.d.ts.map +1 -1
  91. package/dist/model/rankEntry.d.ts +3 -1
  92. package/dist/model/rankEntry.d.ts.map +1 -1
  93. package/dist/ortho/index.d.ts +0 -1
  94. package/dist/ortho/index.d.ts.map +1 -1
  95. package/dist/ortho/partition.d.ts +2 -4
  96. package/dist/ortho/partition.d.ts.map +1 -1
  97. package/dist/parser/builder.d.ts +11 -10
  98. package/dist/parser/builder.d.ts.map +1 -1
  99. package/dist/parser/graph-attr-syms.d.ts +35 -0
  100. package/dist/parser/graph-attr-syms.d.ts.map +1 -0
  101. package/dist/pathplan/route.d.ts +93 -0
  102. package/dist/pathplan/route.d.ts.map +1 -1
  103. package/dist/render/dot/agwrite.d.ts +27 -16
  104. package/dist/render/dot/agwrite.d.ts.map +1 -1
  105. package/dist/render/dot/attrs.d.ts +5 -0
  106. package/dist/render/dot/attrs.d.ts.map +1 -1
  107. package/dist/render/dot/types.d.ts +7 -2
  108. package/dist/render/dot/types.d.ts.map +1 -1
  109. package/dist/render/json-cluster-edge.d.ts +3 -2
  110. package/dist/render/json-cluster-edge.d.ts.map +1 -1
  111. package/dist/render/json.d.ts +7 -1
  112. package/dist/render/json.d.ts.map +1 -1
  113. package/dist/render/map.d.ts +14 -10
  114. package/dist/render/map.d.ts.map +1 -1
  115. package/dist/render/svg-graph.d.ts.map +1 -1
  116. package/dist/render/svg-id.d.ts +9 -0
  117. package/dist/render/svg-id.d.ts.map +1 -1
  118. package/dist/render.js +22009 -21849
  119. package/dist/render.js.map +4 -4
  120. package/dist/util/overflow.d.ts +37 -0
  121. package/dist/util/overflow.d.ts.map +1 -0
  122. package/dist/util/printf-round.d.ts +8 -0
  123. package/dist/util/printf-round.d.ts.map +1 -1
  124. package/package.json +3 -2
  125. package/src/common/clust-map.ts +58 -0
  126. package/src/common/compass-port.ts +36 -20
  127. package/src/common/graph-init.ts +11 -1
  128. package/src/common/htmltable-emit.ts +87 -7
  129. package/src/common/htmltable-label.ts +9 -4
  130. package/src/common/htmltable-lex.ts +5 -2
  131. package/src/common/htmltable-parse-image.ts +69 -0
  132. package/src/common/htmltable-parse-state.ts +6 -0
  133. package/src/common/htmltable-parse.ts +34 -44
  134. package/src/common/layers.ts +25 -4
  135. package/src/common/poly-gencode.ts +3 -11
  136. package/src/common/poly-inside.ts +11 -5
  137. package/src/common/splines-geom.ts +24 -6
  138. package/src/common/splines-routespl.ts +32 -0
  139. package/src/common/xlabels-place.ts +22 -4
  140. package/src/gvc/__fixtures__/rerender/abom-shift-pack.dot.plain.nofree.1 +19 -19
  141. package/src/gvc/__fixtures__/rerender/abom-shift-pack.dot.plain.nofree.2 +19 -19
  142. package/src/gvc/__fixtures__/rerender/abom-shift-pack.dot.plain.nofree.3 +19 -19
  143. package/src/gvc/__fixtures__/rerender/abom-shift-parity.dot.plain.nofree.2 +18 -18
  144. package/src/gvc/__fixtures__/rerender/abom-shift-parity.dot.plain.nofree.3 +12 -12
  145. package/src/gvc/__fixtures__/rerender/flat-rev-stale.dot.plain.nofree.1 +20 -20
  146. package/src/gvc/__fixtures__/rerender/flat-rev-stale.dot.plain.nofree.2 +31 -31
  147. package/src/gvc/__fixtures__/rerender/flat-rev-stale.dot.plain.nofree.3 +33 -33
  148. package/src/gvc/__fixtures__/rerender/multi-edge.dot.plain.nofree.1 +10 -10
  149. package/src/gvc/__fixtures__/rerender/multi-edge.dot.plain.nofree.2 +28 -28
  150. package/src/gvc/__fixtures__/rerender/multi-edge.dot.plain.nofree.3 +28 -28
  151. package/src/gvc/__fixtures__/rerender/multi-edge.dot.svg.nofree.1 +21 -28
  152. package/src/gvc/__fixtures__/rerender/multi-edge.dot.svg.nofree.2 +100 -102
  153. package/src/gvc/__fixtures__/rerender/multi-edge.dot.svg.nofree.3 +137 -139
  154. package/src/gvc/__fixtures__/rerender/nestedclust.dot.dot.nofree.1 +1 -1
  155. package/src/gvc/__fixtures__/rerender/nestedclust.dot.dot.nofree.2 +1 -1
  156. package/src/gvc/__fixtures__/rerender/nestedclust.dot.dot.nofree.3 +1 -1
  157. package/src/gvc/__fixtures__/rerender/nestedclust.dot.xdot.nofree.1 +3 -3
  158. package/src/gvc/__fixtures__/rerender/nestedclust.dot.xdot.nofree.2 +3 -3
  159. package/src/gvc/__fixtures__/rerender/nestedclust.dot.xdot.nofree.3 +3 -3
  160. package/src/gvc/__fixtures__/rerender/regen.sh +6 -0
  161. package/src/gvc/anchor.ts +18 -30
  162. package/src/gvc/device-cluster.ts +16 -0
  163. package/src/gvc/device.ts +20 -20
  164. package/src/gvc/emit-walk.ts +11 -1
  165. package/src/gvc/job.ts +17 -9
  166. package/src/gvc/viewport.ts +27 -6
  167. package/src/layout/dot/classify.ts +5 -2
  168. package/src/layout/dot/compound.ts +1 -21
  169. package/src/layout/dot/edge-route-chain-views.ts +120 -0
  170. package/src/layout/dot/edge-route-chain.ts +103 -117
  171. package/src/layout/dot/edge-route-faithful.ts +20 -5
  172. package/src/layout/dot/flat.ts +38 -17
  173. package/src/layout/dot/mincross-flat.ts +15 -5
  174. package/src/layout/dot/mincross.ts +6 -2
  175. package/src/layout/dot/ns-subtree.ts +11 -7
  176. package/src/layout/dot/pack-components.ts +6 -4
  177. package/src/layout/dot/position-aux.ts +112 -39
  178. package/src/layout/dot/position-bbox.ts +14 -1
  179. package/src/layout/dot/position-ycoords.ts +7 -1
  180. package/src/layout/dot/position.ts +4 -1
  181. package/src/layout/dot/rank-dot2.ts +13 -94
  182. package/src/layout/dot/self-loop.ts +29 -11
  183. package/src/layout/dot/splines-flat-multi.ts +12 -4
  184. package/src/layout/dot/splines-route.ts +10 -11
  185. package/src/layout/dot/straight-edges.ts +5 -3
  186. package/src/layout/fdp/cluster-edges.ts +2 -23
  187. package/src/layout/fdp/tlayout.ts +6 -5
  188. package/src/layout/neato/__fixtures__/conjgrad-d.json +1 -0
  189. package/src/layout/neato/__fixtures__/dim/hier-big-dim3.dot +141 -141
  190. package/src/layout/neato/__fixtures__/dim/hier-big-dim3.xdot +339 -339
  191. package/src/layout/neato/__fixtures__/dim/hier-big-dim4.dot +140 -140
  192. package/src/layout/neato/__fixtures__/dim/hier-big-dim4.xdot +323 -323
  193. package/src/layout/neato/__fixtures__/dim/hier-big-subset-dim3.dot +141 -141
  194. package/src/layout/neato/__fixtures__/dim/hier-big-subset-dim3.xdot +339 -339
  195. package/src/layout/neato/__fixtures__/dim/hier-big110-dim3.dot +251 -251
  196. package/src/layout/neato/__fixtures__/dim/hier-big110-dim3.xdot +535 -535
  197. package/src/layout/neato/__fixtures__/dim/hier-circuit-dim3.dot +14 -14
  198. package/src/layout/neato/__fixtures__/dim/hier-circuit-dim3.xdot +32 -32
  199. package/src/layout/neato/__fixtures__/dim/hier-dim4.dot +8 -8
  200. package/src/layout/neato/__fixtures__/dim/hier-dim4.xdot +14 -14
  201. package/src/layout/neato/__fixtures__/dim/hier-len-dim3.dot +17 -17
  202. package/src/layout/neato/__fixtures__/dim/hier-len-dim3.xdot +35 -35
  203. package/src/layout/neato/__fixtures__/dim/hier-noedge-big.dot +2 -2
  204. package/src/layout/neato/__fixtures__/dim/hier-noedge-big.xdot +2 -2
  205. package/src/layout/neato/__fixtures__/dim/hier-ring-dim3.dot +11 -11
  206. package/src/layout/neato/__fixtures__/dim/hier-ring-dim3.xdot +21 -21
  207. package/src/layout/neato/__fixtures__/dim/hier-star-dim3.dot +14 -14
  208. package/src/layout/neato/__fixtures__/dim/hier-star-dim3.xdot +26 -26
  209. package/src/layout/neato/__fixtures__/dim/hier-stresswt1-dim4.dot +13 -13
  210. package/src/layout/neato/__fixtures__/dim/hier-stresswt1-dim4.xdot +30 -30
  211. package/src/layout/neato/__fixtures__/dim/hier-subset-dim3.dot +10 -10
  212. package/src/layout/neato/__fixtures__/dim/hier-subset-dim3.xdot +19 -19
  213. package/src/layout/neato/__fixtures__/dim/smart-units.json +1 -1
  214. package/src/layout/neato/__fixtures__/hier/cases/dirnone.plain +10 -10
  215. package/src/layout/neato/__fixtures__/hier/cases/tdist.plain +12 -12
  216. package/src/layout/neato/__fixtures__/hier/hier-probe.plain +1 -1
  217. package/src/layout/neato/__fixtures__/hier/hier-probe.xdot +19 -19
  218. package/src/layout/neato/__fixtures__/hier-imds.ts +14 -13
  219. package/src/layout/neato/__fixtures__/hier-majorization.ts +24 -23
  220. package/src/layout/neato/__fixtures__/ipsep/ipsep-grid.xdot +20 -20
  221. package/src/layout/neato/__fixtures__/ipsep/ipsep-k6.xdot +8 -8
  222. package/src/layout/neato/__fixtures__/ipsep/ipsep-rand-len.xdot +34 -34
  223. package/src/layout/neato/__fixtures__/ipsep/ipsep-rand.xdot +32 -32
  224. package/src/layout/neato/__fixtures__/ipsep/ipsep-tree.xdot +18 -18
  225. package/src/layout/neato/__fixtures__/ipsep/kd-ipsep-len.xdot +13 -13
  226. package/src/layout/neato/__fixtures__/ipsep/kd-ipsep.xdot +12 -12
  227. package/src/layout/neato/__fixtures__/models/hier-circuit.xdot +33 -33
  228. package/src/layout/neato/__fixtures__/models/hier-default.xdot +30 -30
  229. package/src/layout/neato/__fixtures__/models/hier-mds-nolen.xdot +30 -30
  230. package/src/layout/neato/__fixtures__/models/hier-pin-disc-circuit.xdot +35 -35
  231. package/src/layout/neato/__fixtures__/models/hier-shortpath.xdot +30 -30
  232. package/src/layout/neato/conjgrad.ts +38 -35
  233. package/src/layout/neato/matrix-ops-dense.ts +2 -20
  234. package/src/layout/neato/matrix-ops.ts +0 -20
  235. package/src/layout/neato/quad-prog-vpsc.ts +7 -5
  236. package/src/layout/neato/smart-ini-x.ts +15 -15
  237. package/src/layout/neato/stress-subspace.ts +5 -5
  238. package/src/layout/sfdp/__fixtures__/dim/dim3-dimen3.dot +6 -6
  239. package/src/layout/sfdp/__fixtures__/dim/dim3.dot +6 -6
  240. package/src/layout/sfdp/__fixtures__/dim/dim4-dimen4.dot +6 -6
  241. package/src/layout/sfdp/__fixtures__/dim/overlap-prism-dim3.dot +6 -6
  242. package/src/layout/sfdp/__fixtures__/dim/regen.sh +2 -0
  243. package/src/model/cgraph-ops.ts +12 -0
  244. package/src/model/graph.ts +13 -2
  245. package/src/model/rankEntry.ts +3 -1
  246. package/src/ortho/index.ts +0 -1
  247. package/src/ortho/partition.ts +10 -22
  248. package/src/parser/builder.ts +67 -100
  249. package/src/parser/graph-attr-syms.ts +62 -0
  250. package/src/pathplan/route.ts +14 -4
  251. package/src/render/dot/agwrite.ts +47 -27
  252. package/src/render/dot/attrs.ts +6 -2
  253. package/src/render/dot/types.ts +7 -2
  254. package/src/render/json-cluster-edge.ts +8 -4
  255. package/src/render/json.ts +15 -8
  256. package/src/render/map.ts +49 -58
  257. package/src/render/svg-cluster.ts +3 -3
  258. package/src/render/svg-graph.ts +1 -3
  259. package/src/render/svg-helpers.ts +6 -6
  260. package/src/render/svg-id.ts +23 -5
  261. package/src/util/overflow.ts +74 -0
  262. package/src/util/printf-round.ts +11 -0
@@ -10,7 +10,6 @@
10
10
  import type {
11
11
  HtmlCell,
12
12
  HtmlCellContent,
13
- HtmlImage,
14
13
  HtmlLabel,
15
14
  HtmlRow,
16
15
  HtmlTable,
@@ -22,8 +21,9 @@ import type {
22
21
  import { HtmlParseError } from './htmltable-types.js';
23
22
  import { StderrLines } from './htmltable-attr-warn.js';
24
23
  import type { ParseState } from './htmltable-parse-state.js';
25
- import { consume, emitEof, emitWarnings, peek } from './htmltable-parse-state.js';
26
- import { htmlErrorAtToken, tokenizeDeferred } from './htmltable-lex.js';
24
+ import { consume, consumedTag, emitEof, emitWarnings, peek } from './htmltable-parse-state.js';
25
+ import { HtmlLexError, htmlErrorAtToken, tokenizeDeferred } from './htmltable-lex.js';
26
+ import { scanCellImage } from './htmltable-parse-image.js';
27
27
  import type { FontState } from './htmltable-parse-font.js';
28
28
  import {
29
29
  fontItemProps, inlineFontState, isInlineTag, mergeFontState, tableFont, wrapperFont,
@@ -38,7 +38,7 @@ import {
38
38
  } from './htmltable-parse-attrs.js';
39
39
 
40
40
  /** bison's default message for an unexpected token. @see lib/common/htmlparse.y */
41
- const MSG_SYNTAX_ERROR = 'syntax error';
41
+ export const MSG_SYNTAX_ERROR = 'syntax error';
42
42
  /** @see lib/common/htmlparse.y:288 (table rule) */
43
43
  const MSG_TEXT_BEFORE_TABLE = 'Syntax error: non-space string used before <TABLE>';
44
44
  /** @see lib/common/htmlparse.y:298 (table rule) */
@@ -50,17 +50,25 @@ const nonSpace = (text: string): boolean => /[^ ]/.test(text);
50
50
  /** Text in `ctx->xb` that no token carried, which the table rule's nonSpace also reads. */
51
51
  const heldNonSpace = (tbl: Token | undefined): boolean => tbl?.type === 'open' && nonSpace(tbl.heldText ?? '');
52
52
 
53
+ /**
54
+ * `e` as C prints it once `ctx->error` is set: htmlerror and the expat path
55
+ * print nothing more (a silent HtmlParseError); only lexerror still does.
56
+ * @see lib/common/htmllex.c:htmlerror
57
+ */
58
+ const guarded = (s: ParseState, e: HtmlParseError): HtmlParseError =>
59
+ s.error === true && !(e instanceof HtmlLexError && e.unguarded) ? new HtmlParseError(e.tag) : e;
60
+
53
61
  /**
54
62
  * The parse failure C reports through `htmlerror` when the lexer last returned
55
63
  * `tok`. At end of input the deferred lexical error is what C would hit next.
56
64
  * A token without a recorded chunk yields a plain, silent HtmlParseError.
57
65
  * @see lib/common/htmllex.c:htmlerror
58
66
  */
59
- const parseError = (s: ParseState, tok: Token | undefined, message: string): HtmlParseError => {
67
+ export const parseError = (s: ParseState, tok: Token | undefined, message: string): HtmlParseError => {
60
68
  // The lexer already ran for the token the error is reported at.
61
69
  if (tok !== undefined) emitWarnings(s, tok);
62
70
  else emitEof(s);
63
- return (tok === undefined ? s.pending : htmlErrorAtToken(message, tok)) ?? new HtmlParseError(message);
71
+ return guarded(s, (tok === undefined ? s.pending : htmlErrorAtToken(message, tok)) ?? new HtmlParseError(message));
64
72
  };
65
73
 
66
74
  // ---------------------------------------------------------------------------
@@ -73,7 +81,7 @@ const parseError = (s: ParseState, tok: Token | undefined, message: string): Htm
73
81
  * syntax error at that token.
74
82
  * @see lib/common/htmlparse.y:br, image
75
83
  */
76
- const consumeClose = (s: ParseState, tag: string): void => {
84
+ export const consumeClose = (s: ParseState, tag: string): void => {
77
85
  const nxt = peek(s);
78
86
  if (nxt === undefined) return;
79
87
  if (nxt.type === 'close' && nxt.tag === tag) {
@@ -172,7 +180,7 @@ const fontTableWrapper = (s: ParseState): OpenToken | undefined => {
172
180
  };
173
181
 
174
182
  /** Consume strings; true when any is non-space (the table rule's nonSpace check). */
175
- const skipStrings = (s: ParseState): boolean => {
183
+ export const skipStrings = (s: ParseState): boolean => {
176
184
  let found = false;
177
185
  for (let t = peek(s); t?.type === 'text'; t = peek(s)) {
178
186
  consume(s);
@@ -210,29 +218,18 @@ const parseFontTable = (s: ParseState, open: OpenToken, fontStack: FontState[]):
210
218
  const rejectTableAfterTag = (s: ParseState, start: number): void => {
211
219
  const nxt = peek(s);
212
220
  if (nxt?.type !== 'open' || nxt.tag !== 'TABLE') return;
213
- if (s.tokens.slice(start, s.pos).some((t) => t.type !== 'text')) {
214
- throw parseError(s, nxt, MSG_SYNTAX_ERROR);
215
- }
221
+ if (consumedTag(s, start)) throw parseError(s, nxt, MSG_SYNTAX_ERROR);
216
222
  };
217
223
 
218
224
  // ---------------------------------------------------------------------------
219
225
  // Cell content helpers — mirrors htmlparse.y cell rule
220
226
  // ---------------------------------------------------------------------------
221
227
 
222
- const parseImgContent = (s: ParseState, t: OpenToken): HtmlImage => {
223
- consume(s);
224
- const img: HtmlImage = {
225
- kind: 'image',
226
- src: t.attrs['src'] ?? '',
227
- scale: t.attrs['scale'],
228
- };
229
- consumeClose(s, 'IMG');
230
- return img;
231
- };
232
-
233
228
  /** What a cell holds so far: C's cell has exactly one child. */
234
- interface CellScan {
229
+ export interface CellScan {
235
230
  kind: 'none' | 'text' | 'table' | 'fonttable' | 'image';
231
+ /** Index of the cell's first token. */
232
+ start: number;
236
233
  /** Non-space text before the nested table (checked when the table opens). */
237
234
  textNonSpace: boolean;
238
235
  /** Non-space text after the nested table (checked when the run ends). */
@@ -243,7 +240,6 @@ interface CellScan {
243
240
  const scanCellTable = (
244
241
  s: ParseState, t: Token, fontStack: FontState[], st: CellScan,
245
242
  ): HtmlCellContent[] => {
246
- if (st.kind === 'image' || st.kind === 'table') throw parseError(s, t, MSG_SYNTAX_ERROR);
247
243
  if (st.textNonSpace || heldNonSpace(t)) throw parseError(s, t, MSG_TEXT_BEFORE_TABLE);
248
244
  const tbl = parseTable(s, fontStack);
249
245
  st.kind = 'table';
@@ -269,18 +265,12 @@ const scanAfterTable = (s: ParseState, t: Token, st: CellScan): HtmlCellContent[
269
265
  return [];
270
266
  };
271
267
 
272
- /** `image` as the cell's only child. */
273
- const scanCellImage = (s: ParseState, t: OpenToken, st: CellScan): HtmlCellContent[] => {
274
- if (st.kind !== 'none') throw parseError(s, t, MSG_SYNTAX_ERROR);
275
- st.kind = 'image';
276
- return [parseImgContent(s, t)];
277
- };
278
-
279
268
  /** One step of `cell: T_cell (fonttable | fonttext | image) T_end_cell`. */
280
269
  const scanCellItem = (
281
270
  s: ParseState, t: Token, fontStack: FontState[], st: CellScan,
282
271
  ): HtmlCellContent[] => {
283
- if (st.kind === 'fonttable') throw parseError(s, t, MSG_SYNTAX_ERROR);
272
+ // After an image only the cell's close may come: its opt_space took the strings.
273
+ if (st.kind === 'fonttable' || st.kind === 'image') throw parseError(s, t, MSG_SYNTAX_ERROR);
284
274
  if (st.kind === 'table') return scanAfterTable(s, t, st);
285
275
  const wrapper = st.kind === 'none' ? fontTableWrapper(s) : undefined;
286
276
  if (wrapper !== undefined) {
@@ -289,7 +279,6 @@ const scanCellItem = (
289
279
  }
290
280
  if (t.type === 'open' && t.tag === 'TABLE') return scanCellTable(s, t, fontStack, st);
291
281
  if (t.type === 'open' && t.tag === 'IMG') return scanCellImage(s, t, st);
292
- if (st.kind === 'image') throw parseError(s, t, MSG_SYNTAX_ERROR);
293
282
  return scanCellText(s, t, fontStack, st);
294
283
  };
295
284
 
@@ -303,19 +292,18 @@ const endsCell = (s: ParseState, t: Token, st: CellScan): boolean => {
303
292
 
304
293
  const parseCellContent = (s: ParseState, fontStack: FontState[]): HtmlCellContent[] => {
305
294
  const content: HtmlCellContent[] = [];
306
- const st: CellScan = { kind: 'none', textNonSpace: false, afterNonSpace: false };
295
+ const st: CellScan = { kind: 'none', start: s.pos, textNonSpace: false, afterNonSpace: false };
307
296
  for (let t = peek(s); t !== undefined; t = peek(s)) {
308
297
  if (endsCell(s, t, st)) break;
309
298
  content.push(...scanCellItem(s, t, fontStack, st));
310
299
  }
311
300
  const nxt = peek(s);
312
301
  if (nxt?.type === 'close' && nxt.tag === 'TD') consume(s);
313
- // C models a cell child as a single object; the `TD table TD` rule discards
314
- // whitespace around a nested table, so a table IS the cell's sole content.
315
- // @see lib/common/htmltable.h:htmlcell_t.child
316
- const tbl = content.find((c) => c.kind === 'table');
317
- if (tbl !== undefined) return [tbl];
318
- return content;
302
+ // C models a cell child as a single object; the table and image rules take
303
+ // the strings around them (opt_space), so a table or image IS the cell's
304
+ // sole content. @see lib/common/htmltable.h:htmlcell_t.child
305
+ const sole = content.find((c) => c.kind === 'table' || c.kind === 'image');
306
+ return sole !== undefined ? [sole] : content;
319
307
  };
320
308
 
321
309
  /** @see lib/common/htmlparse.y:cell rule / lib/common/htmllex.c:mkCell */
@@ -547,10 +535,12 @@ const parseTokens = (s: ParseState): HtmlLabel => {
547
535
  return parseTextLabel(s, fontStack);
548
536
  };
549
537
 
550
- /** A parsed label and `ctx->warn`, which `make_html_label` ORs into its rv. */
538
+ /** A parsed label with `ctx->warn` and `ctx->error`, from which `clearHTMLlexer` makes parseHTML's rv. */
551
539
  export interface ParsedHtmlLabel {
552
540
  label: HtmlLabel;
553
541
  warn: boolean;
542
+ /** htmlerror printed but the parse went on: rv 3 with a label. */
543
+ error: boolean;
554
544
  }
555
545
 
556
546
  /**
@@ -566,11 +556,11 @@ export const parseHtmlLabelRv = (src: string, stderr: StderrLines): ParsedHtmlLa
566
556
  const s: ParseState = { tokens, pos: 0, pending: error, stderr, emitted: new WeakSet(), warn: false, eof };
567
557
  try {
568
558
  const label = parseTokens(s);
569
- if (error !== undefined) throw error;
570
- return { label, warn: s.warn === true };
559
+ if (error !== undefined) throw guarded(s, error);
560
+ return { label, warn: s.warn === true, error: s.error === true };
571
561
  } catch (e) {
572
562
  // Running off the truncated stream means C's lexer would have hit the error.
573
- if (error !== undefined && s.pos >= tokens.length) { emitEof(s); throw error; }
563
+ if (error !== undefined && s.pos >= tokens.length) { emitEof(s); throw guarded(s, error); }
574
564
  throw e;
575
565
  }
576
566
  };
@@ -1,15 +1,17 @@
1
1
  // SPDX-License-Identifier: EPL-2.0
2
2
  //
3
3
  // Output-layer support, ported from lib/common/emit.c (parse_layers,
4
- // layer_index, selectedLayer, node_in_layer, edge_in_layer). A graph with a
5
- // `layers="a:b:c"` attribute renders once per layer; each node/edge appears
6
- // only in the layers it belongs to (its `layer` attribute, or all layers when
7
- // it has none). All of this is inert unless numLayers > 1.
4
+ // layer_index, selectedLayer, node_in_layer, edge_in_layer, clust_in_layer).
5
+ // A graph with a `layers="a:b:c"` attribute renders once per layer; each
6
+ // node/edge/cluster appears only in the layers it belongs to (its `layer`
7
+ // attribute, or all layers when it has none; a cluster with none follows its
8
+ // nodes). All of this is inert unless numLayers > 1.
8
9
 
9
10
  import { agwarningf } from './agerr.js';
10
11
  import type { Graph } from '../model/graph.js';
11
12
  import type { Node } from '../model/node.js';
12
13
  import type { Edge } from '../model/edge.js';
14
+ import { graphAttrInherited } from './attr-get.js';
13
15
 
14
16
  /** @see lib/common/const.h:82-83 */
15
17
  const DEFAULT_LAYERSEP = ':\t ';
@@ -121,6 +123,25 @@ export function edgeInLayer(info: LayerInfo, layerNum: number, e: Edge): boolean
121
123
  });
122
124
  }
123
125
 
126
+ /**
127
+ * Whether cluster `sg` is drawn in layer `layerNum`. Its own `layer` decides
128
+ * when it has one (C reads it with `agattr_text(sg, AGRAPH, "layer", 0)`: the
129
+ * cluster's value, or the default it was created under). With none, the
130
+ * cluster is in the layer when any of its nodes is, and `node_in_layer` is
131
+ * handed `sg`, so only the edges of the cluster itself count.
132
+ * @see lib/common/emit.c:1593 clust_in_layer
133
+ */
134
+ export function clustInLayer(info: LayerInfo, layerNum: number, sg: Graph): boolean {
135
+ if (info.numLayers <= 1) return true;
136
+ const pg = graphAttrInherited(sg, 'layer') ?? '';
137
+ if (selectedLayer(info, layerNum, pg)) return true;
138
+ if (pg !== '') return false;
139
+ for (const n of sg.nodes.values()) {
140
+ if (nodeInLayer(info, layerNum, n, sg)) return true;
141
+ }
142
+ return false;
143
+ }
144
+
124
145
  /**
125
146
  * Walk each layer index and keep those `selectedLayer` matches against `p`.
126
147
  * Returns `[n, l1..ln, numLayers + 1]`, or null (after a warning) when nothing
@@ -536,24 +536,16 @@ export function polyGencode(rawJob: unknown, rawNode: unknown): void {
536
536
  if (ctx === null) return;
537
537
  // EMIT_CLUSTERS_LAST (map device): the node's own anchor <area> is emitted
538
538
  // AFTER its shape and label, so an inner HTML cell's area precedes the
539
- // node's. Save the node hot spot first — HTML cells overwrite obj.urlMapPts
540
- // via emit_map_rect — and restore it for the deferred anchor.
539
+ // node's. The hot spot is still emit_begin_node's: the label's cells write
540
+ // their map rects on the label's own obj (allocObj), not on the node's.
541
541
  // @see lib/common/shapes.c:poly_gencode (2936, 3087-3092)
542
542
  const clustersLast = (job.flags & EMIT_CLUSTERS_LAST) !== 0;
543
- const savedShape = job.obj?.urlMapShape;
544
- const savedPts = job.obj?.urlMapPts;
545
543
  let inAnchor = clustersLast ? false : beginNodeAnchor(n, renderer, job);
546
544
  renderPeripheries(ctx.poly, ctx.coord, ctx.filled, ctx.ringCtx);
547
545
  // point_gencode has no usershape branch.
548
546
  if (!isPointNode(n)) renderUsershape(n, ctx);
549
547
  // point_gencode never emits a label (AD-3).
550
548
  if (!isPointNode(n)) renderNodeLabel(n, ctx.coord, renderer, job);
551
- if (clustersLast) {
552
- if (job.obj && savedPts !== undefined && savedShape !== undefined) {
553
- job.obj.urlMapShape = savedShape;
554
- job.obj.urlMapPts = savedPts;
555
- }
556
- inAnchor = beginNodeAnchor(n, renderer, job);
557
- }
549
+ if (clustersLast) inAnchor = beginNodeAnchor(n, renderer, job);
558
550
  if (inAnchor) renderer.endAnchor?.(job);
559
551
  }
@@ -20,6 +20,7 @@ import type { PolygonT } from './types.js';
20
20
  import type { InsideContext } from './splines-geom.js';
21
21
  import { polygonOutlineRing } from './poly-sizing.js';
22
22
  import { ccwrotatepf } from '../model/geom.js';
23
+ import { fdivOverflow } from '../util/overflow.js';
23
24
 
24
25
  /** Test if p0 and p1 are on the same side of the line L0-L1. @see shapes.c:same_side */
25
26
  export function sameSide(p0: Point, p1: Point, L0: Point, L1: Point): boolean {
@@ -60,7 +61,12 @@ function insideDims(n: Node, xsize: number, ysize: number):
60
61
  return { w, h, ow: 72 * n.info.outline_width || w, oh: 72 * n.info.outline_height || h };
61
62
  }
62
63
 
63
- /** @see lib/common/shapes.c:poly_inside (scale setup) */
64
+ /**
65
+ * C assigns `scalex = n_width` and then lets `fdiv_overflow` overwrite it
66
+ * with `n_width / xsize` when that quotient is finite (likewise `scaley`):
67
+ * `fdivOverflow(w, xsize) ?? w`.
68
+ * @see lib/common/shapes.c:poly_inside (scale setup, 2465-2469)
69
+ */
64
70
  function insideScale(n: Node, poly: PolygonT): InsideScale {
65
71
  // C swaps the node extents for flipped (LR/RL) layouts. @see poly_inside (GD_flip)
66
72
  const flip = n.root.info.flip === true;
@@ -74,8 +80,8 @@ function insideScale(n: Node, poly: PolygonT): InsideScale {
74
80
  const xsize = flip ? h : w;
75
81
  const ysize = flip ? w : h;
76
82
  return {
77
- scalex: xsize !== 0 ? w / xsize : w,
78
- scaley: ysize !== 0 ? h / ysize : h,
83
+ scalex: fdivOverflow(w, xsize) ?? w,
84
+ scaley: fdivOverflow(h, ysize) ?? h,
79
85
  boxURx: w / 2,
80
86
  boxURy: h / 2,
81
87
  };
@@ -85,8 +91,8 @@ function insideScale(n: Node, poly: PolygonT): InsideScale {
85
91
  const ysize = flip ? lwrw : n.info.ht;
86
92
  const { w, h, ow, oh } = insideDims(n, xsize, ysize);
87
93
  return {
88
- scalex: xsize !== 0 ? w / xsize : w,
89
- scaley: ysize !== 0 ? h / ysize : h,
94
+ scalex: fdivOverflow(w, xsize) ?? w,
95
+ scaley: fdivOverflow(h, ysize) ?? h,
90
96
  boxURx: ow / 2,
91
97
  boxURy: oh / 2,
92
98
  };
@@ -91,21 +91,39 @@ function expandByPoints(bb: Box, cp: Point[]): void {
91
91
  }
92
92
 
93
93
  /**
94
- * Expands bb to contain the cubic Bezier segment cp by adaptively refining the
95
- * segment to its true curve extent (not the control hull).
96
- * @see lib/common/emit.c:update_bb_bz
94
+ * How many times update_bb_bz attempts refinement of the control points.
95
+ * @see lib/common/emit.c:update_bb_bz (ATTEMPTS)
97
96
  */
98
- export function updateBbBz(bb: Box, cp: Point[]): void {
97
+ const UPDATE_BB_BZ_ATTEMPTS = 10;
98
+
99
+ /**
100
+ * Expands bb by the segment cp, halving it until it is sufficiently refined.
101
+ * A segment still unrefined when `recurse` reaches 0 leaves bb as it is
102
+ * (graphviz 16.1.1, upstream issue 2780: huge coordinates never refine).
103
+ * @see lib/common/emit.c:update_bb_bz_core
104
+ */
105
+ function updateBbBzCore(bb: Box, cp: Point[], recurse: number): void {
99
106
  if (!anyOutside(bb, cp)) return;
100
107
  if (checkControlPoints(cp)) {
101
108
  expandByPoints(bb, cp);
102
109
  return;
103
110
  }
111
+ if (recurse === 0) return;
104
112
  const left: Point[] = [];
105
113
  const right: Point[] = [];
106
114
  evalBezier(cp, 0.5, left, right);
107
- updateBbBz(bb, left);
108
- updateBbBz(bb, right);
115
+ updateBbBzCore(bb, left, recurse - 1);
116
+ updateBbBzCore(bb, right, recurse - 1);
117
+ }
118
+
119
+ /**
120
+ * Expands bb to contain the cubic Bezier segment cp by adaptively refining the
121
+ * segment to its true curve extent (not the control hull). Refinement stops
122
+ * after UPDATE_BB_BZ_ATTEMPTS levels (upstream issue 2780).
123
+ * @see lib/common/emit.c:update_bb_bz
124
+ */
125
+ export function updateBbBz(bb: Box, cp: Point[]): void {
126
+ updateBbBzCore(bb, cp, UPDATE_BB_BZ_ATTEMPTS);
109
127
  }
110
128
 
111
129
  // ---------------------------------------------------------------------------
@@ -16,6 +16,7 @@ import type { Poly } from '../pathplan/types.js';
16
16
  import { INIT_DELTA, LOOP_TRIES, ROUTESPL_FUDGE } from './splines-constants.js';
17
17
  import { fma } from './fma.js';
18
18
  import { agerrorf } from './agerr.js';
19
+ import { gfmt5 } from '../render/dot/xdot-ops.js';
19
20
 
20
21
  // ---------------------------------------------------------------------------
21
22
  // Stage-dump hook (diagnosis only; null in production — same pattern as
@@ -158,15 +159,46 @@ function clampPoint(p: Point, box: Box): void {
158
159
  // checkPath
159
160
  // ---------------------------------------------------------------------------
160
161
 
162
+ /** One port line of printpath: `(%.5g, %.5g), tangent angle: %.5g, %s`. */
163
+ function portText(port: Path['start']): string {
164
+ const constrained = port.constrained ? 'constrained' : 'not constrained';
165
+ return `(${gfmt5(port.p.x)}, ${gfmt5(port.p.y)}), tangent angle: ${gfmt5(port.theta)}, ${constrained}`;
166
+ }
167
+
168
+ /**
169
+ * Dump a path: its box count, each box, and both ports. C writes these with
170
+ * plain `fprintf(stderr)`, not agerr, so they go straight to `console.error`
171
+ * (the channel of the `Error:` line checkpath prints just before them) and a
172
+ * caller-set `agseterrf` function does not receive them.
173
+ * @see lib/common/routespl.c:printpath
174
+ */
175
+ function printPath(pp: Path): void {
176
+ console.error(`${pp.nbox} boxes:`);
177
+ for (let bi = 0; bi < pp.nbox; bi++) {
178
+ const { ll, ur } = pp.boxes[bi];
179
+ console.error(`${bi} (${gfmt5(ll.x)}, ${gfmt5(ll.y)}), (${gfmt5(ur.x)}, ${gfmt5(ur.y)})`);
180
+ }
181
+ console.error(`start port: ${portText(pp.start)}`);
182
+ console.error(`end port: ${portText(pp.end)}`);
183
+ }
184
+
161
185
  /**
162
186
  * Repairs minor errors in the box path (gaps, slight overlaps).
163
187
  * Returns true on hard failure; false on success.
164
188
  * Mutates boxes[] and pp in place.
165
189
  *
190
+ * A path with no box left after the degenerate-box filter is a hard failure
191
+ * that reports the path (graphviz 16.1.1, upstream 2773, 2774, 2776, 2778).
192
+ *
166
193
  * @see lib/common/routespl.c:checkpath
167
194
  */
168
195
  export function checkPath(boxn: number, boxes: Box[], pp: Path): boolean {
169
196
  const bn = removeDegenerateBoxes(boxes, boxn);
197
+ if (bn === 0) {
198
+ agerrorf('in checkpath, all bounding boxes are below threshold');
199
+ printPath(pp);
200
+ return true;
201
+ }
170
202
  if (boxes[0].ll.x > boxes[0].ur.x || boxes[0].ll.y > boxes[0].ur.y) return true;
171
203
 
172
204
  for (let bi = 0; bi + 1 < bn; bi++) {
@@ -12,6 +12,7 @@
12
12
  import type { Graph } from '../model/graph.js';
13
13
  import type { Point } from '../model/geom.js';
14
14
  import type { TextlabelT } from './types.js';
15
+ import { agwarningf } from './agerr.js';
15
16
  import {
16
17
  EDGE_LABEL, HEAD_LABEL, TAIL_LABEL, NODE_XLABEL, EDGE_XLABEL, mapbool,
17
18
  } from '../layout/dot/rank.js';
@@ -418,17 +419,25 @@ function buildArrays(
418
419
  return { ctx };
419
420
  }
420
421
 
421
- /** Write placed label positions back to the graph; update bb. */
422
- function writeBackLabels(gp: Graph, lbls: XLabelT[], nLbls: number): void {
422
+ /**
423
+ * Write placed label positions back to the graph; update bb. Returns C's
424
+ * `cnt`, the number of labels placed.
425
+ *
426
+ * @see lib/common/postproc.c:addXLabels (569-580)
427
+ */
428
+ function writeBackLabels(gp: Graph, lbls: XLabelT[], nLbls: number): number {
429
+ let cnt = 0;
423
430
  for (let i = 0; i < nLbls; i++) {
424
431
  const xlp = lbls[i];
425
432
  if (xlp.set) {
433
+ cnt++;
426
434
  const lp = xlp.lbl as TextlabelT;
427
435
  lp.set = true;
428
436
  lp.pos = centerPt(xlp);
429
437
  updateBBForLabel(gp, lp);
430
438
  }
431
439
  }
440
+ return cnt;
432
441
  }
433
442
 
434
443
  // ---------------------------------------------------------------------------
@@ -444,7 +453,13 @@ function needsXLabelWork(gp: Graph): boolean {
444
453
  return !!(h & EDGE_LABEL) && !(gp.info.edgeLabelsDone ?? false);
445
454
  }
446
455
 
447
- /** Run one placeLabels pass: count slots, build arrays, place, write back. */
456
+ /**
457
+ * Run one placeLabels pass: count slots, build arrays, place, write back, and
458
+ * warn when a label is left unplaced. Not ported: the `Verbose`
459
+ * `labels positioned` line; the port has no `Verbose`.
460
+ *
461
+ * @see lib/common/postproc.c:addXLabels (569-587)
462
+ */
448
463
  function runPlacement(gp: Graph): void {
449
464
  const hasLabels = gp.info.has_labels ?? 0;
450
465
  const et = edgeType(gp);
@@ -460,7 +475,10 @@ function runPlacement(gp: Graph): void {
460
475
  const force = forceStr === undefined ? true : mapbool(forceStr);
461
476
  const params: LabelParamsT = { bb: { ll: ctx.bb.ll, ur: ctx.bb.ur }, force };
462
477
  placeLabels(ctx.objs, ctx.lbls, params);
463
- writeBackLabels(gp, ctx.lbls, nLbls);
478
+ const cnt = writeBackLabels(gp, ctx.lbls, nLbls);
479
+ if (cnt !== nLbls) {
480
+ agwarningf(`${cnt} out of ${nLbls} exterior labels positioned.`);
481
+ }
464
482
  }
465
483
 
466
484
  /**
@@ -1,20 +1,20 @@
1
- graph 1 6.9028 3.9
2
- node a 0.375 2.9167 0.75 0.5 a solid ellipse black lightgrey
3
- node b 2.7917 2.9167 0.75 0.5 b solid ellipse black lightgrey
4
- node e 1.7917 2.9167 0.75 0.5 e solid ellipse black lightgrey
5
- node c 1.5833 1.9167 0.75 0.5 c solid ellipse black lightgrey
6
- node d 1.5833 0.91667 0.75 0.5 d solid ellipse black lightgrey
7
- node p 4.375 1.25 0.75 0.5 p solid ellipse black lightgrey
8
- node q 6.5278 1.25 0.75 0.5 q solid ellipse black lightgrey
9
- node r 5.5278 1.25 0.75 0.5 r solid ellipse black lightgrey
10
- node s 4.375 0.25 0.75 0.5 s solid ellipse black lightgrey
11
- edge a a 7 0.67726 3.0714 0.84528 3.1003 1 3.0487 1 2.9167 1 2.828 0.93016 2.7756 0.83336 2.7595 solid black
12
- edge a b 7 0.58237 3.1304 0.79801 3.336 1.1565 3.6331 1.5347 3.7556 1.9178 3.8796 2.2934 3.5533 2.5327 3.2721 x 1.5833 3.7833 solid black
13
- edge a e 4 0.75464 2.9167 0.90709 2.9167 1.0856 2.9167 1.2512 2.9167 zz 1.0833 3.075 solid black
14
- edge a c 4 0.60798 2.7153 0.7835 2.5741 1.0273 2.378 1.2272 2.2171 y 1.5694 0.66667 solid black
15
- edge b c 4 2.5587 2.7153 2.3832 2.5741 2.1394 2.378 1.9395 2.2171 solid black
16
- edge c d 4 1.5833 1.6625 1.5833 1.5612 1.5833 1.4406 1.5833 1.3269 solid black
17
- edge p q 7 4.5164 1.4864 4.713 1.7816 5.0905 2.2316 5.4931 2.0889 5.7783 1.9878 6.0422 1.7709 6.2322 1.583 k 5.4444 2.1167 solid black
18
- edge p r 4 4.7525 1.25 4.8301 1.25 4.9132 1.25 4.9951 1.25 m 4.9514 1.4083 solid black
19
- edge p s 4 4.375 0.99579 4.375 0.89454 4.375 0.77398 4.375 0.66022 solid black
1
+ graph 1 6.8472 3.9
2
+ node a 2.4722 2.9167 0.75 0.5 a solid ellipse black lightgrey
3
+ node b 1.375 2.9167 0.75 0.5 b solid ellipse black lightgrey
4
+ node e 0.375 2.9167 0.75 0.5 e solid ellipse black lightgrey
5
+ node c 1.9167 1.9167 0.75 0.5 c solid ellipse black lightgrey
6
+ node d 1.9167 0.91667 0.75 0.5 d solid ellipse black lightgrey
7
+ node p 6.4722 1.25 0.75 0.5 p solid ellipse black lightgrey
8
+ node q 5.375 1.25 0.75 0.5 q solid ellipse black lightgrey
9
+ node r 4.375 1.25 0.75 0.5 r solid ellipse black lightgrey
10
+ node s 6.4722 0.25 0.75 0.5 s solid ellipse black lightgrey
11
+ edge a a 7 2.7745 3.0714 2.9425 3.1003 3.0972 3.0487 3.0972 2.9167 3.0972 2.828 3.0274 2.7756 2.9306 2.7595 solid black
12
+ edge a b 4 2.0939 2.9167 2.0353 2.9167 1.9738 2.9167 1.9124 2.9167 x 1.9236 3.075 solid black
13
+ edge a e 7 2.2964 3.1413 2.1207 3.3457 1.8304 3.6335 1.503 3.7556 1.1535 3.8858 0.81939 3.5617 0.60677 3.2792 zz 1.4167 3.7833 solid black
14
+ edge a c 4 2.3434 2.6773 2.2782 2.5632 2.1974 2.4218 2.1238 2.293 y 0.36111 0.66667 solid black
15
+ edge b c 4 1.5006 2.6773 1.5642 2.5632 1.6429 2.4218 1.7148 2.293 solid black
16
+ edge c d 4 1.9167 1.6625 1.9167 1.5612 1.9167 1.4406 1.9167 1.3269 solid black
17
+ edge p q 4 6.0939 1.25 6.0353 1.25 5.9738 1.25 5.9124 1.25 k 5.9236 1.4083 solid black
18
+ edge p r 7 6.2939 1.4747 6.1159 1.6791 5.8221 1.967 5.4923 2.0889 5.1466 2.2166 4.8177 1.8973 4.6074 1.6165 m 5.4167 2.1167 solid black
19
+ edge p s 4 6.4722 0.99579 6.4722 0.89454 6.4722 0.77398 6.4722 0.66022 solid black
20
20
  stop
@@ -1,20 +1,20 @@
1
- graph 1 11.667 7.3796
2
- node a 6.875 3.75 0.75 0.5 a solid ellipse black lightgrey
3
- node b 9.2917 3.75 0.75 0.5 b solid ellipse black lightgrey
4
- node e 8.2917 3.75 0.75 0.5 e solid ellipse black lightgrey
5
- node c 10.292 3.75 0.75 0.5 c solid ellipse black lightgrey
6
- node d 11.292 3.75 0.75 0.5 d solid ellipse black lightgrey
7
- node p 0.375 0.25 0.75 0.5 p solid ellipse black lightgrey
8
- node q 3.375 0.25 0.75 0.5 q solid ellipse black lightgrey
9
- node r 2.375 0.25 0.75 0.5 r solid ellipse black lightgrey
10
- node s 1.375 0.25 0.75 0.5 s solid ellipse black lightgrey
11
- edge a a 14 8.3856 6.5714 8.5536 6.6003 8.7083 6.5487 8.7083 6.4167 8.7083 6.328 8.6385 6.2756 8.5417 6.2595 7.2284 3.8429 7.3754 3.8493 7.5 3.8184 7.5 3.75 7.5 3.7083 7.4537 3.6806 7.3843 3.6667 solid black
12
- edge a b 14 8.2907 6.6304 8.5063 6.836 8.8648 7.1331 9.2431 7.2556 9.6262 7.3796 10.002 7.0533 10.241 6.7721 7.127 3.9419 7.4155 4.1484 7.9111 4.4641 8.3958 4.5889 8.6953 4.666 8.9431 4.3861 9.1016 4.1292 x 8.4444 4.6167 solid black
13
- edge a e 8 8.463 6.4167 8.6154 6.4167 8.794 6.4167 8.9595 6.4167 7.2546 3.75 7.4071 3.75 7.5856 3.75 7.7512 3.75 zz 7.5833 3.9083 solid black
14
- edge a c 11 8.3163 6.2153 8.4918 6.0741 8.7356 5.878 8.9355 5.7171 7.0681 3.9673 7.2662 4.1725 7.5951 4.4665 7.9514 4.5889 8.6535 4.8302 9.4687 4.3684 9.928 4.0395 y 8 4.6167 solid black
15
- edge b c 8 10.267 6.2153 10.092 6.0741 9.8477 5.878 9.6478 5.7171 9.6706 3.75 9.6984 3.75 9.7262 3.75 9.754 3.75 solid black
16
- edge c d 8 9.2917 5.1625 9.2917 5.0612 9.2917 4.9406 9.2917 4.8269 10.671 3.75 10.698 3.75 10.726 3.75 10.754 3.75 solid black
17
- edge p q 14 5.8219 1.4864 6.0186 1.7816 6.3961 2.2316 6.7986 2.0889 7.0838 1.9878 7.3478 1.7709 7.5377 1.583 0.61898 0.44548 0.8937 0.65196 1.3626 0.96449 1.8264 1.0889 2.291 1.2135 2.7694 0.86813 3.0692 0.58337 k 1.875 1.1167 solid black
18
- edge p r 8 6.058 1.25 6.1356 1.25 6.2188 1.25 6.3007 1.25 0.75589 0.25 1.0617 0.25 1.4949 0.25 1.8363 0.25 m 1.375 0.40833 solid black
19
- edge p s 8 5.6806 0.99579 5.6806 0.89454 5.6806 0.77398 5.6806 0.66022 0.75391 0.25 0.78171 0.25 0.80951 0.25 0.83731 0.25 solid black
1
+ graph 1 10.444 7.2886
2
+ node a 9.8194 3.6528 0.75 0.5 a solid ellipse black lightgrey
3
+ node b 8.7222 3.6528 0.75 0.5 b solid ellipse black lightgrey
4
+ node e 5.7222 3.6528 0.75 0.5 e solid ellipse black lightgrey
5
+ node c 7.7222 3.6528 0.75 0.5 c solid ellipse black lightgrey
6
+ node d 6.7222 3.6528 0.75 0.5 d solid ellipse black lightgrey
7
+ node p 3.4722 0.25 0.75 0.5 p solid ellipse black lightgrey
8
+ node q 2.375 0.25 0.75 0.5 q solid ellipse black lightgrey
9
+ node r 1.375 0.25 0.75 0.5 r solid ellipse black lightgrey
10
+ node s 0.375 0.25 0.75 0.5 s solid ellipse black lightgrey
11
+ edge a a 14 8.4828 6.4742 8.6508 6.5031 8.8056 6.4515 8.8056 6.3194 8.8056 6.2307 8.7357 6.1783 8.6389 6.1623 10.173 3.7457 10.32 3.7521 10.444 3.7211 10.444 3.6528 10.444 3.6111 10.398 3.5833 10.329 3.5695 solid black
12
+ edge a b 8 9.4411 3.6528 9.3825 3.6528 9.321 3.6528 9.2596 3.6528 7.6208 6.3194 7.6821 6.3194 7.7436 6.3194 7.8023 6.3194 x 9.2708 3.8111 solid black
13
+ edge a e 17 9.6983 3.895 9.5826 4.0965 9.3874 4.3693 9.128 4.4917 8.5321 4.7727 6.8438 4.1212 6.2222 3.9028 6.2005 3.8951 6.1785 3.8868 6.1564 3.8779 6.3151 6.682 6.5277 6.9645 6.8619 7.2886 7.2113 7.1583 7.5387 7.0363 7.8291 6.7484 8.0047 6.544 zz 9.0417 4.5194 solid black
14
+ edge a c 11 9.6172 3.8703 9.4101 4.0756 9.0674 4.3696 8.7014 4.4917 8.3867 4.5966 8.1083 4.299 7.9296 4.0297 7.8321 5.6957 7.9057 5.8246 7.9865 5.9659 8.0517 6.0801 y 8.6528 4.5194 solid black
15
+ edge b c 8 8.3437 3.6528 8.3159 3.6528 8.2881 3.6528 8.2603 3.6528 7.4231 5.6957 7.3513 5.8246 7.2725 5.9659 7.209 6.0801 solid black
16
+ edge c d 8 7.3437 3.6528 7.3159 3.6528 7.2881 3.6528 7.2603 3.6528 7.625 4.7297 7.625 4.8434 7.625 4.964 7.625 5.0652 solid black
17
+ edge p q 8 3.0939 0.25 3.0353 0.25 2.9738 0.25 2.9124 0.25 6.2874 1.25 6.3488 1.25 6.4103 1.25 6.4689 1.25 k 2.9236 0.40833 solid black
18
+ edge p r 14 3.2939 0.47465 3.1159 0.6791 2.8221 0.967 2.4923 1.0889 2.1466 1.2166 1.8177 0.89726 1.6074 0.61649 4.9824 1.6165 5.1927 1.8973 5.5216 2.2166 5.8673 2.0889 6.1971 1.967 6.4909 1.6791 6.6689 1.4747 m 2.4167 1.1167 solid black
19
+ edge p s 14 3.2509 0.45635 3.1169 0.5668 2.9363 0.6918 2.75 0.75 2.0076 0.98191 1.7339 1.0074 1 0.75 0.88822 0.71079 0.78157 0.64225 0.68904 0.56825 6.8472 0.66022 6.8472 0.77398 6.8472 0.89454 6.8472 0.99579 solid black
20
20
  stop