1import { 2 AbstractAlgebraicField, 3 AntiprismSymmetry, 4 Color, 5 Command, 6 File, 7 Manifestations, 8 ParameterizedField, 9 Polygon, 10 PolygonField, 11 PropertyChangeEvent, 12 PropertyChangeSupport, 13 ResourceLoader 14} from "./chunk-CQATDKLG.js"; 15import { 16 AnchoredSegment, 17 IcosahedralSymmetry, 18 Segment, 19 SegmentEndPoint, 20 ZomicStatement, 21 ZomicVirtualMachine 22} from "./chunk-CXLFZQHL.js"; 23import { 24 AbstractSymmetry, 25 AlgebraicField, 26 AlgebraicMatrix, 27 AlgebraicVector, 28 AlgebraicVectors, 29 Axis, 30 Construction, 31 Direction, 32 DomUtils, 33 NumberFormat, 34 OrbitSet, 35 Permutation, 36 Point, 37 RealVector, 38 Symmetry, 39 VefParser, 40 VefVectorExporter, 41 java, 42 javaemul 43} from "./chunk-5PFIPZES.js"; 44import { 45 REVISION 46} from "./chunk-YWNSTGG6.js"; 47import "./chunk-JSBRDJBE.js"; 48
49// src/worker/fields/common.js 50BigInt.prototype.toJSON = function() { 51 const float = Number(this); 52 return Number.isSafeInteger(float) ? float : this.toString(); 53}; 54function gcd(a, b) { 55 a = a < 0 ? -a : a; 56 b = b < 0 ? -b : b; 57 while (b !== 0n) [a, b] = [b, a % b]; 58 return a; 59} 60function simplify(values) { 61 const signs = []; 62 const signedValues = []; 63 let lastSign; 64 let divisor; 65 for (let i = 0; i < values.length; i++) { 66 const value = values[i]; 67 if ((value | 0n) !== value) 68 throw new TypeError(`integer overflow!... ${value}`); 69 lastSign = BigInt((value > 0n) - (value < 0n)); 70 signs.push(lastSign); 71 signedValues.push(lastSign * value); 72 divisor = value; 73 } 74 for (let i = 0; i < values.length - 1; i++) { 75 signs[i] = lastSign * signs[i]; 76 divisor = gcd(signedValues[i], divisor); 77 } 78 const result = []; 79 for (let i = 0; i < values.length; i++) { 80 let fraction = signedValues[i] / divisor; 81 result.push(i === values.length - 1 ? fraction : signs[i] * fraction); 82 } 83 return result; 84} 85function simplify3(v0, v1, v2) { 86 if ((v0 | 0n) !== v0 || (v1 | 0n) !== v1 || (v2 | 0n) !== v2) 87 throw new TypeError(`integer overflow!... ${v0} ${v1} ${v2}`); 88 let s0 = BigInt((v0 > 0n) - (v0 < 0n)), s1 = BigInt((v1 > 0n) - (v1 < 0n)), s2 = BigInt((v2 > 0n) - (v2 < 0n)); 89 v0 = s0 * v0; 90 v1 = s1 * v1; 91 v2 = s2 * v2; 92 s0 = s2 * s0; 93 s1 = s2 * s1; 94 const g = gcd(gcd(v0, v1), v2); 95 return [s0 * v0 / g, s1 * v1 / g, v2 / g]; 96} 97function simplify4(v0, v1, v2, v3) { 98 if ((v0 | 0n) !== v0 || (v1 | 0n) !== v1 || (v2 | 0n) !== v2 || (v3 | 0n) !== v3) 99 throw new TypeError(`integer overflow!... ${v0} ${v1} ${v2} ${v3}`); 100 let s0 = BigInt((v0 > 0n) - (v0 < 0n)), s1 = BigInt((v1 > 0n) - (v1 < 0n)), s2 = BigInt((v2 > 0n) - (v2 < 0n)), s3 = BigInt((v3 > 0n) - (v3 < 0n)); 101 v0 = s0 * v0; 102 v1 = s1 * v1; 103 v2 = s2 * v2; 104 v3 = s3 * v3; 105 s0 = s3 * s0; 106 s1 = s3 * s1; 107 s2 = s3 * s2; 108 const g = gcd(gcd(gcd(v0, v1), v2), v3); 109 return [s0 * v0 / g, s1 * v1 / g, s2 * v2 / g, v3 / g]; 110} 111function parseInt2(s) { 112 return BigInt(s); 113} 114function plus2(a, b) { 115 const [a0 = 0n, a1 = 0n, ad = 1n] = a, [b0 = 0n, b1 = 0n, bd = 1n] = b; 116 return simplify3(a0 * bd + b0 * ad, a1 * bd + b1 * ad, ad * bd); 117} 118function minus2(a, b) { 119 const [a0 = 0n, a1 = 0n, ad = 1n] = a, [b0 = 0n, b1 = 0n, bd = 1n] = b; 120 return simplify3(a0 * bd - b0 * ad, a1 * bd - b1 * ad, ad * bd); 121} 122function negate2(a) { 123 const [a0 = 0n, a1 = 0n, ad = 1n] = a; 124 return [0n - a0, 0n - a1, ad]; 125} 126function plus3(a, b) { 127 const [a0 = 0n, a1 = 0n, a2 = 0n, ad = 1n] = a, [b0 = 0n, b1 = 0n, b2 = 0n, bd = 1n] = b; 128 return simplify4(a0 * bd + b0 * ad, a1 * bd + b1 * ad, a2 * bd + b2 * ad, ad * bd); 129} 130function minus3(a, b) { 131 const [a0 = 0n, a1 = 0n, a2 = 0n, ad = 1n] = a, [b0 = 0n, b1 = 0n, b2 = 0n, bd = 1n] = b; 132 return simplify4(a0 * bd - b0 * ad, a1 * bd - b1 * ad, a2 * bd - b2 * ad, ad * bd); 133} 134function negate3(a) { 135 const [a0 = 0n, a1 = 0n, a2 = 0n, ad = 1n] = a; 136 return [0n - a0, 0n - a1, 0n - a2, ad]; 137} 138function createNumberFromPairs2(pairs) { 139 const [a0 = 0n, d0 = 1n, a1 = 0n, d1 = 1n] = pairs; 140 const b0 = BigInt(a0) * BigInt(d1); 141 const b1 = BigInt(a1) * BigInt(d0); 142 const d2 = BigInt(d0) * BigInt(d1); 143 return simplify3(b0, b1, d2); 144} 145function createNumberFromPairs3(pairs) { 146 const [a0 = 0n, d0 = 1n, a1 = 0n, d1 = 1n, a2 = 0n, d2 = 1n] = pairs; 147 const b0 = BigInt(a0) * BigInt(d1) * BigInt(d2); 148 const b1 = BigInt(a1) * BigInt(d0) * BigInt(d2); 149 const b2 = BigInt(a2) * BigInt(d0) * BigInt(d1); 150 const d = BigInt(d0) * BigInt(d1) * BigInt(d2); 151 return simplify4(b0, b1, b2, d); 152} 153function createNumberFromPairs(pairs) { 154 const order = pairs.length / 2; 155 let result = []; 156 for (let i = 0; i < order; i++) { 157 let term = pairs[2 * i]; 158 for (let j = 0; j < order; j++) { 159 if (i !== j) 160 term *= pairs[2 * j + 1]; 161 } 162 result.push(term); 163 } 164 let divisor = 1n; 165 for (let j = 0; j < order; j++) { 166 divisor *= pairs[2 * j + 1]; 167 } 168 result.push(divisor); 169 return simplify(result); 170} 171function createNumber2(trailingDivisor) { 172 const [a0 = 0n, a1 = 0n, d = 1n] = trailingDivisor;
173 return simplify3(BigInt(a0), BigInt(a1), BigInt(d)); 174} 175function createNumber3(trailingDivisor) { 176 const [a0 = 0n, a1 = 0n, a2 = 0n, d = 1n] = trailingDivisor; 177 return simplify4(BigInt(a0), BigInt(a1), BigInt(a2), BigInt(d)); 178} 179var Format = { DEFAULT: 0, EXPRESSION: 1, ZOMIC: 2, VEF: 3, MATHML: 4, MATH: 5 }; 180function bigRationalToString(num, denom) { 181 if (denom === 1n) 182 return num.toString(); 183 else 184 return num.toString() + "/" + denom.toString(); 185} 186function bigRationalToMathML(num, denom) { 187 if (denom === 1n) 188 return `<mn>${num.toString()}</mn>`; 189 else 190 return `<mfrac><mn>${num.toString()}</mn><mn>${denom.toString()}</mn></mfrac>`; 191} 192var appendTerm = (text, coefficient, denominator, irrational, expression) => { 193 if (coefficient === 0n) 194 return text; 195 let [value, divisor] = simplify([coefficient, denominator]); 196 let out = text; 197 if (out.length > 0) 198 out += " "; 199 if (value < 0n) { 200 value = 0n - value; 201 out += "-"; 202 } else if (text.length > 0) 203 out += "+"; 204 const isOne = value === 1n && divisor === 1n; 205 if (irrational === null) 206 return out + bigRationalToString(value, divisor); 207 if (!isOne) { 208 out += bigRationalToString(value, divisor); 209 if (expression) 210 out += "*"; 211 } 212 return out + irrational; 213}; 214var toString2 = (getIrrational5) => (trailingDivisor, format) => { 215 const [a0 = 0n, a1 = 0n, d = 1n] = trailingDivisor; 216 const [n0, d0] = simplify([BigInt(a0), BigInt(d)]); 217 const [n1, d1] = simplify([BigInt(a1), BigInt(d)]); 218 const irrat = getIrrational5(); 219 switch (format) { 220 case Format.ZOMIC: 221 return bigRationalToString(n0, d0) + " " + bigRationalToString(n1, d1); 222 case Format.VEF: 223 return "(" + bigRationalToString(n1, d1) + "," + bigRationalToString(n0, d0) + ")"; 224 case Format.MATHML: 225 if (a0 === 0n) { 226 if (a1 === 0n) 227 return "<mn>0</mn>"; 228 else 229 return `<mrow>${bigRationalToMathML(a1, d)}<mi>${irrat}</mi></mrow>`; 230 } else { 231 if (a1 === 0n) 232 return bigRationalToMathML(a0, d); 233 else if (a1 < 0n) 234 return `<mrow>${bigRationalToMathML(a0, d)}<mo>-</mo>${bigRationalToMathML(0n - a1, d)}<mi>${irrat}</mi></mrow>`; 235 else 236 return `<mrow>${bigRationalToMathML(a0, d)}<mo>+</mo>${bigRationalToMathML(a1, d)}<mi>${irrat}</mi></mrow>`; 237 } 238 case Format.MATH: 239 if (a0 === 0n) { 240 if (a1 === 0n) 241 return "0"; 242 else if (a1 === 1n && d === 1n) 243 return irrat; 244 else 245 return bigRationalToString(a1, d) + irrat; 246 } else { 247 if (a1 === 0n) 248 return bigRationalToString(a0, d); 249 else if (a1 === 1n && d === 1n) 250 return bigRationalToString(a0, d) + "+" + irrat; 251 else 252 return bigRationalToString(a0, d) + "+" + bigRationalToString(a1, d) + irrat; 253 } 254 default: { 255 const expression = format === Format.EXPRESSION; 256 let text = appendTerm("", BigInt(a0), BigInt(d), null, expression); 257 text = appendTerm(text, BigInt(a1), BigInt(d), irrat, expression); 258 return text.length === 0 ? "0" : text; 259 } 260 } 261}; 262var toString3 = (getIrrational5) => (trailingDivisor, format) => { 263 const [a0 = 0n, a1 = 0n, a2 = 0n, d = 1n] = trailingDivisor; 264 const [n0, d0] = simplify([BigInt(a0), BigInt(d)]); 265 const [n1, d1] = simplify([BigInt(a1), BigInt(d)]); 266 const [n2, d2] = simplify([BigInt(a2), BigInt(d)]); 267 switch (format) { 268 case Format.ZOMIC: 269 return bigRationalToString(n0, d0) + " " + bigRationalToString(n1, d1) + " " + bigRationalToString(n2, d2); 270 case Format.VEF: 271 return "(" + bigRationalToString(n2, d2) + "," + bigRationalToString(n1, d1) + "," + bigRationalToString(n0, d0) + ")"; 272 case Format.MATHML: 273 let result = ""; 274 if (a0 !== 0n) { 275 result += bigRationalToMathML(a0, d); 276 } 277 if (a1 !== 0n) { 278 if (a1 < 0n) 279 result += `<mo>-</mo>${bigRationalToMathML(0n - a1, d)}<mi>${getIrrational5(1)}</mi>`; 280 else { 281 if (result) 282 result += "<mo>+</mo>"; 283 result += `${bigRationalToMathML(a1, d)}<mi>${getIrrational5(1)}</mi>`; 284 } 285 } 286 if (a2 !== 0n) { 287 if (a2 < 0n) 288 result += `<mo>-</mo>${bigRationalToMathML(0n - a2, d)}<mi>${getIrrational5(2)}</mi>`; 289 else { 290 if (result) 291 result += "<mo>+</mo>"; 292 result += `${bigRationalToMathML(a2, d)}<mi>${getIrrational5(2)}</mi>`; 293 } 294 } 295 if (!result) 296 return "<mn>0</mn>"; 297 return "<mrow>" + result + "</mrow>"; 298 default: { 299 const expression = format === Format.EXPRESSION; 300 let text = appendTerm("", BigInt(a0), BigInt(d), null, expression); 301 text = appendTerm(text, BigInt(a1), BigInt(d), getIrrational5(1), expression); 302 text = appendTerm(text, BigInt(a2), BigInt(d), getIrrational5(2), expression); 303 return text.length === 0 ? "0" : text; 304 } 305 } 306}; 307var createField = ({ name, order, times: times5, embed: embed5, reciprocal: reciprocal5, getIrrational: getIrrational5 }) => { 308 let scalarTerm = 1; 309 let zero = [0n, 0n, 1n]; 310 let one = [1n, 0n, 1n]; 311 let negate = negate2; 312 let plus = plus2; 313 let minus = minus2; 314 let createNumberFromPairs4 = createNumberFromPairs2; 315 let createNumber = createNumber2; 316 let toString = toString2(getIrrational5); 317 if (order === 3) { 318 scalarTerm = 2; 319 zero = [0n, 0n, 0n, 1n]; 320 one = [1n, 0n, 0n, 1n]; 321 negate = negate3; 322 plus = plus3; 323 minus = minus3;
324 createNumberFromPairs4 = createNumberFromPairs3; 325 createNumber = createNumber3; 326 toString = toString3(getIrrational5); 327 } 328 const scalarmul = (s, v) => [...v.values()].map((vi = [0n]) => times5(s, vi)); 329 const vectoradd = (u, v) => [...u.values()].map((ui = [0n], i) => plus(ui, v[i] || [0n])); 330 const quatmul = (u, v) => { 331 const x = times5, a = plus, s = minus, [u0 = [0n], u1 = [0n], u2 = [0n], u3 = [0n]] = u, [v0 = [0n], v1 = [0n], v2 = [0n], v3 = [0n]] = v; 332 return [ 333 s(x(u0, v0), a(a(x(u1, v1), x(u2, v2)), x(u3, v3))), 334 a(a(x(u0, v1), x(u1, v0)), s(x(u2, v3), x(u3, v2))), 335 a(a(x(u0, v2), x(u2, v0)), s(x(u3, v1), x(u1, v3))), 336 a(a(x(u0, v3), x(u3, v0)), s(x(u1, v2), x(u2, v1))) 337 ]; 338 }; 339 function quatconj([u0 = [0n], u1 = [0n], u2 = [0n], u3 = [0n]]) { 340 return [u0, negate(u1), negate(u2), negate(u3)]; 341 } 342 function quatTransform(Q, v) { 343 return quatmul(Q, quatmul([[0n]].concat(v), quatconj(Q))).slice(1); 344 } 345 return { 346 name, 347 order, 348 scalarTerm, 349 zero, 350 one, 351 zeroCopy: () => zero.slice(), 352 plus, 353 minus, 354 times: times5, 355 embed: embed5, 356 reciprocal: reciprocal5, 357 negate, 358 getIrrational: getIrrational5, 359 scalarmul, 360 vectoradd, 361 quatTransform, 362 quatmul, 363 embedv: (v) => v.map(embed5), 364 createNumberFromPairs: createNumberFromPairs4, 365 createNumber, 366 toString, 367 parseInt: parseInt2 368 }; 369}; 370
371// src/worker/fields/golden.js 372var PHI = 0.5 * (Math.sqrt(5) + 1); 373function reciprocal(a) { 374 const [a0 = 0n, a1 = 0n, ad = 1n] = a; 375 return simplify3((a0 + a1) * ad, 0n - a1 * ad, a0 * a0 + a0 * a1 - a1 * a1); 376} 377function times(a, b) { 378 const [a0 = 0n, a1 = 0n, ad = 1n] = a, [b0 = 0n, b1 = 0n, bd = 1n] = b; 379 return simplify3(a0 * b0 + a1 * b1, a0 * b1 + a1 * b0 + a1 * b1, ad * bd); 380} 381function embed(a) { 382 const [a0 = 0n, a1 = 0n, ad = 1n] = a; 383 return (Number(a0) + PHI * Number(a1)) / Number(ad); 384} 385var replacement = (item) => item === "1" ? ["\u03C6"] : ["1", "\u03C6"]; 386var symbolSequence = (depth) => { 387 function recurrence(arr) { 388 return arr.reduce((acc, item) => { 389 return [...acc, ...replacement(item)]; 390 }, []); 391 } 392 var seq = ["1"]; 393 for (var i = 0; i < depth; i++) { 394 seq = recurrence(seq); 395 } 396 return seq; 397}; 398var goldenSequence = (depth) => { 399 return symbolSequence(depth).map((symbol) => symbol === "1" ? [1n, 0n, 1n] : [0n, 1n, 1n]); 400}; 401var goldenSeries = ({ plus }) => (depth) => { 402 return goldenSequence(depth).reduce(function(r, a) { 403 if (r.length > 0) 404 a = plus(a, r[r.length - 1]); 405 r.push(a); 406 return r; 407 }, []); 408}; 409var createQuaternions = ({ scalarmul, quatmul }) => { 410 function grsign(a) { 411 const [a0 = 0n, a1 = 0n, ad = 1n] = a, float = Number(a0) + PHI * Number(a1); 412 return BigInt((ad > 0n) - (ad < 0n)) * BigInt((float > 0) - (float < 0)); 413 } 414 function quatnormalize(q) { 415 return scalarmul([q.map(grsign).reduce((a, b2) => a || b2) || 1n], q); 416 } 417 const one = [[1n], [0n], [0n], [0n]], h = [1n, 0n, 2n], blue = [one, [[0n], [1n], [0n], [0n]], [[0n], [0n], [0n], [1n]], [[0n], [0n], [1n], [0n]]], yellow = [one, [h, h, h, h], [[-1n, 0n, 2n], h, h, h]], red = [one, [[0n, 1n, 2n], h, [-1n, 1n, 2n]]]; 418 for (let i = 2; i < 5; i++) 419 red[i] = quatmul(red[i - 1], red[1]); 420 const vZomeIcosahedralQuaternions = []; 421 let b, r, y; 422 for (b of blue) for (r of red) for (y of yellow) 423 vZomeIcosahedralQuaternions.push(quatnormalize(quatmul(b, quatmul(y, r)))); 424 return vZomeIcosahedralQuaternions; 425}; 426var getIrrational = () => "\u03C6"; 427var baseField = createField({ name: "golden", order: 2, times, embed, reciprocal, getIrrational }); 428var field = { 429 ...baseField, 430 goldenRatio: [0n, 1n, 1n], 431 quaternions: createQuaternions(baseField), 432 goldenSeries: goldenSeries(baseField) 433}; 434var golden_default = field; 435
436// src/worker/fields/root2.js 437var SQRT2 = Math.sqrt(2); 438function reciprocal2(x) { 439 const [a = 0n, b = 0n, c = 1n] = x; 440 return simplify3(a * c, 0n - b * c, a * a - 2n * b * b); 441} 442function times2(a, b) { 443 const [a0 = 0n, a1 = 0n, ad = 1n] = a, [b0 = 0n, b1 = 0n, bd = 1n] = b; 444 return simplify3(a0 * b0 + 2n * a1 * b1, a0 * b1 + a1 * b0, ad * bd); 445} 446function embed2(a) { 447 const [a0 = 0n, a1 = 0n, ad = 1n] = a; 448 return (Number(a0) + SQRT2 * Number(a1)) / Number(ad); 449} 450var getIrrational2 = () => "\u221A2"; 451var field2 = createField({ name: "rootTwo", order: 2, times: times2, embed: embed2, reciprocal: reciprocal2, getIrrational: getIrrational2 }); 452var root2_default = field2; 453
454// src/worker/fields/root3.js 455var SQRT3 = Math.sqrt(3); 456function reciprocal3(x) { 457 const [a = 0n, b = 0n, c = 1n] = x; 458 return simplify3(a * c, 0n - b * c, a * a - 3n * b * b); 459} 460function times3(a, b) { 461 const [a0 = 0n, a1 = 0n, ad = 1n] = a, [b0 = 0n, b1 = 0n, bd = 1n] = b; 462 return simplify3(a0 * b0 + 3n * a1 * b1, a0 * b1 + a1 * b0, ad * bd); 463} 464function embed3(a) { 465 const [a0 = 0n, a1 = 0n, ad = 1n] = a; 466 return (Number(a0) + SQRT3 * Number(a1)) / Number(ad); 467} 468var getIrrational3 = () => "\u221A3"; 469var field3 = createField({ name: "rootThree", order: 2, times: times3, embed: embed3, reciprocal: reciprocal3, getIrrational: getIrrational3 }); 470var root3_default = field3; 471
472// src/worker/fields/heptagon.js 473var RHO = 1.8019377358; 474var SIGMA = 2.2469796037; 475function reciprocal4(x) { 476 const [A = 0n, B = 0n, C = 0n, D = 1n] = x; 477 const A1 = A * A + A * B + 2n * A * C - B * B - B * C; 478 const B1 = C * C - A * B - B * B; 479 const C1 = B * B + B * C - A * C - C * C; 480 const determinant = A * A1 + B * B1 + C * C1; 481 return simplify4(D * A1, D * B1, D * C1, determinant); 482} 483function times4(first, second) { 484 const [a = 0n, b = 0n, c = 0n, d1 = 1n] = first, [d = 0n, e = 0n, f = 0n, d2 = 1n] = second; 485 return simplify4(a * d + b * e + c * f, a * e + b * d + b * f + c * e + c * f, a * f + b * e + b * f + c * d + c * e + c * f, d1 * d2); 486} 487function embed4(a) { 488 const [a0 = 0n, a1 = 0n, a2 = 0n, ad = 1n] = a; 489 return (Number(a0) + RHO * Number(a1) + SIGMA * Number(a2)) / Number(ad); 490} 491var getIrrational4 = (i) => i === 1 ? "\u{1D70C}" : "\u{1D70E}"; 492var field4 = createField({ name: "heptagon", order: 3, times: times4, embed: embed4, reciprocal: reciprocal4, getIrrational: getIrrational4 }); 493var heptagon_default = field4; 494
495// src/worker/legacy/jsweet2js.js 496var JavaAlgebraicNumberFactory = class { 497 zero() { 498 return new JavaBigRational(0n, 1n); 499 } 500 one() { 501 return new JavaBigRational(1n, 1n); 502 } 503 createBigRational(num, denom) { 504 return new JavaBigRational(BigInt(num), BigInt(denom)); 505 } 506 createRational(legacyField, num, denom) { 507 const order = legacyField.getOrder(); 508 const factors = [new JavaBigRational(num, denom)]; 509 for (let index = 1; index < order; index++) { 510 factors.push(ZERO); 511 } 512 return new JavaAlgebraicNumber(legacyField, factors); 513 } 514 parseBigRational(str) { 515 const parts = str.split("/"); 516 if (parts.length === 1) { 517 return new JavaBigRational(BigInt(parts[0]), 1n); 518 } else if (parts.length === 2) { 519 return new JavaBigRational(BigInt(parts[0]), BigInt(parts[1])); 520 } else { 521 throw new Error("Bad rational string: " + str); 522 } 523 } 524 createAlgebraicNumber(legacyField, numerators, divisor) { 525 const bigRats = []; 526 for (let i = 0; i < numerators.length; i++) { 527 bigRats.push(new JavaBigRational(numerators[i], divisor)); 528 } 529 return new JavaAlgebraicNumber(legacyField, bigRats); 530 } 531 createAlgebraicNumberFromTD(legacyField, trailingDivisor) { 532 const bigRats = []; 533 const divisor = trailingDivisor[trailingDivisor.length - 1]; 534 for (let i = 0; i < trailingDivisor.length - 1; i++) { 535 bigRats.push(new JavaBigRational(trailingDivisor[i], divisor)); 536 } 537 return new JavaAlgebraicNumber(legacyField, bigRats); 538 } 539 createAlgebraicNumberFromPairs(legacyField, pairs) { 540 const order = pairs.length / 2; 541 const bigRats = []; 542 for (let i = 0; i < order; i++) { 543 bigRats.push(new JavaBigRational(pairs[2 * i], pairs[2 * i + 1])); 544 } 545 return new JavaAlgebraicNumber(legacyField, bigRats); 546 } 547 createAlgebraicNumberFromBRs(legacyField, bigRationals) { 548 return new JavaAlgebraicNumber(legacyField, bigRationals); 549 } 550 isPrime(prime) { 551 const n = 2 * prime; 552 nextPrime: 553 for (let i = 2; i <= n; i++) { 554 if (i > prime) 555 return false; 556 for (let j = 2; j < i; j++) { 557 if (i % j === 0) continue nextPrime; 558 } 559 if (i === prime) 560 return true; 561 } 562 } 563 nextPrime(prime) { 564 const n = 2 * prime; 565 let sawPrevious = false; 566 nextPrime: 567 for (let i = 2; i <= n; i++) { 568 for (let j = 2; j < i; j++) { 569 if (i % j === 0) continue nextPrime; 570 } 571 if (sawPrevious) 572 return i; 573 if (i === prime) 574 sawPrevious = true; 575 } 576 } 577}; 578JavaAlgebraicNumberFactory.__interfaces = ["com.vzome.core.algebra.AlgebraicNumberFactory"]; 579var algebraicNumberFactory = new JavaAlgebraicNumberFactory(); 580var JavaAlgebraicNumber = class _JavaAlgebraicNumber {
581 constructor(legacyField, bigRationals) { 582 this.legacyField = legacyField; 583 this.bigRationals = bigRationals; 584 this["times$com_vzome_core_algebra_AlgebraicNumber"] = this.times; 585 this["plus$com_vzome_core_algebra_AlgebraicNumber"] = this.plus; 586 this["minus$com_vzome_core_algebra_AlgebraicNumber"] = this.minus; 587 } 588 equals(that) { 589 return this.bigRationals.reduce((a, c, i) => a && c.equals(that.bigRationals[i]), true); 590 } 591 getField() { 592 return this.legacyField; 593 } 594 evaluate() { 595 return this.legacyField.evaluateNumber(this.bigRationals); 596 } 597 compareTo(that) { 598 const d1 = this.evaluate(); 599 const d2 = that.evaluate(); 600 return d1 === d2 ? 0 : d1 < d2 ? -1 : 1; 601 } 602 lessThan(that) { 603 return this.compareTo(that) < 0; 604 } 605 greaterThan(that) { 606 return this.compareTo(that) > 0; 607 } 608 lessThanOrEqualTo(that) { 609 return this.compareTo(that) <= 0; 610 } 611 greaterThanOrEqualTo(that) { 612 return this.compareTo(that) >= 0; 613 } 614 signum() { 615 const d1 = this.evaluate(); 616 return d1 === 0 ? 0 : d1 < 0 ? -1 : 1; 617 } 618 isZero() { 619 return this.bigRationals.reduce((a, c) => a && c.isZero(), true); 620 } 621 isOne() { 622 return this.bigRationals[0].isOne() && this.bigRationals.slice(1).reduce((a, c) => a && c.isZero(), true); 623 } 624 toTrailingDivisor() { 625 const pairs = this.bigRationals.reduce((a, current) => a.concat([current.getNumerator(), current.getDenominator()]), []); 626 return createNumberFromPairs(pairs).map((br) => br.toString()); 627 } 628 negate() { 629 return new _JavaAlgebraicNumber(this.legacyField, this.bigRationals.map((br) => br.negate())); 630 } 631 reciprocal() { 632 return new _JavaAlgebraicNumber(this.legacyField, this.legacyField.reciprocal(this.bigRationals)); 633 } 634 minus(that) { 635 return this.plus(that.negate()); 636 } 637 plus(that) { 638 if (this.isZero()) { 639 return that; 640 } 641 if (that.isZero()) { 642 return this; 643 } 644 const sums = this.bigRationals.map((v, i) => v.plus(that.bigRationals[i])); 645 return new _JavaAlgebraicNumber(this.legacyField, sums); 646 } 647 times(that) { 648 if (this.isZero() || that.isZero()) 649 return this.legacyField.zero(); 650 if (this.isOne()) 651 return that; 652 if (that.isOne()) 653 return this; 654 const pairs = this.legacyField.multiply(this.bigRationals, that.bigRationals); 655 return new _JavaAlgebraicNumber(this.legacyField, pairs); 656 } 657 dividedBy(that) { 658 return this.times(that.reciprocal()); 659 } 660 getNumberExpression(sbuf, format = 0) { 661 return this.legacyField.getNumberExpression(sbuf, this.bigRationals, format); 662 } 663 toString(format) { 664 const buf = new java.lang.StringBuffer(); 665 this.getNumberExpression(buf, format); 666 return buf.toString(); 667 } 668 getMathML() { 669 return this.legacyField.getMathML(this.bigRationals); 670 } 671}; 672JavaAlgebraicNumber.__interfaces = ["com.vzome.core.algebra.AlgebraicNumber"]; 673var JavaBigRational = class _JavaBigRational { 674 constructor(num, denom) { 675 [num, denom] = simplify([BigInt(num), BigInt(denom)]); 676 this.num = num; 677 this.denom = denom; 678 } 679 equals(that) { 680 return this.num === that.num && this.denom === that.denom; 681 } 682 toString() { 683 if (this.denom === 1n) 684 return this.num.toString(); 685 else 686 return this.num.toString() + "/" + this.denom.toString(); 687 } 688 getMathML() { 689 if (this.denom === 1n) 690 return `<mn>${this.num.toString()}</mn>`; 691 else 692 return `<mfrac><mn>${this.num.toString()}</mn><mn>${this.denom.toString()}</mn></mfrac>`; 693 } 694 evaluate() { 695 return Number(this.num) / Number(this.denom); 696 } 697 isZero() { 698 return this.num === 0n; 699 } 700 isOne() { 701 return this.num === 1n && this.denom === 1n; 702 } 703 isNegative() { 704 return this.num < 0n; 705 } 706 negate() { 707 return new _JavaBigRational(-this.num, this.denom); 708 } 709 reciprocal() { 710 if (this.isOne()) 711 return this; 712 return new _JavaBigRational(this.denom, this.num); 713 } 714 getNumerator() { 715 return this.num; 716 } 717 getDenominator() { 718 return this.denom; 719 } 720 plus(that) { 721 if (this.isZero()) { 722 return that; 723 } 724 if (that.isZero()) { 725 return this; 726 } 727 if (this.denom === that.denom) { 728 return new _JavaBigRational(this.num + that.num, this.denom); 729 } 730 const d = this.denom * that.denom; 731 return new _JavaBigRational(this.num * that.denom + that.num * this.denom, d); 732 } 733 times(that) { 734 if (this.isOne()) { 735 return that; 736 } 737 if (that.isOne()) { 738 return this; 739 } 740 if (this.isZero() || that.isZero()) { 741 return ZERO; 742 } 743 return new _JavaBigRational(this.num * that.num, this.denom * that.denom); 744 } 745 timesInt(i) { 746 if (i === 1) 747 return this; 748 if (i === 0) 749 return ZERO; 750 return new _JavaBigRational(this.num * BigInt(i), this.denom); 751 } 752}; 753var ZERO = new JavaBigRational(0n, 1n); 754var JsProperties = class { 755 constructor(config) { 756 this.config = config; 757 } 758 getConfig() { 759 return { ...this.config }; 760 } 761 getOrDefault(key, defaultValue) { 762 if (this.config.hasOwnProperty(key)) 763 return this.get(key); 764 else 765 return defaultValue; 766 } 767 getProperty(key) { 768 return this.config[key]; 769 } 770 get(key) { 771 return this.config[key]; 772 } 773 put(key, value) { 774 this.config[key] = value; 775 } 776}; 777
778// src/worker/legacy/dom.js 779var JavaDomNodeList = class { 780 constructor(nodeList, owner = null) { 781 this.nativeNodeList = nodeList; 782 this.document = owner || new JavaDomDocument(); 783 } 784 getLength() { 785 return this.nativeNodeList.length; 786 } 787 item(i) { 788 const node = this.nativeNodeList[i]; 789 if (node.tagName) 790 return new JavaDomElement(node, this.document); 791 else 792 return node; 793 } 794}; 795JavaDomNodeList.__interfaces = ["org.w3c.dom.NodeList"]; 796function sortObj(obj) { 797 return Object.keys(obj).sort().reduce(function(result, key) { 798 result[key] = obj[key]; 799 return result; 800 }, {}); 801} 802var JavaDomAttributes = class { 803 toJSON(key) { 804 return sortObj(this); 805 } 806}; 807var JavaDomDocument = class { 808 constructor() { 809 this.child = null; 810 } 811 createElement(tagName) { 812 return new JavaDomElement({ tagName, attributes: new JavaDomAttributes(), children: [] }, this); 813 } 814 createTextNode(text) { 815 return text; 816 } 817}; 818JavaDomDocument.__interfaces = ["org.w3c.dom.Document"]; 819var JavaDomElement = class _JavaDomElement { 820 constructor(element, owner = null) { 821 this.nativeElement = element; 822 this.document = owner || new JavaDomDocument(); 823 } 824 appendChild(child) { 825 if (typeof child === "string") 826 this.nativeElement.children.push(child); 827 else 828 this.nativeElement.children.push(child.nativeElement); 829 } 830 setTextContent(value) { 831 this.nativeElement.children.push(value); 832 } 833 setAttribute(name, value) { 834 this.nativeElement.attributes[name] = value; 835 } 836 getOwnerDocument() { 837 return this.document; 838 } 839 getAttribute(name) { 840 return this.nativeElement.attributes && this.nativeElement.attributes[name]; 841 } 842 getLocalName() { 843 return this.nativeElement.tagName; 844 } 845 getTextContent() { 846 const kids = this.nativeElement.children.filter((kid) => kid.tagName !== "effects"); 847 if (kids.length === 1 && typeof kids[0] === "string") 848 return kids[0]; 849 return null; 850 } 851 getChildNodes() { 852 const kids = this.nativeElement.children.filter((kid) => kid.tagName !== "effects"); 853 if (kids.length === 1 && typeof kids[0] === "string") 854 return null; 855 return new JavaDomNodeList(kids, this.document); 856 } 857 getChildElement(name) { 858 const nativeChild = this.nativeElement.children.filter((n) => n.tagName === name)[0]; 859 return nativeChild && new _JavaDomElement(nativeChild, this.document); 860 } 861 getElementsByTagName(name) { 862 const results = this.nativeElement.children.filter((n) => n.tagName === name); 863 return { 864 getLength: () => results.length, 865 item: (i) => i < results.length ? new _JavaDomElement(results[i], this.document) : null 866 }; 867 } 868 // This is not DOM, just my quick-and-dirty serializer 869 toIndentedString(indentation) { 870 let preserveSpace = false; 871 let result = indentation + "<" + this.getLocalName(); 872 for (const [name, value] of Object.entries(this.nativeElement.attributes)) { 873 result += " " + name + '="' + value + '"'; 874 if (name === "xml:space") 875 preserveSpace = value === "preserve"; 876 } 877 if (this.nativeElement.children.length === 0) 878 return result + "/>\n"; 879 else 880 result += ">\n"; 881 const text = this.getTextContent(); 882 if (typeof text === "string") { 883 if (preserveSpace) 884 result += text; 885 else 886 result += indentation + " " + text + "\n"; 887 } else { 888 const kids = this.getChildNodes(); 889 for (let index = 0; index < kids.getLength(); index++) { 890 const child = kids.item(index); 891 result += child.toIndentedString(indentation + " "); 892 } 893 } 894 result += indentation + "</" + this.getLocalName() + ">\n"; 895 return result; 896 } 897}; 898JavaDomElement.__interfaces = ["org.w3c.dom.Element"]; 899
900// src/worker/legacy/logging.js 901var configureLogging = (loggingPkg) => { 902 const { Level, Logger } = loggingPkg; 903 const loggers = { 904 "": Level.SEVERE 905 // "com.vzome.core.editor" : Level.FINEST, 906 // "com.vzome.core.editor.selection" : Level.FINEST, 907 // "com.vzome.core.editor.ApplyTool" : Level.FINEST, 908 }; 909 Object.entries(loggers).forEach(([key, value]) => { 910 const logger = Logger.getLogger(key); 911 logger.setLevel(value); 912 console.log(`LOGGING ${key} at ${value}`); 913 }); 914}; 915 916// src/worker/legacy/resources/com/vzome/core/parts/bigzome/blue.vef 917var blue_default = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A98%0A(0,0) (-16290/19,26496/19) (-35484/19,57412/19) (39670/19,-64190/19)%0A(0,0) (-27,51) (-2936/19,4748/19) (-5310/19,8590/19)%0A(0,0) (-16290/19,26496/19) (-23052/19,37296/19) (-5310/19,8590/19)%0A(0,0) (-16290/19,26496/19) (0,0) (31986/19,-51758/19)%0A(0,0) (110/19,-54/19) (-2718/19,4404/19) (-625/19,1015/19)%0A(0,0) (31,-49) (0,0) (-562/19,906/19)%0A(0,0) (31,-49) (-2936/19,4748/19) (-5310/19,8590/19)%0A(0,0) (1,-1) (-2936/19,4748/19) (-5310/19,8590/19)%0A(0,0) (1,-1) (0,0) (-562/19,906/19)%0A(0,0) (16366/19,-26458/19) (-35484/19,57412/19) (-39670/19,64190/19)%0A(0,0) (31,-49) (-2936/19,4748/19) (5310/19,-8590/19)%0A(0,0) (16366/19,-26458/19) (-23052/19,37296/19) (5310/19,-8590/19)%0A(0,0) (110/19,-54/19) (268,-434) (281/19,-453/19)%0A(0,0) (110/19,-54/19) (2718/19,-4404/19) (-625/19,1015/19)%0A(0,0) (-34/19,92/19) (2718/19,-4404/19) (-625/19,1015/19)%0A(0,0) (-34/19,92/19) (268,-434) (281/19,-453/19)%0A(0,0) (110/19,-54/19) (268,-434) (-281/19,453/19)%0A(0,0) (31,-49) (0,0) (562/19,-906/19)%0A(0,0) (1,-1) (0,0) (562/19,-906/19)%0A(0,0) (1,-1) (-2936/19,4748/19) (5310/19,-8590/19)%0A(0,0) (-34/19,92/19) (4186/19,-6778/19) (4685/19,-7575/19)%0A(0,0) (110/19,-54/19) (0,0) (-3779/19,6107/19)%0A(0,0) (-16290/19,26496/19) (27800/19,-44980/19) (52102/19,-84306/19)%0A(0,0) (31,-49) (2936/19,-4748/19) (5310/19,-8590/19)%0A(0,0) (1,-1) (2936/19,-4748/19) (5310/19,-8590/19)%0A(0,0) (110/19,-54/19) (-4186/19,6778/19) (4685/19,-7575/19)%0A(0,0) (16366/19,-26458/19) (2272,-3676) (2374/19,-3842/19)%0A(0,0) (16366/19,-26458/19) (2272,-3676) (-2374/19,3842/19)%0A(0,0) (-34/19,92/19) (-268,434) (281/19,-453/19)%0A(0,0) (-34/19,92/19) (-268,434) (-281/19,453/19)%0A(0,0) (-16290/19,26496/19) (-2272,3676) (2374/19,-3842/19)%0A(0,0) (110/19,-54/19) (2718/19,-4404/19) (625/19,-1015/19)%0A(0,0) (16366/19,-26458/19) (23052/19,-37296/19) (-5310/19,8590/19)%0A(0,0) (31,-49) (2936/19,-4748/19) (-5310/19,8590/19)%0A(0,0) (-16290/19,26496/19) (27800/19,-44980/19) (-52102/19,84306/19)%0A(0,0) (-16290/19,26496/19) (35484/19,-57412/19) (-39670/19,64190/19)%0A(0,0) (110/19,-54/19) (-3280/19,5310/19) (6153/19,-9949/19)%0A(0,0) (-16290/19,26496/19) (-23052/19,37296/19) (5310/19,-8590/19)%0A(0,0) (16366/19,-26458/19) (35484/19,-57412/19) (39670/19,-64190/19)%0A(0,0) (110/19,-54/19) (3280/19,-5310/19) (6153/19,-9949/19)%0A(0,0) (110/19,-54/19) (0,0) (3779/19,-6107/19)%0A(0,0) (-34/19,92/19) (0,0) (3779/19,-6107/19)%0A(0,0) (-34/19,92/19) (3280/19,-5310/19) (6153/19,-9949/19)%0A(0,0) (16366/19,-26458/19) (-27800/19,44980/19) (52102/19,-84306/19)%0A(0,0) (16366/19,-26458/19) (0,0) (31986/19,-51758/19)%0A(0,0) (16366/19,-26458/19) (35484/19,-57412/19) (-39670/19,64190/19)%0A(0,0) (16366/19,-26458/19) (27800/19,-44980/19) (-52102/19,84306/19)%0A(0,0) (-16290/19,26496/19) (-27800/19,44980/19) (52102/19,-84306/19)%0A(0,0) (110/19,-54/19) (4186/19,-6778/19) (-4685/19,7575/19)%0A(0,0) (110/19,-54/19) (3280/19,-5310/19) (-6153/19,9949/19)%0A(0,0) (-16290/19,26496/19) (2272,-3676) (-2374/19,3842/19)%0A(0,0) (-16290/19,26496/19) (2272,-3676) (2374/19,-3842/19)%0A(0,0) (110/19,-54/19) (-268,434) (-281/19,453/19)%0A(0,0) (110/19,-54/19) (-268,434) (281/19,-453/19)%0A(0,0) (-27,51) (0,0) (-562/19,906/19)%0A(0,0) (3,3) (0,0) (-562/19,906/19)%0A(0,0) (3,3) (-2936/19,4748/19) (-5310/19,8590/19)%0A(0,0) (-16290/19,26496/19) (-27800/19,44980/19) (-52102/19,84306/19)%0A(0,0) (3,3) (0,0) (562/19,-906/19)%0A(0,0) (-34/19,92/19) (268,-434) (-281/19,453/19)%0A(0,0) (-34/19,92/19) (2718/19,-4404/19) (625/19,-1015/19)%0A(0,0) (-16290/19,26496/19) (-2272,3676) (-2374/19,3842/19)%0A(0,0) (-27,51) (2936/19,-4748/19) (5310/19,-8590/19)%0A(0,0) (-27,51) (2936/19,-4748/19) (-5310/19,8590/19)%0A(0,0) (110/19,-54/19) (-3280/19,5310/19) (-6153/19,9949/19)%0A(0,0) (110/19,-54/19) (4186/19,-6778/19) (4685/19,-7575/19)%0A(0,0) (-16290/19,26496/19) (-35484/19,57412/19) (-39670/19,64190/19)%0A(0,0) (16366/19,-26458/19) (27800/19,-44980/19) (52102/19,-84306/19)%0A(0,0) (16366/19,-26458/19) (0,0) (-31986/19,51758/19)%0A(0,0) (16366/19,-26458/19) (-27800/19,44980/19) (-52102/19,84306/19)%0A(0,0) (16366/19,-26458/19) (23052/19,-37296/19) (5310/19,-8590/19)%0A(0,0) (16366/19,-26458/19) (-2272,3676) (-2374/19,3842/19)%0A(0,0) (-34/19,92/19) (-3280/19,5310/19) (-6153/19,9949/19)%0A(0,0) (-34/19,92/19) (0,0) (-3779/19,6107/19)%0A(0,0) (-27,51) (-2936/19,4748/19) (5310/19,-8590/19)%0A(0,0) (3,3) (-2936/19,4748/19) (5310/19,-8590/19)%0A(0,0) (16366/19,-26458/19) (-35484/19,57412/19) (39670/19,-64190/19)%0A(0,0) (-16290/19,26496/19) (35484/19,-57412/19) (39670/19,-64190/19)%0A(0,0) (110/19,-54/19) (-4186/19,6778/19) (-4685/19,7575/19)%0A(0,0) (110/19,-54/19) (-2718/19,4404/19) (625/19,-1015/19)%0A(0,0) (-16290/19,26496/19) (23052/19,-37296/19) (-5310/19,8590/19)%0A(0,0) (-27,51) (0,0) (562/19,-906/19)%0A(0,0) (3,3) (2936/19,-4748/19) (5310/19,-8590/19)%0A(0,0) (4,2) (0,0) (0,0)%0A(0,0) (-34/19,92/19) (-4186/19,6778/19) (4685/19,-7575/19)%0A(0,0) (-34/19,92/19) (-3280/19,5310/19) (6153/19,-9949/19)%0A(0,0) (-16290/19,26496/19) (23052/19,-37296/19) (5310/19,-8590/19)%0A(0,0) (-16290/19,26496/19) (0,0) (-31986/19,51758/19)%0A(0,0) (-34/19,92/19) (4186/19,-6778/19) (-4685/19,7575/19)%0A(0,0) (16366/19,-26458/19) (-23052/19,37296/19) (-5310/19,8590/19)%0A(0,0) (16366/19,-26458/19) (-2272,3676) (2374/19,-3842/19)%0A(0,0) (16366/19,-26458/19) (0,0) (0,0)%0A(0,0) (-34/19,92/19) (-2718/19,4404/19) (625/19,-1015/19)%0A(0,0) (-34/19,92/19) (-4186/19,6778/19) (-4685/19,7575/19)%0A(0,0) (-34/19,92/19) (3280/19,-5310/19) (-6153/19,9949/19)%0A(0,0) (3,3) (2936/19,-4748/19) (-5310/19,8590/19)%0A(0,0) (1,-1) (2936/19,-4748/19) (-5310/19,8590/19)%0A(0,0) (-34/19,92/19) (-2718/19,4404/19) (-625/19,1015/19)%0A%0A%0A%0A0%0A%0A%0A%0A102%0A3 0 1 2%0A4 5 6 7 8%0A3 9 10 11%0A4 12 13 14 15%0A4 10 17 18 19%0A4 9 11 14 20%0A4 17 23 24 18%0A4 26 27 28 29%0A4 2 30 16 31%0A3 32 33 26%0A4 34 35 25 36%0A3 38 33 32%0A4 39 40 41 42%0A3 43 5 44%0A4 45 23 17 46%0A4 47 0 48 49%0A4 50 51 52 53%0A4 1 54 55 56%0A4 59 60 31 16%0A4 30 61 12 16%0A4 47 54 1 0%0A4 50 62 63 51%0A4 57 39 65 66%0A4 67 5 33 38%0A4 68 69 42 41%0A3 27 23 70%0A4 11 71 15 14%0A4 72 73 44 67%0A3 70 23 45%0A4 74 1 56 75%0A4 76 6 5 43%0A3 67 44 5%0A3 22 54 3%0A4 77 78 79 80%0A4 62 81 58 82%0A4 81 74 75 58%0A4 34 81 62 35%0A4 36 25 84 85%0A4 30 1 74 61%0A3 47 3 54%0A4 6 10 19 7%0A4 36 40 87 34%0A4 76 88 60 89%0A4 89 60 59 90%0A3 2 1 30%0A4 37 13 12 61%0A4 20 14 13 65%0A3 57 81 87%0A4 66 65 13 37%0A3 89 6 76%0A4 38 32 92 93%0A4 43 94 88 76%0A3 86 62 50%0A4 73 94 43 44%0A4 23 33 96 24%0A4 66 74 81 57%0A3 69 68 17%0A4 68 41 85 46%0A4 26 33 23 27%0A4 35 86 4 25%0A3 37 74 66%0A4 16 12 15 59%0A3 35 62 86%0A4 70 97 28 27%0A4 69 17 10 9%0A4 49 48 88 94%0A4 40 39 57 87%0A4 71 90 59 15%0A4 77 63 54 22%0A3 80 63 77%0A4 53 52 29 28%0A4 33 5 8 96%0A4 46 85 84 45%0A4 63 62 82 95%0A4 97 84 25 4%0A4 72 93 78 64%0A4 3 21 64 22%0A3 90 6 89%0A3 34 87 81%0A4 45 84 97 70%0A4 93 92 79 78%0A4 67 38 93 72%0A4 80 79 52 51%0A4 40 36 85 41%0A4 42 20 65 39%0A4 21 49 94 73%0A4 22 64 78 77%0A3 61 74 37%0A4 86 50 53 4%0A4 69 9 20 42%0A4 32 26 29 92%0A3 51 63 80%0A4 28 97 4 53%0A3 11 10 71%0A3 46 17 68%0A4 71 10 6 90%0A4 60 88 48 31%0A4 3 47 49 21%0A4 64 21 73 72%0A4 0 2 31 48%0A4 54 63 95 55%0A4 52 79 92 29%0A%0A%0A%0A50%0A 3 4 16 1 21 22 25 37 57 58 51 2 64 0 50 35 49 83 55 39 13 53 31 52 81 86 77 91 63 30 95 62 48 12 34 66 36 79 65 56 40 47 80 61 87 54 75 78 74 82%0A%0Atip 83%0A"; 918 919// src/worker/legacy/resources/com/vzome/core/parts/bigzome/connector.vef 920var connector_default = "data:text/plain;
920charset=utf-8,vZome VEF 6 field golden%0A%0A1112%0A(0,0) (4876/95,-7913/95) (5146/95,-8353/95) (1244/95,-1997/95)%0A(0,0) (794/19,-1289/19) (1304/95,-2137/95) (338/95,-529/95)%0A(0,0) (3006/95,-9791/190) (3779/190,-3101/95) (-2423/190,3969/190)%0A(0,0) (3912/95,-12727/190) (11463/190,-9317/95) (-611/190,1033/190)%0A(0,0) (-1833/95,3004/95) (-656/19,1062/19) (6153/95,-9949/95)%0A(0,0) (1,-1) (-656/19,1062/19) (6153/95,-9949/95)%0A(0,0) (1,-1) (0,0) (3779/95,-6107/95)%0A(0,0) (-1833/95,3004/95) (0,0) (3779/95,-6107/95)%0A(0,0) (267/5,-431/5) (53/5,-84/5) (-1008/19,1630/19)%0A(0,0) (2137/95,-3441/95) (495/19,-794/19) (-2666/95,4308/95)%0A(0,0) (3101/95,-9981/190) (3779/190,-3006/95) (-2233/190,3589/190)%0A(0,0) (6037/95,-19477/190) (843/190,-632/95) (-6981/190,11273/190)%0A(0,0) (8527/190,-6848/95) (-1003/38,1631/38) (1303/95,-4263/190)%0A(0,0) (3779/190,-3006/95) (-3203/190,5219/190) (1303/95,-4263/190)%0A(0,0) (495/19,-794/19) (-52/95,96/95) (2267/95,-3681/95)%0A(0,0) (4849/95,-7812/95) (-958/95,1564/95) (2267/95,-3681/95)%0A(0,0) (-544/19,883/19) (4568/95,-7359/95) (-226/19,369/19)%0A(0,0) (-2267/95,3681/95) (4849/95,-7812/95) (-958/95,1564/95)%0A(0,0) (-1303/95,4263/190) (8527/190,-6848/95) (-1003/38,1631/38)%0A(0,0) (-1756/95,5731/190) (1593/38,-1279/19) (-5359/190,8717/190)%0A(0,0) (53/5,-84/5) (1008/19,-1630/19) (-267/5,431/5)%0A(0,0) (495/19,-794/19) (2666/95,-4308/95) (-2137/95,3441/95)%0A(0,0) (3779/190,-3006/95) (2233/190,-3589/190) (-3101/95,9981/190)%0A(0,0) (843/190,-632/95) (6981/190,-11273/190) (-6037/95,19477/190)%0A(0,0) (-164/95,237/95) (-2036/95,3313/95) (-6906/95,11193/95)%0A(0,0) (1304/95,-2137/95) (338/95,-529/95) (-794/19,1289/19)%0A(0,0) (3779/190,-3101/95) (-2423/190,3969/190) (-3006/95,9791/190)%0A(0,0) (843/190,-727/95) (-7171/190,11653/190) (-5942/95,19287/190)%0A(0,0) (1008/19,-1630/19) (4167/95,-6721/95) (-461/95,778/95)%0A(0,0) (6981/190,-11273/190) (5131/95,-16541/190) (-2093/190,1742/95)%0A(0,0) (6981/190,-11273/190) (6037/95,-19477/190) (843/190,-632/95)%0A(0,0) (1008/19,-1630/19) (267/5,-431/5) (53/5,-84/5)%0A(0,0) (4568/95,-7359/95) (226/19,-369/19) (-544/19,883/19)%0A(0,0) (620/19,-997/19) (-338/95,529/95) (-1252/95,2041/95)%0A(0,0) (5029/190,-4021/95) (2423/190,-3969/190) (-288/95,983/190)%0A(0,0) (1593/38,-1279/19) (5359/190,-8717/190) (-1756/95,5731/190)%0A(0,0) (-1833/95,3004/95) (2718/95,-4404/95) (125/19,-203/19)%0A(0,0) (-1833/95,3004/95) (268/5,-434/5) (-281/95,453/95)%0A(0,0) (1,-1) (268/5,-434/5) (-281/95,453/95)%0A(0,0) (1,-1) (2718/95,-4404/95) (125/19,-203/19)%0A(0,0) (0,0) (-1,1) (-1,2)%0A(0,0) (-2,3) (-1,1) (0,0)%0A(0,0) (-3779/95,6107/95) (-1,1) (0,0)%0A(0,0) (-6153/95,9949/95) (-1,1) (-656/19,1062/19)%0A(0,0) (-937/19,1515/19) (-1,1) (-4186/95,6778/95)%0A(0,0) (125/19,-203/19) (-1,1) (-2718/95,4404/95)%0A(0,0) (-281/95,453/95) (-1,1) (-268/5,434/5)%0A(0,0) (-1833/95,3004/95) (-268/5,434/5) (-281/95,453/95)%0A(0,0) (-1833/95,3004/95) (-2718/95,4404/95) (125/19,-203/19)%0A(0,0) (1,-1) (-2718/95,4404/95) (125/19,-203/19)%0A(0,0) (1,-1) (-268/5,434/5) (-281/95,453/95)%0A(0,0) (-1929/95,3152/95) (-2666/95,4308/95) (-581/95,963/95)%0A(0,0) (-461/95,778/95) (-1008/19,1630/19) (4167/95,-6721/95)%0A(0,0) (-2093/190,1742/95) (-6981/190,11273/190) (5131/95,-16541/190)%0A(0,0) (-5029/190,4116/95) (-2233/190,3589/190) (383/95,-1173/190)%0A(0,0) (338/95,-529/95) (-1252/95,2041/95) (620/19,-997/19)%0A(0,0) (-226/19,369/19) (-544/19,883/19) (4568/95,-7359/95)%0A(0,0) (-5359/190,8717/190) (-1756/95,5731/190) (1593/38,-1279/19)%0A(0,0) (-2423/190,3969/190) (-288/95,983/190) (5029/190,-4021/95)%0A(0,0) (1398/95,-4453/190) (-8527/190,6943/95) (-965/38,1555/38)%0A(0,0) (1398/95,-4453/190) (-3779/190,3101/95) (-3013/190,4839/190)%0A(0,0) (434/95,-677/95) (-1304/95,2137/95) (-3056/95,4933/95)%0A(0,0) (434/95,-677/95) (-3678/95,5979/95) (-3962/95,6401/95)%0A(0,0) (-1,2) (0,0) (1,-1)%0A(0,0) (-1003/38,1631/38) (-1303/95,4263/190) (8527/190,-6848/95)%0A(0,0) (-3203/190,5219/190) (-1303/95,4263/190) (3779/190,-3006/95)%0A(0,0) (-1391/190,2283/190) (2539/95,-8169/190) (11463/190,-9222/95)%0A(0,0) (421/190,-653/190) (4007/95,-12917/190) (11463/190,-9222/95)%0A(0,0) (2233/190,-3589/190) (3101/95,-9981/190) (3779/190,-3006/95)%0A(0,0) (0,0) (2,-3) (1,-1)%0A(0,0) (-1929/95,3152/95) (2666/95,-4308/95) (-581/95,963/95)%0A(0,0) (-5029/190,4116/95) (2233/190,-3589/190) (383/95,-1173/190)%0A(0,0) (-2093/190,1742/95) (6981/190,-11273/190) (5131/95,-16541/190)%0A(0,0) (-461/95,778/95) (1008/19,-1630/19) (4167/95,-6721/95)%0A(0,0) (281/95,-453/95) (1833/95,-3004/95) (268/5,-434/5)%0A(0,0) (-281/95,453/95) (1833/95,-3004/95) (268/5,-434/5)%0A(0,0) (-281/95,453/95) (-1,1) (268/5,-434/5)%0A(0,0) (281/95,-453/95) (-1,1) (268/5,-434/5)%0A(0,0) (-2267/95,3681/95) (-495/19,794/19) (52/95,-96/95)%0A(0,0) (315/19,-507/19) (-6317/95,10186/95) (-854/95,1372/95)%0A(0,0) (2539/95,-8169/190) (-11463/190,9222/95) (1391/190,-2283/190)%0A(0,0) (-1303/95,4263/190) (-3779/190,3006/95) (3203/190,-5219/190)%0A(0,0) (2666/95,-4308/95) (581/95,-963/95) (-1929/95,3152/95)%0A(0,0) (1008/19,-1630/19) (-4167/95,6721/95) (-461/95,778/95)%0A(0,0) (6981/190,-11273/190) (-5131/95,16541/190) (-2093/190,1742/95)%0A(0,0) (2233/190,-3589/190) (-383/95,1173/190) (-5029/190,4116/95)%0A(0,0) (1,-2) (0,0) (1,-1)%0A(0,0) (1003/38,-1631/38) (-1303/95,4263/190) (8527/190,-6848/95)%0A(0,0) (5359/190,-8717/190) (-1756/95,5731/190) (1593/38,-1279/19)%0A(0,0) (2423/190,-3969/190) (-288/95,983/190) (5029/190,-4021/95)%0A(0,0) (7171/190,-11653/190) (-5036/95,16351/190) (2093/190,-1647/95)%0A(0,0) (7171/190,-11653/190) (-5942/95,19287/190) (-843/190,727/95)%0A(0,0) (2423/190,-3969/190) (-3006/95,9791/190) (-3779/190,3101/95)%0A(0,0) (1,-2) (-1,2) (-1,2)%0A(0,0) (3043/95,-4909/95) (-6317/95,10186/95) (-352/19,568/19)%0A(0,0) (400
9207/95,-12917/190) (-11463/190,9222/95) (-421/190,653/190)%0A(0,0) (-1252/95,2041/95) (620/19,-997/19) (-338/95,529/95)%0A(0,0) (-1200/19,1945/19) (1632/95,-2611/95) (2036/95,-3313/95)%0A(0,0) (-5036/95,16351/190) (2093/190,-1647/95) (7171/190,-11653/190)%0A(0,0) (-288/95,983/190) (5029/190,-4021/95) (2423/190,-3969/190)%0A(0,0) (-1833/95,3004/95) (-656/19,1062/19) (-6153/95,9949/95)%0A(0,0) (-1833/95,3004/95) (0,0) (-3779/95,6107/95)%0A(0,0) (1,-1) (0,0) (-3779/95,6107/95)%0A(0,0) (1,-1) (-656/19,1062/19) (-6153/95,9949/95)%0A(0,0) (-352/19,568/19) (3043/95,-4909/95) (6317/95,-10186/95)%0A(0,0) (-421/190,653/190) (4007/95,-12917/190) (11463/190,-9222/95)%0A(0,0) (-2233/190,3589/190) (3101/95,-9981/190) (3779/190,-3006/95)%0A(0,0) (-2666/95,4308/95) (2137/95,-3441/95) (495/19,-794/19)%0A(0,0) (-430/19,693/19) (3408/95,-5539/95) (5146/95,-8353/95)%0A(0,0) (-1201/190,1903/190) (2444/95,-7979/190) (11463/190,-9317/95)%0A(0,0) (611/190,-1033/190) (3912/95,-12727/190) (11463/190,-9317/95)%0A(0,0) (-1244/95,1997/95) (4876/95,-7913/95) (5146/95,-8353/95)%0A(0,0) (2666/95,-4308/95) (581/95,-963/95) (1929/95,-3152/95)%0A(0,0) (2233/190,-3589/190) (-383/95,1173/190) (5029/190,-4116/95)%0A(0,0) (6981/190,-11273/190) (-5131/95,16541/190) (2093/190,-1742/95)%0A(0,0) (1008/19,-1630/19) (-4167/95,6721/95) (461/95,-778/95)%0A(0,0) (1833/95,-3004/95) (-4186/95,6778/95) (937/19,-1515/19)%0A(0,0) (1833/95,-3004/95) (-656/19,1062/19) (6153/95,-9949/95)%0A(0,0) (-1,1) (-656/19,1062/19) (6153/95,-9949/95)%0A(0,0) (-1,1) (-4186/95,6778/95) (937/19,-1515/19)%0A(0,0) (-3962/95,6401/95) (-434/95,677/95) (3678/95,-5979/95)%0A(0,0) (-3056/95,4933/95) (-434/95,677/95) (1304/95,-2137/95)%0A(0,0) (-338/95,529/95) (794/19,-1289/19) (1304/95,-2137/95)%0A(0,0) (2036/95,-3313/95) (6906/95,-11193/95) (-164/95,237/95)%0A(0,0) (2036/95,-3313/95) (1200/19,-1945/19) (-1632/95,2611/95)%0A(0,0) (-338/95,529/95) (1252/95,-2041/95) (-620/19,997/19)%0A(0,0) (226/19,-369/19) (544/19,-883/19) (-4568/95,7359/95)%0A(0,0) (958/95,-1564/95) (2267/95,-3681/95) (-4849/95,7812/95)%0A(0,0) (52/95,-96/95) (2267/95,-3681/95) (-495/19,794/19)%0A(0,0) (-854/95,1372/95) (-315/19,507/19) (-6317/95,10186/95)%0A(0,0) (-352/19,568/19) (-3043/95,4909/95) (-6317/95,10186/95)%0A(0,0) (-2666/95,4308/95) (-2137/95,3441/95) (-495/19,794/19)%0A(0,0) (-1008/19,1630/19) (-267/5,431/5) (-53/5,84/5)%0A(0,0) (-1008/19,1630/19) (-4167/95,6721/95) (461/95,-778/95)%0A(0,0) (-2666/95,4308/95) (581/95,-963/95) (1929/95,-3152/95)%0A(0,0) (-4134/95,6682/95) (-887/95,1411/95) (3397/95,-5526/95)%0A(0,0) (887/95,-1411/95) (-3397/95,5526/95) (-4134/95,6682/95)%0A(0,0) (1851/95,-5921/190) (-1593/38,1298/19) (-5169/190,8337/190)%0A(0,0) (267/5,-431/5) (53/5,-84/5) (1008/19,-1630/19)%0A(0,0) (6037/95,-19477/190) (843/190,-632/95) (6981/190,-11273/190)%0A(0,0) (3101/95,-9981/190) (3779/190,-3006/95) (2233/190,-3589/190)%0A(0,0) (2137/95,-3441/95) (495/19,-794/19) (2666/95,-4308/95)%0A(0,0) (352/19,-568/19) (-3043/95,4909/95) (6317/95,-10186/95)%0A(0,0) (421/190,-653/190) (-4007/95,12917/190) (11463/190,-9222/95)%0A(0,0) (2233/190,-3589/190) (-3101/95,9981/190) (3779/190,-3006/95)%0A(0,0) (2666/95,-4308/95) (-2137/95,3441/95) (495/19,-794/19)%0A(0,0) (581/95,-963/95) (1929/95,-3152/95) (2666/95,-4308/95)%0A(0,0) (-383/95,1173/190) (5029/190,-4116/95) (2233/190,-3589/190)%0A(0,0) (-5131/95,16541/190) (2093/190,-1742/95) (6981/190,-11273/190)%0A(0,0) (-4167/95,6721/95) (461/95,-778/95) (1008/19,-1630/19)%0A(0,0) (-1833/95,3004/95) (-268/5,434/5) (281/95,-453/95)%0A(0,0) (1,-1) (-268/5,434/5) (281/95,-453/95)%0A(0,0) (-4134/95,6682/95) (887/95,-1411/95) (-3397/95,5526/95)%0A(0,0) (-2666/95,4308/95) (-581/95,963/95) (-1929/95,3152/95)%0A(0,0) (-2233/190,3589/190) (383/95,-1173/190) (-5029/190,4116/95)%0A(0,0) (-5169/190,8337/190) (1851/95,-5921/190) (-1593/38,1298/19)%0A(0,0) (-5146/95,8353/95) (-430/19,693/19) (-3408/95,5539/95)%0A(0,0) (-11463/190,9317/95) (-1201/190,1903/190) (-2444/95,7979/190)%0A(0,0) (-11463/190,9317/95) (611/190,-1033/190) (-3912/95,12727/190)%0A(0,0) (-5146/95,8353/95) (-1244/95,1997/95) (-4876/95,7913/95)%0A(0,0) (-125/19,203/19) (-1833/95,3004/95) (2718/95,-4404/95)%0A(0,0) (937/19,-1515/19) (-1833/95,3004/95) (4186/95,-6778/95)%0A(0,0) (937/19,-1515/19) (1,-1) (4186/95,-6778/95)%0A(0,0) (-125/19,203/19) (1,-1) (2718/95,-4404/95)%0A(0,0) (-4186/95,6778/95) (-937/19,1515/19) (1833/95,-3004/95)%0A(0,0) (-4186/95,6778/95) (-937/19,1515/19) (-1,1)%0A(0,0) (-656/19,1062/19) (-6153/95,9949/95) (-1,1)%0A(0,0) (-656/19,1062/19) (-6153/95,9949/95) (1833/95,-3004/95)%0A(0,0) (-958/95,1564/95) (-2267/95,3681/95) (-4849/95,7812/95)%0A(0,0) (-226/19,369/19) (-544/19,883/19) (-4568/95,7359/95)%0A(0,0) (-5359/190,8717/190) (-1756/95,5731/190) (-1593/38,1279/19)%0A(0,0) (-1003/38,1631/38) (-1303/95,4263/190) (-8527/190,6848/95)%0A(0,0) (-1833/95,3004/95) (2718/95,-4404/95) (-125/19,203/19)%0A(0,0) (-1833/95,3004/95) (4186/95,-6778/95) (937/19,-1515/19)%0A(0,0) (1,-1) (4186/95,-6778/95) (937/19,-1515/19)%0A(0,0) (1,-1) (2718/95,-4404/95) (-125/19,203/19)%0A(0,0) (1,-1) (-1,2) (0,0)%0A(0,0) (2,-3) (1,-1) (0,0)%0A(0,0) (5131/95,-16541/190) (-2093/190,1742/95) (6981/190,-11273/190)%0A(0,0) (383/95,-1173/190) (-5029/190,4116/95) (2233/190,-3589/190)%0A(0,0) (1851/95,-5921/190) (-1593/38,1298/19) (5169/190,-8337/190)%0A(0,0) (-2233/190,3589/190) (-3101/95,9981/190) (-3779/190,3006/95)%0A(0,0) (-6981/190,11273/190) (-6037/95,19477/190) (-843/190,632/95)%0A(0,0) (-958/95,1564/95) (-2267/95,3681/95) (4849/95,-7812/95)%0A(0,0) (-52/95,96/95) (-2267/95,3681/95) (495/19,-794/19)%0A(0,0) (-1,1) (1,-2) (0,0)%0A(0,0) (1,-2) (1,-2) (-1,2)%0A(0,0) (3779/190,-3101/95) (2423/190,-3969/190) (-3006/95,9791/190)%0A(0,0) (843/190,-727/95) (7171/190,-11653/190) (-5942/95,19287/190)%0A(0,0) (-2093/190,1647/95) (7171/190,-11653/190) (-5036/95,16351/190)%0A(0,0) (-5029/190,4021/95) (2423/190,-3969/190) (-288/95,983/190)%0A(0,0) (-1593/38,1279/19) (5359/190,-8717/190) (-1756/95,5731/190)%0A(0,0) (-267/5,431/5) (-53/5,84/5
920) (-1008/19,1630/19)%0A(0,0) (-2137/95,3441/95) (-495/19,794/19) (-2666/95,4308/95)%0A(0,0) (-3101/95,9981/190) (-3779/190,3006/95) (-2233/190,3589/190)%0A(0,0) (-6037/95,19477/190) (-843/190,632/95) (-6981/190,11273/190)%0A(0,0) (-3043/95,4909/95) (-6317/95,10186/95) (352/19,-568/19)%0A(0,0) (-2137/95,3441/95) (-495/19,794/19) (2666/95,-4308/95)%0A(0,0) (-3101/95,9981/190) (-3779/190,3006/95) (2233/190,-3589/190)%0A(0,0) (-4007/95,12917/190) (-11463/190,9222/95) (421/190,-653/190)%0A(0,0) (-352/19,568/19) (3043/95,-4909/95) (-6317/95,10186/95)%0A(0,0) (-2666/95,4308/95) (2137/95,-3441/95) (-495/19,794/19)%0A(0,0) (-2233/190,3589/190) (3101/95,-9981/190) (-3779/190,3006/95)%0A(0,0) (-421/190,653/190) (4007/95,-12917/190) (-11463/190,9222/95)%0A(0,0) (5146/95,-8353/95) (1244/95,-1997/95) (-4876/95,7913/95)%0A(0,0) (11463/190,-9317/95) (-611/190,1033/190) (-3912/95,12727/190)%0A(0,0) (2267/95,-3681/95) (4849/95,-7812/95) (-958/95,1564/95)%0A(0,0) (2267/95,-3681/95) (495/19,-794/19) (-52/95,96/95)%0A(0,0) (-315/19,507/19) (6317/95,-10186/95) (854/95,-1372/95)%0A(0,0) (-3043/95,4909/95) (6317/95,-10186/95) (352/19,-568/19)%0A(0,0) (-2137/95,3441/95) (495/19,-794/19) (2666/95,-4308/95)%0A(0,0) (-267/5,431/5) (53/5,-84/5) (1008/19,-1630/19)%0A(0,0) (-4167/95,6721/95) (-461/95,778/95) (1008/19,-1630/19)%0A(0,0) (581/95,-963/95) (-1929/95,3152/95) (2666/95,-4308/95)%0A(0,0) (-887/95,1411/95) (-3397/95,5526/95) (4134/95,-6682/95)%0A(0,0) (-434/95,677/95) (-3678/95,5979/95) (3962/95,-6401/95)%0A(0,0) (-434/95,677/95) (-1304/95,2137/95) (3056/95,-4933/95)%0A(0,0) (3408/95,-5539/95) (-5146/95,8353/95) (430/19,-693/19)%0A(0,0) (4876/95,-7913/95) (-5146/95,8353/95) (1244/95,-1997/95)%0A(0,0) (794/19,-1289/19) (-1304/95,2137/95) (338/95,-529/95)%0A(0,0) (6906/95,-11193/95) (164/95,-237/95) (-2036/95,3313/95)%0A(0,0) (1200/19,-1945/19) (1632/95,-2611/95) (-2036/95,3313/95)%0A(0,0) (1252/95,-2041/95) (620/19,-997/19) (338/95,-529/95)%0A(0,0) (544/19,-883/19) (4568/95,-7359/95) (-226/19,369/19)%0A(0,0) (3678/95,-5979/95) (-3962/95,6401/95) (434/95,-677/95)%0A(0,0) (1304/95,-2137/95) (-3056/95,4933/95) (434/95,-677/95)%0A(0,0) (3779/190,-3101/95) (-3013/190,4839/190) (1398/95,-4453/190)%0A(0,0) (8527/190,-6943/95) (-965/38,1555/38) (1398/95,-4453/190)%0A(0,0) (430/19,-693/19) (-3408/95,5539/95) (-5146/95,8353/95)%0A(0,0) (1244/95,-1997/95) (-4876/95,7913/95) (-5146/95,8353/95)%0A(0,0) (-611/190,1033/190) (-3912/95,12727/190) (-11463/190,9317/95)%0A(0,0) (1201/190,-1903/190) (-2444/95,7979/190) (-11463/190,9317/95)%0A(0,0) (-1833/95,3004/95) (656/19,-1062/19) (6153/95,-9949/95)%0A(0,0) (1,-1) (656/19,-1062/19) (6153/95,-9949/95)%0A(0,0) (281/95,-453/95) (-1833/95,3004/95) (-268/5,434/5)%0A(0,0) (-281/95,453/95) (-1833/95,3004/95) (-268/5,434/5)%0A(0,0) (-281/95,453/95) (1,-1) (-268/5,434/5)%0A(0,0) (281/95,-453/95) (1,-1) (-268/5,434/5)%0A(0,0) (937/19,-1515/19) (1833/95,-3004/95) (-4186/95,6778/95)%0A(0,0) (6153/95,-9949/95) (1833/95,-3004/95) (-656/19,1062/19)%0A(0,0) (6153/95,-9949/95) (-1,1) (-656/19,1062/19)%0A(0,0) (937/19,-1515/19) (-1,1) (-4186/95,6778/95)%0A(0,0) (-1929/95,3152/95) (-2666/95,4308/95) (581/95,-963/95)%0A(0,0) (-5029/190,4116/95) (-2233/190,3589/190) (-383/95,1173/190)%0A(0,0) (-2093/190,1742/95) (-6981/190,11273/190) (-5131/95,16541/190)%0A(0,0) (-461/95,778/95) (-1008/19,1630/19) (-4167/95,6721/95)%0A(0,0) (544/19,-883/19) (-4568/95,7359/95) (226/19,-369/19)%0A(0,0) (1252/95,-2041/95) (-620/19,997/19) (-338/95,529/95)%0A(0,0) (288/95,-983/190) (-5029/190,4021/95) (2423/190,-3969/190)%0A(0,0) (1756/95,-5731/190) (-1593/38,1279/19) (5359/190,-8717/190)%0A(0,0) (1244/95,-1997/95) (4876/95,-7913/95) (5146/95,-8353/95)%0A(0,0) (338/95,-529/95) (794/19,-1289/19) (1304/95,-2137/95)%0A(0,0) (-2423/190,3969/190) (3006/95,-9791/190) (3779/190,-3101/95)%0A(0,0) (-611/190,1033/190) (3912/95,-12727/190) (11463/190,-9317/95)%0A(0,0) (-937/19,1515/19) (-1833/95,3004/95) (4186/95,-6778/95)%0A(0,0) (-937/19,1515/19) (1,-1) (4186/95,-6778/95)%0A(0,0) (-6153/95,9949/95) (1,-1) (656/19,-1062/19)%0A(0,0) (-6153/95,9949/95) (-1833/95,3004/95) (656/19,-1062/19)%0A(0,0) (4167/95,-6721/95) (-461/95,778/95) (1008/19,-1630/19)%0A(0,0) (-495/19,794/19) (52/95,-96/95) (-2267/95,3681/95)%0A(0,0) (-6317/95,10186/95) (-854/95,1372/95) (315/19,-507/19)%0A(0,0) (-11463/190,9222/95) (1391/190,-2283/190) (2539/95,-8169/190)%0A(0,0) (-3779/190,3006/95) (3203/190,-5219/190) (-1303/95,4263/190)%0A(0,0) (281/95,-453/95) (1833/95,-3004/95) (-268/5,434/5)%0A(0,0) (-125/19,203/19) (1833/95,-3004/95) (-2718/95,4404/95)%0A(0,0) (-125/19,203/19) (-1,1) (-2718/95,4404/95)%0A(0,0) (281/95,-453/95) (-1,1) (-268/5,434/5)%0A(0,0) (-1,2) (0,0) (-1,1)%0A(0,0) (-8527/190,6943/95) (965/38,-1555/38) (-1398/95,4453/190)%0A(0,0) (-1593/38,1298/19) (5169/190,-8337/190) (-1851/95,5921/190)%0A(0,0) (-5029/190,4116/95) (2233/190,-3589/190) (-383/95,1173/190)%0A(0,0) (-2093/190,1742/95) (6981/190,-11273/190) (-5131/95,16541/190)%0A(0,0) (1,-1) (0,0) (-2,3)%0A(0,0) (3043/95,-4909/95) (6317/95,-10186/95) (352/19,-568/19)%0A(0,0) (400
9207/95,-12917/190) (11463/190,-9222/95) (421/190,-653/190)%0A(0,0) (-4876/95,7913/95) (5146/95,-8353/95) (1244/95,-1997/95)%0A(0,0) (-3912/95,12727/190) (11463/190,-9317/95) (-611/190,1033/190)%0A(0,0) (-3006/95,9791/190) (3779/190,-3101/95) (-2423/190,3969/190)%0A(0,0) (-794/19,1289/19) (1304/95,-2137/95) (338/95,-529/95)%0A(0,0) (-434/95,677/95) (1304/95,-2137/95) (-3056/95,4933/95)%0A(0,0) (-434/95,677/95) (3678/95,-5979/95) (-3962/95,6401/95)%0A(0,0) (-1398/95,4453/190) (8527/190,-6943/95) (-965/38,1555/38)%0A(0,0) (-1398/95,4453/190) (3779/190,-3101/95) (-3013/190,4839/190)%0A(0,0) (1833/95,-3004/95) (-268/5,434/5) (281/95,-453/95)%0A(0,0) (1833/95,-3004/95) (-2718/95,4404/95) (-125/19,203/19)%0A(0,0) (-1,1) (-2718/95,4404/95) (-125/19,203/19)%0A(0,0) (-1,1) (-268/5,434/5) (281/95,-453/95)%0A(0,0) (-656/19,1062/19) (-6153/95,9949/95) (-1833/95,3004/95)%0A(0,0) (0,0) (-3779/95,6107/95) (-1833/95,3004/95)%0A(0,0) (0,0) (-3779/95,6107/95) (1,-1)%0A(0,0) (-656/19,1062/19) (-6153/95,9949/95) (1,-1)%0A(0,0) (-4568/95,7359/95) (226/19,-369/19) (-544/19,883/19)%0A(0,0) (-4849/95,7812/95) (958/95,-1564/95) (-2267/95,3681/95)%0A(0,0) (-8527/190,6848/95) (1003/38,-1631/38) (-1303/95,4263/190)%0A(0,0) (-656/19,1062/19) (6153/95,-9949/95) (-1833/95,3004/95)%0A(0,0) (-656/19,1062/19) (6153/95,-9949/95) (1,-1)%0A(0,0) (0,0) (3779/95,-6107/95) (1,-1)%0A(0,0) (0,0) (3779/95,-6107/95) (-1833/95,3004/95)%0A(0,0) (-1252/95,2041/95) (620/19,-997/19) (338/95,-529/95)%0A(0,0) (-288/95,983/190) (5029/190,-4021/95) (-2423/190,3969/190)%0A(0,0) (-5036/95,16351/190) (2093/190,-1647/95) (-7171/190,11653/190)%0A(0,0) (-1200/19,1945/19) (1632/95,-2611/95) (-2036/95,3313/95)%0A(0,0) (11463/190,-9222/95) (421/190,-653/190) (-4007/95,12917/190)%0A(0,0) (11463/190,-9222/95) (-1391/190,2283/190) (-2539/95,8169/190)%0A(0,0) (2267/95,-3681/95) (-495/19,794/19) (-52/95,96/95)%0A(0,0) (-315/19,507/19) (-6317/95,10186/95) (854/95,-1372/95)%0A(0,0) (-2539/95,8169/190) (-11463/190,9222/95) (-1391/190,2283/190)%0A(0,0) (1303/95,-4263/190) (-3779/190,3006/95) (-3203/190,5219/190)%0A(0,0) (3056/95,-4933/95) (-434/95,677/95) (-1304/95,2137/95)%0A(0,0) (3962/95,-6401/95) (-434/95,677/95) (-3678/95,5979/95)%0A(0,0) (965/38,-1555/38) (-1398/95,4453/190) (-8527/190,6943/95)%0A(0,0) (3013/190,-4839/190) (-1398/95,4453/190) (-3779/190,3101/95)%0A(0,0) (-1200/19,1945/19) (-1632/95,2611/95) (-2036/95,3313/95)%0A(0,0) (-6906/95,11193/95) (-164/95,237/95) (-2036/95,3313/95)%0A(0,0) (-5942/95,19287/190) (843/190,-727/95) (-7171/190,11653/190)%0A(0,0) (-5036/95,16351/190) (-2093/190,1647/95) (-7171/190,11653/190)%0A(0,0) (3678/95,-5979/95) (3962/95,-6401/95) (434/95,-677/95)%0A(0,0) (1304/95,-2137/95) (3056/95,-4933/95) (434/95,-677/95)%0A(0,0) (5146/95,-8353/95) (430/19,-693/19) (-3408/95,5539/95)%0A(0,0) (-1632/95,2611/95) (-2036/95,3313/95) (-1200/19,1945/19)%0A(0,0) (-620/19,997/19) (338/95,-529/95) (-1252/95,2041/95)%0A(0,0) (-4568/95,7359/95) (-226/19,369/19) (-544/19,883/19)%0A(0,0) (-4849/95,7812/95) (-958/95,1564/95) (-2267/95,3681/95)%0A(0,0) (-495/19,794/19) (-52/95,96/95) (-2267/95,3681/95)%0A(0,0) (-6317/95,10186/95) (854/95,-1372/95) (315/19,-507/19)%0A(0,0) (-6317/95,10186/95) (352/19,-568/19) (3043/95,-4909/95)%0A(0,0) (-495/19,794/19) (2666/95,-4308/95) (2137/95,-3441/95)%0A(0,0) (-53/5,84/5) (1008/19,-1630/19) (267/5,-431/5)%0A(0,0) (461/95,-778/95) (1008/19,-1630/19) (4167/95,-6721/95)%0A(0,0) (1929/95,-3152/95) (2666/95,-4308/95) (-581/95,963/95)%0A(0,0) (3397/95,-5526/95) (4134/95,-6682/95) (887/95,-1411/95)%0A(0,0) (-3678/95,5979/95) (-3962/95,6401/95) (434/95,-677/95)%0A(0,0) (-3397/95,5526/95) (-4134/95,6682/95) (887/95,-1411/95)%0A(0,0) (-1593/38,1298/19) (-5169/190,8337/190) (1851/95,-5921/190)%0A(0,0) (-8527/190,6943/95) (-965/38,1555/38) (1398/95,-4453/190)%0A(0,0) (-53/5,84/5) (1008/19,-1630/19) (-267/5,431/5)%0A(0,0) (-843/190,632/95) (6981/190,-11273/190) (-6037/95,19477/190)%0A(0,0) (-3779/190,3006/95) (2233/190,-3589/190) (-3101/95,9981/190)%0A(0,0) (-495/19,794/19) (2666/95,-4308/95) (-2137/95,3441/95)%0A(0,0) (53/5,-84/5) (1008/19,-1630/19) (267/5,-431/5)%0A(0,0) (843/190,-632/95) (6981/190,-11273/190) (6037/95,-19477/190)%0A(0,0) (3779/190,-3006/95) (2233/190,-3589/190) (3101/95,-9981/190)%0A(0,0) (495/19,-794/19) (2666/95,-4308/95) (2137/95,-3441/95)%0A(0,0) (-4186/95,6778/95) (937/19,-1515/19) (1833/95,-3004/95)%0A(0,0) (-656/19,1062/19) (6153/95,-9949/95) (1833/95,-3004/95)%0A(0,0) (-656/19,1062/19) (6153/95,-9949/95) (-1,1)%0A(0,0) (-4186/95,6778/95) (937/19,-1515/19) (-1,1)%0A(0,0) (-3779/95,6107/95) (1,-1) (0,0)%0A(0,0) (-3779/95,6107/95) (-1833/95,3004/95) (0,0)%0A(0,0) (-1833/95,3004/95) (268/5,-434/5) (281/95,-453/95)%0A(0,0) (1,-1) (268/5,-434/5) (281/95,-453/95)%0A(0,0) (-1,2) (1,-2) (-1,2)%0A(0,0) (-3779/190,3101/95) (2423/190,-3969/190) (-3006/95,9791/190)%0A(0,0) (-3779/190,3101/95) (-3013/190,4839/190) (1398/95,-4453/190)%0A(0,0) (1303/95,-4263/190) (3779/190,-3006/95) (-3203/190,5219/190)%0A(0,0) (-2539/95,8169/190) (11463/190,-9222/95) (-1391/190,2283/190)%0A(0,0) (1398/95,-4453/190) (8527/190,-6943/95) (965/38,-1555/38)%0A(0,0) (1398/95,-4453/190) (3779/190,-3101/95) (3013/190,-4839/190)%0A(0,0) (434/95,-677/95) (1304/95,-2137/95) (3056/95,-4933/95)%0A(0,0) (434/95,-677/95) (3678/95,-5979/95) (3962/95,-6401/95)%0A(0,0) (1593/38,-1279/19) (-5359/190,8717/190) (-1756/95,5731/190)%0A(0,0) (8527/190,-6848/95) (-1003/38,1631/38) (-1303/95,4263/190)%0A(0,0) (3779/190,-3006/95) (-3203/190,5219/190) (-1303/95,4263/190)%0A(0,0) (11463/190,-9222/95) (-1391/190,2283/190) (2539/95,-8169/190)%0A(0,0) (11463/190,-9222/95) (421/190,-653/190) (4007/95,-12917/190)%0A(0,0) (1,-1) (0,0) (2,-3)%0A(0,0) (2267/95,-3681/95) (4849/95,-7812/95) (958/95,-1564/95)%0A(0,0) (2267/95,-3681/95) (495/19,-794/19) (52/95,-96/95)%0A(0,0) (1303/95,-4263/190) (3779/190,-3006/95) (3203/190,-5219/190)%0A(0,0) (1303/95,-4263/190) (8527/190,-6848/95) (1003/38,-1631/38)%0A(0,0) (52/95,-96/95) (-2267/95,3681/95) (495/19,-794/19)%0A(0,0) (3203/190,-5219/190) (-1303/95,4263/190) (3779/190,-3006/95)%0A(0,0) (1391/190,-2283/190) (2539/95,-8169/190) (11463/190,-9222/95)%0A(0,0) (-854/95,1372/95) (315/19,-507/19) (6317/95,-10186/95)%0A(0,0) (-581/95,963/95) (1929/95,-3152/95) (-2666/95,4308/95)%0A(0,0) (383/95,-1173/190) (5029/190,-4116/95) (-2233/190,3589/190)%0A(0,0) (5131/95,-16541/190) (2093/190,-1742/95) (-6981/190,11273/190)%0A(0,0) (4167/95,-6721/95) (461/95,-778/95) (-1008/19,1630/19)%0A(0,0) (352/19,-568/19) (-3043/95,4909/95) (-6317/95,10186/95)%0A(0,0) (2666/95,-4308/95) (-2137/95,3441/95) (-495/19,794/19)%0A(0,0) (2233/190,-3589/190) (-3101/95,9981/190) (-3779/190,3006/95)%0A(0,0) (421/190,-653/190) (-4007/95,12917/190) (-11463/190,9222/95)%0A(0,0) (3779/95,-6107/95) (1833/95,-3004/95) (0,0)%0A(0,0) (3779/95,-6107/95) (-1,1) (0,0)%0A(0,0) (620/19,-997/19) (338/95,-529/95) (-1252/95,2041/95)%0A(0,0) (4568/95,-7359/95) (-226/19,369/19) (-544/19,883/19)%0A(0,0) (5029/190,-4021/95) (-2423/190,3969/190) (-288/95,983/190)%0A(0,0) (-1,1) (-1,2) (0,0)%0A(0,0) (-1,1) (0,0) (-2,3)%0A(0,0) (-1,1) (0,0) (-3779/95,6107/95)%0A(0,0) (-1,1) (-656/19,1062/19) (-6153/95,9949/95)%0A(0,0) (-1,1) (-4186/95,6778/95) (-937/19,1515/19)%0A(0,0) (-1,1) (-2718/95,4404/95) (125/19,-203/19)%0A(0,0) (-1,1) (-268/5,434/5) (-281/95,453/95)%0A(0,0) (-8527/190,6848/95) (1003/38,-1631/38) (1303/95,-4263/190)%0A(0,0) (-3779/190,3006/95) (3203/190,-5219/190) (1303/95,-4263/190)%0A(0,0) (-495/19,794/19) (52/95,-96/95) (2267/95,-3681/95)%0A(0,0) (-4849/95,7812/95) (958/95,-1564/95) (2267/95,-3681/95)%0A(0,0) (0,0) (1,-1) (1,-2)%0A(0,0) (965/38,-1555/38) (1398/95,-4453/190) (8527/190,-6943/95)%0A(0,0) (5169/190,-8337/190) (1851/95,-5921/190) (1593/38,-1298/19)%0A(0,0) (2233/190,-3589/190) (383/95,-1173/190) (5029/190,-4116/95)%0A(0,0) (6981/190,-11273/190) (5131/95,-16541/190) (2093/190,-1742/95)%0A(0,0) (6981/190,-11273/190) (6037/95,-19477/190) (-843/190,632/95)%0A(0,0) (2233/190,-3589/190) (3101/95,-9981/190) (-3779/190,3006/95)%0A(0,0) (0,0) (2,-3) (-1,1)%0A(0,0) (-5169/190,8337/190) (-1851/95,5921/190) (1593/38,-1298/19)%0A(0,0) (-965/38,1555/38) (-1398/95,4453/190) (8527/190,-6943/95)%0A(0,0) (656/19,-1062/19) (6153/95,-9949/95) (-1833/95,3004/95)%0A(0,0) (656/19,-1062/19) (6153/95,-9949/95) (1,-1)%0A(0,0) (315/19,-507/19) (6317/95,-10186/95) (-854/95,1372/95)%0A(0,0) (2539/95,-8169/190) (11463/190,-9222/95) (1391/190,-2283/190)%0A(0,0) (400
9207/95,-12917/190) (11463/190,-9222/95) (-421/190,653/190)%0A(0,0) (3043/95,-4909/95) (6317/95,-10186/95) (-352/19,568/19)%0A(0,0) (125/19,-203/19) (-1833/95,3004/95) (2718/95,-4404/95)%0A(0,0) (-281/95,453/95) (-1833/95,3004/95) (268/5,-434/5)%0A(0,0) (-281/95,453/95) (1,-1) (268/5,-434/5)%0A(0,0) (125/19,-203/19) (1,-1) (2718/95,-4404/95)%0A(0,0) (1833/95,-3004/95) (-2718/95,4404/95) (125/19,-203/19)%0A(0,0) (1833/95,-3004/95) (-268/5,434/5) (-281/95,453/95)%0A(0,0) (383/95,-1173/190) (-5029/190,4116/95) (-2233/190,3589/190)%0A(0,0) (5131/95,-16541/190) (-2093/190,1742/95) (-6981/190,11273/190)%0A(0,0) (-581/95,963/95) (-1929/95,3152/95) (-2666/95,4308/95)%0A(0,0) (4167/95,-6721/95) (-461/95,778/95) (-1008/19,1630/19)%0A(0,0) (-581/95,963/95) (-1929/95,3152/95) (2666/95,-4308/95)%0A(0,0) (0,0) (-3779/95,6107/95) (-1,1)%0A(0,0) (0,0) (-3779/95,6107/95) (1833/95,-3004/95)%0A(0,0) (-1,1) (0,0) (2,-3)%0A(0,0) (-3779/190,3006/95) (-2233/190,3589/190) (3101/95,-9981/190)%0A(0,0) (-843/190,632/95) (-6981/190,11273/190) (6037/95,-19477/190)%0A(0,0) (2093/190,-1742/95) (-6981/190,11273/190) (5131/95,-16541/190)%0A(0,0) (5029/190,-4116/95) (-2233/190,3589/190) (383/95,-1173/190)%0A(0,0) (1593/38,-1298/19) (-5169/190,8337/190) (1851/95,-5921/190)%0A(0,0) (-2036/95,3313/95) (-1200/19,1945/19) (1632/95,-2611/95)%0A(0,0) (-7171/190,11653/190) (-5036/95,16351/190) (2093/190,-1647/95)%0A(0,0) (-7171/190,11653/190) (-5942/95,19287/190) (-843/190,727/95)%0A(0,0) (-2036/95,3313/95) (-6906/95,11193/95) (164/95,-237/95)%0A(0,0) (-1833/95,3004/95) (4186/95,-6778/95) (-937/19,1515/19)%0A(0,0) (1,-1) (4186/95,-6778/95) (-937/19,1515/19)%0A(0,0) (1,-1) (656/19,-1062/19) (-6153/95,9949/95)%0A(0,0) (-1833/95,3004/95) (656/19,-1062/19) (-6153/95,9949/95)%0A(0,0) (1851/95,-5921/190) (1593/38,-1298/19) (-5169/190,8337/190)%0A(0,0) (887/95,-1411/95) (3397/95,-5526/95) (-4134/95,6682/95)%0A(0,0) (1756/95,-5731/190) (-1593/38,1279/19) (-5359/190,8717/190)%0A(0,0) (1303/95,-4263/190) (-8527/190,6848/95) (-1003/38,1631/38)%0A(0,0) (164/95,-237/95) (-2036/95,3313/95) (-6906/95,11193/95)%0A(0,0) (-843/190,727/95) (-7171/190,11653/190) (-5942/95,19287/190)%0A(0,0) (-3779/190,3101/95) (-2423/190,3969/190) (-3006/95,9791/190)%0A(0,0) (-1304/95,2137/95) (338/95,-529/95) (-794/19,1289/19)%0A(0,0) (3962/95,-6401/95) (-434/95,677/95) (3678/95,-5979/95)%0A(0,0) (3056/95,-4933/95) (-434/95,677/95) (1304/95,-2137/95)%0A(0,0) (3013/190,-4839/190) (-1398/95,4453/190) (3779/190,-3101/95)%0A(0,0) (965/38,-1555/38) (-1398/95,4453/190) (8527/190,-6943/95)%0A(0,0) (-4876/95,7913/95) (-5146/95,8353/95) (-1244/95,1997/95)%0A(0,0) (-3912/95,12727/190) (-11463/190,9317/95) (611/190,-1033/190)%0A(0,0) (-3006/95,9791/190) (-3779/190,3101/95) (2423/190,-3969/190)%0A(0,0) (-794/19,1289/19) (-1304/95,2137/95) (-338/95,529/95)%0A(0,0) (-267/5,431/5) (53/5,-84/5) (-1008/19,1630/19)%0A(0,0) (-6037/95,19477/190) (843/190,-632/95) (-6981/190,11273/190)%0A(0,0) (-3101/95,9981/190) (3779/190,-3006/95) (-2233/190,3589/190)%0A(0,0) (-2137/95,3441/95) (495/19,-794/19) (-2666/95,4308/95)%0A(0,0) (-2718/95,4404/95) (-125/19,203/19) (1833/95,-3004/95)%0A(0,0) (-2718/95,4404/95) (-125/19,203/19) (-1,1)%0A(0,0) (-6037/95,19477/190) (-843/190,632/95) (6981/190,-11273/190)%0A(0,0) (-1851/95,5921/190) (1593/38,-1298/19) (5169/190,-8337/190)%0A(0,0) (544/19,-883/19) (4568/95,-7359/95) (226/19,-369/19)%0A(0,0) (1756/95,-5731/190) (1593/38,-1279/19) (5359/190,-8717/190)%0A(0,0) (461/95,-778/95) (1008/19,-1630/19) (-4167/95,6721/95)%0A(0,0) (2093/190,-1742/95) (6981/190,-11273/190) (-5131/95,16541/190)%0A(0,0) (2444/95,-7979/190) (11463/190,-9317/95) (-1201/190,1903/190)%0A(0,0) (3408/95,-5539/95) (5146/95,-8353/95) (-430/19,693/19)%0A(0,0) (581/95,-963/95) (-1929/95,3152/95) (-2666/95,4308/95)%0A(0,0) (-383/95,1173/190) (-5029/190,4116/95) (-2233/190,3589/190)%0A(0,0) (-5131/95,16541/190) (-2093/190,1742/95) (-6981/190,11273/190)%0A(0,0) (-4167/95,6721/95) (-461/95,778/95) (-1008/19,1630/19)%0A(0,0) (-1632/95,2611/95) (2036/95,-3313/95) (1200/19,-1945/19)%0A(0,0) (-164/95,237/95) (2036/95,-3313/95) (6906/95,-11193/95)%0A(0,0) (843/190,-727/95) (7171/190,-11653/190) (5942/95,-19287/190)%0A(0,0) (-2093/190,1647/95) (7171/190,-11653/190) (5036/95,-16351/190)%0A(0,0) (430/19,-693/19) (-3408/95,5539/95) (5146/95,-8353/95)%0A(0,0) (1201/190,-1903/190) (-2444/95,7979/190) (11463/190,-9317/95)%0A(0,0) (-611/190,1033/190) (-3912/95,12727/190) (11463/190,-9317/95)%0A(0,0) (1244/95,-1997/95) (-4876/95,7913/95) (5146/95,-8353/95)%0A(0,0) (-53/5,84/5
920) (-1008/19,1630/19) (267/5,-431/5)%0A(0,0) (-495/19,794/19) (-2666/95,4308/95) (2137/95,-3441/95)%0A(0,0) (3043/95,-4909/95) (-6317/95,10186/95) (352/19,-568/19)%0A(0,0) (4007/95,-12917/190) (-11463/190,9222/95) (421/190,-653/190)%0A(0,0) (3101/95,-9981/190) (-3779/190,3006/95) (2233/190,-3589/190)%0A(0,0) (2137/95,-3441/95) (-495/19,794/19) (2666/95,-4308/95)%0A(0,0) (-6153/95,9949/95) (1833/95,-3004/95) (-656/19,1062/19)%0A(0,0) (-3779/95,6107/95) (1833/95,-3004/95) (0,0)%0A(0,0) (-2267/95,3681/95) (495/19,-794/19) (-52/95,96/95)%0A(0,0) (315/19,-507/19) (6317/95,-10186/95) (854/95,-1372/95)%0A(0,0) (2539/95,-8169/190) (11463/190,-9222/95) (-1391/190,2283/190)%0A(0,0) (-1303/95,4263/190) (3779/190,-3006/95) (-3203/190,5219/190)%0A(0,0) (-268/5,434/5) (281/95,-453/95) (1,-1)%0A(0,0) (-268/5,434/5) (-281/95,453/95) (1,-1)%0A(0,0) (-2718/95,4404/95) (125/19,-203/19) (1,-1)%0A(0,0) (-4186/95,6778/95) (-937/19,1515/19) (1,-1)%0A(0,0) (0,0) (-2,3) (1,-1)%0A(0,0) (-4007/95,12917/190) (11463/190,-9222/95) (421/190,-653/190)%0A(0,0) (-3101/95,9981/190) (3779/190,-3006/95) (2233/190,-3589/190)%0A(0,0) (1,-2) (0,0) (-1,1)%0A(0,0) (0,0) (3779/95,-6107/95) (-1,1)%0A(0,0) (656/19,-1062/19) (6153/95,-9949/95) (-1,1)%0A(0,0) (4186/95,-6778/95) (937/19,-1515/19) (-1,1)%0A(0,0) (2718/95,-4404/95) (-125/19,203/19) (-1,1)%0A(0,0) (268/5,-434/5) (281/95,-453/95) (-1,1)%0A(0,0) (-338/95,529/95) (-1252/95,2041/95) (-620/19,997/19)%0A(0,0) (2423/190,-3969/190) (-288/95,983/190) (-5029/190,4021/95)%0A(0,0) (7171/190,-11653/190) (-5036/95,16351/190) (-2093/190,1647/95)%0A(0,0) (2036/95,-3313/95) (-1200/19,1945/19) (-1632/95,2611/95)%0A(0,0) (1,-1) (1,-2) (0,0)%0A(0,0) (1398/95,-4453/190) (8527/190,-6943/95) (-965/38,1555/38)%0A(0,0) (1398/95,-4453/190) (3779/190,-3101/95) (-3013/190,4839/190)%0A(0,0) (-2444/95,7979/190) (11463/190,-9317/95) (-1201/190,1903/190)%0A(0,0) (-3912/95,12727/190) (11463/190,-9317/95) (611/190,-1033/190)%0A(0,0) (-3006/95,9791/190) (3779/190,-3101/95) (2423/190,-3969/190)%0A(0,0) (-1,2) (1,-2) (1,-2)%0A(0,0) (226/19,-369/19) (-544/19,883/19) (-4568/95,7359/95)%0A(0,0) (5359/190,-8717/190) (-1756/95,5731/190) (-1593/38,1279/19)%0A(0,0) (-7171/190,11653/190) (5942/95,-19287/190) (843/190,-727/95)%0A(0,0) (-7171/190,11653/190) (5036/95,-16351/190) (-2093/190,1647/95)%0A(0,0) (-2423/190,3969/190) (288/95,-983/190) (-5029/190,4021/95)%0A(0,0) (-5359/190,8717/190) (1756/95,-5731/190) (-1593/38,1279/19)%0A(0,0) (-854/95,1372/95) (-315/19,507/19) (6317/95,-10186/95)%0A(0,0) (-352/19,568/19) (-3043/95,4909/95) (6317/95,-10186/95)%0A(0,0) (-421/190,653/190) (-4007/95,12917/190) (11463/190,-9222/95)%0A(0,0) (1391/190,-2283/190) (-2539/95,8169/190) (11463/190,-9222/95)%0A(0,0) (1593/38,-1298/19) (5169/190,-8337/190) (-1851/95,5921/190)%0A(0,0) (8527/190,-6943/95) (965/38,-1555/38) (-1398/95,4453/190)%0A(0,0) (3779/190,-3101/95) (3013/190,-4839/190) (-1398/95,4453/190)%0A(0,0) (11463/190,-9317/95) (1201/190,-1903/190) (2444/95,-7979/190)%0A(0,0) (11463/190,-9317/95) (-611/190,1033/190) (3912/95,-12727/190)%0A(0,0) (3779/190,-3101/95) (-2423/190,3969/190) (3006/95,-9791/190)%0A(0,0) (1,-2) (-1,2) (1,-2)%0A(0,0) (-965/38,1555/38) (1398/95,-4453/190) (-8527/190,6943/95)%0A(0,0) (-3013/190,4839/190) (1398/95,-4453/190) (-3779/190,3101/95)%0A(0,0) (-3056/95,4933/95) (434/95,-677/95) (-1304/95,2137/95)%0A(0,0) (-3962/95,6401/95) (434/95,-677/95) (-3678/95,5979/95)%0A(0,0) (0,0) (-1,1) (1,-2)%0A(0,0) (-4007/95,12917/190) (-11463/190,9222/95) (-421/190,653/190)%0A(0,0) (-2539/95,8169/190) (-11463/190,9222/95) (1391/190,-2283/190)%0A(0,0) (1303/95,-4263/190) (-3779/190,3006/95) (3203/190,-5219/190)%0A(0,0) (1303/95,-4263/190) (-8527/190,6848/95) (1003/38,-1631/38)%0A(0,0) (-1,2) (-1,2) (-1,2)%0A(0,0) (-2423/190,3969/190) (-3006/95,9791/190) (-3779/190,3101/95)%0A(0,0) (620/19,-997/19) (-338/95,529/95) (1252/95,-2041/95)%0A(0,0) (4568/95,-7359/95) (226/19,-369/19) (544/19,-883/19)%0A(0,0) (1593/38,-1279/19) (5359/190,-8717/190) (1756/95,-5731/190)%0A(0,0) (5029/190,-4021/95) (2423/190,-3969/190) (288/95,-983/190)%0A(0,0) (6906/95,-11193/95) (164/95,-237/95) (2036/95,-3313/95)%0A(0,0) (5942/95,-19287/190) (-843/190,727/95) (7171/190,-11653/190)%0A(0,0) (3006/95,-9791/190) (-3779/190,3101/95) (2423/190,-3969/190)%0A(0,0) (794/19,-1289/19) (-1304/95,2137/95) (-338/95,529/95)%0A(0,0) (-887/95,1411/95) (3397/95,-5526/95) (-4134/95,6682/95)%0A(0,0) (-1851/95,5921/190) (1593/38,-1298/19) (-5169/190,8337/190)%0A(0,0) (-1851/95,5921/190) (-1593/38,1298/19) (5169/190,-8337/190)%0A(0,0) (-1398/95,4453/190) (-8527/190,6943/95) (965/38,-1555/38)%0A(0,0) (2267/95,-3681/95) (-495/19,794/19) (52/95,-96/95)%0A(0,0) (-315/19,507/19) (-6317/95,10186/95) (-854/95,1372/95)%0A(0,0) (1833/95,-3004/95) (0,0) (3779/95,-6107/95)%0A(0,0) (-1,1) (0,0) (3779/95,-6107/95)%0A(0,0) (52/95,-96/95) (2267/95,-3681/95) (495/19,-794/19)%0A(0,0) (3203/190,-5219/190) (1303/95,-4263/190) (3779/190,-3006/95)%0A(0,0) (-125/19,203/19) (1,-1) (-2718/95,4404/95)%0A(0,0) (-125/19,203/19) (-1833/95,3004/95) (-2718/95,4404/95)%0A(0,0) (1200/19,-1945/19) (-1632/95,2611/95) (2036/95,-3313/95)%0A(0,0) (5036/95,-16351/190) (-2093/190,1647/95) (7171/190,-11653/190)%0A(0,0) (-6906/95,11193/95) (164/95,-237/95) (-2036/95,3313/95)%0A(0,0) (-5942/95,19287/190) (-843/190,727/95) (-7171/190,11653/190)%0A(0,0) (-3006/95,9791/190) (-3779/190,3101/95) (-2423/190,3969/190)%0A(0,0) (-794/19,1289/19) (-1304/95,2137/95) (338/95,-529/95)%0A(0,0) (3962/95,-6401/95) (434/95,-677/95) (-3678/95,5979/95)%0A(0,0) (3056/95,-4933/95) (434/95,-677/95) (-1304/95,2137/95)%0A(0,0) (3013/190,-4839/190) (1398/95,-4453/190) (-3779/190,3101/95)%0A(0,0) (965/38,-1555/38) (1398/95,-4453/190) (-8527/190,6943/95)%0A(0,0) (-226/19,369/19) (544/19,-883/19) (-4568/95,7359/95)%0A(0,0) (-958/95,1564/95) (2267/95,-3681/95) (-4849/95,7812/95)%0A(0,0) (-1003/38,1631/38) (1303/95,-4263/190) (-8527/190,6848/95)%0A(0,0) (8527/190,-6943/95) (965/38,-1555/38) (1398/95,-4453/190)%0A(0,0) (3779/190,-3101/95) (3013/190,-4839/190) (1398/95,-4453/190)%0A(0,0) (-1593/38,1279/19) (5359/190,-8717/190) (1756/95,-5731/190)%0A(0,0) (-5029/190,4021/95) (2423/190,-3969/190) (288/95,-983/190)%0A(0,0) (3779/190,-3101/95) (2423/190,-3969/190) (3006/95,-9791/190)%0A(0,0) (1,-2) (1,-2) (1,-2)%0A(0,0) (-1632/95,2611/95) (2036/95,-3313/95) (-1200/19,1945/19)%0A(0,0) (-164/95,237/95) (2036/95,-3313/95) (-6906/95,11193/95)%0A(0,0) (-3408/95,5539/95) (5146/95,-8353/95) (-430/19,693/19)%0A(0,0) (-4876/95,7913/95) (5146/95,-8353/95) (-1244/95,1997/95)%0A(0,0) (1833/95,-3004/95) (656/19,-1062/19) (-6153/95,9949/95)%0A(0,0) (1833/95,-3004/95) (0,0) (-3779/95,6107/95)%0A(0,0) (-1,1) (656/19,-1062/19) (-6153/95,9949/95)%0A(0,0) (-6317/95,10186/95) (-352/19,568/19) (3043/95,-4909/95)%0A(0,0) (-11463/190,9222/95) (-421/190,653/190) (4007/95,-12917/190)%0A(0,0) (-1008/19,1630/19) (-267/5,431/5) (53/5,-84/5)%0A(0,0) (-6981/190,11273/190) (-6037/95,19477/190) (843/190,-632/95)%0A(0,0) (-2233/190,3589/190) (-3101/95,9981/190) (3779/190,-3006/95)%0A(0,0) (-2666/95,4308/95) (-2137/95,3441/95) (495/19,-794/19)%0A(0,0) (338/95,-529/95) (1252/95,-2041/95) (620/19,-997/19)%0A(0,0) (-2036/95,3313/95) (1200/19,-1945/19) (1632/95,-2611/95)%0A(0,0) (-7171/190,11653/190) (5036/95,-16351/190) (2093/190,-1647/95)%0A(0,0) (-2423/190,3969/190) (288/95,-983/190) (5029/190,-4021/95)%0A(0,0) (-6153/95,9949/95) (-1833/95,3004/95) (-656/19,1062/19)%0A(0,0) (-6153/95,9949/95) (1,-1) (-656/19,1062/19)%0A(0,0) (-268/5,434/5) (281/95,-453/95) (-1833/95,3004/95)%0A(0,0) (-2718/95,4404/95) (-125/19,203/19) (-1833/95,3004/95)%0A(0,0) (-4186/95,6778/95) (937/19,-1515/19) (-1833/95,3004/95)%0A(0,0) (4186/95,-6778/95) (937/19,-1515/19) (-1833/95,3004/95)%0A(0,0) (2718/95,-4404/95) (-125/19,203/19) (-1833/95,3004/95)%0A(0,0) (268/5,-434/5) (281/95,-453/95) (-1833/95,3004/95)%0A(0,0) (268/5,-434/5) (-281/95,453/95) (-1833/95,3004/95)%0A(0,0) (2718/95,-4404/95) (125/19,-203/19) (-1833/95,3004/95)%0A(0,0) (4186/95,-6778/95) (-937/19,1515/19) (-1833/95,3004/95)%0A(0,0) (656/19,-1062/19) (-6153/95,9949/95) (-1833/95,3004/95)%0A(0,0) (-4186/95,6778/95) (-937/19,1515/19) (-1833/95,3004/95)%0A(0,0) (-2718/95,4404/95) (125/19,-203/19) (-1833/95,3004/95)%0A(0,0) (-268/5,434/5) (-281/95,453/95) (-1833/95,3004/95)%0A(0,0) (4568/95,-7359/95) (-226/19,369/19) (544/19,-883/19)%0A(0,0) (620/19,-997/19) (338/95,-529/95) (1252/95,-2041/95)%0A(0,0) (5029/190,-4021/95) (-2423/190,3969/190) (288/95,-983/190)%0A(0,0) (1593/38,-1279/19) (-5359/190,8717/190) (1756/95,-5731/190)%0A(0,0) (-1,2) (-1,2) (1,-2)%0A(0,0) (-2444/95,7979/190) (-11463/190,9317/95) (-1201/190,1903/190)%0A(0,0) (-2718/95,4404/95) (-125/19,203/19) (1,-1)%0A(0,0) (-268/5,434/5) (-281/95,453/95) (1833/95,-3004/95)%0A(0,0) (-2718/95,4404/95) (125/19,-203/19) (1833/95,-3004/95)%0A(0,0) (656/19,-1062/19) (-6153/95,9949/95) (1833/95,-3004/95)%0A(0,0) (4186/95,-6778/95) (-937/19,1515/19) (1833/95,-3004/95)%0A(0,0) (2718/95,-4404/95) (125/19,-203/19) (1833/95,-3004/95)%0A(0,0) (268/5,-434/5) (-281/95,453/95) (1833/95,-3004/95)%0A(0,0) (268/5,-434/5) (281/95,-453/95) (1833/95,-3004/95)%0A(0,0) (2718/95,-4404/95) (-125/19,203/19) (1833/95,-3004/95)%0A(0,0) (4186/95,-6778/95) (937/19,-1515/19) (1833/95,-3004/95)%0A(0,0) (656/19,-1062/19) (6153/95,-9949/95) (1833/95,-3004/95)%0A(0,0) (0,0) (3779/95,-6107/95) (1833/95,-3004/95)%0A(0,0) (-268/5,434/5) (281/95,-453/95) (1833/95,-3004/95)%0A(0,0) (434/95,-677/95) (3678/95,-5979/95) (-3962/95,6401/95)%0A(0,0) (434/95,-677/95) (1304/95,-2137/95) (-3056/95,4933/95)%0A(0,0) (1304/95,-2137/95) (-3056/95,4933/95) (-434/95,677/95)%0A(0,0) (3678/95,-5979/95) (-3962/95,6401/95) (-434/95,677/95)%0A(0,0) (8527/190,-6943/95) (-965/38,1555/38) (-1398/95,4453/190)%0A(0,0) (3779/190,-3101/95) (-3013/190,4839/190) (-1398/95,4453/190)%0A(0,0) (5942/95,-19287/190) (843/190,-727/95) (7171/190,-11653/190)%0A(0,0) (3006/95,-9791/190) (3779/190,-3101/95) (2423/190,-3969/190)%0A(0,0) (6037/95,-19477/190) (-843/190,632/95) (-6981/190,11273/190)%0A(0,0) (267/5,-431/5) (-53/5,84/5
920) (-1008/19,1630/19)%0A(0,0) (887/95,-1411/95) (-3397/95,5526/95) (4134/95,-6682/95)%0A(0,0) (-4876/95,7913/95) (-5146/95,8353/95) (1244/95,-1997/95)%0A(0,0) (-3408/95,5539/95) (-5146/95,8353/95) (430/19,-693/19)%0A(0,0) (434/95,-677/95) (-1304/95,2137/95) (3056/95,-4933/95)%0A(0,0) (434/95,-677/95) (-3678/95,5979/95) (3962/95,-6401/95)%0A(0,0) (3397/95,-5526/95) (4134/95,-6682/95) (-887/95,1411/95)%0A(0,0) (1929/95,-3152/95) (2666/95,-4308/95) (581/95,-963/95)%0A(0,0) (-6317/95,10186/95) (352/19,-568/19) (-3043/95,4909/95)%0A(0,0) (-6317/95,10186/95) (854/95,-1372/95) (-315/19,507/19)%0A(0,0) (-495/19,794/19) (-52/95,96/95) (2267/95,-3681/95)%0A(0,0) (-4849/95,7812/95) (-958/95,1564/95) (2267/95,-3681/95)%0A(0,0) (-4568/95,7359/95) (-226/19,369/19) (544/19,-883/19)%0A(0,0) (-620/19,997/19) (338/95,-529/95) (1252/95,-2041/95)%0A(0,0) (-1632/95,2611/95) (-2036/95,3313/95) (1200/19,-1945/19)%0A(0,0) (-164/95,237/95) (-2036/95,3313/95) (6906/95,-11193/95)%0A(0,0) (1304/95,-2137/95) (338/95,-529/95) (794/19,-1289/19)%0A(0,0) (5146/95,-8353/95) (1244/95,-1997/95) (4876/95,-7913/95)%0A(0,0) (5146/95,-8353/95) (430/19,-693/19) (3408/95,-5539/95)%0A(0,0) (1304/95,-2137/95) (3056/95,-4933/95) (-434/95,677/95)%0A(0,0) (3678/95,-5979/95) (3962/95,-6401/95) (-434/95,677/95)%0A(0,0) (-6153/95,9949/95) (1833/95,-3004/95) (656/19,-1062/19)%0A(0,0) (-6153/95,9949/95) (-1,1) (656/19,-1062/19)%0A(0,0) (-794/19,1289/19) (1304/95,-2137/95) (-338/95,529/95)%0A(0,0) (854/95,-1372/95) (-315/19,507/19) (6317/95,-10186/95)%0A(0,0) (-1391/190,2283/190) (-2539/95,8169/190) (11463/190,-9222/95)%0A(0,0) (2423/190,-3969/190) (3006/95,-9791/190) (3779/190,-3101/95)%0A(0,0) (1833/95,-3004/95) (268/5,-434/5) (281/95,-453/95)%0A(0,0) (1833/95,-3004/95) (268/5,-434/5) (-281/95,453/95)%0A(0,0) (-1,1) (268/5,-434/5) (-281/95,453/95)%0A(0,0) (-1,1) (268/5,-434/5) (281/95,-453/95)%0A(0,0) (53/5,-84/5) (-1008/19,1630/19) (-267/5,431/5)%0A(0,0) (843/190,-632/95) (-6981/190,11273/190) (-6037/95,19477/190)%0A(0,0) (3779/190,-3006/95) (-2233/190,3589/190) (-3101/95,9981/190)%0A(0,0) (495/19,-794/19) (-2666/95,4308/95) (-2137/95,3441/95)%0A(0,0) (-581/95,963/95) (1929/95,-3152/95) (2666/95,-4308/95)%0A(0,0) (4167/95,-6721/95) (461/95,-778/95) (1008/19,-1630/19)%0A(0,0) (5131/95,-16541/190) (2093/190,-1742/95) (6981/190,-11273/190)%0A(0,0) (383/95,-1173/190) (5029/190,-4116/95) (2233/190,-3589/190)%0A(0,0) (11463/190,-9317/95) (-1201/190,1903/190) (-2444/95,7979/190)%0A(0,0) (11463/190,-9317/95) (611/190,-1033/190) (-3912/95,12727/190)%0A(0,0) (-1304/95,2137/95) (-338/95,529/95) (-794/19,1289/19)%0A(0,0) (-6981/190,11273/190) (-5131/95,16541/190) (2093/190,-1742/95)%0A(0,0) (-2233/190,3589/190) (-383/95,1173/190) (5029/190,-4116/95)%0A(0,0) (11463/190,-9317/95) (1201/190,-1903/190) (-2444/95,7979/190)%0A(0,0) (-3056/95,4933/95) (-434/95,677/95) (-1304/95,2137/95)%0A(0,0) (-430/19,693/19) (3408/95,-5539/95) (-5146/95,8353/95)%0A(0,0) (-1201/190,1903/190) (2444/95,-7979/190) (-11463/190,9317/95)%0A(0,0) (-3013/190,4839/190) (-1398/95,4453/190) (-3779/190,3101/95)%0A(0,0) (-3203/190,5219/190) (1303/95,-4263/190) (-3779/190,3006/95)%0A(0,0) (-1391/190,2283/190) (-2539/95,8169/190) (-11463/190,9222/95)%0A(0,0) (0,0) (-2,3) (-1,1)%0A(0,0) (581/95,-963/95) (1929/95,-3152/95) (-2666/95,4308/95)%0A(0,0) (-4167/95,6721/95) (461/95,-778/95) (-1008/19,1630/19)%0A(0,0) (-5131/95,16541/190) (2093/190,-1742/95) (-6981/190,11273/190)%0A(0,0) (-383/95,1173/190) (5029/190,-4116/95) (-2233/190,3589/190)%0A(0,0) (268/5,-434/5) (-281/95,453/95) (1,-1)%0A(0,0) (268/5,-434/5) (281/95,-453/95) (1,-1)%0A(0,0) (2718/95,-4404/95) (-125/19,203/19) (1,-1)%0A(0,0) (4186/95,-6778/95) (937/19,-1515/19) (1,-1)%0A(0,0) (4186/95,-6778/95) (-937/19,1515/19) (1,-1)%0A(0,0) (656/19,-1062/19) (-6153/95,9949/95) (1,-1)%0A(0,0) (338/95,-529/95) (-1252/95,2041/95) (-620/19,997/19)%0A(0,0) (-2036/95,3313/95) (-1200/19,1945/19) (-1632/95,2611/95)%0A(0,0) (-7171/190,11653/190) (-5036/95,16351/190) (-2093/190,1647/95)%0A(0,0) (-2423/190,3969/190) (-288/95,983/190) (-5029/190,4021/95)%0A(0,0) (-2036/95,3313/95) (6906/95,-11193/95) (164/95,-237/95)%0A(0,0) (338/95,-529/95) (794/19,-1289/19) (-1304/95,2137/95)%0A(0,0) (-2423/190,3969/190) (3006/95,-9791/190) (-3779/190,3101/95)%0A(0,0) (-7171/190,11653/190) (5942/95,-19287/190) (-843/190,727/95)%0A(0,0) (3962/95,-6401/95) (434/95,-677/95) (3678/95,-5979/95)%0A(0,0) (4134/95,-6682/95) (887/95,-1411/95) (3397/95,-5526/95)%0A(0,0) (1,-1) (-4186/95,6778/95) (937/19,-1515/19)%0A(0,0) (1,-1) (-2718/95,4404/95) (-125/19,203/19)%0A(0,0) (1008/19,-1630/19) (-267/5,431/5) (53/5,-84/5)%0A(0,0) (6981/190,-11273/190) (-6037/95,19477/190) (843/190,-632/95)%0A(0,0) (164/95,-237/95) (2036/95,-3313/95) (-6906/95,11193/95)%0A(0,0) (-843/190,727/95) (7171/190,-11653/190) (-5942/95,19287/190)%0A(0,0) (6906/95,-11193/95) (-164/95,237/95) (2036/95,-3313/95)%0A(0,0) (794/19,-1289/19) (1304/95,-2137/95) (-338/95,529/95)%0A(0,0) (-2666/95,4308/95) (-581/95,963/95) (1929/95,-3152/95)%0A(0,0) (-2233/190,3589/190) (383/95,-1173/190) (5029/190,-4116/95)%0A(0,0) (-6981/190,11273/190) (5131/95,-16541/190) (2093/190,-1742/95)%0A(0,0) (-1008/19,1630/19) (4167/95,-6721/95) (461/95,-778/95)%0A(0,0) (268/5,-434/5) (-281/95,453/95) (-1,1)%0A(0,0) (2718/95,-4404/95) (125/19,-203/19) (-1,1)%0A(0,0) (4186/95,-6778/95) (-937/19,1515/19) (-1,1)%0A(0,0) (656/19,-1062/19) (-6153/95,9949/95) (-1,1)%0A(0,0) (430/19,-693/19) (3408/95,-5539/95) (-5146/95,8353/95)%0A(0,0) (1201/190,-1903/190) (2444/95,-7979/190) (-11463/190,9317/95)%0A(0,0) (-611/190,1033/190) (3912/95,-12727/190) (-11463/190,9317/95)%0A(0,0) (1244/95,-1997/95) (4876/95,-7913/95) (-5146/95,8353/95)%0A(0,0) (164/95,-237/95) (-2036/95,3313/95) (6906/95,-11193/95)%0A(0,0) (-1304/95,2137/95) (338/95,-529/95) (794/19,-1289/19)%0A(0,0) (-3779/190,3101/95) (-2423/190,3969/190) (3006/95,-9791/190)%0A(0,0) (-843/190,727/95) (-7171/190,11653/190) (5942/95,-19287/190)%0A(0,0) (2,-3) (-1,1) (0,0)%0A(0,0) (3101/95,-9981/190) (-3779/190,3006/95) (-2233/190,3589/190)%0A(0,0) (-2423/190,3969/190) (-3006/95,9791/190) (3779/190,-3101/95)%0A(0,0) (3013/190,-4839/190) (1398/95,-4453/190) (3779/190,-3101/95)%0A(0,0) (-6981/190,11273/190) (6037/95,-19477/190) (-843/190,632/95)%0A(0,0) (-1008/19,1630/19) (267/5,-431/5) (-53/5,84/5
920)%0A(0,0) (-3408/95,5539/95) (-5146/95,8353/95) (-430/19,693/19)%0A(0,0) (338/95,-529/95) (-794/19,1289/19) (-1304/95,2137/95)%0A(0,0) (-1303/95,4263/190) (-8527/190,6848/95) (-1003/38,1631/38)%0A(0,0) (-1756/95,5731/190) (-1593/38,1279/19) (-5359/190,8717/190)%0A(0,0) (-288/95,983/190) (-5029/190,4021/95) (-2423/190,3969/190)%0A(0,0) (-3962/95,6401/95) (-434/95,677/95) (-3678/95,5979/95)%0A(0,0) (-965/38,1555/38) (-1398/95,4453/190) (-8527/190,6943/95)%0A(0,0) (-4134/95,6682/95) (-887/95,1411/95) (-3397/95,5526/95)%0A(0,0) (-5169/190,8337/190) (-1851/95,5921/190) (-1593/38,1298/19)%0A(0,0) (937/19,-1515/19) (-1833/95,3004/95) (-4186/95,6778/95)%0A(0,0) (937/19,-1515/19) (1,-1) (-4186/95,6778/95)%0A(0,0) (6153/95,-9949/95) (1,-1) (-656/19,1062/19)%0A(0,0) (6153/95,-9949/95) (-1833/95,3004/95) (-656/19,1062/19)%0A(0,0) (-1593/38,1298/19) (-5169/190,8337/190) (-1851/95,5921/190)%0A(0,0) (-3397/95,5526/95) (-4134/95,6682/95) (-887/95,1411/95)%0A(0,0) (352/19,-568/19) (3043/95,-4909/95) (-6317/95,10186/95)%0A(0,0) (421/190,-653/190) (4007/95,-12917/190) (-11463/190,9222/95)%0A(0,0) (2666/95,-4308/95) (2137/95,-3441/95) (-495/19,794/19)%0A(0,0) (-1303/95,4263/190) (8527/190,-6848/95) (1003/38,-1631/38)%0A(0,0) (-1756/95,5731/190) (1593/38,-1279/19) (5359/190,-8717/190)%0A(0,0) (-5942/95,19287/190) (-843/190,727/95) (7171/190,-11653/190)%0A(0,0) (-4134/95,6682/95) (887/95,-1411/95) (3397/95,-5526/95)%0A(0,0) (-854/95,1372/95) (315/19,-507/19) (-6317/95,10186/95)%0A(0,0) (52/95,-96/95) (-2267/95,3681/95) (-495/19,794/19)%0A(0,0) (958/95,-1564/95) (-2267/95,3681/95) (-4849/95,7812/95)%0A(0,0) (2036/95,-3313/95) (-6906/95,11193/95) (-164/95,237/95)%0A(0,0) (-338/95,529/95) (-794/19,1289/19) (1304/95,-2137/95)%0A(0,0) (-1244/95,1997/95) (-4876/95,7913/95) (5146/95,-8353/95)%0A(0,0) (-430/19,693/19) (-3408/95,5539/95) (5146/95,-8353/95)%0A(0,0) (-3056/95,4933/95) (434/95,-677/95) (1304/95,-2137/95)%0A(0,0) (-3962/95,6401/95) (434/95,-677/95) (3678/95,-5979/95)%0A(0,0) (6317/95,-10186/95) (854/95,-1372/95) (-315/19,507/19)%0A(0,0) (6317/95,-10186/95) (352/19,-568/19) (-3043/95,4909/95)%0A(0,0) (-267/5,431/5) (-53/5,84/5) (1008/19,-1630/19)%0A(0,0) (1003/38,-1631/38) (-1303/95,4263/190) (-8527/190,6848/95)%0A(0,0) (5029/190,-4116/95) (2233/190,-3589/190) (383/95,-1173/190)%0A(0,0) (1593/38,-1298/19) (5169/190,-8337/190) (1851/95,-5921/190)%0A(0,0) (352/19,-568/19) (3043/95,-4909/95) (6317/95,-10186/95)%0A(0,0) (2666/95,-4308/95) (2137/95,-3441/95) (495/19,-794/19)%0A(0,0) (-11463/190,9222/95) (421/190,-653/190) (-4007/95,12917/190)%0A(0,0) (-11463/190,9222/95) (-1391/190,2283/190) (-2539/95,8169/190)%0A(0,0) (2423/190,-3969/190) (3006/95,-9791/190) (-3779/190,3101/95)%0A(0,0) (7171/190,-11653/190) (5942/95,-19287/190) (-843/190,727/95)%0A(0,0) (7171/190,-11653/190) (5036/95,-16351/190) (2093/190,-1647/95)%0A(0,0) (2423/190,-3969/190) (288/95,-983/190) (5029/190,-4021/95)%0A(0,0) (5359/190,-8717/190) (1756/95,-5731/190) (1593/38,-1279/19)%0A(0,0) (1398/95,-4453/190) (-3779/190,3101/95) (3013/190,-4839/190)%0A(0,0) (1398/95,-4453/190) (-8527/190,6943/95) (965/38,-1555/38)%0A(0,0) (3397/95,-5526/95) (-4134/95,6682/95) (-887/95,1411/95)%0A(0,0) (1593/38,-1298/19) (-5169/190,8337/190) (-1851/95,5921/190)%0A(0,0) (-887/95,1411/95) (3397/95,-5526/95) (4134/95,-6682/95)%0A(0,0) (7171/190,-11653/190) (5036/95,-16351/190) (-2093/190,1647/95)%0A(0,0) (2423/190,-3969/190) (288/95,-983/190) (-5029/190,4021/95)%0A(0,0) (1929/95,-3152/95) (-2666/95,4308/95) (-581/95,963/95)%0A(0,0) (3397/95,-5526/95) (-4134/95,6682/95) (887/95,-1411/95)%0A(0,0) (-3779/190,3006/95) (-3203/190,5219/190) (1303/95,-4263/190)%0A(0,0) (-1833/95,3004/95) (-4186/95,6778/95) (-937/19,1515/19)%0A(0,0) (1,-1) (-4186/95,6778/95) (-937/19,1515/19)%0A(0,0) (2137/95,-3441/95) (-495/19,794/19) (-2666/95,4308/95)%0A(0,0) (-2267/95,3681/95) (-4849/95,7812/95) (958/95,-1564/95)%0A(0,0) (-544/19,883/19) (-4568/95,7359/95) (226/19,-369/19)%0A(0,0) (-1252/95,2041/95) (-620/19,997/19) (-338/95,529/95)%0A(0,0) (-1200/19,1945/19) (-1632/95,2611/95) (2036/95,-3313/95)%0A(0,0) (-6906/95,11193/95) (-164/95,237/95) (2036/95,-3313/95)%0A(0,0) (5169/190,-8337/190) (-1851/95,5921/190) (1593/38,-1298/19)%0A(0,0) (4134/95,-6682/95) (-887/95,1411/95) (3397/95,-5526/95)%0A(0,0) (-1756/95,5731/190) (-1593/38,1279/19) (5359/190,-8717/190)%0A(0,0) (-1303/95,4263/190) (-8527/190,6848/95) (1003/38,-1631/38)%0A(0,0) (-430/19,693/19) (-3408/95,5539/95) (-5146/95,8353/95)%0A(0,0) (-1201/190,1903/190) (-2444/95,7979/190) (-11463/190,9317/95)%0A(0,0) (611/190,-1033/190) (-3912/95,12727/190) (-11463/190,9317/95)%0A(0,0) (-1244/95,1997/95) (-4876/95,7913/95) (-5146/95,8353/95)%0A(0,0) (3203/190,-5219/190) (1303/95,-4263/190) (-3779/190,3006/95)%0A(0,0) (1391/190,-2283/190) (-2539/95,8169/190) (-11463/190,9222/95)%0A(0,0) (1833/95,-3004/95) (2718/95,-4404/95) (-125/19,203/19)%0A(0,0) (-1,1) (2718/95,-4404/95) (-125/19,203/19)%0A(0,0) (-1,1) (4186/95,-6778/95) (937/19,-1515/19)%0A(0,0) (1833/95,-3004/95) (4186/95,-6778/95) (937/19,-1515/19)%0A(0,0) (1833/95,-3004/95) (-4186/95,6778/95) (-937/19,1515/19)%0A(0,0) (1833/95,-3004/95) (-656/19,1062/19) (-6153/95,9949/95)%0A(0,0) (-5169/190,8337/190) (1851/95,-5921/190) (1593/38,-1298/19)%0A(0,0) (-965/38,1555/38) (1398/95,-4453/190) (8527/190,-6943/95)%0A(0,0) (-3013/190,4839/190) (1398/95,-4453/190) (3779/190,-3101/95)%0A(0,0) (-1201/190,1903/190) (-2444/95,7979/190) (11463/190,-9317/95)%0A(0,0) (611/190,-1033/190) (-3912/95,12727/190) (11463/190,-9317/95)%0A(0,0) (2423/190,-3969/190) (-3006/95,9791/190) (3779/190,-3101/95)%0A(0,0) (-1244/95,1997/95) (4876/95,-7913/95) (-5146/95,8353/95)%0A(0,0) (611/190,-1033/190) (3912/95,-12727/190) (-11463/190,9317/95)%0A(0,0) (-2,3) (1,-1) (0,0)%0A(0,0) (-1851/95,5921/190) (-1593/38,1298/19) (-5169/190,8337/190)%0A(0,0) (1833/95,-3004/95) (656/19,-1062/19) (6153/95,-9949/95)%0A(0,0) (1833/95,-3004/95) (4186/95,-6778/95) (-937/19,1515/19)%0A(0,0) (1833/95,-3004/95) (2718/95,-4404/95) (125/19,-203/19)%0A(0,0) (-3779/190,3101/95) (2423/190,-3969/190) (3006/95,-9791/190)%0A(0,0) (-843/190,727/95) (7171/190,-11653/190) (5942/95,-19287/190)%0A(0,0) (2093/190,-1647/95) (7171/190,-11653/190) (5036/95,-16351/190)%0A(0,0) (-2036/95,3313/95) (6906/95,-11193/95) (-164/95,237/95)%0A(0,0) (1252/95,-2041/95) (620/19,-997/19) (-338/95,529/95)%0A(0,0) (288/95,-983/190) (5029/190,-4021/95) (2423/190,-3969/190)%0A(0,0) (-6906/95,11193/95) (164/95,-237/95) (2036/95,-3313/95)%0A(0,0) (-544/19,883/19) (4568/95,-7359/95) (226/19,-369/19)%0A(0,0) (-2267/95,3681/95) (4849/95,-7812/95) (958/95,-1564/95)%0A(0,0) (-2267/95,3681/95) (495/19,-794/19) (52/95,-96/95)%0A(0,0) (-1,1) (656/19,-1062/19) (6153/95,-9949/95)%0A(0,0) (1632/95,-2611/95) (2036/95,-3313/95) (-1200/19,1945/19)%0A(0,0) (2093/190,-1647/95) (7171/190,-11653/190) (-5036/95,16351/190)%0A(0,0) (-887/95,1411/95) (-3397/95,5526/95) (-4134/95,6682/95)%0A(0,0) (0,0) (1,-1) (-1,2)%0A(0,0) (-1303/95,4263/190) (3779/190,-3006/95) (3203/190,-5219/190)%0A(0,0) (338/95,-529/95) (-794/19,1289/19) (1304/95,-2137/95)%0A(0,0) (-2093/190,1647/95) (-7171/190,11653/190) (5036/95,-16351/190)%0A(0,0) (843/190,-727/95) (-7171/190,11653/190) (5942/95,-19287/190)%0A(0,0) (2718/95,-4404/95) (125/19,-203/19) (1,-1)%0A(0,0) (1632/95,-2611/95) (-2036/95,3313/95) (-1200/19,1945/19)%0A(0,0) (2093/190,-1647/95) (-7171/190,11653/190) (-5036/95,16351/190)%0A(0,0) (11463/190,-9317/95) (-1201/190,1903/190) (2444/95,-7979/190)%0A(0,0) (5146/95,-8353/95) (-430/19,693/19) (3408/95,-5539/95)%0A(0,0) (-338/95,529/95) (-794/19,1289/19) (-1304/95,2137/95)%0A(0,0) (2036/95,-3313/95) (-6906/95,11193/95) (164/95,-237/95)%0A(0,0) (2036/95,-3313/95) (-1200/19,1945/19) (1632/95,-2611/95)%0A(0,0) (-338/95,529/95) (-1252/95,2041/95) (620/19,-997/19)%0A(0,0) (226/19,-369/19) (-544/19,883/19) (4568/95,-7359/95)%0A(0,0) (958/95,-1564/95) (-2267/95,3681/95) (4849/95,-7812/95)%0A(0,0) (-1008/19,1630/19) (267/5,-431/5) (53/5,-84/5)%0A(0,0) (-1008/19,1630/19) (4167/95,-6721/95) (-461/95,778/95)%0A(0,0) (4849/95,-7812/95) (958/95,-1564/95) (2267/95,-3681/95)%0A(0,0) (8527/190,-6848/95) (1003/38,-1631/38) (1303/95,-4263/190)%0A(0,0) (-434/95,677/95) (1304/95,-2137/95) (3056/95,-4933/95)%0A(0,0) (3408/95,-5539/95) (5146/95,-8353/95) (430/19,-693/19)%0A(0,0) (2444/95,-7979/190) (11463/190,-9317/95) (1201/190,-1903/190)%0A(0,0) (-1398/95,4453/190) (3779/190,-3101/95) (3013/190,-4839/190)%0A(0,0) (4876/95,-7913/95) (-5146/95,8353/95) (-1244/95,1997/95)%0A(0,0) (3912/95,-12727/190) (-11463/190,9317/95) (611/190,-1033/190)%0A(0,0) (-338/95,529/95) (794/19,-1289/19) (-1304/95,2137/95)%0A(0,0) (-52/95,96/95) (2267/95,-3681/95) (-495/19,794/19)%0A(0,0) (854/95,-1372/95) (-315/19,507/19) (-6317/95,10186/95)%0A(0,0) (6153/95,-9949/95) (-1833/95,3004/95) (656/19,-1062/19)%0A(0,0) (6153/95,-9949/95) (1,-1) (656/19,-1062/19)%0A(0,0) (2666/95,-4308/95) (-581/95,963/95) (-1929/95,3152/95)%0A(0,0) (2233/190,-3589/190) (383/95,-1173/190) (-5029/190,4116/95)%0A(0,0) (-1593/38,1298/19) (5169/190,-8337/190) (1851/95,-5921/190)%0A(0,0) (-268/5,434/5) (-281/95,453/95) (-1,1)%0A(0,0) (-2718/95,4404/95) (125/19,-203/19) (-1,1)%0A(0,0) (4849/95,-7812/95) (958/95,-1564/95) (-2267/95,3681/95)%0A(0,0) (8527/190,-6848/95) (1003/38,-1631/38) (-1303/95,4263/190)%0A(0,0) (-1398/95,4453/190) (-3779/190,3101/95) (3013/190,-4839/190)%0A(0,0) (2444/95,-7979/190) (-11463/190,9317/95) (1201/190,-1903/190)%0A(0,0) (-3779/190,3006/95) (2233/190,-3589/190) (3101/95,-9981/190)%0A(0,0) (-843/190,632/95) (6981/190,-11273/190) (6037/95,-19477/190)%0A(0,0) (1252/95,-2041/95) (-620/19,997/19) (338/95,-529/95)%0A(0,0) (288/95,-983/190) (-5029/190,4021/95) (-2423/190,3969/190)%0A(0,0) (5036/95,-16351/190) (-2093/190,1647/95) (-7171/190,11653/190)%0A(0,0) (1200/19,-1945/19) (-1632/95,2611/95) (-2036/95,3313/95)%0A(0,0) (854/95,-1372/95) (315/19,-507/19) (-6317/95,10186/95)%0A(0,0) (-1391/190,2283/190) (2539/95,-8169/190) (-11463/190,9222/95)%0A(0,0) (-7171/190,11653/190) (-5942/95,19287/190) (843/190,-727/95)%0A(0,0) (-434/95,677/95) (3678/95,-5979/95) (3962/95,-6401/95)%0A(0,0) (-1398/95,4453/190) (8527/190,-6943/95) (965/38,-1555/38)%0A(0,0) (-6037/95,19477/190) (843/190,-632/95) (6981/190,-11273/190)%0A(0,0) (-5131/95,16541/190) (-2093/190,1742/95) (6981/190,-11273/190)%0A(0,0) (-11463/190,9222/95) (1391/190,-2283/190) (-2539/95,8169/190)%0A(0,0) (-6317/95,10186/95) (-854/95,1372/95) (-315/19,507/19)%0A(0,0) (5359/190,-8717/190) (1756/95,-5731/190) (-1593/38,1279/19)%0A(0,0) (-4568/95,7359/95) (226/19,-369/19) (544/19,-883/19)%0A(0,0) (-620/19,997/19) (-338/95,529/95) (1252/95,-2041/95)%0A(0,0) (430/19,-693/19) (3408/95,-5539/95) (5146/95,-8353/95)%0A(0,0) (1201/190,-1903/190) (2444/95,-7979/190) (11463/190,-9317/95)%0A(0,0) (-3043/95,4909/95) (-6317/95,10186/95) (-352/19,568/19)%0A(0,0) (4849/95,-7812/95) (-958/95,1564/95) (-2267/95,3681/95)%0A(0,0) (495/19,-794/19) (-52/95,96/95) (-2267/95,3681/95)%0A(0,0) (6317/95,-10186/95) (854/95,-1372/95) (315/19,-507/19)%0A(0,0) (-6981/190,11273/190) (5131/95,-16541/190) (-2093/190,1742/95)%0A(0,0) (-6981/190,11273/190) (6037/95,-19477/190) (843/190,-632/95)%0A(0,0) (-383/95,1173/190) (-5029/190,4116/95) (2233/190,-3589/190)%0A(0,0) (-3397/95,5526/95) (4134/95,-6682/95) (887/95,-1411/95)%0A(0,0) (6317/95,-10186/95) (352/19,-568/19) (3043/95,-4909/95)%0A(0,0) (-5146/95,8353/95) (1244/95,-1997/95) (-4876/95,7913/95)%0A(0,0) (-5146/95,8353/95) (430/19,-693/19) (-3408/95,5539/95)%0A(0,0) (-1304/95,2137/95) (3056/95,-4933/95) (434/95,-677/95)%0A(0,0) (-3678/95,5979/95) (3962/95,-6401/95) (434/95,-677/95)%0A(0,0) (-2444/95,7979/190) (-11463/190,9317/95) (1201/190,-1903/190)%0A(0,0) (-3912/95,12727/190) (-11463/190,9317/95) (-611/190,1033/190)%0A(0,0) (2093/190,-1742/95) (6981/190,-11273/190) (5131/95,-16541/190)%0A(0,0) (-11463/190,9317/95) (-611/190,1033/190) (-3912/95,12727/190)%0A(0,0) (-11463/190,9317/95) (1201/190,-1903/190) (-2444/95,7979/190)%0A(0,0) (-3043/95,4909/95) (6317/95,-10186/95) (-352/19,568/19)%0A(0,0) (-315/19,507/19) (6317/95,-10186/95) (-854/95,1372/95)%0A(0,0) (1200/19,-1945/19) (1632/95,-2611/95) (2036/95,-3313/95)%0A(0,0) (3408/95,-5539/95) (-5146/95,8353/95) (-430/19,693/19)%0A(0,0) (-434/95,677/95) (-1304/95,2137/95) (-3056/95,4933/95)%0A(0,0) (-434/95,677/95) (-3678/95,5979/95) (-3962/95,6401/95)%0A(0,0) (1008/19,-1630/19) (4167/95,-6721/95) (461/95,-778/95)%0A(0,0) (1008/19,-1630/19) (267/5,-431/5) (-53/5,84/5
920)%0A(0,0) (315/19,-507/19) (-6317/95,10186/95) (854/95,-1372/95)%0A(0,0) (2539/95,-8169/190) (-11463/190,9222/95) (-1391/190,2283/190)%0A(0,0) (1003/38,-1631/38) (1303/95,-4263/190) (8527/190,-6848/95)%0A(0,0) (-421/190,653/190) (-4007/95,12917/190) (-11463/190,9222/95)%0A(0,0) (-53/5,84/5) (-1008/19,1630/19) (-267/5,431/5)%0A(0,0) (-495/19,794/19) (-2666/95,4308/95) (-2137/95,3441/95)%0A(0,0) (-3779/190,3006/95) (-2233/190,3589/190) (-3101/95,9981/190)%0A(0,0) (-843/190,632/95) (-6981/190,11273/190) (-6037/95,19477/190)%0A(0,0) (-8527/190,6848/95) (-1003/38,1631/38) (1303/95,-4263/190)%0A(0,0) (-1593/38,1279/19) (-5359/190,8717/190) (1756/95,-5731/190)%0A(0,0) (5029/190,-4116/95) (2233/190,-3589/190) (-383/95,1173/190)%0A(0,0) (5146/95,-8353/95) (-430/19,693/19) (-3408/95,5539/95)%0A(0,0) (5146/95,-8353/95) (-1244/95,1997/95) (-4876/95,7913/95)%0A(0,0) (1303/95,-4263/190) (8527/190,-6848/95) (-1003/38,1631/38)%0A(0,0) (-226/19,369/19) (544/19,-883/19) (4568/95,-7359/95)%0A(0,0) (-5359/190,8717/190) (1756/95,-5731/190) (1593/38,-1279/19)%0A(0,0) (4134/95,-6682/95) (887/95,-1411/95) (-3397/95,5526/95)%0A(0,0) (854/95,-1372/95) (315/19,-507/19) (6317/95,-10186/95)%0A(0,0) (6153/95,-9949/95) (-1,1) (656/19,-1062/19)%0A(0,0) (937/19,-1515/19) (-1,1) (4186/95,-6778/95)%0A(0,0) (-125/19,203/19) (-1,1) (2718/95,-4404/95)%0A(0,0) (-937/19,1515/19) (-1833/95,3004/95) (-4186/95,6778/95)%0A(0,0) (-937/19,1515/19) (1,-1) (-4186/95,6778/95)%0A(0,0) (937/19,-1515/19) (1833/95,-3004/95) (4186/95,-6778/95)%0A(0,0) (6153/95,-9949/95) (1833/95,-3004/95) (656/19,-1062/19)%0A(0,0) (-1398/95,4453/190) (-8527/190,6943/95) (-965/38,1555/38)%0A(0,0) (-461/95,778/95) (1008/19,-1630/19) (-4167/95,6721/95)%0A(0,0) (843/190,-632/95) (-6981/190,11273/190) (6037/95,-19477/190)%0A(0,0) (3779/190,-3006/95) (-2233/190,3589/190) (3101/95,-9981/190)%0A(0,0) (3912/95,-12727/190) (-11463/190,9317/95) (-611/190,1033/190)%0A(0,0) (3006/95,-9791/190) (-3779/190,3101/95) (-2423/190,3969/190)%0A(0,0) (-5029/190,4021/95) (-2423/190,3969/190) (288/95,-983/190)%0A(0,0) (226/19,-369/19) (544/19,-883/19) (4568/95,-7359/95)%0A(0,0) (958/95,-1564/95) (2267/95,-3681/95) (4849/95,-7812/95)%0A(0,0) (-2036/95,3313/95) (1200/19,-1945/19) (-1632/95,2611/95)%0A(0,0) (-1,1) (2718/95,-4404/95) (125/19,-203/19)%0A(0,0) (-1,1) (4186/95,-6778/95) (-937/19,1515/19)%0A(0,0) (-288/95,983/190) (-5029/190,4021/95) (2423/190,-3969/190)%0A(0,0) (-5036/95,16351/190) (-2093/190,1647/95) (7171/190,-11653/190)%0A(0,0) (544/19,-883/19) (-4568/95,7359/95) (-226/19,369/19)%0A(0,0) (-268/5,434/5) (281/95,-453/95) (-1,1)%0A(0,0) (3912/95,-12727/190) (11463/190,-9317/95) (611/190,-1033/190)%0A(0,0) (4876/95,-7913/95) (5146/95,-8353/95) (-1244/95,1997/95)%0A(0,0) (495/19,-794/19) (52/95,-96/95) (2267/95,-3681/95)%0A(0,0) (6317/95,-10186/95) (-854/95,1372/95) (-315/19,507/19)%0A(0,0) (11463/190,-9222/95) (1391/190,-2283/190) (-2539/95,8169/190)%0A(0,0) (3779/190,-3006/95) (3203/190,-5219/190) (1303/95,-4263/190)%0A(0,0) (5029/190,-4116/95) (-2233/190,3589/190) (-383/95,1173/190)%0A(0,0) (2093/190,-1742/95) (-6981/190,11273/190) (-5131/95,16541/190)%0A(0,0) (11463/190,-9222/95) (-421/190,653/190) (4007/95,-12917/190)%0A(0,0) (11463/190,-9222/95) (1391/190,-2283/190) (2539/95,-8169/190)%0A(0,0) (3779/190,-3006/95) (3203/190,-5219/190) (-1303/95,4263/190)%0A(0,0) (495/19,-794/19) (52/95,-96/95) (-2267/95,3681/95)%0A(0,0) (-937/19,1515/19) (1833/95,-3004/95) (-4186/95,6778/95)%0A(0,0) (887/95,-1411/95) (3397/95,-5526/95) (4134/95,-6682/95)%0A(0,0) (1851/95,-5921/190) (1593/38,-1298/19) (5169/190,-8337/190)%0A(0,0) (1391/190,-2283/190) (2539/95,-8169/190) (-11463/190,9222/95)%0A(0,0) (3203/190,-5219/190) (-1303/95,4263/190) (-3779/190,3006/95)%0A(0,0) (-2267/95,3681/95) (-495/19,794/19) (-52/95,96/95)%0A(0,0) (-1303/95,4263/190) (-3779/190,3006/95) (-3203/190,5219/190)%0A(0,0) (-2666/95,4308/95) (581/95,-963/95) (-1929/95,3152/95)%0A(0,0) (-2233/190,3589/190) (-383/95,1173/190) (-5029/190,4116/95)%0A(0,0) (-6981/190,11273/190) (-5131/95,16541/190) (-2093/190,1742/95)%0A(0,0) (-1008/19,1630/19) (-4167/95,6721/95) (-461/95,778/95)%0A(0,0) (461/95,-778/95) (-1008/19,1630/19) (4167/95,-6721/95)%0A(0,0) (-620/19,997/19) (-338/95,529/95) (-1252/95,2041/95)%0A(0,0) (1304/95,-2137/95) (-338/95,529/95) (-794/19,1289/19)%0A(0,0) (6981/190,-11273/190) (-6037/95,19477/190) (-843/190,632/95)%0A(0,0) (1008/19,-1630/19) (-267/5,431/5) (-53/5,84/5
920)%0A(0,0) (-3013/190,4839/190) (-1398/95,4453/190) (3779/190,-3101/95)%0A(0,0) (338/95,-529/95) (1252/95,-2041/95) (-620/19,997/19)%0A(0,0) (6037/95,-19477/190) (-843/190,632/95) (6981/190,-11273/190)%0A(0,0) (-1304/95,2137/95) (-3056/95,4933/95) (434/95,-677/95)%0A(0,0) (3056/95,-4933/95) (434/95,-677/95) (1304/95,-2137/95)%0A(0,0) (-8527/190,6943/95) (-965/38,1555/38) (-1398/95,4453/190)%0A(0,0) (-3779/190,3101/95) (-3013/190,4839/190) (-1398/95,4453/190)%0A(0,0) (-11463/190,9317/95) (-1201/190,1903/190) (2444/95,-7979/190)%0A(0,0) (-11463/190,9317/95) (611/190,-1033/190) (3912/95,-12727/190)%0A(0,0) (-1833/95,3004/95) (-2718/95,4404/95) (-125/19,203/19)%0A(0,0) (125/19,-203/19) (-1833/95,3004/95) (-2718/95,4404/95)%0A(0,0) (125/19,-203/19) (1,-1) (-2718/95,4404/95)%0A(0,0) (-3678/95,5979/95) (3962/95,-6401/95) (-434/95,677/95)%0A(0,0) (-3397/95,5526/95) (4134/95,-6682/95) (-887/95,1411/95)%0A(0,0) (-1833/95,3004/95) (-4186/95,6778/95) (937/19,-1515/19)%0A(0,0) (11463/190,-9317/95) (611/190,-1033/190) (3912/95,-12727/190)%0A(0,0) (4134/95,-6682/95) (-887/95,1411/95) (-3397/95,5526/95)%0A(0,0) (5169/190,-8337/190) (-1851/95,5921/190) (-1593/38,1298/19)%0A(0,0) (-937/19,1515/19) (1833/95,-3004/95) (4186/95,-6778/95)%0A(0,0) (-937/19,1515/19) (-1,1) (4186/95,-6778/95)%0A(0,0) (164/95,-237/95) (2036/95,-3313/95) (6906/95,-11193/95)%0A(0,0) (-1304/95,2137/95) (-338/95,529/95) (794/19,-1289/19)%0A(0,0) (5169/190,-8337/190) (1851/95,-5921/190) (-1593/38,1298/19)%0A(0,0) (7171/190,-11653/190) (-5942/95,19287/190) (843/190,-727/95)%0A(0,0) (-3203/190,5219/190) (-1303/95,4263/190) (-3779/190,3006/95)%0A(0,0) (2036/95,-3313/95) (6906/95,-11193/95) (164/95,-237/95)%0A(0,0) (2267/95,-3681/95) (-4849/95,7812/95) (-958/95,1564/95)%0A(0,0) (6317/95,-10186/95) (-854/95,1372/95) (315/19,-507/19)%0A(0,0) (125/19,-203/19) (1833/95,-3004/95) (2718/95,-4404/95)%0A(0,0) (125/19,-203/19) (-1,1) (2718/95,-4404/95)%0A(0,0) (3779/95,-6107/95) (1,-1) (0,0)%0A(0,0) (6317/95,-10186/95) (-352/19,568/19) (3043/95,-4909/95)%0A(0,0) (495/19,-794/19) (-2666/95,4308/95) (2137/95,-3441/95)%0A(0,0) (-11463/190,9317/95) (-611/190,1033/190) (3912/95,-12727/190)%0A(0,0) (-11463/190,9317/95) (1201/190,-1903/190) (2444/95,-7979/190)%0A(0,0) (-3779/190,3101/95) (3013/190,-4839/190) (-1398/95,4453/190)%0A(0,0) (-1003/38,1631/38) (1303/95,-4263/190) (8527/190,-6848/95)%0A(0,0) (-125/19,203/19) (1833/95,-3004/95) (2718/95,-4404/95)%0A(0,0) (-11463/190,9222/95) (421/190,-653/190) (4007/95,-12917/190)%0A(0,0) (-3678/95,5979/95) (-3962/95,6401/95) (-434/95,677/95)%0A(0,0) (-5146/95,8353/95) (-1244/95,1997/95) (4876/95,-7913/95)%0A(0,0) (-4186/95,6778/95) (937/19,-1515/19) (1,-1)%0A(0,0) (-3408/95,5539/95) (5146/95,-8353/95) (430/19,-693/19)%0A(0,0) (-2444/95,7979/190) (11463/190,-9317/95) (1201/190,-1903/190)%0A(0,0) (2444/95,-7979/190) (-11463/190,9317/95) (-1201/190,1903/190)%0A(0,0) (-1398/95,4453/190) (-3779/190,3101/95) (-3013/190,4839/190)%0A(0,0) (1929/95,-3152/95) (-2666/95,4308/95) (581/95,-963/95)%0A(0,0) (461/95,-778/95) (-1008/19,1630/19) (-4167/95,6721/95)%0A(0,0) (2267/95,-3681/95) (-4849/95,7812/95) (958/95,-1564/95)%0A(0,0) (1003/38,-1631/38) (1303/95,-4263/190) (-8527/190,6848/95)%0A(0,0) (6317/95,-10186/95) (-352/19,568/19) (-3043/95,4909/95)%0A(0,0) (11463/190,-9222/95) (-421/190,653/190) (-4007/95,12917/190)%0A(0,0) (281/95,-453/95) (-1833/95,3004/95) (268/5,-434/5)%0A(0,0) (281/95,-453/95) (1,-1) (268/5,-434/5)%0A(0,0) (-52/95,96/95) (-2267/95,3681/95) (-495/19,794/19)%0A(0,0) (53/5,-84/5) (-1008/19,1630/19) (267/5,-431/5)%0A(0,0) (1304/95,-2137/95) (-338/95,529/95) (794/19,-1289/19)%0A(0,0) (-6317/95,10186/95) (-352/19,568/19) (-3043/95,4909/95)%0A(0,0) (-11463/190,9222/95) (-421/190,653/190) (-4007/95,12917/190)%0A(0,0) (-3203/190,5219/190) (1303/95,-4263/190) (3779/190,-3006/95)%0A(0,0) (-52/95,96/95) (2267/95,-3681/95) (495/19,-794/19)%0A(0,0) (-958/95,1564/95) (2267/95,-3681/95) (4849/95,-7812/95)%0A(0,0) (3779/95,-6107/95) (-1833/95,3004/95) (0,0)%0A(0,0) (1756/95,-5731/190) (1593/38,-1279/19) (-5359/190,8717/190)%0A(0,0) (-338/95,529/95) (1252/95,-2041/95) (620/19,-997/19)%0A(0,0) (2036/95,-3313/95) (1200/19,-1945/19) (1632/95,-2611/95)%0A(0,0) (267/5,-431/5) (-53/5,84/5
920) (1008/19,-1630/19)%0A(0,0) (-5146/95,8353/95) (1244/95,-1997/95) (4876/95,-7913/95)%0A(0,0) (288/95,-983/190) (5029/190,-4021/95) (-2423/190,3969/190)%0A(0,0) (5942/95,-19287/190) (-843/190,727/95) (-7171/190,11653/190)%0A(0,0) (5036/95,-16351/190) (2093/190,-1647/95) (-7171/190,11653/190)%0A(0,0) (-2267/95,3681/95) (-4849/95,7812/95) (-958/95,1564/95)%0A(0,0) (1632/95,-2611/95) (-2036/95,3313/95) (1200/19,-1945/19)%0A(0,0) (2093/190,-1647/95) (-7171/190,11653/190) (5036/95,-16351/190)%0A(0,0) (-5942/95,19287/190) (843/190,-727/95) (7171/190,-11653/190)%0A(0,0) (-5146/95,8353/95) (430/19,-693/19) (3408/95,-5539/95)%0A(0,0) (-1304/95,2137/95) (3056/95,-4933/95) (-434/95,677/95)%0A(0,0) (1632/95,-2611/95) (2036/95,-3313/95) (1200/19,-1945/19)%0A(0,0) (-11463/190,9222/95) (-1391/190,2283/190) (2539/95,-8169/190)%0A(0,0) (-3779/190,3006/95) (-3203/190,5219/190) (-1303/95,4263/190)%0A(0,0) (-8527/190,6848/95) (-1003/38,1631/38) (-1303/95,4263/190)%0A(0,0) (5942/95,-19287/190) (843/190,-727/95) (-7171/190,11653/190)%0A(0,0) (-1304/95,2137/95) (-3056/95,4933/95) (-434/95,677/95)%0A(0,0) (-5146/95,8353/95) (-430/19,693/19) (3408/95,-5539/95)%0A(0,0) (7171/190,-11653/190) (5942/95,-19287/190) (843/190,-727/95)%0A(0,0) (-2539/95,8169/190) (11463/190,-9222/95) (1391/190,-2283/190)%0A(0,0) (-1252/95,2041/95) (-620/19,997/19) (338/95,-529/95)%0A(0,0) (5036/95,-16351/190) (2093/190,-1647/95) (7171/190,-11653/190)%0A(0,0) (5146/95,-8353/95) (-1244/95,1997/95) (4876/95,-7913/95)%0A(0,0) (125/19,-203/19) (1833/95,-3004/95) (-2718/95,4404/95)%0A(0,0) (-281/95,453/95) (1833/95,-3004/95) (-268/5,434/5)%0A(0,0) (6906/95,-11193/95) (-164/95,237/95) (-2036/95,3313/95)%0A(0,0) (-8527/190,6943/95) (965/38,-1555/38) (1398/95,-4453/190)%0A(0,0) (-544/19,883/19) (-4568/95,7359/95) (-226/19,369/19)%0A(0,0) (-5029/190,4021/95) (-2423/190,3969/190) (-288/95,983/190)%0A(0,0) (-1593/38,1279/19) (-5359/190,8717/190) (-1756/95,5731/190)%0A(0,0) (-2093/190,1647/95) (-7171/190,11653/190) (-5036/95,16351/190)%0A(0,0) (-4007/95,12917/190) (11463/190,-9222/95) (-421/190,653/190)%0A(0,0) (-3779/190,3101/95) (3013/190,-4839/190) (1398/95,-4453/190)%0A(0,0) (-2036/95,3313/95) (-6906/95,11193/95) (-164/95,237/95)%0A(0,0) (-1929/95,3152/95) (2666/95,-4308/95) (581/95,-963/95)%0A(0,0) (2666/95,-4308/95) (-581/95,963/95) (1929/95,-3152/95)%0A%0A%0A%0A0%0A%0A%0A%0A690%0A4 0 1 2 3%0A4 4 5 6 7%0A4 8 9 10 11%0A4 12 13 14 15%0A4 16 17 18 19%0A4 20 21 22 23%0A4 24 25 26 27%0A4 28 29 30 31%0A4 32 33 34 35%0A4 36 37 38 39%0A7 40 41 42 43 44 45 46%0A4 47 48 49 50%0A4 51 52 53 54%0A4 55 56 57 58%0A4 59 60 61 62%0A8 63 57 64 65 66 67 68 69%0A4 70 71 72 73%0A4 74 75 76 77%0A4 78 79 80 81%0A4 82 83 84 85%0A8 86 87 88 89 90 91 92 93%0A4 79 94 95 80%0A4 96 97 98 99%0A4 100 101 102 103%0A4 104 105 106 107%0A4 108 109 110 111%0A4 112 113 114 115%0A4 116 117 118 119%0A18 120 121 108 111 122 123 124 125 126 127 128 129 130 131 132 133 134 135%0A4 62 136 137 59%0A4 138 139 140 141%0A4 142 143 144 145%0A4 146 147 148 149%0A4 150 47 50 151%0A4 152 153 154 155%0A4 156 157 158 159%0A4 160 161 162 163%0A4 164 165 166 167%0A4 168 169 170 171%0A4 172 173 174 175%0A7 176 177 140 139 178 179 180%0A4 132 131 181 182%0A4 183 184 65 64%0A7 185 186 187 188 189 190 191%0A4 192 193 194 195%0A4 196 197 198 199%0A4 200 201 202 203%0A4 204 205 26 25%0A18 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223%0A4 224 225 226 227%0A4 228 229 230 231%0A4 173 232 233 174%0A4 234 235 236 237%0A4 238 239 240 241%0A4 242 243 244 245%0A4 246 247 248 249%0A4 250 251 252 253%0A4 254 255 256 257%0A4 258 178 139 138%0A4 259 260 261 262%0A4 263 264 265 266%0A8 267 268 269 270 271 23 22 272%0A4 273 141 140 274%0A4 275 276 277 278%0A4 279 280 281 282%0A4 283 284 285 286%0A4 287 288 289 290%0A4 291 292 293 191%0A4 294 295 296 297%0A4 298 299 300 301%0A7 176 272 22 302 303 13 12%0A4 304 305 306 307%0A4 308 309 310 311%0A4 312 313 314 315%0A18 316 317 318 204 25 24 319 320 321 322 323 324 325 326 327 328 329 330%0A4 331 332 333 334%0A4 335 336 337 338%0A4 339 340 341 342%0A4 343 344 345 346%0A4 257 256 347 348%0A4 349 172 175 350%0A7 63 351 352 158 157 353 334%0A4 207 354 355 208%0A4 356 357 358 359%0A8 176 360 361 362 363 364 341 365%0A4 366 367 368 369%0A4 370 371 372 373%0A4 374 375 376 377%0A4 378 379 380 381%0A4 239 382 383 240%0A4 384 385 360 386%0A7 387 388 389 390 391 392 393%0A4 394 395 396 397%0A8 398 399 400 401 402 403 404 405%0A4 120 135 406 407%0A4 408 297 296 409%0A4 410 411 412 413%0A4 414 415 416 417%0A4 418 419 393 392%0A8 176 59 137 420 421 11 10 177%0A4 422 423 421 420%0A4 424 179 178 258%0A4 167 166 425 426%0A7 86 427 428 429 430 431 432%0A4 433 434 435 436%0A4 437 438 439 440%0A4 441 375 374 442%0A8 40 443 444 307 306 199 198 41%0A4 445 446 447 448%0A4 449 450 451 452%0A4 453 454 45
9205 456%0A4 457 458 459 460%0A4 461 343 346 462%0A7 185 41 198 463 148 147 464%0A4 465 366 369 466%0A4 467 468 336 335%0A4 279 282 469 470%0A4 471 472 473 474%0A4 475 476 477 478%0A4 479 480 481 482%0A4 483 429 428 484%0A4 485 486 487 488%0A4 489 43 42 490%0A4 491 492 493 494%0A8 63 495 496 497 498 290 289 499%0A4 209 500 501 210%0A7 502 405 503 504 505 506 507%0A4 508 509 510 511%0A8 512 441 513 514 515 516 517 518%0A4 508 519 520 509%0A7 267 518 252 521 522 523 524%0A4 525 526 527 528%0A8 502 529 530 531 532 533 534 535%0A4 536 537 538 539%0A7 540 41 194 541 542 543 544%0A7 63 545 546 435 434 58 57%0A4 547 548 549 550%0A4 551 552 553 554%0A4 305 196 199 306%0A4 280 555 556 281%0A4 215 214 557 558%0A4 559 543 542 560%0A4 117 561 562 118%0A4 563 525 528 564%0A4 237 565 566 234%0A4 247 567 568 248%0A4 569 570 571 572%0A4 573 574 575 576%0A4 577 578 579 524%0A4 580 581 317 316%0A8 185 394 582 583 478 477 584 585%0A4 586 189 188 587%0A4 588 589 516 515%0A4 590 591 389 592%0A4 260 593 594 261%0A4 595 596 597 598%0A4 599 600 601 602%0A4 603 348 347 604%0A18 605 606 607 294 297 408 608 609 610 611 612 613 614 288 287 615 616 617%0A4 618 619 620 621%0A7 176 622 455 454 623 60 59%0A4 495 624 606 605%0A4 440 439 102 101%0A18 625 626 164 167 426 627 628 629 630 631 632 633 634 635 344 343 461 636%0A4 637 638 514 513%0A4 639 640 641 642%0A8 540 544 249 248 568 643 644 585%0A4 377 376 645 646%0A18 647 424 258 138 141 273 492 491 17 16 298 301 569 572 648 649 650 651%0A18 652 653 467 335 338 654 655 656 657 658 659 660 661 662 663 664 665 666%0A4 667 490 42 668%0A4 589 669 517 516%0A4 670 671 143 142%0A4 111 110 672 122%0A4 414 417 255 254%0A4 673 674 675 676%0A4 677 678 679 680%0A4 681 682 683 684%0A8 86 432 227 226 685 686 187 186%0A4 159 158 352 687%0A4 134 133 688 689%0A7 86 93 26 205 690 581 580%0A4 691 692 693 694%0A8 267 524 579 695 696 381 380 697%0A4 698 699 700 701%0A8 86 702 703 704 705 409 296 69%0A4 613 706 707 614%0A4 708 709 710 711%0A4 712 713 714 715%0A4 716 717 400 399%0A7 176 365 6 5 718 719 151%0A4 83 720 721 84%0A8 540 407 406 689 688 182 181 697%0A4 722 687 352 723%0A4 724 725 644 643%0A4 726 727 728 729%0A4 180 179 424 647%0A8 502 507 730 731 732 733 425 697%0A4 734 735 736 737%0A4 332 51 54 333%0A4 738 739 740 741%0A4 611 610 703 702%0A7 512 742 743 645 376 375 441%0A7 398 622 744 481 480 745 399%0A4 729 728 746 747%0A4 56 183 64 57%0A8 185 281 556 701 700 195 194 41%0A4 245 244 678 677%0A4 748 623 454 453%0A4 436 435 546 749%0A8 40 750 751 752 315 314 277 351%0A4 753 691 694 754%0A4 755 753 754 756%0A7 40 351 714 736 735 311 310%0A4 757 758 759 760%0A4 761 243 242 762%0A4 763 764 404 765%0A8 398 766 767 99 98 768 455 622%0A18 769 726 729 747 201 200 770 771 772 519 508 511 773 774 775 776 777 778%0A4 779 303 302 780%0A4 149 148 463 781%0A4 519 772 782 520%0A4 330 329 783 784%0A4 785 786 68 67%0A4 655 654 787 788%0A7 86 186 789 790 791 792 793%0A4 651 650 794 795%0A4 640 796 797 641%0A4 229 749 546 230%0A4 464 147 146 798%0A4 125 124 799 800%0A4 432 431 801 802%0A4 656 655 788 803%0A4 48 804 805 49%0A18 442 374 377 646 806 94 79 78 807 808 809 810 811 669 589 588 638 637%0A4 812 113 112 813%0A8 540 814 815 81 80 95 743 742%0A4 816 817 818 819%0A4 128 820 821 129%0A4 822 823 824 825%0A4 826 391 390 827%0A8 398 828 829 830 831 832 833 535%0A4 692 834 835 693%0A7 387 836 459 458 473 472 837%0A18 673 822 825 838 561 117 116 284 283 419 418 826 827 591 590 839 840 674%0A7 512 518 841 842 843 550 549%0A4 844 521 252 251%0A4 845 465 466 846%0A18 62 61 748 453 456 847 97 96 848 849 850 410 413 9 8 423 422 136%0A7 185 427 562 851 824 823 676%0A4 852 722 723 853%0A4 837 472 471 854%0A8 855 19 18 494 493 274 140 177%0A7 398 177 10 412 411 856 766%0A4 482 481 744 857%0A4 660 858 859 661%0A4 612 860 706 613%0A4 861 862 446 445%0A7 267 272 679 678 244 243 761%0A4 639 642 863 864%0A18 539 538 816 819 865 866 867 868 869 870 370 373 104 107 871 872 153 152%0A4 548 873 874 549%0A4 875 876 877 878%0A4 879 554 553 880%0A4 94 806 743 95%0A7 86 499 289 707 706 860 702%0A7 512 272 102 439 438 39 38%0A4 808 807 815 814%0A4 834 881 789 835%0A4 882 883 696 695%0A4 161 884 885 162%0A4 566 565 758 757%0A4 608 408 409 705%0A4 886 887 29 28%0A7 63 365 341 340 72 71 888%0A4 652 666 530 529%0A4 889 890 626 625%0A4 891 32 35 892%0A4 216 893 894 217%0A4 327 326 895 896%0A4 897 898 899 900%0A4 901 902 764 763%0A8 267 171 170 711 710 903 744 622%0A4 904 875 878 905%0A4 212 211 906 907%0A4 169 708 711 170%0A4 396 395 908 909%0A4 126 125 800 910%0A4 911 912 583 582%0A4 665 664 532 531%0A4 450 913 914 451%0A4 370 870 87 371%0A4 915 541 194 193%0A4 385 916 361 360%0A4 807 78 81 815%0A4 605 617 496 495%0A4 423 8 11 421%0A4 17 491 494 18%0A4 917 918 363 362%0A8 855 536 155 154 919 920 106 69%0A8 387 558 557 921 907 906 501 836%0A18 922 70 73 339 342 923 918 917 916 385 384 861 445 448 924 925 926 927%0A8 176 180 795 794 928 929 571 545%0A4 329 328 930 783%0A4 925 924 931 932%0A18 854 471 474 457 460 933 934 367 366 465 845 935 551 554 879 936 937 938%0A4 37 349 350 38%0A4 939 940 403 402%0A4 776 775 832 831%0A4 941 942 486 485%0A4 819 818 92 865%0A8 86 793 943 564 528 527 597 499%0A4 129 821 944 130%0A4 945 946 947 948%0A4 658 657 949 950%0A4 397 911 582 394%0A4 916 917 362 361%0A4 653 951 468 467%0A4 952 953 686 685%0A8 512 38 350 175 174 233 6 365%0A4 954 354 207 206%0A4 264 238 241 265%0A4 955 599 602 956%0A18 95
9207 886 28 31 786 785 958 184 183 56 55 433 436 749 229 228 574 573%0A7 540 742 383 959 960 961 77%0A4 284 116 119 285%0A4 962 603 604 963%0A4 964 960 959 965%0A4 854 938 966 837%0A7 855 836 501 500 355 354 954%0A8 387 950 949 803 788 787 337 388%0A4 967 20 23 271%0A8 63 334 333 54 53 968 969 365%0A4 218 970 971 219%0A7 387 535 534 859 858 972 950%0A4 973 974 943 793%0A4 975 522 521 844%0A8 185 676 675 976 977 592 389 388%0A4 825 824 851 838%0A8 40 756 754 694 693 835 789 186%0A4 809 978 979 810%0A4 897 980 443 898%0A4 625 636 981 889%0A4 470 469 982 983%0A4 798 904 905 464%0A4 958 785 67 66%0A4 666 665 531 530%0A8 267 889 981 462 346 345 503 405%0A4 984 985 986 987%0A8 502 641 797 988 989 948 947 388%0A8 185 191 293 262 261 594 428 427%0A4 847 456 455 768%0A7 512 365 969 990 991 992 892%0A4 664 663 533 532%0A4 993 891 892 992%0A4 994 44 43 489%0A4 995 681 684 996%0A4 771 770 997 998%0A4 999 1000 942 941%0A4 868 867 90 89%0A4 1001 1002 1003 1004%0A18 802 801 1005 483 484 593 260 259 292 291 1006 586 587 1007 953 952 225 224%0A4 804 100 103 805%0A4 115 114 1008 1009%0A4 574 228 231 575%0A4 633 505 504 634%0A7 540 585 672 110 109 1010 407%0A4 1011 523 522 975%0A4 413 412 10 9%0A4 627 426 425 733%0A8 512 356 996 684 683 1012 487 742%0A4 334 353 1013 331%0A4 33 852 853 34%0A4 1011 577 524 523%0A4 632 631 507 506%0A4 1014 745 480 479%0A4 876 0 3 877%0A4 214 213 921 557%0A8 267 761 1015 1016 1017 1018 841 518%0A4 151 719 1019 150%0A4 235 1020 1021 236%0A4 610 609 704 703%0A4 1022 1023 269 268%0A4 1024 718 5 4%0A7 502 585 584 1025 863 642 641%0A4 309 1026 1027 310%0A4 872 871 920 919%0A4 923 342 341 364%0A4 869 868 89 88%0A4 924 448 447 931%0A4 36 39 438 437%0A4 1028 667 668 1029%0A4 631 630 730 507%0A4 1030 842 841 1031%0A4 827 390 389 591%0A4 14 13 303 779%0A4 216 215 558 893%0A4 1026 82 85 1027%0A4 957 573 576 1032%0A4 781 463 198 197%0A4 384 386 862 861%0A4 912 475 478 583%0A7 502 535 833 1033 510 509 520%0A7 267 405 404 764 902 1034 171%0A4 600 712 715 601%0A4 1035 790 789 881%0A4 873 984 987 874%0A4 1036 304 307 444%0A4 615 287 290 498%0A4 993 992 991 1037%0A4 75 1038 1039 76%0A7 855 177 1040 759 758 565 237%0A4 1041 990 969 1042%0A7 267 622 740 1043 1044 1045 268%0A8 63 1046 956 602 601 715 714 351%0A4 77 961 1047 74%0A4 325 1048 895 326%0A7 86 69 106 105 372 371 87%0A4 55 58 434 433%0A4 1009 1008 380 379%0A4 762 1049 1015 761%0A4 769 778 829 828%0A7 267 697 425 166 165 890 889%0A4 1050 1031 841 1018%0A4 526 598 597 527%0A8 502 520 782 998 997 203 202 405%0A4 607 1051 295 294%0A4 1052 1053 276 275%0A4 661 859 534 662%0A4 1047 961 960 964%0A4 866 865 92 91%0A4 937 936 1054 1055%0A4 1056 1057 989 988%0A4 650 649 928 794%0A4 648 572 571 929%0A4 73 72 340 339%0A8 387 393 286 285 119 118 562 427%0A4 1058 246 249 544%0A7 502 697 181 944 821 820 1059%0A4 985 1060 1061 986%0A4 130 944 181 131%0A4 415 1062 1063 416%0A4 1064 1034 902 901%0A4 1014 716 399 745%0A18 331 1013 156 159 687 722 852 33 32 891 993 1037 1041 1042 1065 52 51 332%0A4 476 1066 584 477%0A4 839 590 592 977%0A8 185 464 905 878 877 3 2 186%0A7 512 351 277 276 1053 357 356%0A4 1067 1068 947 946%0A4 1046 1069 1070 1071%0A4 870 869 88 87%0A8 855 237 236 1021 963 604 347 836%0A4 780 302 22 21%0A4 777 776 831 830%0A7 40 742 487 486 942 1000 750%0A4 760 759 1040 1072%0A4 208 355 500 209%0A4 587 188 187 1007%0A4 184 958 66 65%0A4 206 223 1073 954%0A8 512 892 35 34 853 723 352 351%0A4 217 894 970 218%0A18 755 1001 1004 595 598 526 525 563 974 973 1074 1075 1035 881 834 692 691 753%0A4 31 30 68 786%0A7 855 545 571 570 300 299 19%0A4 867 866 91 90%0A4 682 1076 1012 683%0A4 1077 1043 740 739%0A18 234 566 757 760 1072 884 161 160 1062 415 414 254 257 348 603 962 1020 235%0A4 418 392 391 826%0A4 223 222 1078 1073%0A4 221 220 1079 1080%0A4 628 627 733 732%0A4 301 300 570 569%0A4 999 1081 750 1000%0A4 1074 792 791 1075%0A4 359 995 996 356%0A4 619 1082 1083 620%0A4 953 1007 187 686%0A4 811 1084 517 669%0A8 176 151 50 49 805 103 102 272%0A4 1085 1044 1043 1077%0A8 855 954 1073 1078 1080 1079 971 93%0A4 1005 430 429 483%0A4 1086 1022 268 1045%0A4 1087 843 842 1030%0A4 407 1010 121 120%0A4 828 727 726 769%0A4 938 937 1055 966%0A4 1037 991 990 1041%0A7 185 585 644 982 469 282 281%0A4 674 840 976 675%0A4 344 635 503 345%0A7 387 427 895 1048 1088 1089 1090%0A4 849 848 767 766%0A7 185 388 947 1068 908 395 394%0A4 136 422 420 137%0A8 540 812 452 451 914 253 252 518%0A4 1057 945 948 989%0A4 539 152 155 536%0A4 883 378 381 696%0A8 540 77 76 1039 1029 668 42 41%0A4 1065 1042 969 968%0A7 398 405 202 746 728 727 828%0A4 511 510 1033 773%0A4 328 327 896 930%0A4 544 543 559 1058%0A7 40 186 2 1091 899 898 443%0A4 699 192 195 700%0A8 512 549 874 987 986 1061 679 272%0A4 316 330 784 580%0A7 398 836 347 256 255 417 416%0A4 1092 1093 1017 1016%0A4 1006 291 191 190%0A8 398 416 1063 163 162 885 1040 177%0A4 965 959 383 382%0A4 97 847 768 98%0A4 225 952 685 226%0A4 133 132 182 688%0A4 775 774 833 832%0A4 324 1088 1048 325%0A4 1070 1069 671 670%0A8 502 1059 910 800 799 1094 672 585%0A4 367 934 1095 368%0A7 176 545 447 446 8
92062 386 360%0A4 1049 1092 1016 1015%0A4 1006 190 189 586%0A4 802 224 227 432%0A4 1096 312 315 752%0A4 974 563 564 943%0A4 630 629 731 730%0A4 1013 353 157 156%0A4 1071 955 956 1046%0A4 810 979 1084 811%0A4 659 658 950 972%0A4 638 588 515 514%0A4 555 698 701 556%0A4 1062 160 163 1063%0A4 617 616 497 496%0A4 123 122 672 1094%0A4 935 1097 552 551%0A4 632 506 505 633%0A4 1086 1045 1044 1085%0A4 153 872 919 154%0A7 63 69 296 295 1051 624 495%0A4 864 863 1025 1098%0A4 871 107 106 920%0A4 529 951 653 652%0A4 636 461 462 981%0A4 772 771 998 782%0A4 1019 719 718 1024%0A4 809 808 814 978%0A8 86 580 784 783 930 896 895 427%0A4 1099 1100 46 45%0A4 128 127 1059 820%0A7 40 499 597 596 1003 1002 756%0A18 74 1047 964 965 382 239 238 264 263 1100 1099 994 489 490 667 1028 1038 75%0A4 634 504 503 635%0A4 1020 962 963 1021%0A18 798 146 149 781 197 196 305 304 1036 980 897 900 1101 1 0 876 875 904%0A4 121 1010 109 108%0A4 747 746 202 201%0A4 1075 791 790 1035%0A4 737 736 714 713%0A4 922 927 1102 888%0A4 171 1034 1064 168%0A4 1081 1103 751 750%0A4 321 320 1104 1105%0A7 855 69 68 30 29 887 1032%0A4 676 823 822 673%0A4 320 319 1106 1104%0A4 614 707 289 288%0A4 220 219 971 1079%0A4 322 321 1105 1090%0A4 232 7 6 233%0A4 323 1089 1088 324%0A7 387 93 971 970 894 893 558%0A4 1032 887 886 957%0A18 1058 559 560 915 193 192 699 698 555 280 279 470 983 725 724 567 247 246%0A7 540 697 380 1008 114 113 812%0A4 934 933 1107 1095%0A4 720 145 144 721%0A4 124 123 1094 799%0A4 317 581 690 318%0A4 1004 1003 596 595%0A8 387 837 966 1055 1054 880 553 535%0A4 578 882 695 579%0A4 213 212 907 921%0A4 927 926 1108 1102%0A8 176 12 621 620 1083 741 740 622%0A4 358 357 1053 1052%0A4 1082 738 741 1083%0A4 560 542 541 915%0A4 778 777 830 829%0A4 1100 263 266 46%0A4 850 849 766 856%0A18 762 242 245 677 680 1060 985 984 873 548 547 1087 1030 1031 1050 1093 1092 1049%0A4 845 846 1097 935%0A4 838 851 562 561%0A4 222 221 1080 1078%0A18 397 396 909 1067 946 945 1057 1056 796 640 639 864 1098 1066 476 475 912 911%0A4 1076 488 487 1012%0A4 659 972 858 660%0A4 900 899 1091 1101%0A4 629 628 732 731%0A8 387 1090 1105 1104 1106 27 26 93%0A7 63 499 144 143 671 1069 1046%0A4 593 484 428 594%0A4 770 200 203 997%0A4 850 856 411 410%0A4 796 1056 988 797%0A18 813 112 115 1009 379 378 883 882 578 577 1011 975 844 251 250 913 450 449%0A4 1074 973 793 792%0A4 135 134 689 406%0A4 709 1109 903 710%0A4 442 637 513 441%0A4 15 618 621 12%0A7 540 518 517 1084 979 978 814%0A18 150 1019 1024 4 7 232 173 172 349 37 36 437 440 101 100 804 48 47%0A4 567 724 643 568%0A4 419 283 286 393%0A4 612 611 702 860%0A4 801 431 430 1005%0A18 15 14 779 780 21 20 967 1110 1023 1022 1086 1085 1077 739 738 1082 619 618%0A4 647 651 795 180%0A4 813 449 452 812%0A4 1110 967 271 270%0A4 936 879 880 1054%0A4 211 210 501 906%0A4 319 24 27 1106%0A4 980 1036 444 443%0A4 717 1111 401 400%0A4 1098 1025 584 1066%0A4 318 690 205 204%0A8 40 310 1027 85 84 721 144 499%0A4 373 372 105 104%0A4 298 16 19 299%0A4 127 126 910 1059%0A8 63 888 1102 1108 932 931 447 545%0A4 474 473 458 457%0A4 926 925 932 1108%0A4 609 608 705 704%0A4 1109 857 744 903%0A4 933 460 459 1107%0A18 168 1064 901 763 765 940 939 1111 717 716 1014 479 482 857 1109 709 708 169%0A4 654 338 337 787%0A4 663 662 534 533%0A4 884 1072 1040 885%0A4 940 765 404 403%0A4 646 645 743 806%0A7 855 93 92 818 817 537 536%0A18 359 358 1052 275 278 313 312 1096 1103 1081 999 941 485 488 1076 682 681 995%0A4 756 1002 1001 755%0A4 848 96 99 767%0A4 657 656 803 949%0A4 1093 1050 1018 1017%0A4 909 908 1068 1067%0A4 616 615 498 497%0A4 313 278 277 314%0A4 1103 1096 752 751%0A4 888 71 70 922%0A4 1060 680 679 1061%0A4 52 1065 968 53%0A4 918 923 364 363%0A4 1038 1028 1029 1039%0A4 323 322 1090 1089%0A7 502 388 337 336 468 951 529%0A4 773 1033 833 774%0A8 40 46 266 265 241 240 383 742%0A4 1099 45 44 994%0A4 649 648 929 928%0A4 983 982 644 725%0A4 1101 1091 2 1%0A18 1071 1070 670 142 145 720 83 82 1026 309 308 734 737 713 712 600 599 955%0A8 855 1032 576 575 231 230 546 545%0A4 840 839 977 976%0A4 538 537 817 816%0A4 547 550 843 1087%0A8 398 466 369 368 1095 1107 459 836%0A4 606 624 1051 607%0A4 492 273 274 493%0A4 1023 1110 270 269%0A4 913 250 253 914%0A4 61 60 623 748%0A7 398 535 5
92053 552 1097 846 466%0A4 1111 939 402 401%0A4 292 259 262 293%0A4 308 311 735 734%0A4 626 890 165 164%0A%0A%0A%0A0%0A%0A%0A"; 921 922// src/worker/legacy/resources/com/vzome/core/parts/bigzome/red.vef 923var red_default = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A105%0A(0,0) (-3,-2) (-2,-1) (0,0)%0A(0,0) (-7,5) (-6,6) (-8,13)%0A(0,0) (-1/2,-11/2) (-2,-1/2) (11/2,-9)%0A(0,0) (2,-19/2) (-1/2,-3) (7/2,-11/2)%0A(0,0) (-6,7/2) (-11/2,5) (-7/2,11/2)%0A(0,0) (-7/2,-1/2) (-4,5/2) (-11/2,9)%0A(0,0) (3,-11) (0,-4) (8,-13)%0A(0,0) (-2891,4672) (-1790,2893) (0,0)%0A(0,0) (15,-30) (6,-13) (-26,42)%0A(0,0) (15,-30) (6,-13) (26,-42)%0A(0,0) (892,-1449) (548,-890) (3231,-5228)%0A(0,0) (892,-1449) (548,-890) (-3231,5228)%0A(0,0) (-6,4) (-7,8) (-8,13)%0A(0,0) (1/2,-13/2) (-3,3/2) (11/2,-9)%0A(0,0) (-27,38) (-20,29) (-10,16)%0A(0,0) (-27,38) (-20,29) (10,-16)%0A(0,0) (2337,-3787) (1441,-2335) (-1997,3231)%0A(0,0) (2337,-3787) (1441,-2335) (1997,-3231)%0A(0,0) (3,-21/2) (-3/2,-1) (7/2,-11/2)%0A(0,0) (-1,-4) (-4,3) (32,-52)%0A(0,0) (-1,-4) (-4,3) (-32,52)%0A(0,0) (-5,5/2) (-13/2,7) (-7/2,11/2)%0A(0,0) (-2339,3779) (-1449,2341) (-1997,3231)%0A(0,0) (-2339,3779) (-1449,2341) (1997,-3231)%0A(0,0) (25,-46) (12,-23) (-10,16)%0A(0,0) (25,-46) (12,-23) (10,-16)%0A(0,0) (-5/2,-3/2) (-5,9/2) (-11/2,9)%0A(0,0) (4,-12) (-1,-2) (8,-13)%0A(0,0) (-894,1441) (-556,896) (3231,-5228)%0A(0,0) (-894,1441) (-556,896) (-3231,5228)%0A(0,0) (-17,22) (-14,19) (-26,42)%0A(0,0) (-17,22) (-14,19) (26,-42)%0A(0,0) (2889,-4680) (1782,-2887) (0,0)%0A(0,0) (339,-553) (210,-342) (0,0)%0A(0,0) (-4,2) (-2,1) (3,-5)%0A(0,0) (-4,2) (-2,1) (-3,5)%0A(0,0) (-215/2,339/2) (-66,209/2) (-763/2,617)%0A(0,0) (-215/2,339/2) (-66,209/2) (763/2,-617)%0A(0,0) (1,-6) (1,-4) (1,-2)%0A(0,0) (1,-6) (1,-4) (-1,2)%0A(0,0) (-278,891/2) (-343/2,275) (471/2,-763/2)%0A(0,0) (-278,891/2) (-343/2,275) (-471/2,763/2)%0A(0,0) (-2,-1) (-1,-1) (-4,6)%0A(0,0) (-2,-1) (-1,-1) (4,-6)%0A(0,0) (274,-895/2) (339/2,-277) (471/2,-763/2)%0A(0,0) (274,-895/2) (339/2,-277) (-471/2,763/2)%0A(0,0) (-5,4) (-3,2) (1,-2)%0A(0,0) (-5,4) (-3,2) (-1,2)%0A(0,0) (207/2,-343/2) (64,-213/2) (-763/2,617)%0A(0,0) (207/2,-343/2) (64,-213/2) (763/2,-617)%0A(0,0) (0,-4) (0,-3) (3,-5)%0A(0,0) (0,-4) (0,-3) (-3,5)%0A(0,0) (-343,551) (-212,340) (0,0)%0A(0,0) (340,-553) (210,-341) (0,0)%0A(0,0) (-3,2) (-2,2) (3,-5)%0A(0,0) (-3,2) (-2,2) (-3,5)%0A(0,0) (-213/2,339/2) (-66,211/2) (-763/2,617)%0A(0,0) (-213/2,339/2) (-66,211/2) (763/2,-617)%0A(0,0) (2,-6) (1,-3) (1,-2)%0A(0,0) (2,-6) (1,-3) (-1,2)%0A(0,0) (-277,891/2) (-343/2,276) (471/2,-763/2)%0A(0,0) (-277,891/2) (-343/2,276) (-471/2,763/2)%0A(0,0) (-1,-1) (-1,0) (-4,6)%0A(0,0) (-1,-1) (-1,0) (4,-6)%0A(0,0) (275,-895/2) (339/2,-276) (471/2,-763/2)%0A(0,0) (275,-895/2) (339/2,-276) (-471/2,763/2)%0A(0,0) (-4,4) (-3,3) (1,-2)%0A(0,0) (-4,4) (-3,3) (-1,2)%0A(0,0) (209/2,-343/2) (64,-211/2) (-763/2,617)%0A(0,0) (209/2,-343/2) (64,-211/2) (763/2,-617)%0A(0,0) (1,-4) (0,-2) (3,-5)%0A(0,0) (1,-4) (0,-2) (-3,5)%0A(0,0) (-342,551) (-212,341) (0,0)%0A(0,0) (-2892,4678) (-1784,2886) (0,0)%0A(0,0) (14,-24) (12,-20) (-26,42)%0A(0,0) (14,-24) (12,-20) (26,-42)%0A(0,0) (891,-1443) (554,-897) (3231,-5228)%0A(0,0) (891,-1443) (554,-897) (-3231,5228)%0A(0,0) (-7,10) (-1,1) (-8,13)%0A(0,0) (-1/2,-1/2) (3,-11/2) (11/2,-9)%0A(0,0) (-28,44) (-14,22) (-10,16)%0A(0,0) (-28,44) (-14,22) (10,-16)%0A(0,0) (2336,-3781) (1447,-2342) (-1997,3231)%0A(0,0) (2336,-3781) (1447,-2342) (1997,-3231)%0A(0,0) (2,-9/2) (9/2,-8) (7/2,-11/2)%0A(0,0) (-2,2) (2,-4) (32,-52)%0A(0,0) (-2,2) (2,-4) (-32,52)%0A(0,0) (-6,17/2) (-1/2,0) (-7/2,11/2)%0A(0,0) (-2340,3785) (-1443,2334) (-1997,3231)%0A(0,0) (-2340,3785) (-1443,2334) (1997,-3231)%0A(0,0) (24,-40) (18,-30) (-10,16)%0A(0,0) (24,-40) (18,-30) (10,-16)%0A(0,0) (-7/2,9/2) (1,-5/2) (-11/2,9)%0A(0,0) (3,-6) (5,-9) (8,-13)%0A(0,0) (-895,1447) (-550,889) (3231,-5228)%0A(0,0) (-895,1447) (-550,889) (-3231,5228)%0A(0,0) (-18,28) (-8,12) (-26,42)%0A(0,0) (-18,28) (-8,12) (26,-42)%0A(0,0) (2888,-4674) (1788,-2894) (0,0)%0A(0,0) (-6,9) (-2,3) (-8,13)%0A(0,0) (1/2,-3/2) (2,-7/2) (11/2,-9)%0A(0,0) (3,-11/2) (7/2,-6) (7/2,-11/2)%0A(0,0) (-5,15/2) (-3/2,2) (-7/2,11/2)%0A(0,0) (-5/2,7/2) (0,-1/2) (-11/2,9)%0A(0,0) (4,-7) (4,-7) (8,-13)%0A%0A%0A%0A0%0A%0A%0A%0A89%0A3 86 84 83 %0A3 93 92 98 %0A3 95 92 91 %0A3 97 92 95 %0A3 98 92 97 %0A3 98 96 93 %0A4 2 1 12 13 %0A4 4 2 13 21 %0A4 6 4 21 27 %0A4 8 7 33 34 %0A4 9 11 37 35 %0A4 10 8 34 36 %0A4 11 15 39 37 %0A4 14 10 36 38
923%0A4 15 17 41 39 %0A4 18 12 1 3 %0A4 19 16 40 42 %0A4 20 23 45 43 %0A4 22 19 42 44 %0A4 23 25 47 45 %0A4 24 22 44 46 %0A4 25 29 49 47 %0A4 26 18 3 5 %0A4 27 26 5 6 %0A4 30 28 48 50 %0A4 31 32 52 51 %0A4 32 30 50 52 %0A4 33 35 55 53 %0A4 34 33 53 54 %0A4 35 33 7 9 %0A4 35 37 57 55 %0A4 36 34 54 56 %0A4 37 39 59 57 %0A4 38 36 56 58 %0A4 38 40 16 14 %0A4 39 41 61 59 %0A4 40 38 58 60 %0A4 41 43 63 61 %0A4 42 40 60 62 %0A4 43 41 17 20 %0A4 43 45 65 63 %0A4 44 42 62 64 %0A4 45 47 67 65 %0A4 46 44 64 66 %0A4 46 48 28 24 %0A4 47 49 69 67 %0A4 48 46 66 68 %0A4 49 51 71 69 %0A4 50 48 68 70 %0A4 51 49 29 31 %0A4 51 52 72 71 %0A4 52 50 70 72 %0A4 53 55 75 73 %0A4 55 57 77 75 %0A4 56 54 74 76 %0A4 57 59 81 77 %0A4 58 56 76 80 %0A4 60 58 80 82 %0A4 61 63 86 83 %0A4 63 65 89 86 %0A4 64 62 85 88 %0A4 65 67 91 89 %0A4 66 64 88 90 %0A4 68 66 90 94 %0A4 69 71 97 95 %0A4 71 72 98 97 %0A4 72 70 96 98 %0A4 73 74 54 53 %0A4 78 99 100 79 %0A4 82 85 62 60 %0A4 83 81 59 61 %0A4 87 79 100 102 %0A4 92 93 104 103 %0A4 93 87 102 104 %0A4 94 96 70 68 %0A4 95 91 67 69 %0A4 101 99 78 84 %0A4 103 101 84 92 %0A5 92 84 86 89 91 %0A6 12 9 7 8 10 13 %0A6 18 17 15 11 9 12 %0A6 27 30 32 31 29 26 %0A6 30 27 21 22 24 28 %0A6 75 78 79 76 74 73 %0A6 84 78 75 77 81 83 %0A6 93 96 94 90 88 87 %0A7 22 21 13 10 14 16 19 %0A7 26 29 25 23 20 17 18 %0A7 87 88 85 82 80 76 79 %0A%0A%0A%0A53%0A0 1 2 3 4 5 6 7 8 9 %0A10 11 12 13 14 15 16 17 18 19 %0A20 21 22 23 24 25 26 27 28 29 %0A30 31 32 33 34 35 36 37 38 39 %0A40 41 42 43 44 45 46 47 48 49 %0A50 51 52 %0A%0A%0Atip 0%0A%0A"; 924 925// src/worker/legacy/resources/com/vzome/core/parts/bigzome/yellow.vef 926var yellow_default = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A73%0A(0,0) (-4,6) (3,-4) (2,-1)%0A(0,0) (-4,6) (-2,5) (1,3)%0A(0,0) (-45/2,36) (15/2,-23/2) (-10,37/2)%0A(0,0) (-45/2,36) (-3/2,7/2) (14,-41/2)%0A(0,0) (-45/2,36) (5/2,-5/2) (-11,45/2)%0A(0,0) (-45/2,36) (-13/2,25/2) (13,-33/2)%0A(0,0) (6,-10) (-4,7) (-1,3)%0A(0,0) (6,-10) (5,-6) (4,-1)%0A(0,0) (36,-117/2) (-23/2,19) (37/2,-57/2)%0A(0,0) (36,-117/2) (7/2,-5) (-41/2,69/2)%0A(0,0) (36,-117/2) (-5/2,6) (47/2,-65/2)%0A(0,0) (36,-117/2) (25/2,-18) (-31/2,61/2)%0A(0,0) (-2,3) (4,-6) (-1,4)%0A(0,0) (-2,3) (2,-2) (5,-6)%0A(0,0) (-2,3) (-1,3) (-2,8)%0A(0,0) (-2,3) (-3,7) (4,-2)%0A(0,0) (-10,16) (2,-3) (1,-1)%0A(0,0) (-10,16) (4,-6) (2,-2)%0A(0,0) (-10,16) (-3,7) (1,4)%0A(0,0) (-10,16) (-1,4) (2,3)%0A(0,0) (3,-5) (-6,10) (4,-5)%0A(0,0) (3,-5) (-2,4) (-6,11)%0A(0,0) (3,-5) (3,-3) (9,-9)%0A(0,0) (3,-5) (7,-9) (-1,7)%0A(0,0) (-5,8) (5,-8) (-7,12)%0A(0,0) (-5,8) (7,-11) (-6,11)%0A(0,0) (-5,8) (-1,2) (9,-14)%0A(0,0) (-5,8) (1,-1) (10,-15)%0A(0,0) (-5,8) (0,2) (-7,17)%0A(0,0) (-5,8) (2,-1) (-6,16)%0A(0,0) (-5,8) (-6,12) (9,-9)%0A(0,0) (-5,8) (-4,9) (10,-10)%0A(0,0) (0,0) (-19,31) (38,-60)%0A(0,0) (0,0) (12,-19) (-22,38)%0A(0,0) (0,0) (11,-17) (-40,66)%0A(0,0) (0,0) (-6,11) (26,-40)%0A(0,0) (0,0) (7,-10) (-23,42)%0A(0,0) (0,0) (-10,18) (43,-64)%0A(0,0) (0,0) (-11,20) (25,-36)%0A(0,0) (0,0) (20,-30) (-35,62)%0A(0,0) (0,0) (1,1) (3,2)%0A(0,0) (5,-8) (5,-8) (-7,12)%0A(0,0) (5,-8) (7,-11) (-6,11)%0A(0,0) (5,-8) (-1,2) (9,-14)%0A(0,0) (5,-8) (1,-1) (10,-15)%0A(0,0) (5,-8) (0,2) (-7,17)%0A(0,0) (5,-8) (2,-1) (-6,16)%0A(0,0) (5,-8) (-6,12) (9,-9)%0A(0,0) (5,-8) (-4,9) (10,-10)%0A(0,0) (-3,5) (-6,10) (4,-5)%0A(0,0) (-3,5) (-2,4) (-6,11)%0A(0,0) (-3,5) (3,-3) (9,-9)%0A(0,0) (-3,5) (7,-9) (-1,7)%0A(0,0) (10,-16) (2,-3) (1,-1)%0A(0,0) (10,-16) (4,-6) (2,-2)%0A(0,0) (10,-16) (-3,7) (1,4)%0A(0,0) (10,-16) (-1,4) (2,3)%0A(0,0) (2,-3) (4,-6) (-1,4)%0A(0,0) (2,-3) (2,-2) (5,-6)%0A(0,0) (2,-3) (-1,3) (-2,8)%0A(0,0) (2,-3) (-3,7) (4,-2)%0A(0,0) (-36,117/2) (-23/2,19) (37/2,-57/2)%0A(0,0) (-36,117/2) (7/2,-5) (-41/2,69/2)%0A(0,0) (-36,117/2) (-5/2,6) (47/2,-65/2)%0A(0,0) (-36,117/2) (25/2,-18) (-31/2,61/2)%0A(0,0) (-6,10) (-4,7) (-1,3)%0A(0,0) (-6,10) (5,-6) (4,-1)%0A(0,0) (45/2,-36) (15/2,-23/2) (-10,37/2)%0A(0,0) (45/2,-36) (-3/2,7/2) (14,-41/2)%0A(0,0) (45/2,-36) (5/2,-5/2) (-11,45/2)%0A(0,0) (45/2,-36) (-13/2,25/2) (13,-33/2)%0A(0,0) (4,-6) (3,-4) (2,-1)%0A(0,0) (4,-6) (-2,5) (1,3)%0A%0A%0A%0A0%0A%0A%0A%0A84%0A3 6 17 8 %0A3 8 17 25 %0A3 9 17 6 %0A3 9 27 17 %0A3 10 18 7 %0A3 10 22 28 %0A3 18 11 7 %0A3 20 25 32 %0A3 21 27 9 %0A3 22 37 28 %0A3 23 11 30 %0A3 25 20 8 %0A3 27 21 34 %0A3 28 18 10 %0A3 28 37 45 %0A3 30 11 18 %0A3 30 47 39 %0A3 32 25 42 %0A3 32 42 49 %0A3 34 44 27 %0A3 39 23 30 %0A3 39 47 52 %0A3 45 37 51 %0A3 47 64 52 %0A3 49 42 61 %0A3 50 44 34 %0A3 54 65 61 %0A3 55 45 63 %0A3 55 64 47 %0A3 61 42 54 %0A3 62 44 50 %0A3 62 54 44 %0A3 63 45 51 %0A3 63 66 55 %0A3 65 54 62 %0A3 66 64 55 %0A4 0 6 8 2 %0A4 1 5 3 0 %0A4 3 9 6 0 %0A4 3 13 21 9 %0A4 4 1 0 2 %0A4 5 15 13 3 %0A4 7 11 5 1 %0A4 10 7 1 4 %0A4 11 23 15 5 %0A4 12 2 8 20 %0A4 13 35 34 21 %0A4 14 4 2 12 %0A4 15 38 35 13 %0A4 16 24 25 17 %0A4 18 28 29 19 %0A4 19 31 30 18 %0A4 22 10 4 14 %0A4 23 39 38 15 %0A4 25 24 41 42 %0A4 27 26 16 17 %0A4 33 12 20 32 %0A4 33 32 49 57 %0A4 36 14 12 33 %0A4 37 22 14 36 %0A4 38 60 58 35 %0A4 39 52 60 38 %0A4 41 53 54 42 %0A4 43 26 27 44 %0A4 45 55 56 46 %0A4 46 29 28 45 %0A4 47 30 31 48 %0A4 48 56 55 47 %0A4 51 37 36 59 %0A4 52 64 70 60 %0A4 54 53 43 44 %0A4 57 49 61 67 %0A4 58 50 34 35 %0A4 59 36 33 57 %0A4 60 70 68 58 %0A4 63 51 59 69 %0A4 64 66 72 70 %0A4 66 63 69 72 %0A4 68 62 50 58 %0A4 68 71 65 62 %0A4 69 59 57 67 %0A4 70 72 71 68 %0A4 71 67 61 65 %0A4 72 69 67 71 %0A%0A%0A%0A37%0A1 4 5 7 10 11 14 15 18 19 %0A22 23 28 29 30 31 36 37 38 39 %0A40 45 46 47 48 51 52 55 56 59 %0A60 63 64 66 69 70 72 %0A%0A%0Atip 40%0A%0A"; 927
928// src/worker/legacy/resources/com/vzome/core/parts/bigzome/index.js 929var shapes = { 930 "blue": blue_default, 931 "connector": connector_default, 932 "red": red_default, 933 "yellow": yellow_default 934}; 935var bigzome_default = shapes; 936 937// src/worker/legacy/resources/com/vzome/core/parts/default/apple.vef 938var apple_default = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (0,1/2) %0A%0A17%0A(0,0) (-2,3/2) (3/2,-1) (-9/2,-3/2) %0A(0,0) (0,-1/2) (3/2,-1) (-9/2,-3/2) %0A(0,0) (1,-3/2) (3/2,-2) (-3/2,-3/2) %0A(0,0) (-1,1/2) (3/2,-2) (-3/2,-3/2) %0A(0,0) (-2,1) (2,-1) (-6,-1) %0A(0,0) (-1,1/2) (-1/2,2) (-3/2,-3/2) %0A(0,0) (1,-3/2) (-1/2,2) (-3/2,-3/2) %0A(0,0) (0,-1/2) (-1/2,3) (-9/2,-3/2) %0A(0,0) (-2,3/2) (-1/2,3) (-9/2,-3/2) %0A(0,0) (0,-1) (0,3) (-6,-1) %0A(0,0) (0,-1) (2,-1) (-6,-1) %0A(0,0) (-1,1) (-1,2) (0,-2) %0A(0,0) (1,-1) (-1,2) (0,-2) %0A(0,0) (-1,0) (1,1) (-6,-3) %0A(0,0) (-2,1) (0,3) (-6,-1) %0A(0,0) (1,-1) (1,-2) (0,-2) %0A(0,0) (-1,1) (1,-2) (0,-2) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 0 1 2 3%0A4 5 6 7 8%0A4 4 10 1 0%0A4 11 12 6 5%0A4 3 5 8 0%0A4 6 2 1 7%0A4 7 1 10 9%0A4 8 7 9 14%0A4 15 2 6 12%0A4 16 11 5 3%0A4 0 8 14 4%0A4 3 2 15 16%0A%0A%0A%0A9%0A 4 9 10 1 13 0 7 14 8%0A%0Atip 13%0A"; 939 940// src/worker/legacy/resources/com/vzome/core/parts/default/black.vef 941var black_default = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A17%0A(0,0) (-1/2,-1) (0,-1) (-1/2,1/2)%0A(0,0) (-1/2,-2) (-1,0) (1/2,-3/2)%0A(0,0) (-1,-1) (-3/2,1/2) (-1/2,0)%0A(0,0) (-1,0) (-1/2,-1/2) (-3/2,2)%0A(0,0) (-2,0) (-1/2,-3/2) (-3/2,1)%0A(0,0) (-1,-1) (-1/2,-1/2) (1/2,-2)%0A(0,0) (-3/2,-1) (0,-2) (-1/2,-1/2)%0A(0,0) (-1,-2) (-1/2,-3/2) (-1/2,0)%0A(0,0) (-1/2,0) (0,0) (1/2,-3/2)%0A(0,0) (-1,0) (1/2,-3/2) (-1/2,0)%0A(0,0) (0,-1) (-1/2,1/2) (1/2,-1)%0A(0,0) (-3/2,0) (-1,0) (-1/2,-1/2)%0A(0,0) (-3/2,-1) (-1,-1) (-3/2,3/2)%0A(0,0) (-3/2,1) (0,-1) (-3/2,3/2)%0A(0,0) (-2,-1) (-1,-1) (-1,0)%0A(0,0) (-1,1) (-1/2,1/2) (-1/2,0)%0A(0,0) (-1/2,0) (-1,1) (-1/2,1/2)%0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 0 1 2 3%0A4 5 6 7 1%0A4 8 9 0 10%0A4 11 2 12 4%0A4 13 11 5 9%0A4 4 6 5 11%0A4 3 2 11 13%0A4 15 13 9 8%0A4 3 13 15 16%0A4 16 10 0 3%0A4 9 5 1 0%0A4 1 7 12 2%0A%0A%0A%0A9%0A 4 6 1 14 2 7 5 11 12%0A%0Atip 14%0A"; 942 943// src/worker/legacy/resources/com/vzome/core/parts/default/blue.vef 944var blue_default2 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0Aactual%0Ascale (1/2,0)%0A%0A9%0A(0,0) (0,4) (-1,2) (2,-3) %0A(0,0) (0,4) (-1,2) (-2,3) %0A(0,0) (2,-2) (-1,2) (-2,3) %0A(0,0) (2,-2) (-1,2) (2,-3) %0A(0,0) (0,4) (1,-2) (2,-3) %0A(0,0) (2,-2) (1,-2) (2,-3) %0A(0,0) (2,-2) (1,-2) (-2,3) %0A(0,0) (0,4) (1,-2) (-2,3) %0A(0,0) (2,2) (0,0) (0,0) %0A%0A%0A%0A0%0A%0A%0A%0A4%0A4 0 1 2 3%0A4 5 6 7 4%0A4 5 4 0 3%0A4 1 7 6 2%0A%0A%0A%0A5%0A 4 0 1 8 7%0A%0A%0Atip 8%0A"; 945 946// src/worker/legacy/resources/com/vzome/core/parts/default/brown.vef 947var brown_default = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0Ascale (1/2,0)%0A%0A17%0A(0,0) (-3/2,2) (-5
947/2,7/2) (1,7/2) %0A(0,0) (1,-5/2) (-3/2,2) (3/2,3/2) %0A(0,0) (-3/2,5/2) (1,-3/2) (3/2,0) %0A(0,0) (-3/2,5/2) (-3,9/2) (3/2,0) %0A(0,0) (-1,2) (-2,3) (2,-2) %0A(0,0) (-1,2) (2,-3) (2,-2) %0A(0,0) (1,-5/2) (5/2,-4) (3/2,3/2) %0A(0,0) (1/2,-2) (3/2,-5/2) (1,7/2) %0A(0,0) (-1,3/2) (5/2,-4) (3/2,3/2) %0A(0,0) (1,-2) (2,-3) (2,-2) %0A(0,0) (1,-2) (-2,3) (2,-2) %0A(0,0) (1/2,-3/2) (-3,9/2) (3/2,0) %0A(0,0) (1/2,-3/2) (1,-3/2) (3/2,0) %0A(0,0) (-3/2,2) (3/2,-5/2) (1,7/2) %0A(0,0) (-1,3/2) (-3/2,2) (3/2,3/2) %0A(0,0) (1/2,-2) (-5/2,7/2) (1,7/2) %0A(0,0) (-1/2,0) (-1/2,1/2) (3,3/2) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 2 3 4 5%0A4 9 10 11 12%0A4 3 11 10 4%0A4 7 13 8 6%0A4 14 1 11 3%0A4 0 15 1 14%0A4 12 2 5 9%0A4 13 0 14 8%0A4 6 1 15 7%0A4 8 14 3 2%0A4 6 8 2 12%0A4 12 11 1 6%0A%0A%0A%0A9%0A 0 1 6 7 8 14 13 16 15%0A%0Atip 16%0A"; 948 949// src/worker/legacy/resources/com/vzome/core/parts/default/cinnamon.vef 950var cinnamon_default = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0Ascale (1/2,0)%0A%0A17%0A(0,0) (13,-21) (7,-10) (6,-4) %0A(0,0) (2,-3) (3,-3) (2,4) %0A(0,0) (0,1) (3,-3) (2,4) %0A(0,0) (11,-17) (7,-10) (6,-4) %0A(0,0) (11,-17) (3,-4) (6,-4) %0A(0,0) (0,1) (-1,3) (2,4) %0A(0,0) (1,-2) (-2,3) (2,-2) %0A(0,0) (-1,2) (-2,3) (2,-2) %0A(0,0) (-12,20) (-6,10) (-2,6) %0A(0,0) (-10,16) (-6,10) (-2,6) %0A(0,0) (-12,20) (-2,4) (-2,6) %0A(0,0) (1,-1) (1,0) (4,2) %0A(0,0) (13,-21) (3,-4) (6,-4) %0A(0,0) (-10,16) (-2,4) (-2,6) %0A(0,0) (-1,2) (2,-3) (2,-2) %0A(0,0) (1,-2) (2,-3) (2,-2) %0A(0,0) (2,-3) (-1,3) (2,4) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 0 1 2 3%0A4 6 7 8 9%0A4 4 3 2 5%0A4 4 8 10 3%0A4 13 10 14 15%0A4 9 8 4 12%0A4 12 4 5 16%0A4 0 3 10 13%0A4 12 0 13 9%0A4 7 14 10 8%0A4 12 16 1 0%0A4 9 13 15 6%0A%0A%0A%0A9%0A 4 1 5 3 2 11 12 16 0%0A%0Atip 11%0A"; 951 952// src/worker/legacy/resources/com/vzome/core/parts/default/connector.vef 953var connector_default2 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A60%0A(0,0) (1/2,-1/2) (-1/2,0) (1,-1)%0A(0,0) (1/2,0) (-1,1) (1/2,-1/2)%0A(0,0) (1,-1) (-1/2,1/2) (1/2,0)%0A(0,0) (0,1) (1/2,-1/2) (-1/2,1)%0A(0,0) (1/2,0) (1,-1) (1/2,-1/2)%0A(0,0) (1,-1) (1/2,-1/2) (1/2,0)%0A(0,0) (1/2,0) (0,0) (-1/2,3/2)%0A(0,0) (-1/2,1) (0,-1) (1/2,-1/2)%0A(0,0) (1/2,-1) (0,-1) (1/2,-1/2)%0A(0,0) (1/2,-1) (0,-1) (-1/2,1/2)%0A(0,0) (-1/2,1) (0,-1) (-1/2,1/2)%0A(0,0) (0,1) (-1/2,1/2) (1/2,-1)%0A(0,0) (1/2,0) (-1,1) (-1/2,1/2)%0A(0,0) (1,-1) (-1/2,1/2) (-1/2,0)%0A(0,0) (1/2,0) (0,0) (1/2,-3/2)%0A(0,0) (0,0) (-1/2,3/2) (-1/2,0)%0A(0,0) (1/2,-1/2) (1/2,0) (-1,1)%0A(0,0) (1,-1) (1/2,-1/2) (-1/2,0)%0A(0,0) (1/2,-1/2) (-1/2,1) (0,-1)%0A(0,0) (0,1) (1/2,-1/2) (1/2,-1)%0A(0,0) (-1/2,1/2) (-1/2,0) (1,-1)%0A(0,0) (0,0) (1/2,-3/2) (1/2,0)%0A(0,0) (1/2,0) (1,-1) (-1/2,1/2)%0A(0,0) (-1/2,3/2) (1/2,0) (0,0)%0A(0,0) (1/2,-3/2) (1/2,0) (0,0)%0A(0,0) (-1/2,0) (1,-1) (1/2,-1/2)%0A(0,0) (-1/2,1/2) (1/2,0) (1,-1)%0A(0,0) (1/2,-1) (0,1) (1/2,-1/2)%0A(0,0) (1/2,-1/2) (1/2,-1) (0,-1)%0A(0,0) (-1/2,1) (0,1) (1/2,-1/2)%0A(0,0) (1/2,-1/2) (1/2,0) (1,-1)%0A(0,0) (-1/2,0) (-1,1) (1/2,-1/2)%0A(0,0) (1/2,-3/2) (-1/2,0) (0,0)%0A(0,0) (0,0) (-1/2,3/2) (1/2,0)%0A(0,0) (1/2,-1/2) (-1/2,0) (-1,1)%0A(0,0) (0,0) (1/2,-3/2) (-1/2,0)%0A(0,0) (0,-1) (1/2,-1/2) (-1/2,1)%0A(0,0) (-1/2,0) (0,0) (-1/2,3/2)%0A(0,0) (-1,1) (1/2,-1/2) (1/2,0)%0A(0,0) (0,1) (-1/2,1/2) (-1/2,1)%0A(0,0) (-1/2,1/2) (-1/2,0) (-1,1)%0A(0,0) (0,-1) (1/2,-1/2) (1/2,-1)%0A(0,0) (0,-1) (-1/2,1/2) (1/2,-1)%0A(0,0) (0,-1) (-1/2,1/2) (-1/2,1)%0A(0,0) (-1/2,1) (0,1) (-1/2,1/2)%0A(0,0) (-1/2,0) (1,-1) (-1/2,1/2)%0A(0,0) (1/2,-1) (0,1) (-1/2,1/2)%0A(0,0) (-1/2,1/2) (1/2,0) (-1,1)%0A(0,0) (-1,1) (-1/2,1/2) (1/2,0)%0A(0,0) (1/2,-1/2) (-1/2,1) (0,1)%0A(0,0) (-1/2,1/2) (-1/2,1) (0,-1)%0A(0,0) (-1/2,1/2) (-1/2,1) (0,1)%0A(0,0) (-1/2,1/2) (1/2,-1) (0,1)%0A(0,0) (1/2,-1/2) (1/2,-1) (0,1)%0A(0,0) (-1/2,3/2) (-1/2,0) (0,0)%0A(0,0) (-1/2,0) (0,0) (1/2,-3/2)%0A(0,0) (-1,1) (-1/2,1/2) (-1/2,0)%0A(0,0) (-1/2,1/2) (1/2,-1) (0,-1)%0A(0,0) (-1,1) (1/2,-1/2) (-1/2,0)%0A(0,0) (-1/2,0) (-1,1) (-1/2,1/2)%0A%0A%0A%0A0%0A%0A%0A%0A62%0A3 0 1 2%0A4 3 4 5 6%0A4 7 8 9 10%0A4 11 12 13
95314%0A4 15 16 17 18%0A3 11 14 19%0A5 20 8 7 0 21%0A5 19 22 23 4 3%0A4 24 25 26 27%0A5 13 28 18 17 14%0A4 29 30 4 23%0A4 8 20 31 32%0A5 27 26 33 30 29%0A4 28 13 34 35%0A4 25 36 37 38%0A3 39 3 6%0A5 9 40 35 34 10%0A4 36 41 42 43%0A3 44 29 23%0A5 45 41 36 25 24%0A4 46 47 45 24%0A3 20 48 31%0A4 49 5 30 33%0A3 50 15 18%0A4 51 52 53 49%0A4 1 39 6 2%0A3 51 49 33%0A5 15 47 46 44 16%0A3 34 13 12%0A4 44 46 27 29%0A3 30 5 4%0A3 7 10 54%0A5 53 2 6 5 49%0A3 41 55 42%0A4 56 57 35 40%0A4 57 50 18 28%0A5 55 58 50 57 56%0A4 0 7 54 1%0A4 50 58 47 15%0A3 46 24 27%0A3 52 21 53%0A3 47 58 45%0A4 10 34 12 54%0A4 39 11 19 3%0A5 37 48 52 51 38%0A4 14 17 22 19%0A4 16 44 23 22%0A4 32 59 40 9%0A4 38 51 33 26%0A4 21 0 2 53%0A4 41 45 58 55%0A3 8 32 9%0A3 17 16 22%0A3 57 28 35%0A3 59 56 40%0A3 25 38 26%0A4 52 48 20 21%0A4 55 56 59 42%0A4 43 31 48 37%0A5 31 43 42 59 32%0A3 36 43 37%0A5 54 12 11 39 1%0A%0A%0A%0A0%0A%0A%0A"; 954 955// src/worker/legacy/resources/com/vzome/core/parts/default/coral.vef 956var coral_default = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (0,1/2) %0A%0A15%0A(0,0) (-3,0) (2,4) (-5,1) %0A(0,0) (-2,-2) (1,5) (-3,-2) %0A(0,0) (-2,-2) (2,5) (-3,-3) %0A(0,0) (-1,0) (1,0) (1,-4) %0A(0,0) (-2,2) (1,-1) (-1,0) %0A(0,0) (-1,0) (2,-2) (-1,1) %0A(0,0) (0,-2) (2,-1) (1,-3) %0A(0,0) (-1,-4) (2,4) (-3,-1) %0A(0,0) (-2,-3) (3,3) (-2,-4) %0A(0,0) (-1,-4) (3,4) (-3,-2) %0A(0,0) (-2,-2) (3,3) (-5,2) %0A(0,0) (-2,2) (2,-1) (-1,-1) %0A(0,0) (-1,1) (1,0) (-2,2) %0A(0,0) (-1,0) (3,-2) (-1,0) %0A(0,0) (-3,-2) (4,3) (-4,-2) %0A%0A%0A%0A0%0A%0A%0A%0A16%0A3 1 2 0%0A4 3 4 5 6%0A3 8 7 9%0A3 7 10 9%0A3 1 8 2%0A3 11 4 3%0A4 0 2 9 10%0A4 11 3 1 0%0A3 12 11 13%0A4 7 1 3 6%0A3 13 6 5%0A4 0 10 13 11%0A4 10 7 6 13%0A3 12 13 5%0A3 8 1 7%0A3 11 12 4%0A%0A%0A%0A8%0A 0 1 7 8 10 9 14 2%0A%0Atip 14%0A"; 957 958// src/worker/legacy/resources/com/vzome/core/parts/default/green-short.vef 959var green_short_default = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A15%0A(0,0) (1/2,-1/2) (1/2,-1) (0,1)%0A(0,0) (1/2,-1/2) (-1/2,1) (0,1)%0A(0,0) (1,-1) (-1/2,1/2) (1/2,0)%0A(0,0) (1,-1) (1/2,-1/2) (1/2,0)%0A(0,0) (1/2,0) (0,0) (-1/2,3/2)%0A(0,0) (1,-1/2) (0,0) (3/2,-1)%0A(0,0) (1/2,1/2) (-1/2,1/2) (1/2,1/2)%0A(0,0) (1/2,1/2) (1/2,-1/2) (1/2,1/2)%0A(0,0) (0,3/2) (0,0) (-1/2,2)%0A(0,0) (1/2,1) (0,0) (3/2,-1/2)%0A(0,0) (0,2) (-1/2,1/2) (1/2,1)%0A(0,0) (0,2) (1/2,-1/2) (1/2,1)%0A(0,0) (1/2,3/2) (1/2,-1) (1,0)%0A(0,0) (1/2,3/2) (-1/2,1) (1,0)%0A(0,0) (1,1) (0,0) (1,1)%0A%0A%0A%0A0%0A%0A%0A%0A14%0A3 0 6 5 %0A3 1 0 5 %0A3 3 1 7 %0A3 5 7 1 %0A3 6 0 2 %0A3 6 12 10 %0A3 7 11 13 %0A3 8 13 12 %0A3 12 6 8 %0A3 13 8 7 %0A4 3 7 8 4 %0A4 4 8 6 2 %0A4 5 6 10 9 %0A4 9 11 7 5 %0A%0A%0A%0A10%0A5 6 7 8 9 10 11 12 13 14 %0A%0A%0A%0Atip 14%0A%0A"; 960 961// src/worker/legacy/resources/com/vzome/core/parts/default/green.vef 962var green_default = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0Ascale (1/2,0)%0A%0A19%0A(0,0) (-2,7) (0,0) (-1,5) %0A(0,0) (3,0) (-2,3) (0,4) %0A(0,0) (-4,10) (1,-2) (-4,10) %0A(0,0) (-4,10) (-1,2) (-4,10) %0A(0,0) (-6,13) (0,0) (-7,15) %0A(0,0) (-1,2) (-2,3) (2,-2) %0A(0,0) (-2,4) (1,-2) (0,1) %0A(0,0) (6,-8) (1,-2) (6,-8) %0A(0,0) (4,-2) (-1,2) (2,1) %0A(0,0) (3,0) (2,-3) (0,4) %0A(0,0) (4,-2) (1,-2) (2,1) %0A(0,0) (2,1) (0,0) (-1,6) %0A(0,0) (4,-5) (0,0) (3,-3) %0A(0,0) (-1,2) (2,-3) (2,-2) %0A(0,0) (8,-11) (0,0) (9,-13) %0A(0,0) (6,-8) (-1,2) (6,-8) %0A(0,0) (-2,4) (-1,2) (0,1) %0A(0,0) (0,1) (0,0) (3,-4) %0A(0,0) (2,2) (0,0) (2,2) %0A%0A%0A%0A0%0A%0A%0A%0A18%0A3 0 1 2%0A3 5 6 7%0A3 3 8 9%0A4 4 2 10 11%0A4 12 7 2 4%0A3 13 5 12%0A4 7 14 0 2%0A4 14 15 3 0%0A4 15 12 4 3%0A3 1 10 2%0A3 9 0 3%0A3 9 1 0%0A3 16 13 15%0A3 13 12 15%0A4 6 17 14 7%0A4 3 4 11 8%0A3 5 7 12%0A4 17 16 15 14%0A%0A%0A%0A10%0A 0 3 4 1 9 11 2 10 18 8%0A%0Atip 18%0A"; 963 964// src/worker/legacy/resources/com/vzome/core/parts/default/lavender.vef 965var lavender_default = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (1/2,0) %0A%0A15%0A(0,0) (0,-2) (-4,10) (-4,4) %0A(0,0) (2,-5) (-3,8) (-5,5) %0A(0,0) (-3,4) (7,-10) (-1,0) %0A(0,0) (-5,7) (6,-8) (0,-1) %0A(0,0) (2,-5) (-5,12) (-1,-1) %0A(0,0) (4,-8) (-4,10) (-2,0) %0A(0,0) (-1,0) (4,-2) (-3,1) %0A(0,0) (-3,3) (3,0) (-2,0) %0A(0,0) (-3,4) (5,-6) (3,-6) %0A(0,0) (-1,1) (6,-8) (2,-5) %0A(0,0) (2,-4) (-1,2) (0,-1) %0A(0,0) (0,-1) (-2,4) (1,-2) %0A(0,0) (1,-2) (0,1) (2,-4) %0A(0,0) (-2,1) (2,1) (-4,3) %0A(0,0) (-1,-1) (2,2) (-2,-1) %0A%0A%0A%0A0%0A%0A%0A%0A16%0A4 0 1 2 3%0A4 4 5 6 7%0A4 4 0 3 8%0A3 2 9 10%0A3 8 3 11%0A3 8 11 12%0A3 9 12 10%0A3 0 4 7%0A3 9 8 12%0A3 5 1 6%0A4 8 9 5 4%0A4 3 2 10 11%0A3 1 0 13%0A3 1 13 6%0A3 0 7 13%0A4 5 9 2 1%0A%0A%0A%0A8%0A 5 1 4 0 7 14 6 13%0A%0Atip 14%0A"; 966 967// src/worker/legacy/resources/com/vzome/core/parts/default/maroon.vef 968var maroon_default = "data:text/plain;
968charset=utf-8,vZome VEF 6 field golden%0Ascale (1/2,0)%0A%0A17%0A(0,0) (-1,2) (-2,3) (2,-2) %0A(0,0) (-1,2) (2,-3) (2,-2) %0A(0,0) (-2,4) (2,-3) (1,1) %0A(0,0) (-2,4) (-2,3) (1,1) %0A(0,0) (0,1) (0,0) (3,2) %0A(0,0) (0,1) (2,-3) (2,1) %0A(0,0) (0,0) (2,-3) (1,1) %0A(0,0) (2,-3) (2,-3) (2,1) %0A(0,0) (1,-1) (-2,3) (1,4) %0A(0,0) (2,-3) (-2,3) (2,1) %0A(0,0) (0,1) (-2,3) (2,1) %0A(0,0) (-1,3) (-2,3) (1,4) %0A(0,0) (1,-1) (2,-3) (1,4) %0A(0,0) (0,0) (-2,3) (1,1) %0A(0,0) (1,-2) (-2,3) (2,-2) %0A(0,0) (-1,3) (2,-3) (1,4) %0A(0,0) (1,-2) (2,-3) (2,-2) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 0 1 2 3%0A4 5 2 6 7%0A4 8 9 10 11%0A4 3 2 5 10%0A4 0 3 13 14%0A4 7 12 15 5%0A4 9 7 6 13%0A4 13 6 16 14%0A4 2 1 16 6%0A4 3 10 9 13%0A4 10 5 15 11%0A4 8 12 7 9%0A%0A%0A%0A9%0A 4 12 8 11 10 9 7 15 5%0A%0Atip 4%0A"; 969 970// src/worker/legacy/resources/com/vzome/core/parts/default/navy.vef 971var navy_default = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (1/2,0) %0A%0A19%0A(0,0) (-1,-1) (-1,0) (4,2) %0A(0,0) (2,-4) (-5,8) (1,1) %0A(0,0) (1,-2) (2,-3) (2,-2) %0A(0,0) (2,-4) (-1,2) (0,1) %0A(0,0) (-1,0) (-1,0) (1,6) %0A(0,0) (-2,1) (1,-3) (2,4) %0A(0,0) (-6,15/2) (7/2,-7) (3/2,7/2) %0A(0,0) (-3,3) (2,-4) (-3,11) %0A(0,0) (-2,1) (-3,3) (2,4) %0A(0,0) (-3,3) (0,-2) (4,1) %0A(0,0) (-3,3) (4,-8) (3,1) %0A(0,0) (5,-17/2) (-9/2,7) (5/2,-3/2) %0A(0,0) (0,-3/2) (5/2,-5) (-3/2,17/2) %0A(0,0) (2,-4) (-3,4) (7,-9) %0A(0,0) (-1,1/2) (-7/2,5) (11/2,-13/2) %0A(0,0) (0,-1) (0,0) (3,-4) %0A(0,0) (-3,3) (-2,2) (4,1) %0A(0,0) (1,-2) (-2,3) (2,-2) %0A(0,0) (2,-4) (1,-2) (0,1) %0A%0A%0A%0A0%0A%0A%0A%0A20%0A3 1 2 3%0A3 6 5 7%0A3 9 8 10%0A3 10 8 6%0A3 8 5 6%0A4 11 1 7 12%0A4 13 10 6 14%0A4 15 14 1 3%0A3 12 7 16%0A3 13 17 11%0A3 16 7 5%0A3 2 1 11%0A3 11 17 2%0A3 13 18 17%0A3 18 14 15%0A4 7 1 14 6%0A3 13 14 18%0A4 10 12 4 9%0A3 4 12 16%0A4 10 13 11 12%0A%0A%0A%0A10%0A 0 4 5 8 10 7 16 9 6 12%0A%0Atip 0%0A"; 972 973// src/worker/legacy/resources/com/vzome/core/parts/default/olive.vef 974var olive_default = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0Ascale (1/2,0)%0A%0A19%0A(0,0) (1,-3) (-1,0) (-2,4) %0A(0,0) (0,-2) (1,-3) (-1,2) %0A(0,0) (0,-3) (1,-4) (1,-1) %0A(0,0) (1,-4) (-1,-1) (0,1) %0A(0,0) (-2,2) (-3,3) (-1,2) %0A(0,0) (0,-1) (2,-4) (1,-2) %0A(0,0) (-3,4) (0,-1) (0,0) %0A(0,0) (-3,2) (-1,-1) (2,-3) %0A(0,0) (-3,3) (-1,0) (0,0) %0A(0,0) (-2,1) (-3,2) (1,-1) %0A(0,0) (0,-1) (2,-4) (-1,2) %0A(0,0) (-2,2) (1,-2) (2,-3) %0A(0,0) (-2,2) (1,-2) (-2,3) %0A(0,0) (-2,0) (-4,3) (1,-1) %0A(0,0) (-2,0) (-4,3) (-1,3) %0A(0,0) (0,-3) (-3,1) (-2,4) %0A(0,0) (0,-3) (-3,1) (2,-2) %0A(0,0) (1,-5) (-2,0) (0,1) %0A(0,0) (-2,-1) (-2,-1) (0,1) %0A%0A%0A%0A0%0A%0A%0A%0A20%0A4 0 1 2 3%0A3 4 5 6%0A4 7 8 4 9%0A3 0 10 11%0A3 1 12 8%0A4 0 3 9 4%0A3 2 14 3%0A3 7 9 15%0A3 3 14 16%0A4 17 2 7 13%0A4 7 2 1 8%0A3 8 12 5%0A3 4 8 5%0A4 10 0 4 6%0A3 7 15 13%0A3 1 11 12%0A3 2 17 14%0A3 0 11 1%0A3 3 16 9%0A3 9 16 15%0A%0A%0A%0A10%0A 13 14 3 9 2 18 16 17 7 15%0A%0Atip 18%0A"; 975 976// src/worker/legacy/resources/com/vzome/core/parts/default/orange.vef 977var orange_default = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A15%0A(0,0) (-1/2,1) (0,1) (-1/2,1/2)%0A(0,0) (-1/2,1) (0,1) (1/2,-1/2)%0A(0,0) (-1/2,3/2) (1/2,0) (0,0)%0A(0,0) (1/2,0) (1,0) (-1/2,1/2)%0A(0,0) (1/2,0) (1,0) (1/2,-1/2)%0A(0,0) (-1/2,2) (1,0) (-1/2,1/2)%0A(0,0) (-1/2,2) (1,0) (1/2,-1/2)%0A(0,0) (5/2,-1) (2,2) (-1/2,1/2)%0A(0,0) (5/2,-1) (2,2) (1/2,-1/2)%0A(0,0) (3/2,1) (2,2) (-1/2,1/2)%0A(0,0) (3/2,1) (2,2) (1/2,-1/2)%0A(0,0) (5/2,-1/2) (5/2,2) (0,0)%0A(0,0) (5/2,0) (3,1) (-1/2,1/2)%0A(0,0) (5/2,0) (3,1) (1/2,-1/2)%0A(0,0) (2,1) (3,2) (0,0)%0A%0A%0A%0A0%0A%0A%0A%0A16%0A3 0 3 5 %0A3 1 0 2 %0A3 1 2 6 %0A3 5 2 0 %0A3 6 4 1 %0A3 9 7 12 %0A3 11 12 7 %0A3 13 8 10 %0A3 13 11 8 %0A3 13 12 11 %0A4 1 4 3 0 %0A4 5 3 7 9 %0A4 10 8 4 6 %0A4 12 13 10 9 %0A5 3 4 8 11 7 %0A5 6 2 5 9 10 %0A%0A%0A%0A8%0A7 8 9 10 11 12 13 14 %0A%0A%0Atip 14%0A%0A"; 978 979// src/worker/legacy/resources/com/vzome/core/parts/default/purple.vef 980var purple_default = "data:text/plain;
980charset=utf-8,vZome VEF 6 field golden%0A%0A19%0A(0,0) (-1/2,3/2) (1/2,0) (0,0)%0A(0,0) (1/2,0) (1,-1) (-1/2,1/2)%0A(0,0) (1/2,0) (1,-1) (1/2,-1/2)%0A(0,0) (0,1) (1/2,-1/2) (1/2,-1)%0A(0,0) (0,1) (1/2,-1/2) (-1/2,1)%0A(0,0) (1,0) (3/2,-2) (-1/2,1/2)%0A(0,0) (1,0) (3/2,-2) (1/2,-1/2)%0A(0,0) (1,0) (1/2,0) (-1/2,1/2)%0A(0,0) (1,0) (1/2,0) (1/2,-1/2)%0A(0,0) (2,2) (1/2,1) (-1/2,1/2)%0A(0,0) (2,2) (1/2,1) (1/2,-1/2)%0A(0,0) (2,2) (-1/2,3) (-1/2,1/2)%0A(0,0) (2,2) (-1/2,3) (1/2,-1/2)%0A(0,0) (3,1) (1/2,3/2) (1/2,-1)%0A(0,0) (3,1) (1/2,3/2) (-1/2,1)%0A(0,0) (5/2,2) (0,2) (-1/2,1/2)%0A(0,0) (5/2,2) (0,2) (1/2,-1/2)%0A(0,0) (7/2,1/2) (1/2,1) (0,0)%0A(0,0) (3,2) (1,1) (0,0)%0A%0A%0A%0A0%0A%0A%0A%0A22%0A3 1 0 7 %0A3 3 1 5 %0A3 6 2 4 %0A3 7 0 8 %0A3 7 5 1 %0A3 8 0 2 %0A3 8 2 6 %0A3 9 11 15 %0A3 9 15 17 %0A3 9 17 10 %0A3 10 16 12 %0A3 10 17 16 %0A3 12 16 14 %0A3 13 15 11 %0A4 6 4 3 5 %0A4 9 10 6 5 %0A4 11 9 5 7 %0A4 12 8 6 10 %0A4 12 11 7 8 %0A4 12 14 13 11 %0A5 2 0 1 3 4 %0A5 13 14 16 17 15 %0A%0A%0A%0A10%0A9 10 11 12 13 14 15 16 17 18 %0A%0A%0A%0Atip 18%0A%0A"; 981 982// src/worker/legacy/resources/com/vzome/core/parts/default/red-short.vef 983var red_short_default = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A11%0A(0,0) (-1/2,1/2) (-1/2,-1) (0,-1)%0A(0,0) (-1/2,1/2) (-1/2,0) (-1,1)%0A(0,0) (1/2,-1) (-1,0) (-1/2,-1/2)%0A(0,0) (1/2,-1) (0,-1) (-1/2,1/2)%0A(0,0) (0,0) (-1,-1) (-1,0)%0A(0,0) (0,0) (-3/2,1/2) (-1/2,0)%0A(0,0) (0,0) (1/2,-3/2) (-1/2,0)%0A(0,0) (-1/2,1) (-1,0) (-1/2,-1/2)%0A(0,0) (-1/2,1) (0,-1) (-1/2,1/2)%0A(0,0) (1/2,-1/2) (-1/2,-1) (0,-1)%0A(0,0) (1/2,-1/2) (-1/2,0) (-1,1)%0A%0A%0A%0A0%0A%0A%0A%0A10%0A3 0 5 3 %0A3 1 6 2 %0A3 2 0 1 %0A3 3 1 0 %0A3 5 9 8 %0A3 6 10 7 %0A3 7 2 6 %0A3 8 3 5 %0A3 9 7 10 %0A3 10 8 9 %0A%0A%0A%0A6%0A0 2 4 5 7 9 %0A%0Atip 4%0A"; 984 985// src/worker/legacy/resources/com/vzome/core/parts/default/red.vef 986var red_default2 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A21%0A(0,0) (-1/2,1/2) (3/2,1) (-2,1)%0A(0,0) (-1/2,1/2) (5/2,1) (0,-3)%0A(0,0) (1/2,-1) (3,0) (-1/2,-5/2)%0A(0,0) (1/2,-1/2) (1/2,0) (-1,1)%0A(0,0) (0,0) (-1/2,3/2) (-1/2,0)%0A(0,0) (0,0) (1/2,5/2) (-3/2,0)%0A(0,0) (1/2,-1/2) (3/2,1) (-2,1)%0A(0,0) (-1/2,1/2) (7/2,2) (-1,-3)%0A(0,0) (1/2,-1) (1,2) (-3/2,1/2)%0A(0,0) (-1/2,1) (1,2) (-3/2,1/2)%0A(0,0) (0,0) (7/2,-1/2) (-1/2,-2)%0A(0,0) (1/2,-1/2) (5/2,1) (0,-3)%0A(0,0) (0,0) (9/2,1/2) (-3/2,-2)%0A(0,0) (1/2,-1) (0,1) (-1/2,1/2)%0A(0,0) (-1/2,1) (0,1) (-1/2,1/2)%0A(0,0) (-1/2,1/2) (1/2,0) (-1,1)%0A(0,0) (1/2,-1) (4,1) (-3/2,-5/2)%0A(0,0) (1/2,-1/2) (7/2,2) (-1,-3)%0A(0,0) (-1/2,1) (4,1) (-3/2,-5/2)%0A(0,0) (0,0) (4,2) (-2,-2)%0A(0,0) (-1/2,1) (3,0) (-1/2,-5/2)%0A%0A%0A%0A0%0A%0A%0A%0A20%0A3 0 1 2%0A4 3 4 5 6%0A3 8 9 10%0A3 9 11 10%0A4 13 14 9 8%0A4 4 15 0 5%0A4 2 1 7 16%0A3 0 8 1%0A4 14 3 6 9%0A3 8 10 1%0A3 9 6 11%0A3 5 0 2%0A4 11 20 18 17%0A4 20 2 16 18%0A3 6 5 20%0A4 1 10 12 7%0A3 6 20 11%0A4 15 13 8 0%0A4 10 11 17 12%0A3 5 2 20%0A%0A%0A%0A6%0A 7 12 17 18 19 16%0A%0Atip 19%0A%0Amiddle 9 11 10 0 8 1 5 2 20 6"; 987 988// src/worker/legacy/resources/com/vzome/core/parts/default/rose.vef 989var rose_default = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (1/2,0)%0A%0A17%0A(0,0) (1,-4) (1,0) (1,-4) %0A(0,0) (-1,-1) (2,-2) (-2,1) %0A(0,0) (-2,0) (3,-3) (-3,2) %0A(0,0) (0,-3) (2,-1) (0,-3) %0A(0,0) (-3,3) (0,1) (-3,4) %0A(0,0) (-1,0) (-1,3) (0,-1) %0A(0,0) (-1,-1) (0,2) (2,-5) %0A(0,0) (-3,2) (1,0) (-1,0) %0A(0,0) (-2,2) (-1,2) (-2,3) %0A(0,0) (-1,0) (1,-1) (-4,5) %0A(0,0) (0,-1) (0,0) (-3,4) %0A(0,0) (-2,0) (1,1) (1,-4) %0A(0,0) (0,-1) (-2,4) (1,-2) %0A(0,0) (2,-4) (-1,2) (0,-1) %0A(0,0) (1,-3) (0,1) (-1,0) %0A(0,0) (-4,3) (2,-1) (-2,1) %0A(0,0) (-2,-1) (1,1) (-2,0) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 0 1 2 3%0A4 4 5 6 7%0A4 8 4 9 10%0A4 11 6 0 3%0A4 5 12 13 14%0A4 8 12 5 4%0A4 11 15 7 6%0A4 6 5 14 0%0A4 4 7 1 9%0A4 7 15 2 1%0A4 1 0 14 9%0A4 9 14 13 10%0A%0A%0A%0A9%0A 3 2 16 15 1 11 0 6 7%0A%0Atip 16%0A"; 990 991// src/worker/legacy/resources/com/vzome/core/parts/default/sand.vef 992var sand_default = "data:text/plain;
992charset=utf-8,vZome VEF 6 field golden%0Ascale (1/2,0)%0A%0A17%0A(0,0) (0,1) (-2,4) (1,4) %0A(0,0) (2,-3) (2,-2) (1,4) %0A(0,0) (0,0) (-1,2) (2,1) %0A(0,0) (0,0) (3,-4) (2,1) %0A(0,0) (3,-5) (1,-1) (1,1) %0A(0,0) (3,-5) (-3,5) (1,1) %0A(0,0) (2,-3) (-2,4) (1,4) %0A(0,0) (1,-2) (2,-3) (2,-2) %0A(0,0) (1,-2) (-2,3) (2,-2) %0A(0,0) (1,-1) (1,-1) (1,1) %0A(0,0) (-1,2) (2,-3) (2,-2) %0A(0,0) (0,1) (2,-2) (1,4) %0A(0,0) (-2,4) (-1,2) (2,1) %0A(0,0) (-2,4) (3,-4) (2,1) %0A(0,0) (1,-1) (-3,5) (1,1) %0A(0,0) (-1,2) (-2,3) (2,-2) %0A(0,0) (1,-1) (0,1) (3,2) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 2 3 4 5%0A4 6 1 3 2%0A4 5 4 7 8%0A4 4 9 10 7%0A4 11 13 3 1%0A4 2 5 14 12%0A4 4 3 13 9%0A4 14 5 8 15%0A4 12 13 11 0%0A4 6 2 12 0%0A4 14 9 13 12%0A4 15 10 9 14%0A%0A%0A%0A9%0A 0 1 2 6 11 12 16 3 13%0A%0Atip 16%0A"; 993 994// src/worker/legacy/resources/com/vzome/core/parts/default/snubDiagonal.vef 995var snubDiagonal_default = "data:text/plain;charset=utf-8,vZome VEF 6 field snubDodec%0A%0Ascale (0,0,0,0,0,1/2)%0A%0A19%0A(0,0,0,0,0,0) (-2,-2,4,2,10,6) (4,2,-6,-4,-5,-3) (-2,0,2,2,1,-4) %0A(0,0,0,0,0,0) (2,-4,2,-2,-2,7) (2,-2,0,-2,2,-5) (-4,6,-2,4,12,-19) %0A(0,0,0,0,0,0) (0,0,0,0,1,0) (0,0,0,0,-2,2) (0,0,0,0,1,-1) %0A(0,0,0,0,0,0) (0,0,0,0,-1,3) (0,0,0,0,-1,0) (0,0,0,0,0,0) %0A(0,0,0,0,0,0) (2,-4,2,-2,-1,5) (2,-2,0,-2,1,-4) (-4,6,-2,4,12,-20) %0A(0,0,0,0,0,0) (-2,-2,4,2,10,6) (4,2,-6,-4,-5,-3) (-2,0,2,2,-1,0) %0A(0,0,0,0,0,0) (-4,2,2,4,16,-5) (2,4,-6,-2,8,-23) (2,-6,4,-2,0,-1) %0A(0,0,0,0,0,0) (-4,2,2,4,17,-7) (2,4,-6,-2,7,-22) (2,-6,4,-2,0,-2) %0A(0,0,0,0,0,0) (-2,-2,4,2,9,8) (4,2,-6,-4,-4,-4) (-2,0,2,2,1,-3) %0A(0,0,0,0,0,0) (-4,2,2,4,11,3) (2,4,-6,-2,-7,2) (2,-6,4,-2,-12,18) %0A(0,0,0,0,0,0) (0,0,0,0,0,2) (0,0,0,0,-1,1) (0,0,0,0,1,-2) %0A(0,0,0,0,0,0) (2,-4,2,-2,-6,13) (2,-2,0,-2,-14,21) (-4,6,-2,4,0,-1) %0A(0,0,0,0,0,0) (0,0,0,0,1,0) (0,0,0,0,-2,2) (0,0,0,0,-1,1) %0A(0,0,0,0,0,0) (-2,-2,4,2,11,5) (4,2,-6,-4,-5,-2) (-2,0,2,2,0,-2) %0A(0,0,0,0,0,0) (2,-4,2,-2,-7,15) (2,-2,0,-2,-13,20) (-4,6,-2,4,0,0) %0A(0,0,0,0,0,0) (-2,-2,4,2,9,8) (4,2,-6,-4,-4,-4) (-2,0,2,2,-1,-1) %0A(0,0,0,0,0,0) (-4,2,2,4,12,1) (2,4,-6,-2,-8,3) (2,-6,4,-2,-12,17) %0A(0,0,0,0,0,0) (0,0,0,0,0,2) (0,0,0,0,-1,1) (0,0,0,0,-1,2) %0A(0,0,0,0,0,0) (-2,-2,4,2,10,8) (4,2,-6,-4,-6,-2) (-2,0,2,2,0,-2) %0A%0A%0A%0A0%0A%0A%0A%0A16%0A4 1 2 3 4%0A3 5 6 7%0A3 8 9 6%0A3 10 11 12%0A3 14 11 10%0A3 7 0 5%0A4 16 7 4 11%0A3 17 1 14%0A3 10 17 14%0A4 16 9 13 15%0A4 11 14 9 16%0A4 7 6 1 4%0A3 5 8 6%0A4 6 9 14 1%0A3 12 11 4%0A3 7 16 0%0A%0A%0A%0A10%0A 0 7 13 5 9 6 15 16 8 18%0A%0Atip 18%0A"; 996 997// src/worker/legacy/resources/com/vzome/core/parts/default/snubPentagon.vef 998var snubPentagon_default = "data:text/plain;charset=utf-8,vZome VEF 6 field snubDodec%0A%0Ascale (0,0,0,0,0,1/2)%0A%0A15%0A(0,0,0,0,0,0) (2,-2,0,0,0,0) (-4,6,0,0,7,-11) (2,-4,0,0,-3,6) %0A(0,0,0,0,0,0) (0,0,0,0,1,0) (0,0,0,0,0,0) (0,0,0,0,1,-3) %0A(0,0,0,0,0,0) (2,-2,0,0,0,0) (-4,6,0,0,9,-13) (2,-4,0,0,-3,6) %0A(0,0,0,0,0,0) (4,2,0,0,0,-2) (-2,0,0,0,3,1) (-2,-2,0,0,3,6) %0A(0,0,0,0,0,0) (4,2,0,0,-1,0) (-2,0,0,0,4,0) (-2,-2,0,0,3,7) %0A(0,0,0,0,0,0) (4,2,0,0,0,-2) (-2,0,0,0,5,-1) (-2,-2,0,0,3,6) %0A(0,0,0,0,0,0) (2,4,0,0,0,0) (2,-6,0,0,-5,13) (-4,2,0,0,7,-2) %0A(0,0,0,0,0,0) (2,4,0,0,0,0) (2,-6,0,0,-5,13) (-4,2,0,0,9,-6) %0A(0,0,0,0,0,0) (4,2,0,0,0,0) (-2,0,0,0,4,0) (-2,-2,0,0,4,4) %0A(0,0,0,0,0,0) (2,4,0,0,0,0) (2,-6,0,0,-3,11) (-4,2,0,0,7,-2) %0A(0,0,0,0,0,0) (2,4,0,0,0,0) (2,-6,0,0,-3,11) (-4,2,0,0,9,-6) %0A(0,0,0,0,0,0) (2,-2,0,0,0,0) (-4,6,0,0,9,-13) (2,-4,0,0,-5,10) %0A(0,0,0,0,0,0) (2,-2,0,0,0,0) (-4,6,0,0,7,-11) (2,-4,0,0,-5,10) %0A(0,0,0,0,0,0) (0,0,0,0,0,2) (0,0,0,0,-1,1) (0,0,0,0,1,-2) %0A(0,0,0,0,0,0) (0,0,0,0,0,2) (0,0,0,0,1,-1) (0,0,0,0,1,-2) %0A%0A%0A%0A0%0A%0A%0A%0A16%0A3 0 1 2%0A3 6 7 3%0A3 9 6 4%0A4 9 10 2 11%0A3 0 12 13%0A3 0 13 1%0A3 9 5 10%0A4 0 2 10 7%0A4 7 10 5 3%0A4 7 6 12 0%0A3 1 14 2%0A4 11 14 13 12%0A3 14 11 2%0A4 6 9 11 12%0A3 9 4 5%0A3 6 3 4%0A%0A%0A%0A8%0A 3 4 5 7 8 10 6 9%0A%0Atip 8%0A"; 999 1000// src/worker/legacy/resources/com/vzome/core/parts/default/snubTriangle.vef 1001var snubTriangle_default = "data:text/plain;
1001charset=utf-8,vZome VEF 6 field snubDodec%0A%0Ascale (0,0,0,0,0,1/2)%0A%0A19%0A(0,0,0,0,0,0) (2,-4,4,-4,-4,8) (-2,2,0,0,3,-3) (4,-6,0,0,-7,10) %0A(0,0,0,0,0,0) (0,0,0,0,1,0) (0,0,0,0,-2,2) (0,0,0,0,-1,1) %0A(0,0,0,0,0,0) (2,-4,4,-4,-4,8) (-2,2,0,0,5,-5) (4,-6,0,0,-7,10) %0A(0,0,0,0,0,0) (-2,-2,8,4,4,2) (-4,-2,0,0,9,3) (2,0,0,0,-3,-2) %0A(0,0,0,0,0,0) (-4,2,4,8,8,-4) (-2,-4,0,0,3,9) (-2,6,0,0,3,-10) %0A(0,0,0,0,0,0) (-4,2,4,8,8,-4) (-2,-4,0,0,5,7) (-2,6,0,0,3,-10) %0A(0,0,0,0,0,0) (2,-4,4,-4,-4,8) (-2,2,0,0,5,-5) (4,-6,0,0,-9,14) %0A(0,0,0,0,0,0) (2,-4,4,-4,-4,8) (-2,2,0,0,3,-3) (4,-6,0,0,-9,14) %0A(0,0,0,0,0,0) (-2,-2,8,4,4,2) (-4,-2,0,0,9,3) (2,0,0,0,-5,2) %0A(0,0,0,0,0,0) (-4,2,4,8,8,-4) (-2,-4,0,0,3,9) (-2,6,0,0,5,-14) %0A(0,0,0,0,0,0) (-2,-2,8,4,5,1) (-4,-2,0,0,9,4) (2,0,0,0,-4,0) %0A(0,0,0,0,0,0) (-4,2,4,8,8,-4) (-2,-4,0,0,5,7) (-2,6,0,0,5,-14) %0A(0,0,0,0,0,0) (0,0,0,0,1,0) (0,0,0,0,-2,2) (0,0,0,0,1,-1) %0A(0,0,0,0,0,0) (0,0,0,0,-1,3) (0,0,0,0,-1,0) (0,0,0,0,0,0) %0A(0,0,0,0,0,0) (-2,-2,8,4,4,4) (-4,-2,0,0,8,4) (2,0,0,0,-4,0) %0A(0,0,0,0,0,0) (-2,-2,8,4,3,4) (-4,-2,0,0,10,2) (2,0,0,0,-5,1) %0A(0,0,0,0,0,0) (-2,-2,8,4,3,4) (-4,-2,0,0,10,2) (2,0,0,0,-3,-1) %0A(0,0,0,0,0,0) (0,0,0,0,0,2) (0,0,0,0,-1,1) (0,0,0,0,1,-2) %0A(0,0,0,0,0,0) (0,0,0,0,0,2) (0,0,0,0,-1,1) (0,0,0,0,-1,2) %0A%0A%0A%0A0%0A%0A%0A%0A20%0A3 0 1 2%0A4 6 7 4 5%0A4 3 8 4 9%0A3 11 5 10%0A3 7 12 13%0A3 6 12 7%0A3 13 0 7%0A3 15 3 9%0A3 10 5 16%0A3 1 17 2%0A4 11 9 0 2%0A4 11 2 6 5%0A3 6 18 12%0A4 17 18 6 2%0A4 9 4 7 0%0A3 10 15 11%0A3 9 11 15%0A3 16 5 4%0A3 16 4 8%0A3 13 1 0%0A%0A%0A%0A10%0A 3 4 5 10 14 8 9 11 15 16%0A%0Atip 14%0A"; 1002 1003// src/worker/legacy/resources/com/vzome/core/parts/default/spruce.vef 1004var spruce_default = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (0,1/2) %0A%0A15%0A(0,0) (-2,0) (-2,1) (9,3) %0A(0,0) (1,-3) (-1,0) (8,2) %0A(0,0) (-2,2) (-2,3) (1,3) %0A(0,0) (0,0) (-2,3) (1,3) %0A(0,0) (1,-1) (1,-2) (0,2) %0A(0,0) (-1,1) (1,-2) (0,2) %0A(0,0) (-1,-1) (-1,0) (8,2) %0A(0,0) (1,-3) (1,-4) (8,2) %0A(0,0) (0,0) (1,-3) (1,0) %0A(0,0) (0,0) (0,-1) (1,3) %0A(0,0) (0,-2) (-2,1) (9,3) %0A(0,0) (-1,-1) (-2,2) (8,5) %0A(0,0) (-1,-1) (1,-4) (8,2) %0A(0,0) (-2,2) (0,-1) (1,3) %0A(0,0) (-1,-1) (-1,-1) (9,5) %0A%0A%0A%0A0%0A%0A%0A%0A16%0A4 2 3 4 5%0A3 8 4 9%0A3 10 1 11%0A4 6 1 3 2%0A4 13 9 7 12%0A3 7 1 10%0A3 12 0 6%0A3 5 13 2%0A3 9 4 3%0A3 8 9 13%0A3 0 11 6%0A4 13 12 6 2%0A4 12 7 10 0%0A4 9 3 1 7%0A3 11 1 6%0A3 8 13 5%0A%0A%0A%0A8%0A 0 1 6 7 12 11 14 10%0A%0Atip 14%0A"; 1005 1006// src/worker/legacy/resources/com/vzome/core/parts/default/sulfur.vef 1007var sulfur_default = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0Ascale (1/2,0)%0A%0A17%0A(0,0) (4,-5) (-2,3) (-6,15) %0A(0,0) (-5,9) (-2,3) (9,-12) %0A(0,0) (-5,9) (2,-3) (9,-12) %0A(0,0) (4,-5) (2,-3) (-6,15) %0A(0,0) (-3,5) (-2,3) (9,-12) %0A(0,0) (-3,5) (2,-3) (9,-12) %0A(0,0) (1,-2) (2,-3) (2,-2) %0A(0,0) (1,-2) (-2,3) (2,-2) %0A(0,0) (0,2) (2,-3) (1,5) %0A(0,0) (0,2) (-2,3) (1,5) %0A(0,0) (2,-2) (2,-3) (1,5) %0A(0,0) (-1,2) (-2,3) (2,-2) %0A(0,0) (-1,2) (2,-3) (2,-2) %0A(0,0) (6,-9) (2,-3) (-6,15) %0A(0,0) (2,-2) (-2,3) (1,5) %0A(0,0) (6,-9) (-2,3) (-6,15) %0A(0,0) (1,0) (0,0) (3,3) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 0 1 2 3%0A4 4 5 6 7%0A4 0 3 8 9%0A4 11 1 4 7%0A4 11 12 2 1%0A4 13 3 2 5%0A4 14 10 13 15%0A4 14 15 0 9%0A4 15 13 5 4%0A4 13 10 8 3%0A4 2 12 6 5%0A4 1 0 15 4%0A%0A%0A%0A9%0A 10 3 16 9 0 13 8 15 14%0A%0Atip 16%0A"; 1008 1009// src/worker/legacy/resources/com/vzome/core/parts/default/turquoise.vef 1010var turquoise_default = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (0,1/2) %0A%0A17%0A(0,0) (-5,1) (5,-7) (-7,5) %0A(0,0) (-4,-1) (6,-8) (-7,6) %0A(0,0) (-1,-2) (-3,6) (1,-4) %0A(0,0) (-2,0) (-4,7) (1,-5) %0A(0,0) (-1,0) (2,-2) (-1,1) %0A(0,0) (-2,2) (1,-1) (-1,0) %0A(0,0) (-1,-2) (-5,8) (3,-8) %0A(0,0) (-1,0) (0,0) (1,-3) %0A(0,0) (0,-2) (1,-1) (1,-2) %0A(0,0) (0,-4) (-4,7) (3,-7) %0A(0,0) (-3,-3) (5,-7) (-5,3) %0A(0,0) (-4,-3)
1010(-1,2) (-3,-3) %0A(0,0) (-4,-1) (4,-6) (-5,2) %0A(0,0) (-3,-5) (0,1) (-3,-2) %0A(0,0) (-5,-3) (1,0) (-4,-2) %0A(0,0) (-5,-1) (0,1) (-5,0) %0A(0,0) (-4,-3) (1,0) (-5,1) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 0 1 2 3%0A4 2 4 5 3%0A4 6 7 8 9%0A4 11 12 10 13%0A4 9 10 12 6%0A4 9 8 4 2%0A4 15 16 1 0%0A4 2 1 10 9%0A4 0 12 11 15%0A4 3 5 7 6%0A4 13 10 1 16%0A4 0 3 6 12%0A%0A%0A%0A9%0A 10 1 0 14 12 13 16 15 11%0A%0Atip 14%0A"; 1011 1012// src/worker/legacy/resources/com/vzome/core/parts/default/yellow-short.vef 1013var yellow_short_default = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A7%0A(0,0) (1/2,0) (0,0) (-1/2,3/2)%0A(0,0) (0,1) (-1/2,1/2) (-1/2,1)%0A(0,0) (0,1) (1/2,-1/2) (-1/2,1)%0A(0,0) (1,0) (-1/2,1/2) (1/2,0)%0A(0,0) (1,0) (1/2,-1/2) (1/2,0)%0A(0,0) (1/2,1) (0,0) (1/2,-1/2)%0A(0,0) (1,1) (0,0) (0,1)%0A%0A%0A%0A0%0A%0A%0A%0A6%0A3 1 5 3 %0A3 3 0 1 %0A3 3 4 0 %0A3 4 2 0 %0A3 5 1 2 %0A3 5 2 4 %0A%0A%0A%0A4%0A3 4 5 6 %0A%0Atip 6%0A%0A"; 1014 1015// src/worker/legacy/resources/com/vzome/core/parts/default/yellow.vef 1016var yellow_default2 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A13%0A(0,0) (-1/2,1) (0,1) (1/2,-1/2)%0A(0,0) (-1/2,3/2) (1/2,0) (0,0)%0A(0,0) (1/2,0) (1,-1/2) (0,0)%0A(0,0) (1/2,-1/2) (1/2,1/2) (1/2,-1/2)%0A(0,0) (3/2,-1) (2,0) (1/2,-1/2)%0A(0,0) (-1/2,1) (0,1) (-1/2,1/2)%0A(0,0) (1/2,-1/2) (1/2,1/2) (-1/2,1/2)%0A(0,0) (1/2,1/2) (3/2,1/2) (1/2,-1/2)%0A(0,0) (1/2,1/2) (3/2,1/2) (-1/2,1/2)%0A(0,0) (1,0) (2,1) (0,0)%0A(0,0) (1/2,0) (1,3/2) (0,0)%0A(0,0) (3/2,-1) (2,0) (-1/2,1/2)%0A(0,0) (3/2,-3/2) (3/2,1) (0,0)%0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 0 1 2 3%0A4 5 0 3 6%0A3 3 2 7%0A3 2 6 8%0A3 6 3 10%0A4 10 7 4 12%0A4 1 5 6 2%0A4 7 8 11 4%0A3 10 8 6%0A4 8 10 12 11%0A3 8 7 2%0A3 7 10 3%0A%0A%0A%0A4%0A 4 9 11 12%0A%0Atip 9%0Amiddle 10 8 6 7 2 3"; 1017
1018// src/worker/legacy/resources/com/vzome/core/parts/default/index.js 1019var shapes2 = { 1020 "apple": apple_default, 1021 "black": black_default, 1022 "blue": blue_default2, 1023 "brown": brown_default, 1024 "cinnamon": cinnamon_default, 1025 "connector": connector_default2, 1026 "coral": coral_default, 1027 "green-short": green_short_default, 1028 "green": green_default, 1029 "lavender": lavender_default, 1030 "maroon": maroon_default, 1031 "navy": navy_default, 1032 "olive": olive_default, 1033 "orange": orange_default, 1034 "purple": purple_default, 1035 "red-short": red_short_default, 1036 "red": red_default2, 1037 "rose": rose_default, 1038 "sand": sand_default, 1039 "snubDiagonal": snubDiagonal_default, 1040 "snubPentagon": snubPentagon_default, 1041 "snubTriangle": snubTriangle_default, 1042 "spruce": spruce_default, 1043 "sulfur": sulfur_default, 1044 "turquoise": turquoise_default, 1045 "yellow-short": yellow_short_default, 1046 "yellow": yellow_default2 1047}; 1048var default_default = shapes2; 1049 1050// src/worker/legacy/resources/com/vzome/core/parts/dimtool/connector.vef 1051var connector_default3 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A24%0A(0,0) (-2/3,-2/3) (-1/3,-1/3) (0,0)%0A(0,0) (-2/3,-2/3) (0,0) (-1/3,-1/3)%0A(0,0) (-2/3,-2/3) (0,0) (1/3,1/3)%0A(0,0) (-2/3,-2/3) (1/3,1/3) (0,0)%0A(0,0) (-1/3,-1/3) (-2/3,-2/3) (0,0)%0A(0,0) (-1/3,-1/3) (0,0) (-2/3,-2/3)%0A(0,0) (-1/3,-1/3) (0,0) (2/3,2/3)%0A(0,0) (-1/3,-1/3) (2/3,2/3) (0,0)%0A(0,0) (0,0) (-2/3,-2/3) (-1/3,-1/3)%0A(0,0) (0,0) (-2/3,-2/3) (1/3,1/3)%0A(0,0) (0,0) (-1/3,-1/3) (-2/3,-2/3)%0A(0,0) (0,0) (-1/3,-1/3) (2/3,2/3)%0A(0,0) (0,0) (1/3,1/3) (-2/3,-2/3)%0A(0,0) (0,0) (1/3,1/3) (2/3,2/3)%0A(0,0) (0,0) (2/3,2/3) (-1/3,-1/3)%0A(0,0) (0,0) (2/3,2/3) (1/3,1/3)%0A(0,0) (1/3,1/3) (-2/3,-2/3) (0,0)%0A(0,0) (1/3,1/3) (0,0) (-2/3,-2/3)%0A(0,0) (1/3,1/3) (0,0) (2/3,2/3)%0A(0,0) (1/3,1/3) (2/3,2/3) (0,0)%0A(0,0) (2/3,2/3) (-1/3,-1/3) (0,0)%0A(0,0) (2/3,2/3) (0,0) (-1/3,-1/3)%0A(0,0) (2/3,2/3) (0,0) (1/3,1/3)%0A(0,0) (2/3,2/3) (1/3,1/3) (0,0)%0A%0A%0A%0A0%0A%0A%0A%0A14%0A4 3 1 0 2 %0A4 9 4 8 16 %0A4 14 7 15 19 %0A4 17 10 5 12 %0A4 18 13 6 11 %0A4 20 21 23 22 %0A6 1 5 10 8 4 0 %0A6 2 6 13 15 7 3 %0A6 5 1 3 7 14 12 %0A6 6 2 0 4 9 11 %0A6 8 10 17 21 20 16 %0A6 11 9 16 20 22 18 %0A6 12 14 19 23 21 17 %0A6 15 13 18 22 23 19 %0A%0A%0A%0A0%0A%0A%0A"; 1052
1053// src/worker/legacy/resources/com/vzome/core/parts/dimtool/index.js 1054var shapes3 = { 1055 "connector": connector_default3 1056}; 1057var dimtool_default = shapes3; 1058 1059// src/worker/legacy/resources/com/vzome/core/parts/dodecagon3d/blue.vef 1060var blue_default3 = "data:text/plain;charset=utf-8,vZome VEF 6 field rootThree%0A scale (1/3,0) %0A%0A13%0A(0,0) (-1,14) (0,-1) (2/9,0) %0A(0,0) (1,4) (0,-1) (2/9,0) %0A(0,0) (1,4) (0,-1) (-2/9,0) %0A(0,0) (-1,14) (0,-1) (-2/9,0) %0A(0,0) (0,16) (0,0) (2/9,0) %0A(0,0) (0,16) (0,0) (-2/9,0) %0A(0,0) (-1,14) (0,1) (-2/9,0) %0A(0,0) (-1,14) (0,1) (2/9,0) %0A(0,0) (0,2) (0,0) (2/9,0) %0A(0,0) (0,2) (0,0) (-2/9,0) %0A(0,0) (1,4) (0,1) (-2/9,0) %0A(0,0) (1,4) (0,1) (2/9,0) %0A(0,0) (0,18) (0,0) (0,0) %0A%0A%0A%0A0%0A%0A%0A%0A8%0A4 1 2 3 0%0A4 4 5 6 7%0A4 2 1 8 9%0A4 7 6 10 11%0A6 0 4 7 11 8 1%0A4 0 3 5 4%0A6 2 9 10 6 5 3%0A4 10 9 8 11%0A%0A%0A%0A7%0A 0 3 7 12 5 6 4%0A%0Atip 12%0A"; 1061 1062// src/worker/legacy/resources/com/vzome/core/parts/dodecagon3d/connector-old.vef 1063var connector_old_default = "data:text/plain;charset=utf-8,vZome VEF 6 field rootThree%0A scale (1/3,0) %0A%0A24%0A(0,0) (-1,0) (0,1) (-2/9,0) %0A(0,0) (0,-2) (0,0) (-2/9,0) %0A(0,0) (0,-2) (0,0) (2/9,0) %0A(0,0) (-1,0) (0,1) (2/9,0) %0A(0,0) (-1,0) (0,-1) (-2/9,0) %0A(0,0) (0,-1) (-1,0) (-2/9,0) %0A(0,0) (0,-1) (-1,0) (2/9,0) %0A(0,0) (-1,0) (0,-1) (2/9,0) %0A(0,0) (0,1) (-1,0) (-2/9,0) %0A(0,0) (1,0) (0,-1) (-2/9,0) %0A(0,0) (1,0) (0,-1) (2/9,0) %0A(0,0) (0,1) (-1,0) (2/9,0) %0A(0,0) (0,0) (0,2) (-2/9,0) %0A(0,0) (0,-1) (1,0) (-2/9,0) %0A(0,0) (0,-1) (1,0) (2/9,0) %0A(0,0) (0,0) (0,2) (2/9,0) %0A(0,0) (0,0) (0,-2) (-2/9,0) %0A(0,0) (0,0) (0,-2) (2/9,0) %0A(0,0) (0,1) (1,0) (-2/9,0) %0A(0,0) (0,1) (1,0) (2/9,0) %0A(0,0) (1,0) (0,1) (-2/9,0) %0A(0,0) (0,2) (0,0) (-2/9,0) %0A(0,0) (1,0) (0,1) (2/9,0) %0A(0,0) (0,2) (0,0) (2/9,0) %0A%0A%0A%0A0%0A%0A%0A%0A14%0A4 0 1 2 3%0A4 4 5 6 7%0A4 1 4 7 2%0A4 8 9 10 11%0A4 12 13 14 15%0A4 5 16 17 6%0A4 18 12 15 19%0A12 13 12 18 20 21 9 8 16 5 4 1 0%0A4 16 8 11 17%0A4 21 20 22 23%0A12 11 10 23 22 19 15 14 3 2 7 6 17%0A4 20 18 19 22%0A4 9 21 23 10%0A4 13 0 3 14%0A%0A%0A%0A0%0A%0A%0A"; 1064 1065// src/worker/legacy/resources/com/vzome/core/parts/dodecagon3d/connector.vef 1066var connector_default4 = "data:text/plain;charset=utf-8,vZome VEF 6 field rootThree%0A%0A48%0A(0,0) (-2/3,0) (0,0) (0,-2/9)%0A(0,0) (-2/3,0) (0,0) (0,2/9)%0A(0,0) (0,-1) (-1/3,0) (0,-2/9)%0A(0,0) (0,-1) (-1/3,0) (0,2/9)%0A(0,0) (0,-1) (1/3,0) (0,-2/9)%0A(0,0) (0,-1) (1/3,0) (0,2/9)%0A(0,0) (-2/3,1/3) (0,0) (0,-5/9)%0A(0,0) (-2/3,1/3) (0,0) (0,5/9)%0A(0,0) (1/6,-1) (-1/3,1/6) (0,-5/9)%0A(0,0) (1/6,-1) (-1/3,1/6) (0,5/9)%0A(0,0) (1/6,-1) (1/3,-1/6) (0,-5/9)%0A(0,0) (1/6,-1) (1/3,-1/6) (0,5/9)%0A(0,0) (-1/3,0) (0,-1) (0,-2/9)%0A(0,0) (-1/3,0) (0,-1) (0,2/9)%0A(0,0) (-1/3,0) (0,1) (0,-2/9)%0A(0,0) (-1/3,0) (0,1) (0,2/9)%0A(0,0) (-1/3,1/6) (1/6,-1) (0,-5/9)%0A(0,0) (-1/3,1/6) (1/6,-1) (0,5/9)%0A(0,0) (-1/3,1/6) (-1/6,1) (0,-5/9)%0A(0,0) (-1/3,1/6) (-1/6,1) (0,5/9)%0A(0,0) (0,0) (-2/3,0) (0,-2/9)%0A(0,0) (0,0) (-2/3,0) (0,2/9)%0A(0,0) (0,0) (-2/3,1/3) (0,-5/9)%0A(0,0) (0,0) (-2/3,1/3) (0,5/9)%0A(0,0) (0,0) (2/3,-1/3) (0,-5/9)%0A(0,0) (0,0) (2/3,-1/3) (0,5/9)%0A(0,0) (0,0) (2/3,0) (0,-2/9)%0A(0,0) (0,0) (2/3,0) (0,2/9)%0A(0,0) (1/3,-1/6) (1/6,-1) (0,-5/9)%0A(0,0) (1/3,-1/6) (1/6,-1) (0,5/9)%0A(0,0) (1/3,-1/6) (-1/6,1) (0,-5/9)%0A(0,0) (1/3,-1/6) (-1/6,1) (0,5/9)%0A(0,0) (1/3,0) (0,-1) (0,-2/9)%0A(0,0) (1/3,0) (0,-1) (0,2/9)%0A(0,0) (1/3,0) (0,1) (0,-2/9)%0A(0,0) (1/3,0) (0,1) (0,2/9)%0A(0,0) (-1/6,1) (-1/3,1/6) (0,-5/9)%0A(0,0) (-1/6,1) (-1/3,1/6) (0,5/9)%0A(0,0) (-1/6,1) (1/3,-1/6) (0,-5/9)%0A(0,0) (-1/6,1) (1/3,-1/6) (0,5/9)%0A(0,0) (2/3,-1/3) (0,0) (0,-5/9)%0A(0,0) (2/3,-1/3) (0,0) (0,5/9)%0A(0,0) (0,1) (-1/3,0) (0,-2/9)%0A(0,0) (0,1) (-1/3,0) (0,2/9)%0A(0,0) (0,1) (1/3,0) (0,-2/9)%0A(0,0) (0,1) (1/3,0) (0,2/9)%0A(0,0) (2/3,0) (0,0) (0,-2/9)%0A(0,0) (2/3,0) (0,0) (0,2/9)%0A%0A%0A%0A0%0A%0A%0A%0A38%0A4 0 2 3 1 %0A4 0 6 8 2 %0A4 1 7 11 5 %0A4 2 8 16 12 %0A4 2 12 13 3 %0A4 3 9 7 1 %0A4 4 0 1 5 %0A4 4 10 6 0 %0A4 5 11 19 15 %0A4 12 16 22 20 %0A4 12 20 21 13 %0A4 13 17 9 3 %0A4 14 4 5 15 %0A4 14 18 10 4 %0A4 15 19 25 27 %0A4 20 22 28 32 %0A4 20 32 33 21 %0A4 21 23 17 13 %0A4 26 14 15 27 %0A4 26 24 18 14 %0A4 27 25 31 35 %0A4 32 28 36 42 %0A4 32 42 43 33 %0A4 33 29 23 21 %0A4 34 26 27 35 %0A4 34 30 24 26 %0A4 35 31 39 45 %0A4 42 36 40 46 %0A4 42 46 47 43 %0A4 43 37 29 33 %0A4 44 34 35 45 %0A4 44 38 30 34 %0A4 45 39 41 47 %0A4 46 40 38 44 %0A4 46 44 45 47 %0A4 47 41 37 43 %0A12 6 10 18 24 30 38 40 36 28 22 16 8 %0A12 39 31 25 19 11 7 9 17 23 29 37 41 %0A%0A%0A%0A0%0A%0A%0A"; 1067 1068// src/worker/legacy/resources/com/vzome/core/parts/dodecagon3d/green.vef 1069var green_default2 = "data:text/plain;
1069charset=utf-8,vZome VEF 6 field rootThree%0A scale (1/3,0) %0A%0A13%0A(0,0) (22/3,15) (-1/3,8) (-2/9,0) %0A(0,0) (16/3,15) (-1/3,8) (-2/9,0) %0A(0,0) (16/3,15) (-1/3,8) (2/9,0) %0A(0,0) (22/3,15) (-1/3,8) (2/9,0) %0A(0,0) (22/3,12) (-4/3,8) (-2/9,0) %0A(0,0) (22/3,12) (-4/3,8) (2/9,0) %0A(0,0) (5/3,3) (1/3,1) (-2/9,0) %0A(0,0) (5/3,3) (1/3,1) (2/9,0) %0A(0,0) (5/3,6) (4/3,1) (2/9,0) %0A(0,0) (5/3,6) (4/3,1) (-2/9,0) %0A(0,0) (11/3,3) (1/3,1) (2/9,0) %0A(0,0) (11/3,3) (1/3,1) (-2/9,0) %0A(0,0) (9,18) (0,9) (0,0) %0A%0A%0A%0A0%0A%0A%0A%0A8%0A4 0 1 2 3%0A4 3 5 4 0%0A4 6 7 8 9%0A6 5 3 2 8 7 10%0A4 6 11 10 7%0A6 11 6 9 1 0 4%0A4 2 1 9 8%0A4 10 11 4 5%0A%0A%0A%0A7%0A 4 3 2 1 5 0 12%0A%0Atip 12%0A"; 1070
1071// src/worker/legacy/resources/com/vzome/core/parts/dodecagon3d/index.js 1072var shapes4 = { 1073 "blue": blue_default3, 1074 "connector-old": connector_old_default, 1075 "connector": connector_default4, 1076 "green": green_default2 1077}; 1078var dodecagon3d_default = shapes4; 1079 1080// src/worker/legacy/resources/com/vzome/core/parts/dodecs/connector.vef 1081var connector_default5 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (1/2,0) %0A%0A21%0A(0,0) (-1,2) (1,-2) (1,-2) %0A(0,0) (1,-1) (0,0) (-2,3) %0A(0,0) (1,-1) (0,0) (2,-3) %0A(0,0) (-1,2) (1,-2) (-1,2) %0A(0,0) (2,-3) (-1,1) (0,0) %0A(0,0) (0,0) (2,-3) (1,-1) %0A(0,0) (0,0) (-2,3) (1,-1) %0A(0,0) (-1,2) (-1,2) (-1,2) %0A(0,0) (1,-2) (1,-2) (-1,2) %0A(0,0) (1,-2) (-1,2) (-1,2) %0A(0,0) (-1,1) (0,0) (2,-3) %0A(0,0) (0,0) (-2,3) (-1,1) %0A(0,0) (0,0) (2,-3) (-1,1) %0A(0,0) (-1,2) (-1,2) (1,-2) %0A(0,0) (1,-2) (1,-2) (1,-2) %0A(0,0) (-2,3) (-1,1) (0,0) %0A(0,0) (-1,1) (0,0) (-2,3) %0A(0,0) (2,-3) (1,-1) (0,0) %0A(0,0) (1,-2) (-1,2) (1,-2) %0A(0,0) (0,0) (0,0) (0,0) %0A(0,0) (-2,3) (1,-1) (0,0) %0A%0A%0A%0A1%0A19 17%0A%0A%0A%0A12%0A5 0 1 2 3 4%0A5 5 6 3 2 7%0A5 8 6 5 9 10%0A5 11 12 13 1 0%0A5 14 11 0 4 15%0A5 16 14 15 8 10%0A5 1 13 17 7 2%0A5 18 12 11 14 16%0A5 5 7 17 20 9%0A5 20 17 13 12 18%0A5 20 18 16 10 9%0A5 8 15 4 3 6%0A%0A%0A%0A0%0A%0A%0A"; 1082
1083// src/worker/legacy/resources/com/vzome/core/parts/dodecs/index.js 1084var shapes5 = { 1085 "connector": connector_default5 1086}; 1087var dodecs_default = shapes5; 1088 1089// src/worker/legacy/resources/com/vzome/core/parts/heptagon/antiprism/blue.vef 1090var blue_default4 = "data:text/plain;charset=utf-8,vZome VEF 6 field heptagon%0A%0A7%0A(0,0,0) (1,-1,0) (1,0,-2) (-5,3,6)%0A(0,0,0) (-1,1,1) (-1,0,2) (-5,3,6)%0A(0,0,0) (-1,1,1) (0,0,0) (5,-3,-6)%0A(0,0,0) (2,1,-1) (0,0,0) (-5,3,6)%0A(0,0,0) (2,1,-1) (1,0,-2) (5,-3,-6)%0A(0,0,0) (0,3,0) (-1,0,2) (5,-3,-6)%0A(0,0,0) (1,2,0) (0,0,0) (0,0,0)%0A%0A%0A%0A0%0A%0A%0A%0A8%0A3 0 4 2 %0A3 1 5 3 %0A3 2 1 0 %0A3 2 4 5 %0A3 3 0 1 %0A3 4 0 3 %0A3 4 3 5 %0A3 5 1 2 %0A%0A%0A%0A4%0A3 4 5 6 %0A%0A%0Atip 6%0A%0A"; 1091 1092// src/worker/legacy/resources/com/vzome/core/parts/heptagon/antiprism/connector.vef 1093var connector_default6 = "data:text/plain;charset=utf-8,vZome VEF 6 field heptagon%0A%0A14%0A(0,0,0) (1,-1,-1) (0,0,0) (-5,3,6)%0A(0,0,0) (1,-1,-1) (1,0,-2) (5,-3,-6)%0A(0,0,0) (-1,1,0) (-1,0,2) (5,-3,-6)%0A(0,0,0) (-1,1,0) (1,-1,0) (-5,3,6)%0A(0,0,0) (-1,0,2) (-1,1,0) (-5,3,6)%0A(0,0,0) (-1,0,2) (-1,1,1) (5,-3,-6)%0A(0,0,0) (0,0,0) (1,-1,-1) (5,-3,-6)%0A(0,0,0) (0,0,0) (-1,1,1) (-5,3,6)%0A(0,0,0) (1,0,-2) (1,-1,-1) (-5,3,6)%0A(0,0,0) (1,0,-2) (1,-1,0) (5,-3,-6)%0A(0,0,0) (1,-1,0) (-1,1,0) (5,-3,-6)%0A(0,0,0) (1,-1,0) (1,0,-2) (-5,3,6)%0A(0,0,0) (-1,1,1) (-1,0,2) (-5,3,6)%0A(0,0,0) (-1,1,1) (0,0,0) (5,-3,-6)%0A%0A%0A%0A0%0A%0A%0A%0A16%0A3 1 0 3 %0A3 2 0 1 %0A3 2 4 0 %0A3 3 5 1 %0A3 4 6 8 %0A3 5 3 7 %0A3 6 4 2 %0A3 7 9 5 %0A3 8 6 10 %0A3 9 7 11 %0A3 10 12 8 %0A3 11 12 13 %0A3 11 13 9 %0A3 12 10 13 %0A7 1 5 9 13 10 6 2 %0A7 8 12 11 7 3 0 4 %0A%0A%0A%0A0%0A%0A%0A"; 1094 1095// src/worker/legacy/resources/com/vzome/core/parts/heptagon/antiprism/green.vef 1096var green_default3 = "data:text/plain;charset=utf-8,vZome VEF 6 field heptagon%0A%0A11%0A(0,0,0) (0,0,1/2) (1/2,0,-1) (0,0,0)%0A(0,0,0) (0,1,-1/2) (3/2,-1,-1) (5,-3,-6)%0A(0,0,0) (0,1,-1/2) (3/2,-1,-1) (-5,3,6)%0A(0,0,0) (0,0,3/2) (1/2,0,-1) (5,-3,-6)%0A(0,0,0) (0,0,3/2) (1/2,0,-1) (-5,3,6)%0A(0,0,0) (3,1,1/2) (-1/2,2,0) (5,-3,-6)%0A(0,0,0) (3,1,1/2) (-1/2,2,0) (-5,3,6)%0A(0,0,0) (3,0,5/2) (-3/2,3,0) (5,-3,-6)%0A(0,0,0) (3,0,5/2) (-3/2,3,0) (-5,3,6)%0A(0,0,0) (3,1,3/2) (-1/2,2,0) (0,0,0)%0A(0,0,0) (3,1,2) (0,2,-1) (0,0,0)%0A%0A%0A%0A0%0A%0A%0A%0A12%0A3 1 3 0 %0A3 2 0 4 %0A3 2 1 0 %0A3 4 0 3 %0A3 5 6 9 %0A3 7 5 9 %0A3 8 7 9 %0A3 8 9 6 %0A4 2 6 5 1 %0A4 7 3 1 5 %0A4 8 4 3 7 %0A4 8 6 2 4 %0A%0A%0A%0A6%0A5 6 7 8 9 10 %0A%0A%0Atip 10%0A%0A"; 1097 1098// src/worker/legacy/resources/com/vzome/core/parts/heptagon/antiprism/red.vef 1099var red_default3 = "data:text/plain;charset=utf-8,vZome VEF 6 field heptagon%0A%0A15%0A(0,0,0) (-1,0,2) (0,0,0) (-5,3,6)%0A(0,0,0) (-1,0,2) (-2,2,1) (6,-1,-6)%0A(0,0,0) (0,1,-2) (2,-2,-1) (6,-1,-6)%0A(0,0,0) (0,1,-2) (0,-1,2) (-5,3,6)%0A(0,0,0) (2,-2,-1) (0,1,-2) (-5,3,6)%0A(0,0,0) (2,-2,-1) (1,0,-2) (6,-1,-6)%0A(0,0,0) (0,0,0) (-1,0,2) (6,-1,-6)%0A(0,0,0) (0,0,0) (0,0,0) (1,2,0)%0A(0,0,0) (0,0,0) (1,0,-2) (-5,3,6)%0A(0,0,0) (-2,2,1) (-1,0,2) (-5,3,6)%0A(0,0,0) (-2,2,1) (0,-1,2) (6,-1,-6)%0A(0,0,0) (0,-1,2) (0,1,-2) (6,-1,-6)%0A(0,0,0) (0,-1,2) (-2,2,1) (-5,3,6)%0A(0,0,0) (1,0,-2) (2,-2,-1) (-5,3,6)%0A(0,0,0) (1,0,-2) (0,0,0) (6,-1,-6)%0A%0A%0A%0A0%0A%0A%0A%0A16%0A3 0 4 2 %0A3 1 0 2 %0A3 3 0 1 %0A3 3 1 5 %0A3 4 9 6 %0A3 5 10 8 %0A3 6 2 4 %0A3 8 3 5 %0A3 9 13 11 %0A3 10 14 12 %0A3 11 6 9 %0A3 12 8 10 %0A3 13 12 14 %0A3 14 11 13 %0A7 3 8 12 13 9 4 0 %0A7 5 1 2 6 11 14 10 %0A%0A%0A%0A8%0A1 2 5 6 7 10 11 14 %0A%0A%0Atip 7%0A%0A"; 1100
1101// src/worker/legacy/resources/com/vzome/core/parts/heptagon/antiprism/index.js 1102var shapes6 = { 1103 "blue": blue_default4, 1104 "connector": connector_default6, 1105 "green": green_default3, 1106 "red": red_default3 1107}; 1108var antiprism_default = shapes6; 1109 1110// src/worker/legacy/resources/com/vzome/core/parts/lifelike/blue.vef 1111var blue_default5 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A27%0A(0,0) (-1/2,1/2) (1/2,-1) (4,1) %0A(0,0) (-1/2,1/2) (-1/2,1) (4,1) %0A(0,0) (-1/2,1/2) (-1/2,1) (0,1) %0A(0,0) (-1/2,1/2) (1/2,-1) (0,1) %0A(0,0) (1/2,-1) (-1,3/2) (1,-1) %0A(0,0) (-1/2,1) (-1,3/2) (1,-1) %0A(0,0) (-1/2,1) (-1,3/2) (0,1) %0A(0,0) (1/2,-1) (-1,3/2) (0,1) %0A(0,0) (1/2,-1) (-1,3/2) (4,1) %0A(0,0) (1/2,-1) (1,-3/2) (4,1) %0A(0,0) (1/2,-1/2) (-1/2,1) (4,1) %0A(0,0) (1/2,-1/2) (-1/2,1) (0,1) %0A(0,0) (0,0) (0,0) (1,-1) %0A(0,0) (1/2,-1) (1,-3/2) (1,-1) %0A(0,0) (1/2,-1/2) (1/2,-1) (4,1) %0A(0,0) (1/2,-1/2) (1/2,-1) (0,1) %0A(0,0) (0,0) (0,0) (3,3) %0A(0,0) (1/2,-1) (1,-3/2) (3,3) %0A(0,0) (1/2,-1) (-1,3/2) (3,3) %0A(0,0) (-1/2,1) (1,-3/2) (3,3) %0A(0,0) (-1/2,1) (-1,3/2) (3,3) %0A(0,0) (-1/2,1) (-1,3/2) (4,1) %0A(0,0) (-1/2,1) (1,-3/2) (4,1) %0A(0,0) (1/2,-1) (1,-3/2) (0,1) %0A(0,0) (0,0) (0,0) (4,2) %0A(0,0) (-1/2,1) (1,-3/2) (1,-1) %0A(0,0) (-1/2,1) (1,-3/2) (0,1) %0A%0A%0A%0A0%0A%0A%0A%0A28%0A4 0 1 2 3%0A4 4 5 6 7%0A4 8 9 1 0%0A4 1 10 11 2%0A3 12 5 4%0A3 12 4 13%0A4 10 14 15 11%0A3 16 17 18%0A4 3 15 14 0%0A4 19 20 21 22%0A4 7 3 2 23%0A3 16 20 19%0A3 12 13 25%0A4 19 22 9 17%0A4 26 23 2 11%0A4 22 10 1 9%0A3 16 18 20%0A4 25 13 23 26%0A4 26 11 15 6%0A4 22 21 14 10%0A3 16 19 17%0A3 12 25 5%0A4 18 17 9 8%0A4 18 8 21 20%0A4 8 0 14 21%0A4 4 7 23 13%0A4 25 26 6 5%0A4 7 6 15 3%0A%0A%0A%0A14%0A 10 1 17 22 24 8 19 16 18 0 21 9 14 20%0A%0Atip 24%0A"; 1112 1113// src/worker/legacy/resources/com/vzome/core/parts/lifelike/connector.vef 1114var connector_default7 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A600%0A(0,0) (-2,5/2) (-1/2,3/2) (0,0)%0A(0,0) (-3/2,2) (0,1/2) (0,0)%0A(0,0) (0,-1/2) (-1,2) (-1/2,1)%0A(0,0) (-1/2,0) (-3/2,3) (-1/2,1)%0A(0,0) (2,-5/2) (1/2,-3/2) (0,0)%0A(0,0) (25/2,-39/2) (-17/2,13) (0,0)%0A(0,0) (-10,17) (11/2,-19/2) (17/2,-14)%0A(0,0) (1/2,0) (3/2,-3) (1/2,-1)%0A(0,0) (-3/2,3) (1/2,-1) (-1/2,0)%0A(0,0) (-1,2) (1/2,-1) (0,-1/2)%0A(0,0) (0,1/2) (0,0) (-3/2,2)%0A(0,0) (-1/2,3/2) (0,0) (-2,5/2)%0A(0,0) (-13,22) (-1/2,1) (-1,3/2)%0A(0,0) (1,-1) (-1/2,1) (-1,3/2)%0A(0,0) (1,-1) (1/2,-1) (-1,3/2)%0A(0,0) (-13,22) (1/2,-1) (-1,3/2)%0A(0,0) (-1/2,0) (1,-1) (-1/2,1/2)%0A(0,0) (-13/4,9/2) (-9/4,17/4) (-1,5/4)%0A(0,0) (9/4,-17/4) (1,-5/4) (-13/4,9/2)%0A(0,0) (-1,1) (1/2,-1/2) (-1/2,0)%0A(0,0) (1/2,-1) (1/2,0) (3/2,-3)%0A(0,0) (17/2,-14) (-10,17) (11/2,-19/2)%0A(0,0) (-14,45/2) (4,-11/2) (-3,9/2)%0A(0,0) (-1,3/2) (3/2,-3/2) (1,-2)%0A(0,0) (-1,3/2) (13,-22) (-1/2,1)%0A(0,0) (1,-3/2) (13,-22) (-1/2,1)%0A(0,0) (15/2,-12) (0,-1) (-9/2,15/2)%0A(0,0) (-15/2,12) (0,-1) (-9/2,15/2)%0A(0,0) (1/2,-3/2) (3/2,-3) (-1,2)%0A(0,0) (0,-1/2) (1,-2) (-1/2,1)%0A(0,0) (1,-2) (1/2,-1) (0,1/2)%0A(0,0) (3/2,-3) (1,-2) (-1/2,3/2)%0A(0,0) (-13,22) (-1/2,1) (1,-3/2)%0A(0,0) (0,1) (-9/2,15/2) (-15/2,12)%0A(0,0) (0,1) (-9/2,15/2) (15/2,-12)%0A(0,0) (0,-1) (-1/2,1/2) (-1/2,1)%0A(0,0) (-2,9/4) (13/4,-11/2) (-5/4,9/4)%0A(0,0) (-2,9/4) (-13/4,11/2) (-5/4,9/4)%0A(0,0) (0,-1) (1/2,-1/2) (-1/2,1)%0A(0,0) (-11,35/2) (-6,10) (11/2,-8)%0A(0,0) (-21/2,33/2) (-15/2,25/2) (9/2,-13/2)%0A(0,0) (4,-7) (-15/2,25/2) (1/2,0)%0A(0,0) (-1/2,1/2) (9/2,-7) (8,-12)%0A(0,0) (1,-2) (-1/2,3/2) (-3/2,3)%0A(0,0) (1/2,-1) (0,1/2) (-1,2)%0A(0,0) (1,-2) (-1/2,1) (0,1/2)%0A(0,0) (3/2,-3) (-1,2) (-1/2,3/2)%0A(0,0) (1/2,-1) (0,1/2) (1,-2)%0A(0,0) (0,0) (3/2,-2) (0,-1/2)%0A(0,0) (0,0) (2,-5/2) (1/2,-3/2)%0A(0,0) (-1/2,0) (5,-8) (15/2,-23/2)%0A(0,0) (-9/2,13/2) (23/2,-37/2) (-11/2,19/2)%0A(0,0) (-11/2,8) (11,-35/2) (-6,10)%0A(0,0) (-8,12) (1/2,-1/2) (9/2,-7)%0A(0,0) (0,0) (5/2,-7/2) (1/2,0)%0A(0,0) (0,0) (3/2,-2) (0,1/2)%0A(0,0) (-1/2,1) (1,-3/2) (1,-1)%0A(0,0) (-1/2,1) (2,-3) (3/2,-3/2)%0A(0,0) (-1/2,1) (-1/2,0) (-3/2,3)%0A(0,0) (-1/2,1) (0,-1/2) (-1,2)%0A(0,0) (1,-3/2) (-1,1) (-1/2,1)%0A(0,0) (1,-3/2) (-3/2,3/2) (-1,2)%0A(0,0) (-7,12) (1/2,-1/2) (-9/2,8)%0A(0,0) (7/2,-5) (11,-35/2) (-7,12)%0A(0,0) (9/2,-13/2) (21/2,-33/2) (-15/2,25/2)%0A(0,0) (1/2,0) (-4,7) (-15/2,25/2)%0A(0,0) (-7,12) (-7/2,5) (-11,35/2)%0A(0,0) (0,1/2) (1,-2) (1/2,-1)%0A(0,0) (-1/2,1) (0,-1/2) (1,-2)%0A(0,0) (-15/2,25/2) (-9/2,13/2) (-21/2,33/2)%0A(0,0) (1/2,-1) (1/2,0) (-3/2,3)%0A(0,0) (17/2,-14) (-10,17) (-11/2,19/2)%0A(0,0) (0,0) (25/2,-39/2) (17/2,-13)%0A(0,0) (0,0) (2,-5/2) (-1/2,3/2)%0A(0,0) (15/2,-12) (0,1) (-9/2,15/2)%0A(0,0) (-15/2,12) (0,1) (-9/2,15/2)%0A(0,0) (1/2,-1) (0,1) (1/2,-1/2)%0A(0,0) (-1/2,1) (0,1) (1/2,-1/2)%0A(0,0) (0,0) (-1/2,3/2) (-1/2,0)%0A(0,0) (5,-8) (15/2,-23/2) (-1/2,0)%0A(0,0) (1/2,-1/2) (9/2,-7) (-8,12)%0A(0,0) (1/2,-1/2) (-1/2,1) (0,-1)%0A(0,0) (0,1) (1/2,-1/2) (-1/2,1)%0A(0,0) (8,-12) (1/2,-1/2) (9/2,-7)%0A(0,0) (1/2,0) (5,-8) (15/2,-23/2)%0A(0,0) (1/2,0) (0,0) (-1/2,3/2)%0A(0,0) (13,-22) (-1/2,1) (-1,3/2)%0A(0,0) (13,-22) (-1/2,1) (1,-3/2)%0A(0,0) (0,-1) (-9/2,15/2) (15/2,-12)%0A(0,0) (0,-1) (-9/2,15/2) (-15/2,12)%0A(0,0) (13,-22) (1/2,-1) (1,-3/2)%0A(0,0) (0,-1) (9/2,-15/2) (15/2,-12)%0A(0,0) (-9/2,15/2) (15/2,-12) (0,-1)%0A(0,0) (9/2,-15/2) (15/2,-12) (0,-1)%0A(0,0) (-1/2,1/2) (-1/2,1) (0,-1)%0A(0,0) (21/2,-33/2) (15/2,-25/2) (-9/2,13/2)%0A(0,0) (11,-35/2) (6,-10) (-11/2,8)%0A(0,0) (1/2,-1/2) (-9/2,7) (-8,12)%0A(0,0) (-4,7) (15/2,-25/2) (-1/2,0)%0A(0,0) (21/2,-33/2) (-15/2,25/2) (9/2,-13/2)%0A(0,0) (11,-35/2) (-6,10) (11/2,-8)%0A(0,0) (1/2,-1/2) (9/2,-7) (8,-12)%0A(0,0) (-4,7) (-15/2,25/2) (1/2,0)%0A(0,0) (-1,1) (-1/2,1) (1,-3/2)%0A(0,0) (-9/2,13/2) (21/2,-33/2) (-15/2,25/2)%0A(0,0) (11/2,-19/2) (9/2,-13/2) (23/2,-37/2)%0A(0,0) (7,-12) (7/2,-5) (11,-35/2)%0A(0,0) (1/2,0) (-1,1) (-1/2,1/2)%0A(0,0) (-9/2,8) (7,-12) (-1/2,1/2)%0A(0,0) (-15/2,25/2) (-1/2,0) (4,-7)%0A(0,0) (1/2,-1/2) (-1/2,0) (-1,1)%0A(0,0) (-1,2) (1,-3/2) (3/2,-3/2)%0A(0,0) (-1,2) (-1/2,1) (0,1/2)%0A(0,0) (-3/2,3) (-1/2,1) (1/2,0)%0A(0,0) (0,0) (1/2,-3/2) (1/2,0)%0A(0,0) (0,0) (-1,1) (-7/2,13/2)%0A(0,0) (13/4,-11/2) (5/4,-9/4) (2,-9/4)%0A(0,0) (-1/2,1/2) (1/2,-1) (0,1)%0A(0,0) (-1/2,1) (1,-3/2) (13,-22)%0A(0,0) (-1/2,1) (1,-3/2) (-1,1)%0A(0,0) (1/2,-1) (1,-3/2) (-1,1)%0A(0,0) (1/2,-1) (1,-3/2) (13,-22)%0A(0,0) (-3/2,3) (1/2,-1) (1/2,0)%0A(0,0) (-1,2) (1/2,-1) (0,1/2)%0A(0,0) (-1/2,1) (-1,3/2) (1,-1)%0A(0,0) (-1,2) (-1,3/2) (3/2,-3/2)%0A(0,0) (-3/2,3/2) (-1/2,1) (2,-3)%0A(0,0) (-1/2,0) (0,0) (5/2,-7/2)%0A(0,0) (7/2,-13/2) (0,0) (1,-1)%0A(0,0) (0,-1) (-1/2,1/2) (1/2,-1)%0A(0,0) (-2,9/4) (13/4,-11/2) (5/4,-9/4)%0A(0,0) (7/2,-13/2) (0,0) (-1,1)%0A(0,0) (-1/2,0) (0,0) (1/2,-3/2)%0A(0,0) (9/2,-8) (-7,12) (-1/2,1/2)%0A(0,0) (15/2,-25/2) (1/2,0) (4,-7)%0A(0,0) (-1/2,1/2) (1/2,0) (-1,1)%0A(0,0) (1/2,0) (-3/2,3) (1/2,-1)%0A(0,0) (-10,17) (-11/2,19/2) (17/2,-14)%0A(0,0) (25/2,-39/2) (17/2,-13) (0,0)%0A(0,0) (2,-5/2) (-1/2,3/2) (0,0)%0A(0,0) (-3/2,3) (1,-2) (-1/2,3/2)%0A(0,0) (0,1/2) (1,-2) (-1/2,1)%0A(0,0) (-1/2,3/2) (3/2,-3) (-1,2)%0A(0,0) (-9/2,13/2) (21/2,-33/2) (15/2,-25/2)%0A(0,0) (-11/2,8) (11,-35/2) (6,-10)%0A(0,0) (-8,12) (1/2,-1/2) (-9/2,7)%0A(0,0) (-1/2,0) (-4,7) (15/2,-25/2)%0A(0,0) (-1,5/4) (13/4,-9/2) (-9/4,17/4)%0A(0,0) (9/4,-1
11147/4) (1,-5/4) (13/4,-9/2)%0A(0,0) (3/2,-3/2) (1,-2) (-1,3/2)%0A(0,0) (4,-11/2) (-3,9/2) (-14,45/2)%0A(0,0) (4,-11/2) (-3,9/2) (14,-45/2)%0A(0,0) (3/2,-3/2) (1,-2) (1,-3/2)%0A(0,0) (-1,3/2) (-3/2,3/2) (1,-2)%0A(0,0) (-14,45/2) (-4,11/2) (-3,9/2)%0A(0,0) (17/2,-14) (10,-17) (11/2,-19/2)%0A(0,0) (1/2,-1) (-1/2,0) (3/2,-3)%0A(0,0) (-13/4,9/2) (9/4,-17/4) (-1,5/4)%0A(0,0) (1/2,-3/2) (3/2,-3) (1,-2)%0A(0,0) (1,-2) (1/2,-3/2) (3/2,-3)%0A(0,0) (-1,5/4) (-13/4,9/2) (9/4,-17/4)%0A(0,0) (-1/2,1) (-1,3/2) (-13,22)%0A(0,0) (1/2,-1) (-1,3/2) (1,-1)%0A(0,0) (1/2,-1) (-1,3/2) (-13,22)%0A(0,0) (-7/2,5) (-11,35/2) (-7,12)%0A(0,0) (-9/2,13/2) (-21/2,33/2) (-15/2,25/2)%0A(0,0) (-1,3/2) (-13,22) (-1/2,1)%0A(0,0) (-1,3/2) (1,-1) (-1/2,1)%0A(0,0) (-1,3/2) (1,-1) (1/2,-1)%0A(0,0) (-1,3/2) (-13,22) (1/2,-1)%0A(0,0) (0,1/2) (-1,2) (1/2,-1)%0A(0,0) (3/2,-3/2) (-1,2) (-1,3/2)%0A(0,0) (5,-8) (-15/2,23/2) (1/2,0)%0A(0,0) (23/2,-37/2) (11/2,-19/2) (9/2,-13/2)%0A(0,0) (11,-35/2) (6,-10) (11/2,-8)%0A(0,0) (1/2,-1/2) (-9/2,7) (8,-12)%0A(0,0) (-13/4,11/2) (-5/4,9/4) (-2,9/4)%0A(0,0) (-1/2,1) (2,-3) (-3/2,3/2)%0A(0,0) (0,0) (5/2,-7/2) (-1/2,0)%0A(0,0) (0,0) (1,-1) (7/2,-13/2)%0A(0,0) (21/2,-33/2) (-15/2,25/2) (-9/2,13/2)%0A(0,0) (-1,2) (-1/2,1) (0,-1/2)%0A(0,0) (-1/2,1) (0,1/2) (1,-2)%0A(0,0) (11,-35/2) (-7,12) (-7/2,5)%0A(0,0) (-1/2,1/2) (1/2,-1) (0,-1)%0A(0,0) (9/2,-15/2) (-15/2,12) (0,-1)%0A(0,0) (-9/2,15/2) (-15/2,12) (0,-1)%0A(0,0) (1/2,-1/2) (1/2,-1) (0,-1)%0A(0,0) (-1/2,1/2) (1/2,0) (1,-1)%0A(0,0) (-1,1) (1/2,-1/2) (1/2,0)%0A(0,0) (6,-10) (11/2,-8) (11,-35/2)%0A(0,0) (15/2,-25/2) (9/2,-13/2) (21/2,-33/2)%0A(0,0) (15/2,-25/2) (1/2,0) (-4,7)%0A(0,0) (-9/2,7) (8,-12) (1/2,-1/2)%0A(0,0) (3,-9/2) (14,-45/2) (-4,11/2)%0A(0,0) (1,-1) (1/2,-1/2) (-1/2,0)%0A(0,0) (-11/2,19/2) (-17/2,14) (10,-17)%0A(0,0) (-1/2,1) (-1,3/2) (-1,1)%0A(0,0) (-7/2,5) (-11,35/2) (7,-12)%0A(0,0) (-9/2,13/2) (-23/2,37/2) (11/2,-19/2)%0A(0,0) (-1/2,0) (-5,8) (-15/2,23/2)%0A(0,0) (7,-12) (-1/2,1/2) (9/2,-8)%0A(0,0) (-1,1) (-1/2,1/2) (1/2,0)%0A(0,0) (9/4,-17/4) (-1,5/4) (13/4,-9/2)%0A(0,0) (-1,5/4) (-13/4,9/2) (-9/4,17/4)%0A(0,0) (-1/2,1/2) (-1/2,0) (1,-1)%0A(0,0) (1/2,-1) (-1/2,0) (-3/2,3)%0A(0,0) (17/2,-14) (10,-17) (-11/2,19/2)%0A(0,0) (-14,45/2) (-4,11/2) (3,-9/2)%0A(0,0) (-1,3/2) (-3/2,3/2) (-1,2)%0A(0,0) (-13/4,9/2) (9/4,-17/4) (1,-5/4)%0A(0,0) (-1/2,0) (-1,1) (1/2,-1/2)%0A(0,0) (1/2,0) (0,0) (-5/2,7/2)%0A(0,0) (3/2,-3/2) (1/2,-1) (-2,3)%0A(0,0) (9/2,-13/2) (-21/2,33/2) (-15/2,25/2)%0A(0,0) (7/2,-5) (-11,35/2) (-7,12)%0A(0,0) (11,-35/2) (-6,10) (-11/2,8)%0A(0,0) (-1/2,1/2) (-1/2,1) (0,1)%0A(0,0) (3/2,-3) (-1,2) (1/2,-3/2)%0A(0,0) (1,-2) (-1/2,1) (0,-1/2)%0A(0,0) (1,-2) (-1/2,3/2) (3/2,-3)%0A(0,0) (-9/2,7) (8,-12) (-1/2,1/2)%0A(0,0) (1/2,-1) (0,1) (-1/2,1/2)%0A(0,0) (7/2,-5) (-11,35/2) (7,-12)%0A(0,0) (9/2,-13/2) (-21/2,33/2) (15/2,-25/2)%0A(0,0) (-2,3) (-3/2,3/2) (-1/2,1)%0A(0,0) (-1,3/2) (-1,1) (-1/2,1)%0A(0,0) (-1,3/2) (-1,1) (1/2,-1)%0A(0,0) (-2,3) (-3/2,3/2) (1/2,-1)%0A(0,0) (0,0) (-3/2,2) (0,1/2)%0A(0,0) (11,-35/2) (7,-12) (7/2,-5)%0A(0,0) (-1/2,1) (1/2,0) (-3/2,3)%0A(0,0) (-1/2,1) (0,1/2) (-1,2)%0A(0,0) (0,0) (-5/2,7/2) (-1/2,0)%0A(0,0) (0,0) (-3/2,2) (0,-1/2)%0A(0,0) (-1/2,1) (-2,3) (-3/2,3/2)%0A(0,0) (-9/2,7) (-8,12) (1/2,-1/2)%0A(0,0) (6,-10) (-11/2,8) (11,-35/2)%0A(0,0) (11/2,-19/2) (-9/2,13/2) (23/2,-37/2)%0A(0,0) (-15/2,23/2) (-1/2,0) (5,-8)%0A(0,0) (13/4,-11/2) (-5/4,9/4) (-2,9/4)%0A(0,0) (3/2,-3) (-1/2,1) (-1/2,0)%0A(0,0) (0,-1/2) (0,0) (-3/2,2)%0A(0,0) (1/2,-3/2) (0,0) (-2,5/2)%0A(0,0) (23/2,-37/2) (11/2,-19/2) (-9/2,13/2)%0A(0,0) (5,-8) (-15/2,23/2) (-1/2,0)%0A(0,0) (-1/2,0) (0,0) (-5/2,7/2)%0A(0,0) (-3/2,3/2) (-1/2,1) (-2,3)%0A(0,0) (-2,9/4) (-13/4,11/2) (5/4,-9/4)%0A(0,0) (-11/2,19/2) (9/2,-13/2) (-23/2,37/2)%0A(0,0) (3/2,-2) (0,1/2) (0,0)%0A(0,0) (1,-3/2) (1,-1) (1/2,-1)%0A(0,0) (-6,10) (11/2,-8) (-11,35/2)%0A(0,0) (-1/2,1) (0,1) (-1/2,1/2)%0A(0,0) (-5/4,9/4) (2,-9/4) (13/4,-11/2)%0A(0,0) (1,-1) (-7/2,13/2) (0,0)%0A(0,0) (-1/2,3/2) (1/2,0) (0,0)%0A(0,0) (-17/2,13) (0,0) (-25/2,39/2)%0A(0,0) (11/2,-19/2) (-17/2,14) (10,-17)%0A(0,0) (-1/2,0) (-4,7) (-15/2,25/2)%0A(0,0) (-11,35/2) (-7,12) (7/2,-5)%0A(0,0) (-1/2,1/2) (-9/2,8) (-7,12)%0A(0,0) (9/2,-15/2) (-15/2,12) (0,1)%0A(0,0) (9/2,-15/2) (15/2,-12) (0,1)%0A(0,0) (-3/2,3/2) (-1,2) (1,-3/2)%0A(0,0) (-4,11/2) (3,-9/2) (14,-45/2)%0A(0,0) (10,-17) (-11/2,19/2) (-17/2,14)%0A(0,0) (9/2,-13/2) (23/2,-37/2) (-11/2,19/2)%0A(0,0) (-11,35/2) (6,-10) (-11/2,8)%0A(0,0) (-21/2,33/2) (15/2,-25/2) (-9/2,13/2)%0A(0,0) (4,-7) (15/2,-25/2) (-1/2,0)%0A(0,0) (-1/2,1/2) (-9/2,7) (-8,12)%0A(0,0) (6,-10) (11/2,-8) (-11,35/2)%0A(0,0) (11/2,-19/2) (9/2,-13/2) (-23/2,37/2)%0A(0,0) (1/2,-1) (-1,3/2) (-1,1)%0A(0,0) (1,-2) (1/2,-1) (0,-1/2)%0A(0,0) (-1,2) (-1,3/2) (-3/2,3/2)%0A(0,0) (3,-9/2) (-14,45/2) (-4,11/2)%0A(0,0) (-1,2) (1,-3/2) (-3/2,3/2)%0A(0,0) (-17/2,13) (0,0) (25/2,-39/2)%0A(0,0) (-1/2,0) (0,0) (-1/2,3/2)%0A(0,0) (11/2,-19/2) (17/2,-14) (-10,17)%0A(0,0) (1,-3/2) (3/2,-3/2) (-1,2)%0A(0,0) (1,-3/2) (1,-1) (-1/2,1)%0A(0,0) (-3/2,3/2) (1/2,-1) (-2,3)%0A(0,0) (-1/2,0) (-3/2,3) (1/2,-1)%0A(0,0) (10,-17) (-11/2,19/2) (17/2,-14)%0A(0,0) (-4,11/2) (3,-9/2) (-14,45/2)%0A(0,0) (-3/2,3/2) (-1,2) (-1,3/2)%0A(0,0) (7,-12) (7/2,-5) (-11,35/2)%0A(0,0) (0,-1/2) (-1,2) (1/2,-1)%0A(0,0) (15/2,-25/2) (9/2,-13/2) (-21/2,33/2)%0A(0,0) (-10,17) (-11/2,19/2) (-17/2,14)%0A(0,0) (1/2,0) (-3/2,3) (-1/2,1)%0A(0,0) (1,-1) (1/2,-1) (1,-3/2)%0A(0,0) (11/2,-8) (-11,35/2) (-6,10)%0A(0,0) (-5/2,7/2) (-1/2,0) (0,0)%0A(0,0) (-3/2,2) (0,-1/2) (0,0)%0A(0,0) (0,1) (-1/2,1/2) (-1/2,1)%0A(0,0) (1/2,0) (-1,1) (1/2,-1/2)%0A(0,0) (-10,17) (11/2,-19/2) (-17/2,14)%0A(0,0) (-4,7) (-15/2,25/2) (-1/2,0)%0A(0,0) (-1,5/4) (13/4,-9/2) (9/4,-1
11147/4)%0A(0,0) (-1/2,3/2) (3/2,-3) (1,-2)%0A(0,0) (-3/2,3) (1,-2) (1/2,-3/2)%0A(0,0) (-11,35/2) (7,-12) (-7/2,5)%0A(0,0) (-1/2,1/2) (9/2,-8) (7,-12)%0A(0,0) (13/4,-9/2) (9/4,-17/4) (-1,5/4)%0A(0,0) (-9/4,17/4) (-1,5/4) (-13/4,9/2)%0A(0,0) (1,-1) (-1/2,1/2) (-1/2,0)%0A(0,0) (1/2,-1) (0,-1) (-1/2,1/2)%0A(0,0) (-1/2,1/2) (-1/2,0) (-1,1)%0A(0,0) (-1/2,3/2) (-1/2,0) (0,0)%0A(0,0) (1/2,-3/2) (-3/2,3) (1,-2)%0A(0,0) (-3,9/2) (-14,45/2) (4,-11/2)%0A(0,0) (-3,9/2) (14,-45/2) (4,-11/2)%0A(0,0) (1,-3/2) (-1,1) (1/2,-1)%0A(0,0) (1,-3/2) (-3/2,3/2) (1,-2)%0A(0,0) (23/2,-37/2) (-11/2,19/2) (-9/2,13/2)%0A(0,0) (1/2,-1) (2,-3) (-3/2,3/2)%0A(0,0) (1,-2) (-1,3/2) (3/2,-3/2)%0A(0,0) (3/2,-3) (1/2,-1) (1/2,0)%0A(0,0) (-1/2,1/2) (9/2,-8) (-7,12)%0A(0,0) (4,-7) (15/2,-25/2) (1/2,0)%0A(0,0) (-9/2,15/2) (15/2,-12) (0,1)%0A(0,0) (1/2,-1/2) (-1/2,1) (0,1)%0A(0,0) (-1,1) (7/2,-13/2) (0,0)%0A(0,0) (5/4,-9/4) (-2,9/4) (-13/4,11/2)%0A(0,0) (-5,8) (-15/2,23/2) (1/2,0)%0A(0,0) (15/2,-23/2) (1/2,0) (-5,8)%0A(0,0) (9/2,-7) (8,-12) (-1/2,1/2)%0A(0,0) (4,-11/2) (3,-9/2) (14,-45/2)%0A(0,0) (0,1) (1/2,-1/2) (1/2,-1)%0A(0,0) (4,-11/2) (3,-9/2) (-14,45/2)%0A(0,0) (-1/2,0) (3/2,-3) (1/2,-1)%0A(0,0) (10,-17) (11/2,-19/2) (17/2,-14)%0A(0,0) (-25/2,39/2) (-17/2,13) (0,0)%0A(0,0) (-2,5/2) (1/2,-3/2) (0,0)%0A(0,0) (9/2,-13/2) (23/2,-37/2) (11/2,-19/2)%0A(0,0) (11/2,-8) (11,-35/2) (6,-10)%0A(0,0) (1/2,-1/2) (1/2,0) (-1,1)%0A(0,0) (-15/2,25/2) (1/2,0) (4,-7)%0A(0,0) (-9/2,8) (-7,12) (-1/2,1/2)%0A(0,0) (1/2,0) (1,-1) (-1/2,1/2)%0A(0,0) (-1/2,3/2) (0,0) (2,-5/2)%0A(0,0) (17/2,-13) (0,0) (25/2,-39/2)%0A(0,0) (-11/2,19/2) (-17/2,14) (-10,17)%0A(0,0) (9/2,-8) (7,-12) (-1/2,1/2)%0A(0,0) (-15/2,23/2) (-1/2,0) (-5,8)%0A(0,0) (1/2,-3/2) (-1/2,0) (0,0)%0A(0,0) (-1/2,0) (-1,1) (-1/2,1/2)%0A(0,0) (-9/2,13/2) (23/2,-37/2) (11/2,-19/2)%0A(0,0) (-1/2,0) (5,-8) (-15/2,23/2)%0A(0,0) (14,-45/2) (-4,11/2) (3,-9/2)%0A(0,0) (11,-35/2) (7,-12) (-7/2,5)%0A(0,0) (-1/2,1) (-1/2,0) (3/2,-3)%0A(0,0) (0,-1) (1/2,-1/2) (1/2,-1)%0A(0,0) (0,0) (-2,5/2) (1/2,-3/2)%0A(0,0) (1/2,-1) (0,-1/2) (1,-2)%0A(0,0) (13,-22) (1/2,-1) (-1,3/2)%0A(0,0) (0,-1) (9/2,-15/2) (-15/2,12)%0A(0,0) (7,-12) (-1/2,1/2) (-9/2,8)%0A(0,0) (-1/2,0) (4,-7) (-15/2,25/2)%0A(0,0) (0,0) (-2,5/2) (-1/2,3/2)%0A(0,0) (0,0) (-25/2,39/2) (17/2,-13)%0A(0,0) (5/4,-9/4) (-2,9/4) (13/4,-11/2)%0A(0,0) (-13/4,11/2) (-5/4,9/4) (2,-9/4)%0A(0,0) (13/4,-11/2) (-5/4,9/4) (2,-9/4)%0A(0,0) (0,1) (-1/2,1/2) (1/2,-1)%0A(0,0) (1/2,-1) (1,-3/2) (1,-1)%0A(0,0) (-11/2,19/2) (-9/2,13/2) (23/2,-37/2)%0A(0,0) (3/2,-2) (0,-1/2) (0,0)%0A(0,0) (-6,10) (-11/2,8) (11,-35/2)%0A(0,0) (14,-45/2) (4,-11/2) (3,-9/2)%0A(0,0) (-14,45/2) (4,-11/2) (3,-9/2)%0A(0,0) (9/4,-17/4) (-1,5/4) (-13/4,9/2)%0A(0,0) (3/2,-3) (1,-2) (1/2,-3/2)%0A(0,0) (-3/2,3) (-1/2,1) (-1/2,0)%0A(0,0) (1/2,-1) (0,-1) (1/2,-1/2)%0A(0,0) (0,1) (9/2,-15/2) (-15/2,12)%0A(0,0) (17/2,-13) (0,0) (-25/2,39/2)%0A(0,0) (-11/2,19/2) (17/2,-14) (10,-17)%0A(0,0) (0,0) (-5/2,7/2) (1/2,0)%0A(0,0) (1/2,-1) (-2,3) (3/2,-3/2)%0A(0,0) (-11/2,19/2) (-9/2,13/2) (-23/2,37/2)%0A(0,0) (15/2,-23/2) (-1/2,0) (-5,8)%0A(0,0) (-4,11/2) (-3,9/2) (-14,45/2)%0A(0,0) (-1,1) (-1/2,1) (-1,3/2)%0A(0,0) (-1,2) (-1/2,3/2) (-3/2,3)%0A(0,0) (0,1/2) (-1,2) (-1/2,1)%0A(0,0) (-1/2,3/2) (-3/2,3) (-1,2)%0A(0,0) (2,-3) (3/2,-3/2) (1/2,-1)%0A(0,0) (5/2,-7/2) (1/2,0) (0,0)%0A(0,0) (-17/2,14) (-10,17) (-11/2,19/2)%0A(0,0) (1,-3/2) (13,-22) (1/2,-1)%0A(0,0) (15/2,-12) (0,-1) (9/2,-15/2)%0A(0,0) (1/2,-1/2) (1/2,0) (1,-1)%0A(0,0) (1/2,-1/2) (-9/2,8) (-7,12)%0A(0,0) (1,-1) (1/2,-1/2) (1/2,0)%0A(0,0) (-15/2,25/2) (9/2,-13/2) (-21/2,33/2)%0A(0,0) (11/2,-8) (11,-35/2) (-6,10)%0A(0,0) (1,-5/4) (13/4,-9/2) (9/4,-1
11147/4)%0A(0,0) (-1,2) (-1/2,3/2) (3/2,-3)%0A(0,0) (-3/2,3) (-1,2) (1/2,-3/2)%0A(0,0) (-9/4,17/4) (1,-5/4) (-13/4,9/2)%0A(0,0) (1,-1) (-1/2,1) (1,-3/2)%0A(0,0) (3/2,-3/2) (-1,2) (1,-3/2)%0A(0,0) (-6,10) (11/2,-8) (11,-35/2)%0A(0,0) (-11/2,19/2) (9/2,-13/2) (23/2,-37/2)%0A(0,0) (-7/2,5) (11,-35/2) (7,-12)%0A(0,0) (-15/2,12) (0,-1) (9/2,-15/2)%0A(0,0) (-1,3/2) (13,-22) (1/2,-1)%0A(0,0) (1,-1) (7/2,-13/2) (0,0)%0A(0,0) (-5/4,9/4) (-2,9/4) (13/4,-11/2)%0A(0,0) (-1/2,1) (0,-1) (-1/2,1/2)%0A(0,0) (-8,12) (-1/2,1/2) (9/2,-7)%0A(0,0) (-1/2,0) (-5,8) (15/2,-23/2)%0A(0,0) (1/2,-1) (-1,3/2) (13,-22)%0A(0,0) (13/4,-11/2) (5/4,-9/4) (-2,9/4)%0A(0,0) (0,0) (-1,1) (7/2,-13/2)%0A(0,0) (0,0) (1/2,-3/2) (-1/2,0)%0A(0,0) (0,1/2) (0,0) (3/2,-2)%0A(0,0) (11/2,-8) (-11,35/2) (6,-10)%0A(0,0) (8,-12) (-1/2,1/2) (-9/2,7)%0A(0,0) (1/2,0) (4,-7) (15/2,-25/2)%0A(0,0) (-1,1) (1/2,-1) (-1,3/2)%0A(0,0) (-11/2,8) (-11,35/2) (6,-10)%0A(0,0) (5/2,-7/2) (-1/2,0) (0,0)%0A(0,0) (2,-3) (-3/2,3/2) (1/2,-1)%0A(0,0) (1/2,0) (3/2,-3) (-1/2,1)%0A(0,0) (9/2,-13/2) (-23/2,37/2) (-11/2,19/2)%0A(0,0) (1/2,-1/2) (1/2,-1) (0,1)%0A(0,0) (-9/2,15/2) (-15/2,12) (0,1)%0A(0,0) (-5/4,9/4) (2,-9/4) (-13/4,11/2)%0A(0,0) (7,-12) (-7/2,5) (11,-35/2)%0A(0,0) (1/2,-1) (0,-1/2) (-1,2)%0A(0,0) (15/2,-25/2) (-9/2,13/2) (21/2,-33/2)%0A(0,0) (2,-3) (3/2,-3/2) (-1/2,1)%0A(0,0) (23/2,-37/2) (-11/2,19/2) (9/2,-13/2)%0A(0,0) (-21/2,33/2) (-15/2,25/2) (-9/2,13/2)%0A(0,0) (-11,35/2) (-6,10) (-11/2,8)%0A(0,0) (-1/2,1/2) (9/2,-7) (-8,12)%0A(0,0) (4,-7) (-15/2,25/2) (-1/2,0)%0A(0,0) (7/2,-5) (11,-35/2) (7,-12)%0A(0,0) (1/2,0) (5,-8) (-15/2,23/2)%0A(0,0) (-7,12) (1/2,-1/2) (9/2,-8)%0A(0,0) (-15/2,12) (0,1) (9/2,-15/2)%0A(0,0) (15/2,-12) (0,1) (9/2,-15/2)%0A(0,0) (-1/2,1) (0,-1) (1/2,-1/2)%0A(0,0) (8,-12) (1/2,-1/2) (-9/2,7)%0A(0,0) (-7,12) (7/2,-5) (-11,35/2)%0A(0,0) (-3/2,3/2) (1,-2) (1,-3/2)%0A(0,0) (-1,1) (1/2,-1) (1,-3/2)%0A(0,0) (-1/2,0) (3/2,-3) (-1/2,1)%0A(0,0) (1/2,0) (0,0) (1/2,-3/2)%0A(0,0) (15/2,-25/2) (-1/2,0) (-4,7)%0A(0,0) (1/2,-1) (2,-3) (3/2,-3/2)%0A(0,0) (2,-9/4) (-13/4,11/2) (5/4,-9/4)%0A(0,0) (-7/2,13/2) (0,0) (-1,1)%0A(0,0) (13/4,-9/2) (-9/4,17/4) (-1,5/4)%0A(0,0) (1/2,-3/2) (-3/2,3) (-1,2)%0A(0,0) (-4,7) (15/2,-25/2) (1/2,0)%0A(0,0) (21/2,-33/2) (15/2,-25/2) (9/2,-13/2)%0A(0,0) (1/2,-1/2) (9/2,-8) (-7,12)%0A(0,0) (-11/2,8) (-11,35/2) (-6,10)%0A(0,0) (0,-1/2) (0,0) (3/2,-2)%0A(0,0) (-9/2,13/2) (-23/2,37/2) (-11/2,19/2)%0A(0,0) (-6,10) (-11/2,8) (-11,35/2)%0A(0,0) (-5,8) (-15/2,23/2) (-1/2,0)%0A(0,0) (0,-1/2) (1,-2) (1/2,-1)%0A(0,0) (2,-9/4) (13/4,-11/2) (-5/4,9/4)%0A(0,0) (-7/2,13/2) (0,0) (1,-1)%0A(0,0) (-15/2,25/2) (-9/2,13/2) (21/2,-33/2)%0A(0,0) (-15/2,25/2) (-1/2,0) (-4,7)%0A(0,0) (9/2,-7) (-8,12) (1/2,-1/2)%0A(0,0) (-3/2,3/2) (1,-2) (-1,3/2)%0A(0,0) (-15/2,25/2) (1/2,0) (-4,7)%0A(0,0) (9/2,-7) (8,-12) (1/2,-1/2)%0A(0,0) (-23/2,37/2) (11/2,-19/2) (-9/2,13/2)%0A(0,0) (1,-3/2) (-13,22) (-1/2,1)%0A(0,0) (-7,12) (-1/2,1/2) (9/2,-8)%0A(0,0) (-8,12) (-1/2,1/2) (-9/2,7)%0A(0,0) (2,-9/4) (13/4,-11/2) (5/4,-9/4)%0A(0,0) (1,-3/2) (-13,22) (1/2,-1)%0A(0,0) (0,0) (1,-1) (-7/2,13/2)%0A(0,0) (-15/2,23/2) (1/2,0) (-5,8)%0A(0,0) (9/2,-13/2) (21/2,-33/2) (15/2,-25/2)%0A(0,0) (-1,2) (1/2,-3/2) (3/2,-3)%0A(0,0) (11/2,-19/2) (-9/2,13/2) (-23/2,37/2)%0A(0,0) (6,-10) (-11/2,8) (-11,35/2)%0A(0,0) (-9/2,7) (-8,12) (-1/2,1/2)%0A(0,0) (-7/2,5) (11,-35/2) (-7,12)%0A(0,0) (7,-12) (1/2,-1/2) (-9/2,8)%0A(0,0) (-5,8) (15/2,-23/2) (-1/2,0)%0A(0,0) (1,-3/2) (3/2,-3/2) (1,-2)%0A(0,0) (15/2,-23/2) (1/2,0) (5,-8)%0A(0,0) (-7,12) (-7/2,5) (11,-35/2)%0A(0,0) (15/2,-23/2) (-1/2,0) (5,-8)%0A(0,0) (-9/2,8) (7,-12) (1/2,-1/2)%0A(0,0) (11/2,-19/2) (17/2,-14) (10,-17)%0A(0,0) (-1,1) (-1/2,1/2) (-1/2,0)%0A(0,0) (-5,8) (15/2,-23/2) (1/2,0)%0A(0,0) (0,0) (-1/2,3/2) (1/2,0)%0A(0,0) (-11,35/2) (6,-10) (11/2,-8)%0A(0,0) (-23/2,37/2) (11/2,-19/2) (9/2,-13/2)%0A(0,0) (-9/4,17/4) (1,-5/4) (13/4,-9/2)%0A(0,0) (1,-5/4) (13/4,-9/2) (-9/4,17/4)%0A(0,0) (3,-9/2) (14,-45/2) (4,-11/2)%0A(0,0) (3,-9/2) (-14,45/2) (4,-11/2)%0A(0,0) (13/4,-9/2) (9/4,-1
11147/4) (1,-5/4)%0A(0,0) (1,-5/4) (-13/4,9/2) (-9/4,17/4)%0A(0,0) (1/2,-1/2) (-1/2,0) (1,-1)%0A(0,0) (-17/2,14) (10,-17) (11/2,-19/2)%0A(0,0) (14,-45/2) (-4,11/2) (-3,9/2)%0A(0,0) (3/2,-3) (1/2,-1) (-1/2,0)%0A(0,0) (1/2,0) (-4,7) (15/2,-25/2)%0A(0,0) (-1,2) (1/2,-3/2) (-3/2,3)%0A(0,0) (1/2,0) (1,-1) (1/2,-1/2)%0A(0,0) (-15/2,23/2) (1/2,0) (5,-8)%0A(0,0) (-17/2,14) (10,-17) (-11/2,19/2)%0A(0,0) (14,-45/2) (4,-11/2) (-3,9/2)%0A(0,0) (15/2,-25/2) (-1/2,0) (4,-7)%0A(0,0) (-3,9/2) (14,-45/2) (-4,11/2)%0A(0,0) (-3,9/2) (-14,45/2) (-4,11/2)%0A(0,0) (-25/2,39/2) (17/2,-13) (0,0)%0A(0,0) (3/2,-3/2) (-1/2,1) (-2,3)%0A(0,0) (-17/2,14) (-10,17) (11/2,-19/2)%0A(0,0) (-1/2,1) (1/2,0) (3/2,-3)%0A(0,0) (1/2,0) (-5,8) (15/2,-23/2)%0A(0,0) (-7,12) (-1/2,1/2) (-9/2,8)%0A(0,0) (11,-35/2) (-7,12) (7/2,-5)%0A(0,0) (5,-8) (15/2,-23/2) (1/2,0)%0A(0,0) (2,-9/4) (-13/4,11/2) (-5/4,9/4)%0A(0,0) (3/2,-3/2) (-1/2,1) (2,-3)%0A(0,0) (3/2,-3/2) (1/2,-1) (2,-3)%0A(0,0) (-2,3) (3/2,-3/2) (1/2,-1)%0A(0,0) (-2,3) (3/2,-3/2) (-1/2,1)%0A(0,0) (1/2,-1/2) (9/2,-8) (7,-12)%0A(0,0) (9/2,-7) (-8,12) (-1/2,1/2)%0A(0,0) (1/2,-3/2) (1/2,0) (0,0)%0A(0,0) (-1,1) (-7/2,13/2) (0,0)%0A(0,0) (5/4,-9/4) (2,-9/4) (13/4,-11/2)%0A(0,0) (-9/2,8) (-7,12) (1/2,-1/2)%0A(0,0) (-1/2,0) (1,-1) (1/2,-1/2)%0A(0,0) (1/2,-1) (-2,3) (-3/2,3/2)%0A(0,0) (-23/2,37/2) (-11/2,19/2) (9/2,-13/2)%0A(0,0) (1/2,-1) (1,-3/2) (-13,22)%0A(0,0) (-1/2,1) (1,-3/2) (-13,22)%0A(0,0) (1,-2) (1,-3/2) (3/2,-3/2)%0A(0,0) (11/2,-19/2) (-17/2,14) (-10,17)%0A(0,0) (3/2,-3) (-1/2,1) (1/2,0)%0A(0,0) (1,-2) (1/2,-3/2) (-3/2,3)%0A(0,0) (-11/2,19/2) (17/2,-14) (-10,17)%0A(0,0) (-1/2,1/2) (-9/2,7) (8,-12)%0A(0,0) (-13/4,11/2) (5/4,-9/4) (2,-9/4)%0A(0,0) (-7,12) (7/2,-5) (11,-35/2)%0A(0,0) (9/2,-13/2) (-23/2,37/2) (11/2,-19/2)%0A(0,0) (1/2,0) (-5,8) (-15/2,23/2)%0A(0,0) (-1/2,3/2) (-3/2,3) (1,-2)%0A(0,0) (-1/2,1) (-2,3) (3/2,-3/2)%0A(0,0) (2,-3) (-3/2,3/2) (-1/2,1)%0A(0,0) (-5/4,9/4) (-2,9/4) (-13/4,11/2)%0A(0,0) (9/2,-8) (-7,12) (1/2,-1/2)%0A(0,0) (-13/4,11/2) (5/4,-9/4) (-2,9/4)%0A(0,0) (1/2,-3/2) (0,0) (2,-5/2)%0A(0,0) (13/4,-9/2) (-9/4,17/4) (1,-5/4)%0A(0,0) (8,-12) (-1/2,1/2) (9/2,-7)%0A(0,0) (-13/4,9/2) (-9/4,17/4) (1,-5/4)%0A(0,0) (1,-2) (-1,3/2) (-3/2,3/2)%0A(0,0) (1/2,-1/2) (-9/2,8) (7,-12)%0A(0,0) (0,0) (25/2,-39/2) (-17/2,13)%0A(0,0) (7,-12) (-7/2,5) (-11,35/2)%0A(0,0) (-3/2,3/2) (1/2,-1) (2,-3)%0A(0,0) (1,-1) (-1/2,1/2) (1/2,0)%0A(0,0) (1/2,0) (0,0) (5/2,-7/2)%0A(0,0) (-9/2,13/2) (-21/2,33/2) (15/2,-25/2)%0A(0,0) (-1/2,0) (4,-7) (15/2,-25/2)%0A(0,0) (-5/2,7/2) (1/2,0) (0,0)%0A(0,0) (1,-5/4) (-13/4,9/2) (9/4,-17/4)%0A(0,0) (0,1) (9/2,-15/2) (15/2,-12)%0A(0,0) (-3/2,3) (-1,2) (-1/2,3/2)%0A(0,0) (7,-12) (1/2,-1/2) (9/2,-8)%0A(0,0) (1/2,0) (4,-7) (-15/2,25/2)%0A(0,0) (15/2,-25/2) (-9/2,13/2) (-21/2,33/2)%0A(0,0) (-21/2,33/2) (15/2,-25/2) (9/2,-13/2)%0A(0,0) (-13,22) (1/2,-1) (1,-3/2)%0A(0,0) (5/4,-9/4) (2,-9/4) (-13/4,11/2)%0A(0,0) (-15/2,25/2) (9/2,-13/2) (21/2,-33/2)%0A(0,0) (-23/2,37/2) (-11/2,19/2) (-9/2,13/2)%0A(0,0) (-11,35/2) (-7,12) (-7/2,5)%0A(0,0) (-1/2,1/2) (-9/2,8) (7,-12)%0A(0,0) (10,-17) (11/2,-19/2) (-17/2,14)%0A(0,0) (-1,3/2) (3/2,-3/2) (-1,2)%0A(0,0) (0,0) (-25/2,39/2) (-17/2,13)%0A(0,0) (-1/2,1) (-1,3/2) (13,-22)%0A(0,0) (-9/4,17/4) (-1,5/4) (13/4,-9/2)%0A(0,0) (9/2,-8) (7,-12) (1/2,-1/2)%0A(0,0) (-11,35/2) (7,-12) (7/2,-5)%0A(0,0) (1,-2) (1,-3/2) (-3/2,3/2)%0A(0,0) (-4,11/2) (-3,9/2) (14,-45/2)%0A%0A%0A%0A0%0A%0A%0A%0A720%0A4 0 1 2 3%0A4 4 5 6 7%0A4 8 9 10 11%0A4 12 13 14 15%0A4 16 17 18 19%0A4 20 21 22 23%0A4 24 25 26 27%0A4 28 29 30 31%0A4 32 12 33 34%0A4 35 36 37 38%0A4 39 40 41 42%0A4 43 44 45 46%0A4 20 47 48 49%0A4 50 51 52 53%0A4 54 55 56 57%0A4 58 59 60 61%0A4 62 63 64 65%0A4 66 67 68 69%0A4 70 71 72 73%0A4 74 75 76 77%0A4 78 79 80 81%0A4 82 83 84 85%0A4 86 87 88 89%0A4 88 87 90 91%0A4 81 92 93 94%0A4 95 96 97 98%0A4 99 100 101 102%0A4 103 2 104 52%0A4 2 1 105 106%0A4 107 108 109 110%0A4 111 56 112 113%0A4 114 115 116 117%0A4 118 119 120 121%0A4 122 123 124 125%0A4 37 126 127 128%0A4 129 130 131 132%0A4 16 133 134 135%0A4 136 137 138 139%0A4 140 123 141 142%0A4 143 144 145 146%0A4 147 43 46 148%0A4 149 150 151 152%0A4 153 154 155 156%0A4 157 158 159 160%0A4 161 124 162 163%0A4 164 30 29 165%0A4 166 167 168 169%0A4 136 170 13 171%0A4 172 173 174 175%0A4 176 177 178 179%0A4 180 181 182 183%0A4 184 185 186 187%0A4 188 147 148 189%0A4 190 191 192 193%0A4 194 81 195 196%0A4 9 197 96 95%0A4 198 199 200 201%0A4 202 203 204 205%0A4 167 44 191 190%0A4 206 207 208 209%0A4 205 204 210 211%0A4 212 10 14 213%0A4 214 141 123 215%0A4 119 181 180 216%0A4 42 41 189 217%0A4 218 219 47 220%0A4 134 221 222 135%0A4 223 9 67 224%0A4 225 226 227 228%0A4 59 229 173 230%0A4 231 232 55 73%0A4 233 234 197 235%0A4 236 237 238 239%0A4 112 56 100 99%0A4 78 179 240 94%0A4 241 219 242 243%0A4 97 96 244 245%0A4 131 246 247 248%0A4 249 250 251 252%0A4 253 254 255 256%0A4 243 257 258 241%0A4 52 104 259 53%0A4 41 40 260 261%0A4 262 263 217 117%0A4 264 265 266 3%0A4 267 63 62 84%0A4 268 269 270 271%0A4 272 168 1 273%0A4 274 275 269 268%0A4 276 277 194 278%0A4 279 280 202 281%0A4 282 283 232 231%0A4 248 247 284 130%0A4 285 286 287 288%0A4 289 290 47 291%0A4 139 138 292 293
1114%0A4 294 141 214 295%0A4 296 297 226 225%0A4 151 298 299 300%0A4 186 92 81 187%0A4 80 301 195 81%0A4 135 302 17 16%0A4 108 66 69 109%0A4 303 67 9 304%0A4 270 269 305 306%0A4 107 307 308 309%0A4 154 310 311 155%0A4 300 299 312 5%0A4 220 47 290 313%0A4 314 117 217 315%0A4 153 227 316 317%0A4 182 48 318 183%0A4 319 120 119 177%0A4 320 162 30 321%0A4 205 322 323 202%0A4 217 263 324 325%0A4 326 296 225 327%0A4 328 322 205 114%0A4 329 249 252 330%0A4 331 82 332 333%0A4 334 335 336 337%0A4 189 41 261 188%0A4 285 290 1 0%0A4 338 10 13 339%0A4 38 88 91 35%0A4 340 341 342 343%0A4 344 345 346 113%0A4 347 348 349 350%0A4 92 118 121 93%0A4 256 329 330 253%0A4 17 313 218 18%0A4 145 144 351 352%0A4 209 208 353 61%0A4 234 68 354 244%0A4 317 316 68 355%0A4 286 16 356 287%0A4 357 234 358 156%0A4 90 359 360 91%0A4 361 164 165 362%0A4 363 364 207 206%0A4 61 60 226 209%0A4 365 228 296 326%0A4 325 366 367 217%0A4 6 107 368 150%0A4 38 37 128 280%0A4 149 14 67 7%0A4 369 45 40 39%0A4 370 371 60 372%0A4 373 77 76 374%0A4 375 376 158 157%0A4 11 10 181 377%0A4 207 205 378 208%0A4 33 12 15 379%0A4 11 380 381 8%0A4 115 382 383 116%0A4 384 66 108 385%0A4 386 129 350 335%0A4 144 387 242 351%0A4 388 232 389 390%0A4 254 391 392 255%0A4 3 2 103 264%0A4 231 393 373 282%0A4 26 25 394 395%0A4 396 397 102 398%0A4 252 399 341 330%0A4 73 72 393 231%0A4 64 400 83 65%0A4 401 402 403 404%0A4 171 13 405 406%0A4 407 283 250 408%0A4 242 219 409 351%0A4 410 411 24 27%0A4 312 412 413 414%0A4 310 365 326 349%0A4 35 415 416 280%0A4 121 417 185 93%0A4 184 418 419 420%0A4 288 387 290 285%0A4 400 405 421 267%0A4 224 422 423 424%0A4 199 242 425 426%0A4 412 427 428 413%0A4 152 151 300 429%0A4 430 421 294 295%0A4 374 76 188 71%0A4 431 432 262 117%0A4 77 433 254 253%0A4 434 29 435 436%0A4 284 425 242 246%0A4 433 437 391 254%0A4 100 56 55 438%0A4 439 440 441 442%0A4 443 338 444 445%0A4 89 88 38 356%0A4 446 447 253 222%0A4 448 26 395 414%0A4 444 338 339 449%0A4 450 249 329 342%0A4 75 166 169 446%0A4 451 452 29 453%0A4 454 444 449 332%0A4 455 236 378 205%0A4 456 369 55 54%0A4 330 341 340 253%0A4 332 457 458 454%0A4 129 360 89 356%0A4 343 459 401 340%0A4 152 294 14 149%0A4 179 178 319 240%0A4 46 45 2 460%0A4 461 462 230 463%0A4 29 452 464 165%0A4 465 30 164 466%0A4 467 316 371 384%0A4 366 57 456 367%0A4 306 468 420 311%0A4 158 469 358 159%0A4 298 470 471 85%0A4 372 472 473 474%0A4 206 435 229 363%0A4 8 381 277 276%0A4 452 425 359 90%0A4 466 164 361 416%0A4 94 240 176 81%0A4 405 13 12 32%0A4 226 60 25 24%0A4 334 469 425 475%0A4 476 477 77 396%0A4 358 234 478 305%0A4 479 166 75 74%0A4 480 223 224 424%0A4 132 200 481 129%0A4 297 29 434 238%0A4 458 212 213 482%0A4 169 483 447 446%0A4 484 54 57 366%0A4 221 272 273 485%0A4 486 170 181 443%0A4 304 9 68 487%0A4 348 488 489 490%0A4 337 297 469 334%0A4 200 199 426 481%0A4 259 104 491 492%0A4 287 356 38 265%0A4 18 218 220 302%0A4 94 441 493 78%0A4 342 329 256 343%0A4 202 361 362 211%0A4 73 55 44 70%0A4 494 251 168 23%0A4 150 368 298 151%0A4 77 477 495 256%0A4 496 370 497 498%0A4 499 500 132 257%0A4 261 501 502 188%0A4 503 162 229 504%0A4 393 396 77 373%0A4 398 505 506 396%0A4 316 227 411 394%0A4 507 325 431 508%0A4 299 509 510 511%0A4 512 110 414 513%0A4 313 290 219 218%0A4 514 499 257 243%0A4 253 447 74 77%0A4 421 112 63 267%0A4 339 486 515 449%0A4 409 219 290 143%0A4 516 59 123 140%0A4 138 256 517 292%0A4 91 360 129 35%0A4 491 51 50 492%0A4 518 105 190 193%0A4 356 248 130 129%0A4 377 181 119 278%0A4 341 399 450 342%0A4 58 519 364 363%0A4 23 22 520 494%0A4 168 251 483 169%0A4 311 521 347 350%0A4 281 202 117 314%0A4 522 94 184 523%0A4 0 524 286 285%0A4 213 14 13 525%0A4 494 520 526 527%0A4 511 473 498 299%0A4 215 430 528 529%0A4 475 386 335 334%0A4 208 378 448 353%0A4 487 68 67 303%0A4 273 289 133 485%0A4 438 530 397 531%0A4 51 465 103 52%0A4 343 515 445 195%0A4 219 120 440 439%0A4 114 172 175 431%0A4 532 533 534 470%0A4 317 513 154 153%0A4 217 367 484 502%0A4 535 168 167 536%0A4 160 159 376 375%0A4 120 274 417 121%0A4 245 537 110 420%0A4 394 411 410 395%0A4 69 467 538 109%0A4 539 540 541 222%0A4 495 542 517 256%0A4 538 467 384 385%0A4 533 405 294 534%0A4 266 543 539 524%0A4 432 161 163 262%0A4 271 270 500 184%0A4 378 327 365 310%0A4 34 33 332 82%0A4 359 425 387 86%0A4 447 483 479 74%0A4 209 226 435 206%0A4 251 182 399 252%0A4 544 274 234 233%0A4 57 56 3
111469 456%0A4 474 473 511 448%0A4 102 101 325 398%0A4 44 55 545 260%0A4 263 546 547 324%0A4 362 415 35 211%0A4 255 392 437 433%0A4 498 497 312 299%0A4 133 289 291 134%0A4 49 48 182 527%0A4 548 315 549 550%0A4 307 303 304 308%0A4 63 112 389 64%0A4 204 551 28 210%0A4 125 508 552 122%0A4 553 503 504 328%0A4 391 251 250 392%0A4 431 554 115 114%0A4 105 1 167 190%0A4 250 389 555 408%0A4 240 319 177 176%0A4 556 223 480 557%0A4 558 170 182 402%0A4 113 112 421 344%0A4 554 559 382 115%0A4 55 232 530 438%0A4 413 428 560 561%0A4 429 141 294 152%0A4 106 105 518 562%0A4 419 233 235 563%0A4 312 497 474 448%0A4 501 545 39 42%0A4 564 465 45 550%0A4 364 114 205 207%0A4 408 555 542 495%0A4 562 518 539 543%0A4 356 145 352 132%0A4 515 486 443 445%0A4 459 558 402 401%0A4 506 388 390 565%0A4 528 430 295 566%0A4 189 148 567 543%0A4 514 275 274 568%0A4 387 103 87 86%0A4 162 369 546 163%0A4 502 501 42 217%0A4 569 79 78 340%0A4 116 383 559 554%0A4 260 545 501 261%0A4 398 62 65 517%0A4 96 197 234 244%0A4 49 570 21 20%0A4 139 250 170 136%0A4 332 33 379 368%0A4 571 488 348 347%0A4 76 75 446 222%0A4 469 297 488 571%0A4 527 526 570 49%0A4 1 290 289 273%0A4 246 242 387 247%0A4 383 162 124 559%0A4 291 272 221 134%0A4 127 465 452 572%0A4 175 461 573 431%0A4 280 50 53 38%0A4 471 574 533 532%0A4 193 192 188 76%0A4 426 575 576 481%0A4 551 435 29 28%0A4 454 458 482 368%0A4 536 167 1 577%0A4 110 578 307 107%0A4 122 552 345 344%0A4 309 308 578 110%0A4 548 369 162 320%0A4 508 431 573 552%0A4 379 579 298 368%0A4 565 390 580 505%0A4 352 581 19 132%0A4 543 259 492 189%0A4 566 582 299 298%0A4 53 259 543 38%0A4 349 348 490 310%0A4 389 405 400 64%0A4 87 103 452 90%0A4 60 59 472 372%0A4 442 441 94 19%0A4 489 583 521 490%0A4 572 452 103 126%0A4 577 1 168 535%0A4 130 284 246 131%0A4 547 161 432 324%0A4 368 423 557 454%0A4 428 316 60 560%0A4 30 162 503 584%0A4 56 124 161 547%0A4 399 182 170 450%0A4 237 226 297 238%0A4 71 188 502 72%0A4 579 585 32 34%0A4 101 100 438 531%0A4 309 480 424 107%0A4 82 532 470 298%0A4 350 157 160 311%0A4 315 217 189 549%0A4 13 170 486 339%0A4 264 103 387 288%0A4 47 168 272 291%0A4 79 318 216 80%0A4 36 572 126 37%0A4 350 576 201 500%0A4 256 255 433 77%0A4 210 28 31 203%0A4 580 112 232 388%0A4 290 387 144 143%0A4 541 535 536 586%0A4 232 283 407 587%0A4 472 59 141 496%0A4 385 108 107 312%0A4 156 358 227 153%0A4 576 575 198 201%0A4 534 294 421 574%0A4 15 585 579 379%0A4 377 196 380 11%0A4 463 172 114 511%0A4 588 589 590 493%0A4 292 517 82 331%0A4 345 85 398 346%0A4 524 539 16 286%0A4 481 576 350 129%0A4 457 525 212 458%0A4 368 482 457 332%0A4 336 349 211 591%0A4 70 44 167 592%0A4 550 45 369 548%0A4 539 518 193 76%0A4 416 361 202 280%0A4 424 423 368 107%0A4 235 197 274 544%0A4 321 30 465 564%0A4 321 281 314 320%0A4 156 155 593 357%0A4 323 553 117 202%0A4 227 358 583 489%0A4 4 371 141 429%0A4 278 194 196 377%0A4 414 413 561 448%0A4 61 353 519 58%0A4 22 222 253 520%0A4 482 213 525 457%0A4 530 232 112 99%0A4 185 417 594 186%0A4 283 167 166 479%0A4 382 229 162 383%0A4 520 253 340 526%0A4 500 375 157 350%0A4 109 538 414 110%0A4 305 478 468 306%0A4 390 389 112 580%0A4 376 275 469 158%0A4 411 227 226 24%0A4 511 510 595 573%0A4 360 359 86 89%0A4 173 229 124 174%0A4 436 237 236 455%0A4 45 465 51 491%0A4 126 103 465 127%0A4 239 596 211 349%0A4 111 507 508 125%0A4 546 369 56 547%0A4 163 546 263 262%0A4 404 403 558 459%0A4 526 340 78 570%0A4 353 448 511 519%0A4 540 577 535 541%0A4 473 472 496 498%0A4 351 409 581 352%0A4 557 480 309 454%0A4 14 294 585 15%0A4 517 565 505 398%0A4 559 124 229 382%0A4 301 180 183 569%0A4 322 597 584 323%0A4 505 580 388 506%0A4 181 10 338 443%0A4 67 14 422 224%0A4 381 309 187 277%0A4 594 118 92 186%0A4 357 593 512 355%0A4 598 522 523 568%0A4 521 583 571 347%0A4 378 236 239 349%0A4 3 266 524 0%0A4 435 226 237 436%0A4 19 18 302 135%0A4 295 214 582 566%0A4 397 530 99 102%0A4 124 123 462 174%0A4 216 180 301 80%0A4 395 410 310 414%0A4 441 440 588 493%0A4 371 67 66 384%0A4 23 168 47 20%0A4 392 250 283 437%0A4 568 274 120 598%0A4 460 2 44 43%0A4 19 581 146 16%0A4 470 534 574 471%0A4 132 131 248 356%0A4 367 456 54 484%0A4 203 31 551 204%0A4 513 414 310 154%0A4 125 124 56 111%0A4 587 407 477 476%0A4 519 511 114 364%0A4 201 200 132 500%0A4 275 242 199 198%0A4 68 316 467 69%0A4 84 62 398 85%0A4 299 582 529 573%0A4 497 370 372 474%0A4 113 346 507 111%0A4 174 462 461 175%0A4 98 97 187 309%0A4 570 78 135 21%0A4 420 419 563 187%0A4 485 133 16 539%0A4 243 242 275 514%0A4 188 192 562 543%0A4 527 182 251 494%0A4 448 561 412 312%0A4 7 67 371 4%0A4 561 560 427 412%0A4 552 573 85 345%0A4 293 292 331 406%0A4 276 197 9 8%0A4 333 332 343 137%0A4 488 297 227 489%0A4 573 595 509 299%0A4 72 502 396 393%0A4 414 538 385 312%0A4 197 119 118 594%0A4 363 229 59 58%0A4 318 48 119 216%0A4 187 97 245 420%0A4 146 145 356 16%0A4 574 421 405 533%0A4 477 407 408 495%0A4 502 484 366 325%0A4 492 50 280 189%0A4 589 47 219 439%0A4 298 579 34 82%0A4 308 304 487 578%0A4 65 83 82 517%0A4 586 536 577 540%0A4 25 60 316 394%0A4 475 425 452 451%0A4 380 454 309 381%0A4 568 523 499 514%0A4 344 421 123 122%0A4 211 596 455 205%0A4 335 350 349 336%0A4 599 35 129 386%0A4 468 478 268 271%0A4 493 590 135 78%0A4 230 173 172 463%0A4 543 567 147 188%0A4 583 358 469 571%0A4 7 6 150 149%0A4 85 528 566 298%0A4 5 312 107 6%0A4 183 318 79 569%0A4 40 45 44 260%0A4 117 553 328 114%0A4 191 44 2 106%0A4 354 68 9 95%0A4 420 468 271 184%0A4 21 135 222 22%0A4 10 9 223 556%0A4 509 142 516 510%0A4 247 387 425 284%0A4 171 333 137 136%0A4 575 469 275 198%0A4 417 274 197 594%0A4 293 389 250 139%0A4 244 354 537 245%0A4 537 354 95 98%0A4 135 590 442 19%0A4 592 16
11147 283 282%0A4 418 544 233 419%0A4 187 563 418 184%0A4 425 469 575 426%0A4 104 2 45 491%0A4 258 19 94 522%0A4 159 358 275 376%0A4 280 128 36 35%0A4 346 398 325 507%0A4 500 270 306 311%0A4 598 120 219 241%0A4 560 60 371 427%0A4 337 336 591 453%0A4 449 515 343 332%0A4 31 30 435 551%0A4 327 225 228 365%0A4 478 234 274 268%0A4 211 210 203 202%0A4 278 119 197 276%0A4 593 420 110 512%0A4 110 537 98 309%0A4 142 141 59 516%0A4 550 549 279 564%0A4 228 227 297 296%0A4 523 184 500 499%0A4 85 471 532 82%0A4 573 461 463 511%0A4 340 401 404 195%0A4 310 410 27 378%0A4 265 38 543 266%0A4 555 389 232 587%0A4 464 452 465 466%0A4 440 120 48 588%0A4 355 68 234 357%0A4 229 435 597 504%0A4 128 127 572 36%0A4 545 55 369 39%0A4 596 434 436 455%0A4 155 311 420 593%0A4 415 464 466 416%0A4 241 258 522 598%0A4 504 597 322 328%0A4 429 300 5 4%0A4 406 331 333 171%0A4 406 405 389 293%0A4 423 422 556 557%0A4 76 586 540 539%0A4 282 373 374 592%0A4 355 512 513 317%0A4 349 326 327 378%0A4 584 503 553 323%0A4 402 182 181 403%0A4 510 516 140 595%0A4 453 29 297 337%0A4 427 371 316 428%0A4 123 421 430 215%0A4 595 140 142 509%0A4 27 26 448 378%0A4 490 521 311 310%0A4 320 314 315 548%0A4 117 116 554 431%0A4 195 404 459 343%0A4 531 397 396 502%0A4 178 48 120 319%0A4 222 221 485 539%0A4 238 434 596 239%0A4 590 589 439 442%0A4 578 487 303 307%0A4 437 283 251 391%0A4 311 160 375 500%0A4 396 506 565 517%0A4 403 181 170 558%0A4 585 294 405 32%0A4 141 371 370 496%0A4 422 14 10 556%0A4 257 132 19 258%0A4 177 119 48 178%0A4 288 287 265 264%0A4 137 343 256 138%0A4 549 189 280 279%0A4 525 13 10 212%0A4 451 599 386 475%0A4 325 101 531 502%0A4 453 591 599 451%0A4 597 435 30 584%0A4 462 123 59 230%0A4 564 279 281 321%0A4 170 250 249 450%0A4 529 528 85 573%0A4 581 409 143 146%0A4 302 220 313 17%0A4 563 235 544 418%0A4 83 400 267 84%0A4 324 432 431 325%0A4 582 214 215 529%0A4 517 542 476 396%0A4 192 191 106 562%0A4 222 541 586 76%0A4 591 211 35 599%0A4 269 275 358 305%0A4 196 195 454 380%0A4 592 374 71 70%0A4 48 47 589 588%0A4 195 301 569 340%0A4 165 464 415 362%0A4 93 185 184 94%0A4 483 251 283 479%0A4 445 444 454 195%0A4 567 460 43 147%0A4 277 187 81 194%0A4 148 46 460 567%0A4 81 176 179 78%0A4 542 555 587 476%0A%0A%0A%0A0%0A%0A%0A"; 1115 1116// src/worker/legacy/resources/com/vzome/core/parts/lifelike/green-short.vef 1117var green_short_default2 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A35%0A(0,0) (-1/2,1) (-1,3/2) (1,-1)%0A(0,0) (-1/2,1) (1,-3/2) (1,-1)%0A(0,0) (1/2,-1/2) (1/2,-1) (0,1)%0A(0,0) (1/2,-1/2) (-1/2,1) (0,1)%0A(0,0) (-1,2) (1/2,-1) (0,1/2)%0A(0,0) (-1,2) (-1/2,1) (0,1/2)%0A(0,0) (-23/2,19) (71,-115) (-39/2,65/2)%0A(0,0) (-23/2,19) (-71,115) (-39/2,65/2)%0A(0,0) (0,1/2) (0,0) (3/2,-2)%0A(0,0) (65/2,-52) (-44,71) (103/2,-165/2)%0A(0,0) (65/2,-52) (44,-71) (103/2,-165/2)%0A(0,0) (1,-1) (-1/2,1/2) (1/2,0)%0A(0,0) (1,-1) (1/2,-1/2) (1/2,0)%0A(0,0) (-77/2,63) (0,0) (-127/2,207/2)%0A(0,0) (1/2,0) (0,0) (-1/2,3/2)%0A(0,0) (1,-1/2) (0,0) (3/2,-1)%0A(0,0) (1/2,1/2) (-1/2,1/2) (1/2,1/2)%0A(0,0) (1/2,1/2) (1/2,-1/2) (1/2,1/2)%0A(0,0) (0,3/2) (0,0) (-1/2,2)%0A(0,0) (1/2,1) (0,0) (3/2,-1/2)%0A(0,0) (79/2,-62) (0,0) (129/2,-205/2)%0A(0,0) (0,2) (-1/2,1/2) (1/2,1)%0A(0,0) (0,2) (1/2,-1/2) (1/2,1)%0A(0,0) (-63/2,53) (-44,71) (-101/2,167/2)%0A(0,0) (-63/2,53) (44,-71) (-101/2,167/2)%0A(0,0) (1,1/2) (0,0) (-1/2,3)%0A(0,0) (25/2,-18) (71,-115) (41/2,-63/2)%0A(0,0) (25/2,-18) (-71,115) (41/2,-63/2)%0A(0,0) (2,-1) (1/2,-1) (1,1/2)%0A(0,0) (2,-1) (-1/2,1) (1,1/2)%0A(0,0) (1/2,3/2) (1/2,-1) (1,0)%0A(0,0) (1/2,3/2) (-1/2,1) (1,0)%0A(0,0) (3/2,0) (-1,3/2) (0,2)%0A(0,0) (3/2,0) (1,-3/2) (0,2)%0A(0,0) (1,1) (0,0) (1,1)%0A%0A%0A%0A0%0A%0A%0A%0A36%0A3 2 16 15 %0A3 3 2 15 %0A3 12 3 17 %0A3 15 17 3 %0A3 16 2 11 %0A3 16 30 21 %0A3 17 22 31 %0A3 18 31 30 %0A3 30 16 18 %0A3 31 18 17 %0A4 0 4 9 6 %0A4 1 0 6 7 %0A4 2 6 9 11 %0A4 3 7 6 2 %0A4 4 8 13 9 %0A4 5 1 7 10 %0A4 8 5 10 13 %0A4 11 9 13 14 %0A4 12 10 7 3 %0A4 12 17 18 14 %0A4 14 13 10 12 %0A4 14 18 16 11 %0A4 15 16 21 19 %0A4 19 21 23 20 %0A4 19 22 17 15 %0A4 21 30 26 23 %0A4 22 19 20 24 %0A4 25 20 23 28 %0A4 28 23 26 32 %0A4 29 24 20 25 %0A4 30 31 27 26 %0A4 31 22 24 27 %0A4 32 26 27 33 %0A4 33 27 24 29 %0A5 4 0 1 5 8 %0A5 29 25 28 32 33 %0A%0A%0A%0A20%0A15 16 17 18 19 20 21 22 23 24 %0A25 26 27 28 29 30 31 32 33 34 %0A%0A%0A%0Atip 34%0A%0A"; 1118 1119// src/worker/legacy/resources/com/vzome/core/parts/lifelike/green.vef 1120var green_default4 = "data:text/plain;
1120charset=utf-8,vZome VEF 6 field golden%0A%0A39%0A(0,0) (1/2,-1/2) (1/2,-1) (0,1) %0A(0,0) (1/2,1/2) (-1/2,1/2) (1/2,1/2) %0A(0,0) (1,-1/2) (0,0) (3/2,-1) %0A(0,0) (1,-1) (-1/2,1/2) (1/2,0) %0A(0,0) (1/2,0) (0,0) (-1/2,3/2) %0A(0,0) (0,3/2) (0,0) (-1/2,2) %0A(0,0) (2,2) (0,0) (2,2) %0A(0,0) (27/2,-17) (71,-115) (43/2,-61/2) %0A(0,0) (5/2,1) (1,-3/2) (1,3) %0A(0,0) (27/2,-17) (-71,115) (43/2,-61/2) %0A(0,0) (-61/2,54) (44,-71) (-99/2,169/2) %0A(0,0) (3,0) (-1/2,1) (2,3/2) %0A(0,0) (3/2,5/2) (-1/2,1) (2,1) %0A(0,0) (1,5/2) (0,0) (1/2,3) %0A(0,0) (3/2,3/2) (1/2,-1/2) (3/2,3/2) %0A(0,0) (2,1/2) (0,0) (5/2,0) %0A(0,0) (1/2,1/2) (1/2,-1/2) (1/2,1/2) %0A(0,0) (1/2,-1/2) (-1/2,1) (0,1) %0A(0,0) (1,-1) (1/2,-1/2) (1/2,0) %0A(0,0) (65/2,-52) (44,-71) (103/2,-165/2) %0A(0,0) (-23/2,19) (-71,115) (-39/2,65/2) %0A(0,0) (3/2,5/2) (1/2,-1) (2,1) %0A(0,0) (3/2,2) (0,0) (5/2,1/2) %0A(0,0) (1,3) (1/2,-1/2) (3/2,2) %0A(0,0) (1,3) (-1/2,1/2) (3/2,2) %0A(0,0) (-61/2,54) (-44,71) (-99/2,169/2) %0A(0,0) (3/2,3/2) (-1/2,1/2) (3/2,3/2) %0A(0,0) (2,3/2) (0,0) (1/2,4) %0A(0,0) (81/2,-61) (0,0) (131/2,-203/2) %0A(0,0) (3,0) (1/2,-1) (2,3/2) %0A(0,0) (65/2,-52) (-44,71) (103/2,-165/2) %0A(0,0) (-77/2,63) (0,0) (-127/2,207/2) %0A(0,0) (5/2,1) (-1,3/2) (1,3) %0A(0,0) (-1/2,1) (1,-3/2) (1,-1) %0A(0,0) (-1/2,1) (-1,3/2) (1,-1) %0A(0,0) (-23/2,19) (71,-115) (-39/2,65/2) %0A(0,0) (-1,2) (1/2,-1) (0,1/2) %0A(0,0) (0,1/2) (0,0) (3/2,-2) %0A(0,0) (-1,2) (-1/2,1) (0,1/2) %0A%0A%0A%0A0%0A%0A%0A%0A40%0A3 0 1 2%0A4 3 4 5 1%0A4 8 9 10 11%0A3 12 13 14%0A4 2 15 14 16%0A3 17 2 16%0A4 18 19 20 17%0A3 21 13 12%0A3 0 3 1%0A4 22 23 14 15%0A4 5 16 14 13%0A4 24 21 7 25%0A3 21 26 13%0A4 2 1 26 15%0A3 23 12 14%0A4 4 18 16 5%0A4 27 28 25 29%0A4 3 30 31 4%0A4 24 22 15 26%0A5 11 27 29 32 8%0A4 33 34 35 20%0A3 18 17 16%0A4 36 37 31 30%0A5 36 34 33 38 37%0A4 1 5 13 26%0A4 22 24 25 28%0A4 21 12 9 7%0A3 0 2 17%0A3 21 24 26%0A4 34 36 30 35%0A4 17 20 35 0%0A4 4 31 19 18%0A4 29 25 7 32%0A4 32 7 9 8%0A4 38 33 20 19%0A4 11 10 28 27%0A4 23 22 28 10%0A4 0 35 30 3%0A4 12 23 10 9%0A4 37 38 19 31%0A%0A%0A%0A20%0A 6 7 12 9 11 22 21 27 28 10 32 26 23 25 24 8 15 13 14 29%0A%0Atip 6%0A"; 1121 1122// src/worker/legacy/resources/com/vzome/core/parts/lifelike/red-short.vef 1123var red_short_default2 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A31%0A(0,0) (-1/2,1/2) (-1/2,-1) (0,-1)%0A(0,0) (-1/2,1/2) (-1/2,0) (-1,1)%0A(0,0) (1/2,-1) (-1,-1/2) (-2,2)%0A(0,0) (1/2,-1) (-8/5,4/5) (-7/10,1/10)%0A(0,0) (1/2,-1) (-1,0) (-1/2,-1/2)%0A(0,0) (1/2,-1) (0,-1) (-1/2,1/2)%0A(0,0) (1/2,-1) (3/5,-9/5) (-3/10,-1/10)%0A(0,0) (1/2,-1) (0,-1/2) (1,-2)%0A(0,0) (-1,3/2) (0,-2) (-3/2,1)%0A(0,0) (-1,3/2) (-3/5,-7/10) (-1/5,-9/10)%0A(0,0) (-1,3/2) (-2/5,-3/10) (-4/5,9/10)%0A(0,0) (-1,3/2) (-1,1) (1/2,-1)%0A(0,0) (0,0) (-1,-1) (-1,0)%0A(0,0) (0,0) (1/2,-3) (-1,1/2)%0A(0,0) (0,0) (-3/2,1/2) (-1/2,0)%0A(0,0) (0,0) (-1/10,-17/10) (3/10,-7/5)%0A(0,0) (0,0) (-9/10,7/10) (-13/10,7/5)%0A(0,0) (0,0) (1/2,-3/2) (-1/2,0)%0A(0,0) (0,0) (-3/2,2) (0,-1/2)%0A(0,0) (1,-3/2) (0,-2) (-3/2,1)%0A(0,0) (1,-3/2) (-3/5,-7/10) (-1/5,-9/10)%0A(0,0) (1,-3/2) (-2/5,-3/10) (-4/5,9/10)%0A(0,0) (1,-3/2) (-1,1) (1/2,-1)%0A(0,0) (-1/2,1) (-1,-1/2) (-2,2)%0A(0,0) (-1/2,1) (-8/5,4/5) (-7/10,1/10)%0A(0,0) (-1/2,1) (-1,0) (-1/2,-1/2)%0A(0,0) (-1/2,1) (0,-1) (-1/2,1/2)%0A(0,0) (-1/2,1) (3/5,-9/5) (-3/10,-1/10)%0A(0,0) (-1/2,1) (0,-1/2) (1,-2)%0A(0,0) (1/2,-1/2) (-1/2,-1) (0,-1)%0A(0,0) (1/2,-1/2) (-1/2,0) (-1,1)%0A%0A%0A%0A0%0A%0A%0A%0A32%0A3 0 14 5 %0A3 1 17 4 %0A3 4 0 1 %0A3 5 1 0 %0A3 14 29 26 %0A3 17 30 25 %0A3 25 4 17 %0A3 26 5 14 %0A3 29 25 30 %0A3 30 26 29 %0A4 2 3 9 8 %0A4 3 0 4 9 %0A4 6 1 5 10 %0A4 6 10 11 7 %0A4 10 5 26 21 %0A4 10 21 22 11 %0A4 15 3 2 13 %0A4 15 14 0 3 %0A4 16 17 1 6 %0A4 16 27 30 17 %0A4 18 16 6 7 %0A4 18 28 27 16 %0A4 20 9 4 25 %0A4 20 19 8 9 %0A4 20 24 23 19 %0A4 20 25 29 24 %0A4 23 24 15 13 %0A4 24 29 14 15 %0A4 26 30 27 21 %0A4 28 22 21 27 %0A5 18 7 11 22 28 %0A5 23 13 2 8 19 %0A%0A%0A%0A16%0A0 2 3 4 8 9 12 13 14 15 %0A19 20 23 24 25 29 %0A%0Atip 12%0A"; 1124 1125// src/worker/legacy/resources/com/vzome/core/parts/lifelike/red.vef 1126var red_default4 = "data:text/plain;
1126charset=utf-8,vZome VEF 6 field golden%0A%0A41%0A(0,0) (0,0) (3/2,-2) (0,-1/2)%0A(0,0) (0,0) (9/10,-7/10) (-13/10,7/5)%0A(0,0) (-1/2,1) (-3/5,9/5) (-3/10,-1/10)%0A(0,0) (-1/2,1) (0,1/2) (1,-2)%0A(0,0) (-1,3/2) (18/5,17/10) (-6/5,-29/10)%0A(0,0) (1/2,-1) (4,3/2) (-3,0)%0A(0,0) (1/2,-1) (23/5,1/5) (-17/10,-19/10)%0A(0,0) (0,0) (31/10,27/10) (-7/10,-17/5)%0A(0,0) (0,0) (5/2,4) (-2,-3/2)%0A(0,0) (1/2,-1) (4,1) (-3/2,-5/2)%0A(0,0) (-1/2,1/2) (5/2,1) (0,-3)%0A(0,0) (0,0) (7/2,-1/2) (-1/2,-2)%0A(0,0) (0,0) (9/2,1/2) (-3/2,-2)%0A(0,0) (-1/2,1/2) (7/2,2) (-1,-3)%0A(0,0) (-1/2,1) (4,3/2) (-3,0)%0A(0,0) (-1/2,1) (23/5,1/5) (-17/10,-19/10)%0A(0,0) (1,-3/2) (18/5,17/10) (-6/5,-29/10)%0A(0,0) (1,-3/2) (3,3) (-5/2,-1)%0A(0,0) (1/2,-1/2) (7/2,2) (-1,-3)%0A(0,0) (1,-3/2) (2/5,3/10) (-4/5,9/10)%0A(0,0) (1,-3/2) (1,-1) (1/2,-1)%0A(0,0) (0,0) (1/2,5/2) (-3/2,0)%0A(0,0) (-1/2,1/2) (3/2,1) (-2,1)%0A(0,0) (1/2,-1) (3,0) (-1/2,-5/2)%0A(0,0) (1/2,-1) (0,1) (-1/2,1/2)%0A(0,0) (-1/2,1) (0,1) (-1/2,1/2)%0A(0,0) (-1/2,1) (1,2) (-3/2,1/2)%0A(0,0) (1/2,-1) (1,2) (-3/2,1/2)%0A(0,0) (1/2,-1/2) (5/2,1) (0,-3)%0A(0,0) (-1/2,1) (4,1) (-3/2,-5/2)%0A(0,0) (-1/2,1) (3,0) (-1/2,-5/2)%0A(0,0) (1/2,-1/2) (3/2,1) (-2,1)%0A(0,0) (1/2,-1) (0,1/2) (1,-2)%0A(0,0) (1/2,-1) (-3/5,9/5) (-3/10,-1/10)%0A(0,0) (-1,3/2) (2/5,3/10) (-4/5,9/10)%0A(0,0) (-1,3/2) (1,-1) (1/2,-1)%0A(0,0) (-1/2,1/2) (1/2,0) (-1,1)%0A(0,0) (-1,3/2) (3,3) (-5/2,-1)%0A(0,0) (0,0) (-1/2,3/2) (-1/2,0)%0A(0,0) (1/2,-1/2) (1/2,0) (-1,1)%0A(0,0) (0,0) (4,2) (-2,-2)%0A%0A%0A%0A0%0A%0A%0A%0A42%0A4 0 1 2 3%0A4 5 6 7 8%0A4 10 11 12 13%0A4 14 15 16 17%0A4 8 7 15 14%0A4 3 2 19 20%0A3 21 22 23%0A4 23 10 13 9%0A4 24 25 26 27%0A4 6 13 12 7%0A3 27 26 11%0A3 26 28 11%0A4 16 29 9 4%0A3 22 27 10%0A3 21 23 30%0A3 31 21 30%0A4 32 33 1 0%0A4 20 19 34 35%0A4 28 30 29 18%0A4 15 18 29 16%0A4 36 24 27 22%0A4 30 23 9 29%0A4 4 9 13 6%0A4 17 16 4 37%0A4 38 36 22 21%0A3 31 30 28%0A4 7 12 18 15%0A3 27 11 10%0A4 37 4 6 5%0A4 35 34 33 32%0A4 33 36 38 1%0A4 1 38 39 2%0A5 20 35 32 0 3%0A4 19 25 24 34%0A5 17 37 5 8 14%0A4 11 28 18 12%0A4 34 24 36 33%0A3 22 10 23%0A4 2 39 25 19%0A4 39 38 21 31%0A4 25 39 31 26%0A3 26 31 28%0A%0A%0A%0A16%0A 4 9 13 18 17 8 14 5 7 6 29 12 15 37 40 16%0A%0Atip 40%0Amiddle 31 30 28 26 11 27 10 22 23 21%0A"; 1127 1128// src/worker/legacy/resources/com/vzome/core/parts/lifelike/yellow-short.vef 1129var yellow_short_default2 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A19%0A(0,0) (0,1/2) (0,0) (3/2,-2)%0A(0,0) (1,-1) (1/2,-1) (1,-3/2)%0A(0,0) (1,-1) (-1/2,1) (1,-3/2)%0A(0,0) (1/2,0) (0,0) (-1/2,3/2)%0A(0,0) (-1/2,5/3) (0,0) (-1/6,5/6)%0A(0,0) (1/2,1/6) (1/2,-1) (-2/3,4/3)%0A(0,0) (1/2,1/6) (-1/2,1) (-2/3,4/3)%0A(0,0) (0,1) (-1/2,1/2) (-1/2,1)%0A(0,0) (0,1) (1/2,-1/2) (-1/2,1)%0A(0,0) (1,0) (-1/2,1/2) (1/2,0)%0A(0,0) (1,0) (1/2,-1/2) (1/2,0)%0A(0,0) (1/2,5/6) (1/2,-1) (2/3,-1/3)%0A(0,0) (1/2,5/6) (-1/2,1) (2/3,-1/3)%0A(0,0) (3/2,-2/3) (0,0) (1/6,1/6)%0A(0,0) (1/2,1) (0,0) (1/2,-1/2)%0A(0,0) (0,2) (1/2,-1) (-1,5/2)%0A(0,0) (0,2) (-1/2,1) (-1,5/2)%0A(0,0) (1,1/2) (0,0) (-3/2,3)%0A(0,0) (1,1) (0,0) (0,1)%0A%0A%0A%0A0%0A%0A%0A%0A20%0A3 1 0 2 %0A3 7 14 9 %0A3 9 3 7 %0A3 9 10 3 %0A3 10 8 3 %0A3 14 7 8 %0A3 14 8 10 %0A3 17 16 15 %0A4 3 8 6 4 %0A4 4 6 2 0 %0A4 5 1 2 6 %0A4 5 4 0 1 %0A4 5 6 8 7 %0A4 5 7 3 4 %0A4 10 9 11 12 %0A4 10 12 13 14 %0A4 12 11 15 16 %0A4 14 13 11 9 %0A4 17 13 12 16 %0A4 17 15 11 13 %0A%0A%0A%0A10%0A9 10 11 12 13 14 15 16 17 18 %0A%0Atip 18%0A%0A%0A%0A"; 1130 1131// src/worker/legacy/resources/com/vzome/core/parts/lifelike/yellow.vef 1132var yellow_default3 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A25%0A(0,0) (-2/3,4/3) (1/2,1/6) (1/2,-1)%0A(0,0) (-1/2,1) (0,1) (-1/2,1/2)%0A(0,0) (-1/2,3/2) (1/2,0) (0,0)%0A(0,0) (-1/6,5/6) (-1/2,5/3) (0,0)%0A(0,0) (-1/2,2) (2,1/2) (0,0)%0A(0,0) (1/2,0) (1,3/2) (0,0)%0A(0,0) (1/2,1/2) (3/2,1/2) (-1/2,1/2)%0A(0,0) (1/2,-1/2) (1/2,1/2) (-1/2,1/2)%0A(0,0) (1/2,-1/2) (1/2,1/2) (1/2,-1/2)%0A(0,0) (-1/2,1) (0,1) (1/2,-1/2)%0A(0,0) (1/2,0) (1,-1/2) (0,0)%0A(0,0) (1/2,1/2) (3/2,1/2) (1/2,-1/2)%0A(0,0) (3/2,-1) (2,0) (1/2,-1/2)%0A(0,0) (3/2,-3/2) (3/2,1) (0,0)%0A(0,0) (5/3,-4/3) (3/2,5/6) (-1/2,1)%0A(0,0) (3/2,-1) (2,0) (-1/2,1/2)%0A(0,0) (5/3,-4/3) (3/2,5/6) (1/2,-1)%0A(0,0) (0,3/2) (1,2) (1/2,-1)%0A(0,0) (7/6,-5/6) (5/2,-2/3) (0,0)%0A(0,0) (1,0) (2,1) (0,0)%0A(0,0) (-2/3,4/3) (1/2,1/6) (-1/2,1)%0A(0,0) (0,3/2) (1,2) (-1/2,1)%0A(0,0) (1,-3/2) (1,-1) (1/2,-1)%0A(0,0) (1,-3/2) (1,-1) (-1/2,1)%0A(0,0) (3/2,-2) (0,1/2) (0,0)%0A%0A%0A%0A0%0A%0A%0A%0A26%0A4 0 1 2 3%0A3 5 6 7%0A3 7 8 5%0A4 9 2 10 8%0A4 2 1 7 10%0A4 5 11 12 13%0A4 14 12 15 16%0A4 17 16 18 4%0A3 10 7 6%0A3 11 5 8%0A4 20 9 1 0%0A4 6 5 13 15%0A3 4 21 17%0A4 1 9 8 7%0A4 3 2 9 20%0A4 16 15 13 18%0A4 20 0 22 23%0A4 3 20 23 24%0A4 18 13 12 14%0A3 8 10 11%0A3 23 22 24%0A4 21 14 16 17%0A4 4 18 14 21%0A4 11 6 15 12%0A3 6 11 10%0A4 0 3 24 22%0A%0A%0A%0A10%0A 4 19 12 14 15 17 21 13 16 18%0A%0Atip 19%0Amiddle 10 7 6 8 11 5%0A"; 1133
1134// src/worker/legacy/resources/com/vzome/core/parts/lifelike/index.js 1135var shapes7 = { 1136 "blue": blue_default5, 1137 "connector": connector_default7, 1138 "green-short": green_short_default2, 1139 "green": green_default4, 1140 "red-short": red_short_default2, 1141 "red": red_default4, 1142 "yellow-short": yellow_short_default2, 1143 "yellow": yellow_default3 1144}; 1145var lifelike_default = shapes7; 1146 1147// src/worker/legacy/resources/com/vzome/core/parts/octahedral/blue.vef 1148var blue_default6 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (1,-1) %0A%0A9%0A(0,0) (-16,38) (0,0) (-28,46) %0A(0,0) (-16,38) (-28,46) (0,0) %0A(0,0) (22,-34) (-28,46) (0,0) %0A(0,0) (22,-34) (0,0) (-28,46) %0A(0,0) (-16,38) (0,0) (28,-46) %0A(0,0) (-16,38) (28,-46) (0,0) %0A(0,0) (6,4) (0,0) (0,0) %0A(0,0) (22,-34) (28,-46) (0,0) %0A(0,0) (22,-34) (0,0) (28,-46) %0A%0A%0A%0A0%0A%0A%0A%0A4%0A4 0 1 2 3%0A4 7 8 4 5%0A4 4 8 2 1%0A4 5 0 3 7%0A%0A%0A%0A5%0A 4 5 6 0 1%0A%0Atip 6%0A"; 1149 1150// src/worker/legacy/resources/com/vzome/core/parts/octahedral/brown.vef 1151var brown_default2 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (1,-1) %0A%0A17%0A(0,0) (-3,4) (5,-6) (-1,0) %0A(0,0) (0,0) (22,-34) (28,-46) %0A(0,0) (1,-2) (-3,6) (3,-6) %0A(0,0) (1,-5) (1,4) (-1,-1) %0A(0,0) (1,-5) (-1,8) (-1,-1) %0A(0,0) (-2,-1) (-18,36) (-30,45) %0A(0,0) (-3,4) (3,-2) (-1,0) %0A(0,0) (-1,-1) (1,4) (1,-5) %0A(0,0) (-1,0) (5,-6) (-3,4) %0A(0,0) (-1,-1) (-1,8) (1,-5) %0A(0,0) (-2,-1) (4,2) (-2,-1) %0A(0,0) (-30,45) (-18,36) (-2,-1) %0A(0,0) (-1,0) (3,-2) (-3,4) %0A(0,0) (-5,5) (7,-4) (-3,1) %0A(0,0) (-3,1) (7,-4) (-5,5) %0A(0,0) (28,-46) (22,-34) (0,0) %0A(0,0) (3,-6) (-3,6) (1,-2) %0A%0A%0A%0A0%0A%0A%0A%0A16%0A3 0 1 2%0A3 3 4 5%0A3 0 6 1%0A4 7 0 8 3%0A4 9 6 0 7%0A3 11 9 7%0A4 4 3 8 12%0A4 3 5 11 7%0A3 5 4 14%0A4 12 15 1 6%0A3 11 13 9%0A3 15 12 8%0A3 16 15 8%0A4 9 13 14 4%0A4 4 12 6 9%0A4 8 0 2 16%0A%0A%0A%0A9%0A 10 11 7 13 3 4 9 14 5%0A%0Atip 10%0A"; 1152 1153// src/worker/legacy/resources/com/vzome/core/parts/octahedral/connector.vef 1154var connector_default8 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (1,-1) %0A%0A48%0A(0,0) (-28,46) (0,0) (22,-34) %0A(0,0) (0,0) (-28,46) (22,-34) %0A(0,0) (28,-46) (0,0) (22,-34) %0A(0,0) (0,0) (28,-46) (22,-34) %0A(0,0) (28,-46) (-22,34) (0,0) %0A(0,0) (0,0) (-22,34) (-28,46) %0A(0,0) (1,-2) (3,-6) (-3,6) %0A(0,0) (3,-6) (3,-6) (-1,2) %0A(0,0) (-3,6) (3,-6) (-1,2) %0A(0,0) (-28,46) (-22,34) (0,0) %0A(0,0) (-3,6) (3,-6) (1,-2) %0A(0,0) (22,-34) (28,-46) (0,0) %0A(0,0) (1,-2) (-3,6) (-3,6) %0A(0,0) (3,-6) (-1,2) (-3,6) %0A(0,0) (-22,34) (-28,46) (0,0) %0A(0,0) (-22,34) (0,0) (28,-46) %0A(0,0) (-22,34) (28,-46) (0,0) %0A(0,0) (-22,34) (0,0) (-28,46) %0A(0,0) (0,0) (28,-46) (-22,34) %0A(0,0) (1,-2) (3,-6) (3,-6) %0A(0,0) (3,-6) (1,-2) (3,-6) %0A(0,0) (28,-46) (0,0) (-22,34) %0A(0,0) (3,-6) (3,-6) (1,-2) %0A(0,0) (0,0) (-22,34) (28,-46) %0A(0,0) (3,-6) (-1,2) (3,-6) %0A(0,0) (3,-6) (-3,6) (-1,2) %0A(0,0) (28,-46) (22,-34) (0,0) %0A(0,0) (3,-6) (-3,6) (1,-2) %0A(0,0) (-3,6) (-3,6) (-1,2) %0A(0,0) (-1,2) (-3,6) (-3,6) %0A(0,0) (-3,6) (-1,2) (-3,6) %0A(0,0) (-1,2) (3,-6) (3,-6) %0A(0,0) (-3,6) (1,-2) (3,-6) %0A(0,0) (-3,6) (-3,6) (1,-2) %0A(0,0) (-28,46) (22,-34) (0,0) %0A(0,0) (22,-34) (-28,46) (0,0) %0A(0,0) (-1,2) (3,-6) (-3,6) %0A(0,0) (-3,6) (1,-2) (-3,6) %0A(0,0) (-3,6) (-1,2) (3,-6) %0A(0,0) (-1,2) (-3,6) (3,-6) %0A(0,0) (3,-6) (1,-2) (-3,6) %0A(0,0) (1,-2) (-3,6) (3,-6) %0A(0,0) (0,0) (22,-34) (-28,46) %0A(0,0) (22,-34) (0,0) (28,-46) %0A(0,0) (22,-34) (0,0) (-28,46) %0A(0,0) (0,0) (-28,46) (-22,34) %0A(0,0) (-28,46) (0,0) (-22,34) %0A(0,0) (0,0) (22,-34) (28,-46) %0A%0A%0A%0A0%0A%0A%0A%0A50%0A4 0 1 2 3%0A4 4 5 6 7%0A4 8 9 10 11%0A4 1 12 13 2%0A4 14 15 16 17%0A4 18 19 20 21%0A4 4 22 19 23%0A4 20 15 24 21%0A4 25 26 27 14%0A3 25 13 12%0A4 5 4 23 9%0A3 28 29 30%0A3 10 31 32%0A4 33 34 28 35%0A4 3 36 37 0%0A3 38 39 33%0A4 13 17 40 2%0A3 40 7 6%0A3 41 24 27%0A4 36 5 9 8%0A3 22 20 19%0A4 34 42 29 28%0A4 9 23 31 10%0A4 36 3 6 5%0A4 11 43 35 44%0A4 44 35 28 30%0A4 26 25 12 42%0A4 17 13 25 14%0A4 45 39 38 46%0A4 34 33 39 47%0A4 15 20 22 16%0A4 45 21 24 41%0A4 17 16 7 40%0A3 36 8 37%0A4 43 11 10 32%0A4 38 43 32 46%0A4 44 37 8 11%0A4 46 18 21 45%0A4 37 44 30 0%0A4 15 14 27 24%0A4 26 47 41 27%0A4 19 18 31 23%0A4 22 4 7 16%0A4 1 0 30 29%0A4 12 1 29 42%0A4 43 38 33 35%0A4 3 2 40 6%0A4 18 46 32 31%0A4 39 45 41 47%0A4 47 26 42 34%0A%0A%0A%0A0%0A%0A%0A"; 1155 1156// src/worker/legacy/resources/com/vzome/core/parts/octahedral/green.vef 1157var green_default5 = "data:text/plain;
1157charset=utf-8,vZome VEF 6 field golden%0A scale (1,-1) %0A%0A9%0A(0,0) (22,-34) (0,0) (-28,46) %0A(0,0) (-3,6) (-1,2) (-3,6) %0A(0,0) (9,-2) (-1,2) (9,-2) %0A(0,0) (34,-42) (0,0) (-16,38) %0A(0,0) (6,4) (0,0) (6,4) %0A(0,0) (9,-2) (1,-2) (9,-2) %0A(0,0) (-28,46) (0,0) (22,-34) %0A(0,0) (-3,6) (1,-2) (-3,6) %0A(0,0) (-16,38) (0,0) (34,-42) %0A%0A%0A%0A0%0A%0A%0A%0A4%0A4 0 1 2 3%0A4 6 7 5 8%0A4 3 5 7 0%0A4 8 2 1 6%0A%0A%0A%0A5%0A 4 5 3 8 2%0A%0Atip 4%0A"; 1158 1159// src/worker/legacy/resources/com/vzome/core/parts/octahedral/lavender.vef 1160var lavender_default2 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (1,-1) %0A%0A18%0A(0,0) (17,-27) (1,1) (-11,19) %0A(0,0) (-11,19) (1,1) (17,-27) %0A(0,0) (-12,22) (4,2) (16,-24) %0A(0,0) (16,-24) (4,2) (-12,22) %0A(0,0) (-1,2) (-3,6) (-3,6) %0A(0,0) (-3,6) (-3,6) (-1,2) %0A(0,0) (-28,46) (22,-34) (0,0) %0A(0,0) (-15,25) (1,1) (13,-21) %0A(0,0) (-16,28) (4,2) (12,-18) %0A(0,0) (1,1) (-17,37) (29,-45) %0A(0,0) (12,-18) (4,2) (-16,28) %0A(0,0) (4,-5) (8,-3) (2,-1) %0A(0,0) (2,-1) (8,-3) (4,-5) %0A(0,0) (1,1) (5,3) (1,1) %0A(0,0) (29,-45) (-17,37) (1,1) %0A(0,0) (0,0) (22,-34) (-28,46) %0A(0,0) (13,-21) (1,1) (-15,25) %0A(0,0) (0,0) (0,0) (0,0) %0A%0A%0A%0A0%0A%0A%0A12%0A4 0 1 2 3%0A4 4 5 1 0%0A6 1 6 7 8 9 2%0A4 11 12 8 10%0A4 3 2 9 14%0A4 15 16 7 6%0A3 4 0 15%0A3 14 11 10%0A3 12 9 8%0A6 15 0 3 14 10 16%0A4 7 16 10 8%0A3 5 6 1%0A%0A%0A%0A9%0A 10 13 11 8 12 3 9 2 14%0A%0Atip 13%0A"; 1161 1162// src/worker/legacy/resources/com/vzome/core/parts/octahedral/maroon.vef 1163var maroon_default2 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (1,-1) %0A%0A17%0A(0,0) (33/2,-24) (3/2,5) (23/2,-22) %0A(0,0) (5,-5) (7,-3) (-3,1) %0A(0,0) (30,-45) (-18,37) (-2,-1) %0A(0,0) (29/2,-23) (3/2,0) (27/2,-23) %0A(0,0) (31/2,-22) (5/2,3) (25/2,-24) %0A(0,0) (27/2,-21) (5/2,-2) (29/2,-25) %0A(0,0) (3,-1) (7,-3) (-5,5) %0A(0,0) (-27/2,23) (3/2,0) (-29/2,23) %0A(0,0) (-28,46) (22,-34) (0,0) %0A(0,0) (-29/2,25) (5/2,-2) (-27/2,21) %0A(0,0) (0,0) (22,-34) (28,-46) %0A(0,0) (2,1) (-18,37) (-30,45) %0A(0,0) (-23/2,22) (3/2,5) (-33/2,24) %0A(0,0) (-25/2,24) (5/2,3) (-31/2,22) %0A(0,0) (2,1) (4,3) (-2,-1) %0A(0,0) (-3,6) (-3,6) (1,-2) %0A(0,0) (-1,2) (-3,6) (3,-6) %0A%0A%0A%0A0%0A%0A%0A%0A16%0A3 0 1 2%0A4 3 0 4 5%0A3 7 8 9%0A4 10 8 7 3%0A3 11 12 13%0A4 4 13 9 5%0A4 3 7 12 0%0A4 12 7 9 13%0A4 5 9 15 16%0A3 11 6 12%0A3 0 2 4%0A4 2 11 13 4%0A3 10 3 5%0A3 8 15 9%0A3 10 5 16%0A4 0 12 6 1%0A%0A%0A%0A9%0A 0 6 11 13 14 2 12 1 4%0A%0Atip 14%0A"; 1164 1165// src/worker/legacy/resources/com/vzome/core/parts/octahedral/olive.vef 1166var olive_default2 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (1,-1) %0A%0A17%0A(0,0) (3,0) (3,0) (-2,4) %0A(0,0) (28,-40) (-22,40) (-3,6) %0A(0,0) (25,-38) (-25,42) (4,-6) %0A(0,0) (0,2) (0,2) (5,-8) %0A(0,0) (0,2) (0,2) (3,-4) %0A(0,0) (-25,42) (25,-38) (4,-6) %0A(0,0) (-28,46) (22,-34) (0,0) %0A(0,0) (-3,6) (-3,6) (-1,2) %0A(0,0) (-22,40) (28,-40) (-3,6) %0A(0,0) (3,0) (3,0) (-4,8) %0A(0,0) (6,-4) (6,-4) (0,2) %0A(0,0) (-19,36) (31,-44) (1,0) %0A(0,0) (3,2) (3,2) (1,0) %0A(0,0) (6,-4) (6,-4) (2,-2) %0A(0,0) (31,-44) (-19,36) (1,0) %0A(0,0) (-3,6) (-3,6) (1,-2) %0A(0,0) (22,-34) (-28,46) (0,0) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 0 1 2 3%0A4 4 5 6 7%0A4 8 9 10 11%0A4 8 0 3 5%0A4 13 14 1 0%0A4 8 5 4 9%0A4 15 3 2 16%0A4 11 13 0 8%0A4 9 4 2 1%0A4 6 5 3 15%0A4 9 1 14 10%0A4 16 2 4 7%0A%0A%0A%0A9%0A 12 10 11 14 9 0 1 8 13%0A%0Atip 12%0A"; 1167 1168// src/worker/legacy/resources/com/vzome/core/parts/octahedral/purple.vef 1169var purple_default2 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (1,-1) %0A%0A17%0A(0,0) (-28,46) (1,1) (19,-36) %0A(0,0) (0,0) (4,-5) (-1,-1) %0A(0,0) (-4,6) (0,1) (-1,-1) %0A(0,0) (28,-46) (0,0) (-22,34) %0A(0,0) (0,0) (-28,46) (-22,34) %0A(0,0) (0,0) (1,1) (-3,-2) %0A(0,0) (28,-46) (1,1) (19,-36) %0A(0,0) (4,-6) (1,0) (-2,-1) %0A(0,0) (4,-6) (0,1) (-1,-1) %0A(0,0) (0,0) (-4,7) (-1,-1) %0A(0,0) (0,0) (-3,6) (-2,-1) %0A(0,0) (0,0) (29,-45) (19,-36) %0A(0,0) (-4,6) (1,0) (-2,-1) %0A(0,0) (-28,46) (0,0) (-22,34) %0A(0,0) (0,0) (28,-46) (-22,34) %0A(0,0) (0,0) (-27,47) (19,-36) %0A(0,0) (0,0) (5,-6) (-2,-1) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 1 2 3 4%0A4 7 8 9 10%0A4 6 11 10 12%0A4 8 1 4 13%0A4 2 9 14 3%0A4 7 10 11 0%0A4 8 7 16 1%0A4 16 12 2 1%0A4 15 16 7 0%0A4 15 6 12 16%0A4 8 13 14 9%0A4 2 12 10 9%0A%0A%0A%0A9%0A 0 5 6 12 11 15 16 10 7%0A%0At
1169ip 5%0A"; 1170 1171// src/worker/legacy/resources/com/vzome/core/parts/octahedral/red.vef 1172var red_default5 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (1,-1) %0A%0A17%0A(0,0) (-27,35) (-23,42) (0,0) %0A(0,0) (-2,-5) (2,2) (1,-2) %0A(0,0) (-3,2) (1,0) (1,-2) %0A(0,0) (-28,42) (-24,40) (0,0) %0A(0,0) (-8,3) (6,-4) (-1,2) %0A(0,0) (-2,-5) (2,2) (-1,2) %0A(0,0) (23,-45) (27,-38) (0,0) %0A(0,0) (17,-37) (31,-44) (0,0) %0A(0,0) (-3,2) (1,0) (-1,2) %0A(0,0) (22,-38) (26,-40) (0,0) %0A(0,0) (-8,3) (6,-4) (1,-2) %0A(0,0) (3,-6) (-3,6) (1,-2) %0A(0,0) (-22,34) (-28,46) (0,0) %0A(0,0) (-33,43) (-19,36) (0,0) %0A(0,0) (3,-6) (-3,6) (-1,2) %0A(0,0) (28,-46) (22,-34) (0,0) %0A(0,0) (-5,-3) (3,2) (0,0) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 0 1 2 3%0A4 4 5 6 7%0A4 8 9 6 5%0A4 3 2 11 12%0A4 13 10 1 0%0A4 4 13 0 5%0A4 3 8 5 0%0A4 1 6 9 2%0A4 8 14 15 9%0A4 10 7 6 1%0A4 3 12 14 8%0A4 2 9 15 11%0A%0A%0A%0A9%0A 10 0 13 6 7 4 16 5 1%0A%0Atip 16%0A"; 1173 1174// src/worker/legacy/resources/com/vzome/core/parts/octahedral/yellow.vef 1175var yellow_default4 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (1,-1) %0A%0A13%0A(0,0) (-7/3,17/3) (-1/3,5/3) (-4/3,11/3) %0A(0,0) (-3,6) (-1,2) (-3,6) %0A(0,0) (-3,6) (-3,6) (-1,2) %0A(0,0) (3,2) (3,2) (3,2) %0A(0,0) (13/3,-5/3) (10/3,1/3) (16/3,-11/3) %0A(0,0) (4,0) (6,-4) (6,-4) %0A(0,0) (10/3,1/3) (16/3,-11/3) (13/3,-5/3) %0A(0,0) (6,-4) (4,0) (6,-4) %0A(0,0) (-1/3,5/3) (-4/3,11/3) (-7/3,17/3) %0A(0,0) (16/3,-11/3) (13/3,-5/3) (10/3,1/3) %0A(0,0) (6,-4) (6,-4) (4,0) %0A(0,0) (-4/3,11/3) (-7/3,17/3) (-1/3,5/3) %0A(0,0) (-1,2) (-3,6) (-3,6) %0A%0A%0A%0A0%0A%0A%0A%0A15%0A3 0 1 2%0A3 4 5 6%0A3 1 0 8%0A3 7 4 9%0A4 8 0 6 9%0A3 10 6 5%0A3 11 2 12%0A4 6 0 11 4%0A3 10 7 9%0A3 0 2 11%0A3 1 8 12%0A3 8 11 12%0A3 7 5 4%0A3 10 9 6%0A4 9 4 11 8%0A%0A%0A%0A7%0A 3 7 4 9 10 6 5%0A%0Atip 3%0A"; 1176
1177// src/worker/legacy/resources/com/vzome/core/parts/octahedral/index.js 1178var shapes8 = { 1179 "blue": blue_default6, 1180 "brown": brown_default2, 1181 "connector": connector_default8, 1182 "green": green_default5, 1183 "lavender": lavender_default2, 1184 "maroon": maroon_default2, 1185 "olive": olive_default2, 1186 "purple": purple_default2, 1187 "red": red_default5, 1188 "yellow": yellow_default4 1189}; 1190var octahedral_default = shapes8; 1191 1192// src/worker/legacy/resources/com/vzome/core/parts/octahedralFast/blue.vef 1193var blue_default7 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (1,-1) %0A%0A11%0A(0,0) (0,12) (0,0) (4,-6) %0A(0,0) (0,12) (4,-6) (0,0) %0A(0,0) (6,-8) (4,-6) (0,0) %0A(0,0) (6,-8) (0,0) (4,-6) %0A(0,0) (2,10) (0,0) (0,0) %0A(0,0) (0,12) (0,0) (-4,6) %0A(0,0) (0,12) (-4,6) (0,0) %0A(0,0) (6,-8) (-4,6) (0,0) %0A(0,0) (4,-6) (0,0) (0,0) %0A(0,0) (6,-8) (0,0) (-4,6) %0A(0,0) (6,4) (0,0) (0,0) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 0 1 2 3%0A3 4 1 0%0A3 7 8 9%0A3 7 3 8%0A3 3 2 8%0A4 6 0 3 7%0A4 5 6 7 9%0A3 8 2 9%0A3 6 4 0%0A4 1 5 9 2%0A3 5 1 4%0A3 6 5 4%0A%0A%0A%0A6%0A 4 5 6 0 1 10%0A%0Atip 10%0A"; 1194 1195// src/worker/legacy/resources/com/vzome/core/parts/octahedralFast/connector.vef 1196var connector_default9 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (1,-1) %0A%0A6%0A(0,0) (0,0) (-4,6) (0,0) %0A(0,0) (-4,6) (0,0) (0,0) %0A(0,0) (0,0) (0,0) (-4,6) %0A(0,0) (4,-6) (0,0) (0,0) %0A(0,0) (0,0) (4,-6) (0,0) %0A(0,0) (0,0) (0,0) (4,-6) %0A%0A%0A%0A0%0A%0A%0A%0A8%0A3 0 1 2%0A3 3 0 2%0A3 4 1 5%0A3 3 4 5%0A3 3 5 0%0A3 5 1 0%0A3 2 1 4%0A3 3 2 4%0A%0A%0A%0A0%0A%0A%0A"; 1197 1198// src/worker/legacy/resources/com/vzome/core/parts/octahedralFast/green.vef 1199var green_default6 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (1,-1) %0A%0A12%0A(0,0) (6,4) (0,0) (6,4) %0A(0,0) (4,6) (0,0) (8,0) %0A(0,0) (8,0) (-4,6) (8,0) %0A(0,0) (8,1) (0,0) (8,1) %0A(0,0) (8,0) (0,0) (8,0) %0A(0,0) (8,0) (0,0) (4,6) %0A(0,0) (4,-5) (0,0) (0,1) %0A(0,0) (0,1) (-4,6) (0,1) %0A(0,0) (2,-3) (0,0) (2,-3) %0A(0,0) (0,1) (4,-6) (0,1) %0A(0,0) (8,0) (4,-6) (8,0) %0A(0,0) (0,1) (0,0) (4,-5) %0A%0A%0A%0A6%0A0 4%0A4 5%0A4 2%0A3 0%0A4 10%0A4 1%0A%0A%0A%0A12%0A3 0 1 2%0A3 0 2 5%0A4 6 5 2 7%0A3 6 8 9%0A4 10 9 11 1%0A3 8 7 11%0A4 2 1 11 7%0A3 0 10 1%0A3 8 6 7%0A3 8 11 9%0A4 6 9 10 5%0A3 10 0 5%0A%0A%0A%0A7%0A 3 2 4 1 10 5 0%0A%0Atip 3%0A"; 1200 1201// src/worker/legacy/resources/com/vzome/core/parts/octahedralFast/yellow.vef 1202var yellow_default5 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A9%0A(0,0) (-1,-1) (1,1) (-1,-1) %0A(0,0) (1,-2) (9,-14) (-19,30) %0A(0,0) (3,-5) (-3,5) (3,-5) %0A(0,0) (-19,30) (-1,2) (-9,14) %0A(0,0) (8,-15) (2,-1) (18,-31) %0A(0,0) (-2,1) (-18,31) (8,-15) %0A(0,0) (-9,14) (19,-30) (1,-2) %0A(0,0) (-4,4) (4,-4) (-4,4) %0A(0,0) (18,-31) (-8,15) (-2,1) %0A%0A%0A%0A0%0A%0A%0A%0A9%0A3 1 2 3%0A4 4 5 3 6%0A3 2 1 6%0A3 7 5 4%0A4 5 8 1 3%0A3 2 6 3%0A4 6 1 8 4%0A3 7 4 8%0A3 7 8 5%0A%0A%0A%0A5%0A 0 8 4 5 7%0A%0Atip 0%0A"; 1203
1204// src/worker/legacy/resources/com/vzome/core/parts/octahedralFast/index.js 1205var shapes9 = { 1206 "blue": blue_default7, 1207 "connector": connector_default9, 1208 "green": green_default6, 1209 "yellow": yellow_default5 1210}; 1211var octahedralFast_default = shapes9; 1212 1213// src/worker/legacy/resources/com/vzome/core/parts/octahedralRealistic/blue.vef 1214var blue_default8 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (1,-1) %0A%0A9%0A(0,0) (-16,38) (0,0) (-28,46) %0A(0,0) (-16,38) (-28,46) (0,0) %0A(0,0) (22,-34) (-28,46) (0,0) %0A(0,0) (22,-34) (0,0) (-28,46) %0A(0,0) (-16,38) (0,0) (28,-46) %0A(0,0) (-16,38) (28,-46) (0,0) %0A(0,0) (6,4) (0,0) (0,0) %0A(0,0) (22,-34) (28,-46) (0,0) %0A(0,0) (22,-34) (0,0) (28,-46) %0A%0A%0A%0A0%0A%0A%0A%0A4%0A4 0 1 2 3%0A4 7 8 4 5%0A4 4 8 2 1%0A4 5 0 3 7%0A%0A%0A%0A5%0A 4 5 6 0 1%0A%0Atip 6%0A"; 1215 1216// src/worker/legacy/resources/com/vzome/core/parts/octahedralRealistic/brown.vef 1217var brown_default3 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (1,-1) %0A%0A17%0A(0,0) (-3,4) (5,-6) (-1,0) %0A(0,0) (0,0) (22,-34) (28,-46) %0A(0,0) (1,-2) (-3,6) (3,-6) %0A(0,0) (1,-5) (1,4) (-1,-1) %0A(0,0) (1,-5) (-1,8) (-1,-1) %0A(0,0) (-2,-1) (-18,36) (-30,45) %0A(0,0) (-3,4) (3,-2) (-1,0) %0A(0,0) (-1,-1) (1,4) (1,-5) %0A(0,0) (-1,0) (5,-6) (-3,4) %0A(0,0) (-1,-1) (-1,8) (1,-5) %0A(0,0) (-2,-1) (4,2) (-2,-1) %0A(0,0) (-30,45) (-18,36) (-2,-1) %0A(0,0) (-1,0) (3,-2) (-3,4) %0A(0,0) (-5,5) (7,-4) (-3,1) %0A(0,0) (-3,1) (7,-4) (-5,5) %0A(0,0) (28,-46) (22,-34) (0,0) %0A(0,0) (3,-6) (-3,6) (1,-2) %0A%0A%0A%0A0%0A%0A%0A%0A16%0A3 0 1 2%0A3 3 4 5%0A3 0 6 1%0A4 7 0 8 3%0A4 9 6 0 7%0A3 11 9 7%0A4 4 3 8 12%0A4 3 5 11 7%0A3 5 4 14%0A4 12 15 1 6%0A3 11 13 9%0A3 15 12 8%0A3 16 15 8%0A4 9 13 14 4%0A4 4 12 6 9%0A4 8 0 2 16%0A%0A%0A%0A9%0A 10 11 7 13 3 4 9 14 5%0A%0Atip 10%0A"; 1218 1219// src/worker/legacy/resources/com/vzome/core/parts/octahedralRealistic/connector.vef 1220var connector_default10 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (1,-1) %0A%0A480%0A(0,0) (-9/5,16/5) (-3,6) (-3,6) %0A(0,0) (2,-3) (-84,137) (-84,137) %0A(0,0) (0,0) (-44,72) (-124,202) %0A(0,0) (0,0) (-44,72) (38,-60) %0A(0,0) (1303/5,-2109/5) (-695,1123) (2043/5,-3309/5) %0A(0,0) (0,0) (-22,34) (28,-46) %0A(0,0) (28,-46) (-22,34) (0,0) %0A(0,0) (2043/5,-3309/5) (-695,1123) (1303/5,-2109/5) %0A(0,0) (22,-34) (0,0) (38,-62) %0A(0,0) (106,-170) (0,0) (-46,74) %0A(0,0) (106,-170) (-46,74) (0,0) %0A(0,0) (22,-34) (38,-62) (0,0) %0A(0,0) (46,-74) (0,0) (34,-56) %0A(0,0) (0,0) (-46,74) (34,-56) %0A(0,0) (741/5,-1198/5) (-971/5,1568/5) (365,-592) %0A(0,0) (971/5,-1568/5) (-741/5,1198/5) (365,-592) %0A(0,0) (-3,6) (-3,6) (9/5,-16/5) %0A(0,0) (-84,137) (-84,137) (-2,3) %0A(0,0) (-124,202) (-44,72) (0,0) %0A(0,0) (38,-60) (-44,72) (0,0) %0A(0,0) (-6,9) (2,-3) (6,-9) %0A(0,0) (-46,74) (0,0) (-34,56) %0A(0,0) (44,-72) (0,0) (-124,202) %0A(0,0) (84,-137) (2,-3) (-84,137) %0A(0,0) (0,0) (34,-56) (-46,74) %0A(0,0) (46,-74) (34,-56) (0,0) %0A(0,0) (971/5,-1568/5) (365,-592) (-741/5,1198/5) %0A(0,0) (741/5,-1198/5) (365,-592) (-971/5,1568/5) %0A(0,0) (-6,9) (6,-9) (-2,3) %0A(0,0) (-6,9) (2,-3) (-6,9) %0A(0,0) (0,-1) (-4,7) (0,-1) %0A(0,0) (0,-1) (0,1) (4,-7) %0A(0,0) (-38,60) (44,-72) (0,0) %0A(0,0) (124,-202) (44,-72) (0,0) %0A(0,0) (84,-137) (84,-137) (2,-3) %0A(0,0) (3,-6) (3,-6) (-9/5,16/5) %0A(0,0) (44,-72) (38,-60) (0,0) %0A(0,0) (28,-46) (22,-34) (0,0) %0A(0,0) (3,-6) (-3,6) (1,-2) %0A(0,0) (3,-6) (-3,6) (9/5,-16/5) %0A(0,0) (-38,60) (0,0) (-44,72) %0A(0,0) (-22,34) (0,0) (-28,46) %0A(0,0) (3,-6) (1,-2) (-3,6) %0A(0,0) (3,-6) (9/5,-16/5) (-3,6) %0A(0,0) (38,-60) (0,0) (44,-72) %0A(0,0) (22,-34) (0,0) (28,-46) %0A(0,0) (-3,6) (1,-2) (3,-6) %0A(0,0) (-3,6) (9/5,-16/5) (3,-6) %0A(0,0) (-1303/5,2109/5) (-2043/5,3309/5) (-695,1123) %0A(0,0) (741/5,-1198/5) (971/5,-1568/5) (365,-592) %0A(0,0) (971/5,-1568/5) (741/5,-1198/5) (365,-592) %0A(0,0) (-2043/5,3309/5) (-1303/5,2109/5) (-695,1123) %0A(0,0) (-46,74) (0,0) (34,-56) %0A(0,0) (-6,9) (-2,3) (-6,9) %0A(0,0) (-771/5,1243/5) (-751/5,1213/5) (325,-527) %0A(0,0) (-971/5,1568/5) (-741/5,1198/5) (365,-592) %0A(0,0) (6,-9) (2,-3)
1220(6,-9) %0A(0,0) (2,-3) (6,-9) (6,-9) %0A(0,0) (-4,7) (0,1) (0,1) %0A(0,0) (0,1) (-4,7) (0,1) %0A(0,0) (1333/5,-2159/5) (-565,913) (-1393/5,2259/5) %0A(0,0) (1,-2) (3,-6) (-3,6) %0A(0,0) (3,-6) (3,-6) (-1,2) %0A(0,0) (1393/5,-2259/5) (-565,913) (-1333/5,2159/5) %0A(0,0) (34,-56) (46,-74) (0,0) %0A(0,0) (-6,9) (6,-9) (2,-3) %0A(0,0) (325,-527) (771/5,-1243/5) (751/5,-1213/5) %0A(0,0) (365,-592) (971/5,-1568/5) (741/5,-1198/5) %0A(0,0) (38,-62) (0,0) (22,-34) %0A(0,0) (28,-46) (0,0) (22,-34) %0A(0,0) (0,0) (28,-46) (22,-34) %0A(0,0) (0,0) (38,-62) (22,-34) %0A(0,0) (3,-6) (3,-6) (9/5,-16/5) %0A(0,0) (3,-6) (3,-6) (1,-2) %0A(0,0) (44,-72) (-38,60) (0,0) %0A(0,0) (565,-913) (-1393/5,2259/5) (-1333/5,2159/5) %0A(0,0) (-3,6) (-3,6) (-1,2) %0A(0,0) (-3,6) (-1,2) (-3,6) %0A(0,0) (565,-913) (-1333/5,2159/5) (-1393/5,2259/5) %0A(0,0) (-46,74) (0,0) (106,-170) %0A(0,0) (0,0) (46,-74) (106,-170) %0A(0,0) (0,0) (-38,62) (22,-34) %0A(0,0) (-22,34) (28,-46) (0,0) %0A(0,0) (-5,7) (5,-7) (17,-27) %0A(0,0) (3,-6) (-3,6) (-1,2) %0A(0,0) (3,-6) (-1,2) (-3,6) %0A(0,0) (-5,7) (17,-27) (5,-7) %0A(0,0) (0,0) (46,-74) (-34,56) %0A(0,0) (46,-74) (0,0) (-34,56) %0A(0,0) (46,-74) (0,0) (106,-170) %0A(0,0) (-741/5,1198/5) (971/5,-1568/5) (-365,592) %0A(0,0) (-751/5,1213/5) (771/5,-1243/5) (-325,527) %0A(0,0) (-2,3) (6,-9) (6,-9) %0A(0,0) (0,0) (44,-72) (38,-60) %0A(0,0) (9/5,-16/5) (3,-6) (-3,6) %0A(0,0) (-751/5,1213/5) (-325,527) (771/5,-1243/5) %0A(0,0) (-771/5,1243/5) (-325,527) (751/5,-1213/5) %0A(0,0) (-28,46) (-22,34) (0,0) %0A(0,0) (-2043/5,3309/5) (-695,1123) (1303/5,-2109/5) %0A(0,0) (-1393/5,2259/5) (-565,913) (1333/5,-2159/5) %0A(0,0) (-3,6) (3,-6) (1,-2) %0A(0,0) (2043/5,-3309/5) (695,-1123) (-1303/5,2109/5) %0A(0,0) (1393/5,-2259/5) (565,-913) (-1333/5,2159/5) %0A(0,0) (46,-74) (-34,56) (0,0) %0A(0,0) (0,0) (-34,56) (-46,74) %0A(0,0) (741/5,-1198/5) (-365,592) (-971/5,1568/5) %0A(0,0) (971/5,-1568/5) (-365,592) (-741/5,1198/5) %0A(0,0) (2043/5,-3309/5) (-1303/5,2109/5) (-695,1123) %0A(0,0) (-971/5,1568/5) (741/5,-1198/5) (365,-592) %0A(0,0) (-741/5,1198/5) (971/5,-1568/5) (365,-592) %0A(0,0) (1303/5,-2109/5) (-2043/5,3309/5) (-695,1123) %0A(0,0) (-46,74) (34,-56) (0,0) %0A(0,0) (-6,9) (-6,9) (-2,3) %0A(0,0) (84,-137) (84,-137) (-2,3) %0A(0,0) (44,-72) (124,-202) (0,0) %0A(0,0) (-771/5,1243/5) (325,-527) (751/5,-1213/5) %0A(0,0) (-6,9) (-6,9) (2,-3) %0A(0,0) (-2,3) (-6,9) (6,-9) %0A(0,0) (-751/5,1213/5) (325,-527) (771/5,-1243/5) %0A(0,0) (-695,1123) (-2043/5,3309/5) (1303/5,-2109/5) %0A(0,0) (-22,34) (-28,46) (0,0) %0A(0,0) (-565,913) (-1393/5,2259/5) (1333/5,-2159/5) %0A(0,0) (9/5,-16/5) (-3,6) (3,-6) %0A(0,0) (-2,3) (-84,137) (84,-137) %0A(0,0) (0,0) (-44,72) (124,-202) %0A(0,0) (0,0) (-44,72) (-38,60) %0A(0,0) (2043/5,-3309/5) (-695,1123) (-1303/5,2109/5) %0A(0,0) (0,0) (-22,34) (-28,46) %0A(0,0) (1303/5,-2109/5) (-695,1123) (-2043/5,3309/5) %0A(0,0) (-34,56) (0,0) (-46,74) %0A(0,0) (-34,56) (-46,74) (0,0) %0A(0,0) (-44,72) (0,0) (-38,60) %0A(0,0) (-28,46) (0,0) (-22,34) %0A(0,0) (-3,6) (-1,2) (3,-6) %0A(0,0) (-3,6) (-9/5,16/5) (3,-6) %0A(0,0) (2,-3) (-6,9) (-6,9) %0A(0,0) (751/5,-1213/5) (-771/5,1243/5) (325,-527) %0A(0,0) (-34,56) (46,-74) (0,0) %0A(0,0) (-365,592) (971/5,-1568/5) (-741/5,1198/5) %0A(0,0) (-365,592) (741/5,-1198/5) (-971/5,1568/5) %0A(0,0) (0,0) (-46,74) (-34,56) %0A(0,0) (2,-3) (-6,9) (6,-9) %0A(0,0) (2,-3) (84,-137) (-84,137) %0A(0,0) (0,0) (44,-72) (-124,202) %0A(0,0) (5,-7) (-5,7) (-17,27) %0A(0,0) (-1,2) (3,-6) (3,-6) %0A(0,0) (17,-27) (-5,7) (-5,7) %0A(0,0) (971/5,-1568/5) (365,-592) (741/5,-1198/5) %0A(0,0) (771/5,-1243/5) (325,-527) (751/5,-1213/5) %0A(0,0) (6,-9) (-6,9) (2,-3) %0A(0,0) (-325,527) (751/5,-1213/5) (771/5,-1243/5) %0A(0,0) (6,-9) (6,-9) (2,-3) %0A(0,0) (-325,527) (771/5,-1243/5) (751/5,-1213/5) %0A(0,0) (-741/5,1198/5) (365,-592) (-971/5,1568/5) %0A(0,0) (-971/5,1568/5) (365,-592) (-741/5,1198/5) %0A(0,0) (0,0) (38,-60) (44,-72) %0A(0,0) (0,0) (22,-34) (28,-46) %0A(0,0) (-1,2) (-3,6) (3,-6) %0A(0,0) (-9/5,16/5) (-3,6) (3,-6) %0A(0,0) (34,-56) (-46,74) (0,0) %0A(0,0) (771/5,-1243/5) (-325,527) (-751/5,1213/5) %0A(0,0) (-1393/5,2259/5) (565,-913) (1333/5,-2159/5) %0A(0,0) (-1333/5,2159/5) (565,-913) (1393/5,-2259/5) %0A(0,0) (751/5,-1213/5) (-325,527) (-771/5,1243/5) %0A(0,0) (-1333/5,2159/5) (1393/5,-2259/5) (-565,913) %0A(0,0) (-1303/5,2109/5) (2043/5,-3309/5) (-695,1123) %0A(0,0) (-22,34) (0,0) (-38,62) %0A(0,0) (-22,34) (-38,62) (0,0) %0A(0,0) (-771/5,1243/5) (751/5,-1213/5) (325,-527) %0A(0,0) (1393/5,-2259/5) (-1333/5,2159/5) (-565,913) %0A(0,0) (1333/5,-2159/5) (-1393/5,2259/5) (-565,913) %0A(0,0) (-751/5,1213/5) (771/5,-1243/5) (325,-527) %0A(0,0) (-2,3) (6,-9) (-6,9) %0A(0,0) (0,0) (-124,202) (44,-72) %0A(0,0) (565,-913) (-1333/5,2159/5) (1393/5,-2259/5) %0A(0,0) (-325,527) (751/5,-1213/5) (-771/5,1243/5) %0A(0,0) (695,-1123) (-1303/5,2109/5) (2043/5,-3309/5) %0A(0,0) (-2,3) (-84,137) (-84,137) %0A(0,0) (9/5,-16/5) (-3,6) (-3,6) %0A(0,0) (0,1) (0,-1) (4,-7) %0A(0,0) (0,1) (4,-7) (0,-1) %0A(0,0) (5,-7) (-17,27) (-5,7) %0A(0,0) (-741/5,1198/5) (365,-592) (971/5,-1568/5) %0A(0,0) (0,0) (34,-56) (46,-74) %0A(0,0) (-46,74) (-34,56) (0,0) %0A(0,0) (0,0) (-34,56) (46,-74) %0A(0,0) (-741/5,1198/5) (-365,592) (971/5,-1568/5) %0A(0,0) (-971/5,1568/5) (-365,592) (741/5,-1198/5) %0A(0,0) (106,-170) (0,0) (46,-74) %0A(0,0) (22,-34) (0,0) (-38,62) %0A(0,0) (-9/5,16/5) (3,-6) (3,-6) %0A(0,0) (2,-3)
1220(84,-137) (84,-137) %0A(0,0) (0,0) (44,-72) (124,-202) %0A(0,0) (0,0) (44,-72) (-38,60) %0A(0,0) (0,0) (22,-34) (-38,62) %0A(0,0) (0,0) (22,-34) (-28,46) %0A(0,0) (-28,46) (22,-34) (0,0) %0A(0,0) (-38,62) (22,-34) (0,0) %0A(0,0) (-1333/5,2159/5) (-565,913) (1393/5,-2259/5) %0A(0,0) (0,0) (-38,62) (-22,34) %0A(0,0) (0,0) (-28,46) (-22,34) %0A(0,0) (-38,62) (0,0) (-22,34) %0A(0,0) (771/5,-1243/5) (325,-527) (-751/5,1213/5) %0A(0,0) (84,-137) (-2,3) (-84,137) %0A(0,0) (124,-202) (0,0) (-44,72) %0A(0,0) (-771/5,1243/5) (325,-527) (-751/5,1213/5) %0A(0,0) (-3,6) (-9/5,16/5) (-3,6) %0A(0,0) (-84,137) (2,-3) (-84,137) %0A(0,0) (-124,202) (0,0) (-44,72) %0A(0,0) (38,-60) (0,0) (-44,72) %0A(0,0) (0,-1) (0,1) (-4,7) %0A(0,0) (4,-7) (0,1) (0,1) %0A(0,0) (-17,27) (5,-7) (5,-7) %0A(0,0) (771/5,-1243/5) (-325,527) (751/5,-1213/5) %0A(0,0) (971/5,-1568/5) (-365,592) (741/5,-1198/5) %0A(0,0) (22,-34) (-28,46) (0,0) %0A(0,0) (-3,6) (-3,6) (1,-2) %0A(0,0) (-695,1123) (2043/5,-3309/5) (1303/5,-2109/5) %0A(0,0) (-22,34) (0,0) (28,-46) %0A(0,0) (-695,1123) (1303/5,-2109/5) (2043/5,-3309/5) %0A(0,0) (-28,46) (0,0) (22,-34) %0A(0,0) (-38,62) (0,0) (22,-34) %0A(0,0) (-34,56) (0,0) (46,-74) %0A(0,0) (-365,592) (741/5,-1198/5) (971/5,-1568/5) %0A(0,0) (-365,592) (971/5,-1568/5) (741/5,-1198/5) %0A(0,0) (365,-592) (971/5,-1568/5) (-741/5,1198/5) %0A(0,0) (325,-527) (771/5,-1243/5) (-751/5,1213/5) %0A(0,0) (-1303/5,2109/5) (2043/5,-3309/5) (695,-1123) %0A(0,0) (-1,2) (3,-6) (-3,6) %0A(0,0) (-1333/5,2159/5) (1393/5,-2259/5) (565,-913) %0A(0,0) (-2043/5,3309/5) (695,-1123) (1303/5,-2109/5) %0A(0,0) (971/5,-1568/5) (-741/5,1198/5) (-365,592) %0A(0,0) (771/5,-1243/5) (-751/5,1213/5) (-325,527) %0A(0,0) (-1393/5,2259/5) (1333/5,-2159/5) (565,-913) %0A(0,0) (-2043/5,3309/5) (1303/5,-2109/5) (695,-1123) %0A(0,0) (-1393/5,2259/5) (1333/5,-2159/5) (-565,913) %0A(0,0) (771/5,-1243/5) (-751/5,1213/5) (325,-527) %0A(0,0) (-2043/5,3309/5) (1303/5,-2109/5) (-695,1123) %0A(0,0) (325,-527) (751/5,-1213/5) (771/5,-1243/5) %0A(0,0) (751/5,-1213/5) (325,-527) (771/5,-1243/5) %0A(0,0) (5,-7) (17,-27) (5,-7) %0A(0,0) (5,-7) (5,-7) (17,-27) %0A(0,0) (-695,1123) (2043/5,-3309/5) (-1303/5,2109/5) %0A(0,0) (365,-592) (-971/5,1568/5) (741/5,-1198/5) %0A(0,0) (365,-592) (-741/5,1198/5) (971/5,-1568/5) %0A(0,0) (-695,1123) (1303/5,-2109/5) (-2043/5,3309/5) %0A(0,0) (2043/5,-3309/5) (-1303/5,2109/5) (695,-1123) %0A(0,0) (1393/5,-2259/5) (-1333/5,2159/5) (565,-913) %0A(0,0) (-971/5,1568/5) (365,-592) (741/5,-1198/5) %0A(0,0) (6,-9) (2,-3) (-6,9) %0A(0,0) (771/5,-1243/5) (751/5,-1213/5) (325,-527) %0A(0,0) (0,0) (106,-170) (46,-74) %0A(0,0) (-46,74) (106,-170) (0,0) %0A(0,0) (38,-62) (22,-34) (0,0) %0A(0,0) (0,0) (-124,202) (-44,72) %0A(0,0) (34,-56) (0,0) (-46,74) %0A(0,0) (-106,170) (0,0) (-46,74) %0A(0,0) (-106,170) (-46,74) (0,0) %0A(0,0) (3,-6) (-1,2) (3,-6) %0A(0,0) (1,-2) (-3,6) (3,-6) %0A(0,0) (2,-3) (-84,137) (84,-137) %0A(0,0) (28,-46) (0,0) (-22,34) %0A(0,0) (2043/5,-3309/5) (1303/5,-2109/5) (-695,1123) %0A(0,0) (1393/5,-2259/5) (1333/5,-2159/5) (-565,913) %0A(0,0) (3,-6) (1,-2) (3,-6) %0A(0,0) (695,-1123) (1303/5,-2109/5) (-2043/5,3309/5) %0A(0,0) (-365,592) (-741/5,1198/5) (971/5,-1568/5) %0A(0,0) (-365,592) (-971/5,1568/5) (741/5,-1198/5) %0A(0,0) (695,-1123) (2043/5,-3309/5) (-1303/5,2109/5) %0A(0,0) (38,-60) (44,-72) (0,0) %0A(0,0) (-124,202) (44,-72) (0,0) %0A(0,0) (-84,137) (84,-137) (-2,3) %0A(0,0) (-3,6) (3,-6) (9/5,-16/5) %0A(0,0) (22,-34) (-38,62) (0,0) %0A(0,0) (-1393/5,2259/5) (-565,913) (-1333/5,2159/5) %0A(0,0) (-2043/5,3309/5) (-695,1123) (-1303/5,2109/5) %0A(0,0) (6,-9) (-2,3) (-6,9) %0A(0,0) (-124,202) (0,0) (44,-72) %0A(0,0) (-84,137) (-2,3) (84,-137) %0A(0,0) (5,-7) (-5,7) (17,-27) %0A(0,0) (0,1) (0,-1) (-4,7) %0A(0,0) (-4,7) (0,-1) (0,1) %0A(0,0) (17,-27) (-5,7) (5,-7) %0A(0,0) (-741/5,1198/5) (-971/5,1568/5) (365,-592) %0A(0,0) (1303/5,-2109/5) (695,-1123) (-2043/5,3309/5) %0A(0,0) (44,-72) (0,0) (-38,60) %0A(0,0) (3,-6) (9/5,-16/5) (3,-6) %0A(0,0) (365,-592) (-741/5,1198/5) (-971/5,1568/5) %0A(0,0) (325,-527) (-751/5,1213/5) (-771/5,1243/5) %0A(0,0) (-695,1123) (-1303/5,2109/5) (2043/5,-3309/5) %0A(0,0) (-2,3) (-6,9) (-6,9) %0A(0,0) (0,-1) (4,-7) (0,-1) %0A(0,0) (4,-7) (0,-1) (0,-1) %0A(0,0) (3,-6) (-9/5,16/5) (-3,6) %0A(0,0) (-44,72) (0,0) (38,-60) %0A(0,0) (-3,6) (1,-2) (-3,6) %0A(0,0) (-3,6) (9/5,-16/5) (-3,6) %0A(0,0) (0,0) (28,-46) (-22,34) %0A(0,0) (1303/5,-2109/5) (2043/5,-3309/5) (-695,1123) %0A(0,0) (-565,913) (-1393/5,2259/5) (-1333/5,2159/5) %0A(0,0) (-695,1123) (-2043/5,3309/5) (-1303/5,2109/5) %0A(0,0) (9/5,-16/5) (3,-6) (3,-6) %0A(0,0) (-2,3) (84,-137) (84,-137) %0A(0,0) (0,0) (124,-202) (44,-72) %0A(0,0) (0,0) (-38,60) (44,-72) %0A(0,0) (2043/5,-3309/5) (1303/5,-2109/5) (695,-1123) %0A(0,0) (-971/5,1568/5) (-741/5,1198/5) (-365,592) %0A(0,0) (-741/5,1198/5) (-971/5,1568/5) (-365,592) %0A(0,0) (1303/5,-2109/5) (2043/5,-3309/5) (695,-1123) %0A(0,0) (-565,913) (1393/5,-2259/5) (-1333/5,2159/5) %0A(0,0) (-565,913) (1333/5,-2159/5) (-1393/5,2259/5) %0A(0,0) (-751/5,1213/5) (-771/5,1243/5) (-325,527) %0A(0,0) (-6,9) (-2,3) (6,-9) %0A(0,0) (-771/5,1243/5) (-751/5,1213/5) (-325,527) %0A(0,0) (-1393/5,2259/5) (-1333/5,2159/5) (-565,913) %0A(0,0) (0,1) (0,1) (-4,7) %0A(0,0) (0,-1) (-4,7) (0,1) %0A(0,0) (-971/5,1568/5) (741/5,-1198/5) (-365,592) %0A(0,0) (-771/5,1243/5) (751/5,-1213/5) (-325,527) %0A(0,0) (0,1) (4,-7) (0,1) %0A(0,0) (5,-7) (-17,27) (5,-7) %0A(0,0) (751/5,-1213/5) (-771/5,1243/5) (-325,527) %0A(0,0) (1,-2) (3,-6) (3,-6) %0A(0,0) (1333/5,-2159/5) (1393/5,-2259/5) (-565,913) %0A(0,0) (741/5,-1198/5) (-971/5,1568/5) (-365,592) %0A(0,0) (1393/5,-2259/5) (-565,913) (1333/5,-2159/5) %0A(0,0) (1333/5,-2159/5) (-565,913) (1393/5,-2259/5) %0A(0,0) (5,-7) (5,-7) (-17,27) %0A(0,0) (5,-7) (17,-27) (-5,7) %0A(0,0) (695,-1123) (-1303/5,2109/5) (-2043/5,3309/5) %0A(0,0) (741/5,-1198/5) (365,-592) (971/5,-1568/5) %0A(0,0) (-1303/5,2109/5) (-695,1123) (-2043/5,3309/5) %0A(0,0) (0,0) (-22,34) (38,-62) %0A(0,0) (0,0) (-106,170) (-46,74) %0A(0,0) (-46,74) (-106,170) (0,0) %0A(0,0) (38,-62) (-22,34) (0,0) %0A(0,0) (0,0) (-46,74) (106,-170) %0A(0,0) (-38,62) (-22,34) (0,0) %0A(0,0) (0,0) (-22,34) (-38,62) %0A(0,0) (-3,6) (-3,6) (-9/5,16/5) %0A(0,0) (-84,137) (-84,137) (2,-3) %0A(0,0) (-44,72) (-124,202) (0,0) %0A(0,0) (-44,72) (38,-60) (0,0) %0A(0,0) (46,-74) (-106,170) (0,0) %0A(0,0) (365,-592) (741/5,-1198/5) (971/5,-1568/5) %0A(0,0) (34,-56) (0,0) (46,-74) %0A(0,0) (-1333/5,2159/5) (-565,913) (-1393/5,2259/5) %0A(0,0) (0,0) (-28,46) (22,-34) %0A(0,0) (-3,6) (3,-6) (-1,2) %0A(0,0) (3,-6) (-9/5,16/5) (3,-6) %0A(0,0) (84,-137) (2,-3)
1220(84,-137) %0A(0,0) (124,-202) (0,0) (44,-72) %0A(0,0) (-38,60) (0,0) (44,-72) %0A(0,0) (0,0) (46,-74) (34,-56) %0A(0,0) (-5,7) (-5,7) (-17,27) %0A(0,0) (0,-1) (0,-1) (4,-7) %0A(0,0) (-17,27) (-5,7) (-5,7) %0A(0,0) (1333/5,-2159/5) (-1393/5,2259/5) (565,-913) %0A(0,0) (1303/5,-2109/5) (-2043/5,3309/5) (695,-1123) %0A(0,0) (-5,7) (-17,27) (-5,7) %0A(0,0) (365,-592) (741/5,-1198/5) (-971/5,1568/5) %0A(0,0) (0,0) (46,-74) (-106,170) %0A(0,0) (-46,74) (0,0) (-106,170) %0A(0,0) (38,-62) (0,0) (-22,34) %0A(0,0) (-1303/5,2109/5) (695,-1123) (2043/5,-3309/5) %0A(0,0) (-325,527) (-751/5,1213/5) (771/5,-1243/5) %0A(0,0) (565,-913) (1333/5,-2159/5) (-1393/5,2259/5) %0A(0,0) (565,-913) (1393/5,-2259/5) (-1333/5,2159/5) %0A(0,0) (-325,527) (-771/5,1243/5) (751/5,-1213/5) %0A(0,0) (0,0) (38,-60) (-44,72) %0A(0,0) (-9/5,16/5) (3,-6) (-3,6) %0A(0,0) (46,-74) (0,0) (-106,170) %0A(0,0) (0,0) (-46,74) (-106,170) %0A(0,0) (1393/5,-2259/5) (1333/5,-2159/5) (565,-913) %0A(0,0) (1333/5,-2159/5) (1393/5,-2259/5) (565,-913) %0A(0,0) (0,0) (-106,170) (46,-74) %0A(0,0) (0,0) (22,-34) (38,-62) %0A(0,0) (6,-9) (-2,3) (6,-9) %0A(0,0) (-84,137) (-2,3) (-84,137) %0A(0,0) (-84,137) (84,-137) (2,-3) %0A(0,0) (-44,72) (124,-202) (0,0) %0A(0,0) (-4,7) (0,-1) (0,-1) %0A(0,0) (365,-592) (-971/5,1568/5) (-741/5,1198/5) %0A(0,0) (695,-1123) (2043/5,-3309/5) (1303/5,-2109/5) %0A(0,0) (22,-34) (28,-46) (0,0) %0A(0,0) (565,-913) (1393/5,-2259/5) (1333/5,-2159/5) %0A(0,0) (-38,60) (-44,72) (0,0) %0A(0,0) (3,-6) (-3,6) (-9/5,16/5) %0A(0,0) (-751/5,1213/5) (-771/5,1243/5) (325,-527) %0A(0,0) (-44,72) (-38,60) (0,0) %0A(0,0) (-3,6) (3,-6) (-9/5,16/5) %0A(0,0) (695,-1123) (1303/5,-2109/5) (2043/5,-3309/5) %0A(0,0) (-771/5,1243/5) (-325,527) (-751/5,1213/5) %0A(0,0) (-751/5,1213/5) (-325,527) (-771/5,1243/5) %0A(0,0) (2,-3) (6,-9) (-6,9) %0A(0,0) (751/5,-1213/5) (771/5,-1243/5) (325,-527) %0A(0,0) (84,-137) (-2,3) (84,-137) %0A(0,0) (741/5,-1198/5) (-365,592) (971/5,-1568/5) %0A(0,0) (751/5,-1213/5) (-325,527) (771/5,-1243/5) %0A(0,0) (17,-27) (5,-7) (5,-7) %0A(0,0) (-1303/5,2109/5) (-695,1123) (2043/5,-3309/5) %0A(0,0) (1,-2) (-3,6) (-3,6) %0A(0,0) (-17,27) (-5,7) (5,-7) %0A(0,0) (-5,7) (-17,27) (5,-7) %0A(0,0) (-751/5,1213/5) (325,-527) (-771/5,1243/5) %0A(0,0) (0,0) (124,-202) (-44,72) %0A(0,0) (0,0) (-38,60) (-44,72) %0A(0,0) (22,-34) (0,0) (-28,46) %0A(0,0) (17,-27) (5,-7) (-5,7) %0A(0,0) (2043/5,-3309/5) (695,-1123) (1303/5,-2109/5) %0A(0,0) (1303/5,-2109/5) (695,-1123) (2043/5,-3309/5) %0A(0,0) (-44,72) (0,0) (-124,202) %0A(0,0) (325,-527) (-771/5,1243/5) (751/5,-1213/5) %0A(0,0) (44,-72) (-124,202) (0,0) %0A(0,0) (84,-137) (-84,137) (2,-3) %0A(0,0) (6,-9) (-6,9) (-2,3) %0A(0,0) (-565,913) (-1333/5,2159/5) (1393/5,-2259/5) %0A(0,0) (-84,137) (2,-3) (84,-137) %0A(0,0) (-44,72) (0,0) (124,-202) %0A(0,0) (4,-7) (0,-1) (0,1) %0A(0,0) (0,-1) (0,-1) (-4,7) %0A(0,0) (-5,7) (-5,7) (17,-27) %0A(0,0) (-1393/5,2259/5) (565,-913) (-1333/5,2159/5) %0A(0,0) (-2043/5,3309/5) (695,-1123) (-1303/5,2109/5) %0A(0,0) (44,-72) (0,0) (124,-202) %0A(0,0) (-1393/5,2259/5) (-1333/5,2159/5) (565,-913) %0A(0,0) (771/5,-1243/5) (751/5,-1213/5) (-325,527) %0A(0,0) (971/5,-1568/5) (741/5,-1198/5) (-365,592) %0A(0,0) (-2043/5,3309/5) (-1303/5,2109/5) (695,-1123) %0A(0,0) (6,-9) (6,-9) (-2,3) %0A(0,0) (-971/5,1568/5) (-365,592) (-741/5,1198/5) %0A(0,0) (1393/5,-2259/5) (565,-913) (1333/5,-2159/5) %0A(0,0) (-1,2) (-3,6) (-3,6) %0A(0,0) (751/5,-1213/5) (325,-527) (-771/5,1243/5) %0A(0,0) (0,1) (-4,7) (0,-1) %0A(0,0) (-4,7) (0,1) (0,-1) %0A(0,0) (741/5,-1198/5) (971/5,-1568/5) (-365,592) %0A(0,0) (-1303/5,2109/5) (-2043/5,3309/5) (695,-1123) %0A(0,0) (0,0) (106,-170) (-46,74) %0A(0,0) (1333/5,-2159/5) (565,-913) (-1393/5,2259/5) %0A(0,0) (0,-1) (4,-7) (0,1) %0A(0,0) (0,0) (38,-62) (-22,34) %0A(0,0) (751/5,-1213/5) (771/5,-1243/5) (-325,527) %0A(0,0) (84,-137) (-84,137) (-2,3) %0A(0,0) (-695,1123) (-1303/5,2109/5) (-2043/5,3309/5) %0A(0,0) (0,1) (0,1) (4,-7) %0A(0,0) (106,-170) (46,-74) (0,0) %0A(0,0) (-22,34) (0,0) (38,-62) %0A(0,0) (-106,170) (46,-74) (0,0) %0A(0,0) (-365,592) (-971/5,1568/5) (-741/5,1198/5) %0A(0,0) (-325,527) (-771/5,1243/5) (-751/5,1213/5) %0A(0,0) (4,-7) (0,1) (0,-1) %0A(0,0) (565,-913) (1333/5,-2159/5) (1393/5,-2259/5) %0A(0,0) (-1333/5,2159/5) (-1393/5,2259/5) (-565,913) %0A(0,0) (-22,34) (38,-62) (0,0) %0A(0,0) (-741/5,1198/5) (-365,592) (-971/5,1568/5) %0A(0,0) (46,-74) (106,-170) (0,0) %0A(0,0) (124,-202) (-44,72) (0,0) %0A(0,0) (325,-527) (751/5,-1213/5) (-771/5,1243/5) %0A(0,0) (-1333/5,2159/5) (-1393/5,2259/5) (565,-913) %0A(0,0) (565,-913) (-1393/5,2259/5) (1333/5,-2159/5) %0A(0,0) (1333/5,-2159/5) (565,-913) (1393/5,-2259/5) %0A(0,0) (-17,27) (5,-7) (-5,7) %0A(0,0) (-5,7) (5,-7) (-17,27) %0A(0,0) (-365,592) (-741/5,1198/5) (-971/5,1568/5) %0A(0,0) (-325,527) (-751/5,1213/5) (-771/5,1243/5) %0A(0,0) (325,-527) (-771/5,1243/5) (-751/5,1213/5) %0A(0,0) (-565,913) (-1333/5,2159/5) (-1393/5,2259/5) %0A(0,0) (325,-527) (-751/5,1213/5) (771/5,-1243/5) %0A(0,0) (695,-1123) (-2043/5,3309/5) (-1303/5,2109/5) %0A(0,0) (-325,527) (771/5,-1243/5) (-751/5,1213/5) %0A(0,0) (-1303/5,2109/5) (695,-1123) (-2043/5,3309/5) %0A(0,0) (695,-1123) (-2043/5,3309/5) (1303/5,-2109/5) %0A(0,0) (-106,170) (0,0) (46,-74) %0A(0,0) (-565,913) (1393/5,-2259/5) (1333/5,-2159/5) %0A(0,0) (-5,7) (17,-27) (-5,7) %0A(0,0) (-565,913) (1333/5,-2159/5) (1393/5,-2259/5) %0A(0,0) (-2,3) (84,-137) (-84,137) %0A(0,0) (44,-72) (0,0) (38,-60) %0A(0,0) (-1333/5,2159/5) (565,-913) (-1393/5,2259/5) %0A%0A%0A%0A0%0A%0A%0A%0A576%0A4 0 1 2 3%0A4 4 5 6 7%0A4 8 9 10 11%0A4 12 13 14 15%0A4 16 17 18 19%0A4 20 21 22 23%0A4 24 25 26 27%0A4 28 29 30 31%0A4 32 33 34 35%0A4 36 37 38 39%0A4 40 41 42 43%0A4 44 45 46 47%0A4 48 49 50 51%0A4 52 53 54 55%0A4 56 57 58 59%0A4 60 61 62 63%0A4 64 65 66 67%0A4 68 69 70 71%0A4 72 73 6 74%0A4 75 76 77 78%0A4 68 79 80 81%0A4 35 62 82 32%0A4 83 84 85 86%0A4 87 88 89 80%0A4 90 91 92 87%0A4 93 70 61 94%0A4 95 92 65 96%0A4 97 98 99 100%0A4 101 37 84 102%0A4 103 104 105 106%0A4 107 108 109 110%0A4 111 112 113 114%0A4 115 116 117 118%0A4 119 120 38 121%0A4 122 123 124 125%0A4 126 6 127 128%0A4 129 130 10 9%0A4 131 132 133 134%0A4 13 135 136 14%0A4 129 137 138 139%0A4 140 141 142 143%0A4 144 100 145 146%0A4 147 148 149 25%0A4 150 56 151 152%0A4 111 24 153 154%0A4 155 156 157 158%0A4 159 116 34 33%0A4 160 161 162 163%0A4 14 136 164 165%0A4 166 41 120 167%0A4 168 169 170 171%0A4 104 172 123 173%0A4 174 175 139 176%0A4 3 2 177 178%0A4 144 179 180 181%0A4 182 118 117 183%0A4 184 185 186 187%0A4 11 10 188 189%0A4 190 191 192 193%0A4 194 195 196 197%0A4 198 145 100 99%0A4 199 200 132 201%0A4 26 202 99 98%0A4 43 203 204 40%0A4 154 205 112 111%0A4 206 207 208 209%0A4 83 210 211 212%0A4 103 151 213 214%0A4 6 126 63 62%0A4 19 215 216 16%0A4 217 82 218 219%0A4 71 70 220 221%0A4 137 222 223 224%0A4 225 226 28 64%0A4 87 92 177 2%0A4 227 70 228 229%0A4 230 196 216 161%0A4 231 232 233 234%0A4 235 236 15 237%0A4 66 65 20 238%0A4 239 141 149 148%0A4 240 77 76 241%0A4 242 243 244 245%0A4 69 246 247 85%0A4 111 116 115 248%0A4 12 249 250 50%0A4 194 251 252 253%0A4 185 57 1 254%0A4 159 255 256 257%0A4 169 258 259 170%0A4 125 124 260 158%0A4 261 262 263 264%0A4 265 266 267 268%0A4 185 92 95 186%0A4 269 270 271 272%0A4 8 45 215 273%0A4 274 148 147 275%0A4 276 129 277 278%0A4 279 280 281 282%0A4 13 52 55 283%0A4 284 195 37 101%0A4 285 261 264 286%0A4 287 288 53 255%0A4 289 218 120 119%0A4 290 53 291 292%0A4 40 204 23 293%0A4 294 220 295 296%0A4 262 261 297 298%0A4 67 66 299 300%0A4 301 302 303 304%0A4 237 15 14 165%0A4 305 306 307 308%0A4 234 220 70 227%0A4 309 62 42 310%0A4 311 117 312 313%0A4 50 250 314 51%0A4 57 151 315 58%0A4 86 316 210 83%0A4 317 318 247 246%0A4 282 281 319 320%0A4 290 24 303 302%0A4 321 229 233 232%0A4 298 297 322 323%0A4 324 321 141 140%0A4 325 73 322 326%0A4 327 216 133 328%0A4 136 135 276 236%0A4 223 150 78 329%0A4 275 147 330 331%0A4 110 200 261 107%0A4 332 333 334 335%0A4 71 336 79 68%0A4 118 60 63 115%0A4 337 97 127 338%0A4 47 278 277 44%0A4 339 340 341 342%0A4 25 24 333 343%0A4 344 238 20 345%0A4 148 274 346 239%0A4 221 220 347 81%0A4 279 348 295 320%0A4 349 350 351 352%0A4 172 353 124 123%0A4 354 355 292 356%0A4 357 91 90 358%0A4 337 343 333 332%0A4 356 292 291 359%0A4 119 225 360 289%0A4 199 361 362 363%0A4 105 163 162 364%0A4 72 113 33 32%0A4 365 366 367 368%0A4 369 254 1 0%0A4 93 143 142 370%0A4 13 12 371 372%0A4 373 42 61 374%0A4 21 140 307 306%0A4 111 183 375 334%0A4 197 196 156 376%0A4 222 377 378 208%0A4 25 149 379 380%0A4 190 145 5 304%0A4 149 130 270 379%0A4 274 348 228 346%0A4 181 180 381 146%0A4 152 75 78 150%0A4 219 287 382 217%0A4 383 384 100 385%0A4 128 127 61 60%0A4 92 20 316 211%0A4 386 120 84 387%0A4 32 82 73 72%0A4 323 388 283 298%0A4 389 380 379 390%0A4 331 127 97 275%0A4 391 45 384 383%0A4 392 28 172 393%0A4 229 321 324 227%0A4 250 249 394 395%0A4 255 53 396 351%0A4 51 132 200 48%0A4 397 398 57 185%0A4 29 255 351 350%0A4 399 58 315 241%0A4 400 27 26 98%0A4 86 85 401 212%0A4 127 331 346 228%0A4 354 73 264 359%0A4 402 61 42 403%0A4 21 20 318 317%0A4 283 388 290 13%0A4 242 82 62 309%0A4 330 239 346 331%0A4 153 404 326 4%0A4 370 228 70 93%0A4 370 142 405 406%0A4 155 173 123 122%0A4 224 152 151 137%0A4 308 70 69 305%0A4 273 215 407 189%0A4 328 133 157 408%0A4 409 37 156 410%0A4 183 141 239 330%0A4 294 411 207 206%0A4 272 271 380 389%0A4 309 412 243 242%0A4 394 104 173 260%0A4 36 413 414 387%0A4 25 415 202 26%0A4 369 195 401 178%0A4 387 84 37 36%0A4 121 38 258 416%0A4 134 417 418 131%0A4 402 419 420 421%0A4 214 213 422 423%0A4 52 29 350 424%0A4 425 426 427 428%0A4 60 118 182 128%0A4 427 426 56 88%0A4 56 222 208 207%0A4 163 394 429 160%0A4 130 415 271 270%0A4 230 106 105 364%0A4 286 396 424 285%0A4 430 392 431 409%0A4 276 135 381 180%0A4 415 276 180 179%0A4 297 165 164 145%0A4 3 347 432 0%0A4 27 433 135 24%0A4 125 200 259 122%0A4 389 97 100 272%0A4 338 375 343 337%0A4 394 249 434 435%0A4 165 297 132 237%0A4 428 427 436 437%0A4 253 252 438 376%0A4 146 145 46 181%0A4 102 84 401 439%0A4 151 56 59 315%0A4 128 182 248 126%0A4 368 149 377 365%0A4 421 62 61 402%0A4 205 325 326 404%0A4 116 111 114 34%0A4 421 420 440 403%0A4 222 130 267 266%0A4 363 261 200 199%0A4 181 46 100 144%0A4 363 362 372 441%0A4 103 429 17 341%0A4 151 103 341 340%0A4 202 415 135 433%0A4 20 65 210 316%0A4 212 211 316 86%0A4 88 56 207 411%0A4 87 21 317 90%0A4 442 57 56 426%0A4 35 34 114 74%0A4 353 394 260 124%0A4 28 184 413 443%0A4 300 120 41 444%0A4 339 76 215 19%0A4 135 13 192 191%0A4 441 372 371 201%0A4 358 347 401 357%0A4 249 429 445 434%0A4 273 446 9 8%0A4 345 64 67 344%0A4 447 256 448 167%0A4 108 168 29 52%0A4 249 12 418 417%0A4 132 51 314 133%0A4 266 365 377 222%0A4 161 216 157 162%0A4 449 450 415 130%0A4 52 353 109 108%0A4 196 423 422 76%0A4 184 28 392 430%0A4 29 172 451 30%0A4 385 100 46 452%0A4 129 249 417 277%0A4 385 450 449 383%0A4 49 395 394 353%0A4 137 151 340 18%0A4 318 20 92 91%0A4 245 41 82 242%0A4 48 200 157 453%0A4 117 116 420 419%0A4 377 88 411 378%0A4 195 284 439 401%0A4 447 218 82 454%0A4 91 357 247 318%0A4 455 393 172 104%0A4 269 384 348 390%0A4 53 52 424 396%0A4 349 258 261 285%0A4 209 407 77 206%0A4 39 38 120 386%0A4 178 401 347 3%0A4 41 245 310 42%0A4 197 456 251 194%0A4 96 102 439 95%0A4 171 172 29 168%0A4 141 377 3
122019 281%0A4 386 457 443 39%0A4 106 160 429 103%0A4 406 127 228 370%0A4 305 69 42 373%0A4 306 313 312 21%0A4 342 196 76 339%0A4 360 458 416 289%0A4 187 96 65 184%0A4 335 6 5 332%0A4 57 87 2 1%0A4 403 42 62 421%0A4 388 323 263 54%0A4 304 5 322 301%0A4 193 297 145 190%0A4 101 187 186 284%0A4 335 334 375 338%0A4 5 4 326 322%0A4 255 159 382 287%0A4 240 59 58 399%0A4 74 6 62 35%0A4 436 442 459 437%0A4 332 5 97 337%0A4 399 432 77 240%0A4 174 133 216 460%0A4 410 156 259 461%0A4 462 451 31 463%0A4 353 12 50 49%0A4 464 465 452 391%0A4 286 264 218 352%0A4 243 412 116 159%0A4 393 461 431 392%0A4 186 95 439 284%0A4 246 69 347 358%0A4 466 112 53 288%0A4 130 129 464 449%0A4 176 45 133 174%0A4 347 437 459 432%0A4 25 183 330 147%0A4 185 103 214 397%0A4 453 157 133 314%0A4 238 467 299 66%0A4 88 87 436 427%0A4 373 313 306 305%0A4 468 312 116 412%0A4 469 224 223 329%0A4 21 312 203 22%0A4 329 407 215 469%0A4 200 110 170 259%0A4 24 135 191 303%0A4 359 264 322 356%0A4 268 384 407 265%0A4 454 257 256 447%0A4 384 268 367 348%0A4 241 76 432 399%0A4 184 104 438 252%0A4 444 344 67 300%0A4 227 324 231 234%0A4 429 137 18 17%0A4 175 174 460 470%0A4 37 409 431 38%0A4 423 196 195 471%0A4 215 472 460 216%0A4 176 139 138 472%0A4 47 46 132 131%0A4 167 448 473 166%0A4 45 391 452 46%0A4 135 415 179 381%0A4 429 394 435 445%0A4 169 168 108 107%0A4 296 378 411 294%0A4 395 453 314 250%0A4 16 216 196 342%0A4 342 341 17 16%0A4 140 21 79 336%0A4 94 61 127 406%0A4 463 38 259 462%0A4 184 65 414 413%0A4 82 217 474 73%0A4 475 258 38 463%0A4 358 90 317 246%0A4 88 377 232 231%0A4 7 154 153 4%0A4 476 288 287 219%0A4 87 57 442 436%0A4 53 112 355 291%0A4 467 85 84 299%0A4 406 405 477 94%0A4 74 114 113 72%0A4 338 127 6 335%0A4 149 141 281 280%0A4 366 295 348 367%0A4 301 322 297 193%0A4 248 115 63 126%0A4 19 18 340 339%0A4 320 319 280 279%0A4 70 308 374 61%0A4 345 312 468 244%0A4 345 20 23 204%0A4 312 345 204 203%0A4 7 6 73 325%0A4 293 23 22 478%0A4 104 184 430 455%0A4 220 234 233 295%0A4 479 432 76 422%0A4 54 53 290 388%0A4 161 160 106 230%0A4 244 468 310 245%0A4 137 429 470 138%0A4 198 433 27 400%0A4 167 120 218 447%0A4 288 476 474 466%0A4 323 322 264 263%0A4 236 235 164 136%0A4 12 276 278 418%0A4 272 100 384 269%0A4 320 295 228 282%0A4 476 264 73 474%0A4 408 435 434 328%0A4 212 401 84 83%0A4 265 407 295 366%0A4 13 290 302 192%0A4 109 171 170 110%0A4 21 87 80 79%0A4 450 385 452 465%0A4 307 311 374 308%0A4 24 111 334 333%0A4 298 283 55 262%0A4 75 152 224 469%0A4 0 432 195 369%0A4 352 351 396 286%0A4 400 5 145 198%0A4 129 276 465 464%0A4 44 277 417 134%0A4 255 29 458 360%0A4 138 470 460 472%0A4 117 140 143 477%0A4 209 208 378 296%0A4 356 322 73 354%0A4 465 276 415 450%0A4 112 290 292 355%0A4 141 183 405 142%0A4 64 28 443 457%0A4 462 259 258 475%0A4 12 353 361 371%0A4 352 218 258 349%0A4 222 137 446 188%0A4 137 129 9 446%0A4 353 52 362 361%0A4 387 414 457 386%0A4 131 418 278 47%0A4 428 220 77 425%0A4 121 226 225 119%0A4 241 315 59 240%0A4 65 92 211 210%0A4 139 175 249 129%0A4 461 393 455 410%0A4 94 477 143 93%0A4 166 473 257 454%0A4 140 117 311 307%0A4 130 222 188 10%0A4 325 205 154 7%0A4 55 54 263 262%0A4 255 64 448 256%0A4 383 449 464 391%0A4 412 309 310 468%0A4 219 218 264 476%0A4 120 300 299 84%0A4 112 159 33 113%0A4 98 97 5 400%0A4 479 398 397 471%0A4 221 89 336 71%0A4 353 172 171 109%0A4 218 289 416 258%0A4 467 238 344 444%0A4 43 42 69 478%0A4 296 295 407 209%0A4 134 133 45 44%0A4 201 132 297 441%0A4 275 97 348 274%0A4 52 13 372 362%0A4 426 425 459 442%0A4 193 192 302 301%0A4 345 159 257 473%0A4 478 22 203 43%0A4 454 82 41 166%0A4 285 424 350 349%0A4 470 429 249 175%0A4 178 177 254 369%0A4 107 261 258 169%0A4 478 69 85 293%0A4 410 455 430 409%0A4 156 364 162 157%0A4 130 149 368 267%0A4 159 112 466 382%0A4 88 140 336 89%0A4 185 184 252 251%0A4 444 41 85 467%0A4 328 434 445 327%0A4 140 88 231 324%0A4 267 368 367 268%0A4 183 111 248 182%0A4 253 37 195 194%0A4 364 156 196 230%0A4 366 365 266 265%0A4 104 103 456 438%0A4 475 30 451 462%0A4 206 77 220 294%0A4 313 373 374 311%0A4 404 290 112 205%0A4 235 46 145 164%0A4 116 312 440 420%0A4 390 379 270 269%0A4 376 438 456 197%0A4 408 157 216 327%0A4 304 303 191 190%0A4 377 149 280 319%0A4 441 297 261 363%0A4 158 157 200 125%0A4 390 348 97 389%0A4 472 215 45 176%0A4 237 132 46 235%0A4 201 371 361 199%0A4 359 291 355 354%0A4 471 195 432 479%0A4 64 255 360 225%0A4 407 329 78 77%0A4 92 185 254 177%0A4 463 31 30 475%0A4 453 395 49 48%0A4 81 80 89 221%0A4 122 259 156 155%0A4 469 215 76 75%0A4 189 188 446 273%0A4 433 198 99 202%0A4 104 394 163 105%0A4 403 440 419 402%0A4 425 77 432 459%0A4 398 479 422 213%0A4 24 290 404 153%0A4 458 29 28 226%0A4 11 384 45 8%0A4 39 443 413 36%0A4 146 381 179 144%0A4 382 466 474 217%0A4 226 121 416 458%0A4 282 228 348 279%0A4 222 56 150 223%0A4 189 407 384 11%0A4 81 347 69 68%0A4 64 345 473 448%0A4 102 96 187 101%0A4 158 260 173 155%0A4 415 25 380 271%0A4 461 259 38 431%0A4 103 185 251 456%0A4 312 117 419 440%0A4 229 228 295 233%0A4 172 28 31 451%0A4 183 25 343 375%0A4 471 397 214 423%0A4 213 151 57 398%0A4 357 401 85 247%0A4 15 236 276 12%0A4 437 347 220 428%0A4 65 64 457 414%0A4 293 85 41 40%0A4 159 345 244 243%0A4 376 156 37 253%0A4 232 377 141 321%0A4 183 117 477 405%0A4 327 445 435 408%0A%0A%0A%0A0%0A%0A%0A"; 1221 1222// src/worker/legacy/resources/com/vzome/core/parts/octahedralRealistic/green.vef 1223var green_default7 = "data:text/plain;
1223charset=utf-8,vZome VEF 6 field golden%0A scale (1,-1) %0A%0A9%0A(0,0) (22,-34) (0,0) (-28,46) %0A(0,0) (-3,6) (-1,2) (-3,6) %0A(0,0) (9,-2) (-1,2) (9,-2) %0A(0,0) (34,-42) (0,0) (-16,38) %0A(0,0) (6,4) (0,0) (6,4) %0A(0,0) (9,-2) (1,-2) (9,-2) %0A(0,0) (-28,46) (0,0) (22,-34) %0A(0,0) (-3,6) (1,-2) (-3,6) %0A(0,0) (-16,38) (0,0) (34,-42) %0A%0A%0A%0A0%0A%0A%0A%0A4%0A4 0 1 2 3%0A4 6 7 5 8%0A4 3 5 7 0%0A4 8 2 1 6%0A%0A%0A%0A5%0A 4 5 3 8 2%0A%0Atip 4%0A"; 1224 1225// src/worker/legacy/resources/com/vzome/core/parts/octahedralRealistic/lavender.vef 1226var lavender_default3 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (1,-1) %0A%0A18%0A(0,0) (17,-27) (1,1) (-11,19) %0A(0,0) (-11,19) (1,1) (17,-27) %0A(0,0) (-12,22) (4,2) (16,-24) %0A(0,0) (16,-24) (4,2) (-12,22) %0A(0,0) (-1,2) (-3,6) (-3,6) %0A(0,0) (-3,6) (-3,6) (-1,2) %0A(0,0) (-28,46) (22,-34) (0,0) %0A(0,0) (-15,25) (1,1) (13,-21) %0A(0,0) (-16,28) (4,2) (12,-18) %0A(0,0) (1,1) (-17,37) (29,-45) %0A(0,0) (12,-18) (4,2) (-16,28) %0A(0,0) (4,-5) (8,-3) (2,-1) %0A(0,0) (2,-1) (8,-3) (4,-5) %0A(0,0) (1,1) (5,3) (1,1) %0A(0,0) (29,-45) (-17,37) (1,1) %0A(0,0) (0,0) (22,-34) (-28,46) %0A(0,0) (13,-21) (1,1) (-15,25) %0A(0,0) (0,0) (0,0) (0,0) %0A%0A%0A%0A0%0A%0A%0A12%0A4 0 1 2 3%0A4 4 5 1 0%0A6 1 6 7 8 9 2%0A4 11 12 8 10%0A4 3 2 9 14%0A4 15 16 7 6%0A3 4 0 15%0A3 14 11 10%0A3 12 9 8%0A6 15 0 3 14 10 16%0A4 7 16 10 8%0A3 5 6 1%0A%0A%0A%0A9%0A 10 13 11 8 12 3 9 2 14%0A%0Atip 13%0A"; 1227 1228// src/worker/legacy/resources/com/vzome/core/parts/octahedralRealistic/maroon.vef 1229var maroon_default3 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (1,-1) %0A%0A17%0A(0,0) (33/2,-24) (3/2,5) (23/2,-22) %0A(0,0) (5,-5) (7,-3) (-3,1) %0A(0,0) (30,-45) (-18,37) (-2,-1) %0A(0,0) (29/2,-23) (3/2,0) (27/2,-23) %0A(0,0) (31/2,-22) (5/2,3) (25/2,-24) %0A(0,0) (27/2,-21) (5/2,-2) (29/2,-25) %0A(0,0) (3,-1) (7,-3) (-5,5) %0A(0,0) (-27/2,23) (3/2,0) (-29/2,23) %0A(0,0) (-28,46) (22,-34) (0,0) %0A(0,0) (-29/2,25) (5/2,-2) (-27/2,21) %0A(0,0) (0,0) (22,-34) (28,-46) %0A(0,0) (2,1) (-18,37) (-30,45) %0A(0,0) (-23/2,22) (3/2,5) (-33/2,24) %0A(0,0) (-25/2,24) (5/2,3) (-31/2,22) %0A(0,0) (2,1) (4,3) (-2,-1) %0A(0,0) (-3,6) (-3,6) (1,-2) %0A(0,0) (-1,2) (-3,6) (3,-6) %0A%0A%0A%0A0%0A%0A%0A%0A16%0A3 0 1 2%0A4 3 0 4 5%0A3 7 8 9%0A4 10 8 7 3%0A3 11 12 13%0A4 4 13 9 5%0A4 3 7 12 0%0A4 12 7 9 13%0A4 5 9 15 16%0A3 11 6 12%0A3 0 2 4%0A4 2 11 13 4%0A3 10 3 5%0A3 8 15 9%0A3 10 5 16%0A4 0 12 6 1%0A%0A%0A%0A9%0A 0 6 11 13 14 2 12 1 4%0A%0Atip 14%0A"; 1230 1231// src/worker/legacy/resources/com/vzome/core/parts/octahedralRealistic/olive.vef 1232var olive_default3 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (1,-1) %0A%0A17%0A(0,0) (3,0) (3,0) (-2,4) %0A(0,0) (28,-40) (-22,40) (-3,6) %0A(0,0) (25,-38) (-25,42) (4,-6) %0A(0,0) (0,2) (0,2) (5,-8) %0A(0,0) (0,2) (0,2) (3,-4) %0A(0,0) (-25,42) (25,-38) (4,-6) %0A(0,0) (-28,46) (22,-34) (0,0) %0A(0,0) (-3,6) (-3,6) (-1,2) %0A(0,0) (-22,40) (28,-40) (-3,6) %0A(0,0) (3,0) (3,0) (-4,8) %0A(0,0) (6,-4) (6,-4) (0,2) %0A(0,0) (-19,36) (31,-44) (1,0) %0A(0,0) (3,2) (3,2) (1,0) %0A(0,0) (6,-4) (6,-4) (2,-2) %0A(0,0) (31,-44) (-19,36) (1,0) %0A(0,0) (-3,6) (-3,6) (1,-2) %0A(0,0) (22,-34) (-28,46) (0,0) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 0 1 2 3%0A4 4 5 6 7%0A4 8 9 10 11%0A4 8 0 3 5%0A4 13 14 1 0%0A4 8 5 4 9%0A4 15 3 2 16%0A4 11 13 0 8%0A4 9 4 2 1%0A4 6 5 3 15%0A4 9 1 14 10%0A4 16 2 4 7%0A%0A%0A%0A9%0A 12 10 11 14 9 0 1 8 13%0A%0Atip 12%0A"; 1233 1234// src/worker/legacy/resources/com/vzome/core/parts/octahedralRealistic/purple.vef 1235var purple_default3 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (1,-1) %0A%0A17%0A(0,0) (-28,46) (1,1) (19,-36) %0A(0,0) (0,0) (4,-5) (-1,-1) %0A(0,0) (-4,6) (0,1) (-1,-1) %0A(0,0) (28,-46) (0,0) (-22,34) %0A(0,0) (0,0) (-28,46) (-22,34) %0A(0,0) (0,0) (1,1) (-3,-2) %0A(0,0) (28,-46) (1,1) (19,-36) %0A(0,0) (4,-6) (1,0) (-2,-1) %0A(0,0) (4,-6) (0,1) (-1,-1) %0A(0,0) (0,0) (-4,7) (-1,-1) %0A(0,0) (0,0) (-3,6) (-2,-1) %0A(0,0) (0,0) (29,-45) (19,-36) %0A(0,0) (-4,6) (1,0) (-2,-1) %0A(0,0) (-28,46) (0,0) (-22,34) %0A(0,0) (0,0) (28,-46) (-22,34) %0A(0,0) (0,0) (-27,47) (19,-36) %0A(0,0) (0,0) (5,-6) (-2,-1) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 1 2 3 4%0A4 7 8 9 10%0A4 6 11 10 12%0A4 8 1 4 13%0A4 2 9 14 3%0A4 7 10 11 0%0A4 8 7 16 1%0A4 16 12 2 1%0A4 15 16 7 0%0A4 15 6 12 16%0A4 8 13 14 9%0A4 2 12 10 9%0A%0A%0A%0A9%0A 0 5 6 12 11 15 16 10 7%0A%0At
1235ip 5%0A"; 1236 1237// src/worker/legacy/resources/com/vzome/core/parts/octahedralRealistic/red.vef 1238var red_default6 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (1,-1) %0A%0A17%0A(0,0) (-27,35) (-23,42) (0,0) %0A(0,0) (-2,-5) (2,2) (1,-2) %0A(0,0) (-3,2) (1,0) (1,-2) %0A(0,0) (-28,42) (-24,40) (0,0) %0A(0,0) (-8,3) (6,-4) (-1,2) %0A(0,0) (-2,-5) (2,2) (-1,2) %0A(0,0) (23,-45) (27,-38) (0,0) %0A(0,0) (17,-37) (31,-44) (0,0) %0A(0,0) (-3,2) (1,0) (-1,2) %0A(0,0) (22,-38) (26,-40) (0,0) %0A(0,0) (-8,3) (6,-4) (1,-2) %0A(0,0) (3,-6) (-3,6) (1,-2) %0A(0,0) (-22,34) (-28,46) (0,0) %0A(0,0) (-33,43) (-19,36) (0,0) %0A(0,0) (3,-6) (-3,6) (-1,2) %0A(0,0) (28,-46) (22,-34) (0,0) %0A(0,0) (-5,-3) (3,2) (0,0) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 0 1 2 3%0A4 4 5 6 7%0A4 8 9 6 5%0A4 3 2 11 12%0A4 13 10 1 0%0A4 4 13 0 5%0A4 3 8 5 0%0A4 1 6 9 2%0A4 8 14 15 9%0A4 10 7 6 1%0A4 3 12 14 8%0A4 2 9 15 11%0A%0A%0A%0A9%0A 10 0 13 6 7 4 16 5 1%0A%0Atip 16%0A"; 1239 1240// src/worker/legacy/resources/com/vzome/core/parts/octahedralRealistic/yellow.vef 1241var yellow_default6 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (1,-1) %0A%0A13%0A(0,0) (-7/3,17/3) (-1/3,5/3) (-4/3,11/3) %0A(0,0) (-3,6) (-1,2) (-3,6) %0A(0,0) (-3,6) (-3,6) (-1,2) %0A(0,0) (3,2) (3,2) (3,2) %0A(0,0) (13/3,-5/3) (10/3,1/3) (16/3,-11/3) %0A(0,0) (4,0) (6,-4) (6,-4) %0A(0,0) (10/3,1/3) (16/3,-11/3) (13/3,-5/3) %0A(0,0) (6,-4) (4,0) (6,-4) %0A(0,0) (-1/3,5/3) (-4/3,11/3) (-7/3,17/3) %0A(0,0) (16/3,-11/3) (13/3,-5/3) (10/3,1/3) %0A(0,0) (6,-4) (6,-4) (4,0) %0A(0,0) (-4/3,11/3) (-7/3,17/3) (-1/3,5/3) %0A(0,0) (-1,2) (-3,6) (-3,6) %0A%0A%0A%0A0%0A%0A%0A%0A15%0A3 0 1 2%0A3 4 5 6%0A3 1 0 8%0A3 7 4 9%0A4 8 0 6 9%0A3 10 6 5%0A3 11 2 12%0A4 6 0 11 4%0A3 10 7 9%0A3 0 2 11%0A3 1 8 12%0A3 8 11 12%0A3 7 5 4%0A3 10 9 6%0A4 9 4 11 8%0A%0A%0A%0A7%0A 3 7 4 9 10 6 5%0A%0Atip 3%0A"; 1242
1243// src/worker/legacy/resources/com/vzome/core/parts/octahedralRealistic/index.js 1244var shapes10 = { 1245 "blue": blue_default8, 1246 "brown": brown_default3, 1247 "connector": connector_default10, 1248 "green": green_default7, 1249 "lavender": lavender_default3, 1250 "maroon": maroon_default3, 1251 "olive": olive_default3, 1252 "purple": purple_default3, 1253 "red": red_default6, 1254 "yellow": yellow_default6 1255}; 1256var octahedralRealistic_default = shapes10; 1257 1258// src/worker/legacy/resources/com/vzome/core/parts/printable/apple.vef 1259var apple_default2 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A21%0A(0,0) (0,1) (1/2,-1) (1/2,-1)%0A(0,0) (0,1) (1/2,-1) (-1,3/2)%0A(0,0) (0,1) (1/2,-1) (1,-3/2)%0A(0,0) (0,1) (1/2,-1) (-1/2,1)%0A(0,0) (0,1) (1/2,-1/2) (1/2,-1)%0A(0,0) (0,1) (1/2,-1/2) (-1/2,1)%0A(0,0) (27,-42) (143/6,-116/3) (-85/3,93/2)%0A(0,0) (3,-3) (17/6,-14/3) (-38/3,41/2)%0A(0,0) (3,-3) (17/6,-14/3) (-8/3,9/2)%0A(0,0) (3,-3) (17/6,-14/3) (2/3,-1/2)%0A(0,0) (3,-3) (7/6,-4/3) (-8/3,9/2)%0A(0,0) (3,-3) (7/6,-4/3) (2/3,-1/2)%0A(0,0) (0,6) (-7/6,7/3) (1/3,1/2)%0A(0,0) (0,6) (-7/6,7/3) (11/3,-9/2)%0A(0,0) (0,6) (-17/6,17/3) (1/3,1/2)%0A(0,0) (0,6) (-17/6,17/3) (11/3,-9/2)%0A(0,0) (3,2) (-1/2,3/2) (3/2,-1)%0A(0,0) (3,2) (-1/2,3/2) (1/2,1)%0A(0,0) (3,2) (-1/2,2) (3/2,-1)%0A(0,0) (3,2) (-1/2,2) (1/2,1)%0A(0,0) (3,3) (0,1) (1,0)%0A%0A%0A%0A0%0A%0A%0A%0A22%0A3 0 4 7 %0A3 1 0 7 %0A3 3 2 6 %0A3 3 6 5 %0A3 5 6 11 %0A3 8 1 7 %0A3 9 6 2 %0A3 10 7 4 %0A3 10 8 7 %0A3 11 6 9 %0A4 3 5 4 0 %0A4 8 9 2 1 %0A4 10 11 15 14 %0A4 11 10 4 5 %0A4 12 13 9 8 %0A4 12 14 18 16 %0A4 13 15 11 9 %0A4 14 12 8 10 %0A4 14 15 19 18 %0A4 16 17 13 12 %0A4 17 16 18 19 %0A4 17 19 15 13 %0A%0A%0A%0A9%0A12 13 14 15 16 17 18 19 20 %0A%0A%0Atip 20%0A%0A"; 1260 1261// src/worker/legacy/resources/com/vzome/core/parts/printable/turquoise.vef 1262var turquoise_default2 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A19%0A(0,0) (1,-1) (1/2,-1/2) (1/2,0)%0A(0,0) (1/2,0) (0,0) (-1/2,3/2)%0A(0,0) (1/2,0) (1,-1) (1/2,-1/2)%0A(0,0) (0,1) (1/2,-1/2) (-1/2,1)%0A(0,0) (-1/4,2) (-7/4,13/4) (-1,13/4)%0A(0,0) (3/4,1/2) (-9/4,17/4) (-3/2,15/4)%0A(0,0) (1/4,3/2) (-7/4,11/4) (-1/2,9/4)%0A(0,0) (5/4,0) (-9/4,15/4) (-1,11/4)%0A(0,0) (7/4,2) (9/4,-11/4) (3,-3/4)%0A(0,0) (11/4,1/2) (7/4,-7/4) (5/2,-1/4)%0A(0,0) (9/4,3/2) (9/4,-13/4) (7/2,-7/4)%0A(0,0) (-107/4,97/2) (-11/4,19/4) (-5/2,33/4)%0A(0,0) (13/4,0) (7/4,-9/4) (3,-5/4)%0A(0,0) (125/4,-45) (-5/4,11/4) (3,-5/4)%0A(0,0) (3,1) (-1/2,3/2) (5/2,1)%0A(0,0) (5/2,2) (-1,2) (3/2,5/2)%0A(0,0) (5/2,2) (0,1) (5/2,1/2)%0A(0,0) (2,3) (-1/2,3/2) (3/2,2)%0A(0,0) (3,2) (0,1) (2,2)%0A%0A%0A%0A0%0A%0A%0A%0A18%0A3 8 10 11 %0A3 11 15 14 %0A3 12 13 17 %0A3 13 9 16 %0A3 13 12 9 %0A3 13 16 17 %0A3 14 8 11 %0A3 15 11 10 %0A4 0 1 6 4 %0A4 1 3 7 6 %0A4 3 2 5 7 %0A4 5 2 0 4 %0A4 7 5 9 12 %0A4 8 9 5 4 %0A4 10 8 4 6 %0A4 12 10 6 7 %0A4 14 16 9 8 %0A4 17 15 10 12 %0A%0A%0A%0A11%0A8 9 10 11 12 13 14 15 16 17 %0A18 %0A%0A%0Atip 18%0A%0A"; 1263
1264// src/worker/legacy/resources/com/vzome/core/parts/printable/index.js 1265var shapes11 = { 1266 "apple": apple_default2, 1267 "turquoise": turquoise_default2 1268}; 1269var printable_default = shapes11; 1270 1271// src/worker/legacy/resources/com/vzome/core/parts/root2Lifelike/blue.vef 1272var blue_default9 = "data:text/plain;charset=utf-8,vZome VEF 6 field rootTwo%0A%0A25%0A(0,0) (0,-2) (0,0) (0,0)%0A(0,0) (0,-31/20) (0,-3/20) (0,-3/20)%0A(0,0) (0,-31/20) (0,-3/20) (0,3/20)%0A(0,0) (0,-31/20) (0,3/20) (0,-3/20)%0A(0,0) (0,-31/20) (0,3/20) (0,3/20)%0A(0,0) (0,-5/4) (0,-1/4) (0,-1/4)%0A(0,0) (0,-5/4) (0,-1/4) (0,1/4)%0A(0,0) (0,-5/4) (0,-3/20) (0,-3/20)%0A(0,0) (0,-5/4) (0,-3/20) (0,3/20)%0A(0,0) (0,-5/4) (0,3/20) (0,-3/20)%0A(0,0) (0,-5/4) (0,3/20) (0,3/20)%0A(0,0) (0,-5/4) (0,1/4) (0,-1/4)%0A(0,0) (0,-5/4) (0,1/4) (0,1/4)%0A(0,0) (0,-3/4) (0,-1/4) (0,-1/4)%0A(0,0) (0,-3/4) (0,-1/4) (0,1/4)%0A(0,0) (0,-3/4) (0,-3/20) (0,-3/20)%0A(0,0) (0,-3/4) (0,-3/20) (0,3/20)%0A(0,0) (0,-3/4) (0,3/20) (0,-3/20)%0A(0,0) (0,-3/4) (0,3/20) (0,3/20)%0A(0,0) (0,-3/4) (0,1/4) (0,-1/4)%0A(0,0) (0,-3/4) (0,1/4) (0,1/4)%0A(0,0) (0,-9/20) (0,-3/20) (0,-3/20)%0A(0,0) (0,-9/20) (0,-3/20) (0,3/20)%0A(0,0) (0,-9/20) (0,3/20) (0,-3/20)%0A(0,0) (0,-9/20) (0,3/20) (0,3/20)%0A%0A%0A%0A0%0A%0A%0A%0A22%0A4 2 4 3 1 %0A4 3 9 7 1 %0A4 4 10 9 3 %0A4 6 5 13 14 %0A4 6 14 20 12 %0A4 7 5 6 8 %0A4 7 9 11 5 %0A4 8 2 1 7 %0A4 8 6 12 10 %0A4 8 10 4 2 %0A4 10 12 11 9 %0A4 13 15 16 14 %0A4 14 16 18 20 %0A4 17 18 24 23 %0A4 19 11 12 20 %0A4 19 13 5 11 %0A4 19 17 15 13 %0A4 20 18 17 19 %0A4 21 15 17 23 %0A4 21 23 24 22 %0A4 22 16 15 21 %0A4 24 18 16 22 %0A%0A%0A%0A13%0A0 1 2 3 4 5 6 7 8 9 %0A10 11 12 %0A%0A%0Atip 0%0A%0A"; 1273 1274// src/worker/legacy/resources/com/vzome/core/parts/root2Lifelike/connector.vef 1275var connector_default11 = "data:text/plain;charset=utf-8,vZome VEF 6 field rootTwo%0A%0A144%0A(0,0) (0,-3/4) (0,-1/4) (0,-1/4)%0A(0,0) (0,-3/4) (0,-1/4) (0,1/4)%0A(0,0) (0,-3/4) (0,-3/20) (0,-3/20)%0A(0,0) (0,-3/4) (0,-3/20) (0,3/20)%0A(0,0) (0,-3/4) (0,3/20) (0,-3/20)%0A(0,0) (0,-3/4) (0,3/20) (0,3/20)%0A(0,0) (0,-3/4) (0,1/4) (0,-1/4)%0A(0,0) (0,-3/4) (0,1/4) (0,1/4)%0A(0,0) (0,-13/20) (0,-7/20) (0,-3/20)%0A(0,0) (0,-13/20) (0,-7/20) (0,3/20)%0A(0,0) (0,-13/20) (0,-3/20) (0,-7/20)%0A(0,0) (0,-13/20) (0,-3/20) (0,7/20)%0A(0,0) (0,-13/20) (0,3/20) (0,-7/20)%0A(0,0) (0,-13/20) (0,3/20) (0,7/20)%0A(0,0) (0,-13/20) (0,7/20) (0,-3/20)%0A(0,0) (0,-13/20) (0,7/20) (0,3/20)%0A(0,0) (0,-37/60) (0,-19/60) (0,-19/60)%0A(0,0) (0,-37/60) (0,-19/60) (0,19/60)%0A(0,0) (0,-37/60) (0,19/60) (0,-19/60)%0A(0,0) (0,-37/60) (0,19/60) (0,19/60)%0A(0,0) (0,-9/20) (0,-3/20) (0,-3/20)%0A(0,0) (0,-9/20) (0,-3/20) (0,3/20)%0A(0,0) (0,-9/20) (0,3/20) (0,-3/20)%0A(0,0) (0,-9/20) (0,3/20) (0,3/20)%0A(0,0) (0,-7/20) (0,-13/20) (0,-3/20)%0A(0,0) (0,-7/20) (0,-13/20) (0,3/20)%0A(0,0) (0,-7/20) (0,-3/20) (0,-13/20)%0A(0,0) (0,-7/20) (0,-3/20) (0,13/20)%0A(0,0) (0,-7/20) (0,3/20) (0,-13/20)%0A(0,0) (0,-7/20) (0,3/20) (0,13/20)%0A(0,0) (0,-7/20) (0,13/20) (0,-3/20)%0A(0,0) (0,-7/20) (0,13/20) (0,3/20)%0A(0,0) (0,-19/60) (0,-37/60) (0,-19/60)%0A(0,0) (0,-19/60) (0,-37/60) (0,19/60)%0A(0,0) (0,-19/60) (0,-19/60) (0,-37/60)%0A(0,0) (0,-19/60) (0,-19/60) (0,37/60)%0A(0,0) (0,-19/60) (0,19/60) (0,-37/60)%0A(0,0) (0,-19/60) (0,19/60) (0,37/60)%0A(0,0) (0,-19/60) (0,37/60) (0,-19/60)%0A(0,0) (0,-19/60) (0,37/60) (0,19/60)%0A(0,0) (0,-1/4) (0,-3/4) (0,-1/4)%0A(0,0) (0,-1/4) (0,-3/4) (0,1/4)%0A(0,0) (0,-1/4) (0,-1/4) (0,-3/4)%0A(0,0) (0,-1/4) (0,-1/4) (0,3/4)%0A(0,0) (0,-1/4) (0,1/4) (0,-3/4)%0A(0,0) (0,-1/4) (0,1/4) (0,3/4)%0A(0,0) (0,-1/4) (0,3/4) (0,-1/4)%0A(0,0) (0,-1/4) (0,3/4) (0,1/4)%0A(0,0) (0,-3/20) (0,-3/4) (0,-3/20)%0A(0,0) (0,-3/20) (0,-3/4) (0,3/20)%0A(0,0) (0,-3/20) (0,-13/20) (0,-7/20)%0A(0,0) (0,-3/20) (0,-13/20) (0,7/20)%0A(0,0) (0,-3/20) (0,-9/20) (0,-3/20)%0A(0,0) (0,-3/20) (0,-9/20) (0,3/20)%0A(0,0) (0,-3/20) (0,-7/20) (0,-13/20)%0A(0,0) (0,-3/20) (0,-7/20) (0,13/20)%0A(0,0) (0,-3/20) (0,-3/20) (0,-3/4)%0A(0,0) (0,-3/20) (0,-3/20) (0,-9/20)%0A(0,0) (0,-3/20) (0,-3/20) (0,9/20)%0A(0,0) (0,-3/20) (0,-3/20) (0,3/4)%0A(0,0) (0,-3/20) (0,3/20) (0,-3/4)%0A(0,0) (0,-3/20) (0,3/20) (0,-9/20)%0A(0,0) (0,-3/20) (0,3/20) (0,9/20)%0A(0,0) (0,-3/20) (0,3/20) (0,3/4)%0A(0,0) (0,-3/20) (0,7/20) (0,-13/20)%0A(0,0) (0,-3/20) (0,7/20) (0,13/20)%0A(0,0) (0,-3/20) (0,9/20) (0,-3/20)%0A(0,0) (0,-3/20) (0,9/20) (0,3/20)%0A(0,0) (0,-3/20) (0,13/20) (0,-7/20)%0A(0,0) (0,-3/20) (0,13/20) (0,7/20)%0A(0,0) (0,-3/20) (0,3/4) (0,-3/20)%0A(0,0) (0,-3/20) (0,3/4) (0,3/20)%0A(0,0) (0,3/20) (0,-3/4) (0,-3/20)%0A(0,0) (0,3/20) (0,-3/4) (0,3/20)%0A(0,0) (0,3/20) (0,-13/20) (0,-7/20)%0A(0,0) (0,3/20) (0,-13/20) (0,7/20)%0A(0,0) (0,3/20) (0,-9/20) (0,-3/20)%0A(0,0) (0,3/20) (0,-9/20) (0,3/20)%0A(0,0) (0,3/20) (0,-7/20) (0,-13/20)%0A(0,0) (0,3/20) (0,-7/20) (0,13/20)%0A(0,0) (0,3/20) (0,-3/20) (0,-3/4)%0A(0,0) (0,3/20) (0,-3/20) (0,-9/20)%0A(0,0) (0,3/20) (0,-3/20) (0,9/20)%0A(0,0) (0,3/20) (0,-3/20) (0,3/4)%0A(0,0) (0,3/20) (0,3/20) (0,-3/4)%0A(0,0) (0,3/20) (0,3/20) (0,-9/20)%0A(0,0) (0,3/20) (0,3/20) (0,9/20)%0A(0,0) (0,3/20) (0,3/20) (0,3/4)%0A(0,0) (0,3/20) (0,7/20) (0,-13/20)%0A(0,0) (0,3/20) (0,7/20) (0,13/20)%0A(0,0) (0,3/20) (0,9/20) (0,-3/20)%0A(0,0) (0,3/20) (0,9/20) (0,3/20)%0A(0,0) (0,3/20) (0,13/20) (0,-7/20)%0A(0,0) (0,3/20) (0,13/20) (0,7/20)%0A(0,0) (0,3/20) (0,3/4) (0,-3/20)%0A(0,0) (0,3/20) (0,3/4) (0,3/20)%0A(0,0) (0,1/4) (0,-3/4) (0,-1/4)%0A(0,0) (0,1/4) (0,-3/4) (0,1/4)%0A(0,0) (0,1/4) (0,-1/4) (0,-3/4)%0A(0,0) (0,1/4) (0,-1/4) (0,3/4)%0A(0,0) (0,1/4) (0,1/4) (0,-3/4)%0A(0,0) (0,1/4) (0,1/4) (0,3/4)%0A(0,0) (0,1/4) (0,3/4) (0,-1/4)%0A(0,0) (0,1/4) (0,3/4) (0,1/4)%0A(0,0) (0,19/60) (0,-37/60) (0,-19/60)%0A(0,0) (0,19/60) (0,-37/60) (0,19/60)%0A(0,0) (0,19/60) (0,-19/60) (0,-37/60)%0A(0,0) (0,19/60) (0,-19/60) (0,37/60)%0A(0,0) (0,19/60) (0,19/60) (0,-37/60)%0A(0,0) (0,19/60) (0,19/60) (0,37/60)%0A(0,0) (0,19/60) (0,37/60) (0,-19/60)%0A(0,0) (0,19/60) (0,37/60) (0,19/60)%0A(0,0) (0,7/20) (0,-13/20) (0,-3/20)%0A(0,0) (0,7/20) (0,-13/20) (0,3/20)%0A(0,0) (0,7/20) (0,-3/20) (0,-13/20)%0A(0,0) (0,7/20) (0,-3/20) (0,13/20)%0A(0,0) (0,7/20) (0,3/20) (0,-13/20)%0A(0,0) (0,7/20) (0,3/20) (0,13/20)%0A(0,0) (0,7/20) (0,13/20) (0,-3/20)%0A(0,0) (0,7/20) (0,13/20) (0,3/20)%0A(0,0) (0,9/20) (0,-3/20) (0,-3/20)%0A(0,0) (0,9/20) (0,-3/20) (0,3/20)%0A(0,0) (0,9/20) (0,3/20) (0,-3/20)%0A(0,0) (0,9/20) (0,3/20) (0,3/20)%0A(0,0) (0,37/60) (0,-19/60) (0,-19/60)%0A(0,0) (0,37/60) (0,-19/60) (0,19/60)%0A(0,0) (0,37/60) (0,19/60) (0,-19/60)%0A(0,0) (0,37/60) (0,19/60) (0,19/60)%0A(0,0) (0,13/20) (0,-7/20) (0,-3/20)%0A(0,0) (0,13/20) (0,-7/20) (0,3/20)%0A(0,0) (0,13/20) (0,-3/20) (0,-7/20)%0A(0,0) (0,13/20) (0,-3/20) (0,7/20)%0A(0,0) (0,13/20) (0,3/20) (0,-7/20)%0A(0,0) (0,13/20) (0,3/20) (0,7/20)%0A(0,0) (0,13/20) (0,7/20) (0,-3/20)%0A(0,0) (0,13/20) (0,7/20) (0,3/20)%0A(0,0) (0,3/4) (0,-1/4) (0,-1/4)%0A(0,0) (0,3/4) (0,-1/4) (0,1/4)%0A(0,0) (0,3/4) (0,-3/20) (0,-3/20)%0A(0,0) (0,3/4) (0,-3/20) (0,3/20)%0A(0,0) (0,3/4) (0,3/20) (0,-3/20)%0A(0,0) (0,3/4) (0,3/20) (0,3/20)%0A(0,0) (0,3/4) (0,1/4) (0,-1/4)%0A(0,0) (0,3/4) (0,1/4) (0,1/4)%0A%0A%0A%0A0%0A%0A%0A%0A192%0A4 0 2 4 6 %0A4 0 8 9 1 %0A4 0 10 26 42 %0A4 1 3 2 0 %0A4 1 9 25 41 %0A4 1 11 13 7 %0A4 2 20 22 4 %0A4 3 21 20 2 %0A4 4 22 23 5 %0A4 5 23 21 3 %0A4 6 4 5 7 %0A4 6 12 10 0 %0A4 6 14 30 46 %0A4 7 5 3 1 %0A4 7 13 29 45 %0A4 7 15 14 6 %0A4 8 20 21 9 %0A4 11 21 23 13 %0A4 12 22 20 10 %0A4 15 23 22 14 %0A4 16 0 42 34 %0A4 16 20 52 32 %0A4 17 1 41 33 %0A4 17 21 58 35 %0A4 18 6 46 38 %0A4 18 22 61 36 %0A4 19 7 45 37 %0A4 19 23 67 39 %0A4 20 8 24 52 %0A4 21 11 27 58 %0A4 22 12 28 61 %0A4 23 15 31 67 %0A4 25 53 52 24 %0A4 26 57 61 28 %0A4 29 62 58 27 %0A4 30 66 67 31 %0A4 32 40 0 16 %0A4 32 52 57 34 %0A4 33 41 43 35 %0A4 33 53 21 17 %0A4 34 42 40 32 %0A4 34 57 20 16 %0A4 35 43 1 17 %0A4 35 58 53 33 %0A4 36 44 6 18 %0A4 36 61 66 38 %0A4 37 45 47 39 %0A4 37 62 23 19 %0A4 38 46 44 36 %0A4 38 66 22 18 %0A4 39 47 7 19 %0A4 39 67 62 37 %0A4 40 24 8 0 %0A4 40 48 49 41 %0A4 40 50 74 96 %0A4 41 25 24 40 %0A4 41 49 73 97 %0A4 41 51 55 43 %0A4 42 26 28 44 %0A4 42 54 50 40 %0A4 42 56 80 98 %0A4 43 27 11 1 %0A4 43 55 79 99 %0A4 43 59 63 45 %0A4 44 28 12 6 %0A4 44 60 56 42 %0A4 44 64 88 100 %0A4 45 29 27 43 %0A4 45 63 87 101 %0A4 45 65 69 47 %0A4 46 30 31 47 %0A4 46 68 64 44 %0A4 46 70 94 102 %0A4 47 31 15 7 %0A4 47 69 93 103 %0A4 47 71 70 46 %0A4 48 52 53 49 %0A4 49 53 77 73 %0A4 50 52 76 74 %0A4 52 50 54 57 %0A4 53 25 9 21 %0A4 55 58 82 79 %0A4 56 57 81 80 %0A4 57 26 10 20 %0A4 58 55 51 53 %0A4 59 58 62 63 %0A4 60 61 57 56 %0A4 61 64 68 66 %0A4 62 29 13 23 %0A4 63 62 86 87 %0A4 64 61 85 88 %0A4 66 30 14 22 %0A4 67 69 65 62 %0A4 69 67 91 93 %0A4 70 66 90 94 %0A4 71 67 66 70 %0A4 72 76 52 48 %0A4 73 77 76 72 %0A4 75 77 53 51 %0A4 76 112 128 120 %0A4 77 75 79 82 %0A4 78 81 57 54 %0A4 80 81 85 84 %0A4 81 78 74 76 %0A4 82 115 131 121 %0A4 83 82 58 59 %0A4 84 85 61 60 %0A4 85 116 132 122 %0A4 86 89 93 91 %0A4 87 86 82 83 %0A4 89 86 62 65 %0A4 90 92 88 85 %0A4 91 119 135 123 %0A4 92 90 66 68 %0A4 94 90 91 95 %0A4 95 91 67 71 %0A4 96 72 48 40 %0A4 96 74 78 98 %0A4 96 112 113 97 %0A4 97 73 72 96 %0A4 97 75 51 41 %0A4 97 113 129 137 %0A4 98 78 54 42 %0A4 98 80 84 100 %0A4 98 114 130 136 %0A4 99 79 75 97 %0A4 99 83 59 43 %0A4 99 115 117 101 %0A4 100 84 60 44 %0A4 100 88 92 102 %0A4 100 116 114 98 %0A4 101 87 83 99 %0A4 101 89 65 45 %0A4 101 117 133 143 %0A4 102 92 68 46 %0A4 102 94 95 103 %0A4 102 118 134 142 %0A4 103 93 89 101 %0A4 103 95 71 47 %0A4 103 119 118 102 %0A4 104 76 120 124 %0A4 104 96 98 106 %0A4 105 77 82 107 %0A4 105 97 137 125 %0A4 106 81 76 104 %0A4 106 98 136 124 %0A4 107 82 121 125 %0A4 107 99 97 105 %0A4 108 85 122 126 %0A4 108 100 102 110 %0A4 109 86 91 111 %0A4 109 101 143 127 %0A4 110 90 85 108 %0A4 110 102 142 126 %0A4 111 91 123 127 %0A4 111 103 101 109 %0A4 112 76 77 113 %0A4 115 82 86 117 %0A4 116 85 81 114 %0A4 119 91 90 118 %0A4 120 130 114 81 %0A4 121 129 113 77 %0A4 122 134 118 90 %0A4 123 133 117 86 %0A4 124 120 81 106 %0A4 124 136 96 104 %0A4 125 121 77 105 %0A4 125 137 99 107 %0A4 126 122 90 110 %0A4 126 142 100 108 %0A4 127 123 86 109 %0A4 127 143 103 111 %0A4 129 121 120 128 %0A4 130 120 122 132 %0A4 133 123 121 131 %0A4 134 122 123 135 %0A4 136 128 112 96 %0A4 136 130 132 142 %0A4 136 138 139 137 %0A4 137 129 128 136 %0A4 137 131 115 99 %0A4 137 139 141 143 %0A4 138 120 121 139 %0A4 139 121 123 141 %0A4 140 122 120 138 %0A4 141 123 122 140 %0A4 142 132 116 100 %0A4 142 134 135 143 %0A4 142 140 138 136 %0A4 143 133 131 137 %0A4 143 135 119 103 %0A4 143 141 140 142 %0A%0A%0A%0A0%0A%0A%0A"; 1276 1277// src/worker/legacy/resources/com/vzome/core/parts/root2Lifelike/green.vef 1278var green_default8 = "data:text/plain;
1278charset=utf-8,vZome VEF 6 field rootTwo%0A%0A25%0A(0,0) (0,3/20) (0,-3/20) (0,9/20)%0A(0,0) (0,3/20) (0,3/20) (0,9/20)%0A(0,0) (0,1/4) (0,-1/4) (0,3/4)%0A(0,0) (0,1/4) (0,1/4) (0,3/4)%0A(0,0) (0,7/20) (0,-3/20) (0,13/20)%0A(0,0) (0,7/20) (0,3/20) (0,13/20)%0A(0,0) (0,9/20) (0,-3/20) (0,3/20)%0A(0,0) (0,9/20) (0,3/20) (0,3/20)%0A(0,0) (0,13/20) (0,-3/20) (0,7/20)%0A(0,0) (0,13/20) (0,3/20) (0,7/20)%0A(0,0) (0,3/4) (0,-1/4) (0,1/4)%0A(0,0) (0,3/4) (0,1/4) (0,1/4)%0A(0,0) (2,-3/4) (0,-1/4) (2,-1/4)%0A(0,0) (2,-3/4) (0,1/4) (2,-1/4)%0A(0,0) (2,-13/20) (0,-3/20) (2,-7/20)%0A(0,0) (2,-13/20) (0,3/20) (2,-7/20)%0A(0,0) (2,-9/20) (0,-3/20) (2,-3/20)%0A(0,0) (2,-9/20) (0,3/20) (2,-3/20)%0A(0,0) (2,-7/20) (0,-3/20) (2,-13/20)%0A(0,0) (2,-7/20) (0,3/20) (2,-13/20)%0A(0,0) (2,-1/4) (0,-1/4) (2,-3/4)%0A(0,0) (2,-1/4) (0,1/4) (2,-3/4)%0A(0,0) (2,-3/20) (0,-3/20) (2,-9/20)%0A(0,0) (2,-3/20) (0,3/20) (2,-9/20)%0A(0,0) (2,0) (0,0) (2,0)%0A%0A%0A%0A0%0A%0A%0A%0A22%0A4 0 1 7 6 %0A4 0 4 5 1 %0A4 1 5 9 7 %0A4 2 10 20 12 %0A4 3 2 12 13 %0A4 3 5 4 2 %0A4 5 3 11 9 %0A4 6 8 4 0 %0A4 7 9 8 6 %0A4 8 10 2 4 %0A4 10 8 9 11 %0A4 10 11 21 20 %0A4 11 3 13 21 %0A4 14 12 20 18 %0A4 15 13 12 14 %0A4 16 14 18 22 %0A4 17 15 14 16 %0A4 17 16 22 23 %0A4 18 20 21 19 %0A4 19 21 13 15 %0A4 22 18 19 23 %0A4 23 19 15 17 %0A%0A%0A%0A13%0A12 13 14 15 16 17 18 19 20 21 %0A22 23 24 %0A%0A%0Atip 24%0A%0A"; 1279
1280// src/worker/legacy/resources/com/vzome/core/parts/root2Lifelike/index.js 1281var shapes12 = { 1282 "blue": blue_default9, 1283 "connector": connector_default11, 1284 "green": green_default8 1285}; 1286var root2Lifelike_default = shapes12; 1287 1288// src/worker/legacy/resources/com/vzome/core/parts/rootThreeOctaSmall/blue.vef 1289var blue_default10 = "data:text/plain;charset=utf-8,vZome VEF 6 field rootThree%0A scale (1/3,0) %0A%0A11%0A(0,0) (0,2) (0,0) (0,-2/3) %0A(0,0) (0,2/3) (0,0) (0,0) %0A(0,0) (0,2) (0,2/3) (0,0) %0A(0,0) (0,2) (0,-2/3) (0,0) %0A(0,0) (0,2) (0,0) (0,2/3) %0A(0,0) (6,-2) (0,0) (0,-2/3) %0A(0,0) (6,-2) (0,-2/3) (0,0) %0A(0,0) (6,-2) (0,0) (0,2/3) %0A(0,0) (6,-2) (0,2/3) (0,0) %0A(0,0) (6,-2/3) (0,0) (0,0) %0A(0,0) (6,0) (0,0) (0,0) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A3 0 1 2%0A3 3 4 1%0A4 3 0 5 6%0A4 6 7 4 3%0A3 8 7 9%0A3 6 5 9%0A3 9 5 8%0A3 1 0 3%0A3 9 7 6%0A4 7 8 2 4%0A4 0 2 8 5%0A3 4 2 1%0A%0A%0A%0A6%0A 6 9 8 5 10 7%0A%0Atip 10%0A"; 1290 1291// src/worker/legacy/resources/com/vzome/core/parts/rootThreeOctaSmall/connector.vef 1292var connector_default12 = "data:text/plain;charset=utf-8,vZome VEF 6 field rootThree%0A scale (1/3,0) %0A%0A6%0A(0,0) (0,0) (0,2/3) (0,0) %0A(0,0) (0,-2/3) (0,0) (0,0) %0A(0,0) (0,0) (0,0) (0,2/3) %0A(0,0) (0,2/3) (0,0) (0,0) %0A(0,0) (0,0) (0,0) (0,-2/3) %0A(0,0) (0,0) (0,-2/3) (0,0) %0A%0A%0A%0A0%0A%0A%0A%0A8%0A3 0 1 2%0A3 0 3 4%0A3 2 3 0%0A3 5 1 4%0A3 4 1 0%0A3 4 3 5%0A3 5 3 2%0A3 2 1 5%0A%0A%0A%0A0%0A%0A%0A"; 1293 1294// src/worker/legacy/resources/com/vzome/core/parts/rootThreeOctaSmall/green.vef 1295var green_default9 = "data:text/plain;charset=utf-8,vZome VEF 6 field rootThree%0A scale (1/3,0) %0A%0A11%0A(0,0) (6,-1/3) (0,0) (6,-1/3) %0A(0,0) (16/3,-2/3) (0,0) (16/3,0) %0A(0,0) (6,0) (0,0) (6,0) %0A(0,0) (2/3,0) (0,0) (2/3,2/3) %0A(0,0) (2/3,0) (0,-2/3) (2/3,0) %0A(0,0) (16/3,0) (0,-2/3) (16/3,0) %0A(0,0) (2/3,2/3) (0,0) (2/3,0) %0A(0,0) (16/3,0) (0,0) (16/3,-2/3) %0A(0,0) (2/3,0) (0,2/3) (2/3,0) %0A(0,0) (0,1/3) (0,0) (0,1/3) %0A(0,0) (16/3,0) (0,2/3) (16/3,0) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 3 4 5 1%0A4 5 4 6 7%0A3 5 7 0%0A3 3 8 9%0A3 6 4 9%0A3 10 1 0%0A3 9 4 3%0A4 1 10 8 3%0A3 0 1 5%0A3 0 7 10%0A3 9 8 6%0A4 7 6 8 10%0A%0A%0A%0A6%0A 0 1 2 5 7 10%0A%0Atip 2%0A"; 1296 1297// src/worker/legacy/resources/com/vzome/core/parts/rootThreeOctaSmall/red.vef 1298var red_default7 = "data:text/plain;charset=utf-8,vZome VEF 6 field rootThree%0A scale (1/3,0) %0A%0A11%0A(0,0) (4,8) (0,4) (0,2/3) %0A(0,0) (1/6,1/3) (0,1/6) (0,0) %0A(0,0) (1/2,1) (0,1/2) (0,2/3) %0A(0,0) (1/2,1) (0,7/6) (0,0) %0A(0,0) (4,8) (0,4) (0,-2/3) %0A(0,0) (4,8) (0,14/3) (0,0) %0A(0,0) (13/3,26/3) (0,13/3) (0,0) %0A(0,0) (4,8) (0,10/3) (0,0) %0A(0,0) (1/2,1) (0,-1/6) (0,0) %0A(0,0) (1/2,1) (0,1/2) (0,-2/3) %0A(0,0) (9/2,9) (0,9/2) (0,0) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A3 1 2 3%0A3 4 5 6%0A4 7 0 2 8%0A3 1 9 8%0A3 0 7 6%0A4 0 5 3 2%0A4 5 4 9 3%0A3 6 5 0%0A3 3 9 1%0A4 8 9 4 7%0A3 6 7 4%0A3 8 2 1%0A%0A%0A%0A6%0A 0 6 4 5 7 10%0A%0Atip 10%0A"; 1299 1300// src/worker/legacy/resources/com/vzome/core/parts/rootThreeOctaSmall/yellow.vef 1301var yellow_default7 = "data:text/plain;charset=utf-8,vZome VEF 6 field rootThree%0A scale (1/3,0) %0A%0A9%0A(0,0) (0,1) (0,2/3) (0,1/3) %0A(0,0) (0,2/3) (0,1/3) (0,1) %0A(0,0) (0,2/9) (0,2/9) (0,2/9) %0A(0,0) (1,-2/3) (1,-1) (1,-1/3) %0A(0,0) (1,-1/3) (1,-2/3) (1,-1) %0A(0,0) (1,0) (1,0) (1,0) %0A(0,0) (0,1/3) (0,1) (0,2/3) %0A(0,0) (1,-1) (1,-1/3) (1,-2/3) %0A(0,0) (1,-2/9) (1,-2/9) (1,-2/9) %0A%0A%0A%0A0%0A%0A%0A%0A9%0A3 0 1 2%0A4 3 1 0 4%0A4 6 7 4 0%0A4 7 6 1 3%0A3 3 8 7%0A3 1 6 2%0A3 7 8 4%0A3 4 8 3%0A3 2 6 0%0A%0A%0A%0A5%0A 5 8 3 7 4%0A%0Atip 5%0A"; 1302
1303// src/worker/legacy/resources/com/vzome/core/parts/rootThreeOctaSmall/index.js 1304var shapes13 = { 1305 "blue": blue_default10, 1306 "connector": connector_default12, 1307 "green": green_default9, 1308 "red": red_default7, 1309 "yellow": yellow_default7 1310}; 1311var rootThreeOctaSmall_default = shapes13; 1312 1313// src/worker/legacy/resources/com/vzome/core/parts/rootTwo/blue.vef 1314var blue_default11 = "data:text/plain;charset=utf-8,vZome VEF 6 field rootTwo%0A scale (1/2,0) %0A%0A9%0A(0,0) (3/4,0) (-1/4,0) (-1/4,0) %0A(0,0) (3/4,0) (1/4,0) (-1/4,0) %0A(0,0) (-3/4,8) (1/4,0) (-1/4,0) %0A(0,0) (-3/4,8) (-1/4,0) (-1/4,0) %0A(0,0) (0,8) (0,0) (0,0) %0A(0,0) (-3/4,8) (1/4,0) (1/4,0) %0A(0,0) (-3/4,8) (-1/4,0) (1/4,0) %0A(0,0) (3/4,0) (1/4,0) (1/4,0) %0A(0,0) (3/4,0) (-1/4,0) (1/4,0) %0A%0A%0A%0A0%0A%0A%0A%0A4%0A4 0 1 2 3%0A4 6 5 7 8%0A4 8 0 3 6%0A4 2 1 7 5%0A%0A%0A%0A5%0A 4 5 6 2 3%0A%0Atip 4%0A"; 1315 1316// src/worker/legacy/resources/com/vzome/core/parts/rootTwo/brown.vef 1317var brown_default4 = "data:text/plain;charset=utf-8,vZome VEF 6 field rootTwo%0A scale (1/2,0) %0A%0A15%0A(0,0) (1/4,0) (1/4,0) (3/4,0) %0A(0,0) (3/4,0) (1/4,0) (1/4,0) %0A(0,0) (5/4,0) (3/4,0) (2,0) %0A(0,0) (13/4,0) (11/4,0) (6,0) %0A(0,0) (13/4,0) (15/4,0) (31/4,0) %0A(0,0) (11/4,0) (11/4,0) (6,0) %0A(0,0) (15/4,0) (13/4,0) (31/4,0) %0A(0,0) (3/4,0) (3/4,0) (2,0) %0A(0,0) (3/4,0) (5/4,0) (2,0) %0A(0,0) (5/4,0) (5/4,0) (2,0) %0A(0,0) (13/4,0) (13/4,0) (6,0) %0A(0,0) (4,0) (4,0) (8,0) %0A(0,0) (11/4,0) (13/4,0) (6,0) %0A(0,0) (1/4,0) (3/4,0) (1/4,0) %0A(0,0) (15/4,0) (15/4,0) (29/4,0) %0A%0A%0A%0A0%0A%0A%0A%0A18%0A3 0 1 2%0A3 4 5 6%0A3 7 8 0%0A4 3 2 9 10%0A4 12 10 9 8%0A4 7 2 3 5%0A4 5 12 8 7%0A3 8 9 13%0A3 4 14 12%0A3 7 0 2%0A3 4 12 5%0A3 0 8 13%0A3 13 9 1%0A3 14 10 12%0A3 5 3 6%0A3 6 3 14%0A3 2 1 9%0A3 14 3 10%0A%0A%0A%0A8%0A 3 11 10 14 12 6 5 4%0A%0Atip 11%0A"; 1318 1319// src/worker/legacy/resources/com/vzome/core/parts/rootTwo/connector.vef 1320var connector_default13 = "data:text/plain;charset=utf-8,vZome VEF 6 field rootTwo%0A scale (1/2,0) %0A%0A24%0A(0,0) (1/4,0) (1/4,0) (-3/4,0) %0A(0,0) (1/4,0) (-1/4,0) (-3/4,0) %0A(0,0) (-1/4,0) (-1/4,0) (-3/4,0) %0A(0,0) (-1/4,0) (1/4,0) (-3/4,0) %0A(0,0) (-1/4,0) (-3/4,0) (-1/4,0) %0A(0,0) (-3/4,0) (-1/4,0) (-1/4,0) %0A(0,0) (3/4,0) (-1/4,0) (-1/4,0) %0A(0,0) (1/4,0) (-3/4,0) (-1/4,0) %0A(0,0) (1/4,0) (-1/4,0) (3/4,0) %0A(0,0) (1/4,0) (1/4,0) (3/4,0) %0A(0,0) (-1/4,0) (1/4,0) (3/4,0) %0A(0,0) (-1/4,0) (-1/4,0) (3/4,0) %0A(0,0) (3/4,0) (1/4,0) (1/4,0) %0A(0,0) (1/4,0) (3/4,0) (1/4,0) %0A(0,0) (-1/4,0) (-3/4,0) (1/4,0) %0A(0,0) (-3/4,0) (-1/4,0) (1/4,0) %0A(0,0) (1/4,0) (-3/4,0) (1/4,0) %0A(0,0) (-3/4,0) (1/4,0) (1/4,0) %0A(0,0) (-1/4,0) (3/4,0) (1/4,0) %0A(0,0) (-1/4,0) (3/4,0) (-1/4,0) %0A(0,0) (-3/4,0) (1/4,0) (-1/4,0) %0A(0,0) (1/4,0) (3/4,0) (-1/4,0) %0A(0,0) (3/4,0) (-1/4,0) (1/4,0) %0A(0,0) (3/4,0) (1/4,0) (-1/4,0) %0A%0A%0A%0A0%0A%0A%0A%0A26%0A4 0 1 2 3%0A3 4 5 2%0A3 6 7 1%0A4 8 9 10 11%0A3 12 13 9%0A4 5 4 14 15%0A4 7 16 14 4%0A4 4 2 1 7%0A4 17 18 19 20%0A4 18 10 9 13%0A4 13 21 19 18%0A4 11 14 16 8%0A3 22 8 16%0A4 15 17 20 5%0A3 18 17 10%0A4 22 16 7 6%0A4 15 11 10 17%0A4 6 1 0 23%0A3 11 15 14%0A4 23 21 13 12%0A3 3 20 19%0A4 20 3 2 5%0A3 23 0 21%0A4 3 19 21 0%0A4 12 22 6 23%0A4 12 9 8 22%0A%0A%0A%0A0%0A%0A%0A"; 1321 1322// src/worker/legacy/resources/com/vzome/core/parts/rootTwo/green.vef 1323var green_default10 = "data:text/plain;charset=utf-8,vZome VEF 6 field rootTwo%0A scale (1/2,0) %0A%0A9%0A(0,0) (-3/4,8) (-1/4,0) (-1/4,8) %0A(0,0) (3/4,0) (1/4,0) (1/4,0) %0A(0,0) (1/4,0) (1/4,0) (3/4,0) %0A(0,0) (-3/4,8) (1/4,0) (-1/4,8) %0A(0,0) (-1/4,8) (1/4,0) (-3/4,8) %0A(0,0) (0,8) (0,0) (0,8) %0A(0,0) (3/4,0) (-1/4,0) (1/4,0) %0A(0,0) (-1/4,8) (-1/4,0) (-3/4,8) %0A(0,0) (1/4,0) (-1/4,0) (3/4,0) %0A%0A%0A%0A0%0A%0A%0A%0A4%0A4 1 2 3 4%0A4 6 1 4 7%0A4 0 3 2 8%0A4 8 6 7 0%0A%0A%0A%0A5%0A 0 5 3 7 4%0A%0Atip 5%0A"; 1324 1325// src/worker/legacy/resources/com/vzome/core/parts/rootTwo/yellow.vef 1326var yellow_default8 = "data:text/plain;
1326charset=utf-8,vZome VEF 6 field rootTwo%0A scale (1/2,0) %0A%0A13%0A(0,0) (3,1/2) (3,-1/2) (3,0) %0A(0,0) (3,0) (3,1/2) (3,-1/2) %0A(0,0) (15/4,0) (15/4,0) (13/4,0) %0A(0,0) (1,0) (1,1/2) (1,-1/2) %0A(0,0) (3/4,0) (1/4,0) (1/4,0) %0A(0,0) (1/4,0) (3/4,0) (1/4,0) %0A(0,0) (3,-1/2) (3,0) (3,1/2) %0A(0,0) (4,0) (4,0) (4,0) %0A(0,0) (1,-1/2) (1,0) (1,1/2) %0A(0,0) (1,1/2) (1,-1/2) (1,0) %0A(0,0) (15/4,0) (13/4,0) (15/4,0) %0A(0,0) (1/4,0) (1/4,0) (3/4,0) %0A(0,0) (13/4,0) (15/4,0) (15/4,0) %0A%0A%0A%0A0%0A%0A%0A%0A15%0A3 0 1 2%0A3 3 4 5%0A4 0 6 8 9%0A3 9 8 11%0A3 2 1 12%0A3 3 9 4%0A3 9 11 4%0A3 12 1 6%0A3 0 10 6%0A4 1 0 9 3%0A3 8 3 5%0A3 8 5 11%0A3 10 12 6%0A3 0 2 10%0A4 6 1 3 8%0A%0A%0A%0A7%0A 1 2 0 6 7 10 12%0A%0Atip 7%0A"; 1327
1328// src/worker/legacy/resources/com/vzome/core/parts/rootTwo/index.js 1329var shapes14 = { 1330 "blue": blue_default11, 1331 "brown": brown_default4, 1332 "connector": connector_default13, 1333 "green": green_default10, 1334 "yellow": yellow_default8 1335}; 1336var rootTwo_default = shapes14; 1337 1338// src/worker/legacy/resources/com/vzome/core/parts/rootTwoBig/connector.vef 1339var connector_default14 = "data:text/plain;charset=utf-8,vZome VEF 6 field rootTwo%0A scale (1/2,0) %0A%0A48%0A(0,0) (0,0) (0,1/2) (1/2,1/2) %0A(0,0) (0,1/2) (0,0) (1/2,1/2) %0A(0,0) (1/4,1/2) (1/4,0) (1/4,1/2) %0A(0,0) (1/4,0) (1/4,1/2) (1/4,1/2) %0A(0,0) (1/2,1/2) (0,0) (0,-1/2) %0A(0,0) (1/4,1/2) (-1/4,0) (-1/4,-1/2) %0A(0,0) (0,1/2) (0,0) (-1/2,-1/2) %0A(0,0) (1/4,1/2) (1/4,0) (-1/4,-1/2) %0A(0,0) (1/4,1/2) (-1/4,-1/2) (-1/4,0) %0A(0,0) (1/4,0) (-1/4,-1/2) (-1/4,-1/2) %0A(0,0) (0,-1/2) (-1/2,-1/2) (0,0) %0A(0,0) (0,0) (-1/2,-1/2) (0,1/2) %0A(0,0) (-1/4,0) (-1/4,-1/2) (1/4,1/2) %0A(0,0) (-1/4,-1/2) (-1/4,-1/2) (1/4,0) %0A(0,0) (0,0) (-1/2,-1/2) (0,-1/2) %0A(0,0) (-1/4,0) (-1/4,-1/2) (-1/4,-1/2) %0A(0,0) (0,0) (0,-1/2) (-1/2,-1/2) %0A(0,0) (-1/4,-1/2) (1/4,1/2) (1/4,0) %0A(0,0) (-1/4,-1/2) (1/4,0) (1/4,1/2) %0A(0,0) (-1/4,0) (1/4,1/2) (1/4,1/2) %0A(0,0) (0,1/2) (-1/2,-1/2) (0,0) %0A(0,0) (0,1/2) (1/2,1/2) (0,0) %0A(0,0) (0,0) (1/2,1/2) (0,1/2) %0A(0,0) (1/4,1/2) (1/4,1/2) (1/4,0) %0A(0,0) (-1/2,-1/2) (0,-1/2) (0,0) %0A(0,0) (-1/2,-1/2) (0,0) (0,-1/2) %0A(0,0) (-1/4,-1/2) (-1/4,0) (-1/4,-1/2) %0A(0,0) (-1/4,-1/2) (-1/4,-1/2) (-1/4,0) %0A(0,0) (-1/4,-1/2) (-1/4,0) (1/4,1/2) %0A(0,0) (-1/2,-1/2) (0,1/2) (0,0) %0A(0,0) (0,-1/2) (1/2,1/2) (0,0) %0A(0,0) (-1/4,-1/2) (1/4,1/2) (-1/4,0) %0A(0,0) (1/2,1/2) (0,0) (0,1/2) %0A(0,0) (1/4,1/2) (-1/4,0) (1/4,1/2) %0A(0,0) (0,0) (1/2,1/2) (0,-1/2) %0A(0,0) (1/4,1/2) (1/4,1/2) (-1/4,0) %0A(0,0) (1/4,0) (1/4,1/2) (-1/4,-1/2) %0A(0,0) (0,0) (0,-1/2) (1/2,1/2) %0A(0,0) (1/4,0) (-1/4,-1/2) (1/4,1/2) %0A(0,0) (-1/4,-1/2) (1/4,0) (-1/4,-1/2) %0A(0,0) (-1/4,0) (1/4,1/2) (-1/4,-1/2) %0A(0,0) (-1/2,-1/2) (0,0) (0,1/2) %0A(0,0) (0,-1/2) (0,0) (1/2,1/2) %0A(0,0) (0,-1/2) (0,0) (-1/2,-1/2) %0A(0,0) (1/2,1/2) (0,1/2) (0,0) %0A(0,0) (0,0) (0,1/2) (-1/2,-1/2) %0A(0,0) (1/2,1/2) (0,-1/2) (0,0) %0A(0,0) (1/4,1/2) (-1/4,-1/2) (1/4,0) %0A%0A%0A%0A0%0A%0A%0A%0A50%0A4 0 1 2 3%0A4 4 5 6 7%0A3 5 8 9%0A4 10 11 12 13%0A4 14 15 16 9%0A3 17 18 19%0A4 10 14 20 11%0A4 21 22 3 23%0A4 24 25 26 27%0A3 28 13 12%0A4 29 17 30 31%0A4 32 2 1 33%0A4 34 21 35 36%0A3 35 7 36%0A4 1 37 38 33%0A3 39 31 40%0A4 24 27 10 13%0A4 29 25 24 41%0A4 42 37 1 0%0A4 30 34 40 31%0A4 43 16 15 26%0A4 44 35 21 23%0A4 22 30 17 19%0A4 42 0 19 18%0A4 32 44 23 2%0A4 14 10 27 15%0A4 43 45 6 16%0A4 46 32 33 47%0A4 16 6 5 9%0A4 37 42 28 12%0A4 4 46 8 5%0A4 46 4 44 32%0A4 45 43 39 40%0A4 41 24 13 28%0A4 46 47 20 8%0A4 11 20 47 38%0A4 37 12 11 38%0A4 6 45 36 7%0A4 45 40 34 36%0A3 27 26 15%0A4 25 39 43 26%0A4 41 28 42 18%0A4 22 19 0 3%0A4 20 14 9 8%0A4 44 4 7 35%0A4 29 41 18 17%0A3 2 23 3%0A4 30 22 21 34%0A4 25 29 31 39%0A3 47 33 38%0A%0A%0A%0A0%0A%0A%0A"; 1340 1341// src/worker/legacy/resources/com/vzome/core/parts/rootTwoBig/yellow.vef 1342var yellow_default9 = "data:text/plain;charset=utf-8,vZome VEF 6 field rootTwo%0A scale (1/2,0) %0A%0A13%0A(0,0) (0,3) (0,11/4) (0,13/4) %0A(0,0) (0,11/4) (0,13/4) (0,3) %0A(0,0) (0,3/4) (0,5/4) (0,1) %0A(0,0) (0,1) (0,3/4) (0,5/4) %0A(0,0) (-1/4,7/2) (-1/4,7/2) (-1/4,4) %0A(0,0) (-1/4,7/2) (-1/4,4) (-1/4,7/2) %0A(0,0) (1/4,0) (1/4,1/2) (1/4,1/2) %0A(0,0) (1/4,1/2) (1/4,0) (1/4,1/2) %0A(0,0) (-1/4,4) (-1/4,7/2) (-1/4,7/2) %0A(0,0) (0,13/4) (0,3) (0,11/4) %0A(0,0) (0,5/4) (0,1) (0,3/4) %0A(0,0) (1/4,1/2) (1/4,1/2) (1/4,0) %0A(0,0) (0,4) (0,4) (0,4) %0A%0A%0A%0A0%0A%0A%0A%0A15%0A4 0 1 2 3%0A3 4 5 1%0A3 6 7 3%0A3 4 0 8%0A3 8 9 5%0A4 10 2 1 9%0A3 3 7 10%0A3 0 9 8%0A3 2 10 11%0A3 2 6 3%0A4 9 0 3 10%0A3 6 2 11%0A3 0 4 1%0A3 11 10 7%0A3 5 9 1%0A%0A%0A%0A7%0A 1 5 0 9 4 8 12%0A%0Atip 12%0A"; 1343
1344// src/worker/legacy/resources/com/vzome/core/parts/rootTwoBig/index.js 1345var shapes15 = { 1346 "connector": connector_default14, 1347 "yellow": yellow_default9 1348}; 1349var rootTwoBig_default = shapes15; 1350 1351// src/worker/legacy/resources/com/vzome/core/parts/rootTwoSmall/blue.vef 1352var blue_default12 = "data:text/plain;charset=utf-8,vZome VEF 6 field rootTwo%0A scale (1/2,0) %0A%0A11%0A(0,0) (1/2,0) (0,0) (0,0) %0A(0,0) (3/2,0) (0,0) (-1/2,0) %0A(0,0) (3/2,0) (-1/2,0) (0,0) %0A(0,0) (-3/2,8) (0,0) (1/2,0) %0A(0,0) (-3/2,8) (-1/2,0) (0,0) %0A(0,0) (3/2,0) (0,0) (1/2,0) %0A(0,0) (-3/2,8) (0,0) (-1/2,0) %0A(0,0) (-1/2,8) (0,0) (0,0) %0A(0,0) (-3/2,8) (1/2,0) (0,0) %0A(0,0) (3/2,0) (1/2,0) (0,0) %0A(0,0) (0,8) (0,0) (0,0) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A3 0 1 2%0A4 4 3 5 2%0A4 3 8 9 5%0A4 8 6 1 9%0A3 0 9 1%0A4 4 2 1 6%0A3 3 7 8%0A3 0 2 5%0A3 7 3 4%0A3 7 4 6%0A3 0 5 9%0A3 7 6 8%0A%0A%0A%0A6%0A 3 6 7 8 10 4%0A%0Atip 10%0A"; 1353 1354// src/worker/legacy/resources/com/vzome/core/parts/rootTwoSmall/brown.vef 1355var brown_default5 = "data:text/plain;charset=utf-8,vZome VEF 6 field rootTwo%0A scale (1/2,0) %0A%0A11%0A(0,0) (4,0) (4,0) (8,0) %0A(0,0) (27/8,-1/2) (31/8,-1/2) (31/4,-1) %0A(0,0) (35/8,-1/2) (31/8,-1/2) (31/4,-1) %0A(0,0) (31/8,-1/2) (27/8,-1/2) (31/4,-1) %0A(0,0) (1/8,1/2) (-3/8,1/2) (1/4,1) %0A(0,0) (5/8,1/2) (1/8,1/2) (1/4,1) %0A(0,0) (-3/8,1/2) (1/8,1/2) (1/4,1) %0A(0,0) (31/8,-1/2) (35/8,-1/2) (31/4,-1) %0A(0,0) (1/8,1/2) (5/8,1/2) (1/4,1) %0A(0,0) (31/8,0) (31/8,0) (31/4,0) %0A(0,0) (1/8,0) (1/8,0) (1/4,0) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 2 3 4 5%0A4 6 1 7 8%0A3 1 3 9%0A3 10 6 8%0A4 4 3 1 6%0A3 2 7 9%0A3 9 3 2%0A4 8 7 2 5%0A3 10 4 6%0A3 10 8 5%0A3 9 7 1%0A3 10 5 4%0A%0A%0A%0A6%0A 0 1 9 3 2 7%0A%0Atip 0%0A"; 1356 1357// src/worker/legacy/resources/com/vzome/core/parts/rootTwoSmall/connector.vef 1358var connector_default15 = "data:text/plain;charset=utf-8,vZome VEF 6 field rootTwo%0A scale (1/2,0) %0A%0A6%0A(0,0) (0,0) (1/2,0) (0,0) %0A(0,0) (0,0) (0,0) (-1/2,0) %0A(0,0) (-1/2,0) (0,0) (0,0) %0A(0,0) (1/2,0) (0,0) (0,0) %0A(0,0) (0,0) (-1/2,0) (0,0) %0A(0,0) (0,0) (0,0) (1/2,0) %0A%0A%0A%0A0%0A%0A%0A%0A8%0A3 0 1 2%0A3 3 1 0%0A3 1 4 2%0A3 3 0 5%0A3 5 0 2%0A3 3 4 1%0A3 3 5 4%0A3 4 5 2%0A%0A%0A%0A0%0A%0A%0A"; 1359 1360// src/worker/legacy/resources/com/vzome/core/parts/rootTwoSmall/green.vef 1361var green_default11 = "data:text/plain;charset=utf-8,vZome VEF 6 field rootTwo%0A scale (1/2,0) %0A%0A11%0A(0,0) (15/4,0) (0,0) (15/4,0) %0A(0,0) (7/2,-1) (0,0) (4,-1) %0A(0,0) (4,-1) (-1/2,0) (4,-1) %0A(0,0) (0,1) (-1/2,0) (0,1) %0A(0,0) (1/2,1) (0,0) (0,1) %0A(0,0) (4,-1) (0,0) (7/2,-1) %0A(0,0) (0,1) (1/2,0) (0,1) %0A(0,0) (4,-1) (1/2,0) (4,-1) %0A(0,0) (0,1) (0,0) (1/2,1) %0A(0,0) (1/4,0) (0,0) (1/4,0) %0A(0,0) (4,0) (0,0) (4,0) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A3 0 1 2%0A4 2 3 4 5%0A4 5 4 6 7%0A4 8 3 2 1%0A3 4 9 6%0A3 3 8 9%0A3 0 2 5%0A3 8 6 9%0A3 0 5 7%0A3 3 9 4%0A3 1 0 7%0A4 1 7 6 8%0A%0A%0A%0A6%0A 2 0 10 5 7 1%0A%0Atip 10%0A"; 1362 1363// src/worker/legacy/resources/com/vzome/core/parts/rootTwoSmall/yellow.vef 1364var yellow_default10 = "data:text/plain;charset=utf-8,vZome VEF 6 field rootTwo%0A scale (1/2,0) %0A%0A9%0A(0,0) (0,1/2) (0,3/2) (0,1) %0A(0,0) (0,3/2) (0,1) (0,1/2) %0A(0,0) (0,1/4) (0,1/4) (0,1/4) %0A(0,0) (0,7/2) (0,3) (0,5/2) %0A(0,0) (0,3) (0,5/2) (0,7/2) %0A(0,0) (0,1) (0,1/2) (0,3/2) %0A(0,0) (0,15/4) (0,15/4) (0,15/4) %0A(0,0) (0,5/2) (0,7/2) (0,3) %0A(0,0) (0,4) (0,4) (0,4) %0A%0A%0A%0A0%0A%0A%0A%0A9%0A3 0 1 2%0A4 3 4 5 1%0A3 6 4 3%0A3 7 4 6%0A3 3 7 6%0A4 7 0 5 4%0A3 5 0 2%0A4 0 7 3 1%0A3 1 5 2%0A%0A%0A%0A5%0A 6 7 8 4 3%0A%0Atip 8%0A"; 1365
1366// src/worker/legacy/resources/com/vzome/core/parts/rootTwoSmall/index.js 1367var shapes16 = { 1368 "blue": blue_default12, 1369 "brown": brown_default5, 1370 "connector": connector_default15, 1371 "green": green_default11, 1372 "yellow": yellow_default10 1373}; 1374var rootTwoSmall_default = shapes16; 1375 1376// src/worker/legacy/resources/com/vzome/core/parts/snubCube/connector.vef 1377var connector_default16 = "data:text/plain;charset=utf-8,vZome VEF 6 field snubCube%0A%0Ascale (0,1/2,0)%0A%0A24%0A(0,0,0) (0,0,-1) (-1,1,1) (-1,2,0)%0A(0,0,0) (0,0,-1) (1,-2,0) (-1,1,1)%0A(0,0,0) (0,0,-1) (-1,2,0) (1,-1,-1)%0A(0,0,0) (0,0,-1) (1,-1,-1) (1,-2,0)%0A(0,0,0) (-1,1,1) (0,0,-1) (1,-2,0)%0A(0,0,0) (-1,1,1) (1,-2,0) (0,0,1)%0A(0,0,0) (-1,1,1) (-1,2,0) (0,0,-1)%0A(0,0,0) (-1,1,1) (0,0,1) (-1,2,0)%0A(0,0,0) (1,-2,0) (0,0,-1) (1,-1,-1)%0A(0,0,0) (1,-2,0) (-1,1,1) (0,0,-1)%0A(0,0,0) (1,-2,0) (1,-1,-1) (0,0,1)%0A(0,0,0) (1,-2,0) (0,0,1) (-1,1,1)%0A(0,0,0) (-1,2,0) (0,0,-1) (-1,1,1)%0A(0,0,0) (-1,2,0) (-1,1,1) (0,0,1)%0A(0,0,0) (-1,2,0) (1,-1,-1) (0,0,-1)%0A(0,0,0) (-1,2,0) (0,0,1) (1,-1,-1)%0A(0,0,0) (1,-1,-1) (0,0,-1) (-1,2,0)%0A(0,0,0) (1,-1,-1) (1,-2,0) (0,0,-1)%0A(0,0,0) (1,-1,-1) (-1,2,0) (0,0,1)%0A(0,0,0) (1,-1,-1) (0,0,1) (1,-2,0)%0A(0,0,0) (0,0,1) (-1,1,1) (1,-2,0)%0A(0,0,0) (0,0,1) (1,-2,0) (1,-1,-1)%0A(0,0,0) (0,0,1) (-1,2,0) (-1,1,1)%0A(0,0,0) (0,0,1) (1,-1,-1) (-1,2,0)%0A%0A%0A%0A0%0A%0A%0A%0A38%0A3 0 1 4 %0A3 0 4 8 %0A3 3 2 7 %0A3 3 6 1 %0A3 3 7 11 %0A3 3 11 6 %0A3 5 0 8 %0A3 5 2 0 %0A3 9 1 6 %0A3 9 4 1 %0A3 10 2 5 %0A3 10 7 2 %0A3 10 15 7 %0A3 10 18 15 %0A3 11 14 6 %0A3 11 19 14 %0A3 12 4 9 %0A3 12 9 17 %0A3 12 17 20 %0A3 12 20 16 %0A3 13 5 8 %0A3 13 8 16 %0A3 13 16 21 %0A3 13 21 18 %0A3 15 18 23 %0A3 15 23 19 %0A3 21 16 20 %0A3 21 23 18 %0A3 22 14 19 %0A3 22 17 14 %0A3 22 19 23 %0A3 22 20 17 %0A4 3 1 0 2 %0A4 9 6 14 17 %0A4 12 16 8 4 %0A4 13 18 10 5 %0A4 15 19 11 7 %0A4 21 20 22 23 %0A%0A%0A%0A0%0A%0A%0A"; 1378
1379// src/worker/legacy/resources/com/vzome/core/parts/snubCube/index.js 1380var shapes17 = { 1381 "connector": connector_default16 1382}; 1383var snubCube_default = shapes17; 1384 1385// src/worker/legacy/resources/com/vzome/core/parts/snubCube/disdyakisDodec/blue.vef 1386var blue_default13 = "data:text/plain;charset=utf-8,vZome VEF 6 field snubCube%0A%0A10%0A(0,0,0) (0,0,0) (0,0,0) (0,0,0)%0A(0,0,0) (-1/6,1/6,7/6) (0,0,-1/6) (0,0,0)%0A(0,0,0) (-1/6,1/6,7/6) (0,0,0) (0,0,-1/6)%0A(0,0,0) (-1/6,1/6,7/6) (0,0,0) (0,0,1/6)%0A(0,0,0) (-1/6,1/6,7/6) (0,0,1/6) (0,0,0)%0A(0,0,0) (7/6,5/6,-1/6) (0,0,-1/6) (0,0,0)%0A(0,0,0) (7/6,5/6,-1/6) (0,0,0) (0,0,-1/6)%0A(0,0,0) (7/6,5/6,-1/6) (0,0,0) (0,0,1/6)%0A(0,0,0) (7/6,5/6,-1/6) (0,0,1/6) (0,0,0)%0A(0,0,0) (1,1,1) (0,0,0) (0,0,0)%0A%0A%0A%0A0%0A%0A%0A%0A12%0A3 1 3 0 %0A3 2 0 4 %0A3 2 1 0 %0A3 4 0 3 %0A3 5 6 9 %0A3 5 9 7 %0A3 6 8 9 %0A3 7 9 8 %0A4 2 4 8 6 %0A4 2 6 5 1 %0A4 5 7 3 1 %0A4 7 8 4 3 %0A%0A%0A%0A5%0A5 6 7 8 9 %0A%0A%0Atip 9%0A%0A"; 1387 1388// src/worker/legacy/resources/com/vzome/core/parts/snubCube/disdyakisDodec/connector.vef 1389var connector_default17 = "data:text/plain;charset=utf-8,vZome VEF 6 field snubCube%0A%0Ascale (0,1/2,0)%0A%0A26%0A(0,0,0) (0,0,-1) (0,0,0) (0,0,0)%0A(0,0,0) (1/2,-1,-1/2) (1/2,-1,-1/2) (0,0,0)%0A(0,0,0) (1/2,-1,-1/2) (0,0,0) (1/2,-1,-1/2)%0A(0,0,0) (1/2,-1,-1/2) (0,0,0) (-1/2,1,1/2)%0A(0,0,0) (1/2,-1,-1/2) (-1/2,1,1/2) (0,0,0)%0A(0,0,0) (-1,1,1) (-1,1,1) (-1,1,1)%0A(0,0,0) (-1,1,1) (-1,1,1) (1,-1,-1)%0A(0,0,0) (-1,1,1) (1,-1,-1) (-1,1,1)%0A(0,0,0) (-1,1,1) (1,-1,-1) (1,-1,-1)%0A(0,0,0) (0,0,0) (0,0,-1) (0,0,0)%0A(0,0,0) (0,0,0) (1/2,-1,-1/2) (1/2,-1,-1/2)%0A(0,0,0) (0,0,0) (1/2,-1,-1/2) (-1/2,1,1/2)%0A(0,0,0) (0,0,0) (0,0,0) (0,0,-1)%0A(0,0,0) (0,0,0) (0,0,0) (0,0,1)%0A(0,0,0) (0,0,0) (-1/2,1,1/2) (1/2,-1,-1/2)%0A(0,0,0) (0,0,0) (-1/2,1,1/2) (-1/2,1,1/2)%0A(0,0,0) (0,0,0) (0,0,1) (0,0,0)%0A(0,0,0) (1,-1,-1) (-1,1,1) (-1,1,1)%0A(0,0,0) (1,-1,-1) (-1,1,1) (1,-1,-1)%0A(0,0,0) (1,-1,-1) (1,-1,-1) (-1,1,1)%0A(0,0,0) (1,-1,-1) (1,-1,-1) (1,-1,-1)%0A(0,0,0) (-1/2,1,1/2) (1/2,-1,-1/2) (0,0,0)%0A(0,0,0) (-1/2,1,1/2) (0,0,0) (1/2,-1,-1/2)%0A(0,0,0) (-1/2,1,1/2) (0,0,0) (-1/2,1,1/2)%0A(0,0,0) (-1/2,1,1/2) (-1/2,1,1/2) (0,0,0)%0A(0,0,0) (0,0,1) (0,0,0) (0,0,0)%0A%0A%0A%0A0%0A%0A%0A%0A48%0A3 0 1 6 %0A3 0 2 5 %0A3 0 3 8 %0A3 0 4 7 %0A3 1 0 5 %0A3 1 9 6 %0A3 2 0 7 %0A3 3 0 6 %0A3 3 13 8 %0A3 4 0 8 %0A3 4 16 7 %0A3 5 2 12 %0A3 9 1 5 %0A3 9 10 17 %0A3 9 11 6 %0A3 9 21 18 %0A3 10 9 5 %0A3 10 12 17 %0A3 11 9 18 %0A3 11 13 6 %0A3 12 2 7 %0A3 12 10 5 %0A3 12 14 19 %0A3 12 22 17 %0A3 13 3 6 %0A3 13 11 18 %0A3 13 15 8 %0A3 13 23 20 %0A3 14 12 7 %0A3 14 16 19 %0A3 15 13 20 %0A3 15 16 8 %0A3 16 4 8 %0A3 16 14 7 %0A3 16 15 20 %0A3 16 24 19 %0A3 17 22 25 %0A3 21 9 17 %0A3 21 25 18 %0A3 22 12 19 %0A3 23 13 18 %0A3 23 25 20 %0A3 24 16 20 %0A3 24 25 19 %0A3 25 21 17 %0A3 25 22 19 %0A3 25 23 18 %0A3 25 24 20 %0A%0A%0A%0A0%0A%0A%0A"; 1390 1391// src/worker/legacy/resources/com/vzome/core/parts/snubCube/disdyakisDodec/green.vef 1392var green_default12 = "data:text/plain;charset=utf-8,vZome VEF 6 field snubCube%0A%0A10%0A(0,0,0) (0,0,0) (0,0,0) (0,0,0)%0A(0,0,0) (-7/12,1,7/12) (0,0,0) (-7/12,7/6,7/12)%0A(0,0,0) (-7/12,1,3/4) (0,0,-1/6) (-7/12,1,3/4)%0A(0,0,0) (-7/12,1,3/4) (0,0,1/6) (-7/12,1,3/4)%0A(0,0,0) (-7/12,7/6,7/12) (0,0,0) (-7/12,1,7/12)%0A(0,0,0) (19/12,-1/6,5/12) (0,0,0) (19/12,0,5/12)%0A(0,0,0) (19/12,0,1/4) (0,0,-1/6) (19/12,0,1/4)%0A(0,0,0) (19/12,0,1/4) (0,0,1/6) (19/12,0,1/4)%0A(0,0,0) (19/12,0,5/12) (0,0,0) (19/12,-1/6,5/12)%0A(0,0,0) (1,1,1) (0,0,0) (1,1,1)%0A%0A%0A%0A0%0A%0A%0A%0A12%0A3 1 3 0 %0A3 2 0 4 %0A3 2 1 0 %0A3 3 4 0 %0A3 5 6 9 %0A3 5 9 7 %0A3 7 9 8 %0A3 8 9 6 %0A4 2 4 8 6 %0A4 5 1 2 6 %0A4 5 7 3 1 %0A4 7 8 4 3 %0A%0A%0A%0A5%0A5 6 7 8 9 %0A%0A%0Atip 9%0A%0A"; 1393 1394// src/worker/legacy/resources/com/vzome/core/parts/snubCube/disdyakisDodec/snubVertex.vef 1395var snubVertex_default = "data:text/plain;charset=utf-8,vZome VEF 6 field snubCube%0A%0A8%0A(0,0,0) (0,0,0) (0,0,0) (0,0,0)%0A(0,0,0) (1,-1,-1) (1,-1,-1) (1,-1,-1)%0A(0,0,0) (-1/2,1,1/2) (-1/2,1,1/2) (0,0,0)%0A(0,0,0) (0,0,1) (0,0,0) (0,0,0)%0A(0,0,0) (1,1,0) (1,0,0) (0,1,0)%0A(0,0,0) (3/2,0,1/2) (3/2,-1,-1/2) (0,1,0)%0A(0,0,0) (0,2,2) (0,1,1) (-1,2,1)%0A(0,0,0) (1,1,1) (1,0,0) (0,1,0)%0A%0A%0A%0A0%0A%0A%0A%0A12%0A3 1 0 3 %0A3 1 2 0 %0A3 1 3 5 %0A3 1 4 2 %0A3 1 5 4 %0A3 2 3 0 %0A3 4 5 7 %0A3 6 2 4 %0A3 6 3 2 %0A3 6 4 7 %0A3 6 5 3 %0A3 6 7 5 %0A%0A%0A%0A4%0A4 5 6 7 %0A%0A%0Atip 7%0A%0A"; 1396
1397// src/worker/legacy/resources/com/vzome/core/parts/snubCube/disdyakisDodec/index.js 1398var shapes18 = { 1399 "blue": blue_default13, 1400 "connector": connector_default17, 1401 "green": green_default12, 1402 "snubVertex": snubVertex_default 1403}; 1404var disdyakisDodec_default = shapes18; 1405 1406// src/worker/legacy/resources/com/vzome/core/parts/snubCube/dual/connector.vef 1407var connector_default18 = "data:text/plain;charset=utf-8,vZome VEF 6 field snubCube%0A%0Ascale (0,1/2,0)%0A%0A38%0A(0,0,0) (0,0,-1) (0,0,0) (0,0,0)%0A(0,0,0) (2,-3,-2) (-1,1,1) (0,1,-2)%0A(0,0,0) (2,-3,-2) (0,1,-2) (1,-1,-1)%0A(0,0,0) (2,-3,-2) (0,-1,2) (-1,1,1)%0A(0,0,0) (2,-3,-2) (1,-1,-1) (0,-1,2)%0A(0,0,0) (-1,1,1) (2,-3,-2) (0,-1,2)%0A(0,0,0) (-1,1,1) (-1,1,1) (-1,1,1)%0A(0,0,0) (-1,1,1) (-1,1,1) (1,-1,-1)%0A(0,0,0) (-1,1,1) (0,1,-2) (2,-3,-2)%0A(0,0,0) (-1,1,1) (0,-1,2) (-2,3,2)%0A(0,0,0) (-1,1,1) (1,-1,-1) (-1,1,1)%0A(0,0,0) (-1,1,1) (1,-1,-1) (1,-1,-1)%0A(0,0,0) (-1,1,1) (-2,3,2) (0,1,-2)%0A(0,0,0) (0,1,-2) (2,-3,-2) (-1,1,1)%0A(0,0,0) (0,1,-2) (-1,1,1) (-2,3,2)%0A(0,0,0) (0,1,-2) (1,-1,-1) (2,-3,-2)%0A(0,0,0) (0,1,-2) (-2,3,2) (1,-1,-1)%0A(0,0,0) (0,0,0) (0,0,-1) (0,0,0)%0A(0,0,0) (0,0,0) (0,0,0) (0,0,-1)%0A(0,0,0) (0,0,0) (0,0,0) (0,0,1)%0A(0,0,0) (0,0,0) (0,0,1) (0,0,0)%0A(0,0,0) (0,-1,2) (2,-3,-2) (1,-1,-1)%0A(0,0,0) (0,-1,2) (-1,1,1) (2,-3,-2)%0A(0,0,0) (0,-1,2) (1,-1,-1) (-2,3,2)%0A(0,0,0) (0,-1,2) (-2,3,2) (-1,1,1)%0A(0,0,0) (1,-1,-1) (2,-3,-2) (0,1,-2)%0A(0,0,0) (1,-1,-1) (-1,1,1) (-1,1,1)%0A(0,0,0) (1,-1,-1) (-1,1,1) (1,-1,-1)%0A(0,0,0) (1,-1,-1) (0,1,-2) (-2,3,2)%0A(0,0,0) (1,-1,-1) (0,-1,2) (2,-3,-2)%0A(0,0,0) (1,-1,-1) (1,-1,-1) (-1,1,1)%0A(0,0,0) (1,-1,-1) (1,-1,-1) (1,-1,-1)%0A(0,0,0) (1,-1,-1) (-2,3,2) (0,-1,2)%0A(0,0,0) (-2,3,2) (-1,1,1) (0,-1,2)%0A(0,0,0) (-2,3,2) (0,1,-2) (-1,1,1)%0A(0,0,0) (-2,3,2) (0,-1,2) (1,-1,-1)%0A(0,0,0) (-2,3,2) (1,-1,-1) (0,1,-2)%0A(0,0,0) (0,0,1) (0,0,0) (0,0,0)%0A%0A%0A%0A0%0A%0A%0A%0A24%0A5 1 0 3 8 6 %0A5 1 5 7 2 0 %0A5 1 6 13 17 5 %0A5 2 7 14 19 9 %0A5 2 9 11 4 0 %0A5 4 12 10 3 0 %0A5 8 3 10 15 18 %0A5 14 7 5 17 21 %0A5 14 21 27 28 19 %0A5 16 11 9 19 23 %0A5 16 20 12 4 11 %0A5 16 23 31 32 20 %0A5 22 13 6 8 18 %0A5 22 18 29 34 26 %0A5 24 15 10 12 20 %0A5 24 30 29 18 15 %0A5 25 17 13 22 26 %0A5 25 26 34 37 33 %0A5 25 33 27 21 17 %0A5 28 27 33 37 35 %0A5 28 35 31 23 19 %0A5 32 31 35 37 36 %0A5 32 36 30 24 20 %0A5 34 29 30 36 37 %0A%0A%0A%0A0%0A%0A%0A"; 1408 1409// src/worker/legacy/resources/com/vzome/core/parts/snubCube/dual/snubVertex.vef 1410var snubVertex_default2 = "data:text/plain;charset=utf-8,vZome VEF 6 field snubCube%0A%0A8%0A(0,0,0) (0,0,0) (0,0,0) (0,0,0)%0A(0,0,0) (1,-1,-1) (1,-1,-1) (1,-1,-1)%0A(0,0,0) (-1/2,1,1/2) (-1/2,1,1/2) (0,0,0)%0A(0,0,0) (0,0,1) (0,0,0) (0,0,0)%0A(0,0,0) (1,1,0) (1,0,0) (0,1,0)%0A(0,0,0) (3/2,0,1/2) (3/2,-1,-1/2) (0,1,0)%0A(0,0,0) (0,2,2) (0,1,1) (-1,2,1)%0A(0,0,0) (1,1,1) (1,0,0) (0,1,0)%0A%0A%0A%0A0%0A%0A%0A%0A12%0A3 1 0 3 %0A3 1 2 0 %0A3 1 3 5 %0A3 1 4 2 %0A3 1 5 4 %0A3 2 3 0 %0A3 4 5 7 %0A3 6 2 4 %0A3 6 3 2 %0A3 6 4 7 %0A3 6 5 3 %0A3 6 7 5 %0A%0A%0A%0A4%0A4 5 6 7 %0A%0A%0Atip 7%0A%0A"; 1411
1412// src/worker/legacy/resources/com/vzome/core/parts/snubCube/dual/index.js 1413var shapes19 = { 1414 "connector": connector_default18, 1415 "snubVertex": snubVertex_default2 1416}; 1417var dual_default = shapes19; 1418 1419// src/worker/legacy/resources/com/vzome/core/parts/sqrtPhi/fivefold/blue.vef 1420var blue_default14 = "data:text/plain;charset=utf-8,vZome VEF 6 field sqrtPhi%0A%0A9%0A(0,0,0,0) (-1,-1,1,2) (2,-2,-3,1) (0,-2,-2,3)%0A(0,0,0,0) (0,1,0,-2) (0,1,0,-2) (-1,0,1,0)%0A(0,0,0,0) (1,-1,-2,2) (0,-2,0,1) (0,0,-2,0)%0A(0,0,0,0) (2,1,-3,-2) (-2,1,3,-2) (-1,2,1,-3)%0A(0,0,0,0) (0,0,0,0) (0,-1,0,-1) (-1,0,-1,0)%0A(0,0,0,0) (-2,-1,3,2) (2,-2,-3,1) (0,-2,-2,3)%0A(0,0,0,0) (-1,1,2,-2) (0,1,0,-2) (-1,0,1,0)%0A(0,0,0,0) (0,-1,0,2) (0,-2,0,1) (0,0,-2,0)%0A(0,0,0,0) (1,1,-1,-2) (-2,1,3,-2) (-1,2,1,-3)%0A%0A%0A%0A0%0A%0A%0A%0A4%0A4 0 2 3 1 %0A4 1 6 5 0 %0A4 7 5 6 8 %0A4 7 8 3 2 %0A%0A%0A%0A5%0A0 2 4 5 7 %0A%0A%0Atip 4%0A%0A"; 1421 1422// src/worker/legacy/resources/com/vzome/core/parts/sqrtPhi/fivefold/connector.vef 1423var connector_default19 = "data:text/plain;charset=utf-8,vZome VEF 6 field sqrtPhi%0A%0A22%0A(0,0,0,0) (0,-3,0,4) (0,1,0,-2) (3,0,-5,0)%0A(0,0,0,0) (0,-3,0,4) (0,5,0,-8) (7,0,-11,0)%0A(0,0,0,0) (0,-3,0,4) (0,-1,0,2) (3,0,-5,0)%0A(0,0,0,0) (0,-3,0,4) (0,3,0,-4) (7,0,-11,0)%0A(0,0,0,0) (0,1,0,-2) (0,-3,0,4) (-3,0,5,0)%0A(0,0,0,0) (0,1,0,-2) (0,1,0,-2) (-1,0,1,0)%0A(0,0,0,0) (0,1,0,-2) (0,1,0,-2) (1,0,-1,0)%0A(0,0,0,0) (0,1,0,-2) (0,-1,0,2) (-1,0,1,0)%0A(0,0,0,0) (0,1,0,-2) (0,-1,0,2) (1,0,-1,0)%0A(0,0,0,0) (0,1,0,-2) (0,3,0,-4) (3,0,-5,0)%0A(0,0,0,0) (0,-5,0,8) (0,3,0,-4) (7,0,-11,0)%0A(0,0,0,0) (0,5,0,-8) (0,-3,0,4) (-7,0,11,0)%0A(0,0,0,0) (0,-1,0,2) (0,-3,0,4) (-3,0,5,0)%0A(0,0,0,0) (0,-1,0,2) (0,1,0,-2) (-1,0,1,0)%0A(0,0,0,0) (0,-1,0,2) (0,1,0,-2) (1,0,-1,0)%0A(0,0,0,0) (0,-1,0,2) (0,-1,0,2) (-1,0,1,0)%0A(0,0,0,0) (0,-1,0,2) (0,-1,0,2) (1,0,-1,0)%0A(0,0,0,0) (0,-1,0,2) (0,3,0,-4) (3,0,-5,0)%0A(0,0,0,0) (0,3,0,-4) (0,-3,0,4) (-7,0,11,0)%0A(0,0,0,0) (0,3,0,-4) (0,1,0,-2) (-3,0,5,0)%0A(0,0,0,0) (0,3,0,-4) (0,-5,0,8) (-7,0,11,0)%0A(0,0,0,0) (0,3,0,-4) (0,-1,0,2) (-3,0,5,0)%0A%0A%0A%0A0%0A%0A%0A%0A20%0A4 0 2 7 5 %0A4 3 1 6 8 %0A4 3 2 0 1 %0A4 3 8 16 10 %0A4 3 9 7 2 %0A4 3 10 17 9 %0A4 4 12 14 6 %0A4 5 11 4 0 %0A4 6 1 0 4 %0A4 7 9 17 15 %0A4 14 19 21 16 %0A4 15 13 5 7 %0A4 16 8 6 14 %0A4 17 10 16 21 %0A4 18 11 5 13 %0A4 18 12 4 11 %0A4 18 13 15 20 %0A4 18 19 14 12 %0A4 18 20 21 19 %0A4 21 20 15 17 %0A%0A%0A%0A0%0A%0A%0A"; 1424 1425// src/worker/legacy/resources/com/vzome/core/parts/sqrtPhi/fivefold/green.vef 1426var green_default13 = "data:text/plain;charset=utf-8,vZome VEF 6 field sqrtPhi%0A%0A13%0A(0,0,0,0) (5,-1,-8,2) (-5,3,8,-4) (3,5,-5,-8)%0A(0,0,0,0) (5,1,-8,-1) (-5,2,8,-2) (0,5,0,-8)%0A(0,0,0,0) (-5,3,8,-4) (5,-1,-8,2) (-3,-5,5,8)%0A(0,0,0,0) (5,-2,-8,4) (-5,5,8,-7) (6,5,-10,-8)%0A(0,0,0,0) (-5,5,8,-7) (5,-2,-8,4) (-6,-5,10,8)%0A(0,0,0,0) (-5,2,8,-2) (5,1,-8,-1) (0,-5,0,8)%0A(0,0,0,0) (8,-2,-6,2) (-2,-1,10,1) (0,5,0,-8)%0A(0,0,0,0) (8,-5,-6,7) (-2,2,10,-4) (6,5,-10,-8)%0A(0,0,0,0) (-2,2,10,-4) (8,-5,-6,7) (-6,-5,10,8)%0A(0,0,0,0) (8,-3,-6,4) (-2,1,10,-2) (3,5,-5,-8)%0A(0,0,0,0) (-2,-1,10,1) (8,-2,-6,2) (0,-5,0,8)%0A(0,0,0,0) (-2,1,10,-2) (8,-3,-6,4) (-3,-5,5,8)%0A(0,0,0,0) (3,0,2,0) (3,0,2,0) (0,0,0,0)%0A%0A%0A%0A0%0A%0A%0A%0A8%0A4 1 0 2 4 %0A4 1 4 8 6 %0A4 3 5 2 0 %0A4 5 3 7 10 %0A4 9 6 8 11 %0A4 11 10 7 9 %0A6 3 0 1 6 9 7 %0A6 10 11 8 4 2 5 %0A%0A%0A%0A7%0A6 7 8 9 10 11 12 %0A%0A%0Atip 12%0A%0A"; 1427 1428// src/worker/legacy/resources/com/vzome/core/parts/sqrtPhi/fivefold/red.vef 1429var red_default8 = "data:text/plain;charset=utf-8,vZome VEF 6 field sqrtPhi%0A%0A11%0A(0,0,0,0) (0,4,0,-6) (0,-3,0,4) (-7,0,11,0)%0A(0,0,0,0) (0,1,0,-1) (0,-3,0,4) (-5,0,8,0)%0A(0,0,0,0) (0,1,0,-1) (0,-1,0,1) (-4,0,6,0)%0A(0,0,0,0) (0,3,0,-4) (0,-1,0,1) (-5,0,8,0)%0A(0,0,0,0) (0,3,0,-4) (0,-4,0,6) (-7,0,11,0)%0A(0,0,0,0) (0,-1,0,4) (0,2,0,-6) (5,0,-9,0)%0A(0,0,0,0) (0,-1,0,4) (0,-1,0,-1) (3,0,-6,0)%0A(0,0,0,0) (0,1,0,1) (0,-1,0,-1) (2,0,-4,0)%0A(0,0,0,0) (0,1,0,1) (0,1,0,-4) (3,0,-6,0)%0A(0,0,0,0) (0,-2,0,6) (0,1,0,-4) (5,0,-9,0)%0A(0,0,0,0) (0,2,0,0) (0,-2,0,0) (-2,0,2,0)%0A%0A%0A%0A0%0A%0A%0A%0A10%0A3 0 2 6 %0A3 0 6 5 %0A3 1 0 5 %0A3 2 4 8 %0A3 3 1 7 %0A3 4 3 9 %0A3 5 7 1 %0A3 7 9 3 %0A3 8 6 2 %0A3 9 8 4 %0A%0A%0A%0A6%0A5 6 7 8 9 10 %0A%0A%0A%0Atip 10%0A%0A%0A"; 1430
1431// src/worker/legacy/resources/com/vzome/core/parts/sqrtPhi/fivefold/index.js 1432var shapes20 = { 1433 "blue": blue_default14, 1434 "connector": connector_default19, 1435 "green": green_default13, 1436 "red": red_default8 1437}; 1438var fivefold_default = shapes20; 1439 1440// src/worker/legacy/resources/com/vzome/core/parts/sqrtPhi/octahedra/blue.vef 1441var blue_default15 = "data:text/plain;charset=utf-8,vZome VEF 6 field sqrtPhi%0A%0Ascale (0,2,0,0)%0A%0A11%0A(0,0,0,0) (-6,0,10,0) (0,0,0,0) (0,0,0,0)%0A(0,0,0,0) (-6,-3,10,5) (0,3,0,-5) (0,0,0,0)%0A(0,0,0,0) (-6,-3,10,5) (0,0,0,0) (0,3,0,-5)%0A(0,0,0,0) (-6,-3,10,5) (0,0,0,0) (0,-3,0,5)%0A(0,0,0,0) (-6,-3,10,5) (0,-3,0,5) (0,0,0,0)%0A(0,0,0,0) (6,4,-10,-5) (0,3,0,-5) (0,0,0,0)%0A(0,0,0,0) (6,4,-10,-5) (0,0,0,0) (0,3,0,-5)%0A(0,0,0,0) (6,4,-10,-5) (0,0,0,0) (0,-3,0,5)%0A(0,0,0,0) (6,4,-10,-5) (0,-3,0,5) (0,0,0,0)%0A(0,0,0,0) (6,1,-10,0) (0,0,0,0) (0,0,0,0)%0A(0,0,0,0) (0,1,0,0) (0,0,0,0) (0,0,0,0)%0A%0A%0A%0A0%0A%0A%0A%0A12%0A3 1 0 2 %0A3 2 0 4 %0A3 3 0 1 %0A3 4 0 3 %0A3 5 9 7 %0A3 6 9 5 %0A3 7 9 8 %0A3 8 9 6 %0A4 2 4 8 6 %0A4 4 3 7 8 %0A4 6 5 1 2 %0A4 7 3 1 5 %0A%0A%0A%0A6%0A5 6 7 8 9 10 %0A%0A%0Atip 10%0A%0A"; 1442 1443// src/worker/legacy/resources/com/vzome/core/parts/sqrtPhi/octahedra/green.vef 1444var green_default14 = "data:text/plain;charset=utf-8,vZome VEF 6 field sqrtPhi%0Ascale (0,0,2,1)%0A%0A11%0A(0,0,0,0) (0,3,0,-5) (0,-2,0,2) (0,-2,0,2)%0A(0,0,0,0) (0,3,0,-5) (0,1,0,-2) (0,1,0,-2)%0A(0,0,0,0) (0,0,0,0) (0,-1,0,0) (0,-1,0,0)%0A(0,0,0,0) (0,0,0,0) (0,1,0,-3) (0,1,0,-3)%0A(0,0,0,0) (0,0,0,0) (0,1,0,-3) (-3,1,5,-3)%0A(0,0,0,0) (0,0,0,0) (-3,1,5,-3) (0,1,0,-3)%0A(0,0,0,0) (0,0,0,0) (3,-2,-5,3) (0,-2,0,3)%0A(0,0,0,0) (0,0,0,0) (0,-2,0,3) (3,-2,-5,3)%0A(0,0,0,0) (0,0,0,0) (0,-2,0,3) (0,-2,0,3)%0A(0,0,0,0) (0,-3,0,5) (0,-2,0,2) (0,-2,0,2)%0A(0,0,0,0) (0,-3,0,5) (0,1,0,-2) (0,1,0,-2)%0A%0A%0A%0A0%0A%0A%0A%0A12%0A3 3 0 5 %0A3 3 5 9 %0A3 4 0 3 %0A3 4 3 9 %0A3 6 10 8 %0A3 7 1 8 %0A3 7 8 10 %0A3 8 1 6 %0A4 4 9 10 6 %0A4 5 0 1 7 %0A4 6 1 0 4 %0A4 7 10 9 5 %0A%0A%0A%0A6%0A0 2 3 4 5 9 %0A%0A%0Atip 2%0A%0A"; 1445 1446// src/worker/legacy/resources/com/vzome/core/parts/sqrtPhi/octahedra/ivory.vef 1447var ivory_default = "data:text/plain;charset=utf-8,vZome VEF 6 field sqrtPhi%0Ascale (0,0,2,1)%0A%0A9%0A(0,0,0,0) (-62/11,-14/11,100/11,24/11) (-65/11,2/11,102/11,-5/11) (14/11,-5/11,-24/11,7/11)%0A(0,0,0,0) (-62/11,-14/11,100/11,24/11) (-10/11,24/11,14/11,-38/11) (14/11,-38/11,-24/11,62/11)%0A(0,0,0,0) (-7/11,-14/11,12/11,24/11) (45/11,2/11,-74/11,-5/11) (-41/11,-5/11,64/11,7/11)%0A(0,0,0,0) (48/11,-14/11,-76/11,24/11) (-10/11,2/11,14/11,-5/11) (69/11,-5/11,-112/11,7/11)%0A(0,0,0,0) (-37/11,14/11,65/11,-24/11) (10/11,-13/11,-14/11,5/11) (-69/11,5/11,112/11,-18/11)%0A(0,0,0,0) (18/11,14/11,-23/11,-24/11) (-45/11,-13/11,74/11,5/11) (41/11,5/11,-64/11,-18/11)%0A(0,0,0,0) (73/11,14/11,-111/11,-24/11) (10/11,-35/11,-14/11,38/11) (-14/11,38/11,24/11,-73/11)%0A(0,0,0,0) (73/11,14/11,-111/11,-24/11) (65/11,-13/11,-102/11,5/11) (-14/11,5/11,24/11,-18/11)%0A(0,0,0,0) (1,0,-1,0) (0,-1,0,0) (0,0,0,-1)%0A%0A%0A%0A0%0A%0A%0A%0A12%0A3 0 2 4 %0A3 1 0 3 %0A3 1 2 0 %0A3 2 3 7 %0A3 3 0 5 %0A3 3 2 1 %0A3 4 5 0 %0A3 5 4 6 %0A3 5 7 3 %0A3 6 4 7 %0A3 7 4 2 %0A3 7 5 6 %0A%0A%0A%0A5%0A4 5 6 7 8 %0A%0A%0Atip 8%0A%0A"; 1448 1449// src/worker/legacy/resources/com/vzome/core/parts/sqrtPhi/octahedra/mauve.vef 1450var mauve_default = "data:text/plain;charset=utf-8,vZome VEF 6 field sqrtPhi%0A%0Ascale (0,2,0,0)%0A%0A9%0A(0,0,0,0) (5,0,-8,0) (5,0,-8,0) (5,0,-8,0)%0A(0,0,0,0) (5,0,-8,0) (5,-3,-8,5) (5,-3,-8,5)%0A(0,0,0,0) (5,-3,-8,5) (5,0,-8,0) (5,-3,-8,5)%0A(0,0,0,0) (5,-3,-8,5) (5,-3,-8,5) (5,0,-8,0)%0A(0,0,0,0) (-5,4,8,-5) (-5,4,8,-5) (-5,0,9,0)%0A(0,0,0,0) (-5,4,8,-5) (-5,1,8,0) (-5,3,9,-5)%0A(0,0,0,0) (-5,1,8,0) (-5,4,8,-5) (-5,3,9,-5)%0A(0,0,0,0) (-5,1,8,0) (-5,1,8,0) (-5,0,9,0)%0A(0,0,0,0) (0,1,0,0) (0,1,0,0) (0,0,1,0)%0A%0A%0A%0A0%0A%0A%0A%0A12%0A3 0 3 2 %0A3 1 2 4 %0A3 1 3 0 %0A3 2 1 0 %0A3 3 1 5 %0A3 4 2 6 %0A3 4 5 1 %0A3 5 4 7 %0A3 5 6 3 %0A3 6 2 3 %0A3 7 4 6 %0A3 7 6 5 %0A%0A%0A%0A5%0A4 5 6 7 8 %0A%0A%0Atip 8%0A%0A"; 1451 1452// src/worker/legacy/resources/com/vzome/core/parts/sqrtPhi/octahedra/slate.vef 1453var slate_default = "data:text/plain;
1453charset=utf-8,vZome VEF 6 field sqrtPhi%0A%0Ascale (0,2,0,0)%0A%0A11%0A(0,0,0,0) (-3,0,5,0) (0,0,0,0) (-3,0,5,0)%0A(0,0,0,0) (-3,0,5,0) (0,0,0,0) (-6,0,10,0)%0A(0,0,0,0) (2,0,-3,0) (-5,0,8,0) (2,0,-3,0)%0A(0,0,0,0) (2,0,-3,0) (5,0,-8,0) (2,0,-3,0)%0A(0,0,0,0) (-6,0,10,0) (0,0,0,0) (-3,0,5,0)%0A(0,0,0,0) (7,0,-10,0) (0,0,0,0) (3,1,-5,0)%0A(0,0,0,0) (-1,0,3,0) (-5,0,8,0) (-2,1,3,0)%0A(0,0,0,0) (-1,0,3,0) (5,0,-8,0) (-2,1,3,0)%0A(0,0,0,0) (4,0,-5,0) (0,0,0,0) (6,1,-10,0)%0A(0,0,0,0) (4,0,-5,0) (0,0,0,0) (3,1,-5,0)%0A(0,0,0,0) (1,0,0,0) (0,0,0,0) (0,1,0,0)%0A%0A%0A%0A0%0A%0A%0A%0A16%0A3 0 1 3 %0A3 0 3 4 %0A3 0 4 2 %0A3 2 1 0 %0A3 2 4 8 %0A3 3 1 5 %0A3 4 3 8 %0A3 5 1 2 %0A3 5 6 9 %0A3 5 7 3 %0A3 6 5 2 %0A3 6 8 9 %0A3 7 5 9 %0A3 7 8 3 %0A3 8 6 2 %0A3 9 8 7 %0A%0A%0A%0A6%0A5 6 7 8 9 10 %0A%0A%0Atip 10%0A%0A"; 1454 1455// src/worker/legacy/resources/com/vzome/core/parts/sqrtPhi/octahedra/yellow.vef 1456var yellow_default11 = "data:text/plain;charset=utf-8,vZome VEF 6 field sqrtPhi%0Ascale (0,0,2,1)%0A%0A9%0A(0,0,0,0) (0,-3,0,5) (0,3,0,-5) (0,3,0,-5)%0A(0,0,0,0) (1/2,-9/2,-5/6,15/2) (1,9/2,-5/3,-15/2) (5/2,9/2,-25/6,-15/2)%0A(0,0,0,0) (-1,-9/2,5/3,15/2) (5/2,9/2,-25/6,-15/2) (-1/2,9/2,5/6,-15/2)%0A(0,0,0,0) (-5/2,-9/2,25/6,15/2) (-1/2,9/2,5/6,-15/2) (1,9/2,-5/3,-15/2)%0A(0,0,0,0) (1/2,15/2,1/6,-25/2) (1,-15/2,-8/3,25/2) (5/2,-15/2,-31/6,25/2)%0A(0,0,0,0) (-1,15/2,8/3,-25/2) (5/2,-15/2,-31/6,25/2) (-1/2,-15/2,-1/6,25/2)%0A(0,0,0,0) (-5/2,15/2,31/6,-25/2) (-1/2,-15/2,-1/6,25/2) (1,-15/2,-8/3,25/2)%0A(0,0,0,0) (0,3,1,-5) (0,-3,-1,5) (0,-3,-1,5)%0A(0,0,0,0) (0,0,1,0) (0,0,-1,0) (0,0,-1,0)%0A%0A%0A%0A0%0A%0A%0A%0A9%0A3 1 0 3 %0A3 2 0 1 %0A3 3 0 2 %0A3 7 4 6 %0A3 7 5 4 %0A3 7 6 5 %0A4 1 3 6 4 %0A4 4 5 2 1 %0A4 5 6 3 2 %0A%0A%0A%0A5%0A4 5 6 7 8 %0A%0A%0Atip 8%0A%0A"; 1457
1458// src/worker/legacy/resources/com/vzome/core/parts/sqrtPhi/octahedra/index.js 1459var shapes21 = { 1460 "blue": blue_default15, 1461 "green": green_default14, 1462 "ivory": ivory_default, 1463 "mauve": mauve_default, 1464 "slate": slate_default, 1465 "yellow": yellow_default11 1466}; 1467var octahedra_default = shapes21; 1468 1469// src/worker/legacy/resources/com/vzome/core/parts/sqrtPhi/tinyIcosahedra/blue.vef 1470var blue_default16 = "data:text/plain;charset=utf-8,vZome VEF 6 field sqrtPhi%0A%0Ascale (0,1/16,0,0)%0A%0A11%0A(0,0,0,0) (0,2,0,1) (0,0,0,0) (0,0,0,0)%0A(0,0,0,0) (0,5,0,3) (0,-3/2,0,-1) (0,-1,0,-1/2)%0A(0,0,0,0) (0,5,0,3) (0,-3/2,0,-1) (0,1,0,1/2)%0A(0,0,0,0) (0,5,0,3) (0,3/2,0,1) (0,-1,0,-1/2)%0A(0,0,0,0) (0,5,0,3) (0,3/2,0,1) (0,1,0,1/2)%0A(0,0,0,0) (0,37,0,23) (0,-3/2,0,-1) (0,-1,0,-1/2)%0A(0,0,0,0) (0,37,0,23) (0,-3/2,0,-1) (0,1,0,1/2)%0A(0,0,0,0) (0,37,0,23) (0,3/2,0,1) (0,-1,0,-1/2)%0A(0,0,0,0) (0,37,0,23) (0,3/2,0,1) (0,1,0,1/2)%0A(0,0,0,0) (0,40,0,25) (0,0,0,0) (0,0,0,0)%0A(0,0,0,0) (0,42,0,26) (0,0,0,0) (0,0,0,0)%0A%0A%0A%0A0%0A%0A%0A%0A12%0A3 0 3 1 %0A3 2 0 1 %0A3 4 0 2 %0A3 4 3 0 %0A3 5 7 9 %0A3 6 5 9 %0A3 6 9 8 %0A3 8 9 7 %0A4 2 1 5 6 %0A4 4 2 6 8 %0A4 4 8 7 3 %0A4 5 1 3 7 %0A%0A%0A%0A6%0A5 6 7 8 9 10 %0A%0A%0Atip 10%0A%0A"; 1471 1472// src/worker/legacy/resources/com/vzome/core/parts/sqrtPhi/tinyIcosahedra/connector.vef 1473var connector_default20 = "data:text/plain;charset=utf-8,vZome VEF 6 field sqrtPhi%0A%0Ascale (0,1/16,0,0)%0A%0A12%0A(0,0,0,0) (0,-3/2,0,-1) (0,-1,0,-1/2) (0,0,0,0)%0A(0,0,0,0) (0,-3/2,0,-1) (0,1,0,1/2) (0,0,0,0)%0A(0,0,0,0) (0,-1,0,-1/2) (0,0,0,0) (0,-3/2,0,-1)%0A(0,0,0,0) (0,-1,0,-1/2) (0,0,0,0) (0,3/2,0,1)%0A(0,0,0,0) (0,0,0,0) (0,-3/2,0,-1) (0,-1,0,-1/2)%0A(0,0,0,0) (0,0,0,0) (0,-3/2,0,-1) (0,1,0,1/2)%0A(0,0,0,0) (0,0,0,0) (0,3/2,0,1) (0,-1,0,-1/2)%0A(0,0,0,0) (0,0,0,0) (0,3/2,0,1) (0,1,0,1/2)%0A(0,0,0,0) (0,1,0,1/2) (0,0,0,0) (0,-3/2,0,-1)%0A(0,0,0,0) (0,1,0,1/2) (0,0,0,0) (0,3/2,0,1)%0A(0,0,0,0) (0,3/2,0,1) (0,-1,0,-1/2) (0,0,0,0)%0A(0,0,0,0) (0,3/2,0,1) (0,1,0,1/2) (0,0,0,0)%0A%0A%0A%0A0%0A%0A%0A%0A20%0A3 1 0 3 %0A3 1 2 0 %0A3 3 0 5 %0A3 4 0 2 %0A3 5 0 4 %0A3 6 2 1 %0A3 7 1 3 %0A3 7 3 9 %0A3 7 6 1 %0A3 8 2 6 %0A3 8 4 2 %0A3 9 3 5 %0A3 10 4 8 %0A3 10 5 4 %0A3 10 9 5 %0A3 11 6 7 %0A3 11 7 9 %0A3 11 8 6 %0A3 11 9 10 %0A3 11 10 8 %0A%0A%0A%0A0%0A%0A%0A"; 1474 1475// src/worker/legacy/resources/com/vzome/core/parts/sqrtPhi/tinyIcosahedra/green.vef 1476var green_default15 = "data:text/plain;charset=utf-8,vZome VEF 6 field sqrtPhi%0A%0Ascale (0,1/16,0,0)%0A%0A11%0A(0,0,0,0) (0,0,0,1/2) (0,0,0,0) (0,9/2,0,3)%0A(0,0,0,0) (0,1/2,0,1/2) (0,0,0,1/2) (0,3/2,0,1)%0A(0,0,0,0) (0,3/2,0,1) (0,-1,0,-1/2) (0,4,0,3)%0A(0,0,0,0) (0,3/2,0,1) (0,2,0,3/2) (0,4,0,2)%0A(0,0,0,0) (0,3,0,3/2) (0,1,0,1) (0,7/2,0,2)%0A(0,0,0,0) (0,18,0,23/2) (0,7,0,4) (0,103/2,0,32)%0A(0,0,0,0) (0,39/2,0,12) (0,6,0,7/2) (0,51,0,32)%0A(0,0,0,0) (0,39/2,0,12) (0,9,0,11/2) (0,51,0,31)%0A(0,0,0,0) (0,41/2,0,25/2) (0,8,0,9/2) (0,107/2,0,33)%0A(0,0,0,0) (0,21,0,25/2) (0,8,0,5) (0,101/2,0,31)%0A(0,0,0,0) (0,21,0,13) (0,8,0,5) (0,55,0,34)%0A%0A%0A%0A0%0A%0A%0A%0A12%0A3 1 0 3 %0A3 2 0 1 %0A3 4 1 3 %0A3 4 2 1 %0A3 8 5 6 %0A3 8 6 9 %0A3 8 7 5 %0A3 8 9 7 %0A4 5 0 2 6 %0A4 6 2 4 9 %0A4 7 3 0 5 %0A4 7 9 4 3 %0A%0A%0A%0A6%0A5 6 7 8 9 10 %0A%0A%0Atip 10%0A%0A"; 1477 1478// src/worker/legacy/resources/com/vzome/core/parts/sqrtPhi/tinyIcosahedra/red.vef 1479var red_default9 = "data:text/plain;charset=utf-8,vZome VEF 6 field sqrtPhi%0A%0Ascale (0,1/16,0,0)%0A%0A13%0A(0,0,0,0) (0,1,0,1/2) (0,0,0,0) (0,3/2,0,1)%0A(0,0,0,0) (0,5/4,0,3/4) (0,-1/2,0,-1/4) (0,19/4,0,3)%0A(0,0,0,0) (0,7/4,0,1) (0,5/4,0,3/4) (0,9/2,0,11/4)%0A(0,0,0,0) (0,5/2,0,3/2) (0,-3/2,0,-1) (0,4,0,5/2)%0A(0,0,0,0) (0,13/4,0,2) (0,5/4,0,3/4) (0,7/2,0,9/4)%0A(0,0,0,0) (0,15/4,0,9/4) (0,-1/2,0,-1/4) (0,13/4,0,2)%0A(0,0,0,0) (0,69/4,0,43/4) (0,-1/2,0,-1/4) (0,123/4,0,19)%0A(0,0,0,0) (0,71/4,0,11) (0,5/4,0,3/4) (0,61/2,0,75/4)%0A(0,0,0,0) (0,37/2,0,23/2) (0,-3/2,0,-1) (0,30,0,37/2)%0A(0,0,0,0) (0,77/4,0,12) (0,5/4,0,3/4) (0,59/2,0,73/4)%0A(0,0,0,0) (0,79/4,0,49/4) (0,-1/2,0,-1/4) (0,117/4,0,18)%0A(0,0,0,0) (0,20,0,25/2) (0,0,0,0) (0,65/2,0,20)%0A(0,0,0,0) (0,21,0,13) (0,0,0,0) (0,34,0,21)%0A%0A%0A%0A0%0A%0A%0A%0A15%0A3 2 0 1 %0A3 2 4 0 %0A3 3 0 5 %0A3 3 1 0 %0A3 4 5 0 %0A3 7 6 11 %0A3 7 11 9 %0A3 9 11 10 %0A3 11 6 8 %0A3 11 8 10 %0A4 2 1 6 7 %0A4 2 7 9 4 %0A4 3 5 10 8 %0A4 3 8 6 1 %0A4 9 10 5 4 %0A%0A%0A%0A7%0A6 7 8 9 10 11 12 %0A%0A%0Atip 12%0A%0A"; 1480 1481// src/worker/legacy/resources/com/vzome/core/parts/sqrtPhi/tinyIcosahedra/yellow.vef 1482var yellow_default12 = "data:text/plain;
1482charset=utf-8,vZome VEF 6 field sqrtPhi%0A%0Ascale (0,1/16,0,0)%0A%0A9%0A(0,0,0,0) (0,3/2,0,1) (0,0,0,0) (0,1/2,0,1/2)%0A(0,0,0,0) (0,7/2,0,9/4) (0,3/4,0,1/2) (0,11/4,0,7/4)%0A(0,0,0,0) (0,4,0,5/2) (0,-3/2,0,-1) (0,3/2,0,1)%0A(0,0,0,0) (0,9/2,0,11/4) (0,3/4,0,1/2) (0,1/4,0,1/4)%0A(0,0,0,0) (0,59/2,0,73/4) (0,3/4,0,1/2) (0,51/4,0,31/4)%0A(0,0,0,0) (0,30,0,37/2) (0,-3/2,0,-1) (0,23/2,0,7)%0A(0,0,0,0) (0,61/2,0,75/4) (0,3/4,0,1/2) (0,41/4,0,25/4)%0A(0,0,0,0) (0,65/2,0,20) (0,0,0,0) (0,25/2,0,15/2)%0A(0,0,0,0) (0,34,0,21) (0,0,0,0) (0,13,0,8)%0A%0A%0A%0A0%0A%0A%0A%0A9%0A3 1 3 0 %0A3 2 0 3 %0A3 2 1 0 %0A3 7 4 5 %0A3 7 5 6 %0A3 7 6 4 %0A4 5 2 3 6 %0A4 5 4 1 2 %0A4 6 3 1 4 %0A%0A%0A%0A5%0A4 5 6 7 8 %0A%0A%0Atip 8%0A%0A"; 1483
1484// src/worker/legacy/resources/com/vzome/core/parts/sqrtPhi/tinyIcosahedra/index.js 1485var shapes22 = { 1486 "blue": blue_default16, 1487 "connector": connector_default20, 1488 "green": green_default15, 1489 "red": red_default9, 1490 "yellow": yellow_default12 1491}; 1492var tinyIcosahedra_default = shapes22; 1493 1494// src/worker/legacy/resources/com/vzome/core/parts/sqrtPhi/zome/blue.vef 1495var blue_default17 = "data:text/plain;charset=utf-8,vZome VEF 6 field sqrtPhi%0Ascale (0,0,1/3,0)%0A%0A10%0A(0,0,0,0) (0,0,4,0) (-1,0,2,0) (2,0,-3,0) %0A(0,0,0,0) (0,0,4,0) (-1,0,2,0) (-2,0,3,0) %0A(0,0,0,0) (2,0,-2,0) (-1,0,2,0) (-2,0,3,0) %0A(0,0,0,0) (2,0,-2,0) (-1,0,2,0) (2,0,-3,0) %0A(0,0,0,0) (0,0,4,0) (1,0,-2,0) (2,0,-3,0) %0A(0,0,0,0) (2,0,-2,0) (1,0,-2,0) (2,0,-3,0) %0A(0,0,0,0) (2,0,-2,0) (1,0,-2,0) (-2,0,3,0) %0A(0,0,0,0) (0,0,4,0) (1,0,-2,0) (-2,0,3,0) %0A(0,0,0,0) (2,0,2,0) (0,0,0,0) (0,0,0,0) %0A(0,0,0,0) (0,0,0,0) (0,0,0,0) (0,0,0,0) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 0 1 2 3%0A4 5 6 7 4%0A4 5 4 0 3%0A4 1 7 6 2%0A3 0 4 8%0A3 1 0 8%0A3 7 1 8%0A3 4 7 8%0A3 3 2 9%0A3 5 3 9%0A3 6 5 9%0A3 2 6 9%0A%0A%0A5%0A 4 0 1 8 7%0A%0A%0Atip 8%0A"; 1496 1497// src/worker/legacy/resources/com/vzome/core/parts/sqrtPhi/zome/connector.vef 1498var connector_default21 = "data:text/plain;charset=utf-8,vZome VEF 6 field sqrtPhi%0Ascale (0,0,1/8,0)%0A%0A60%0A(0,0,0,0) (-2,0,0,0) (0,0,-1,0) (-1,0,1,0)%0A(0,0,0,0) (-2,0,0,0) (0,0,-1,0) (1,0,-1,0)%0A(0,0,0,0) (-2,0,0,0) (0,0,1,0) (-1,0,1,0)%0A(0,0,0,0) (-2,0,0,0) (0,0,1,0) (1,0,-1,0)%0A(0,0,0,0) (-1,0,-1,0) (0,0,-2,0) (0,0,-1,0)%0A(0,0,0,0) (-1,0,-1,0) (0,0,-2,0) (0,0,1,0)%0A(0,0,0,0) (-1,0,-1,0) (0,0,0,0) (-2,0,1,0)%0A(0,0,0,0) (-1,0,-1,0) (0,0,0,0) (2,0,-1,0)%0A(0,0,0,0) (-1,0,-1,0) (0,0,2,0) (0,0,-1,0)%0A(0,0,0,0) (-1,0,-1,0) (0,0,2,0) (0,0,1,0)%0A(0,0,0,0) (-2,0,1,0) (-1,0,-1,0) (0,0,0,0)%0A(0,0,0,0) (-2,0,1,0) (1,0,1,0) (0,0,0,0)%0A(0,0,0,0) (0,0,-2,0) (0,0,-1,0) (-1,0,-1,0)%0A(0,0,0,0) (0,0,-2,0) (0,0,-1,0) (1,0,1,0)%0A(0,0,0,0) (0,0,-2,0) (0,0,1,0) (-1,0,-1,0)%0A(0,0,0,0) (0,0,-2,0) (0,0,1,0) (1,0,1,0)%0A(0,0,0,0) (0,0,-1,0) (-1,0,-1,0) (0,0,-2,0)%0A(0,0,0,0) (0,0,-1,0) (-1,0,-1,0) (0,0,2,0)%0A(0,0,0,0) (0,0,-1,0) (-1,0,1,0) (-2,0,0,0)%0A(0,0,0,0) (0,0,-1,0) (-1,0,1,0) (2,0,0,0)%0A(0,0,0,0) (0,0,-1,0) (1,0,-1,0) (-2,0,0,0)%0A(0,0,0,0) (0,0,-1,0) (1,0,-1,0) (2,0,0,0)%0A(0,0,0,0) (0,0,-1,0) (1,0,1,0) (0,0,-2,0)%0A(0,0,0,0) (0,0,-1,0) (1,0,1,0) (0,0,2,0)%0A(0,0,0,0) (-1,0,1,0) (-2,0,0,0) (0,0,-1,0)%0A(0,0,0,0) (-1,0,1,0) (-2,0,0,0) (0,0,1,0)%0A(0,0,0,0) (-1,0,1,0) (2,0,0,0) (0,0,-1,0)%0A(0,0,0,0) (-1,0,1,0) (2,0,0,0) (0,0,1,0)%0A(0,0,0,0) (0,0,0,0) (-2,0,1,0) (-1,0,-1,0)%0A(0,0,0,0) (0,0,0,0) (-2,0,1,0) (1,0,1,0)%0A(0,0,0,0) (0,0,0,0) (2,0,-1,0) (-1,0,-1,0)%0A(0,0,0,0) (0,0,0,0) (2,0,-1,0) (1,0,1,0)%0A(0,0,0,0) (1,0,-1,0) (-2,0,0,0) (0,0,-1,0)%0A(0,0,0,0) (1,0,-1,0) (-2,0,0,0) (0,0,1,0)%0A(0,0,0,0) (1,0,-1,0) (2,0,0,0) (0,0,-1,0)%0A(0,0,0,0) (1,0,-1,0) (2,0,0,0) (0,0,1,0)%0A(0,0,0,0) (0,0,1,0) (-1,0,-1,0) (0,0,-2,0)%0A(0,0,0,0) (0,0,1,0) (-1,0,-1,0) (0,0,2,0)%0A(0,0,0,0) (0,0,1,0) (-1,0,1,0) (-2,0,0,0)%0A(0,0,0,0) (0,0,1,0) (-1,0,1,0) (2,0,0,0)%0A(0,0,0,0) (0,0,1,0) (1,0,-1,0) (-2,0,0,0)%0A(0,0,0,0) (0,0,1,0) (1,0,-1,0) (2,0,0,0)%0A(0,0,0,0) (0,0,1,0) (1,0,1,0) (0,0,-2,0)%0A(0,0,0,0) (0,0,1,0) (1,0,1,0) (0,0,2,0)%0A(0,0,0,0) (0,0,2,0) (0,0,-1,0) (-1,0,-1,0)%0A(0,0,0,0) (0,0,2,0) (0,0,-1,0) (1,0,1,0)%0A(0,0,0,0) (0,0,2,0) (0,0,1,0) (-1,0,-1,0)%0A(0,0,0,0) (0,0,2,0) (0,0,1,0) (1,0,1,0)%0A(0,0,0,0) (2,0,-1,0) (-1,0,-1,0) (0,0,0,0)%0A(0,0,0,0) (2,0,-1,0) (1,0,1,0) (0,0,0,0)%0A(0,0,0,0) (1,0,1,0) (0,0,-2,0) (0,0,-1,0)%0A(0,0,0,0) (1,0,1,0) (0,0,-2,0) (0,0,1,0)%0A(0,0,0,0) (1,0,1,0) (0,0,0,0) (-2,0,1,0)%0A(0,0,0,0) (1,0,1,0) (0,0,0,0) (2,0,-1,0)%0A(0,0,0,0) (1,0,1,0) (0,0,2,0) (0,0,-1,0)%0A(0,0,0,0) (1,0,1,0) (0,0,2,0) (0,0,1,0)%0A(0,0,0,0) (2,0,0,0) (0,0,-1,0) (-1,0,1,0)%0A(0,0,0,0) (2,0,0,0) (0,0,-1,0) (1,0,-1,0)%0A(0,0,0,0) (2,0,0,0) (0,0,1,0) (-1,0,1,0)%0A(0,0,0,0) (2,0,0,0) (0,0,1,0) (1,0,-1,0)%0A%0A%0A%0A0%0A%0A%0A%0A62%0A3 2 6 0 %0A3 3 1 7 %0A3 8 22 14 %0A3 9 15 23 %0A3 11 27 26 %0A3 16 4 12 %0A3 17 13 5 %0A3 25 10 24 %0A3 29 39 19 %0A3 30 40 20 %0A3 31 21 41 %0A3 33 32 48 %0A3 37 51 45 %0A3 38 28 18 %0A3 42 54 46 %0A3 49 34 35 %0A3 50 36 44 %0A3 55 43 47 %0A3 56 52 58 %0A3 59 53 57 %0A4 0 6 12 4 %0A4 2 8 14 6 %0A4 3 2 0 1 %0A4 5 13 7 1 %0A4 9 3 7 15 %0A4 11 9 23 27 %0A4 11 26 22 8 %0A4 17 29 19 13 %0A4 23 15 21 31 %0A4 24 10 4 16 %0A4 25 17 5 10 %0A4 27 35 34 26 %0A4 28 16 12 18 %0A4 30 20 14 22 %0A4 30 42 46 40 %0A4 32 36 50 48 %0A4 33 25 24 32 %0A4 37 33 48 51 %0A4 37 45 39 29 %0A4 40 38 18 20 %0A4 41 21 19 39 %0A4 42 34 49 54 %0A4 44 36 28 38 %0A4 47 43 31 41 %0A4 51 57 53 45 %0A4 52 46 54 58 %0A4 55 49 35 43 %0A4 56 50 44 52 %0A4 59 55 47 53 %0A4 59 57 56 58 %0A5 5 1 0 4 10 %0A5 7 13 19 21 15 %0A5 11 8 2 3 9 %0A5 20 18 12 6 14 %0A5 23 31 43 35 27 %0A5 24 16 28 36 32 %0A5 30 22 26 34 42 %0A5 37 29 17 25 33 %0A5 44 38 40 46 52 %0A5 45 53 47 41 39 %0A5 51 48 50 56 57 %0A5 59 58 54 49 55 %0A%0A%0A%0A0%0A%0A%0A"; 1499 1500// src/worker/legacy/resources/com/vzome/core/parts/sqrtPhi/zome/green.vef 1501var green_default16 = "data:text/plain;
1501charset=utf-8,vZome VEF 6 field sqrtPhi%0Ascale (0,1/3,0,0)%0A%0A20%0A(0,0,0,0) (0,-2,0,7) (0,0,0,0) (0,-1,0,5) %0A(0,0,0,0) (0,3,0,0) (0,-2,0,3) (0,0,0,4) %0A(0,0,0,0) (0,-4,0,10) (0,1,0,-2) (0,-4,0,10) %0A(0,0,0,0) (0,-4,0,10) (0,-1,0,2) (0,-4,0,10) %0A(0,0,0,0) (0,-6,0,13) (0,0,0,0) (0,-7,0,15) %0A(0,0,0,0) (0,-1,0,2) (0,-2,0,3) (0,2,0,-2) %0A(0,0,0,0) (0,-2,0,4) (0,1,0,-2) (0,0,0,1) %0A(0,0,0,0) (0,6,0,-8) (0,1,0,-2) (0,6,0,-8) %0A(0,0,0,0) (0,4,0,-2) (0,-1,0,2) (0,2,0,1) %0A(0,0,0,0) (0,3,0,0) (0,2,0,-3) (0,0,0,4) %0A(0,0,0,0) (0,4,0,-2) (0,1,0,-2) (0,2,0,1) %0A(0,0,0,0) (0,2,0,1) (0,0,0,0) (0,-1,0,6) %0A(0,0,0,0) (0,4,0,-5) (0,0,0,0) (0,3,0,-3) %0A(0,0,0,0) (0,-1,0,2) (0,2,0,-3) (0,2,0,-2) %0A(0,0,0,0) (0,8,0,-11) (0,0,0,0) (0,9,0,-13) %0A(0,0,0,0) (0,6,0,-8) (0,-1,0,2) (0,6,0,-8) %0A(0,0,0,0) (0,-2,0,4) (0,-1,0,2) (0,0,0,1) %0A(0,0,0,0) (0,0,0,1) (0,0,0,0) (0,3,0,-4) %0A(0,0,0,0) (0,2,0,2) (0,0,0,0) (0,2,0,2) %0A(0,0,0,0) (0,0,0,0) (0,0,0,0) (0,0,0,0) %0A%0A%0A0%0A%0A%0A%0A28%0A3 0 1 2%0A3 5 6 7%0A3 3 8 9%0A4 4 2 10 11%0A4 12 7 2 4%0A3 13 5 12%0A4 7 14 0 2%0A4 14 15 3 0%0A4 15 12 4 3%0A3 1 10 2%0A3 9 0 3%0A3 9 1 0%0A3 16 13 15%0A3 13 12 15%0A4 6 17 14 7%0A4 3 4 11 8%0A3 5 7 12%0A4 17 16 15 14%0A3 10 1 18%0A3 1 9 18%0A3 9 8 18%0A3 8 11 18%0A3 11 10 18%0A3 6 5 19%0A3 5 13 19%0A3 13 16 19%0A3 16 17 19%0A3 17 6 19%0A%0A %0A%0A%0A%0A10%0A 0 3 4 1 9 11 2 10 18 8%0A%0Atip 18%0A"; 1502 1503// src/worker/legacy/resources/com/vzome/core/parts/sqrtPhi/zome/red.vef 1504var red_default10 = "data:text/plain;charset=utf-8,vZome VEF 6 field sqrtPhi%0Ascale (0,0,1/3,0)%0A%0A22%0A(0,0,0,0) (-1/2,0,1/2,0) (3/2,0,1,0) (-2,0,1,0)%0A(0,0,0,0) (-1/2,0,1/2,0) (5/2,0,1,0) (0,0,-3,0)%0A(0,0,0,0) (1/2,0,-1,0) (3,0,0,0) (-1/2,0,-5/2,0)%0A(0,0,0,0) (1/2,0,-1/2,0) (1/2,0,0,0) (-1,0,1,0)%0A(0,0,0,0) (0,0,0,0) (-1/2,0,3/2,0) (-1/2,0,0,0)%0A(0,0,0,0) (0,0,0,0) (1/2,0,5/2,0) (-3/2,0,0,0)%0A(0,0,0,0) (1/2,0,-1/2,0) (3/2,0,1,0) (-2,0,1,0)%0A(0,0,0,0) (-1/2,0,1/2,0) (7/2,0,2,0) (-1,0,-3,0)%0A(0,0,0,0) (1/2,0,-1,0) (1,0,2,0) (-3/2,0,1/2,0)%0A(0,0,0,0) (-1/2,0,1,0) (1,0,2,0) (-3/2,0,1/2,0)%0A(0,0,0,0) (0,0,0,0) (7/2,0,-1/2,0) (-1/2,0,-2,0)%0A(0,0,0,0) (1/2,0,-1/2,0) (5/2,0,1,0) (0,0,-3,0)%0A(0,0,0,0) (0,0,0,0) (9/2,0,1/2,0) (-3/2,0,-2,0)%0A(0,0,0,0) (1/2,0,-1,0) (0,0,1,0) (-1/2,0,1/2,0)%0A(0,0,0,0) (-1/2,0,1,0) (0,0,1,0) (-1/2,0,1/2,0)%0A(0,0,0,0) (-1/2,0,1/2,0) (1/2,0,0,0) (-1,0,1,0)%0A(0,0,0,0) (1/2,0,-1,0) (4,0,1,0) (-3/2,0,-5/2,0)%0A(0,0,0,0) (1/2,0,-1/2,0) (7/2,0,2,0) (-1,0,-3,0)%0A(0,0,0,0) (-1/2,0,1,0) (4,0,1,0) (-3/2,0,-5/2,0)%0A(0,0,0,0) (0,0,0,0) (4,0,2,0) (-2,0,-2,0)%0A(0,0,0,0) (-1/2,0,1,0) (3,0,0,0) (-1/2,0,-5/2,0)%0A(0,0,0,0) (0,0,0,0) (0,0,0,0) (0,0,0,0) %0A%0A%0A0%0A%0A%0A%0A30%0A3 0 1 2%0A4 3 4 5 6%0A3 8 9 10%0A3 9 11 10%0A4 13 14 9 8%0A4 4 15 0 5%0A4 2 1 7 16%0A3 0 8 1%0A4 14 3 6 9%0A3 8 10 1%0A3 9 6 11%0A3 5 0 2%0A4 11 20 18 17%0A4 20 2 16 18%0A3 6 5 20%0A4 1 10 12 7%0A3 6 20 11%0A4 15 13 8 0%0A4 10 11 17 12%0A3 5 2 20%0A3 17 18 19%0A3 12 17 19 %0A3 7 12 19%0A3 16 7 19%0A3 18 16 19%0A3 3 14 21%0A3 4 3 21%0A3 15 4 21%0A3 13 15 21%0A3 14 13 21%0A%0A%0A6%0A 7 12 17 18 19 16%0A%0Atip 19%0A%0Amiddle 9 11 10 0 8 1 5 2 20 6%0A"; 1505 1506// src/worker/legacy/resources/com/vzome/core/parts/sqrtPhi/zome/yellow.vef 1507var yellow_default13 = "data:text/plain;charset=utf-8,vZome VEF 6 field sqrtPhi%0Ascale (0,0,1/3,0)%0A%0A14%0A(0,0,0,0) (-1/2,0,1,0) (0,0,1,0) (1/2,0,-1/2,0)%0A(0,0,0,0) (-1/2,0,3/2,0) (1/2,0,0,0) (0,0,0,0)%0A(0,0,0,0) (1/2,0,0,0) (1,0,-1/2,0) (0,0,0,0)%0A(0,0,0,0) (1/2,0,-1/2,0) (1/2,0,1/2,0) (1/2,0,-1/2,0)%0A(0,0,0,0) (3/2,0,-1,0) (2,0,0,0) (1/2,0,-1/2,0)%0A(0,0,0,0) (-1/2,0,1,0) (0,0,1,0) (-1/2,0,1/2,0)%0A(0,0,0,0) (1/2,0,-1/2,0) (1/2,0,1/2,0) (-1/2,0,1/2,0)%0A(0,0,0,0) (1/2,0,1/2,0) (3/2,0,1/2,0) (1/2,0,-1/2,0)%0A(0,0,0,0) (1/2,0,1/2,0) (3/2,0,1/2,0) (-1/2,0,1/2,0)%0A(0,0,0,0) (1,0,0,0) (2,0,1,0) (0,0,0,0)%0A(0,0,0,0) (1/2,0,0,0) (1,0,3/2,0) (0,0,0,0)%0A(0,0,0,0) (3/2,0,-1,0) (2,0,0,0) (-1/2,0,1/2,0)%0A(0,0,0,0) (3/2,0,-3/2,0) (3/2,0,1,0) (0,0,0,0)%0A(0,0,0,0) (0,0,0,0) (0,0,0,0) (0,0,0,0) %0A%0A%0A%0A0%0A%0A%0A%0A18%0A4 0 1 2 3%0A4 5 0 3 6%0A3 3 2 7%0A3 2 6 8%0A3 6 3 10%0A4 10 7 4 12%0A4 1 5 6 2%0A4 7 8 11 4%0A3 10 8 6%0A4 8 10 12 11%0A3 8 7 2%0A3 7 10 3%0A3 0 5 13%0A3 5 1 13%0A3 1 0 13%0A3 4 11 9%0A3 11 12 9%0A3 12 4 9%0A%0A%0A4%0A 4 9 11 12%0A%0Atip 9%0A%0Amiddle 10 8 6 7 2 3%0A"; 1508
1509// src/worker/legacy/resources/com/vzome/core/parts/sqrtPhi/zome/index.js 1510var shapes23 = { 1511 "blue": blue_default17, 1512 "connector": connector_default21, 1513 "green": green_default16, 1514 "red": red_default10, 1515 "yellow": yellow_default13 1516}; 1517var zome_default = shapes23; 1518 1519// src/worker/legacy/resources/com/vzome/core/parts/tiny/apple.vef 1520var apple_default3 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A11%0A(0,0) (12,-15) (9,-14) (-5,9)%0A(0,0) (6,-6) (9/2,-13/2) (-3/2,3)%0A(0,0) (-3,6) (-7/2,11/2) (3/2,-2)%0A(0,0) (6,-6) (7/2,-11/2) (-5/2,5)%0A(0,0) (6,-6) (9/2,-13/2) (-5/2,5)%0A(0,0) (-3,6) (-5/2,9/2) (3/2,-2)%0A(0,0) (-3,6) (-7/2,11/2) (5/2,-4)%0A(0,0) (-9,15) (-8,13) (5,-8)%0A(0,0) (-3,6) (-5/2,9/2) (5/2,-4)%0A(0,0) (3,0) (1,-1) (0,1)%0A(0,0) (6,-6) (7/2,-11/2) (-3/2,3)%0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 2 3 4 5%0A3 6 2 7%0A4 5 4 1 8%0A3 7 2 5%0A4 8 1 10 6%0A3 7 8 6%0A3 0 4 3%0A3 5 8 7%0A3 0 3 10%0A3 0 10 1%0A4 6 10 3 2%0A3 1 4 0%0A%0A%0A%0A6%0A 0 1 9 4 3 10%0A%0Atip 9%0A"; 1521 1522// src/worker/legacy/resources/com/vzome/core/parts/tiny/black.vef 1523var black_default2 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A11%0A(0,0) (-3,1) (1/2,-3/2) (1/2,-1)%0A(0,0) (1/2,-2) (0,0) (-3/2,5/2)%0A(0,0) (1/2,-2) (0,0) (-1/2,1/2)%0A(0,0) (-3,1) (1/2,-3/2) (3/2,-3)%0A(0,0) (-5,7/2) (1/2,-2) (5/2,-9/2)%0A(0,0) (1/2,-2) (-1,1) (-1/2,1/2)%0A(0,0) (-3,1) (-1/2,-1/2) (3/2,-3)%0A(0,0) (-3,1) (-1/2,-1/2) (1/2,-1)%0A(0,0) (1/2,-2) (-1,1) (-3/2,5/2)%0A(0,0) (5/2,-9/2) (-1,3/2) (-5/2,4)%0A(0,0) (-5/2,-1) (-1/2,-1/2) (0,-1/2)%0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 0 1 2 3%0A3 0 3 4%0A4 3 2 5 6%0A3 4 7 0%0A4 8 1 0 7%0A3 6 7 4%0A3 2 1 9%0A3 4 3 6%0A3 9 5 2%0A3 8 5 9%0A3 9 1 8%0A4 7 6 5 8%0A%0A%0A%0A6%0A 3 7 10 6 0 4%0A%0Atip 10%0A"; 1524 1525// src/worker/legacy/resources/com/vzome/core/parts/tiny/blue.vef 1526var blue_default18 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (0,1/2) %0A%0A11%0A(0,0) (-1,3) (1,0) (0,0) %0A(0,0) (-1,2) (0,2) (1,-1) %0A(0,0) (1,1) (1,4) (0,2) %0A(0,0) (1,2) (2,2) (-1,3) %0A(0,0) (3,-2) (2,2) (1,1) %0A(0,0) (3,-1) (3,0) (0,2) %0A(0,0) (3,-1) (2,3) (-1,4) %0A(0,0) (-1,2) (1,-1) (2,-3) %0A(0,0) (1,0) (2,-2) (1,-1) %0A(0,0) (1,-1) (1,0) (2,-2) %0A(0,0) (2,1) (3,2) (1,1) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 0 1 2 3%0A3 2 4 6%0A3 7 8 9%0A4 9 8 5 4%0A4 1 9 4 2%0A3 1 7 9%0A3 3 2 6%0A3 7 1 0%0A3 4 5 6%0A3 5 3 6%0A4 8 0 3 5%0A3 8 7 0%0A%0A%0A%0A6%0A 4 5 6 10 2 3%0A%0Atip 10%0A"; 1527 1528// src/worker/legacy/resources/com/vzome/core/parts/tiny/brown.vef 1529var brown_default6 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A11%0A(0,0) (0,3) (-1/2,3/2) (-5/2,4)%0A(0,0) (3/2,-3/2) (3/2,-2) (3,-5)%0A(0,0) (3/2,-3/2) (3/2,-2) (2,-3)%0A(0,0) (0,3) (-1/2,3/2) (-7/2,6)%0A(0,0) (0,3) (-3/2,5/2) (-7/2,6)%0A(0,0) (3/2,3/2) (0,1/2) (-1/2,1)%0A(0,0) (3/2,-3/2) (1/2,-1) (2,-3)%0A(0,0) (-3/2,6) (-5/2,9/2) (-7,23/2)%0A(0,0) (3,-9/2) (5/2,-4) (13/2,-21/2)%0A(0,0) (3/2,-3/2) (1/2,-1) (3,-5)%0A(0,0) (0,3) (-3/2,5/2) (-5/2,4)%0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 0 1 2 3%0A4 3 2 6 4%0A3 0 3 7%0A3 8 6 2%0A4 4 6 9 10%0A3 8 1 9%0A3 7 10 0%0A3 8 9 6%0A3 7 3 4%0A3 2 1 8%0A4 10 9 1 0%0A3 4 10 7%0A%0A%0A%0A6%0A 4 5 3 0 10 7%0A%0Atip 5%0A"; 1530 1531// src/worker/legacy/resources/com/vzome/core/parts/tiny/cinnamon.vef 1532var cinnamon_default2 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A11%0A(0,0) (-2,8) (-14,23) (-5,9)%0A(0,0) (0,4) (-13/2,21/2) (-5/2,5)%0A(0,0) (0,4) (-13/2,21/2) (-3/2,3)%0A(0,0) (2,-2) (11/2,-17/2) (5/2,-4)%0A(0,0) (2,-2) (9/2,-15/2) (5/2,-4)%0A(0,0) (4,-6) (13,-21) (5,-8)%0A(0,0) (2,-2) (9/2,-15/2) (3/2,-2)%0A(0,0) (0,4) (-11/2,19/2) (-5/2,5)%0A(0,0) (2,-2) (11/2,-17/2) (3/2,-2)%0A(0,0) (0,4) (-11/2,19/2) (-3/2,3)%0A(0,0) (2,2) (-1,2) (0,1)%0A%0A%0A%0A0%0A%0A%0A%0A12%0A3 0 1 2%0A3 3 4 5%0A3 5 4 6%0A4 6 1 7 8%0A4 8 7 9 3%0A3 5 8 3%0A3 6 8 5%0A3 0 2 9%0A3 0 7 1%0A4 3 9 2 4%0A4 4 2 1 6%0A3 9 7 0%0A%0A%0A%0A6%0A 1 7 9 10 2 0%0A%0Atip 10%0A"; 1533 1534// src/worker/legacy/resources/com/vzome/core/parts/tiny/connector.vef 1535var connector_default22 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A12%0A(0,0) (-1/2,1/2) (1/2,-1) (0,0)%0A(0,0) (-1/2,1/2) (-1/2,1) (0,0)%0A(0,0) (1/2,-1) (0,0) (-1/2,1/2)%0A(0,0) (1/2,-1) (0,0) (1/2,-1/2)%0A(0,0) (0,0) (-1/2,1/2) (1/2,-1)%0A(0,0) (0,0) (-1/2,1/2) (-1/2,1)%0A(0,0) (0,0) (1/2,-1/2) (1/2,-1)%0A(0,0) (0,0) (1/2,-1/2) (-1/2,1)%0A(0,0) (-1/2,1) (0,0) (-1/2,1/2)%0A(0,0) (-1/2,1) (0,0) (1/2,-1/2)%0A(0,0) (1/2,-1/2) (1/2,-1) (0,0)%0A(0,0) (1/2,-1/2) (-1/2,1) (0,0)%0A%0A%0A%0A0%0A%0A%0A%0A20%0A3 1 0 3 %0A3 1 2 0 %0A3 3 0 5 %0A3 4 0 2 %0A3 5 0 4 %0A3 6 2 1 %0A3 7 1 3 %0A3 7 3 9 %0A3 7 6 1 %0A3 8 2 6 %0A3 8 4 2 %0A3 9 3 5 %0A3 10 4 8 %0A3 10 5 4 %0A3 10 9 5 %0A3 11 6 7 %0A3 11 7 9 %0A3 11 8 6 %0A3 11 9 10 %0A3 11 10 8 %0A%0A%0A%0A0%0A%0A%0A"; 1536 1537// src/worker/legacy/resources/com/vzome/core/parts/tiny/coral.vef 1538var coral_default2 = "data:text/plain;
1538charset=utf-8,vZome VEF 6 field golden%0A%0A11%0A(0,0) (0,4) (7/2,-11/2) (3/2,-1)%0A(0,0) (-2,8) (9,-14) (4,-5)%0A(0,0) (0,4) (9/2,-13/2) (3/2,-1)%0A(0,0) (2,-2) (-5/2,9/2) (-1/2,1)%0A(0,0) (0,4) (9/2,-13/2) (5/2,-3)%0A(0,0) (0,4) (7/2,-11/2) (5/2,-3)%0A(0,0) (2,-2) (-7/2,11/2) (-1/2,1)%0A(0,0) (2,-2) (-7/2,11/2) (-3/2,3)%0A(0,0) (2,-2) (-5/2,9/2) (-3/2,3)%0A(0,0) (4,-6) (-8,13) (-3,5)%0A(0,0) (2,2) (1,-1) (1,0)%0A%0A%0A%0A0%0A%0A%0A%0A12%0A3 0 1 2%0A4 3 4 5 6%0A3 5 1 0%0A4 7 0 2 8%0A3 2 1 4%0A3 9 6 7%0A3 7 8 9%0A4 8 2 4 3%0A4 6 5 0 7%0A3 3 6 9%0A3 4 1 5%0A3 9 8 3%0A%0A%0A%0A6%0A 5 4 10 1 2 0%0A%0Atip 10%0A"; 1539 1540// src/worker/legacy/resources/com/vzome/core/parts/tiny/green.vef 1541var green_default17 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (0,1/2) %0A%0A11%0A(0,0) (-2,8) (0,0) (-2,8) %0A(0,0) (2,1) (4,-7) (-2,7) %0A(0,0) (2,1) (-4,7) (-2,7) %0A(0,0) (-2,7) (-4,7) (2,1) %0A(0,0) (0,1) (4,-7) (4,-5) %0A(0,0) (0,1) (-4,7) (4,-5) %0A(0,0) (4,-6) (0,0) (4,-6) %0A(0,0) (4,-5) (-4,7) (0,1) %0A(0,0) (4,-5) (4,-7) (0,1) %0A(0,0) (-2,7) (4,-7) (2,1) %0A(0,0) (2,2) (0,0) (2,2) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A3 1 2 0%0A3 2 3 0%0A3 4 5 6%0A3 7 8 6%0A4 2 1 8 7%0A4 4 8 1 9%0A3 8 4 6%0A3 3 9 0%0A4 3 2 7 5%0A3 5 7 6%0A3 9 1 0%0A4 5 4 9 3%0A%0A%0A%0A6%0A 0 1 2 9 3 10%0A%0Atip 10%0A"; 1542 1543// src/worker/legacy/resources/com/vzome/core/parts/tiny/lavender.vef 1544var lavender_default4 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A11%0A(0,0) (-8,8) (0,4) (-4,4) %0A(0,0) (-4,2) (1/2,5/2) (-3/2,0) %0A(0,0) (-9/2,5/2) (3/2,1) (-2,1) %0A(0,0) (6,-10) (2,-3) (3,-5) %0A(0,0) (3/2,-7/2) (3/2,-2) (1,-2) %0A(0,0) (2,-4) (1/2,-1/2) (3/2,-3) %0A(0,0) (-4,2) (3/2,3/2) (-5/2,2) %0A(0,0) (5/2,-9/2) (1/2,0) (1,-2) %0A(0,0) (-7/2,3/2) (1/2,3) (-2,1) %0A(0,0) (-2,-2) (2,1) (-1,-1) %0A(0,0) (2,-4) (3/2,-3/2) (1/2,-1) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A3 0 1 2%0A3 3 4 5%0A4 7 5 1 8%0A4 5 4 2 1%0A3 3 7 10%0A3 8 1 0%0A4 8 6 10 7%0A3 10 4 3%0A4 6 2 4 10%0A3 5 7 3%0A3 0 6 8%0A3 0 2 6%0A%0A%0A%0A6%0A 6 9 2 0 8 1%0A%0Atip 9%0A"; 1545 1546// src/worker/legacy/resources/com/vzome/core/parts/tiny/maroon.vef 1547var maroon_default4 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A11%0A(0,0) (-3/2,0) (0,-5) (-3/2,1/2) %0A(0,0) (3,-5) (-7,11) (3,-5) %0A(0,0) (1/2,-3/2) (-7/2,5) (1,-2) %0A(0,0) (3/2,-3) (-3,4) (3/2,-5/2) %0A(0,0) (-4,4) (4,-12) (-4,4) %0A(0,0) (-5/2,3/2) (-1/2,-4) (-2,1) %0A(0,0) (-5/4,0) (-3/4,-15/4) (-9/2,19/4) %0A(0,0) (-1/4,-3/2) (-1/4,-19/4) (-4,17/4) %0A(0,0) (7/4,-3) (-15/4,21/4) (-3/2,7/4) %0A(0,0) (11/4,-9/2) (-13/4,17/4) (-1,5/4) %0A(0,0) (-1,-1) (-3,-1) (-1,-1) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A3 1 2 3%0A3 4 5 6%0A4 7 6 8 9%0A3 4 6 7%0A3 1 9 8%0A3 4 7 0%0A3 3 9 1%0A3 8 2 1%0A4 2 8 6 5%0A4 0 7 9 3%0A3 0 5 4%0A4 3 2 5 0%0A%0A%0A%0A6%0A 0 5 7 10 6 4%0A%0Atip 10%0A"; 1548 1549// src/worker/legacy/resources/com/vzome/core/parts/tiny/navy.vef 1550var navy_default2 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A11%0A(0,0) (-2,8) (4,-5) (-5,9)%0A(0,0) (0,4) (3/2,-3/2) (-3/2,3)%0A(0,0) (0,4) (5/2,-5/2) (-3/2,3)%0A(0,0) (0,4) (5/2,-5/2) (-5/2,5)%0A(0,0) (0,4) (3/2,-3/2) (-5/2,5)%0A(0,0) (2,-2) (-3/2,5/2) (3/2,-2)%0A(0,0) (2,-2) (-3/2,5/2) (5/2,-4)%0A(0,0) (2,-2) (-1/2,3/2) (5/2,-4)%0A(0,0) (2,-2) (-1/2,3/2) (3/2,-2)%0A(0,0) (4,-6) (-3,5) (5,-8)%0A(0,0) (2,2) (1,0) (0,1)%0A%0A%0A%0A0%0A%0A%0A%0A12%0A3 0 1 2%0A4 5 6 1 4%0A4 7 2 1 6%0A4 8 3 2 7%0A3 2 3 0%0A3 4 1 0%0A3 9 6 5%0A4 4 3 8 5%0A3 0 3 4%0A3 7 6 9%0A3 9 8 7%0A3 9 5 8%0A%0A%0A%0A6%0A 3 4 1 2 0 10%0A%0Atip 10%0A"; 1551 1552// src/worker/legacy/resources/com/vzome/core/parts/tiny/olive.vef 1553var olive_default4 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (0,1/2) %0A%0A%0A11%0A(0,0) (2,-1) (1,-1) (2,0) %0A(0,0) (1,0) (2,-3) (0,2) %0A(0,0) (0,1) (2,-2) (1,0) %0A(0,0) (1,0) (1,0) (3,-2) %0A(0,0) (0,1) (0,0) (-1,4) %0A(0,0) (1,0) (-1,2) (1,2) %0A(0,0) (2,-1) (-1,3) (4,-2) %0A(0,0) (0,1) (-1,3) (2,0) %0A(0,0) (-1,2) (0,1) (0,2) %0A(0,0) (-1,2) (2,-3)
1553(-2,4) %0A(0,0) (1,1) (1,0) (2,2) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 0 1 2 3%0A4 4 1 0 5%0A3 6 5 0%0A3 8 2 9%0A3 6 3 7%0A3 2 1 9%0A4 7 3 2 8%0A3 1 4 9%0A3 4 8 9%0A3 6 0 3%0A4 4 5 7 8%0A3 5 6 7%0A%0A%0A%0A6%0A 7 10 6 5 0 3%0A%0Atip 10%0A"; 1554 1555// src/worker/legacy/resources/com/vzome/core/parts/tiny/orange.vef 1556var orange_default2 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (0,1/2) %0A%0A11%0A(0,0) (-1/2,2) (3/2,1/2) (1,-1/2) %0A(0,0) (1,-1/2) (5/2,0) (-1/2,3/2) %0A(0,0) (-1,5/2) (1/2,1) (3/2,-3/2) %0A(0,0) (-1/2,1) (1/2,5/2) (0,1/2) %0A(0,0) (-1,3/2) (-1/2,3) (1/2,-1/2) %0A(0,0) (3/2,-1) (5/2,-3/2) (0,1/2) %0A(0,0) (1,-1/2) (3/2,-1) (1/2,-1/2) %0A(0,0) (3/2,-2) (3/2,1/2) (-1,3/2) %0A(0,0) (1/2,1/2) (2,3/2) (1/2,0) %0A(0,0) (-1/2,1) (-1/2,3/2) (1,-3/2) %0A(0,0) (1,-3/2) (1/2,1) (-1/2,1/2) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 2 0 3 4%0A3 1 0 5%0A4 0 2 6 5%0A3 2 9 6%0A3 10 9 4%0A3 4 9 2%0A3 3 0 1%0A3 5 7 1%0A3 1 7 3%0A4 5 6 10 7%0A3 6 9 10%0A4 4 3 7 10%0A%0A%0A%0A6%0A 0 1 7 8 3 5%0A%0Atip 8%0A"; 1557 1558// src/worker/legacy/resources/com/vzome/core/parts/tiny/purple.vef 1559var purple_default4 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (0,1/2) %0A%0A11%0A(0,0) (-3/2,1) (3/2,-5/2) (0,3/2) %0A(0,0) (-1/2,0) (3/2,-3/2) (1,-1/2) %0A(0,0) (-1/2,1/2) (1,-3/2) (-3/2,3) %0A(0,0) (-1/2,-1/2) (-1,3/2) (1/2,2) %0A(0,0) (-1/2,0) (-1/2,1/2) (-1,7/2) %0A(0,0) (1/2,-1) (-1/2,3/2) (0,3/2) %0A(0,0) (1/2,-3/2) (-1,5/2) (3/2,0) %0A(0,0) (-1/2,-1) (-1/2,3/2) (3,-3/2) %0A(0,0) (-3/2,1/2) (1,-3/2) (3/2,0) %0A(0,0) (-1,-1/2) (1/2,0) (3/2,3/2) %0A(0,0) (-1/2,-1/2) (1,-1/2) (5/2,-2) %0A%0A%0A%0A0%0A%0A%0A%0A12%0A3 0 1 2%0A4 3 4 5 6%0A3 7 8 3%0A3 5 2 1%0A3 3 6 7%0A4 1 10 6 5%0A4 10 1 0 8%0A3 7 6 10%0A3 5 4 2%0A4 8 0 4 3%0A3 10 8 7%0A3 4 0 2%0A%0A%0A%0A6%0A 9 7 6 8 10 3%0A%0Atip 9%0A"; 1560 1561// src/worker/legacy/resources/com/vzome/core/parts/tiny/red.vef 1562var red_default11 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (0,1/2) %0A %0A13%0A(0,0) (1/2,1) (-1/2,3/2) (0,1/2) %0A(0,0) (1/2,2) (1/2,1/2) (0,1/2) %0A(0,0) (3/2,0) (3/2,-1/2) (0,1/2) %0A(0,0) (3/2,-1) (1/2,1/2) (0,1/2) %0A(0,0) (1,0) (0,1) (-1,1) %0A(0,0) (3/2,-1/2) (0,1/2) (1/2,-1) %0A(0,0) (1,-1) (-1,2) (0,0) %0A(0,0) (1,2) (2,-1) (0,0) %0A(0,0) (1/2,3/2) (1,1/2) (1/2,-1) %0A(0,0) (1,1) (1,0) (-1,1) %0A(0,0) (2,1) (1,1) (0,0) %0A(0,0) (1/2,1/2) (0,3/2) (1/2,-1) %0A(0,0) (3/2,1/2) (1,-1/2) (1/2,-1) %0A%0A%0A%0A0%0A%0A%0A%0A15%0A4 0 1 2 3%0A3 4 5 6%0A3 7 8 2%0A3 5 0 6%0A3 7 9 8%0A4 3 2 8 11%0A4 4 9 12 5%0A3 7 12 9%0A3 11 4 6%0A3 0 3 6%0A3 7 1 12%0A3 3 11 6%0A3 7 2 1%0A4 11 8 9 4%0A4 5 12 1 0%0A%0A%0A%0A7%0A 1 9 8 2 10 7 12%0A%0Atip 10%0A"; 1563 1564// src/worker/legacy/resources/com/vzome/core/parts/tiny/rose.vef 1565var rose_default2 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A11%0A(0,0) (-1,3) (-1/2,1/2) (3/2,-2)%0A(0,0) (4,-2) (-1/2,1/2) (-5/2,5)%0A(0,0) (4,-2) (1/2,-1/2) (-5/2,5)%0A(0,0) (-1,3) (1/2,-1/2) (3/2,-2)%0A(0,0) (-1,3) (-1/2,1/2) (5/2,-4)%0A(0,0) (4,-2) (-1/2,1/2) (-3/2,3)%0A(0,0) (-4,7) (0,0) (5,-8)%0A(0,0) (-1,3) (1/2,-1/2) (5/2,-4)%0A(0,0) (4,-2) (1/2,-1/2) (-3/2,3)%0A(0,0) (7,-6) (0,0) (-5,9)%0A(0,0) (3,1) (0,0) (0,1)%0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 0 1 2 3%0A4 4 5 1 0%0A3 6 7 4%0A4 7 8 5 4%0A3 9 5 8%0A3 4 0 6%0A3 6 0 3%0A3 9 2 1%0A3 8 2 9%0A4 2 8 7 3%0A3 6 3 7%0A3 1 5 9%0A%0A%0A%0A6%0A 8 10 1 9 5 2%0A%0Atip 10%0A"; 1566 1567// src/worker/legacy/resources/com/vzome/core/parts/tiny/sand.vef 1568var sand_default2 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A11%0A(0,0) (0,1) (9/2,-15/2) (-5/2,4)%0A(0,0) (2,0) (-13/2,21/2) (9/2,-7)%0A(0,0) (2,0) (-13/2,21/2) (7/2,-5)%0A(0,0) (0,1) (9/2,-15/2) (-7/2,6)%0A(0,0) (2,1) (-1,2) (1,-1)%0A(0,0) (0,1) (11/2,-17/2) (-7/2,6)%0A(0,0) (-1,2) (13,-21) (-8,13)%0A(0,0) (2,0) (-11/2,19/2) (7/2,-5)%0A(0,0) (2,0) (-11/2,19/2) (9/2,-7)%0A(0,0) (0,1) (11/2,-17/2) (-5/2,4)%0A(0,0) (3,-1) (-14,23) (9,-14)%0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 0 1 2 3%0A3 3 5 6%0A4 5 7 8 9%0A3 6 0 3%0A3 6 5 9%0A3 7 2 10%0A3 10 8 7%0A3 9 0 6%0A3 10 2 1%0A4 3 2 7 5%0A4 8 1 0 9%0A3 1 8 10%0A%0A%0A%0A6%0A 4 7 1 2 8 10%0A%0At
1568ip 4%0A"; 1569 1570// src/worker/legacy/resources/com/vzome/core/parts/tiny/spruce.vef 1571var spruce_default2 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A11%0A(0,0) (12,-19) (-8,13) (-8,13)%0A(0,0) (5,-7) (-7/2,11/2) (-5/2,4)%0A(0,0) (5,-7) (-7/2,11/2) (-7/2,6)%0A(0,0) (-4,10) (9/2,-13/2) (7/2,-5)%0A(0,0) (-4,10) (7/2,-11/2) (7/2,-5)%0A(0,0) (-4,10) (7/2,-11/2) (9/2,-7)%0A(0,0) (-11,22) (9,-14) (9,-14)%0A(0,0) (5,-7) (-5/2,9/2) (-7/2,6)%0A(0,0) (5,-7) (-5/2,9/2) (-5/2,4)%0A(0,0) (-4,10) (9/2,-13/2) (9/2,-7)%0A(0,0) (1,3) (1,-1) (1,-1)%0A%0A%0A%0A0%0A%0A%0A%0A12%0A3 0 1 2%0A3 4 5 6%0A3 6 3 4%0A3 0 7 8%0A4 2 4 3 7%0A3 9 3 6%0A3 8 1 0%0A3 6 5 9%0A4 7 3 9 8%0A4 1 5 4 2%0A4 8 9 5 1%0A3 0 2 7%0A%0A%0A%0A6%0A 3 6 9 10 4 5%0A%0Atip 10%0A"; 1572 1573// src/worker/legacy/resources/com/vzome/core/parts/tiny/sulfur.vef 1574var sulfur_default2 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A11%0A(0,0) (-3,6) (3/2,-5/2) (-1/2,1)%0A(0,0) (-3,6) (5/2,-7/2) (-1/2,1)%0A(0,0) (-9,15) (5,-8) (0,0)%0A(0,0) (-3,6) (5/2,-7/2) (1/2,-1)%0A(0,0) (15,-21) (-13/2,23/2) (1/2,-1)%0A(0,0) (15,-21) (-15/2,25/2) (1/2,-1)%0A(0,0) (-3,6) (3/2,-5/2) (1/2,-1)%0A(0,0) (15,-21) (-15/2,25/2) (-1/2,1)%0A(0,0) (15,-21) (-13/2,23/2) (-1/2,1)%0A(0,0) (21,-30) (-10,17) (0,0)%0A(0,0) (3,0) (0,1) (0,0)%0A%0A%0A%0A0%0A%0A%0A%0A12%0A3 0 1 2%0A4 3 4 5 6%0A4 0 7 8 1%0A3 5 4 9%0A4 1 8 4 3%0A3 8 7 9%0A3 2 6 0%0A3 2 1 3%0A3 9 7 5%0A3 3 6 2%0A4 6 5 7 0%0A3 9 4 8%0A%0A%0A%0A6%0A 5 7 8 10 9 4%0A%0Atip 10%0A"; 1575 1576// src/worker/legacy/resources/com/vzome/core/parts/tiny/turquoise.vef 1577var turquoise_default3 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A11%0A(0,0) (2,-2) (5/2,-7/2) (-7/2,6)%0A(0,0) (2,-2) (3/2,-5/2) (-7/2,6)%0A(0,0) (0,4) (-5/2,9/2) (7/2,-5)%0A(0,0) (0,4) (-3/2,7/2) (7/2,-5)%0A(0,0) (2,2) (0,1) (1,-1)%0A(0,0) (1/19,4/19) (-3/38,7/38) (7/38,-5/19)%0A(0,0) (2,-2) (5/2,-7/2) (-5/2,4)%0A(0,0) (0,4) (-5/2,9/2) (9/2,-7)%0A(0,0) (2,-2) (3/2,-5/2) (-5/2,4)%0A(0,0) (0,4) (-3/2,7/2) (9/2,-7)%0A(0,0) (37/19,34/19) (3/38,31/38) (31/38,-14/19)%0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 0 1 2 3%0A3 5 0 6%0A4 8 7 2 1%0A4 6 9 7 8%0A4 6 0 3 9%0A3 10 2 7%0A3 6 8 5%0A3 7 9 10%0A3 8 1 5%0A3 3 2 10%0A3 5 1 0%0A3 10 9 3%0A%0A%0A%0A6%0A 4 7 10 3 2 9%0A%0Atip 4%0A"; 1578 1579// src/worker/legacy/resources/com/vzome/core/parts/tiny/yellow.vef 1580var yellow_default14 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A scale (0,1/2) %0A%0A9%0A(0,0) (2,1) (2,1) (2,1) %0A(0,0) (3,-1) (3,-1) (3,-1) %0A(0,0) (3/2,1/2) (2,1/2) (5/2,-1) %0A(0,0) (5/2,-1) (3/2,1/2) (2,1/2) %0A(0,0) (-1/2,3/2) (0,3/2) (1/2,0) %0A(0,0) (0,3/2) (1/2,0) (-1/2,3/2) %0A(0,0) (-1,2) (-1,2) (-1,2) %0A(0,0) (2,1/2) (5/2,-1) (3/2,1/2) %0A(0,0) (1/2,0) (-1/2,3/2) (0,3/2) %0A%0A%0A%0A0%0A%0A%0A%0A9%0A3 1 2 3%0A3 4 5 6%0A4 2 7 5 4%0A4 3 2 4 8%0A3 1 7 2%0A4 7 3 8 5%0A3 5 8 6%0A3 1 3 7%0A3 8 4 6%0A%0A%0A%0A5%0A 0 1 7 2 3%0A%0Atip 0%0A"; 1581
1582// src/worker/legacy/resources/com/vzome/core/parts/tiny/index.js 1583var shapes24 = { 1584 "apple": apple_default3, 1585 "black": black_default2, 1586 "blue": blue_default18, 1587 "brown": brown_default6, 1588 "cinnamon": cinnamon_default2, 1589 "connector": connector_default22, 1590 "coral": coral_default2, 1591 "green": green_default17, 1592 "lavender": lavender_default4, 1593 "maroon": maroon_default4, 1594 "navy": navy_default2, 1595 "olive": olive_default4, 1596 "orange": orange_default2, 1597 "purple": purple_default4, 1598 "red": red_default11, 1599 "rose": rose_default2, 1600 "sand": sand_default2, 1601 "spruce": spruce_default2, 1602 "sulfur": sulfur_default2, 1603 "turquoise": turquoise_default3, 1604 "yellow": yellow_default14 1605}; 1606var tiny_default = shapes24; 1607 1608// src/worker/legacy/resources/com/vzome/core/parts/vienne2/connector.vef 1609var connector_default23 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A60%0A(0,0) (1/2,-1/2) (-1/2,0) (1,-1)%0A(0,0) (1/2,0) (-1,1) (1/2,-1/2)%0A(0,0) (1,-1) (-1/2,1/2) (1/2,0)%0A(0,0) (0,1) (1/2,-1/2) (-1/2,1)%0A(0,0) (1/2,0) (1,-1) (1/2,-1/2)%0A(0,0) (1,-1) (1/2,-1/2) (1/2,0)%0A(0,0) (1/2,0) (0,0) (-1/2,3/2)%0A(0,0) (-1/2,1) (0,-1) (1/2,-1/2)%0A(0,0) (1/2,-1) (0,-1) (1/2,-1/2)%0A(0,0) (1/2,-1) (0,-1) (-1/2,1/2)%0A(0,0) (-1/2,1) (0,-1) (-1/2,1/2)%0A(0,0) (0,1) (-1/2,1/2) (1/2,-1)%0A(0,0) (1/2,0) (-1,1) (-1/2,1/2)%0A(0,0) (1,-1) (-1/2,1/2) (-1/2,0)%0A(0,0) (1/2,0) (0,0) (1/2,-3/2)%0A(0,0) (0,0) (-1/2,3/2) (-1/2,0)%0A(0,0) (1/2,-1/2) (1/2,0) (-1,1)%0A(0,0) (1,-1) (1/2,-1/2) (-1/2,0)%0A(0,0) (1/2,-1/2) (-1/2,1) (0,-1)%0A(0,0) (0,1) (1/2,-1/2) (1/2,-1)%0A(0,0) (-1/2,1/2) (-1/2,0) (1,-1)%0A(0,0) (0,0) (1/2,-3/2) (1/2,0)%0A(0,0) (1/2,0) (1,-1) (-1/2,1/2)%0A(0,0) (-1/2,3/2) (1/2,0) (0,0)%0A(0,0) (1/2,-3/2) (1/2,0) (0,0)%0A(0,0) (-1/2,0) (1,-1) (1/2,-1/2)%0A(0,0) (-1/2,1/2) (1/2,0) (1,-1)%0A(0,0) (1/2,-1) (0,1) (1/2,-1/2)%0A(0,0) (1/2,-1/2) (1/2,-1) (0,-1)%0A(0,0) (-1/2,1) (0,1) (1/2,-1/2)%0A(0,0) (1/2,-1/2) (1/2,0) (1,-1)%0A(0,0) (-1/2,0) (-1,1) (1/2,-1/2)%0A(0,0) (1/2,-3/2) (-1/2,0) (0,0)%0A(0,0) (0,0) (-1/2,3/2) (1/2,0)%0A(0,0) (1/2,-1/2) (-1/2,0) (-1,1)%0A(0,0) (0,0) (1/2,-3/2) (-1/2,0)%0A(0,0) (0,-1) (1/2,-1/2) (-1/2,1)%0A(0,0) (-1/2,0) (0,0) (-1/2,3/2)%0A(0,0) (-1,1) (1/2,-1/2) (1/2,0)%0A(0,0) (0,1) (-1/2,1/2) (-1/2,1)%0A(0,0) (-1/2,1/2) (-1/2,0) (-1,1)%0A(0,0) (0,-1) (1/2,-1/2) (1/2,-1)%0A(0,0) (0,-1) (-1/2,1/2) (1/2,-1)%0A(0,0) (0,-1) (-1/2,1/2) (-1/2,1)%0A(0,0) (-1/2,1) (0,1) (-1/2,1/2)%0A(0,0) (-1/2,0) (1,-1) (-1/2,1/2)%0A(0,0) (1/2,-1) (0,1) (-1/2,1/2)%0A(0,0) (-1/2,1/2) (1/2,0) (-1,1)%0A(0,0) (-1,1) (-1/2,1/2) (1/2,0)%0A(0,0) (1/2,-1/2) (-1/2,1) (0,1)%0A(0,0) (-1/2,1/2) (-1/2,1) (0,-1)%0A(0,0) (-1/2,1/2) (-1/2,1) (0,1)%0A(0,0) (-1/2,1/2) (1/2,-1) (0,1)%0A(0,0) (1/2,-1/2) (1/2,-1) (0,1)%0A(0,0) (-1/2,3/2) (-1/2,0) (0,0)%0A(0,0) (-1/2,0) (0,0) (1/2,-3/2)%0A(0,0) (-1,1) (-1/2,1/2) (-1/2,0)%0A(0,0) (-1/2,1/2) (1/2,-1) (0,-1)%0A(0,0) (-1,1) (1/2,-1/2) (-1/2,0)%0A(0,0) (-1/2,0) (-1,1) (-1/2,1/2)%0A%0A%0A%0A0%0A%0A%0A%0A62%0A3 0 1 2%0A4 3 4 5 6%0A4 7 8 9 10%0A4 11 12 13 14%0A4 15 16 17 18%0A3 11 14 19%0A5 20 8 7 0 21%0A5 19 22 23 4 3%0A4 24 25 26 27%0A5 13 28 18 17 14%0A4 29 30 4 23%0A4 8 20 31 32%0A5 27 26 33 30 29%0A4 28 13 34 35%0A4 25 36 37 38%0A3 39 3 6%0A5 9 40 35 34 10%0A4 36 41 42 43%0A3 44 29 23%0A5 45 41 36 25 24%0A4 46 47 45 24%0A3 20 48 31%0A4 49 5 30 33%0A3 50 15 18%0A4 51 52 53 49%0A4 1 39 6 2%0A3 51 49 33%0A5 15 47 46 44 16%0A3 34 13 12%0A4 44 46 27 29%0A3 30 5 4%0A3 7 10 54%0A5 53 2 6 5 49%0A3 41 55 42%0A4 56 57 35 40%0A4 57 50 18 28%0A5 55 58 50 57 56%0A4 0 7 54 1%0A4 50 58 47 15%0A3 46 24 27%0A3 52 21 53%0A3 47 58 45%0A4 10 34 12 54%0A4 39 11 19 3%0A5 37 48 52 51 38%0A4 14 17 22 19%0A4 16 44 23 22%0A4 32 59 40 9%0A4 38 51 33 26%0A4 21 0 2 53%0A4 41 45 58 55%0A3 8 32 9%0A3 17 16 22%0A3 57 28 35%0A3 59 56 40%0A3 25 38 26%0A4 52 48 20 21%0A4 55 56 59 42%0A4 43 31 48 37%0A5 31 43 42 59 32%0A3 36 43 37%0A5 54 12 11 39 1%0A%0A%0A%0A0%0A%0A%0A"; 1610 1611// src/worker/legacy/resources/com/vzome/core/parts/vienne2/orange.vef 1612var orange_default3 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A13%0A(0,0) (-5/2,1/2) (5/2,2) (0,0)%0A(0,0) (-5/2,0) (3,1) (1/2,-1/2)%0A(0,0) (-5/2,1) (2,1) (1/2,-1/2)%0A(0,0) (-5/2,3/2) (3/2,2) (0,0)%0A(0,0) (1/2,-3/2) (1/2,0) (0,0)%0A(0,0) (1/2,-1) (0,1) (1/2,-1/2)%0A(0,0) (1/2,-2) (1,1) (1/2,-1/2)%0A(0,0) (1/2,-5/2) (3/2,0) (0,0)%0A(0,0) (-5/2,1) (2,1) (-1/2,1/2)%0A(0,0) (1/2,-2) (1,1) (-1/2,1/2)%0A(0,0) (1/2,-1) (0,1) (-1/2,1/2)%0A(0,0) (-2,-1) (3,2) (0,0)%0A(0,0) (-5/2,0) (3,1) (-1/2,1/2)%0A%0A%0A%0A0%0A%0A%0A%0A12%0A4 0 1 2 3%0A4 4 5 6 7%0A3 7 2 8%0A3 8 9 7%0A3 6 3 2%0A4 5 10 9 6%0A4 4 7 9 10%0A3 2 7 6%0A4 1 12 8 2%0A4 0 3 8 12%0A3 3 6 9%0A3 9 8 3%0A%0A%0A%0A4%0A 11 1 12 0%0A%0Atip 11%0Amiddle 6 3 2 7 8 9%0A"; 1613 1614// src/worker/legacy/resources/com/vzome/core/parts/vienne2/purple.vef 1615var purple_default5 = "data:text/plain;
1615charset=utf-8,vZome VEF 6 field golden%0A%0A21%0A(0,0) (-1/2,-5/4) (1/4,-3/2) (-17/4,9/4)%0A(0,0) (-1,-3/2) (0,-3/2) (-5,3/2)%0A(0,0) (-1/2,-5/2) (1/2,-2) (-4,0)%0A(0,0) (0,-9/4) (3/4,-2) (-13/4,3/4)%0A(0,0) (-1,1/4) (-3/4,1) (-3/4,-7/4)%0A(0,0) (-1,1/4) (1/4,-1) (-3/4,-7/4)%0A(0,0) (-1/2,1/2) (-1/2,1) (0,-1)%0A(0,0) (-1/2,1/2) (1/2,-1) (0,-1)%0A(0,0) (-1,-2) (-1/2,-1/2) (-9/2,1)%0A(0,0) (-1/2,-7/4) (3/4,-5/2) (-15/4,7/4)%0A(0,0) (-1,-2) (1/2,-5/2) (-9/2,1)%0A(0,0) (-1/2,-5/2) (-1/2,-1) (-4,0)%0A(0,0) (0,-9/4) (-1/4,-1) (-13/4,3/4)%0A(0,0) (-1/2,-7/4) (-1/4,-1/2) (-15/4,7/4)%0A(0,0) (-3/2,3/4) (1/4,-1/2) (-5/4,-3/4)%0A(0,0) (-3/2,3/4) (-3/4,1/2) (-5/4,-3/4)%0A(0,0) (-1,1) (-1/2,1/2) (-1/2,0)%0A(0,0) (-1/2,0) (0,0) (1/2,-3/2)%0A(0,0) (-1,-1/4) (-1/4,0) (-1/4,-9/4)%0A(0,0) (-1,1) (1/2,-1/2) (-1/2,0)%0A(0,0) (-3/2,-3/2) (0,-3/2) (-9/2,0)%0A%0A%0A%0A0%0A%0A%0A%0A20%0A4 0 1 2 3%0A3 4 5 0%0A3 0 3 4%0A4 4 6 7 5%0A4 9 10 11 12%0A3 13 14 3%0A4 15 16 17 18%0A3 14 13 18%0A4 5 7 16 15%0A3 5 15 12%0A3 12 0 5%0A3 9 12 15%0A4 13 8 10 9%0A3 13 9 18%0A4 3 2 8 13%0A3 14 4 3%0A4 18 17 19 14%0A4 12 11 1 0%0A4 14 19 6 4%0A3 15 18 9%0A%0A%0A%0A6%0A 8 10 11 20 1 2%0A%0Atip 20%0Amiddle 13 9 18 14 4 3 12 0 5 15"; 1616
1617// src/worker/legacy/resources/com/vzome/core/parts/vienne2/index.js 1618var shapes25 = { 1619 "connector": connector_default23, 1620 "orange": orange_default3, 1621 "purple": purple_default5 1622}; 1623var vienne2_default = shapes25; 1624 1625// src/worker/legacy/resources/com/vzome/core/parts/vienne3/connector.vef 1626var connector_default24 = "data:text/plain;charset=utf-8,vZome VEF 6 field golden%0A%0A600%0A(0,0) (-2,5/2) (-1/2,3/2) (0,0)%0A(0,0) (-3/2,2) (0,1/2) (0,0)%0A(0,0) (0,-1/2) (-1,2) (-1/2,1)%0A(0,0) (-1/2,0) (-3/2,3) (-1/2,1)%0A(0,0) (2,-5/2) (1/2,-3/2) (0,0)%0A(0,0) (25/2,-39/2) (-17/2,13) (0,0)%0A(0,0) (-10,17) (11/2,-19/2) (17/2,-14)%0A(0,0) (1/2,0) (3/2,-3) (1/2,-1)%0A(0,0) (-3/2,3) (1/2,-1) (-1/2,0)%0A(0,0) (-1,2) (1/2,-1) (0,-1/2)%0A(0,0) (0,1/2) (0,0) (-3/2,2)%0A(0,0) (-1/2,3/2) (0,0) (-2,5/2)%0A(0,0) (-13,22) (-1/2,1) (-1,3/2)%0A(0,0) (1,-1) (-1/2,1) (-1,3/2)%0A(0,0) (1,-1) (1/2,-1) (-1,3/2)%0A(0,0) (-13,22) (1/2,-1) (-1,3/2)%0A(0,0) (-1/2,0) (1,-1) (-1/2,1/2)%0A(0,0) (-13/4,9/2) (-9/4,17/4) (-1,5/4)%0A(0,0) (9/4,-17/4) (1,-5/4) (-13/4,9/2)%0A(0,0) (-1,1) (1/2,-1/2) (-1/2,0)%0A(0,0) (1/2,-1) (1/2,0) (3/2,-3)%0A(0,0) (17/2,-14) (-10,17) (11/2,-19/2)%0A(0,0) (-14,45/2) (4,-11/2) (-3,9/2)%0A(0,0) (-1,3/2) (3/2,-3/2) (1,-2)%0A(0,0) (-1,3/2) (13,-22) (-1/2,1)%0A(0,0) (1,-3/2) (13,-22) (-1/2,1)%0A(0,0) (15/2,-12) (0,-1) (-9/2,15/2)%0A(0,0) (-15/2,12) (0,-1) (-9/2,15/2)%0A(0,0) (1/2,-3/2) (3/2,-3) (-1,2)%0A(0,0) (0,-1/2) (1,-2) (-1/2,1)%0A(0,0) (1,-2) (1/2,-1) (0,1/2)%0A(0,0) (3/2,-3) (1,-2) (-1/2,3/2)%0A(0,0) (-13,22) (-1/2,1) (1,-3/2)%0A(0,0) (0,1) (-9/2,15/2) (-15/2,12)%0A(0,0) (0,1) (-9/2,15/2) (15/2,-12)%0A(0,0) (0,-1) (-1/2,1/2) (-1/2,1)%0A(0,0) (-2,9/4) (13/4,-11/2) (-5/4,9/4)%0A(0,0) (-2,9/4) (-13/4,11/2) (-5/4,9/4)%0A(0,0) (0,-1) (1/2,-1/2) (-1/2,1)%0A(0,0) (-11,35/2) (-6,10) (11/2,-8)%0A(0,0) (-21/2,33/2) (-15/2,25/2) (9/2,-13/2)%0A(0,0) (4,-7) (-15/2,25/2) (1/2,0)%0A(0,0) (-1/2,1/2) (9/2,-7) (8,-12)%0A(0,0) (1,-2) (-1/2,3/2) (-3/2,3)%0A(0,0) (1/2,-1) (0,1/2) (-1,2)%0A(0,0) (1,-2) (-1/2,1) (0,1/2)%0A(0,0) (3/2,-3) (-1,2) (-1/2,3/2)%0A(0,0) (1/2,-1) (0,1/2) (1,-2)%0A(0,0) (0,0) (3/2,-2) (0,-1/2)%0A(0,0) (0,0) (2,-5/2) (1/2,-3/2)%0A(0,0) (-1/2,0) (5,-8) (15/2,-23/2)%0A(0,0) (-9/2,13/2) (23/2,-37/2) (-11/2,19/2)%0A(0,0) (-11/2,8) (11,-35/2) (-6,10)%0A(0,0) (-8,12) (1/2,-1/2) (9/2,-7)%0A(0,0) (0,0) (5/2,-7/2) (1/2,0)%0A(0,0) (0,0) (3/2,-2) (0,1/2)%0A(0,0) (-1/2,1) (1,-3/2) (1,-1)%0A(0,0) (-1/2,1) (2,-3) (3/2,-3/2)%0A(0,0) (-1/2,1) (-1/2,0) (-3/2,3)%0A(0,0) (-1/2,1) (0,-1/2) (-1,2)%0A(0,0) (1,-3/2) (-1,1) (-1/2,1)%0A(0,0) (1,-3/2) (-3/2,3/2) (-1,2)%0A(0,0) (-7,12) (1/2,-1/2) (-9/2,8)%0A(0,0) (7/2,-5) (11,-35/2) (-7,12)%0A(0,0) (9/2,-13/2) (21/2,-33/2) (-15/2,25/2)%0A(0,0) (1/2,0) (-4,7) (-15/2,25/2)%0A(0,0) (-7,12) (-7/2,5) (-11,35/2)%0A(0,0) (0,1/2) (1,-2) (1/2,-1)%0A(0,0) (-1/2,1) (0,-1/2) (1,-2)%0A(0,0) (-15/2,25/2) (-9/2,13/2) (-21/2,33/2)%0A(0,0) (1/2,-1) (1/2,0) (-3/2,3)%0A(0,0) (17/2,-14) (-10,17) (-11/2,19/2)%0A(0,0) (0,0) (25/2,-39/2) (17/2,-13)%0A(0,0) (0,0) (2,-5/2) (-1/2,3/2)%0A(0,0) (15/2,-12) (0,1) (-9/2,15/2)%0A(0,0) (-15/2,12) (0,1) (-9/2,15/2)%0A(0,0) (1/2,-1) (0,1) (1/2,-1/2)%0A(0,0) (-1/2,1) (0,1) (1/2,-1/2)%0A(0,0) (0,0) (-1/2,3/2) (-1/2,0)%0A(0,0) (5,-8) (15/2,-23/2) (-1/2,0)%0A(0,0) (1/2,-1/2) (9/2,-7) (-8,12)%0A(0,0) (1/2,-1/2) (-1/2,1) (0,-1)%0A(0,0) (0,1) (1/2,-1/2) (-1/2,1)%0A(0,0) (8,-12) (1/2,-1/2) (9/2,-7)%0A(0,0) (1/2,0) (5,-8) (15/2,-23/2)%0A(0,0) (1/2,0) (0,0) (-1/2,3/2)%0A(0,0) (13,-22) (-1/2,1) (-1,3/2)%0A(0,0) (13,-22) (-1/2,1) (1,-3/2)%0A(0,0) (0,-1) (-9/2,15/2) (15/2,-12)%0A(0,0) (0,-1) (-9/2,15/2) (-15/2,12)%0A(0,0) (13,-22) (1/2,-1) (1,-3/2)%0A(0,0) (0,-1) (9/2,-15/2) (15/2,-12)%0A(0,0) (-9/2,15/2) (15/2,-12) (0,-1)%0A(0,0) (9/2,-15/2) (15/2,-12) (0,-1)%0A(0,0) (-1/2,1/2) (-1/2,1) (0,-1)%0A(0,0) (21/2,-33/2) (15/2,-25/2) (-9/2,13/2)%0A(0,0) (11,-35/2) (6,-10) (-11/2,8)%0A(0,0) (1/2,-1/2) (-9/2,7) (-8,12)%0A(0,0) (-4,7) (15/2,-25/2) (-1/2,0)%0A(0,0) (21/2,-33/2) (-15/2,25/2) (9/2,-13/2)%0A(0,0) (11,-35/2) (-6,10) (11/2,-8)%0A(0,0) (1/2,-1/2) (9/2,-7) (8,-12)%0A(0,0) (-4,7) (-15/2,25/2) (1/2,0)%0A(0,0) (-1,1) (-1/2,1) (1,-3/2)%0A(0,0) (-9/2,13/2) (21/2,-33/2) (-15/2,25/2)%0A(0,0) (11/2,-19/2) (9/2,-13/2) (23/2,-37/2)%0A(0,0) (7,-12) (7/2,-5) (11,-35/2)%0A(0,0) (1/2,0) (-1,1) (-1/2,1/2)%0A(0,0) (-9/2,8) (7,-12) (-1/2,1/2)%0A(0,0) (-15/2,25/2) (-1/2,0) (4,-7)%0A(0,0) (1/2,-1/2) (-1/2,0) (-1,1)%0A(0,0) (-1,2) (1,-3/2) (3/2,-3/2)%0A(0,0) (-1,2) (-1/2,1) (0,1/2)%0A(0,0) (-3/2,3) (-1/2,1) (1/2,0)%0A(0,0) (0,0) (1/2,-3/2) (1/2,0)%0A(0,0) (0,0) (-1,1) (-7/2,13/2)%0A(0,0) (13/4,-11/2) (5/4,-9/4) (2,-9/4)%0A(0,0) (-1/2,1/2) (1/2,-1) (0,1)%0A(0,0) (-1/2,1) (1,-3/2) (13,-22)%0A(0,0) (-1/2,1) (1,-3/2) (-1,1)%0A(0,0) (1/2,-1) (1,-3/2) (-1,1)%0A(0,0) (1/2,-1) (1,-3/2) (13,-22)%0A(0,0) (-3/2,3) (1/2,-1) (1/2,0)%0A(0,0) (-1,2) (1/2,-1) (0,1/2)%0A(0,0) (-1/2,1) (-1,3/2) (1,-1)%0A(0,0) (-1,2) (-1,3/2) (3/2,-3/2)%0A(0,0) (-3/2,3/2) (-1/2,1) (2,-3)%0A(0,0) (-1/2,0) (0,0) (5/2,-7/2)%0A(0,0) (7/2,-13/2) (0,0) (1,-1)%0A(0,0) (0,-1) (-1/2,1/2) (1/2,-1)%0A(0,0) (-2,9/4) (13/4,-11/2) (5/4,-9/4)%0A(0,0) (7/2,-13/2) (0,0) (-1,1)%0A(0,0) (-1/2,0) (0,0) (1/2,-3/2)%0A(0,0) (9/2,-8) (-7,12) (-1/2,1/2)%0A(0,0) (15/2,-25/2) (1/2,0) (4,-7)%0A(0,0) (-1/2,1/2) (1/2,0) (-1,1)%0A(0,0) (1/2,0) (-3/2,3) (1/2,-1)%0A(0,0) (-10,17) (-11/2,19/2) (17/2,-14)%0A(0,0) (25/2,-39/2) (17/2,-13) (0,0)%0A(0,0) (2,-5/2) (-1/2,3/2) (0,0)%0A(0,0) (-3/2,3) (1,-2) (-1/2,3/2)%0A(0,0) (0,1/2) (1,-2) (-1/2,1)%0A(0,0) (-1/2,3/2) (3/2,-3) (-1,2)%0A(0,0) (-9/2,13/2) (21/2,-33/2) (15/2,-25/2)%0A(0,0) (-11/2,8) (11,-35/2) (6,-10)%0A(0,0) (-8,12) (1/2,-1/2) (-9/2,7)%0A(0,0) (-1/2,0) (-4,7) (15/2,-25/2)%0A(0,0) (-1,5/4) (13/4,-9/2) (-9/4,17/4)%0A(0,0) (9/4,-1
16267/4) (1,-5/4) (13/4,-9/2)%0A(0,0) (3/2,-3/2) (1,-2) (-1,3/2)%0A(0,0) (4,-11/2) (-3,9/2) (-14,45/2)%0A(0,0) (4,-11/2) (-3,9/2) (14,-45/2)%0A(0,0) (3/2,-3/2) (1,-2) (1,-3/2)%0A(0,0) (-1,3/2) (-3/2,3/2) (1,-2)%0A(0,0) (-14,45/2) (-4,11/2) (-3,9/2)%0A(0,0) (17/2,-14) (10,-17) (11/2,-19/2)%0A(0,0) (1/2,-1) (-1/2,0) (3/2,-3)%0A(0,0) (-13/4,9/2) (9/4,-17/4) (-1,5/4)%0A(0,0) (1/2,-3/2) (3/2,-3) (1,-2)%0A(0,0) (1,-2) (1/2,-3/2) (3/2,-3)%0A(0,0) (-1,5/4) (-13/4,9/2) (9/4,-17/4)%0A(0,0) (-1/2,1) (-1,3/2) (-13,22)%0A(0,0) (1/2,-1) (-1,3/2) (1,-1)%0A(0,0) (1/2,-1) (-1,3/2) (-13,22)%0A(0,0) (-7/2,5) (-11,35/2) (-7,12)%0A(0,0) (-9/2,13/2) (-21/2,33/2) (-15/2,25/2)%0A(0,0) (-1,3/2) (-13,22) (-1/2,1)%0A(0,0) (-1,3/2) (1,-1) (-1/2,1)%0A(0,0) (-1,3/2) (1,-1) (1/2,-1)%0A(0,0) (-1,3/2) (-13,22) (1/2,-1)%0A(0,0) (0,1/2) (-1,2) (1/2,-1)%0A(0,0) (3/2,-3/2) (-1,2) (-1,3/2)%0A(0,0) (5,-8) (-15/2,23/2) (1/2,0)%0A(0,0) (23/2,-37/2) (11/2,-19/2) (9/2,-13/2)%0A(0,0) (11,-35/2) (6,-10) (11/2,-8)%0A(0,0) (1/2,-1/2) (-9/2,7) (8,-12)%0A(0,0) (-13/4,11/2) (-5/4,9/4) (-2,9/4)%0A(0,0) (-1/2,1) (2,-3) (-3/2,3/2)%0A(0,0) (0,0) (5/2,-7/2) (-1/2,0)%0A(0,0) (0,0) (1,-1) (7/2,-13/2)%0A(0,0) (21/2,-33/2) (-15/2,25/2) (-9/2,13/2)%0A(0,0) (-1,2) (-1/2,1) (0,-1/2)%0A(0,0) (-1/2,1) (0,1/2) (1,-2)%0A(0,0) (11,-35/2) (-7,12) (-7/2,5)%0A(0,0) (-1/2,1/2) (1/2,-1) (0,-1)%0A(0,0) (9/2,-15/2) (-15/2,12) (0,-1)%0A(0,0) (-9/2,15/2) (-15/2,12) (0,-1)%0A(0,0) (1/2,-1/2) (1/2,-1) (0,-1)%0A(0,0) (-1/2,1/2) (1/2,0) (1,-1)%0A(0,0) (-1,1) (1/2,-1/2) (1/2,0)%0A(0,0) (6,-10) (11/2,-8) (11,-35/2)%0A(0,0) (15/2,-25/2) (9/2,-13/2) (21/2,-33/2)%0A(0,0) (15/2,-25/2) (1/2,0) (-4,7)%0A(0,0) (-9/2,7) (8,-12) (1/2,-1/2)%0A(0,0) (3,-9/2) (14,-45/2) (-4,11/2)%0A(0,0) (1,-1) (1/2,-1/2) (-1/2,0)%0A(0,0) (-11/2,19/2) (-17/2,14) (10,-17)%0A(0,0) (-1/2,1) (-1,3/2) (-1,1)%0A(0,0) (-7/2,5) (-11,35/2) (7,-12)%0A(0,0) (-9/2,13/2) (-23/2,37/2) (11/2,-19/2)%0A(0,0) (-1/2,0) (-5,8) (-15/2,23/2)%0A(0,0) (7,-12) (-1/2,1/2) (9/2,-8)%0A(0,0) (-1,1) (-1/2,1/2) (1/2,0)%0A(0,0) (9/4,-17/4) (-1,5/4) (13/4,-9/2)%0A(0,0) (-1,5/4) (-13/4,9/2) (-9/4,17/4)%0A(0,0) (-1/2,1/2) (-1/2,0) (1,-1)%0A(0,0) (1/2,-1) (-1/2,0) (-3/2,3)%0A(0,0) (17/2,-14) (10,-17) (-11/2,19/2)%0A(0,0) (-14,45/2) (-4,11/2) (3,-9/2)%0A(0,0) (-1,3/2) (-3/2,3/2) (-1,2)%0A(0,0) (-13/4,9/2) (9/4,-17/4) (1,-5/4)%0A(0,0) (-1/2,0) (-1,1) (1/2,-1/2)%0A(0,0) (1/2,0) (0,0) (-5/2,7/2)%0A(0,0) (3/2,-3/2) (1/2,-1) (-2,3)%0A(0,0) (9/2,-13/2) (-21/2,33/2) (-15/2,25/2)%0A(0,0) (7/2,-5) (-11,35/2) (-7,12)%0A(0,0) (11,-35/2) (-6,10) (-11/2,8)%0A(0,0) (-1/2,1/2) (-1/2,1) (0,1)%0A(0,0) (3/2,-3) (-1,2) (1/2,-3/2)%0A(0,0) (1,-2) (-1/2,1) (0,-1/2)%0A(0,0) (1,-2) (-1/2,3/2) (3/2,-3)%0A(0,0) (-9/2,7) (8,-12) (-1/2,1/2)%0A(0,0) (1/2,-1) (0,1) (-1/2,1/2)%0A(0,0) (7/2,-5) (-11,35/2) (7,-12)%0A(0,0) (9/2,-13/2) (-21/2,33/2) (15/2,-25/2)%0A(0,0) (-2,3) (-3/2,3/2) (-1/2,1)%0A(0,0) (-1,3/2) (-1,1) (-1/2,1)%0A(0,0) (-1,3/2) (-1,1) (1/2,-1)%0A(0,0) (-2,3) (-3/2,3/2) (1/2,-1)%0A(0,0) (0,0) (-3/2,2) (0,1/2)%0A(0,0) (11,-35/2) (7,-12) (7/2,-5)%0A(0,0) (-1/2,1) (1/2,0) (-3/2,3)%0A(0,0) (-1/2,1) (0,1/2) (-1,2)%0A(0,0) (0,0) (-5/2,7/2) (-1/2,0)%0A(0,0) (0,0) (-3/2,2) (0,-1/2)%0A(0,0) (-1/2,1) (-2,3) (-3/2,3/2)%0A(0,0) (-9/2,7) (-8,12) (1/2,-1/2)%0A(0,0) (6,-10) (-11/2,8) (11,-35/2)%0A(0,0) (11/2,-19/2) (-9/2,13/2) (23/2,-37/2)%0A(0,0) (-15/2,23/2) (-1/2,0) (5,-8)%0A(0,0) (13/4,-11/2) (-5/4,9/4) (-2,9/4)%0A(0,0) (3/2,-3) (-1/2,1) (-1/2,0)%0A(0,0) (0,-1/2) (0,0) (-3/2,2)%0A(0,0) (1/2,-3/2) (0,0) (-2,5/2)%0A(0,0) (23/2,-37/2) (11/2,-19/2) (-9/2,13/2)%0A(0,0) (5,-8) (-15/2,23/2) (-1/2,0)%0A(0,0) (-1/2,0) (0,0) (-5/2,7/2)%0A(0,0) (-3/2,3/2) (-1/2,1) (-2,3)%0A(0,0) (-2,9/4) (-13/4,11/2) (5/4,-9/4)%0A(0,0) (-11/2,19/2) (9/2,-13/2) (-23/2,37/2)%0A(0,0) (3/2,-2) (0,1/2) (0,0)%0A(0,0) (1,-3/2) (1,-1) (1/2,-1)%0A(0,0) (-6,10) (11/2,-8) (-11,35/2)%0A(0,0) (-1/2,1) (0,1) (-1/2,1/2)%0A(0,0) (-5/4,9/4) (2,-9/4) (13/4,-11/2)%0A(0,0) (1,-1) (-7/2,13/2) (0,0)%0A(0,0) (-1/2,3/2) (1/2,0) (0,0)%0A(0,0) (-17/2,13) (0,0) (-25/2,39/2)%0A(0,0) (11/2,-19/2) (-17/2,14) (10,-17)%0A(0,0) (-1/2,0) (-4,7) (-15/2,25/2)%0A(0,0) (-11,35/2) (-7,12) (7/2,-5)%0A(0,0) (-1/2,1/2) (-9/2,8) (-7,12)%0A(0,0) (9/2,-15/2) (-15/2,12) (0,1)%0A(0,0) (9/2,-15/2) (15/2,-12) (0,1)%0A(0,0) (-3/2,3/2) (-1,2) (1,-3/2)%0A(0,0) (-4,11/2) (3,-9/2) (14,-45/2)%0A(0,0) (10,-17) (-11/2,19/2) (-17/2,14)%0A(0,0) (9/2,-13/2) (23/2,-37/2) (-11/2,19/2)%0A(0,0) (-11,35/2) (6,-10) (-11/2,8)%0A(0,0) (-21/2,33/2) (15/2,-25/2) (-9/2,13/2)%0A(0,0) (4,-7) (15/2,-25/2) (-1/2,0)%0A(0,0) (-1/2,1/2) (-9/2,7) (-8,12)%0A(0,0) (6,-10) (11/2,-8) (-11,35/2)%0A(0,0) (11/2,-19/2) (9/2,-13/2) (-23/2,37/2)%0A(0,0) (1/2,-1) (-1,3/2) (-1,1)%0A(0,0) (1,-2) (1/2,-1) (0,-1/2)%0A(0,0) (-1,2) (-1,3/2) (-3/2,3/2)%0A(0,0) (3,-9/2) (-14,45/2) (-4,11/2)%0A(0,0) (-1,2) (1,-3/2) (-3/2,3/2)%0A(0,0) (-17/2,13) (0,0) (25/2,-39/2)%0A(0,0) (-1/2,0) (0,0) (-1/2,3/2)%0A(0,0) (11/2,-19/2) (17/2,-14) (-10,17)%0A(0,0) (1,-3/2) (3/2,-3/2) (-1,2)%0A(0,0) (1,-3/2) (1,-1) (-1/2,1)%0A(0,0) (-3/2,3/2) (1/2,-1) (-2,3)%0A(0,0) (-1/2,0) (-3/2,3) (1/2,-1)%0A(0,0) (10,-17) (-11/2,19/2) (17/2,-14)%0A(0,0) (-4,11/2) (3,-9/2) (-14,45/2)%0A(0,0) (-3/2,3/2) (-1,2) (-1,3/2)%0A(0,0) (7,-12) (7/2,-5) (-11,35/2)%0A(0,0) (0,-1/2) (-1,2) (1/2,-1)%0A(0,0) (15/2,-25/2) (9/2,-13/2) (-21/2,33/2)%0A(0,0) (-10,17) (-11/2,19/2) (-17/2,14)%0A(0,0) (1/2,0) (-3/2,3) (-1/2,1)%0A(0,0) (1,-1) (1/2,-1) (1,-3/2)%0A(0,0) (11/2,-8) (-11,35/2) (-6,10)%0A(0,0) (-5/2,7/2) (-1/2,0) (0,0)%0A(0,0) (-3/2,2) (0,-1/2) (0,0)%0A(0,0) (0,1) (-1/2,1/2) (-1/2,1)%0A(0,0) (1/2,0) (-1,1) (1/2,-1/2)%0A(0,0) (-10,17) (11/2,-19/2) (-17/2,14)%0A(0,0) (-4,7) (-15/2,25/2) (-1/2,0)%0A(0,0) (-1,5/4) (13/4,-9/2) (9/4,-1
16267/4)%0A(0,0) (-1/2,3/2) (3/2,-3) (1,-2)%0A(0,0) (-3/2,3) (1,-2) (1/2,-3/2)%0A(0,0) (-11,35/2) (7,-12) (-7/2,5)%0A(0,0) (-1/2,1/2) (9/2,-8) (7,-12)%0A(0,0) (13/4,-9/2) (9/4,-17/4) (-1,5/4)%0A(0,0) (-9/4,17/4) (-1,5/4) (-13/4,9/2)%0A(0,0) (1,-1) (-1/2,1/2) (-1/2,0)%0A(0,0) (1/2,-1) (0,-1) (-1/2,1/2)%0A(0,0) (-1/2,1/2) (-1/2,0) (-1,1)%0A(0,0) (-1/2,3/2) (-1/2,0) (0,0)%0A(0,0) (1/2,-3/2) (-3/2,3) (1,-2)%0A(0,0) (-3,9/2) (-14,45/2) (4,-11/2)%0A(0,0) (-3,9/2) (14,-45/2) (4,-11/2)%0A(0,0) (1,-3/2) (-1,1) (1/2,-1)%0A(0,0) (1,-3/2) (-3/2,3/2) (1,-2)%0A(0,0) (23/2,-37/2) (-11/2,19/2) (-9/2,13/2)%0A(0,0) (1/2,-1) (2,-3) (-3/2,3/2)%0A(0,0) (1,-2) (-1,3/2) (3/2,-3/2)%0A(0,0) (3/2,-3) (1/2,-1) (1/2,0)%0A(0,0) (-1/2,1/2) (9/2,-8) (-7,12)%0A(0,0) (4,-7) (15/2,-25/2) (1/2,0)%0A(0,0) (-9/2,15/2) (15/2,-12) (0,1)%0A(0,0) (1/2,-1/2) (-1/2,1) (0,1)%0A(0,0) (-1,1) (7/2,-13/2) (0,0)%0A(0,0) (5/4,-9/4) (-2,9/4) (-13/4,11/2)%0A(0,0) (-5,8) (-15/2,23/2) (1/2,0)%0A(0,0) (15/2,-23/2) (1/2,0) (-5,8)%0A(0,0) (9/2,-7) (8,-12) (-1/2,1/2)%0A(0,0) (4,-11/2) (3,-9/2) (14,-45/2)%0A(0,0) (0,1) (1/2,-1/2) (1/2,-1)%0A(0,0) (4,-11/2) (3,-9/2) (-14,45/2)%0A(0,0) (-1/2,0) (3/2,-3) (1/2,-1)%0A(0,0) (10,-17) (11/2,-19/2) (17/2,-14)%0A(0,0) (-25/2,39/2) (-17/2,13) (0,0)%0A(0,0) (-2,5/2) (1/2,-3/2) (0,0)%0A(0,0) (9/2,-13/2) (23/2,-37/2) (11/2,-19/2)%0A(0,0) (11/2,-8) (11,-35/2) (6,-10)%0A(0,0) (1/2,-1/2) (1/2,0) (-1,1)%0A(0,0) (-15/2,25/2) (1/2,0) (4,-7)%0A(0,0) (-9/2,8) (-7,12) (-1/2,1/2)%0A(0,0) (1/2,0) (1,-1) (-1/2,1/2)%0A(0,0) (-1/2,3/2) (0,0) (2,-5/2)%0A(0,0) (17/2,-13) (0,0) (25/2,-39/2)%0A(0,0) (-11/2,19/2) (-17/2,14) (-10,17)%0A(0,0) (9/2,-8) (7,-12) (-1/2,1/2)%0A(0,0) (-15/2,23/2) (-1/2,0) (-5,8)%0A(0,0) (1/2,-3/2) (-1/2,0) (0,0)%0A(0,0) (-1/2,0) (-1,1) (-1/2,1/2)%0A(0,0) (-9/2,13/2) (23/2,-37/2) (11/2,-19/2)%0A(0,0) (-1/2,0) (5,-8) (-15/2,23/2)%0A(0,0) (14,-45/2) (-4,11/2) (3,-9/2)%0A(0,0) (11,-35/2) (7,-12) (-7/2,5)%0A(0,0) (-1/2,1) (-1/2,0) (3/2,-3)%0A(0,0) (0,-1) (1/2,-1/2) (1/2,-1)%0A(0,0) (0,0) (-2,5/2) (1/2,-3/2)%0A(0,0) (1/2,-1) (0,-1/2) (1,-2)%0A(0,0) (13,-22) (1/2,-1) (-1,3/2)%0A(0,0) (0,-1) (9/2,-15/2) (-15/2,12)%0A(0,0) (7,-12) (-1/2,1/2) (-9/2,8)%0A(0,0) (-1/2,0) (4,-7) (-15/2,25/2)%0A(0,0) (0,0) (-2,5/2) (-1/2,3/2)%0A(0,0) (0,0) (-25/2,39/2) (17/2,-13)%0A(0,0) (5/4,-9/4) (-2,9/4) (13/4,-11/2)%0A(0,0) (-13/4,11/2) (-5/4,9/4) (2,-9/4)%0A(0,0) (13/4,-11/2) (-5/4,9/4) (2,-9/4)%0A(0,0) (0,1) (-1/2,1/2) (1/2,-1)%0A(0,0) (1/2,-1) (1,-3/2) (1,-1)%0A(0,0) (-11/2,19/2) (-9/2,13/2) (23/2,-37/2)%0A(0,0) (3/2,-2) (0,-1/2) (0,0)%0A(0,0) (-6,10) (-11/2,8) (11,-35/2)%0A(0,0) (14,-45/2) (4,-11/2) (3,-9/2)%0A(0,0) (-14,45/2) (4,-11/2) (3,-9/2)%0A(0,0) (9/4,-17/4) (-1,5/4) (-13/4,9/2)%0A(0,0) (3/2,-3) (1,-2) (1/2,-3/2)%0A(0,0) (-3/2,3) (-1/2,1) (-1/2,0)%0A(0,0) (1/2,-1) (0,-1) (1/2,-1/2)%0A(0,0) (0,1) (9/2,-15/2) (-15/2,12)%0A(0,0) (17/2,-13) (0,0) (-25/2,39/2)%0A(0,0) (-11/2,19/2) (17/2,-14) (10,-17)%0A(0,0) (0,0) (-5/2,7/2) (1/2,0)%0A(0,0) (1/2,-1) (-2,3) (3/2,-3/2)%0A(0,0) (-11/2,19/2) (-9/2,13/2) (-23/2,37/2)%0A(0,0) (15/2,-23/2) (-1/2,0) (-5,8)%0A(0,0) (-4,11/2) (-3,9/2) (-14,45/2)%0A(0,0) (-1,1) (-1/2,1) (-1,3/2)%0A(0,0) (-1,2) (-1/2,3/2) (-3/2,3)%0A(0,0) (0,1/2) (-1,2) (-1/2,1)%0A(0,0) (-1/2,3/2) (-3/2,3) (-1,2)%0A(0,0) (2,-3) (3/2,-3/2) (1/2,-1)%0A(0,0) (5/2,-7/2) (1/2,0) (0,0)%0A(0,0) (-17/2,14) (-10,17) (-11/2,19/2)%0A(0,0) (1,-3/2) (13,-22) (1/2,-1)%0A(0,0) (15/2,-12) (0,-1) (9/2,-15/2)%0A(0,0) (1/2,-1/2) (1/2,0) (1,-1)%0A(0,0) (1/2,-1/2) (-9/2,8) (-7,12)%0A(0,0) (1,-1) (1/2,-1/2) (1/2,0)%0A(0,0) (-15/2,25/2) (9/2,-13/2) (-21/2,33/2)%0A(0,0) (11/2,-8) (11,-35/2) (-6,10)%0A(0,0) (1,-5/4) (13/4,-9/2) (9/4,-1
16267/4)%0A(0,0) (-1,2) (-1/2,3/2) (3/2,-3)%0A(0,0) (-3/2,3) (-1,2) (1/2,-3/2)%0A(0,0) (-9/4,17/4) (1,-5/4) (-13/4,9/2)%0A(0,0) (1,-1) (-1/2,1) (1,-3/2)%0A(0,0) (3/2,-3/2) (-1,2) (1,-3/2)%0A(0,0) (-6,10) (11/2,-8) (11,-35/2)%0A(0,0) (-11/2,19/2) (9/2,-13/2) (23/2,-37/2)%0A(0,0) (-7/2,5) (11,-35/2) (7,-12)%0A(0,0) (-15/2,12) (0,-1) (9/2,-15/2)%0A(0,0) (-1,3/2) (13,-22) (1/2,-1)%0A(0,0) (1,-1) (7/2,-13/2) (0,0)%0A(0,0) (-5/4,9/4) (-2,9/4) (13/4,-11/2)%0A(0,0) (-1/2,1) (0,-1) (-1/2,1/2)%0A(0,0) (-8,12) (-1/2,1/2) (9/2,-7)%0A(0,0) (-1/2,0) (-5,8) (15/2,-23/2)%0A(0,0) (1/2,-1) (-1,3/2) (13,-22)%0A(0,0) (13/4,-11/2) (5/4,-9/4) (-2,9/4)%0A(0,0) (0,0) (-1,1) (7/2,-13/2)%0A(0,0) (0,0) (1/2,-3/2) (-1/2,0)%0A(0,0) (0,1/2) (0,0) (3/2,-2)%0A(0,0) (11/2,-8) (-11,35/2) (6,-10)%0A(0,0) (8,-12) (-1/2,1/2) (-9/2,7)%0A(0,0) (1/2,0) (4,-7) (15/2,-25/2)%0A(0,0) (-1,1) (1/2,-1) (-1,3/2)%0A(0,0) (-11/2,8) (-11,35/2) (6,-10)%0A(0,0) (5/2,-7/2) (-1/2,0) (0,0)%0A(0,0) (2,-3) (-3/2,3/2) (1/2,-1)%0A(0,0) (1/2,0) (3/2,-3) (-1/2,1)%0A(0,0) (9/2,-13/2) (-23/2,37/2) (-11/2,19/2)%0A(0,0) (1/2,-1/2) (1/2,-1) (0,1)%0A(0,0) (-9/2,15/2) (-15/2,12) (0,1)%0A(0,0) (-5/4,9/4) (2,-9/4) (-13/4,11/2)%0A(0,0) (7,-12) (-7/2,5) (11,-35/2)%0A(0,0) (1/2,-1) (0,-1/2) (-1,2)%0A(0,0) (15/2,-25/2) (-9/2,13/2) (21/2,-33/2)%0A(0,0) (2,-3) (3/2,-3/2) (-1/2,1)%0A(0,0) (23/2,-37/2) (-11/2,19/2) (9/2,-13/2)%0A(0,0) (-21/2,33/2) (-15/2,25/2) (-9/2,13/2)%0A(0,0) (-11,35/2) (-6,10) (-11/2,8)%0A(0,0) (-1/2,1/2) (9/2,-7) (-8,12)%0A(0,0) (4,-7) (-15/2,25/2) (-1/2,0)%0A(0,0) (7/2,-5) (11,-35/2) (7,-12)%0A(0,0) (1/2,0) (5,-8) (-15/2,23/2)%0A(0,0) (-7,12) (1/2,-1/2) (9/2,-8)%0A(0,0) (-15/2,12) (0,1) (9/2,-15/2)%0A(0,0) (15/2,-12) (0,1) (9/2,-15/2)%0A(0,0) (-1/2,1) (0,-1) (1/2,-1/2)%0A(0,0) (8,-12) (1/2,-1/2) (-9/2,7)%0A(0,0) (-7,12) (7/2,-5) (-11,35/2)%0A(0,0) (-3/2,3/2) (1,-2) (1,-3/2)%0A(0,0) (-1,1) (1/2,-1) (1,-3/2)%0A(0,0) (-1/2,0) (3/2,-3) (-1/2,1)%0A(0,0) (1/2,0) (0,0) (1/2,-3/2)%0A(0,0) (15/2,-25/2) (-1/2,0) (-4,7)%0A(0,0) (1/2,-1) (2,-3) (3/2,-3/2)%0A(0,0) (2,-9/4) (-13/4,11/2) (5/4,-9/4)%0A(0,0) (-7/2,13/2) (0,0) (-1,1)%0A(0,0) (13/4,-9/2) (-9/4,17/4) (-1,5/4)%0A(0,0) (1/2,-3/2) (-3/2,3) (-1,2)%0A(0,0) (-4,7) (15/2,-25/2) (1/2,0)%0A(0,0) (21/2,-33/2) (15/2,-25/2) (9/2,-13/2)%0A(0,0) (1/2,-1/2) (9/2,-8) (-7,12)%0A(0,0) (-11/2,8) (-11,35/2) (-6,10)%0A(0,0) (0,-1/2) (0,0) (3/2,-2)%0A(0,0) (-9/2,13/2) (-23/2,37/2) (-11/2,19/2)%0A(0,0) (-6,10) (-11/2,8) (-11,35/2)%0A(0,0) (-5,8) (-15/2,23/2) (-1/2,0)%0A(0,0) (0,-1/2) (1,-2) (1/2,-1)%0A(0,0) (2,-9/4) (13/4,-11/2) (-5/4,9/4)%0A(0,0) (-7/2,13/2) (0,0) (1,-1)%0A(0,0) (-15/2,25/2) (-9/2,13/2) (21/2,-33/2)%0A(0,0) (-15/2,25/2) (-1/2,0) (-4,7)%0A(0,0) (9/2,-7) (-8,12) (1/2,-1/2)%0A(0,0) (-3/2,3/2) (1,-2) (-1,3/2)%0A(0,0) (-15/2,25/2) (1/2,0) (-4,7)%0A(0,0) (9/2,-7) (8,-12) (1/2,-1/2)%0A(0,0) (-23/2,37/2) (11/2,-19/2) (-9/2,13/2)%0A(0,0) (1,-3/2) (-13,22) (-1/2,1)%0A(0,0) (-7,12) (-1/2,1/2) (9/2,-8)%0A(0,0) (-8,12) (-1/2,1/2) (-9/2,7)%0A(0,0) (2,-9/4) (13/4,-11/2) (5/4,-9/4)%0A(0,0) (1,-3/2) (-13,22) (1/2,-1)%0A(0,0) (0,0) (1,-1) (-7/2,13/2)%0A(0,0) (-15/2,23/2) (1/2,0) (-5,8)%0A(0,0) (9/2,-13/2) (21/2,-33/2) (15/2,-25/2)%0A(0,0) (-1,2) (1/2,-3/2) (3/2,-3)%0A(0,0) (11/2,-19/2) (-9/2,13/2) (-23/2,37/2)%0A(0,0) (6,-10) (-11/2,8) (-11,35/2)%0A(0,0) (-9/2,7) (-8,12) (-1/2,1/2)%0A(0,0) (-7/2,5) (11,-35/2) (-7,12)%0A(0,0) (7,-12) (1/2,-1/2) (-9/2,8)%0A(0,0) (-5,8) (15/2,-23/2) (-1/2,0)%0A(0,0) (1,-3/2) (3/2,-3/2) (1,-2)%0A(0,0) (15/2,-23/2) (1/2,0) (5,-8)%0A(0,0) (-7,12) (-7/2,5) (11,-35/2)%0A(0,0) (15/2,-23/2) (-1/2,0) (5,-8)%0A(0,0) (-9/2,8) (7,-12) (1/2,-1/2)%0A(0,0) (11/2,-19/2) (17/2,-14) (10,-17)%0A(0,0) (-1,1) (-1/2,1/2) (-1/2,0)%0A(0,0) (-5,8) (15/2,-23/2) (1/2,0)%0A(0,0) (0,0) (-1/2,3/2) (1/2,0)%0A(0,0) (-11,35/2) (6,-10) (11/2,-8)%0A(0,0) (-23/2,37/2) (11/2,-19/2) (9/2,-13/2)%0A(0,0) (-9/4,17/4) (1,-5/4) (13/4,-9/2)%0A(0,0) (1,-5/4) (13/4,-9/2) (-9/4,17/4)%0A(0,0) (3,-9/2) (14,-45/2) (4,-11/2)%0A(0,0) (3,-9/2) (-14,45/2) (4,-11/2)%0A(0,0) (13/4,-9/2) (9/4,-1
16267/4) (1,-5/4)%0A(0,0) (1,-5/4) (-13/4,9/2) (-9/4,17/4)%0A(0,0) (1/2,-1/2) (-1/2,0) (1,-1)%0A(0,0) (-17/2,14) (10,-17) (11/2,-19/2)%0A(0,0) (14,-45/2) (-4,11/2) (-3,9/2)%0A(0,0) (3/2,-3) (1/2,-1) (-1/2,0)%0A(0,0) (1/2,0) (-4,7) (15/2,-25/2)%0A(0,0) (-1,2) (1/2,-3/2) (-3/2,3)%0A(0,0) (1/2,0) (1,-1) (1/2,-1/2)%0A(0,0) (-15/2,23/2) (1/2,0) (5,-8)%0A(0,0) (-17/2,14) (10,-17) (-11/2,19/2)%0A(0,0) (14,-45/2) (4,-11/2) (-3,9/2)%0A(0,0) (15/2,-25/2) (-1/2,0) (4,-7)%0A(0,0) (-3,9/2) (14,-45/2) (-4,11/2)%0A(0,0) (-3,9/2) (-14,45/2) (-4,11/2)%0A(0,0) (-25/2,39/2) (17/2,-13) (0,0)%0A(0,0) (3/2,-3/2) (-1/2,1) (-2,3)%0A(0,0) (-17/2,14) (-10,17) (11/2,-19/2)%0A(0,0) (-1/2,1) (1/2,0) (3/2,-3)%0A(0,0) (1/2,0) (-5,8) (15/2,-23/2)%0A(0,0) (-7,12) (-1/2,1/2) (-9/2,8)%0A(0,0) (11,-35/2) (-7,12) (7/2,-5)%0A(0,0) (5,-8) (15/2,-23/2) (1/2,0)%0A(0,0) (2,-9/4) (-13/4,11/2) (-5/4,9/4)%0A(0,0) (3/2,-3/2) (-1/2,1) (2,-3)%0A(0,0) (3/2,-3/2) (1/2,-1) (2,-3)%0A(0,0) (-2,3) (3/2,-3/2) (1/2,-1)%0A(0,0) (-2,3) (3/2,-3/2) (-1/2,1)%0A(0,0) (1/2,-1/2) (9/2,-8) (7,-12)%0A(0,0) (9/2,-7) (-8,12) (-1/2,1/2)%0A(0,0) (1/2,-3/2) (1/2,0) (0,0)%0A(0,0) (-1,1) (-7/2,13/2) (0,0)%0A(0,0) (5/4,-9/4) (2,-9/4) (13/4,-11/2)%0A(0,0) (-9/2,8) (-7,12) (1/2,-1/2)%0A(0,0) (-1/2,0) (1,-1) (1/2,-1/2)%0A(0,0) (1/2,-1) (-2,3) (-3/2,3/2)%0A(0,0) (-23/2,37/2) (-11/2,19/2) (9/2,-13/2)%0A(0,0) (1/2,-1) (1,-3/2) (-13,22)%0A(0,0) (-1/2,1) (1,-3/2) (-13,22)%0A(0,0) (1,-2) (1,-3/2) (3/2,-3/2)%0A(0,0) (11/2,-19/2) (-17/2,14) (-10,17)%0A(0,0) (3/2,-3) (-1/2,1) (1/2,0)%0A(0,0) (1,-2) (1/2,-3/2) (-3/2,3)%0A(0,0) (-11/2,19/2) (17/2,-14) (-10,17)%0A(0,0) (-1/2,1/2) (-9/2,7) (8,-12)%0A(0,0) (-13/4,11/2) (5/4,-9/4) (2,-9/4)%0A(0,0) (-7,12) (7/2,-5) (11,-35/2)%0A(0,0) (9/2,-13/2) (-23/2,37/2) (11/2,-19/2)%0A(0,0) (1/2,0) (-5,8) (-15/2,23/2)%0A(0,0) (-1/2,3/2) (-3/2,3) (1,-2)%0A(0,0) (-1/2,1) (-2,3) (3/2,-3/2)%0A(0,0) (2,-3) (-3/2,3/2) (-1/2,1)%0A(0,0) (-5/4,9/4) (-2,9/4) (-13/4,11/2)%0A(0,0) (9/2,-8) (-7,12) (1/2,-1/2)%0A(0,0) (-13/4,11/2) (5/4,-9/4) (-2,9/4)%0A(0,0) (1/2,-3/2) (0,0) (2,-5/2)%0A(0,0) (13/4,-9/2) (-9/4,17/4) (1,-5/4)%0A(0,0) (8,-12) (-1/2,1/2) (9/2,-7)%0A(0,0) (-13/4,9/2) (-9/4,17/4) (1,-5/4)%0A(0,0) (1,-2) (-1,3/2) (-3/2,3/2)%0A(0,0) (1/2,-1/2) (-9/2,8) (7,-12)%0A(0,0) (0,0) (25/2,-39/2) (-17/2,13)%0A(0,0) (7,-12) (-7/2,5) (-11,35/2)%0A(0,0) (-3/2,3/2) (1/2,-1) (2,-3)%0A(0,0) (1,-1) (-1/2,1/2) (1/2,0)%0A(0,0) (1/2,0) (0,0) (5/2,-7/2)%0A(0,0) (-9/2,13/2) (-21/2,33/2) (15/2,-25/2)%0A(0,0) (-1/2,0) (4,-7) (15/2,-25/2)%0A(0,0) (-5/2,7/2) (1/2,0) (0,0)%0A(0,0) (1,-5/4) (-13/4,9/2) (9/4,-17/4)%0A(0,0) (0,1) (9/2,-15/2) (15/2,-12)%0A(0,0) (-3/2,3) (-1,2) (-1/2,3/2)%0A(0,0) (7,-12) (1/2,-1/2) (9/2,-8)%0A(0,0) (1/2,0) (4,-7) (-15/2,25/2)%0A(0,0) (15/2,-25/2) (-9/2,13/2) (-21/2,33/2)%0A(0,0) (-21/2,33/2) (15/2,-25/2) (9/2,-13/2)%0A(0,0) (-13,22) (1/2,-1) (1,-3/2)%0A(0,0) (5/4,-9/4) (2,-9/4) (-13/4,11/2)%0A(0,0) (-15/2,25/2) (9/2,-13/2) (21/2,-33/2)%0A(0,0) (-23/2,37/2) (-11/2,19/2) (-9/2,13/2)%0A(0,0) (-11,35/2) (-7,12) (-7/2,5)%0A(0,0) (-1/2,1/2) (-9/2,8) (7,-12)%0A(0,0) (10,-17) (11/2,-19/2) (-17/2,14)%0A(0,0) (-1,3/2) (3/2,-3/2) (-1,2)%0A(0,0) (0,0) (-25/2,39/2) (-17/2,13)%0A(0,0) (-1/2,1) (-1,3/2) (13,-22)%0A(0,0) (-9/4,17/4) (-1,5/4) (13/4,-9/2)%0A(0,0) (9/2,-8) (7,-12) (1/2,-1/2)%0A(0,0) (-11,35/2) (7,-12) (7/2,-5)%0A(0,0) (1,-2) (1,-3/2) (-3/2,3/2)%0A(0,0) (-4,11/2) (-3,9/2) (14,-45/2)%0A%0A%0A%0A0%0A%0A%0A%0A720%0A4 0 1 2 3%0A4 4 5 6 7%0A4 8 9 10 11%0A4 12 13 14 15%0A4 16 17 18 19%0A4 20 21 22 23%0A4 24 25 26 27%0A4 28 29 30 31%0A4 32 12 33 34%0A4 35 36 37 38%0A4 39 40 41 42%0A4 43 44 45 46%0A4 20 47 48 49%0A4 50 51 52 53%0A4 54 55 56 57%0A4 58 59 60 61%0A4 62 63 64 65%0A4 66 67 68 69%0A4 70 71 72 73%0A4 74 75 76 77%0A4 78 79 80 81%0A4 82 83 84 85%0A4 86 87 88 89%0A4 88 87 90 91%0A4 81 92 93 94%0A4 95 96 97 98%0A4 99 100 101 102%0A4 103 2 104 52%0A4 2 1 105 106%0A4 107 108 109 110%0A4 111 56 112 113%0A4 114 115 116 117%0A4 118 119 120 121%0A4 122 123 124 125%0A4 37 126 127 128%0A4 129 130 131 132%0A4 16 133 134 135%0A4 136 137 138 139%0A4 140 123 141 142%0A4 143 144 145 146%0A4 147 43 46 148%0A4 149 150 151 152%0A4 153 154 155 156%0A4 157 158 159 160%0A4 161 124 162 163%0A4 164 30 29 165%0A4 166 167 168 169%0A4 136 170 13 171%0A4 172 173 174 175%0A4 176 177 178 179%0A4 180 181 182 183%0A4 184 185 186 187%0A4 188 147 148 189%0A4 190 191 192 193%0A4 194 81 195 196%0A4 9 197 96 95%0A4 198 199 200 201%0A4 202 203 204 205%0A4 167 44 191 190%0A4 206 207 208 209%0A4 205 204 210 211%0A4 212 10 14 213%0A4 214 141 123 215%0A4 119 181 180 216%0A4 42 41 189 217%0A4 218 219 47 220%0A4 134 221 222 135%0A4 223 9 67 224%0A4 225 226 227 228%0A4 59 229 173 230%0A4 231 232 55 73%0A4 233 234 197 235%0A4 236 237 238 239%0A4 112 56 100 99%0A4 78 179 240 94%0A4 241 219 242 243%0A4 97 96 244 245%0A4 131 246 247 248%0A4 249 250 251 252%0A4 253 254 255 256%0A4 243 257 258 241%0A4 52 104 259 53%0A4 41 40 260 261%0A4 262 263 217 117%0A4 264 265 266 3%0A4 267 63 62 84%0A4 268 269 270 271%0A4 272 168 1 273%0A4 274 275 269 268%0A4 276 277 194 278%0A4 279 280 202 281%0A4 282 283 232 231%0A4 248 247 284 130%0A4 285 286 287 288%0A4 289 290 47 291%0A4 139 138 292 293
1626%0A4 294 141 214 295%0A4 296 297 226 225%0A4 151 298 299 300%0A4 186 92 81 187%0A4 80 301 195 81%0A4 135 302 17 16%0A4 108 66 69 109%0A4 303 67 9 304%0A4 270 269 305 306%0A4 107 307 308 309%0A4 154 310 311 155%0A4 300 299 312 5%0A4 220 47 290 313%0A4 314 117 217 315%0A4 153 227 316 317%0A4 182 48 318 183%0A4 319 120 119 177%0A4 320 162 30 321%0A4 205 322 323 202%0A4 217 263 324 325%0A4 326 296 225 327%0A4 328 322 205 114%0A4 329 249 252 330%0A4 331 82 332 333%0A4 334 335 336 337%0A4 189 41 261 188%0A4 285 290 1 0%0A4 338 10 13 339%0A4 38 88 91 35%0A4 340 341 342 343%0A4 344 345 346 113%0A4 347 348 349 350%0A4 92 118 121 93%0A4 256 329 330 253%0A4 17 313 218 18%0A4 145 144 351 352%0A4 209 208 353 61%0A4 234 68 354 244%0A4 317 316 68 355%0A4 286 16 356 287%0A4 357 234 358 156%0A4 90 359 360 91%0A4 361 164 165 362%0A4 363 364 207 206%0A4 61 60 226 209%0A4 365 228 296 326%0A4 325 366 367 217%0A4 6 107 368 150%0A4 38 37 128 280%0A4 149 14 67 7%0A4 369 45 40 39%0A4 370 371 60 372%0A4 373 77 76 374%0A4 375 376 158 157%0A4 11 10 181 377%0A4 207 205 378 208%0A4 33 12 15 379%0A4 11 380 381 8%0A4 115 382 383 116%0A4 384 66 108 385%0A4 386 129 350 335%0A4 144 387 242 351%0A4 388 232 389 390%0A4 254 391 392 255%0A4 3 2 103 264%0A4 231 393 373 282%0A4 26 25 394 395%0A4 396 397 102 398%0A4 252 399 341 330%0A4 73 72 393 231%0A4 64 400 83 65%0A4 401 402 403 404%0A4 171 13 405 406%0A4 407 283 250 408%0A4 242 219 409 351%0A4 410 411 24 27%0A4 312 412 413 414%0A4 310 365 326 349%0A4 35 415 416 280%0A4 121 417 185 93%0A4 184 418 419 420%0A4 288 387 290 285%0A4 400 405 421 267%0A4 224 422 423 424%0A4 199 242 425 426%0A4 412 427 428 413%0A4 152 151 300 429%0A4 430 421 294 295%0A4 374 76 188 71%0A4 431 432 262 117%0A4 77 433 254 253%0A4 434 29 435 436%0A4 284 425 242 246%0A4 433 437 391 254%0A4 100 56 55 438%0A4 439 440 441 442%0A4 443 338 444 445%0A4 89 88 38 356%0A4 446 447 253 222%0A4 448 26 395 414%0A4 444 338 339 449%0A4 450 249 329 342%0A4 75 166 169 446%0A4 451 452 29 453%0A4 454 444 449 332%0A4 455 236 378 205%0A4 456 369 55 54%0A4 330 341 340 253%0A4 332 457 458 454%0A4 129 360 89 356%0A4 343 459 401 340%0A4 152 294 14 149%0A4 179 178 319 240%0A4 46 45 2 460%0A4 461 462 230 463%0A4 29 452 464 165%0A4 465 30 164 466%0A4 467 316 371 384%0A4 366 57 456 367%0A4 306 468 420 311%0A4 158 469 358 159%0A4 298 470 471 85%0A4 372 472 473 474%0A4 206 435 229 363%0A4 8 381 277 276%0A4 452 425 359 90%0A4 466 164 361 416%0A4 94 240 176 81%0A4 405 13 12 32%0A4 226 60 25 24%0A4 334 469 425 475%0A4 476 477 77 396%0A4 358 234 478 305%0A4 479 166 75 74%0A4 480 223 224 424%0A4 132 200 481 129%0A4 297 29 434 238%0A4 458 212 213 482%0A4 169 483 447 446%0A4 484 54 57 366%0A4 221 272 273 485%0A4 486 170 181 443%0A4 304 9 68 487%0A4 348 488 489 490%0A4 337 297 469 334%0A4 200 199 426 481%0A4 259 104 491 492%0A4 287 356 38 265%0A4 18 218 220 302%0A4 94 441 493 78%0A4 342 329 256 343%0A4 202 361 362 211%0A4 73 55 44 70%0A4 494 251 168 23%0A4 150 368 298 151%0A4 77 477 495 256%0A4 496 370 497 498%0A4 499 500 132 257%0A4 261 501 502 188%0A4 503 162 229 504%0A4 393 396 77 373%0A4 398 505 506 396%0A4 316 227 411 394%0A4 507 325 431 508%0A4 299 509 510 511%0A4 512 110 414 513%0A4 313 290 219 218%0A4 514 499 257 243%0A4 253 447 74 77%0A4 421 112 63 267%0A4 339 486 515 449%0A4 409 219 290 143%0A4 516 59 123 140%0A4 138 256 517 292%0A4 91 360 129 35%0A4 491 51 50 492%0A4 518 105 190 193%0A4 356 248 130 129%0A4 377 181 119 278%0A4 341 399 450 342%0A4 58 519 364 363%0A4 23 22 520 494%0A4 168 251 483 169%0A4 311 521 347 350%0A4 281 202 117 314%0A4 522 94 184 523%0A4 0 524 286 285%0A4 213 14 13 525%0A4 494 520 526 527%0A4 511 473 498 299%0A4 215 430 528 529%0A4 475 386 335 334%0A4 208 378 448 353%0A4 487 68 67 303%0A4 273 289 133 485%0A4 438 530 397 531%0A4 51 465 103 52%0A4 343 515 445 195%0A4 219 120 440 439%0A4 114 172 175 431%0A4 532 533 534 470%0A4 317 513 154 153%0A4 217 367 484 502%0A4 535 168 167 536%0A4 160 159 376 375%0A4 120 274 417 121%0A4 245 537 110 420%0A4 394 411 410 395%0A4 69 467 538 109%0A4 539 540 541 222%0A4 495 542 517 256%0A4 538 467 384 385%0A4 533 405 294 534%0A4 266 543 539 524%0A4 432 161 163 262%0A4 271 270 500 184%0A4 378 327 365 310%0A4 34 33 332 82%0A4 359 425 387 86%0A4 447 483 479 74%0A4 209 226 435 206%0A4 251 182 399 252%0A4 544 274 234 233%0A4 57 56 3
162669 456%0A4 474 473 511 448%0A4 102 101 325 398%0A4 44 55 545 260%0A4 263 546 547 324%0A4 362 415 35 211%0A4 255 392 437 433%0A4 498 497 312 299%0A4 133 289 291 134%0A4 49 48 182 527%0A4 548 315 549 550%0A4 307 303 304 308%0A4 63 112 389 64%0A4 204 551 28 210%0A4 125 508 552 122%0A4 553 503 504 328%0A4 391 251 250 392%0A4 431 554 115 114%0A4 105 1 167 190%0A4 250 389 555 408%0A4 240 319 177 176%0A4 556 223 480 557%0A4 558 170 182 402%0A4 113 112 421 344%0A4 554 559 382 115%0A4 55 232 530 438%0A4 413 428 560 561%0A4 429 141 294 152%0A4 106 105 518 562%0A4 419 233 235 563%0A4 312 497 474 448%0A4 501 545 39 42%0A4 564 465 45 550%0A4 364 114 205 207%0A4 408 555 542 495%0A4 562 518 539 543%0A4 356 145 352 132%0A4 515 486 443 445%0A4 459 558 402 401%0A4 506 388 390 565%0A4 528 430 295 566%0A4 189 148 567 543%0A4 514 275 274 568%0A4 387 103 87 86%0A4 162 369 546 163%0A4 502 501 42 217%0A4 569 79 78 340%0A4 116 383 559 554%0A4 260 545 501 261%0A4 398 62 65 517%0A4 96 197 234 244%0A4 49 570 21 20%0A4 139 250 170 136%0A4 332 33 379 368%0A4 571 488 348 347%0A4 76 75 446 222%0A4 469 297 488 571%0A4 527 526 570 49%0A4 1 290 289 273%0A4 246 242 387 247%0A4 383 162 124 559%0A4 291 272 221 134%0A4 127 465 452 572%0A4 175 461 573 431%0A4 280 50 53 38%0A4 471 574 533 532%0A4 193 192 188 76%0A4 426 575 576 481%0A4 551 435 29 28%0A4 454 458 482 368%0A4 536 167 1 577%0A4 110 578 307 107%0A4 122 552 345 344%0A4 309 308 578 110%0A4 548 369 162 320%0A4 508 431 573 552%0A4 379 579 298 368%0A4 565 390 580 505%0A4 352 581 19 132%0A4 543 259 492 189%0A4 566 582 299 298%0A4 53 259 543 38%0A4 349 348 490 310%0A4 389 405 400 64%0A4 87 103 452 90%0A4 60 59 472 372%0A4 442 441 94 19%0A4 489 583 521 490%0A4 572 452 103 126%0A4 577 1 168 535%0A4 130 284 246 131%0A4 547 161 432 324%0A4 368 423 557 454%0A4 428 316 60 560%0A4 30 162 503 584%0A4 56 124 161 547%0A4 399 182 170 450%0A4 237 226 297 238%0A4 71 188 502 72%0A4 579 585 32 34%0A4 101 100 438 531%0A4 309 480 424 107%0A4 82 532 470 298%0A4 350 157 160 311%0A4 315 217 189 549%0A4 13 170 486 339%0A4 264 103 387 288%0A4 47 168 272 291%0A4 79 318 216 80%0A4 36 572 126 37%0A4 350 576 201 500%0A4 256 255 433 77%0A4 210 28 31 203%0A4 580 112 232 388%0A4 290 387 144 143%0A4 541 535 536 586%0A4 232 283 407 587%0A4 472 59 141 496%0A4 385 108 107 312%0A4 156 358 227 153%0A4 576 575 198 201%0A4 534 294 421 574%0A4 15 585 579 379%0A4 377 196 380 11%0A4 463 172 114 511%0A4 588 589 590 493%0A4 292 517 82 331%0A4 345 85 398 346%0A4 524 539 16 286%0A4 481 576 350 129%0A4 457 525 212 458%0A4 368 482 457 332%0A4 336 349 211 591%0A4 70 44 167 592%0A4 550 45 369 548%0A4 539 518 193 76%0A4 416 361 202 280%0A4 424 423 368 107%0A4 235 197 274 544%0A4 321 30 465 564%0A4 321 281 314 320%0A4 156 155 593 357%0A4 323 553 117 202%0A4 227 358 583 489%0A4 4 371 141 429%0A4 278 194 196 377%0A4 414 413 561 448%0A4 61 353 519 58%0A4 22 222 253 520%0A4 482 213 525 457%0A4 530 232 112 99%0A4 185 417 594 186%0A4 283 167 166 479%0A4 382 229 162 383%0A4 520 253 340 526%0A4 500 375 157 350%0A4 109 538 414 110%0A4 305 478 468 306%0A4 390 389 112 580%0A4 376 275 469 158%0A4 411 227 226 24%0A4 511 510 595 573%0A4 360 359 86 89%0A4 173 229 124 174%0A4 436 237 236 455%0A4 45 465 51 491%0A4 126 103 465 127%0A4 239 596 211 349%0A4 111 507 508 125%0A4 546 369 56 547%0A4 163 546 263 262%0A4 404 403 558 459%0A4 526 340 78 570%0A4 353 448 511 519%0A4 540 577 535 541%0A4 473 472 496 498%0A4 351 409 581 352%0A4 557 480 309 454%0A4 14 294 585 15%0A4 517 565 505 398%0A4 559 124 229 382%0A4 301 180 183 569%0A4 322 597 584 323%0A4 505 580 388 506%0A4 181 10 338 443%0A4 67 14 422 224%0A4 381 309 187 277%0A4 594 118 92 186%0A4 357 593 512 355%0A4 598 522 523 568%0A4 521 583 571 347%0A4 378 236 239 349%0A4 3 266 524 0%0A4 435 226 237 436%0A4 19 18 302 135%0A4 295 214 582 566%0A4 397 530 99 102%0A4 124 123 462 174%0A4 216 180 301 80%0A4 395 410 310 414%0A4 441 440 588 493%0A4 371 67 66 384%0A4 23 168 47 20%0A4 392 250 283 437%0A4 568 274 120 598%0A4 460 2 44 43%0A4 19 581 146 16%0A4 470 534 574 471%0A4 132 131 248 356%0A4 367 456 54 484%0A4 203 31 551 204%0A4 513 414 310 154%0A4 125 124 56 111%0A4 587 407 477 476%0A4 519 511 114 364%0A4 201 200 132 500%0A4 275 242 199 198%0A4 68 316 467 69%0A4 84 62 398 85%0A4 299 582 529 573%0A4 497 370 372 474%0A4 113 346 507 111%0A4 174 462 461 175%0A4 98 97 187 309%0A4 570 78 135 21%0A4 420 419 563 187%0A4 485 133 16 539%0A4 243 242 275 514%0A4 188 192 562 543%0A4 527 182 251 494%0A4 448 561 412 312%0A4 7 67 371 4%0A4 561 560 427 412%0A4 552 573 85 345%0A4 293 292 331 406%0A4 276 197 9 8%0A4 333 332 343 137%0A4 488 297 227 489%0A4 573 595 509 299%0A4 72 502 396 393%0A4 414 538 385 312%0A4 197 119 118 594%0A4 363 229 59 58%0A4 318 48 119 216%0A4 187 97 245 420%0A4 146 145 356 16%0A4 574 421 405 533%0A4 477 407 408 495%0A4 502 484 366 325%0A4 492 50 280 189%0A4 589 47 219 439%0A4 298 579 34 82%0A4 308 304 487 578%0A4 65 83 82 517%0A4 586 536 577 540%0A4 25 60 316 394%0A4 475 425 452 451%0A4 380 454 309 381%0A4 568 523 499 514%0A4 344 421 123 122%0A4 211 596 455 205%0A4 335 350 349 336%0A4 599 35 129 386%0A4 468 478 268 271%0A4 493 590 135 78%0A4 230 173 172 463%0A4 543 567 147 188%0A4 583 358 469 571%0A4 7 6 150 149%0A4 85 528 566 298%0A4 5 312 107 6%0A4 183 318 79 569%0A4 40 45 44 260%0A4 117 553 328 114%0A4 191 44 2 106%0A4 354 68 9 95%0A4 420 468 271 184%0A4 21 135 222 22%0A4 10 9 223 556%0A4 509 142 516 510%0A4 247 387 425 284%0A4 171 333 137 136%0A4 575 469 275 198%0A4 417 274 197 594%0A4 293 389 250 139%0A4 244 354 537 245%0A4 537 354 95 98%0A4 135 590 442 19%0A4 592 16
16267 283 282%0A4 418 544 233 419%0A4 187 563 418 184%0A4 425 469 575 426%0A4 104 2 45 491%0A4 258 19 94 522%0A4 159 358 275 376%0A4 280 128 36 35%0A4 346 398 325 507%0A4 500 270 306 311%0A4 598 120 219 241%0A4 560 60 371 427%0A4 337 336 591 453%0A4 449 515 343 332%0A4 31 30 435 551%0A4 327 225 228 365%0A4 478 234 274 268%0A4 211 210 203 202%0A4 278 119 197 276%0A4 593 420 110 512%0A4 110 537 98 309%0A4 142 141 59 516%0A4 550 549 279 564%0A4 228 227 297 296%0A4 523 184 500 499%0A4 85 471 532 82%0A4 573 461 463 511%0A4 340 401 404 195%0A4 310 410 27 378%0A4 265 38 543 266%0A4 555 389 232 587%0A4 464 452 465 466%0A4 440 120 48 588%0A4 355 68 234 357%0A4 229 435 597 504%0A4 128 127 572 36%0A4 545 55 369 39%0A4 596 434 436 455%0A4 155 311 420 593%0A4 415 464 466 416%0A4 241 258 522 598%0A4 504 597 322 328%0A4 429 300 5 4%0A4 406 331 333 171%0A4 406 405 389 293%0A4 423 422 556 557%0A4 76 586 540 539%0A4 282 373 374 592%0A4 355 512 513 317%0A4 349 326 327 378%0A4 584 503 553 323%0A4 402 182 181 403%0A4 510 516 140 595%0A4 453 29 297 337%0A4 427 371 316 428%0A4 123 421 430 215%0A4 595 140 142 509%0A4 27 26 448 378%0A4 490 521 311 310%0A4 320 314 315 548%0A4 117 116 554 431%0A4 195 404 459 343%0A4 531 397 396 502%0A4 178 48 120 319%0A4 222 221 485 539%0A4 238 434 596 239%0A4 590 589 439 442%0A4 578 487 303 307%0A4 437 283 251 391%0A4 311 160 375 500%0A4 396 506 565 517%0A4 403 181 170 558%0A4 585 294 405 32%0A4 141 371 370 496%0A4 422 14 10 556%0A4 257 132 19 258%0A4 177 119 48 178%0A4 288 287 265 264%0A4 137 343 256 138%0A4 549 189 280 279%0A4 525 13 10 212%0A4 451 599 386 475%0A4 325 101 531 502%0A4 453 591 599 451%0A4 597 435 30 584%0A4 462 123 59 230%0A4 564 279 281 321%0A4 170 250 249 450%0A4 529 528 85 573%0A4 581 409 143 146%0A4 302 220 313 17%0A4 563 235 544 418%0A4 83 400 267 84%0A4 324 432 431 325%0A4 582 214 215 529%0A4 517 542 476 396%0A4 192 191 106 562%0A4 222 541 586 76%0A4 591 211 35 599%0A4 269 275 358 305%0A4 196 195 454 380%0A4 592 374 71 70%0A4 48 47 589 588%0A4 195 301 569 340%0A4 165 464 415 362%0A4 93 185 184 94%0A4 483 251 283 479%0A4 445 444 454 195%0A4 567 460 43 147%0A4 277 187 81 194%0A4 148 46 460 567%0A4 81 176 179 78%0A4 542 555 587 476%0A%0A%0A%0A0%0A%0A%0A"; 1627
1628// src/worker/legacy/resources/com/vzome/core/parts/vienne3/index.js 1629var shapes26 = { 1630 "connector": connector_default24 1631}; 1632var vienne3_default = shapes26; 1633
1634// src/worker/legacy/resources/com/vzome/core/parts/index.js 1635var shapes27 = { 1636 "bigzome": bigzome_default, 1637 "default": default_default, 1638 "dimtool": dimtool_default, 1639 "dodecagon3d": dodecagon3d_default, 1640 "dodecs": dodecs_default, 1641 "heptagon/antiprism": antiprism_default, 1642 "lifelike": lifelike_default, 1643 "octahedral": octahedral_default, 1644 "octahedralFast": octahedralFast_default, 1645 "octahedralRealistic": octahedralRealistic_default, 1646 "printable": printable_default, 1647 "root2Lifelike": root2Lifelike_default, 1648 "rootThreeOctaSmall": rootThreeOctaSmall_default, 1649 "rootTwo": rootTwo_default, 1650 "rootTwoBig": rootTwoBig_default, 1651 "rootTwoSmall": rootTwoSmall_default, 1652 "snubCube": snubCube_default, 1653 "snubCube/disdyakisDodec": disdyakisDodec_default, 1654 "snubCube/dual": dual_default, 1655 "sqrtPhi/fivefold": fivefold_default, 1656 "sqrtPhi/octahedra": octahedra_default, 1657 "sqrtPhi/tinyIcosahedra": tinyIcosahedra_default, 1658 "sqrtPhi/zome": zome_default, 1659 "tiny": tiny_default, 1660 "vienne2": vienne2_default, 1661 "vienne3": vienne3_default 1662}; 1663var parts_default = shapes27; 1664 1665// src/worker/legacy/resources/com/vzome/core/parts/bigzome/colors.properties 1666var colors_default = 'data:text/plain;charset=utf-8,%23 The file uses standard java.util.Properties file syntax.%0A%23%0A%23 color values are given as "red,green,blue", each component as an integer value from 0-255,%0A%23 with black = 0,0,0 and white = 255,255,255.%0A%23%0A%23 NOTE: for convenience, color properties can be specified as "color.percent.<whatever>",%0A%23 with decimal values from 0.0-100.0. E.g.:%0A%23 color.percent.red = 68.62,0,0%0A%23 color.percent.highlight = 100,35,0%0A%23 "color.percent.<whatever>" will take precedence over "color.<whatever>" when both%0A%23 are specified, whether in the defaults or in your preferences file.%0A%23%0A%0A%23 in bigzome, blue struts are white%0Ablue = 225,225,225%0A%0A%23 ... and connectors are silver%0Aconnector = 175,175,185%0A'; 1667 1668// src/worker/legacy/resources/com/vzome/core/parts/vienne/colors.properties 1669var colors_default2 = 'data:text/plain;charset=utf-8,%23 The file uses standard java.util.Properties file syntax.%0A%23%0A%23 color values are given as "red,green,blue", each component as an integer value from 0-255,%0A%23 with black = 0,0,0 and white = 255,255,255.%0A%23%0A%23 NOTE: for convenience, color properties can be specified as "color.percent.<whatever>",%0A%23 with decimal values from 0.0-100.0. E.g.:%0A%23 color.percent.red = 68.62,0,0%0A%23 color.percent.highlight = 100,35,0%0A%23 "color.percent.<whatever>" will take precedence over "color.<whatever>" when both%0A%23 are specified, whether in the defaults or in your preferences file.%0A%23%0A%0A%23 for Fabien Vienne, the purple orbit is a different kind of yellow%0Apurple = 240,160,0%0A%0A%23 ... and orange is a different kind of red%0Aorange = 175,0,0%0A%0A%23 ... and black is a different kind of blue%0Ablack = 0,118,149'; 1670 1671// src/worker/legacy/resources/com/vzome/core/parts/vienne2/colors.properties 1672var colors_default3 = 'data:text/plain;charset=utf-8,%23 The file uses standard java.util.Properties file syntax.%0A%23%0A%23 color values are given as "red,green,blue", each component as an integer value from 0-255,%0A%23 with black = 0,0,0 and white = 255,255,255.%0A%23%0A%23 NOTE: for convenience, color properties can be specified as "color.percent.<whatever>",%0A%23 with decimal values from 0.0-100.0. E.g.:%0A%23 color.percent.red = 68.62,0,0%0A%23 color.percent.highlight = 100,35,0%0A%23 "color.percent.<whatever>" will take precedence over "color.<whatever>" when both%0A%23 are specified, whether in the defaults or in your preferences file.%0A%23%0A%0A%23 for Fabien Vienne, the purple orbit is a different kind of yellow%0Apurple = 240,160,0%0A%0A%23 ... and orange is a different kind of red%0Aorange = 175,0,0%0A%0A%23 ... and black is a different kind of blue%0Ablack = 0,118,149'; 1673 1674// src/worker/legacy/resources/com/vzome/core/parts/vienne3/colors.properties 1675var colors_default4 = 'data:text/plain;charset=utf-8,%23 The file uses standard java.util.Properties file syntax.%0A%23%0A%23 color values are given as "red,green,blue", each component as an integer value from 0-255,%0A%23 with black = 0,0,0 and white = 255,255,255.%0A%23%0A%23 NOTE: for convenience, color properties can be specified as "color.percent.<whatever>",%0A%23 with decimal values from 0.0-100.0. E.g.:%0A%23 color.percent.red = 68.62,0,0%0A%23 color.percent.highlight = 100,35,0%0A%23 "color.percent.<whatever>" will take precedence over "color.<whatever>" when both%0A%23 are specified, whether in the defaults or in your preferences file.%0A%23%0A%0A%23 for Fabien Vienne, the purple orbit is a different kind of yellow%0Apurple = 240,160,0%0A%0A%23 ... and orange is a different kind of red%0Aorange = 175,0,0%0A%0A%23 ... and black is a different kind of blue
1675%0Ablack = 0,118,149'; 1676
1677// src/worker/legacy/resources/com/vzome/core/parts/colors.js 1678var colors = { 1679 "bigzome": colors_default, 1680 "vienne": colors_default2, 1681 "vienne2": colors_default3, 1682 "vienne3": colors_default4 1683}; 1684var colors_default5 = colors; 1685 1686// src/worker/legacy/resources/com/vzome/core/math/symmetry/H4roots-rotationalSubgroup.vef 1687var H4roots_rotationalSubgroup_default = "data:text/plain;charset=utf-8;base64,dlpvbWUgVkVGIDQKCjYwCigwLDIpCSgwLDApCSgwLDApCSgwLDApCigwLDApCSgwLDIpCSgwLDApCSgwLDApCigwLDApCSgwLDApCSgwLDIpCSgwLDApCigwLDApCSgwLDApCSgwLDApCSgwLDIpCgooMCwxKQkoMCwwKQkoMSwtMSkJKDEsMCkKKDAsLTEpCSgwLDApCSgtMSwxKQkoMSwwKQooMCwtMSkJKDAsMCkJKDEsLTEpCSgtMSwwKQooMCwxKQkoMCwwKQkoLTEsMSkJKC0xLDApCgooMSwtMSkJKDAsMCkJKDEsMCkJKDAsMSkKKC0xLDEpCSgwLDApCSgtMSwwKQkoMCwxKQooLTEsMSkJKDAsMCkJKDEsMCkJKDAsLTEpCigxLC0xKQkoMCwwKQkoLTEsMCkJKDAsLTEpCgooMSwwKQkoMCwwKQkoMCwxKQkoMSwtMSkKKC0xLDApCSgwLDApCSgwLC0xKQkoMSwtMSkKKC0xLDApCSgwLDApCSgwLDEpCSgtMSwxKQooMSwwKQkoMCwwKQkoMCwtMSkJKC0xLDEpCgooMCwxKQkoMSwwKQkoMCwwKQkoMSwtMSkKKDAsLTEpCSgtMSwwKQkoMCwwKQkoMSwtMSkKKDAsLTEpCSgxLDApCSgwLDApCSgtMSwxKQooMCwxKQkoLTEsMCkJKDAsMCkJKC0xLDEpCgooMSwtMSkJKDAsMSkJKDAsMCkJKDEsMCkKKC0xLDEpCSgwLC0xKQkoMCwwKQkoMSwwKQooLTEsMSkJKDAsMSkJKDAsMCkJKC0xLDApCigxLC0xKQkoMCwtMSkJKDAsMCkJKC0xLDApCgooMSwwKQkoMSwtMSkJKDAsMCkJKDAsMSkKKC0xLDApCSgtMSwxKQkoMCwwKQkoMCwxKQooLTEsMCkJKDEsLTEpCSgwLDApCSgwLC0xKQooMSwwKQkoLTEsMSkJKDAsMCkJKDAsLTEpCgooMSwtMSkJKDEsMCkJKDAsMSkJKDAsMCkKKC0xLDEpCSgtMSwwKQkoMCwxKQkoMCwwKQooLTEsMSkJKDEsMCkJKDAsLTEpCSgwLDApCigxLC0xKQkoLTEsMCkJKDAsLTEpCSgwLDApCgooMSwwKQkoMCwxKQkoMSwtMSkJKDAsMCkKKC0xLDApCSgwLC0xKQkoMSwtMSkJKDAsMCkKKC0xLDApCSgwLDEpCSgtMSwxKQkoMCwwKQooMSwwKQkoMCwtMSkJKC0xLDEpCSgwLDApCgooMCwxKQkoMSwtMSkJKDEsMCkJKDAsMCkKKDAsLTEpCSgtMSwxKQkoMSwwKQkoMCwwKQooMCwtMSkJKDEsLTEpCSgtMSwwKQkoMCwwKQooMCwxKQkoLTEsMSkJKC0xLDApCSgwLDApCgooMCwwKQkoMSwwKQkoMSwtMSkJKDAsMSkJCigwLDApCSgtMSwwKQkoLTEsMSkJKDAsMSkJCigwLDApCSgtMSwwKQkoMSwtMSkJKDAsLTEpCQooMCwwKQkoMSwwKQkoLTEsMSkJKDAsLTEpCQoKKDAsMCkJKDAsMSkJKDEsMCkJKDEsLTEpCQooMCwwKQkoMCwtMSkJKC0xLDApCSgxLC0xKQkKKDAsMCkJKDAsLTEpCSgxLDApCSgtMSwxKQkKKDAsMCkJKDAsMSkJKC0xLDApCSgtMSwxKQkKCigwLDApCSgxLC0xKQkoMCwxKQkoMSwwKQkKKDAsMCkJKC0xLDEpCSgwLC0xKQkoMSwwKQkKKDAsMCkJKC0xLDEpCSgwLDEpCSgtMSwwKQkKKDAsMCkJKDEsLTEpCSgwLC0xKQkoLTEsMCkJCgoKKDAsMSkJKDAsMSkJKDAsMSkJKDAsMSkKKDAsLTEpCSgwLC0xKQkoMCwxKQkoMCwxKQooMCwtMSkJKDAsMSkJKDAsLTEpCSgwLDEpCigwLC0xKQkoMCwxKQkoMCwxKQkoMCwtMSkKKDAsMSkJKDAsLTEpCSgwLC0xKQkoMCwxKQooMCwxKQkoMCwtMSkJKDAsMSkJKDAsLTEpCigwLDEpCSgwLDEpCSgwLC0xKQkoMCwtMSkKKDAsLTEpCSgwLC0xKQkoMCwtMSkJKDAsLTEpCgoKCgo="; 1688 1689// src/worker/legacy/resources/com/vzome/core/math/symmetry/H4roots.vef 1690var H4roots_default = "data:text/plain;charset=utf-8,vZome VEF 4%0A%0A120%0A(0,2)%09(0,0)%09(0,0)%09(0,0)%0A(0,0)%09(0,2)%09(0,0)%09(0,0)%0A(0,0)%09(0,0)%09(0,2)%09(0,0)%0A(0,0)%09(0,0)%09(0,0)%09(0,2)%0A%0A(0,1)%09(0,0)%09(1,-1)%09(1,0)%0A(0,-1)%09(0,0)%09(1,-1)%09(1,0)%0A(0,1)%09(0,0)%09(-1,1)%09(1,0)%0A(0,1)%09(0,0)%09(1,-1)%09(-1,0)%0A(0,-1)%09(0,0)%09(-1,1)%09(1,0)%0A(0,-1)%09(0,0)%09(1,-1)%09(-1,0)%0A(0,1)%09(0,0)%09(-1,1)%09(-1,0)%0A(0,-1)%09(0,0)%09(-1,1)%09(-1,0)%0A(1,-1)%09(0,0)%09(1,0)%09(0,1)%0A(-1,1)%09(0,0)%09(1,0)%09(0,1)%0A(1,-1)%09(0,0)%09(-1,0)%09(0,1)%0A(1,-1)%09(0,0)%09(1,0)%09(0,-1)%0A(-1,1)%09(0,0)%09(-1,0)%09(0,1)%0A(-1,1)%09(0,0)%09(1,0)%09(0,-1)%0A(1,-1)%09(0,0)%09(-1,0)%09(0,-1)%0A(-1,1)%09(0,0)%09(-1,0)%09(0,-1)%0A(1,0)%09(0,0)%09(0,1)%09(1,-1)%0A(-1,0)%09(0,0)%09(0,1)%09(1,-1)%0A(1,0)%09(0,0)%09(0,-1)%09(1,-1)%0A(1,0)%09(0,0)%09(0,1)%09(-1,1)%0A(-1,0)%09(0,0)%09(0,-1)%09(1,-1)%0A(-1,0)%09(0,0)%09(0,1)%09(-1,1)%0A(1,0)%09(0,0)%09(0,-1)%09(-1,1)%0A(-1,0)%09(0,0)%09(0,-1)%09(-1,1)%0A%0A(0,1)%09(1,0)%09(0,0)%09(1,-1)%0A(0,-1)%09(1,0)%09(0,0)%09(1,-1)%0A(0,1)%09(-1,0)%09(0,0)%09(1,-1)%0A(0,1)%09(1,0)%09(0,0)%09(-1,1)%0A(0,-1)%09(-1,0)%09(0,0)%09(1,-1)%0A(0,-1)%09(1,0)%09(0,0)%09(-1,1)%0A(0,1)%09(-1,0)%09(0,0)%09(-1,1)%0A(0,-1)%09(-1,0)%09(0,0)%09(-1,1)%0A(1,-1)%09(0,1)%09(0,0)%09(1,0)%0A(-1,1)%09(0,1)%09(0,0)%09(1,0)%0A(1,-1)%09(0,-1)%09(0,0)%09(1,0)%0A(1,-1)%09(0,1)%09(0,0)%09(-1,0)%0A(-1,1)%09(0,-1)%09(0,0)%09(1,0)%0A(-1,1)%09(0,1)%09(0,0)%09(-1,0)%0A(1,-1)%09(0,-1)%09(0,0)%09(-1,0)%0A(-1,1)%09(0,-1)%09(0,0)%09(-1,0)%0A(1,0)%09(1,-1)%09(0,0)%09(0,1)%0A(-1,0)%09(1,-1)%09(0,0)%09(0,1)%0A(1,0)%09(-1,1)%09(0,0)%09(0,1)%0A(1,0)%09(1,-1)%09(0,0)%09(0,-1)%0A(-1,0)%09(-1,1)%09(0,0)%09(0,1)%0A(-1,0)%09(1,-1)%09(0,0)%09(0,-1)%0A(1,0)%09(-1,1)%09(0,0)%09(0,-1)%0A(-1,0)%09(-1,1)%09(0,0)%09(0,-1)%0A%0A(1,-1)%09(1,0)%09(0,1)%09(0,0)%0A(-1,1)%09(1,0)%09(0,1)%09(0,0)%0A(1,-1)%09(-1,0)%09(0,1)%09(0,0)%0A(1,-1)%09(1,0)%09(0,-1)%09(0,0)%0A(-1,1)%09(-1,0)%09(0,1)%09(0,0)%0A(-1,1)%09(1,0)%09(0,-1)%09(0,0)%0A(1,-1)%09(-1,0)%09(0,-1)%09(0,0)%0A(-1,1)%09(-1,0)%09(0,-1)%09(0,0)%0A(1,0)%09(0,1)%09(1,-1)%09(0,0)%0A(-1,0)%09(0,1)%09(1,-1)%09(0,0)%0A(1,0)%09(0,-1)%09(1,-1)%09(0,0)%0A(1,0)%09(0,1)%09(-1,1)%09(0,0)%0A(-1,0)%09(0,-1)%09(1,-1)%09(0,0)%0A(-1,0)%09(0,1)%09(-1,1)%09(0,0)%0A(1,0)%09(0,-1)%09(-1,1)%09(0,0)%0A(-1,0)%09(0,-1)%09(-1,1)%09(0,0)%0A(0,1)%09(1,-1)%09(1,0)%09(0,0)%0A(0,-1)%09(1,-1)%09(1,0)%09(0,0)%0A(0,1)%09(-1,1)%09(1,0)%09(0,0)%0A(0,1)%09(1,-1)%09(-1,0)%09(0,0)%0A(0,-1)%09(-1,1)%09(1,0)%09(0,0)%0A(0,-1)%09(1,-1)%09(-1,0)%09(0,0)%0A(0,1)%09(-1,1)%09(-1,0)%09(0,0)%0A(0,-1)%09(-1,1)%09(-1,0)%09(0,0)%0A%0A(0,0)%09(1,0)%09(1,-1)%09(0,1)%09%0A(0,0)%09(-1,0)%09(1,-1)%09(0,1)%0A(0,0)%09(1,0)%09(-1,1)%09(0,1)%0A(0,0)%09(1,0)%09(1,-1)%09(0,-1)%09%0A(0,0)%09(-1,0)%09(-1,1)%09(0,1)%09%0A(0,0)%09(-1,0)%09(1,-1)%09(0,-1)%09%0A(0,0)%09(1,0)%09(-1,1)%09(0,-1)%09%0A(0,0)%09(-1,0)%09(-1,1)%09(0,-1)%09%0A(0,0)%09(0,1)%09(1,0)%09(1,-1)%09%0A(0,0)%09(0,-1)%09(1,0)%09(1,-1)%09%0A(0,0)%09(0,1)%09(-1,0)%09(1,-1)%09%0A(0,0)%09(0,1)%09(1,0)%09(-1,1)%09%0A(0,0)%09(0,-1)%09(-1,0)%09(1,-1)%09%0A(0,0)%09(0,-1)%09(1,0)%09(-1,1)%09%0A(0,0)%09(0,1)%09(-1,0)%09(-1,1)%09%0A(0,0)%09(0,-1)%09(-1,0)%09(-1,1)%09%0A(0,0)%09(1,-1)%09(0,1)%09(1,0)%09%0A(0,0)%09(-1,1)%09(0,1)%09(1,0)%09%0A(0,0)%09(1,-1)%09(0,-1)%09(1,0)%09%0A(0,0)%09(1,-1)%09(0,1)%09(-1,0)%09%0A(0,0)%09(-1,1)%09(0,-1)%09(1,0)%09%0A(0,0)%09(-1,1)%09(0,1)%09(-1,0)%09%0A(0,0)%09(1,-1)%09(0,-1)%09(-1,0)%09%0A(0,0)%09(-1,1)%09(0,-1)%09(-1,0)%09%0A%0A%0A%0A(0,1)%09(0,1)%09(0,1)%09(0,1)%0A(0,-1)%09(0,-1)%09(0,1)%09(0,1)%0A(0,-1)%09(0,1)%09(0,-1)%09(0,1)%0A(0,-1)%09(0,1)%09(0,1)%09(0,-1)%0A(0,1)%09(0,-1)%09(0,-1)%09(0,1)%0A(0,1)%09(0,-1)%09(0,1)%09(0,-1)%0A(0,1)%09(0,1)%09(0,-1)%09(0,-1)%0A(0,-1)%09(0,-1)%09(0,-1)%09(0,-1)%0A%0A%0A%0A(0,-2)%09(0,0)%09(0,0)%09(0,0)%0A(0,0)%09(0,-2)%09(0,0)%09(0,0)%0A(0,0)%09(0,0)%09(0,-2)%09(0,0)%0A(0,0)%09(0,0)%09(0,0)%09(0,-2)%0A%0A(0,-1)%09(0,1)%09(0,1)%09(0,1)%0A(0,1)%09(0,-1)%09(0,1)%09(0,1)%0A(0,1)%09(0,1)%09(0,-1)%09(0,1)%0A(0,1)%09(0,1)%09(0,1)%09(0,-1)%0A(0,-1)%09(0,-1)%09(0,-1)%09(0,1)%0A(0,-1)%09(0,-1)%09(0,1)%09(0,-1)%0A(0,-1)%09(0,1)%09(0,-1)%09(0,-1)%0A(0,1)%09(0,-1)%09(0,-1)%09(0,-1)%0A%0A%0A%0A"; 1691 1692// src/worker/legacy/resources/com/vzome/core/math/symmetry/binaryTetrahedralGroup.vef 1693var binaryTetrahedralGroup_default = "data:text/plain;charset=utf-8,vZome VEF 4%0A%0A24%0A(0,2)%09(0,0)%09(0,0)%09(0,0)%0A(0,0)%09(0,2)%09(0,0)%09(0,0)%0A(0,0)%09(0,0)%09(0,2)%09(0,0)%0A(0,0)%09(0,0)%09(0,0)%09(0,2)%0A%0A(0,1)%09(0,1)%09(0,1)%09(0,1)%0A(0,-1)%09(0,-1)%09(0,1)%09(0,1)%0A(0,-1)%09(0,1)%09(0,-1)%09(0,1)%0A(0,-1)%09(0,1)%09(0,1)%09(0,-1)%0A(0,1)%09(0,-1)%09(0,-1)%09(0,1)%0A(0,1)%09(0,-1)%09(0,1)%09(0,-1)%0A(0,1)%09(0,1)%09(0,-1)%09(0,-1)%0A(0,-1)%09(0,-1)%09(0,-1)%09(0,-1)%0A%0A(0,-2)%09(0,0)%09(0,0)%09(0,0)%0A(0,0)%09(0,-2)%09(0,0)%09(0,0)%0A(0,0)%09(0,0)%09(0,-2)%09(0,0)%0A(0,0)%09(0,0)%09(0,0)%09(0,-2)%0A%0A(0,-1)%09(0,1)%09(0,1)%09(0,1)%0A(0,1)%09(0,-1)%09(0,1)%09(0,1)%0A(0,1)%09(0,1)%09(0,-1)%09(0,1)%0A(0,1)%09(0,1)%09(0,1)%09(0,-1)%0A(0,-1)%09(0,-1)%09(0,-1)%09(0,1)%0A(0,-1)%09(0,-1)%09(0,1)%09(0,-1)%0A(0,-1)%09(0,1)%09(0,-1)%09(0,-1)%0A(0,1)%09(0,-1)%09(0,-1)%09(0,-1)%0A%0A%0A%0A"; 1694
1695// src/worker/legacy/resources/com/vzome/core/math/symmetry/index.js 1696var resources = { 1697 "H4roots-rotationalSubgroup": H4roots_rotationalSubgroup_default, 1698 "H4roots": H4roots_default, 1699 "binaryTetrahedralGroup": binaryTetrahedralGroup_default 1700}; 1701var symmetry_default = resources; 1702
1703// src/worker/legacy/from-java/com/vzome/core/editor/api/UndoableEdit.ts 1704var UndoableEdit = class { 1705 hasBreakpoint() { 1706 return this.__com_vzome_core_editor_EditHistory_DeferredEdit_hasBreakpoint; 1707 } 1708 setBreakpoint(value) { 1709 this.__com_vzome_core_editor_EditHistory_DeferredEdit_hasBreakpoint = value; 1710 } 1711 getLineNumber() { 1712 return this.lineNumber; 1713 } 1714 setLineNumber(lineNumber) { 1715 this.lineNumber = lineNumber; 1716 } 1717 constructor() { 1718 this.__com_vzome_core_editor_EditHistory_DeferredEdit_hasBreakpoint = false; 1719 this.lineNumber = -1; 1720 } 1721}; 1722UndoableEdit["__class"] = "com.vzome.core.editor.api.UndoableEdit"; 1723
1724// src/worker/legacy/from-java/com/vzome/core/editor/AbstractToolFactory.ts 1725var AbstractToolFactory = class _AbstractToolFactory { 1726 constructor(tools, symmetry, id, label, tooltip) { 1727 this.enabled = false; 1728 if (this.pcs === void 0) { 1729 this.pcs = null; 1730 } 1731 if (this.tools === void 0) { 1732 this.tools = null; 1733 } 1734 if (this.label === void 0) { 1735 this.label = null; 1736 } 1737 if (this.tooltip === void 0) { 1738 this.tooltip = null; 1739 } 1740 if (this.id === void 0) { 1741 this.id = null; 1742 } 1743 if (this.symmetry === void 0) { 1744 this.symmetry = null; 1745 } 1746 this.tools = tools; 1747 this.symmetry = symmetry; 1748 this.id = id; 1749 this.label = label; 1750 this.tooltip = tooltip; 1751 this.pcs = new PropertyChangeSupport(this); 1752 } 1753 /** 1754 * 1755 * @param {number} total 1756 * @param {number} balls 1757 * @param {number} struts 1758 * @param {number} panels 1759 */ 1760 selectionChanged(total, balls, struts, panels) { 1761 const wasEnabled = this.enabled; 1762 if (this.countsAreValid(total, balls, struts, panels)) this.enabled = this.bindParameters(this.getSelection()); 1763 else this.enabled = false; 1764 if (wasEnabled !== this.enabled) this.pcs.firePropertyChange$java_lang_String$boolean$boolean("enabled", wasEnabled, this.enabled); 1765 } 1766 getSymmetry() { 1767 return this.symmetry; 1768 } 1769 getId() { 1770 return this.id; 1771 } 1772 getLabel() { 1773 return this.label; 1774 } 1775 getToolTip() { 1776 return this.tooltip; 1777 } 1778 getToolsModel() { 1779 return this.tools; 1780 } 1781 getEditorModel() { 1782 return this.tools.getEditorModel(); 1783 } 1784 getSelection() { 1785 return this.getEditorModel().getSelection(); 1786 } 1787 getModel() { 1788 return this.getEditorModel().getRealizedModel(); 1789 } 1790 /** 1791 * 1792 * @return {boolean} 1793 */ 1794 isEnabled() { 1795 return this.enabled; 1796 } 1797 addListener(listener) { 1798 this.pcs.addPropertyChangeListener$java_beans_PropertyChangeListener(listener); 1799 } 1800 static { 1801 this.NEW_PREFIX = "tool-"; 1802 } 1803 /** 1804 * 1805 * @return {CoreTool} 1806 */ 1807 createTool() { 1808 const index = this.tools.reserveId(); 1809 const tool = this.createToolInternal(_AbstractToolFactory.NEW_PREFIX + index); 1810 tool.setCategory(this.getId()); 1811 tool.setLabel(this.getId() + " " + index); 1812 if (tool != null && tool instanceof UndoableEdit) this.tools.getContext().performAndRecord(tool); 1813 else this.tools.put(tool.getId(), tool); 1814 return tool; 1815 } 1816 createPredefinedTool(label) { 1817 const tool = this.createToolInternal(this.getId() + ".builtin/" + label); 1818 tool.setLabel(label); 1819 tool.setCategory(this.getId()); 1820 tool.setPredefined(true); 1821 tool.checkSelection(true); 1822 this.tools.put(tool.getId(), tool); 1823 return tool; 1824 } 1825 deserializeTool(id) { 1826 const tool = this.createToolInternal(id); 1827 if ( 1828 /* startsWith */ 1829 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(id, _AbstractToolFactory.NEW_PREFIX) 1830 ) { 1831 const num = javaemul.internal.IntegerHelper.parseInt(id.substring(_AbstractToolFactory.NEW_PREFIX.length)); 1832 this.tools.setMaxId(num); 1833 } 1834 const nextDot = id.indexOf("."); 1835 if (nextDot > 0) { 1836 tool.setCategory(id.substring(0, nextDot)); 1837 } else { 1838 tool.setCategory(this.getId()); 1839 } 1840 this.tools.setConfiguration(tool); 1841 return tool; 1842 } 1843}; 1844AbstractToolFactory["__class"] = "com.vzome.core.editor.AbstractToolFactory"; 1845AbstractToolFactory["__interfaces"] = ["com.vzome.core.editor.SelectionSummary.Listener", "com.vzome.api.Tool.Factory"]; 1846
1847// src/worker/legacy/from-java/com/vzome/core/construction/FreePoint.ts 1848var FreePoint = class extends Point { 1849 constructor(loc) { 1850 super(loc.getField()); 1851 this.setStateVariable(loc, false); 1852 } 1853 /** 1854 * 1855 * @return {boolean} 1856 */ 1857 mapParamsToState() { 1858 return true; 1859 } 1860}; 1861FreePoint["__class"] = "com.vzome.core.construction.FreePoint"; 1862
1863// src/worker/legacy/from-java/com/vzome/core/construction/PolygonFromVertices.ts 1864var PolygonFromVertices = class extends Polygon { 1865 constructor(points) { 1866 if (points != null && (points.constructor != null && points.constructor["__interfaces"] != null && points.constructor["__interfaces"].indexOf("java.util.List") >= 0) || points === null) { 1867 let __args = arguments; 1868 { 1869 let __args2 = arguments; 1870 let vertices = points.toArray(((s) => { 1871 let a = []; 1872 while (s-- > 0) a.push(null); 1873 return a; 1874 })(points.size())); 1875 super(vertices.length === 0 ? null : vertices[0].field); 1876 if (this.__com_vzome_core_construction_PolygonFromVertices_mVertices === void 0) { 1877 this.__com_vzome_core_construction_PolygonFromVertices_mVertices = null; 1878 } 1879 this.__com_vzome_core_construction_PolygonFromVertices_mVertices = vertices; 1880 this.mapParamsToState(); 1881 } 1882 } else if (points != null && points instanceof Array && (points.length == 0 || points[0] == null || points[0] != null && points[0] instanceof Point) || points === null) { 1883 let __args = arguments; 1884 let vertices = __args[0]; 1885 super(vertices.length === 0 ? null : vertices[0].field); 1886 if (this.__com_vzome_core_construction_PolygonFromVertices_mVertices === void 0) { 1887 this.__com_vzome_core_construction_PolygonFromVertices_mVertices = null; 1888 } 1889 this.__com_vzome_core_construction_PolygonFromVertices_mVertices = vertices; 1890 this.mapParamsToState(); 1891 } else throw new Error("invalid overload"); 1892 } 1893 /** 1894 * 1895 * @return {boolean} 1896 */ 1897 mapParamsToState() { 1898 const locs = ((s) => { 1899 let a = []; 1900 while (s-- > 0) a.push(null); 1901 return a; 1902 })(this.__com_vzome_core_construction_PolygonFromVertices_mVertices.length); 1903 for (let i = 0; i < this.__com_vzome_core_construction_PolygonFromVertices_mVertices.length; i++) { 1904 locs[i] = this.__com_vzome_core_construction_PolygonFromVertices_mVertices[i].getLocation(); 1905 } 1906 return this.setStateVariable(locs, false); 1907 } 1908}; 1909PolygonFromVertices["__class"] = "com.vzome.core.construction.PolygonFromVertices"; 1910
1911// src/worker/legacy/from-java/com/vzome/core/construction/SegmentJoiningPoints.ts 1912var SegmentJoiningPoints = class extends Segment { 1913 constructor(p1, p2) { 1914 super(p1.field); 1915 if (this.__com_vzome_core_construction_SegmentJoiningPoints_mStart === void 0) { 1916 this.__com_vzome_core_construction_SegmentJoiningPoints_mStart = null; 1917 } 1918 if (this.__com_vzome_core_construction_SegmentJoiningPoints_mEnd === void 0) { 1919 this.__com_vzome_core_construction_SegmentJoiningPoints_mEnd = null; 1920 } 1921 this.__com_vzome_core_construction_SegmentJoiningPoints_mStart = p1; 1922 this.__com_vzome_core_construction_SegmentJoiningPoints_mEnd = p2; 1923 this.mapParamsToState(); 1924 } 1925 /** 1926 * 1927 * @return {boolean} 1928 */ 1929 mapParamsToState() { 1930 if (this.__com_vzome_core_construction_SegmentJoiningPoints_mStart.isImpossible() || this.__com_vzome_core_construction_SegmentJoiningPoints_mEnd.isImpossible()) return this.setStateVariables(null, null, true); 1931 let startV = this.__com_vzome_core_construction_SegmentJoiningPoints_mStart.getLocation(); 1932 let endV = this.__com_vzome_core_construction_SegmentJoiningPoints_mEnd.getLocation(); 1933 if (startV.dimension() === 3 || endV.dimension() === 3) { 1934 startV = startV.projectTo3d(true); 1935 endV = endV.projectTo3d(true); 1936 } 1937 const offset = endV.minus(startV); 1938 return this.setStateVariables(startV, offset, false); 1939 } 1940}; 1941SegmentJoiningPoints["__class"] = "com.vzome.core.construction.SegmentJoiningPoints"; 1942
1943// src/worker/legacy/from-java/com/vzome/core/editor/Duplicator.ts 1944var Duplicator = class { 1945 constructor(edit, offset) { 1946 this.vertexData = new java.util.HashMap(); 1947 if (this.edit === void 0) { 1948 this.edit = null; 1949 } 1950 if (this.offset === void 0) { 1951 this.offset = null; 1952 } 1953 this.edit = edit; 1954 this.offset = offset; 1955 } 1956 duplicateManifestation(man) { 1957 const constr = this.duplicateConstruction(man); 1958 this.edit.manifestConstruction(constr); 1959 } 1960 duplicateConstruction(man) { 1961 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) { 1962 const vector = man.getLocation(); 1963 return this.getVertex(vector); 1964 } else if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) { 1965 const strut = man; 1966 const p1 = this.getVertex(strut.getLocation()); 1967 const p2 = this.getVertex(strut.getEnd()); 1968 return new SegmentJoiningPoints(p1, p2); 1969 } else if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0)) { 1970 const vs = new java.util.ArrayList(); 1971 for (let index = man.iterator(); index.hasNext(); ) { 1972 let v = index.next(); 1973 { 1974 vs.add(this.getVertex(v)); 1975 } 1976 } 1977 return new PolygonFromVertices(vs.toArray([])); 1978 } 1979 return null; 1980 } 1981 getVertex(vertexVector) { 1982 let result = this.vertexData.get(vertexVector); 1983 if (result == null) { 1984 const key = vertexVector; 1985 if (this.offset != null) vertexVector = vertexVector.plus(this.offset); 1986 result = new FreePoint(vertexVector); 1987 this.vertexData.put(key, result); 1988 } 1989 return result; 1990 } 1991}; 1992Duplicator["__class"] = "com.vzome.core.editor.Duplicator"; 1993
1994// src/worker/legacy/from-java/com/vzome/core/editor/api/ActionEnum.ts 1995var ActionEnum = /* @__PURE__ */ ((ActionEnum2) => { 1996 ActionEnum2[ActionEnum2["IGNORE"] = 0] = "IGNORE"; 1997 ActionEnum2[ActionEnum2["SELECT"] = 1] = "SELECT"; 1998 ActionEnum2[ActionEnum2["DESELECT"] = 2] = "DESELECT"; 1999 return ActionEnum2; 2000})(ActionEnum || {}); 2001
2002// src/worker/legacy/from-java/com/vzome/core/editor/api/Selection.ts 2003var Selection; 2004((Selection2) => { 2005 function biggestGroup(m) { 2006 let parent = m.getContainer(); 2007 let group = parent; 2008 while (parent != null) { 2009 { 2010 parent = group.getContainer(); 2011 if (parent == null) break; 2012 group = parent; 2013 } 2014 } 2015 ; 2016 return group; 2017 } 2018 Selection2.biggestGroup = biggestGroup; 2019})(Selection || (Selection = {})); 2020
2021// src/worker/legacy/from-java/com/vzome/core/editor/api/SideEffects.ts 2022var SideEffects = class _SideEffects extends UndoableEdit { 2023 /** 2024 * 2025 * @param {*} doc 2026 * @return {*} 2027 */ 2028 getDetailXml(doc) { 2029 const result = this.getXml(doc); 2030 const effects = doc.createElement("effects"); 2031 for (let index = this.mItems.iterator(); index.hasNext(); ) { 2032 let se = index.next(); 2033 { 2034 if (se != null) { 2035 const effect = se.getXml(doc); 2036 if (effect != null) { 2037 effects.appendChild(effect); 2038 } 2039 } 2040 } 2041 } 2042 result.appendChild(effects); 2043 return result; 2044 } 2045 /** 2046 * 2047 * @return {boolean} 2048 */ 2049 isSticky() { 2050 return false; 2051 } 2052 static BUG_ACCOMMODATION_LOGGER_$LI$() { 2053 if (_SideEffects.BUG_ACCOMMODATION_LOGGER == null) { 2054 _SideEffects.BUG_ACCOMMODATION_LOGGER = java.util.logging.Logger.getLogger("com.vzome.core.bug.accommodations"); 2055 } 2056 return _SideEffects.BUG_ACCOMMODATION_LOGGER; 2057 } 2058 static logBugAccommodation(accommodation) { 2059 if (_SideEffects.BUG_ACCOMMODATION_LOGGER_$LI$().isLoggable(java.util.logging.Level.WARNING)) _SideEffects.BUG_ACCOMMODATION_LOGGER_$LI$().warning("ACCOMMODATION: " + accommodation); 2060 } 2061 /** 2062 * 2063 * @return {boolean} 2064 */ 2065 isVisible() { 2066 return true; 2067 } 2068 /** 2069 * 2070 * @return {boolean} 2071 */ 2072 isDestructive() { 2073 return true; 2074 } 2075 plan(se) { 2076 this.mItems.add(se); 2077 } 2078 /** 2079 * 2080 */ 2081 perform() { 2082 this.redo(); 2083 } 2084 fail(message) { 2085 this.undo(); 2086 throw new Command.Failure(message); 2087 } 2088 /** 2089 * 2090 * @param {*} props 2091 */ 2092 configure(props) { 2093 } 2094 /** 2095 * 2096 * @return {boolean} 2097 */ 2098 isNoOp() { 2099 return this.mItems.size() === 0; 2100 } 2101 /** 2102 * 2103 */ 2104 redo() { 2105 for (let i = this.redone; i < this.mItems.size(); i++) { 2106 { 2107 const se = this.mItems.get(i); 2108 if (se != null) se.redo(); 2109 } 2110 ; 2111 } 2112 this.redone = this.mItems.size(); 2113 } 2114 /** 2115 * 2116 */ 2117 undo() { 2118 for (let i = this.mItems.size(); i > 0; i--) { 2119 { 2120 const se = this.mItems.get(i - 1); 2121 if (se != null) se.undo(); 2122 } 2123 ; 2124 } 2125 this.redone = 0; 2126 } 2127 getEffects() { 2128 return this.mItems.iterator(); 2129 } 2130 constructor() { 2131 super(); 2132 this.mItems = new java.util.ArrayList(); 2133 this.redone = 0; 2134 } 2135}; 2136SideEffects["__class"] = "com.vzome.core.editor.api.SideEffects"; 2137
2138// src/worker/legacy/from-java/com/vzome/core/model/Group.ts 2139var Group = class extends java.util.ArrayList { 2140 getContainer() { 2141 return this.mContainer; 2142 } 2143 /** 2144 * 2145 * @param {Group} container 2146 */ 2147 setContainer(container) { 2148 this.mContainer = container; 2149 } 2150 constructor() { 2151 super(); 2152 if (this.mContainer === void 0) { 2153 this.mContainer = null; 2154 } 2155 } 2156}; 2157Group["__class"] = "com.vzome.core.model.Group"; 2158Group["__interfaces"] = ["java.util.RandomAccess", "com.vzome.core.model.GroupElement", "java.util.List", "java.lang.Cloneable", "java.util.Collection", "java.lang.Iterable", "java.io.Serializable"]; 2159
2160// src/worker/legacy/from-java/com/vzome/core/editor/api/ChangeSelection.ts 2161var ChangeSelection = class _ChangeSelection extends SideEffects { 2162 static logger_$LI$() { 2163 if (_ChangeSelection.logger == null) { 2164 _ChangeSelection.logger = java.util.logging.Logger.getLogger("com.vzome.core.editor.ChangeSelection"); 2165 } 2166 return _ChangeSelection.logger; 2167 } 2168 constructor(selection) { 2169 super(); 2170 if (this.mSelection === void 0) { 2171 this.mSelection = null; 2172 } 2173 if (this.groupingDoneInSelection === void 0) { 2174 this.groupingDoneInSelection = false; 2175 } 2176 this.orderedSelection = false; 2177 this.selectionEffects = null; 2178 this.mSelection = selection; 2179 this.groupingDoneInSelection = false; 2180 } 2181 setOrderedSelection(orderedSelection) { 2182 this.orderedSelection = orderedSelection; 2183 } 2184 /** 2185 * 2186 */ 2187 undo() { 2188 if (this.orderedSelection) { 2189 const stack = new java.util.ArrayDeque(); 2190 this.selectionEffects = stack; 2191 super.undo(); 2192 this.selectionEffects = null; 2193 while (!stack.isEmpty()) { 2194 { 2195 const se = stack.pop(); 2196 se.undo(); 2197 } 2198 } 2199 ; 2200 } else super.undo(); 2201 } 2202 getXmlAttributes(element) { 2203 } 2204 setXmlAttributes(xml, format) { 2205 } 2206 /** 2207 * 2208 * @param {*} doc 2209 * @return {*} 2210 */ 2211 getXml(doc) { 2212 const result = doc.createElement(this.getXmlElementName()); 2213 if (this.groupingDoneInSelection) DomUtils.addAttribute(result, "grouping", "2.1.1"); 2214 this.getXmlAttributes(result); 2215 return result; 2216 } 2217 adjustSelection(man, action) { 2218 switch (action) { 2219 case 1 /* SELECT */: 2220 this.select$com_vzome_core_model_Manifestation(man); 2221 break; 2222 case 2 /* DESELECT */: 2223 this.unselect$com_vzome_core_model_Manifestation(man); 2224 break; 2225 case 0 /* IGNORE */: 2226 break; 2227 default: 2228 _ChangeSelection.logger_$LI$().warning("unexpected action: " + /* Enum.name */ 2229 ActionEnum[action]); 2230 break; 2231 } 2232 } 2233 /** 2234 * Any subclass can override to alter loading, or migrate (insert other edits), etc. 2235 * ALWAYS DO SOME INSERT, or all trace of the command will disappear! 2236 * @param {*} xml 2237 * @param {XmlSaveFormat} format 2238 * @param {*} context 2239 */ 2240 loadAndPerform(xml, format, context) { 2241 const grouping = xml.getAttribute("grouping"); 2242 if (this.groupingAware() && (format.groupingDoneInSelection() || "2.1.1" === grouping)) this.groupingDoneInSelection = true; 2243 this.setXmlAttributes(xml, format); 2244 context.performAndRecord(this); 2245 } 2246 groupingAware() { 2247 return false; 2248 } 2249 unselect$com_vzome_core_model_Manifestation(man) { 2250 this.unselect$com_vzome_core_model_Manifestation$boolean(man, false); 2251 } 2252 unselect$com_vzome_core_model_Manifestation$boolean(man, ignoreGroups) { 2253 if (this.groupingDoneInSelection) { 2254 this.plan(new _ChangeSelection.SelectManifestation(this, man, false)); 2255 return; 2256 } 2257 if (man == null) { 2258 SideEffects.logBugAccommodation("null manifestation"); 2259 return; 2260 } 2261 if (!this.mSelection.manifestationSelected(man)) return; 2262 const group = ignoreGroups ? null : Selection.biggestGroup(man); 2263 if (group == null) this.plan(new _ChangeSelection.SelectManifestation(this, man, false)); 2264 else this.unselectGroup(group); 2265 } 2266 unselect(man, ignoreGroups) { 2267 if ((man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Manifestation") >= 0) || man === null) && (typeof ignoreGroups === "boolean" || ignoreGroups === null)) { 2268 return this.unselect$com_vzome_core_model_Manifestation$boolean(man, ignoreGroups); 2269 } else if ((man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Manifestation") >= 0) || man === null) && ignoreGroups === void 0) { 2270 return this.unselect$com_vzome_core_model_Manifestation(man); 2271 } else throw new Error("invalid overload"); 2272 } 2273 select$com_vzome_core_model_Manifestation(man) { 2274 this.select$com_vzome_core_model_Manifestation$boolean(man, false); 2275 } 2276 recordSelected(man) { 2277 if (!this.mSelection.manifestationSelected(man)) return; 2278 this.plan(new _ChangeSelection.RecordSelectedManifestation(this, man)); 2279 } 2280 select$com_vzome_core_model_Manifestation$boolean(man, ignoreGroups) { 2281 if (this.groupingDoneInSelection) { 2282 this.plan(new _ChangeSelection.SelectManifestation(this, man, true)); 2283 return; 2284 } 2285 if (man == null) { 2286 SideEffects.logBugAccommodation("null manifestation"); 2287 return; 2288 } 2289 if (this.mSelection.manifestationSelected(man)) return; 2290 const group = ignoreGroups ? null : Selection.biggestGroup(man); 2291 if (group == null) this.plan(new _ChangeSelection.SelectManifestation(this, man, true)); 2292 else this.selectGroup(group); 2293 } 2294 select(man, ignoreGroups) { 2295 if ((man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Manifestation") >= 0) || man === null) && (typeof ignoreGroups === "boolean" || ignoreGroups === null)) { 2296 return this.select$com_vzome_core_model_Manifestation$boolean(man, ignoreGroups); 2297 } else if ((man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Manifestation") >= 0) || man === null) && ignoreGroups === void 0) { 2298 return this.select$com_vzome_core_model_Manifestation(man); 2299 } else throw new Error("invalid overload"); 2300 } 2301 selectGroup(group) { 2302 for (let index = group.iterator(); index.hasNext(); ) { 2303 let next = index.next(); 2304 { 2305 if (next != null && next instanceof Group) this.selectGroup(next); 2306 else this.plan(new _ChangeSelection.SelectManifestation(this, next, true)); 2307 } 2308 } 2309 } 2310 unselectGroup(group) { 2311 for (let index = group.iterator(); index.hasNext(); ) { 2312 let next = index.next(); 2313 { 2314 if (next != null && next instanceof Group) this.unselectGroup(next); 2315 else this.plan(new _ChangeSelection.SelectManifestation(this, next, false)); 2316 } 2317 } 2318 } 2319 getSelectedConnectors() { 2320 return Manifestations.getConnectors$java_lang_Iterable(this.mSelection); 2321 } 2322 getSelectedStruts() { 2323 return Manifestations.getStruts$java_lang_Iterable(this.mSelection); 2324 } 2325 getSelectedPanels() { 2326 return Manifestations.getPanels$java_lang_Iterable(this.mSelection); 2327 } 2328 getLastSelectedManifestation() { 2329 let last = null; 2330 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 2331 let man = index.next(); 2332 { 2333 last = man; 2334 } 2335 } 2336 return last; 2337 } 2338 getLastSelectedConnector() { 2339 let last = null;
2340 for (let index = this.getSelectedConnectors().iterator(); index.hasNext(); ) { 2341 let connector = index.next(); 2342 { 2343 last = connector; 2344 } 2345 } 2346 return last; 2347 } 2348 getLastSelectedStrut() { 2349 let last = null; 2350 for (let index = this.getSelectedStruts().iterator(); index.hasNext(); ) { 2351 let strut = index.next(); 2352 { 2353 last = strut; 2354 } 2355 } 2356 return last; 2357 } 2358 getLastSelectedPanel() { 2359 let last = null; 2360 for (let index = this.getSelectedPanels().iterator(); index.hasNext(); ) { 2361 let panel = index.next(); 2362 { 2363 last = panel; 2364 } 2365 } 2366 return last; 2367 } 2368 unselectAll() { 2369 let anySelected = false; 2370 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 2371 let man = index.next(); 2372 { 2373 anySelected = true; 2374 this.unselect$com_vzome_core_model_Manifestation(man); 2375 } 2376 } 2377 if (anySelected) { 2378 this.redo(); 2379 } 2380 return anySelected; 2381 } 2382 unselectConnectors() { 2383 let anySelected = false; 2384 for (let index = this.getSelectedConnectors().iterator(); index.hasNext(); ) { 2385 let connector = index.next(); 2386 { 2387 anySelected = true; 2388 this.unselect$com_vzome_core_model_Manifestation(connector); 2389 } 2390 } 2391 if (anySelected) { 2392 this.redo(); 2393 } 2394 return anySelected; 2395 } 2396 unselectStruts() { 2397 let anySelected = false; 2398 for (let index = this.getSelectedStruts().iterator(); index.hasNext(); ) { 2399 let strut = index.next(); 2400 { 2401 anySelected = true; 2402 this.unselect$com_vzome_core_model_Manifestation(strut); 2403 } 2404 } 2405 if (anySelected) { 2406 this.redo(); 2407 } 2408 return anySelected; 2409 } 2410 unselectPanels() { 2411 let anySelected = false; 2412 for (let index = this.getSelectedPanels().iterator(); index.hasNext(); ) { 2413 let panel = index.next(); 2414 { 2415 anySelected = true; 2416 this.unselect$com_vzome_core_model_Manifestation(panel); 2417 } 2418 } 2419 if (anySelected) { 2420 this.redo(); 2421 } 2422 return anySelected; 2423 } 2424}; 2425ChangeSelection["__class"] = "com.vzome.core.editor.api.ChangeSelection"; 2426((ChangeSelection2) => { 2427 class SelectManifestation2 { 2428 constructor(__parent, man, value) { 2429 this.__parent = __parent; 2430 if (this.mMan === void 0) { 2431 this.mMan = null; 2432 } 2433 if (this.mOn === void 0) { 2434 this.mOn = false; 2435 } 2436 this.mMan = man; 2437 this.mOn = value; 2438 ChangeSelection2.logger_$LI$().finest("constructing SelectManifestation"); 2439 } 2440 /** 2441 * 2442 */ 2443 redo() { 2444 if (this.__parent.groupingDoneInSelection) { 2445 if (this.mOn) this.__parent.mSelection.selectWithGrouping(this.mMan); 2446 else this.__parent.mSelection.unselectWithGrouping(this.mMan); 2447 } else if (this.mOn) this.__parent.mSelection.select(this.mMan); 2448 else this.__parent.mSelection.unselect(this.mMan); 2449 } 2450 /** 2451 * 2452 */ 2453 undo() { 2454 if (this.__parent.groupingDoneInSelection) { 2455 if (this.mOn) this.__parent.mSelection.unselectWithGrouping(this.mMan); 2456 else this.__parent.mSelection.selectWithGrouping(this.mMan); 2457 } else if (this.mOn) this.__parent.mSelection.unselect(this.mMan); 2458 else if (this.__parent.selectionEffects != null) { 2459 this.__parent.selectionEffects.push(this); 2460 } else this.__parent.mSelection.select(this.mMan); 2461 } 2462 /** 2463 * 2464 * @param {*} doc 2465 * @return {*} 2466 */ 2467 getXml(doc) { 2468 const result = this.mOn ? doc.createElement("select") : doc.createElement("deselect"); 2469 if (this.mMan != null) { 2470 const man = this.mMan.getXml(doc); 2471 result.appendChild(man); 2472 } 2473 return result; 2474 } 2475 } 2476 ChangeSelection2.SelectManifestation = SelectManifestation2; 2477 SelectManifestation2["__class"] = "com.vzome.core.editor.api.ChangeSelection.SelectManifestation"; 2478 SelectManifestation2["__interfaces"] = ["com.vzome.core.editor.api.SideEffect"]; 2479 class RecordSelectedManifestation { 2480 constructor(__parent, man) { 2481 this.__parent = __parent; 2482 if (this.mMan === void 0) { 2483 this.mMan = null; 2484 } 2485 this.mMan = man; 2486 ChangeSelection2.logger_$LI$().finest("constructing RecordSelectedManifestation"); 2487 } 2488 /** 2489 * 2490 */ 2491 redo() { 2492 ChangeSelection2.logger_$LI$().finest("redoing RecordSelectedManifestation"); 2493 } 2494 /** 2495 * 2496 */ 2497 undo() { 2498 ChangeSelection2.logger_$LI$().finest("undoing RecordSelectedManifestation"); 2499 if (this.__parent.selectionEffects == null) this.__parent.mSelection.select(this.mMan); 2500 else this.__parent.selectionEffects.push(this); 2501 } 2502 /** 2503 * 2504 * @param {*} doc 2505 * @return {*} 2506 */ 2507 getXml(doc) { 2508 return doc.createElement("recordSelected"); 2509 } 2510 } 2511 ChangeSelection2.RecordSelectedManifestation = RecordSelectedManifestation; 2512 RecordSelectedManifestation["__class"] = "com.vzome.core.editor.api.ChangeSelection.RecordSelectedManifestation"; 2513 RecordSelectedManifestation["__interfaces"] = ["com.vzome.core.editor.api.SideEffect"]; 2514})(ChangeSelection || (ChangeSelection = {})); 2515
2516// src/worker/legacy/from-java/com/vzome/core/editor/api/ChangeManifestations.ts 2517var ChangeManifestations = class _ChangeManifestations extends ChangeSelection { 2518 constructor(editorModel) { 2519 super(editorModel.getSelection()); 2520 if (this.mManifestations === void 0) { 2521 this.mManifestations = null; 2522 } 2523 this.mManifestations = editorModel.getRealizedModel(); 2524 this.mManifestations.clearPerEditManifestations(); 2525 } 2526 /** 2527 * 2528 */ 2529 redo() { 2530 this.mManifestations.clearPerEditManifestations(); 2531 super.redo(); 2532 } 2533 /** 2534 * 2535 */ 2536 undo() { 2537 this.mManifestations.clearPerEditManifestations(); 2538 super.undo(); 2539 } 2540 getManifestation(c) { 2541 return this.mManifestations.getManifestation(c); 2542 } 2543 manifestConstruction(c) { 2544 const sig = c.getSignature(); 2545 const m = this.mManifestations.findConstruction(c); 2546 if (m == null) return null; 2547 const made = this.mManifestations.findPerEditManifestation(sig); 2548 if (made != null) return made; 2549 if (m.isUnnecessary()) { 2550 this.mManifestations.addPerEditManifestation(sig, m); 2551 this.plan(new _ChangeManifestations.ManifestConstruction(this, c, m, true)); 2552 } else { 2553 if (!m.isRendered()) this.plan(new _ChangeManifestations.RenderManifestation(this, m, true)); 2554 } 2555 return m; 2556 } 2557 unmanifestConstruction(c) { 2558 const m = this.mManifestations.removeConstruction(c); 2559 if (m == null) return null; 2560 this.plan(new _ChangeManifestations.ManifestConstruction(this, c, m, false)); 2561 return m; 2562 } 2563 deleteManifestation(man) { 2564 this.plan(new _ChangeManifestations.DeleteManifestation(this, man)); 2565 } 2566 showManifestation(m) { 2567 this.plan(new _ChangeManifestations.RenderManifestation(this, m, true)); 2568 } 2569 hideManifestation(m) { 2570 this.plan(new _ChangeManifestations.RenderManifestation(this, m, false)); 2571 } 2572 colorManifestation(m, color) { 2573 this.plan(new _ChangeManifestations.ColorManifestation(this, m, color)); 2574 } 2575 labelManifestation(m, label) { 2576 this.plan(new _ChangeManifestations.LabelManifestation(this, m, label)); 2577 } 2578 hideConnectors() { 2579 for (let index = Manifestations.getVisibleConnectors(this.mManifestations).iterator(); index.hasNext(); ) { 2580 let connector = index.next(); 2581 this.hideManifestation(connector); 2582 } 2583 } 2584 showConnectors() { 2585 for (let index = Manifestations.getHiddenConnectors(this.mManifestations).iterator(); index.hasNext(); ) { 2586 let connector = index.next(); 2587 this.showManifestation(connector); 2588 } 2589 } 2590 hideStruts() { 2591 for (let index = Manifestations.getVisibleStruts(this.mManifestations).iterator(); index.hasNext(); ) { 2592 let strut = index.next(); 2593 this.hideManifestation(strut); 2594 } 2595 } 2596 showStruts() { 2597 for (let index = Manifestations.getHiddenStruts(this.mManifestations).iterator(); index.hasNext(); ) { 2598 let strut = index.next(); 2599 this.showManifestation(strut); 2600 } 2601 } 2602 hidePanels() { 2603 for (let index = Manifestations.getVisiblePanels(this.mManifestations).iterator(); index.hasNext(); ) { 2604 let panel = index.next(); 2605 this.hideManifestation(panel); 2606 } 2607 } 2608 showPanels() { 2609 for (let index = Manifestations.getHiddenPanels(this.mManifestations).iterator(); index.hasNext(); ) { 2610 let panel = index.next(); 2611 this.showManifestation(panel); 2612 } 2613 } 2614 showsManifestation(man) { 2615 for (const iterator = this.getEffects(); iterator.hasNext(); ) { 2616 { 2617 const effect = iterator.next(); 2618 if (effect != null && effect instanceof _ChangeManifestations.ManifestConstruction) { 2619 const show = effect; 2620 if (show.showsManifestation(man)) return true; 2621 } else if (effect != null && effect instanceof _ChangeManifestations.RenderManifestation) { 2622 const show = effect; 2623 if (show.showsManifestation(man)) return true; 2624 } 2625 } 2626 ; 2627 } 2628 return false; 2629 } 2630 getRenderedSelection() { 2631 return Manifestations.visibleManifestations$java_lang_Iterable$java_util_function_Predicate(this.mSelection, (man) => { 2632 return Manifestations.Filters.isRendered(man); 2633 }); 2634 } 2635 getConnectors() { 2636 return Manifestations.getConnectors$java_lang_Iterable(this.mManifestations); 2637 } 2638 getStruts() { 2639 return Manifestations.getStruts$java_lang_Iterable(this.mManifestations); 2640 } 2641 getPanels() { 2642 return Manifestations.getPanels$java_lang_Iterable(this.mManifestations); 2643 } 2644 getVisibleConnectors$() { 2645 return Manifestations.getVisibleConnectors(this.mManifestations); 2646 } 2647 getVisibleStruts$() { 2648 return Manifestations.getVisibleStruts(this.mManifestations); 2649 } 2650 getVisiblePanels$() { 2651 return Manifestations.getVisiblePanels(this.mManifestations); 2652 } 2653 getVisibleConnectors$java_util_function_Predicate(postFilter) { 2654 return Manifestations.getVisibleConnectors(this.mManifestations, ((funcInst) => { 2655 if (funcInst == null || typeof funcInst == "function") { 2656 return funcInst; 2657 } 2658 return (arg0) => (funcInst["test"] ? funcInst["test"] : funcInst).call(funcInst, arg0); 2659 })(postFilter)); 2660 } 2661 getVisibleConnectors(postFilter) { 2662 if (typeof postFilter === "function" && postFilter.length === 1 || postFilter === null) { 2663 return this.getVisibleConnectors$java_util_function_Predicate(postFilter); 2664 } else if (postFilter === void 0) { 2665 return this.getVisibleConnectors$(); 2666 } else throw new Error("invalid overload"); 2667 } 2668 getVisibleStruts$java_util_function_Predicate(postFilter) { 2669 return Manifestations.getVisibleStruts(this.mManifestations, ((funcInst) => { 2670 if (funcInst == null || typeof funcInst == "function") { 2671 return funcInst; 2672 } 2673 return (arg0) => (funcInst["test"] ? funcInst["test"] : funcInst).call(funcInst, arg0); 2674 })(postFilter)); 2675 } 2676 getVisibleStruts(postFilter) { 2677 if (typeof postFilter === "function" && postFilter.length === 1 || postFilter === null) { 2678 return this.getVisibleStruts$java_util_function_Predicate(postFilter); 2679 } else if (postFilter === void 0) { 2680 return this.getVisibleStruts$(); 2681 } else throw new Error("invalid overload"); 2682 } 2683 getVisiblePanels$java_util_function_Predicate(postFilter) { 2684 return Manifestations.getVisiblePanels(this.mManifestations, ((funcInst) => { 2685 if (funcInst == null || typeof funcInst == "function") { 2686 return funcInst; 2687 } 2688 return (arg0) => (funcInst["test"] ? funcInst["test"] : funcInst).call(funcInst, arg0); 2689 })(postFilter)); 2690 } 2691 getVisiblePanels(postFilter) { 2692 if (typeof postFilter === "function" && postFilter.length === 1 || postFilter === null) { 2693 return this.getVisiblePanels$java_util_function_Predicate(postFilter); 2694 } else if (postFilter === void 0) { 2695 return this.getVisiblePanels$(); 2696 } else throw new Error("invalid overload"); 2697 } 2698}; 2699ChangeManifestations["__class"] = "com.vzome.core.editor.api.ChangeManifestations"; 2700((ChangeManifestations2) => { 2701 class ManifestConstruction { 2702 constructor(__parent, construction, manifestation, showing) { 2703 this.__parent = __parent; 2704 if (this.mManifestation === void 0) { 2705 this.mManifestation = null; 2706 } 2707 if (this.mConstruction === void 0) { 2708 this.mConstruction = null; 2709 } 2710 if (this.mShowing === void 0) { 2711 this.mShowing = false;
2712 } 2713 this.mConstruction = construction; 2714 this.mManifestation = manifestation; 2715 this.mShowing = showing; 2716 } 2717 /** 2718 * 2719 */ 2720 redo() { 2721 if (this.mShowing) { 2722 if (this.mManifestation.isUnnecessary()) { 2723 this.mManifestation.addConstruction(this.mConstruction); 2724 this.__parent.mManifestations.add(this.mManifestation); 2725 } 2726 this.__parent.mManifestations.show(this.mManifestation); 2727 } else { 2728 this.mManifestation.removeConstruction(this.mConstruction); 2729 if (this.mManifestation.isUnnecessary()) { 2730 this.__parent.mManifestations.hide(this.mManifestation); 2731 this.__parent.mManifestations.remove(this.mManifestation); 2732 } 2733 } 2734 } 2735 /** 2736 * 2737 */ 2738 undo() { 2739 if (this.mShowing) { 2740 this.mManifestation.removeConstruction(this.mConstruction); 2741 if (this.mManifestation.isUnnecessary()) { 2742 this.__parent.mManifestations.hide(this.mManifestation); 2743 this.__parent.mManifestations.remove(this.mManifestation); 2744 } 2745 } else { 2746 if (this.mManifestation.isUnnecessary()) this.__parent.mManifestations.add(this.mManifestation); 2747 this.__parent.mManifestations.show(this.mManifestation); 2748 this.mManifestation.addConstruction(this.mConstruction); 2749 } 2750 } 2751 /** 2752 * 2753 * @param {*} doc 2754 * @return {*} 2755 */ 2756 getXml(doc) { 2757 const result = this.mShowing ? doc.createElement("mshow") : doc.createElement("mhide"); 2758 const man = this.mConstruction.getXml(doc); 2759 result.appendChild(man); 2760 return result; 2761 } 2762 showsManifestation(man) { 2763 return this.mShowing && /* equals */ 2764 ((o1, o2) => { 2765 if (o1 && o1.equals) { 2766 return o1.equals(o2); 2767 } else { 2768 return o1 === o2; 2769 } 2770 })(this.mManifestation, man); 2771 } 2772 } 2773 ChangeManifestations2.ManifestConstruction = ManifestConstruction; 2774 ManifestConstruction["__class"] = "com.vzome.core.editor.api.ChangeManifestations.ManifestConstruction"; 2775 ManifestConstruction["__interfaces"] = ["com.vzome.core.editor.api.SideEffect"]; 2776 class RenderManifestation { 2777 constructor(__parent, manifestation, showing) { 2778 this.__parent = __parent; 2779 if (this.mManifestation === void 0) { 2780 this.mManifestation = null; 2781 } 2782 if (this.mShowing === void 0) { 2783 this.mShowing = false; 2784 } 2785 this.mManifestation = manifestation; 2786 this.mShowing = showing; 2787 } 2788 /** 2789 * 2790 */ 2791 redo() { 2792 this.mManifestation.setHidden(!this.mShowing); 2793 if (this.mShowing) this.__parent.mManifestations.show(this.mManifestation); 2794 else this.__parent.mManifestations.hide(this.mManifestation); 2795 } 2796 /** 2797 * 2798 */ 2799 undo() { 2800 this.mManifestation.setHidden(this.mShowing); 2801 if (this.mShowing) this.__parent.mManifestations.hide(this.mManifestation); 2802 else this.__parent.mManifestations.show(this.mManifestation); 2803 } 2804 /** 2805 * 2806 * @param {*} doc 2807 * @return {*} 2808 */ 2809 getXml(doc) { 2810 const result = this.mShowing ? doc.createElement("show") : doc.createElement("hide"); 2811 const man = this.mManifestation.getXml(doc); 2812 result.appendChild(man); 2813 return result; 2814 } 2815 showsManifestation(man) { 2816 return this.mShowing && /* equals */ 2817 ((o1, o2) => { 2818 if (o1 && o1.equals) { 2819 return o1.equals(o2); 2820 } else { 2821 return o1 === o2; 2822 } 2823 })(this.mManifestation, man); 2824 } 2825 } 2826 ChangeManifestations2.RenderManifestation = RenderManifestation; 2827 RenderManifestation["__class"] = "com.vzome.core.editor.api.ChangeManifestations.RenderManifestation"; 2828 RenderManifestation["__interfaces"] = ["com.vzome.core.editor.api.SideEffect"]; 2829 class DeleteManifestation { 2830 constructor(__parent, manifestation) { 2831 this.__parent = __parent; 2832 if (this.mManifestation === void 0) { 2833 this.mManifestation = null; 2834 } 2835 this.mManifestation = manifestation; 2836 } 2837 /** 2838 * 2839 */ 2840 redo() { 2841 this.mManifestation.setHidden(true); 2842 this.__parent.mManifestations.hide(this.mManifestation); 2843 this.__parent.mManifestations.remove(this.mManifestation); 2844 } 2845 /** 2846 * 2847 */ 2848 undo() { 2849 this.__parent.mManifestations.add(this.mManifestation); 2850 this.__parent.mManifestations.show(this.mManifestation); 2851 this.mManifestation.setHidden(false); 2852 } 2853 /** 2854 * 2855 * @param {*} doc 2856 * @return {*} 2857 */ 2858 getXml(doc) { 2859 const result = doc.createElement("delete"); 2860 const man = this.mManifestation.getXml(doc); 2861 result.appendChild(man); 2862 return result; 2863 } 2864 } 2865 ChangeManifestations2.DeleteManifestation = DeleteManifestation; 2866 DeleteManifestation["__class"] = "com.vzome.core.editor.api.ChangeManifestations.DeleteManifestation"; 2867 DeleteManifestation["__interfaces"] = ["com.vzome.core.editor.api.SideEffect"]; 2868 class ColorManifestation { 2869 constructor(__parent, manifestation, color) { 2870 this.__parent = __parent; 2871 if (this.mManifestation === void 0) { 2872 this.mManifestation = null; 2873 } 2874 if (this.oldColor === void 0) { 2875 this.oldColor = null; 2876 } 2877 if (this.newColor === void 0) { 2878 this.newColor = null; 2879 } 2880 this.mManifestation = manifestation; 2881 this.newColor = color; 2882 this.oldColor = manifestation.getColor(); 2883 } 2884 /** 2885 * 2886 */ 2887 redo() { 2888 this.__parent.mManifestations.setColor(this.mManifestation, this.newColor); 2889 } 2890 /** 2891 * 2892 */ 2893 undo() { 2894 this.__parent.mManifestations.setColor(this.mManifestation, this.oldColor); 2895 } 2896 /** 2897 * 2898 * @param {*} doc 2899 * @return {*} 2900 */ 2901 getXml(doc) { 2902 const result = doc.createElement("color"); 2903 DomUtils.addAttribute(result, "rgb", this.newColor.toString()); 2904 const man = this.mManifestation.getXml(doc); 2905 result.appendChild(man); 2906 return result; 2907 } 2908 } 2909 ChangeManifestations2.ColorManifestation = ColorManifestation; 2910 ColorManifestation["__class"] = "com.vzome.core.editor.api.ChangeManifestations.ColorManifestation"; 2911 ColorManifestation["__interfaces"] = ["com.vzome.core.editor.api.SideEffect"]; 2912 class LabelManifestation { 2913 constructor(__parent, m, label) { 2914 this.__parent = __parent; 2915 if (this.mManifestation === void 0) { 2916 this.mManifestation = null; 2917 } 2918 if (this.oldLabel === void 0) { 2919 this.oldLabel = null; 2920 } 2921 if (this.newLabel === void 0) { 2922 this.newLabel = null; 2923 } 2924 this.mManifestation = m; 2925 this.newLabel = label; 2926 this.oldLabel = m.getLabel(); 2927 } 2928 /** 2929 * 2930 */ 2931 undo() { 2932 this.__parent.mManifestations.setLabel(this.mManifestation, this.oldLabel); 2933 } 2934 /** 2935 * 2936 * @param {*} doc 2937 * @return {*} 2938 */ 2939 getXml(doc) { 2940 const result = doc.createElement("label"); 2941 DomUtils.addAttribute(result, "text", this.newLabel); 2942 const man = this.mManifestation.getXml(doc); 2943 result.appendChild(man); 2944 return result; 2945 } 2946 /** 2947 * 2948 */ 2949 redo() { 2950 this.__parent.mManifestations.setLabel(this.mManifestation, this.newLabel); 2951 } 2952 } 2953 ChangeManifestations2.LabelManifestation = LabelManifestation; 2954 LabelManifestation["__class"] = "com.vzome.core.editor.api.ChangeManifestations.LabelManifestation"; 2955 LabelManifestation["__interfaces"] = ["com.vzome.core.editor.api.SideEffect"]; 2956})(ChangeManifestations || (ChangeManifestations = {})); 2957
2958// src/worker/legacy/from-java/com/vzome/core/editor/Tool.ts 2959var Tool = class extends ChangeManifestations { 2960 constructor(id, tools) { 2961 super(tools.getEditorModel()); 2962 if (this.id === void 0) { 2963 this.id = null; 2964 } 2965 if (this.tools === void 0) { 2966 this.tools = null; 2967 } 2968 this.parameters = new java.util.ArrayList(); 2969 if (this.category === void 0) { 2970 this.category = null; 2971 } 2972 if (this.predefined === void 0) { 2973 this.predefined = false; 2974 } 2975 if (this.hidden === void 0) { 2976 this.hidden = false; 2977 } 2978 if (this.label === void 0) { 2979 this.label = null; 2980 } 2981 if (this.selectInputs === void 0) { 2982 this.selectInputs = false; 2983 } 2984 if (this.deleteInputs === void 0) { 2985 this.deleteInputs = false; 2986 } 2987 if (this.copyColors === void 0) { 2988 this.copyColors = false; 2989 } 2990 this.order = -1; 2991 this.pcs = new PropertyChangeSupport(this); 2992 this.tools = tools; 2993 this.id = id; 2994 this.selectInputs = true; 2995 this.deleteInputs = false; 2996 this.copyColors = true; 2997 } 2998 isSelectInputs() { 2999 return this.selectInputs; 3000 } 3001 isDeleteInputs() { 3002 return this.deleteInputs; 3003 } 3004 isCopyColors() { 3005 return this.copyColors; 3006 } 3007 setInputBehaviors(selectInputs, deleteInputs) { 3008 this.selectInputs = selectInputs; 3009 this.deleteInputs = deleteInputs; 3010 } 3011 setCopyColors(value) { 3012 this.copyColors = value; 3013 } 3014 addPropertyChangeListener(listener) { 3015 this.pcs.addPropertyChangeListener$java_beans_PropertyChangeListener(listener); 3016 } 3017 setCategory(category) { 3018 this.category = category; 3019 } 3020 addParameter(c) { 3021 this.parameters.add(c); 3022 } 3023 getParameters() { 3024 return this.parameters; 3025 } 3026 setPredefined(value) { 3027 this.predefined = value; 3028 } 3029 /** 3030 * 3031 * @return {boolean} 3032 */ 3033 isNoOp() { 3034 return false; 3035 } 3036 /** 3037 * 3038 * @return {boolean} 3039 */ 3040 isSticky() { 3041 return true; 3042 } 3043 /** 3044 * 3045 */ 3046 redo() { 3047 } 3048 /** 3049 * 3050 */ 3051 undo() { 3052 } 3053 /** 3054 * 3055 */ 3056 perform() { 3057 const error = this.checkSelection(true); 3058 if (error != null) throw new Command.Failure(error); 3059 this.tools.put(this.getId(), this); 3060 } 3061 /** 3062 * 3063 * @param {*} element 3064 */ 3065 getXmlAttributes(element) { 3066 element.setAttribute("name", this.id); 3067 } 3068 /** 3069 * 3070 * @return {string} 3071 */ 3072 getId() { 3073 return this.id; 3074 } 3075 /** 3076 * 3077 * @return {string} 3078 */ 3079 getCategory() { 3080 return this.category; 3081 } 3082 /** 3083 * 3084 * @param {boolean} selectInputs 3085 * @param {boolean} deleteInputs 3086 * @param {boolean} createOutputs 3087 * @param {boolean} selectOutputs 3088 * @param {boolean} copyColors 3089 */ 3090 apply(selectInputs, deleteInputs, createOutputs, selectOutputs, copyColors) { 3091 this.tools.applyTool(this, selectInputs, deleteInputs, createOutputs, selectOutputs, copyColors); 3092 } 3093 /** 3094 * 3095 */ 3096 selectParameters() { 3097 this.tools.selectToolParameters(this); 3098 } 3099 /** 3100 * 3101 * @return {boolean} 3102 */ 3103 isPredefined() { 3104 return this.predefined; 3105 } 3106 /** 3107 * 3108 * @return {string} 3109 */ 3110 getLabel() { 3111 return this.label; 3112 } 3113 /** 3114 * 3115 * @param {string} label 3116 */ 3117 setLabel(label) { 3118 this.label = label; 3119 } 3120 /** 3121 * 3122 * @return {boolean} 3123 */ 3124 isHidden() { 3125 return this.hidden; 3126 } 3127 /** 3128 * 3129 * @param {boolean} hidden 3130 */ 3131 setHidden(hidden) { 3132 const wasHidden = this.hidden; 3133 this.hidden = hidden; 3134 if (hidden === wasHidden) return; 3135 if (hidden) this.tools.hideTool(this); 3136 else this.tools.unhideTool(this); 3137 } 3138 /** 3139 * 3140 * @return {number} 3141 */ 3142 getOrder() { 3143 return this.order; 3144 } 3145 /** 3146 * 3147 * @param {number} order 3148 */ 3149 setOrder(order) { 3150 this.order = order; 3151 } 3152}; 3153Tool["__class"] = "com.vzome.core.editor.Tool"; 3154Tool["__interfaces"] = ["com.vzome.api.Tool"]; 3155
3156// src/worker/legacy/from-java/com/vzome/core/tools/BookmarkTool.ts 3157var BookmarkTool = class _BookmarkTool extends Tool { 3158 static { 3159 this.ID = "bookmark"; 3160 } 3161 static { 3162 this.LABEL = "Create a selection bookmark"; 3163 } 3164 static { 3165 this.TOOLTIP = "<p>A selection bookmark lets you re-create<br>any selection at a later time.</p>"; 3166 } 3167 constructor(id, tools) { 3168 super(id, tools); 3169 this.bookmarkedConstructions = new java.util.ArrayList(); 3170 } 3171 /** 3172 * 3173 * @return {boolean} 3174 */ 3175 isSticky() { 3176 return true; 3177 } 3178 /** 3179 * 3180 */ 3181 perform() { 3182 const duper = new Duplicator(null, null); 3183 if (this.mSelection.size() === 0) this.bookmarkedConstructions.add(new FreePoint(this.mManifestations.getField().origin(3))); 3184 else for (let index = this.mSelection.iterator(); index.hasNext(); ) { 3185 let man = index.next(); 3186 { 3187 const result = duper.duplicateConstruction(man); 3188 this.bookmarkedConstructions.add(result); 3189 this.addParameter(result); 3190 } 3191 } 3192 super.perform(); 3193 } 3194 /** 3195 * 3196 * @return {boolean} 3197 */ 3198 needsInput() { 3199 return false; 3200 } 3201 /** 3202 * 3203 * @param {ChangeManifestations} edit 3204 */ 3205 prepare(edit) { 3206 if (this.bookmarkedConstructions.isEmpty()) { 3207 edit.manifestConstruction(new FreePoint(this.mManifestations.getField().origin(3))); 3208 } else for (let index = this.bookmarkedConstructions.iterator(); index.hasNext(); ) { 3209 let con = index.next(); 3210 { 3211 edit.manifestConstruction(con); 3212 } 3213 } 3214 edit.redo(); 3215 } 3216 /** 3217 * 3218 * @param {ChangeManifestations} applyTool 3219 */ 3220 complete(applyTool) { 3221 } 3222 /** 3223 * 3224 * @param {Construction} c 3225 * @param {ChangeManifestations} applyTool 3226 */ 3227 performEdit(c, applyTool) { 3228 } 3229 /** 3230 * 3231 * @param {*} man 3232 * @param {ChangeManifestations} applyTool 3233 */ 3234 performSelect(man, applyTool) { 3235 } 3236 /** 3237 * 3238 */ 3239 redo() { 3240 } 3241 /** 3242 * 3243 */ 3244 undo() { 3245 } 3246 /** 3247 * 3248 * @return {string} 3249 */ 3250 getXmlElementName() { 3251 return "BookmarkTool"; 3252 } 3253 /** 3254 * 3255 * @return {string} 3256 */ 3257 getCategory() { 3258 return _BookmarkTool.ID; 3259 } 3260 /** 3261 * 3262 * @param {boolean} prepareTool 3263 * @return {string} 3264 */ 3265 checkSelection(prepareTool) { 3266 return null; 3267 } 3268}; 3269BookmarkTool["__class"] = "com.vzome.core.tools.BookmarkTool"; 3270BookmarkTool["__interfaces"] = ["com.vzome.api.Tool"]; 3271
3272// src/worker/legacy/from-java/com/vzome/core/tools/BookmarkToolFactory.ts 3273var BookmarkToolFactory = class extends AbstractToolFactory { 3274 constructor(tools) { 3275 super(tools, null, BookmarkTool.ID, BookmarkTool.LABEL, BookmarkTool.TOOLTIP); 3276 } 3277 /** 3278 * 3279 * @param {number} total 3280 * @param {number} balls 3281 * @param {number} struts 3282 * @param {number} panels 3283 * @return {boolean} 3284 */ 3285 countsAreValid(total, balls, struts, panels) { 3286 return total > 0; 3287 } 3288 /** 3289 * 3290 * @param {string} id 3291 * @return {Tool} 3292 */ 3293 createToolInternal(id) { 3294 return new BookmarkTool(id, this.getToolsModel()); 3295 } 3296 /** 3297 * 3298 * @param {*} selection 3299 * @return {boolean} 3300 */ 3301 bindParameters(selection) { 3302 return true; 3303 } 3304}; 3305BookmarkToolFactory["__class"] = "com.vzome.core.tools.BookmarkToolFactory"; 3306BookmarkToolFactory["__interfaces"] = ["com.vzome.core.editor.SelectionSummary.Listener", "com.vzome.api.Tool.Factory"]; 3307
3308// src/worker/legacy/from-java/com/vzome/core/render/Colors.ts 3309var Colors = class _Colors { 3310 constructor(props) { 3311 this.mColors = new java.util.TreeMap(); 3312 this.mListeners = new java.util.ArrayList(); 3313 if (this.properties === void 0) { 3314 this.properties = null; 3315 } 3316 this.mNextNewColor = 3221; 3317 this.STEP = 73; 3318 this.properties = props; 3319 } 3320 static { 3321 this.RGB_CUSTOM = "rgb.custom"; 3322 } 3323 static { 3324 this.RGB_ORBIT = "rgb.orbit"; 3325 } 3326 static { 3327 this.PREFIX = ""; 3328 } 3329 static BACKGROUND_$LI$() { 3330 if (_Colors.BACKGROUND == null) { 3331 _Colors.BACKGROUND = _Colors.PREFIX + "background"; 3332 } 3333 return _Colors.BACKGROUND; 3334 } 3335 static PANEL_$LI$() { 3336 if (_Colors.PANEL == null) { 3337 _Colors.PANEL = _Colors.PREFIX + "panel"; 3338 } 3339 return _Colors.PANEL; 3340 } 3341 static HIGHLIGHT_$LI$() { 3342 if (_Colors.HIGHLIGHT == null) { 3343 _Colors.HIGHLIGHT = _Colors.PREFIX + "highlight"; 3344 } 3345 return _Colors.HIGHLIGHT; 3346 } 3347 static HIGHLIGHT_MAC_$LI$() { 3348 if (_Colors.HIGHLIGHT_MAC == null) { 3349 _Colors.HIGHLIGHT_MAC = _Colors.HIGHLIGHT_$LI$() + ".mac"; 3350 } 3351 return _Colors.HIGHLIGHT_MAC; 3352 } 3353 static CONNECTOR_$LI$() { 3354 if (_Colors.CONNECTOR == null) { 3355 _Colors.CONNECTOR = _Colors.PREFIX + "connector"; 3356 } 3357 return _Colors.CONNECTOR; 3358 } 3359 static DIRECTION_$LI$() { 3360 if (_Colors.DIRECTION == null) { 3361 _Colors.DIRECTION = _Colors.PREFIX + "direction."; 3362 } 3363 return _Colors.DIRECTION; 3364 } 3365 static PLANE_$LI$() { 3366 if (_Colors.PLANE == null) { 3367 _Colors.PLANE = _Colors.DIRECTION_$LI$() + "plane."; 3368 } 3369 return _Colors.PLANE; 3370 } 3371 addColor(name, color) { 3372 this.mColors.put(name, color); 3373 for (let index = this.mListeners.iterator(); index.hasNext(); ) { 3374 let next = index.next(); 3375 { 3376 next.colorAdded(name, color); 3377 } 3378 } 3379 } 3380 setColor(name, color) { 3381 this.mColors.put(name, color); 3382 for (let index = this.mListeners.iterator(); index.hasNext(); ) { 3383 let next = index.next(); 3384 { 3385 next.colorChanged(name, color); 3386 } 3387 } 3388 } 3389 addListener(changes) { 3390 this.mListeners.add(changes); 3391 } 3392 removeListener(changes) { 3393 this.mListeners.remove(changes); 3394 } 3395 static NO_VECTOR_$LI$() { 3396 if (_Colors.NO_VECTOR == null) { 3397 _Colors.NO_VECTOR = [0, 0, 0]; 3398 } 3399 return _Colors.NO_VECTOR; 3400 } 3401 getVectorPref(name) { 3402 let result = _Colors.NO_VECTOR_$LI$(); 3403 const pref = this.properties.getProperty(name); 3404 if (pref == null || pref === "") return result; 3405 result = /* clone */ 3406 ((o) => { 3407 if (o.clone != void 0) { 3408 return o.clone(); 3409 } else { 3410 let clone = Object.create(o); 3411 for (let p in o) { 3412 if (o.hasOwnProperty(p)) clone[p] = o[p]; 3413 } 3414 return clone; 3415 } 3416 })(result); 3417 const tokens = new java.util.StringTokenizer(pref, ", "); 3418 let i = 0; 3419 while (tokens.hasMoreTokens()) { 3420 result[i++] = javaemul.internal.FloatHelper.parseFloat(tokens.nextToken()); 3421 } 3422 ; 3423 return result; 3424 } 3425 getColorPref(name) { 3426 const percents = this.getVectorPref("color.percent." + name); 3427 if (percents !== _Colors.NO_VECTOR_$LI$()) { 3428 return new Color(Math.round(Math.fround(Math.fround(percents[0] * 255) / 100)), Math.round(Math.fround(Math.fround(percents[1] * 255) / 100)), Math.round(Math.fround(Math.fround(percents[2] * 255) / 100))); 3429 } 3430 const pref = this.properties.getProperty("color." + name); 3431 return _Colors.parseColor(pref); 3432 } 3433 static parseColor(colorString) { 3434 if (colorString == null || colorString === "") return Color.WHITE_$LI$(); 3435 const tokens = new java.util.StringTokenizer(colorString, ", "); 3436 const rgb = [0, 0, 0]; 3437 let i = 0; 3438 while (tokens.hasMoreTokens()) { 3439 rgb[i++] = javaemul.internal.IntegerHelper.parseInt(tokens.nextToken()); 3440 } 3441 ; 3442 return new Color(rgb[0], rgb[1], rgb[2]); 3443 } 3444 static getColorName(color) { 3445 return _Colors.RGB_ORBIT + " " + color.getRed() + " " + color.getGreen() + " " + color.getBlue(); 3446 } 3447 getColor(name) { 3448 let color = this.mColors.get(name); 3449 if (color == null) { 3450 if ( 3451 /* startsWith */ 3452 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(name, _Colors.DIRECTION_$LI$()) 3453 ) { 3454 const prefName = name.substring(_Colors.DIRECTION_$LI$().length); 3455 color = this.getColorPref(prefName); 3456 } else if ( 3457 /* startsWith */ 3458 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(name, _Colors.PLANE_$LI$()) 3459 ) { 3460 const prefName = name.substring(_Colors.PLANE_$LI$().length); 3461 color = this.getColorPref(prefName); 3462 color = color.getPastel(); 3463 } else if ( 3464 /* startsWith */ 3465 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(name, _Colors.RGB_ORBIT) || /* startsWith */ 3466 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(name, _Colors.RGB_CUSTOM) 3467 ) { 3468 const tokens = new java.util.StringTokenizer(name); 3469 tokens.nextToken(); 3470 const r = javaemul.internal.IntegerHelper.parseInt(tokens.nextToken()); 3471 const g = javaemul.internal.IntegerHelper.parseInt(tokens.nextToken()); 3472 const b = javaemul.internal.IntegerHelper.parseInt(tokens.nextToken()); 3473 color = new Color(r, g, b); 3474 } else if (name === _Colors.CONNECTOR_$LI$()) color = this.getColorPref("white"); 3475 else if (name === _Colors.HIGHLIGHT_$LI$()) color = this.getColorPref("highlight"); 3476 else if (name === _Colors.HIGHLIGHT_MAC_$LI$()) color = this.getColorPref("highlight.mac"); 3477 else if (name === _Colors.PANEL_$LI$()) color = this.getColorPref("panels"); 3478 else if (name === _Colors.BACKGROUND_$LI$()) color = this.getColorPref("background"); 3479 if (color == null) { 3480 this.mNextNewColor = (this.mNextNewColor + this.STEP) % 4096; 3481 let i = this.mNextNewColor; 3482 const r = 135 + (i % 16 << 3); 3483 i = i >> 4; 3484 const g = 135 + (i % 16 << 3); 3485 i = i >> 4; 3486 const b = 135 + (i % 16 << 3); 3487 i = i >> 4; 3488 color = new Color(r, g, b); 3489 }
3490 this.addColor(name, color); 3491 } 3492 return color; 3493 } 3494 /** 3495 * 3496 * @return {*} 3497 */ 3498 iterator() { 3499 return this.mColors.keySet().iterator(); 3500 } 3501 reset() { 3502 } 3503}; 3504Colors["__class"] = "com.vzome.core.render.Colors"; 3505Colors["__interfaces"] = ["java.lang.Iterable"]; 3506
3507// src/worker/legacy/from-java/com/vzome/core/commands/AttributeMap.ts 3508var AttributeMap = class extends java.util.TreeMap { 3509 static { 3510 this.__com_vzome_core_commands_AttributeMap_serialVersionUID = 1; 3511 } 3512 constructor() { 3513 super(); 3514 } 3515}; 3516AttributeMap["__class"] = "com.vzome.core.commands.AttributeMap"; 3517AttributeMap["__interfaces"] = ["java.lang.Cloneable", "java.util.Map", "java.util.NavigableMap", "java.util.SortedMap", "java.io.Serializable"]; 3518
3519// src/worker/legacy/from-java/com/vzome/core/commands/XmlSaveFormat.ts 3520var XmlSaveFormat = class _XmlSaveFormat { 3521 static { 3522 this.CURRENT_FORMAT = "http://xml.vzome.com/vZome/4.0.0/"; 3523 } 3524 static { 3525 this.PROJECT_4D = "project-4D-to-3D"; 3526 } 3527 static { 3528 this.SELECTION_NOT_SAVED = "selection-not-saved"; 3529 } 3530 static { 3531 this.FORMAT_2_1_0 = "interim-210-format"; 3532 } 3533 static { 3534 this.GROUPING_IN_SELECTION = "grouping-in-selection"; 3535 } 3536 static { 3537 this.RATIONAL_VECTORS = "rational-vectors"; 3538 } 3539 static { 3540 this.COMPACTED_COMMAND_EDITS = "compacted-command-edits"; 3541 } 3542 static { 3543 this.MULTIPLE_DESIGNS = "multiple-designs"; 3544 } 3545 static FORMATS_$LI$() { 3546 if (_XmlSaveFormat.FORMATS == null) { 3547 _XmlSaveFormat.FORMATS = new java.util.HashMap(); 3548 } 3549 return _XmlSaveFormat.FORMATS; 3550 } 3551 static logger_$LI$() { 3552 if (_XmlSaveFormat.logger == null) { 3553 _XmlSaveFormat.logger = java.util.logging.Logger.getLogger("com.vzome.core.commands.XmlSaveFormat"); 3554 } 3555 return _XmlSaveFormat.logger; 3556 } 3557 static { 3558 this.UNKNOWN_COMMAND = "unknown.command"; 3559 } 3560 /** 3561 * Initialize. 3562 * 3563 * If you're tempted to add another parameter, see if you can make it a property instead. 3564 * 3565 * Shouldn't we just replace all the parameters with one Controller object? 3566 * 3567 * @param root 3568 * @param {*} field 3569 * @param symms 3570 * @param {number} scale 3571 * @param {string} writerVersion 3572 * @param {Properties} props 3573 */ 3574 initialize(field5, scale, writerVersion, props) { 3575 this.properties = props; 3576 this.writerVersion = writerVersion; 3577 if (writerVersion == null || /* isEmpty */ 3578 writerVersion.length === 0) this.writerVersion = "before 2.1 Beta 7"; 3579 this.mField = field5; 3580 this.mScale = scale; 3581 if (scale === 0) this.mMultiplier = null; 3582 else this.mMultiplier = field5["createPower$int"](scale); 3583 } 3584 constructor(version, capabilities) { 3585 if (this.mProject4d === void 0) { 3586 this.mProject4d = false; 3587 } 3588 if (this.mSelectionNotSaved === void 0) { 3589 this.mSelectionNotSaved = false; 3590 } 3591 if (this.mRationalVectors === void 0) { 3592 this.mRationalVectors = false; 3593 } 3594 if (this.mGroupingInSelection === void 0) { 3595 this.mGroupingInSelection = false; 3596 } 3597 if (this.mField === void 0) { 3598 this.mField = null; 3599 } 3600 if (this.mScale === void 0) { 3601 this.mScale = 0; 3602 } 3603 if (this.mMultiplier === void 0) { 3604 this.mMultiplier = null; 3605 } 3606 if (this.writerVersion === void 0) { 3607 this.writerVersion = null; 3608 } 3609 if (this.version === void 0) { 3610 this.version = null; 3611 } 3612 this.capabilities = new java.util.HashSet(); 3613 if (this.properties === void 0) { 3614 this.properties = null; 3615 } 3616 this.version = version; 3617 this.capabilities.addAll(java.util.Arrays.asList(capabilities)); 3618 this.mProject4d = this.capabilities.contains(_XmlSaveFormat.PROJECT_4D); 3619 this.mSelectionNotSaved = this.capabilities.contains(_XmlSaveFormat.SELECTION_NOT_SAVED); 3620 this.mRationalVectors = this.capabilities.contains(_XmlSaveFormat.RATIONAL_VECTORS); 3621 this.mGroupingInSelection = this.capabilities.contains(_XmlSaveFormat.GROUPING_IN_SELECTION); 3622 _XmlSaveFormat.FORMATS_$LI$().put(version, this); 3623 } 3624 getVersion() { 3625 return this.version; 3626 } 3627 isMigration() { 3628 return !this.multipleDesigns(); 3629 } 3630 selectionsNotSaved() { 3631 return this.mSelectionNotSaved; 3632 } 3633 rationalVectors() { 3634 return this.mRationalVectors; 3635 } 3636 actionHistory() { 3637 return false; 3638 } 3639 commandEditsCompacted() { 3640 return this.capabilities.contains(_XmlSaveFormat.COMPACTED_COMMAND_EDITS); 3641 } 3642 multipleDesigns() { 3643 return this.capabilities.contains(_XmlSaveFormat.MULTIPLE_DESIGNS); 3644 } 3645 groupingDoneInSelection() { 3646 return this.mGroupingInSelection && !("2.1.3" === this.writerVersion); 3647 } 3648 groupingRecursive() { 3649 return !this.groupingDoneInSelection() || "2.1.2" === this.writerVersion; 3650 } 3651 interim210format() { 3652 return this.capabilities.contains(_XmlSaveFormat.FORMAT_2_1_0); 3653 } 3654 parseAlgebraicVector(elem) { 3655 let val = elem.getAttribute("x"); 3656 const x = val == null || /* isEmpty */ 3657 val.length === 0 ? this.mField.zero() : this.mField.parseLegacyNumber(val); 3658 val = elem.getAttribute("y"); 3659 const y = val == null || /* isEmpty */ 3660 val.length === 0 ? this.mField.zero() : this.mField.parseLegacyNumber(val); 3661 val = elem.getAttribute("z"); 3662 const z = val == null || /* isEmpty */ 3663 val.length === 0 ? this.mField.zero() : this.mField.parseLegacyNumber(val); 3664 val = elem.getAttribute("w"); 3665 const threeD = val == null || /* isEmpty */ 3666 val.length === 0; 3667 let w = null; 3668 if (!threeD) w = this.mField.parseLegacyNumber(val); 3669 let value = threeD ? new AlgebraicVector(x, y, z) : new AlgebraicVector(w, x, y, z); 3670 if (this.mProject4d && !threeD) { 3671 if (!w.isZero() && _XmlSaveFormat.logger_$LI$().isLoggable(java.util.logging.Level.WARNING)) _XmlSaveFormat.logger_$LI$().warning("stripping non-zero W component from " + value.toString()); 3672 value = this.mField.projectTo3d(value, true); 3673 } 3674 if (this.mMultiplier != null) value = value.scale(this.mMultiplier); 3675 return value; 3676 } 3677 static NOT_AN_ATTRIBUTE_$LI$() { 3678 if (_XmlSaveFormat.NOT_AN_ATTRIBUTE == null) { 3679 _XmlSaveFormat.NOT_AN_ATTRIBUTE = new Object(); 3680 } 3681 return _XmlSaveFormat.NOT_AN_ATTRIBUTE; 3682 } 3683 parseAlgebraicObject(valName, val) { 3684 let value = _XmlSaveFormat.NOT_AN_ATTRIBUTE_$LI$(); 3685 if (valName === "Null") value = null; 3686 else if (valName === "RationalVector") { 3687 const nums = val.getAttribute("nums"); 3688 if (nums == null || /* isEmpty */ 3689 nums.length === 0) return this.mField.origin(3); 3690 const denoms = val.getAttribute("denoms"); 3691 let tokens = new java.util.StringTokenizer(nums); 3692 const result = [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1]; 3693 for (let i = 0; i < this.mField.getOrder(); i++) { 3694 { 3695 const token = tokens.nextToken(); 3696 if (token == null) throw new java.lang.IllegalStateException("RationalVector nums too short for field " + this.mField.getName()); 3697 result[i * 2] = javaemul.internal.IntegerHelper.parseInt(token); 3698 } 3699 ; 3700 } 3701 if (denoms != null && !/* isEmpty */ 3702 (denoms.length === 0)) { 3703 tokens = new java.util.StringTokenizer(denoms); 3704 for (let i = 0; i < this.mField.getOrder(); i++) { 3705 { 3706 const token = tokens.nextToken(); 3707 if (token == null) throw new java.lang.IllegalStateException("RationalVector denoms too short for field " + this.mField.getName()); 3708 result[i * 2 + 1] = javaemul.internal.IntegerHelper.parseInt(token); 3709 } 3710 ; 3711 } 3712 } 3713 const oneThirdLen = result.length / 3 | 0; 3714 const twoThirdLen = oneThirdLen * 2; 3715 const result3d = (function(dims) { 3716 let allocate = function(dims2) { 3717 if (dims2.length === 0) { 3718 return 0; 3719 } else { 3720 let array = []; 3721 for (let i = 0; i < dims2[0]; i++) { 3722 array.push(allocate(dims2.slice(1))); 3723 } 3724 return array; 3725 } 3726 }; 3727 return allocate(dims); 3728 })([3, oneThirdLen]); 3729 for (let i = 0; i < oneThirdLen; i++) { 3730 { 3731 result3d[0][i] = result[i]; 3732 result3d[1][i] = result[i + oneThirdLen]; 3733 result3d[2][i] = result[i + twoThirdLen]; 3734 } 3735 ; 3736 } 3737 value = this.mField.createVector(result3d); 3738 } else if (valName === "GoldenVector") value = this.parseAlgebraicVector(val); 3739 else if (valName === "Boolean") { 3740 const gnum = val.getAttribute("value"); 3741 value = javaemul.internal.BooleanHelper.parseBoolean(gnum); 3742 } else if (valName === "Integer") { 3743 const gnum = val.getAttribute("value"); 3744 value = javaemul.internal.IntegerHelper.parseInt(gnum); 3745 } else if (valName === "GoldenNumber" || valName === "IntegralNumber") { 3746 const gnum = val.getAttribute("value"); 3747 value = this.mField.parseLegacyNumber(gnum); 3748 if (this.mMultiplier != null) value = value["times$com_vzome_core_algebra_AlgebraicNumber"](this.mMultiplier); 3749 } else if (valName === "String") value = val.getTextContent(); 3750 return value; 3751 } 3752 parseConstruction$java_lang_String$org_w3c_dom_Element(apName, attrOrParam) { 3753 return this.parseConstruction$java_lang_String$org_w3c_dom_Element$boolean(apName, attrOrParam, false); 3754 } 3755 parseConstruction$java_lang_String$org_w3c_dom_Element$boolean(apName, attrOrParam, projectTo3d) {
3756 let c = null; 3757 if (apName === "point") { 3758 let loc = this.parseAlgebraicVector(attrOrParam); 3759 if (projectTo3d) loc = loc.projectTo3d(true); 3760 c = new FreePoint(loc); 3761 } else if (apName === "segment") { 3762 const start = DomUtils.getFirstChildElement$org_w3c_dom_Element$java_lang_String(attrOrParam, "start"); 3763 const end = DomUtils.getFirstChildElement$org_w3c_dom_Element$java_lang_String(attrOrParam, "end"); 3764 let sloc = this.parseAlgebraicVector(start); 3765 let eloc = this.parseAlgebraicVector(end); 3766 if (projectTo3d) { 3767 sloc = sloc.projectTo3d(true); 3768 eloc = eloc.projectTo3d(true); 3769 } 3770 c = new SegmentJoiningPoints(new FreePoint(sloc), new FreePoint(eloc)); 3771 } else if (apName === "polygon") { 3772 const kids = attrOrParam.getElementsByTagName("vertex"); 3773 const pts = ((s) => { 3774 let a = []; 3775 while (s-- > 0) a.push(null); 3776 return a; 3777 })(kids.getLength()); 3778 for (let k = 0; k < kids.getLength(); k++) { 3779 { 3780 let loc = this.parseAlgebraicVector(kids.item(k)); 3781 if (projectTo3d) loc = loc.projectTo3d(true); 3782 pts[k] = new FreePoint(loc); 3783 } 3784 ; 3785 } 3786 c = new PolygonFromVertices(pts); 3787 } 3788 return c; 3789 } 3790 /** 3791 * this is for the old format (before rationalVectors) 3792 * @param {string} apName 3793 * @param {*} attrOrParam 3794 * @param {boolean} projectTo3d 3795 * @return {Construction} 3796 */ 3797 parseConstruction(apName, attrOrParam, projectTo3d) { 3798 if ((typeof apName === "string" || apName === null) && (attrOrParam != null && (attrOrParam.constructor != null && attrOrParam.constructor["__interfaces"] != null && attrOrParam.constructor["__interfaces"].indexOf("org.w3c.dom.Element") >= 0) || attrOrParam === null) && (typeof projectTo3d === "boolean" || projectTo3d === null)) { 3799 return this.parseConstruction$java_lang_String$org_w3c_dom_Element$boolean(apName, attrOrParam, projectTo3d); 3800 } else if ((typeof apName === "string" || apName === null) && (attrOrParam != null && (attrOrParam.constructor != null && attrOrParam.constructor["__interfaces"] != null && attrOrParam.constructor["__interfaces"].indexOf("org.w3c.dom.Element") >= 0) || attrOrParam === null) && projectTo3d === void 0) { 3801 return this.parseConstruction$java_lang_String$org_w3c_dom_Element(apName, attrOrParam); 3802 } else throw new Error("invalid overload"); 3803 } 3804 loadCommandAttributes$org_w3c_dom_Element(editElem) { 3805 return this.loadCommandAttributes$org_w3c_dom_Element$boolean(editElem, false); 3806 } 3807 loadCommandAttributes$org_w3c_dom_Element$boolean(editElem, projectTo3d) { 3808 const attrs = new AttributeMap(); 3809 const kids = editElem.getChildNodes(); 3810 for (let j = 0; j < kids.getLength(); j++) { 3811 { 3812 const node = kids.item(j); 3813 if (!(node != null && (node.constructor != null && node.constructor["__interfaces"] != null && node.constructor["__interfaces"].indexOf("org.w3c.dom.Element") >= 0))) continue; 3814 let attrElem = node; 3815 let elemName = attrElem.getLocalName(); 3816 let attrName = attrElem.getAttribute("attrName"); 3817 if (this.interim210format()) { 3818 attrName = attrElem.getAttribute("name"); 3819 const elemKid = DomUtils.getFirstChildElement$org_w3c_dom_Element(attrElem); 3820 if (elemKid != null) { 3821 attrElem = elemKid; 3822 elemName = attrElem.getLocalName(); 3823 } 3824 } 3825 let value = this.parseAlgebraicObject(elemName, attrElem); 3826 if (value === _XmlSaveFormat.NOT_AN_ATTRIBUTE_$LI$()) if (this.rationalVectors()) { 3827 if (elemName === "point") value = this.parsePoint$org_w3c_dom_Element$java_lang_String$boolean(attrElem, "at", projectTo3d); 3828 else if (elemName === "segment") value = this.parseSegment$org_w3c_dom_Element$java_lang_String$java_lang_String$boolean(attrElem, "start", "end", projectTo3d); 3829 else if (elemName === "polygon") value = this.parsePolygon$org_w3c_dom_Element$java_lang_String$boolean(attrElem, "vertex", projectTo3d); 3830 else throw new java.lang.IllegalStateException("unknown parameter construction: " + elemName); 3831 } else value = this.parseConstruction$java_lang_String$org_w3c_dom_Element$boolean(elemName, attrElem, projectTo3d); 3832 attrs.put(attrName, value); 3833 } 3834 ; 3835 } 3836 return attrs; 3837 } 3838 loadCommandAttributes(editElem, projectTo3d) { 3839 if ((editElem != null && (editElem.constructor != null && editElem.constructor["__interfaces"] != null && editElem.constructor["__interfaces"].indexOf("org.w3c.dom.Element") >= 0) || editElem === null) && (typeof projectTo3d === "boolean" || projectTo3d === null)) { 3840 return this.loadCommandAttributes$org_w3c_dom_Element$boolean(editElem, projectTo3d); 3841 } else if ((editElem != null && (editElem.constructor != null && editElem.constructor["__interfaces"] != null && editElem.constructor["__interfaces"].indexOf("org.w3c.dom.Element") >= 0) || editElem === null) && projectTo3d === void 0) { 3842 return this.loadCommandAttributes$org_w3c_dom_Element(editElem); 3843 } else throw new Error("invalid overload"); 3844 } 3845 getField() { 3846 return this.mField; 3847 } 3848 getScale() { 3849 return this.mScale; 3850 } 3851 static serializeNumber(xml, attrName, number) { 3852 DomUtils.addAttribute(xml, attrName, number.toString(AlgebraicField.ZOMIC_FORMAT)); 3853 } 3854 static serializePoint(xml, attrName, point) { 3855 DomUtils.addAttribute(xml, attrName, point.getLocation().getVectorExpression$int(AlgebraicField.ZOMIC_FORMAT)); 3856 } 3857 static serializeSegment(xml, startAttrName, endAttrName, segment) { 3858 DomUtils.addAttribute(xml, startAttrName, segment.getStart().getVectorExpression$int(AlgebraicField.ZOMIC_FORMAT)); 3859 DomUtils.addAttribute(xml, endAttrName, segment.getEnd().getVectorExpression$int(AlgebraicField.ZOMIC_FORMAT)); 3860 } 3861 static serializePolygon(xml, vertexChildName, polygon) { 3862 polygon.getXml$org_w3c_dom_Element$java_lang_String(xml, vertexChildName); 3863 } 3864 parseRationalVector(xml, attrName) { 3865 const nums = xml.getAttribute(attrName); 3866 if (nums == null || /* isEmpty */ 3867 nums.length === 0) return null; 3868 const loc = this.mField.parseVector(nums); 3869 return loc; 3870 } 3871 parseRationalNumber(xml, attrName) { 3872 const nums = xml.getAttribute(attrName); 3873 if (nums == null || /* isEmpty */ 3874 nums.length === 0) return null; 3875 const loc = this.mField.parseNumber(nums); 3876 return loc; 3877 } 3878 parsePoint$org_w3c_dom_Element$java_lang_String(xml, attrName) { 3879 return this.parsePoint$org_w3c_dom_Element$java_lang_String$boolean(xml, attrName, false); 3880 } 3881 parsePoint$org_w3c_dom_Element$java_lang_String$boolean(xml, attrName, projectTo3d) { 3882 const nums = xml.getAttribute(attrName); 3883 if (nums == null || /* isEmpty */ 3884 nums.length === 0) return null; 3885 let loc = this.mField.parseVector(nums); 3886 if (projectTo3d) loc = loc.projectTo3d(true); 3887 return new FreePoint(loc); 3888 } 3889 parsePoint(xml, attrName, projectTo3d) { 3890 if ((xml != null && (xml.constructor != null && xml.constructor["__interfaces"] != null && xml.constructor["__interfaces"].indexOf("org.w3c.dom.Element") >= 0) || xml === null) && (typeof attrName === "string" || attrName === null) && (typeof projectTo3d === "boolean" || projectTo3d === null)) { 3891 return this.parsePoint$org_w3c_dom_Element$java_lang_String$boolean(xml, attrName, projectTo3d); 3892 } else if ((xml != null && (xml.constructor != null && xml.constructor["__interfaces"] != null && xml.constructor["__interfaces"].indexOf("org.w3c.dom.Element") >= 0) || xml === null) && (typeof attrName === "string" || attrName === null) && projectTo3d === void 0) { 3893 return this.parsePoint$org_w3c_dom_Element$java_lang_String(xml, attrName); 3894 } else throw new Error("invalid overload"); 3895 } 3896 parseSegment$org_w3c_dom_Element$java_lang_String$java_lang_String(xml, startAttrName, endAttrName) { 3897 return this.parseSegment$org_w3c_dom_Element$java_lang_String$java_lang_String$boolean(xml, startAttrName, endAttrName, false); 3898 } 3899 parseSegment$org_w3c_dom_Element$java_lang_String$java_lang_String$boolean(xml, startAttrName, endAttrName, projectTo3d) { 3900 let nums = xml.getAttribute(endAttrName); 3901 if (nums == null || /* isEmpty */ 3902 nums.length === 0) return null; 3903 let eloc = this.mField.parseVector(nums); 3904 nums = xml.getAttribute(startAttrName); 3905 let sloc = nums == null || /* isEmpty */ 3906 nums.length === 0 ? this.mField.origin(eloc.dimension()) : this.mField.parseVector(nums); 3907 if (projectTo3d) { 3908 sloc = sloc.projectTo3d(true); 3909 eloc = eloc.projectTo3d(true); 3910 } 3911 return new SegmentJoiningPoints(new FreePoint(sloc), new FreePoint(eloc)); 3912 } 3913 parseSegment(xml, startAttrName, endAttrName, projectTo3d) { 3914 if ((xml != null && (xml.constructor != null && xml.constructor["__interfaces"] != null && xml.constructor["__interfaces"].indexOf("org.w3c.dom.Element") >= 0) || xml === null) && (typeof startAttrName === "string" || startAttrName === null) && (typeof endAttrName === "string" || endAttrName === null) && (typeof projectTo3d === "boolean" || projectTo3d === null)) { 3915 return this.parseSegment$org_w3c_dom_Element$java_lang_String$java_lang_String$boolean(xml, startAttrName, endAttrName, projectTo3d); 3916 } else if ((xml != null && (xml.constructor != null && xml.constructor["__interfaces"] != null && xml.constructor["__interfaces"].indexOf("org.w3c.dom.Element") >= 0) || xml === null) && (typeof startAttrName === "string" || startAttrName === null) && (typeof endAttrName === "string" || endAttrName === null) && projectTo3d === void 0) { 3917 return this.parseSegment$org_w3c_dom_Element$java_lang_String$java_lang_String(xml, startAttrName, endAttrName); 3918 } else throw new Error("invalid overload"); 3919 } 3920 parsePolygon$org_w3c_dom_Element$java_lang_String(xml, vertexChildName) { 3921 return this.parsePolygon$org_w3c_dom_Element$java_lang_String$boolean(xml, vertexChildName, false); 3922 } 3923 parsePolygon$org_w3c_dom_Element$java_lang_String$boolean(xml, vertexChildName, projectTo3d) {
3924 const kids = xml.getElementsByTagName(vertexChildName); 3925 const pts = ((s) => { 3926 let a = []; 3927 while (s-- > 0) a.push(null); 3928 return a; 3929 })(kids.getLength()); 3930 for (let k = 0; k < kids.getLength(); k++) { 3931 { 3932 const nums = kids.item(k).getAttribute("at"); 3933 let loc = this.mField.parseVector(nums); 3934 if (projectTo3d) loc = loc.projectTo3d(true); 3935 pts[k] = new FreePoint(loc); 3936 } 3937 ; 3938 } 3939 return new PolygonFromVertices(pts); 3940 } 3941 parsePolygon(xml, vertexChildName, projectTo3d) { 3942 if ((xml != null && (xml.constructor != null && xml.constructor["__interfaces"] != null && xml.constructor["__interfaces"].indexOf("org.w3c.dom.Element") >= 0) || xml === null) && (typeof vertexChildName === "string" || vertexChildName === null) && (typeof projectTo3d === "boolean" || projectTo3d === null)) { 3943 return this.parsePolygon$org_w3c_dom_Element$java_lang_String$boolean(xml, vertexChildName, projectTo3d); 3944 } else if ((xml != null && (xml.constructor != null && xml.constructor["__interfaces"] != null && xml.constructor["__interfaces"].indexOf("org.w3c.dom.Element") >= 0) || xml === null) && (typeof vertexChildName === "string" || vertexChildName === null) && projectTo3d === void 0) { 3945 return this.parsePolygon$org_w3c_dom_Element$java_lang_String(xml, vertexChildName); 3946 } else throw new Error("invalid overload"); 3947 } 3948 parsePolygonReversed(xml, vertexChildName) { 3949 const kids = xml.getElementsByTagName(vertexChildName); 3950 const pts = ((s) => { 3951 let a = []; 3952 while (s-- > 0) a.push(null); 3953 return a; 3954 })(kids.getLength()); 3955 const kmax = kids.getLength() - 1; 3956 for (let k = 0; k < kids.getLength(); k++) { 3957 { 3958 const nums = kids.item(k).getAttribute("at"); 3959 const loc = this.mField.parseVector(nums); 3960 pts[kmax - k] = new FreePoint(loc); 3961 } 3962 ; 3963 } 3964 return new PolygonFromVertices(pts); 3965 } 3966 parseNumber(xml, attrName) { 3967 const nums = xml.getAttribute(attrName); 3968 if (nums == null || /* isEmpty */ 3969 nums.length === 0) return null; 3970 return this.mField.parseNumber(nums); 3971 } 3972 static escapeNewlines(input) { 3973 const buf = new java.lang.StringBuffer(); 3974 const br = new java.io.BufferedReader(new java.io.StringReader(input)); 3975 let line = null; 3976 try { 3977 while ((line = br.readLine()) != null) { 3978 { 3979 const comment = line.indexOf("//"); 3980 if (comment >= 0) { 3981 line = line.substring(0, comment); 3982 } 3983 buf.append(line + "\n"); 3984 } 3985 } 3986 ; 3987 } catch (e) { 3988 } 3989 return buf.toString(); 3990 } 3991 loadToRender() { 3992 return !("true" === this.properties.getProperty("no.rendering")); 3993 } 3994 getToolVersion(element) { 3995 let fileEdition = element.getAttribute("edition"); 3996 if (fileEdition == null || /* isEmpty */ 3997 fileEdition.length === 0) fileEdition = "vZome"; 3998 return fileEdition + " " + this.writerVersion; 3999 } 4000}; 4001XmlSaveFormat["__class"] = "com.vzome.core.commands.XmlSaveFormat"; 4002
4003// src/worker/legacy/from-java/com/vzome/core/algebra/Quaternion.ts 4004var Quaternion = class { 4005 /** 4006 * 4007 * @return {string} 4008 */ 4009 toString() { 4010 return "Quaternion: " + this.vector.toString(); 4011 } 4012 constructor(field5, vector) { 4013 if (this.representation === void 0) { 4014 this.representation = null; 4015 } 4016 if (this.transpose === void 0) { 4017 this.transpose = null; 4018 } 4019 if (this.field === void 0) { 4020 this.field = null; 4021 } 4022 if (this.vector === void 0) { 4023 this.vector = null; 4024 } 4025 this.field = field5; 4026 this.vector = vector; 4027 let w_offset = 0; 4028 let factor = field5["createRational$long"](0); 4029 if (vector.dimension() > 3) { 4030 factor = vector.getComponent(0); 4031 w_offset = 1; 4032 } 4033 this.representation = field5.identityMatrix(4).timesScalar(factor); 4034 factor = vector.getComponent(0 + w_offset); 4035 this.representation.setElement(1, 0, factor); 4036 this.representation.setElement(3, 2, factor); 4037 factor = factor.negate(); 4038 this.representation.setElement(0, 1, factor); 4039 this.representation.setElement(2, 3, factor); 4040 factor = vector.getComponent(1 + w_offset); 4041 this.representation.setElement(1, 3, factor); 4042 this.representation.setElement(2, 0, factor); 4043 factor = factor.negate(); 4044 this.representation.setElement(3, 1, factor); 4045 this.representation.setElement(0, 2, factor); 4046 factor = vector.getComponent(2 + w_offset); 4047 this.representation.setElement(3, 0, factor); 4048 this.representation.setElement(2, 1, factor); 4049 factor = factor.negate(); 4050 this.representation.setElement(1, 2, factor); 4051 this.representation.setElement(0, 3, factor); 4052 if (w_offset === 1) factor = vector.getComponent(0); 4053 else factor = field5["createRational$long"](0); 4054 this.transpose = field5.identityMatrix(4).timesScalar(factor); 4055 factor = vector.getComponent(0 + w_offset); 4056 this.transpose.setElement(0, 1, factor); 4057 this.transpose.setElement(2, 3, factor); 4058 factor = factor.negate(); 4059 this.transpose.setElement(1, 0, factor); 4060 this.transpose.setElement(3, 2, factor); 4061 factor = vector.getComponent(1 + w_offset); 4062 this.transpose.setElement(3, 1, factor); 4063 this.transpose.setElement(0, 2, factor); 4064 factor = factor.negate(); 4065 this.transpose.setElement(1, 3, factor); 4066 this.transpose.setElement(2, 0, factor); 4067 factor = vector.getComponent(2 + w_offset); 4068 this.transpose.setElement(1, 2, factor); 4069 this.transpose.setElement(0, 3, factor); 4070 factor = factor.negate(); 4071 this.transpose.setElement(3, 0, factor); 4072 this.transpose.setElement(2, 1, factor); 4073 } 4074 getVector() { 4075 return this.vector; 4076 } 4077 /*private*/ 4078 conjugate(q) { 4079 const result = this.field.origin(4); 4080 result.setComponent(3, q.getComponent(3).negate()); 4081 result.setComponent(1, q.getComponent(1).negate()); 4082 result.setComponent(2, q.getComponent(2).negate()); 4083 result.setComponent(0, q.getComponent(0)); 4084 return result; 4085 } 4086 reflect(v) { 4087 let reflection = this.rightMultiply(this.conjugate(v)); 4088 reflection = this.leftMultiply(reflection); 4089 return reflection.negate(); 4090 } 4091 /** 4092 * Compute the product this * q. 4093 * @param {AlgebraicVector} q 4094 * @return {AlgebraicVector} 4095 */ 4096 rightMultiply(q) { 4097 return this.representation.timesColumn(q); 4098 } 4099 /** 4100 * Compute the product q*this. 4101 * This is computed using the identities: 4102 * 4103 * conjugate( q*this ) == conjugate( this ) * conjugate( q ) 4104 * 4105 * q * this == conjugate( conjugate( this ) * conjugate( q ) ) 4106 * 4107 * @param {AlgebraicVector} q 4108 * @return 4109 * @return {AlgebraicVector} 4110 */ 4111 leftMultiply(q) { 4112 let result = this.conjugate(q); 4113 result = this.transpose.timesColumn(result); 4114 return this.conjugate(result); 4115 } 4116}; 4117Quaternion["__class"] = "com.vzome.core.algebra.Quaternion"; 4118
4119// src/worker/legacy/from-java/com/vzome/core/math/symmetry/QuaternionicSymmetry.ts 4120var QuaternionicSymmetry = class _QuaternionicSymmetry { 4121 constructor(name, rootsResource, field5) { 4122 if (this.mRoots === void 0) { 4123 this.mRoots = null; 4124 } 4125 if (this.mName === void 0) { 4126 this.mName = null; 4127 } 4128 this.mName = name; 4129 const vefData = ResourceLoader.loadStringResource(rootsResource); 4130 const parser = new _QuaternionicSymmetry.RootParser(field5); 4131 parser.parseVEF(vefData, field5); 4132 this.mRoots = parser.getQuaternions(); 4133 } 4134 getRoots() { 4135 return this.mRoots; 4136 } 4137 getName() { 4138 return this.mName; 4139 } 4140}; 4141QuaternionicSymmetry["__class"] = "com.vzome.core.math.symmetry.QuaternionicSymmetry"; 4142((QuaternionicSymmetry2) => { 4143 class RootParser extends VefParser { 4144 constructor(field5) { 4145 super(); 4146 if (this.mRoots === void 0) { 4147 this.mRoots = null; 4148 } 4149 if (this.__com_vzome_core_math_symmetry_QuaternionicSymmetry_RootParser_field === void 0) { 4150 this.__com_vzome_core_math_symmetry_QuaternionicSymmetry_RootParser_field = null; 4151 } 4152 if (this.HALF === void 0) { 4153 this.HALF = null; 4154 } 4155 this.__com_vzome_core_math_symmetry_QuaternionicSymmetry_RootParser_field = field5; 4156 this.HALF = field5["createRational$long$long"](1, 2); 4157 } 4158 /** 4159 * 4160 * @param {number} numVertices 4161 */ 4162 startVertices(numVertices) { 4163 this.mRoots = ((s) => { 4164 let a = []; 4165 while (s-- > 0) a.push(null); 4166 return a; 4167 })(numVertices); 4168 } 4169 getQuaternions() { 4170 return this.mRoots; 4171 } 4172 /** 4173 * 4174 * @param {number} index 4175 * @param {AlgebraicVector} location 4176 */ 4177 addVertex(index, location) { 4178 this.mRoots[index] = new Quaternion(this.__com_vzome_core_math_symmetry_QuaternionicSymmetry_RootParser_field, location.scale(this.HALF)); 4179 } 4180 /** 4181 * 4182 * @param {number} numEdges 4183 */ 4184 startEdges(numEdges) { 4185 } 4186 /** 4187 * 4188 * @param {number} index 4189 * @param {number} v1 4190 * @param {number} v2 4191 */ 4192 addEdge(index, v1, v2) { 4193 } 4194 /** 4195 * 4196 * @param {number} numFaces 4197 */ 4198 startFaces(numFaces) { 4199 } 4200 /** 4201 * 4202 * @param {number} index 4203 * @param {int[]} verts 4204 */ 4205 addFace(index, verts) { 4206 } 4207 /** 4208 * 4209 * @param {number} index 4210 * @param {number} vertex 4211 */ 4212 addBall(index, vertex) { 4213 } 4214 /** 4215 * 4216 * @param {number} numVertices 4217 */ 4218 startBalls(numVertices) { 4219 } 4220 /** 4221 * 4222 * @param {java.util.StringTokenizer} tokens 4223 */ 4224 endFile(tokens) { 4225 } 4226 } 4227 QuaternionicSymmetry2.RootParser = RootParser; 4228 RootParser["__class"] = "com.vzome.core.math.symmetry.QuaternionicSymmetry.RootParser"; 4229})(QuaternionicSymmetry || (QuaternionicSymmetry = {})); 4230
4231// src/worker/legacy/from-java/com/vzome/core/commands/AbstractCommand.ts 4232var AbstractCommand = class _AbstractCommand { 4233 /** 4234 * This default behavior deserializes in the old way, before XmlSaveFormat .COMPACTED_COMMAND_EDITS 4235 * @param attributes 4236 * @param {*} xml 4237 * @param {XmlSaveFormat} format 4238 * @return 4239 * @return {AttributeMap} 4240 */ 4241 setXml(xml, format) { 4242 const attrs = format.loadCommandAttributes$org_w3c_dom_Element(xml); 4243 this.setFixedAttributes(attrs, format); 4244 return attrs; 4245 } 4246 setFixedAttributes(attributes, format) { 4247 attributes.put(Command.FIELD_ATTR_NAME, format.getField()); 4248 } 4249 /** 4250 * This default behavior serializes in the old way, before XmlSaveFormat .COMPACTED_COMMAND_EDITS 4251 * @param {AttributeMap} attributes 4252 * @return 4253 * @param {*} result 4254 */ 4255 getXml(result, attributes) { 4256 if (attributes == null) return; 4257 for (let index = attributes.keySet().iterator(); index.hasNext(); ) { 4258 let key = index.next(); 4259 { 4260 if (key === Command.FIELD_ATTR_NAME) continue; 4261 if (key === "symmetry.center") continue; 4262 if (key === "symmetry.axis.segment") continue; 4263 if (key === "org.vorthmann.zome.commands.CommandImportVEFData.field") continue; 4264 const value = attributes.get(key); 4265 if (value != null && value instanceof IcosahedralSymmetry) continue; 4266 _AbstractCommand.saveCommandAttribute(result, key, value); 4267 } 4268 } 4269 } 4270 static saveCommandAttribute(command, attrName, value) { 4271 const doc = command.getOwnerDocument(); 4272 let valElem = null; 4273 if (value != null && value instanceof Array && (value.length == 0 || value[0] == null || typeof value[0] === "
4273number")) { 4274 const v = value; 4275 valElem = command.getOwnerDocument().createElement("RationalVector"); 4276 let allOnes = true; 4277 let allZeros = true; 4278 for (let i = 0; i < (v.length / 2 | 0); i++) { 4279 { 4280 allZeros = allZeros && v[2 * i] === 0; 4281 allOnes = allOnes && v[2 * i + 1] === 1; 4282 } 4283 ; 4284 } 4285 if (!allZeros) { 4286 const numerators = new java.lang.StringBuffer(); 4287 for (let i = 0; i < (v.length / 2 | 0); i++) { 4288 { 4289 if (i > 0) numerators.append(" "); 4290 numerators.append(v[2 * i]); 4291 } 4292 ; 4293 } 4294 DomUtils.addAttribute(valElem, "nums", numerators.toString()); 4295 if (!allOnes) { 4296 const denominators = new java.lang.StringBuffer(); 4297 for (let i = 0; i < (v.length / 2 | 0); i++) { 4298 { 4299 if (i > 0) denominators.append(" "); 4300 denominators.append(v[2 * i + 1]); 4301 } 4302 ; 4303 } 4304 DomUtils.addAttribute(valElem, "denoms", denominators.toString()); 4305 } 4306 } 4307 } else if (value != null && value instanceof Axis) { 4308 valElem = doc.createElement("Axis"); 4309 value.getXML(valElem); 4310 } else if (typeof value === "boolean") { 4311 valElem = doc.createElement("Boolean"); 4312 DomUtils.addAttribute(valElem, "value", value.toString()); 4313 } else if (typeof value === "number") { 4314 valElem = doc.createElement("Integer"); 4315 DomUtils.addAttribute(valElem, "value", value.toString()); 4316 } else if (value != null && value instanceof Construction) { 4317 valElem = value.getXml(command.getOwnerDocument()); 4318 } else if (typeof value === "string") { 4319 valElem = doc.createElement("String"); 4320 const str = XmlSaveFormat.escapeNewlines(value); 4321 valElem.appendChild(doc.createTextNode(str)); 4322 } else if (value != null && value instanceof QuaternionicSymmetry) { 4323 valElem = doc.createElement("QuaternionicSymmetry"); 4324 DomUtils.addAttribute(valElem, "name", value.getName()); 4325 } else if (value != null && (value.constructor != null && value.constructor["__interfaces"] != null && value.constructor["__interfaces"].indexOf("com.vzome.core.math.symmetry.Symmetry") >= 0)) { 4326 valElem = doc.createElement("Symmetry"); 4327 DomUtils.addAttribute(valElem, "name", value.getName()); 4328 } else if (value == null) { 4329 valElem = doc.createElement("Null"); 4330 } else { 4331 throw new java.lang.IllegalStateException("unable to save " + /* getName */ 4332 ((c) => typeof c === "string" ? c : c["__class"] ? c["__class"] : c["name"])(value.constructor)); 4333 } 4334 DomUtils.addAttribute(valElem, "attrName", attrName); 4335 command.appendChild(valElem); 4336 } 4337 attributeIs3D(attrName) { 4338 return true; 4339 } 4340 setQuaternion(offset) { 4341 } 4342 ordersSelection() { 4343 return false; 4344 } 4345 constructor() { 4346 } 4347}; 4348AbstractCommand["__class"] = "com.vzome.core.commands.AbstractCommand"; 4349AbstractCommand["__interfaces"] = ["com.vzome.core.commands.Command"]; 4350
4351// src/worker/legacy/from-java/com/vzome/core/commands/CommandHide.ts 4352var CommandHide = class _CommandHide extends AbstractCommand { 4353 static PARAM_SIGNATURE_$LI$() { 4354 if (_CommandHide.PARAM_SIGNATURE == null) { 4355 _CommandHide.PARAM_SIGNATURE = [[Command.GENERIC_PARAM_NAME, Construction]]; 4356 } 4357 return _CommandHide.PARAM_SIGNATURE; 4358 } 4359 static ATTR_SIGNATURE_$LI$() { 4360 if (_CommandHide.ATTR_SIGNATURE == null) { 4361 _CommandHide.ATTR_SIGNATURE = []; 4362 } 4363 return _CommandHide.ATTR_SIGNATURE; 4364 } 4365 /** 4366 * 4367 * @return {java.lang.Object[][]} 4368 */ 4369 getParameterSignature() { 4370 return _CommandHide.PARAM_SIGNATURE_$LI$(); 4371 } 4372 /** 4373 * 4374 * @return {java.lang.Object[][]} 4375 */ 4376 getAttributeSignature() { 4377 return _CommandHide.ATTR_SIGNATURE_$LI$(); 4378 } 4379 /** 4380 * 4381 * @param {ConstructionList} parameters 4382 * @param {AttributeMap} attributes 4383 * @param {*} effects 4384 * @return {ConstructionList} 4385 */ 4386 apply(parameters, attributes, effects) { 4387 throw new Command.Failure("CommandHide apply attempted"); 4388 } 4389 constructor() { 4390 super(); 4391 } 4392}; 4393CommandHide["__class"] = "com.vzome.core.commands.CommandHide"; 4394CommandHide["__interfaces"] = ["com.vzome.core.commands.Command"]; 4395
4396// src/worker/legacy/from-java/com/vzome/core/commands/CommandObliquePentagon.ts 4397var CommandObliquePentagon = class _CommandObliquePentagon extends AbstractCommand { 4398 static PARAM_SIGNATURE_$LI$() { 4399 if (_CommandObliquePentagon.PARAM_SIGNATURE == null) { 4400 _CommandObliquePentagon.PARAM_SIGNATURE = [["segment1", Segment], ["segment2", Segment]]; 4401 } 4402 return _CommandObliquePentagon.PARAM_SIGNATURE; 4403 } 4404 static ATTR_SIGNATURE_$LI$() { 4405 if (_CommandObliquePentagon.ATTR_SIGNATURE == null) { 4406 _CommandObliquePentagon.ATTR_SIGNATURE = []; 4407 } 4408 return _CommandObliquePentagon.ATTR_SIGNATURE; 4409 } 4410 /** 4411 * 4412 * @return {java.lang.Object[][]} 4413 */ 4414 getParameterSignature() { 4415 return _CommandObliquePentagon.PARAM_SIGNATURE_$LI$(); 4416 } 4417 /** 4418 * 4419 * @return {java.lang.Object[][]} 4420 */ 4421 getAttributeSignature() { 4422 return _CommandObliquePentagon.ATTR_SIGNATURE_$LI$(); 4423 } 4424 /** 4425 * 4426 * @param {ConstructionList} parameters 4427 * @param {AttributeMap} attributes 4428 * @param {*} effects 4429 * @return {ConstructionList} 4430 */ 4431 apply(parameters, attributes, effects) { 4432 throw new Command.Failure("Oblique pentagon should never be called."); 4433 } 4434 constructor() { 4435 super(); 4436 } 4437}; 4438CommandObliquePentagon["__class"] = "com.vzome.core.commands.CommandObliquePentagon"; 4439CommandObliquePentagon["__interfaces"] = ["com.vzome.core.commands.Command"]; 4440
4441// src/worker/legacy/from-java/com/vzome/core/construction/ConstructionList.ts 4442var ConstructionList = class extends java.util.ArrayList { 4443 addConstruction(ball) { 4444 this.add(ball); 4445 return this; 4446 } 4447 removeConstruction(ball) { 4448 this.remove(ball); 4449 return this; 4450 } 4451 getConstructions() { 4452 return this.toArray(((s) => { 4453 let a = []; 4454 while (s-- > 0) a.push(null); 4455 return a; 4456 })(this.size())); 4457 } 4458 constructor() { 4459 super(); 4460 } 4461}; 4462ConstructionList["__class"] = "com.vzome.core.construction.ConstructionList"; 4463ConstructionList["__interfaces"] = ["java.util.RandomAccess", "java.util.List", "java.lang.Cloneable", "java.util.Collection", "java.lang.Iterable", "java.io.Serializable"]; 4464
4465// src/worker/legacy/from-java/com/vzome/core/commands/CommandTransform.ts 4466var CommandTransform = class _CommandTransform extends AbstractCommand { 4467 /** 4468 * 4469 * @param {AttributeMap} attributes 4470 * @param {XmlSaveFormat} format 4471 */ 4472 setFixedAttributes(attributes, format) { 4473 if (format.getScale() !== 0) attributes.put(_CommandTransform.SCALE_ATTR_NAME, format.getScale()); 4474 super.setFixedAttributes(attributes, format); 4475 } 4476 /** 4477 * 4478 * @param {ConstructionList} parameters 4479 * @param {AttributeMap} attributes 4480 * @param {*} effects 4481 * @return {ConstructionList} 4482 */ 4483 apply(parameters, attributes, effects) { 4484 return null; 4485 } 4486 static { 4487 this.SYMMETRY_GROUP_ATTR_NAME = "symmetry.group"; 4488 } 4489 static { 4490 this.SYMMETRY_CENTER_ATTR_NAME = "symmetry.center"; 4491 } 4492 static { 4493 this.SYMMETRY_AXIS_ATTR_NAME = "symmetry.axis.segment"; 4494 } 4495 static { 4496 this.SCALE_ATTR_NAME = "scale.factor"; 4497 } 4498 static PARAM_SIGNATURE_$LI$() { 4499 if (_CommandTransform.PARAM_SIGNATURE == null) { 4500 _CommandTransform.PARAM_SIGNATURE = [[Command.GENERIC_PARAM_NAME, Construction]]; 4501 } 4502 return _CommandTransform.PARAM_SIGNATURE; 4503 } 4504 static ATTR_SIGNATURE_$LI$() { 4505 if (_CommandTransform.ATTR_SIGNATURE == null) { 4506 _CommandTransform.ATTR_SIGNATURE = [[_CommandTransform.SYMMETRY_CENTER_ATTR_NAME, Point]]; 4507 } 4508 return _CommandTransform.ATTR_SIGNATURE; 4509 } 4510 static AXIS_ATTR_SIGNATURE_$LI$() { 4511 if (_CommandTransform.AXIS_ATTR_SIGNATURE == null) { 4512 _CommandTransform.AXIS_ATTR_SIGNATURE = [[_CommandTransform.SYMMETRY_CENTER_ATTR_NAME, Point], [_CommandTransform.SYMMETRY_AXIS_ATTR_NAME, Segment]]; 4513 } 4514 return _CommandTransform.AXIS_ATTR_SIGNATURE; 4515 } 4516 static GROUP_ATTR_SIGNATURE_$LI$() { 4517 if (_CommandTransform.GROUP_ATTR_SIGNATURE == null) { 4518 _CommandTransform.GROUP_ATTR_SIGNATURE = [[_CommandTransform.SYMMETRY_CENTER_ATTR_NAME, Point], [_CommandTransform.SYMMETRY_GROUP_ATTR_NAME, "com.vzome.core.math.symmetry.Symmetry"]]; 4519 } 4520 return _CommandTransform.GROUP_ATTR_SIGNATURE; 4521 } 4522 /** 4523 * 4524 * @return {java.lang.Object[][]} 4525 */ 4526 getParameterSignature() { 4527 return _CommandTransform.PARAM_SIGNATURE_$LI$(); 4528 } 4529 /** 4530 * 4531 * @return {java.lang.Object[][]} 4532 */ 4533 getAttributeSignature() { 4534 return _CommandTransform.AXIS_ATTR_SIGNATURE_$LI$(); 4535 } 4536 transform(params, transform, effects) { 4537 const output = new ConstructionList(); 4538 effects["constructionAdded$com_vzome_core_construction_Construction"](transform); 4539 for (let index = 0; index < params.length; index++) { 4540 let param = params[index]; 4541 { 4542 const result = transform.transform$com_vzome_core_construction_Construction(param); 4543 if (result == null) continue; 4544 effects["constructionAdded$com_vzome_core_construction_Construction"](result); 4545 output.addConstruction(result); 4546 } 4547 } 4548 return output; 4549 } 4550 constructor() { 4551 super(); 4552 } 4553}; 4554CommandTransform["__class"] = "com.vzome.core.commands.CommandTransform"; 4555CommandTransform["__interfaces"] = ["com.vzome.core.commands.Command"]; 4556
4557// src/worker/legacy/from-java/com/vzome/core/editor/BeginBlock.ts 4558var BeginBlock = class extends UndoableEdit { 4559 constructor(editor) { 4560 super(); 4561 } 4562 /** 4563 * 4564 * @return {boolean} 4565 */ 4566 isNoOp() { 4567 return false; 4568 } 4569 /** 4570 * 4571 * @param {*} doc 4572 * @return {*} 4573 */ 4574 getXml(doc) { 4575 return doc.createElement("BeginBlock"); 4576 } 4577 /** 4578 * 4579 * @param {*} doc 4580 * @return {*} 4581 */ 4582 getDetailXml(doc) { 4583 return this.getXml(doc); 4584 } 4585 /** 4586 * 4587 * @return {boolean} 4588 */ 4589 isVisible() { 4590 return false; 4591 } 4592 /** 4593 * 4594 * @return {boolean} 4595 */ 4596 isDestructive() { 4597 return false; 4598 } 4599 /** 4600 * 4601 */ 4602 redo() { 4603 } 4604 /** 4605 * 4606 * @param {*} xml 4607 * @param {XmlSaveFormat} format 4608 * @param {*} context 4609 */ 4610 loadAndPerform(xml, format, context) { 4611 context.performAndRecord(this); 4612 } 4613 /** 4614 * 4615 */ 4616 undo() { 4617 } 4618 /** 4619 * 4620 */ 4621 perform() { 4622 } 4623 /** 4624 * 4625 * @return {boolean} 4626 */ 4627 isSticky() { 4628 return false; 4629 } 4630 /** 4631 * 4632 * @param {*} props 4633 */ 4634 configure(props) { 4635 } 4636}; 4637BeginBlock["__class"] = "com.vzome.core.editor.BeginBlock"; 4638
4639// src/worker/legacy/from-java/com/vzome/core/editor/EndBlock.ts 4640var EndBlock = class extends UndoableEdit { 4641 constructor(editor) { 4642 super(); 4643 } 4644 /** 4645 * 4646 * @return {boolean} 4647 */ 4648 isNoOp() { 4649 return false; 4650 } 4651 /** 4652 * 4653 * @param {*} doc 4654 * @return {*} 4655 */ 4656 getXml(doc) { 4657 return doc.createElement("EndBlock"); 4658 } 4659 /** 4660 * 4661 * @param {*} doc 4662 * @return {*} 4663 */ 4664 getDetailXml(doc) { 4665 return this.getXml(doc); 4666 } 4667 /** 4668 * 4669 * @return {boolean} 4670 */ 4671 isVisible() { 4672 return false; 4673 } 4674 /** 4675 * 4676 * @return {boolean} 4677 */ 4678 isDestructive() { 4679 return false; 4680 } 4681 /** 4682 * 4683 */ 4684 redo() { 4685 } 4686 /** 4687 * 4688 * @param {*} xml 4689 * @param {XmlSaveFormat} format 4690 * @param {*} context 4691 */ 4692 loadAndPerform(xml, format, context) { 4693 context.performAndRecord(this); 4694 } 4695 /** 4696 * 4697 */ 4698 undo() { 4699 } 4700 /** 4701 * 4702 * @param {*} props 4703 */ 4704 configure(props) { 4705 } 4706 /** 4707 * 4708 */ 4709 perform() { 4710 } 4711 /** 4712 * 4713 * @return {boolean} 4714 */ 4715 isSticky() { 4716 return false; 4717 } 4718}; 4719EndBlock["__class"] = "com.vzome.core.editor.EndBlock"; 4720
4721// src/worker/legacy/from-java/com/vzome/core/construction/TransformedPoint.ts 4722var TransformedPoint = class extends Point { 4723 constructor(transform, prototype) { 4724 super(prototype.field); 4725 if (this.mTransform === void 0) { 4726 this.mTransform = null; 4727 } 4728 if (this.mPrototype === void 0) { 4729 this.mPrototype = null; 4730 } 4731 this.mTransform = transform; 4732 this.mPrototype = prototype; 4733 this.mapParamsToState(); 4734 } 4735 /** 4736 * 4737 * @return {boolean} 4738 */ 4739 mapParamsToState() { 4740 if (this.mTransform.isImpossible() || this.mPrototype.isImpossible()) return this.setStateVariable(null, true); 4741 const loc = this.mTransform.transform$com_vzome_core_algebra_AlgebraicVector(this.mPrototype.getLocation()); 4742 return this.setStateVariable(loc, loc == null); 4743 } 4744}; 4745TransformedPoint["__class"] = "com.vzome.core.construction.TransformedPoint"; 4746
4747// src/worker/legacy/from-java/com/vzome/core/construction/TransformedPolygon.ts 4748var TransformedPolygon = class extends Polygon { 4749 constructor(transform, prototype) { 4750 super(prototype.field); 4751 if (this.mTransform === void 0) { 4752 this.mTransform = null; 4753 } 4754 if (this.mPrototype === void 0) { 4755 this.mPrototype = null; 4756 } 4757 this.mTransform = transform; 4758 this.mPrototype = prototype; 4759 this.mapParamsToState(); 4760 } 4761 /** 4762 * 4763 * @return {boolean} 4764 */ 4765 mapParamsToState() { 4766 const vertices = ((s) => { 4767 let a = []; 4768 while (s-- > 0) a.push(null); 4769 return a; 4770 })(this.mPrototype.getVertexCount()); 4771 for (let i = 0; i < vertices.length; i++) { 4772 { 4773 vertices[i] = this.mTransform.transform$com_vzome_core_algebra_AlgebraicVector(this.mPrototype.getVertex(i)); 4774 } 4775 ; 4776 } 4777 return this.setStateVariable(vertices, false); 4778 } 4779}; 4780TransformedPolygon["__class"] = "com.vzome.core.construction.TransformedPolygon"; 4781
4782// src/worker/legacy/from-java/com/vzome/core/construction/TransformedSegment.ts 4783var TransformedSegment = class extends Segment { 4784 constructor(transform, prototype) { 4785 super(prototype.field); 4786 if (this.mTransform === void 0) { 4787 this.mTransform = null; 4788 } 4789 if (this.mPrototype === void 0) { 4790 this.mPrototype = null; 4791 } 4792 this.mTransform = transform; 4793 this.mPrototype = prototype; 4794 this.mapParamsToState(); 4795 } 4796 /** 4797 * 4798 * @return {boolean} 4799 */ 4800 mapParamsToState() { 4801 if (this.mTransform.isImpossible() || this.mPrototype.isImpossible()) return this.setStateVariables(null, null, true); 4802 const loc = this.mTransform.transform$com_vzome_core_algebra_AlgebraicVector(this.mPrototype.getStart().projectTo3d(true)); 4803 const end = this.mTransform.transform$com_vzome_core_algebra_AlgebraicVector(this.mPrototype.getEnd().projectTo3d(true)); 4804 if (end == null || loc == null) return this.setStateVariables(null, null, true); 4805 return this.setStateVariables(loc, end.minus(loc), false); 4806 } 4807}; 4808TransformedSegment["__class"] = "com.vzome.core.construction.TransformedSegment"; 4809
4810// src/worker/legacy/from-java/com/vzome/core/construction/Transformation.ts 4811var Transformation = class _Transformation extends Construction { 4812 /** 4813 * 4814 * @return {boolean} 4815 */ 4816 is3d() { 4817 return true; 4818 } 4819 constructor(field5) { 4820 super(field5); 4821 if (this.mTransform === void 0) { 4822 this.mTransform = null; 4823 } 4824 if (this.mOffset === void 0) { 4825 this.mOffset = null; 4826 } 4827 } 4828 /** 4829 * 4830 * @param {*} that 4831 * @return {boolean} 4832 */ 4833 equals(that) { 4834 if (this === that) { 4835 return true; 4836 } 4837 if (that == null) { 4838 return false; 4839 } 4840 if (!(that != null && that instanceof _Transformation)) { 4841 return false; 4842 } 4843 const other = that; 4844 if (this.mOffset == null) { 4845 if (other.mOffset != null) { 4846 return false; 4847 } 4848 } else if (!this.mOffset.equals(other.mOffset)) { 4849 return false; 4850 } 4851 if (this.mTransform == null) { 4852 if (other.mTransform != null) { 4853 return false; 4854 } 4855 } else if (!this.mTransform.equals(other.mTransform)) { 4856 return false; 4857 } 4858 return true; 4859 } 4860 setStateVariables(transform, offset, impossible) { 4861 if (impossible) { 4862 if (this.isImpossible()) return false; 4863 this.setImpossible(true); 4864 return true; 4865 } 4866 if (transform != null && transform.equals(this.mTransform) && offset.equals(this.mOffset) && !this.isImpossible()) return false; 4867 this.mTransform = transform; 4868 this.mOffset = offset; 4869 this.setImpossible(false); 4870 return true; 4871 } 4872 transform$com_vzome_core_algebra_AlgebraicVector(arg) { 4873 arg = arg.minus(this.mOffset); 4874 arg = this.mTransform.timesColumn(arg); 4875 arg = arg.plus(this.mOffset); 4876 return arg; 4877 } 4878 transform(arg) { 4879 if (arg != null && arg instanceof AlgebraicVector || arg === null) { 4880 return this.transform$com_vzome_core_algebra_AlgebraicVector(arg); 4881 } else if (arg != null && arg instanceof Construction || arg === null) { 4882 return this.transform$com_vzome_core_construction_Construction(arg); 4883 } else throw new Error("invalid overload"); 4884 } 4885 transform$com_vzome_core_construction_Construction(c) { 4886 if (c != null && c instanceof Point) { 4887 return new TransformedPoint(this, c); 4888 } else if (c != null && c instanceof Segment) { 4889 return new TransformedSegment(this, c); 4890 } else if (c != null && c instanceof Polygon) { 4891 return new TransformedPolygon(this, c); 4892 } else { 4893 return null; 4894 } 4895 } 4896 /** 4897 * 4898 * @param {*} doc 4899 * @return {*} 4900 */ 4901 getXml(doc) { 4902 const result = doc.createElement("transformation"); 4903 return result; 4904 } 4905}; 4906Transformation["__class"] = "com.vzome.core.construction.Transformation"; 4907((Transformation2) => { 4908 class Identity extends Transformation2 { 4909 transform$int_A(arg) { 4910 return arg; 4911 } 4912 transform(arg) { 4913 if (arg != null && arg instanceof Array && (arg.length == 0 || arg[0] == null || typeof arg[0] === "number") || arg === null) { 4914 return this.transform$int_A(arg); 4915 } else if (arg != null && arg instanceof AlgebraicVector || arg === null) { 4916 return super.transform(arg); 4917 } else if (arg != null && arg instanceof Construction || arg === null) { 4918 return this.transform$com_vzome_core_construction_Construction(arg); 4919 } else throw new Error("invalid overload"); 4920 } 4921 constructor(field5) { 4922 super(field5); 4923 } 4924 attach() { 4925 } 4926 detach() { 4927 } 4928 /** 4929 * 4930 * @return {boolean} 4931 */ 4932 mapParamsToState() { 4933 return true; 4934 } 4935 } 4936 Transformation2.Identity = Identity; 4937 Identity["__class"] = "com.vzome.core.construction.Transformation.Identity"; 4938})(Transformation || (Transformation = {})); 4939
4940// src/worker/legacy/from-java/com/vzome/core/construction/Translation.ts 4941var Translation = class extends Transformation { 4942 constructor(offset) { 4943 super(offset.getField()); 4944 if (this.mOffset === void 0) { 4945 this.mOffset = null; 4946 } 4947 this.mOffset = offset; 4948 } 4949 transform$com_vzome_core_algebra_AlgebraicVector(arg) { 4950 arg = arg.plus(this.mOffset); 4951 return arg; 4952 } 4953 /** 4954 * 4955 * @param {AlgebraicVector} arg 4956 * @return {AlgebraicVector} 4957 */ 4958 transform(arg) { 4959 if (arg != null && arg instanceof AlgebraicVector || arg === null) { 4960 return this.transform$com_vzome_core_algebra_AlgebraicVector(arg); 4961 } else if (arg != null && arg instanceof Construction || arg === null) { 4962 return this.transform$com_vzome_core_construction_Construction(arg); 4963 } else throw new Error("invalid overload"); 4964 } 4965 /** 4966 * 4967 * @return {boolean} 4968 */ 4969 mapParamsToState() { 4970 return this.setStateVariables(null, null, false); 4971 } 4972}; 4973Translation["__class"] = "com.vzome.core.construction.Translation"; 4974
4975// src/worker/legacy/from-java/com/vzome/core/edits/AffinePentagon.ts 4976var AffinePentagon = class extends ChangeManifestations { 4977 /** 4978 * 4979 */ 4980 perform() { 4981 const errorMsg = "Affine pentagon command requires two selected struts with a common vertex."; 4982 let strut1 = null; 4983 let strut2 = null; 4984 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 4985 let man = index.next(); 4986 { 4987 this.unselect$com_vzome_core_model_Manifestation(man); 4988 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) { 4989 if (strut1 == null) { 4990 strut1 = man; 4991 } else if (strut2 == null) { 4992 strut2 = man; 4993 } 4994 } 4995 } 4996 } 4997 this.redo(); 4998 if (strut1 == null || strut2 == null) { 4999 this.fail(errorMsg); 5000 } 5001 const field5 = strut1.getLocation().getField(); 5002 const s1 = strut1.getFirstConstruction(); 5003 const s2 = strut2.getFirstConstruction(); 5004 this.manifestConstruction(new SegmentEndPoint(s1, true)); 5005 this.manifestConstruction(new SegmentEndPoint(s1, false)); 5006 this.manifestConstruction(new SegmentEndPoint(s2, true)); 5007 this.manifestConstruction(new SegmentEndPoint(s2, false)); 5008 this.redo(); 5009 let offset1 = s1.getOffset(); 5010 let offset2 = s2.getOffset(); 5011 let v1 = null; 5012 let v2 = null; 5013 { 5014 const s1s = s1.getStart(); 5015 const s1e = s1.getEnd(); 5016 const s2s = s2.getStart(); 5017 const s2e = s2.getEnd(); 5018 if (s1s.equals(s2s)) { 5019 v1 = s1e; 5020 v2 = s2e; 5021 } else if (s1e.equals(s2s)) { 5022 v1 = s1s; 5023 v2 = s2e; 5024 offset1 = offset1.negate(); 5025 } else if (s1e.equals(s2e)) { 5026 v1 = s1s; 5027 v2 = s2s; 5028 offset2 = offset2.negate(); 5029 offset1 = offset1.negate(); 5030 } else if (s1s.equals(s2e)) { 5031 v1 = s1e; 5032 v2 = s2s; 5033 offset2 = offset2.negate(); 5034 } else { 5035 this.fail(errorMsg); 5036 } 5037 } 5038 ; 5039 let p1 = null; 5040 let p2 = null; 5041 for (let index = this.mManifestations.iterator(); index.hasNext(); ) { 5042 let m = index.next(); 5043 { 5044 if (m != null && (m.constructor != null && m.constructor["__interfaces"] != null && m.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) { 5045 const loc = m.getLocation(); 5046 if (loc.equals(v1)) p1 = m.getFirstConstruction(); 5047 else if (loc.equals(v2)) p2 = m.getFirstConstruction(); 5048 } 5049 } 5050 } 5051 const phi = field5["createPower$int"](1); 5052 let transform = new Translation(offset1.scale(phi)); 5053 const p3 = new TransformedPoint(transform, p2); 5054 this.manifestConstruction(p3); 5055 transform = new Translation(offset2.scale(phi)); 5056 const p4 = new TransformedPoint(transform, p1); 5057 this.manifestConstruction(p4); 5058 let segment = new SegmentJoiningPoints(p1, p3); 5059 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(segment)); 5060 segment = new SegmentJoiningPoints(p2, p4); 5061 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(segment)); 5062 segment = new SegmentJoiningPoints(p3, p4); 5063 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(segment)); 5064 this.redo(); 5065 } 5066 constructor(editorModel) { 5067 super(editorModel); 5068 } 5069 /** 5070 * 5071 * @return {string} 5072 */ 5073 getXmlElementName() { 5074 return "AffinePentagon"; 5075 } 5076}; 5077AffinePentagon["__class"] = "com.vzome.core.edits.AffinePentagon"; 5078
5079// src/worker/legacy/from-java/com/vzome/core/edits/DeselectAll.ts 5080var DeselectAll = class extends ChangeSelection { 5081 /** 5082 * 5083 */ 5084 perform() { 5085 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 5086 let man = index.next(); 5087 { 5088 this.unselect$com_vzome_core_model_Manifestation$boolean(man, true); 5089 } 5090 } 5091 super.perform(); 5092 } 5093 constructor(editor) { 5094 super(editor.getSelection()); 5095 } 5096 /** 5097 * 5098 * @return {boolean} 5099 */ 5100 groupingAware() { 5101 return true; 5102 } 5103 /** 5104 * 5105 * @return {string} 5106 */ 5107 getXmlElementName() { 5108 return "DeselectAll"; 5109 } 5110}; 5111DeselectAll["__class"] = "com.vzome.core.edits.DeselectAll"; 5112
5113// src/worker/legacy/from-java/com/vzome/core/edits/SelectAll.ts 5114var SelectAll = class extends ChangeSelection { 5115 /** 5116 * 5117 */ 5118 perform() { 5119 if (this.originLast) { 5120 let originBall = null; 5121 const ignoreGroups = true; 5122 for (let index = this.realizedModel.iterator(); index.hasNext(); ) { 5123 let m = index.next(); 5124 { 5125 if (m.isRendered()) { 5126 if (originBall == null && (m != null && (m.constructor != null && m.constructor["__interfaces"] != null && m.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) && m.getLocation().isOrigin()) { 5127 originBall = m; 5128 } else if (!this.mSelection.manifestationSelected(m)) { 5129 this.select$com_vzome_core_model_Manifestation$boolean(m, ignoreGroups); 5130 } 5131 } 5132 } 5133 } 5134 if (originBall != null) { 5135 if (this.mSelection.manifestationSelected(originBall)) { 5136 this.unselect$com_vzome_core_model_Manifestation$boolean(originBall, ignoreGroups); 5137 this.redo(); 5138 } 5139 this.select$com_vzome_core_model_Manifestation$boolean(originBall, ignoreGroups); 5140 } 5141 } else { 5142 for (let index = this.realizedModel.iterator(); index.hasNext(); ) { 5143 let m = index.next(); 5144 { 5145 if (m.isRendered()) { 5146 if (!this.mSelection.manifestationSelected(m)) this.select$com_vzome_core_model_Manifestation$boolean(m, true); 5147 } 5148 } 5149 } 5150 } 5151 super.perform(); 5152 } 5153 constructor(editor) { 5154 super(editor.getSelection()); 5155 if (this.realizedModel === void 0) { 5156 this.realizedModel = null; 5157 } 5158 this.originLast = true; 5159 this.realizedModel = editor.getRealizedModel(); 5160 } 5161 /** 5162 * 5163 * @param {*} xml 5164 * @param {XmlSaveFormat} format 5165 */ 5166 setXmlAttributes(xml, format) { 5167 const mode = xml.getAttribute("originLast"); 5168 this.originLast = "true" === mode; 5169 } 5170 /** 5171 * 5172 * @param {*} element 5173 */ 5174 getXmlAttributes(element) { 5175 if (this.originLast) element.setAttribute("originLast", "true"); 5176 } 5177 /** 5178 * 5179 * @return {boolean} 5180 */ 5181 groupingAware() { 5182 return true; 5183 } 5184 /** 5185 * 5186 * @return {string} 5187 */ 5188 getXmlElementName() { 5189 return "SelectAll"; 5190 } 5191}; 5192SelectAll["__class"] = "com.vzome.core.edits.SelectAll"; 5193
5194// src/worker/legacy/from-java/com/vzome/core/edits/SelectManifestation.ts 5195var SelectManifestation = class extends ChangeSelection { 5196 /** 5197 * 5198 * @return {boolean} 5199 */ 5200 groupingAware() { 5201 return true; 5202 } 5203 constructor(editor, m) { 5204 if ((editor != null && (editor.constructor != null && editor.constructor["__interfaces"] != null && editor.constructor["__interfaces"].indexOf("com.vzome.core.editor.api.EditorModel") >= 0) || editor === null) && (m != null && (m.constructor != null && m.constructor["__interfaces"] != null && m.constructor["__interfaces"].indexOf("com.vzome.core.model.Manifestation") >= 0) || m === null)) { 5205 let __args = arguments; 5206 { 5207 let __args2 = arguments; 5208 super(editor.getSelection()); 5209 if (this.mManifestation === void 0) { 5210 this.mManifestation = null; 5211 } 5212 if (this.construction === void 0) { 5213 this.construction = null; 5214 } 5215 if (this.mRealized === void 0) { 5216 this.mRealized = null; 5217 } 5218 if (this.mReplace === void 0) { 5219 this.mReplace = false; 5220 } 5221 this.mRealized = editor.getRealizedModel(); 5222 } 5223 (() => { 5224 this.mManifestation = m; 5225 if (this.mManifestation != null) { 5226 this.construction = this.mManifestation.toConstruction(); 5227 } 5228 })(); 5229 } else if ((editor != null && (editor.constructor != null && editor.constructor["__interfaces"] != null && editor.constructor["__interfaces"].indexOf("com.vzome.core.editor.api.EditorModel") >= 0) || editor === null) && m === void 0) { 5230 let __args = arguments; 5231 super(editor.getSelection()); 5232 if (this.mManifestation === void 0) { 5233 this.mManifestation = null; 5234 } 5235 if (this.construction === void 0) { 5236 this.construction = null; 5237 } 5238 if (this.mRealized === void 0) { 5239 this.mRealized = null; 5240 } 5241 if (this.mReplace === void 0) { 5242 this.mReplace = false; 5243 } 5244 this.mRealized = editor.getRealizedModel(); 5245 } else throw new Error("invalid overload"); 5246 } 5247 configure(props) { 5248 const mode = props.get("mode"); 5249 this.mReplace = "replace" === mode; 5250 this.mManifestation = props.get("picked"); 5251 if (this.mManifestation != null) { 5252 this.construction = this.mManifestation.toConstruction(); 5253 } 5254 } 5255 /** 5256 * 5257 */ 5258 perform() { 5259 if (this.mReplace) { 5260 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 5261 let man = index.next(); 5262 { 5263 this.unselect$com_vzome_core_model_Manifestation$boolean(man, true); 5264 } 5265 } 5266 this.select$com_vzome_core_model_Manifestation(this.mManifestation); 5267 } else if (this.mSelection.manifestationSelected(this.mManifestation)) this.unselect$com_vzome_core_model_Manifestation(this.mManifestation); 5268 else this.select$com_vzome_core_model_Manifestation(this.mManifestation); 5269 this.redo(); 5270 } 5271 /** 5272 * 5273 * @param {*} result 5274 */ 5275 getXmlAttributes(result) { 5276 if (this.construction != null && this.construction instanceof Point) XmlSaveFormat.serializePoint(result, "point", this.construction); 5277 else if (this.construction != null && this.construction instanceof Segment) XmlSaveFormat.serializeSegment(result, "startSegment", "endSegment", this.construction); 5278 else if (this.construction != null && this.construction instanceof Polygon) XmlSaveFormat.serializePolygon(result, "polygonVertex", this.construction); 5279 if (this.mReplace) DomUtils.addAttribute(result, "replace", "true"); 5280 } 5281 /** 5282 * 5283 * @param {*} xml 5284 * @param {XmlSaveFormat} format 5285 */ 5286 setXmlAttributes(xml, format) { 5287 if (format.rationalVectors()) { 5288 this.construction = format.parsePoint$org_w3c_dom_Element$java_lang_String(xml, "point"); 5289 if (this.construction == null) this.construction = format.parseSegment$org_w3c_dom_Element$java_lang_String$java_lang_String(xml, "startSegment", "endSegment"); 5290 if (this.construction == null) { 5291 const kid = DomUtils.getFirstChildElement$org_w3c_dom_Element$java_lang_String(xml, "polygon"); 5292 if (kid != null) this.construction = format.parsePolygon$org_w3c_dom_Element$java_lang_String(kid, "vertex"); 5293 else this.construction = format.parsePolygon$org_w3c_dom_Element$java_lang_String(xml, "polygonVertex"); 5294 } 5295 } else { 5296 const attrs = format.loadCommandAttributes$org_w3c_dom_Element(xml); 5297 this.construction = attrs.get("manifestation"); 5298 const replaceVal = attrs.get("replace"); 5299 if (replaceVal != null && replaceVal) this.mReplace = true; 5300 } 5301 this.mManifestation = this.mRealized.getManifestation(this.construction); 5302 if (this.mManifestation == null && format.rationalVectors() && (this.construction != null && this.construction instanceof Polygon)) { 5303 this.construction = format.parsePolygonReversed(xml, "polygonVertex"); 5304 this.mManifestation = this.mRealized.getManifestation(this.construction); 5305 if (this.mManifestation != null) SideEffects.logBugAccommodation("reverse-oriented polygon"); 5306 } 5307 } 5308 /** 5309 * 5310 * @return {string} 5311 */ 5312 getXmlElementName() { 5313 return "SelectManifestation"; 5314 } 5315}; 5316SelectManifestation["__class"] = "com.vzome.core.edits.SelectManifestation"; 5317
5318// src/worker/legacy/from-java/com/vzome/core/edits/SymmetryAxisChange.ts 5319var SymmetryAxisChange = class extends UndoableEdit { 5320 constructor(editor, newAxis) { 5321 if ((editor != null && (editor.constructor != null && editor.constructor["__interfaces"] != null && editor.constructor["__interfaces"].indexOf("com.vzome.core.editor.api.ImplicitSymmetryParameters") >= 0) || editor === null) && (newAxis != null && newAxis instanceof Segment || newAxis === null)) { 5322 let __args = arguments; 5323 super(); 5324 if (this.mOldAxis === void 0) { 5325 this.mOldAxis = null; 5326 } 5327 if (this.mNewAxis === void 0) { 5328 this.mNewAxis = null; 5329 } 5330 if (this.mEditor === void 0) { 5331 this.mEditor = null; 5332 } 5333 this.mOldAxis = editor.getSymmetrySegment(); 5334 this.mNewAxis = newAxis; 5335 this.mEditor = editor; 5336 } else if ((editor != null && (editor.constructor != null && editor.constructor["__interfaces"] != null && editor.constructor["__interfaces"].indexOf("com.vzome.core.editor.api.ImplicitSymmetryParameters") >= 0) || editor === null) && newAxis === void 0) { 5337 let __args = arguments; 5338 { 5339 let __args2 = arguments; 5340 let newAxis2 = null; 5341 super(); 5342 if (this.mOldAxis === void 0) { 5343 this.mOldAxis = null; 5344 } 5345 if (this.mNewAxis === void 0) { 5346 this.mNewAxis = null; 5347 } 5348 if (this.mEditor === void 0) { 5349 this.mEditor = null; 5350 } 5351 this.mOldAxis = editor.getSymmetrySegment(); 5352 this.mNewAxis = newAxis2; 5353 this.mEditor = editor; 5354 } 5355 } else throw new Error("invalid overload"); 5356 } 5357 configure(props) { 5358 const man = props.get("picked"); 5359 if (man != null) this.mNewAxis = man.getFirstConstruction(); 5360 } 5361 /** 5362 * 5363 * @return {boolean} 5364 */ 5365 isVisible() { 5366 return false; 5367 } 5368 /** 5369 * 5370 * @return {boolean} 5371 */ 5372 isNoOp() { 5373 return this.mNewAxis == null || this.mOldAxis != null && this.mNewAxis.getStart().equals(this.mOldAxis.getStart()) && this.mNewAxis.getEnd().equals(this.mOldAxis.getEnd()); 5374 } 5375 /** 5376 * 5377 */ 5378 redo() { 5379 if (this.isNoOp()) return; 5380 this.mEditor.setSymmetrySegment(this.mNewAxis); 5381 } 5382 /** 5383 * 5384 */ 5385 undo() { 5386 if (this.isNoOp()) return; 5387 this.mEditor.setSymmetrySegment(this.mOldAxis); 5388 } 5389 /** 5390 * 5391 * @param {*} doc 5392 * @return {*} 5393 */ 5394 getXml(doc) { 5395 const result = doc.createElement("SymmetryAxisChange"); 5396 XmlSaveFormat.serializeSegment(result, "start", "end", this.mNewAxis); 5397 return result; 5398 } 5399 /** 5400 * 5401 * @param {*} doc 5402 * @return {*} 5403 */ 5404 getDetailXml(doc) { 5405 return this.getXml(doc); 5406 } 5407 /** 5408 * 5409 * @param {*} xml 5410 * @param {XmlSaveFormat} format 5411 * @param {*} context 5412 */ 5413 loadAndPerform(xml, format, context) { 5414 if (format.rationalVectors()) { 5415 this.mNewAxis = format.parseSegment$org_w3c_dom_Element$java_lang_String$java_lang_String(xml, "start", "end"); 5416 } else { 5417 const attrs = format.loadCommandAttributes$org_w3c_dom_Element(xml); 5418 this.mNewAxis = attrs.get("new"); 5419 } 5420 context.performAndRecord(this); 5421 } 5422 /** 5423 * 5424 */ 5425 perform() { 5426 if (this.mNewAxis == null) { 5427 this.mNewAxis = this.mEditor.getSelectedConstruction(Segment); 5428 if (this.mNewAxis == null) throw new Command.Failure("Selection is not a single strut."); 5429 } 5430 this.redo(); 5431 } 5432 /** 5433 * 5434 * @return {boolean} 5435 */ 5436 isDestructive() { 5437 return true; 5438 } 5439 /** 5440 * 5441 * @return {boolean} 5442 */ 5443 isSticky() { 5444 return false; 5445 } 5446}; 5447SymmetryAxisChange["__class"] = "com.vzome.core.edits.SymmetryAxisChange"; 5448
5449// src/worker/legacy/from-java/com/vzome/core/edits/SymmetryCenterChange.ts 5450var SymmetryCenterChange = class extends UndoableEdit { 5451 constructor(editor, newCenter) { 5452 if ((editor != null && (editor.constructor != null && editor.constructor["__interfaces"] != null && editor.constructor["__interfaces"].indexOf("com.vzome.core.editor.api.ImplicitSymmetryParameters") >= 0) || editor === null) && (newCenter != null && newCenter instanceof Point || newCenter === null)) { 5453 let __args = arguments; 5454 super(); 5455 if (this.mOldCenter === void 0) { 5456 this.mOldCenter = null; 5457 } 5458 if (this.mNewCenter === void 0) { 5459 this.mNewCenter = null; 5460 } 5461 if (this.editor === void 0) { 5462 this.editor = null; 5463 } 5464 this.mOldCenter = editor.getCenterPoint(); 5465 this.mNewCenter = newCenter; 5466 this.editor = editor; 5467 } else if ((editor != null && (editor.constructor != null && editor.constructor["__interfaces"] != null && editor.constructor["__interfaces"].indexOf("com.vzome.core.editor.api.ImplicitSymmetryParameters") >= 0) || editor === null) && newCenter === void 0) { 5468 let __args = arguments; 5469 { 5470 let __args2 = arguments; 5471 let newCenter2 = null; 5472 super(); 5473 if (this.mOldCenter === void 0) { 5474 this.mOldCenter = null; 5475 } 5476 if (this.mNewCenter === void 0) { 5477 this.mNewCenter = null; 5478 } 5479 if (this.editor === void 0) { 5480 this.editor = null; 5481 } 5482 this.mOldCenter = editor.getCenterPoint(); 5483 this.mNewCenter = newCenter2; 5484 this.editor = editor; 5485 } 5486 } else throw new Error("invalid overload"); 5487 } 5488 configure(props) { 5489 const man = props.get("picked"); 5490 if (man != null) this.mNewCenter = man.getFirstConstruction(); 5491 } 5492 /** 5493 * 5494 * @return {boolean} 5495 */ 5496 isNoOp() { 5497 return this.mNewCenter == null || this.mNewCenter.getLocation().equals(this.mOldCenter.getLocation()); 5498 } 5499 /** 5500 * 5501 * @return {boolean} 5502 */ 5503 isVisible() { 5504 return false; 5505 } 5506 /** 5507 * 5508 */ 5509 redo() { 5510 if (this.isNoOp()) return; 5511 this.editor.setCenterPoint(this.mNewCenter); 5512 } 5513 /** 5514 * 5515 */ 5516 undo() { 5517 if (this.isNoOp()) return; 5518 this.editor.setCenterPoint(this.mOldCenter); 5519 } 5520 /** 5521 * 5522 * @param {*} doc 5523 * @return {*} 5524 */ 5525 getXml(doc) { 5526 const result = doc.createElement("SymmetryCenterChange"); 5527 XmlSaveFormat.serializePoint(result, "new", this.mNewCenter); 5528 return result; 5529 } 5530 /** 5531 * 5532 * @param {*} doc 5533 * @return {*} 5534 */ 5535 getDetailXml(doc) { 5536 return this.getXml(doc); 5537 } 5538 /** 5539 * 5540 * @param {*} xml 5541 * @param {XmlSaveFormat} format 5542 * @param {*} context 5543 */ 5544 loadAndPerform(xml, format, context) { 5545 if (format.rationalVectors()) { 5546 this.mNewCenter = format.parsePoint$org_w3c_dom_Element$java_lang_String(xml, "new"); 5547 } else { 5548 const attrs = format.loadCommandAttributes$org_w3c_dom_Element(xml); 5549 const center = attrs.get("new"); 5550 this.mNewCenter = new FreePoint(center.getLocation().projectTo3d(true)); 5551 } 5552 context.performAndRecord(this); 5553 } 5554 /** 5555 * 5556 */ 5557 perform() { 5558 if (this.mNewCenter == null) { 5559 this.mNewCenter = this.editor.getSelectedConstruction(Point); 5560 if (this.mNewCenter == null) throw new Command.Failure("Selection is not a single ball."); 5561 } 5562 this.redo(); 5563 } 5564 /** 5565 * 5566 * @return {boolean} 5567 */ 5568 isDestructive() { 5569 return true; 5570 } 5571 /** 5572 * 5573 * @return {boolean} 5574 */ 5575 isSticky() { 5576 return false; 5577 } 5578}; 5579SymmetryCenterChange["__class"] = "com.vzome.core.edits.SymmetryCenterChange"; 5580
5581// src/worker/legacy/from-java/com/vzome/core/editor/CommandEdit.ts 5582var CommandEdit = class _CommandEdit extends ChangeManifestations { 5583 static logger_$LI$() { 5584 if (_CommandEdit.logger == null) { 5585 _CommandEdit.logger = java.util.logging.Logger.getLogger("com.vzome.core.editor.CommandEdit"); 5586 } 5587 return _CommandEdit.logger; 5588 } 5589 static loadAndPerformLgger_$LI$() { 5590 if (_CommandEdit.loadAndPerformLgger == null) { 5591 _CommandEdit.loadAndPerformLgger = java.util.logging.Logger.getLogger("com.vzome.core.editor.CommandEdit.loadAndPerform"); 5592 } 5593 return _CommandEdit.loadAndPerformLgger; 5594 } 5595 constructor(cmd, editor) { 5596 super(editor); 5597 if (this.mEditorModel === void 0) { 5598 this.mEditorModel = null; 5599 } 5600 if (this.mCommand === void 0) { 5601 this.mCommand = null; 5602 } 5603 if (this.mAttrs === void 0) { 5604 this.mAttrs = null; 5605 } 5606 this.mEditorModel = editor; 5607 this.mCommand = cmd; 5608 } 5609 /** 5610 * 5611 * @return {boolean} 5612 */ 5613 groupingAware() { 5614 return true; 5615 } 5616 /** 5617 * 5618 * @return {string} 5619 */ 5620 getXmlElementName() { 5621 const cmdName = ( 5622 /* getName */ 5623 ((c) => typeof c === "string" ? c : c["__class"] ? c["__class"] : c["name"])(this.mCommand.constructor) 5624 ); 5625 const lastDot = cmdName.lastIndexOf("."); 5626 return cmdName.substring(lastDot + 1 + "Command".length); 5627 } 5628 /** 5629 * 5630 * @param {*} result 5631 */ 5632 getXmlAttributes(result) { 5633 this.mCommand.getXml(result, this.mAttrs); 5634 } 5635 /** 5636 * 5637 * @param {*} xml 5638 * @param {XmlSaveFormat} format 5639 */ 5640 setXmlAttributes(xml, format) { 5641 this.mAttrs = this.mCommand.setXml(xml, format); 5642 this.mAttrs.put(Command.LOADING_FROM_FILE, javaemul.internal.BooleanHelper.TRUE); 5643 } 5644 /** 5645 * 5646 */ 5647 perform() { 5648 const isHide = this.mCommand != null && this.mCommand instanceof CommandHide; 5649 if (_CommandEdit.logger_$LI$().isLoggable(java.util.logging.Level.FINER)) { 5650 _CommandEdit.logger_$LI$().finer("------------------- CommandEdit"); 5651 } 5652 if (this.mCommand.ordersSelection()) this.setOrderedSelection(true); 5653 const constrsBefore = new ConstructionList(); 5654 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 5655 let man = index.next(); 5656 { 5657 if (_CommandEdit.logger_$LI$().isLoggable(java.util.logging.Level.FINER)) { 5658 _CommandEdit.logger_$LI$().finer("----------- manifestation: " + man.toString()); 5659 for (const iterator = man.getConstructions(); iterator.hasNext(); ) { 5660 { 5661 const c = iterator.next(); 5662 _CommandEdit.logger_$LI$().finer(" " + c.toString()); 5663 } 5664 ; 5665 } 5666 } 5667 this.unselect$com_vzome_core_model_Manifestation(man); 5668 if (isHide) this.hideManifestation(man); 5669 else { 5670 const construction = man.getFirstConstruction(); 5671 constrsBefore.add(construction); 5672 } 5673 } 5674 } 5675 this.redo(); 5676 if (isHide) return; 5677 if (this.mAttrs == null) this.mAttrs = new AttributeMap(); 5678 const symmAxis = this.mEditorModel.getSymmetrySegment(); 5679 if (symmAxis != null) this.mAttrs.put(CommandTransform.SYMMETRY_AXIS_ATTR_NAME, symmAxis); 5680 this.mAttrs.put(CommandTransform.SYMMETRY_CENTER_ATTR_NAME, this.mEditorModel.getCenterPoint()); 5681 this.mAttrs.put(Command.FIELD_ATTR_NAME, this.mManifestations.getField()); 5682 const news = new _CommandEdit.NewConstructions(); 5683 let selectionAfter = null; 5684 const signature = this.mCommand.getParameterSignature(); 5685 const actualsLen = constrsBefore.size(); 5686 if (signature.length === actualsLen || signature.length === 1 && /* equals */ 5687 ((o1, o2) => o1 && o1.equals ? o1.equals(o2) : o1 === o2)(signature[0][0], Command.GENERIC_PARAM_NAME)) { 5688 try { 5689 selectionAfter = this.mCommand.apply(constrsBefore, this.mAttrs, news); 5690 } catch (f) { 5691 this.undo(); 5692 throw f; 5693 } 5694 } else if (signature.length > actualsLen) { 5695 this.fail("Too few objects in the selection."); 5696 } else if (signature.length === 1) { 5697 let partial; 5698 selectionAfter = new ConstructionList(); 5699 for (let i = 0; i < actualsLen; i++) { 5700 { 5701 const param = constrsBefore.get(i); 5702 const formalClass = signature[0][1]; 5703 if (formalClass === Point && (param != null && param instanceof Point) || formalClass === Segment && (param != null && param instanceof Segment)) { 5704 const single = new ConstructionList(); 5705 single.addConstruction(param); 5706 partial = this.mCommand.apply(single, this.mAttrs, news); 5707 selectionAfter.addAll(partial); 5708 } else selectionAfter.add(param); 5709 } 5710 ; 5711 } 5712 } else this.fail("Too many objects in the selection."); 5713 for (let index = news.iterator(); index.hasNext(); ) { 5714 let c = index.next(); 5715 { 5716 this.manifestConstruction(c); 5717 } 5718 } 5719 for (let index = selectionAfter.iterator(); index.hasNext(); ) { 5720 let cons = index.next(); 5721 { 5722 if (cons.failed()) { 5723 _CommandEdit.logBugAccommodation("failed construction"); 5724 this.mEditorModel.addFailedConstruction(cons); 5725 continue; 5726 } 5727 const man = this.manifestConstruction(cons); 5728 if (man != null) this.select$com_vzome_core_model_Manifestation(man); 5729 } 5730 } 5731 this.redo(); 5732 } 5733 /** 5734 * 5735 * @param {*} xml 5736 * @param {XmlSaveFormat} format 5737 * @param {*} context 5738 */ 5739 loadAndPerform(xml, format, context) {
5740 let cmdName = null; 5741 if (format.selectionsNotSaved()) cmdName = xml.getLocalName(); 5742 else if (format.commandEditsCompacted()) cmdName = "Command" + xml.getLocalName(); 5743 else cmdName = xml.getAttribute("command"); 5744 if (cmdName === "CommandIcosahedralSymmetry") cmdName = "CommandSymmetry"; 5745 this.mCommand = context.createLegacyCommand(cmdName); 5746 if (format.selectionsNotSaved()) { 5747 const selectedBefore = new java.util.LinkedHashSet(); 5748 context.performAndRecord(new BeginBlock(null)); 5749 this.mAttrs = new AttributeMap(); 5750 const nodes = xml.getChildNodes(); 5751 for (let j = 0; j < nodes.getLength(); j++) { 5752 { 5753 const kid2 = nodes.item(j); 5754 if (kid2 != null && (kid2.constructor != null && kid2.constructor["__interfaces"] != null && kid2.constructor["__interfaces"].indexOf("org.w3c.dom.Element") >= 0)) { 5755 const attrOrParam = kid2; 5756 const apName = attrOrParam.getLocalName(); 5757 if (apName === "attr") { 5758 let attrName = attrOrParam.getAttribute("name"); 5759 if ( 5760 /* endsWith */ 5761 ((str, searchString) => { 5762 let pos = str.length - searchString.length; 5763 let lastIndex = str.indexOf(searchString, pos); 5764 return lastIndex !== -1 && lastIndex === pos; 5765 })(attrName, ".symmetry.center") 5766 ) attrName = CommandTransform.SYMMETRY_CENTER_ATTR_NAME; 5767 else if (attrName === "reflection.mirror.normal.segment") attrName = CommandTransform.SYMMETRY_AXIS_ATTR_NAME; 5768 const val = DomUtils.getFirstChildElement$org_w3c_dom_Element(attrOrParam); 5769 let valName = val.getLocalName(); 5770 if (valName === "FreePoint") valName = "point"; 5771 let value = format.parseAlgebraicObject(valName, val); 5772 if (value === XmlSaveFormat.NOT_AN_ATTRIBUTE_$LI$()) value = format.parseConstruction$java_lang_String$org_w3c_dom_Element(valName, val); 5773 if (attrName === CommandTransform.SYMMETRY_CENTER_ATTR_NAME) { 5774 const c = new FreePoint(value.getLocation().projectTo3d(true)); 5775 context.performAndRecord(new SymmetryCenterChange(this.mEditorModel, c)); 5776 } else if (attrName === CommandTransform.SYMMETRY_AXIS_ATTR_NAME) { 5777 context.performAndRecord(new SymmetryAxisChange(this.mEditorModel, value)); 5778 if (!this.mCommand.attributeIs3D(attrName)) { 5779 const vector = value.getOffset(); 5780 this.mCommand.setQuaternion(vector); 5781 } 5782 } else this.mAttrs.put(attrName, value); 5783 } else { 5784 const c = format.parseConstruction$java_lang_String$org_w3c_dom_Element(apName, attrOrParam); 5785 if (c != null) { 5786 if (this.mEditorModel.hasFailedConstruction(c)) { 5787 _CommandEdit.logBugAccommodation("skip selecting a failed construction"); 5788 continue; 5789 } 5790 const m = this.getManifestation(c); 5791 if (m == null || m.isUnnecessary()) { 5792 _CommandEdit.loadAndPerformLgger_$LI$().severe("CommandEdit parameter: " + attrOrParam.toString()); 5793 throw new Command.Failure("no manifestation to be selected."); 5794 } 5795 if (!selectedBefore.contains(m)) selectedBefore.add(m); 5796 } 5797 } 5798 } 5799 } 5800 ; 5801 } 5802 if (selectedBefore.size() > (this.mManifestations.size() / 2 | 0)) { 5803 const toUnselect = new java.util.ArrayList(); 5804 for (let index = this.mManifestations.iterator(); index.hasNext(); ) { 5805 let m = index.next(); 5806 { 5807 if (!selectedBefore.contains(m)) toUnselect.add(m); 5808 } 5809 } 5810 let edit = new SelectAll(this.mEditorModel); 5811 context.performAndRecord(edit); 5812 for (let index = toUnselect.iterator(); index.hasNext(); ) { 5813 let m = index.next(); 5814 { 5815 edit = new SelectManifestation(this.mEditorModel, m); 5816 context.performAndRecord(edit); 5817 } 5818 } 5819 } else { 5820 let edit = new DeselectAll(this.mEditorModel); 5821 context.performAndRecord(edit); 5822 for (let index = selectedBefore.iterator(); index.hasNext(); ) { 5823 let m = index.next(); 5824 { 5825 edit = new SelectManifestation(this.mEditorModel, m); 5826 context.performAndRecord(edit); 5827 } 5828 } 5829 } 5830 context.performAndRecord(new EndBlock(null)); 5831 this.redo(); 5832 if (this.mCommand != null && this.mCommand instanceof CommandObliquePentagon) { 5833 const edit = new AffinePentagon(this.mEditorModel); 5834 context.performAndRecord(edit); 5835 return; 5836 } 5837 this.mCommand.setFixedAttributes(this.mAttrs, format); 5838 this.mAttrs.put(Command.LOADING_FROM_FILE, javaemul.internal.BooleanHelper.TRUE); 5839 context.performAndRecord(this); 5840 } else super.loadAndPerform(xml, format, context); 5841 } 5842}; 5843CommandEdit["__class"] = "com.vzome.core.editor.CommandEdit"; 5844((CommandEdit2) => { 5845 class NewConstructions extends java.util.ArrayList { 5846 constructionAdded$com_vzome_core_construction_Construction(c) { 5847 this.add(c); 5848 } 5849 constructionAdded$com_vzome_core_construction_Construction$com_vzome_core_construction_Color(c, c
5849olor) { 5850 this.add(c); 5851 } 5852 /** 5853 * 5854 * @param {Construction} c 5855 * @param {Color} color 5856 */ 5857 constructionAdded(c, color) { 5858 if ((c != null && c instanceof Construction || c === null) && (color != null && color instanceof Color || color === null)) { 5859 return this.constructionAdded$com_vzome_core_construction_Construction$com_vzome_core_construction_Color(c, color); 5860 } else if ((c != null && c instanceof Construction || c === null) && color === void 0) { 5861 return this.constructionAdded$com_vzome_core_construction_Construction(c); 5862 } else throw new Error("invalid overload"); 5863 } 5864 constructor() { 5865 super(); 5866 } 5867 } 5868 CommandEdit2.NewConstructions = NewConstructions; 5869 NewConstructions["__class"] = "com.vzome.core.editor.CommandEdit.NewConstructions"; 5870 NewConstructions["__interfaces"] = ["java.util.RandomAccess", "java.util.List", "java.lang.Cloneable", "com.vzome.core.construction.ConstructionChanges", "java.util.Collection", "java.lang.Iterable", "java.io.Serializable"]; 5871})(CommandEdit || (CommandEdit = {})); 5872
5873// src/worker/legacy/from-java/com/vzome/core/construction/PointReflection.ts 5874var PointReflection = class extends Transformation { 5875 constructor(center) { 5876 super(center.field); 5877 if (this.mCenter === void 0) { 5878 this.mCenter = null; 5879 } 5880 this.mCenter = center; 5881 this.mapParamsToState(); 5882 } 5883 /** 5884 * 5885 * @return {boolean} 5886 */ 5887 mapParamsToState() { 5888 if (this.mCenter.isImpossible()) this.setStateVariables(null, null, true); 5889 const loc = this.mCenter.getLocation().projectTo3d(true); 5890 return this.setStateVariables(null, loc, false); 5891 } 5892 transform$com_vzome_core_algebra_AlgebraicVector(arg) { 5893 arg = arg.minus(this.mOffset); 5894 arg = this.mOffset.minus(arg); 5895 return arg; 5896 } 5897 /** 5898 * 5899 * @param {AlgebraicVector} arg 5900 * @return {AlgebraicVector} 5901 */ 5902 transform(arg) { 5903 if (arg != null && arg instanceof AlgebraicVector || arg === null) { 5904 return this.transform$com_vzome_core_algebra_AlgebraicVector(arg); 5905 } else if (arg != null && arg instanceof Construction || arg === null) { 5906 return this.transform$com_vzome_core_construction_Construction(arg); 5907 } else throw new Error("invalid overload"); 5908 } 5909}; 5910PointReflection["__class"] = "com.vzome.core.construction.PointReflection"; 5911
5912// src/worker/legacy/from-java/com/vzome/core/commands/CommandCentralSymmetry.ts 5913var CommandCentralSymmetry = class extends CommandTransform { 5914 /** 5915 * 5916 * @return {java.lang.Object[][]} 5917 */ 5918 getAttributeSignature() { 5919 return CommandTransform.ATTR_SIGNATURE_$LI$(); 5920 } 5921 /** 5922 * 5923 * @param {ConstructionList} parameters 5924 * @param {AttributeMap} attributes 5925 * @param {*} effects 5926 * @return {ConstructionList} 5927 */ 5928 apply(parameters, attributes, effects) { 5929 const output = new ConstructionList(); 5930 const center = attributes.get(CommandTransform.SYMMETRY_CENTER_ATTR_NAME); 5931 const params = parameters.getConstructions(); 5932 for (let index = 0; index < params.length; index++) { 5933 let param = params[index]; 5934 { 5935 output.addConstruction(param); 5936 } 5937 } 5938 const transform = new PointReflection(center); 5939 effects["constructionAdded$com_vzome_core_construction_Construction"](transform); 5940 return this.transform(params, transform, effects); 5941 } 5942 constructor() { 5943 super(); 5944 } 5945}; 5946CommandCentralSymmetry["__class"] = "com.vzome.core.commands.CommandCentralSymmetry"; 5947CommandCentralSymmetry["__interfaces"] = ["com.vzome.core.commands.Command"]; 5948
5949// src/worker/legacy/from-java/com/vzome/core/construction/CentroidPoint.ts 5950var CentroidPoint = class extends Point { 5951 constructor(points) { 5952 super(points[0].field); 5953 if (this.mPoints === void 0) { 5954 this.mPoints = null; 5955 } 5956 this.mPoints = points; 5957 this.mapParamsToState(); 5958 } 5959 /** 5960 * 5961 * @return {boolean} 5962 */ 5963 mapParamsToState() { 5964 let centroid = this.mPoints[0].getLocation(); 5965 let num = 1; 5966 for (let i = 1; i < this.mPoints.length; i++) { 5967 { 5968 centroid = centroid.plus(this.mPoints[i].getLocation()); 5969 num++; 5970 } 5971 ; 5972 } 5973 centroid = centroid.scale(this.field["createRational$long$long"](1, num)); 5974 return this.setStateVariable(centroid, false); 5975 } 5976}; 5977CentroidPoint["__class"] = "com.vzome.core.construction.CentroidPoint"; 5978
5979// src/worker/legacy/from-java/com/vzome/core/commands/CommandCentroid.ts 5980var CommandCentroid = class _CommandCentroid extends AbstractCommand { 5981 static PARAM_SIGNATURE_$LI$() { 5982 if (_CommandCentroid.PARAM_SIGNATURE == null) { 5983 _CommandCentroid.PARAM_SIGNATURE = [[Command.GENERIC_PARAM_NAME, Point]]; 5984 } 5985 return _CommandCentroid.PARAM_SIGNATURE; 5986 } 5987 static ATTR_SIGNATURE_$LI$() { 5988 if (_CommandCentroid.ATTR_SIGNATURE == null) { 5989 _CommandCentroid.ATTR_SIGNATURE = []; 5990 } 5991 return _CommandCentroid.ATTR_SIGNATURE; 5992 } 5993 /** 5994 * 5995 * @return {java.lang.Object[][]} 5996 */ 5997 getParameterSignature() { 5998 return _CommandCentroid.PARAM_SIGNATURE_$LI$(); 5999 } 6000 /** 6001 * 6002 * @return {java.lang.Object[][]} 6003 */ 6004 getAttributeSignature() { 6005 return _CommandCentroid.ATTR_SIGNATURE_$LI$(); 6006 } 6007 /** 6008 * 6009 * @param {ConstructionList} parameters 6010 * @param {AttributeMap} attrs 6011 * @param {*} effects 6012 * @return {ConstructionList} 6013 */ 6014 apply(parameters, attrs, effects) { 6015 const result = new ConstructionList(); 6016 if (parameters == null || parameters.size() === 0) throw new Command.Failure("Select two or more balls to compute their centroid."); 6017 const params = parameters.getConstructions(); 6018 const verticesList = new java.util.ArrayList(); 6019 for (let index = 0; index < params.length; index++) { 6020 let param = params[index]; 6021 { 6022 if (param != null && param instanceof Point) { 6023 verticesList.add(param); 6024 } 6025 } 6026 } 6027 if (verticesList.isEmpty()) throw new Command.Failure("Select two or more balls to compute their centroid."); 6028 const points = []; 6029 const centroid = new CentroidPoint(verticesList.toArray(points)); 6030 effects["constructionAdded$com_vzome_core_construction_Construction"](centroid); 6031 result.addConstruction(centroid); 6032 return result; 6033 } 6034 constructor() { 6035 super(); 6036 } 6037}; 6038CommandCentroid["__class"] = "com.vzome.core.commands.CommandCentroid"; 6039CommandCentroid["__interfaces"] = ["com.vzome.core.commands.Command"]; 6040
6041// src/worker/legacy/from-java/com/vzome/core/construction/SegmentMidpoint.ts 6042var SegmentMidpoint = class extends Point { 6043 constructor(seg) { 6044 super(seg.field); 6045 if (this.mSegment === void 0) { 6046 this.mSegment = null; 6047 } 6048 this.mSegment = seg; 6049 this.mapParamsToState(); 6050 } 6051 /** 6052 * 6053 * @return {boolean} 6054 */ 6055 mapParamsToState() { 6056 if (this.mSegment.isImpossible()) return this.setStateVariable(null, true); 6057 const half = this.field["createRational$long$long"](1, 2); 6058 let loc = this.mSegment.getStart(); 6059 loc = loc.plus(this.mSegment.getOffset().scale(half)); 6060 return this.setStateVariable(loc, false); 6061 } 6062}; 6063SegmentMidpoint["__class"] = "com.vzome.core.construction.SegmentMidpoint"; 6064
6065// src/worker/legacy/from-java/com/vzome/core/commands/CommandMidpoint.ts 6066var CommandMidpoint = class _CommandMidpoint extends AbstractCommand { 6067 static PARAM_SIGNATURE_$LI$() { 6068 if (_CommandMidpoint.PARAM_SIGNATURE == null) { 6069 _CommandMidpoint.PARAM_SIGNATURE = [["segment", Segment]]; 6070 } 6071 return _CommandMidpoint.PARAM_SIGNATURE; 6072 } 6073 static ATTR_SIGNATURE_$LI$() { 6074 if (_CommandMidpoint.ATTR_SIGNATURE == null) { 6075 _CommandMidpoint.ATTR_SIGNATURE = []; 6076 } 6077 return _CommandMidpoint.ATTR_SIGNATURE; 6078 } 6079 /** 6080 * 6081 * @return {java.lang.Object[][]} 6082 */ 6083 getParameterSignature() { 6084 return _CommandMidpoint.PARAM_SIGNATURE_$LI$(); 6085 } 6086 /** 6087 * 6088 * @return {java.lang.Object[][]} 6089 */ 6090 getAttributeSignature() { 6091 return _CommandMidpoint.ATTR_SIGNATURE_$LI$(); 6092 } 6093 /** 6094 * 6095 * @param {ConstructionList} parameters 6096 * @param {AttributeMap} attrs 6097 * @param {*} effects 6098 * @return {ConstructionList} 6099 */ 6100 apply(parameters, attrs, effects) { 6101 const result = new ConstructionList(); 6102 if (parameters == null || parameters.size() !== 1) throw new Command.Failure("Midpoint can only apply to a single strut."); 6103 try { 6104 const segment = parameters.get(0); 6105 const midpoint = new SegmentMidpoint(segment); 6106 result.addConstruction(midpoint); 6107 effects["constructionAdded$com_vzome_core_construction_Construction"](midpoint); 6108 } catch (e) { 6109 throw new Command.Failure("Midpoint can only apply to a strut."); 6110 } 6111 return result; 6112 } 6113 constructor() { 6114 super(); 6115 } 6116}; 6117CommandMidpoint["__class"] = "com.vzome.core.commands.CommandMidpoint"; 6118CommandMidpoint["__interfaces"] = ["com.vzome.core.commands.Command"]; 6119
6120// src/worker/legacy/from-java/com/vzome/core/construction/Plane.ts 6121var Plane = class extends Construction { 6122 constructor(field5) { 6123 super(field5); 6124 if (this.mBase === void 0) { 6125 this.mBase = null; 6126 } 6127 if (this.mNormal === void 0) { 6128 this.mNormal = null; 6129 } 6130 } 6131 /** 6132 * 6133 * @return {boolean} 6134 */ 6135 is3d() { 6136 return true; 6137 } 6138 setStateVariables(base, normal, impossible) { 6139 if (impossible) { 6140 if (this.isImpossible()) return false; 6141 this.setImpossible(true); 6142 return true; 6143 } 6144 if (normal.equals(this.mNormal) && !this.isImpossible() && base.equals(this.mBase)) return false; 6145 normal = normal.projectTo3d(true); 6146 this.mNormal = normal; 6147 this.mBase = base.projectTo3d(true); 6148 this.setImpossible(false); 6149 return true; 6150 } 6151 getBase() { 6152 return this.mBase; 6153 } 6154 getNormal() { 6155 return this.mNormal; 6156 } 6157 /** 6158 * 6159 * @param {*} doc 6160 * @return {*} 6161 */ 6162 getXml(doc) { 6163 const result = doc.createElement("plane"); 6164 return result; 6165 } 6166 getHomogeneous() { 6167 return null; 6168 } 6169}; 6170Plane["__class"] = "com.vzome.core.construction.Plane"; 6171
6172// src/worker/legacy/from-java/com/vzome/core/construction/PlaneFromNormalSegment.ts 6173var PlaneFromNormalSegment = class extends Plane { 6174 constructor(intersection, normal) { 6175 super(intersection.field); 6176 if (this.__com_vzome_core_construction_PlaneFromNormalSegment_mNormal === void 0) { 6177 this.__com_vzome_core_construction_PlaneFromNormalSegment_mNormal = null; 6178 } 6179 if (this.mIntersection === void 0) { 6180 this.mIntersection = null; 6181 } 6182 this.__com_vzome_core_construction_PlaneFromNormalSegment_mNormal = normal; 6183 this.mIntersection = intersection; 6184 this.mapParamsToState(); 6185 } 6186 /** 6187 * 6188 * @return {boolean} 6189 */ 6190 mapParamsToState() { 6191 if (this.__com_vzome_core_construction_PlaneFromNormalSegment_mNormal.isImpossible() || this.mIntersection.isImpossible()) return this.setStateVariables(null, null, true); 6192 return this.setStateVariables(this.mIntersection.getLocation(), this.__com_vzome_core_construction_PlaneFromNormalSegment_mNormal.getOffset(), false); 6193 } 6194}; 6195PlaneFromNormalSegment["__class"] = "com.vzome.core.construction.PlaneFromNormalSegment"; 6196
6197// src/worker/legacy/from-java/com/vzome/core/construction/PlaneReflection.ts 6198var PlaneReflection = class extends Transformation { 6199 constructor(mirror) { 6200 super(mirror.field); 6201 if (this.mMirror === void 0) { 6202 this.mMirror = null; 6203 } 6204 if (this.mNormal === void 0) { 6205 this.mNormal = null; 6206 } 6207 if (this.mBase === void 0) { 6208 this.mBase = null; 6209 } 6210 if (this.mNormDotReciprocal === void 0) { 6211 this.mNormDotReciprocal = null; 6212 } 6213 this.mMirror = mirror; 6214 this.mNormal = mirror.getNormal(); 6215 this.mBase = mirror.getBase(); 6216 this.mNormDotReciprocal = this.mNormal.dot(this.mNormal).reciprocal(); 6217 this.mapParamsToState(); 6218 } 6219 /** 6220 * 6221 * @return {boolean} 6222 */ 6223 mapParamsToState() { 6224 if (this.mMirror.isImpossible()) this.setStateVariables(null, null, true); 6225 const loc = this.mMirror.getBase(); 6226 return this.setStateVariables(null, loc, false); 6227 } 6228 transform$com_vzome_core_algebra_AlgebraicVector(arg) { 6229 arg = arg.minus(this.mBase); 6230 let xy = arg.dot(this.mNormal); 6231 xy = xy["times$com_vzome_core_algebra_AlgebraicNumber"](this.field["createRational$long"](2)); 6232 arg = arg.minus(this.mNormal.scale(xy["times$com_vzome_core_algebra_AlgebraicNumber"](this.mNormDotReciprocal))); 6233 return arg.plus(this.mBase); 6234 } 6235 /** 6236 * 6237 * @param {AlgebraicVector} arg 6238 * @return {AlgebraicVector} 6239 */ 6240 transform(arg) { 6241 if (arg != null && arg instanceof AlgebraicVector || arg === null) { 6242 return this.transform$com_vzome_core_algebra_AlgebraicVector(arg); 6243 } else if (arg != null && arg instanceof Construction || arg === null) { 6244 return this.transform$com_vzome_core_construction_Construction(arg); 6245 } else throw new Error("invalid overload"); 6246 } 6247}; 6248PlaneReflection["__class"] = "com.vzome.core.construction.PlaneReflection"; 6249
6250// src/worker/legacy/from-java/com/vzome/core/commands/CommandMirrorSymmetry.ts 6251var CommandMirrorSymmetry = class extends CommandTransform { 6252 /** 6253 * 6254 * @param {ConstructionList} parameters 6255 * @param {AttributeMap} attributes 6256 * @param {*} effects 6257 * @return {ConstructionList} 6258 */ 6259 apply(parameters, attributes, effects) { 6260 const center = attributes.get(CommandTransform.SYMMETRY_CENTER_ATTR_NAME); 6261 const norm = attributes.get(CommandTransform.SYMMETRY_AXIS_ATTR_NAME); 6262 if (norm == null) { 6263 throw new Command.Failure("no symmetry axis provided"); 6264 } 6265 const params = parameters.getConstructions(); 6266 const mirror = new PlaneFromNormalSegment(center, norm); 6267 effects["constructionAdded$com_vzome_core_construction_Construction"](mirror); 6268 const transform = new PlaneReflection(mirror); 6269 return this.transform(params, transform, effects); 6270 } 6271 constructor() { 6272 super(); 6273 } 6274}; 6275CommandMirrorSymmetry["__class"] = "com.vzome.core.commands.CommandMirrorSymmetry"; 6276CommandMirrorSymmetry["__interfaces"] = ["com.vzome.core.commands.Command"]; 6277
6278// src/worker/legacy/from-java/com/vzome/core/commands/CommandPolygon.ts 6279var CommandPolygon = class _CommandPolygon extends AbstractCommand { 6280 static PARAM_SIGNATURE_$LI$() { 6281 if (_CommandPolygon.PARAM_SIGNATURE == null) { 6282 _CommandPolygon.PARAM_SIGNATURE = [[Command.GENERIC_PARAM_NAME, Point]]; 6283 } 6284 return _CommandPolygon.PARAM_SIGNATURE; 6285 } 6286 static ATTR_SIGNATURE_$LI$() { 6287 if (_CommandPolygon.ATTR_SIGNATURE == null) { 6288 _CommandPolygon.ATTR_SIGNATURE = []; 6289 } 6290 return _CommandPolygon.ATTR_SIGNATURE; 6291 } 6292 /** 6293 * 6294 * @return {java.lang.Object[][]} 6295 */ 6296 getParameterSignature() { 6297 return _CommandPolygon.PARAM_SIGNATURE_$LI$(); 6298 } 6299 /** 6300 * 6301 * @return {java.lang.Object[][]} 6302 */ 6303 getAttributeSignature() { 6304 return _CommandPolygon.ATTR_SIGNATURE_$LI$(); 6305 } 6306 /** 6307 * 6308 * @return {boolean} 6309 */ 6310 ordersSelection() { 6311 return true; 6312 } 6313 /** 6314 * 6315 * @param {ConstructionList} parameters 6316 * @param {AttributeMap} attrs 6317 * @param {*} effects 6318 * @return {ConstructionList} 6319 */ 6320 apply(parameters, attrs, effects) { 6321 const points = new java.util.ArrayList(); 6322 { 6323 let array = parameters.getConstructions(); 6324 for (let index = 0; index < array.length; index++) { 6325 let param = array[index]; 6326 { 6327 if (param != null && param instanceof Point) { 6328 points.add(param); 6329 } 6330 } 6331 } 6332 } 6333 let errorMsg = null; 6334 if (points.size() < 3) { 6335 errorMsg = "A polygon requires at least three vertices."; 6336 } else if (points.get(0).is3d() && points.get(1).is3d() && points.get(1).is3d()) { 6337 const normal = AlgebraicVectors.getNormal$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector(points.get(0).getLocation(), points.get(1).getLocation(), points.get(2).getLocation()); 6338 if (normal.isOrigin()) { 6339 errorMsg = "First 3 points cannot be collinear."; 6340 } else { 6341 let base = null; 6342 for (let index = points.iterator(); index.hasNext(); ) { 6343 let point = index.next(); 6344 { 6345 if (base == null) { 6346 base = point.getLocation(); 6347 } else { 6348 if (!point.getLocation().minus(base).dot(normal).isZero()) { 6349 errorMsg = "Points are not coplanar."; 6350 break; 6351 } 6352 } 6353 } 6354 } 6355 } 6356 } 6357 if (errorMsg != null && attrs.get(Command.LOADING_FROM_FILE) == null) { 6358 throw new Command.Failure(errorMsg); 6359 } 6360 const poly = new PolygonFromVertices(points); 6361 if (errorMsg != null) { 6362 poly.setFailed(); 6363 } else { 6364 effects["constructionAdded$com_vzome_core_construction_Construction"](poly); 6365 } 6366 const result = new ConstructionList(); 6367 result.addConstruction(poly); 6368 return result; 6369 } 6370 constructor() { 6371 super(); 6372 } 6373}; 6374CommandPolygon["__class"] = "com.vzome.core.commands.CommandPolygon"; 6375CommandPolygon["__interfaces"] = ["com.vzome.core.commands.Command"]; 6376
6377// src/worker/legacy/from-java/com/vzome/core/commands/CommandTranslate.ts 6378var CommandTranslate = class extends CommandTransform { 6379 /** 6380 * 6381 * @param {ConstructionList} parameters 6382 * @param {AttributeMap} attributes 6383 * @param {*} effects 6384 * @return {ConstructionList} 6385 */ 6386 apply(parameters, attributes, effects) { 6387 const norm = attributes.get(CommandTransform.SYMMETRY_AXIS_ATTR_NAME); 6388 if (norm == null) { 6389 throw new Command.Failure("no symmetry axis provided"); 6390 } 6391 const params = parameters.getConstructions(); 6392 const field5 = norm.getField(); 6393 const offset = field5.projectTo3d(norm.getOffset(), true); 6394 const transform = new Translation(offset); 6395 return this.transform(params, transform, effects); 6396 } 6397 constructor() { 6398 super(); 6399 } 6400}; 6401CommandTranslate["__class"] = "com.vzome.core.commands.CommandTranslate"; 6402CommandTranslate["__interfaces"] = ["com.vzome.core.commands.Command"]; 6403
6404// src/worker/legacy/from-java/com/vzome/api/Tool.ts 6405var Tool2; 6406((Tool3) => { 6407 let Kind; 6408 ((Kind2) => { 6409 Kind2[Kind2["SYMMETRY"] = 0] = "SYMMETRY"; 6410 Kind2[Kind2["TRANSFORM"] = 1] = "TRANSFORM"; 6411 Kind2[Kind2["LINEAR_MAP"] = 2] = "LINEAR_MAP"; 6412 })(Kind = Tool3.Kind || (Tool3.Kind = {})); 6413})(Tool2 || (Tool2 = {})); 6414
6415// src/worker/legacy/from-java/com/vzome/core/construction/SymmetryTransformation.ts 6416var SymmetryTransformation = class extends Transformation { 6417 constructor(symm, orientation, center) { 6418 super(center.field); 6419 if (this.mCenter === void 0) { 6420 this.mCenter = null; 6421 } 6422 if (this.mSymmetry === void 0) { 6423 this.mSymmetry = null; 6424 } 6425 if (this.mOrientation === void 0) { 6426 this.mOrientation = 0; 6427 } 6428 this.mSymmetry = symm; 6429 this.mOrientation = orientation; 6430 this.mCenter = center; 6431 this.mapParamsToState(); 6432 } 6433 /** 6434 * 6435 * @return {boolean} 6436 */ 6437 mapParamsToState() { 6438 if (this.mCenter.isImpossible()) return this.setStateVariables(null, null, true); 6439 const loc = this.mCenter.getLocation().projectTo3d(true); 6440 const matrix = this.mSymmetry.getMatrix(this.mOrientation); 6441 return this.setStateVariables(matrix, loc, false); 6442 } 6443}; 6444SymmetryTransformation["__class"] = "com.vzome.core.construction.SymmetryTransformation"; 6445
6446// src/worker/legacy/from-java/com/vzome/core/commands/CommandSymmetry.ts 6447var CommandSymmetry = class extends CommandTransform { 6448 constructor(symmetry) { 6449 if (symmetry != null && (symmetry.constructor != null && symmetry.constructor["__interfaces"] != null && symmetry.constructor["__interfaces"].indexOf("com.vzome.core.math.symmetry.Symmetry") >= 0) || symmetry === null) { 6450 let __args = arguments; 6451 super(); 6452 if (this.mSymmetry === void 0) { 6453 this.mSymmetry = null; 6454 } 6455 this.mSymmetry = symmetry; 6456 } else if (symmetry === void 0) { 6457 let __args = arguments; 6458 { 6459 let __args2 = arguments; 6460 let symmetry2 = null; 6461 super(); 6462 if (this.mSymmetry === void 0) { 6463 this.mSymmetry = null; 6464 } 6465 this.mSymmetry = symmetry2; 6466 } 6467 } else throw new Error("invalid overload"); 6468 } 6469 /** 6470 * 6471 * @return {java.lang.Object[][]} 6472 */ 6473 getAttributeSignature() { 6474 return CommandTransform.GROUP_ATTR_SIGNATURE_$LI$(); 6475 } 6476 setSymmetry(attributes) { 6477 if (this.mSymmetry == null) this.mSymmetry = attributes.get(CommandTransform.SYMMETRY_GROUP_ATTR_NAME); 6478 else if (!attributes.containsKey(CommandTransform.SYMMETRY_GROUP_ATTR_NAME)) attributes.put(CommandTransform.SYMMETRY_GROUP_ATTR_NAME, this.mSymmetry); 6479 if (this.mSymmetry == null) throw new java.lang.IllegalStateException("null symmetry no longer supported"); 6480 const center = attributes.get(CommandTransform.SYMMETRY_CENTER_ATTR_NAME); 6481 return center; 6482 } 6483 /** 6484 * 6485 * @param {AttributeMap} attributes 6486 * @param {XmlSaveFormat} format 6487 */ 6488 setFixedAttributes(attributes, format) { 6489 if (!attributes.containsKey(CommandTransform.SYMMETRY_GROUP_ATTR_NAME)) { 6490 const icosahedralSymmetry = format.parseSymmetry("icosahedral"); 6491 attributes.put(CommandTransform.SYMMETRY_GROUP_ATTR_NAME, icosahedralSymmetry); 6492 } 6493 super.setFixedAttributes(attributes, format); 6494 } 6495 /** 6496 * 6497 * @param {ConstructionList} parameters 6498 * @param {AttributeMap} attributes 6499 * @param {*} effects 6500 * @return {ConstructionList} 6501 */ 6502 apply(parameters, attributes, effects) { 6503 const center = this.setSymmetry(attributes); 6504 const params = parameters.getConstructions(); 6505 const output = new ConstructionList(); 6506 for (let index = 0; index < params.length; index++) { 6507 let param = params[index]; 6508 { 6509 output.addConstruction(param); 6510 } 6511 } 6512 for (let i = 1; i < this.mSymmetry.getChiralOrder(); i++) { 6513 { 6514 const transform = new SymmetryTransformation(this.mSymmetry, i, center); 6515 output.addAll(this.transform(params, transform, effects)); 6516 } 6517 ; 6518 } 6519 return output; 6520 } 6521}; 6522CommandSymmetry["__class"] = "com.vzome.core.commands.CommandSymmetry"; 6523CommandSymmetry["__interfaces"] = ["com.vzome.core.commands.Command"]; 6524
6525// src/worker/legacy/from-java/com/vzome/core/commands/CommandTetrahedralSymmetry.ts 6526var CommandTetrahedralSymmetry = class _CommandTetrahedralSymmetry extends CommandSymmetry { 6527 static { 6528 this.SUBGROUP_ATTR_NAME = "symmetry.permutations"; 6529 } 6530 static ATTR_SIGNATURE_$LI$() { 6531 if (_CommandTetrahedralSymmetry.ATTR_SIGNATURE == null) { 6532 _CommandTetrahedralSymmetry.ATTR_SIGNATURE = [[CommandTransform.SYMMETRY_CENTER_ATTR_NAME, Point], [CommandTransform.SYMMETRY_GROUP_ATTR_NAME, "com.vzome.core.math.symmetry.Symmetry"], [_CommandTetrahedralSymmetry.SUBGROUP_ATTR_NAME, [].constructor]]; 6533 } 6534 return _CommandTetrahedralSymmetry.ATTR_SIGNATURE; 6535 } 6536 constructor(symmetry = null) { 6537 super(symmetry); 6538 } 6539 /** 6540 * 6541 * @return {java.lang.Object[][]} 6542 */ 6543 getAttributeSignature() { 6544 return _CommandTetrahedralSymmetry.ATTR_SIGNATURE_$LI$(); 6545 } 6546 /** 6547 * 6548 * @param {ConstructionList} parameters 6549 * @param {AttributeMap} attributes 6550 * @param {*} effects 6551 * @return {ConstructionList} 6552 */ 6553 apply(parameters, attributes, effects) { 6554 const center = this.setSymmetry(attributes); 6555 const closure = this.mSymmetry.subgroup(Symmetry.TETRAHEDRAL); 6556 const params = parameters.getConstructions(); 6557 const output = new ConstructionList(); 6558 for (let index = 0; index < params.length; index++) { 6559 let param = params[index]; 6560 { 6561 output.addConstruction(param); 6562 } 6563 } 6564 for (let i = 1; i < closure.length; i++) { 6565 { 6566 const transform = new SymmetryTransformation(this.mSymmetry, closure[i], center); 6567 output.addAll(this.transform(params, transform, effects)); 6568 } 6569 ; 6570 } 6571 return output; 6572 } 6573}; 6574CommandTetrahedralSymmetry["__class"] = "com.vzome.core.commands.CommandTetrahedralSymmetry"; 6575CommandTetrahedralSymmetry["__interfaces"] = ["com.vzome.core.commands.Command"]; 6576
6577// src/worker/legacy/from-java/com/vzome/core/math/symmetry/OctahedralSymmetry.ts 6578var OctahedralSymmetry = class _OctahedralSymmetry extends AbstractSymmetry { 6579 static { 6580 this.ORDER = 24; 6581 } 6582 constructor(field5, frameColor) { 6583 if ((field5 != null && (field5.constructor != null && field5.constructor["__interfaces"] != null && field5.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicField") >= 0) || field5 === null) && (typeof frameColor === "string" || frameColor === null)) { 6584 let __args = arguments; 6585 super(_OctahedralSymmetry.ORDER, field5, frameColor, null); 6586 if (this.frameColor === void 0) { 6587 this.frameColor = null; 6588 } 6589 if (this.tetrahedralSubgroup === void 0) { 6590 this.tetrahedralSubgroup = null; 6591 } 6592 this.IDENTITY = new Permutation(this, null); 6593 this.frameColor = frameColor; 6594 this.tetrahedralSubgroup = this.closure([0, 2, 4]); 6595 } else if ((field5 != null && (field5.constructor != null && field5.constructor["__interfaces"] != null && field5.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicField") >= 0) || field5 === null) && frameColor === void 0) { 6596 let __args = arguments; 6597 { 6598 let __args2 = arguments; 6599 let frameColor2 = "blue"; 6600 super(_OctahedralSymmetry.ORDER, field5, frameColor2, null); 6601 if (this.frameColor === void 0) { 6602 this.frameColor = null; 6603 } 6604 if (this.tetrahedralSubgroup === void 0) { 6605 this.tetrahedralSubgroup = null; 6606 } 6607 this.IDENTITY = new Permutation(this, null); 6608 this.frameColor = frameColor2; 6609 this.tetrahedralSubgroup = this.closure([0, 2, 4]); 6610 } 6611 } else throw new Error("invalid overload"); 6612 } 6613 /** 6614 * 6615 * @param {SpecialOrbit} which 6616 * @return {Direction} 6617 */ 6618 getSpecialOrbit(which) { 6619 switch (which) { 6620 case 0 /* BLUE */: 6621 return this.getDirection(this.frameColor); 6622 case 1 /* RED */: 6623 return this.getDirection("green"); 6624 case 2 /* YELLOW */: 6625 return this.getDirection("yellow"); 6626 default: 6627 return null; 6628 } 6629 } 6630 /** 6631 * 6632 * @return {boolean} 6633 */ 6634 reverseOrbitTriangle() { 6635 return true; 6636 } 6637 /** 6638 * 6639 * @return {AlgebraicVector[]} 6640 */ 6641 getOrbitTriangle() { 6642 const greenVertex = this.getDirection("green").getPrototype(); 6643 const blueVertex = this.getDirection("blue").getPrototype(); 6644 const yellowVertex = this.getDirection("yellow").getPrototype(); 6645 return [greenVertex, blueVertex, yellowVertex]; 6646 } 6647 /** 6648 * 6649 */ 6650 createInitialPermutations() { 6651 this.mOrientations[0] = this.IDENTITY; 6652 let map = ((s) => { 6653 let a = []; 6654 while (s-- > 0) a.push(0); 6655 return a; 6656 })(_OctahedralSymmetry.ORDER); 6657 for (let i = 0; i < 6; i++) { 6658 for (let j = 0; j < 4; j++) { 6659 map[i * 4 + j] = i * 4 + (j + 1) % 4; 6660 } 6661 ; 6662 } 6663 this.mOrientations[1] = new Permutation(this, map); 6664 map = ((s) => { 6665 let a = []; 6666 while (s-- > 0) a.push(0); 6667 return a; 6668 })(_OctahedralSymmetry.ORDER); 6669 let cycles = [[0, 4, 8], [1, 11, 17], [2, 16, 22], [3, 21, 5], [6, 20, 14], [7, 13, 9], [10, 12, 18], [19, 15, 23]]; 6670 for (let index = 0; index < cycles.length; index++) { 6671 let cycle = cycles[index]; 6672 { 6673 for (let j = 0; j < cycle.length; j++) { 6674 { 6675 map[cycle[j]] = cycle[(j + 1) % 3]; 6676 } 6677 ; 6678 } 6679 } 6680 } 6681 this.mOrientations[4] = new Permutation(this, map); 6682 map = ((s) => { 6683 let a = []; 6684 while (s-- > 0) a.push(0); 6685 return a; 6686 })(_OctahedralSymmetry.ORDER); 6687 cycles = [[0, 5], [1, 8], [4, 9], [15, 20], [12, 19], [16, 23], [2, 17], [13, 10], [21, 6], [22, 3], [7, 14], [11, 18]]; 6688 for (let index = 0; index < cycles.length; index++) { 6689 let cycle = cycles[index]; 6690 { 6691 for (let j = 0; j < cycle.length; j++) { 6692 { 6693 map[cycle[j]] = cycle[(j + 1) % 2]; 6694 } 6695 ; 6696 } 6697 } 6698 } 6699 this.mOrientations[5] = new Permutation(this, map); 6700 } 6701 /** 6702 * 6703 */ 6704 createOtherOrbits() { 6705 const xAxis = this.mField.basisVector(3, AlgebraicVector.X); 6706 const yAxis = this.mField.basisVector(3, AlgebraicVector.Y); 6707 const zAxis = this.mField.basisVector(3, AlgebraicVector.Z); 6708 const green = xAxis.plus(yAxis); 6709 this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean("green", 1, 8, green, true); 6710 const yellow = green.plus(zAxis); 6711 this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean("yellow", 0, 4, yellow, true); 6712 } 6713 /** 6714 * 6715 * @param {string} frameColor 6716 */ 6717 createFrameOrbit(frameColor) { 6718 const xAxis = this.mField.basisVector(3, AlgebraicVector.X); 6719 const yAxis = this.mField.basisVector(3, AlgebraicVector.Y); 6720 const zAxis = this.mField.basisVector(3, AlgebraicVector.Z); 6721 let dir; 6722 if (this.mField.doubleFrameVectors()) dir = this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber(frameC
6722olor, 0, 1, xAxis, true, true, this.mField["createRational$long"](2)); 6723 else dir = this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean(frameColor, 0, 1, xAxis, true); 6724 this.createBasisAxes(dir, xAxis, 0); 6725 this.createBasisAxes(dir, xAxis.negate(), 12); 6726 this.createBasisAxes(dir, yAxis, 5); 6727 this.createBasisAxes(dir, yAxis.negate(), 7); 6728 this.createBasisAxes(dir, zAxis, 4); 6729 this.createBasisAxes(dir, zAxis.negate(), 6); 6730 for (let p = 0; p < _OctahedralSymmetry.ORDER; p++) { 6731 { 6732 const x = this.mOrientations[p].mapIndex(0); 6733 const y = this.mOrientations[p].mapIndex(8); 6734 const z = this.mOrientations[p].mapIndex(4); 6735 this.mMatrices[p] = new AlgebraicMatrix(dir.getAxis$int$int(Symmetry.PLUS, x).normal(), dir.getAxis$int$int(Symmetry.PLUS, y).normal(), dir.getAxis$int$int(Symmetry.PLUS, z).normal()); 6736 const axis = dir.getAxis$int$int(Symmetry.PLUS, p); 6737 const norm = this.mMatrices[p].timesColumn(xAxis); 6738 if (!norm.equals(axis.normal())) throw new java.lang.IllegalStateException("matrix wrong: " + p); 6739 } 6740 ; 6741 } 6742 } 6743 /*private*/ 6744 createBasisAxes(dir, norm, orientation) { 6745 for (let i = 0; i < 4; i++) { 6746 { 6747 const prototype = this.mOrientations[orientation].mapIndex(i); 6748 const rotatedPrototype = this.mOrientations[orientation].mapIndex((i + 1) % 4); 6749 const rotation = this.getMapping(prototype, rotatedPrototype); 6750 dir.createAxis$int$int$com_vzome_core_algebra_AlgebraicVector(prototype, rotation, norm); 6751 } 6752 ; 6753 } 6754 } 6755 /** 6756 * 6757 * @return {string} 6758 */ 6759 getName() { 6760 return "octahedral"; 6761 } 6762 /** 6763 * 6764 * @param {string} name 6765 * @return {int[]} 6766 */ 6767 subgroup(name) { 6768 if (Symmetry.TETRAHEDRAL === name) return this.tetrahedralSubgroup; 6769 return null; 6770 } 6771}; 6772OctahedralSymmetry["__class"] = "com.vzome.core.math.symmetry.OctahedralSymmetry"; 6773OctahedralSymmetry["__interfaces"] = ["com.vzome.core.math.symmetry.Symmetry", "com.vzome.core.math.symmetry.Embedding"]; 6774
6775// src/worker/legacy/from-java/com/vzome/core/kinds/AbstractSymmetryPerspective.ts 6776var AbstractSymmetryPerspective = class { 6777 constructor(symmetry) { 6778 if (this.symmetry === void 0) { 6779 this.symmetry = null; 6780 } 6781 this.geometries = new java.util.ArrayList(); 6782 this.defaultShapes = null; 6783 this.symmetry = symmetry; 6784 } 6785 /** 6786 * 6787 * @return {*} 6788 */ 6789 getSymmetry() { 6790 return this.symmetry; 6791 } 6792 /** 6793 * 6794 * @return {string} 6795 */ 6796 getName() { 6797 return this.getSymmetry().getName(); 6798 } 6799 /** 6800 * 6801 * @return {string} 6802 */ 6803 getLabel() { 6804 return this.getSymmetry().getName(); 6805 } 6806 addShapes(shapes28) { 6807 const old = this.getGeometry(shapes28.getName()); 6808 if (old != null) { 6809 this.geometries.remove(old); 6810 } 6811 this.geometries.add(shapes28); 6812 } 6813 clearShapes() { 6814 this.geometries.clear(); 6815 this.defaultShapes = null; 6816 } 6817 /** 6818 * 6819 * @return {*} 6820 */ 6821 getGeometries() { 6822 return this.geometries; 6823 } 6824 /*private*/ 6825 getGeometry(name) { 6826 for (let index = this.geometries.iterator(); index.hasNext(); ) { 6827 let shapes28 = index.next(); 6828 { 6829 if (shapes28.getName() === name) { 6830 return shapes28; 6831 } 6832 } 6833 } 6834 return null; 6835 } 6836 setDefaultGeometry(shapes28) { 6837 this.defaultShapes = shapes28; 6838 this.addShapes(shapes28); 6839 } 6840 /** 6841 * 6842 * @return {*} 6843 */ 6844 getDefaultGeometry() { 6845 return this.defaultShapes; 6846 } 6847 /** 6848 * 6849 * @param {string} action 6850 * @return {*} 6851 */ 6852 getLegacyCommand(action) { 6853 switch (action) { 6854 case "octasymm": 6855 { 6856 let octaSymm = this.getSymmetry(); 6857 if (!(octaSymm != null && octaSymm instanceof OctahedralSymmetry)) { 6858 octaSymm = new OctahedralSymmetry(octaSymm.getField()); 6859 } 6860 return new CommandSymmetry(octaSymm); 6861 } 6862 ; 6863 case "tetrasymm": 6864 { 6865 const symmetry = this.getSymmetry(); 6866 return new CommandTetrahedralSymmetry(symmetry); 6867 } 6868 ; 6869 default: 6870 return null; 6871 } 6872 } 6873 /** 6874 * 6875 * @param {Direction} orbit 6876 * @return {boolean} 6877 */ 6878 orbitIsStandard(orbit) { 6879 return orbit.isStandard(); 6880 } 6881 /** 6882 * 6883 * @param {Direction} orbit 6884 * @return {boolean} 6885 */ 6886 orbitIsBuildDefault(orbit) { 6887 const zone0 = orbit.getAxis$int$int(0, 0); 6888 return zone0.getRotationPermutation() != null; 6889 } 6890 /** 6891 * 6892 * @param {Direction} orbit 6893 * @return {*} 6894 */ 6895 getOrbitUnitLength(orbit) { 6896 return orbit.getUnitLength(); 6897 } 6898}; 6899AbstractSymmetryPerspective["__class"] = "com.vzome.core.kinds.AbstractSymmetryPerspective"; 6900AbstractSymmetryPerspective["__interfaces"] = ["com.vzome.core.editor.SymmetryPerspective"]; 6901
6902// src/worker/legacy/from-java/com/vzome/core/editor/ApplyTool.ts 6903var ApplyTool = class _ApplyTool extends ChangeManifestations { 6904 static logger_$LI$() { 6905 if (_ApplyTool.logger == null) { 6906 _ApplyTool.logger = java.util.logging.Logger.getLogger("com.vzome.core.editor.ApplyTool"); 6907 } 6908 return _ApplyTool.logger; 6909 } 6910 /** 6911 * 6912 */ 6913 perform() { 6914 if (_ApplyTool.logger_$LI$().isLoggable(java.util.logging.Level.FINE)) _ApplyTool.logger_$LI$().fine("performing ApplyTool " + this.tool.getId() + " :: " + this.tool.getCategory()); 6915 const inputs = new java.util.ArrayList(); 6916 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 6917 let man = index.next(); 6918 { 6919 if (this.deleteInputs && this.tool.needsInput()) { 6920 super.unselect$com_vzome_core_model_Manifestation$boolean(man, true); 6921 super.deleteManifestation(man); 6922 if (_ApplyTool.logger_$LI$().isLoggable(java.util.logging.Level.FINEST)) _ApplyTool.logger_$LI$().finest("ApplyTool - unselect and delete " + man.toString()); 6923 } else if (this.hideInputs && this.tool.needsInput()) { 6924 super.unselect$com_vzome_core_model_Manifestation$boolean(man, true); 6925 super.hideManifestation(man); 6926 if (_ApplyTool.logger_$LI$().isLoggable(java.util.logging.Level.FINEST)) _ApplyTool.logger_$LI$().finest("ApplyTool - unselect and hide " + man.toString()); 6927 } else if (!this.selectInputs) { 6928 super.unselect$com_vzome_core_model_Manifestation$boolean(man, true); 6929 if (_ApplyTool.logger_$LI$().isLoggable(java.util.logging.Level.FINEST)) _ApplyTool.logger_$LI$().finest("ApplyTool - unselect " + man.toString()); 6930 } 6931 if (this.tool.needsInput()) inputs.add(man); 6932 } 6933 } 6934 this.redo(); 6935 this.tool.prepare(this); 6936 if (this.tool.needsInput()) { 6937 for (let index = inputs.iterator(); index.hasNext(); ) { 6938 let man = index.next(); 6939 { 6940 const c = man.toConstruction(); 6941 c.setColor(this.copyColors ? man.getColor() : null); 6942 this.tool.performEdit(c, this); 6943 } 6944 } 6945 } else { 6946 for (let index = this.mManifestations.iterator(); index.hasNext(); ) { 6947 let man = index.next(); 6948 { 6949 this.tool.performSelect(man, this); 6950 } 6951 } 6952 } 6953 this.tool.complete(this); 6954 this.redo(); 6955 super.perform(); 6956 } 6957 constructor(tools, tool, selectInputs, deleteInputs, createOutputs, selectOutputs, redundantOutputs, copyColors) { 6958 super(tools.getEditorModel()); 6959 if (this.tool === void 0) { 6960 this.tool = null; 6961 } 6962 if (this.selectInputs === void 0) { 6963 this.selectInputs = false; 6964 } 6965 if (this.deselectOutputs === void 0) { 6966 this.deselectOutputs = false; 6967 } 6968 if (this.justSelect === void 0) { 6969 this.justSelect = false; 6970 } 6971 if (this.hideInputs === void 0) { 6972 this.hideInputs = false; 6973 } 6974 if (this.deleteInputs === void 0) { 6975 this.deleteInputs = false; 6976 } 6977 if (this.redundantOutputs === void 0) { 6978 this.redundantOutputs = false; 6979 } 6980 if (this.copyColors === void 0) { 6981 this.copyColors = false; 6982 } 6983 if (this.tools === void 0) { 6984 this.tools = null; 6985 } 6986 this.tools = tools; 6987 this.tool = tool; 6988 this.selectInputs = selectInputs; 6989 this.deleteInputs = deleteInputs; 6990 this.copyColors = copyColors; 6991 this.hideInputs = false; 6992 this.deselectOutputs = !selectOutputs; 6993 this.justSelect = !createOutputs; 6994 this.redundantOutputs = redundantOutputs; 6995 } 6996 /** 6997 * 6998 * @return {string} 6999 */ 7000 getXmlElementName() { 7001 if (this.redundantOutputs) return "ApplyTool"; 7002 else return "ToolApplied"; 7003 } 7004 /** 7005 * 7006 * @param {*} element 7007 */ 7008 getXmlAttributes(element) { 7009 element.setAttribute("name", this.tool.getId()); 7010 if (this.selectInputs) element.setAttribute("selectInputs", "true"); 7011 if (this.deselectOutputs) element.setAttribute("deselectOutputs", "true"); 7012 if (this.justSelect) element.setAttribute("justSelect", "true"); 7013 if (this.hideInputs) element.setAttribute("hideInputs", "true"); 7014 if (this.deleteInputs) element.setAttribute("deleteInputs", "true"); 7015 element.setAttribute("copyColors", javaemul.internal.BooleanHelper.toString(this.copyColors)); 7016 } 7017 /** 7018 * 7019 * @param {*} element 7020 * @param {XmlSaveFormat} format 7021 */ 7022 setXmlAttributes(element, format) { 7023 const toolName = element.getAttribute("name"); 7024 this.tool = this.tools.get(toolName); 7025 this.selectInputs = this.isAttributeTrue(element, "selectInputs"); 7026 this.deselectOutputs = this.isAttributeTrue(element, "deselectOutputs"); 7027 this.justSelect = this.isAttributeTrue(element, "justSelect"); 7028 this.hideInputs = this.isAttributeTrue(element, "hideInputs"); 7029 this.deleteInputs = this.isAttributeTrue(element, "deleteInputs"); 7030 const value = element.getAttribute("copyColors");
7031 this.copyColors = value == null || !(value === "false"); 7032 } 7033 /*private*/ 7034 isAttributeTrue(element, name) { 7035 const value = element.getAttribute(name); 7036 return value != null && value === "true"; 7037 } 7038 /** 7039 * 7040 * @param {Construction} c 7041 * @return {*} 7042 */ 7043 manifestConstruction(c) { 7044 let m = this.getManifestation(c); 7045 const preExistsNotHidden = m != null && m.isRendered(); 7046 if (this.justSelect) { 7047 if (preExistsNotHidden) super.select$com_vzome_core_model_Manifestation$boolean(m, false); 7048 } else if (this.redundantOutputs || !preExistsNotHidden) { 7049 m = super.manifestConstruction(c); 7050 if (!this.deselectOutputs) super.select$com_vzome_core_model_Manifestation$boolean(m, true); 7051 } 7052 return m; 7053 } 7054 select(man, ignoreGroups) { 7055 if ((man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Manifestation") >= 0) || man === null) && (typeof ignoreGroups === "boolean" || ignoreGroups === null)) { 7056 super.select(man, ignoreGroups); 7057 } else if ((man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Manifestation") >= 0) || man === null) && ignoreGroups === void 0) { 7058 return this.select$com_vzome_core_model_Manifestation(man); 7059 } else throw new Error("invalid overload"); 7060 } 7061 select$com_vzome_core_model_Manifestation(m) { 7062 if (this.tool.needsInput()) throw new java.lang.UnsupportedOperationException("select is not supported within Tool.performEdit"); 7063 if (!m.isRendered()) super.showManifestation(m); 7064 super.select$com_vzome_core_model_Manifestation$boolean(m, true); 7065 } 7066 unselect(man, ignoreGroups) { 7067 if ((man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Manifestation") >= 0) || man === null) && (typeof ignoreGroups === "boolean" || ignoreGroups === null)) { 7068 super.unselect(man, ignoreGroups); 7069 } else if ((man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Manifestation") >= 0) || man === null) && ignoreGroups === void 0) { 7070 return this.unselect$com_vzome_core_model_Manifestation(man); 7071 } else throw new Error("invalid overload"); 7072 } 7073 unselect$com_vzome_core_model_Manifestation(man) { 7074 throw new java.lang.UnsupportedOperationException("unselect is not supported within Tool.performEdit"); 7075 } 7076 /** 7077 * 7078 * @param {*} m 7079 */ 7080 showManifestation(m) { 7081 throw new java.lang.UnsupportedOperationException("showManifestation is not supported within Tool.performEdit"); 7082 } 7083 /** 7084 * 7085 * @param {*} m 7086 */ 7087 hideManifestation(m) { 7088 throw new java.lang.UnsupportedOperationException("hideManifestation is not supported within Tool.performEdit"); 7089 } 7090}; 7091ApplyTool["__class"] = "com.vzome.core.editor.ApplyTool"; 7092
7093// src/worker/legacy/from-java/com/vzome/core/editor/SelectToolParameters.ts 7094var SelectToolParameters = class extends ChangeManifestations { 7095 constructor(tools, tool) { 7096 super(tools.getEditorModel()); 7097 if (this.tool === void 0) { 7098 this.tool = null; 7099 } 7100 if (this.tools === void 0) { 7101 this.tools = null; 7102 } 7103 this.tools = tools; 7104 this.tool = tool; 7105 } 7106 /** 7107 * 7108 */ 7109 perform() { 7110 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 7111 let man = index.next(); 7112 super.unselect$com_vzome_core_model_Manifestation$boolean(man, true); 7113 } 7114 this.redo(); 7115 for (let index = this.tool.getParameters().iterator(); index.hasNext(); ) { 7116 let con = index.next(); 7117 { 7118 const man = this.manifestConstruction(con); 7119 this.select$com_vzome_core_model_Manifestation(man); 7120 } 7121 } 7122 this.redo(); 7123 } 7124 /** 7125 * 7126 * @return {string} 7127 */ 7128 getXmlElementName() { 7129 return "SelectToolParameters"; 7130 } 7131 /** 7132 * 7133 * @param {*} element 7134 */ 7135 getXmlAttributes(element) { 7136 element.setAttribute("name", this.tool.getId()); 7137 } 7138 /** 7139 * 7140 * @param {*} element 7141 * @param {XmlSaveFormat} format 7142 */ 7143 setXmlAttributes(element, format) { 7144 const toolName = element.getAttribute("name"); 7145 this.tool = this.tools.get(toolName); 7146 } 7147}; 7148SelectToolParameters["__class"] = "com.vzome.core.editor.SelectToolParameters"; 7149
7150// src/worker/legacy/from-java/com/vzome/core/editor/ToolsModel.ts 7151var ToolsModel = class _ToolsModel extends java.util.TreeMap { 7152 constructor(context, originPoint) { 7153 super(); 7154 if (this.editor === void 0) { 7155 this.editor = null; 7156 } 7157 this.lastId = 0; 7158 this.pcs = new PropertyChangeSupport(this); 7159 if (this.context === void 0) { 7160 this.context = null; 7161 } 7162 if (this.originPoint === void 0) { 7163 this.originPoint = null; 7164 } 7165 this.toolLabels = new java.util.HashMap(); 7166 this.toolDeleteInputs = new java.util.HashMap(); 7167 this.toolSelectInputs = new java.util.HashMap(); 7168 this.toolCopyColors = new java.util.HashMap(); 7169 this.toolOrder = new java.util.HashMap(); 7170 this.hiddenTools = new java.util.HashSet(); 7171 this.customTools = new java.util.ArrayList(); 7172 this.customBookmarks = new java.util.ArrayList(); 7173 this.context = context; 7174 this.originPoint = originPoint; 7175 } 7176 reserveId() { 7177 return this.lastId++; 7178 } 7179 /** 7180 * Only called during load of a document, before any new tool creations with reserveId. 7181 * @param {number} id 7182 */ 7183 setMaxId(id) { 7184 if (id >= this.lastId) this.lastId = id + 1; 7185 } 7186 /** 7187 * 7188 * @param {string} key 7189 * @param {CoreTool} tool 7190 * @return {CoreTool} 7191 */ 7192 put(key, tool) { 7193 const result = super.put(key, tool); 7194 this.pcs.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("tool.instances", null, tool); 7195 if (!tool.isPredefined() && tool.getOrder() < 0) tool.setOrder(this.nextToolOrder()); 7196 if (!tool.isPredefined() && !tool.isHidden()) { 7197 if (tool.getCategory() === BookmarkTool.ID) { 7198 this.customBookmarks.add(key); 7199 this.pcs.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("customBookmarks", null, this.getToolIDs(true)); 7200 } else { 7201 this.customTools.add(key); 7202 this.pcs.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("customTools", null, this.getToolIDs(false)); 7203 } 7204 } 7205 return result; 7206 } 7207 getToolIDs(bookmarks) { 7208 const ids = bookmarks ? this.customBookmarks : this.customTools; 7209 const tools = new java.util.ArrayList(); 7210 for (let index = ids.iterator(); index.hasNext(); ) { 7211 let id = index.next(); 7212 { 7213 const tool = this.get(id); 7214 if (tool != null) tools.add(tool); 7215 } 7216 } 7217 tools.sort(((funcInst) => { 7218 if (funcInst == null || typeof funcInst == "function") { 7219 return funcInst; 7220 } 7221 return (arg0, arg1) => (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, arg0, arg1); 7222 })(_ToolsModel.TOOLBAR_ORDER_$LI$())); 7223 const result = new java.util.ArrayList(); 7224 for (let index = tools.iterator(); index.hasNext(); ) { 7225 let tool = index.next(); 7226 result.add(tool.getId()); 7227 } 7228 return result.toArray([]); 7229 } 7230 getAllCustomToolIDs(bookmarks) { 7231 const tools = new java.util.ArrayList(); 7232 for (let index = this.values().iterator(); index.hasNext(); ) { 7233 let tool = index.next(); 7234 if (!tool.isPredefined() && tool.getCategory() === BookmarkTool.ID === bookmarks) tools.add(tool); 7235 } 7236 tools.sort(((funcInst) => { 7237 if (funcInst == null || typeof funcInst == "function") { 7238 return funcInst; 7239 } 7240 return (arg0, arg1) => (funcInst["compare"] ? funcInst["compare"] : funcInst).call(funcInst, arg0, arg1); 7241 })(_ToolsModel.TOOLBAR_ORDER_$LI$())); 7242 const result = new java.util.ArrayList(); 7243 for (let index = tools.iterator(); index.hasNext(); ) { 7244 let tool = index.next(); 7245 result.add(tool.getId()); 7246 } 7247 return result.toArray([]); 7248 } 7249 /*private*/ 7250 nextToolOrder() { 7251 let max = -1; 7252 for (let index = this.values().iterator(); index.hasNext(); ) { 7253 let tool = index.next(); 7254 if (!tool.isPredefined() && tool.getOrder() > max) max = tool.getOrder(); 7255 } 7256 return max + 1; 7257 } 7258 static TOOLBAR_ORDER_$LI$() { 7259 if (_ToolsModel.TOOLBAR_ORDER == null) { 7260 _ToolsModel.TOOLBAR_ORDER = (a, b) => { 7261 const oa = a.getOrder(); 7262 const ob = b.getOrder(); 7263 const sa = oa >= 0; 7264 const sb = ob >= 0; 7265 if (sa && sb && oa !== ob) return ( 7266 /* compare */ 7267 oa - ob 7268 ); 7269 if (sa !== sb) return sa ? -1 : 1; 7270 return ( 7271 /* compareTo */ 7272 a.getId().localeCompare(b.getId()) 7273 ); 7274 }; 7275 } 7276 return _ToolsModel.TOOLBAR_ORDER; 7277 } 7278 reorderTools(bookmarks, orderedIds) { 7279 for (let i = 0; i < orderedIds.length; i++) { 7280 { 7281 const tool = this.get(orderedIds[i]); 7282 if (tool != null) tool.setOrder(i); 7283 } 7284 ; 7285 } 7286 if (bookmarks) this.pcs.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("customBookmarks", null, this.getToolIDs(true)); 7287 else this.pcs.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("customTools", null, this.getToolIDs(false)); 7288 this.pcs.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object(bookmarks ? "allCustomBookmarks" : "allCustomTools", null, this.getAllCustomToolIDs(bookmarks)); 7289 } 7290 createEdit(className) { 7291 switch (className) { 7292 case "ToolApplied": 7293 return new ApplyTool(this, null, false, false, false, false, false, true); 7294 case "ApplyTool": 7295 return new ApplyTool(this, null, false, false, false, false, true, true); 7296 case "SelectToolParameters": 7297 return new SelectToolParameters(this, null); 7298 default: 7299 return null; 7300 } 7301 } 7302 applyTool(tool, selectInputs, deleteInputs, createOutputs, selectOutputs, copyColors) { 7303 const edit = new ApplyTool(this, tool, selectInputs, deleteInputs, createOutputs, selectOutputs, true, copyColors); 7304 this.getContext().performAndRecord(edit); 7305 } 7306 selectToolParameters(tool) { 7307 const edit = new SelectToolParameters(this, tool); 7308 this.getContext().performAndRecord(edit); 7309 } 7310 addPropertyListener(listener) {
7311 this.pcs.addPropertyChangeListener$java_beans_PropertyChangeListener(listener); 7312 } 7313 removePropertyListener(listener) { 7314 this.pcs.removePropertyChangeListener$java_beans_PropertyChangeListener(listener); 7315 } 7316 setEditorModel(editor) { 7317 this.editor = editor; 7318 } 7319 getEditorModel() { 7320 return this.editor; 7321 } 7322 /** 7323 * 7324 * @param {string} id 7325 * @return {CoreTool} 7326 */ 7327 getPredefinedTool(id) { 7328 return this.get(id); 7329 } 7330 getContext() { 7331 return this.context; 7332 } 7333 getOriginPoint() { 7334 return this.originPoint; 7335 } 7336 getXml(doc) { 7337 const result = doc.createElement("Tools"); 7338 for (let index = this.values().iterator(); index.hasNext(); ) { 7339 let tool = index.next(); 7340 if (!tool.isPredefined()) { 7341 const toolElem = doc.createElement("Tool"); 7342 DomUtils.addAttribute(toolElem, "id", tool.getId()); 7343 DomUtils.addAttribute(toolElem, "label", tool.getLabel()); 7344 if (tool.isHidden()) DomUtils.addAttribute(toolElem, "hidden", "true"); 7345 if (tool.getOrder() >= 0) DomUtils.addAttribute( 7346 toolElem, 7347 "order", 7348 /* toString */ 7349 "" + tool.getOrder() 7350 ); 7351 toolElem.setAttribute("selectInputs", javaemul.internal.BooleanHelper.toString(tool.isSelectInputs())); 7352 toolElem.setAttribute("deleteInputs", javaemul.internal.BooleanHelper.toString(tool.isDeleteInputs())); 7353 toolElem.setAttribute("copyColors", javaemul.internal.BooleanHelper.toString(tool.isCopyColors())); 7354 result.appendChild(toolElem); 7355 } 7356 } 7357 return result; 7358 } 7359 loadFromXml(xml) { 7360 const nodes = xml.getChildNodes(); 7361 for (let i = 0; i < nodes.getLength(); i++) { 7362 { 7363 const node = nodes.item(i); 7364 if (node != null && (node.constructor != null && node.constructor["__interfaces"] != null && node.constructor["__interfaces"].indexOf("org.w3c.dom.Element") >= 0)) { 7365 const toolElem = node; 7366 const id = toolElem.getAttribute("id"); 7367 const label = toolElem.getAttribute("label"); 7368 this.toolLabels.put(id, label); 7369 let value = toolElem.getAttribute("selectInputs"); 7370 if (value != null && !(value === "")) this.toolSelectInputs.put(id, javaemul.internal.BooleanHelper.parseBoolean(value)); 7371 value = toolElem.getAttribute("deleteInputs"); 7372 if (value != null && !(value === "")) this.toolDeleteInputs.put(id, javaemul.internal.BooleanHelper.parseBoolean(value)); 7373 value = toolElem.getAttribute("copyColors"); 7374 if (value != null && !(value === "")) this.toolCopyColors.put(id, javaemul.internal.BooleanHelper.parseBoolean(value)); 7375 const hiddenStr = toolElem.getAttribute("hidden"); 7376 if (hiddenStr != null && hiddenStr === "true") this.hiddenTools.add(id); 7377 const orderStr = toolElem.getAttribute("order"); 7378 if (orderStr != null && !(orderStr === "")) this.toolOrder.put(id, javaemul.internal.IntegerHelper.parseInt(orderStr)); 7379 } 7380 } 7381 ; 7382 } 7383 } 7384 setConfiguration(tool) { 7385 const id = tool.getId(); 7386 const label = this.toolLabels.get(id); 7387 if (label != null) tool.setLabel(label); 7388 if (this.toolDeleteInputs.containsKey(id) || this.toolSelectInputs.containsKey(id)) { 7389 const deleteInputs = this.toolDeleteInputs.containsKey(id) ? this.toolDeleteInputs.get(id) : true; 7390 const selectInputs = this.toolSelectInputs.containsKey(id) ? this.toolSelectInputs.get(id) : false; 7391 tool.setInputBehaviors(selectInputs, deleteInputs); 7392 } 7393 if (this.toolCopyColors.containsKey(id)) { 7394 tool.setCopyColors(this.toolCopyColors.get(id)); 7395 } 7396 if (this.toolOrder.containsKey(id)) tool.setOrder(this.toolOrder.get(id)); 7397 tool.setHidden(this.hiddenTools.contains(id)); 7398 } 7399 hideTool(tool) { 7400 this.pcs.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("tool.instances", tool, null); 7401 if (tool.getCategory() === BookmarkTool.ID) { 7402 this.customBookmarks.remove(tool.getId()); 7403 this.pcs.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("customBookmarks", null, this.getToolIDs(true)); 7404 } else { 7405 this.customTools.remove(tool.getId()); 7406 this.pcs.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("customTools", null, this.getToolIDs(false)); 7407 } 7408 } 7409 unhideTool(tool) { 7410 this.pcs.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("tool.instances", null, tool); 7411 if (!tool.isPredefined()) { 7412 if (tool.getCategory() === BookmarkTool.ID) { 7413 if (!this.customBookmarks.contains(tool.getId())) this.customBookmarks.add(tool.getId()); 7414 this.pcs.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("customBookmarks", null, this.getToolIDs(true)); 7415 } else { 7416 if (!this.customTools.contains(tool.getId())) this.customTools.add(tool.getId()); 7417 this.pcs.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("customTools", null, this.getToolIDs(false)); 7418 } 7419 } 7420 } 7421}; 7422ToolsModel["__class"] = "com.vzome.core.editor.ToolsModel"; 7423ToolsModel["__interfaces"] = ["java.lang.Cloneable", "com.vzome.api.Tool.Source", "java.util.Map", "java.util.NavigableMap", "java.util.SortedMap", "java.io.Serializable"]; 7424
7425// src/worker/legacy/from-java/com/vzome/core/tools/RotationToolFactory.ts 7426var RotationToolFactory = class _RotationToolFactory extends AbstractToolFactory { 7427 static { 7428 this.ID = "rotation"; 7429 } 7430 static { 7431 this.LABEL = "Create a rotation tool"; 7432 } 7433 static { 7434 this.TOOLTIP = "<p>Each tool rotates the selected objects around an axis<br>of symmetry. To create a tool, select a strut that<br>defines that axis. You can also define the direction<br>and center independently, by selecting a ball for the<br>center and a strut for the axis. Note: not all struts<br>correspond to rotational symmetries!<br><br>The direction of rotation depends on the strut<br>orientation, which is hard to discover, but easy to<br>control, by dragging out a new strut.<br><br>By default, the input selection will be moved to the new,<br>rotated orientation. After creating a tool, you can<br>right-click to configure the tool to create a copy, instead.<br></p>"; 7435 } 7436 constructor(tools, symmetry, id, label, tooltip) { 7437 if ((tools != null && tools instanceof ToolsModel || tools === null) && (symmetry != null && (symmetry.constructor != null && symmetry.constructor["__interfaces"] != null && symmetry.constructor["__interfaces"].indexOf("com.vzome.core.math.symmetry.Symmetry") >= 0) || symmetry === null) && (typeof id === "string" || id === null) && (typeof label === "string" || label === null) && (typeof tooltip === "string" || tooltip === null)) { 7438 let __args = arguments; 7439 super(tools, symmetry, id, label, tooltip); 7440 if (this.noStrut === void 0) { 7441 this.noStrut = false;
7442 } 7443 } else if ((tools != null && tools instanceof ToolsModel || tools === null) && (symmetry != null && (symmetry.constructor != null && symmetry.constructor["__interfaces"] != null && symmetry.constructor["__interfaces"].indexOf("com.vzome.core.math.symmetry.Symmetry") >= 0) || symmetry === null) && (typeof id === "boolean" || id === null) && label === void 0 && tooltip === void 0) { 7444 let __args = arguments; 7445 let useSymmetryName = __args[2]; 7446 { 7447 let __args2 = arguments; 7448 let id2 = (useSymmetryName ? __args2[1].getName() + " " : "") + _RotationToolFactory.ID; 7449 let label2 = _RotationToolFactory.LABEL; 7450 let tooltip2 = _RotationToolFactory.TOOLTIP; 7451 super(tools, symmetry, id2, label2, tooltip2); 7452 if (this.noStrut === void 0) { 7453 this.noStrut = false; 7454 } 7455 } 7456 } else if ((tools != null && tools instanceof ToolsModel || tools === null) && (symmetry != null && (symmetry.constructor != null && symmetry.constructor["__interfaces"] != null && symmetry.constructor["__interfaces"].indexOf("com.vzome.core.math.symmetry.Symmetry") >= 0) || symmetry === null) && id === void 0 && label === void 0 && tooltip === void 0) { 7457 let __args = arguments; 7458 { 7459 let __args2 = arguments; 7460 let useSymmetryName = false; 7461 { 7462 let __args3 = arguments; 7463 let id2 = (useSymmetryName ? __args3[1].getName() + " " : "") + _RotationToolFactory.ID; 7464 let label2 = _RotationToolFactory.LABEL; 7465 let tooltip2 = _RotationToolFactory.TOOLTIP; 7466 super(tools, symmetry, id2, label2, tooltip2); 7467 if (this.noStrut === void 0) { 7468 this.noStrut = false;
7469 } 7470 } 7471 } 7472 } else throw new Error("invalid overload"); 7473 } 7474 /** 7475 * 7476 * @param {number} total 7477 * @param {number} balls 7478 * @param {number} struts 7479 * @param {number} panels 7480 * @return {boolean} 7481 */ 7482 countsAreValid(total, balls, struts, panels) { 7483 if (total === 1 && balls === 1) { 7484 this.noStrut = true; 7485 return true; 7486 } else if (total === 1 && struts === 1 || total === 2 && balls === 1 && struts === 1) { 7487 this.noStrut = false; 7488 return true; 7489 } 7490 return false; 7491 } 7492 /** 7493 * 7494 * @param {string} id 7495 * @return {Tool} 7496 */ 7497 createToolInternal(id) { 7498 return new RotationTool(id, this.getSymmetry(), this.getToolsModel(), false); 7499 } 7500 /** 7501 * 7502 * @param {*} selection 7503 * @return {boolean} 7504 */ 7505 bindParameters(selection) { 7506 const symmetry = this.getSymmetry(); 7507 for (let index = selection.iterator(); index.hasNext(); ) { 7508 let man = index.next(); 7509 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) { 7510 const axisStrut = man; 7511 let vector = axisStrut.getOffset(); 7512 vector = symmetry.getField().projectTo3d(vector, true); 7513 const axis = symmetry["getAxis$com_vzome_core_algebra_AlgebraicVector"](vector); 7514 if (axis == null) return false; 7515 const perm = axis.getRotationPermutation(); 7516 if (perm == null) return false; 7517 } else if (this.noStrut) { 7518 const axis = symmetry.getPreferredAxis(); 7519 if (axis == null) return false; 7520 } 7521 } 7522 return true; 7523 } 7524}; 7525RotationToolFactory["__class"] = "com.vzome.core.tools.RotationToolFactory"; 7526RotationToolFactory["__interfaces"] = ["com.vzome.core.editor.SelectionSummary.Listener", "com.vzome.api.Tool.Factory"]; 7527
7528// src/worker/legacy/from-java/com/vzome/core/construction/MatrixTransformation.ts 7529var MatrixTransformation = class extends Transformation { 7530 constructor(matrix, center) { 7531 super(center.getField()); 7532 this.setStateVariables(matrix, center, false); 7533 } 7534 /** 7535 * 7536 * @return {boolean} 7537 */ 7538 mapParamsToState() { 7539 return true; 7540 } 7541}; 7542MatrixTransformation["__class"] = "com.vzome.core.construction.MatrixTransformation"; 7543
7544// src/worker/legacy/from-java/com/vzome/core/tools/TransformationTool.ts 7545var TransformationTool = class extends Tool { 7546 /** 7547 * 7548 * @param {ChangeManifestations} applyTool 7549 */ 7550 prepare(applyTool) { 7551 } 7552 /** 7553 * 7554 * @param {ChangeManifestations} applyTool 7555 */ 7556 complete(applyTool) { 7557 } 7558 /** 7559 * 7560 * @return {boolean} 7561 */ 7562 needsInput() { 7563 return true; 7564 } 7565 constructor(id, tools) { 7566 super(id, tools); 7567 if (this.transforms === void 0) { 7568 this.transforms = null; 7569 } 7570 if (this.originPoint === void 0) { 7571 this.originPoint = null; 7572 } 7573 this.originPoint = tools.getOriginPoint(); 7574 } 7575 /** 7576 * 7577 * @param {*} that 7578 * @return {boolean} 7579 */ 7580 equals(that) { 7581 if (this === that) { 7582 return true; 7583 } 7584 if (that == null) { 7585 return false; 7586 } 7587 if (!/* equals */ 7588 ((o1, o2) => { 7589 if (o1 && o1.equals) { 7590 return o1.equals(o2); 7591 } else { 7592 return o1 === o2; 7593 } 7594 })(that.constructor, this.constructor)) { 7595 return false; 7596 } 7597 const other = that; 7598 if (this.originPoint == null) { 7599 if (other.originPoint != null) { 7600 return false; 7601 } 7602 } else if (!/* equals */ 7603 ((o1, o2) => { 7604 if (o1 && o1.equals) { 7605 return o1.equals(o2); 7606 } else { 7607 return o1 === o2; 7608 } 7609 })(this.originPoint, other.originPoint)) { 7610 return false; 7611 } 7612 if (!java.util.Arrays.equals(this.transforms, other.transforms)) { 7613 return false; 7614 } 7615 return true; 7616 } 7617 /** 7618 * 7619 * @param {Construction} c 7620 * @param {ChangeManifestations} applyTool 7621 */ 7622 performEdit(c, applyTool) { 7623 for (let index = 0; index < this.transforms.length; index++) { 7624 let transform = this.transforms[index]; 7625 { 7626 const result = transform.transform$com_vzome_core_construction_Construction(c); 7627 if (result == null) continue; 7628 const color = c.getColor(); 7629 result.setColor(color); 7630 const m = applyTool.manifestConstruction(result); 7631 if (m != null) { 7632 if (color != null) applyTool.colorManifestation(m, c.getColor()); 7633 } 7634 } 7635 } 7636 applyTool.redo(); 7637 } 7638 /** 7639 * 7640 * @param {*} man 7641 * @param {ChangeManifestations} applyTool 7642 */ 7643 performSelect(man, applyTool) { 7644 } 7645 unselect$com_vzome_core_model_Manifestation$boolean(man, ignoreGroups) { 7646 const c = man.getFirstConstruction(); 7647 this.addParameter(c); 7648 super.unselect$com_vzome_core_model_Manifestation$boolean(man, ignoreGroups); 7649 } 7650 /** 7651 * 7652 * @param {*} man 7653 * @param {boolean} ignoreGroups 7654 */ 7655 unselect(man, ignoreGroups) { 7656 if ((man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Manifestation") >= 0) || man === null) && (typeof ignoreGroups === "boolean" || ignoreGroups === null)) { 7657 return this.unselect$com_vzome_core_model_Manifestation$boolean(man, ignoreGroups); 7658 } else if ((man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Manifestation") >= 0) || man === null) && ignoreGroups === void 0) { 7659 return this.unselect$com_vzome_core_model_Manifestation(man); 7660 } else throw new Error("invalid overload"); 7661 } 7662 isAutomatic() { 7663 return ( 7664 /* contains */ 7665 this.getId().indexOf(".auto/") != -1 7666 ); 7667 } 7668}; 7669TransformationTool["__class"] = "com.vzome.core.tools.TransformationTool"; 7670TransformationTool["__interfaces"] = ["com.vzome.api.Tool"]; 7671
7672// src/worker/legacy/from-java/com/vzome/core/tools/SymmetryTool.ts 7673var SymmetryTool = class extends TransformationTool { 7674 static { 7675 this.ID = "symmetry"; 7676 } 7677 static { 7678 this.LABEL = "Create a general symmetry tool"; 7679 } 7680 static { 7681 this.TOOLTIP = "<p>General symmetry tool.<br></p>"; 7682 } 7683 constructor(id, symmetry, tools) { 7684 super(id, tools); 7685 if (this.symmetry === void 0) { 7686 this.symmetry = null; 7687 } 7688 this.symmetry = symmetry; 7689 } 7690 /** 7691 * 7692 * @return {number} 7693 */ 7694 hashCode() { 7695 const prime = 31; 7696 let result = 1; 7697 result = prime * result + (this.symmetry == null ? 0 : ( 7698 /* hashCode */ 7699 ((o) => { 7700 if (o.hashCode) { 7701 return o.hashCode(); 7702 } else { 7703 return o.toString().split("").reduce((prevHash, currVal) => (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0, 0); 7704 } 7705 })(this.symmetry) 7706 )); 7707 return result; 7708 } 7709 /** 7710 * 7711 * @param {*} that 7712 * @return {boolean} 7713 */ 7714 equals(that) { 7715 if (this === that) { 7716 return true; 7717 } 7718 if (!super.equals(that)) { 7719 return false; 7720 } 7721 if (this.constructor !== that.constructor) { 7722 return false; 7723 } 7724 const other = that; 7725 if (this.symmetry == null) { 7726 if (other.symmetry != null) { 7727 return false; 7728 } 7729 } else if (!/* equals */ 7730 ((o1, o2) => { 7731 if (o1 && o1.equals) { 7732 return o1.equals(o2); 7733 } else { 7734 return o1 === o2; 7735 } 7736 })(this.symmetry, other.symmetry)) { 7737 return false; 7738 } 7739 return true; 7740 } 7741 /** 7742 * 7743 * @param {boolean} prepareTool 7744 * @return {string} 7745 */ 7746 checkSelection(prepareTool) { 7747 let center = null; 7748 let axis = null; 7749 let correct = true; 7750 let hasPanels = false; 7751 if (!this.isAutomatic()) for (let index = this.mSelection.iterator(); index.hasNext(); ) { 7752 let man = index.next(); 7753 { 7754 if (prepareTool) this.unselect$com_vzome_core_model_Manifestation(man); 7755 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) { 7756 if (center != null) return "No unique symmetry center selected"; 7757 center = man.getFirstConstruction(); 7758 } else if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) { 7759 if (axis != null) correct = false; 7760 else axis = man; 7761 } else if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0)) { 7762 hasPanels = true; 7763 } 7764 } 7765 } 7766 if (center == null) { 7767 if (prepareTool) { 7768 center = this.originPoint; 7769 this.addParameter(center); 7770 } else return "No symmetry center selected"; 7771 } 7772 if (hasPanels) { 7773 if (!prepareTool) return "panels are selected"; 7774 } 7775 let closure = this.symmetry.subgroup(Symmetry.TETRAHEDRAL); 7776 switch (this.symmetry.getName()) { 7777 case "icosahedral": 7778 if (!prepareTool && axis != null && this.getCategory() === "icosahedral") return "No struts needed for icosahedral symmetry."; 7779 switch (this.getCategory()) { 7780 case "tetrahedral": 7781 if (!correct) return "no unique alignment strut selected."; 7782 if (axis == null) { 7783 if (!prepareTool) return "no aligment strut selected."; 7784 } else { 7785 const icosa = this.symmetry; 7786 const zone = icosa.getAxis$com_vzome_core_algebra_AlgebraicVector(axis.getOffset()); 7787 if (zone == null) return "selected alignment strut is not a tetrahedral axis."; 7788 const allowYellow = prepareTool; 7789 closure = icosa.subgroup$java_lang_String$com_vzome_core_math_symmetry_Axis$boolean(Symmetry.TETRAHEDRAL, zone, allowYellow); 7790 if (closure == null) return "selected alignment strut is not a tetrahedral axis."; 7791 } 7792 if (prepareTool) { 7793 const order = closure.length; 7794 this.transforms = ((s) => { 7795 let a = []; 7796 while (s-- > 0) a.push(null); 7797 return a; 7798 })(order - 1); 7799 for (let i = 0; i < order - 1; i++) { 7800 this.transforms[i] = new SymmetryTransformation(this.symmetry, closure[i + 1], center); 7801 } 7802 } 7803 break; 7804 case "octahedral": 7805 let orientation = null; 7806 if (!correct) return "no unique alignment strut selected."; 7807 if (axis == null) { 7808 if (!prepareTool) return "no aligment strut selected."; 7809 } else { 7810 const icosa = this.symmetry; 7811 const zone = icosa.getAxis$com_vzome_core_algebra_AlgebraicVector(axis.getOffset()); 7812 if (zone == null) return "selected alignment strut is not an octahedral axis."; 7813 let blueIndex = 0; 7814 switch (zone.getDirection().getName()) { 7815 case "green": 7816 blueIndex = icosa.blueTetrahedralFromGreen(zone.getOrientation()); 7817 break; 7818 case "blue": 7819 blueIndex = zone.getOrientation(); 7820 break; 7821 default: 7822 return "selected alignment strut is not an octahedral axis."; 7823 } 7824 orientation = this.symmetry.getMatrix(blueIndex); 7825 } 7826 if (prepareTool) { 7827 const inverse = orientation.inverse(); 7828 const octa = this.symmetry != null && this.symmetry instanceof OctahedralSymmetry ? this.symmetry : new OctahedralSymmetry(this.symmetry.getField()); 7829 const order = octa.getChiralOrder(); 7830 this.transforms = ((s) => { 7831 let a = []; 7832 while (s-- > 0) a.push(null); 7833 return a; 7834 })(order - 1); 7835 for (let i = 0; i < order - 1; i++) { 7836 { 7837 let matrix = octa.getMatrix(i + 1); 7838 matrix = orientation.times(matrix.times(inverse)); 7839 this.transforms[i] = new MatrixTransformation(matrix, center.getLocation()); 7840 } 7841 ; 7842 } 7843 } 7844 break; 7845 default: 7846 if (prepareTool) this.prepareFullSymmetry(center); 7847 break; 7848 } 7849 break; 7850 case "synestructics": 7851 case "octahedral": 7852 if (prepareTool) { 7853 if (this.getCategory() === "tetrahedral") { 7854 const order = closure.length; 7855 this.transforms = ((s) => { 7856 let a = []; 7857 while (s-- > 0) a.push(null); 7858 return a; 7859 })(order - 1); 7860 for (let i = 0; i < order - 1; i++) { 7861 this.transforms[i] = new SymmetryTransformation(this.symmetry, closure[i + 1], center); 7862 } 7863 } else { 7864 this.prepareFullSymmetry(center); 7865 } 7866 } else { 7867 if (axis != null) return "No struts needed for symmetry"; 7868 } 7869 break; 7870 default: 7871 if (prepareTool) this.prepareFullSymmetry(center); 7872 break; 7873 } 7874 return null; 7875 } 7876 /*private*/ 7877 prepareFullSymmetry(center) { 7878 const order = this.symmetry.getChiralOrder(); 7879 this.transforms = ((s) => { 7880 let a = []; 7881 while (s-- > 0) a.push(null); 7882 return a; 7883 })(order - 1); 7884 for (let i = 0; i < order - 1; i++) { 7885 this.transforms[i] = new SymmetryTransformation(this.symmetry, i + 1, center); 7886 } 7887 } 7888 /** 7889 * 7890 * @return {string} 7891 */ 7892 getXmlElementName() { 7893 return "SymmetryTool"; 7894 } 7895 /** 7896 * 7897 * @param {*} element 7898 */ 7899 getXmlAttributes(element) { 7900 element.setAttribute("symmetry", this.symmetry.getName()); 7901 super.getXmlAttributes(element); 7902 } 7903 /** 7904 * 7905 * @param {*} element 7906 * @param {XmlSaveFormat} format 7907 */ 7908 setXmlAttributes(element, format) { 7909 const symmName = element.getAttribute("symmetry"); 7910 this.symmetry = format.parseSymmetry(symmName); 7911 super.setXmlAttributes(element, format); 7912 } 7913}; 7914SymmetryTool["__class"] = "com.vzome.core.tools.SymmetryTool"; 7915SymmetryTool["__interfaces"] = ["com.vzome.api.Tool"]; 7916
7917// src/worker/legacy/from-java/com/vzome/core/tools/RotationTool.ts 7918var RotationTool = class extends SymmetryTool { 7919 /** 7920 * 7921 * @return {string} 7922 */ 7923 getCategory() { 7924 if (this.fullRotation) return "axial symmetry"; 7925 else return RotationToolFactory.ID; 7926 } 7927 constructor(id, symmetry, tools, full) { 7928 if ((typeof id === "string" || id === null) && (symmetry != null && (symmetry.constructor != null && symmetry.constructor["__interfaces"] != null && symmetry.constructor["__interfaces"].indexOf("com.vzome.core.math.symmetry.Symmetry") >= 0) || symmetry === null) && (tools != null && tools instanceof ToolsModel || tools === null) && (typeof full === "boolean" || full === null)) { 7929 let __args = arguments; 7930 super(id, symmetry, tools); 7931 if (this.fullRotation === void 0) { 7932 this.fullRotation = false; 7933 } 7934 if (this.corrected === void 0) { 7935 this.corrected = false; 7936 } 7937 this.fullRotation = full; 7938 this.corrected = true; 7939 if (full) this.setInputBehaviors(true, false); 7940 else this.setInputBehaviors(false, true); 7941 } else if ((typeof id === "string" || id === null) && (symmetry != null && (symmetry.constructor != null && symmetry.constructor["__interfaces"] != null && symmetry.constructor["__interfaces"].indexOf("com.vzome.core.math.symmetry.Symmetry") >= 0) || symmetry === null) && (tools != null && tools instanceof ToolsModel || tools === null) && full === void 0) { 7942 let __args = arguments; 7943 let editor = __args[2]; 7944 { 7945 let __args2 = arguments; 7946 let tools2 = editor; 7947 let full2 = false; 7948 super(id, symmetry, tools2); 7949 if (this.fullRotation === void 0) { 7950 this.fullRotation = false; 7951 } 7952 if (this.corrected === void 0) { 7953 this.corrected = false; 7954 } 7955 this.fullRotation = full2; 7956 this.corrected = true; 7957 if (full2) this.setInputBehaviors(true, false); 7958 else this.setInputBehaviors(false, true); 7959 } 7960 (() => { 7961 this.corrected = false; 7962 })(); 7963 } else throw new Error("invalid overload"); 7964 } 7965 /** 7966 * 7967 * @param {boolean} prepareTool 7968 * @return {string} 7969 */ 7970 checkSelection(prepareTool) { 7971 let center = null; 7972 let axisStrut = null; 7973 let correct = true; 7974 let rotationZone = null; 7975 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 7976 let man = index.next(); 7977 { 7978 if (prepareTool) this.unselect$com_vzome_core_model_Manifestation(man); 7979 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) { 7980 if (center != null) { 7981 correct = false; 7982 break; 7983 } 7984 center = man.getFirstConstruction(); 7985 } else if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) { 7986 if (axisStrut != null) { 7987 correct = false; 7988 break; 7989 } 7990 axisStrut = man.getFirstConstruction(); 7991 let vector = axisStrut.getOffset(); 7992 vector = axisStrut.getField().projectTo3d(vector, true); 7993 rotationZone = this.symmetry["getAxis$com_vzome_core_algebra_AlgebraicVector"](vector); 7994 } 7995 } 7996 } 7997 if (axisStrut == null) { 7998 rotationZone = this.symmetry.getPreferredAxis(); 7999 if (rotationZone != null) { 8000 const field5 = this.symmetry.getField(); 8001 center = this.originPoint; 8002 this.addParameter(center); 8003 axisStrut = new AnchoredSegment(rotationZone, field5.one(), center); 8004 this.addParameter(axisStrut); 8005 } else if (this.isPredefined()) { 8006 center = this.originPoint; 8007 this.addParameter(center); 8008 const redOrbit = this.symmetry.getSpecialOrbit(1 /* RED */); 8009 rotationZone = redOrbit.getAxis$int$int(Symmetry.PLUS, 1); 8010 const field5 = this.symmetry.getField(); 8011 const redScale = redOrbit.getUnitLength()["times$com_vzome_core_algebra_AlgebraicNumber"](field5["createPower$int"](Direction.USER_SCALE)); 8012 axisStrut = new AnchoredSegment(rotationZone, redScale, center); 8013 this.addParameter(axisStrut); 8014 } else if (this.isAutomatic()) { 8015 center = this.originPoint; 8016 this.addParameter(center); 8017 const field5 = this.symmetry.getField(); 8018 const zAxis = field5.basisVector(3, AlgebraicVector.Z); 8019 const len = field5["createPower$int"](2); 8020 rotationZone = this.symmetry["getAxis$com_vzome_core_algebra_AlgebraicVector"](zAxis); 8021 axisStrut = new AnchoredSegment(rotationZone, len, center); 8022 this.addParameter(axisStrut); 8023 } else correct = false;
8024 } else if (center == null) center = new SegmentEndPoint(axisStrut); 8025 if (!correct) return "rotation tool requires a single axis strut,\nand optionally a separate center point"; 8026 if (rotationZone == null) return "selected strut is not an axis of rotation"; 8027 const perm = rotationZone.getRotationPermutation(); 8028 if (perm == null) return "selected strut is not an axis of rotation"; 8029 let rotation = this.corrected ? perm.mapIndex(0) : rotationZone.getRotation(); 8030 if (prepareTool) { 8031 if (this.fullRotation) { 8032 const order = perm.getOrder(); 8033 this.transforms = ((s) => { 8034 let a = []; 8035 while (s-- > 0) a.push(null); 8036 return a; 8037 })(order - 1); 8038 for (let i = 0; i < this.transforms.length; i++) { 8039 { 8040 this.transforms[i] = new SymmetryTransformation(this.symmetry, rotation, center); 8041 rotation = perm.mapIndex(rotation); 8042 } 8043 ; 8044 } 8045 } else { 8046 this.transforms = [null]; 8047 this.transforms[0] = new SymmetryTransformation(this.symmetry, rotation, center); 8048 } 8049 } 8050 return null; 8051 } 8052 /** 8053 * 8054 * @return {string} 8055 */ 8056 getXmlElementName() { 8057 return "RotationTool"; 8058 } 8059 /** 8060 * 8061 * @param {*} element 8062 */ 8063 getXmlAttributes(element) { 8064 if (this.fullRotation) element.setAttribute("full", "true"); 8065 if (this.corrected) element.setAttribute("corrected", "true"); 8066 super.getXmlAttributes(element); 8067 } 8068 /** 8069 * 8070 * @param {*} element 8071 * @param {XmlSaveFormat} format 8072 */ 8073 setXmlAttributes(element, format) { 8074 let value = element.getAttribute("full"); 8075 this.fullRotation = value != null && "true" === value; 8076 value = element.getAttribute("corrected"); 8077 this.corrected = value != null && "true" === value; 8078 super.setXmlAttributes(element, format); 8079 } 8080}; 8081RotationTool["__class"] = "com.vzome.core.tools.RotationTool"; 8082RotationTool["__interfaces"] = ["com.vzome.api.Tool"]; 8083
8084// src/worker/legacy/from-java/com/vzome/core/tools/AxialSymmetryToolFactory.ts 8085var AxialSymmetryToolFactory = class _AxialSymmetryToolFactory extends RotationToolFactory { 8086 static { 8087 this.ID = "axial symmetry"; 8088 } 8089 static { 8090 this.__com_vzome_core_tools_AxialSymmetryToolFactory_LABEL = "Create a rotational symmetry tool"; 8091 } 8092 static { 8093 this.__com_vzome_core_tools_AxialSymmetryToolFactory_TOOLTIP = "<p>Each tool creates enough copies of the selected objects to<br>create rotational symmetry around an axis. To create a tool,<br>select a strut that defines that axis, You can also define<br>the direction and center independently, by selecting a ball<br>for the center and a strut for the axis. Note: not all struts<br>correspond to rotational symmetries!<br><br>Combine with a point reflection or mirror reflection tool to<br>achieve more symmetries.<br></p>"; 8094 } 8095 constructor(tools, symmetry, useSymmetryName = false) { 8096 super(tools, symmetry, (useSymmetryName ? symmetry.getName() + " " : "") + _AxialSymmetryToolFactory.ID, _AxialSymmetryToolFactory.__com_vzome_core_tools_AxialSymmetryToolFactory_LABEL, _AxialSymmetryToolFactory.__com_vzome_core_tools_AxialSymmetryToolFactory_TOOLTIP); 8097 } 8098 /** 8099 * 8100 * @param {string} id 8101 * @return {Tool} 8102 */ 8103 createToolInternal(id) {
8104 return new RotationTool(id, this.getSymmetry(), this.getToolsModel(), true); 8105 } 8106}; 8107AxialSymmetryToolFactory["__class"] = "com.vzome.core.tools.AxialSymmetryToolFactory"; 8108AxialSymmetryToolFactory["__interfaces"] = ["com.vzome.core.editor.SelectionSummary.Listener", "com.vzome.api.Tool.Factory"]; 8109
8110// src/worker/legacy/from-java/com/vzome/core/tools/InversionTool.ts 8111var InversionTool = class _InversionTool extends TransformationTool { 8112 static { 8113 this.ID = "point reflection"; 8114 } 8115 static { 8116 this.LABEL = "Create a point reflection tool"; 8117 } 8118 static { 8119 this.TOOLTIP = "<p>Each tool duplicates the selection by reflecting<br>each point through the defined center. To create a<br>tool, select a single ball that defines that center.<br></p>"; 8120 } 8121 constructor(toolName, tools) { 8122 super(toolName, tools); 8123 } 8124 /** 8125 * 8126 * @param {boolean} prepareTool 8127 * @return {string} 8128 */ 8129 checkSelection(prepareTool) { 8130 let center = null; 8131 if (!this.isAutomatic()) for (let index = this.mSelection.iterator(); index.hasNext(); ) { 8132 let man = index.next(); 8133 { 8134 if (prepareTool) this.unselect$com_vzome_core_model_Manifestation(man); 8135 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) { 8136 if (center != null) return "more than one center selected"; 8137 center = man.getFirstConstruction(); 8138 } else if (!prepareTool) return "panel or strut selected"; 8139 } 8140 } 8141 if (center == null) { 8142 if (prepareTool) { 8143 center = this.originPoint; 8144 this.addParameter(center); 8145 } else return "No symmetry center selected"; 8146 } 8147 if (prepareTool) { 8148 this.transforms = [null]; 8149 this.transforms[0] = new PointReflection(center); 8150 } 8151 return null; 8152 } 8153 /** 8154 * 8155 * @return {string} 8156 */ 8157 getXmlElementName() { 8158 return "InversionTool"; 8159 } 8160 /** 8161 * 8162 * @return {string} 8163 */ 8164 getCategory() { 8165 return _InversionTool.ID; 8166 } 8167}; 8168InversionTool["__class"] = "com.vzome.core.tools.InversionTool"; 8169InversionTool["__interfaces"] = ["com.vzome.api.Tool"]; 8170
8171// src/worker/legacy/from-java/com/vzome/core/tools/InversionToolFactory.ts 8172var InversionToolFactory = class extends AbstractToolFactory { 8173 constructor(tools) { 8174 super(tools, null, InversionTool.ID, InversionTool.LABEL, InversionTool.TOOLTIP); 8175 } 8176 /** 8177 * 8178 * @param {number} total 8179 * @param {number} balls 8180 * @param {number} struts 8181 * @param {number} panels 8182 * @return {boolean} 8183 */ 8184 countsAreValid(total, balls, struts, panels) { 8185 return total === 1 && balls === 1; 8186 } 8187 /** 8188 * 8189 * @param {string} id 8190 * @return {Tool} 8191 */ 8192 createToolInternal(id) { 8193 return new InversionTool(id, this.getToolsModel()); 8194 } 8195 /** 8196 * 8197 * @return {Tool} 8198 */ 8199 createTool() { 8200 const result = super.createTool(); 8201 result.setCopyColors(false); 8202 return result; 8203 } 8204 /** 8205 * 8206 * @param {*} selection 8207 * @return {boolean} 8208 */ 8209 bindParameters(selection) { 8210 return true; 8211 } 8212}; 8213InversionToolFactory["__class"] = "com.vzome.core.tools.InversionToolFactory"; 8214InversionToolFactory["__interfaces"] = ["com.vzome.core.editor.SelectionSummary.Listener", "com.vzome.api.Tool.Factory"]; 8215
8216// src/worker/legacy/from-java/com/vzome/core/algebra/Trivector3dHomogeneous.ts 8217var Trivector3dHomogeneous = class { 8218 constructor(e123, e310, e320, e120, field5) { 8219 if (this.e123 === void 0) { 8220 this.e123 = null; 8221 } 8222 if (this.e310 === void 0) { 8223 this.e310 = null; 8224 } 8225 if (this.e320 === void 0) { 8226 this.e320 = null; 8227 } 8228 if (this.e120 === void 0) { 8229 this.e120 = null; 8230 } 8231 if (this.field === void 0) { 8232 this.field = null; 8233 } 8234 this.e123 = e123; 8235 this.e310 = e310; 8236 this.e320 = e320; 8237 this.e120 = e120; 8238 this.field = field5; 8239 } 8240 dual() { 8241 return new Vector3dHomogeneous(this.e320.negate(), this.e310, this.e120, this.e123.negate(), this.field); 8242 } 8243}; 8244Trivector3dHomogeneous["__class"] = "com.vzome.core.algebra.Trivector3dHomogeneous"; 8245
8246// src/worker/legacy/from-java/com/vzome/core/algebra/Bivector3dHomogeneous.ts 8247var Bivector3dHomogeneous = class { 8248 constructor(e12, e23, e31, e10, e20, e30, field5) { 8249 if (this.e12 === void 0) { 8250 this.e12 = null; 8251 } 8252 if (this.e23 === void 0) { 8253 this.e23 = null; 8254 } 8255 if (this.e31 === void 0) { 8256 this.e31 = null; 8257 } 8258 if (this.e10 === void 0) { 8259 this.e10 = null; 8260 } 8261 if (this.e20 === void 0) { 8262 this.e20 = null; 8263 } 8264 if (this.e30 === void 0) { 8265 this.e30 = null; 8266 } 8267 if (this.field === void 0) { 8268 this.field = null; 8269 } 8270 this.e12 = e12; 8271 this.e23 = e23; 8272 this.e31 = e31; 8273 this.e10 = e10; 8274 this.e20 = e20; 8275 this.e30 = e30; 8276 this.field = field5; 8277 } 8278 outer(that) { 8279 const e123 = this.e12["times$com_vzome_core_algebra_AlgebraicNumber"](that.e3)["plus$com_vzome_core_algebra_AlgebraicNumber"](this.e23["times$com_vzome_core_algebra_AlgebraicNumber"](that.e1))["plus$com_vzome_core_algebra_AlgebraicNumber"](this.e31["times$com_vzome_core_algebra_AlgebraicNumber"](that.e2)); 8280 const e310 = this.e10["times$com_vzome_core_algebra_AlgebraicNumber"](that.e3)["plus$com_vzome_core_algebra_AlgebraicNumber"](this.e31["times$com_vzome_core_algebra_AlgebraicNumber"](that.e0))["minus$com_vzome_core_algebra_AlgebraicNumber"](this.e30["times$com_vzome_core_algebra_AlgebraicNumber"](that.e1)); 8281 const e320 = this.e20["times$com_vzome_core_algebra_AlgebraicNumber"](that.e3)["minus$com_vzome_core_algebra_AlgebraicNumber"](this.e30["times$com_vzome_core_algebra_AlgebraicNumber"](that.e2))["minus$com_vzome_core_algebra_AlgebraicNumber"](this.e23["times$com_vzome_core_algebra_AlgebraicNumber"](that.e0)); 8282 const e120 = this.e12["times$com_vzome_core_algebra_AlgebraicNumber"](that.e0)["plus$com_vzome_core_algebra_AlgebraicNumber"](this.e20["times$com_vzome_core_algebra_AlgebraicNumber"](that.e1))["minus$com_vzome_core_algebra_AlgebraicNumber"](this.e10["times$com_vzome_core_algebra_AlgebraicNumber"](that.e2)); 8283 return new Trivector3dHomogeneous(e123, e310, e320, e120, this.field); 8284 } 8285}; 8286Bivector3dHomogeneous["__class"] = "com.vzome.core.algebra.Bivector3dHomogeneous"; 8287
8288// src/worker/legacy/from-java/com/vzome/core/algebra/Vector3dHomogeneous.ts 8289var Vector3dHomogeneous = class _Vector3dHomogeneous { 8290 constructor(e1, e2, e3, e0, field5) { 8291 if ((e1 != null && (e1.constructor != null && e1.constructor["__interfaces"] != null && e1.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || e1 === null) && (e2 != null && (e2.constructor != null && e2.constructor["__interfaces"] != null && e2.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || e2 === null) && (e3 != null && (e3.constructor != null && e3.constructor["__interfaces"] != null && e3.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || e3 === null) && (e0 != null && (e0.constructor != null && e0.constructor["__interfaces"] != null && e0.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || e0 === null) && (field5 != null && (field5.constructor != null && field5.constructor["__interfaces"] != null && field5.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicField") >= 0) || field5 === null)) { 8292 let __args = arguments; 8293 if (this.e1 === void 0) { 8294 this.e1 = null; 8295 } 8296 if (this.e2 === void 0) { 8297 this.e2 = null; 8298 } 8299 if (this.e3 === void 0) { 8300 this.e3 = null; 8301 } 8302 if (this.e0 === void 0) { 8303 this.e0 = null; 8304 } 8305 if (this.field === void 0) { 8306 this.field = null; 8307 } 8308 this.e1 = e1; 8309 this.e2 = e2; 8310 this.e3 = e3; 8311 this.e0 = e0; 8312 this.field = field5; 8313 } else if ((e1 != null && (e1.constructor != null && e1.constructor["__interfaces"] != null && e1.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || e1 === null) && (e2 != null && (e2.constructor != null && e2.constructor["__interfaces"] != null && e2.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || e2 === null) && (e3 != null && (e3.constructor != null && e3.constructor["__interfaces"] != null && e3.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || e3 === null) && (e0 != null && (e0.constructor != null && e0.constructor["__interfaces"] != null && e0.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicField") >= 0) || e0 === null) && field5 === void 0) { 8314 let __args = arguments; 8315 let field6 = __args[3]; 8316 { 8317 let __args2 = arguments; 8318 let e22 = __args2[0]; 8319 let e32 = __args2[0]; 8320 let e02 = __args2[4].one(); 8321 if (this.e1 === void 0) { 8322 this.e1 = null; 8323 } 8324 if (this.e2 === void 0) { 8325 this.e2 = null; 8326 } 8327 if (this.e3 === void 0) { 8328 this.e3 = null; 8329 } 8330 if (this.e0 === void 0) { 8331 this.e0 = null; 8332 } 8333 if (this.field === void 0) { 8334 this.field = null; 8335 } 8336 this.e1 = e1; 8337 this.e2 = e22; 8338 this.e3 = e32; 8339 this.e0 = e02; 8340 this.field = field6; 8341 } 8342 } else if ((e1 != null && e1 instanceof AlgebraicVector || e1 === null) && (e2 != null && (e2.constructor != null && e2.constructor["__interfaces"] != null && e2.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicField") >= 0) || e2 === null) && e3 === void 0 && e0 === void 0 && field5 === void 0) { 8343 let __args = arguments; 8344 let v = __args[0]; 8345 let field6 = __args[1]; 8346 { 8347 let __args2 = arguments; 8348 let e12 = v.getComponent(0); 8349 let e22 = v.getComponent(1); 8350 let e32 = v.getComponent(2); 8351 { 8352 let __args3 = arguments; 8353 let e23 = __args3[0]; 8354 let e33 = __args3[0]; 8355 let e02 = __args3[4].one(); 8356 if (this.e1 === void 0) { 8357 this.e1 = null; 8358 } 8359 if (this.e2 === void 0) { 8360 this.e2 = null; 8361 } 8362 if (this.e3 === void 0) { 8363 this.e3 = null; 8364 } 8365 if (this.e0 === void 0) { 8366 this.e0 = null; 8367 } 8368 if (this.field === void 0) { 8369 this.field = null; 8370 } 8371 this.e1 = e12; 8372 this.e2 = e23; 8373 this.e3 = e33; 8374 this.e0 = e02; 8375 this.field = field6; 8376 } 8377 } 8378 } else throw new Error("invalid overload"); 8379 } 8380 outer(that) { 8381 const e12 = this.e1["times$com_vzome_core_algebra_AlgebraicNumber"](that.e2)["minus$com_vzome_core_algebra_AlgebraicNumber"](this.e2["times$com_vzome_core_algebra_AlgebraicNumber"](that.e1)); 8382 const e23 = this.e2["times$com_vzome_core_algebra_AlgebraicNumber"](that.e3)["minus$com_vzome_core_algebra_AlgebraicNumber"](this.e3["times$com_vzome_core_algebra_AlgebraicNumber"](that.e2)); 8383 const e31 = this.e3["times$com_vzome_core_algebra_AlgebraicNumber"](that.e1)["minus$com_vzome_core_algebra_AlgebraicNumber"](this.e1["times$com_vzome_core_algebra_AlgebraicNumber"](that.e3)); 8384 const e10 = this.e1["times$com_vzome_core_algebra_AlgebraicNumber"](that.e0)["minus$com_vzome_core_algebra_AlgebraicNumber"](this.e0["times$com_vzome_core_algebra_AlgebraicNumber"](that.e1)); 8385 const e20 = this.e2["times$com_vzome_core_algebra_AlgebraicNumber"](that.e0)["minus$com_vzome_core_algebra_AlgebraicNumber"](this.e0["times$com_vzome_core_algebra_AlgebraicNumber"](that.e2)); 8386 const e30 = this.e3["times$com_vzome_core_algebra_AlgebraicNumber"](that.e0)["minus$com_vzome_core_algebra_AlgebraicNumber"](this.e0["times$com_vzome_core_algebra_AlgebraicNumber"](that.e3)); 8387 return new Bivector3dHomogeneous(e12, e23, e31, e10, e20, e30, this.field); 8388 } 8389 getVector() { 8390 return new AlgebraicVector(this.e1.dividedBy(this.e0), this.e2.dividedBy(this.e0), this.e3.dividedBy(this.e0)); 8391 } 8392 dot(v) { 8393 const e1 = this.e3["times$com_vzome_core_algebra_AlgebraicNumber"](v.e31)["minus$com_vzome_core_algebra_AlgebraicNumber"](this.e2["times$com_vzome_core_algebra_AlgebraicNumber"](v.e12))["minu
8393s$com_vzome_core_algebra_AlgebraicNumber"](this.e0["times$com_vzome_core_algebra_AlgebraicNumber"](v.e10)); 8394 const e2 = this.e1["times$com_vzome_core_algebra_AlgebraicNumber"](v.e12)["minus$com_vzome_core_algebra_AlgebraicNumber"](this.e3["times$com_vzome_core_algebra_AlgebraicNumber"](v.e23))["minus$com_vzome_core_algebra_AlgebraicNumber"](this.e0["times$com_vzome_core_algebra_AlgebraicNumber"](v.e20)); 8395 const e3 = this.e2["times$com_vzome_core_algebra_AlgebraicNumber"](v.e23)["minus$com_vzome_core_algebra_AlgebraicNumber"](this.e1["times$com_vzome_core_algebra_AlgebraicNumber"](v.e31))["minus$com_vzome_core_algebra_AlgebraicNumber"](this.e0["times$com_vzome_core_algebra_AlgebraicNumber"](v.e30)); 8396 const e0 = this.e1["times$com_vzome_core_algebra_AlgebraicNumber"](v.e10)["plus$com_vzome_core_algebra_AlgebraicNumber"](this.e2["times$com_vzome_core_algebra_AlgebraicNumber"](v.e20))["plus$com_vzome_core_algebra_AlgebraicNumber"](this.e3["times$com_vzome_core_algebra_AlgebraicNumber"](v.e30)); 8397 return new _Vector3dHomogeneous(e1, e2, e3, e0, this.field); 8398 } 8399 exists() { 8400 return !this.e0.isZero(); 8401 } 8402}; 8403Vector3dHomogeneous["__class"] = "com.vzome.core.algebra.Vector3dHomogeneous"; 8404
8405// src/worker/legacy/from-java/com/vzome/core/construction/Line.ts 8406var Line = class extends Construction { 8407 constructor(field5) { 8408 super(field5); 8409 if (this.mDirection === void 0) { 8410 this.mDirection = null; 8411 } 8412 if (this.mStart === void 0) { 8413 this.mStart = null; 8414 } 8415 } 8416 /** 8417 * 8418 * @return {boolean} 8419 */ 8420 is3d() { 8421 return true; 8422 } 8423 /** 8424 * 8425 * @param {AlgebraicVector} start 8426 * @param {AlgebraicVector} norm need not be normalized yet 8427 * @return 8428 * @param {boolean} impossible 8429 * @return {boolean} 8430 */ 8431 setStateVariables(start, norm, impossible) { 8432 if (impossible) { 8433 if (this.isImpossible()) return false; 8434 this.setImpossible(true); 8435 return true; 8436 } 8437 if (norm.equals(this.mDirection) && start.equals(this.mStart) && !this.isImpossible()) return false; 8438 this.mDirection = norm; 8439 this.mStart = start; 8440 this.setImpossible(false); 8441 return true; 8442 } 8443 getStart() { 8444 return this.mStart; 8445 } 8446 /** 8447 * @return {AlgebraicVector} a "unit" vector... always normalized 8448 */ 8449 getDirection() { 8450 return this.mDirection; 8451 } 8452 /** 8453 * 8454 * @param {*} doc 8455 * @return {*} 8456 */ 8457 getXml(doc) { 8458 const result = doc.createElement("line"); 8459 return result; 8460 } 8461 getHomogeneous() { 8462 const v1 = new Vector3dHomogeneous(this.mStart, this.getField()); 8463 const v2 = new Vector3dHomogeneous(this.mStart.plus(this.mDirection), this.getField()); 8464 return v1.outer(v2); 8465 } 8466}; 8467Line["__class"] = "com.vzome.core.construction.Line"; 8468
8469// src/worker/legacy/from-java/com/vzome/core/construction/LineExtensionOfSegment.ts 8470var LineExtensionOfSegment = class extends Line { 8471 constructor(seg) { 8472 super(seg.field); 8473 if (this.mSegment === void 0) { 8474 this.mSegment = null; 8475 } 8476 this.mSegment = seg; 8477 this.mapParamsToState(); 8478 } 8479 /** 8480 * 8481 * @return {boolean} 8482 */ 8483 mapParamsToState() { 8484 if (this.mSegment.isImpossible()) return this.setStateVariables(null, null, true); 8485 return this.setStateVariables(this.mSegment.getStart(), this.mSegment.getOffset(), false); 8486 } 8487 /** 8488 * 8489 * @return {Bivector3dHomogeneous} 8490 */ 8491 getHomogeneous() { 8492 const v1 = new Vector3dHomogeneous(this.mSegment.getStart(), this.getField()); 8493 const v2 = new Vector3dHomogeneous(this.mSegment.getEnd(), this.getField()); 8494 return v1.outer(v2); 8495 } 8496}; 8497LineExtensionOfSegment["__class"] = "com.vzome.core.construction.LineExtensionOfSegment"; 8498
8499// src/worker/legacy/from-java/com/vzome/core/construction/LineFromPointAndVector.ts 8500var LineFromPointAndVector = class extends Line { 8501 constructor(point, direction) { 8502 super(point.getField()); 8503 if (this.point === void 0) { 8504 this.point = null; 8505 } 8506 if (this.direction === void 0) { 8507 this.direction = null; 8508 } 8509 this.point = point; 8510 this.direction = direction; 8511 this.mapParamsToState(); 8512 } 8513 /** 8514 * 8515 * @return {boolean} 8516 */ 8517 mapParamsToState() { 8518 if (this.direction.isOrigin()) return this.setStateVariables(null, null, true); 8519 return this.setStateVariables(this.point, this.direction, false); 8520 } 8521}; 8522LineFromPointAndVector["__class"] = "com.vzome.core.construction.LineFromPointAndVector"; 8523
8524// src/worker/legacy/from-java/com/vzome/core/construction/LineLineIntersectionPoint.ts 8525var LineLineIntersectionPoint = class extends Point { 8526 constructor(line1, line2) { 8527 super(line1.field); 8528 if (this.line1 === void 0) { 8529 this.line1 = null; 8530 } 8531 if (this.line2 === void 0) { 8532 this.line2 = null; 8533 } 8534 this.line1 = line1; 8535 this.line2 = line2; 8536 this.mapParamsToState(); 8537 } 8538 /** 8539 * 8540 * @return {boolean} 8541 */ 8542 mapParamsToState() { 8543 const p1 = this.line1.getStart(); 8544 const p21 = this.line1.getDirection(); 8545 const p3 = this.line2.getStart(); 8546 const p43 = this.line2.getDirection(); 8547 if (p1.equals(p3)) return this.setStateVariable(p1, false); 8548 const p2 = p1.plus(p21); 8549 if (p2.equals(p3)) return this.setStateVariable(p2, false); 8550 const p4 = p3.plus(p43); 8551 if (p1.equals(p4)) return this.setStateVariable(p1, false); 8552 if (p2.equals(p4)) return this.setStateVariable(p2, false); 8553 const p13 = p1.minus(p3); 8554 const d1343 = p13.dot(p43); 8555 const d4321 = p43.dot(p21); 8556 const d1321 = p13.dot(p21); 8557 const d4343 = p43.dot(p43); 8558 const d2121 = p21.dot(p21); 8559 const denom = d2121["times$com_vzome_core_algebra_AlgebraicNumber"](d4343)["minus$com_vzome_core_algebra_AlgebraicNumber"](d4321["times$com_vzome_core_algebra_AlgebraicNumber"](d4321)); 8560 if (denom.isZero()) return this.setStateVariable(null, true); 8561 const numer = d1343["times$com_vzome_core_algebra_AlgebraicNumber"](d4321)["minus$com_vzome_core_algebra_AlgebraicNumber"](d1321["times$com_vzome_core_algebra_AlgebraicNumber"](d4343)); 8562 const mua = numer.dividedBy(denom); 8563 const mub = d1343["plus$com_vzome_core_algebra_AlgebraicNumber"](d4321["times$com_vzome_core_algebra_AlgebraicNumber"](mua)).dividedBy(d4343); 8564 const pa = p1.plus(p21.scale(mua)); 8565 const pb = p3.plus(p43.scale(mub)); 8566 if (!pa.equals(pb)) return this.setStateVariable(null, true); 8567 return this.setStateVariable(pb, false); 8568 } 8569}; 8570LineLineIntersectionPoint["__class"] = "com.vzome.core.construction.LineLineIntersectionPoint"; 8571
8572// src/worker/legacy/from-java/com/vzome/core/construction/LineReflection.ts 8573var LineReflection = class extends Transformation { 8574 constructor(axis) { 8575 super(axis.field); 8576 if (this.two === void 0) { 8577 this.two = null; 8578 } 8579 if (this.mMirrorLine === void 0) { 8580 this.mMirrorLine = null; 8581 } 8582 if (this.mStart === void 0) { 8583 this.mStart = null; 8584 } 8585 if (this.mEnd === void 0) { 8586 this.mEnd = null; 8587 } 8588 this.two = this.field["createRational$long"](2); 8589 this.mMirrorLine = new LineExtensionOfSegment(axis); 8590 this.mStart = axis.getStart(); 8591 this.mEnd = axis.getEnd(); 8592 } 8593 /** 8594 * 8595 * @return {boolean} 8596 */ 8597 mapParamsToState() { 8598 return true; 8599 } 8600 transform$com_vzome_core_algebra_AlgebraicVector(arg) { 8601 const norm1 = AlgebraicVectors.getNormal$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector(this.mStart, this.mEnd, arg); 8602 if (norm1.isOrigin()) { 8603 return arg; 8604 } 8605 const norm2 = AlgebraicVectors.getNormal$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector(this.mStart, this.mEnd, this.mEnd.plus(norm1)); 8606 const line2 = new LineFromPointAndVector(arg, norm2); 8607 const point = new LineLineIntersectionPoint(this.mMirrorLine, line2); 8608 const intersection = point.getLocation(); 8609 const translation = intersection.minus(arg).scale(this.two); 8610 return arg.plus(translation); 8611 } 8612 /** 8613 * 8614 * @param {AlgebraicVector} arg 8615 * @return {AlgebraicVector} 8616 */ 8617 transform(arg) { 8618 if (arg != null && arg instanceof AlgebraicVector || arg === null) { 8619 return this.transform$com_vzome_core_algebra_AlgebraicVector(arg); 8620 } else if (arg != null && arg instanceof Construction || arg === null) { 8621 return this.transform$com_vzome_core_construction_Construction(arg); 8622 } else throw new Error("invalid overload"); 8623 } 8624}; 8625LineReflection["__class"] = "com.vzome.core.construction.LineReflection"; 8626
8627// src/worker/legacy/from-java/com/vzome/core/tools/LineReflectionTool.ts 8628var LineReflectionTool = class extends TransformationTool { 8629 constructor(id, tools) { 8630 super(id, tools); 8631 this.setCopyColors(false); 8632 } 8633 /** 8634 * 8635 * @param {boolean} prepareTool 8636 * @return {string} 8637 */ 8638 checkSelection(prepareTool) { 8639 let axis = null; 8640 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 8641 let man = index.next(); 8642 { 8643 if (prepareTool) { 8644 this.unselect$com_vzome_core_model_Manifestation(man); 8645 } 8646 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) { 8647 if (axis != null) { 8648 if (prepareTool) { 8649 break; 8650 } else { 8651 return "Only one mirror axis strut may be selected"; 8652 } 8653 } 8654 axis = man.getFirstConstruction(); 8655 } 8656 } 8657 } 8658 if (axis == null) { 8659 return "line reflection tool requires a single strut"; 8660 } 8661 if (prepareTool) { 8662 this.transforms = [null]; 8663 this.transforms[0] = new LineReflection(axis); 8664 } 8665 return null; 8666 } 8667 /** 8668 * 8669 * @return {string} 8670 */ 8671 getXmlElementName() { 8672 return "LineReflectionTool"; 8673 } 8674}; 8675LineReflectionTool["__class"] = "com.vzome.core.tools.LineReflectionTool"; 8676LineReflectionTool["__interfaces"] = ["com.vzome.api.Tool"]; 8677
8678// src/worker/legacy/from-java/com/vzome/core/tools/LineReflectionToolFactory.ts 8679var LineReflectionToolFactory = class _LineReflectionToolFactory extends AbstractToolFactory { 8680 static { 8681 this.ID = "line reflection"; 8682 } 8683 static { 8684 this.LABEL = "Create a line reflection tool"; 8685 } 8686 static { 8687 this.TOOLTIP = "<p>Each tool duplicates the selection by reflecting<br>each object in a line. To create a tool,<br>define the mirror line by selecting a strut.<br></p>"; 8688 } 8689 constructor(tools) { 8690 super(tools, null, _LineReflectionToolFactory.ID, _LineReflectionToolFactory.LABEL, _LineReflectionToolFactory.TOOLTIP); 8691 } 8692 /** 8693 * 8694 * @param {string} id 8695 * @return {Tool} 8696 */ 8697 createToolInternal(id) { 8698 return new LineReflectionTool(id, this.getToolsModel()); 8699 } 8700 /** 8701 * 8702 * @param {number} total 8703 * @param {number} balls 8704 * @param {number} struts 8705 * @param {number} panels 8706 * @return {boolean} 8707 */ 8708 countsAreValid(total, balls, struts, panels) { 8709 return total === 1 && struts === 1; 8710 } 8711 /** 8712 * 8713 * @param {*} selection 8714 * @return {boolean} 8715 */ 8716 bindParameters(selection) { 8717 return true; 8718 } 8719}; 8720LineReflectionToolFactory["__class"] = "com.vzome.core.tools.LineReflectionToolFactory"; 8721LineReflectionToolFactory["__interfaces"] = ["com.vzome.core.editor.SelectionSummary.Listener", "com.vzome.api.Tool.Factory"]; 8722
8723// src/worker/legacy/from-java/com/vzome/core/construction/ChangeOfBasis.ts 8724var ChangeOfBasis = class _ChangeOfBasis extends Transformation { 8725 constructor(newX, newY, newZ, kernel, originalScaling) { 8726 if ((newX != null && newX instanceof Segment || newX === null) && (newY != null && newY instanceof Segment || newY === null) && (newZ != null && newZ instanceof Segment || newZ === null) && (kernel != null && kernel instanceof Point || kernel === null) && (typeof originalScaling === "boolean" || originalScaling === null)) { 8727 let __args = arguments; 8728 super(newX.field); 8729 if (this.mOld === void 0) { 8730 this.mOld = null; 8731 } 8732 if (this.mNew === void 0) { 8733 this.mNew = null; 8734 } 8735 if (this.mKernel === void 0) { 8736 this.mKernel = null; 8737 } 8738 if (this.scale === void 0) { 8739 this.scale = null; 8740 } 8741 this.mNew = [newX, newY, newZ]; 8742 this.mOld = null; 8743 this.mKernel = kernel; 8744 if (originalScaling) this.scale = this.field["createPower$int"](-5); 8745 else this.scale = this.field["createRational$long$long"](1, 2)["times$com_vzome_core_algebra_AlgebraicNumber"](this.field["createPower$int"](-3)); 8746 this.mapParamsToState(); 8747 } else if ((newX != null && newX instanceof Array && (newX.length == 0 || newX[0] == null || newX[0] != null && newX[0] instanceof Segment) || newX === null) && (newY != null && newY instanceof Array && (newY.length == 0 || newY[0] == null || newY[0] != null && newY[0] instanceof Segment) || newY === null) && (newZ != null && newZ instanceof Point || newZ === null) && kernel === void 0 && originalScaling === void 0) { 8748 let __args = arguments; 8749 let oldBasis = __args[0]; 8750 let newBasis = __args[1]; 8751 let kernel2 = __args[2]; 8752 super(oldBasis[0].field); 8753 if (this.mOld === void 0) { 8754 this.mOld = null; 8755 } 8756 if (this.mNew === void 0) { 8757 this.mNew = null; 8758 } 8759 if (this.mKernel === void 0) { 8760 this.mKernel = null; 8761 } 8762 if (this.scale === void 0) { 8763 this.scale = null; 8764 } 8765 this.mOld = oldBasis; 8766 this.mNew = newBasis; 8767 this.mKernel = kernel2; 8768 this.scale = this.field["createRational$long"](2)["times$com_vzome_core_algebra_AlgebraicNumber"](this.field["createPower$int"](-7)); 8769 this.mapParamsToState(); 8770 } else throw new Error("invalid overload"); 8771 } 8772 /** 8773 * 8774 * @return {boolean} 8775 */ 8776 mapParamsToState() { 8777 const loc = this.mKernel.getLocation(); 8778 if (this.mOld != null) { 8779 const oldCommon = _ChangeOfBasis.findCommonVertex(this.mOld[0], this.mOld[1]); 8780 const offsets = [null, null, null]; 8781 for (let i = 0; i < offsets.length; i++) { 8782 { 8783 offsets[i] = this.mOld[i].getOffset().scale(this.scale); 8784 if (oldCommon.equals(this.mOld[i].getEnd())) offsets[i] = offsets[i].negate(); 8785 } 8786 ; 8787 } 8788 const oldMatrix = new AlgebraicMatrix(offsets); 8789 const newCommon = _ChangeOfBasis.findCommonVertex(this.mNew[0], this.mNew[1]); 8790 for (let i = 0; i < offsets.length; i++) { 8791 { 8792 offsets[i] = this.mNew[i].getOffset().scale(this.scale); 8793 if (newCommon.equals(this.mNew[i].getEnd())) offsets[i] = offsets[i].negate(); 8794 } 8795 ; 8796 } 8797 const newMatrix = new AlgebraicMatrix(offsets); 8798 const transform = newMatrix.times(oldMatrix.inverse()); 8799 return this.setStateVariables(transform, loc, false); 8800 } else { 8801 const transform = new AlgebraicMatrix(this.mNew[0].getOffset().scale(this.scale), this.mNew[1].getOffset().scale(this.scale), this.mNew[2].getOffset().scale(this.scale)); 8802 return this.setStateVariables(transform, loc, false); 8803 } 8804 } 8805 static findCommonVertex(s1, s2) { 8806 let common = s1.getStart(); 8807 if (common.equals(s2.getStart()) || common.equals(s2.getEnd())) return common; 8808 else { 8809 common = s1.getEnd(); 8810 if (common.equals(s2.getStart()) || common.equals(s2.getEnd())) return common; 8811 else return null; 8812 } 8813 } 8814}; 8815ChangeOfBasis["__class"] = "com.vzome.core.construction.ChangeOfBasis"; 8816
8817// src/worker/legacy/from-java/com/vzome/core/tools/LinearMapTool.ts 8818var LinearMapTool = class _LinearMapTool extends TransformationTool { 8819 static { 8820 this.CATEGORY = "linear map"; 8821 } 8822 static { 8823 this.LABEL = "Create a linear map tool"; 8824 } 8825 static { 8826 this.TOOLTIP = "<p><b>For experts and Linear Algebra students...</b><br><br>Each tool applies a linear transformation to the selected<br>objects, possibly rotating, stretching, and compressing. To<br>create a tool, select a ball as the center of the mapping,<br>three struts (in order) to define the input basis, and three<br>more struts to define the output basis.<br><br>You can omit the input basis if it would consist of three<br>identical blue struts at right angles; the three struts you<br>select will be interpreted as the output basis.<br><br>By default, the input selection will be removed, and replaced<br>with the transformed equivalent. If you want to keep the inputs,<br>you can right-click after creating the tool, to configure it.<br></p>"; 8827 } 8828 constructor(name, tools, originalScaling) { 8829 super(name, tools); 8830 if (this.originalScaling === void 0) { 8831 this.originalScaling = false; 8832 } 8833 this.originalScaling = originalScaling; 8834 this.setInputBehaviors(false, true); 8835 } 8836 checkSelection(prepareTool) { 8837 const oldBasis = [null, null, null]; 8838 const newBasis = [null, null, null]; 8839 let index = 0; 8840 let correct = true; 8841 let center = null; 8842 for (let index1 = this.mSelection.iterator(); index1.hasNext(); ) { 8843 let man = index1.next(); 8844 { 8845 if (prepareTool) this.unselect$com_vzome_core_model_Manifestation(man); 8846 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) { 8847 if (center != null) { 8848 correct = false; 8849 break; 8850 } 8851 center = man.getFirstConstruction(); 8852 } else if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) { 8853 if (index >= 6) { 8854 correct = false; 8855 break; 8856 } 8857 if ((index / 3 | 0) === 0) { 8858 oldBasis[index % 3] = man.getFirstConstruction(); 8859 } else { 8860 newBasis[index % 3] = man.getFirstConstruction(); 8861 } 8862 ++index; 8863 } 8864 } 8865 } 8866 correct = correct && (index === 3 || index === 6); 8867 if (!correct) return "linear map tool requires three adjacent, non-parallel struts (or two sets of three) and a single (optional) center ball"; 8868 if (prepareTool) { 8869 if (center == null) center = this.originPoint; 8870 this.transforms = [null]; 8871 if (index === 6) this.transforms[0] = new ChangeOfBasis(oldBasis, newBasis, center); 8872 else this.transforms[0] = new ChangeOfBasis(oldBasis[0], oldBasis[1], oldBasis[2], center, this.originalScaling); 8873 } 8874 return null; 8875 } 8876 /** 8877 * 8878 * @return {string} 8879 */ 8880 getXmlElementName() { 8881 return "LinearTransformTool"; 8882 } 8883 /** 8884 * 8885 * @return {string} 8886 */ 8887 getCategory() { 8888 return _LinearMapTool.CATEGORY; 8889 } 8890}; 8891LinearMapTool["__class"] = "com.vzome.core.tools.LinearMapTool"; 8892LinearMapTool["__interfaces"] = ["com.vzome.api.Tool"]; 8893
8894// src/worker/legacy/from-java/com/vzome/core/tools/LinearMapToolFactory.ts 8895var LinearMapToolFactory = class extends AbstractToolFactory { 8896 constructor(tools, symmetry, originalScaling) { 8897 super(tools, symmetry, LinearMapTool.CATEGORY, LinearMapTool.LABEL, LinearMapTool.TOOLTIP); 8898 if (this.originalScaling === void 0) { 8899 this.originalScaling = false; 8900 } 8901 this.originalScaling = originalScaling; 8902 } 8903 /** 8904 * 8905 * @param {number} total 8906 * @param {number} balls 8907 * @param {number} struts 8908 * @param {number} panels 8909 * @return {boolean} 8910 */ 8911 countsAreValid(total, balls, struts, panels) { 8912 return total === 7 && balls === 1 && struts === 6 || total === 4 && balls === 1 && struts === 3; 8913 } 8914 /** 8915 * 8916 * @param {string} id 8917 * @return {Tool} 8918 */ 8919 createToolInternal(id) { 8920 return new LinearMapTool(id, this.getToolsModel(), this.originalScaling); 8921 } 8922 /** 8923 * 8924 * @return {Tool} 8925 */ 8926 createTool() { 8927 const result = super.createTool(); 8928 result.setCopyColors(false); 8929 return result; 8930 } 8931 /** 8932 * 8933 * @param {*} selection 8934 * @return {boolean} 8935 */ 8936 bindParameters(selection) { 8937 let index = 0; 8938 const segments = [null, null, null, null, null, null]; 8939 for (let index1 = selection.iterator(); index1.hasNext(); ) { 8940 let man = index1.next(); 8941 { 8942 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) segments[index++] = man.getFirstConstruction(); 8943 } 8944 } 8945 let c1 = ChangeOfBasis.findCommonVertex(segments[0], segments[1]); 8946 let c2 = ChangeOfBasis.findCommonVertex(segments[2], segments[1]); 8947 if (c1 == null || c2 == null || !c1.equals(c2)) return false; 8948 if (index === 3) return true; 8949 c1 = ChangeOfBasis.findCommonVertex(segments[3], segments[4]); 8950 c2 = ChangeOfBasis.findCommonVertex(segments[5], segments[4]); 8951 if (c1 == null || c2 == null || !c1.equals(c2)) return false; 8952 return true; 8953 } 8954}; 8955LinearMapToolFactory["__class"] = "com.vzome.core.tools.LinearMapToolFactory"; 8956LinearMapToolFactory["__interfaces"] = ["com.vzome.core.editor.SelectionSummary.Listener", "com.vzome.api.Tool.Factory"]; 8957
8958// src/worker/legacy/from-java/com/vzome/core/construction/PlaneExtensionOfPolygon.ts 8959var PlaneExtensionOfPolygon = class extends Plane { 8960 constructor(polygon) { 8961 super(polygon.field); 8962 if (this.mPolygon === void 0) { 8963 this.mPolygon = null; 8964 } 8965 this.mPolygon = polygon; 8966 this.mapParamsToState(); 8967 } 8968 /** 8969 * 8970 * @return {boolean} 8971 */ 8972 mapParamsToState() { 8973 if (this.mPolygon.isImpossible()) { 8974 return this.setStateVariables(null, null, true); 8975 } 8976 return this.setStateVariables(this.mPolygon.getVertex(0), this.mPolygon.getNormal(), false); 8977 } 8978 /** 8979 * 8980 * @return {Trivector3dHomogeneous} 8981 */ 8982 getHomogeneous() { 8983 const v1 = new Vector3dHomogeneous(this.mPolygon.getVertex(0), this.getField()); 8984 const v2 = new Vector3dHomogeneous(this.mPolygon.getVertex(1), this.getField()); 8985 const v3 = new Vector3dHomogeneous(this.mPolygon.getVertex(2), this.getField()); 8986 return v1.outer(v2).outer(v3); 8987 } 8988}; 8989PlaneExtensionOfPolygon["__class"] = "com.vzome.core.construction.PlaneExtensionOfPolygon"; 8990
8991// src/worker/legacy/from-java/com/vzome/core/tools/MirrorTool.ts 8992var MirrorTool = class _MirrorTool extends TransformationTool { 8993 static { 8994 this.ID = "mirror"; 8995 } 8996 static { 8997 this.LABEL = "Create a mirror reflection tool"; 8998 } 8999 static { 9000 this.TOOLTIP = "<p>Each tool duplicates the selection by reflecting<br>each object in a mirror plane. To create a<br>tool, define the mirror plane by selecting a single<br>panel, or by selecting a strut orthogonal to the<br>plane and a ball lying in the plane.<br></p>"; 9001 } 9002 constructor(id, tools) { 9003 super(id, tools); 9004 if (this.symmSys === void 0) { 9005 this.symmSys = null; 9006 } 9007 this.symmSys = tools.getEditorModel()["getSymmetrySystem$"](); 9008 } 9009 /** 9010 * 9011 * @param {boolean} prepareTool 9012 * @return {string} 9013 */ 9014 checkSelection(prepareTool) { 9015 let center = null; 9016 let axis = null; 9017 let mirrorPanel = null; 9018 if (this.getId() === "mirror.builtin/reflection through XY plane") { 9019 center = this.originPoint; 9020 this.addParameter(center); 9021 const field5 = this.originPoint.getField(); 9022 const zAxis = field5.basisVector(3, AlgebraicVector.Z).scale(field5["createPower$int"](Direction.USER_SCALE)); 9023 const p2 = new FreePoint(zAxis); 9024 axis = new SegmentJoiningPoints(center, p2); 9025 this.addParameter(axis); 9026 } else if (this.getId() === "mirror.builtin/reflection through X=Y green plane") { 9027 center = this.originPoint; 9028 this.addParameter(center); 9029 const field5 = this.originPoint.getField(); 9030 const greenAxis = field5.basisVector(3, AlgebraicVector.X).plus(field5.basisVector(3, AlgebraicVector.Y)).scale(field5["createPower$int"](Direction.USER_SCALE)); 9031 const p2 = new FreePoint(greenAxis); 9032 axis = new SegmentJoiningPoints(center, p2); 9033 this.addParameter(axis); 9034 } else if (this.getId() === "mirror.builtin/reflection through red plane") { 9035 center = this.originPoint; 9036 this.addParameter(center); 9037 const redAxis = this.symmSys.getSymmetry().getSpecialOrbit(1 /* RED */).getAxis$int$int(Symmetry.PLUS, 0).normal(); 9038 const p2 = new FreePoint(redAxis); 9039 axis = new SegmentJoiningPoints(center, p2); 9040 this.addParameter(axis); 9041 } else if (this.isAutomatic()) { 9042 center = this.originPoint; 9043 const field5 = this.originPoint.getField(); 9044 const xAxis = field5.basisVector(3, AlgebraicVector.X); 9045 const p2 = new FreePoint(xAxis); 9046 axis = new SegmentJoiningPoints(center, p2); 9047 } else for (let index = this.mSelection.iterator(); index.hasNext(); ) { 9048 let man = index.next(); 9049 { 9050 if (prepareTool) this.unselect$com_vzome_core_model_Manifestation(man); 9051 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) { 9052 if (center != null) { 9053 if (prepareTool) break; 9054 else return "Only one center ball may be selected"; 9055 } 9056 center = man.getFirstConstruction(); 9057 } else if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) { 9058 if (axis != null) { 9059 if (prepareTool) break; 9060 else return "Only one mirror axis strut may be selected"; 9061 } 9062 axis = man.getFirstConstruction(); 9063 } else if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0)) { 9064 if (mirrorPanel != null) { 9065 if (prepareTool) break; 9066 else return "Only one mirror panel may be selected"; 9067 } 9068 mirrorPanel = man.getFirstConstruction(); 9069 } 9070 } 9071 } 9072 if (center == null) { 9073 if (prepareTool) center = this.originPoint; 9074 else if (mirrorPanel == null) return "No symmetry center selected"; 9075 } 9076 let mirrorPlane = null; 9077 if (axis != null && center != null && mirrorPanel == null) { 9078 if (prepareTool) mirrorPlane = new PlaneFromNormalSegment(center, axis); 9079 } else if (axis == null && mirrorPanel != null) { 9080 if (prepareTool) mirrorPlane = new PlaneExtensionOfPolygon(mirrorPanel); 9081 else if (center != null) return "mirror tool requires a single panel,\nor a single strut and a single center ball";
9082 } else { 9083 const msg = "mirror tool requires a single panel,\nor a single strut and a single center ball"; 9084 if (prepareTool) { 9085 throw new java.lang.IllegalStateException("Failed to prepare tool: " + msg); 9086 } else { 9087 return msg; 9088 } 9089 } 9090 if (prepareTool) { 9091 this.transforms = [null]; 9092 this.transforms[0] = new PlaneReflection(mirrorPlane); 9093 } 9094 return null; 9095 } 9096 /** 9097 * 9098 * @return {string} 9099 */ 9100 getXmlElementName() { 9101 return "MirrorTool"; 9102 } 9103 /** 9104 * 9105 * @return {string} 9106 */ 9107 getCategory() { 9108 return _MirrorTool.ID; 9109 } 9110}; 9111MirrorTool["__class"] = "com.vzome.core.tools.MirrorTool"; 9112MirrorTool["__interfaces"] = ["com.vzome.api.Tool"]; 9113
9114// src/worker/legacy/from-java/com/vzome/core/tools/MirrorToolFactory.ts 9115var MirrorToolFactory = class extends AbstractToolFactory { 9116 constructor(tools) { 9117 super(tools, null, MirrorTool.ID, MirrorTool.LABEL, MirrorTool.TOOLTIP); 9118 } 9119 /** 9120 * 9121 * @param {number} total 9122 * @param {number} balls 9123 * @param {number} struts 9124 * @param {number} panels 9125 * @return {boolean} 9126 */ 9127 countsAreValid(total, balls, struts, panels) { 9128 return total === 2 && balls === 1 && struts === 1 || total === 1 && panels === 1; 9129 } 9130 /** 9131 * 9132 * @param {string} id 9133 * @return {Tool} 9134 */ 9135 createToolInternal(id) { 9136 return new MirrorTool(id, this.getToolsModel()); 9137 } 9138 /** 9139 * 9140 * @return {Tool} 9141 */ 9142 createTool() { 9143 const result = super.createTool(); 9144 result.setCopyColors(false); 9145 return result; 9146 } 9147 /** 9148 * 9149 * @param {*} selection 9150 * @return {boolean} 9151 */ 9152 bindParameters(selection) { 9153 return true; 9154 } 9155}; 9156MirrorToolFactory["__class"] = "com.vzome.core.tools.MirrorToolFactory"; 9157MirrorToolFactory["__interfaces"] = ["com.vzome.core.editor.SelectionSummary.Listener", "com.vzome.api.Tool.Factory"]; 9158
9159// src/worker/legacy/from-java/com/vzome/core/tools/OctahedralToolFactory.ts 9160var OctahedralToolFactory = class _OctahedralToolFactory extends AbstractToolFactory { 9161 static { 9162 this.ID = "octahedral"; 9163 } 9164 static { 9165 this.LABEL = "Create an octahedral symmetry tool"; 9166 } 9167 static { 9168 this.TOOLTIP2 = "<p>Each tool produces up to 23 copies of the input<br>selection, using the rotation symmetries of a<br>cube or octahedron. To create a tool, select a<br>ball that defines the center of symmetry.<br><br>Combine with a point reflection tool to achieve<br>all 48 symmetries of the octahedron, including<br>reflections.<br></p>"; 9169 } 9170 constructor(tools, symmetry, id = _OctahedralToolFactory.ID, label = _OctahedralToolFactory.LABEL, tooltip = _OctahedralToolFactory.TOOLTIP2) { 9171 super(tools, symmetry, id, label, tooltip); 9172 } 9173 /** 9174 * 9175 * @param {number} total 9176 * @param {number} balls 9177 * @param {number} struts 9178 * @param {number} panels 9179 * @return {boolean} 9180 */ 9181 countsAreValid(total, balls, struts, panels) { 9182 return total === 1 && balls === 1 || total === 2 && balls === 1 && struts === 1; 9183 } 9184 /** 9185 * 9186 * @param {string} id 9187 * @return {Tool} 9188 */ 9189 createToolInternal(id) {
9190 return new SymmetryTool(id, this.getSymmetry(), this.getToolsModel()); 9191 } 9192 /** 9193 * 9194 * @param {*} selection 9195 * @return {boolean} 9196 */ 9197 bindParameters(selection) { 9198 const symmetry = this.getSymmetry(); 9199 const total = this.getSelection().size(); 9200 if (symmetry != null && symmetry instanceof IcosahedralSymmetry) { 9201 if (total !== 2) return false; 9202 for (let index = selection.iterator(); index.hasNext(); ) { 9203 let man = index.next(); 9204 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) { 9205 const zone = symmetry["getAxis$com_vzome_core_algebra_AlgebraicVector"](man.getOffset()); 9206 if (zone == null) return false; 9207 switch (zone.getDirection().getName()) { 9208 case "blue": 9209 case "green": 9210 return true; 9211 default: 9212 return false; 9213 } 9214 } 9215 } 9216 return false; 9217 } else { 9218 return total === 1; 9219 } 9220 } 9221}; 9222OctahedralToolFactory["__class"] = "com.vzome.core.tools.OctahedralToolFactory"; 9223OctahedralToolFactory["__interfaces"] = ["com.vzome.core.editor.SelectionSummary.Listener", "com.vzome.api.Tool.Factory"]; 9224
9225// src/worker/legacy/from-java/com/vzome/core/construction/LinePlaneIntersectionPoint.ts 9226var LinePlaneIntersectionPoint = class extends Point { 9227 constructor(plane, line) { 9228 super(line.field); 9229 if (this.mPlane === void 0) { 9230 this.mPlane = null; 9231 } 9232 if (this.mLine === void 0) { 9233 this.mLine = null; 9234 } 9235 this.mPlane = plane; 9236 this.mLine = line; 9237 this.mapParamsToState(); 9238 } 9239 /** 9240 * From Vince, GA4CG, p. 196. 9241 * 9242 * @author Scott Vorthmann 9243 * @return {boolean} 9244 */ 9245 mapParamsToState_usingGA() { 9246 if (this.mPlane.isImpossible() || this.mLine.isImpossible()) return this.setStateVariable(null, true); 9247 const plane = this.mPlane.getHomogeneous(); 9248 const line = this.mLine.getHomogeneous(); 9249 const intersection = plane.dual().dot(line); 9250 if (!intersection.exists()) return this.setStateVariable(null, true); 9251 return this.setStateVariable(intersection.getVector(), false); 9252 } 9253 /** 9254 * from http://astronomy.swin.edu.au/~pbourke/geometry/planeline/: 9255 * 9256 * 9257 * The equation of a plane (points P are on the plane with normal N and point P3 on the plane) can be written as 9258 * 9259 * N dot (P - P3) = 0 9260 * 9261 * The equation of the line (points P on the line passing through points P1 and P2) can be written as 9262 * 9263 * P = P1 + u (P2 - P1) 9264 * 9265 * The intersection of these two occurs when 9266 * 9267 * N dot (P1 + u (P2 - P1)) = N dot P3 9268 * 9269 * Solving for u gives 9270 * 9271 * u = ( N dot (P3-P1) ) / ( N dot (P2-P1) ) 9272 * 9273 * If the denominator is zero, the line is parallel to the plane. 9274 * 9275 * @author Scott Vorthmann 9276 * @return {boolean} 9277 */ 9278 mapParamsToState() { 9279 if (this.mPlane.isImpossible() || this.mLine.isImpossible()) return this.setStateVariable(null, true); 9280 const p1 = this.mLine.getStart(); 9281 const p1p2 = this.mLine.getDirection(); 9282 const n = this.mPlane.getNormal(); 9283 const p3 = this.mPlane.getBase(); 9284 const p = AlgebraicVectors.getLinePlaneIntersection(p1, p1p2, p3, n); 9285 if (p == null) return this.setStateVariable(null, true); 9286 else return this.setStateVariable(p, false); 9287 } 9288}; 9289LinePlaneIntersectionPoint["__class"] = "com.vzome.core.construction.LinePlaneIntersectionPoint"; 9290
9291// src/worker/legacy/from-java/com/vzome/core/construction/PerspectiveProjection.ts 9292var PerspectiveProjection = class extends Transformation { 9293 constructor(projectionPlane, perspectivePoint) { 9294 super(projectionPlane.field); 9295 if (this.projectionPlane === void 0) { 9296 this.projectionPlane = null; 9297 } 9298 if (this.perspectivePoint === void 0) { 9299 this.perspectivePoint = null; 9300 } 9301 this.projectionPlane = projectionPlane; 9302 this.perspectivePoint = perspectivePoint; 9303 this.mapParamsToState(); 9304 } 9305 /** 9306 * 9307 * @return {boolean} 9308 */ 9309 mapParamsToState() { 9310 if (this.projectionPlane.isImpossible()) this.setStateVariables(null, null, true); 9311 const loc = this.getField().origin(3); 9312 return this.setStateVariables(null, loc, false); 9313 } 9314 transform$com_vzome_core_algebra_AlgebraicVector(arg) { 9315 const segment = new SegmentJoiningPoints(this.perspectivePoint, new FreePoint(arg)); 9316 if (segment.getOffset().isOrigin()) return null; 9317 const line = new LineExtensionOfSegment(segment); 9318 const point = new LinePlaneIntersectionPoint(this.projectionPlane, line); 9319 return point.getLocation(); 9320 } 9321 /** 9322 * 9323 * @param {AlgebraicVector} arg 9324 * @return {AlgebraicVector} 9325 */ 9326 transform(arg) { 9327 if (arg != null && arg instanceof AlgebraicVector || arg === null) { 9328 return this.transform$com_vzome_core_algebra_AlgebraicVector(arg); 9329 } else if (arg != null && arg instanceof Construction || arg === null) { 9330 return this.transform$com_vzome_core_construction_Construction(arg); 9331 } else throw new Error("invalid overload"); 9332 } 9333 transform$com_vzome_core_construction_Construction(c) { 9334 if (c != null && c instanceof Point) { 9335 const result = new TransformedPoint(this, c); 9336 if (result.isImpossible()) return null; 9337 return result; 9338 } else if (c != null && c instanceof Segment) { 9339 const result = new TransformedSegment(this, c); 9340 if (result.isImpossible() || result.getOffset().isOrigin()) { 9341 return new FreePoint(c.getStart()); 9342 } 9343 return result; 9344 } else if (c != null && c instanceof Polygon) { 9345 const p = new TransformedPolygon(this, c); 9346 if (p.getNormal().isOrigin()) { 9347 let min = p.getVertex(0); 9348 let max = min; 9349 for (let i = 1; i < p.getVertexCount(); i++) { 9350 { 9351 const v = p.getVertex(i); 9352 if (v.compareTo(min) === -1) { 9353 min = v; 9354 } 9355 if (v.compareTo(max) === 1) { 9356 max = v; 9357 } 9358 } 9359 ; 9360 } 9361 const p1 = new FreePoint(min); 9362 const p2 = new FreePoint(max); 9363 return new SegmentJoiningPoints(p1, p2); 9364 } 9365 return p; 9366 } 9367 return super.transform$com_vzome_core_construction_Construction(c); 9368 } 9369}; 9370PerspectiveProjection["__class"] = "com.vzome.core.construction.PerspectiveProjection"; 9371
9372// src/worker/legacy/from-java/com/vzome/core/tools/PerspectiveProjectionTool.ts 9373var PerspectiveProjectionTool = class _PerspectiveProjectionTool extends TransformationTool { 9374 static { 9375 this.ID = "perspective"; 9376 } 9377 static { 9378 this.LABEL = "Create a perspective projection tool"; 9379 } 9380 static { 9381 this.TOOLTIP = "<p>Created tools project selected objects to a 2D plane.<br><br>To create a tool, define the projection<br> by selecting a single panel<br> and a ball not in the plane of the panel.</p>"; 9382 } 9383 constructor(id, tools) { 9384 super(id, tools); 9385 this.setInputBehaviors(false, true); 9386 } 9387 /** 9388 * 9389 */ 9390 perform() { 9391 let plane = null; 9392 let point = null; 9393 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 9394 let man = index.next(); 9395 { 9396 this.unselect$com_vzome_core_model_Manifestation(man); 9397 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0)) { 9398 if (plane == null) { 9399 const panel = man; 9400 const polygon = panel.toConstruction(); 9401 plane = new PlaneExtensionOfPolygon(polygon); 9402 } else { 9403 throw new Command.Failure("Projection tool allows only a single selected panel"); 9404 } 9405 } 9406 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) { 9407 if (point == null) { 9408 const ball = man; 9409 point = ball.toConstruction(); 9410 continue; 9411 } else { 9412 throw new Command.Failure("Projection tool allows only a single selected ball"); 9413 } 9414 } 9415 } 9416 } 9417 if (plane == null || point == null) { 9418 throw new Command.Failure("Projection tool requires a selected panel and a selected ball."); 9419 } 9420 this.transforms = [null]; 9421 this.transforms[0] = new PerspectiveProjection(plane, point); 9422 super.perform(); 9423 } 9424 /** 9425 * 9426 * @param {boolean} prepareTool 9427 * @return {string} 9428 */ 9429 checkSelection(prepareTool) { 9430 return null; 9431 } 9432 /** 9433 * 9434 * @return {string} 9435 */ 9436 getXmlElementName() { 9437 return "PerspectiveProjectionTool"; 9438 } 9439 /** 9440 * 9441 * @return {string} 9442 */ 9443 getCategory() { 9444 return _PerspectiveProjectionTool.ID; 9445 } 9446}; 9447PerspectiveProjectionTool["__class"] = "com.vzome.core.tools.PerspectiveProjectionTool"; 9448PerspectiveProjectionTool["__interfaces"] = ["com.vzome.api.Tool"]; 9449
9450// src/worker/legacy/from-java/com/vzome/core/tools/PerspectiveProjectionToolFactory.ts 9451var PerspectiveProjectionToolFactory = class extends AbstractToolFactory { 9452 constructor(tools) { 9453 super(tools, null, PerspectiveProjectionTool.ID, PerspectiveProjectionTool.LABEL, PerspectiveProjectionTool.TOOLTIP); 9454 } 9455 /** 9456 * 9457 * @param {number} total 9458 * @param {number} balls 9459 * @param {number} struts 9460 * @param {number} panels 9461 * @return {boolean} 9462 */ 9463 countsAreValid(total, balls, struts, panels) { 9464 return total === 2 && panels === 1 && balls === 1; 9465 } 9466 /** 9467 * 9468 * @param {string} id 9469 * @return {Tool} 9470 */ 9471 createToolInternal(id) { 9472 return new PerspectiveProjectionTool(id, this.getToolsModel()); 9473 } 9474 /** 9475 * 9476 * @return {Tool} 9477 */ 9478 createTool() { 9479 const result = super.createTool(); 9480 result.setCopyColors(false); 9481 return result; 9482 } 9483 /** 9484 * 9485 * @param {*} selection 9486 * @return {boolean} 9487 */ 9488 bindParameters(selection) { 9489 return true; 9490 } 9491}; 9492PerspectiveProjectionToolFactory["__class"] = "com.vzome.core.tools.PerspectiveProjectionToolFactory"; 9493PerspectiveProjectionToolFactory["__interfaces"] = ["com.vzome.core.editor.SelectionSummary.Listener", "com.vzome.api.Tool.Factory"]; 9494
9495// src/worker/legacy/from-java/com/vzome/core/construction/PlaneFromPointAndNormal.ts 9496var PlaneFromPointAndNormal = class extends Plane { 9497 constructor(point, normal) { 9498 super(point.getField()); 9499 if (this.normal === void 0) { 9500 this.normal = null; 9501 } 9502 if (this.point === void 0) { 9503 this.point = null; 9504 } 9505 this.point = point; 9506 this.normal = normal; 9507 this.mapParamsToState(); 9508 } 9509 /** 9510 * 9511 * @return {boolean} 9512 */ 9513 mapParamsToState() { 9514 if (this.normal.isOrigin()) return this.setStateVariables(null, null, true); 9515 return this.setStateVariables(this.point, this.normal, false); 9516 } 9517}; 9518PlaneFromPointAndNormal["__class"] = "com.vzome.core.construction.PlaneFromPointAndNormal"; 9519
9520// src/worker/legacy/from-java/com/vzome/core/construction/PlaneProjection.ts 9521var PlaneProjection = class extends Transformation { 9522 constructor(projectionPlane, projectionLine) { 9523 super(projectionPlane.field); 9524 if (this.projectionPlane === void 0) { 9525 this.projectionPlane = null; 9526 } 9527 if (this.projectionVector === void 0) { 9528 this.projectionVector = null; 9529 } 9530 this.projectionPlane = projectionPlane; 9531 if (projectionLine == null) this.projectionVector = projectionPlane.getNormal(); 9532 else this.projectionVector = projectionLine.getDirection(); 9533 this.mapParamsToState(); 9534 } 9535 /** 9536 * 9537 * @return {boolean} 9538 */ 9539 mapParamsToState() { 9540 if (this.projectionPlane.isImpossible()) this.setStateVariables(null, null, true); 9541 const loc = this.projectionPlane.getBase(); 9542 return this.setStateVariables(null, loc, false); 9543 } 9544 transform$com_vzome_core_algebra_AlgebraicVector(arg) { 9545 const line = new LineFromPointAndVector(arg, this.projectionVector); 9546 const point = new LinePlaneIntersectionPoint(this.projectionPlane, line); 9547 return point.getLocation(); 9548 } 9549 /** 9550 * 9551 * @param {AlgebraicVector} arg 9552 * @return {AlgebraicVector} 9553 */ 9554 transform(arg) { 9555 if (arg != null && arg instanceof AlgebraicVector || arg === null) { 9556 return this.transform$com_vzome_core_algebra_AlgebraicVector(arg); 9557 } else if (arg != null && arg instanceof Construction || arg === null) { 9558 return this.transform$com_vzome_core_construction_Construction(arg); 9559 } else throw new Error("invalid overload"); 9560 } 9561 transform$com_vzome_core_construction_Construction(c) { 9562 if (c != null && c instanceof Segment) { 9563 if (AlgebraicVectors.areParallel(this.projectionVector, c.getOffset())) { 9564 return new LinePlaneIntersectionPoint(this.projectionPlane, new LineExtensionOfSegment(c)); 9565 } 9566 } else if (c != null && c instanceof Polygon) { 9567 let p = c; 9568 const points = new java.util.ArrayList(1 + p.getVertexCount()); 9569 points.add(p.getVertex(0).plus(this.projectionVector)); 9570 for (let i = 0; i < p.getVertexCount(); i++) { 9571 { 9572 points.add(p.getVertex(i)); 9573 } 9574 ; 9575 } 9576 if (AlgebraicVectors.areCoplanar(points)) { 9577 p = super.transform$com_vzome_core_construction_Construction(p); 9578 let min = p.getVertex(0); 9579 let max = min; 9580 for (let i = 1; i < p.getVertexCount(); i++) { 9581 { 9582 const v = p.getVertex(i); 9583 if (v.compareTo(min) === -1) { 9584 min = v; 9585 } 9586 if (v.compareTo(max) === 1) { 9587 max = v; 9588 } 9589 } 9590 ; 9591 } 9592 const p1 = new FreePoint(min); 9593 const p2 = new FreePoint(max); 9594 return new SegmentJoiningPoints(p1, p2); 9595 } 9596 } 9597 return super.transform$com_vzome_core_construction_Construction(c); 9598 } 9599}; 9600PlaneProjection["__class"] = "com.vzome.core.construction.PlaneProjection"; 9601
9602// src/worker/legacy/from-java/com/vzome/core/tools/ProjectionTool.ts 9603var ProjectionTool = class _ProjectionTool extends TransformationTool { 9604 static { 9605 this.ID = "projection"; 9606 } 9607 static { 9608 this.LABEL = "Create a plane projection tool"; 9609 } 9610 static { 9611 this.TOOLTIP = "<p>Created tools project selected objects to a 2D plane.<br><br>To create a tool, define the projection plane<br> by selecting either a single panel<br> or strut that is normal to the projection plane<br> and a ball on the plane.<br>When the projection plane is defined by selecting a panel,<br> an optional strut may be selected to define the line of projection.<br>The default line of projection is orthogonal to the projection plane.<br></p>"; 9612 } 9613 constructor(id, tools) { 9614 super(id, tools); 9615 this.setInputBehaviors(false, true); 9616 } 9617 /** 9618 * 9619 */ 9620 perform() { 9621 let plane = null; 9622 let line = null; 9623 let point = null; 9624 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 9625 let man = index.next(); 9626 { 9627 this.unselect$com_vzome_core_model_Manifestation(man); 9628 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0)) { 9629 if (plane == null) { 9630 const panel = man; 9631 const polygon = panel.toConstruction(); 9632 plane = new PlaneExtensionOfPolygon(polygon); 9633 } else { 9634 throw new Command.Failure("Projection tool allows only a single selected panel"); 9635 } 9636 } 9637 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) { 9638 if (line == null) { 9639 const strut = man; 9640 const segment = strut.toConstruction(); 9641 line = new LineExtensionOfSegment(segment); 9642 } else { 9643 throw new Command.Failure("Projection tool allows only a single selected strut"); 9644 } 9645 } 9646 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) { 9647 if (point == null) { 9648 point = man.getLocation(); 9649 continue; 9650 } else { 9651 throw new Command.Failure("Projection tool allows only a single selected ball"); 9652 } 9653 } 9654 } 9655 } 9656 if (point != null && line != null) { 9657 plane = new PlaneFromPointAndNormal(point, line.getDirection()); 9658 } 9659 if (plane == null) { 9660 throw new Command.Failure("Projection tool requires a selected panel or else a selected ball and strut."); 9661 } 9662 this.transforms = [null]; 9663 this.transforms[0] = new PlaneProjection(plane, line); 9664 if (line != null) { 9665 const test = this.transforms[0].transform$com_vzome_core_algebra_AlgebraicVector(line.getDirection()); 9666 if (test == null) throw new Command.Failure("Selected strut and plane must not be parallel"); 9667 } 9668 super.perform(); 9669 } 9670 /** 9671 * 9672 * @param {boolean} prepareTool 9673 * @return {string} 9674 */ 9675 checkSelection(prepareTool) { 9676 return null; 9677 } 9678 /** 9679 * 9680 * @return {string} 9681 */ 9682 getXmlElementName() { 9683 return "ProjectionTool"; 9684 } 9685 /** 9686 * 9687 * @return {string} 9688 */ 9689 getCategory() { 9690 return _ProjectionTool.ID; 9691 } 9692}; 9693ProjectionTool["__class"] = "com.vzome.core.tools.ProjectionTool"; 9694ProjectionTool["__interfaces"] = ["com.vzome.api.Tool"]; 9695
9696// src/worker/legacy/from-java/com/vzome/core/tools/ProjectionToolFactory.ts 9697var ProjectionToolFactory = class extends AbstractToolFactory { 9698 constructor(tools) { 9699 super(tools, null, ProjectionTool.ID, ProjectionTool.LABEL, ProjectionTool.TOOLTIP); 9700 } 9701 /** 9702 * 9703 * @param {number} total 9704 * @param {number} balls 9705 * @param {number} struts 9706 * @param {number} panels 9707 * @return {boolean} 9708 */ 9709 countsAreValid(total, balls, struts, panels) { 9710 return total === 2 && panels === 1 && struts === 1 || total === 1 && panels === 1 || total === 2 && balls === 1 && struts === 1; 9711 } 9712 /** 9713 * 9714 * @param {string} id 9715 * @return {Tool} 9716 */ 9717 createToolInternal(id) { 9718 return new ProjectionTool(id, this.getToolsModel()); 9719 } 9720 /** 9721 * 9722 * @return {Tool} 9723 */ 9724 createTool() { 9725 const result = super.createTool(); 9726 result.setCopyColors(false); 9727 return result; 9728 } 9729 /** 9730 * 9731 * @param {*} selection 9732 * @return {boolean} 9733 */ 9734 bindParameters(selection) { 9735 return true; 9736 } 9737}; 9738ProjectionToolFactory["__class"] = "com.vzome.core.tools.ProjectionToolFactory"; 9739ProjectionToolFactory["__interfaces"] = ["com.vzome.core.editor.SelectionSummary.Listener", "com.vzome.api.Tool.Factory"]; 9740
9741// src/worker/legacy/from-java/com/vzome/core/construction/Scaling.ts 9742var Scaling = class extends Transformation { 9743 constructor(s1, s2, center, symmetry) { 9744 super(s1.field); 9745 if (this.s1 === void 0) { 9746 this.s1 = null; 9747 } 9748 if (this.s2 === void 0) { 9749 this.s2 = null; 9750 } 9751 if (this.center === void 0) { 9752 this.center = null; 9753 } 9754 if (this.symmetry === void 0) { 9755 this.symmetry = null; 9756 } 9757 this.mOffset = this.field.projectTo3d(center.getLocation(), true); 9758 this.s1 = s1; 9759 this.s2 = s2; 9760 this.center = center; 9761 this.symmetry = symmetry; 9762 this.mapParamsToState(); 9763 } 9764 /** 9765 * 9766 * @return {boolean} 9767 */ 9768 mapParamsToState() { 9769 const zone1 = this.symmetry["getAxis$com_vzome_core_algebra_AlgebraicVector"](this.s1.getOffset()); 9770 const zone2 = this.symmetry["getAxis$com_vzome_core_algebra_AlgebraicVector"](this.s2.getOffset()); 9771 const orbit = zone1.getDirection(); 9772 if (orbit !== zone2.getDirection()) return this.setStateVariables(null, null, true); 9773 const len1 = zone1.getLength(this.s1.getOffset()); 9774 const len2 = zone2.getLength(this.s2.getOffset()); 9775 const scale = len2.dividedBy(len1); 9776 const transform = new AlgebraicMatrix(this.field.basisVector(3, AlgebraicVector.X).scale(scale), this.field.basisVector(3, AlgebraicVector.Y).scale(scale), this.field.basisVector(3, AlgebraicVector.Z).scale(scale)); 9777 return this.setStateVariables(transform, this.center.getLocation(), false); 9778 } 9779}; 9780Scaling["__class"] = "com.vzome.core.construction.Scaling"; 9781
9782// src/worker/legacy/from-java/com/vzome/core/tools/ScalingTool.ts 9783var ScalingTool = class _ScalingTool extends SymmetryTool { 9784 static { 9785 this.ID = "scaling"; 9786 } 9787 static { 9788 this.LABEL = "Create a scaling tool"; 9789 } 9790 static { 9791 this.TOOLTIP = "<p>Each tool enlarges or shrinks the selected objects,<br>relative to a central point. To create a tool,<br>select a ball representing the central point, and<br>two struts from the same orbit (color) with different<br>sizes.<br><br>The selection order matters. First select a strut<br>that you want to enlarge or shrink, then select a<br>strut that has the desired target size.<br></p>"; 9792 } 9793 /** 9794 * 9795 * @return {string} 9796 */ 9797 getCategory() { 9798 return _ScalingTool.ID; 9799 } 9800 constructor(id, symmetry, tools) { 9801 super(id, symmetry, tools); 9802 if (this.scaleFactor === void 0) { 9803 this.scaleFactor = null; 9804 } 9805 this.scaleFactor = null; 9806 this.setInputBehaviors(false, true); 9807 } 9808 setScaleFactor(scaleFactor) { 9809 this.scaleFactor = scaleFactor; 9810 } 9811 /** 9812 * 9813 * @param {boolean} prepareTool 9814 * @return {string} 9815 */ 9816 checkSelection(prepareTool) { 9817 if (this.scaleFactor != null) { 9818 const field5 = this.scaleFactor.getField(); 9819 this.transforms = [null]; 9820 const column1 = field5.basisVector(3, AlgebraicVector.X).scale(this.scaleFactor); 9821 const column2 = field5.basisVector(3, AlgebraicVector.Y).scale(this.scaleFactor); 9822 const column3 = field5.basisVector(3, AlgebraicVector.Z).scale(this.scaleFactor); 9823 const p1 = new FreePoint(field5.basisVector(3, AlgebraicVector.X).scale(field5["createPower$int"](4))); 9824 const p2 = new FreePoint(column2.scale(field5["createPower$int"](4))); 9825 this.addParameter(this.originPoint); 9826 this.addParameter(new SegmentJoiningPoints(this.originPoint, p1)); 9827 this.addParameter(new SegmentJoiningPoints(this.originPoint, p2)); 9828 const transform = new AlgebraicMatrix(column1, column2, column3); 9829 this.transforms[0] = new MatrixTransformation(transform, this.originPoint.getLocation()); 9830 return null; 9831 } 9832 let s1 = null; 9833 let s2 = null; 9834 let center = null; 9835 let correct = true; 9836 let hasPanels = false; 9837 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 9838 let man = index.next(); 9839 { 9840 if (prepareTool) this.unselect$com_vzome_core_model_Manifestation(man); 9841 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) { 9842 if (center != null) { 9843 correct = false; 9844 break; 9845 } 9846 center = man.getFirstConstruction(); 9847 } else if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) { 9848 if (s2 != null) { 9849 correct = false; 9850 break; 9851 } 9852 if (s1 == null) s1 = man.getFirstConstruction(); 9853 else s2 = man.getFirstConstruction(); 9854 } else if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0)) hasPanels = true; 9855 } 9856 } 9857 if (center == null) { 9858 if (prepareTool) center = this.originPoint; 9859 else return "No symmetry center selected"; 9860 } 9861 correct = correct && s2 != null; 9862 if (!prepareTool && hasPanels) correct = false; 9863 if (!correct) return "scaling tool requires before and after struts, and a single center"; 9864 const zone1 = this.symmetry["getAxis$com_vzome_core_algebra_AlgebraicVector"](s1.getOffset()); 9865 const zone2 = this.symmetry["getAxis$com_vzome_core_algebra_AlgebraicVector"](s2.getOffset()); 9866 if (zone1 == null || zone2 == null) return "struts cannot be automatic"; 9867 const orbit = zone1.getDirection(); 9868 if (orbit !== zone2.getDirection()) return "before and after struts must be from the same orbit"; 9869 if (prepareTool) { 9870 this.transforms = [null]; 9871 this.transforms[0] = new Scaling(s1, s2, center, this.symmetry); 9872 } 9873 return null; 9874 } 9875 /** 9876 * 9877 * @return {string} 9878 */ 9879 getXmlElementName() { 9880 return "ScalingTool"; 9881 } 9882 /** 9883 * 9884 * @param {*} element 9885 * @param {XmlSaveFormat} format 9886 */ 9887 setXmlAttributes(element, format) { 9888 const symmName = element.getAttribute("symmetry"); 9889 if (symmName == null || /* isEmpty */ 9890 symmName.length === 0) { 9891 element.setAttribute("symmetry", "icosahedral"); 9892 SideEffects.logBugAccommodation("scaling tool serialized with no symmetry; assuming icosahedral"); 9893 } 9894 super.setXmlAttributes(element, format); 9895 } 9896}; 9897ScalingTool["__class"] = "com.vzome.core.tools.ScalingTool"; 9898ScalingTool["__interfaces"] = ["com.vzome.api.Tool"]; 9899
9900// src/worker/legacy/from-java/com/vzome/core/tools/ScalingToolFactory.ts 9901var ScalingToolFactory = class extends AbstractToolFactory { 9902 constructor(tools, symmetry) { 9903 super(tools, symmetry, ScalingTool.ID, ScalingTool.LABEL, ScalingTool.TOOLTIP); 9904 } 9905 /** 9906 * 9907 * @param {number} total 9908 * @param {number} balls 9909 * @param {number} struts 9910 * @param {number} panels 9911 * @return {boolean} 9912 */ 9913 countsAreValid(total, balls, struts, panels) { 9914 return total === 3 && balls === 1 && struts === 2; 9915 } 9916 /** 9917 * 9918 * @param {string} id 9919 * @return {Tool} 9920 */ 9921 createToolInternal(id) { 9922 const tool = new ScalingTool(id, this.getSymmetry(), this.getToolsModel()); 9923 let scalePower = 0; 9924 switch (id) { 9925 case "scaling.builtin/scale up": 9926 scalePower = 1; 9927 break; 9928 case "scaling.builtin/scale down": 9929 scalePower = -1; 9930 break; 9931 default: 9932 return tool; 9933 } 9934 const field5 = this.getToolsModel().getEditorModel().getRealizedModel().getField(); 9935 tool.setScaleFactor(field5["createPower$int"](scalePower)); 9936 return tool; 9937 } 9938 /** 9939 * 9940 * @param {*} selection 9941 * @return {boolean} 9942 */ 9943 bindParameters(selection) { 9944 const symmetry = this.getSymmetry(); 9945 let offset1 = null; 9946 let offset2 = null; 9947 for (let index = selection.iterator(); index.hasNext(); ) { 9948 let man = index.next(); 9949 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) { 9950 const strut = man; 9951 if (offset1 == null) offset1 = strut.getOffset(); 9952 else offset2 = strut.getOffset(); 9953 } 9954 } 9955 const zone1 = symmetry["getAxis$com_vzome_core_algebra_AlgebraicVector"](offset1); 9956 const zone2 = symmetry["getAxis$com_vzome_core_algebra_AlgebraicVector"](offset2); 9957 if (zone1 == null || zone2 == null) return false; 9958 const orbit1 = zone1.getDirection(); 9959 const orbit2 = zone2.getDirection(); 9960 if (orbit1 !== orbit2) return false; 9961 if (orbit1.isAutomatic()) return false; 9962 const l1 = zone1.getLength(offset1); 9963 const l2 = zone2.getLength(offset2); 9964 if ( 9965 /* equals */ 9966 ((o1, o2) => { 9967 if (o1 && o1.equals) { 9968 return o1.equals(o2); 9969 } else { 9970 return o1 === o2; 9971 } 9972 })(l1, l2) 9973 ) return false; 9974 return true; 9975 } 9976}; 9977ScalingToolFactory["__class"] = "com.vzome.core.tools.ScalingToolFactory"; 9978ScalingToolFactory["__interfaces"] = ["com.vzome.core.editor.SelectionSummary.Listener", "com.vzome.api.Tool.Factory"]; 9979
9980// src/worker/legacy/from-java/com/vzome/core/tools/TetrahedralToolFactory.ts 9981var TetrahedralToolFactory = class _TetrahedralToolFactory extends OctahedralToolFactory { 9982 static { 9983 this.__com_vzome_core_tools_TetrahedralToolFactory_ID = "tetrahedral"; 9984 } 9985 static { 9986 this.__com_vzome_core_tools_TetrahedralToolFactory_LABEL = "Create a tetrahedral symmetry tool"; 9987 } 9988 static { 9989 this.TOOLTIP1 = "<p>Each tool produces up to 11 copies of the input<br>selection, using the rotation symmetries of a<br>tetrahedron. To create a tool, select a ball<br>that defines the center of symmetry, and a single<br>blue or green strut, defining one of five<br>possible orientations for the symmetry.<br><br>Combine with a point reflection tool to achieve<br>all 24 symmetries of the tetrahedron, including<br>reflections.<br></p>"; 9990 } 9991 static { 9992 this.__com_vzome_core_tools_TetrahedralToolFactory_TOOLTIP2 = "<p>Each tool produces up to 11 copies of the input<br>selection, using the rotation symmetries of a<br>tetrahedron. To create a tool, select a ball<br>that defines the center of symmetry.<br><br>Combine with a point reflection tool to achieve<br>all 24 symmetries of the tetrahedron, including<br>reflections.<br></p>"; 9993 } 9994 constructor(tools, symmetry) { 9995 super(tools, symmetry, _TetrahedralToolFactory.__com_vzome_core_tools_TetrahedralToolFactory_ID, _TetrahedralToolFactory.__com_vzome_core_tools_TetrahedralToolFactory_LABEL, "icosahedral" === symmetry.getName() ? _TetrahedralToolFactory.TOOLTIP1 : _TetrahedralToolFactory.__com_vzome_core_tools_TetrahedralToolFactory_TOOLTIP2); 9996 } 9997 /** 9998 * 9999 * @param {string} id 10000 * @return {Tool} 10001 */ 10002 createToolInternal(id) { 10003 if (!/* startsWith */ 10004 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(id, "tetrahedral")) id = "tetrahedral." + id;
10005 return new SymmetryTool(id, this.getSymmetry(), this.getToolsModel()); 10006 } 10007}; 10008TetrahedralToolFactory["__class"] = "com.vzome.core.tools.TetrahedralToolFactory"; 10009TetrahedralToolFactory["__interfaces"] = ["com.vzome.core.editor.SelectionSummary.Listener", "com.vzome.api.Tool.Factory"]; 10010
10011// src/worker/legacy/from-java/com/vzome/core/construction/PointToPointTranslation.ts 10012var PointToPointTranslation = class extends Transformation { 10013 constructor(p1, p2) { 10014 super(p1.field); 10015 this.mOffset = this.field.projectTo3d(p2.getLocation().minus(p1.getLocation()), true); 10016 } 10017 transform$com_vzome_core_algebra_AlgebraicVector(arg) { 10018 return arg.plus(this.mOffset); 10019 } 10020 /** 10021 * 10022 * @param {AlgebraicVector} arg 10023 * @return {AlgebraicVector} 10024 */ 10025 transform(arg) { 10026 if (arg != null && arg instanceof AlgebraicVector || arg === null) { 10027 return this.transform$com_vzome_core_algebra_AlgebraicVector(arg); 10028 } else if (arg != null && arg instanceof Construction || arg === null) { 10029 return this.transform$com_vzome_core_construction_Construction(arg); 10030 } else throw new Error("invalid overload"); 10031 } 10032 /** 10033 * 10034 * @return {boolean} 10035 */ 10036 mapParamsToState() { 10037 return this.setStateVariables(null, null, false); 10038 } 10039}; 10040PointToPointTranslation["__class"] = "com.vzome.core.construction.PointToPointTranslation"; 10041
10042// src/worker/legacy/from-java/com/vzome/core/tools/TranslationTool.ts 10043var TranslationTool = class _TranslationTool extends TransformationTool { 10044 constructor(id, tools) { 10045 super(id, tools); 10046 this.setInputBehaviors(false, true); 10047 } 10048 static { 10049 this.ID = "translation"; 10050 } 10051 static { 10052 this.LABEL = "Create a translation tool"; 10053 } 10054 static { 10055 this.TOOLTIP = '<p>Each tool moves the selected objects to a new location.<br>To create a tool, select two balls that are separated by<br>your desired translation offset. Order of selection<br>matters: the first ball selected is the "from" location,<br>and the second is the "to" location.<br><br>By default, the input selection will be moved to the new<br>location. If you want to copy rather than move, you can<br>right-click after creating the tool, to configure it.<br></p>'; 10056 } 10057 /** 10058 * 10059 * @param {boolean} prepareTool 10060 * @return {string} 10061 */ 10062 checkSelection(prepareTool) { 10063 let p1 = null; 10064 let p2 = null; 10065 let correct = true; 10066 if (!this.isAutomatic()) for (let index = this.mSelection.iterator(); index.hasNext(); ) { 10067 let man = index.next(); 10068 { 10069 if (prepareTool) this.unselect$com_vzome_core_model_Manifestation(man); 10070 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) { 10071 if (p2 != null) { 10072 correct = false; 10073 break; 10074 } 10075 if (p1 == null) p1 = man.getFirstConstruction(); 10076 else p2 = man.getFirstConstruction(); 10077 } else if (!prepareTool) { 10078 return "Only balls can be selected for this tool."; 10079 } 10080 } 10081 } 10082 if (p1 == null) { 10083 if (this.isAutomatic() || this.isPredefined()) { 10084 p1 = this.originPoint; 10085 this.addParameter(p1); 10086 const field5 = this.originPoint.getField(); 10087 let xAxis = field5.basisVector(3, AlgebraicVector.X); 10088 let scale = field5["createPower$int"](3); 10089 scale = scale["times$com_vzome_core_algebra_AlgebraicNumber"](field5["createRational$long"](2)); 10090 xAxis = xAxis.scale(scale); 10091 p2 = new FreePoint(xAxis); 10092 this.addParameter(p2); 10093 } else { 10094 correct = false; 10095 } 10096 } else if (p2 == null) if (prepareTool) { 10097 p2 = p1; 10098 p1 = this.originPoint; 10099 } else correct = false; 10100 if (!correct) return "translation tool requires start and end points, or just an end point"; 10101 if (prepareTool) { 10102 this.transforms = [null]; 10103 this.transforms[0] = new PointToPointTranslation(p1, p2); 10104 } 10105 return null; 10106 } 10107 /** 10108 * 10109 * @return {string} 10110 */ 10111 getXmlElementName() { 10112 return "TranslationTool"; 10113 } 10114 /** 10115 * 10116 * @return {string} 10117 */ 10118 getCategory() { 10119 return _TranslationTool.ID; 10120 } 10121}; 10122TranslationTool["__class"] = "com.vzome.core.tools.TranslationTool"; 10123TranslationTool["__interfaces"] = ["com.vzome.api.Tool"]; 10124
10125// src/worker/legacy/from-java/com/vzome/core/tools/TranslationToolFactory.ts 10126var TranslationToolFactory = class extends AbstractToolFactory { 10127 constructor(tools) { 10128 super(tools, null, TranslationTool.ID, TranslationTool.LABEL, TranslationTool.TOOLTIP); 10129 } 10130 /** 10131 * 10132 * @param {number} total 10133 * @param {number} balls 10134 * @param {number} struts 10135 * @param {number} panels 10136 * @return {boolean} 10137 */ 10138 countsAreValid(total, balls, struts, panels) { 10139 return total === 2 && balls === 2; 10140 } 10141 /** 10142 * 10143 * @param {string} id 10144 * @return {Tool} 10145 */ 10146 createToolInternal(id) { 10147 return new TranslationTool(id, this.getToolsModel()); 10148 } 10149 /** 10150 * 10151 * @param {*} selection 10152 * @return {boolean} 10153 */ 10154 bindParameters(selection) { 10155 return true; 10156 } 10157}; 10158TranslationToolFactory["__class"] = "com.vzome.core.tools.TranslationToolFactory"; 10159TranslationToolFactory["__interfaces"] = ["com.vzome.core.editor.SelectionSummary.Listener", "com.vzome.api.Tool.Factory"]; 10160
10161// src/worker/legacy/from-java/java/util/UUID.ts 10162var UUID = class _UUID { 10163 constructor(s) { 10164 if (this.value === void 0) { 10165 this.value = null; 10166 } 10167 this.value = s; 10168 } 10169 static randomUUID() { 10170 return new _UUID( 10171 /* toString */ 10172 ("" + Math.random()).substring(2) 10173 ); 10174 } 10175 toString() { 10176 return this.value; 10177 } 10178 static fromString(s) { 10179 return new _UUID(s); 10180 } 10181}; 10182UUID["__class"] = "java.util.UUID"; 10183
10184// src/worker/legacy/from-java/com/vzome/core/math/Polyhedron.ts 10185var Polyhedron = class _Polyhedron { 10186 static logger_$LI$() { 10187 if (_Polyhedron.logger == null) { 10188 _Polyhedron.logger = java.util.logging.Logger.getLogger("com.vzome.core.math.Polyhedron"); 10189 } 10190 return _Polyhedron.logger; 10191 } 10192 constructor(field5) { 10193 this.numVertices = 0; 10194 this.m_vertices = new java.util.HashMap(); 10195 this.m_vertexList = new java.util.ArrayList(); 10196 this.m_faces = new java.util.HashSet(); 10197 if (this.field === void 0) { 10198 this.field = null; 10199 } 10200 if (this.evilTwin === void 0) { 10201 this.evilTwin = null; 10202 } 10203 this.isEvil = false; 10204 this.__isPanel = false; 10205 this.guid = UUID.randomUUID(); 10206 this.shapeKey = this.guid.toString(); 10207 if (this.name === void 0) { 10208 this.name = null; 10209 } 10210 if (this.orbit === void 0) { 10211 this.orbit = null; 10212 } 10213 if (this.length === void 0) { 10214 this.length = null; 10215 } 10216 this.field = field5; 10217 } 10218 /** 10219 * Get the mirror twin of this Polyhedron. 10220 * The vertices are transformed by the given reflection. 10221 * The faces are oriented in reverse, so that when oriented with 10222 * a mirroring transformation, the face normals will still point 10223 * outward. 10224 * @return 10225 * @param {AlgebraicMatrix} reflection 10226 * @return {Polyhedron} 10227 */ 10228 getEvilTwin(reflection) { 10229 if (this.evilTwin == null) { 10230 try { 10231 this.evilTwin = ((o) => { 10232 if (o.clone != void 0) { 10233 return o.clone(); 10234 } else { 10235 let clone = Object.create(o); 10236 for (let p in o) { 10237 if (o.hasOwnProperty(p)) clone[p] = o[p]; 10238 } 10239 return clone; 10240 } 10241 })(this); 10242 } catch (e) { 10243 console.error(e.message, e); 10244 } 10245 this.evilTwin.isEvil = true; 10246 this.evilTwin.guid = UUID.randomUUID(); 10247 this.evilTwin.shapeKey = this.shapeKey + ":evil"; 10248 this.evilTwin.m_vertexList = new java.util.ArrayList(); 10249 for (let index = this.m_vertexList.iterator(); index.hasNext(); ) { 10250 let vertex = index.next(); 10251 { 10252 this.evilTwin.addVertex(reflection.timesColumn(vertex)); 10253 } 10254 } 10255 this.evilTwin.m_faces = new java.util.HashSet(); 10256 for (let index = this.m_faces.iterator(); index.hasNext(); ) { 10257 let face = index.next(); 10258 { 10259 this.evilTwin.addFace(face.createReverse()); 10260 } 10261 } 10262 } 10263 return this.evilTwin; 10264 } 10265 getField() { 10266 return this.field; 10267 } 10268 setName(name) { 10269 this.name = name; 10270 } 10271 getName() { 10272 return this.name; 10273 } 10274 addVertex(location) { 10275 this.m_vertexList.add(location); 10276 } 10277 /** 10278 * Only used in ZomicPolyhedronModelInterpreter. 10279 * This used to be the implementation of addVertex, but all other callers 10280 * don't use the return value, and have already assigned their own indices, 10281 * so the collisions here are a bad idea. 10282 * @param halfLoc 10283 * @return 10284 * @param {AlgebraicVector} location 10285 * @return {number} 10286 */ 10287 addIndexedVertex(location) { 10288 let vertexObj = this.m_vertices.get(location); 10289 if (vertexObj == null) { 10290 this.m_vertexList.add(location); 10291 this.m_vertices.put(location, vertexObj = this.numVertices++); 10292 } 10293 return vertexObj; 10294 } 10295 addFace(face) { 10296 face.canonicallyOrder(); 10297 if (!this.m_faces.contains(face)) { 10298 this.m_faces.add(face); 10299 } 10300 } 10301 newFace() { 10302 return new _Polyhedron.Face(this); 10303 } 10304 /** 10305 * 10306 * @return {number} 10307 */ 10308 hashCode() { 10309 const prime = 31; 10310 let result = 1; 10311 result = prime * result + (this.isEvil ? 1231 : 1237); 10312 result = prime * result + (this.length == null ? 0 : ( 10313 /* hashCode */ 10314 ((o) => { 10315 if (o.hashCode) { 10316 return o.hashCode(); 10317 } else { 10318 return o.toString().split("").reduce((prevHash, currVal) => (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0, 0); 10319 } 10320 })(this.length) 10321 )); 10322 result = prime * result + (this.m_faces == null ? 0 : ( 10323 /* hashCode */ 10324 ((o) => { 10325 if (o.hashCode) { 10326 return o.hashCode(); 10327 } else { 10328 return o.toString().split("").reduce((prevHash, currVal) => (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0, 0); 10329 } 10330 })(this.m_faces) 10331 )); 10332 result = prime * result + (this.m_vertexList == null ? 0 : ( 10333 /* hashCode */ 10334 ((o) => { 10335 if (o.hashCode) { 10336 return o.hashCode(); 10337 } else { 10338 return o.toString().split("").reduce((prevHash, currVal) => (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0, 0); 10339 } 10340 })(this.m_vertexList) 10341 )); 10342 result = prime * result + this.numVertices; 10343 result = prime * result + (this.orbit == null ? 0 : ( 10344 /* hashCode */ 10345 ((o) => { 10346 if (o.hashCode) { 10347 return o.hashCode(); 10348 } else { 10349 return o.toString().split("").reduce((prevHash, currVal) => (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0, 0); 10350 } 10351 })(this.orbit) 10352 )); 10353 return result; 10354 } 10355 /** 10356 * 10357 * @param {*} obj 10358 * @return {boolean} 10359 */ 10360 equals(obj) { 10361 if (this === obj) { 10362 return true; 10363 } 10364 if (obj == null) { 10365 return false;
10366 } 10367 if (this.constructor !== obj.constructor) { 10368 return false; 10369 } 10370 const other = obj; 10371 if (this.isEvil !== other.isEvil) { 10372 return false; 10373 } 10374 if (this.length == null) { 10375 if (other.length != null) { 10376 return false; 10377 } 10378 } else if (!/* equals */ 10379 ((o1, o2) => { 10380 if (o1 && o1.equals) { 10381 return o1.equals(o2); 10382 } else { 10383 return o1 === o2; 10384 } 10385 })(this.length, other.length)) { 10386 return false; 10387 } 10388 if (this.m_faces == null) { 10389 if (other.m_faces != null) { 10390 return false; 10391 } 10392 } else if (!/* equals */ 10393 ((o1, o2) => { 10394 if (o1 && o1.equals) { 10395 return o1.equals(o2); 10396 } else { 10397 return o1 === o2; 10398 } 10399 })(this.m_faces, other.m_faces)) { 10400 return false; 10401 } 10402 if (this.m_vertexList == null) { 10403 if (other.m_vertexList != null) { 10404 return false; 10405 } 10406 } else if (!/* equals */ 10407 ((o1, o2) => { 10408 if (o1 && o1.equals) { 10409 return o1.equals(o2); 10410 } else { 10411 return o1 === o2; 10412 } 10413 })(this.m_vertexList, other.m_vertexList)) { 10414 return false; 10415 } 10416 if (this.numVertices !== other.numVertices) { 10417 return false; 10418 } 10419 if (this.orbit == null) { 10420 if (other.orbit != null) { 10421 return false; 10422 } 10423 } else if (!this.orbit.equals(other.orbit)) { 10424 return false; 10425 } 10426 return true; 10427 } 10428 setOrbit(orbit) { 10429 this.orbit = orbit; 10430 } 10431 setLength(length) { 10432 this.length = length; 10433 } 10434 getOrbit() { 10435 return this.orbit; 10436 } 10437 getLength() { 10438 return this.length; 10439 } 10440 isPanel() { 10441 return this.__isPanel; 10442 } 10443 setPanel(isPanel) { 10444 this.__isPanel = isPanel; 10445 } 10446 getVertexList() { 10447 return this.m_vertexList; 10448 } 10449 getFaceSet() { 10450 return this.m_faces; 10451 } 10452 getGuid() { 10453 return this.guid; 10454 } 10455 /** 10456 * The stable, content-derived shape key used as the shape identity when serializing a scene 10457 * to a client, and (on the web) as the geometry cache/instancing key. See the shapeKey field 10458 * comment for why this is distinct from getGuid(). Defaults to the guid string until a factory 10459 * (AbstractShapes) or a future user-shape realization path sets a content-derived key. 10460 * @return {string} 10461 */ 10462 getShapeKey() { 10463 return this.shapeKey; 10464 } 10465 /** 10466 * Set a readable, content-derived shape key. Used by AbstractShapes for catalog shapes, e.g. 10467 * "<symmetry>:<orbit>:<length>" (strut) or "<symmetry>:<pkg>:ball" (connector). Must be a pure 10468 * function of the shape's DEFINITION so that any worker realizing the same shape computes the 10469 * same key; do NOT fold in design/session/instance identity. 10470 * @param {string} shapeKey 10471 */ 10472 setShapeKey(shapeKey) { 10473 this.shapeKey = shapeKey; 10474 } 10475 /** 10476 * Content hash of this shape's geometry, for shapes with no short readable key (panels; and, 10477 * in future, user-defined shapes assembled from a selected panel collection -- a per-design 10478 * feature not yet implemented). Deterministic across workers because it depends only on the 10479 * canonicalized vertex/face definition, matching the fields equals()/hashCode() already use. 10480 * 10481 * NOTE: intentionally NOT wired in yet for the future user-shape path -- that path also needs 10482 * a per-design shape registry (to give the shape a home and round-trip through the design XML), 10483 * which is separate work. This method is provided so that, when that feature lands, its 10484 * realization code has a ready, worker-agnostic way to derive the same key everywhere. Panels 10485 * MAY adopt it now (see AbstractShapes.getPanelShape); struts/connectors deliberately do not, 10486 * to keep their readable keys. 10487 * @return {string} 10488 */ 10489 deriveGeometricKey() { 10490 const buf = new java.lang.StringBuilder(); 10491 buf.append(this.isEvil ? "e:" : "s:"); 10492 for (let index = this.m_vertexList.iterator(); index.hasNext(); ) { 10493 let v = index.next(); 10494 buf.append(v.toString()).append(";"); 10495 } 10496 buf.append("|"); 10497 const faceStrings = new java.util.ArrayList(); 10498 for (let index = this.m_faces.iterator(); index.hasNext(); ) { 10499 let face = index.next(); 10500 faceStrings.add(face.toString()); 10501 } 10502 java.util.Collections.sort(faceStrings); 10503 for (let index = faceStrings.iterator(); index.hasNext(); ) { 10504 let f = index.next(); 10505 buf.append(f).append(";"); 10506 }
10507 const FNV_OFFSET = 0xcbf29ce484222325n; 10508 const FNV_PRIME = 0x100000001b3n; 10509 const FNV_MASK = 0xffffffffffffffffn; 10510 const s = buf.toString(); 10511 let hash = FNV_OFFSET; 10512 for (let i = 0; i < s.length; i++) { 10513 { 10514 hash = (hash ^ BigInt(s.charAt(i).charCodeAt(0))) & FNV_MASK; 10515 hash = hash * FNV_PRIME & FNV_MASK; 10516 } 10517 ; 10518 } 10519 return "u" + hash.toString(16); 10520 } 10521 getTriangleFaces() { 10522 const result = new java.util.ArrayList(); 10523 for (let index = this.m_faces.iterator(); index.hasNext(); ) { 10524 let face = index.next(); 10525 { 10526 result.addAll(face.getTriangles()); 10527 } 10528 } 10529 return result; 10530 } 10531 getTriangles() { 10532 let index = 0; 10533 const result = new java.util.ArrayList(); 10534 for (let index1 = this.m_faces.iterator(); index1.hasNext(); ) { 10535 let face = index1.next(); 10536 { 10537 for (let index12 = face.getTriangles().iterator(); index12.hasNext(); ) { 10538 let triangle = index12.next(); 10539 { 10540 result.add(index++); 10541 result.add(index++); 10542 result.add(index++); 10543 } 10544 } 10545 } 10546 } 10547 return result; 10548 } 10549 getTriangleVertices() { 10550 const result = new java.util.ArrayList(); 10551 for (let index = this.m_faces.iterator(); index.hasNext(); ) { 10552 let face = index.next(); 10553 {
10554 for (let index2 = face.getTriangles().iterator(); index2.hasNext(); ) { 10555 let triangle = index2.next(); 10556 { 10557 for (let loopIndex = 0; loopIndex < triangle.vertices.length; loopIndex++) { 10558 let index3 = triangle.vertices[loopIndex]; 10559 { 10560 const vertex = this.m_vertexList.get(index3); 10561 result.add(vertex.toRealVector()); 10562 } 10563 } 10564 } 10565 } 10566 } 10567 } 10568 return result; 10569 } 10570 getNormals() { 10571 const result = new java.util.ArrayList(); 10572 for (let index = this.m_faces.iterator(); index.hasNext(); ) { 10573 let face = index.next(); 10574 { 10575 const normal = face.getNormal(this.m_vertexList).toRealVector(); 10576 for (let index2 = face.getTriangles().iterator(); index2.hasNext(); ) { 10577 let triangle = index2.next(); 10578 { 10579 result.add(normal); 10580 result.add(normal); 10581 result.add(normal); 10582 } 10583 } 10584 } 10585 } 10586 return result; 10587 } 10588}; 10589Polyhedron["__class"] = "com.vzome.core.math.Polyhedron"; 10590Polyhedron["__interfaces"] = ["java.lang.Cloneable"]; 10591((Polyhedron2) => { 10592 class Face2 extends java.util.ArrayList { 10593 constructor(__parent) { 10594 super(); 10595 this.__parent = __parent; 10596 } 10597 createReverse() { 10598 const vertices = ( 10599 /* clone */ 10600 ((o) => { 10601 if (o.clone != void 0) { 10602 return o.clone(); 10603 } else { 10604 let clone = Object.create(o); 10605 for (let p in o) { 10606 if (o.hasOwnProperty(p)) clone[p] = o[p]; 10607 } 10608 return clone; 10609 } 10610 })(this) 10611 ); 10612 java.util.Collections.reverse(vertices); 10613 const mirrorFace = new Polyhedron2.Face(this.__parent); 10614 mirrorFace.addAll(vertices); 10615 return mirrorFace; 10616 } 10617 getVertex(index) { 10618 if (index >= this.size()) { 10619 const msg = "index larger than Face size"; 10620 Polyhedron2.logger_$LI$().severe(msg); 10621 throw new java.lang.IllegalStateException(msg); 10622 } 10623 return this.get(index); 10624 } 10625 getTriangles() { 10626 const arity = this.size(); 10627 const result = new java.util.ArrayList(); 10628 let v0 = -1; 10629 let v1 = -1; 10630 for (let j = 0; j < arity; j++) { 10631 { 10632 const index = this.get(j); 10633 if (v0 === -1) { 10634 v0 = index; 10635 } else if (v1 === -1) { 10636 v1 = index; 10637 } else { 10638 const triangle = new Polyhedron2.Face.Triangle(this, v0, v1, index); 10639 result.add(triangle); 10640 v1 = index; 10641 } 10642 } 10643 ; 10644 } 10645 return result; 10646 } 10647 getNormal(vertices) { 10648 return AlgebraicVectors.getNormal$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector(vertices.get(this.getVertex(0)), vertices.get(this.getVertex(1)), vertices.get(this.getVertex(2))); 10649 } 10650 canonicallyOrder() { 10651 let minIndex = -1; 10652 let minVertex = javaemul.internal.IntegerHelper.MAX_VALUE; 10653 const sz = this.size(); 10654 for (let i = 0; i < sz; i++) { 10655 if (this.getVertex(i) <= minVertex) { 10656 minVertex = this.getVertex(i); 10657 minIndex = i; 10658 } 10659 ; 10660 } 10661 const temp = ((s) => { 10662 let a = []; 10663 while (s-- > 0) a.push(null); 10664 return a; 10665 })(sz); 10666 for (let j = 0; j < sz; j++) { 10667 { 10668 temp[j] = this.get((j + minIndex) % sz); 10669 } 10670 ; 10671 } 10672 for (let k = 0; k < sz; k++) { 10673 this.set(k, temp[k]); 10674 } 10675 } 10676 /** 10677 * 10678 * @return {number} 10679 */ 10680 hashCode() { 10681 let tot = 0; 10682 for (let i = 0; i < this.size(); i++) { 10683 tot += this.getVertex(i); 10684 } 10685 return tot; 10686 } 10687 /** 10688 * 10689 * @param {*} other 10690 * @return {boolean} 10691 */ 10692 equals(other) { 10693 if (other == null) return false; 10694 if (other === this) return true; 10695 if (!(other != null && other instanceof Polyhedron2.Face)) return false; 10696 const otherFace = other; 10697 if (otherFace.size() !== this.size()) return false;
10698 for (let i = 0; i < this.size(); i++) { 10699 if (!(this.get(i) === otherFace.get(i))) return false; 10700 ; 10701 } 10702 return true; 10703 } 10704 } 10705 Polyhedron2.Face = Face2; 10706 Face2["__class"] = "com.vzome.core.math.Polyhedron.Face"; 10707 Face2["__interfaces"] = ["java.util.RandomAccess", "java.util.List", "java.lang.Cloneable", "java.util.Collection", "java.lang.Iterable", "java.io.Serializable"]; 10708 ((Face3) => { 10709 class Triangle { 10710 constructor(__parent, v0, v1, v2) { 10711 this.__parent = __parent; 10712 this.vertices = [0, 0, 0]; 10713 this.vertices[0] = v0; 10714 this.vertices[1] = v1; 10715 this.vertices[2] = v2; 10716 } 10717 } 10718 Face3.Triangle = Triangle; 10719 Triangle["__class"] = "com.vzome.core.math.Polyhedron.Face.Triangle"; 10720 })(Face2 = Polyhedron2.Face || (Polyhedron2.Face = {})); 10721 class Views { 10722 constructor() { 10723 } 10724 } 10725 Polyhedron2.Views = Views; 10726 Views["__class"] = "com.vzome.core.math.Polyhedron.Views"; 10727})(Polyhedron || (Polyhedron = {})); 10728
10729// src/worker/legacy/from-java/com/vzome/core/parts/FastDefaultStrutGeometry.ts 10730var FastDefaultStrutGeometry = class { 10731 getFast() { 10732 return true; 10733 } 10734 constructor(dir) { 10735 if (this.g2_vector === void 0) { 10736 this.g2_vector = null; 10737 } 10738 if (this.b2_vector === void 0) { 10739 this.b2_vector = null; 10740 } 10741 if (this.y2_vector === void 0) { 10742 this.y2_vector = null; 10743 } 10744 if (this.g2n_vector === void 0) { 10745 this.g2n_vector = null; 10746 } 10747 if (this.y2n_vector === void 0) { 10748 this.y2n_vector = null; 10749 } 10750 if (this.mAxis === void 0) { 10751 this.mAxis = null; 10752 } 10753 this.mAxis = dir.getAxis$int$int(Symmetry.PLUS, 0); 10754 const v = this.mAxis.normal(); 10755 let x = v.getComponent(AlgebraicVector.X).evaluate(); 10756 let y = v.getComponent(AlgebraicVector.Y).evaluate(); 10757 let z = v.getComponent(AlgebraicVector.Z).evaluate(); 10758 let evenParity = true; 10759 const xNeg = x < 0; 10760 if (xNeg) { 10761 x = -x; 10762 evenParity = !evenParity; 10763 } 10764 const yNeg = y < 0; 10765 if (yNeg) { 10766 y = -y; 10767 evenParity = !evenParity; 10768 } 10769 const zNeg = z < 0; 10770 if (zNeg) { 10771 z = -z; 10772 evenParity = !evenParity; 10773 } 10774 let first; 10775 let second; 10776 let third; 10777 let firstNeg; 10778 let secondNeg; 10779 let thirdNeg; 10780 if (x >= y) { 10781 if (y >= z) { 10782 first = AlgebraicVector.X; 10783 firstNeg = xNeg; 10784 second = AlgebraicVector.Y; 10785 secondNeg = yNeg; 10786 third = AlgebraicVector.Z; 10787 thirdNeg = zNeg; 10788 } else if (x >= z) { 10789 first = AlgebraicVector.X; 10790 firstNeg = xNeg; 10791 second = AlgebraicVector.Z; 10792 secondNeg = zNeg; 10793 third = AlgebraicVector.Y; 10794 thirdNeg = yNeg; 10795 evenParity = !evenParity; 10796 } else { 10797 first = AlgebraicVector.Z; 10798 firstNeg = zNeg; 10799 second = AlgebraicVector.X; 10800 secondNeg = xNeg; 10801 third = AlgebraicVector.Y; 10802 thirdNeg = yNeg; 10803 } 10804 } else { 10805 if (x >= z) { 10806 first = AlgebraicVector.Y; 10807 firstNeg = yNeg; 10808 second = AlgebraicVector.X; 10809 secondNeg = xNeg; 10810 third = AlgebraicVector.Z; 10811 thirdNeg = zNeg; 10812 evenParity = !evenParity; 10813 } else if (y >= z) { 10814 first = AlgebraicVector.Y; 10815 firstNeg = yNeg; 10816 second = AlgebraicVector.Z; 10817 secondNeg = zNeg; 10818 third = AlgebraicVector.X; 10819 thirdNeg = xNeg; 10820 } else { 10821 first = AlgebraicVector.Z; 10822 firstNeg = zNeg; 10823 second = AlgebraicVector.Y; 10824 secondNeg = yNeg; 10825 third = AlgebraicVector.X; 10826 thirdNeg = xNeg; 10827 evenParity = !evenParity; 10828 } 10829 } 10830 const field5 = v.getField(); 10831 const eight = field5["createRational$long$long"](8, 10); 10832 this.b2_vector = field5.origin(3); 10833 this.b2_vector.setComponent(first, firstNeg ? eight.negate() : eight); 10834 const five = field5["createRational$long$long"](5, 10); 10835 this.g2_vector = field5.origin(3); 10836 this.g2_vector.setComponent(first, firstNeg ? five.negate() : five); 10837 this.g2_vector.setComponent(second, secondNeg ? five.negate() : five); 10838 const four = field5["createRational$long$long"](4, 10); 10839 this.y2_vector = field5.origin(3); 10840 this.y2_vector.setComponent(first, firstNeg ? four.negate() : four); 10841 this.y2_vector.setComponent(second, secondNeg ? four.negate() : four); 10842 this.y2_vector.setComponent(third, thirdNeg ? four.negate() : four); 10843 if (!evenParity) { 10844 const swap = this.y2_vector; 10845 this.y2_vector = this.g2_vector; 10846 this.g2_vector = swap; 10847 } 10848 const centroid = AlgebraicVectors.getCentroid([this.b2_vector, this.g2_vector, this.y2_vector]); 10849 const b2g2 = this.g2_vector.minus(this.b2_vector); 10850 const y2g2 = this.g2_vector.minus(this.y2_vector); 10851 const normal = AlgebraicVectors.getNormal$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector(b2g2, y2g2); 10852 const intersection = AlgebraicVectors.getLinePlaneIntersection(field5.origin(3), v, this.g2_vector, normal); 10853 const g2_offset = this.g2_vector.minus(centroid); 10854 const y2_offset = this.y2_vector.minus(centroid); 10855 this.g2_vector = intersection.plus(g2_offset); 10856 this.y2_vector = intersection.plus(y2_offset); 10857 this.g2n_vector = intersection.minus(g2_offset); 10858 this.y2n_vector = intersection.minus(y2_offset); 10859 } 10860 /** 10861 * 10862 * @param {*} length 10863 * @return {Polyhedron} 10864 */ 10865 getStrutPolyhedron(length) { 10866 const field5 = this.mAxis.getDirection().getSymmetry().getField(); 10867 const poly = new Polyhedron(field5); 10868 const strutVector = this.mAxis.normal().scale(length); 10869 const g1_vector = this.g2_vector.negate().plus(strutVector); 10870 const y1_vector = this.y2_vector.negate().plus(strutVector); 10871 const g1n_vector = this.g2n_vector.negate().plus(strutVector); 10872 const y1n_vector = this.y2n_vector.negate().plus(strutVector); 10873 poly.addVertex(y1_vector); 10874 const y1 = 0; 10875 poly.addVertex(g1_vector); 10876 const g1 = 1; 10877 poly.addVertex(this.y2_vector); 10878 const y2 = 2; 10879 poly.addVertex(this.g2_vector); 10880 const g2 = 3; 10881 poly.addVertex(y1n_vector); 10882 const y1n = 4; 10883 poly.addVertex(g1n_vector); 10884 const g1n = 5; 10885 poly.addVertex(this.y2n_vector); 10886 const y2n = 6; 10887 poly.addVertex(this.g2n_vector); 10888 const g2n = 7; 10889 let face = poly.newFace(); 10890 face.add(g2); 10891 face.add(y2); 10892 face.add(y1n); 10893 face.add(g1n); 10894 poly.addFace(face); 10895 face = poly.newFace(); 10896 face.add(g2); 10897 face.add(g1n); 10898 face.add(y1); 10899 face.add(y2n); 10900 poly.addFace(face); 10901 face = poly.newFace(); 10902 face.add(g2n); 10903 face.add(y2n); 10904 face.add(y1); 10905 face.add(g1); 10906 poly.addFace(face); 10907 face = poly.newFace(); 10908 face.add(g2n); 10909 face.add(g1); 10910 face.add(y1n); 10911 face.add(y2); 10912 poly.addFace(face); 10913 face = poly.newFace(); 10914 face.add(y2); 10915 face.add(g2); 10916 face.add(y2n); 10917 face.add(g2n); 10918 poly.addFace(face); 10919 face = poly.newFace(); 10920 face.add(g1); 10921 face.add(y1); 10922 face.add(g1n); 10923 face.add(y1n); 10924 poly.addFace(face); 10925 return poly; 10926 } 10927}; 10928FastDefaultStrutGeometry["__class"] = "com.vzome.core.parts.FastDefaultStrutGeometry"; 10929FastDefaultStrutGeometry["__interfaces"] = ["com.vzome.core.parts.StrutGeometry"]; 10930
10931// src/worker/legacy/from-java/com/vzome/core/render/RealZomeScaling.ts 10932var RealZomeScaling; 10933((RealZomeScaling2) => { 10934 RealZomeScaling2.VZOME_BLUE_DIAMETER = 2; 10935 RealZomeScaling2.RZOME_BLUE_DIAMETER_INCHES = 0.6958; 10936 RealZomeScaling2.RZOME_BLUE_DIAMETER_CM = 1.7673; 10937 RealZomeScaling2.RZOME_INCH_SCALING = RealZomeScaling2.RZOME_BLUE_DIAMETER_INCHES / RealZomeScaling2.VZOME_BLUE_DIAMETER; 10938 RealZomeScaling2.RZOME_CM_SCALING = RealZomeScaling2.RZOME_BLUE_DIAMETER_CM / RealZomeScaling2.VZOME_BLUE_DIAMETER; 10939 RealZomeScaling2.RZOME_MM_SCALING = RealZomeScaling2.RZOME_CM_SCALING * 10; 10940 RealZomeScaling2.VZOME_STRUT_MODEL_BALL_DIAMETER = 44.36; 10941 RealZomeScaling2.VZOME_STRUT_MODEL_INCH_SCALING = RealZomeScaling2.RZOME_BLUE_DIAMETER_INCHES / RealZomeScaling2.VZOME_STRUT_MODEL_BALL_DIAMETER; 10942})(RealZomeScaling || (RealZomeScaling = {})); 10943
10944// src/worker/legacy/from-java/com/vzome/core/viewing/AbstractShapes.ts 10945var AbstractShapes = class { 10946 constructor(pkgName, name, alias, symm) { 10947 this.strutShapesByLengthAndOrbit = new java.util.HashMap(); 10948 this.strutGeometriesByOrbit = new java.util.HashMap(); 10949 this.panelShapes = new java.util.HashMap(); 10950 if (this.mPkgName === void 0) { 10951 this.mPkgName = null; 10952 } 10953 if (this.mName === void 0) { 10954 this.mName = null; 10955 } 10956 if (this.alias === void 0) { 10957 this.alias = null; 10958 } 10959 if (this.mSymmetry === void 0) { 10960 this.mSymmetry = null; 10961 } 10962 if (this.mConnectorGeometry === void 0) { 10963 this.mConnectorGeometry = null; 10964 } 10965 this.mPkgName = pkgName; 10966 this.mName = name; 10967 this.alias = alias; 10968 this.mConnectorGeometry = null; 10969 this.mSymmetry = symm; 10970 } 10971 /** 10972 * 10973 * @return {string} 10974 */ 10975 toString() { 10976 return ( 10977 /* getSimpleName */ 10978 ((c) => typeof c === "string" ? c.substring(c.lastIndexOf(".") + 1) : c["__class"] ? c["__class"].substring(c["__class"].lastIndexOf(".") + 1) : c["name"].substring(c["name"].lastIndexOf(".") + 1))(this.constructor) + "( Symmetry:" + this.mSymmetry.getName() + ", PkgName:" + this.mPkgName + ", Name:" + this.mName + (this.alias == null ? "" : ", Alias:" + this.alias) + " )" 10979 ); 10980 } 10981 /** 10982 * 10983 * @param {Direction} dir 10984 * @return {Color} 10985 */ 10986 getColor(dir) { 10987 return null; 10988 } 10989 /** 10990 * 10991 * @return {boolean} 10992 */ 10993 hasColors() { 10994 return false; 10995 } 10996 createStrutGeometry(dir) { 10997 return new FastDefaultStrutGeometry(dir); 10998 } 10999 /*private*/ 11000 getStrutGeometry(orbit) { 11001 let orbitStrutGeometry = this.strutGeometriesByOrbit.get(orbit); 11002 if (orbitStrutGeometry == null) { 11003 orbitStrutGeometry = this.createStrutGeometry(orbit); 11004 this.strutGeometriesByOrbit.put(orbit, orbitStrutGeometry); 11005 } 11006 return orbitStrutGeometry; 11007 } 11008 getStrutGeometries() { 11009 return java.util.Arrays.stream(this.mSymmetry.getDirectionNames()).collect(java.util.stream.Collectors.toMap(((funcInst) => { 11010 if (funcInst == null || typeof funcInst == "function") { 11011 return funcInst; 11012 } 11013 return (arg0) => (funcInst["apply"] ? funcInst["apply"] : funcInst).call(funcInst, arg0); 11014 })(((x) => x)), (name) => this.getStrutGeometry(this.mSymmetry.getDirection(name)))); 11015 } 11016 /** 11017 * 11018 * @return {string} 11019 */ 11020 getName() { 11021 return this.mName; 11022 } 11023 /** 11024 * 11025 * @return {string} 11026 */ 11027 getAlias() { 11028 return this.alias; 11029 } 11030 /** 11031 * 11032 * @return {string} 11033 */ 11034 getPackage() { 11035 return this.mPkgName; 11036 } 11037 /** 11038 * 11039 * @return {Polyhedron} 11040 */ 11041 getConnectorShape() { 11042 if (this.mConnectorGeometry == null) { 11043 this.mConnectorGeometry = this.buildConnectorShape(this.mPkgName); 11044 this.mConnectorGeometry.setName("ball"); 11045 this.mConnectorGeometry.setShapeKey(this.mSymmetry.getName() + ":" + this.mPkgName + ":ball"); 11046 } 11047 return this.mConnectorGeometry; 11048 } 11049 /** 11050 * 11051 * @param {Direction} orbit 11052 * @param {*} length 11053 * @return {Polyhedron} 11054 */ 11055 getStrutShape(orbit, length) { 11056 let strutShapesByLength = this.strutShapesByLengthAndOrbit.get(orbit); 11057 if (strutShapesByLength == null) { 11058 strutShapesByLength = new java.util.HashMap(); 11059 this.strutShapesByLengthAndOrbit.put(orbit, strutShapesByLength); 11060 } 11061 let lengthShape = strutShapesByLength.get(length); 11062 if (lengthShape == null) { 11063 const orbitStrutGeometry = this.getStrutGeometry(orbit); 11064 lengthShape = orbitStrutGeometry.getStrutPolyhedron(length); 11065 strutShapesByLength.put(length, lengthShape); 11066 if (lengthShape != null) { 11067 lengthShape.setName(orbit.getName() + strutShapesByLength.size()); 11068 lengthShape.setOrbit(orbit); 11069 lengthShape.setLength(orbit.getLengthInUnits(length)); 11070 lengthShape.setShapeKey(this.mSymmetry.getName() + ":" + orbit.getName() + ":" + length.toString(AlgebraicField.DEFAULT_FORMAT)); 11071 } 11072 } 11073 return lengthShape; 11074 } 11075 /** 11076 * 11077 * @return {*} 11078 */ 11079 getSymmetry() { 11080 return this.mSymmetry; 11081 } 11082 /*private*/ 11083 makePanelPolyhedron(vertices, oneSided) { 11084 const poly = new Polyhedron(this.mSymmetry.getField()); 11085 poly.setPanel(true); 11086 let arity = 0; 11087 for (let index = vertices.iterator(); index.hasNext(); ) { 11088 let gv = index.next(); 11089 { 11090 arity++; 11091 poly.addVertex(gv); 11092 } 11093 } 11094 if (poly.getVertexList().size() < arity) return null; 11095 const front = poly.newFace(); 11096 const back = poly.newFace(); 11097 for (let i = 0; i < arity; i++) { 11098 { 11099 const j = i; 11100 front.add(j); 11101 back.add(0, j); 11102 } 11103 ; 11104 } 11105 poly.addFace(front); 11106 if (!oneSided) poly.addFace(back); 11107 return poly; 11108 } 11109 /** 11110 * 11111 * @param {number} vertexCount 11112 * @param {*} quadrea 11113 * @param {Axis} zone 11114 * @param {*} vertices 11115 * @param {boolean} oneSidedPanels 11116 * @return {Polyhedron} 11117 */ 11118 getPanelShape(vertexCount, quadrea, zone, vertices, oneSidedPanels) { 11119 let map1 = this.panelShapes.get(vertexCount); 11120 if (map1 == null) { 11121 map1 = new java.util.HashMap(); 11122 this.panelShapes.put(vertexCount, map1); 11123 } 11124 let map2 = map1.get(quadrea); 11125 if (map2 == null) { 11126 map2 = new java.util.HashMap(); 11127 map1.put(quadrea, map2); 11128 } 11129 const orbit = zone.getDirection(); 11130 let map3 = map2.get(orbit); 11131 if (map3 == null) { 11132 map3 = new java.util.HashMap(); 11133 map2.put(orbit, map3); 11134 } 11135 const orientation = zone.getOrientation(); 11136 const perm = this.mSymmetry.getPermutation(orientation).inverse(); 11137 const inverseOrientation = perm.mapIndex(0); 11138 const inverseTrans = this.mSymmetry.getMatrix(inverseOrientation); 11139 const canonicalVertices = new java.util.ArrayList(); 11140 for (let index = vertices.iterator(); index.hasNext(); ) { 11141 let vertex = index.next(); 11142 { 11143 canonicalVertices.add(inverseTrans.timesColumn(vertex)); 11144 } 11145 } 11146 let shape = map3.get(canonicalVertices); 11147 if (shape == null) { 11148 shape = this.makePanelPolyhedron(canonicalVertices, oneSidedPanels); 11149 if (shape != null) shape.setShapeKey(shape.deriveGeometricKey()); 11150 map3.put(canonicalVertices, shape); 11151 } 11152 return shape; 11153 } 11154 /** 11155 * 11156 * @return {number} 11157 */ 11158 getCmScaling() { 11159 return RealZomeScaling.RZOME_CM_SCALING; 11160 } 11161}; 11162AbstractShapes["__class"] = "com.vzome.core.viewing.AbstractShapes"; 11163AbstractShapes["__interfaces"] = ["com.vzome.core.editor.api.Shapes"]; 11164
11165// src/worker/legacy/from-java/com/vzome/core/viewing/OctahedralShapes.ts 11166var OctahedralShapes = class extends AbstractShapes { 11167 constructor(pkgName, name, symm) { 11168 super(pkgName, name, null, symm); 11169 } 11170 /** 11171 * 11172 * @param {string} pkgName 11173 * @return {Polyhedron} 11174 */ 11175 buildConnectorShape(pkgName) { 11176 const field5 = this.mSymmetry.getField(); 11177 const cube = new Polyhedron(field5); 11178 let scale = field5["createPower$int"](-2); 11179 scale = field5["createRational$long"](2)["times$com_vzome_core_algebra_AlgebraicNumber"](scale); 11180 const x = field5.basisVector(3, AlgebraicVector.X); 11181 const y = field5.basisVector(3, AlgebraicVector.Y); 11182 const z = field5.basisVector(3, AlgebraicVector.Z); 11183 cube.addVertex(x.scale(scale)); 11184 cube.addVertex(x.negate().scale(scale)); 11185 cube.addVertex(y.scale(scale)); 11186 cube.addVertex(y.negate().scale(scale)); 11187 cube.addVertex(z.scale(scale)); 11188 cube.addVertex(z.negate().scale(scale)); 11189 let face = cube.newFace(); 11190 face.add(0); 11191 face.add(2); 11192 face.add(4); 11193 cube.addFace(face); 11194 face = cube.newFace(); 11195 face.add(0); 11196 face.add(5); 11197 face.add(2); 11198 cube.addFace(face); 11199 face = cube.newFace(); 11200 face.add(0); 11201 face.add(3); 11202 face.add(5); 11203 cube.addFace(face); 11204 face = cube.newFace(); 11205 face.add(0); 11206 face.add(4); 11207 face.add(3); 11208 cube.addFace(face); 11209 face = cube.newFace(); 11210 face.add(1); 11211 face.add(4); 11212 face.add(2); 11213 cube.addFace(face); 11214 face = cube.newFace(); 11215 face.add(1); 11216 face.add(2); 11217 face.add(5); 11218 cube.addFace(face); 11219 face = cube.newFace(); 11220 face.add(1); 11221 face.add(5); 11222 face.add(3); 11223 cube.addFace(face); 11224 face = cube.newFace(); 11225 face.add(1); 11226 face.add(3); 11227 face.add(4); 11228 cube.addFace(face); 11229 return cube; 11230 } 11231}; 11232OctahedralShapes["__class"] = "com.vzome.core.viewing.OctahedralShapes"; 11233OctahedralShapes["__interfaces"] = ["com.vzome.core.editor.api.Shapes"]; 11234
11235// src/worker/legacy/from-java/com/vzome/core/kinds/OctahedralSymmetryPerspective.ts 11236var OctahedralSymmetryPerspective = class extends AbstractSymmetryPerspective { 11237 constructor(field5) { 11238 super(new OctahedralSymmetry(field5)); 11239 this.modelResourcePath = "org/vorthmann/zome/app/octahedral-vef.vZome"; 11240 this.setDefaultGeometry(new OctahedralShapes("octahedral", "octahedra", this.symmetry)); 11241 } 11242 /** 11243 * 11244 * @return {OctahedralSymmetry} 11245 */ 11246 getSymmetry() { 11247 return this.symmetry; 11248 } 11249 /** 11250 * 11251 * @param {Tool.Kind} kind 11252 * @param {ToolsModel} tools 11253 * @return {*} 11254 */ 11255 createToolFactories(kind, tools) { 11256 const result = new java.util.ArrayList(); 11257 switch (kind) { 11258 case Tool2.Kind.SYMMETRY: 11259 result.add(new OctahedralToolFactory(tools, this.symmetry)); 11260 result.add(new TetrahedralToolFactory(tools, this.symmetry)); 11261 result.add(new InversionToolFactory(tools)); 11262 result.add(new LineReflectionToolFactory(tools)); 11263 result.add(new MirrorToolFactory(tools)); 11264 result.add(new AxialSymmetryToolFactory(tools, this.symmetry)); 11265 break; 11266 case Tool2.Kind.TRANSFORM: 11267 result.add(new ScalingToolFactory(tools, this.symmetry)); 11268 result.add(new RotationToolFactory(tools, this.symmetry)); 11269 result.add(new TranslationToolFactory(tools)); 11270 result.add(new ProjectionToolFactory(tools)); 11271 result.add(new PerspectiveProjectionToolFactory(tools)); 11272 break; 11273 case Tool2.Kind.LINEAR_MAP: 11274 result.add(new LinearMapToolFactory(tools, this.symmetry, false)); 11275 break; 11276 default: 11277 break; 11278 } 11279 return result; 11280 } 11281 /** 11282 * 11283 * @param {Tool.Kind} kind 11284 * @param {ToolsModel} tools 11285 * @return {*} 11286 */ 11287 predefineTools(kind, tools) { 11288 const result = new java.util.ArrayList(); 11289 switch (kind) { 11290 case Tool2.Kind.SYMMETRY: 11291 result.add(new OctahedralToolFactory(tools, this.symmetry).createPredefinedTool("octahedral around origin")); 11292 result.add(new TetrahedralToolFactory(tools, this.symmetry).createPredefinedTool("tetrahedral around origin")); 11293 result.add(new InversionToolFactory(tools).createPredefinedTool("reflection through origin")); 11294 result.add(new MirrorToolFactory(tools).createPredefinedTool("reflection through XY plane")); 11295 result.add(new MirrorToolFactory(tools).createPredefinedTool("reflection through X=Y green plane")); 11296 result.add(new AxialSymmetryToolFactory(tools, this.symmetry).createPredefinedTool("symmetry around green through origin")); 11297 break; 11298 case Tool2.Kind.TRANSFORM: 11299 result.add(new ScalingToolFactory(tools, this.symmetry).createPredefinedTool("scale down")); 11300 result.add(new ScalingToolFactory(tools, this.symmetry).createPredefinedTool("scale up")); 11301 result.add(new RotationToolFactory(tools, this.symmetry, true).createPredefinedTool("rotate around green through origin")); 11302 result.add(new TranslationToolFactory(tools).createPredefinedTool("b1 move along +X")); 11303 break; 11304 default: 11305 break; 11306 } 11307 return result; 11308 } 11309 /** 11310 * 11311 * @return {string} 11312 */ 11313 getModelResourcePath() { 11314 return this.modelResourcePath; 11315 } 11316 setModelResourcePath(resourcePath) { 11317 this.modelResourcePath = resourcePath; 11318 } 11319}; 11320OctahedralSymmetryPerspective["__class"] = "com.vzome.core.kinds.OctahedralSymmetryPerspective"; 11321OctahedralSymmetryPerspective["__interfaces"] = ["com.vzome.core.editor.SymmetryPerspective"]; 11322
11323// src/worker/legacy/from-java/com/vzome/core/math/symmetry/A4Group.ts 11324var A4Group = class _A4Group { 11325 static S5_PERMS_$LI$() { 11326 if (_A4Group.S5_PERMS == null) { 11327 _A4Group.S5_PERMS = [[0, 1, 2, 3, 4], [1, 2, 3, 4, 0], [2, 3, 4, 0, 1], [3, 4, 0, 1, 2], [4, 0, 1, 2, 3], [1, 2, 0, 3, 4], [2, 0, 3, 4, 1], [0, 3, 4, 1, 2], [3, 4, 1, 2, 0], [4, 1, 2, 0, 3], [0, 2, 3, 1, 4], [2, 3, 1, 4, 0], [3, 1, 4, 0, 2], [1, 4, 0, 2, 3], [4, 0, 2, 3, 1], [0, 1, 3, 4, 2], [1, 3, 4, 2, 0], [3, 4, 2, 0, 1], [4, 2, 0, 1, 3], [2, 0, 1, 3, 4], [3, 1, 2, 4, 0], [1, 2, 4, 0, 3], [2, 4, 0, 3, 1], [4, 0, 3, 1, 2], [0, 3, 1, 2, 4], [1, 4, 2, 3, 0], [4, 2, 3, 0, 1], [2, 3, 0, 1, 4], [3, 0, 1, 4, 2], [0, 1, 4, 2, 3], [1, 3, 2, 0, 4], [3, 2, 0, 4, 1], [2, 0, 4, 1, 3], [0, 4, 1, 3, 2], [4, 1, 3, 2, 0], [0, 2, 4, 3, 1], [2, 4, 3, 1, 0], [4, 3, 1, 0, 2], [3, 1, 0, 2, 4], [1, 0, 2, 4, 3], [2, 1, 3, 0, 4], [1, 3, 0, 4, 2], [3, 0, 4, 2, 1], [0, 4, 2, 1, 3], [4, 2, 1, 3, 0], [0, 3, 2, 4, 1], [3, 2, 4, 1, 0], [2, 4, 1, 0, 3], [4, 1, 0, 3, 2], [1, 0, 3, 2, 4], [2, 1, 4, 3, 0], [1, 4, 3, 0, 2], [4, 3, 0, 2, 1], [3, 0, 2, 1, 4], [0, 2, 1, 4, 3], [4, 3, 2, 1, 0], [3, 2, 1, 0, 4], [2, 1, 0, 4, 3], [1, 0, 4, 3, 2], [0, 4, 3, 2, 1], [0, 1, 3, 2, 4], [0, 2, 1, 3, 4], [0, 3, 2, 1, 4], [1, 0, 2, 3, 4], [1, 2, 3, 0, 4], [1, 3, 0, 2, 4], [2, 1, 0, 3, 4], [2, 0, 3, 1, 4], [2, 3, 1, 0, 4], [3, 1, 2, 0, 4], [3, 2, 0, 1, 4], [3, 0, 1, 2, 4], [0, 1, 2, 4, 3], [0, 2, 3, 4, 1], [0, 3, 1, 4, 2], [1, 0, 3, 4, 2], [1, 2, 0, 4, 3], [1, 3, 2, 4, 0], [2, 1, 3, 4, 0], [2, 0, 1, 4, 3], [2, 3, 0, 4, 1], [3, 1, 0, 4, 2], [3, 2, 1, 4, 0], [3, 0, 2, 4, 1], [0, 2, 4, 1, 3], [0, 3, 4, 2, 1], [1, 0, 4, 2, 3], [1, 2, 4, 3, 0], [1, 3, 4, 0, 2], [2, 1, 4, 0, 3], [2, 0, 4, 3, 1], [2, 3, 4, 1, 0], [3, 1, 4, 2, 0], [3, 2, 4, 0, 1], [3, 0, 4, 1, 2], [0, 4, 1, 2, 3], [0, 4, 2, 3, 1], [0, 4, 3, 1, 2], [1, 4, 0, 3, 2], [1, 4, 2, 0, 3], [1, 4, 3, 2, 0], [2, 4, 1, 3, 0], [2, 4, 0, 1, 3], [2, 4, 3, 0, 1], [3, 4, 1, 0, 2], [3, 4, 2, 1, 0], [3, 4, 0, 2, 1], [4, 0, 1, 3, 2], [4, 0, 2, 1, 3], [4, 0, 3, 2, 1], [4, 1, 0, 2, 3], [4, 1, 2, 3, 0], [4, 1, 3, 0, 2], [4, 2, 1, 0, 3], [4, 2, 0, 3, 1], [4, 2, 3, 1, 0], [4, 3, 1, 2, 0], [4, 3, 2, 0, 1], [0, 1, 4, 3, 2], [4, 3, 0, 1, 2]]; 11328 } 11329 return _A4Group.S5_PERMS; 11330 } 11331 constructor(field5) { 11332 if (this.field === void 0) { 11333 this.field = null; 11334 } 11335 this.ROOTS = [null, null, null, null]; 11336 this.WEIGHTS = [null, null, null, null]; 11337 this.ROOTS_R4 = [null, null, null, null]; 11338 if (this.ONE_FIFTH === void 0) { 11339 this.ONE_FIFTH = null; 11340 } 11341 if (this.TWO_FIFTHS === void 0) { 11342 this.TWO_FIFTHS = null; 11343 } 11344 if (this.THREE_FIFTHS === void 0) { 11345 this.THREE_FIFTHS = null; 11346 } 11347 if (this.FOUR_FIFTHS === void 0) { 11348 this.FOUR_FIFTHS = null; 11349 } 11350 this.field = field5; 11351 this.ONE_FIFTH = field5["createRational$long$long"](1, 5); 11352 this.TWO_FIFTHS = field5["createRational$long$long"](2, 5); 11353 this.THREE_FIFTHS = field5["createRational$long$long"](3, 5); 11354 this.FOUR_FIFTHS = field5["createRational$long$long"](4, 5); 11355 const neg_one = field5["createRational$long"](-1); 11356 this.ROOTS[0] = field5.basisVector(5, 0); 11357 this.ROOTS[0].setComponent(1, neg_one); 11358 this.ROOTS[1] = field5.basisVector(5, 1); 11359 this.ROOTS[1].setComponent(2, neg_one); 11360 this.ROOTS[2] = field5.basisVector(5, 2); 11361 this.ROOTS[2].setComponent(3, neg_one); 11362 this.ROOTS[3] = field5.basisVector(5, 3); 11363 this.ROOTS[3].setComponent(4, neg_one); 11364 this.WEIGHTS[0] = field5.basisVector(5, 0); 11365 this.WEIGHTS[0].setComponent(0, this.FOUR_FIFTHS); 11366 this.WEIGHTS[0].setComponent(1, this.ONE_FIFTH.negate()); 11367 this.WEIGHTS[0].setComponent(2, this.ONE_FIFTH.negate()); 11368 this.WEIGHTS[0].setComponent(3, this.ONE_FIFTH.negate()); 11369 this.WEIGHTS[0].setComponent(4, this.ONE_FIFTH.negate()); 11370 this.WEIGHTS[1] = field5.basisVector(5, 0); 11371 this.WEIGHTS[1].setComponent(0, this.THREE_FIFTHS); 11372 this.WEIGHTS[1].setComponent(1, this.THREE_FIFTHS); 11373 this.WEIGHTS[1].setComponent(2, this.TWO_FIFTHS.negate()); 11374 this.WEIGHTS[1].setComponent(3, this.TWO_FIFTHS.negate()); 11375 this.WEIGHTS[1].setComponent(4, this.TWO_FIFTHS.negate()); 11376 this.WEIGHTS[2] = field5.basisVector(5, 0); 11377 this.WEIGHTS[2].setComponent(0, this.TWO_FIFTHS); 11378 this.WEIGHTS[2].setComponent(1, this.TWO_FIFTHS); 11379 this.WEIGHTS[2].setComponent(2, this.TWO_FIFTHS); 11380 this.WEIGHTS[2].setComponent(3, this.THREE_FIFTHS.negate()); 11381 this.WEIGHTS[2].setComponent(4, this.THREE_FIFTHS.negate()); 11382 this.WEIGHTS[3] = field5.basisVector(5, 0); 11383 this.WEIGHTS[3].setComponent(0, this.ONE_FIFTH); 11384 this.WEIGHTS[3].setComponent(1, this.ONE_FIFTH); 11385 this.WEIGHTS[3].setComponent(2, this.ONE_FIFTH); 11386 this.WEIGHTS[3].setComponent(3, this.ONE_FIFTH); 11387 this.WEIGHTS[3].setComponent(4, this.FOUR_FIFTHS.negate()); 11388 const two = field5["createRational$long"](2); 11389 const two_neg = field5["createRational$long"](-2); 11390 this.ROOTS_R4[0] = field5.basisVector(4, 1); 11391 this.ROOTS_R4[0].setComponent(1, two); 11392 this.ROOTS_R4[0].setComponent(2, two_neg); 11393 this.ROOTS_R4[1] = field5.basisVector(4, 1); 11394 this.ROOTS_R4[1].setComponent(3, two_neg); 11395 this.ROOTS_R4[1].setComponent(1, two_neg); 11396 this.ROOTS_R4[2] = field5.basisVector(4, 1); 11397 this.ROOTS_R4[2].setComponent(1, two); 11398 this.ROOTS_R4[2].setComponent(2, two); 11399 this.ROOTS_R4[3] = field5.basisVector(4, 3); 11400 const root5 = field5["createAlgebraicNumber$int$int$int$int"](-1, 2, 1, 0); 11401 this.ROOTS_R4[3].setComponent(1, neg_one); 11402 this.ROOTS_R4[3].setComponent(2, neg_one); 11403 this.ROOTS_R4[3].setComponent(0, root5); 11404 } 11405 /** 11406 * 11407 * @return {number} 11408 */ 11409 getOrder() { 11410 return _A4Group.S5_PERMS_$LI$().length; 11411 } 11412 /** 11413 * 11414 * @param {AlgebraicVector} model 11415 * @param {number} element 11416 * @return {AlgebraicVector} 11417 */ 11418 groupAction(model, element) { 11419 let result = this.field.origin(4); 11420 let sum = this.field["createRational$long"](0); 11421 for (let c = 0; c < 4; c++) { 11422 { 11423 const source = model.getComponent(_A4Group.S5_PERMS_$LI$()[element][c]); 11424 sum = sum["plus$com_vzome_core_algebra_AlgebraicNumber"](source); 11425 const scaled = this.ROOTS_R4[c].scale(sum); 11426 result = result.plus(scaled); 11427 } 11428 ; 11429 } 11430 return result.scale(this.field["createPower$int"](-1)); 11431 } 11432 /** 11433 * 11434 * @return {AlgebraicVector} 11435 */ 11436 getOrigin() { 11437 return this.field.origin(5); 11438 } 11439 /** 11440 * 11441 * @param {number} i 11442 * @return {AlgebraicVector} 11443 */ 11444 getWeight(i) { 11445 return this.WEIGHTS[i]; 11446 } 11447 /** 11448 * 11449 * @param {number} i 11450 * @return {AlgebraicVector} 11451 */ 11452 getSimpleRoot(i) { 11453 return this.ROOTS[i]; 11454 } 11455 /** 11456 * 11457 * @return {*} 11458 */ 11459 getField() { 11460 return this.field; 11461 } 11462 /** 11463 * 11464 * @param {AlgebraicVector} model 11465 * @param {number} element 11466 * @return {AlgebraicVector} 11467 */ 11468 chiralSubgroupAction(model, element) { 11469 if (element >= 60) return null; 11470 let result = this.field.origin(4); 11471 let sum = this.field["createRational$long"](0); 11472 for (let c = 0; c < 4; c++) { 11473 { 11474 const source = model.getComponent(_A4Group.S5_PERMS_$LI$()[element][c]); 11475 sum = sum["plus$com_vzome_core_algebra_AlgebraicNumber"](source); 11476 const scaled = this.ROOTS_R4[c].scale(sum); 11477 result = result.plus(scaled); 11478 } 11479 ; 11480 } 11481 return result.scale(this.field["createPower$int"](-1)); 11482 } 11483}; 11484A4Group["__class"] = "com.vzome.core.math.symmetry.A4Group"; 11485A4Group["__interfaces"] = ["com.vzome.core.math.symmetry.CoxeterGroup"]; 11486
11487// src/worker/legacy/from-java/com/vzome/core/math/symmetry/B4Group.ts 11488var B4Group = class _B4Group { 11489 static B4_PERMS_$LI$() { 11490 if (_B4Group.B4_PERMS == null) { 11491 _B4Group.B4_PERMS = [[0, 1, 2, 3], [0, 1, 3, 2], [0, 2, 1, 3], [0, 2, 3, 1], [0, 3, 2, 1], [0, 3, 1, 2], [1, 0, 2, 3], [1, 0, 3, 2], [1, 2, 0, 3], [1, 2, 3, 0], [1, 3, 2, 0], [1, 3, 0, 2], [2, 1, 0, 3], [2, 1, 3, 0], [2, 0, 1, 3], [2, 0, 3, 1], [2, 3, 0, 1], [2, 3, 1, 0], [3, 1, 2, 0], [3, 1, 0, 2], [3, 2, 1, 0], [3, 2, 0, 1], [3, 0, 2, 1], [3, 0, 1, 2]]; 11492 } 11493 return _B4Group.B4_PERMS; 11494 } 11495 constructor(field5) { 11496 if (this.field === void 0) { 11497 this.field = null; 11498 } 11499 this.ROOTS = [null, null, null, null]; 11500 this.WEIGHTS = [null, null, null, null]; 11501 this.field = field5; 11502 const neg_one = field5["createRational$long"](-1); 11503 this.ROOTS[0] = field5.basisVector(4, AlgebraicVector.X4); 11504 this.ROOTS[0].setComponent(AlgebraicVector.Y4, neg_one); 11505 this.ROOTS[1] = field5.basisVector(4, AlgebraicVector.Y4); 11506 this.ROOTS[1].setComponent(AlgebraicVector.Z4, neg_one); 11507 this.ROOTS[2] = field5.basisVector(4, AlgebraicVector.Z4); 11508 this.ROOTS[2].setComponent(AlgebraicVector.W4, neg_one); 11509 this.ROOTS[3] = field5.basisVector(4, AlgebraicVector.W4); 11510 const y = field5.basisVector(4, AlgebraicVector.Y4); 11511 const z = field5.basisVector(4, AlgebraicVector.Z4); 11512 this.WEIGHTS[0] = field5.basisVector(4, AlgebraicVector.X4); 11513 this.WEIGHTS[1] = this.WEIGHTS[0].plus(y); 11514 this.WEIGHTS[2] = this.WEIGHTS[1].plus(z); 11515 this.WEIGHTS[3] = field5.basisVector(4, AlgebraicVector.X4);
11516 const half = field5["createRational$long$long"](1, 2); 11517 this.WEIGHTS[3].setComponent(AlgebraicVector.X4, half); 11518 this.WEIGHTS[3].setComponent(AlgebraicVector.Y4, half); 11519 this.WEIGHTS[3].setComponent(AlgebraicVector.Z4, half); 11520 this.WEIGHTS[3].setComponent(AlgebraicVector.W4, half); 11521 if (field5.scale4dRoots()) { 11522 const scale = field5["createPower$int"](1); 11523 this.ROOTS[3] = this.ROOTS[3].scale(scale); 11524 this.WEIGHTS[3] = this.WEIGHTS[3].scale(scale); 11525 } 11526 } 11527 /** 11528 * 11529 * @return {number} 11530 */ 11531 getOrder() { 11532 return 24 * 16; 11533 } 11534 /** 11535 * 11536 * @param {AlgebraicVector} model 11537 * @param {number} element 11538 * @return {AlgebraicVector} 11539 */ 11540 groupAction(model, element) { 11541 const result = this.field.basisVector(4, AlgebraicVector.X4); 11542 const perm = element / 16 | 0; 11543 let signs = element % 16; 11544 for (let c = 0; c < 4; c++) { 11545 { 11546 let source = model.getComponent((_B4Group.B4_PERMS_$LI$()[perm][c] + 1) % 4); 11547 if (signs % 2 !== 0) source = source.negate(); 11548 result.setComponent((c + 1) % 4, source); 11549 signs = signs >> 1; 11550 } 11551 ; 11552 } 11553 return result; 11554 } 11555 /** 11556 * 11557 * @return {AlgebraicVector} 11558 */ 11559 getOrigin() { 11560 return this.field.origin(4); 11561 } 11562 /** 11563 * 11564 * @param {number} i 11565 * @return {AlgebraicVector} 11566 */ 11567 getWeight(i) { 11568 return this.WEIGHTS[i]; 11569 } 11570 /** 11571 * 11572 * @param {number} i 11573 * @return {AlgebraicVector} 11574 */ 11575 getSimpleRoot(i) { 11576 return this.ROOTS[i]; 11577 } 11578 /** 11579 * 11580 * @return {*} 11581 */ 11582 getField() { 11583 return this.field; 11584 } 11585 /** 11586 * 11587 * @param {AlgebraicVector} model 11588 * @param {number} element 11589 * @return {AlgebraicVector} 11590 */ 11591 chiralSubgroupAction(model, element) { 11592 const result = this.field.basisVector(4, AlgebraicVector.X4); 11593 const perm = element / 16 | 0; 11594 let signs = element % 16; 11595 let even = true; 11596 for (let c = 0; c < 4; c++) { 11597 { 11598 let source = model.getComponent((_B4Group.B4_PERMS_$LI$()[perm][c] + 1) % 4); 11599 if (signs % 2 !== 0) { 11600 even = !even; 11601 source = source.negate(); 11602 } 11603 result.setComponent((c + 1) % 4, source); 11604 signs = signs >> 1; 11605 } 11606 ; 11607 } 11608 return even ? result : null; 11609 } 11610}; 11611B4Group["__class"] = "com.vzome.core.math.symmetry.B4Group"; 11612B4Group["__interfaces"] = ["com.vzome.core.math.symmetry.CoxeterGroup"]; 11613
11614// src/worker/legacy/from-java/com/vzome/core/math/symmetry/D4Group.ts 11615var D4Group = class _D4Group { 11616 static D4_PERMS_$LI$() { 11617 if (_D4Group.D4_PERMS == null) { 11618 _D4Group.D4_PERMS = [[0, 1, 2, 3], [2, 3, 0, 1], [1, 0, 3, 2], [3, 2, 1, 0], [2, 1, 3, 0], [3, 0, 2, 1], [1, 2, 0, 3], [0, 3, 1, 2], [0, 2, 3, 1], [3, 1, 0, 2], [2, 0, 1, 3], [1, 3, 2, 0], [1, 0, 2, 3], [2, 3, 1, 0], [0, 1, 3, 2], [3, 2, 0, 1], [0, 2, 1, 3], [1, 3, 0, 2], [2, 0, 3, 1], [3, 1, 2, 0], [2, 1, 0, 3], [0, 3, 2, 1], [1, 2, 3, 0], [3, 0, 1, 2]]; 11619 } 11620 return _D4Group.D4_PERMS; 11621 } 11622 constructor(field5) { 11623 if (this.field === void 0) { 11624 this.field = null; 11625 } 11626 this.ROOTS = [null, null, null, null]; 11627 this.WEIGHTS = [null, null, null, null]; 11628 this.field = field5; 11629 const neg_one = field5["createRational$long"](-1); 11630 this.ROOTS[0] = field5.basisVector(4, AlgebraicVector.X4); 11631 this.ROOTS[0].setComponent(AlgebraicVector.Y4, neg_one); 11632 this.ROOTS[1] = field5.basisVector(4, AlgebraicVector.Y4); 11633 this.ROOTS[1].setComponent(AlgebraicVector.Z4, neg_one); 11634 this.ROOTS[2] = field5.basisVector(4, AlgebraicVector.Z4); 11635 this.ROOTS[2].setComponent(AlgebraicVector.W4, neg_one); 11636 this.ROOTS[3] = field5.basisVector(4, AlgebraicVector.Z4); 11637 this.ROOTS[3].setComponent(AlgebraicVector.W4, field5.one()); 11638 const y = field5.basisVector(4, AlgebraicVector.Y4);
11639 const half = field5["createRational$long$long"](1, 2); 11640 const neg_half = field5["createRational$long$long"](-1, 2); 11641 this.WEIGHTS[0] = field5.basisVector(4, AlgebraicVector.X4); 11642 this.WEIGHTS[1] = this.WEIGHTS[0].plus(y); 11643 this.WEIGHTS[2] = field5.basisVector(4, AlgebraicVector.X4); 11644 this.WEIGHTS[2].setComponent(AlgebraicVector.X4, half); 11645 this.WEIGHTS[2].setComponent(AlgebraicVector.Y4, half); 11646 this.WEIGHTS[2].setComponent(AlgebraicVector.Z4, half); 11647 this.WEIGHTS[2].setComponent(AlgebraicVector.W4, neg_half); 11648 this.WEIGHTS[3] = field5.basisVector(4, AlgebraicVector.X4); 11649 this.WEIGHTS[3].setComponent(AlgebraicVector.X4, half); 11650 this.WEIGHTS[3].setComponent(AlgebraicVector.Y4, half); 11651 this.WEIGHTS[3].setComponent(AlgebraicVector.Z4, half); 11652 this.WEIGHTS[3].setComponent(AlgebraicVector.W4, half); 11653 } 11654 /** 11655 * 11656 * @return {number} 11657 */ 11658 getOrder() { 11659 return 24 * 8; 11660 } 11661 /** 11662 * 11663 * @param {AlgebraicVector} model 11664 * @param {number} element 11665 * @return {AlgebraicVector} 11666 */ 11667 groupAction(model, element) { 11668 const result = this.field.basisVector(4, AlgebraicVector.X4); 11669 const perm = element / 8 | 0; 11670 let signs = element % 8; 11671 let even = true; 11672 for (let c = 0; c < 4; c++) { 11673 { 11674 let source = model.getComponent((_D4Group.D4_PERMS_$LI$()[perm][c] + 1) % 4); 11675 if (c === 3 && !even) { 11676 source = source.negate(); 11677 } else if (signs % 2 !== 0) { 11678 even = !even; 11679 source = source.negate(); 11680 } 11681 result.setComponent((c + 1) % 4, source); 11682 signs = signs >> 1; 11683 } 11684 ; 11685 } 11686 return result; 11687 } 11688 /** 11689 * 11690 * @return {AlgebraicVector} 11691 */ 11692 getOrigin() { 11693 return this.field.origin(4); 11694 } 11695 /** 11696 * 11697 * @param {number} i 11698 * @return {AlgebraicVector} 11699 */ 11700 getWeight(i) { 11701 return this.WEIGHTS[i]; 11702 } 11703 /** 11704 * 11705 * @param {number} i 11706 * @return {AlgebraicVector} 11707 */ 11708 getSimpleRoot(i) { 11709 return this.ROOTS[i]; 11710 } 11711 /** 11712 * 11713 * @return {*} 11714 */ 11715 getField() { 11716 return this.field; 11717 } 11718 /** 11719 * 11720 * @param {AlgebraicVector} model 11721 * @param {number} element 11722 * @return {AlgebraicVector} 11723 */ 11724 chiralSubgroupAction(model, element) { 11725 const result = this.field.basisVector(4, AlgebraicVector.X4); 11726 const perm = element / 8 | 0; 11727 if (perm >= 12) return null; 11728 let signs = element % 8; 11729 let even = true; 11730 for (let c = 0; c < 4; c++) { 11731 { 11732 let source = model.getComponent((_D4Group.D4_PERMS_$LI$()[perm][c] + 1) % 4); 11733 if (c === 3 && !even) { 11734 source = source.negate(); 11735 } else if (signs % 2 !== 0) { 11736 even = !even; 11737 source = source.negate(); 11738 } 11739 result.setComponent((c + 1) % 4, source); 11740 signs = signs >> 1; 11741 } 11742 ; 11743 } 11744 return result; 11745 } 11746}; 11747D4Group["__class"] = "com.vzome.core.math.symmetry.D4Group"; 11748D4Group["__interfaces"] = ["com.vzome.core.math.symmetry.CoxeterGroup"]; 11749
11750// src/worker/legacy/from-java/com/vzome/core/math/symmetry/F4Group.ts 11751var F4Group = class extends B4Group { 11752 constructor(field5) { 11753 super(field5); 11754 this.ROOTS = [null, null, null, null]; 11755 this.WEIGHTS = [null, null, null, null]; 11756 if (this.A === void 0) { 11757 this.A = null; 11758 } 11759 const one = field5["createRational$long"](1); 11760 const two = field5["createRational$long"](2); 11761 const three = field5["createRational$long"](3); 11762 const four = field5["createRational$long"](4); 11763 const neg_one = field5["createRational$long"](-1); 11764 const neg_two = field5["createRational$long"](-2); 11765 this.ROOTS[0] = field5.basisVector(4, AlgebraicVector.X4); 11766 this.ROOTS[0].setComponent(AlgebraicVector.X4, two); 11767 this.ROOTS[0].setComponent(AlgebraicVector.Y4, neg_two); 11768 this.ROOTS[1] = field5.basisVector(4, AlgebraicVector.Y4); 11769 this.ROOTS[1].setComponent(AlgebraicVector.Y4, two); 11770 this.ROOTS[1].setComponent(AlgebraicVector.Z4, neg_two); 11771 this.ROOTS[2] = field5.basisVector(4, AlgebraicVector.Z4); 11772 this.ROOTS[2].setComponent(AlgebraicVector.Z4, two); 11773 this.ROOTS[3] = field5.basisVector(4, AlgebraicVector.W4); 11774 this.ROOTS[3].setComponent(AlgebraicVector.X4, neg_one); 11775 this.ROOTS[3].setComponent(AlgebraicVector.Y4, neg_one); 11776 this.ROOTS[3].setComponent(AlgebraicVector.Z4, neg_one); 11777 this.WEIGHTS[0] = field5.basisVector(4, AlgebraicVector.X4); 11778 this.WEIGHTS[0].setComponent(AlgebraicVector.X4, two); 11779 this.WEIGHTS[0].setComponent(AlgebraicVector.W4, two); 11780 this.WEIGHTS[1] = field5.basisVector(4, AlgebraicVector.Y4); 11781 this.WEIGHTS[1].setComponent(AlgebraicVector.X4, two); 11782 this.WEIGHTS[1].setComponent(AlgebraicVector.Y4, two); 11783 this.WEIGHTS[1].setComponent(AlgebraicVector.W4, four); 11784 this.WEIGHTS[2] = field5.basisVector(4, AlgebraicVector.X4); 11785 this.WEIGHTS[2].setComponent(AlgebraicVector.Y4, one); 11786 this.WEIGHTS[2].setComponent(AlgebraicVector.Z4, one); 11787 this.WEIGHTS[2].setComponent(AlgebraicVector.W4, three); 11788 this.WEIGHTS[3] = field5.basisVector(4, AlgebraicVector.W4); 11789 this.WEIGHTS[3].setComponent(AlgebraicVector.W4, two); 11790 if (field5.scale4dRoots()) { 11791 const scale = field5["createPower$int"](1); 11792 this.ROOTS[2] = this.ROOTS[2].scale(scale); 11793 this.WEIGHTS[2] = this.WEIGHTS[2].scale(scale); 11794 }
11795 const half = field5["createRational$long$long"](1, 2); 11796 const neg_half = field5["createRational$long$long"](-1, 2); 11797 const col1 = field5.basisVector(4, AlgebraicVector.X4); 11798 col1.setComponent(AlgebraicVector.X4, half); 11799 col1.setComponent(AlgebraicVector.Y4, half); 11800 col1.setComponent(AlgebraicVector.Z4, half); 11801 col1.setComponent(AlgebraicVector.W4, neg_half); 11802 const col2 = field5.basisVector(4, AlgebraicVector.X4); 11803 col2.setComponent(AlgebraicVector.X4, half); 11804 col2.setComponent(AlgebraicVector.Y4, half); 11805 col2.setComponent(AlgebraicVector.Z4, neg_half); 11806 col2.setComponent(AlgebraicVector.W4, half); 11807 const col3 = field5.basisVector(4, AlgebraicVector.X4); 11808 col3.setComponent(AlgebraicVector.X4, half); 11809 col3.setComponent(AlgebraicVector.Y4, neg_half); 11810 col3.setComponent(AlgebraicVector.Z4, half); 11811 col3.setComponent(AlgebraicVector.W4, half); 11812 const col4 = field5.basisVector(4, AlgebraicVector.X4); 11813 col4.setComponent(AlgebraicVector.X4, half); 11814 col4.setComponent(AlgebraicVector.Y4, neg_half); 11815 col4.setComponent(AlgebraicVector.Z4, neg_half); 11816 col4.setComponent(AlgebraicVector.W4, neg_half); 11817 this.A = new AlgebraicMatrix(col1, col2, col3, col4); 11818 } 11819 /** 11820 * 11821 * @return {number} 11822 */ 11823 getOrder() { 11824 return 3 * super.getOrder(); 11825 } 11826 /** 11827 * 11828 * @param {AlgebraicVector} model 11829 * @param {number} element 11830 * @return {AlgebraicVector} 11831 */ 11832 groupAction(model, element) { 11833 const b4Order = super.getOrder(); 11834 const aPower = element / b4Order | 0; 11835 const b4Element = element % b4Order; 11836 switch (aPower) { 11837 case 0: 11838 return super.groupAction(model, b4Element); 11839 case 1: 11840 return super.groupAction(this.A.timesColumn(model), b4Element); 11841 case 2: 11842 return super.groupAction(this.A.timesColumn(this.A.timesColumn(model)), b4Element); 11843 default: 11844 break; 11845 } 11846 return null; 11847 } 11848 /** 11849 * 11850 * @param {number} i 11851 * @return {AlgebraicVector} 11852 */ 11853 getWeight(i) { 11854 return this.WEIGHTS[i]; 11855 } 11856 /** 11857 * 11858 * @param {number} i 11859 * @return {AlgebraicVector} 11860 */ 11861 getSimpleRoot(i) { 11862 return this.ROOTS[i]; 11863 } 11864}; 11865F4Group["__class"] = "com.vzome.core.math.symmetry.F4Group"; 11866F4Group["__interfaces"] = ["com.vzome.core.math.symmetry.CoxeterGroup"]; 11867
11868// src/worker/legacy/from-java/com/vzome/core/math/symmetry/WythoffConstruction.ts 11869var WythoffConstruction = class { 11870 static constructPolytope(group, index, edgesToRender, edgeScales, renderingGroup, listener) { 11871 const neighbors = [null, null, null, null]; 11872 const chiral = false; 11873 if (chiral) { 11874 index = edgesToRender = 15; 11875 } 11876 const origin = group.getOrigin(); 11877 let model = origin; 11878 let bits = index; 11879 for (let i = 0; i < 4; i++) { 11880 { 11881 if (bits % 2 === 1) model = model.plus(group.getWeight(i).scale(edgeScales[i])); 11882 bits >>= 1; 11883 } 11884 ; 11885 } 11886 bits = index; 11887 for (let i = 0; i < 4; i++) { 11888 { 11889 if (bits % 2 === 1 && edgesToRender % 2 === 1) neighbors[i] = model.minus(group.getSimpleRoot(i).scale(edgeScales[i])); 11890 else neighbors[i] = origin; 11891 bits >>= 1; 11892 edgesToRender >>= 1; 11893 } 11894 ; 11895 } 11896 const order = renderingGroup.getOrder(); 11897 if (chiral) { 11898 for (let i = 0; i < order; i++) { 11899 { 11900 const vector = renderingGroup.chiralSubgroupAction(model, i); 11901 if (vector == null) continue; 11902 for (let e = 0; e < 4; e++) { 11903 for (let f = e + 1; f < 4; f++) { 11904 { 11905 const v1 = renderingGroup.chiralSubgroupAction(neighbors[e], i); 11906 const p1 = listener.addVertex(v1); 11907 const v2 = renderingGroup.chiralSubgroupAction(neighbors[f], i); 11908 const p2 = listener.addVertex(v2); 11909 listener.addEdge(p1, p2); 11910 } 11911 ; 11912 } 11913 ; 11914 } 11915 } 11916 ; 11917 } 11918 } else for (let i = 0; i < order; i++) { 11919 { 11920 const vector = renderingGroup.groupAction(model, i); 11921 const p = listener.addVertex(vector); 11922 for (let e = 0; e < 4; e++) { 11923 { 11924 if (neighbors[e].equals(origin)) continue; 11925 const other = renderingGroup.groupAction(neighbors[e], i); 11926 if (!other.equals(vector)) { 11927 const p2 = listener.addVertex(other); 11928 listener.addEdge(p, p2); 11929 } 11930 } 11931 ; 11932 } 11933 } 11934 ; 11935 } 11936 } 11937}; 11938WythoffConstruction["__class"] = "com.vzome.core.math.symmetry.WythoffConstruction"; 11939((WythoffConstruction2) => { 11940 class VefPrinter { 11941 constructor(field22) { 11942 this.vefVertices = new java.lang.StringBuffer(); 11943 this.vefEdges = new java.lang.StringBuffer(); 11944 this.numEdges = 0; 11945 this.numVertices = 0; 11946 if (this.field === void 0) { 11947 this.field = null; 11948 } 11949 this.field = field22; 11950 } 11951 /** 11952 * 11953 * @param {*} p1 11954 * @param {*} p2 11955 * @return {*} 11956 */ 11957 addEdge(p1, p2) { 11958 this.vefEdges.append(p1 + " " + p2 + "\n"); 11959 ++this.numEdges; 11960 return null; 11961 } 11962 /** 11963 * 11964 * @param {java.lang.Object[]} vertices 11965 * @return {*} 11966 */ 11967 addFace(vertices) { 11968 return null; 11969 } 11970 /** 11971 * 11972 * @param {AlgebraicVector} gv 11973 * @return {*} 11974 */ 11975 addVertex(gv) { 11976 gv.getVectorExpression$java_lang_StringBuffer$int(this.vefVertices, AlgebraicField.VEF_FORMAT); 11977 this.vefVertices.append("\n"); 11978 return this.numVertices++; 11979 } 11980 print(out) { 11981 out.println$java_lang_Object("vZome VEF 5"); 11982 out.println$java_lang_Object(this.numVertices); 11983 out.println$java_lang_Object(this.vefVertices.toString()); 11984 out.println$java_lang_Object(this.numEdges); 11985 out.println$java_lang_Object(this.vefEdges.toString()); 11986 out.close(); 11987 } 11988 } 11989 WythoffConstruction2.VefPrinter = VefPrinter; 11990 VefPrinter["__class"] = "com.vzome.core.math.symmetry.WythoffConstruction.VefPrinter"; 11991 VefPrinter["__interfaces"] = ["com.vzome.core.math.symmetry.WythoffConstruction.Listener"]; 11992})(WythoffConstruction || (WythoffConstruction = {})); 11993
11994// src/worker/legacy/from-java/com/vzome/core/tools/ModuleTool.ts 11995var ModuleTool = class _ModuleTool extends Tool { 11996 static { 11997 this.ID = "module"; 11998 } 11999 static { 12000 this.LABEL = "Create a module tool"; 12001 } 12002 static { 12003 this.TOOLTIP = "<p>Each tool duplicates the original module.<br></p>"; 12004 } 12005 constructor(id, tools) { 12006 super(id, tools); 12007 if (this.name === void 0) { 12008 this.name = null; 12009 } 12010 this.bookmarkedSelection = new java.util.ArrayList(); 12011 this.mSelection.copy(this.bookmarkedSelection); 12012 } 12013 /** 12014 * 12015 * @return {boolean} 12016 */ 12017 isSticky() { 12018 return true; 12019 } 12020 /** 12021 * 12022 * @param {ChangeManifestations} applyTool 12023 */ 12024 prepare(applyTool) { 12025 } 12026 /** 12027 * 12028 * @param {ChangeManifestations} applyTool 12029 */ 12030 complete(applyTool) { 12031 } 12032 /** 12033 * 12034 * @return {boolean} 12035 */ 12036 needsInput() { 12037 return true; 12038 } 12039 /** 12040 * 12041 * @param {Construction} c 12042 * @param {ChangeManifestations} applyTool 12043 */ 12044 performEdit(c, applyTool) { 12045 if (!(c != null && c instanceof Point)) return; 12046 const p = c; 12047 const loc = p.getLocation(); 12048 const duper = new Duplicator(applyTool, loc); 12049 for (let index = this.bookmarkedSelection.iterator(); index.hasNext(); ) { 12050 let man = index.next(); 12051 { 12052 duper.duplicateManifestation(man); 12053 } 12054 } 12055 applyTool.redo(); 12056 } 12057 /** 12058 * 12059 * @param {*} man 12060 * @param {ChangeManifestations} applyTool 12061 */ 12062 performSelect(man, applyTool) { 12063 } 12064 /** 12065 * 12066 */ 12067 redo() { 12068 } 12069 /** 12070 * 12071 */ 12072 undo() { 12073 } 12074 /** 12075 * 12076 * @return {string} 12077 */ 12078 getXmlElementName() { 12079 return "ModuleTool"; 12080 } 12081 /** 12082 * 12083 * @param {*} element 12084 */ 12085 getXmlAttributes(element) { 12086 element.setAttribute("name", this.name); 12087 } 12088 /** 12089 * 12090 * @param {*} element 12091 * @param {XmlSaveFormat} format 12092 */ 12093 setXmlAttributes(element, format) { 12094 this.name = element.getAttribute("name"); 12095 } 12096 /** 12097 * 12098 * @return {string} 12099 */ 12100 getCategory() { 12101 return _ModuleTool.ID; 12102 } 12103 /** 12104 * 12105 * @param {boolean} prepareTool 12106 * @return {string} 12107 */ 12108 checkSelection(prepareTool) { 12109 return null; 12110 } 12111}; 12112ModuleTool["__class"] = "com.vzome.core.tools.ModuleTool"; 12113ModuleTool["__interfaces"] = ["com.vzome.api.Tool"]; 12114
12115// src/worker/legacy/from-java/com/vzome/core/tools/ModuleToolFactory.ts 12116var ModuleToolFactory = class extends AbstractToolFactory { 12117 constructor(tools) { 12118 super(tools, null, ModuleTool.ID, ModuleTool.LABEL, ModuleTool.TOOLTIP); 12119 } 12120 /** 12121 * 12122 * @param {number} total 12123 * @param {number} balls 12124 * @param {number} struts 12125 * @param {number} panels 12126 * @return {boolean} 12127 */ 12128 countsAreValid(total, balls, struts, panels) { 12129 return total > 0; 12130 } 12131 /** 12132 * 12133 * @param {string} id 12134 * @return {Tool} 12135 */ 12136 createToolInternal(id) { 12137 return new ModuleTool(id, this.getToolsModel()); 12138 } 12139 /** 12140 * 12141 * @param {*} selection 12142 * @return {boolean} 12143 */ 12144 bindParameters(selection) { 12145 return true; 12146 } 12147}; 12148ModuleToolFactory["__class"] = "com.vzome.core.tools.ModuleToolFactory"; 12149ModuleToolFactory["__interfaces"] = ["com.vzome.core.editor.SelectionSummary.Listener", "com.vzome.api.Tool.Factory"]; 12150
12151// src/worker/legacy/from-java/com/vzome/core/algebra/Bivector3d.ts 12152var Bivector3d = class { 12153 constructor(a, b, c) { 12154 if (this.a === void 0) { 12155 this.a = null; 12156 } 12157 if (this.b === void 0) { 12158 this.b = null; 12159 } 12160 if (this.c === void 0) { 12161 this.c = null; 12162 } 12163 this.a = a; 12164 this.b = b; 12165 this.c = c; 12166 } 12167 /** 12168 * 12169 * @return {number} 12170 */ 12171 hashCode() { 12172 const prime = 31; 12173 let result = 1; 12174 result = prime * result + (this.a == null ? 0 : ( 12175 /* hashCode */ 12176 ((o) => { 12177 if (o.hashCode) { 12178 return o.hashCode(); 12179 } else { 12180 return o.toString().split("").reduce((prevHash, currVal) => (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0, 0); 12181 } 12182 })(this.a) 12183 )); 12184 result = prime * result + (this.b == null ? 0 : ( 12185 /* hashCode */ 12186 ((o) => { 12187 if (o.hashCode) { 12188 return o.hashCode(); 12189 } else { 12190 return o.toString().split("").reduce((prevHash, currVal) => (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0, 0); 12191 } 12192 })(this.b) 12193 )); 12194 result = prime * result + (this.c == null ? 0 : ( 12195 /* hashCode */ 12196 ((o) => { 12197 if (o.hashCode) { 12198 return o.hashCode(); 12199 } else { 12200 return o.toString().split("").reduce((prevHash, currVal) => (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0, 0); 12201 } 12202 })(this.c) 12203 )); 12204 return result; 12205 } 12206 /** 12207 * 12208 * @param {*} obj 12209 * @return {boolean} 12210 */ 12211 equals(obj) { 12212 if (this === obj) { 12213 return true; 12214 } 12215 if (obj == null) { 12216 return false; 12217 } 12218 if (this.constructor !== obj.constructor) { 12219 return false; 12220 } 12221 const other = obj; 12222 if (this.a == null) { 12223 if (other.a != null) { 12224 return false; 12225 } 12226 } else if (!/* equals */ 12227 ((o1, o2) => { 12228 if (o1 && o1.equals) { 12229 return o1.equals(o2); 12230 } else { 12231 return o1 === o2; 12232 } 12233 })(this.a, other.a)) { 12234 return false; 12235 } 12236 if (this.b == null) { 12237 if (other.b != null) { 12238 return false; 12239 } 12240 } else if (!/* equals */ 12241 ((o1, o2) => { 12242 if (o1 && o1.equals) { 12243 return o1.equals(o2); 12244 } else { 12245 return o1 === o2; 12246 } 12247 })(this.b, other.b)) { 12248 return false; 12249 } 12250 if (this.c == null) { 12251 if (other.c != null) { 12252 return false; 12253 } 12254 } else if (!/* equals */ 12255 ((o1, o2) => { 12256 if (o1 && o1.equals) { 12257 return o1.equals(o2); 12258 } else { 12259 return o1 === o2; 12260 } 12261 })(this.c, other.c)) { 12262 return false; 12263 } 12264 return true; 12265 } 12266 /** 12267 * The pseudoscalar is implied in the result. 12268 * @param {Vector3d} v 12269 * @return 12270 * @return {*} 12271 */ 12272 outer(v) { 12273 const a = this.a["times$com_vzome_core_algebra_AlgebraicNumber"](v.c); 12274 const b = this.b["times$com_vzome_core_algebra_AlgebraicNumber"](v.a); 12275 const c = this.c["times$com_vzome_core_algebra_AlgebraicNumber"](v.b); 12276 return a["plus$com_vzome_core_algebra_AlgebraicNumber"](b)["plus$com_vzome_core_algebra_AlgebraicNumber"](c); 12277 } 12278}; 12279Bivector3d["__class"] = "com.vzome.core.algebra.Bivector3d"; 12280
12281// src/worker/legacy/from-java/com/vzome/core/algebra/Vector3d.ts 12282var Vector3d = class { 12283 constructor(a, b, c) { 12284 if ((a != null && (a.constructor != null && a.constructor["__interfaces"] != null && a.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || a === null) && (b != null && (b.constructor != null && b.constructor["__interfaces"] != null && b.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || b === null) && (c != null && (c.constructor != null && c.constructor["__interfaces"] != null && c.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || c === null)) { 12285 let __args = arguments; 12286 if (this.a === void 0) { 12287 this.a = null; 12288 } 12289 if (this.b === void 0) { 12290 this.b = null; 12291 } 12292 if (this.c === void 0) { 12293 this.c = null; 12294 } 12295 this.a = a; 12296 this.b = b; 12297 this.c = c; 12298 } else if ((a != null && a instanceof AlgebraicVector || a === null) && b === void 0 && c === void 0) { 12299 let __args = arguments; 12300 let v = __args[0]; 12301 if (this.a === void 0) { 12302 this.a = null; 12303 } 12304 if (this.b === void 0) { 12305 this.b = null; 12306 } 12307 if (this.c === void 0) { 12308 this.c = null; 12309 } 12310 this.a = v.getComponent(0); 12311 this.b = v.getComponent(1); 12312 this.c = v.getComponent(2); 12313 } else throw new Error("invalid overload"); 12314 } 12315 outer(that) { 12316 const a = this.a["times$com_vzome_core_algebra_AlgebraicNumber"](that.b)["minus$com_vzome_core_algebra_AlgebraicNumber"](this.b["times$com_vzome_core_algebra_AlgebraicNumber"](that.a)); 12317 const b = this.b["times$com_vzome_core_algebra_AlgebraicNumber"](that.c)["minus$com_vzome_core_algebra_AlgebraicNumber"](this.c["times$com_vzome_core_algebra_AlgebraicNumber"](that.b)); 12318 const c = this.c["times$com_vzome_core_algebra_AlgebraicNumber"](that.a)["minus$com_vzome_core_algebra_AlgebraicNumber"](this.a["times$com_vzome_core_algebra_AlgebraicNumber"](that.c)); 12319 return new Bivector3d(a, b, c); 12320 } 12321}; 12322Vector3d["__class"] = "com.vzome.core.algebra.Vector3d"; 12323
12324// src/worker/legacy/from-java/com/vzome/core/tools/PlaneSelectionTool.ts 12325var PlaneSelectionTool = class extends Tool { 12326 constructor(id, tools) { 12327 super(id, tools); 12328 if (this.plane === void 0) { 12329 this.plane = null; 12330 } 12331 if (this.anchor === void 0) { 12332 this.anchor = null; 12333 } 12334 this.halfSpace = true; 12335 this.boundaryOpen = false; 12336 this.above = true; 12337 this.includeBalls = true; 12338 this.includeStruts = true; 12339 this.includePanels = true; 12340 this.includePartials = false; 12341 } 12342 /** 12343 * 12344 * @return {boolean} 12345 */ 12346 isSticky() { 12347 return true; 12348 } 12349 /** 12350 * 12351 */ 12352 perform() { 12353 let p1 = null; 12354 let p2 = null; 12355 let p3 = null; 12356 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 12357 let man = index.next(); 12358 { 12359 this.unselect$com_vzome_core_model_Manifestation(man); 12360 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) { 12361 if (p1 == null) { 12362 p1 = man.getLocation(); 12363 continue; 12364 } 12365 if (p2 == null) { 12366 p2 = man.getLocation(); 12367 continue; 12368 } 12369 if (p3 == null) { 12370 p3 = man.getLocation(); 12371 continue; 12372 } else { 12373 throw new Command.Failure("half-space selection tool requires exactly three balls"); 12374 } 12375 } 12376 } 12377 } 12378 if (p3 == null) throw new Command.Failure("half-space selection tool requires exactly three balls"); 12379 const v1 = new Vector3d(p2.minus(p1)); 12380 const v2 = new Vector3d(p3.minus(p1)); 12381 this.plane = v1.outer(v2); 12382 this.anchor = p1; 12383 super.perform(); 12384 } 12385 /** 12386 * 12387 * @param {ChangeManifestations} applyTool 12388 */ 12389 prepare(applyTool) { 12390 } 12391 /** 12392 * 12393 * @param {ChangeManifestations} applyTool 12394 */ 12395 complete(applyTool) { 12396 } 12397 /** 12398 * 12399 * @return {boolean} 12400 */ 12401 needsInput() { 12402 return false; 12403 } 12404 /** 12405 * 12406 * @param {Construction} c 12407 * @param {ChangeManifestations} applyTool 12408 */ 12409 performEdit(c, applyTool) { 12410 } 12411 /** 12412 * 12413 * @param {*} man 12414 * @param {ChangeManifestations} applyTool 12415 */ 12416 performSelect(man, applyTool) { 12417 if (man.isHidden()) return; 12418 if (!man.isRendered()) return; 12419 if (this.includePanels && (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0))) return; 12420 if (this.includeBalls && (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0))) { 12421 const c = man; 12422 const orientation = this.orient(c.getLocation()); 12423 if (!this.boundaryOpen && orientation === 0) applyTool.select$com_vzome_core_model_Manifestation(man); 12424 else if (this.halfSpace && this.above && orientation > 0) applyTool.select$com_vzome_core_model_Manifestation(man); 12425 else if (this.halfSpace && !this.above && orientation < 0) applyTool.select$com_vzome_core_model_Manifestation(man); 12426 } else if (this.includeStruts && (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0))) { 12427 const o1 = this.orient(man.getLocation()); 12428 const o2 = this.orient(man.getEnd()); 12429 if (this.includePartials) { 12430 if (!this.boundaryOpen && (o1 === 0 || o2 === 0)) applyTool.select$com_vzome_core_model_Manifestation(man); 12431 else if (this.halfSpace) { 12432 if (this.above && (o1 > 0 || o2 > 0)) applyTool.select$com_vzome_core_model_Manifestation(man); 12433 else if (!this.above && (o1 < 0 || o2 < 0)) applyTool.select$com_vzome_core_model_Manifestation(man); 12434 } 12435 } else { 12436 if (!this.halfSpace && o1 === 0 && o2 === 0) applyTool.select$com_vzome_core_model_Manifestation(man); 12437 else if (this.halfSpace) { 12438 if (this.boundaryOpen) { 12439 if (this.above && (o1 > 0 && o2 > 0)) applyTool.select$com_vzome_core_model_Manifestation(man); 12440 else if (!this.above && (o1 < 0 && o2 < 0)) applyTool.select$com_vzome_core_model_Manifestation(man); 12441 } else { 12442 if (this.above && (o1 >= 0 && o2 >= 0)) applyTool.select$com_vzome_core_model_Manifestation(man);
12443 else if (!this.above && (o1 <= 0 && o2 <= 0)) applyTool.select$com_vzome_core_model_Manifestation(man); 12444 } 12445 } 12446 } 12447 } 12448 applyTool.redo(); 12449 } 12450 /*private*/ 12451 orient(point) { 12452 const diff = point.minus(this.anchor); 12453 const v = new Vector3d(diff); 12454 const volume = this.plane.outer(v); 12455 if (volume.isZero()) return 0; 12456 else { 12457 const volD = volume.evaluate(); 12458 return volD > 0 ? 1 : -1; 12459 } 12460 } 12461 /** 12462 * 12463 */ 12464 redo() { 12465 } 12466 /** 12467 * 12468 */ 12469 undo() { 12470 } 12471 /** 12472 * 12473 * @return {string} 12474 */ 12475 getXmlElementName() { 12476 return "PlaneSelectionTool"; 12477 } 12478 /** 12479 * 12480 * @param {*} element 12481 */ 12482 getXmlAttributes(element) { 12483 element.setAttribute("name", this.getId()); 12484 } 12485 /** 12486 * 12487 * @param {*} element 12488 * @param {XmlSaveFormat} format 12489 */ 12490 setXmlAttributes(element, format) { 12491 super.setXmlAttributes(element, format); 12492 this.includeBalls = !("false" === element.getAttribute("balls")); 12493 this.includeStruts = !("false" === element.getAttribute("struts")); 12494 this.includePanels = "true" === element.getAttribute("panels"); 12495 this.includePartials = "any" === element.getAttribute("vertices"); 12496 this.boundaryOpen = "true" === element.getAttribute("open"); 12497 const halfSpace = element.getAttribute("halfSpace"); 12498 if ("above" === halfSpace) { 12499 this.halfSpace = true; 12500 this.above = true; 12501 } else if ("below" === halfSpace) { 12502 this.halfSpace = true; 12503 this.above = false; 12504 } else { 12505 this.halfSpace = false; 12506 this.boundaryOpen = false; 12507 } 12508 } 12509 /** 12510 * 12511 * @return {string} 12512 */ 12513 getCategory() { 12514 return "plane"; 12515 } 12516 getDefaultName() { 12517 return "plane"; 12518 } 12519 /** 12520 * 12521 * @param {boolean} prepareTool 12522 * @return {string} 12523 */ 12524 checkSelection(prepareTool) { 12525 return null; 12526 } 12527}; 12528PlaneSelectionTool["__class"] = "com.vzome.core.tools.PlaneSelectionTool"; 12529PlaneSelectionTool["__interfaces"] = ["com.vzome.api.Tool"]; 12530
12531// src/worker/legacy/from-java/com/vzome/core/tools/PlaneSelectionToolFactory.ts 12532var PlaneSelectionToolFactory = class extends AbstractToolFactory { 12533 constructor(tools) { 12534 super(tools, null, "plane", "", ""); 12535 } 12536 /** 12537 * 12538 * @param {number} total 12539 * @param {number} balls 12540 * @param {number} struts 12541 * @param {number} panels 12542 * @return {boolean} 12543 */ 12544 countsAreValid(total, balls, struts, panels) { 12545 return total === 3 && balls === 3; 12546 } 12547 /** 12548 * 12549 * @param {string} id 12550 * @return {Tool} 12551 */ 12552 createToolInternal(id) { 12553 return new PlaneSelectionTool(id, this.getToolsModel()); 12554 } 12555 /** 12556 * 12557 * @param {*} selection 12558 * @return {boolean} 12559 */ 12560 bindParameters(selection) { 12561 return true; 12562 } 12563}; 12564PlaneSelectionToolFactory["__class"] = "com.vzome.core.tools.PlaneSelectionToolFactory"; 12565PlaneSelectionToolFactory["__interfaces"] = ["com.vzome.core.editor.SelectionSummary.Listener", "com.vzome.api.Tool.Factory"]; 12566
12567// src/worker/legacy/from-java/com/vzome/core/kinds/DefaultFieldApplication.ts 12568var DefaultFieldApplication = class { 12569 constructor(field5) { 12570 if (this.field === void 0) { 12571 this.field = null; 12572 } 12573 if (this.octahedralPerspective === void 0) { 12574 this.octahedralPerspective = null; 12575 } 12576 this.groups4d = new java.util.HashMap(); 12577 this.pointsymm = new CommandCentralSymmetry(); 12578 this.mirrorsymm = new CommandMirrorSymmetry(); 12579 this.translate = new CommandTranslate(); 12580 this.centroid = new CommandCentroid(); 12581 this.hideball = new CommandHide(); 12582 this.hide = new CommandHide(); 12583 this.panel = new CommandPolygon(); 12584 this.midpoint = new CommandMidpoint(); 12585 this.field = field5; 12586 } 12587 /** 12588 * 12589 * @return {string} 12590 */ 12591 getName() { 12592 return this.field.getName(); 12593 } 12594 /** 12595 * 12596 * @return {string} 12597 */ 12598 getLabel() { 12599 return null; 12600 } 12601 /** 12602 * 12603 * @return {*} 12604 */ 12605 getField() { 12606 return this.field; 12607 } 12608 /** 12609 * 12610 * @return {*} 12611 */ 12612 getDefaultSymmetryPerspective() { 12613 return this.getSymmetryPerspective("octahedral"); 12614 } 12615 /** 12616 * 12617 * @return {*} 12618 */ 12619 getSymmetryPerspectives() { 12620 return java.util.Arrays.asList(this.getDefaultSymmetryPerspective()); 12621 } 12622 /** 12623 * 12624 * @param {string} symmName 12625 * @return {*} 12626 */ 12627 getSymmetryPerspective(symmName) { 12628 switch (symmName) { 12629 case "octahedral": 12630 if (this.octahedralPerspective == null) { 12631 this.octahedralPerspective = new OctahedralSymmetryPerspective(this.field); 12632 } 12633 return this.octahedralPerspective; 12634 default: 12635 return null; 12636 } 12637 } 12638 /** 12639 * 12640 * @param {string} name 12641 * @return {QuaternionicSymmetry} 12642 */ 12643 getQuaternionSymmetry(name) { 12644 return null; 12645 } 12646 /** 12647 * 12648 * @param {*} toolFactories 12649 * @param {ToolsModel} tools 12650 */ 12651 registerToolFactories(toolFactories, tools) { 12652 toolFactories.put("SymmetryTool", new OctahedralToolFactory(tools, null)); 12653 toolFactories.put("RotationTool", new RotationToolFactory(tools, null)); 12654 toolFactories.put("ScalingTool", new ScalingToolFactory(tools, null)); 12655 toolFactories.put("InversionTool", new InversionToolFactory(tools)); 12656 toolFactories.put("LineReflectionTool", new LineReflectionToolFactory(tools)); 12657 toolFactories.put("MirrorTool", new MirrorToolFactory(tools)); 12658 toolFactories.put("TranslationTool", new TranslationToolFactory(tools)); 12659 toolFactories.put("ProjectionTool", new ProjectionToolFactory(tools)); 12660 toolFactories.put("PerspectiveProjectionTool", new PerspectiveProjectionToolFactory(tools)); 12661 toolFactories.put("BookmarkTool", new BookmarkToolFactory(tools)); 12662 toolFactories.put("LinearTransformTool", new LinearMapToolFactory(tools, null, false)); 12663 toolFactories.put("LinearMapTool", new LinearMapToolFactory(tools, null, true)); 12664 toolFactories.put("ModuleTool", new ModuleToolFactory(tools)); 12665 toolFactories.put("PlaneSelectionTool", new PlaneSelectionToolFactory(tools)); 12666 } 12667 /** 12668 * 12669 * @param {string} groupName 12670 * @param {number} index 12671 * @param {number} edgesToRender 12672 * @param {AlgebraicNumber[]} edgeScales 12673 * @param {*} listener 12674 */ 12675 constructPolytope(groupName, index, edgesToRender, edgeScales, listener) { 12676 let group = this.groups4d.get(groupName); 12677 if (group == null) { 12678 switch (groupName) { 12679 case "A4": 12680 group = new A4Group(this.field); 12681 break; 12682 case "D4": 12683 group = new D4Group(this.field); 12684 break; 12685 case "F4": 12686 group = new F4Group(this.field); 12687 break; 12688 default: 12689 group = new B4Group(this.field); 12690 break; 12691 } 12692 this.groups4d.put(groupName, group); 12693 } 12694 WythoffConstruction.constructPolytope(group, index, edgesToRender, edgeScales, group, listener); 12695 } 12696 /** 12697 * 12698 * @param {string} action 12699 * @return {*} 12700 */ 12701 getLegacyCommand(action) { 12702 switch (action) { 12703 case "pointsymm": 12704 return this.pointsymm; 12705 case "mirrorsymm": 12706 return this.mirrorsymm; 12707 case "translate": 12708 return this.translate; 12709 case "centroid": 12710 return this.centroid; 12711 case "hideball": 12712 return this.hideball; 12713 case "hide": 12714 return this.hide; 12715 case "panel": 12716 return this.panel; 12717 case "midpoint": 12718 return this.midpoint; 12719 case "octasymm": 12720 return this.getDefaultSymmetryPerspective().getLegacyCommand(action); 12721 default: 12722 return null; 12723 } 12724 } 12725}; 12726DefaultFieldApplication["__class"] = "com.vzome.core.kinds.DefaultFieldApplication"; 12727DefaultFieldApplication["__interfaces"] = ["com.vzome.core.math.symmetry.Symmetries4D", "com.vzome.core.editor.FieldApplication"]; 12728
12729// src/worker/legacy/from-java/com/vzome/core/algebra/EdPeggField.ts 12730var EdPeggField = class _EdPeggField extends ParameterizedField { 12731 static { 12732 this.FIELD_NAME = "edPegg"; 12733 } 12734 /** 12735 * 12736 * @return {double[]} the coefficients of an EdPeggField. 12737 * This can be used to determine when two fields have compatible coefficients 12738 * without having to generate an instance of the class. 12739 */ 12740 static getFieldCoefficients() { 12741 const a = 1.76929235423863; 12742 return [1, a, a * a]; 12743 } 12744 /** 12745 * 12746 * @return {number} 12747 */ 12748 getNumMultipliers() { 12749 return 1; 12750 } 12751 /** 12752 * 12753 * @return {double[]} 12754 */ 12755 getCoefficients() { 12756 return _EdPeggField.getFieldCoefficients(); 12757 } 12758 constructor(factory) { 12759 super(_EdPeggField.FIELD_NAME, 3, factory); 12760 this.initialize(); 12761 } 12762 /** 12763 * 12764 */ 12765 initializeCoefficients() { 12766 const temp = this.getCoefficients(); 12767 let i = 0; 12768 for (let index = 0; index < temp.length; index++) { 12769 let coefficient = temp[index]; 12770 { 12771 this.coefficients[i++] = coefficient; 12772 } 12773 } 12774 } 12775 /** 12776 * 12777 */ 12778 initializeMultiplicationTensor() { 12779 const mt = [[[1, 0, 0], [0, 0, 2], [0, 2, 0]], [[0, 1, 0], [1, 0, 2], [0, 2, 2]], [[0, 0, 1], [0, 1, 0], [1, 0, 2]]]; 12780 this.multiplicationTensor = mt; 12781 } 12782 /** 12783 * 12784 */ 12785 initializeLabels() { 12786 this.irrationalLabels[1] = ["\u03B5", "epsilon"]; 12787 this.irrationalLabels[2] = ["\u03B5\xB2", "epsilon^2"]; 12788 } 12789}; 12790EdPeggField["__class"] = "com.vzome.core.algebra.EdPeggField"; 12791EdPeggField["__interfaces"] = ["com.vzome.core.algebra.AlgebraicField"]; 12792
12793// src/worker/legacy/from-java/com/vzome/core/editor/Branch.ts 12794var Branch = class _Branch extends UndoableEdit { 12795 constructor(context) { 12796 super(); 12797 if (this.context === void 0) { 12798 this.context = null; 12799 } 12800 this.edits = new java.util.ArrayList(); 12801 if (this.format === void 0) { 12802 this.format = null; 12803 } 12804 if (this.xml === void 0) { 12805 this.xml = null; 12806 } 12807 this.context = context; 12808 } 12809 /** 12810 * 12811 * @return {boolean} 12812 */ 12813 isNoOp() { 12814 return false; 12815 } 12816 addEdit(edit) { 12817 this.edits.add(edit); 12818 } 12819 /** 12820 * 12821 * @return {boolean} 12822 */ 12823 isDestructive() { 12824 return false; 12825 } 12826 /** 12827 * 12828 */ 12829 perform() { 12830 const toUndo = new java.util.Stack(); 12831 const nodes = this.xml.getChildNodes(); 12832 for (let i = 0; i < nodes.getLength(); i++) { 12833 { 12834 const kid = nodes.item(i); 12835 if (kid != null && (kid.constructor != null && kid.constructor["__interfaces"] != null && kid.constructor["__interfaces"].indexOf("org.w3c.dom.Element") >= 0)) { 12836 const editElem = kid; 12837 const edit = this.context.createEdit(editElem); 12838 this.addEdit(edit); 12839 edit.loadAndPerform(editElem, this.format, new _Branch.Branch$0(this, toUndo)); 12840 } 12841 } 12842 ; 12843 } 12844 while (!toUndo.isEmpty()) { 12845 { 12846 const edit = toUndo.pop(); 12847 edit.undo(); 12848 } 12849 } 12850 ; 12851 } 12852 /** 12853 * 12854 */ 12855 undo() { 12856 } 12857 /** 12858 * 12859 */ 12860 redo() { 12861 } 12862 /** 12863 * 12864 * @param {*} props 12865 */ 12866 configure(props) { 12867 } 12868 /** 12869 * 12870 * @return {boolean} 12871 */ 12872 isVisible() { 12873 return false; 12874 } 12875 /** 12876 * 12877 * @param {*} doc 12878 * @return {*} 12879 */ 12880 getXml(doc) { 12881 const branch = doc.createElement("Branch"); 12882 for (let index = this.edits.iterator(); index.hasNext(); ) { 12883 let edit = index.next(); 12884 { 12885 branch.appendChild(edit.getXml(doc)); 12886 } 12887 } 12888 return branch; 12889 } 12890 /** 12891 * 12892 * @param {*} doc 12893 * @return {*} 12894 */ 12895 getDetailXml(doc) { 12896 const branch = doc.createElement("Branch"); 12897 for (let index = this.edits.iterator(); index.hasNext(); ) { 12898 let edit = index.next(); 12899 { 12900 branch.appendChild(edit.getDetailXml(doc)); 12901 } 12902 } 12903 return branch; 12904 } 12905 /** 12906 * 12907 * @param {*} xml 12908 * @param {XmlSaveFormat} format 12909 * @param {*} context 12910 */ 12911 loadAndPerform(xml, format, context) { 12912 this.xml = xml; 12913 this.format = format; 12914 context.performAndRecord(this); 12915 } 12916 /** 12917 * 12918 * @return {boolean} 12919 */ 12920 isSticky() { 12921 return true; 12922 } 12923}; 12924Branch["__class"] = "com.vzome.core.editor.Branch"; 12925((Branch2) => { 12926 class Branch$0 { 12927 constructor(__parent, toUndo) { 12928 this.toUndo = toUndo; 12929 this.__parent = __parent; 12930 } 12931 /** 12932 * 12933 * @param {UndoableEdit} edit 12934 */ 12935 performAndRecord(edit) { 12936 try { 12937 edit.perform(); 12938 } catch (e) { 12939 throw new java.lang.RuntimeException(e); 12940 } 12941 this.toUndo.push(edit); 12942 } 12943 /** 12944 * 12945 * @param {*} xml 12946 * @return {UndoableEdit} 12947 */ 12948 createEdit(xml) { 12949 return this.__parent.context.createEdit(xml); 12950 } 12951 /** 12952 * 12953 * @param {string} cmdName 12954 * @return {*} 12955 */ 12956 createLegacyCommand(cmdName) { 12957 return this.__parent.context.createLegacyCommand(cmdName); 12958 } 12959 /** 12960 * 12961 * @param {string} action 12962 * @param {*} props 12963 * @return {boolean} 12964 */ 12965 doEdit(action, props) { 12966 return false; 12967 } 12968 } 12969 Branch2.Branch$0 = Branch$0; 12970 Branch$0["__interfaces"] = ["com.vzome.core.editor.api.Context"]; 12971})(Branch || (Branch = {})); 12972
12973// src/worker/legacy/from-java/com/vzome/xml/LocationData.ts 12974var LocationData = class { 12975 static { 12976 this.LOCATION_DATA_KEY = "locationDataKey"; 12977 } 12978 constructor(systemId, startLine, startColumn, endLine, endColumn) { 12979 if (this.systemId === void 0) { 12980 this.systemId = null; 12981 } 12982 if (this.startLine === void 0) { 12983 this.startLine = 0; 12984 } 12985 if (this.startColumn === void 0) { 12986 this.startColumn = 0; 12987 } 12988 if (this.endLine === void 0) { 12989 this.endLine = 0; 12990 } 12991 if (this.endColumn === void 0) { 12992 this.endColumn = 0; 12993 } 12994 this.systemId = systemId; 12995 this.startLine = startLine; 12996 this.startColumn = startColumn; 12997 this.endLine = endLine; 12998 this.endColumn = endColumn; 12999 } 13000 getSystemId() { 13001 return this.systemId; 13002 } 13003 getStartLine() { 13004 return this.startLine; 13005 } 13006 getStartColumn() { 13007 return this.startColumn; 13008 } 13009 getEndLine() { 13010 return this.endLine; 13011 } 13012 getEndColumn() { 13013 return this.endColumn; 13014 } 13015 /** 13016 * 13017 * @return {string} 13018 */ 13019 toString() { 13020 return this.getSystemId() + "[line " + this.startLine + ":" + this.startColumn + " to line " + this.endLine + ":" + this.endColumn + "]"; 13021 } 13022}; 13023LocationData["__class"] = "com.vzome.xml.LocationData"; 13024
13025// src/worker/legacy/from-java/com/vzome/core/editor/EditHistory.ts 13026var EditHistory = class _EditHistory { 13027 static logger_$LI$() { 13028 if (_EditHistory.logger == null) { 13029 _EditHistory.logger = java.util.logging.Logger.getLogger("com.vzome.core.EditHistory"); 13030 } 13031 return _EditHistory.logger; 13032 } 13033 static breakpointLogger_$LI$() { 13034 if (_EditHistory.breakpointLogger == null) { 13035 _EditHistory.breakpointLogger = java.util.logging.Logger.getLogger("com.vzome.core.editor.Breakpoint"); 13036 } 13037 return _EditHistory.breakpointLogger; 13038 } 13039 setListener(listener) { 13040 this.listener = listener; 13041 } 13042 setSerializer(serializer) { 13043 this.serializer = serializer; 13044 } 13045 addEdit(edit, context) { 13046 if (!edit.isDestructive()) { 13047 this.mEdits.add(this.mEditNumber, edit); 13048 ++this.mEditNumber; 13049 return; 13050 } 13051 if (this.mEditNumber < this.mEdits.size()) { 13052 let makeBranch = false; 13053 let lastStickyEdit = this.mEditNumber - 1; 13054 let deadEditIndex = this.mEditNumber; 13055 for (const deadEdits = this.mEdits.listIterator(this.mEditNumber); deadEdits.hasNext(); ) { 13056 { 13057 const dead = deadEdits.next(); 13058 if (dead.isSticky()) { 13059 makeBranch = true; 13060 lastStickyEdit = deadEditIndex; 13061 } 13062 ++deadEditIndex; 13063 } 13064 ; 13065 } 13066 const branch = makeBranch ? new Branch(context) : null; 13067 deadEditIndex = this.mEditNumber; 13068 for (const deadEdits = this.mEdits.listIterator(this.mEditNumber); deadEdits.hasNext(); ) { 13069 { 13070 const removed = deadEdits.next(); 13071 deadEdits.remove(); 13072 if (deadEditIndex <= lastStickyEdit) { 13073 branch.addEdit(removed); 13074 } 13075 ++deadEditIndex; 13076 } 13077 ; 13078 } 13079 if (makeBranch) { 13080 this.mEdits.add(branch); 13081 ++this.mEditNumber; 13082 } 13083 } 13084 this.mEdits.add(edit); 13085 ++this.mEditNumber; 13086 } 13087 undoAll() { 13088 let last = null; 13089 do { 13090 { 13091 const edit = this.undo$(); 13092 if (edit == null) break; 13093 last = edit; 13094 } 13095 } while (true); 13096 this.listener.publishChanges(); 13097 return last; 13098 } 13099 undoToManifestation(man) { 13100 let edit = null; 13101 do { 13102 { 13103 edit = this.undo$(); 13104 if (edit == null) break; 13105 if (edit != null && edit instanceof ChangeManifestations && edit.showsManifestation(man)) { 13106 break; 13107 } 13108 } 13109 } while (true); 13110 this.listener.publishChanges(); 13111 return edit; 13112 } 13113 redoToBreakpoint() { 13114 let edit = this.redo$(); 13115 if (edit == null) return edit; 13116 do { 13117 { 13118 if (this.atBreakpoint()) break; 13119 edit = this.redo$(); 13120 if (edit == null) break; 13121 } 13122 } while (true); 13123 this.listener.publishChanges(); 13124 return edit; 13125 } 13126 atBreakpoint() { 13127 if (this.mEditNumber === this.mEdits.size()) return false; 13128 const edit = this.mEdits.get(this.mEditNumber); 13129 return edit.hasBreakpoint(); 13130 } 13131 setBreakpoints(lineNumbers) { 13132 java.util.Arrays.sort(lineNumbers); 13133 let index = 0; 13134 let lineNumber = lineNumbers[index]; 13135 for (let index1 = this.mEdits.iterator(); index1.hasNext(); ) { 13136 let edit = index1.next(); 13137 { 13138 const startLine = edit.getLineNumber(); 13139 if (startLine !== 0 && startLine >= lineNumber) { 13140 edit.setBreakpoint(true); 13141 ++index; 13142 if (index < lineNumbers.length) lineNumber = lineNumbers[index]; 13143 else lineNumber = javaemul.internal.IntegerHelper.MAX_VALUE; 13144 } else { 13145 edit.setBreakpoint(false); 13146 } 13147 } 13148 } 13149 } 13150 getBreakpoints() { 13151 const result = new java.util.ArrayList(); 13152 for (let index = this.mEdits.iterator(); index.hasNext(); ) { 13153 let edit = index.next(); 13154 { 13155 if (edit.hasBreakpoint()) result.add(edit.getLineNumber()); 13156 } 13157 } 13158 return result; 13159 } 13160 redoAll(breakpoint) { 13161 let last = null; 13162 this.breakpointHit = false; 13163 do { 13164 { 13165 const edit = this.redo$(); 13166 if (edit == null) break; 13167 last = edit; 13168 if (this.breakpointHit) { 13169 this.breakpointHit = false;
13170 break; 13171 } 13172 } 13173 } while (breakpoint === -1 || this.mEditNumber < breakpoint); 13174 this.listener.publishChanges(); 13175 return last; 13176 } 13177 goToEdit(editNum) { 13178 if (editNum === -1) editNum = this.mEdits.size(); 13179 if (editNum === this.mEditNumber) return; 13180 while (this.mEditNumber < editNum) { 13181 { 13182 if (this.mEditNumber === this.mEdits.size()) break; 13183 const undoable = this.mEdits.get(this.mEditNumber++); 13184 undoable.redo(); 13185 } 13186 } 13187 ; 13188 while (this.mEditNumber > editNum) { 13189 { 13190 if (this.mEditNumber === 0) break; 13191 const undoable = this.mEdits.get(--this.mEditNumber); 13192 undoable.undo(); 13193 } 13194 } 13195 ; 13196 this.listener.publishChanges(); 13197 } 13198 undo$() { 13199 return this.undo$boolean(true); 13200 } 13201 undo$boolean(useBlocks) { 13202 if (this.mEditNumber === 0) return null; 13203 const undoable = this.mEdits.get(--this.mEditNumber); 13204 if (useBlocks && (undoable != null && undoable instanceof EndBlock)) return this.undoBlock(); 13205 undoable.undo(); 13206 _EditHistory.logger_$LI$().fine("undo: " + undoable.toString()); 13207 if (undoable != null && undoable instanceof BeginBlock) return undoable; 13208 if (!undoable.isVisible()) return this.undo$(); 13209 this.listener.publishChanges(); 13210 return undoable; 13211 } 13212 undo(useBlocks) { 13213 if (typeof useBlocks === "boolean" || useBlocks === null) { 13214 return this.undo$boolean(useBlocks); 13215 } else if (useBlocks === void 0) { 13216 return this.undo$(); 13217 } else throw new Error("invalid overload"); 13218 } 13219 undoBlock() { 13220 let undone; 13221 do { 13222 { 13223 undone = this.undo$(); 13224 } 13225 } while (!(undone != null && undone instanceof BeginBlock)); 13226 return undone; 13227 } 13228 getNextLineNumber() { 13229 if (this.mEdits.isEmpty()) return 3; 13230 let editNumber = this.mEditNumber; 13231 if (editNumber >= this.mEdits.size()) editNumber = this.mEdits.size() - 1; 13232 const undoable = this.mEdits.get(editNumber); 13233 if (undoable != null && undoable instanceof _EditHistory.DeferredEdit) return undoable.getLineNumber(); 13234 else return 0; 13235 } 13236 redo$() { 13237 return this.redo$boolean(true); 13238 } 13239 redo$boolean(useBlocks) { 13240 if (this.mEditNumber === this.mEdits.size()) return null; 13241 const undoable = this.mEdits.get(this.mEditNumber++); 13242 if (useBlocks && (undoable != null && undoable instanceof BeginBlock)) return this.redoBlock(); 13243 try { 13244 if (_EditHistory.logger_$LI$().isLoggable(java.util.logging.Level.FINE)) _EditHistory.logger_$LI$().fine("redo: " + undoable.toString()); 13245 undoable.redo(); 13246 } catch (e) { 13247 if (_EditHistory.logger_$LI$().isLoggable(java.util.logging.Level.WARNING)) _EditHistory.logger_$LI$().warning("edit number that failed is " + (this.mEditNumber - 1)); 13248 throw e; 13249 } 13250 if (undoable != null && undoable instanceof EndBlock) return undoable; 13251 if (!undoable.isVisible()) return this.redo$(); 13252 this.listener.publishChanges(); 13253 return undoable; 13254 } 13255 redo(useBlocks) { 13256 if (typeof useBlocks === "boolean" || useBlocks === null) { 13257 return this.redo$boolean(useBlocks); 13258 } else if (useBlocks === void 0) { 13259 return this.redo$(); 13260 } else throw new Error("invalid overload"); 13261 } 13262 redoBlock() { 13263 let lastSuccessfulRedo = "none"; 13264 const startingEditNumber = this.mEditNumber; 13265 let redone; 13266 do { 13267 { 13268 redone = this.redo$(); 13269 if (redone == null) { 13270 throw new java.lang.IllegalStateException("All " + this.mEditNumber + " edits have been redone without reaching an EndBlock. Starting edit number was " + startingEditNumber + ". Last successful redo was " + lastSuccessfulRedo + ". "); 13271 } 13272 lastSuccessfulRedo = /* getSimpleName */ 13273 ((c) => typeof c === "string" ? c.substring(c.lastIndexOf(".") + 1) : c["__class"] ? c["__class"].substring(c["__class"].lastIndexOf(".") + 1) : c["name"].substring(c["name"].lastIndexOf(".") + 1))(redone.constructor); 13274 if (_EditHistory.logger_$LI$().isLoggable(java.util.logging.Level.FINE)) { 13275 const msg = "redoBlock is redoing edits from " + startingEditNumber + ". Current edit number is " + this.mEditNumber + ". Last redone was " + lastSuccessfulRedo; 13276 _EditHistory.logger_$LI$().fine(msg); 13277 } 13278 } 13279 } while (!(redone != null && redone instanceof EndBlock)); 13280 return redone; 13281 } 13282 getDetailXml(doc) { 13283 const result = doc.createElement("EditHistoryDetails"); 13284 DomUtils.addAttribute( 13285 result, 13286 "editNumber", 13287 /* toString */ 13288 "" + this.mEditNumber 13289 ); 13290 let edits = 0; 13291 let lastStickyEdit = -1; 13292 for (let index = this.iterator(); index.hasNext(); ) { 13293 let undoable = index.next(); 13294 { 13295 const edit = undoable.getDetailXml(doc); 13296 ++edits; 13297 DomUtils.addAttribute( 13298 edit, 13299 "editNumber", 13300 /* toString */ 13301 "" + edits 13302 ); 13303 if (_EditHistory.logger_$LI$().isLoggable(java.util.logging.Level.FINEST)) _EditHistory.logger_$LI$().finest("side-effect: " + this.serializer.serialize(edit)); 13304 result.appendChild(edit); 13305 if (undoable.isSticky()) lastStickyEdit = edits; 13306 } 13307 } 13308 result.setAttribute( 13309 "lastStickyEdit", 13310 /* toString */ 13311 "" + lastStickyEdit 13312 ); 13313 return result; 13314 } 13315 getXml(doc) { 13316 const result = doc.createElement("EditHistory"); 13317 DomUtils.addAttribute( 13318 result, 13319 "editNumber", 13320 /* toString */ 13321 "" + this.mEditNumber 13322 ); 13323 return result; 13324 } 13325 mergeSelectionChanges() {
13326 let cursor = this.mEditNumber; 13327 if (cursor === 0) return; 13328 --cursor; 13329 const above = this.mEdits.get(cursor); 13330 if (above != null && above instanceof ChangeManifestations) return; 13331 if (!(above != null && above instanceof ChangeSelection)) return; 13332 if (cursor === 0) return; 13333 --cursor; 13334 const below = this.mEdits.get(cursor); 13335 if (below != null && below instanceof ChangeManifestations) return; 13336 if (below != null && below instanceof ChangeSelection) { 13337 let bracket = new BeginBlock(null); 13338 this.mEdits.add(cursor, bracket); 13339 bracket = new EndBlock(null); 13340 this.mEdits.add(bracket); 13341 this.mEditNumber += 2; 13342 } else if (below != null && below instanceof EndBlock) { 13343 let scan = cursor - 1; 13344 const done = false; 13345 while (!done) { 13346 { 13347 const next = this.mEdits.get(scan); 13348 if (next != null && next instanceof ChangeManifestations) return; 13349 if (next != null && next instanceof ChangeSelection) --scan; 13350 else if (next != null && next instanceof BeginBlock) { 13351 this.mEdits.remove(above); 13352 this.mEdits.add(cursor, above); 13353 return; 13354 } else return; 13355 } 13356 } 13357 ; 13358 } 13359 } 13360 replaceEdit(oldEdit, newEdit) { 13361 this.mEdits.set(this.mEdits.indexOf(oldEdit), newEdit); 13362 } 13363 /** 13364 * This is used during DeferredEdit .redo(), possibly to migrate one UndoableEdit into several. 13365 * It must maintain the invariant that the next UndoableEdit is the next DeferredEdit to redo. 13366 * @param {UndoableEdit} edit 13367 */ 13368 insert(edit) { 13369 this.mEdits.add(this.mEditNumber++, edit); 13370 } 13371 /** 13372 * Redo to greater of lastStickyEdit and lastDoneEdit, undo back to lastDoneEdit. 13373 * If there are explicitSnapshots, this is a migration of an old Article, using edit 13374 * numbers, and we have to redo as far as the last one, inserting snapshots as we go. 13375 * Note that lastStickyEdit and explicitSnapshots are mutually exclusive, after and before 13376 * migration, respectively. 13377 * 13378 * @param {number} lastDoneEdit 13379 * @param {number} lastStickyEdit 13380 * @param {UndoableEdit[]} explicitSnapshots 13381 * @throws Failure 13382 */ 13383 synchronize(lastDoneEdit, lastStickyEdit, explicitSnapshots) { 13384 let redoThreshold = Math.max(lastDoneEdit, lastStickyEdit); 13385 if (explicitSnapshots != null) redoThreshold = Math.max(redoThreshold, explicitSnapshots.length - 1); 13386 this.mEditNumber = 0; 13387 let targetEdit = 0; 13388 const toRedo = new java.util.ArrayList(); 13389 for (let i = 0; i < redoThreshold; i++) { 13390 if (i < this.mEdits.size()) toRedo.add(this.mEdits.get(i)); 13391 else break; 13392 ; 13393 } 13394 for (let oldIndex = 0; oldIndex < toRedo.size(); oldIndex++) { 13395 { 13396 const edit = toRedo.get(oldIndex); 13397 try { 13398 if (explicitSnapshots != null && explicitSnapshots.length > oldIndex && explicitSnapshots[oldIndex] != null) { 13399 const snapshot = explicitSnapshots[oldIndex]; 13400 this.mEdits.add(this.mEditNumber, snapshot); 13401 if (this.mEditNumber <= lastDoneEdit) ++lastDoneEdit; 13402 ++this.mEditNumber; 13403 snapshot.perform(); 13404 } 13405 ++this.mEditNumber; 13406 edit.redo(); 13407 if (oldIndex + 1 === lastDoneEdit) targetEdit = this.mEditNumber; 13408 } catch (e) { 13409 if (_EditHistory.logger_$LI$().isLoggable(java.util.logging.Level.WARNING)) _EditHistory.logger_$LI$().warning("edit number that failed is " + (this.mEditNumber - 1)); 13410 const t = null; 13411 if (t != null && t instanceof Command.Failure) throw t; 13412 else throw e; 13413 } 13414 } 13415 ; 13416 } 13417 if (explicitSnapshots != null && explicitSnapshots.length > redoThreshold && explicitSnapshots[redoThreshold] != null) { 13418 const snapshot = explicitSnapshots[redoThreshold]; 13419 this.mEdits.add(this.mEditNumber, snapshot); 13420 ++this.mEditNumber; 13421 snapshot.perform(); 13422 } 13423 this.goToEdit(targetEdit); 13424 } 13425 loadEdit(format, editElem, context) { 13426 const edit = new _EditHistory.DeferredEdit(this, format, editElem, context); 13427 this.addEdit(edit, context); 13428 } 13429 /** 13430 * 13431 * @return {*} 13432 */ 13433 iterator() { 13434 return this.mEdits.iterator(); 13435 } 13436 getEditNumber() { 13437 return this.mEditNumber; 13438 } 13439 constructor() { 13440 this.mEdits = new java.util.ArrayList(); 13441 this.mEditNumber = 0; 13442 this.breakpointHit = false;
13443 if (this.listener === void 0) { 13444 this.listener = null; 13445 } 13446 if (this.serializer === void 0) { 13447 this.serializer = null; 13448 } 13449 } 13450}; 13451EditHistory["__class"] = "com.vzome.core.editor.EditHistory"; 13452EditHistory["__interfaces"] = ["java.lang.Iterable"]; 13453((EditHistory2) => { 13454 class Breakpoint extends UndoableEdit { 13455 /** 13456 * 13457 * @param {*} doc 13458 * @return {*} 13459 */ 13460 getXml(doc) { 13461 return doc.createElement("Breakpoint"); 13462 } 13463 /** 13464 * 13465 * @return {boolean} 13466 */ 13467 isNoOp() { 13468 return false; 13469 } 13470 /** 13471 * 13472 * @return {boolean} 13473 */ 13474 isVisible() { 13475 return true; 13476 } 13477 /** 13478 * 13479 * @param {*} xml 13480 * @param {XmlSaveFormat} format 13481 * @param {*} context 13482 */ 13483 loadAndPerform(xml, format, context) { 13484 context.performAndRecord(this); 13485 } 13486 /** 13487 * 13488 */ 13489 perform() { 13490 EditHistory2.breakpointLogger_$LI$().info("hit a Breakpoint at " + this.__parent.mEditNumber); 13491 this.__parent.breakpointHit = true; 13492 } 13493 /** 13494 * 13495 */ 13496 redo() { 13497 this.perform(); 13498 } 13499 /** 13500 * 13501 */ 13502 undo() { 13503 } 13504 /** 13505 * 13506 * @param {*} props 13507 */ 13508 configure(props) { 13509 } 13510 /** 13511 * 13512 * @return {boolean} 13513 */ 13514 isSticky() { 13515 return false; 13516 } 13517 /** 13518 * 13519 * @return {boolean} 13520 */ 13521 isDestructive() { 13522 return false; 13523 } 13524 /** 13525 * 13526 * @param {*} doc 13527 * @return {*} 13528 */ 13529 getDetailXml(doc) { 13530 return this.getXml(doc); 13531 } 13532 constructor(__parent) { 13533 super(); 13534 this.__parent = __parent; 13535 } 13536 } 13537 EditHistory2.Breakpoint = Breakpoint; 13538 Breakpoint["__class"] = "com.vzome.core.editor.EditHistory.Breakpoint"; 13539 class DeferredEdit extends UndoableEdit { 13540 constructor(__parent, format, editElem, context) { 13541 super(); 13542 this.__parent = __parent; 13543 if (this.format === void 0) { 13544 this.format = null; 13545 } 13546 if (this.xml === void 0) { 13547 this.xml = null; 13548 } 13549 if (this.context === void 0) { 13550 this.context = null; 13551 } 13552 this.isBreakpoint = false; 13553 this.format = format; 13554 this.xml = editElem; 13555 this.context = context; 13556 } 13557 /** 13558 * 13559 * @param {boolean} value 13560 */ 13561 setBreakpoint(value) { 13562 this.isBreakpoint = value; 13563 } 13564 /** 13565 * 13566 * @return {boolean} 13567 */ 13568 hasBreakpoint() { 13569 return this.isBreakpoint; 13570 } 13571 /** 13572 * 13573 * @return {boolean} 13574 */ 13575 isNoOp() { 13576 return false; 13577 } 13578 /** 13579 * 13580 * @return {number} 13581 */ 13582 getLineNumber() { 13583 const locationData = this.xml.getUserData(LocationData.LOCATION_DATA_KEY); 13584 if (locationData != null) return locationData.getStartLine(); 13585 else return 0; 13586 } 13587 /** 13588 * 13589 * @param {*} doc 13590 * @return {*} 13591 */ 13592 getXml(doc) { 13593 return ( 13594 /* equals */ 13595 ((o1, o2) => { 13596 if (o1 && o1.equals) { 13597 return o1.equals(o2); 13598 } else { 13599 return o1 === o2; 13600 } 13601 })(doc, this.xml.getOwnerDocument()) ? this.xml : doc.importNode(this.xml, true) 13602 ); 13603 } 13604 /** 13605 * 13606 * @return {boolean} 13607 */ 13608 isVisible() { 13609 return true; 13610 } 13611 /** 13612 * 13613 * @return {boolean} 13614 */ 13615 isDestructive() { 13616 return true; 13617 } 13618 /** 13619 * 13620 */ 13621 redo() { 13622 const num = this.getLineNumber(); 13623 this.__parent.mEdits.remove(--this.__parent.mEditNumber); 13624 if (EditHistory2.logger_$LI$().isLoggable(java.util.logging.Level.FINE)) EditHistory2.logger_$LI$().fine("%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% " + num + ": " + this.__parent.serializer.serialize(this.xml)); 13625 let realized = null; 13626 const cmdName = this.xml.getLocalName(); 13627 if (cmdName === "Breakpoint") { 13628 realized = new EditHistory2.Breakpoint(this.__parent); 13629 } else realized = this.context.createEdit(this.xml); 13630 realized.setLineNumber(num);
13631 try { 13632 this.__parent.listener.showCommand(this.xml, num); 13633 realized.loadAndPerform(this.xml, this.format, new DeferredEdit.DeferredEdit$0(this)); 13634 } catch (e) { 13635 EditHistory2.logger_$LI$().warning("failure during initial edit replay:\n" + this.__parent.serializer.serialize(this.xml)); 13636 throw e; 13637 } 13638 } 13639 /** 13640 * 13641 * @param {*} xml 13642 * @param {XmlSaveFormat} format 13643 * @param {*} context 13644 */ 13645 loadAndPerform(xml, format, context) { 13646 throw new java.lang.IllegalStateException("should never be called"); 13647 } 13648 /** 13649 * 13650 */ 13651 undo() { 13652 } 13653 /** 13654 * 13655 * @param {*} props 13656 */ 13657 configure(props) { 13658 } 13659 /** 13660 * 13661 */ 13662 perform() { 13663 } 13664 /** 13665 * 13666 * @return {boolean} 13667 */ 13668 isSticky() { 13669 return false; 13670 } 13671 /** 13672 * 13673 * @param {*} doc 13674 * @return {*} 13675 */ 13676 getDetailXml(doc) { 13677 return doc.createElement("deferredEdit"); 13678 } 13679 } 13680 EditHistory2.DeferredEdit = DeferredEdit; 13681 DeferredEdit["__class"] = "com.vzome.core.editor.EditHistory.DeferredEdit"; 13682 ((DeferredEdit2) => { 13683 class DeferredEdit$0 { 13684 /** 13685 * 13686 * @param {UndoableEdit} edit 13687 */ 13688 performAndRecord(edit) { 13689 try { 13690 edit.perform(); 13691 if (edit.isNoOp()) return; 13692 if (EditHistory2.logger_$LI$().isLoggable(java.util.logging.Level.FINEST)) { 13693 const details = edit.getDetailXml(this.__parent.xml.getOwnerDocument()); 13694 EditHistory2.logger_$LI$().finest("side-effect: " + this.__parent.__parent.serializer.serialize(details)); 13695 } 13696 } catch (e) { 13697 throw new java.lang.RuntimeException(e); 13698 } 13699 this.__parent.__parent.insert(edit); 13700 } 13701 /** 13702 * 13703 * @param {*} xml 13704 * @return {UndoableEdit} 13705 */ 13706 createEdit(xml) { 13707 const edit = this.__parent.context.createEdit(xml); 13708 edit.setLineNumber(this.__parent.getLineNumber()); 13709 return edit; 13710 } 13711 /** 13712 * 13713 * @param {string} cmdName 13714 * @return {*} 13715 */ 13716 createLegacyCommand(cmdName) { 13717 return this.__parent.context.createLegacyCommand(cmdName); 13718 } 13719 /** 13720 * 13721 * @param {string} action 13722 * @param {*} props 13723 * @return {boolean} 13724 */ 13725 doEdit(action, props) { 13726 return false; 13727 } 13728 constructor(__parent) { 13729 this.__parent = __parent; 13730 } 13731 } 13732 DeferredEdit2.DeferredEdit$0 = DeferredEdit$0; 13733 DeferredEdit$0["__interfaces"] = ["com.vzome.core.editor.api.Context"]; 13734 })(DeferredEdit = EditHistory2.DeferredEdit || (EditHistory2.DeferredEdit = {})); 13735})(EditHistory || (EditHistory = {})); 13736
13737// src/worker/legacy/from-java/com/vzome/core/construction/SegmentTauDivision.ts 13738var SegmentTauDivision = class extends Point { 13739 constructor(seg) { 13740 super(seg.field); 13741 if (this.mSegment === void 0) { 13742 this.mSegment = null; 13743 } 13744 if (this.shrink === void 0) { 13745 this.shrink = null; 13746 } 13747 this.mSegment = seg; 13748 this.shrink = this.field["createPower$int"](-1); 13749 this.mapParamsToState(); 13750 } 13751 /** 13752 * 13753 * @return {boolean} 13754 */ 13755 mapParamsToState() { 13756 if (this.mSegment.isImpossible()) return this.setStateVariable(null, true); 13757 let loc = this.mSegment.getStart(); 13758 const off = this.mSegment.getOffset().scale(this.shrink); 13759 loc = loc.plus(off); 13760 return this.setStateVariable(loc, false); 13761 } 13762}; 13763SegmentTauDivision["__class"] = "com.vzome.core.construction.SegmentTauDivision"; 13764
13765// src/worker/legacy/from-java/com/vzome/core/commands/CommandTauDivision.ts 13766var CommandTauDivision = class _CommandTauDivision extends AbstractCommand { 13767 static PARAM_SIGNATURE_$LI$() { 13768 if (_CommandTauDivision.PARAM_SIGNATURE == null) { 13769 _CommandTauDivision.PARAM_SIGNATURE = [["start", Point], ["end", Point]]; 13770 } 13771 return _CommandTauDivision.PARAM_SIGNATURE; 13772 } 13773 static ATTR_SIGNATURE_$LI$() { 13774 if (_CommandTauDivision.ATTR_SIGNATURE == null) { 13775 _CommandTauDivision.ATTR_SIGNATURE = []; 13776 } 13777 return _CommandTauDivision.ATTR_SIGNATURE; 13778 } 13779 /** 13780 * 13781 * @return {java.lang.Object[][]} 13782 */ 13783 getParameterSignature() { 13784 return _CommandTauDivision.PARAM_SIGNATURE_$LI$(); 13785 } 13786 /** 13787 * 13788 * @return {java.lang.Object[][]} 13789 */ 13790 getAttributeSignature() { 13791 return _CommandTauDivision.ATTR_SIGNATURE_$LI$(); 13792 } 13793 /** 13794 * 13795 * @return {boolean} 13796 */ 13797 ordersSelection() { 13798 return true; 13799 } 13800 /** 13801 * 13802 * @param {ConstructionList} parameters 13803 * @param {AttributeMap} attrs 13804 * @param {*} effects 13805 * @return {ConstructionList} 13806 */ 13807 apply(parameters, attrs, effects) { 13808 const result = new ConstructionList(); 13809 if (parameters == null || parameters.size() !== 2) throw new Command.Failure("Tau division applies to two balls."); 13810 try { 13811 const start = parameters.get(0); 13812 const end = parameters.get(1); 13813 const join = new SegmentJoiningPoints(start, end); 13814 const midpoint = new SegmentTauDivision(join); 13815 result.addConstruction(midpoint); 13816 effects["constructionAdded$com_vzome_core_construction_Construction"](midpoint); 13817 } catch (e) { 13818 throw new Command.Failure("Tau division applies to two balls."); 13819 } 13820 return result; 13821 } 13822 constructor() { 13823 super(); 13824 } 13825}; 13826CommandTauDivision["__class"] = "com.vzome.core.commands.CommandTauDivision"; 13827CommandTauDivision["__interfaces"] = ["com.vzome.core.commands.Command"]; 13828
13829// src/worker/legacy/from-java/com/vzome/core/math/Projection.ts 13830var Projection; 13831((Projection2) => { 13832 class Default { 13833 constructor(field5) { 13834 if (this.field === void 0) { 13835 this.field = null; 13836 } 13837 this.field = field5; 13838 } 13839 /** 13840 * 13841 * @param {AlgebraicVector} source 13842 * @param {boolean} wFirst 13843 * @return {AlgebraicVector} 13844 */ 13845 projectImage(source, wFirst) { 13846 return this.field.projectTo3d(source, wFirst); 13847 } 13848 /** 13849 * 13850 * @param {*} element 13851 */ 13852 getXmlAttributes(element) { 13853 } 13854 /** 13855 * 13856 * @param {*} xml 13857 */ 13858 setXmlAttributes(xml) { 13859 } 13860 /** 13861 * 13862 * @return {string} 13863 */ 13864 getProjectionName() { 13865 return ""; 13866 } 13867 } 13868 Projection2.Default = Default; 13869 Default["__class"] = "com.vzome.core.math.Projection.Default"; 13870 Default["__interfaces"] = ["com.vzome.core.math.Projection"]; 13871})(Projection || (Projection = {})); 13872
13873// src/worker/legacy/from-java/com/vzome/core/math/QuaternionProjection.ts 13874var QuaternionProjection = class _QuaternionProjection { 13875 constructor(field5, leftQuat, rightQuat) { 13876 this.quaternions = (function(dims) { 13877 let allocate = function(dims2) { 13878 if (dims2.length === 0) { 13879 return null; 13880 } else { 13881 let array = []; 13882 for (let i = 0; i < dims2[0]; i++) { 13883 array.push(allocate(dims2.slice(1))); 13884 } 13885 return array; 13886 } 13887 }; 13888 return allocate(dims); 13889 })([2, 2]); 13890 if (this.field === void 0) { 13891 this.field = null; 13892 } 13893 this.field = field5; 13894 this.setQuaternion(leftQuat, _QuaternionProjection.LEFT); 13895 this.setQuaternion(rightQuat, _QuaternionProjection.RIGHT); 13896 } 13897 /** 13898 * 13899 * @param {AlgebraicVector} source 13900 * @param {boolean} wFirst 13901 * @return {AlgebraicVector} 13902 */ 13903 projectImage(source, wFirst) { 13904 let result = source; 13905 const leftQuat = this.getQuaternion(_QuaternionProjection.LEFT, wFirst); 13906 const rightQuat = this.getQuaternion(_QuaternionProjection.RIGHT, wFirst); 13907 if (rightQuat != null) { 13908 if (leftQuat != null) { 13909 result = leftQuat.rightMultiply(result); 13910 console.info("left mult: " + result.toString()); 13911 } 13912 result = rightQuat.leftMultiply(result); 13913 } else { 13914 result = leftQuat.rightMultiply(result); 13915 } 13916 return this.field.projectTo3d(result, wFirst); 13917 } 13918 static { 13919 this.LEFT = 0; 13920 } 13921 static { 13922 this.RIGHT = 1; 13923 } 13924 static { 13925 this.WFIRST = 0; 13926 } 13927 static { 13928 this.WLAST = 1; 13929 } 13930 /*private*/ 13931 setQuaternion(quatVector, hand) { 13932 this.quaternions[hand][_QuaternionProjection.WFIRST] = quatVector == null ? null : new Quaternion(this.field, quatVector.inflateTo4d$boolean(true)); 13933 this.quaternions[hand][_QuaternionProjection.WLAST] = quatVector == null ? null : new Quaternion(this.field, quatVector.inflateTo4d$boolean(false)); 13934 } 13935 /*private*/ 13936 getQuaternion(hand, wFirst) { 13937 return this.quaternions[hand][wFirst ? _QuaternionProjection.WFIRST : _QuaternionProjection.WLAST]; 13938 } 13939 static { 13940 this.RIGHT_QUATERNION_ATTRIBUTENAME = "quaternion"; 13941 } 13942 static { 13943 this.LEFT_QUATERNION_ATTRIBUTENAME = "leftQuaternion"; 13944 } 13945 /** 13946 * 13947 * @param {*} element 13948 */ 13949 getXmlAttributes(element) { 13950 const leftQuat = this.getQuaternion(_QuaternionProjection.LEFT, true); 13951 const rightQuat = this.getQuaternion(_QuaternionProjection.RIGHT, true); 13952 if (leftQuat != null) { 13953 DomUtils.addAttribute(element, _QuaternionProjection.LEFT_QUATERNION_ATTRIBUTENAME, leftQuat.getVector().toParsableString()); 13954 } 13955 if (rightQuat != null) { 13956 DomUtils.addAttribute(element, _QuaternionProjection.RIGHT_QUATERNION_ATTRIBUTENAME, rightQuat.getVector().toParsableString()); 13957 } 13958 } 13959 /** 13960 * 13961 * @param {*} xml 13962 */ 13963 setXmlAttributes(xml) { 13964 this.setQuaternion(this.parseRationalVector(xml, _QuaternionProjection.LEFT_QUATERNION_ATTRIBUTENAME), _QuaternionProjection.LEFT); 13965 this.setQuaternion(this.parseRationalVector(xml, _QuaternionProjection.RIGHT_QUATERNION_ATTRIBUTENAME), _QuaternionProjection.RIGHT); 13966 } 13967 /*private*/ 13968 parseRationalVector(xml, attrName) { 13969 const nums = xml.getAttribute(attrName); 13970 if (nums == null || /* isEmpty */ 13971 nums.length === 0) return null; 13972 const loc = this.field.parseVector(nums); 13973 return loc; 13974 } 13975 /** 13976 * 13977 * @return {string} 13978 */ 13979 getProjectionName() { 13980 return "Quaternion"; 13981 } 13982}; 13983QuaternionProjection["__class"] = "com.vzome.core.math.QuaternionProjection"; 13984QuaternionProjection["__interfaces"] = ["com.vzome.core.math.Projection"]; 13985
13986// src/worker/legacy/from-java/com/vzome/core/commands/CommandUniformH4Polytope.ts 13987var CommandUniformH4Polytope = class _CommandUniformH4Polytope extends CommandTransform { 13988 /** 13989 * 13990 * @param {AttributeMap} attributes 13991 * @param {XmlSaveFormat} format 13992 */ 13993 setFixedAttributes(attributes, format) { 13994 super.setFixedAttributes(attributes, format); 13995 this.field = format.getField(); 13996 this.symm = this.h4Symms.get(this.field.getName()); 13997 if (this.symm == null) { 13998 this.symm = new _CommandUniformH4Polytope.H4Symmetry(this.field); 13999 this.h4Symms.put(this.field.getName(), this.symm); 14000 } 14001 this.mRoots = format.getQuaternionicSymmetry("H_4").getRoots(); 14002 } 14003 static { 14004 this.POLYTOPE_INDEX_ATTR_NAME = "polytope.index"; 14005 } 14006 static logger_$LI$() { 14007 if (_CommandUniformH4Polytope.logger == null) { 14008 _CommandUniformH4Polytope.logger = java.util.logging.Logger.getLogger("com.vzome.core.commands.h4polytope"); 14009 } 14010 return _CommandUniformH4Polytope.logger; 14011 } 14012 constructor(field5, qsymm, index) { 14013 if ((field5 != null && (field5.constructor != null && field5.constructor["__interfaces"] != null && field5.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicField") >= 0) || field5 === null) && (qsymm != null && qsymm instanceof QuaternionicSymmetry || qsymm === null) && (typeof index === "number" || index === null)) { 14014 let __args = arguments; 14015 super(); 14016 if (this.mRoots === void 0) { 14017 this.mRoots = null; 14018 } 14019 if (this.field === void 0) { 14020 this.field = null; 14021 } 14022 if (this.symm === void 0) { 14023 this.symm = null; 14024 } 14025 this.h4Symms = new java.util.HashMap(); 14026 this.mPolytopeIndex = -1; 14027 this.quaternionVector = null; 14028 this.mPolytopeIndex = index; 14029 this.field = field5; 14030 this.symm = new _CommandUniformH4Polytope.H4Symmetry(field5); 14031 this.mRoots = qsymm.getRoots(); 14032 } else if (field5 === void 0 && qsymm === void 0 && index === void 0) { 14033 let __args = arguments; 14034 super(); 14035 if (this.mRoots === void 0) { 14036 this.mRoots = null; 14037 } 14038 if (this.field === void 0) { 14039 this.field = null; 14040 } 14041 if (this.symm === void 0) { 14042 this.symm = null; 14043 } 14044 this.h4Symms = new java.util.HashMap(); 14045 this.mPolytopeIndex = -1; 14046 this.quaternionVector = null; 14047 } else throw new Error("invalid overload"); 14048 } 14049 /** 14050 * Only called when migrating a 2.0 model file. 14051 * @param {AlgebraicVector} offset 14052 */ 14053 setQuaternion(offset) { 14054 this.quaternionVector = offset; 14055 } 14056 /** 14057 * 14058 * @param {*} xml 14059 * @param {XmlSaveFormat} format 14060 * @return {AttributeMap} 14061 */ 14062 setXml(xml, format) { 14063 const attrs = super.setXml(xml, format); 14064 this.quaternionVector = format.parseRationalVector(xml, "quaternion"); 14065 return attrs; 14066 } 14067 /** 14068 * 14069 * @param {*} result 14070 * @param {AttributeMap} attributes 14071 */ 14072 getXml(result, attributes) { 14073 if (this.quaternionVector != null) DomUtils.addAttribute(result, "quaternion", this.quaternionVector.toParsableString()); 14074 super.getXml(result, attributes); 14075 } 14076 /** 14077 * 14078 * @return {java.lang.Object[][]} 14079 */ 14080 getAttributeSignature() { 14081 return CommandTransform.GROUP_ATTR_SIGNATURE_$LI$(); 14082 } 14083 /** 14084 * 14085 * @param {string} attrName 14086 * @return {boolean} 14087 */ 14088 attributeIs3D(attrName) { 14089 if ("symmetry.axis.segment" === attrName) return false; 14090 else return true; 14091 } 14092 /** 14093 * 14094 * @param {ConstructionList} parameters 14095 * @param {AttributeMap} attributes 14096 * @param {*} effects 14097 * @return {ConstructionList} 14098 */ 14099 apply(parameters, attributes, effects) { 14100 const SCALE_DOWN_5 = this.field["createPower$int"](-5); 14101 let proj = new Projection.Default(this.field); 14102 let leftQuat = null; 14103 let rightQuat = null; 14104 if (parameters.size() === 0) { 14105 rightQuat = this.quaternionVector; 14106 const symmAxis = attributes.get(CommandTransform.SYMMETRY_AXIS_ATTR_NAME); 14107 if (rightQuat == null) rightQuat = symmAxis == null ? null : symmAxis.getOffset(); 14108 if (rightQuat != null) rightQuat = rightQuat.scale(SCALE_DOWN_5); 14109 } else { 14110 let numSegs = 0; 14111 for (let index = parameters.iterator(); index.hasNext(); ) { 14112 let cons = index.next(); 14113 { 14114 if (cons != null && cons instanceof Segment) { 14115 const seg = cons; 14116 if (++numSegs === 1) rightQuat = seg.getOffset().scale(SCALE_DOWN_5); 14117 else if (numSegs === 2) leftQuat = seg.getOffset().scale(SCALE_DOWN_5); 14118 else throw new Command.Failure("Too many struts to specify quaternion multiplication."); 14119 } 14120 } 14121 } 14122 } 14123 if (rightQuat != null) proj = new QuaternionProjection(this.field, leftQuat, rightQuat); 14124 if (this.mPolytopeIndex < 0) { 14125 const indexObj = attributes.get(_CommandUniformH4Polytope.POLYTOPE_INDEX_ATTR_NAME); 14126 this.mPolytopeIndex = indexObj; 14127 } else attributes.put(_CommandUniformH4Polytope.POLYTOPE_INDEX_ATTR_NAME, this.mPolytopeIndex); 14128 this.generate(this.mPolytopeIndex, this.mPolytopeIndex, null, new _CommandUniformH4Polytope.ConstructionChangesAdapter(effects, proj, this.field["createPower$int"](5))); 14129 return new ConstructionList(); 14130 } 14131 generate(index, renderEdges, edgeScales, listener) { 14132 const reflections = [null, null, null, null]; 14133 let prototype = this.symm.getPrototype(index); 14134 if (edgeScales != null) { 14135 prototype = this.field.origin(4); 14136 for (let b = 0; b < 4; b++) { 14137 { 14138 const mask = 1 << b; 14139 const test = index & mask; 14140 if (test !== 0) { 14141 const contribution = this.symm.getCoRoot(b).scale(edgeScales[b]); 14142 prototype = prototype.plus(contribution); 14143 } 14144 } 14145 ; 14146 } 14147 } 14148 for (let mirror = 0; mirror < 4; mirror++) { 14149 if ((renderEdges & 1 << mirror) !== 0) reflections[mirror] = this.symm.reflect(mirror, prototype); 14150 ; 14151 } 14152 for (let index1 = 0; index1 < this.mRoots.length; index1++) { 14153 let outerRoot = this.mRoots[index1]; 14154 { 14155 for (let index2 = 0; index2 < this.mRoots.length; index2++) { 14156 let innerRoot = this.mRoots[index2]; 14157 { 14158 let vertex = outerRoot.rightMultiply(prototype); 14159 vertex = innerRoot.leftMultiply(vertex); 14160 const p1 = listener.addVertex(vertex); 14161 for (let mirror = 0; mirror < 4; mirror++) { 14162 { 14163 if (reflections[mirror] != null) { 14164 let other = outerRoot.rightMultiply(reflections[mirror]); 14165 other = innerRoot.leftMultiply(other); 14166 if (!other.equals(vertex)) { 14167 const p2 = listener.addVertex(other); 14168 listener.addEdge(p1, p2); 14169 } 14170 } 14171 } 14172 ; 14173 } 14174 } 14175 } 14176 } 14177 } 14178 } 14179}; 14180CommandUniformH4Polytope["__class"] = "com.vzome.core.commands.CommandUniformH4Polytope"; 14181CommandUniformH4Polytope["__interfaces"] = ["com.vzome.core.commands.Command"];
14182((CommandUniformH4Polytope2) => { 14183 class H4Symmetry { 14184 constructor(field5) { 14185 this.mPrototypes = ((s) => { 14186 let a = []; 14187 while (s-- > 0) a.push(null); 14188 return a; 14189 })(15); 14190 this.mMirrors = [null, null, null, null]; 14191 this.coRoots = [null, null, null, null]; 14192 const ONE = field5["createRational$long"](1); 14193 const NEG_ONE = field5["createRational$long"](-1); 14194 const TWO = field5["createRational$long"](2); 14195 const A = field5["createAlgebraicNumber$int$int$int$int"](1, -1, 1, 0); 14196 const B = field5["createAlgebraicNumber$int$int$int$int"](0, 1, 1, 0); 14197 let temp = field5.origin(4); 14198 temp.setComponent(1, A.dividedBy(TWO)); 14199 temp.setComponent(2, ONE.dividedBy(TWO)); 14200 temp.setComponent(3, B.dividedBy(TWO)); 14201 this.mMirrors[3] = new Quaternion(field5, temp); 14202 temp = field5.origin(4); 14203 temp.setComponent(3, NEG_ONE); 14204 this.mMirrors[2] = new Quaternion(field5, temp); 14205 temp = field5.origin(4); 14206 temp.setComponent(1, ONE.dividedBy(TWO)); 14207 temp.setComponent(2, NEG_ONE.dividedBy(TWO)); 14208 temp.setComponent(3, ONE.dividedBy(TWO)); 14209 temp.setComponent(0, NEG_ONE.dividedBy(TWO)); 14210 this.mMirrors[1] = new Quaternion(field5, temp); 14211 temp = field5.origin(4); 14212 temp.setComponent(0, ONE); 14213 this.mMirrors[0] = new Quaternion(field5, temp); 14214 const B2 = field5["createAlgebraicNumber$int$int$int$int"](0, 2, 1, 0); 14215 this.coRoots[3] = field5.origin(4); 14216 this.coRoots[3].setComponent(1, B2); 14217 this.coRoots[3].setComponent(2, B2); 14218 this.coRoots[2] = field5.origin(4); 14219 this.coRoots[2].setComponent(1, B2["plus$com_vzome_core_algebra_AlgebraicNumber"](ONE)); 14220 this.coRoots[2].setComponent(2, B["plus$com_vzome_core_algebra_AlgebraicNumber"](TWO)); 14221 this.coRoots[2].setComponent(3, A); 14222 this.coRoots[1] = field5.origin(4); 14223 this.coRoots[1].setComponent(1, B2); 14224 this.coRoots[1].setComponent(2, TWO); 14225 this.coRoots[0] = field5.origin(4); 14226 this.coRoots[0].setComponent(1, B); 14227 this.coRoots[0].setComponent(2, ONE); 14228 this.coRoots[0].setComponent(0, A.negate()); 14229 if (CommandUniformH4Polytope2.logger_$LI$().isLoggable(java.util.logging.Level.FINE)) for (let i = 0; i < 4; i++) { 14230 { 14231 const buf = new java.lang.StringBuffer(); 14232 this.coRoots[i].getVectorExpression$java_lang_StringBuffer$int(buf, AlgebraicField.DEFAULT_FORMAT); 14233 CommandUniformH4Polytope2.logger_$LI$().fine(buf.toString()); 14234 } 14235 ; 14236 } 14237 const origin = field5.origin(4); 14238 for (let index = 1; index <= 15; index++) { 14239 { 14240 let vertex = origin; 14241 for (let b = 0; b < 4; b++) { 14242 { 14243 const mask = 1 << b; 14244 const test = index & mask; 14245 if (test !== 0) { 14246 vertex = vertex.plus(this.coRoots[b]); 14247 } 14248 } 14249 ; 14250 } 14251 this.mPrototypes[index - 1] = vertex; 14252 } 14253 ; 14254 } 14255 } 14256 getPrototype(index) { 14257 return this.mPrototypes[index - 1]; 14258 } 14259 reflect(mirror, prototype) { 14260 return this.mMirrors[mirror].reflect(prototype); 14261 } 14262 getCoRoot(i) { 14263 return this.coRoots[i]; 14264 } 14265 } 14266 CommandUniformH4Polytope2.H4Symmetry = H4Symmetry; 14267 H4Symmetry["__class"] = "com.vzome.core.commands.CommandUniformH4Polytope.H4Symmetry"; 14268 class ConstructionChangesAdapter { 14269 constructor(effects, proj, scale) { 14270 this.vertices = new java.util.HashMap(); 14271 if (this.effects === void 0) { 14272 this.effects = null; 14273 } 14274 if (this.proj === void 0) { 14275 this.proj = null; 14276 } 14277 if (this.scale === void 0) { 14278 this.scale = null; 14279 } 14280 this.edges = new java.util.HashSet(); 14281 this.effects = effects; 14282 this.proj = proj; 14283 this.scale = scale; 14284 } 14285 /** 14286 * 14287 * @param {*} v1 14288 * @param {*} v2 14289 * @return {*} 14290 */ 14291 addEdge(v1, v2) { 14292 const p1 = v1; 14293 const p2 = v2; 14294 const edge = new CommandUniformH4Polytope2.Edge(p1.getIndex(), p2.getIndex()); 14295 if (this.edges.contains(edge)) return null; 14296 this.edges.add(edge); 14297 this.effects["constructionAdded$com_vzome_core_construction_Construction"](new SegmentJoiningPoints(p1, p2)); 14298 return edge; 14299 } 14300 /** 14301 * 14302 * @param {java.lang.Object[]} vertices 14303 * @return {*} 14304 */ 14305 addFace(vertices) { 14306 return null; 14307 } 14308 /** 14309 * 14310 * @param {AlgebraicVector} vertex 14311 * @return {*} 14312 */ 14313 addVertex(vertex) { 14314 let p = this.vertices.get(vertex); 14315 if (p == null) { 14316 let projected = vertex; 14317 CommandUniformH4Polytope2.logger_$LI$().finer("before : "); 14318 this.printGoldenVector(projected); 14319 if (this.proj != null) projected = this.proj.projectImage(projected, true); 14320 CommandUniformH4Polytope2.logger_$LI$().finer("projected: "); 14321 this.printGoldenVector(projected); 14322 projected = projected.scale(this.scale); 14323 CommandUniformH4Polytope2.logger_$LI$().finer("scaled : "); 14324 this.printGoldenVector(projected); 14325 p = new FreePoint(projected); 14326 p.setIndex(this.vertices.size()); 14327 this.effects["constructionAdded$com_vzome_core_construction_Construction"](p); 14328 this.vertices.put(vertex, p); 14329 } 14330 return p; 14331 } 14332 printGoldenVector(gv) { 14333 if (CommandUniformH4Polytope2.logger_$LI$().isLoggable(java.util.logging.Level.FINER)) { 14334 const buf = new java.lang.StringBuffer(); 14335 gv.getVectorExpression$java_lang_StringBuffer$int(buf, AlgebraicField.DEFAULT_FORMAT); 14336 CommandUniformH4Polytope2.logger_$LI$().finer(buf.toString()); 14337 } 14338 } 14339 } 14340 CommandUniformH4Polytope2.ConstructionChangesAdapter = ConstructionChangesAdapter; 14341 ConstructionChangesAdapter["__class"] = "com.vzome.core.commands.CommandUniformH4Polytope.ConstructionChangesAdapter"; 14342 ConstructionChangesAdapter["__interfaces"] = ["com.vzome.core.math.symmetry.WythoffConstruction.Listener"]; 14343 class Edge { 14344 constructor(p1, p2) { 14345 if (this.p1 === void 0) { 14346 this.p1 = 0; 14347 } 14348 if (this.p2 === void 0) { 14349 this.p2 = 0; 14350 } 14351 this.p1 = p1; 14352 this.p2 = p2; 14353 } 14354 /** 14355 * 14356 * @param {*} obj 14357 * @return {boolean} 14358 */ 14359 equals(obj) { 14360 if (!(obj != null && obj instanceof CommandUniformH4Polytope2.Edge)) return false;
14361 const that = obj; 14362 if (this.p1 === that.p1 && this.p2 === that.p2) return true; 14363 if (this.p1 === that.p2 && this.p2 === that.p1) return true; 14364 return false; 14365 } 14366 /** 14367 * 14368 * @return {number} 14369 */ 14370 hashCode() { 14371 return this.p1 ^ this.p2; 14372 } 14373 } 14374 CommandUniformH4Polytope2.Edge = Edge; 14375 Edge["__class"] = "com.vzome.core.commands.CommandUniformH4Polytope.Edge"; 14376})(CommandUniformH4Polytope || (CommandUniformH4Polytope = {})); 14377
14378// src/worker/legacy/from-java/com/vzome/core/commands/CommandRotate.ts 14379var CommandRotate = class extends CommandSymmetry { 14380 /** 14381 * 14382 * @param {ConstructionList} parameters 14383 * @param {AttributeMap} attributes 14384 * @param {*} effects 14385 * @return {ConstructionList} 14386 */ 14387 apply(parameters, attributes, effects) { 14388 const center = this.setSymmetry(attributes); 14389 const norm = attributes.get(CommandTransform.SYMMETRY_AXIS_ATTR_NAME); 14390 if (norm == null) { 14391 throw new Command.Failure("no symmetry axis provided"); 14392 } 14393 const params = parameters.getConstructions(); 14394 const output = new ConstructionList(); 14395 let vector = norm.getOffset(); 14396 vector = norm.getField().projectTo3d(vector, true); 14397 const axis = this.mSymmetry["getAxis$com_vzome_core_algebra_AlgebraicVector"](vector); 14398 const rotation = axis.getRotation(); 14399 const transform = new SymmetryTransformation(this.mSymmetry, rotation, center); 14400 effects["constructionAdded$com_vzome_core_construction_Construction"](transform); 14401 output.addAll(this.transform(params, transform, effects)); 14402 return output; 14403 } 14404 constructor() { 14405 super(); 14406 } 14407}; 14408CommandRotate["__class"] = "com.vzome.core.commands.CommandRotate"; 14409CommandRotate["__interfaces"] = ["com.vzome.core.commands.Command"]; 14410
14411// src/worker/legacy/from-java/com/vzome/core/commands/CommandAxialSymmetry.ts 14412var CommandAxialSymmetry = class extends CommandSymmetry { 14413 constructor(symmetry = null) { 14414 super(symmetry); 14415 } 14416 /** 14417 * 14418 * @param {ConstructionList} parameters 14419 * @param {AttributeMap} attributes 14420 * @param {*} effects 14421 * @return {ConstructionList} 14422 */ 14423 apply(parameters, attributes, effects) { 14424 this.setSymmetry(attributes); 14425 const norm = attributes.get(CommandTransform.SYMMETRY_AXIS_ATTR_NAME); 14426 if (norm == null) { 14427 throw new Command.Failure("no symmetry axis provided"); 14428 } 14429 const output = new ConstructionList(); 14430 let vector = norm.getOffset(); 14431 vector = norm.getField().projectTo3d(vector, true); 14432 const axis = this.mSymmetry["getAxis$com_vzome_core_algebra_AlgebraicVector"](vector); 14433 const rotation = axis.getRotationPermutation(); 14434 if (rotation == null) { 14435 throw new Command.Failure("symmetry axis does not support axial symmetry"); 14436 } 14437 const order = rotation.getOrder(); 14438 const rotate = new CommandRotate(); 14439 for (let i = 1; i < order; i++) { 14440 { 14441 for (let index = parameters.iterator(); index.hasNext(); ) { 14442 let param = index.next(); 14443 { 14444 output.addConstruction(param); 14445 } 14446 } 14447 parameters = rotate.apply(parameters, attributes, effects); 14448 } 14449 ; 14450 } 14451 for (let index = parameters.iterator(); index.hasNext(); ) { 14452 let param = index.next(); 14453 { 14454 output.addConstruction(param); 14455 } 14456 } 14457 return output; 14458 } 14459}; 14460CommandAxialSymmetry["__class"] = "com.vzome.core.commands.CommandAxialSymmetry"; 14461CommandAxialSymmetry["__interfaces"] = ["com.vzome.core.commands.Command"]; 14462
14463// src/worker/legacy/from-java/com/vzome/core/construction/PointRotated4D.ts 14464var PointRotated4D = class extends Point { 14465 constructor(leftQuaternion, rightQuaternion, prototype) { 14466 super(prototype.field); 14467 if (this.mLeftQuaternion === void 0) { 14468 this.mLeftQuaternion = null; 14469 } 14470 if (this.mRightQuaternion === void 0) { 14471 this.mRightQuaternion = null; 14472 } 14473 if (this.mPrototype === void 0) { 14474 this.mPrototype = null; 14475 } 14476 this.mLeftQuaternion = leftQuaternion; 14477 this.mRightQuaternion = rightQuaternion; 14478 this.mPrototype = prototype; 14479 this.mapParamsToState(); 14480 } 14481 /** 14482 * 14483 * @return {boolean} 14484 */ 14485 mapParamsToState() { 14486 if (this.mPrototype.isImpossible()) return this.setStateVariable(null, true); 14487 const field5 = this.mPrototype.getField(); 14488 let loc = field5.origin(4); 14489 const loc3d = this.mPrototype.getLocation(); 14490 loc = loc3d.inflateTo4d$boolean(true); 14491 loc = this.mRightQuaternion.leftMultiply(loc); 14492 loc = this.mLeftQuaternion.rightMultiply(loc); 14493 return this.setStateVariable(loc, false); 14494 } 14495}; 14496PointRotated4D["__class"] = "com.vzome.core.construction.PointRotated4D"; 14497
14498// src/worker/legacy/from-java/com/vzome/core/construction/PolygonRotated4D.ts 14499var PolygonRotated4D = class extends Polygon { 14500 constructor(leftQuaternion, rightQuaternion, prototype) { 14501 super(prototype.field); 14502 if (this.mLeftQuaternion === void 0) { 14503 this.mLeftQuaternion = null; 14504 } 14505 if (this.mRightQuaternion === void 0) { 14506 this.mRightQuaternion = null; 14507 } 14508 if (this.mPrototype === void 0) { 14509 this.mPrototype = null; 14510 } 14511 this.mLeftQuaternion = leftQuaternion; 14512 this.mRightQuaternion = rightQuaternion; 14513 this.mPrototype = prototype; 14514 this.mapParamsToState(); 14515 } 14516 /** 14517 * 14518 * @return {boolean} 14519 */ 14520 mapParamsToState() { 14521 if (this.mPrototype.isImpossible()) return this.setStateVariable(null, true); 14522 const vertices = ((s) => { 14523 let a = []; 14524 while (s-- > 0) a.push(null); 14525 return a; 14526 })(this.mPrototype.getVertexCount()); 14527 for (let i = 0; i < vertices.length; i++) { 14528 { 14529 let loc = this.mRightQuaternion.leftMultiply(this.mPrototype.getVertex(i)); 14530 loc = this.mLeftQuaternion.rightMultiply(loc); 14531 vertices[i] = loc; 14532 } 14533 ; 14534 } 14535 return this.setStateVariable(vertices, false); 14536 } 14537}; 14538PolygonRotated4D["__class"] = "com.vzome.core.construction.PolygonRotated4D"; 14539
14540// src/worker/legacy/from-java/com/vzome/core/construction/SegmentRotated4D.ts 14541var SegmentRotated4D = class _SegmentRotated4D extends Segment { 14542 static logger_$LI$() { 14543 if (_SegmentRotated4D.logger == null) { 14544 _SegmentRotated4D.logger = java.util.logging.Logger.getLogger("com.vzome.core.4d"); 14545 } 14546 return _SegmentRotated4D.logger; 14547 } 14548 constructor(leftQuaternion, rightQuaternion, prototype) { 14549 super(prototype.field); 14550 if (this.mLeftQuaternion === void 0) { 14551 this.mLeftQuaternion = null; 14552 } 14553 if (this.mRightQuaternion === void 0) { 14554 this.mRightQuaternion = null; 14555 } 14556 if (this.mPrototype === void 0) { 14557 this.mPrototype = null; 14558 } 14559 this.mLeftQuaternion = leftQuaternion; 14560 this.mRightQuaternion = rightQuaternion; 14561 this.mPrototype = prototype; 14562 this.mapParamsToState(); 14563 } 14564 /** 14565 * 14566 * @return {boolean} 14567 */ 14568 mapParamsToState() { 14569 if (this.mPrototype.isImpossible()) return this.setStateVariables(null, null, true); 14570 let loc = this.mPrototype.getStart(); 14571 loc = loc.inflateTo4d$boolean(true); 14572 loc = this.mRightQuaternion.leftMultiply(loc); 14573 loc = this.mLeftQuaternion.rightMultiply(loc); 14574 let end = this.mPrototype.getEnd(); 14575 end = end.inflateTo4d$boolean(true); 14576 end = this.mRightQuaternion.leftMultiply(end); 14577 end = this.mLeftQuaternion.rightMultiply(end); 14578 if (_SegmentRotated4D.logger_$LI$().isLoggable(java.util.logging.Level.FINER)) { 14579 _SegmentRotated4D.logger_$LI$().finer("------------------- SegmentRotated4D"); 14580 _SegmentRotated4D.logger_$LI$().finer("left: " + this.mLeftQuaternion.toString()); 14581 _SegmentRotated4D.logger_$LI$().finer("right: " + this.mRightQuaternion.toString()); 14582 _SegmentRotated4D.logger_$LI$().finer("start: " + this.mPrototype.getStart().getVectorExpression$int(AlgebraicField.EXPRESSION_FORMAT)); 14583 _SegmentRotated4D.logger_$LI$().finer("end: " + this.mPrototype.getEnd().getVectorExpression$int(AlgebraicField.EXPRESSION_FORMAT)); 14584 _SegmentRotated4D.logger_$LI$().finer("new start: " + loc.getVectorExpression$int(AlgebraicField.EXPRESSION_FORMAT)); 14585 _SegmentRotated4D.logger_$LI$().finer("new end: " + end.getVectorExpression$int(AlgebraicField.EXPRESSION_FORMAT)); 14586 } 14587 return this.setStateVariables(loc, end.minus(loc), false); 14588 } 14589}; 14590SegmentRotated4D["__class"] = "com.vzome.core.construction.SegmentRotated4D"; 14591
14592// src/worker/legacy/from-java/com/vzome/core/commands/CommandQuaternionSymmetry.ts 14593var CommandQuaternionSymmetry = class _CommandQuaternionSymmetry extends CommandTransform { 14594 /** 14595 * 14596 * @param {AttributeMap} attributes 14597 * @param {XmlSaveFormat} format 14598 */ 14599 setFixedAttributes(attributes, format) { 14600 super.setFixedAttributes(attributes, format); 14601 if (!attributes.containsKey(_CommandQuaternionSymmetry.LEFT_SYMMETRY_GROUP_ATTR_NAME_$LI$())) { 14602 this.mLeft = format.getQuaternionicSymmetry("H_4"); 14603 attributes.put(_CommandQuaternionSymmetry.LEFT_SYMMETRY_GROUP_ATTR_NAME_$LI$(), this.mLeft); 14604 } 14605 if (!attributes.containsKey(_CommandQuaternionSymmetry.RIGHT_SYMMETRY_GROUP_ATTR_NAME)) { 14606 this.mRight = format.getQuaternionicSymmetry("H_4"); 14607 attributes.put(_CommandQuaternionSymmetry.RIGHT_SYMMETRY_GROUP_ATTR_NAME, this.mRight); 14608 } 14609 } 14610 static LEFT_SYMMETRY_GROUP_ATTR_NAME_$LI$() { 14611 if (_CommandQuaternionSymmetry.LEFT_SYMMETRY_GROUP_ATTR_NAME == null) { 14612 _CommandQuaternionSymmetry.LEFT_SYMMETRY_GROUP_ATTR_NAME = CommandTransform.SYMMETRY_GROUP_ATTR_NAME; 14613 } 14614 return _CommandQuaternionSymmetry.LEFT_SYMMETRY_GROUP_ATTR_NAME; 14615 } 14616 static { 14617 this.RIGHT_SYMMETRY_GROUP_ATTR_NAME = "right.symmetry.group"; 14618 } 14619 constructor(left, right) { 14620 if ((left != null && left instanceof QuaternionicSymmetry || left === null) && (right != null && right instanceof QuaternionicSymmetry || right === null)) { 14621 let __args = arguments; 14622 super(); 14623 if (this.mLeft === void 0) { 14624 this.mLeft = null; 14625 } 14626 if (this.mRight === void 0) { 14627 this.mRight = null; 14628 } 14629 this.mLeft = left; 14630 this.mRight = right; 14631 } else if (left === void 0 && right === void 0) { 14632 let __args = arguments; 14633 super(); 14634 if (this.mLeft === void 0) { 14635 this.mLeft = null; 14636 } 14637 if (this.mRight === void 0) { 14638 this.mRight = null; 14639 } 14640 } else throw new Error("invalid overload"); 14641 } 14642 /** 14643 * 14644 * @return {java.lang.Object[][]} 14645 */ 14646 getAttributeSignature() { 14647 return CommandTransform.GROUP_ATTR_SIGNATURE_$LI$(); 14648 } 14649 /** 14650 * 14651 * @param {ConstructionList} parameters 14652 * @param {AttributeMap} attributes 14653 * @param {*} effects 14654 * @return {ConstructionList} 14655 */ 14656 apply(parameters, attributes, effects) { 14657 if (this.mLeft == null) this.mLeft = attributes.get(_CommandQuaternionSymmetry.LEFT_SYMMETRY_GROUP_ATTR_NAME_$LI$()); 14658 else if (!attributes.containsKey(_CommandQuaternionSymmetry.LEFT_SYMMETRY_GROUP_ATTR_NAME_$LI$())) attributes.put(_CommandQuaternionSymmetry.LEFT_SYMMETRY_GROUP_ATTR_NAME_$LI$(), this.mLeft); 14659 if (this.mRight == null) this.mRight = attributes.get(_CommandQuaternionSymmetry.RIGHT_SYMMETRY_GROUP_ATTR_NAME); 14660 else if (!attributes.containsKey(_CommandQuaternionSymmetry.RIGHT_SYMMETRY_GROUP_ATTR_NAME)) attributes.put(_CommandQuaternionSymmetry.RIGHT_SYMMETRY_GROUP_ATTR_NAME, this.mRight); 14661 const leftRoots = this.mLeft.getRoots(); 14662 const rightRoots = this.mRight.getRoots(); 14663 const params = parameters.getConstructions(); 14664 const output = new ConstructionList(); 14665 for (let index = 0; index < params.length; index++) { 14666 let param = params[index]; 14667 { 14668 output.addConstruction(param); 14669 } 14670 } 14671 for (let index = 0; index < leftRoots.length; index++) { 14672 let leftRoot = leftRoots[index]; 14673 { 14674 for (let index1 = 0; index1 < rightRoots.length; index1++) { 14675 let rightRoot = rightRoots[index1]; 14676 { 14677 for (let index2 = 0; index2 < params.length; index2++) { 14678 let param = params[index2]; 14679 { 14680 let result = null; 14681 if (param != null && param instanceof Point) { 14682 result = new PointRotated4D(leftRoot, rightRoot, param); 14683 } else if (param != null && param instanceof Segment) { 14684 result = new SegmentRotated4D(leftRoot, rightRoot, param); 14685 } else if (param != null && param instanceof Polygon) { 14686 result = new PolygonRotated4D(leftRoot, rightRoot, param); 14687 } else { 14688 } 14689 if (result == null) continue; 14690 effects["constructionAdded$com_vzome_core_construction_Construction"](result); 14691 output.addConstruction(result); 14692 } 14693 } 14694 } 14695 } 14696 } 14697 } 14698 return output; 14699 } 14700}; 14701CommandQuaternionSymmetry["__class"] = "com.vzome.core.commands.CommandQuaternionSymmetry"; 14702CommandQuaternionSymmetry["__interfaces"] = ["com.vzome.core.commands.Command"]; 14703
14704// src/worker/legacy/from-java/com/vzome/core/construction/VefToModel.ts 14705var VefToModel = class _VefToModel extends VefParser { 14706 static logger_$LI$() { 14707 if (_VefToModel.logger == null) { 14708 _VefToModel.logger = java.util.logging.Logger.getLogger("com.vzome.core.construction.VefToModel"); 14709 } 14710 return _VefToModel.logger; 14711 } 14712 constructor(projection, effects, scale, offset) { 14713 super(); 14714 if (this.offset === void 0) { 14715 this.offset = null; 14716 } 14717 if (this.scale === void 0) { 14718 this.scale = null; 14719 } 14720 if (this.__com_vzome_core_construction_VefToModel_field === void 0) { 14721 this.__com_vzome_core_construction_VefToModel_field = null; 14722 } 14723 if (this.mProjection === void 0) { 14724 this.mProjection = null; 14725 } 14726 if (this.mVertices === void 0) { 14727 this.mVertices = null; 14728 } 14729 if (this.mEffects === void 0) { 14730 this.mEffects = null; 14731 } 14732 this.noBallsSection = true; 14733 this.mEffects = effects; 14734 this.__com_vzome_core_construction_VefToModel_field = scale.getField(); 14735 this.scale = scale; 14736 this.offset = offset; 14737 this.mProjection = projection == null ? new Projection.Default(this.__com_vzome_core_construction_VefToModel_field) : projection; 14738 if (projection != null && _VefToModel.logger_$LI$().isLoggable(java.util.logging.Level.FINEST)) { 14739 _VefToModel.logger_$LI$().finest("projection = " + projection.getProjectionName()); 14740 } 14741 } 14742 /** 14743 * 14744 * @param {number} numVertices 14745 */ 14746 startVertices(numVertices) { 14747 this.mVertices = ((s) => { 14748 let a = []; 14749 while (s-- > 0) a.push(null); 14750 return a; 14751 })(numVertices); 14752 } 14753 /** 14754 * 14755 * @param {number} index 14756 * @param {AlgebraicVector} location 14757 */ 14758 addVertex(index, location) { 14759 _VefToModel.logger_$LI$().finest("addVertex location = " + location.getVectorExpression$int(AlgebraicField.VEF_FORMAT)); 14760 if (this.scale != null) { 14761 location = location.scale(this.scale); 14762 _VefToModel.logger_$LI$().finest("scaled = " + location.getVectorExpression$int(AlgebraicField.VEF_FORMAT)); 14763 } 14764 if (this.wFirst() && location.dimension() === 3) { 14765 location = location.inflateTo4d$(); 14766 } 14767 location = this.mProjection.projectImage(location, this.wFirst()); 14768 _VefToModel.logger_$LI$().finest("projected = " + location.getVectorExpression$int(AlgebraicField.VEF_FORMAT)); 14769 if (this.offset != null) { 14770 location = location.plus(this.offset); 14771 _VefToModel.logger_$LI$().finest("translated = " + location.getVectorExpression$int(AlgebraicField.VEF_FORMAT)); 14772 } 14773 this.mVertices[index] = new FreePoint(location); 14774 this.mVertices[index].setIndex(index); 14775 } 14776 /** 14777 * 14778 * @param {number} numEdges 14779 */ 14780 startEdges(numEdges) { 14781 } 14782 /** 14783 * 14784 * @param {number} index 14785 * @param {number} v1 14786 * @param {number} v2 14787 */ 14788 addEdge(index, v1, v2) { 14789 const p1 = this.mVertices[v1]; 14790 const p2 = this.mVertices[v2]; 14791 if (p1 == null || p2 == null) return; 14792 const seg = new SegmentJoiningPoints(p1, p2); 14793 seg.setIndex(index); 14794 this.mEffects["constructionAdded$com_vzome_core_construction_Construction"](seg); 14795 } 14796 /** 14797 * 14798 * @param {number} numFaces 14799 */ 14800 startFaces(numFaces) { 14801 } 14802 /** 14803 * 14804 * @param {number} index 14805 * @param {int[]} verts 14806 */ 14807 addFace(index, verts) { 14808 const points = ((s) => { 14809 let a = []; 14810 while (s-- > 0) a.push(null); 14811 return a; 14812 })(verts.length); 14813 for (let i = 0; i < verts.length; i++) { 14814 points[i] = this.mVertices[verts[i]]; 14815 } 14816 const panel = new PolygonFromVertices(points); 14817 panel.setIndex(index); 14818 this.mEffects["constructionAdded$com_vzome_core_construction_Construction"](panel); 14819 } 14820 /** 14821 * 14822 * @param {number} index 14823 * @param {number} vertex 14824 */ 14825 addBall(index, vertex) { 14826 this.mEffects["constructionAdded$com_vzome_core_construction_Construction"](this.mVertices[vertex]); 14827 } 14828 /** 14829 * 14830 * @param {number} numVertices 14831 */ 14832 startBalls(numVertices) { 14833 this.noBallsSection = false; 14834 } 14835 /** 14836 * 14837 * @param {java.util.StringTokenizer} tokens 14838 */ 14839 endFile(tokens) { 14840 if (this.noBallsSection) { 14841 for (let index = 0; index < this.mVertices.length; index++) { 14842 let vertex = this.mVertices[index]; 14843 { 14844 this.mEffects["constructionAdded$com_vzome_core_construction_Construction"](vertex); 14845 } 14846 } 14847 } 14848 } 14849}; 14850VefToModel["__class"] = "com.vzome.core.construction.VefToModel"; 14851
14852// src/worker/legacy/from-java/com/vzome/core/commands/CommandImportVEFData.ts 14853var CommandImportVEFData = class _CommandImportVEFData extends AbstractCommand { 14854 static { 14855 this.X = 0; 14856 } 14857 static { 14858 this.Y = 1; 14859 } 14860 static { 14861 this.Z = 2; 14862 } 14863 static { 14864 this.W = 3; 14865 } 14866 static { 14867 this.VEF_STRING_ATTR_NAME = "org.vorthmann.zome.commands.CommandImportVEFData.vef.string"; 14868 } 14869 static { 14870 this.FIELD_ATTR_NAME = "org.vorthmann.zome.commands.CommandImportVEFData.field"; 14871 } 14872 static { 14873 this.NO_INVERSION_ATTR_NAME = "org.vorthmann.zome.commands.CommandImportVEFData.no.inversion"; 14874 } 14875 static PARAM_SIGNATURE_$LI$() { 14876 if (_CommandImportVEFData.PARAM_SIGNATURE == null) { 14877 _CommandImportVEFData.PARAM_SIGNATURE = [[Command.GENERIC_PARAM_NAME, Construction]]; 14878 } 14879 return _CommandImportVEFData.PARAM_SIGNATURE; 14880 } 14881 static ATTR_SIGNATURE_$LI$() { 14882 if (_CommandImportVEFData.ATTR_SIGNATURE == null) { 14883 _CommandImportVEFData.ATTR_SIGNATURE = [[_CommandImportVEFData.VEF_STRING_ATTR_NAME, String], [Command.FIELD_ATTR_NAME, java.io.InputStream], [_CommandImportVEFData.NO_INVERSION_ATTR_NAME, java.io.InputStream]]; 14884 } 14885 return _CommandImportVEFData.ATTR_SIGNATURE; 14886 } 14887 constructor(projection) { 14888 if (projection != null && (projection.constructor != null && projection.constructor["__interfaces"] != null && projection.constructor["__interfaces"].indexOf("com.vzome.core.math.Projection") >= 0) || projection === null) { 14889 let __args = arguments; 14890 super(); 14891 if (this.mProjection === void 0) { 14892 this.mProjection = null; 14893 } 14894 this.quaternionVector = null; 14895 this.mProjection = projection; 14896 } else if (projection === void 0) { 14897 let __args = arguments; 14898 { 14899 let __args2 = arguments; 14900 let projection2 = null; 14901 super(); 14902 if (this.mProjection === void 0) { 14903 this.mProjection = null; 14904 } 14905 this.quaternionVector = null; 14906 this.mProjection = projection2; 14907 } 14908 } else throw new Error("invalid overload"); 14909 } 14910 /** 14911 * 14912 * @return {java.lang.Object[][]} 14913 */ 14914 getParameterSignature() { 14915 return _CommandImportVEFData.PARAM_SIGNATURE_$LI$(); 14916 } 14917 /** 14918 * 14919 * @return {java.lang.Object[][]} 14920 */ 14921 getAttributeSignature() { 14922 return _CommandImportVEFData.ATTR_SIGNATURE_$LI$(); 14923 } 14924 /** 14925 * 14926 * @param {string} attrName 14927 * @return {boolean} 14928 */ 14929 attributeIs3D(attrName) { 14930 return !("symmetry.axis.segment" === attrName); 14931 } 14932 /** 14933 * Only called when migrating a 2.0 model file. 14934 * @param {AlgebraicVector} offset 14935 */ 14936 setQuaternion(offset) { 14937 this.quaternionVector = offset; 14938 } 14939 /** 14940 * 14941 * @param {*} xml 14942 * @param {XmlSaveFormat} format 14943 * @return {AttributeMap} 14944 */ 14945 setXml(xml, format) { 14946 const attrs = super.setXml(xml, format); 14947 this.quaternionVector = format.parseRationalVector(xml, "quaternion"); 14948 return attrs; 14949 } 14950 /** 14951 * 14952 * @param {*} result 14953 * @param {AttributeMap} attributes 14954 */ 14955 getXml(result, attributes) { 14956 if (this.quaternionVector != null) DomUtils.addAttribute(result, "quaternion", this.quaternionVector.toParsableString()); 14957 super.getXml(result, attributes); 14958 } 14959 /** 14960 * 14961 * @param {AttributeMap} attributes 14962 * @param {XmlSaveFormat} format 14963 */ 14964 setFixedAttributes(attributes, format) { 14965 if (!attributes.containsKey(_CommandImportVEFData.FIELD_ATTR_NAME)) attributes.put(_CommandImportVEFData.FIELD_ATTR_NAME, format.getField()); 14966 super.setFixedAttributes(attributes, format); 14967 } 14968 /** 14969 * 14970 * @param {ConstructionList} parameters 14971 * @param {AttributeMap} attributes 14972 * @param {*} effects 14973 * @return {ConstructionList} 14974 */ 14975 apply(parameters, attributes, effects) { 14976 const result = new ConstructionList(); 14977 let field5 = attributes.get(_CommandImportVEFData.FIELD_ATTR_NAME); 14978 if (field5 == null) field5 = attributes.get(Command.FIELD_ATTR_NAME); 14979 const symmAxis = attributes.get(CommandTransform.SYMMETRY_AXIS_ATTR_NAME); 14980 const vefData = attributes.get(_CommandImportVEFData.VEF_STRING_ATTR_NAME); 14981 const noInversion = attributes.get(_CommandImportVEFData.NO_INVERSION_ATTR_NAME); 14982 let projection = this.mProjection; 14983 if (projection == null) { 14984 let quaternion = this.quaternionVector;
14985 if (quaternion == null) quaternion = symmAxis == null ? null : symmAxis.getOffset(); 14986 if (quaternion != null) quaternion = quaternion.scale(field5["createPower$int"](-5)); 14987 projection = quaternion == null ? null : new QuaternionProjection(field5, null, quaternion); 14988 } 14989 if (noInversion != null && noInversion) new _CommandImportVEFData.VefToModelNoInversion(this, projection, field5, effects).parseVEF(vefData, field5); 14990 else new VefToModel(projection, effects, field5["createPower$int"](5), null).parseVEF(vefData, field5); 14991 return result; 14992 } 14993}; 14994CommandImportVEFData["__class"] = "com.vzome.core.commands.CommandImportVEFData"; 14995CommandImportVEFData["__interfaces"] = ["com.vzome.core.commands.Command"]; 14996((CommandImportVEFData2) => { 14997 class VefToModelNoInversion extends VefToModel { 14998 constructor(__parent, projection, field5, effects) { 14999 super(projection, effects, field5["createPower$int"](5), null); 15000 this.__parent = __parent; 15001 if (this.mProjected === void 0) { 15002 this.mProjected = null; 15003 } 15004 this.mUsedPoints = new java.util.HashSet(); 15005 } 15006 /** 15007 * 15008 * @param {number} index 15009 * @param {AlgebraicVector} location 15010 */ 15011 addVertex(index, location) { 15012 if (this.scale != null) { 15013 location = location.scale(this.scale); 15014 } 15015 if (this.mProjection != null) location = this.mProjection.projectImage(location, this.wFirst()); 15016 this.mVertices[index] = new FreePoint(location); 15017 } 15018 /** 15019 * 15020 * @param {number} numEdges 15021 */ 15022 startEdges(numEdges) { 15023 this.mProjected = (function(dims) { 15024 let allocate = function(dims2) { 15025 if (dims2.length === 0) { 15026 return null; 15027 } else { 15028 let array = []; 15029 for (let i = 0; i < dims2[0]; i++) { 15030 array.push(allocate(dims2.slice(1))); 15031 } 15032 return array; 15033 } 15034 }; 15035 return allocate(dims); 15036 })([numEdges, 2]); 15037 } 15038 /** 15039 * 15040 * @param {number} index 15041 * @param {number} v1 15042 * @param {number} v2 15043 */ 15044 addEdge(index, v1, v2) { 15045 const p1 = this.mVertices[v1]; 15046 const p2 = this.mVertices[v2]; 15047 if (p1 == null || p2 == null) return; 15048 const seg = new SegmentJoiningPoints(p1, p2); 15049 const pr1 = p1.getLocation().projectTo3d(this.wFirst()).negate(); 15050 const pr2 = p2.getLocation().projectTo3d(this.wFirst()).negate(); 15051 for (let i = 0; i < index; i++) { 15052 { 15053 if (pr1.equals(this.mProjected[i][0]) && pr2.equals(this.mProjected[i][1])) return; 15054 if (pr2.equals(this.mProjected[i][0]) && pr1.equals(this.mProjected[i][1])) return; 15055 } 15056 ; 15057 } 15058 this.mProjected[index][0] = pr1.negate(); 15059 this.mProjected[index][1] = pr2.negate(); 15060 this.mEffects["constructionAdded$com_vzome_core_construction_Construction"](seg); 15061 this.mUsedPoints.add(p1); 15062 this.mUsedPoints.add(p2); 15063 } 15064 /** 15065 * 15066 */ 15067 endEdges() { 15068 for (let index = this.mUsedPoints.iterator(); index.hasNext(); ) { 15069 let point = index.next(); 15070 { 15071 this.mEffects["constructionAdded$com_vzome_core_construction_Construction"](point); 15072 } 15073 } 15074 } 15075 } 15076 CommandImportVEFData2.VefToModelNoInversion = VefToModelNoInversion; 15077 VefToModelNoInversion["__class"] = "com.vzome.core.commands.CommandImportVEFData.VefToModelNoInversion"; 15078})(CommandImportVEFData || (CommandImportVEFData = {})); 15079
15080// src/worker/legacy/from-java/com/vzome/core/commands/CommandVanOss600Cell.ts 15081var CommandVanOss600Cell = class _CommandVanOss600Cell extends CommandImportVEFData { 15082 /** 15083 * 15084 * @param {ConstructionList} parameters 15085 * @param {AttributeMap} attributes 15086 * @param {*} effects 15087 * @return {ConstructionList} 15088 */ 15089 apply(parameters, attributes, effects) { 15090 try { 15091 const input = this.constructor.getClassLoader().getResourceAsStream("com/vzome/core/commands/600cell.vef"); 15092 const out = new java.io.ByteArrayOutputStream(); 15093 const buf = ((s) => { 15094 let a = []; 15095 while (s-- > 0) a.push(0); 15096 return a; 15097 })(1024); 15098 let num; 15099 while ((num = input.read(buf, 0, 1024)) > 0) { 15100 out.write(buf, 0, num); 15101 } 15102 ; 15103 const vefData = new String(out.toByteArray()); 15104 const result = new ConstructionList(); 15105 let field5 = attributes.get(CommandImportVEFData.FIELD_ATTR_NAME); 15106 if (field5 == null) field5 = attributes.get(Command.FIELD_ATTR_NAME); 15107 new _CommandVanOss600Cell.VefToModel(this, null, effects).parseVEF(vefData, field5); 15108 return result; 15109 } catch (exc) { 15110 throw new Command.Failure(exc); 15111 } 15112 } 15113 constructor() { 15114 super(); 15115 } 15116}; 15117CommandVanOss600Cell["__class"] = "com.vzome.core.commands.CommandVanOss600Cell"; 15118CommandVanOss600Cell["__interfaces"] = ["com.vzome.core.commands.Command"]; 15119((CommandVanOss600Cell2) => { 15120 class VefToModel2 extends VefParser { 15121 constructor(__parent, quaternion, effects) { 15122 super(); 15123 this.__parent = __parent; 15124 if (this.mProjection === void 0) { 15125 this.mProjection = null; 15126 } 15127 if (this.mVertices === void 0) { 15128 this.mVertices = null; 15129 } 15130 if (this.mEffects === void 0) { 15131 this.mEffects = null; 15132 } 15133 if (this.mLocations === void 0) { 15134 this.mLocations = null; 15135 } 15136 this.mEffects = effects; 15137 } 15138 /** 15139 * 15140 * @param {number} numVertices 15141 */ 15142 startVertices(numVertices) { 15143 this.mVertices = ((s) => { 15144 let a = []; 15145 while (s-- > 0) a.push(null); 15146 return a; 15147 })(numVertices); 15148 this.mLocations = ((s) => { 15149 let a = []; 15150 while (s-- > 0) a.push(null); 15151 return a; 15152 })(numVertices); 15153 this.mProjection = null; 15154 } 15155 /** 15156 * 15157 * @param {number} index 15158 * @param {AlgebraicVector} location 15159 */ 15160 addVertex(index, location) { 15161 this.mLocations[index] = location; 15162 } 15163 /** 15164 * 15165 */ 15166 endVertices() { 15167 const field5 = this.getField();
15168 const half = field5["createRational$long$long"](1, 2); 15169 const quarter = field5["createRational$long$long"](1, 4); 15170 const centroid = this.mLocations[0].plus(this.mLocations[48]).plus(this.mLocations[50]).plus(this.mLocations[64]).scale(quarter); 15171 const edgeCenter = this.mLocations[0].plus(this.mLocations[48]).scale(half); 15172 const vertex = this.mLocations[50]; 15173 const edgeToVertex = vertex.minus(edgeCenter); 15174 const edgeToCenter = centroid.minus(edgeCenter); 15175 const symmCenter1 = edgeCenter.plus(edgeToCenter.scale(field5["createAlgebraicNumber$int$int$int$int"](0, 3, 5, 0))); 15176 const symmCenter2 = edgeCenter.plus(edgeToVertex.scale(field5["createAlgebraicNumber$int$int$int$int"](0, 2, 5, 0))); 15177 const direction = symmCenter2.minus(symmCenter1); 15178 const target = symmCenter1.plus(direction.scale(field5["createAlgebraicNumber$int$int$int$int"](0, 1, 1, 0))); 15179 this.mProjection = new QuaternionProjection(field5, null, target); 15180 const power5 = field5["createPower$int"](5); 15181 for (let i = 0; i < this.mLocations.length; i++) { 15182 { 15183 let location = this.mLocations[i].scale(power5); 15184 location = this.mProjection.projectImage(location, this.wFirst()); 15185 this.mVertices[i] = new FreePoint(location); 15186 this.mEffects["constructionAdded$com_vzome_core_construction_Construction"](this.mVertices[i]); 15187 } 15188 ; 15189 } 15190 } 15191 /** 15192 * 15193 * @param {number} index 15194 * @param {number} v1 15195 * @param {number} v2 15196 */ 15197 addEdge(index, v1, v2) { 15198 const p1 = this.mVertices[v1]; 15199 const p2 = this.mVertices[v2]; 15200 if (p1 == null || p2 == null) { 15201 console.info("skipping " + v1 + " " + v2); 15202 return; 15203 } 15204 const seg = new SegmentJoiningPoints(p1, p2); 15205 this.mEffects["constructionAdded$com_vzome_core_construction_Construction"](seg); 15206 } 15207 /** 15208 * 15209 * @param {number} numEdges 15210 */ 15211 startEdges(numEdges) { 15212 } 15213 /** 15214 * 15215 * @param {number} numFaces 15216 */ 15217 startFaces(numFaces) { 15218 } 15219 /** 15220 * 15221 * @param {number} index 15222 * @param {int[]} verts 15223 */ 15224 addFace(index, verts) { 15225 } 15226 /** 15227 * 15228 * @param {number} index 15229 * @param {number} vertex 15230 */ 15231 addBall(index, vertex) { 15232 } 15233 /** 15234 * 15235 * @param {number} numVertices 15236 */ 15237 startBalls(numVertices) { 15238 } 15239 } 15240 CommandVanOss600Cell2.VefToModel = VefToModel2; 15241 VefToModel2["__class"] = "com.vzome.core.commands.CommandVanOss600Cell.VefToModel"; 15242})(CommandVanOss600Cell || (CommandVanOss600Cell = {})); 15243
15244// src/worker/legacy/from-java/com/vzome/core/tools/AxialStretchTool.ts 15245var AxialStretchTool = class _AxialStretchTool extends TransformationTool { 15246 static { 15247 this.TOOLTIP_REDSQUASH1 = '<p>Each tool applies a "squash" transformation to the<br>selected objects, compressing along a red axis. To create<br>a tool, select a ball as the center of the mapping, and a<br>red strut as the direction of the compression. The ball and<br>strut need not be collinear.<br><br>The mapping comes from the usual Zome projection of the<br>120-cell. It is the mapping that transforms the central,<br>blue dodecahedron into the compressed form in the next<br>layer outward.<br><br>By default, the input selection will be removed, and replaced<br>with the squashed equivalent. If you want to keep the inputs,<br>you can right-click after creating the tool, to configure it.<br></p>'; 15248 } 15249 static { 15250 this.TOOLTIP_REDSTRETCH1 = '<p>Each tool applies a "stretch" transformation to the<br>selected objects, stretching along a red axis. To create<br>a tool, select a ball as the center of the mapping, and a<br>red strut as the direction of the stretch. The ball and<br>strut need not be collinear.<br><br>The mapping comes from the usual Zome projection of the<br>120-cell. It is the inverse of the mapping that transforms<br>the central, blue dodecahedron into the compressed form in<br>the next layer outward.<br><br>By default, the input selection will be removed, and replaced<br>with the stretched equivalent. If you want to keep the inputs,<br>you can right-click after creating the tool, to configure it.<br></p>'; 15251 } 15252 static { 15253 this.TOOLTIP_YELLOWSQUASH = '<p>Each tool applies a "squash" transformation to the<br>selected objects, compressing along a yellow axis. To create<br>a tool, select a ball as the center of the mapping, and a<br>yellow strut as the direction of the compression. The ball and<br>strut need not be collinear.<br><br>The mapping comes from the usual Zome projection of the<br>120-cell. It is the mapping that transforms the central,<br>blue dodecahedron into the compressed form along a yellow axis.<br><br>By default, the input selection will be removed, and replaced<br>with the squashed equivalent. If you want to keep the inputs,<br>you can right-click after creating the tool, to configure it.<br></p>'; 15254 } 15255 static { 15256 this.TOOLTIP_YELLOWSTRETCH = '<p>Each tool applies a "stretch" transformation to the<br>selected objects, stretching along a yellow axis. To create<br>a tool, select a ball as the center of the mapping, and a<br>yellow strut as the direction of the stretch. The ball and<br>strut need not be collinear.<br><br>The mapping comes from the usual Zome projection of the<br>120-cell. It is the inverse of the mapping that transforms<br>the central, blue dodecahedron into the compressed form along<br>a yellow axis.<br><br>By default, the input selection will be removed, and replaced<br>with the stretched equivalent. If you want to keep the inputs,<br>you can right-click after creating the tool, to configure it.<br></p>'; 15257 } 15258 static { 15259 this.TOOLTIP_REDSQUASH2 = '<p>Each tool applies a "squash" transformation to the<br>selected objects, compressing along a red axis. To create<br>a tool, select a ball as the center of the mapping, and a<br>red strut as the direction of the compression. The ball and<br>strut need not be collinear.<br><br>The mapping comes from the usual Zome projection of the<br>120-cell. It is the mapping that transforms the central,<br>blue dodecahedron into the compressed form in the second<br>layer outward along a red axis.<br><br>By default, the input selection will be removed, and replaced<br>with the squashed equivalent. If you want to keep the inputs,<br>you can right-click after creating the tool, to configure it.<br></p>'; 15260 } 15261 static { 15262 this.TOOLTIP_REDSTRETCH2 = '<p>Each tool applies a "stretch" transformation to the<br>selected objects, stretching along a red axis. To create<br>a tool, select a ball as the center of the mapping, and a<br>red strut as the direction of the stretch. The ball and<br>strut need not be collinear.<br><br>The mapping comes from the usual Zome projection of the<br>120-cell. It is the inverse of the mapping that transforms<br>the central, blue dodecahedron into the compressed form in<br>the second layer outward along a red axis.<br><br>By default, the input selection will be removed, and replaced<br>with the stretched equivalent. If you want to keep the inputs,<br>
15262you can right-click after creating the tool, to configure it.<br></p>'; 15263 } 15264 constructor(id, symmetry, tools, stretch, red, first, category) { 15265 super(id, tools); 15266 if (this.symmetry === void 0) { 15267 this.symmetry = null; 15268 } 15269 if (this.stretch === void 0) { 15270 this.stretch = false; 15271 } 15272 if (this.red === void 0) { 15273 this.red = false; 15274 } 15275 if (this.first === void 0) { 15276 this.first = false; 15277 } 15278 if (this.__com_vzome_core_tools_AxialStretchTool_category === void 0) { 15279 this.__com_vzome_core_tools_AxialStretchTool_category = null; 15280 } 15281 this.symmetry = symmetry; 15282 this.stretch = stretch; 15283 this.red = red; 15284 this.first = first; 15285 this.__com_vzome_core_tools_AxialStretchTool_category = category; 15286 this.setInputBehaviors(false, true); 15287 } 15288 /** 15289 * 15290 * @param {boolean} prepareTool 15291 * @return {string} 15292 */ 15293 checkSelection(prepareTool) { 15294 let center = null; 15295 let axis = null; 15296 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 15297 let man = index.next(); 15298 { 15299 if (prepareTool) this.unselect$com_vzome_core_model_Manifestation(man); 15300 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) { 15301 if (center != null) return "Only one ball may be selected"; 15302 center = man.getFirstConstruction(); 15303 } else if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) { 15304 if (axis != null) return "Only one strut may be selected"; 15305 axis = man.getFirstConstruction(); 15306 } else if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0)) { 15307 return "Panels are not supported."; 15308 } 15309 } 15310 } 15311 if (center == null) return "Exactly one ball must be selected."; 15312 if (axis == null) return "Exactly one strut must be selected."; 15313 const zone = this.symmetry.getAxis$com_vzome_core_algebra_AlgebraicVector(axis.getOffset()); 15314 if (zone == null) return "Selected alignment strut is not an appropriate axis."; 15315 let o0; 15316 let o1; 15317 let o2; 15318 let n0; 15319 let n1; 15320 let n2; 15321 switch (zone.getDirection().getName()) { 15322 case "yellow": 15323 { 15324 if (this.red) return "A red axis strut must be selected."; 15325 const blueOrbit = this.symmetry.getDirection("blue"); 15326 const blueScale = blueOrbit.getUnitLength(); 15327 o0 = blueOrbit.getAxis$int$int(Symmetry.PLUS, 2).normal().scale(blueScale); 15328 o1 = blueOrbit.getAxis$int$int(Symmetry.PLUS, 54).normal().scale(blueScale); 15329 o2 = blueOrbit.getAxis$int$int(Symmetry.PLUS, 36).normal().scale(blueScale); 15330 const redOrbit = this.symmetry.getDirection("red"); 15331 const redScale = redOrbit.getUnitLength(); 15332 n0 = redOrbit.getAxis$int$int(Symmetry.PLUS, 2).normal().scale(redScale); 15333 n1 = redOrbit.getAxis$int$int(Symmetry.PLUS, 46).normal().scale(redScale); 15334 n2 = redOrbit.getAxis$int$int(Symmetry.PLUS, 16).normal().scale(redScale); 15335 break; 15336 } 15337 ; 15338 case "red": 15339 { 15340 if (!this.red) return "A yellow axis strut must be selected."; 15341 const blueOrbit = this.symmetry.getDirection("blue"); 15342 const blueScale = blueOrbit.getUnitLength(); 15343 const redOrbit = this.symmetry.getDirection("red"); 15344 let redScale = redOrbit.getUnitLength(); 15345 if (this.first) { 15346 o0 = blueOrbit.getAxis$int$int(Symmetry.PLUS, 56).normal().scale(blueScale); 15347 o1 = blueOrbit.getAxis$int$int(Symmetry.PLUS, 38).normal().scale(blueScale); 15348 o2 = blueOrbit.getAxis$int$int(Symmetry.PLUS, 40).normal().scale(blueScale); 15349 n0 = redOrbit.getAxis$int$int(Symmetry.PLUS, 46).normal().scale(redScale); 15350 n1 = redOrbit.getAxis$int$int(Symmetry.PLUS, 1).normal().scale(redScale); 15351 n2 = redOrbit.getAxis$int$int(Symmetry.PLUS, 2).normal().scale(redScale); 15352 } else { 15353 o0 = blueOrbit.getAxis$int$int(Symmetry.PLUS, 37).normal().scale(blueScale); 15354 o1 = blueOrbit.getAxis$int$int(Symmetry.PLUS, 25).normal().scale(blueScale); 15355 o2 = blueOrbit.getAxis$int$int(Symmetry.PLUS, 45).normal().scale(blueScale); 15356 n0 = blueOrbit.getAxis$int$int(Symmetry.PLUS, 37).normal().scale(blueScale); 15357 n1 = blueOrbit.getAxis$int$int(Symmetry.PLUS, 25).normal().scale(blueScale);
15358 redScale = redScale["times$com_vzome_core_algebra_AlgebraicNumber"](this.symmetry.getField()["createPower$int"](-1)); 15359 n2 = redOrbit.getAxis$int$int(Symmetry.PLUS, 45).normal().scale(redScale); 15360 } 15361 break; 15362 } 15363 ; 15364 default: 15365 return "Selected alignment strut is not an appropriate axis."; 15366 } 15367 if (prepareTool) { 15368 const orientation = this.symmetry.getMatrix(zone.getOrientation()); 15369 const inverse = orientation.inverse(); 15370 let oldBasis = new AlgebraicMatrix(o0, o1, o2); 15371 let newBasis = new AlgebraicMatrix(n0, n1, n2); 15372 if (this.stretch) { 15373 const temp = oldBasis; 15374 oldBasis = newBasis; 15375 newBasis = temp; 15376 } 15377 const matrix = orientation.times(newBasis.times(oldBasis.inverse()).times(inverse)); 15378 this.transforms = [null]; 15379 this.transforms[0] = new MatrixTransformation(matrix, center.getLocation()); 15380 } 15381 return null; 15382 } 15383 /** 15384 * 15385 * @return {string} 15386 */ 15387 getXmlElementName() { 15388 return "AxialStretchTool"; 15389 } 15390 /** 15391 * 15392 * @param {*} element 15393 */ 15394 getXmlAttributes(element) { 15395 super.getXmlAttributes(element); 15396 if (this.stretch) element.setAttribute("stretch", "true"); 15397 element.setAttribute("orbit", this.red ? "red" : "yellow"); 15398 if (!this.first) element.setAttribute("first", "false"); 15399 } 15400 /** 15401 * 15402 * @param {*} element 15403 * @param {XmlSaveFormat} format 15404 */ 15405 setXmlAttributes(element, format) { 15406 let value = element.getAttribute("stretch"); 15407 this.stretch = value != null && value === "true"; 15408 value = element.getAttribute("orbit"); 15409 this.red = value === "red"; 15410 value = element.getAttribute("first"); 15411 this.first = value == null || !(value === "false"); 15412 this.__com_vzome_core_tools_AxialStretchTool_category = _AxialStretchTool.Factory.getCategory(this.red, this.stretch, this.first); 15413 this.symmetry = format.parseSymmetry("icosahedral"); 15414 super.setXmlAttributes(element, format); 15415 } 15416 /** 15417 * 15418 * @return {string} 15419 */ 15420 getCategory() { 15421 return this.__com_vzome_core_tools_AxialStretchTool_category; 15422 } 15423}; 15424AxialStretchTool["__class"] = "com.vzome.core.tools.AxialStretchTool"; 15425AxialStretchTool["__interfaces"] = ["com.vzome.api.Tool"]; 15426((AxialStretchTool2) => { 15427 class Factory extends AbstractToolFactory { 15428 static getCategory(red, stretch, first) { 15429 if (red) if (first) return stretch ? "redstretch1" : "redsquash1"; 15430 else return stretch ? "redstretch2" : "redsquash2"; 15431 else return stretch ? "yellowstretch" : "yellowsquash"; 15432 } 15433 static getLabel(red, stretch, first) { 15434 let label; 15435 if (red) if (first) label = stretch ? "weak red stretch" : "weak red squash"; 15436 else label = stretch ? "strong red stretch" : "strong red squash"; 15437 else label = stretch ? "yellow stretch" : "yellow squash"; 15438 return "Create a " + label + " tool"; 15439 } 15440 static getToolTip(red, stretch, first) { 15441 if (red) if (first) return stretch ? AxialStretchTool2.TOOLTIP_REDSTRETCH1 : AxialStretchTool2.TOOLTIP_REDSQUASH1; 15442 else return stretch ? AxialStretchTool2.TOOLTIP_REDSTRETCH2 : AxialStretchTool2.TOOLTIP_REDSQUASH2; 15443 else return stretch ? AxialStretchTool2.TOOLTIP_YELLOWSTRETCH : AxialStretchTool2.TOOLTIP_YELLOWSQUASH; 15444 } 15445 constructor(tools, symmetry, red, stretch, first) { 15446 super(tools, symmetry, Factory.getCategory(red, stretch, first), Factory.getLabel(red, stretch, first), Factory.getToolTip(red, stretch, first)); 15447 if (this.red === void 0) { 15448 this.red = false; 15449 } 15450 if (this.stretch === void 0) { 15451 this.stretch = false; 15452 } 15453 if (this.first === void 0) { 15454 this.first = false; 15455 } 15456 this.red = red; 15457 this.stretch = stretch; 15458 this.first = first; 15459 } 15460 /** 15461 * 15462 * @param {number} total 15463 * @param {number} balls 15464 * @param {number} struts 15465 * @param {number} panels 15466 * @return {boolean} 15467 */ 15468 countsAreValid(total, balls, struts, panels) { 15469 return total === 2 && balls === 1 && struts === 1; 15470 } 15471 /** 15472 * 15473 * @param {string} id 15474 * @return {Tool} 15475 */ 15476 createToolInternal(id) { 15477 const category = Factory.getCategory(this.red, this.stretch, this.first);
15478 return new AxialStretchTool2(id, this.getSymmetry(), this.getToolsModel(), this.stretch, this.red, this.first, category); 15479 } 15480 /** 15481 * 15482 * @return {Tool} 15483 */ 15484 createTool() { 15485 const result = super.createTool(); 15486 result.setCopyColors(false); 15487 return result; 15488 } 15489 /** 15490 * 15491 * @param {*} selection 15492 * @return {boolean} 15493 */ 15494 bindParameters(selection) { 15495 const symmetry = this.getSymmetry(); 15496 for (let index = selection.iterator(); index.hasNext(); ) { 15497 let man = index.next(); 15498 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) { 15499 const axisStrut = man; 15500 let vector = axisStrut.getOffset(); 15501 vector = symmetry.getField().projectTo3d(vector, true); 15502 const axis = symmetry.getAxis$com_vzome_core_algebra_AlgebraicVector(vector); 15503 if (axis == null) return false; 15504 const orbitName = axis.getDirection().getName(); 15505 if (this.red) return orbitName === "red"; 15506 else return orbitName === "yellow"; 15507 } 15508 } 15509 return true; 15510 } 15511 } 15512 AxialStretchTool2.Factory = Factory; 15513 Factory["__class"] = "com.vzome.core.tools.AxialStretchTool.Factory"; 15514 Factory["__interfaces"] = ["com.vzome.core.editor.SelectionSummary.Listener", "com.vzome.api.Tool.Factory"]; 15515})(AxialStretchTool || (AxialStretchTool = {})); 15516
15517// src/worker/legacy/from-java/com/vzome/core/tools/IcosahedralToolFactory.ts 15518var IcosahedralToolFactory = class _IcosahedralToolFactory extends AbstractToolFactory { 15519 static { 15520 this.ID = "icosahedral"; 15521 } 15522 static { 15523 this.LABEL = "Create an icosahedral symmetry tool"; 15524 } 15525 static { 15526 this.TOOLTIP = "<p>Each tool produces up to 59 copies of the input<br>selection, using the rotation symmetries of an<br>icosahedron. To create a tool, select a single<br>ball that defines the center of symmetry.<br><br>Combine with a point reflection tool to achieve<br>all 120 symmetries of the icosahedron, including<br>reflections.<br></p>"; 15527 } 15528 constructor(tools, symmetry) { 15529 super(tools, symmetry, _IcosahedralToolFactory.ID, _IcosahedralToolFactory.LABEL, _IcosahedralToolFactory.TOOLTIP); 15530 } 15531 /** 15532 * 15533 * @param {number} total 15534 * @param {number} balls 15535 * @param {number} struts 15536 * @param {number} panels 15537 * @return {boolean} 15538 */ 15539 countsAreValid(total, balls, struts, panels) { 15540 return total === 1 && balls === 1; 15541 } 15542 /** 15543 * 15544 * @param {string} id 15545 * @return {Tool} 15546 */ 15547 createToolInternal(id) {
15548 return new SymmetryTool(id, this.getSymmetry(), this.getToolsModel()); 15549 } 15550 /** 15551 * 15552 * @param {*} selection 15553 * @return {boolean} 15554 */ 15555 bindParameters(selection) { 15556 return selection.size() === 1 && (selection.iterator().next() != null && (selection.iterator().next().constructor != null && selection.iterator().next().constructor["__interfaces"] != null && selection.iterator().next().constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)); 15557 } 15558}; 15559IcosahedralToolFactory["__class"] = "com.vzome.core.tools.IcosahedralToolFactory"; 15560IcosahedralToolFactory["__interfaces"] = ["com.vzome.core.editor.SelectionSummary.Listener", "com.vzome.api.Tool.Factory"]; 15561
15562// src/worker/legacy/from-java/com/vzome/core/viewing/ExportedVEFStrutGeometry.ts 15563var ExportedVEFStrutGeometry = class _ExportedVEFStrutGeometry { 15564 static LOGGER_$LI$() { 15565 if (_ExportedVEFStrutGeometry.LOGGER == null) { 15566 _ExportedVEFStrutGeometry.LOGGER = java.util.logging.Logger.getLogger("com.vzome.core.viewing.ExportedVEFStrutGeometry"); 15567 } 15568 return _ExportedVEFStrutGeometry.LOGGER; 15569 } 15570 constructor(vertices, faces, prototype, fullScaleVertices, halfScaleVertices, field5) { 15571 if ((vertices != null && (vertices.constructor != null && vertices.constructor["__interfaces"] != null && vertices.constructor["__interfaces"].indexOf("java.util.List") >= 0) || vertices === null) && (faces != null && (faces.constructor != null && faces.constructor["__interfaces"] != null && faces.constructor["__interfaces"].indexOf("java.util.List") >= 0) || faces === null) && (prototype != null && prototype instanceof AlgebraicVector || prototype === null) && (fullScaleVertices != null && (fullScaleVertices.constructor != null && fullScaleVertices.constructor["__interfaces"] != null && fullScaleVertices.constructor["__interfaces"].indexOf("java.util.Set") >= 0) || fullScaleVertices === null) && (halfScaleVertices != null && (halfScaleVertices.constructor != null && halfScaleVertices.constructor["__interfaces"] != null && halfScaleVertices.constructor["__interfaces"].indexOf("java.util.Set") >= 0) || halfScaleVertices === null) && (field5 != null && (field5.constructor != null && field5.constructor["__interfaces"] != null && field5.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicField") >= 0) || field5 === null)) { 15572 let __args = arguments; 15573 if (this.prototypeVertices === void 0) { 15574 this.prototypeVertices = null; 15575 } 15576 if (this.prototypeFaces === void 0) { 15577 this.prototypeFaces = null; 15578 } 15579 if (this.field === void 0) { 15580 this.field = null; 15581 } 15582 if (this.prototypeVector === void 0) { 15583 this.prototypeVector = null; 15584 } 15585 if (this.fullScaleVertices === void 0) { 15586 this.fullScaleVertices = null; 15587 } 15588 if (this.halfScaleVertices === void 0) { 15589 this.halfScaleVertices = null; 15590 } 15591 this.shortGeometry = null; 15592 this.prototypeVertices = vertices; 15593 this.prototypeFaces = faces; 15594 this.prototypeVector = prototype; 15595 this.fullScaleVertices = fullScaleVertices; 15596 this.halfScaleVertices = halfScaleVertices; 15597 this.field = field5; 15598 } else if ((vertices != null && (vertices.constructor != null && vertices.constructor["__interfaces"] != null && vertices.constructor["__interfaces"].indexOf("java.util.List") >= 0) || vertices === null) && (faces != null && (faces.constructor != null && faces.constructor["__interfaces"] != null && faces.constructor["__interfaces"].indexOf("java.util.List") >= 0) || faces === null) && (prototype != null && prototype instanceof AlgebraicVector || prototype === null) && (fullScaleVertices != null && (fullScaleVertices.constructor != null && fullScaleVertices.constructor["__interfaces"] != null && fullScaleVertices.constructor["__interfaces"].indexOf("java.util.Set") >= 0) || fullScaleVertices === null) && (halfScaleVertices != null && (halfScaleVertices.constructor != null && halfScaleVertices.constructor["__interfaces"] != null && halfScaleVertices.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicField") >= 0) || halfScaleVertices === null) && field5 === void 0) { 15599 let __args = arguments; 15600 let field6 = __args[4]; 15601 { 15602 let __args2 = arguments; 15603 let halfScaleVertices2 = null; 15604 if (this.prototypeVertices === void 0) { 15605 this.prototypeVertices = null; 15606 } 15607 if (this.prototypeFaces === void 0) { 15608 this.prototypeFaces = null; 15609 } 15610 if (this.field === void 0) { 15611 this.field = null; 15612 } 15613 if (this.prototypeVector === void 0) { 15614 this.prototypeVector = null; 15615 } 15616 if (this.fullScaleVertices === void 0) { 15617 this.fullScaleVertices = null; 15618 } 15619 if (this.halfScaleVertices === void 0) { 15620 this.halfScaleVertices = null; 15621 } 15622 this.shortGeometry = null; 15623 this.prototypeVertices = vertices; 15624 this.prototypeFaces = faces; 15625 this.prototypeVector = prototype; 15626 this.fullScaleVertices = fullScaleVertices; 15627 this.halfScaleVertices = halfScaleVertices2; 15628 this.field = field6; 15629 } 15630 } else throw new Error("invalid overload"); 15631 } 15632 getTriangles() {
15633 return this.getStrutPolyhedron(this.field.one()).getTriangleFaces(); 15634 } 15635 /** 15636 * 15637 * @param {*} length 15638 * @return {Polyhedron} 15639 */ 15640 getStrutPolyhedron(length) { 15641 const tipVertex = this.prototypeVector.scale(length); 15642 let maxNonTipDistance = 0; 15643 let minTipDistance = tipVertex.toRealVector().length(); 15644 const midpoint = tipVertex.scale(this.field["createRational$long$long"](1, 2)); 15645 if (this.field.getName() === "snubDodec" && _ExportedVEFStrutGeometry.LOGGER_$LI$().isLoggable(java.util.logging.Level.FINE)) { 15646 _ExportedVEFStrutGeometry.LOGGER_$LI$().fine("proto length = " + this.prototypeVector.toRealVector().length()); 15647 _ExportedVEFStrutGeometry.LOGGER_$LI$().fine("strut length = " + length.evaluate()); 15648 _ExportedVEFStrutGeometry.LOGGER_$LI$().fine("tip length = " + tipVertex.toRealVector().length()); 15649 } 15650 const result = new Polyhedron(this.field); 15651 for (let i = 0; i < this.prototypeVertices.size(); i++) { 15652 { 15653 let vertex = this.prototypeVertices.get(i); 15654 if (this.fullScaleVertices.contains(i)) { 15655 vertex = vertex.plus(tipVertex); 15656 minTipDistance = Math.min(minTipDistance, vertex.toRealVector().length()); 15657 } else { 15658 if (this.halfScaleVertices != null && this.halfScaleVertices.contains(i)) { 15659 vertex = vertex.plus(midpoint); 15660 } 15661 maxNonTipDistance = Math.max(maxNonTipDistance, vertex.toRealVector().length()); 15662 } 15663 result.addVertex(vertex); 15664 } 15665 ; 15666 } 15667 if (maxNonTipDistance > minTipDistance) { 15668 if (this.shortGeometry != null) { 15669 return this.shortGeometry.getStrutPolyhedron(length); 15670 } else return null; 15671 } 15672 for (let index = this.prototypeFaces.iterator(); index.hasNext(); ) { 15673 let prototypeFace = index.next(); 15674 { 15675 const face = result.newFace(); 15676 face.addAll(prototypeFace); 15677 result.addFace(face); 15678 } 15679 } 15680 return result; 15681 } 15682 setShortGeometry(shortGeometry) { 15683 this.shortGeometry = shortGeometry; 15684 } 15685}; 15686ExportedVEFStrutGeometry["__class"] = "com.vzome.core.viewing.ExportedVEFStrutGeometry"; 15687ExportedVEFStrutGeometry["__interfaces"] = ["com.vzome.core.parts.StrutGeometry"]; 15688
15689// src/worker/legacy/from-java/java/util/Properties.ts 15690var Properties = class { 15691 constructor() { 15692 /*private*/ 15693 this.map = {}; 15694 } 15695 getProperty(key) { 15696 const value = this.map[key]; 15697 return value === void 0 ? null : value; 15698 } 15699 setProperty(key, value) { 15700 this.map[key] = value; 15701 } 15702 load(inStream) { 15703 if (inStream == null) return; 15704 const bytes = []; 15705 let b; 15706 while ((b = inStream.read()) >= 0) bytes.push(b); 15707 const text = bytes.map((c) => String.fromCharCode(c)).join(""); 15708 for (const rawLine of text.split(/\r\n|\r|\n/)) { 15709 const line = rawLine.trim(); 15710 if (line.length === 0) continue; 15711 if (line.charAt(0) === "#" || line.charAt(0) === "!") continue; 15712 let sep = -1; 15713 for (let i = 0; i < line.length; i++) { 15714 const c = line.charAt(i); 15715 if (c === "=" || c === ":") { 15716 sep = i; 15717 break; 15718 } 15719 } 15720 if (sep < 0) { 15721 this.map[line] = ""; 15722 continue; 15723 } 15724 const key = line.substring(0, sep).trim(); 15725 const value = line.substring(sep + 1).trim(); 15726 if (key.length > 0) this.map[key] = value; 15727 } 15728 } 15729 isEmpty() { 15730 return Object.keys(this.map).length === 0; 15731 } 15732}; 15733Properties["__class"] = "java.util.Properties"; 15734
15735// src/worker/legacy/from-java/com/vzome/core/viewing/ExportedVEFShapes.ts 15736var ExportedVEFShapes = class _ExportedVEFShapes extends AbstractShapes { 15737 static LOGGER_$LI$() { 15738 if (_ExportedVEFShapes.LOGGER == null) { 15739 _ExportedVEFShapes.LOGGER = java.util.logging.Logger.getLogger("com.vzome.core.viewing.shapes"); 15740 } 15741 return _ExportedVEFShapes.LOGGER; 15742 } 15743 static { 15744 this.MODEL_PREFIX = "com/vzome/core/parts/"; 15745 } 15746 static { 15747 this.NODE_MODEL = "connector"; 15748 } 15749 static injectShapeVEF(key, vef) { 15750 } 15751 constructor(prefsFolder, pkgName, name, alias, symm, fallback, isSnub) { 15752 if ((prefsFolder != null && prefsFolder instanceof File || prefsFolder === null) && (typeof pkgName === "string" || pkgName === null) && (typeof name === "string" || name === null) && (typeof alias === "string" || alias === null) && (symm != null && (symm.constructor != null && symm.constructor["__interfaces"] != null && symm.constructor["__interfaces"].indexOf("com.vzome.core.math.symmetry.Symmetry") >= 0) || symm === null) && (fallback != null && fallback instanceof AbstractShapes || fallback === null) && (typeof isSnub === "boolean" || isSnub === null)) { 15753 let __args = arguments; 15754 super(pkgName, name, alias, symm); 15755 if (this.fallback === void 0) { 15756 this.fallback = null; 15757 } 15758 if (this.isSnub === void 0) { 15759 this.isSnub = false; 15760 } 15761 this.colors = new Properties(); 15762 this.fallback = fallback; 15763 this.isSnub = isSnub; 15764 const colorProps = _ExportedVEFShapes.MODEL_PREFIX + pkgName + "/colors.properties"; 15765 const resource = ResourceLoader.loadStringResource(colorProps); 15766 if (resource != null) try { 15767 const inputStream = new java.io.ByteArrayInputStream( 15768 /* getBytes */ 15769 resource.split("").map((s) => s.charCodeAt(0)) 15770 ); 15771 this.colors.load(inputStream); 15772 } catch (ioe) { 15773 if (_ExportedVEFShapes.LOGGER_$LI$().isLoggable(java.util.logging.Level.FINE)) _ExportedVEFShapes.LOGGER_$LI$().fine("problem with shape color properties: " + colorProps); 15774 } 15775 } else if ((prefsFolder != null && prefsFolder instanceof File || prefsFolder === null) && (typeof pkgName === "string" || pkgName === null) && (typeof name === "string" || name === null) && (typeof alias === "string" || alias === null) && (symm != null && (symm.constructor != null && symm.constructor["__interfaces"] != null && symm.constructor["__interfaces"].indexOf("com.vzome.core.math.symmetry.Symmetry") >= 0) || symm === null) && (fallback != null && fallback instanceof AbstractShapes || fallback === null) && isSnub === void 0) { 15776 let __args = arguments; 15777 { 15778 let __args2 = arguments; 15779 let isSnub2 = false; 15780 super(pkgName, name, alias, symm); 15781 if (this.fallback === void 0) { 15782 this.fallback = null; 15783 } 15784 if (this.isSnub === void 0) { 15785 this.isSnub = false; 15786 } 15787 this.colors = new Properties(); 15788 this.fallback = fallback; 15789 this.isSnub = isSnub2; 15790 const colorProps = _ExportedVEFShapes.MODEL_PREFIX + pkgName + "/colors.properties"; 15791 const resource = ResourceLoader.loadStringResource(colorProps); 15792 if (resource != null) try { 15793 const inputStream = new java.io.ByteArrayInputStream( 15794 /* getBytes */ 15795 resource.split("").map((s) => s.charCodeAt(0)) 15796 ); 15797 this.colors.load(inputStream); 15798 } catch (ioe) { 15799 if (_ExportedVEFShapes.LOGGER_$LI$().isLoggable(java.util.logging.Level.FINE)) _ExportedVEFShapes.LOGGER_$LI$().fine("problem with shape color properties: " + colorProps); 15800 } 15801 } 15802 } else if ((prefsFolder != null && prefsFolder instanceof File || prefsFolder === null) && (typeof pkgName === "string" || pkgName === null) && (typeof name === "string" || name === null) && (typeof alias === "string" || alias === null) && (symm != null && (symm.constructor != null && symm.constructor["__interfaces"] != null && symm.constructor["__interfaces"].indexOf("com.vzome.core.math.symmetry.Symmetry") >= 0) || symm === null) && fallback === void 0 && isSnub === void 0) { 15803 let __args = arguments; 15804 { 15805 let __args2 = arguments; 15806 let fallback2 = new OctahedralShapes(__args2[1], __args2[2], __args2[4]); 15807 { 15808 let __args3 = arguments; 15809 let isSnub2 = false;
15810 super(pkgName, name, alias, symm); 15811 if (this.fallback === void 0) { 15812 this.fallback = null; 15813 } 15814 if (this.isSnub === void 0) { 15815 this.isSnub = false; 15816 } 15817 this.colors = new Properties(); 15818 this.fallback = fallback2; 15819 this.isSnub = isSnub2; 15820 const colorProps = _ExportedVEFShapes.MODEL_PREFIX + pkgName + "/colors.properties"; 15821 const resource = ResourceLoader.loadStringResource(colorProps); 15822 if (resource != null) try { 15823 const inputStream = new java.io.ByteArrayInputStream( 15824 /* getBytes */ 15825 resource.split("").map((s) => s.charCodeAt(0)) 15826 ); 15827 this.colors.load(inputStream); 15828 } catch (ioe) { 15829 if (_ExportedVEFShapes.LOGGER_$LI$().isLoggable(java.util.logging.Level.FINE)) _ExportedVEFShapes.LOGGER_$LI$().fine("problem with shape color properties: " + colorProps); 15830 } 15831 } 15832 } 15833 } else if ((prefsFolder != null && prefsFolder instanceof File || prefsFolder === null) && (typeof pkgName === "string" || pkgName === null) && (typeof name === "string" || name === null) && (alias != null && (alias.constructor != null && alias.constructor["__interfaces"] != null && alias.constructor["__interfaces"].indexOf("com.vzome.core.math.symmetry.Symmetry") >= 0) || alias === null) && (symm != null && symm instanceof AbstractShapes || symm === null) && fallback === void 0 && isSnub === void 0) { 15834 let __args = arguments; 15835 let symm2 = __args[3]; 15836 let fallback2 = __args[4]; 15837 { 15838 let __args2 = arguments; 15839 let alias2 = null; 15840 { 15841 let __args3 = arguments; 15842 let isSnub2 = false; 15843 super(pkgName, name, alias2, symm2); 15844 if (this.fallback === void 0) { 15845 this.fallback = null; 15846 } 15847 if (this.isSnub === void 0) { 15848 this.isSnub = false; 15849 } 15850 this.colors = new Properties(); 15851 this.fallback = fallback2; 15852 this.isSnub = isSnub2; 15853 const colorProps = _ExportedVEFShapes.MODEL_PREFIX + pkgName + "/colors.properties"; 15854 const resource = ResourceLoader.loadStringResource(colorProps); 15855 if (resource != null) try { 15856 const inputStream = new java.io.ByteArrayInputStream( 15857 /* getBytes */ 15858 resource.split("").map((s) => s.charCodeAt(0)) 15859 ); 15860 this.colors.load(inputStream); 15861 } catch (ioe) { 15862 if (_ExportedVEFShapes.LOGGER_$LI$().isLoggable(java.util.logging.Level.FINE)) _ExportedVEFShapes.LOGGER_$LI$().fine("problem with shape color properties: " + colorProps); 15863 } 15864 } 15865 } 15866 } else if ((prefsFolder != null && prefsFolder instanceof File || prefsFolder === null) && (typeof pkgName === "string" || pkgName === null) && (typeof name === "string" || name === null) && (alias != null && (alias.constructor != null && alias.constructor["__interfaces"] != null && alias.constructor["__interfaces"].indexOf("com.vzome.core.math.symmetry.Symmetry") >= 0) || alias === null) && symm === void 0 && fallback === void 0 && isSnub === void 0) { 15867 let __args = arguments; 15868 let symm2 = __args[3]; 15869 { 15870 let __args2 = arguments; 15871 let alias2 = null; 15872 { 15873 let __args3 = arguments; 15874 let fallback2 = new OctahedralShapes(__args3[1], __args3[2], __args3[4]); 15875 { 15876 let __args4 = arguments; 15877 let isSnub2 = false; 15878 super(pkgName, name, alias2, symm2); 15879 if (this.fallback === void 0) { 15880 this.fallback = null; 15881 } 15882 if (this.isSnub === void 0) { 15883 this.isSnub = false; 15884 } 15885 this.colors = new Properties(); 15886 this.fallback = fallback2; 15887 this.isSnub = isSnub2; 15888 const colorProps = _ExportedVEFShapes.MODEL_PREFIX + pkgName + "/colors.properties"; 15889 const resource = ResourceLoader.loadStringResource(colorProps); 15890 if (resource != null) try { 15891 const inputStream = new java.io.ByteArrayInputStream( 15892 /* getBytes */ 15893 resource.split("").map((s) =>
15893 s.charCodeAt(0)) 15894 ); 15895 this.colors.load(inputStream); 15896 } catch (ioe) { 15897 if (_ExportedVEFShapes.LOGGER_$LI$().isLoggable(java.util.logging.Level.FINE)) _ExportedVEFShapes.LOGGER_$LI$().fine("problem with shape color properties: " + colorProps); 15898 } 15899 } 15900 } 15901 } 15902 } else throw new Error("invalid overload"); 15903 } 15904 /** 15905 * 15906 * @param {string} pkgName 15907 * @return {Polyhedron} 15908 */ 15909 buildConnectorShape(pkgName) { 15910 const vefData = this.loadVefData(_ExportedVEFShapes.NODE_MODEL); 15911 if (vefData != null) { 15912 const parser = new _ExportedVEFShapes.VefToShape(this); 15913 parser.invertSnubBall = this.isSnub; 15914 parser.parseVEF(vefData, this.mSymmetry.getField()); 15915 return parser.getConnectorPolyhedron(); 15916 } 15917 const logLevel = java.util.logging.Level.FINE; 15918 if (_ExportedVEFShapes.LOGGER_$LI$().isLoggable(logLevel)) { 15919 _ExportedVEFShapes.LOGGER_$LI$().log(logLevel, this.toString() + " has no VEF data for " + _ExportedVEFShapes.NODE_MODEL + " at " + pkgName); 15920 } 15921 if (this.fallback != null) { 15922 if (_ExportedVEFShapes.LOGGER_$LI$().isLoggable(logLevel)) { 15923 _ExportedVEFShapes.LOGGER_$LI$().log(logLevel, " " + _ExportedVEFShapes.NODE_MODEL + " --> fallback to " + this.fallback.toString()); 15924 } 15925 return this.fallback.buildConnectorShape(pkgName); 15926 } 15927 throw new java.lang.IllegalStateException("missing connector shape: " + pkgName); 15928 } 15929 /** 15930 * 15931 * @param {Direction} dir 15932 * @return {*} 15933 */ 15934 createStrutGeometry(dir) { 15935 if (!dir.isAutomatic()) { 15936 const defaultGeometry = new FastDefaultStrutGeometry(dir); 15937 let shortGeometry = defaultGeometry; 15938 let vefData = this.loadVefData(dir.getName() + "-short"); 15939 if (vefData != null) { 15940 const parser = new _ExportedVEFShapes.VefToShape(this); 15941 parser.parseVEF(vefData, this.mSymmetry.getField()); 15942 shortGeometry = parser.getStrutGeometry(dir.getAxis$int$int(Symmetry.PLUS, 0).normal()); 15943 shortGeometry.setShortGeometry(defaultGeometry); 15944 } 15945 vefData = this.loadVefData(dir.getName()); 15946 if (vefData != null) { 15947 const parser = new _ExportedVEFShapes.VefToShape(this); 15948 parser.parseVEF(vefData, this.mSymmetry.getField()); 15949 const geometry = parser.getStrutGeometry(dir.getAxis$int$int(Symmetry.PLUS, 0).normal()); 15950 geometry.setShortGeometry(shortGeometry); 15951 return geometry; 15952 } 15953 const logLevel = java.util.logging.Level.FINER; 15954 if (_ExportedVEFShapes.LOGGER_$LI$().isLoggable(logLevel)) { 15955 _ExportedVEFShapes.LOGGER_$LI$().log(logLevel, this.toString() + " has no VEF data for strut: " + dir.getName()); 15956 } 15957 if (this.fallback != null) { 15958 if (_ExportedVEFShapes.LOGGER_$LI$().isLoggable(logLevel)) { 15959 _ExportedVEFShapes.LOGGER_$LI$().log(logLevel, " " + dir.getName() + " strut --> fallback to " + this.fallback.toString()); 15960 } 15961 return this.fallback.createStrutGeometry(dir); 15962 } 15963 } 15964 return super.createStrutGeometry(dir); 15965 } 15966 loadVefData(name) { 15967 const script = this.mPkgName + "/" + name + ".vef"; 15968 return ResourceLoader.loadStringResource(_ExportedVEFShapes.MODEL_PREFIX + script); 15969 } 15970 /** 15971 * 15972 * @return {boolean} 15973 */ 15974 hasColors() { 15975 return !this.colors.isEmpty(); 15976 } 15977 /** 15978 * 15979 * @param {Direction} dir 15980 * @return {Color} 15981 */ 15982 getColor(dir) { 15983 if (this.colors.isEmpty()) return null; 15984 const dirName = dir == null ? _ExportedVEFShapes.NODE_MODEL : dir.getName(); 15985 const colorString = this.colors.getProperty(dirName); 15986 if (colorString == null) return null; 15987 return Colors.parseColor(colorString); 15988 } 15989}; 15990ExportedVEFShapes["__class"] = "com.vzome.core.viewing.ExportedVEFShapes"; 15991ExportedVEFShapes["__interfaces"] = ["com.vzome.core.editor.api.Shapes"]; 15992((ExportedVEFShapes2) => { 15993 class VefToShape extends VefParser { 15994 getStrutGeometry(prototype) { 15995 const tipAxis = this.__parent.mSymmetry["getAxis$com_vzome_core_algebra_AlgebraicVector"](this.tipVertex); 15996 const midpoint = this.tipVertex.scale(this.__parent.mSymmetry.getField()["createRational$long$long"](1, 2)); 15997 const orientation = this.__parent.mSymmetry.inverse(tipAxis.getOrientation()); 15998 const adjustment = this.__parent.mSymmetry.getMatrix(orientation); 15999 const newVertices = new java.util.ArrayList(); 16000 for (let i = 0; i < this.vertices.size(); i++) { 16001 { 16002 let originalVertex = this.vertices.get(i); 16003 if (this.tipVertexIndices.contains(i)) originalVertex = originalVertex.minus(this.tipVertex); 16004 else if (this.midpointVertexIndices.contains(i)) originalVertex = originalVertex.minus(midpoint); 16005 const adjustedVertex = adjustment.timesColumn(originalVertex); 16006 newVertices.add(adjustedVertex); 16007 } 16008 ; 16009 } 16010 return new ExportedVEFStrutGeometry(newVertices, this.faces, prototype, this.tipVertexIndices, this.midpointVertexIndices, this.__parent.mSymmetry.getField()); 16011 } 16012 getConnectorPolyhedron() { 16013 const result = new Polyhedron(this.__parent.mSymmetry.getField()); 16014 for (let index = this.vertices.iterator(); index.hasNext(); ) { 16015 let vertex = index.next(); 16016 { 16017 result.addVertex(vertex); 16018 } 16019 } 16020 for (let index = this.faces.iterator(); index.hasNext(); ) { 16021 let prototypeFace = index.next(); 16022 { 16023 const face = result.newFace(); 16024 face.addAll(prototypeFace); 16025 result.addFace(face); 16026 } 16027 } 16028 return result; 16029 } 16030 /** 16031 * 16032 * @param {number} index 16033 * @param {int[]} verts 16034 */ 16035 addFace(index, verts) { 16036 const face = new java.util.ArrayList(); 16037 for (let i = 0; i < verts.length; i++) { 16038 { 16039 const n = this.invertSnubBall ? verts.length - 1 - i : i; 16040 const j = verts[n]; 16041 face.add(j); 16042 } 16043 ; 16044 } 16045 this.faces.add(face); 16046 } 16047 /** 16048 * 16049 * @param {number} index 16050 * @param {AlgebraicVector} location 16051 */ 16052 addVertex(index, location) { 16053 let vertex = this.__parent.mSymmetry.getField().projectTo3d(location, this.wFirst()); 16054 if (this.invertSnubBall) { 16055 vertex = vertex.negate(); 16056 } 16057 this.vertices.add(vertex); 16058 } 16059 /** 16060 * 16061 * @param {number} index 16062 * @param {number} vertex 16063 */ 16064 addBall(index, vertex) { 16065 this.tipVertexIndices.add(vertex); 16066 } 16067 /** 16068 * 16069 * @param {java.util.StringTokenizer} tokens 16070 */ 16071 endFile(tokens) { 16072 if (!tokens.hasMoreTokens()) return; 16073 let token = tokens.nextToken(); 16074 if (!("tip" === token)) throw new java.lang.IllegalStateException('VEF format error: token after face list ("' + token + '" should be "tip"');
16075 try { 16076 token = tokens.nextToken(); 16077 } catch (e1) { 16078 throw new java.lang.IllegalStateException('VEF format error: no tokens after "tip"'); 16079 } 16080 let tipIndex; 16081 try { 16082 tipIndex = javaemul.internal.IntegerHelper.parseInt(token); 16083 } catch (e) { 16084 throw new java.lang.RuntimeException('VEF format error: strut tip vertex index ("' + token + '") must be an integer', e); 16085 } 16086 this.tipVertex = this.vertices.get(tipIndex); 16087 if (!tokens.hasMoreTokens()) return; 16088 token = tokens.nextToken(); 16089 if (!("middle" === token)) throw new java.lang.IllegalStateException('VEF format error: token after tip vertex ("' + token + '" should be "middle"'); 16090 while (tokens.hasMoreTokens()) { 16091 { 16092 token = tokens.nextToken(); 16093 let vertexIndex; 16094 try { 16095 vertexIndex = javaemul.internal.IntegerHelper.parseInt(token); 16096 } catch (e) { 16097 throw new java.lang.RuntimeException('VEF format error: middle vertex index ("' + token + '") must be an integer', e); 16098 } 16099 this.midpointVertexIndices.add(vertexIndex); 16100 } 16101 } 16102 ; 16103 } 16104 /** 16105 * 16106 * @param {number} numVertices 16107 */ 16108 startBalls(numVertices) { 16109 } 16110 /** 16111 * 16112 * @param {number} numEdges 16113 */ 16114 startEdges(numEdges) { 16115 } 16116 /** 16117 * 16118 * @param {number} index 16119 * @param {number} v1 16120 * @param {number} v2 16121 */ 16122 addEdge(index, v1, v2) { 16123 } 16124 /** 16125 * 16126 * @param {number} numFaces 16127 */ 16128 startFaces(numFaces) { 16129 } 16130 /** 16131 * 16132 * @param {number} numVertices 16133 */ 16134 startVertices(numVertices) { 16135 } 16136 constructor(__parent) { 16137 super(); 16138 this.__parent = __parent; 16139 this.tipVertexIndices = new java.util.HashSet(); 16140 this.midpointVertexIndices = new java.util.HashSet(); 16141 if (this.tipVertex === void 0) { 16142 this.tipVertex = null; 16143 } 16144 this.vertices = new java.util.ArrayList(); 16145 this.faces = new java.util.ArrayList(); 16146 this.invertSnubBall = false; 16147 } 16148 } 16149 ExportedVEFShapes2.VefToShape = VefToShape; 16150 VefToShape["__class"] = "com.vzome.core.viewing.ExportedVEFShapes.VefToShape"; 16151})(ExportedVEFShapes || (ExportedVEFShapes = {})); 16152
16153// src/worker/legacy/from-java/com/vzome/core/kinds/IcosahedralSymmetryPerspective.ts 16154var IcosahedralSymmetryPerspective = class extends AbstractSymmetryPerspective { 16155 constructor(af) { 16156 if (af != null && (af.constructor != null && af.constructor["__interfaces"] != null && af.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicField") >= 0) || af === null) { 16157 let __args = arguments; 16158 { 16159 let __args2 = arguments; 16160 let symm = new IcosahedralSymmetry(af); 16161 super(symm); 16162 if (this.qSymmH4 === void 0) { 16163 this.qSymmH4 = null; 16164 } 16165 if (this.qSymmH4_ROT === void 0) { 16166 this.qSymmH4_ROT = null; 16167 } 16168 if (this.qSymmT2 === void 0) { 16169 this.qSymmT2 = null; 16170 } 16171 if (this.cmdIcosasymm === void 0) { 16172 this.cmdIcosasymm = null; 16173 } 16174 if (this.cmdTetrasymm === void 0) { 16175 this.cmdTetrasymm = null; 16176 } 16177 if (this.cmdAxialsymm === void 0) { 16178 this.cmdAxialsymm = null; 16179 } 16180 if (this.cmdH4symmetry === void 0) { 16181 this.cmdH4symmetry = null; 16182 } 16183 if (this.cmdH4rotations === void 0) { 16184 this.cmdH4rotations = null; 16185 } 16186 if (this.cmdIxTsymmetry === void 0) { 16187 this.cmdIxTsymmetry = null; 16188 } 16189 if (this.cmdTxTsymmetry === void 0) { 16190 this.cmdTxTsymmetry = null; 16191 } 16192 if (this.cmdVanOss600cell === void 0) { 16193 this.cmdVanOss600cell = null; 16194 } 16195 const icosadefaultShapes = new ExportedVEFShapes(null, "default", "solid connectors", this.symmetry); 16196 const printableShapes = new ExportedVEFShapes(null, "printable", "printable", this.symmetry, icosadefaultShapes); 16197 const lifelikeShapes = new ExportedVEFShapes(null, "lifelike", "lifelike", this.symmetry, icosadefaultShapes); 16198 const tinyShapes = new ExportedVEFShapes(null, "tiny", "tiny connectors", this.symmetry); 16199 const tinyDodecs = new ExportedVEFShapes(null, "dodecs", "small dodecahedra", "tiny dodecahedra", this.symmetry, tinyShapes); 16200 const bigZome = new ExportedVEFShapes(null, "bigzome", "Big Zome", this.symmetry, tinyShapes); 16201 const noTwist = new ExportedVEFShapes(null, "noTwist", "no-twist 121 zone", null, this.symmetry); 16202 const vienne2 = new ExportedVEFShapes(null, "vienne2", "Vienne", this.symmetry, icosadefaultShapes); 16203 const vienne3 = new ExportedVEFShapes(null, "vienne3", "Vienne lifelike", this.symmetry, vienne2); 16204 const vienne = new ExportedVEFShapes(null, "vienne", "Vienne 121 zone", null, this.symmetry); 16205 const dimtoolShapes = new ExportedVEFShapes(null, "dimtool", "dimtool", this.symmetry, icosadefaultShapes); 16206 this.setDefaultGeometry(printableShapes); 16207 this.addShapes(icosadefaultShapes); 16208 this.addShapes(lifelikeShapes); 16209 this.addShapes(tinyShapes); 16210 this.addShapes(tinyDodecs); 16211 this.addShapes(bigZome); 16212 this.addShapes(noTwist); 16213 this.addShapes(vienne2); 16214 this.addShapes(vienne3); 16215 this.addShapes(vienne); 16216 this.addShapes(dimtoolShapes); 16217 const field5 = this.symmetry.getField(); 16218 this.qSymmH4 = new QuaternionicSymmetry("H_4", "com/vzome/core/math/symmetry/H4roots.vef", field5); 16219 this.qSymmH4_ROT = new QuaternionicSymmetry("H4_ROT", "com/vzome/core/math/symmetry/H4roots-rotationalSubgroup.vef", field5); 16220 this.qSymmT2 = new QuaternionicSymmetry("2T", "com/vzome/core/math/symmetry/binaryTetrahedralGroup.vef", field5); 16221 this.cmdIcosasymm = new CommandSymmetry(this.symmetry); 16222 this.cmdTetrasymm = new CommandTetrahedralSymmetry(this.symmetry); 16223 this.cmdAxialsymm = new CommandAxialSymmetry(this.symmetry); 16224 this.cmdH4symmetry = new CommandQuaternionSymmetry(this.qSymmH4, this.qSymmH4); 16225 this.cmdH4rotations = new CommandQuaternionSymmetry(this.qSymmH4_ROT, this.qSymmH4_ROT); 16226 this.cmdIxTsymmetry = new CommandQuaternionSymmetry(this.qSymmH4, this.qSymmT2); 16227 this.cmdTxTsymmetry = new CommandQuaternionSymmetry(this.qSymmT2, this.qSymmT2); 16228 this.cmdVanOss600cell = new CommandVanOss600Cell(); 16229 } 16230 } else if (af != null && af instanceof IcosahedralSymmetry || af === null) { 16231 let __args = arguments; 16232 let symm = __args[0]; 16233 super(symm); 16234 if (this.qSymmH4 === void 0) { 16235 this.qSymmH4 = null; 16236 } 16237 if (this.qSymmH4_ROT === void 0) { 16238 this.qSymmH4_ROT = null; 16239 } 16240 if (this.qSymmT2 === void 0) { 16241 this.qSymmT2 = null; 16242 } 16243 if (this.cmdIcosasymm === void 0) { 16244 this.cmdIcosasymm = null; 16245 } 16246 if (this.cmdTetrasymm === void 0) { 16247 this.cmdTetrasymm = null; 16248 } 16249 if (this.cmdAxialsymm === void 0) { 16250 this.cmdAxialsymm = null; 16251 } 16252 if (this.cmdH4symmetry === void 0) { 16253 this.cmdH4symmetry = null; 16254 } 16255 if (this.cmdH4rotations === void 0) { 16256 this.cmdH4rotations = null; 16257 } 16258 if (this.cmdIxTsymmetry === void 0) { 16259 this.cmdIxTsymmetry = null; 16260 } 16261 if (this.cmdTxTsymmetry === void 0) { 16262 this.cmdTxTsymmetry = null; 16263 } 16264 if (this.cmdVanOss600cell === void 0) { 16265 this.cmdVanOss600cell = null; 16266 } 16267 const icosadefaultShapes = new ExportedVEFShapes(null, "default", "solid connectors", this.symmetry); 16268 const printableShapes = new ExportedVEFShapes(null, "printable", "printable", this.symmetry, icosadefaultShapes); 16269 const lifelikeShapes = new ExportedVEFShapes(null, "lifelike", "lifelike", this.symmetry, icosadefaultShapes); 16270 const tinyShapes = new ExportedVEFShapes(null, "tiny", "tiny connectors", this.symmetry); 16271 const tinyDodecs = new ExportedVEFShapes(null, "dodecs", "small dodecahedra", "tiny dodecahedra", this.symmetry, tinyShapes); 16272 const bigZome = new ExportedVEFShapes(null, "bigzome", "Big Zome", this.symmetry, tinyShapes); 16273 const noTwist = new ExportedVEFShapes(null, "noTwist", "no-twist 121 zone", null, this.symmetry); 16274 const vienne2 = new ExportedVEFShapes(null, "vienne2", "Vienne", this.symmetry, icosadefaultShapes); 16275 const vienne3 = new ExportedVEFShapes(null, "vienne3", "Vienne lifelike", this.symmetry, vienne2); 16276 const vienne = new ExportedVEFShapes(null, "vienne", "Vienne 121 zone", null, this.symmetry); 16277 const dimtoolShapes = new ExportedVEFShapes(null, "dimtool", "dimtool", this.symmetry, icosadefaultShapes); 16278 this.setDefaultGeometry(printableShapes); 16279 this.addShapes(icosadefaultShapes); 16280 this.addShapes(lifelikeShapes); 16281 this.addShapes(tinyShapes); 16282 this.addShapes(tinyDodecs); 16283 this.addShapes(bigZome); 16284 this.addShapes(noTwist); 16285 this.addShapes(vienne2); 16286 this.addShapes(vienne3); 16287 this.addShapes(vienne); 16288 this.addShapes(dimtoolShapes); 16289 const field5 = this.symmetry.getField(); 16290 this.qSymmH4 = new QuaternionicSymmetry("H_4", "com/vzome/core/math/symmetry/H4roots.vef", field5); 16291 this.qSymmH4_ROT = new QuaternionicSymmetry("H4_ROT", "com/vzome/core/math/symmetry/H4roots-rotationalSubgroup.vef", field5); 16292 this.qSymmT2 = new QuaternionicSymmetry("2T", "com/vzome/core/math/symmetry/binaryTetrahedralGroup.vef", field5); 16293 this.cmdIcosasymm = new CommandSymmetry(this.symmetry); 16294 this.cmdTetrasymm = new CommandTetrahedralSymmetry(this.symmetry); 16295 this.cmdAxialsymm = new CommandAxialSymmetry(this.symmetry); 16296 this.cmdH4symmetry = new CommandQuaternionSymmetry(this.qSymmH4, this.qSymmH4); 16297 this.cmdH4rotations = new CommandQuaternionSymmetry(this.qSymmH4_ROT, this.qSymmH4_ROT); 16298 this.cmdIxTsymmetry = new CommandQuaternionSymmetry(this.qSymmH4, this.qSymmT2); 16299 this.cmdTxTsymmetry = new CommandQuaternionSymmetry(this.qSymmT2, this.qSymmT2); 16300 this.cmdVanOss600cell = new CommandVanOss600Cell(); 16301 } else throw new Error("invalid overload"); 16302 } 16303 /** 16304 * 16305 * @return {IcosahedralSymmetry} 16306 */ 16307 getSymmetry() { 16308 return this.symmetry; 16309 } 16310 /** 16311 * 16312 * @param {Tool.Kind} kind 16313 * @param {ToolsModel} tools 16314 * @return {*} 16315 */ 16316 createToolFactories(kind, tools) { 16317 const result = new java.util.ArrayList();
16318 const icosaSymm = this.getSymmetry(); 16319 switch (kind) { 16320 case Tool2.Kind.SYMMETRY: 16321 result.add(new IcosahedralToolFactory(tools, icosaSymm)); 16322 result.add(new TetrahedralToolFactory(tools, icosaSymm)); 16323 result.add(new InversionToolFactory(tools)); 16324 result.add(new LineReflectionToolFactory(tools)); 16325 result.add(new MirrorToolFactory(tools)); 16326 result.add(new AxialSymmetryToolFactory(tools, icosaSymm)); 16327 break; 16328 case Tool2.Kind.TRANSFORM: 16329 result.add(new ScalingToolFactory(tools, icosaSymm)); 16330 result.add(new RotationToolFactory(tools, icosaSymm)); 16331 result.add(new TranslationToolFactory(tools)); 16332 result.add(new ProjectionToolFactory(tools)); 16333 result.add(new PerspectiveProjectionToolFactory(tools)); 16334 break; 16335 case Tool2.Kind.LINEAR_MAP: 16336 result.add(new AxialStretchTool.Factory(tools, icosaSymm, true, true, true)); 16337 result.add(new AxialStretchTool.Factory(tools, icosaSymm, true, false, true)); 16338 result.add(new AxialStretchTool.Factory(tools, icosaSymm, true, true, false)); 16339 result.add(new AxialStretchTool.Factory(tools, icosaSymm, true, false, false)); 16340 result.add(new AxialStretchTool.Factory(tools, icosaSymm, false, true, false)); 16341 result.add(new AxialStretchTool.Factory(tools, icosaSymm, false, false, false)); 16342 result.add(new LinearMapToolFactory(tools, icosaSymm, false)); 16343 break; 16344 default: 16345 break; 16346 } 16347 return result; 16348 } 16349 /** 16350 * 16351 * @param {Tool.Kind} kind 16352 * @param {ToolsModel} tools 16353 * @return {*} 16354 */ 16355 predefineTools(kind, tools) { 16356 const result = new java.util.ArrayList(); 16357 const icosaSymm = this.getSymmetry(); 16358 switch (kind) { 16359 case Tool2.Kind.SYMMETRY: 16360 result.add(new IcosahedralToolFactory(tools, icosaSymm).createPredefinedTool("icosahedral around origin")); 16361 result.add(new TetrahedralToolFactory(tools, icosaSymm).createPredefinedTool("tetrahedral around origin")); 16362 result.add(new InversionToolFactory(tools).createPredefinedTool("reflection through origin")); 16363 result.add(new MirrorToolFactory(tools).createPredefinedTool("reflection through XY plane")); 16364 result.add(new MirrorToolFactory(tools).createPredefinedTool("reflection through X=Y green plane")); 16365 result.add(new AxialSymmetryToolFactory(tools, icosaSymm).createPredefinedTool("symmetry around red through origin")); 16366 break; 16367 case Tool2.Kind.TRANSFORM: 16368 result.add(new ScalingToolFactory(tools, icosaSymm).createPredefinedTool("scale down")); 16369 result.add(new ScalingToolFactory(tools, icosaSymm).createPredefinedTool("scale up")); 16370 result.add(new RotationToolFactory(tools, icosaSymm, true).createPredefinedTool("rotate around red through origin")); 16371 result.add(new TranslationToolFactory(tools).createPredefinedTool("b1 move along +X")); 16372 break; 16373 default: 16374 break; 16375 } 16376 return result; 16377 } 16378 /** 16379 * 16380 * @param {string} action 16381 * @return {*} 16382 */ 16383 getLegacyCommand(action) { 16384 switch (action) { 16385 case "icosasymm": 16386 return this.cmdIcosasymm; 16387 case "tetrasymm": 16388 return this.cmdTetrasymm; 16389 case "axialsymm": 16390 return this.cmdAxialsymm; 16391 case "h4symmetry": 16392 return this.cmdH4symmetry; 16393 case "h4rotations": 16394 return this.cmdH4rotations; 16395 case "IxTsymmetry": 16396 return this.cmdIxTsymmetry; 16397 case "TxTsymmetry": 16398 return this.cmdTxTsymmetry; 16399 case "vanOss600cell": 16400 return this.cmdVanOss600cell; 16401 default: 16402 return super.getLegacyCommand(action); 16403 } 16404 } 16405 getQuaternionSymmetry(name) { 16406 switch (name) { 16407 case "H_4": 16408 return this.qSymmH4; 16409 case "H4_ROT": 16410 return this.qSymmH4_ROT; 16411 case "2T": 16412 return this.qSymmT2; 16413 default: 16414 return null; 16415 } 16416 } 16417 /** 16418 * 16419 * @return {string} 16420 */ 16421 getModelResourcePath() { 16422 return "org/vorthmann/zome/app/icosahedral-vef.vZome"; 16423 } 16424}; 16425IcosahedralSymmetryPerspective["__class"] = "com.vzome.core.kinds.IcosahedralSymmetryPerspective"; 16426IcosahedralSymmetryPerspective["__interfaces"] = ["com.vzome.core.editor.SymmetryPerspective"]; 16427
16428// src/worker/legacy/from-java/com/vzome/core/kinds/GoldenFieldApplication.ts 16429var GoldenFieldApplication = class extends DefaultFieldApplication { 16430 constructor(field5) { 16431 super(field5); 16432 if (this.icosahedralPerspective === void 0) { 16433 this.icosahedralPerspective = null; 16434 } 16435 this.h4Builder = null; 16436 this.cmdTauDivide = new CommandTauDivision(); 16437 this.icosahedralPerspective = new IcosahedralSymmetryPerspective(this.getField()); 16438 const octahedralPerspective = super.getDefaultSymmetryPerspective(); 16439 const symm = octahedralPerspective.getSymmetry(); 16440 symm.createZoneOrbit$java_lang_String$int$int$int_A_A$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber("yellow", 0, 4, [[0, 1, 1, 1], [0, 1, 1, 1], [0, 1, 1, 1]], true, false, this.getField()["createPower$int"](-1)); 16441 symm.createZoneOrbit$java_lang_String$int$int$int_A_A$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber("green", 1, 8, [[1, 1, 0, 1], [1, 1, 0, 1], [0, 1, 0, 1]], true, true, this.getField()["createRational$long"](2)); 16442 symm.createZoneOrbit$java_lang_String$int$int$int_A_A("lavender", 0, Symmetry.NO_ROTATION, [[2, 1, -1, 1], [0, 1, 1, 1], [2, 1, -1, 1]]); 16443 symm.createZoneOrbit$java_lang_String$int$int$int_A_A("olive", 0, Symmetry.NO_ROTATION, [[0, 1, 1, 1], [0, 1, 1, 1], [2, 1, -1, 1]]); 16444 symm.createZoneOrbit$java_lang_String$int$int$int_A_A("maroon", 0, Symmetry.NO_ROTATION, [[-1, 1, 1, 1], [3, 1, -1, 1], [1, 1, -1, 1]]); 16445 symm.createZoneOrbit$java_lang_String$int$int$int_A_A("brown", 0, Symmetry.NO_ROTATION, [[-1, 1, 1, 1], [-1, 1, 1, 1], [-2, 1, 2, 1]]); 16446 symm.createZoneOrbit$java_lang_String$int$int$int_A_A("red", 0, Symmetry.NO_ROTATION, [[0, 1, 1, 1], [1, 1, 0, 1], [0, 1, 0, 1]]); 16447 symm.createZoneOrbit$java_lang_String$int$int$int_A_A$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber("purple", 0, Symmetry.NO_ROTATION, [[1, 1, 1, 1], [0, 1, 0, 1], [-1, 1, 0, 1]], false, false, this.getField()["createPower$int"](-1)); 16448 symm.createZoneOrbit$java_lang_String$int$int$int_A_A$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber("black", 0, Symmetry.NO_ROTATION, [[1, 2, 0, 1], [0, 1, 1, 2], [-1, 2, 1, 2]], false, false, this.getField()["createRational$long"](2)); 16449 symm.createZoneOrbit$java_lang_String$int$int$int_A_A("turquoise", 0, Symmetry.NO_ROTATION, [[1, 1, 2, 1], [3, 1, 4, 1], [3, 1, 4, 1]]); 16450 const defaultShapes = new ExportedVEFShapes(null, "octahedral", "trapezoids", symm, null); 16451 octahedralPerspective.setDefaultGeometry(defaultShapes); 16452 octahedralPerspective.addShapes(new ExportedVEFShapes(null, "octahedralFast", "small octahedra", symm, null)); 16453 octahedralPerspective.addShapes(new ExportedVEFShapes(null, "octahedralRealistic", "vZome logo", symm, defaultShapes)); 16454 } 16455 /** 16456 * 16457 * @return {string} 16458 */ 16459 getLabel() { 16460 return "Zome (Golden)"; 16461 } 16462 /** 16463 * 16464 * @return {*} 16465 */ 16466 getSymmetryPerspectives() { 16467 return java.util.Arrays.asList(this.icosahedralPerspective, super.getDefaultSymmetryPerspective()); 16468 } 16469 /** 16470 * 16471 * @return {*} 16472 */ 16473 getDefaultSymmetryPerspective() { 16474 return this.icosahedralPerspective; 16475 } 16476 /** 16477 * 16478 * @param {string} symmName 16479 * @return {*} 16480 */ 16481 getSymmetryPerspective(symmName) { 16482 switch (symmName) { 16483 case "icosahedral": 16484 return this.icosahedralPerspective; 16485 default: 16486 return super.getSymmetryPerspective(symmName); 16487 } 16488 } 16489 /** 16490 * 16491 * @param {string} name 16492 * @return {QuaternionicSymmetry} 16493 */ 16494 getQuaternionSymmetry(name) { 16495 return this.icosahedralPerspective.getQuaternionSymmetry(name); 16496 } 16497 /** 16498 * 16499 * @param {*} toolFactories 16500 * @param {ToolsModel} tools 16501 */ 16502 registerToolFactories(toolFactories, tools) { 16503 super.registerToolFactories(toolFactories, tools); 16504 const symm = this.icosahedralPerspective.getSymmetry(); 16505 toolFactories.put("AxialStretchTool", new AxialStretchTool.Factory(tools, symm, false, false, false)); 16506 toolFactories.put("SymmetryTool", new IcosahedralToolFactory(tools, symm)); 16507 } 16508 /** 16509 * 16510 * @param {string} groupName 16511 * @param {number} index 16512 * @param {number} edgesToRender 16513 * @param {AlgebraicNumber[]} edgeScales 16514 * @param {*} listener 16515 */ 16516 constructPolytope(groupName, index, edgesToRender, edgeScales, listener) { 16517 switch (groupName) { 16518 case "H4": 16519 if (this.h4Builder == null) { 16520 const qsymm = new QuaternionicSymmetry("H_4", "com/vzome/core/math/symmetry/H4roots.vef", this.getField()); 16521 this.h4Builder = new CommandUniformH4Polytope(this.getField(), qsymm, 0); 16522 } 16523 this.h4Builder.generate(index, edgesToRender, edgeScales, listener); 16524 break; 16525 default: 16526 super.constructPolytope(groupName, index, edgesToRender, edgeScales, listener); 16527 break; 16528 } 16529 } 16530 /** 16531 * 16532 * @param {string} action 16533 * @return {*} 16534 */ 16535 getLegacyCommand(action) { 16536 switch (action) { 16537 case "tauDivide": 16538 return this.cmdTauDivide; 16539 default: 16540 return super.getLegacyCommand(action); 16541 } 16542 } 16543};
16544GoldenFieldApplication["__class"] = "com.vzome.core.kinds.GoldenFieldApplication"; 16545GoldenFieldApplication["__interfaces"] = ["com.vzome.core.math.symmetry.Symmetries4D", "com.vzome.core.editor.FieldApplication"]; 16546
16547// src/worker/legacy/from-java/com/vzome/core/tools/SymmetryToolFactory.ts 16548var SymmetryToolFactory = class extends AbstractToolFactory { 16549 constructor(tools, symmetry) { 16550 super(tools, symmetry, SymmetryTool.ID, SymmetryTool.LABEL, SymmetryTool.TOOLTIP); 16551 } 16552 /** 16553 * 16554 * @param {number} total 16555 * @param {number} balls 16556 * @param {number} struts 16557 * @param {number} panels 16558 * @return {boolean} 16559 */ 16560 countsAreValid(total, balls, struts, panels) { 16561 return total === 1 && balls === 1; 16562 } 16563 /** 16564 * 16565 * @param {string} id 16566 * @return {Tool} 16567 */ 16568 createToolInternal(id) { 16569 return new SymmetryTool(id, this.getSymmetry(), this.getToolsModel()); 16570 } 16571 /** 16572 * 16573 * @param {*} selection 16574 * @return {boolean} 16575 */ 16576 bindParameters(selection) { 16577 return selection.size() === 1 && (selection.iterator().next() != null && (selection.iterator().next().constructor != null && selection.iterator().next().constructor["__interfaces"] != null && selection.iterator().next().constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)); 16578 } 16579}; 16580SymmetryToolFactory["__class"] = "com.vzome.core.tools.SymmetryToolFactory"; 16581SymmetryToolFactory["__interfaces"] = ["com.vzome.core.editor.SelectionSummary.Listener", "com.vzome.api.Tool.Factory"]; 16582
16583// src/worker/legacy/from-java/com/vzome/fields/heptagon/HeptagonalAntiprismSymmetry.ts 16584var HeptagonalAntiprismSymmetry = class extends AbstractSymmetry { 16585 constructor(field5, frameColor, correctedOrbits) { 16586 if ((field5 != null && (field5.constructor != null && field5.constructor["__interfaces"] != null && field5.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicField") >= 0) || field5 === null) && (typeof frameColor === "string" || frameColor === null) && (typeof correctedOrbits === "boolean" || correctedOrbits === null)) { 16587 let __args = arguments; 16588 super(14, field5, frameColor, correctedOrbits ? new AlgebraicMatrix(field5.basisVector(3, AlgebraicVector.X), field5.basisVector(3, AlgebraicVector.Y), field5.basisVector(3, AlgebraicVector.Z).negate()) : null); 16589 if (this.sigmaX2 === void 0) { 16590 this.sigmaX2 = 0; 16591 } 16592 if (this.skewFactor === void 0) { 16593 this.skewFactor = 0; 16594 } 16595 if (this.correctedOrbits === void 0) { 16596 this.correctedOrbits = false; 16597 } 16598 if (this.preferredAxis === void 0) { 16599 this.preferredAxis = null; 16600 } 16601 this.sigmaX2 = field5.getUnitTerm(2).timesInt(2).evaluate(); 16602 this.skewFactor = Math.sin(3 / 7 * Math.PI); 16603 this.correctedOrbits = correctedOrbits; 16604 } else if ((field5 != null && (field5.constructor != null && field5.constructor["__interfaces"] != null && field5.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicField") >= 0) || field5 === null) && (typeof frameColor === "string" || frameColor === null) && correctedOrbits === void 0) { 16605 let __args = arguments; 16606 { 16607 let __args2 = arguments; 16608 let correctedOrbits2 = false; 16609 super(14, field5, frameColor, correctedOrbits2 ? new AlgebraicMatrix(field5.basisVector(3, AlgebraicVector.X), field5.basisVector(3, AlgebraicVector.Y), field5.basisVector(3, AlgebraicVector.Z).negate()) : null); 16610 if (this.sigmaX2 === void 0) { 16611 this.sigmaX2 = 0; 16612 } 16613 if (this.skewFactor === void 0) { 16614 this.skewFactor = 0; 16615 } 16616 if (this.correctedOrbits === void 0) { 16617 this.correctedOrbits = false; 16618 } 16619 if (this.preferredAxis === void 0) { 16620 this.preferredAxis = null; 16621 } 16622 this.sigmaX2 = field5.getUnitTerm(2).timesInt(2).evaluate(); 16623 this.skewFactor = Math.sin(3 / 7 * Math.PI); 16624 this.correctedOrbits = correctedOrbits2; 16625 } 16626 } else throw new Error("invalid overload"); 16627 } 16628 /** 16629 * Called by the super constructor. 16630 */ 16631 createInitialPermutations() { 16632 this.mOrientations[0] = new Permutation(this, null); 16633 let map = [1, 2, 3, 4, 5, 6, 0, 8, 9, 10, 11, 12, 13, 7]; 16634 this.mOrientations[1] = new Permutation(this, map); 16635 map = [7, 13, 12, 11, 10, 9, 8, 0, 6, 5, 4, 3, 2, 1]; 16636 this.mOrientations[7] = new Permutation(this, map); 16637 } 16638 /** 16639 * 16640 * @param {string} frameColor 16641 */ 16642 createFrameOrbit(frameColor) { 16643 const hf = this.mField; 16644 const one = hf.one(); 16645 const s = hf.getUnitTerm(2).reciprocal(); 16646 const R = hf["createPower$int"](1)["times$com_vzome_core_algebra_AlgebraicNumber"](s); 16647 const zAxis = hf.basisVector(3, AlgebraicVector.Z); 16648 const zAxisNeg = zAxis.negate(); 16649 const axis0 = hf.basisVector(3, AlgebraicVector.X); 16650 const axis1 = hf.origin(3).setComponent(AlgebraicVector.X, s).setComponent(AlgebraicVector.Y, R); 16651 const axis2 = hf.origin(3).setComponent(AlgebraicVector.X, s.negate()).setComponent(AlgebraicVector.Y, one); 16652 const axis3 = hf.origin(3).setComponent(AlgebraicVector.X, one.negate()).setComponent(AlgebraicVector.Y, s); 16653 const axis4 = hf.origin(3).setComponent(AlgebraicVector.X, R.negate()).setComponent(AlgebraicVector.Y, s.negate()); 16654 const axis5 = hf.origin(3).setComponent(AlgebraicVector.Y, one.negate()); 16655 const axis6 = hf.origin(3).setComponent(AlgebraicVector.X, R).setComponent(AlgebraicVector.Y, R.negate()); 16656 this.mMatrices[0] = hf.identityMatrix(3); 16657 this.mMatrices[1] = new AlgebraicMatrix(axis1, axis6.negate(), zAxis); 16658 this.mMatrices[2] = new AlgebraicMatrix(axis2, axis0.negate(), zAxis); 16659 this.mMatrices[3] = new AlgebraicMatrix(axis3, axis1.negate(), zAxis); 16660 this.mMatrices[4] = new AlgebraicMatrix(axis4, axis2.negate(), zAxis); 16661 this.mMatrices[5] = new AlgebraicMatrix(axis5, axis3.negate(), zAxis); 16662 this.mMatrices[6] = new AlgebraicMatrix(axis6, axis4.negate(), zAxis); 16663 this.mMatrices[7] = new AlgebraicMatrix(axis0, axis2.negate(), zAxisNeg); 16664 this.mMatrices[8] = this.mMatrices[1].times(this.mMatrices[7]); 16665 this.mMatrices[9] = this.mMatrices[2].times(this.mMatrices[7]); 16666 this.mMatrices[10] = this.mMatrices[3].times(this.mMatrices[7]); 16667 this.mMatrices[11] = this.mMatrices[4].times(this.mMatrices[7]); 16668 this.mMatrices[12] = this.mMatrices[5].times(this.mMatrices[7]); 16669 this.mMatrices[13] = this.mMatrices[6].times(this.mMatrices[7]); 16670 } 16671 /** 16672 * 16673 */ 16674 createOtherOrbits() { 16675 } 16676 createStandardOrbits(frameColor) { 16677 const redOrbit = this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean("red", 0, 1, this.mField.basisVector(3, AlgebraicVector.Z), true); 16678 this.preferredAxis = redOrbit.getAxis$int$int(Symmetry.PLUS, 0); 16679 const blueFrameVector = this.mField.basisVector(3, AlgebraicVector.X); 16680 const blueOrbit = this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean(frameColor, 0, 7, blueFrameVector, true); 16681 const blueRotatedVector = blueOrbit.getAxis$int$int(Symmetry.PLUS, (7 + 1) / 2 | 0).normal(); 16682 const greenVector = blueFrameVector.minus(blueRotatedVector); 16683 this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector("green", 0, 7, greenVector); 16684 return this; 16685 } 16686 /** 16687 * 16688 * @return {Axis} 16689 */ 16690 getPreferredAxis() { 16691 return this.preferredAxis; 16692 } 16693 /** 16694 * 16695 * @param {AlgebraicVector} v 16696 * @return {RealVector} 16697 */ 16698 embedInR3(v) { 16699 const rv = super.embedInR3(v); 16700 const x = rv.x + rv.y / this.sigmaX2; 16701 const y = rv.y * this.skewFactor; 16702 return new RealVector(x, y, rv.z); 16703 } 16704 /** 16705 * 16706 * @param {AlgebraicVector} v 16707 * @return {double[]} 16708 */ 16709 embedInR3Double(v) { 16710 const dv = super.embedInR3Double(v); 16711 const x = dv[0] + dv[1] / this.sigmaX2; 16712 const y = dv[1] * this.skewFactor; 16713 return [x, y, dv[2]]; 16714 } 16715 /** 16716 * 16717 * @return {boolean} 16718 */ 16719 isTrivial() { 16720 return false;
16721 } 16722 /** 16723 * 16724 * @return {string} 16725 */ 16726 getName() { 16727 if (this.correctedOrbits) return "heptagonal antiprism corrected"; 16728 else return "heptagonal antiprism"; 16729 } 16730 /** 16731 * 16732 * @param {string} name 16733 * @return {int[]} 16734 */ 16735 subgroup(name) { 16736 return null; 16737 } 16738 /** 16739 * 16740 * @return {AlgebraicVector[]} 16741 */ 16742 getOrbitTriangle() { 16743 const field5 = this.getField(); 16744 const zero = field5.zero(); 16745 let x = field5["createAlgebraicNumber$int_A"]([0, -1, -1]).dividedBy(field5["createAlgebraicNumber$int_A"]([0, 0, 2])); 16746 const orthoVertex = new AlgebraicVector(x, zero, zero); 16747 const sideVertex = field5.basisVector(3, AlgebraicVector.Z); 16748 x = field5["createRational$long"](-1); 16749 const y = field5["createAlgebraicNumber$int_A"]([0, -1, 1]); 16750 const topVertex = new AlgebraicVector(x, y, zero); 16751 return [orthoVertex, sideVertex, topVertex]; 16752 } 16753 /** 16754 * 16755 * @param {SpecialOrbit} which 16756 * @return {Direction} 16757 */ 16758 getSpecialOrbit(which) { 16759 switch (which) { 16760 case 0 /* BLUE */: 16761 return this.getDirection("blue"); 16762 case 1 /* RED */: 16763 return this.getDirection("red"); 16764 case 2 /* YELLOW */: 16765 return this.getDirection("blue"); 16766 default: 16767 return null; 16768 } 16769 } 16770}; 16771HeptagonalAntiprismSymmetry["__class"] = "com.vzome.fields.heptagon.HeptagonalAntiprismSymmetry"; 16772HeptagonalAntiprismSymmetry["__interfaces"] = ["com.vzome.core.math.symmetry.Symmetry", "com.vzome.core.math.symmetry.Embedding"]; 16773
16774// src/worker/legacy/from-java/com/vzome/core/kinds/HeptagonFieldApplication.ts 16775var HeptagonFieldApplication = class _HeptagonFieldApplication extends DefaultFieldApplication { 16776 constructor(field5) { 16777 super(field5); 16778 this.correctedAntiprismPerspective = new _HeptagonFieldApplication.HeptagonalSymmetryPerspective(this, true); 16779 this.originalAntiprismPerspective = new _HeptagonFieldApplication.HeptagonalSymmetryPerspective(this, false); 16780 } 16781 /** 16782 * 16783 * @return {string} 16784 */ 16785 getLabel() { 16786 return "Heptagon"; 16787 } 16788 /** 16789 * 16790 * @return {*} 16791 */ 16792 getSymmetryPerspectives() { 16793 return java.util.Arrays.asList(this.correctedAntiprismPerspective, super.getDefaultSymmetryPerspective(), this.originalAntiprismPerspective); 16794 } 16795 /** 16796 * 16797 * @return {*} 16798 */ 16799 getDefaultSymmetryPerspective() { 16800 return this.correctedAntiprismPerspective; 16801 } 16802 /** 16803 * 16804 * @param {string} symmName 16805 * @return {*} 16806 */ 16807 getSymmetryPerspective(symmName) { 16808 switch (symmName) { 16809 case "heptagonal antiprism corrected": 16810 return this.correctedAntiprismPerspective; 16811 case "heptagonal antiprism": 16812 return this.originalAntiprismPerspective; 16813 default: 16814 return super.getSymmetryPerspective(symmName); 16815 } 16816 } 16817}; 16818HeptagonFieldApplication["__class"] = "com.vzome.core.kinds.HeptagonFieldApplication"; 16819HeptagonFieldApplication["__interfaces"] = ["com.vzome.core.math.symmetry.Symmetries4D", "com.vzome.core.editor.FieldApplication"]; 16820((HeptagonFieldApplication2) => { 16821 class HeptagonalSymmetryPerspective extends AbstractSymmetryPerspective { 16822 constructor(__parent, corrected) { 16823 super(new HeptagonalAntiprismSymmetry(__parent.getField(), "blue", corrected).createStandardOrbits("blue")); 16824 this.__parent = __parent; 16825 if (this.corrected === void 0) { 16826 this.corrected = false; 16827 } 16828 this.axialsymm = new CommandAxialSymmetry(this.symmetry); 16829 this.corrected = corrected; 16830 const octahedralShapes = new OctahedralShapes("octahedral", "triangular antiprism", this.symmetry); 16831 const antiprismShapes = new ExportedVEFShapes(null, "heptagon/antiprism", "heptagonal antiprism", this.symmetry, octahedralShapes); 16832 this.setDefaultGeometry(antiprismShapes); 16833 this.addShapes(octahedralShapes); 16834 } 16835 /** 16836 * 16837 * @return {string} 16838 */ 16839 getLabel() { 16840 return this.corrected ? "heptagonal antiprism" : null; 16841 } 16842 /** 16843 * 16844 * @param {Tool.Kind} kind 16845 * @param {ToolsModel} tools 16846 * @return {*} 16847 */ 16848 createToolFactories(kind, tools) { 16849 const result = new java.util.ArrayList(); 16850 switch (kind) { 16851 case Tool2.Kind.SYMMETRY: 16852 result.add(new SymmetryToolFactory(tools, this.symmetry)); 16853 result.add(new LineReflectionToolFactory(tools)); 16854 result.add(new MirrorToolFactory(tools)); 16855 result.add(new AxialSymmetryToolFactory(tools, this.symmetry)); 16856 break; 16857 case Tool2.Kind.TRANSFORM: 16858 result.add(new ScalingToolFactory(tools, this.symmetry)); 16859 result.add(new RotationToolFactory(tools, this.symmetry)); 16860 result.add(new TranslationToolFactory(tools)); 16861 break; 16862 case Tool2.Kind.LINEAR_MAP: 16863 result.add(new LinearMapToolFactory(tools, this.symmetry, false)); 16864 break; 16865 default: 16866 break; 16867 } 16868 return result; 16869 } 16870 /** 16871 * 16872 * @param {Tool.Kind} kind 16873 * @param {ToolsModel} tools 16874 * @return {*} 16875 */ 16876 predefineTools(kind, tools) { 16877 const result = new java.util.ArrayList(); 16878 switch (kind) { 16879 case Tool2.Kind.SYMMETRY: 16880 result.add(new SymmetryToolFactory(tools, this.symmetry).createPredefinedTool("heptagonal antiprism around origin")); 16881 result.add(new MirrorToolFactory(tools).createPredefinedTool("reflection through XY plane")); 16882 result.add(new AxialSymmetryToolFactory(tools, this.symmetry).createPredefinedTool("symmetry around red through origin")); 16883 break; 16884 case Tool2.Kind.TRANSFORM: 16885 result.add(new ScalingToolFactory(tools, this.symmetry).createPredefinedTool("scale down")); 16886 result.add(new ScalingToolFactory(tools, this.symmetry).createPredefinedTool("scale up")); 16887 result.add(new RotationToolFactory(tools, this.symmetry, true).createPredefinedTool("rotate around red through origin")); 16888 result.add(new TranslationToolFactory(tools).createPredefinedTool("b1 move along +X")); 16889 break; 16890 default: 16891 break; 16892 } 16893 return result; 16894 } 16895 /** 16896 * 16897 * @param {string} action 16898 * @return {*} 16899 */ 16900 getLegacyCommand(action) { 16901 switch (action) { 16902 case "axialsymm": 16903 return this.axialsymm; 16904 default: 16905 return super.getLegacyCommand(action); 16906 } 16907 } 16908 /** 16909 * 16910 * @return {string} 16911 */ 16912 getModelResourcePath() { 16913 return "org/vorthmann/zome/app/heptagonal antiprism.vZome"; 16914 } 16915 } 16916 HeptagonFieldApplication2.HeptagonalSymmetryPerspective = HeptagonalSymmetryPerspective; 16917 HeptagonalSymmetryPerspective["__class"] = "com.vzome.core.kinds.HeptagonFieldApplication.HeptagonalSymmetryPerspective"; 16918 HeptagonalSymmetryPerspective["__interfaces"] = ["com.vzome.core.editor.SymmetryPerspective"]; 16919})(HeptagonFieldApplication || (HeptagonFieldApplication = {})); 16920
16921// src/worker/legacy/from-java/com/vzome/core/editor/api/ManifestConstructions.ts 16922var ManifestConstructions = class extends java.util.ArrayList { 16923 constructor(edit) { 16924 super(); 16925 if (this.edit === void 0) { 16926 this.edit = null; 16927 } 16928 this.edit = edit; 16929 } 16930 constructionAdded$com_vzome_core_construction_Construction(c) { 16931 this.edit.manifestConstruction(c); 16932 this.edit.redo(); 16933 } 16934 constructionAdded$com_vzome_core_construction_Construction$com_vzome_core_construction_Color(c, color) { 16935 const manifestation = this.edit.manifestConstruction(c); 16936 if (color != null) this.edit.colorManifestation(manifestation, color); 16937 this.edit.select$com_vzome_core_model_Manifestation(manifestation); 16938 this.edit.redo(); 16939 } 16940 /** 16941 * 16942 * @param {Construction} c 16943 * @param {Color} color 16944 */ 16945 constructionAdded(c, color) { 16946 if ((c != null && c instanceof Construction || c === null) && (color != null && color instanceof Color || color === null)) { 16947 return this.constructionAdded$com_vzome_core_construction_Construction$com_vzome_core_construction_Color(c, color); 16948 } else if ((c != null && c instanceof Construction || c === null) && color === void 0) { 16949 return this.constructionAdded$com_vzome_core_construction_Construction(c); 16950 } else throw new Error("invalid overload"); 16951 } 16952}; 16953ManifestConstructions["__class"] = "com.vzome.core.editor.api.ManifestConstructions"; 16954ManifestConstructions["__interfaces"] = ["java.util.RandomAccess", "java.util.List", "java.lang.Cloneable", "com.vzome.core.construction.ConstructionChanges", "java.util.Collection", "java.lang.Iterable", "java.io.Serializable"]; 16955
16956// src/worker/legacy/from-java/com/vzome/core/math/PerspectiveProjection.ts 16957var PerspectiveProjection2 = class { 16958 constructor(field5, cameraDist) { 16959 if (this.field === void 0) { 16960 this.field = null; 16961 } 16962 if (this.cameraDist === void 0) { 16963 this.cameraDist = null; 16964 } 16965 if (this.minDenom === void 0) { 16966 this.minDenom = null; 16967 } 16968 if (this.minDenomValue === void 0) { 16969 this.minDenomValue = 0; 16970 } 16971 this.field = field5; 16972 this.cameraDist = cameraDist; 16973 } 16974 /** 16975 * 16976 * @param {AlgebraicVector} source 16977 * @param {boolean} wFirst 16978 * @return {AlgebraicVector} 16979 */ 16980 projectImage(source, wFirst) { 16981 const result = this.field.origin(4); 16982 const w = source.getComponent(0); 16983 let denom = this.cameraDist["minus$com_vzome_core_algebra_AlgebraicNumber"](w); 16984 if (this.minDenom == null) { 16985 this.minDenom = this.field["createPower$int"](-5); 16986 this.minDenomValue = this.minDenom.evaluate(); 16987 } 16988 const denomValue = denom.evaluate(); 16989 if (denomValue < this.minDenomValue) { 16990 denom = this.minDenom; 16991 } 16992 const numerator = denom.reciprocal(); 16993 result.setComponent(0, this.field.one()); 16994 result.setComponent(1, source.getComponent(1)["times$com_vzome_core_algebra_AlgebraicNumber"](numerator)); 16995 result.setComponent(2, source.getComponent(2)["times$com_vzome_core_algebra_AlgebraicNumber"](numerator)); 16996 result.setComponent(3, source.getComponent(3)["times$com_vzome_core_algebra_AlgebraicNumber"](numerator)); 16997 return result; 16998 } 16999 /** 17000 * 17001 * @param {*} element 17002 */ 17003 getXmlAttributes(element) { 17004 if (this.cameraDist != null) { 17005 DomUtils.addAttribute(element, "cameraDist", this.cameraDist.toString(AlgebraicField.ZOMIC_FORMAT)); 17006 } 17007 } 17008 /** 17009 * 17010 * @param {*} xml 17011 */ 17012 setXmlAttributes(xml) { 17013 const nums = xml.getAttribute("cameraDist"); 17014 if (nums == null || /* isEmpty */ 17015 nums.length === 0) return; 17016 this.cameraDist = this.field.parseNumber(nums); 17017 } 17018 /** 17019 * 17020 * @return {string} 17021 */ 17022 getProjectionName() { 17023 return "Perspective"; 17024 } 17025}; 17026PerspectiveProjection2["__class"] = "com.vzome.core.math.PerspectiveProjection"; 17027PerspectiveProjection2["__interfaces"] = ["com.vzome.core.math.Projection"]; 17028
17029// src/worker/legacy/from-java/com/vzome/core/math/SixCubeProjection.ts 17030var SixCubeProjection = class { 17031 constructor(field5) { 17032 if (this.field === void 0) { 17033 this.field = null; 17034 } 17035 if (this.basis === void 0) { 17036 this.basis = null; 17037 } 17038 this.field = field5; 17039 const zero = field5.zero(); 17040 const one = field5.one(); 17041 const nOne = one.negate(); 17042 const phi = field5["createPower$int"](1); 17043 this.basis = [null, null, null, null, null, null]; 17044 this.basis[0] = new AlgebraicVector(phi, one, zero); 17045 this.basis[1] = new AlgebraicVector(phi, nOne, zero); 17046 this.basis[2] = new AlgebraicVector(zero, phi, one); 17047 this.basis[3] = new AlgebraicVector(zero, phi, nOne); 17048 this.basis[4] = new AlgebraicVector(one, zero, phi); 17049 this.basis[5] = new AlgebraicVector(nOne, zero, phi); 17050 } 17051 /** 17052 * 17053 * @param {AlgebraicVector} source 17054 * @param {boolean} wFirst 17055 * @return {AlgebraicVector} 17056 */ 17057 projectImage(source, wFirst) { 17058 let result = this.field.origin(this.basis[0].dimension()); 17059 let pos = wFirst ? 0 : this.basis.length - 1; 17060 for (let index = 0; index < this.basis.length; index++) { 17061 let unitVector = this.basis[index]; 17062 { 17063 const scalar = source.getComponent(pos); 17064 result = result.plus(unitVector.scale(scalar)); 17065 pos = (pos + 1) % this.basis.length; 17066 } 17067 } 17068 return result; 17069 } 17070 /** 17071 * 17072 * @param {*} element 17073 */ 17074 getXmlAttributes(element) { 17075 } 17076 /** 17077 * 17078 * @param {*} xml 17079 */ 17080 setXmlAttributes(xml) { 17081 } 17082 /** 17083 * 17084 * @return {string} 17085 */ 17086 getProjectionName() { 17087 return "SixCube"; 17088 } 17089}; 17090SixCubeProjection["__class"] = "com.vzome.core.math.SixCubeProjection"; 17091SixCubeProjection["__interfaces"] = ["com.vzome.core.math.Projection"]; 17092
17093// src/worker/legacy/from-java/com/vzome/core/math/TetrahedralProjection.ts 17094var TetrahedralProjection = class { 17095 constructor(field5) { 17096 if (this.field === void 0) { 17097 this.field = null; 17098 } 17099 if (this.basis === void 0) { 17100 this.basis = null; 17101 } 17102 this.field = field5; 17103 const pos = field5.one(); 17104 const neg = pos.negate(); 17105 this.basis = [null, null, null, null]; 17106 this.basis[0] = new AlgebraicVector(pos, pos, pos); 17107 this.basis[1] = new AlgebraicVector(pos, neg, neg); 17108 this.basis[2] = new AlgebraicVector(neg, pos, neg); 17109 this.basis[3] = new AlgebraicVector(neg, neg, pos); 17110 } 17111 /** 17112 * 17113 * @param {AlgebraicVector} source 17114 * @param {boolean} wFirst 17115 * @return {AlgebraicVector} 17116 */ 17117 projectImage(source, wFirst) { 17118 let result = this.field.origin(this.basis[0].dimension()); 17119 let pos = wFirst ? 0 : this.basis.length - 1; 17120 for (let index = 0; index < this.basis.length; index++) { 17121 let unitVector = this.basis[index]; 17122 { 17123 const scalar = source.getComponent(pos); 17124 result = result.plus(unitVector.scale(scalar)); 17125 pos = (pos + 1) % this.basis.length; 17126 } 17127 } 17128 return result; 17129 } 17130 /** 17131 * 17132 * @param {*} element 17133 */ 17134 getXmlAttributes(element) { 17135 } 17136 /** 17137 * 17138 * @param {*} xml 17139 */ 17140 setXmlAttributes(xml) { 17141 } 17142 /** 17143 * 17144 * @return {string} 17145 */ 17146 getProjectionName() { 17147 return "Tetrahedral"; 17148 } 17149}; 17150TetrahedralProjection["__class"] = "com.vzome.core.math.TetrahedralProjection"; 17151TetrahedralProjection["__interfaces"] = ["com.vzome.core.math.Projection"]; 17152
17153// src/worker/legacy/from-java/com/vzome/core/edits/ImportMesh.ts 17154var ImportMesh = class _ImportMesh extends ChangeManifestations { 17155 constructor(editor) { 17156 super(editor); 17157 if (this.meshData === void 0) { 17158 this.meshData = null; 17159 } 17160 if (this.scale === void 0) { 17161 this.scale = null; 17162 } 17163 if (this.projection === void 0) { 17164 this.projection = null; 17165 } 17166 if (this.editor === void 0) { 17167 this.editor = null; 17168 } 17169 this.editor = editor; 17170 } 17171 /** 17172 * 17173 * @param {*} params 17174 */ 17175 configure(params) { 17176 const field5 = this.mManifestations.getField(); 17177 this.meshData = params.get("vef"); 17178 this.projection = params.get("projection"); 17179 this.scale = params.get("scale"); 17180 if (this.scale == null) { 17181 this.scale = field5.one(); 17182 } 17183 const mode = params.getOrDefault("mode", ""); 17184 switch (mode) { 17185 case "": 17186 break; 17187 case "clipboard": 17188 if (this.meshData != null && !/* startsWith */ 17189 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(this.meshData, "vZome VEF") && !/* startsWith */ 17190 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(this.meshData, "{")) this.meshData = null; 17191 break; 17192 case "Quaternion": 17193 break; 17194 default: 17195 this.setProjection(mode, field5); 17196 break; 17197 } 17198 } 17199 /** 17200 * 17201 * @return {boolean} 17202 */ 17203 isNoOp() { 17204 return this.meshData == null; 17205 } 17206 /** 17207 * 17208 * @param {*} element 17209 */ 17210 getXmlAttributes(element) { 17211 if (this.scale != null) DomUtils.addAttribute(element, "scale", this.scale.toString(AlgebraicField.ZOMIC_FORMAT)); 17212 if (this.projection != null) { 17213 const name = this.projection.getProjectionName(); 17214 if (!("" === name)) { 17215 DomUtils.addAttribute(element, "projection", this.projection.getProjectionName()); 17216 this.projection.getXmlAttributes(element); 17217 } 17218 } 17219 const textNode = element.getOwnerDocument().createTextNode(XmlSaveFormat.escapeNewlines(this.meshData)); 17220 element.appendChild(textNode); 17221 } 17222 /** 17223 * 17224 * @param {*} xml 17225 * @param {XmlSaveFormat} format 17226 */ 17227 setXmlAttributes(xml, format) { 17228 const field5 = format.getField(); 17229 this.scale = format.parseRationalNumber(xml, "scale"); 17230 if (this.scale == null) { 17231 this.scale = field5.one(); 17232 } 17233 this.meshData = xml.getTextContent(); 17234 const projectionName = xml.getAttribute("projection"); 17235 if ("" === projectionName) { 17236 const quaternion = format.parseRationalVector(xml, "quaternion"); 17237 this.projection = quaternion == null ? null : new QuaternionProjection(field5, null, quaternion); 17238 } else { 17239 this.setProjection(projectionName, field5); 17240 } 17241 if (this.projection != null) { 17242 this.projection.setXmlAttributes(xml); 17243 } 17244 } 17245 setProjection(projectionName, field5) { 17246 switch (projectionName) { 17247 case "Quaternion": 17248 this.projection = new QuaternionProjection(field5, null, null); 17249 break; 17250 case "SixCube": 17251 this.projection = new SixCubeProjection(field5); 17252 break; 17253 case "Tetrahedral": 17254 this.projection = new TetrahedralProjection(field5); 17255 break; 17256 case "Perspective": 17257 this.projection = new PerspectiveProjection2(field5, null); 17258 break; 17259 } 17260 } 17261 /** 17262 * 17263 */ 17264 perform() { 17265 if (this.meshData == null) return; 17266 let offset = null; 17267 let pointFound = false; 17268 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 17269 let man = index.next(); 17270 { 17271 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) { 17272 const nextPoint = man.getFirstConstruction(); 17273 if (!pointFound) { 17274 pointFound = true; 17275 offset = nextPoint.getLocation(); 17276 } else { 17277 offset = null; 17278 break; 17279 } 17280 } 17281 if (this.deselectInputs()) this.unselect$com_vzome_core_model_Manifestation(man); 17282 } 17283 } 17284 const field5 = this.mManifestations.getField(); 17285 const events = new ManifestConstructions(this); 17286 const registry = new _ImportMesh.ImportMesh$0(this, field5); 17287 if (this.projection == null) this.projection = new Projection.Default(field5); 17288 try { 17289 this.parseMeshData(offset, events, registry); 17290 } catch (e) { 17291 throw new Command.Failure("Incorrect content for this import:\n" + e.message); 17292 } 17293 this.redo(); 17294 } 17295 deselectInputs() { 17296 return true; 17297 } 17298}; 17299ImportMesh["__class"] = "com.vzome.core.edits.ImportMesh"; 17300((ImportMesh2) => { 17301 class ImportMesh$0 { 17302 constructor(__parent, field5) { 17303 this.field = field5; 17304 this.__parent = __parent; 17305 } 17306 /** 17307 * 17308 * @param {string} name 17309 * @return {*} 17310 */ 17311 getField(name) { 17312 if (this.field.supportsSubfield(name)) return this.field; 17313 else { 17314 return null; 17315 } 17316 } 17317 } 17318 ImportMesh2.ImportMesh$0 = ImportMesh$0; 17319 ImportMesh$0["__interfaces"] = ["com.vzome.core.algebra.AlgebraicField.Registry"]; 17320})(ImportMesh || (ImportMesh = {})); 17321
17322// src/worker/legacy/from-java/com/vzome/jsweet/JsAlgebraicNumber.ts 17323var JsAlgebraicNumber = class _JsAlgebraicNumber { 17324 constructor(field5, factors) { 17325 if (this.field === void 0) { 17326 this.field = null; 17327 } 17328 if (this.factors === void 0) { 17329 this.factors = null; 17330 } 17331 this.field = field5; 17332 this.factors = factors.slice(); 17333 } 17334 /** 17335 * 17336 * @return {*} 17337 */ 17338 getField() { 17339 return this.field; 17340 } 17341 /** 17342 * 17343 * @return {number} 17344 */ 17345 evaluate() { 17346 return this.field.evaluateNumber(this.factors); 17347 } 17348 /** 17349 * 17350 * @return {java.lang.String[]} 17351 */ 17352 toTrailingDivisor() { 17353 return this.factors.map((bi) => bi.toString()); 17354 } 17355 /** 17356 * 17357 * @param {number} n is the value to be added 17358 * @return {*} this + n 17359 */ 17360 plusInt(n) { 17361 return n === 0 ? this : this.plus$com_vzome_core_algebra_AlgebraicNumber(this.field.createRational$long(n)); 17362 } 17363 /** 17364 * 17365 * @param {number} n 17366 * @return {*} 17367 */ 17368 timesInt(n) { 17369 switch (n) { 17370 case 0: 17371 return this.field.zero(); 17372 case 1: 17373 return this; 17374 case -1: 17375 return this.negate(); 17376 default: 17377 return this.times$com_vzome_core_algebra_AlgebraicNumber(this.field.createRational$long(n)); 17378 } 17379 } 17380 /** 17381 * 17382 * @param {number} num is the numerator of the rational value to be added 17383 * @param {number} den is the denominator of the rational value to be added 17384 * @return {*} this + (num / den) 17385 */ 17386 plusRational(num, den) { 17387 return this.plus$com_vzome_core_algebra_AlgebraicNumber(this.field.createRational$long$long(num, den)); 17388 } 17389 plus$com_vzome_core_algebra_AlgebraicNumber(that) { 17390 const factors = this.field.add(this.factors, that.factors); 17391 return new _JsAlgebraicNumber(this.field, factors); 17392 } 17393 /** 17394 * 17395 * @param {*} that 17396 * @return {*} 17397 */ 17398 plus(that) { 17399 if (that != null && (that.constructor != null && that.constructor["__interfaces"] != null && that.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || that === null) { 17400 return this.plus$com_vzome_core_algebra_AlgebraicNumber(that); 17401 } else throw new Error("invalid overload"); 17402 } 17403 /** 17404 * 17405 * @param {number} n 17406 * @return {*} 17407 */ 17408 minusInt(n) { 17409 return n === 0 ? this : this.minus$com_vzome_core_algebra_AlgebraicNumber(this.field.createRational$long(n)); 17410 } 17411 /** 17412 * 17413 * @param {number} num 17414 * @param {number} den 17415 * @return {*} 17416 */ 17417 minusRational(num, den) { 17418 return this.minus$com_vzome_core_algebra_AlgebraicNumber(this.field.createRational$long$long(num, den)); 17419 } 17420 minus$com_vzome_core_algebra_AlgebraicNumber(that) { 17421 const factors = this.field.subtract(this.factors, that.factors); 17422 return new _JsAlgebraicNumber(this.field, factors); 17423 } 17424 /** 17425 * 17426 * @param {*} that 17427 * @return {*} 17428 */ 17429 minus(that) { 17430 if (that != null && (that.constructor != null && that.constructor["__interfaces"] != null && that.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || that === null) { 17431 return this.minus$com_vzome_core_algebra_AlgebraicNumber(that); 17432 } else throw new Error("invalid overload"); 17433 } 17434 times$com_vzome_core_algebra_AlgebraicNumber(that) { 17435 const factors = this.field.multiply(this.factors, that.factors); 17436 return new _JsAlgebraicNumber(this.field, factors); 17437 } 17438 /** 17439 * 17440 * @param {*} that 17441 * @return {*} 17442 */ 17443 times(that) { 17444 if (that != null && (that.constructor != null && that.constructor["__interfaces"] != null && that.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || that === null) { 17445 return this.times$com_vzome_core_algebra_AlgebraicNumber(that); 17446 } else throw new Error("invalid overload"); 17447 } 17448 /** 17449 * 17450 * @param {number} divisor 17451 * @return {*} 17452 */ 17453 dividedByInt(divisor) { 17454 return divisor === 1 ? this : this.times$com_vzome_core_algebra_AlgebraicNumber(this.field.createRational$long$long(1, divisor)); 17455 } 17456 /** 17457 * 17458 * @param {number} num 17459 * @param {number} den 17460 * @return {*} 17461 */ 17462 dividedByRational(num, den) { 17463 return this.times$com_vzome_core_algebra_AlgebraicNumber(this.field.createRational$long$long(den, num)); 17464 } 17465 /** 17466 * 17467 * @param {*} that 17468 * @return {*} 17469 */ 17470 dividedBy(that) { 17471 const recip = this.field.reciprocal(that.factors); 17472 const factors = this.field.multiply(this.factors, recip); 17473 return new _JsAlgebraicNumber(this.field, factors); 17474 } 17475 equals(that) { 17476 return java.util.Arrays.equals(this.factors, that.factors); 17477 } 17478 /** 17479 * 17480 * @return {*} 17481 */ 17482 negate() { 17483 const factors = this.field.negate(this.factors); 17484 return new _JsAlgebraicNumber(this.field, factors); 17485 } 17486 /** 17487 * 17488 * @return {boolean} 17489 */ 17490 isZero() { 17491 return this.equals(this.field.zero()); 17492 } 17493 /** 17494 * 17495 * @return {boolean} 17496 */ 17497 isOne() { 17498 return this.equals(this.field.one()); 17499 } 17500 /** 17501 * 17502 * @return {*} 17503 */ 17504 reciprocal() { 17505 return new _JsAlgebraicNumber(this.field, this.field.reciprocal(this.factors)); 17506 } 17507 /** 17508 * @param {java.lang.StringBuffer} buf 17509 * @param {number} format must be one of the following values. 17510 * The result is formatted as follows: 17511 * <br> 17512 * {@code DEFAULT_FORMAT // 4 + 3Ï}<br> 17513 * {@code EXPRESSION_FORMAT // 4 +3*phi}<br> 17514 * {@code ZOMIC_FORMAT // 4 3}<br> 17515 * {@code VEF_FORMAT // (3,4)}<br> 17516 */ 17517 getNumberExpression(buf, format) { 17518 buf.append(this.toString(format)); 17519 } 17520 /** 17521 * @param {number} format must be one of the following values. 17522 * The result is formatted as follows: 17523 * <br> 17524 * {@code DEFAULT_FORMAT // 4 + 3Ï}<br> 17525 * {@code EXPRESSION_FORMAT // 4 +3*phi}<br> 17526 * {@code ZOMIC_FORMAT // 4 3}<br> 17527 * {@code VEF_FORMAT // (3,4)} 17528 * @return {string} 17529 */ 17530 toString(format) { 17531 return this.field.toString(this.factors, format); 17532 } 17533 /** 17534 * 17535 * @return {string} 17536 */ 17537 getMathML() { 17538 return this.field.getMathML(this.factors); 17539 } 17540 /** 17541 * 17542 * @param {*} other 17543 * @return {number} 17544 */ 17545 compareTo(other) { 17546 if (this === other) { 17547 return 0; 17548 } 17549 if ( 17550 /* equals */ 17551 ((o1, o2) => { 17552 if (o1 && o1.equals) { 17553 return o1.equals(o2); 17554 } else { 17555 return o1 === o2; 17556 } 17557 })(other, this) 17558 ) { 17559 return 0; 17560 } 17561 const d1 = this.evaluate(); 17562 const d2 = other.evaluate(); 17563 return ( 17564 /* compareTo */ 17565 ((o1, o2) => { 17566 if (o1 && o1.compareTo) { 17567 return o1.compareTo(o2); 17568 } else { 17569 return o1 < o2 ? -1 : o2 < o1 ? 1 : 0; 17570 } 17571 })(d1, d2) 17572 ); 17573 } 17574 /** 17575 * 17576 * @param {*} other 17577 * @return {boolean} 17578 */ 17579 greaterThan(other) { 17580 return this.compareTo(other) > 0; 17581 } 17582 /** 17583 * 17584 * @param {*} other 17585 * @return {boolean} 17586 */ 17587 lessThan(other) { 17588 return this.compareTo(other) < 0; 17589 } 17590 /** 17591 * 17592 * @param {*} other 17593 * @return {boolean} 17594 */ 17595 greaterThanOrEqualTo(other) { 17596 return this.compareTo(other) >= 0; 17597 } 17598 /** 17599 * 17600 * @param {*} other 17601 * @return {boolean} 17602 */ 17603 lessThanOrEqualTo(other) { 17604 return this.compareTo(other) <= 0; 17605 } 17606 /** 17607 * 17608 * @return {number} 17609 */ 17610 signum() { 17611 return ( 17612 /* intValue */ 17613 javaemul.internal.DoubleHelper.valueOf( 17614 /* signum */ 17615 ((f) => { 17616 if (f > 0) { 17617 return 1; 17618 } else if (f < 0) { 17619 return -1; 17620 } else { 17621 return 0; 17622 } 17623 })(this.evaluate()) 17624 ) | 0 17625 ); 17626 } 17627 /** 17628 * 17629 * @param {number} num 17630 * @param {number} den 17631 * @return {*} 17632 */ 17633 timesRational(num, den) { 17634 throw new java.lang.RuntimeException("unimplemented JsAlgebraicNumber.times"); 17635 } 17636 /** 17637 * 17638 * @return {boolean} 17639 */ 17640 isRational() { 17641 throw new java.lang.RuntimeException("unimplemented JsAlgebraicNumber.isRational"); 17642 } 17643}; 17644JsAlgebraicNumber["__class"] = "com.vzome.jsweet.JsAlgebraicNumber"; 17645JsAlgebraicNumber["__interfaces"] = ["com.vzome.core.algebra.Fields.Element", "com.vzome.core.algebra.AlgebraicNumber", "java.lang.Comparable"]; 17646
17647// src/worker/legacy/from-java/com/vzome/jsweet/JsAlgebraicField.ts 17648var JsAlgebraicField = class { 17649 /* Default method injected from AlgebraicField */ 17650 supportsSubfield(fieldName) { 17651 if (fieldName === this.getName()) return true; 17652 return fieldName === "golden" && this.getGoldenRatio() != null; 17653 } 17654 constructor(delegate) { 17655 if (this.delegate === void 0) { 17656 this.delegate = null; 17657 } 17658 if (this.positivePowers === void 0) { 17659 this.positivePowers = null; 17660 } 17661 if (this.negativePowers === void 0) { 17662 this.negativePowers = null; 17663 } 17664 if (this.zomicModule === void 0) { 17665 this.zomicModule = null; 17666 } 17667 this.delegate = delegate; 17668 const order = delegate["order"]; 17669 this.positivePowers = ((s) => { 17670 let a = []; 17671 while (s-- > 0) a.push(null); 17672 return a; 17673 })(order - 1); 17674 this.negativePowers = ((s) => { 17675 let a = []; 17676 while (s-- > 0) a.push(null); 17677 return a; 17678 })(order - 1); 17679 } 17680 /** 17681 * 17682 * @return {string} 17683 */ 17684 getName() { 17685 return this.delegate["name"]; 17686 } 17687 /** 17688 * 17689 * @return {number} 17690 */ 17691 getOrder() { 17692 return this.delegate["order"]; 17693 } 17694 /** 17695 * 17696 * @return {number} 17697 */ 17698 getNumIrrationals() { 17699 return this.getOrder() - 1; 17700 } 17701 /** 17702 * 17703 * @return {number} 17704 */ 17705 getNumMultipliers() { 17706 return this.getNumIrrationals(); 17707 } 17708 parseInt(s) { 17709 const f = this.delegate["parseInt"]; 17710 return f(s); 17711 } 17712 add(v1, v2) { 17713 const f = this.delegate["plus"]; 17714 return f(v1, v2); 17715 } 17716 subtract(v1, v2) { 17717 const f = this.delegate["minus"]; 17718 return f(v1, v2); 17719 } 17720 multiply(v1, v2) { 17721 const f = this.delegate["times"]; 17722 return f(v1, v2); 17723 } 17724 evaluateNumber(factors) { 17725 const f = this.delegate["embed"]; 17726 return f(factors); 17727 } 17728 reciprocal(factors) { 17729 const f = this.delegate["reciprocal"]; 17730 return f(factors); 17731 } 17732 negate(factors) { 17733 const f = this.delegate["negate"]; 17734 return f(factors); 17735 } 17736 toString(factors, format) { 17737 const f = this.delegate["toString"]; 17738 return f(factors, format); 17739 } 17740 getMathML(v1) { 17741 const f = this.delegate["toString"]; 17742 return f(v1, 4); 17743 } 17744 /** 17745 * 17746 * @return {*} 17747 */ 17748 zero() { 17749 return new JsAlgebraicNumber(this, this.delegate["zero"]); 17750 } 17751 /** 17752 * 17753 * @return {*} 17754 */ 17755 one() { 17756 return new JsAlgebraicNumber(this, this.delegate["one"]); 17757 } 17758 /** 17759 * 17760 * @param {int[][]} nums 17761 * @return {AlgebraicVector} 17762 */ 17763 createVector(nums) { 17764 const x = this.createAlgebraicNumberFromPairs(nums[0]); 17765 const y = this.createAlgebraicNumberFromPairs(nums[1]); 17766 const z = this.createAlgebraicNumberFromPairs(nums[2]); 17767 return new AlgebraicVector(x, y, z); 17768 } 17769 createVectorFromTDs(nums) { 17770 const dims = nums.length; 17771 const coords = ((s) => { 17772 let a = []; 17773 while (s-- > 0) a.push(null); 17774 return a; 17775 })(dims); 17776 for (let c = 0; c < coords.length; c++) { 17777 { 17778 coords[c] = this.createAlgebraicNumberFromTD(nums[c]); 17779 } 17780 ; 17781 } 17782 return new AlgebraicVector(coords); 17783 } 17784 /** 17785 * 17786 * @param {number} dims 17787 * @return {AlgebraicVector} 17788 */ 17789 origin(dims) { 17790 const zero = this.zero(); 17791 switch (dims) { 17792 case 1: 17793 return new AlgebraicVector(zero); 17794 case 2: 17795 return new AlgebraicVector(zero, zero); 17796 case 3: 17797 return new AlgebraicVector(zero, zero, zero); 17798 case 4: 17799 return new AlgebraicVector(zero, zero, zero, zero); 17800 case 5: 17801 return new AlgebraicVector(zero, zero, zero, zero, zero); 17802 default: 17803 return null; 17804 } 17805 } 17806 /** 17807 * 17808 * @return {boolean} 17809 */ 17810 scale4dRoots() { 17811 return false; 17812 } 17813 /** 17814 * 17815 * @return {boolean} 17816 */ 17817 doubleFrameVectors() { 17818 return false; 17819 } 17820 /** 17821 * 17822 * @param {number} dims 17823 * @param {number} axis 17824 * @return {AlgebraicVector} 17825 */ 17826 basisVector(dims, axis) { 17827 const result = this.origin(dims); 17828 return result.setComponent(axis, this.one()); 17829 } 17830 createPower$int(power) { 17831 return this.createPower$int$int(power, 1); 17832 } 17833 createPower$int$int(power, irr) { 17834 const one = this.one(); 17835 if (power === 0 || irr === 0) return one; 17836 irr -= 1; 17837 if (power > 0) { 17838 if (this.positivePowers[irr] == null) this.positivePowers[irr] = new java.util.ArrayList(8); 17839 if (power >= this.positivePowers[irr].size()) { 17840 if (this.positivePowers[irr].isEmpty()) { 17841 this.positivePowers[irr].add(one); 17842 this.positivePowers[irr].add(this.getUnitTerm(irr + 1)); 17843 } 17844 const size = this.positivePowers[irr].size(); 17845 const irrat = this.positivePowers[irr].get(1); 17846 let last = this.positivePowers[irr].get(size - 1); 17847 for (let i = size; i <= power; i++) { 17848 { 17849 const next = last["times$com_vzome_core_algebra_AlgebraicNumber"](irrat); 17850 this.positivePowers[irr].add(next); 17851 last = next; 17852 } 17853 ; 17854 } 17855 } 17856 return this.positivePowers[irr].get(power); 17857 } else { 17858 power = -power; 17859 if (this.negativePowers[irr] == null) this.negativePowers[irr] = new java.util.ArrayList(8); 17860 if (power >= this.negativePowers[irr].size()) { 17861 if (this.negativePowers[irr].isEmpty()) { 17862 this.negativePowers[irr].add(one); 17863 this.negativePowers[irr].add(this.getUnitTerm(irr + 1).reciprocal()); 17864 } 17865 const size = this.negativePowers[irr].size(); 17866 const irrat = this.negativePowers[irr].get(1); 17867 let last = this.negativePowers[irr].get(size - 1); 17868 for (let i = size; i <= power; i++) { 17869 { 17870 const next = last["times$com_vzome_core_algebra_AlgebraicNumber"](irrat); 17871 this.negativePowers[irr].add(next); 17872 last = next; 17873 } 17874 ; 17875 } 17876 } 17877 return this.negativePowers[irr].get(power); 17878 } 17879 } 17880 /** 17881 * 17882 * @param {number} power 17883 * @param {number} irr 17884 * @return {*} 17885 */ 17886 createPower(power, irr) { 17887 if ((typeof power === "number" || power === null) && (typeof irr === "number" || irr === null)) { 17888 return this.createPower$int$int(power, irr); 17889 } else if ((typeof power === "number" || power === null) && irr === void 0) { 17890 return this.createPower$int(power); 17891 } else throw new Error("invalid overload"); 17892 } 17893 /** 17894 * @param {number} n specifies the ordinal of the term in the AlgebraicNumber which will be set to one. 17895 * When {@code n == 0}, the result is the same as {@code createRational(1)}. 17896 * When {@code n == 1}, the result is the same as {@code createPower(1)}. 17897 * When {@code n < 0}, the result will be {@code zero()}. 17898 * When {@code n >= getOrder()}, an IndexOutOfBoundsException will be thrown. 17899 * @return {*} an AlgebraicNumber with the factor specified by {@code n} set to one. 17900 */ 17901 getUnitTerm(n) { 17902 if (n < 0) { 17903 return this.zero(); 17904 } 17905 const f = this.delegate["zeroCopy"]; 17906 const factors = f(); 17907 factors[n] = factors[factors.length - 1]; 17908 return new JsAlgebraicNumber(this, factors); 17909 } 17910 createRational$long(wholeNumber) { 17911 return this.createRational$long$long(wholeNumber, 1); 17912 } 17913 /*private*/ 17914 createAlgebraicNumberFromTD(trailingDivisorForm) { 17915 const f = this.delegate["createNumber"]; 17916 const simplified = f(trailingDivisorForm); 17917 return new JsAlgebraicNumber(this, simplified); 17918 } 17919 createAlgebraicNumberFromPairs(pairs) { 17920 const f = this.delegate["createNumberFromPairs"]; 17921 const simplified = f(pairs); 17922 return new JsAlgebraicNumber(this, simplified); 17923 } 17924 createRational$long$long(numerator, denominator) { 17925 const f = this.delegate["createNumberFromPairs"]; 17926 const simplified = f([numerator, denominator]); 17927 return new JsAlgebraicNumber(this, simplified); 17928 } 17929 /** 17930 * 17931 * @param {number} numerator 17932 * @param {number} denominator 17933 * @return {*} 17934 */ 17935 createRational(numerator, denominator) { 17936 if ((typeof numerator === "number" || numerator === null) && (typeof denominator === "number" || denominator === null)) { 17937 return this.createRational$long$long(numerator, denominator); 17938 } else if ((typeof numerator === "number" || numerator === null) && denominator === void 0) { 17939 return this.createRational$long(numerator); 17940 } else throw new Error("invalid overload"); 17941 } 17942 createAlgebraicNumber$int_A(terms) { 17943 return this.createAlgebraicNumber$int_A$int(terms, 1); 17944 } 17945 createAlgebraicNumber$int_A$int(numerators, denominator) { 17946 const f = this.delegate["zeroCopy"]; 17947 const factors = f(); 17948 java.lang.System.arraycopy(numerators, 0, factors, 0, numerators.length); 17949 factors[numerators.length] = denominator; 17950 return this.createAlgebraicNumberFromTD(factors); 17951 } 17952 /** 17953 * 17954 * @return {*} 17955 */ 17956 getGoldenRatio() { 17957 const value = this.delegate["goldenRatio"]; 17958 if (value == null) return null; 17959 return new JsAlgebraicNumber(this, value); 17960 } 17961 /** 17962 * 17963 * @param {number} dims 17964 * @return {AlgebraicMatrix} 17965 */ 17966 identityMatrix(dims) { 17967 const columns = ((s) => { 17968 let a = []; 17969 while (s-- > 0) a.push(null); 17970 return a; 17971 })(dims); 17972 for (let i = 0; i < columns.length; i++) { 17973 { 17974 columns[i] = this.basisVector(dims, i); 17975 } 17976 ; 17977 } 17978 return new AlgebraicMatrix(columns); 17979 } 17980 /** 17981 * Modeled after AbstractAlgebraicField, with a switch from ints to int[]s. 17982 * @param {string} string 17983 * @param {boolean} isRational 17984 * @return {*} 17985 */ 17986 parseVefNumber(string, isRational) { 17987 const pairs = ((s) => { 17988 let a = []; 17989 while (s-- > 0) a.push(0); 17990 return a; 17991 })(this.getOrder() + 1); 17992 if (!isRational && /* startsWith */ 17993 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(string, "(") && /* endsWith */ 17994 ((str, searchString) => { 17995 let pos = str.length - searchString.length; 17996 let lastIndex = str.indexOf(searchString, pos); 17997 return lastIndex !== -1 && lastIndex === pos; 17998 })(string, ")")) { 17999 const tokens = new java.util.StringTokenizer(string.substring(1, string.length - 1), ","); 18000 const numStack = new java.util.Stack(); 18001 const denomStack = new java.util.Stack(); 18002 while (tokens.hasMoreTokens()) { 18003 { 18004 if (numStack.size() >= this.getOrder()) { 18005 throw new java.lang.RuntimeException('VEF format error: "' + string + '" has too many factors for ' + this.getName() + " field"); 18006 } 18007 const parts = tokens.nextToken().split("/"); 18008 numStack.push(this.parseInt(parts[0])); 18009 denomStack.push(parts.length > 1 ? this.parseInt(parts[1]) : 1); 18010 } 18011 } 18012 ; 18013 let i = 0; 18014 while (!numStack.empty()) { 18015 { 18016 pairs[i++] = numStack.pop(); 18017 pairs[i++] = denomStack.pop(); 18018 } 18019 } 18020 ; 18021 } else { 18022 const parts = string.split("/"); 18023 pairs[0] = this.parseInt(parts[0]); 18024 pairs[1] = parts.length > 1 ? this.parseInt(parts[1]) : 1; 18025 } 18026 return this.createAlgebraicNumberFromPairs(pairs); 18027 } 18028 /** 18029 * Drop one coordinate from the 4D vector. If wFirst (the usual), then drop 18030 * the first coordinate, taking the "imaginary part" of the vector. If 18031 * !wFirst (for old VEF import, etc.), drop the last coordinate. 18032 * 18033 * @param {AlgebraicVector} source 18034 * @param {boolean} wFirst 18035 * @return 18036 * @return {AlgebraicVector} 18037 */ 18038 projectTo3d(source, wFirst) { 18039 if (source.dimension() === 3) return source; 18040 else { 18041 const result = this.origin(3); 18042 for (let i = 0; i < 3; i++) { 18043 result.setComponent(i, source.getComponent(wFirst ? i + 1 : i)); 18044 } 18045 return result; 18046 } 18047 } 18048 createAlgebraicNumber$int$int$int$int(ones, irrat, denominator, scalePower) { 18049 const result = this.createAlgebraicNumberFromTD([ones, irrat, denominator]); 18050 if (scalePower !== 0) { 18051 const multiplier = this.createPower$int(scalePower); 18052 return result["times$com_vzome_core_algebra_AlgebraicNumber"](multiplier); 18053 } else return result; 18054 } 18055 /** 18056 * 18057 * @param {number} ones 18058 * @param {number} irrat 18059 * @param {number} denominator 18060 * @param {number} scalePower 18061 * @return {*} 18062 */ 18063 createAlgebraicNumber(ones, irrat, denominator, scalePower) { 18064 if ((typeof ones === "number" || ones === null) && (typeof irrat === "number" || irrat === null) && (typeof denominator === "number" || denominator === null) && (typeof scalePower === "number" || scalePower === null)) { 18065 return this.createAlgebraicNumber$int$int$int$int(ones, irrat, denominator, scalePower); 18066 } else if ((ones != null && ones instanceof Array && (ones.length == 0 || ones[0] == null || typeof ones[0] === "
18066number") || ones === null) && (typeof irrat === "number" || irrat === null) && denominator === void 0 && scalePower === void 0) { 18067 return this.createAlgebraicNumber$int_A$int(ones, irrat); 18068 } else if ((ones != null && ones instanceof Array && (ones.length == 0 || ones[0] == null || typeof ones[0] === "number") || ones === null) && irrat === void 0 && denominator === void 0 && scalePower === void 0) { 18069 return this.createAlgebraicNumber$int_A(ones); 18070 } else throw new Error("invalid overload"); 18071 } 18072 /** 18073 * 18074 * @param {string} nums 18075 * @return {AlgebraicVector} 18076 */ 18077 parseVector(nums) { 18078 const noLF = ( 18079 /* replace */ 18080 nums.split("\n").join(" ") 18081 ); 18082 const noCRLF = ( 18083 /* replace */ 18084 noLF.split("\r").join(" ") 18085 ); 18086 const tokens = new java.util.StringTokenizer(noCRLF, " "); 18087 const numToks = tokens.countTokens(); 18088 if (numToks % this.getOrder() !== 0) throw new java.lang.IllegalStateException("Field order (" + this.getOrder() + ") does not divide token count: " + numToks + ", for '" + noCRLF + "'"); 18089 const dims = numToks / this.getOrder() | 0; 18090 const coords = ((s) => { 18091 let a = []; 18092 while (s-- > 0) a.push(null); 18093 return a; 18094 })(dims); 18095 for (let i = 0; i < dims; i++) { 18096 { 18097 coords[i] = this.parseNumber$java_util_StringTokenizer(tokens); 18098 } 18099 ; 18100 } 18101 return new AlgebraicVector(coords); 18102 } 18103 parseNumber$java_lang_String(nums) { 18104 const tokens = new java.util.StringTokenizer(nums, " "); 18105 return this.parseNumber$java_util_StringTokenizer(tokens); 18106 } 18107 /** 18108 * 18109 * @param {string} nums 18110 * @return {*} 18111 */ 18112 parseNumber(nums) { 18113 if (typeof nums === "string" || nums === null) { 18114 return this.parseNumber$java_lang_String(nums); 18115 } else if (nums != null && nums instanceof java.util.StringTokenizer || nums === null) { 18116 return this.parseNumber$java_util_StringTokenizer(nums); 18117 } else throw new Error("invalid overload"); 18118 } 18119 /*private*/ 18120 parseNumber$java_util_StringTokenizer(tokens) { 18121 const order = this.getOrder(); 18122 const pairs = ((s) => { 18123 let a = []; 18124 while (s-- > 0) a.push(0); 18125 return a; 18126 })(order * 2); 18127 for (let i = 0; i < order; i++) { 18128 { 18129 const digit = tokens.nextToken(); 18130 const parts = digit.split("/"); 18131 pairs[i * 2] = this.parseInt(parts[0]); 18132 if (parts.length > 1) pairs[i * 2 + 1] = this.parseInt(parts[1]); 18133 else pairs[i * 2 + 1] = 1; 18134 } 18135 ; 18136 } 18137 return this.createAlgebraicNumberFromPairs(pairs); 18138 } 18139 /** 18140 * 18141 * @param {string} string 18142 * @return {*} 18143 */ 18144 parseLegacyNumber(string) { 18145 let div = 1; 18146 if ( 18147 /* startsWith */ 18148 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(string, "(") 18149 ) { 18150 const closeParen = string.indexOf(")"); 18151 div = this.parseInt(string.substring(closeParen + 2)); 18152 string = string.substring(1, closeParen); 18153 } 18154 let phis = 0; 18155 let bump = 3; 18156 let phiIndex = string.indexOf("phi"); 18157 if (phiIndex < 0) { 18158 phiIndex = string.indexOf("sqrt2"); 18159 bump = 5; 18160 } 18161 if (phiIndex >= 0) { 18162 const part = string.substring(0, phiIndex); 18163 if (part.length === 0) phis = 1; 18164 else if (part === "-") phis = -1; 18165 else phis = this.parseInt(part); 18166 string = string.substring(phiIndex + bump); 18167 } 18168 let ones; 18169 if (string.length === 0) ones = 0; 18170 else { 18171 if ( 18172 /* startsWith */ 18173 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(string, "+") 18174 ) string = string.substring(1); 18175 ones = this.parseInt(string); 18176 } 18177 return this.createAlgebraicNumber$int$int$int$int(ones, phis, div, 0); 18178 } 18179 getIrrational$int$int(i, format) { 18180 const f = this.delegate["getIrrational"]; 18181 return f(i); 18182 } 18183 /** 18184 * 18185 * @param {number} i 18186 * @param {number} format 18187 * @return {string} 18188 */ 18189 getIrrational(i, format) { 18190 if ((typeof i === "number" || i === null) && (typeof format === "number" || format === null)) { 18191 return this.getIrrational$int$int(i, format); 18192 }
18192 else if ((typeof i === "number" || i === null) && format === void 0) { 18193 return this.getIrrational$int(i); 18194 } else throw new Error("invalid overload"); 18195 } 18196 getIrrational$int(which) { 18197 return this.getIrrational$int$int(which, 0); 18198 } 18199 setInterpreterModule(module) { 18200 this.zomicModule = module; 18201 } 18202 interpretScript(script, language, offset, symmetry, effects) { 18203 if (this.zomicModule == null) throw new Error("The Zomic module was not loaded."); 18204 const f = this.zomicModule["interpretScript"]; 18205 f(script, language, offset, symmetry, effects); 18206 } 18207 getNumberByName(name) { 18208 throw new java.lang.RuntimeException("unimplemented JsAlgebraicField.getNumberByName"); 18209 } 18210 scaleBy(factors, whichIrrational) { 18211 throw new java.lang.RuntimeException("unimplemented JsAlgebraicField.scaleBy"); 18212 } 18213 /** 18214 * 18215 * @param {RealVector} target 18216 * @return {AlgebraicVector} 18217 */ 18218 nearestAlgebraicVector(target) { 18219 throw new java.lang.RuntimeException("unimplemented JsAlgebraicField.nearestAlgebraicVector"); 18220 } 18221 /** 18222 * 18223 * @param {int[][]} nums 18224 * @return {AlgebraicVector} 18225 */ 18226 createIntegerVector(nums) { 18227 throw new java.lang.RuntimeException("unimplemented JsAlgebraicField.createIntegerVector"); 18228 } 18229 /** 18230 * 18231 * @param {int[][][]} data 18232 * @return {AlgebraicMatrix} 18233 */ 18234 createMatrix(data) { 18235 throw new java.lang.RuntimeException("unimplemented JsAlgebraicField.createMatrix"); 18236 } 18237}; 18238JsAlgebraicField["__class"] = "com.vzome.jsweet.JsAlgebraicField"; 18239JsAlgebraicField["__interfaces"] = ["com.vzome.core.algebra.AlgebraicField"]; 18240
18241// src/worker/legacy/from-java/com/vzome/core/editor/SelectionSummary.ts 18242var SelectionSummary = class _SelectionSummary { 18243 static LOGGER_$LI$() { 18244 if (_SelectionSummary.LOGGER == null) { 18245 _SelectionSummary.LOGGER = java.util.logging.Logger.getLogger("com.vzome.core.editor.SelectionSummary"); 18246 } 18247 return _SelectionSummary.LOGGER; 18248 } 18249 constructor(selection) { 18250 this.balls = 0; 18251 this.struts = 0; 18252 this.panels = 0; 18253 this.listeners = new java.util.ArrayList(); 18254 if (this.selection === void 0) { 18255 this.selection = null; 18256 } 18257 this.selection = selection; 18258 } 18259 notifyListeners() { 18260 for (let index = this.listeners.iterator(); index.hasNext(); ) { 18261 let listener = index.next(); 18262 { 18263 listener.selectionChanged(this.selection.size(), this.balls, this.struts, this.panels); 18264 } 18265 } 18266 } 18267 /** 18268 * 18269 * @param {*} m 18270 */ 18271 manifestationAdded(m) { 18272 if (m != null && (m.constructor != null && m.constructor["__interfaces"] != null && m.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) ++this.balls; 18273 else if (m != null && (m.constructor != null && m.constructor["__interfaces"] != null && m.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) ++this.struts; 18274 else if (m != null && (m.constructor != null && m.constructor["__interfaces"] != null && m.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0)) ++this.panels; 18275 this.verifyCounts(); 18276 } 18277 /** 18278 * 18279 * @param {*} m 18280 */ 18281 manifestationRemoved(m) { 18282 if (m != null && (m.constructor != null && m.constructor["__interfaces"] != null && m.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) --this.balls; 18283 else if (m != null && (m.constructor != null && m.constructor["__interfaces"] != null && m.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) --this.struts; 18284 else if (m != null && (m.constructor != null && m.constructor["__interfaces"] != null && m.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0)) --this.panels; 18285 this.verifyCounts(); 18286 } 18287 verifyCounts() { 18288 if (this.balls + this.struts + this.panels !== this.selection.size()) { 18289 if (_SelectionSummary.LOGGER_$LI$().isLoggable(java.util.logging.Level.WARNING)) { 18290 _SelectionSummary.LOGGER_$LI$().warning("Incorrect total for balls, struts and panels: " + this.balls + " + " + this.struts + " + " + this.panels + " != " + this.selection.size()); 18291 } 18292 this.balls = this.struts = this.panels = 0; 18293 for (let index = this.selection.iterator(); index.hasNext(); ) { 18294 let m = index.next(); 18295 { 18296 if (m != null && (m.constructor != null && m.constructor["__interfaces"] != null && m.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) ++this.balls; 18297 else if (m != null && (m.constructor != null && m.constructor["__interfaces"] != null && m.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) ++this.struts; 18298 else if (m != null && (m.constructor != null && m.constructor["__interfaces"] != null && m.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0)) ++this.panels; 18299 } 18300 } 18301 if (_SelectionSummary.LOGGER_$LI$().isLoggable(java.util.logging.Level.WARNING)) { 18302 _SelectionSummary.LOGGER_$LI$().warning("SelectionSummary resynced on thread: " + java.lang.Thread.currentThread() + ". " + this.balls + " + " + this.struts + " + " + this.panels + " = " + this.selection.size()); 18303 } 18304 } 18305 } 18306 /** 18307 * 18308 * @param {*} m 18309 * @param {Color} color 18310 */ 18311 manifestationColored(m, color) { 18312 } 18313 /** 18314 * 18315 * @param {*} m 18316 * @param {string} label 18317 */ 18318 manifestationLabeled(m, label) { 18319 } 18320 addListener(listener) { 18321 this.listeners.add(listener); 18322 } 18323}; 18324SelectionSummary["__class"] = "com.vzome.core.editor.SelectionSummary"; 18325SelectionSummary["__interfaces"] = ["com.vzome.core.model.ManifestationChanges"]; 18326
18327// src/worker/legacy/from-java/com/vzome/jsweet/JsEditorModel.ts 18328var JsEditorModel = class { 18329 constructor(realizedModel, selection, kind, symmetries, symmetrySystems) { 18330 if (this.realizedModel === void 0) { 18331 this.realizedModel = null; 18332 } 18333 if (this.selection === void 0) { 18334 this.selection = null; 18335 } 18336 if (this.kind === void 0) { 18337 this.kind = null; 18338 } 18339 if (this.symmetrySegment === void 0) { 18340 this.symmetrySegment = null; 18341 } 18342 if (this.symmetryCenter === void 0) { 18343 this.symmetryCenter = null; 18344 } 18345 if (this.symmetries === void 0) { 18346 this.symmetries = null; 18347 } 18348 if (this.symmetrySystems === void 0) { 18349 this.symmetrySystems = null; 18350 } 18351 if (this.selectionSummary === void 0) { 18352 this.selectionSummary = null; 18353 } 18354 this.realizedModel = realizedModel; 18355 this.selection = selection; 18356 this.kind = kind; 18357 this.symmetries = symmetries; 18358 this.symmetrySystems = symmetrySystems; 18359 this.symmetryCenter = new FreePoint(realizedModel.getField().origin(3)); 18360 this.selectionSummary = new SelectionSummary(this.selection); 18361 this.selection.addListener(this.selectionSummary); 18362 } 18363 setAdapter(adapter) { 18364 } 18365 /** 18366 * 18367 * @return {*} 18368 */ 18369 getRealizedModel() { 18370 return this.realizedModel; 18371 } 18372 /** 18373 * 18374 * @return {*} 18375 */ 18376 getSelection() { 18377 return this.selection; 18378 } 18379 /** 18380 * 18381 * @return {*} 18382 */ 18383 get4dSymmetries() { 18384 return this.kind; 18385 } 18386 /** 18387 * 18388 * @return {Segment} 18389 */ 18390 getSymmetrySegment() { 18391 return this.symmetrySegment; 18392 } 18393 /** 18394 * 18395 * @return {Point} 18396 */ 18397 getCenterPoint() { 18398 return this.symmetryCenter; 18399 } 18400 /** 18401 * 18402 * @param {Construction} cons 18403 * @return {boolean} 18404 */ 18405 hasFailedConstruction(cons) { 18406 return false; 18407 } 18408 getSymmetrySystem$() { 18409 return this.symmetries; 18410 } 18411 getSymmetrySystem$java_lang_String(name) { 18412 return this.symmetrySystems[name]; 18413 } 18414 /** 18415 * 18416 * @param {string} name 18417 * @return {*} 18418 */ 18419 getSymmetrySystem(name) { 18420 if (typeof name === "string" || name === null) { 18421 return this.getSymmetrySystem$java_lang_String(name); 18422 } else if (name === void 0) { 18423 return this.getSymmetrySystem$(); 18424 } else throw new Error("invalid overload"); 18425 } 18426 /** 18427 * 18428 * @param {Construction} cons 18429 */ 18430 addFailedConstruction(cons) { 18431 } 18432 /** 18433 * 18434 * @param {Construction} point 18435 */ 18436 setCenterPoint(point) { 18437 this.symmetryCenter = point; 18438 } 18439 /** 18440 * 18441 * @param {Segment} segment 18442 */ 18443 setSymmetrySegment(segment) { 18444 this.symmetrySegment = segment; 18445 } 18446 /** 18447 * 18448 * @param {*} listener 18449 */ 18450 addSelectionSummaryListener(listener) { 18451 this.selectionSummary.addListener(listener); 18452 } 18453 notifyListeners() { 18454 this.selectionSummary.notifyListeners(); 18455 } 18456 /** 18457 * 18458 * @param {java.lang.Class} kind 18459 * @return {Construction} 18460 */ 18461 getSelectedConstruction(kind) { 18462 let manifestationClass; 18463 if (kind === Point) manifestationClass = "com.vzome.core.model.Connector"; 18464 else if (kind === Segment) manifestationClass = "com.vzome.core.model.Strut"; 18465 else return null; 18466 const focus = this.selection.getSingleSelection(manifestationClass); 18467 if (focus != null) return focus.getFirstConstruction(); 18468 return null; 18469 } 18470}; 18471JsEditorModel["__class"] = "com.vzome.jsweet.JsEditorModel"; 18472JsEditorModel["__interfaces"] = ["com.vzome.core.editor.api.EditorModel", "com.vzome.core.editor.api.LegacyEditorModel", "com.vzome.core.editor.api.ImplicitSymmetryParameters", "com.vzome.core.editor.api.SymmetryAware"]; 18473
18474// src/worker/legacy/from-java/com/vzome/core/math/symmetry/PlaneOrbitSet.ts 18475var PlaneOrbitSet = class extends OrbitSet { 18476 constructor(delegate, normal) { 18477 super(delegate.getSymmetry()); 18478 if (this.delegate === void 0) { 18479 this.delegate = null; 18480 } 18481 if (this.normal === void 0) { 18482 this.normal = null; 18483 } 18484 this.__zones = new java.util.HashSet(); 18485 this.delegate = delegate; 18486 this.normal = normal; 18487 for (let index = delegate.getDirections().iterator(); index.hasNext(); ) { 18488 let dir = index.next(); 18489 { 18490 for (let index2 = dir.iterator(); index2.hasNext(); ) { 18491 let axis = index2.next(); 18492 { 18493 if (axis.normal().dot(this.normal).isZero()) this.__zones.add(axis); 18494 } 18495 } 18496 } 18497 } 18498 } 18499 zones() { 18500 return this.__zones.iterator(); 18501 } 18502 /** 18503 * 18504 * @param {RealVector} vector 18505 * @return {Axis} 18506 */ 18507 getAxis(vector) { 18508 if (RealVector.ORIGIN_$LI$().equals(vector)) { 18509 return null; 18510 } 18511 let maxCosine = -1; 18512 let closest = null; 18513 for (let index = this.__zones.iterator(); index.hasNext(); ) { 18514 let axis = index.next(); 18515 { 18516 const axisV = axis.normal().toRealVector(); 18517 const cosine = vector.dot(axisV) / (vector.length() * axisV.length()); 18518 if (cosine > maxCosine) { 18519 maxCosine = cosine; 18520 closest = axis; 18521 } 18522 } 18523 } 18524 return closest; 18525 } 18526 /** 18527 * 18528 * @param {string} name 18529 * @return {Direction} 18530 */ 18531 getDirection(name) { 18532 return this.delegate.getDirection(name); 18533 } 18534}; 18535PlaneOrbitSet["__class"] = "com.vzome.core.math.symmetry.PlaneOrbitSet"; 18536
18537// src/worker/legacy/from-java/com/vzome/core/algebra/PlasticNumberField.ts 18538var PlasticNumberField = class _PlasticNumberField extends ParameterizedField { 18539 static { 18540 this.FIELD_NAME = "plasticNumber"; 18541 } 18542 /** 18543 * 18544 * @return {double[]} the coefficients of a PlasticNumberField. 18545 * This can be used to determine when two fields have compatible coefficients 18546 * without having to generate an instance of the class. 18547 */ 18548 static getFieldCoefficients() { 18549 const plasticNumber = 1.32471795724475; 18550 return [1, plasticNumber, plasticNumber * plasticNumber]; 18551 } 18552 /** 18553 * 18554 * @return {number} 18555 */ 18556 getNumMultipliers() { 18557 return 1; 18558 } 18559 /** 18560 * 18561 * @return {double[]} 18562 */ 18563 getCoefficients() { 18564 return _PlasticNumberField.getFieldCoefficients(); 18565 } 18566 constructor(factory) { 18567 super(_PlasticNumberField.FIELD_NAME, 3, factory); 18568 this.initialize(); 18569 } 18570 /** 18571 * 18572 */ 18573 initializeCoefficients() { 18574 const temp = this.getCoefficients(); 18575 let i = 0; 18576 for (let index = 0; index < temp.length; index++) { 18577 let coefficient = temp[index]; 18578 { 18579 this.coefficients[i++] = coefficient; 18580 } 18581 } 18582 } 18583 /** 18584 * 18585 */ 18586 initializeMultiplicationTensor() { 18587 const tensor = [[[1, 0, 0], [0, 0, 1], [0, 1, 0]], [[0, 1, 0], [1, 0, 1], [0, 1, 1]], [[0, 0, 1], [0, 1, 0], [1, 0, 1]]]; 18588 this.multiplicationTensor = tensor; 18589 } 18590 /** 18591 * 18592 */ 18593 initializeLabels() { 18594 const upperRho = "\u03A1"; 18595 this.irrationalLabels[1] = [upperRho, "P"]; 18596 this.irrationalLabels[2] = [upperRho + "\xB2", "P^2"]; 18597 } 18598}; 18599PlasticNumberField["__class"] = "com.vzome.core.algebra.PlasticNumberField"; 18600PlasticNumberField["__interfaces"] = ["com.vzome.core.algebra.AlgebraicField"]; 18601
18602// src/worker/legacy/from-java/com/vzome/core/algebra/PlasticPhiField.ts 18603var PlasticPhiField = class _PlasticPhiField extends ParameterizedField { 18604 static { 18605 this.FIELD_NAME = "plasticPhi"; 18606 } 18607 /** 18608 * @return {double[]} the coefficients of a PlasticPhiField. 18609 * This can be used to determine when two fields have compatible coefficients 18610 * without having to generate an instance of the class. 18611 */ 18612 static getFieldCoefficients() { 18613 const plasticNumber = 1.32471795724475; 18614 const phi = (1 + Math.sqrt(5)) / 2; 18615 return [1, phi, plasticNumber, plasticNumber * phi, plasticNumber * plasticNumber, plasticNumber * plasticNumber * phi]; 18616 } 18617 /** 18618 * 18619 * @return {number} 18620 */ 18621 getNumMultipliers() { 18622 return 2; 18623 } 18624 /** 18625 * 18626 * @return {double[]} 18627 */ 18628 getCoefficients() { 18629 return _PlasticPhiField.getFieldCoefficients(); 18630 } 18631 constructor(factory) { 18632 super(_PlasticPhiField.FIELD_NAME, 6, factory); 18633 this.initialize(); 18634 } 18635 /** 18636 * 18637 */ 18638 initializeCoefficients() { 18639 const temp = this.getCoefficients(); 18640 let i = 0; 18641 for (let index = 0; index < temp.length; index++) { 18642 let coefficient = temp[index]; 18643 { 18644 this.coefficients[i++] = coefficient; 18645 } 18646 } 18647 } 18648 /** 18649 * 18650 */ 18651 initializeMultiplicationTensor() { 18652 const tensor = [[[1, 0, 0, 0, 0, 0], [0, 1, 0, 0, 0, 0], [0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 1], [0, 0, 1, 0, 0, 0], [0, 0, 0, 1, 0, 0]], [[0, 1, 0, 0, 0, 0], [1, 1, 0, 0, 0, 0], [0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 1, 1], [0, 0, 0, 1, 0, 0], [0, 0, 1, 1, 0, 0]], [[0, 0, 1, 0, 0, 0], [0, 0, 0, 1, 0, 0], [1, 0, 0, 0, 1, 0], [0, 1, 0, 0, 0, 1], [0, 0, 1, 0, 1, 0], [0, 0, 0, 1, 0, 1]], [[0, 0, 0, 1, 0, 0], [0, 0, 1, 1, 0, 0], [0, 1, 0, 0, 0, 1], [1, 1, 0, 0, 1, 1], [0, 0, 0, 1, 0, 1], [0, 0, 1, 1, 1, 1]], [[0, 0, 0, 0, 1, 0], [0, 0, 0, 0, 0, 1], [0, 0, 1, 0, 0, 0], [0, 0, 0, 1, 0, 0], [1, 0, 0, 0, 1, 0], [0, 1, 0, 0, 0, 1]], [[0, 0, 0, 0, 0, 1], [0, 0, 0, 0, 1, 1], [0, 0, 0, 1, 0, 0], [0, 0, 1, 1, 0, 0], [0, 1, 0, 0, 0, 1], [1, 1, 0, 0, 1, 1]]]; 18653 this.multiplicationTensor = tensor; 18654 } 18655 /** 18656 * 18657 */ 18658 initializeLabels() { 18659 const upperRho = "\u03A1"; 18660 const lowerPhi = "\u03C6"; 18661 this.irrationalLabels[1] = [lowerPhi, "phi"]; 18662 this.irrationalLabels[2] = [upperRho, "P"]; 18663 this.irrationalLabels[3] = [upperRho + "\u03C6", "Pphi"]; 18664 this.irrationalLabels[4] = [upperRho + "\xB2", "P^2"]; 18665 this.irrationalLabels[5] = [upperRho + "\xB2\u03C6", "P^2phi"]; 18666 } 18667 /** 18668 * 18669 * @return {*} 18670 */ 18671 getGoldenRatio() { 18672 return this.getUnitTerm(1); 18673 } 18674}; 18675PlasticPhiField["__class"] = "com.vzome.core.algebra.PlasticPhiField"; 18676PlasticPhiField["__interfaces"] = ["com.vzome.core.algebra.AlgebraicField"]; 18677
18678// src/worker/legacy/from-java/com/vzome/core/kinds/PlasticPhiFieldApplication.ts 18679var PlasticPhiFieldApplication = class extends DefaultFieldApplication { 18680 constructor(field5) { 18681 super(field5); 18682 if (this.icosahedralPerspective === void 0) { 18683 this.icosahedralPerspective = null; 18684 } 18685 this.symmetryPerspectives = new java.util.ArrayList(); 18686 if (this.H4 === void 0) { 18687 this.H4 = null; 18688 } 18689 this.h4Builder = null; 18690 this.icosahedralPerspective = new IcosahedralSymmetryPerspective(this.getField()); 18691 this.symmetryPerspectives.add(this.icosahedralPerspective); 18692 this.symmetryPerspectives.add(super.getDefaultSymmetryPerspective()); 18693 this.H4 = new QuaternionicSymmetry("H_4", "com/vzome/core/math/symmetry/H4roots.vef", this.getField()); 18694 } 18695 /** 18696 * 18697 * @return {PlasticPhiField} 18698 */ 18699 getField() { 18700 return super.getField(); 18701 } 18702 /** 18703 * 18704 * @return {*} 18705 */ 18706 getSymmetryPerspectives() { 18707 return this.symmetryPerspectives; 18708 } 18709 /** 18710 * 18711 * @return {*} 18712 */ 18713 getDefaultSymmetryPerspective() { 18714 return this.icosahedralPerspective; 18715 } 18716 /** 18717 * 18718 * @param {string} symmName 18719 * @return {*} 18720 */ 18721 getSymmetryPerspective(symmName) { 18722 for (let index = this.symmetryPerspectives.iterator(); index.hasNext(); ) { 18723 let sp = index.next(); 18724 { 18725 if (sp.getName() === symmName) { 18726 return sp; 18727 } 18728 } 18729 } 18730 return super.getSymmetryPerspective(symmName); 18731 } 18732 /** 18733 * 18734 * @param {*} toolFactories 18735 * @param {ToolsModel} tools 18736 */ 18737 registerToolFactories(toolFactories, tools) { 18738 super.registerToolFactories(toolFactories, tools); 18739 const symm = this.icosahedralPerspective.getSymmetry(); 18740 toolFactories.put("AxialStretchTool", new AxialStretchTool.Factory(tools, symm, false, false, false)); 18741 toolFactories.put("SymmetryTool", new IcosahedralToolFactory(tools, symm)); 18742 } 18743 /** 18744 * 18745 * @param {string} name 18746 * @return {QuaternionicSymmetry} 18747 */ 18748 getQuaternionSymmetry(name) { 18749 switch (name) { 18750 case "H_4": 18751 return this.H4; 18752 default: 18753 return null; 18754 } 18755 } 18756 /** 18757 * 18758 * @param {string} groupName 18759 * @param {number} index 18760 * @param {number} edgesToRender 18761 * @param {AlgebraicNumber[]} edgeScales 18762 * @param {*} listener 18763 */ 18764 constructPolytope(groupName, index, edgesToRender, edgeScales, listener) { 18765 switch (groupName) { 18766 case "H4": 18767 if (this.h4Builder == null) { 18768 const qsymm = new QuaternionicSymmetry("H_4", "com/vzome/core/math/symmetry/H4roots.vef", this.getField()); 18769 this.h4Builder = new CommandUniformH4Polytope(this.getField(), qsymm, 0); 18770 } 18771 this.h4Builder.generate(index, edgesToRender, edgeScales, listener); 18772 break; 18773 default: 18774 super.constructPolytope(groupName, index, edgesToRender, edgeScales, listener); 18775 break; 18776 } 18777 } 18778}; 18779PlasticPhiFieldApplication["__class"] = "com.vzome.core.kinds.PlasticPhiFieldApplication"; 18780PlasticPhiFieldApplication["__interfaces"] = ["com.vzome.core.math.symmetry.Symmetries4D", "com.vzome.core.editor.FieldApplication"]; 18781
18782// src/worker/legacy/from-java/com/vzome/core/viewing/AntiprismShapes.ts 18783var AntiprismShapes = class extends AbstractShapes { 18784 constructor(pkgName, name, symm) { 18785 super(pkgName, name, null, symm); 18786 } 18787 /** 18788 * 18789 * @return {AntiprismSymmetry} 18790 */ 18791 getSymmetry() { 18792 return super.getSymmetry(); 18793 } 18794 /** 18795 * 18796 * @param {string} pkgName 18797 * @return {Polyhedron} 18798 */ 18799 buildConnectorShape(pkgName) { 18800 const symm = this.getSymmetry(); 18801 const field5 = symm.getField(); 18802 const nSides = field5.polygonSides(); 18803 const antiprism = new Polyhedron(field5); 18804 const topX = field5.one(); 18805 const topY = field5.zero(); 18806 const maxTerm = field5.getUnitDiagonal(field5.diagonalCount() - 1); 18807 const botX = field5.getUnitDiagonal(field5.diagonalCount() - 2).dividedBy(maxTerm); 18808 const botY = maxTerm.reciprocal(); 18809 const halfHeight = pkgName === "thin" ? field5.getUnitDiagonal(field5.diagonalCount() - 1).reciprocal() : field5.one(); 18810 const rotationMatrix = symm.getRotationMatrix(); 18811 let vTop = new AlgebraicVector(topX, topY, halfHeight); 18812 let vBot = new AlgebraicVector(botX, botY, halfHeight.negate()); 18813 for (let i = 0; i < nSides; i++) { 18814 { 18815 antiprism.addVertex(vTop); 18816 antiprism.addVertex(vBot); 18817 vTop = rotationMatrix.timesColumn(vTop); 18818 vBot = rotationMatrix.timesColumn(vBot); 18819 } 18820 ; 18821 } 18822 const topFace = antiprism.newFace(); 18823 const botFace = antiprism.newFace(); 18824 for (let i = 0; i < nSides * 2; i += 2) { 18825 { 18826 topFace.add(i); 18827 } 18828 ; 18829 } 18830 for (let i = nSides * 2 - 1; i >= 0; i -= 2) { 18831 { 18832 botFace.add(i); 18833 } 18834 ; 18835 } 18836 antiprism.addFace(topFace); 18837 antiprism.addFace(botFace); 18838 const nVertices = nSides * 2; 18839 for (let i = 0; i < nSides * 2; i += 2) { 18840 { 18841 const face = antiprism.newFace(); 18842 face.add(i); 18843 face.add((i + 1) % nVertices); 18844 face.add((i + 2) % nVertices); 18845 antiprism.addFace(face); 18846 } 18847 ; 18848 } 18849 for (let i = 1; i < nSides * 2; i += 2) { 18850 { 18851 const face = antiprism.newFace(); 18852 face.add(i); 18853 face.add((i + 2) % nVertices); 18854 face.add((i + 1) % nVertices); 18855 antiprism.addFace(face); 18856 } 18857 ; 18858 } 18859 return antiprism; 18860 } 18861}; 18862AntiprismShapes["__class"] = "com.vzome.core.viewing.AntiprismShapes"; 18863AntiprismShapes["__interfaces"] = ["com.vzome.core.editor.api.Shapes"]; 18864
18865// src/worker/legacy/from-java/com/vzome/core/kinds/PolygonFieldApplication.ts 18866var PolygonFieldApplication = class _PolygonFieldApplication extends DefaultFieldApplication { 18867 constructor(field5) { 18868 super(field5); 18869 this.symmetryPerspectives = new java.util.ArrayList(); 18870 if (this.icosahedralPerspective === void 0) { 18871 this.icosahedralPerspective = null; 18872 } 18873 if (this.H4 === void 0) { 18874 this.H4 = null; 18875 } 18876 this.h4Builder = null; 18877 this.symmetryPerspectives.add(new _PolygonFieldApplication.AntiprismSymmetryPerspective(this)); 18878 if (field5.polygonSides() === 5) { 18879 this.icosahedralPerspective = new IcosahedralSymmetryPerspective(this.getField()); 18880 this.symmetryPerspectives.add(this.icosahedralPerspective); 18881 this.H4 = new QuaternionicSymmetry("H_4", "com/vzome/core/math/symmetry/H4roots.vef", this.getField()); 18882 } else { 18883 this.icosahedralPerspective = null; 18884 this.H4 = null; 18885 } 18886 this.symmetryPerspectives.add(super.getDefaultSymmetryPerspective()); 18887 } 18888 /** 18889 * 18890 * @return {PolygonField} 18891 */ 18892 getField() { 18893 return super.getField(); 18894 } 18895 /** 18896 * 18897 * @return {*} 18898 */ 18899 getSymmetryPerspectives() { 18900 return this.symmetryPerspectives; 18901 } 18902 /** 18903 * 18904 * @return {*} 18905 */ 18906 getDefaultSymmetryPerspective() { 18907 return this.icosahedralPerspective == null ? this.symmetryPerspectives.get(0) : this.icosahedralPerspective; 18908 } 18909 /** 18910 * 18911 * @param {string} symmName 18912 * @return {*} 18913 */ 18914 getSymmetryPerspective(symmName) { 18915 for (let index = this.symmetryPerspectives.iterator(); index.hasNext(); ) { 18916 let sp = index.next(); 18917 { 18918 if (sp.getName() === symmName) { 18919 return sp; 18920 } 18921 } 18922 } 18923 return super.getSymmetryPerspective(symmName); 18924 } 18925 /** 18926 * 18927 * @param {*} toolFactories 18928 * @param {ToolsModel} tools 18929 */ 18930 registerToolFactories(toolFactories, tools) { 18931 super.registerToolFactories(toolFactories, tools); 18932 if (this.icosahedralPerspective != null) { 18933 const symm = this.icosahedralPerspective.getSymmetry(); 18934 toolFactories.put("AxialStretchTool", new AxialStretchTool.Factory(tools, symm, false, false, false)); 18935 toolFactories.put("SymmetryTool", new IcosahedralToolFactory(tools, symm)); 18936 } 18937 } 18938 /** 18939 * 18940 * @param {string} name 18941 * @return {QuaternionicSymmetry} 18942 */ 18943 getQuaternionSymmetry(name) { 18944 switch (name) { 18945 case "H_4": 18946 return this.H4; 18947 default: 18948 return null; 18949 } 18950 } 18951 /** 18952 * 18953 * @param {string} groupName 18954 * @param {number} index 18955 * @param {number} edgesToRender 18956 * @param {AlgebraicNumber[]} edgeScales 18957 * @param {*} listener 18958 */ 18959 constructPolytope(groupName, index, edgesToRender, edgeScales, listener) { 18960 switch (groupName) { 18961 case "H4": 18962 if (this.h4Builder == null) { 18963 const qsymm = new QuaternionicSymmetry("H_4", "com/vzome/core/math/symmetry/H4roots.vef", this.getField()); 18964 this.h4Builder = new CommandUniformH4Polytope(this.getField(), qsymm, 0); 18965 } 18966 this.h4Builder.generate(index, edgesToRender, edgeScales, listener); 18967 break; 18968 default: 18969 super.constructPolytope(groupName, index, edgesToRender, edgeScales, listener); 18970 break; 18971 } 18972 } 18973}; 18974PolygonFieldApplication["__class"] = "com.vzome.core.kinds.PolygonFieldApplication"; 18975PolygonFieldApplication["__interfaces"] = ["com.vzome.core.math.symmetry.Symmetries4D", "com.vzome.core.editor.FieldApplication"]; 18976((PolygonFieldApplication2) => { 18977 class AntiprismSymmetryPerspective extends AbstractSymmetryPerspective { 18978 constructor(__parent) { 18979 super(new AntiprismSymmetry(__parent.getField()).createStandardOrbits("blue")); 18980 this.__parent = __parent; 18981 this.axialsymm = new CommandAxialSymmetry(this.symmetry); 18982 const thinAntiprismShapes = new AntiprismShapes("thin", "thin antiprism", this.getSymmetry()); 18983 const antiprismShapes = new AntiprismShapes("antiprism", "antiprism", this.getSymmetry()); 18984 const octahedralShapes = new OctahedralShapes("octahedral", "octahedral", this.symmetry); 18985 this.setDefaultGeometry(thinAntiprismShapes); 18986 this.addShapes(antiprismShapes); 18987 this.addShapes(octahedralShapes); 18988 } 18989 /** 18990 * 18991 * @return {string} 18992 */ 18993 getLabel() { 18994 return "antiprism"; 18995 } 18996 /** 18997 * 18998 * @return {AntiprismSymmetry} 18999 */ 19000 getSymmetry() { 19001 return super.getSymmetry(); 19002 } 19003 /** 19004 * 19005 * @param {Tool.Kind} kind 19006 * @param {ToolsModel} tools 19007 * @return {*} 19008 */ 19009 createToolFactories(kind, tools) { 19010 const isTrivial = this.symmetry.isTrivial(); 19011 const result = new java.util.ArrayList(); 19012 switch (kind) { 19013 case Tool2.Kind.SYMMETRY: 19014 result.add(new SymmetryToolFactory(tools, this.symmetry)); 19015 if (isTrivial) { 19016 result.add(new InversionToolFactory(tools)); 19017 } 19018 result.add(new LineReflectionToolFactory(tools)); 19019 result.add(new MirrorToolFactory(tools)); 19020 result.add(new AxialSymmetryToolFactory(tools, this.symmetry)); 19021 break; 19022 case Tool2.Kind.TRANSFORM: 19023 result.add(new ScalingToolFactory(tools, this.symmetry)); 19024 result.add(new RotationToolFactory(tools, this.symmetry)); 19025 result.add(new TranslationToolFactory(tools)); 19026 if (isTrivial) { 19027 result.add(new ProjectionToolFactory(tools)); 19028 } 19029 break;
19030 case Tool2.Kind.LINEAR_MAP: 19031 result.add(new LinearMapToolFactory(tools, this.symmetry, false)); 19032 break; 19033 default: 19034 break; 19035 } 19036 return result; 19037 } 19038 /** 19039 * 19040 * @param {Tool.Kind} kind 19041 * @param {ToolsModel} tools 19042 * @return {*} 19043 */ 19044 predefineTools(kind, tools) { 19045 const result = new java.util.ArrayList(); 19046 switch (kind) { 19047 case Tool2.Kind.SYMMETRY: 19048 result.add(new SymmetryToolFactory(tools, this.symmetry).createPredefinedTool("polygonal antiprism around origin")); 19049 result.add(new MirrorToolFactory(tools).createPredefinedTool("reflection through XY plane")); 19050 result.add(new AxialSymmetryToolFactory(tools, this.symmetry, true).createPredefinedTool("symmetry around red through origin")); 19051 break; 19052 case Tool2.Kind.TRANSFORM: 19053 result.add(new ScalingToolFactory(tools, this.symmetry).createPredefinedTool("scale down")); 19054 result.add(new ScalingToolFactory(tools, this.symmetry).createPredefinedTool("scale up")); 19055 result.add(new RotationToolFactory(tools, this.symmetry, true).createPredefinedTool("rotate around red through origin")); 19056 break; 19057 default: 19058 break; 19059 } 19060 return result; 19061 } 19062 /** 19063 * 19064 * @param {string} action 19065 * @return {*} 19066 */ 19067 getLegacyCommand(action) { 19068 switch (action) { 19069 case "axialsymm": 19070 return this.axialsymm; 19071 default: 19072 return super.getLegacyCommand(action); 19073 } 19074 } 19075 /** 19076 * 19077 * @return {string} 19078 */ 19079 getModelResourcePath() { 19080 return "org/vorthmann/zome/app/antiprism-trackball-template.vZome"; 19081 } 19082 } 19083 PolygonFieldApplication2.AntiprismSymmetryPerspective = AntiprismSymmetryPerspective; 19084 AntiprismSymmetryPerspective["__class"] = "com.vzome.core.kinds.PolygonFieldApplication.AntiprismSymmetryPerspective"; 19085 AntiprismSymmetryPerspective["__interfaces"] = ["com.vzome.core.editor.SymmetryPerspective"]; 19086})(PolygonFieldApplication || (PolygonFieldApplication = {})); 19087
19088// src/worker/legacy/from-java/com/vzome/core/model/ManifestationImpl.ts 19089var ManifestationImpl = class _ManifestationImpl { 19090 static { 19091 this.NO_ID = -1; 19092 } 19093 static { 19094 this.NEXT_ID = 0; 19095 } 19096 resetId() { 19097 _ManifestationImpl.NEXT_ID = 0; 19098 this.mId = _ManifestationImpl.NO_ID; 19099 } 19100 getId() { 19101 if (this.mId === _ManifestationImpl.NO_ID) this.mId = _ManifestationImpl.NEXT_ID++; 19102 return this.mId; 19103 } 19104 addConstruction(c) { 19105 this.mManifests.add(c); 19106 } 19107 removeConstruction(c) { 19108 this.mManifests.remove(c); 19109 } 19110 getConstructions() { 19111 return this.mManifests.iterator(); 19112 } 19113 /** 19114 * This is different from toConstruction, because we must support 19115 * the legacy behavior, which used the iterator. 19116 * @return 19117 * @return {Construction} 19118 */ 19119 getFirstConstruction() { 19120 if (this.mManifests.isEmpty()) return null; 19121 return this.mManifests.iterator().next(); 19122 } 19123 isUnnecessary() { 19124 return this.mManifests.isEmpty(); 19125 } 19126 getColor() { 19127 if (this.color == null && this.mRendered != null) { 19128 this.color = this.mRendered.getColor(); 19129 } 19130 return this.color; 19131 } 19132 setColor(color) { 19133 this.color = color; 19134 } 19135 setRenderedObject(obj) { 19136 this.mRendered = obj; 19137 if (this.mRendered != null) this.color = this.mRendered.getColor(); 19138 } 19139 getRenderedObject() { 19140 return this.mRendered; 19141 } 19142 isHidden() { 19143 return this.hidden; 19144 } 19145 getContainer() { 19146 return this.mContainer; 19147 } 19148 /** 19149 * 19150 * @param {Group} container 19151 */ 19152 setContainer(container) { 19153 this.mContainer = container; 19154 } 19155 setHidden(hidden) { 19156 this.hidden = hidden; 19157 } 19158 isRendered() { 19159 return this.mRendered != null; 19160 } 19161 getXml(doc) { 19162 return this.toConstruction().getXml(doc); 19163 } 19164 constructor() { 19165 this.mManifests = new java.util.ArrayList(); 19166 this.mRendered = null; 19167 this.hidden = false; 19168 this.mId = _ManifestationImpl.NO_ID; 19169 if (this.color === void 0) { 19170 this.color = null; 19171 } 19172 if (this.mContainer === void 0) { 19173 this.mContainer = null; 19174 } 19175 } 19176}; 19177ManifestationImpl["__class"] = "com.vzome.core.model.ManifestationImpl"; 19178ManifestationImpl["__interfaces"] = ["com.vzome.core.model.HasRenderedObject", "com.vzome.core.model.GroupElement", "com.vzome.core.model.Manifestation"]; 19179
19180// src/worker/legacy/from-java/com/vzome/core/model/ConnectorImpl.ts 19181var ConnectorImpl = class _ConnectorImpl extends ManifestationImpl { 19182 constructor(loc) { 19183 super(); 19184 if (this.m_center === void 0) { 19185 this.m_center = null; 19186 } 19187 if (this.label === void 0) { 19188 this.label = null; 19189 } 19190 this.m_center = loc; 19191 } 19192 /** 19193 * 19194 * @return {AlgebraicVector} 19195 */ 19196 getLocation() { 19197 return this.m_center; 19198 } 19199 /** 19200 * 19201 * @return {AlgebraicVector} 19202 */ 19203 getCentroid() { 19204 return this.m_center; 19205 } 19206 /** 19207 * 19208 * @return {Construction} 19209 */ 19210 toConstruction() { 19211 const first = this.getFirstConstruction(); 19212 if (first != null && first.is3d()) return first; 19213 const field5 = this.m_center.getField(); 19214 return new FreePoint(field5.projectTo3d(this.m_center, true)); 19215 } 19216 /** 19217 * 19218 * @return {number} 19219 */ 19220 hashCode() { 19221 return ( 19222 /* hashCode */ 19223 ((o) => { 19224 if (o.hashCode) { 19225 return o.hashCode(); 19226 } else { 19227 return o.toString().split("").reduce((prevHash, currVal) => (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0, 0); 19228 } 19229 })(this.m_center) 19230 ); 19231 } 19232 /** 19233 * 19234 * @param {*} other 19235 * @return {boolean} 19236 */ 19237 equals(other) { 19238 if (other == null) return false; 19239 if (other === this) return true; 19240 if (!(other != null && other instanceof _ConnectorImpl)) return false; 19241 const conn = other; 19242 return this.getLocation().equals(conn.getLocation()); 19243 } 19244 /** 19245 * 19246 * @param {*} other 19247 * @return {number} 19248 */ 19249 compareTo(other) { 19250 if (this === other) { 19251 return 0; 19252 } 19253 if ( 19254 /* equals */ 19255 ((o1, o2) => { 19256 if (o1 && o1.equals) { 19257 return o1.equals(o2); 19258 } else { 19259 return o1 === o2; 19260 } 19261 })(other, this) 19262 ) { 19263 return 0; 19264 } 19265 return this.getLocation().compareTo(other.getLocation()); 19266 } 19267 /** 19268 * 19269 * @return {string} 19270 */ 19271 toString() { 19272 return "connector at " + this.m_center.toString(); 19273 } 19274 /** 19275 * 19276 * @param {string} label 19277 */ 19278 setLabel(label) { 19279 this.label = label; 19280 } 19281 /** 19282 * 19283 * @return {string} 19284 */ 19285 getLabel() { 19286 return this.label; 19287 } 19288}; 19289ConnectorImpl["__class"] = "com.vzome.core.model.ConnectorImpl"; 19290ConnectorImpl["__interfaces"] = ["com.vzome.core.model.HasRenderedObject", "com.vzome.core.model.GroupElement", "com.vzome.core.model.Connector", "java.lang.Comparable", "com.vzome.core.model.Manifestation"]; 19291
19292// src/worker/legacy/from-java/com/vzome/core/model/PanelImpl.ts 19293var PanelImpl = class _PanelImpl extends ManifestationImpl { 19294 constructor(vertices) { 19295 super(); 19296 if (this.mVertices === void 0) { 19297 this.mVertices = null; 19298 } 19299 if (this.zoneVector === void 0) { 19300 this.zoneVector = null; 19301 } 19302 if (this.label === void 0) { 19303 this.label = null; 19304 } 19305 this.mVertices = new java.util.ArrayList(vertices); 19306 } 19307 /** 19308 * 19309 * @return {AlgebraicVector} 19310 */ 19311 getZoneVector() { 19312 if (this.zoneVector != null) return this.zoneVector; 19313 else return this.getNormal$(); 19314 } 19315 /** 19316 * 19317 * @param {AlgebraicVector} vector 19318 */ 19319 setZoneVector(vector) { 19320 this.zoneVector = vector; 19321 } 19322 /** 19323 * 19324 * @return {AlgebraicVector} 19325 */ 19326 getLocation() { 19327 return null; 19328 } 19329 /** 19330 * 19331 * @return {AlgebraicVector} 19332 */ 19333 getFirstVertex() { 19334 return this.mVertices.get(0); 19335 } 19336 /** 19337 * 19338 * @return {AlgebraicVector} 19339 */ 19340 getCentroid() { 19341 return AlgebraicVectors.calculateCentroid(this.mVertices); 19342 } 19343 /** 19344 * 19345 * @return {Construction} 19346 */ 19347 toConstruction() { 19348 const first = this.getFirstConstruction(); 19349 if (first != null && first.is3d()) return first; 19350 const field5 = this.mVertices.get(0).getField(); 19351 const projected = this.mVertices.stream().map(/* @__PURE__ */ ((field6) => { 19352 return (pt) => new FreePoint(field6.projectTo3d(pt, true)); 19353 })(field5)).collect(java.util.stream.Collectors.toList()); 19354 return new PolygonFromVertices(projected); 19355 } 19356 /** 19357 * 19358 * @return {*} 19359 */ 19360 iterator() { 19361 return this.mVertices.iterator(); 19362 } 19363 /** 19364 * 19365 * @return {number} 19366 */ 19367 getVertexCount() { 19368 return this.mVertices.size(); 19369 } 19370 /** 19371 * 19372 * @return {number} 19373 */ 19374 hashCode() { 19375 const len = this.mVertices.size(); 19376 if (len === 0) return 0; 19377 let val = ( 19378 /* hashCode */ 19379 ((o) => { 19380 if (o.hashCode) { 19381 return o.hashCode(); 19382 } else { 19383 return o.toString().split("").reduce((prevHash, currVal) => (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0, 0); 19384 } 19385 })(this.mVertices.get(0)) 19386 ); 19387 for (let i = 1; i < len; i++) { 19388 val ^= /* hashCode */ 19389 ((o) => { 19390 if (o.hashCode) { 19391 return o.hashCode(); 19392 } else { 19393 return o.toString().split("").reduce((prevHash, currVal) => (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0, 0); 19394 } 19395 })(this.mVertices.get(i)); 19396 } 19397 return val; 19398 } 19399 /** 19400 * 19401 * @param {*} other 19402 * @return {boolean} 19403 */ 19404 equals(other) { 19405 if (other == null) return false; 19406 if (other === this) return true; 19407 if (!(other != null && other instanceof _PanelImpl)) return false; 19408 const panel = other; 19409 const size = this.mVertices.size(); 19410 if (size !== panel.mVertices.size()) return false; 19411 const found = ((s) => { 19412 let a = []; 19413 while (s-- > 0) a.push(false); 19414 return a; 19415 })(size); 19416 for (let i = 0; i < size; i++) { 19417 { 19418 let found_i = false; 19419 for (let j = 0; j < size; j++) { 19420 { 19421 if (found[j]) continue; 19422 if (this.mVertices.get(j).equals(panel.mVertices.get(i))) { 19423 found[j] = true; 19424 found_i = true; 19425 break; 19426 } 19427 } 19428 ; 19429 } 19430 if (!found_i) return false; 19431 } 19432 ; 19433 } 19434 for (let j = 0; j < size; j++) { 19435 if (!found[j]) return false; 19436 ; 19437 } 19438 return true; 19439 } 19440 getNormal$() { 19441 const v0 = this.mVertices.get(0); 19442 const v1 = this.mVertices.get(1); 19443 const v2 = this.mVertices.get(2); 19444 return AlgebraicVectors.getNormal$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector(v0, v1, v2); 19445 } 19446 getNormal$com_vzome_core_math_symmetry_Embedding(embedding) { 19447 const v0 = this.mVertices.get(0); 19448 const v1 = this.mVertices.get(1); 19449 const v2 = this.mVertices.get(2); 19450 const rv1 = embedding.embedInR3(v1.minus(v0)); 19451 const rv2 = embedding.embedInR3(v2.minus(v0)); 19452 return rv1.cross(rv2); 19453 } 19454 /** 19455 * 19456 * @param {*} embedding 19457 * @return {RealVector} 19458 */ 19459 getNormal(embedding) { 19460 if (embedding != null && (embedding.constructor != null && embedding.constructor["__interfaces"] != null && embedding.constructor["__interfaces"].indexOf("com.vzome.core.math.symmetry.Embedding") >= 0) || embedding === null) { 19461 return this.getNormal$com_vzome_core_math_symmetry_Embedding(embedding); 19462 } else if (embedding === void 0) { 19463 return this.getNormal$(); 19464 } else throw new Error("invalid overload"); 19465 } 19466 /** 19467 * 19468 * @return {string} 19469 */ 19470 toString() { 19471 const buf = new java.lang.StringBuilder("panel: "); 19472 let delim = ""; 19473 for (let index = this.mVertices.iterator(); index.hasNext(); ) { 19474 let vertex = index.next(); 19475 { 19476 buf.append(delim).append(vertex.toString()); 19477 delim = ", "; 19478 } 19479 } 19480 return buf.toString(); 19481 } 19482 /** 19483 * 19484 * @param {string} label 19485 */ 19486 setLabel(label) { 19487 this.label = label; 19488 } 19489 /** 19490 * 19491 * @return {string} 19492 */ 19493 getLabel() { 19494 return this.label; 19495 } 19496 /** 19497 * 19498 * @return {*} 19499 */ 19500 getQuadrea() { 19501 const field5 = this.mVertices.get(0).getField(); 19502 return field5.one(); 19503 } 19504}; 19505PanelImpl["__class"] = "com.vzome.core.model.PanelImpl"; 19506PanelImpl["__interfaces"] = ["com.vzome.core.model.HasRenderedObject", "com.vzome.core.model.GroupElement", "com.vzome.core.model.Panel", "com.vzome.core.model.Manifestation", "java.lang.Iterable"]; 19507
19508// src/worker/legacy/from-java/com/vzome/core/model/StrutImpl.ts 19509var StrutImpl = class _StrutImpl extends ManifestationImpl { 19510 constructor(end1, end2) { 19511 super(); 19512 if (this.m_end1 === void 0) { 19513 this.m_end1 = null; 19514 } 19515 if (this.m_end2 === void 0) { 19516 this.m_end2 = null; 19517 } 19518 if (this.zoneVector === void 0) { 19519 this.zoneVector = null; 19520 } 19521 if (this.label === void 0) { 19522 this.label = null; 19523 } 19524 this.m_end1 = end1; 19525 this.m_end2 = end2; 19526 } 19527 getZoneVector() { 19528 if (this.zoneVector != null) return this.zoneVector; 19529 else return this.getOffset(); 19530 } 19531 setZoneVector(vector) { 19532 this.zoneVector = vector; 19533 } 19534 /** 19535 * 19536 * @return {number} 19537 */ 19538 hashCode() { 19539 const result = ( 19540 /* hashCode */ 19541 ((o) => { 19542 if (o.hashCode) { 19543 return o.hashCode(); 19544 } else { 19545 return o.toString().split("").reduce((prevHash, currVal) => (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0, 0); 19546 } 19547 })(this.m_end1) ^ /* hashCode */ 19548 ((o) => { 19549 if (o.hashCode) { 19550 return o.hashCode(); 19551 } else { 19552 return o.toString().split("").reduce((prevHash, currVal) => (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0, 0); 19553 } 19554 })(this.m_end2) 19555 ); 19556 return result; 19557 } 19558 /** 19559 * 19560 * @param {*} obj 19561 * @return {boolean} 19562 */ 19563 equals(obj) { 19564 if (obj == null) return false; 19565 if (obj === this) return true; 19566 if (!(obj != null && obj instanceof _StrutImpl)) return false; 19567 const other = obj; 19568 const otherStart = other.m_end1; 19569 const otherEnd = other.m_end2; 19570 if (otherStart.equals(this.m_end1)) return otherEnd.equals(this.m_end2); 19571 else if (otherEnd.equals(this.m_end1)) return otherStart.equals(this.m_end2); 19572 else return false; 19573 } 19574 /** 19575 * 19576 * @param {*} other 19577 * @return {number} 19578 */ 19579 compareTo(other) { 19580 if (this === other) { 19581 return 0; 19582 } 19583 if ( 19584 /* equals */ 19585 ((o1, o2) => { 19586 if (o1 && o1.equals) { 19587 return o1.equals(o2); 19588 } else { 19589 return o1 === o2; 19590 } 19591 })(other, this) 19592 ) { 19593 return 0; 19594 } 19595 const thisFirst = this.getCanonicalLesserEnd(); 19596 const thisLast = this.getCanonicalGreaterEnd(); 19597 const otherFirst = other.getCanonicalLesserEnd(); 19598 const otherLast = other.getCanonicalGreaterEnd(); 19599 const comparison = thisFirst.compareTo(otherFirst); 19600 return comparison === 0 ? thisLast.compareTo(otherLast) : comparison; 19601 } 19602 getCanonicalLesserEnd() { 19603 return this.m_end1.compareTo(this.m_end2) < 0 ? this.m_end1 : this.m_end2; 19604 } 19605 getCanonicalGreaterEnd() { 19606 return this.m_end1.compareTo(this.m_end2) > 0 ? this.m_end1 : this.m_end2; 19607 } 19608 /** 19609 * 19610 * @return {AlgebraicVector} 19611 */ 19612 getLocation() { 19613 return this.m_end1; 19614 } 19615 /** 19616 * 19617 * @return {AlgebraicVector} 19618 */ 19619 getCentroid() { 19620 return AlgebraicVectors.getCentroid([this.m_end1, this.m_end2]); 19621 } 19622 /** 19623 * 19624 * @return {Construction} 19625 */ 19626 toConstruction() { 19627 const first = this.getFirstConstruction(); 19628 if (first != null && first.is3d()) return first; 19629 const field5 = this.m_end1.getField(); 19630 const pt1 = new FreePoint(field5.projectTo3d(this.m_end1, true)); 19631 const pt2 = new FreePoint(field5.projectTo3d(this.m_end2, true)); 19632 return new SegmentJoiningPoints(pt1, pt2); 19633 } 19634 getEnd() { 19635 return this.m_end2; 19636 } 19637 getOffset() { 19638 return this.m_end2.minus(this.m_end1); 19639 } 19640 /** 19641 * 19642 * @return {string} 19643 */ 19644 toString() { 19645 return "strut from " + this.m_end1.toString() + " to " + this.m_end2.toString(); 19646 } 19647 /** 19648 * 19649 * @param {string} label 19650 */ 19651 setLabel(label) { 19652 this.label = label; 19653 } 19654 /** 19655 * 19656 * @return {string} 19657 */ 19658 getLabel() { 19659 return this.label; 19660 } 19661}; 19662StrutImpl["__class"] = "com.vzome.core.model.StrutImpl"; 19663StrutImpl["__interfaces"] = ["com.vzome.core.model.HasRenderedObject", "com.vzome.core.model.GroupElement", "com.vzome.core.model.Strut", "java.lang.Comparable", "com.vzome.core.model.Manifestation"]; 19664
19665// src/worker/legacy/from-java/com/vzome/core/model/RealizedModelImpl.ts 19666var RealizedModelImpl = class _RealizedModelImpl { 19667 constructor(field5, projection) { 19668 this.mListeners = new java.util.ArrayList(1); 19669 this.mManifestations = new java.util.LinkedHashMap(1e3); 19670 if (this.mProjection === void 0) { 19671 this.mProjection = null; 19672 } 19673 if (this.field === void 0) { 19674 this.field = null; 19675 } 19676 this.doingBatch = false; 19677 this.additions = new java.util.HashSet(); 19678 this.removals = new java.util.HashSet(); 19679 if (this.mManifestedNow === void 0) { 19680 this.mManifestedNow = null; 19681 } 19682 this.field = field5; 19683 this.mProjection = projection; 19684 } 19685 moreVisibleThan(other) { 19686 const result = new java.util.HashSet(); 19687 for (let index = this.mManifestations.values().iterator(); index.hasNext(); ) { 19688 let man = index.next(); 19689 { 19690 if (man.isHidden()) continue; 19691 const doppel = other.mManifestations.get(man.toConstruction().getSignature()); 19692 if (doppel == null || doppel.isHidden()) result.add(man); 19693 } 19694 } 19695 return result; 19696 } 19697 addListener(l) { 19698 this.mListeners.add(l); 19699 } 19700 removeListener(l) { 19701 this.mListeners.remove(l); 19702 } 19703 /** 19704 * 19705 * @return {*} 19706 */ 19707 iterator() { 19708 return this.mManifestations.values().iterator(); 19709 } 19710 manifest(c) { 19711 let m = null; 19712 if (c != null && c instanceof Point) { 19713 const p = c; 19714 m = new ConnectorImpl(this.mProjection.projectImage(p.getLocation(), true)); 19715 } else if (c != null && c instanceof Segment) { 19716 const s = c; 19717 const start = this.mProjection.projectImage(s.getStart(), true); 19718 const end = this.mProjection.projectImage(s.getEnd(), true); 19719 if (!start.equals(end)) { 19720 m = new StrutImpl(start, end); 19721 } 19722 } else if (c != null && c instanceof Polygon) { 19723 const p = c; 19724 const vertices = new java.util.ArrayList(); 19725 for (let i = 0; i < p.getVertexCount(); i++) { 19726 { 19727 vertices.add(this.mProjection.projectImage(p.getVertex(i), true)); 19728 } 19729 ; 19730 } 19731 m = new PanelImpl(vertices); 19732 } 19733 return m; 19734 } 19735 static logger_$LI$() { 19736 if (_RealizedModelImpl.logger == null) { 19737 _RealizedModelImpl.logger = java.util.logging.Logger.getLogger("com.vzome.core.model"); 19738 } 19739 return _RealizedModelImpl.logger; 19740 } 19741 /** 19742 * 19743 * @param {*} m 19744 */ 19745 add(m) { 19746 const key = m.toConstruction().getSignature(); 19747 this.mManifestations.put(key, m); 19748 if (_RealizedModelImpl.logger_$LI$().isLoggable(java.util.logging.Level.FINER)) _RealizedModelImpl.logger_$LI$().finer("add manifestation: " + m.toString()); 19749 } 19750 /** 19751 * 19752 * @param {*} m 19753 */ 19754 remove(m) { 19755 const key = m.toConstruction().getSignature(); 19756 this.mManifestations.remove(key); 19757 if (_RealizedModelImpl.logger_$LI$().isLoggable(java.util.logging.Level.FINER)) _RealizedModelImpl.logger_$LI$().finer("remove manifestation: " + m.toString()); 19758 } 19759 refresh(on, unused) { 19760 for (let index = this.mManifestations.values().iterator(); index.hasNext(); ) { 19761 let man = index.next(); 19762 { 19763 if (!man.isHidden()) { 19764 if (on) this.show(man); 19765 else this.hide(man); 19766 } 19767 } 19768 } 19769 } 19770 /** 19771 * 19772 * @param {*} m 19773 */ 19774 show(m) { 19775 if (this.doingBatch) { 19776 if (this.removals.contains(m)) this.removals.remove(m); 19777 else this.additions.add(m); 19778 } else this.privateShow(m); 19779 } 19780 /*private*/ 19781 privateShow(m) { 19782 if (!m.isRendered()) { 19783 for (let index = this.mListeners.iterator(); index.hasNext(); ) { 19784 let next = index.next(); 19785 { 19786 next.manifestationAdded(m); 19787 } 19788 } 19789 } 19790 } 19791 /** 19792 * 19793 * @param {*} m 19794 */ 19795 hide(m) { 19796 if (this.doingBatch) { 19797 if (this.additions.contains(m)) this.additions.remove(m); 19798 else this.removals.add(m); 19799 } else this.privateHide(m); 19800 } 19801 /*private*/ 19802 privateHide(m) { 19803 if (m.isRendered()) { 19804 for (let index = this.mListeners.iterator(); index.hasNext(); ) { 19805 let next = index.next(); 19806 { 19807 next.manifestationRemoved(m); 19808 } 19809 } 19810 } 19811 } 19812 /** 19813 * 19814 * @param {*} m 19815 * @param {Color} color 19816 */ 19817 setColor(m, color) { 19818 m.setColor(color); 19819 if (m.isRendered()) { 19820 for (let index = this.mListeners.iterator(); index.hasNext(); ) { 19821 let next = index.next(); 19822 { 19823 next.manifestationColored(m, color); 19824 } 19825 } 19826 } 19827 } 19828 /** 19829 * 19830 * @param {*} m 19831 * @param {string} label 19832 */ 19833 setLabel(m, label) { 19834 m.setLabel(label); 19835 if (m.isRendered()) { 19836 for (let index = this.mListeners.iterator(); index.hasNext(); ) { 19837 let next = index.next(); 19838 { 19839 next.manifestationLabeled(m, label); 19840 } 19841 } 19842 } 19843 } 19844 /** 19845 * 19846 * @param {Construction} c 19847 * @return {*} 19848 */ 19849 findConstruction(c) { 19850 let actualMan = this.mManifestations.get(c.getSignature()); 19851 if (actualMan == null) actualMan = this.manifest(c); 19852 return actualMan; 19853 } 19854 /** 19855 * 19856 * @param {Construction} c 19857 * @return {*} 19858 */ 19859 removeConstruction(c) { 19860 const actualMan = this.mManifestations.get(c.getSignature()); 19861 if (actualMan == null) return null; 19862 return this.manifest(c); 19863 } 19864 /** 19865 * @param {Construction} c 19866 * @return 19867 * @return {*} 19868 */ 19869 getManifestation(c) { 19870 return this.mManifestations.get(c.getSignature()); 19871 } 19872 /** 19873 * 19874 * @return {number} 19875 */ 19876 size() { 19877 return this.mManifestations.size(); 19878 } 19879 /** 19880 * 19881 * @param {*} object 19882 * @return {boolean} 19883 */ 19884 equals(object) { 19885 if (object == null) { 19886 return false;
19887 } 19888 if (object === this) { 19889 return true; 19890 } 19891 if (!(object != null && object instanceof _RealizedModelImpl)) return false; 19892 const that = object; 19893 if (this.size() !== that.size()) return false; 19894 for (let index = this.mManifestations.values().iterator(); index.hasNext(); ) { 19895 let man = index.next(); 19896 { 19897 if (!that.mManifestations.values().contains(man)) { 19898 return false; 19899 } 19900 } 19901 } 19902 return true; 19903 } 19904 /** 19905 * 19906 * @return {number} 19907 */ 19908 hashCode() { 19909 return this.size(); 19910 } 19911 startBatch() { 19912 this.additions.clear(); 19913 this.removals.clear(); 19914 this.doingBatch = true; 19915 } 19916 endBatch() { 19917 for (let index = this.removals.iterator(); index.hasNext(); ) { 19918 let m = index.next(); 19919 { 19920 this.privateHide(m); 19921 } 19922 } 19923 for (let index = this.additions.iterator(); index.hasNext(); ) { 19924 let m = index.next(); 19925 { 19926 this.privateShow(m); 19927 } 19928 } 19929 this.additions.clear(); 19930 this.removals.clear(); 19931 this.doingBatch = false; 19932 } 19933 /** 19934 * 19935 * @return {*} 19936 */ 19937 getField() { 19938 return this.field; 19939 } 19940 /** 19941 * 19942 * @param {string} signature 19943 * @return {*} 19944 */ 19945 findPerEditManifestation(signature) { 19946 return this.mManifestedNow.get(signature); 19947 } 19948 /** 19949 * 19950 * @param {string} signature 19951 * @param {*} m 19952 */ 19953 addPerEditManifestation(signature, m) { 19954 this.mManifestedNow.put(signature, m); 19955 } 19956 /** 19957 * 19958 */ 19959 clearPerEditManifestations() { 19960 this.mManifestedNow = new java.util.HashMap(); 19961 } 19962}; 19963RealizedModelImpl["__class"] = "com.vzome.core.model.RealizedModelImpl"; 19964RealizedModelImpl["__interfaces"] = ["com.vzome.core.model.RealizedModel", "java.lang.Iterable"]; 19965
19966// src/worker/legacy/from-java/com/vzome/core/render/RenderedManifestation.ts 19967var RenderedManifestation = class _RenderedManifestation { 19968 static logger_$LI$() { 19969 if (_RenderedManifestation.logger == null) { 19970 _RenderedManifestation.logger = java.util.logging.Logger.getLogger("com.vzome.core.render.RenderedManifestation"); 19971 } 19972 return _RenderedManifestation.logger; 19973 } 19974 constructor(m, orbitSource) { 19975 if (this.mManifestation === void 0) { 19976 this.mManifestation = null; 19977 } 19978 if (this.mShape === void 0) { 19979 this.mShape = null; 19980 } 19981 this.color = null; 19982 if (this.mOrientation === void 0) { 19983 this.mOrientation = null; 19984 } 19985 this.mGlow = 0; 19986 this.mTransparency = 0; 19987 if (this.mGraphicsObject === void 0) { 19988 this.mGraphicsObject = null; 19989 } 19990 this.mPickable = true; 19991 this.isOffset = false; 19992 if (this.location === void 0) { 19993 this.location = null; 19994 } 19995 if (this.fixedLocation === void 0) { 19996 this.fixedLocation = null; 19997 } 19998 this.strutZone = -1; 19999 this.strutLength = null; 20000 this.strutOrbit = null; 20001 if (this.strutSense === void 0) { 20002 this.strutSense = 0; 20003 } 20004 this.guid = UUID.randomUUID(); 20005 if (this.orbitSource === void 0) { 20006 this.orbitSource = null; 20007 } 20008 if (this.label === void 0) { 20009 this.label = null; 20010 } 20011 this.mManifestation = m; 20012 this.orbitSource = orbitSource; 20013 if (m != null) this.location = m.getLocation(); 20014 this.fixedLocation = this.location; 20015 this.mOrientation = null; 20016 } 20017 /** 20018 * 20019 * @return {string} 20020 */ 20021 toString() { 20022 return this.mManifestation.toString(); 20023 } 20024 getGuid() { 20025 return this.guid; 20026 } 20027 setGraphicsObject(go) { 20028 this.mGraphicsObject = go; 20029 } 20030 getGraphicsObject() { 20031 return this.mGraphicsObject; 20032 } 20033 setGlow(glow) { 20034 this.mGlow = glow; 20035 } 20036 getGlow() { 20037 return this.mGlow; 20038 } 20039 setTransparency(trans) { 20040 this.mTransparency = trans; 20041 } 20042 getTransparency() { 20043 return this.mTransparency; 20044 } 20045 getShapeId() { 20046 return this.mShape.getGuid(); 20047 } 20048 getShapeKey() { 20049 return this.mShape.getShapeKey(); 20050 } 20051 getShape() { 20052 return this.mShape; 20053 } 20054 setPickable(value) { 20055 this.mPickable = value; 20056 } 20057 isPickable() { 20058 return this.mPickable; 20059 } 20060 getManifestation() { 20061 return this.mManifestation; 20062 } 20063 getColor() { 20064 return this.color; 20065 } 20066 getColorWeb() { 20067 return this.color.toWebString(); 20068 } 20069 setColor(color) { 20070 this.color = color; 20071 } 20072 setOrientation(m) { 20073 this.mOrientation = m; 20074 } 20075 getOrientation() { 20076 return this.mOrientation; 20077 } 20078 getLocation() { 20079 if (this.location != null) return this.getEmbedding().embedInR3(this.location); 20080 else return new RealVector(0, 0, 0); 20081 } 20082 getLocationAV() { 20083 return this.location; 20084 } 20085 getEmbedding() { 20086 return this.orbitSource.getSymmetry(); 20087 } 20088 /** 20089 * 20090 * @return {number} 20091 */ 20092 hashCode() { 20093 return ( 20094 /* hashCode */ 20095 ((o) => { 20096 if (o.hashCode) { 20097 return o.hashCode(); 20098 } else { 20099 return o.toString().split("").reduce((prevHash, currVal) => (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0, 0); 20100 } 20101 })(this.guid) 20102 ); 20103 } 20104 /** 20105 * 20106 * @param {*} obj 20107 * @return {boolean} 20108 */ 20109 equals(obj) { 20110 if (this === obj) { 20111 return true; 20112 } 20113 if (obj == null) { 20114 return false; 20115 } 20116 if (this.constructor !== obj.constructor) { 20117 return false; 20118 } 20119 const other = obj; 20120 if (this.fixedLocation == null) { 20121 if (other.fixedLocation != null) { 20122 return false; 20123 } 20124 } else if (!this.fixedLocation.equals(other.fixedLocation)) { 20125 return false; 20126 } 20127 if (this.isOffset !== other.isOffset) { 20128 return false; 20129 } 20130 if (this.mOrientation == null) { 20131 if (other.mOrientation != null) { 20132 return false; 20133 } 20134 } else if (!this.mOrientation.equals(other.mOrientation)) { 20135 return false; 20136 } 20137 if (this.mShape == null) { 20138 if (other.mShape != null) { 20139 return false; 20140 } 20141 } else if (!this.mShape.equals(other.mShape)) { 20142 return false; 20143 } 20144 if (this.strutSense !== other.strutSense) { 20145 return false;
20146 } 20147 return true; 20148 } 20149 copy() { 20150 const copy = new _RenderedManifestation(null, this.orbitSource); 20151 copy.location = this.location; 20152 copy.fixedLocation = this.fixedLocation; 20153 copy.color = this.color; 20154 copy.mGlow = this.mGlow; 20155 copy.mOrientation = this.mOrientation; 20156 copy.mShape = this.mShape; 20157 copy.mTransparency = this.mTransparency; 20158 copy.strutLength = this.strutLength; 20159 copy.strutZone = this.strutZone; 20160 copy.label = this.label; 20161 return copy; 20162 } 20163 setStrut(orbit, zone, sense, length) { 20164 this.strutOrbit = orbit; 20165 this.strutZone = zone; 20166 this.strutSense = sense; 20167 this.strutLength = length; 20168 } 20169 getStrutZone() { 20170 return this.strutZone; 20171 } 20172 getStrutSense() { 20173 return this.strutSense; 20174 } 20175 getStrutLength() { 20176 return this.strutLength; 20177 } 20178 getStrutOrbit() { 20179 return this.strutOrbit; 20180 } 20181 offsetLocation() { 20182 if (this.mManifestation != null) { 20183 const strut = this.mManifestation; 20184 this.location = strut.getEnd(); 20185 this.isOffset = true; 20186 } 20187 } 20188 resetLocation() { 20189 if (this.mManifestation != null) { 20190 this.location = this.mManifestation.getLocation(); 20191 this.isOffset = false; 20192 } 20193 } 20194 getSymmetryShapes() { 20195 return this.orbitSource.getName() + ":" + this.orbitSource.getShapes().getName(); 20196 } 20197 resetAttributes(oneSidedPanels, colorPanels) { 20198 const label = this.mManifestation.getLabel(); 20199 if (null != label) { 20200 this.setLabel(label); 20201 } 20202 if (this.mManifestation != null && (this.mManifestation.constructor != null && this.mManifestation.constructor["__interfaces"] != null && this.mManifestation.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0)) { 20203 this.resetPanelAttributes(oneSidedPanels, colorPanels); 20204 } else if (this.orbitSource.getShapes() == null) { 20205 return; 20206 } else if (this.mManifestation != null && (this.mManifestation.constructor != null && this.mManifestation.constructor["__interfaces"] != null && this.mManifestation.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) { 20207 this.resetConnectorAttributes(this.mManifestation); 20208 } else if (this.mManifestation != null && (this.mManifestation.constructor != null && this.mManifestation.constructor["__interfaces"] != null && this.mManifestation.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) { 20209 const strut = this.mManifestation; 20210 this.resetStrutAttributes(strut); 20211 } else throw new java.lang.UnsupportedOperationException("only strut, ball, and panel shapes currently supported"); 20212 } 20213 /*private*/ 20214 resetPanelAttributes(oneSidedPanels, colorPanels) { 20215 const shapes28 = this.orbitSource.getShapes(); 20216 const panel = this.mManifestation; 20217 this.location = panel.getFirstVertex(); 20218 const relativeVertices = new java.util.ArrayList(); 20219 for (let index = panel.iterator(); index.hasNext(); ) { 20220 let vertex = index.next(); 20221 { 20222 relativeVertices.add(vertex.minus(this.location)); 20223 } 20224 } 20225 const normal = panel["getNormal$"](); 20226 if (normal.isOrigin()) return; 20227 const zone = this.orbitSource.getAxis(normal); 20228 const shape = shapes28.getPanelShape(panel.getVertexCount(), panel.getQuadrea(), zone, relativeVertices, oneSidedPanels); 20229 if (shape == null) return; 20230 this.mShape = shape; 20231 if (zone == null) { 20232 this.setColor(Color.WHITE_$LI$()); 20233 return; 20234 } 20235 const orn = zone.getOrientation(); 20236 const orientation = shapes28.getSymmetry().getMatrix(orn); 20237 this.setOrientation(orientation); 20238 this.strutZone = zone.getOrientation(); 20239 if (!colorPanels) return; 20240 try { 20241 panel.setZoneVector(zone.normal()); 20242 const orbit = zone.getDirection(); 20243 let color = this.mManifestation.getColor(); 20244 if (color == null) { 20245 color = this.orbitSource.getColor(orbit); 20246 if (color != null) color = color.getPastel(); 20247 } 20248 this.setColor(color); 20249 } catch (e) { 20250 if (_RenderedManifestation.logger_$LI$().isLoggable(java.util.logging.Level.WARNING)) _RenderedManifestation.logger_$LI$().warning("Unable to set color for panel, normal = " + normal.toString()); 20251 } 20252 } 20253 resetStrutAttributes(strut) { 20254 const shapes28 = this.orbitSource.getShapes(); 20255 const offset = strut.getOffset(); 20256 if (offset.isOrigin()) return; 20257 const axis = this.orbitSource.getAxis(offset); 20258 if (axis == null) return; 20259 strut.setZoneVector(axis.normal()); 20260 const orbit = axis.getDirection(); 20261 const len = axis.getLength(offset); 20262 const prototypeLengthShape = shapes28.getStrutShape(orbit, len); 20263 if (prototypeLengthShape == null) return; 20264 this.mShape = prototypeLengthShape; 20265 const orn = axis.getOrientation(); 20266 const orientation = shapes28.getSymmetry().getMatrix(orn); 20267 const reflection = this.orbitSource.getSymmetry().getPrincipalReflection(); 20268 if (reflection != null) { 20269 if (_RenderedManifestation.logger_$LI$().isLoggable(java.util.logging.Level.FINE)) { 20270 _RenderedManifestation.logger_$LI$().fine("rendering " + offset + " as " + axis); 20271 } 20272 if (axis.getSense() === Axis.MINUS) { 20273 if (_RenderedManifestation.logger_$LI$().isLoggable(java.util.logging.Level.FINER)) { 20274 _RenderedManifestation.logger_$LI$().finer("mirroring orientation " + orn); 20275 } 20276 this.mShape = prototypeLengthShape.getEvilTwin(reflection); 20277 } 20278 if (!axis.isOutbound()) { 20279 this.offsetLocation(); 20280 } else this.resetLocation(); 20281 } else { 20282 if (axis.getSense() === Axis.MINUS) { 20283 this.offsetLocation(); 20284 } else this.resetLocation(); 20285 } 20286 this.setStrut(orbit, orn, axis.getSense(), len); 20287 this.setOrientation(orientation);
20288 let color = this.getManifestation().getColor(); 20289 if (color == null) color = shapes28.getColor(orbit); 20290 if (color == null) color = this.orbitSource.getColor(orbit); 20291 this.setColor(color); 20292 } 20293 resetConnectorAttributes(m) { 20294 const shapes28 = this.orbitSource.getShapes(); 20295 this.mShape = shapes28.getConnectorShape(); 20296 let color = this.getManifestation().getColor(); 20297 if (color == null) color = shapes28.getColor(null); 20298 if (color == null) color = this.orbitSource.getColor(null); 20299 this.setColor(color); 20300 this.setOrientation(this.orbitSource.getSymmetry().getField().identityMatrix(3)); 20301 } 20302 setOrbitSource(orbitSource) { 20303 this.orbitSource = orbitSource; 20304 } 20305 getOrbitSource() { 20306 return this.orbitSource; 20307 } 20308 getLabel() { 20309 return this.label; 20310 } 20311 setLabel(label) { 20312 this.label = label; 20313 } 20314}; 20315RenderedManifestation["__class"] = "com.vzome.core.render.RenderedManifestation"; 20316RenderedManifestation["__interfaces"] = ["com.vzome.core.model.RenderedObject"]; 20317
20318// src/worker/legacy/from-java/com/vzome/core/render/RenderedModel.ts 20319var RenderedModel = class _RenderedModel { 20320 constructor(field5, orbitSource) { 20321 if ((field5 != null && (field5.constructor != null && field5.constructor["__interfaces"] != null && field5.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicField") >= 0) || field5 === null) && (orbitSource != null && (orbitSource.constructor != null && orbitSource.constructor["__interfaces"] != null && orbitSource.constructor["__interfaces"].indexOf("com.vzome.core.editor.api.OrbitSource") >= 0) || orbitSource === null)) { 20322 let __args = arguments; 20323 if (this.mPolyhedra === void 0) { 20324 this.mPolyhedra = null; 20325 } 20326 if (this.field === void 0) { 20327 this.field = null; 20328 } 20329 if (this.orbitSource === void 0) { 20330 this.orbitSource = null; 20331 } 20332 if (this.mainListener === void 0) { 20333 this.mainListener = null; 20334 } 20335 this.mListeners = new java.util.ArrayList(); 20336 this.mSelectionGlow = 0.8; 20337 this.mRendered = new java.util.HashSet(); 20338 this.byID = new java.util.HashMap(); 20339 this.oneSidedPanels = false; 20340 this.enabled = true; 20341 this.colorPanels = true; 20342 this.field = field5; 20343 this.orbitSource = orbitSource; 20344 this.mPolyhedra = orbitSource == null ? null : orbitSource.getShapes(); 20345 } else if ((field5 != null && (field5.constructor != null && field5.constructor["__interfaces"] != null && field5.constructor["__interfaces"].indexOf("com.vzome.core.math.symmetry.Symmetry") >= 0) || field5 === null) && orbitSource === void 0) { 20346 let __args = arguments; 20347 let symmetry = __args[0]; 20348 { 20349 let __args2 = arguments; 20350 let field6 = symmetry.getField(); 20351 let orbitSource2 = new _RenderedModel.SymmetryOrbitSource(symmetry); 20352 if (this.mPolyhedra === void 0) { 20353 this.mPolyhedra = null; 20354 } 20355 if (this.field === void 0) { 20356 this.field = null; 20357 } 20358 if (this.orbitSource === void 0) { 20359 this.orbitSource = null; 20360 } 20361 if (this.mainListener === void 0) { 20362 this.mainListener = null; 20363 } 20364 this.mListeners = new java.util.ArrayList(); 20365 this.mSelectionGlow = 0.8; 20366 this.mRendered = new java.util.HashSet(); 20367 this.byID = new java.util.HashMap(); 20368 this.oneSidedPanels = false; 20369 this.enabled = true; 20370 this.colorPanels = true; 20371 this.field = field6; 20372 this.orbitSource = orbitSource2; 20373 this.mPolyhedra = orbitSource2 == null ? null : orbitSource2.getShapes(); 20374 } 20375 (() => { 20376 this.enabled = false; 20377 })(); 20378 } else throw new Error("invalid overload"); 20379 } 20380 withColorPanels(setting) { 20381 this.colorPanels = setting; 20382 return this; 20383 } 20384 getField() { 20385 return this.field; 20386 } 20387 addListener(listener) { 20388 if (this.mainListener == null) this.mainListener = listener; 20389 else this.mListeners.add(listener); 20390 } 20391 removeListener(listener) { 20392 if (this.mainListener === listener) this.mainListener = null; 20393 else this.mListeners.remove(listener); 20394 } 20395 render(manifestation) { 20396 const rm = new RenderedManifestation(manifestation, this.orbitSource); 20397 rm.resetAttributes(this.oneSidedPanels, this.colorPanels); 20398 return rm; 20399 } 20400 /** 20401 * 20402 * @param {*} m 20403 */ 20404 manifestationAdded(m) { 20405 if (!this.enabled) { 20406 m.setRenderedObject(new RenderedManifestation(m, this.orbitSource)); 20407 return; 20408 } 20409 const rm = this.render(m); 20410 const poly = rm.getShape(); 20411 if (poly == null) return; 20412 m.setRenderedObject(rm); 20413 this.mRendered.add(rm); 20414 this.byID.put(rm.getGuid().toString(), rm); 20415 if (this.mainListener != null) this.mainListener.manifestationAdded(rm); 20416 for (let index = this.mListeners.iterator(); index.hasNext(); ) { 20417 let listener = index.next(); 20418 { 20419 listener.manifestationAdded(rm); 20420 } 20421 } 20422 } 20423 /** 20424 * 20425 * @param {*} m 20426 */ 20427 manifestationRemoved(m) { 20428 if (!this.enabled) { 20429 m.setRenderedObject(null); 20430 return; 20431 } 20432 const rendered = m.getRenderedObject(); 20433 if (rendered == null) return; 20434 for (let index = this.mListeners.iterator(); index.hasNext(); ) { 20435 let listener = index.next(); 20436 { 20437 listener.manifestationRemoved(rendered); 20438 } 20439 } 20440 if (this.mainListener != null) this.mainListener.manifestationRemoved(rendered); 20441 if (!this.mRendered.remove(rendered)) throw new java.lang.IllegalStateException("unable to remove RenderedManifestation"); 20442 this.byID.remove(rendered.getGuid().toString()); 20443 m.setRenderedObject(null); 20444 } 20445 getRenderedManifestation(guid) { 20446 return this.byID.get(guid); 20447 } 20448 setManifestationGlow(m, on) { 20449 const rendered = m.getRenderedObject(); 20450 if (rendered == null) return; 20451 rendered.setGlow(on ? this.mSelectionGlow : 0); 20452 if (this.mainListener != null) this.mainListener.glowChanged(rendered); 20453 for (let index = this.mListeners.iterator(); index.hasNext(); ) { 20454 let listener = index.next(); 20455 { 20456 listener.glowChanged(rendered); 20457 } 20458 } 20459 } 20460 setManifestationColor(m, color) { 20461 const rendered = m.getRenderedObject(); 20462 if (rendered == null) return; 20463 rendered.setColor(color); 20464 if (this.mainListener != null) this.mainListener.colorChanged(rendered); 20465 for (let index = this.mListeners.iterator(); index.hasNext(); ) { 20466 let listener = index.next(); 20467 { 20468 listener.colorChanged(rendered); 20469 } 20470 } 20471 } 20472 setManifestationLabel(m, label) { 20473 const rendered = m.getRenderedObject(); 20474 if (rendered == null) return; 20475 rendered.setLabel(label); 20476 if (this.mainListener != null) this.mainListener.labelChanged(rendered); 20477 for (let index = this.mListeners.iterator(); index.hasNext(); ) { 20478 let listener = index.next(); 20479 { 20480 listener.labelChanged(rendered); 20481 } 20482 } 20483 } 20484 setManifestationTransparency(m, on) { 20485 const rendered = m.getRenderedObject(); 20486 if (rendered == null) return; 20487 rendered.setTransparency(on ? this.mSelectionGlow : 0); 20488 if (this.mainListener != null) this.mainListener.colorChanged(rendered); 20489 for (let index = this.mListeners.iterator(); index.hasNext(); ) { 20490 let listener = index.next(); 20491 { 20492 listener.colorChanged(rendered); 20493 } 20494 } 20495 } 20496 /** 20497 * 20498 * @return {*} 20499 */ 20500 iterator() { 20501 return this.mRendered.iterator(); 20502 } 20503 getOrbitSource() { 20504 return this.orbitSource; 20505 } 20506 setShapes(shapes28) { 20507 const supported = this.mainListener.shapesChanged(shapes28); 20508 if (!supported) this.setOrbitSource(this.orbitSource); 20509 } 20510 setOrbitSource(orbitSource) { 20511 this.orbitSource = orbitSource; 20512 this.enabled = true; 20513 this.mPolyhedra = orbitSource.getShapes(); 20514 if (this.mPolyhedra == null) return; 20515 { 20516 const newSet = new java.util.HashSet(); 20517 for (const rms = this.mRendered.iterator(); rms.hasNext(); ) { 20518 { 20519 const rendered = rms.next(); 20520 rms.remove(); 20521 const m = rendered.getManifestation(); 20522 if (m.isHidden()) continue; 20523 if (rendered.getShape() != null) { 20524 if (this.mainListener != null) { 20525 this.mainListener.manifestationRemoved(rendered); 20526 } 20527 for (let index = this.mListeners.iterator(); index.hasNext(); ) { 20528 let listener = index.next(); 20529 { 20530 listener.manifestationRemoved(rendered); 20531 } 20532 } 20533 } 20534 rendered.setOrbitSource(this.orbitSource); 20535 rendered.resetAttributes(this.oneSidedPanels, this.colorPanels); 20536 newSet.add(rendered); 20537 const glow = rendered.getGlow(); 20538 if (rendered.getShape() != null) { 20539 if (this.mainListener != null) { 20540 this.mainListener.manifestationAdded(rendered); 20541 if (glow !== 0) this.mainListener.glowChanged(rendered); 20542 } 20543 for (let index = this.mListeners.iterator(); index.hasNext(); ) { 20544 let listener = index.next(); 20545 { 20546 listener.manifestationAdded(rendered); 20547 if (glow !== 0) listener.glowChanged(rendered); 20548 } 20549 } 20550 } 20551 } 20552 ; 20553 } 20554 this.mRendered.addAll(newSet); 20555 for (let index = newSet.iterator(); index.hasNext(); ) { 20556 let rm = index.next(); 20557 { 20558 this.byID.put(rm.getGuid().toString(), rm); 20559 } 20560 } 20561 } 20562 ; 20563 } 20564 /** 20565 * 20566 * @param {*} m 20567 * @param {Color} color 20568 */ 20569 manifestationColored(m, color) { 20570 if (this.enabled) this.setManifestationColor(m, color); 20571 } 20572 /** 20573 * 20574 * @param {*} m 20575 * @param {string} label 20576 */ 20577 manifestationLabeled(m, label) { 20578 if (this.enabled) this.setManifestationLabel(m, label); 20579 } 20580 snapshot() { 20581 const snapshot = new _RenderedModel(this.orbitSource.getSymmetry()); 20582 for (let index = this.mRendered.iterator(); index.hasNext(); ) { 20583 let rm = index.next(); 20584 { 20585 const copy = rm.copy(); 20586 snapshot.mRendered.add(copy); 20587 } 20588 } 20589 return snapshot; 20590 } 20591 /**
20592 * Switch a scene graph (changes) from rendering one RenderedModel to another one. 20593 * For RenderedManifestations that show the same object in both, just update the 20594 * attributes. 20595 * When "from" is empty, this is the initial rendering of the "to" RenderedModel. 20596 * @param {RenderedModel} from is an empty RenderedModel in some cases 20597 * @param {RenderedModel} to 20598 * @param {*} changes is a scene graph 20599 */ 20600 static renderChange(from, to, changes) { 20601 const toRemove = new java.util.HashSet(from.mRendered); 20602 toRemove.removeAll(to.mRendered); 20603 for (let index = toRemove.iterator(); index.hasNext(); ) { 20604 let rm = index.next(); 20605 { 20606 changes.manifestationRemoved(rm); 20607 } 20608 } 20609 const toAdd = new java.util.HashSet(to.mRendered); 20610 toAdd.removeAll(from.mRendered); 20611 for (let index = toAdd.iterator(); index.hasNext(); ) { 20612 let rm = index.next(); 20613 { 20614 changes.manifestationAdded(rm); 20615 } 20616 } 20617 for (let index = from.mRendered.iterator(); index.hasNext(); ) { 20618 let fromRm = index.next(); 20619 { 20620 for (let index2 = to.mRendered.iterator(); index2.hasNext(); ) { 20621 let toRm = index2.next(); 20622 { 20623 if (fromRm.equals(toRm)) { 20624 changes.manifestationSwitched(fromRm, toRm); 20625 if (javaemul.internal.FloatHelper.floatToIntBits(fromRm.getGlow()) !== javaemul.internal.FloatHelper.floatToIntBits(toRm.getGlow())) changes.glowChanged(toRm); 20626 const fromColor = fromRm.getColor(); 20627 const toColor = toRm.getColor(); 20628 if (fromColor == null && toColor == null) continue; 20629 if (fromColor == null && toColor != null || fromColor != null && toColor == null || !fromColor.equals(toColor)) changes.colorChanged(toRm); 20630 } 20631 } 20632 } 20633 } 20634 } 20635 } 20636 renderVector(av) { 20637 if (av != null) return this.getEmbedding().embedInR3(av); 20638 else return new RealVector(0, 0, 0); 20639 } 20640 renderVectorDouble(av) { 20641 if (av != null) return this.getEmbedding().embedInR3Double(av); 20642 else return [0, 0, 0]; 20643 } 20644 getEmbedding() { 20645 return this.orbitSource.getSymmetry(); 20646 } 20647 measureDistanceCm(c1, c2) { 20648 return this.measureLengthCm$com_vzome_core_math_RealVector(this.renderVector(c1.getLocation().minus(c2.getLocation()))); 20649 } 20650 getCmScaling() { 20651 return this.mPolyhedra.getCmScaling(); 20652 } 20653 measureLengthCm$com_vzome_core_math_RealVector(rv) { 20654 return rv.length() * this.mPolyhedra.getCmScaling(); 20655 } 20656 measureLengthCm(rv) { 20657 if (rv != null && rv instanceof RealVector || rv === null) { 20658 return this.measureLengthCm$com_vzome_core_math_RealVector(rv); 20659 } else if (rv != null && (rv.constructor != null && rv.constructor["__interfaces"] != null && rv.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0) || rv === null) { 20660 return this.measureLengthCm$com_vzome_core_model_Strut(rv); 20661 } else throw new Error("invalid overload"); 20662 } 20663 measureLengthCm$com_vzome_core_model_Strut(strut) { 20664 return this.measureLengthCm$com_vzome_core_math_RealVector(this.renderVector(strut.getOffset())); 20665 } 20666 measureDihedralAngle(p1, p2) { 20667 const v1 = p1["getNormal$com_vzome_core_math_symmetry_Embedding"](this.getEmbedding()); 20668 const v2 = p2["getNormal$com_vzome_core_math_symmetry_Embedding"](this.getEmbedding()); 20669 return _RenderedModel.safeAcos(v1, v2); 20670 } 20671 measureAngle(s1, s2) { 20672 const v1 = this.renderVector(s1.getOffset()); 20673 const v2 = this.renderVector(s2.getOffset()); 20674 return _RenderedModel.safeAcos(v1, v2); 20675 } 20676 static safeAcos(v1, v2) { 20677 let cosine = v1.dot(v2) / (v1.length() * v2.length()); 20678 cosine = Math.min(1, cosine); 20679 cosine = Math.max(-1, cosine); 20680 return Math.acos(cosine); 20681 } 20682 getNearbyBall(location, tolerance) { 20683 for (let index = this.mRendered.iterator(); index.hasNext(); ) { 20684 let rm = index.next(); 20685 { 20686 if (rm.getManifestation() != null && (rm.getManifestation().constructor != null && rm.getManifestation().constructor["__interfaces"] != null && rm.getManifestation().constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) { 20687 const ballLoc = rm.getLocation(); 20688 const distance = ballLoc.minus(location).length(); 20689 if (distance < tolerance) return rm; 20690 } 20691 } 20692 } 20693 return null; 20694 } 20695 getManifestations() { 20696 return this.mRendered.stream().map((rm) => rm.getManifestation()).collect(java.util.stream.Collectors.toList()); 20697 } 20698}; 20699RenderedModel["__class"] = "com.vzome.core.render.RenderedModel"; 20700RenderedModel["__interfaces"] = ["com.vzome.core.model.ManifestationChanges", "java.lang.Iterable"]; 20701((RenderedModel2) => { 20702 class SymmetryOrbitSource { 20703 /* Default method injected from OrbitSource */ 20704 getOrientations(rowMajor) { 20705 if (typeof rowMajor === "boolean" || rowMajor === null) { 20706 let __args = arguments; 20707 if (this.symmetry === void 0) { 20708 this.symmetry = null; 20709 } 20710 if (this.orbits === void 0) { 20711 this.orbits = null; 20712 } 20713 return (() => {
20714 const symmetry = this.getSymmetry(); 20715 const field5 = symmetry.getField(); 20716 const order = symmetry.getChiralOrder(); 20717 const orientations = ((s) => { 20718 let a = []; 20719 while (s-- > 0) a.push(null); 20720 return a; 20721 })(order); 20722 for (let orientation = 0; orientation < order; orientation++) { 20723 { 20724 if (rowMajor) { 20725 orientations[orientation] = symmetry.getMatrix(orientation).getRowMajorRealElements(); 20726 continue; 20727 } 20728 const asFloats = ((s) => { 20729 let a = []; 20730 while (s-- > 0) a.push(0); 20731 return a; 20732 })(16); 20733 const transform = symmetry.getMatrix(orientation); 20734 for (let i = 0; i < 3; i++) { 20735 { 20736 const columnSelect = field5.basisVector(3, i); 20737 const columnI = transform.timesColumn(columnSelect); 20738 const colRV = columnI.toRealVector(); 20739 asFloats[i * 4 + 0] = colRV.x; 20740 asFloats[i * 4 + 1] = colRV.y; 20741 asFloats[i * 4 + 2] = colRV.z; 20742 asFloats[i * 4 + 3] = 0; 20743 } 20744 ; 20745 } 20746 asFloats[12] = 0; 20747 asFloats[13] = 0; 20748 asFloats[14] = 0; 20749 asFloats[15] = 1; 20750 orientations[orientation] = asFloats; 20751 } 20752 ; 20753 } 20754 return orientations; 20755 })(); 20756 } else if (rowMajor === void 0) { 20757 return this.getOrientations$(); 20758 } else throw new Error("invalid overload"); 20759 } 20760 /* Default method injected from OrbitSource */ 20761 getOrientations$() { 20762 return this.getOrientations(false); 20763 } 20764 /* Default method injected from OrbitSource */ 20765 getZone(orbit, orientation) { 20766 return this.getSymmetry().getDirection(orbit).getAxis(Symmetry.PLUS, orientation); 20767 } 20768 /* Default method injected from OrbitSource */ 20769 getEmbedding() { 20770 const symmetry = this.getSymmetry(); 20771 const field5 = symmetry.getField(); 20772 const embedding = ((s) => { 20773 let a = []; 20774 while (s-- > 0) a.push(0); 20775 return a; 20776 })(16); 20777 for (let i = 0; i < 3; i++) { 20778 { 20779 const columnSelect = field5.basisVector(3, i); 20780 const colRV = symmetry.embedInR3(columnSelect); 20781 embedding[i * 4 + 0] = colRV.x; 20782 embedding[i * 4 + 1] = colRV.y; 20783 embedding[i * 4 + 2] = colRV.z; 20784 embedding[i * 4 + 3] = 0; 20785 } 20786 ; 20787 } 20788 embedding[12] = 0; 20789 embedding[13] = 0; 20790 embedding[14] = 0; 20791 embedding[15] = 1; 20792 return embedding; 20793 } 20794 constructor(symmetry) { 20795 if (this.symmetry === void 0) { 20796 this.symmetry = null; 20797 } 20798 if (this.orbits === void 0) { 20799 this.orbits = null; 20800 } 20801 this.symmetry = symmetry; 20802 this.orbits = new OrbitSet(symmetry); 20803 } 20804 /** 20805 * 20806 * @param {Direction} orbit 20807 * @return {Color} 20808 */ 20809 getColor(orbit) { 20810 return new Color(128, 123, 128); 20811 } 20812 /** 20813 * 20814 * @param {AlgebraicVector} vector 20815 * @return {Axis} 20816 */ 20817 getAxis(vector) { 20818 return this.symmetry["getAxis$com_vzome_core_algebra_AlgebraicVector"](vector); 20819 } 20820 /** 20821 * 20822 * @return {OrbitSet} 20823 */ 20824 getOrbits() { 20825 return this.orbits; 20826 } 20827 /** 20828 * 20829 * @return {*} 20830 */ 20831 getShapes() { 20832 return null; 20833 } 20834 /** 20835 * 20836 * @return {*} 20837 */ 20838 getSymmetry() { 20839 return this.symmetry; 20840 } 20841 /** 20842 * 20843 * @param {AlgebraicVector} vector 20844 * @return {Color} 20845 */ 20846 getVectorColor(vector) { 20847 return null; 20848 } 20849 /** 20850 * 20851 * @return {string} 20852 */ 20853 getName() { 20854 return null; 20855 } 20856 } 20857 RenderedModel2.SymmetryOrbitSource = SymmetryOrbitSource; 20858 SymmetryOrbitSource["__class"] = "com.vzome.core.render.RenderedModel.SymmetryOrbitSource"; 20859 SymmetryOrbitSource["__interfaces"] = ["com.vzome.core.editor.api.OrbitSource"]; 20860})(RenderedModel || (RenderedModel = {})); 20861
20862// src/worker/legacy/from-java/com/vzome/core/math/symmetry/DodecagonalSymmetry.ts 20863var DodecagonalSymmetry = class _DodecagonalSymmetry extends AbstractSymmetry { 20864 static { 20865 this.ORDER = 12; 20866 } 20867 constructor(field5) { 20868 super(_DodecagonalSymmetry.ORDER, field5, "blue", null); 20869 this.IDENTITY = new Permutation(this, null); 20870 } 20871 /** 20872 * 20873 */ 20874 createInitialPermutations() { 20875 this.mOrientations[0] = this.IDENTITY; 20876 const map = ((s) => { 20877 let a = []; 20878 while (s-- > 0) a.push(0); 20879 return a; 20880 })(_DodecagonalSymmetry.ORDER); 20881 for (let i = 0; i < _DodecagonalSymmetry.ORDER; i++) { 20882 map[i] = (i + 1) % _DodecagonalSymmetry.ORDER; 20883 } 20884 this.mOrientations[1] = new Permutation(this, map); 20885 } 20886 /** 20887 * 20888 * @param {string} frameColor 20889 */ 20890 createFrameOrbit(frameColor) { 20891 const xAxis = this.mField.createVector([[1, 1, 0, 1], [0, 1, 0, 1], [0, 1, 0, 1]]); 20892 const dir = this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean(frameColor, 0, 15, xAxis, true); 20893 dir.createAxis$int$int$com_vzome_core_algebra_AlgebraicVector(0, Symmetry.NO_ROTATION, xAxis); 20894 dir.createAxis$int$int$int_A_A(1, Symmetry.NO_ROTATION, [[0, 1, 1, 2], [1, 2, 0, 1], [0, 1, 0, 1]]); 20895 dir.createAxis$int$int$int_A_A(2, Symmetry.NO_ROTATION, [[1, 2, 0, 1], [0, 1, 1, 2], [0, 1, 0, 1]]); 20896 dir.createAxis$int$int$int_A_A(3, Symmetry.NO_ROTATION, [[0, 1, 0, 1], [1, 1, 0, 1], [0, 1, 0, 1]]); 20897 dir.createAxis$int$int$int_A_A(4, Symmetry.NO_ROTATION, [[-1, 2, 0, 1], [0, 1, 1, 2], [0, 1, 0, 1]]); 20898 dir.createAxis$int$int$int_A_A(5, Symmetry.NO_ROTATION, [[0, 1, -1, 2], [1, 2, 0, 1], [0, 1, 0, 1]]); 20899 dir.createAxis$int$int$int_A_A(6, Symmetry.NO_ROTATION, [[-1, 1, 0, 1], [0, 1, 0, 1], [0, 1, 0, 1]]); 20900 dir.createAxis$int$int$int_A_A(7, Symmetry.NO_ROTATION, [[0, 1, -1, 2], [-1, 2, 0, 1], [0, 1, 0, 1]]); 20901 dir.createAxis$int$int$int_A_A(8, Symmetry.NO_ROTATION, [[-1, 2, 0, 1], [0, 1, -1, 2], [0, 1, 0, 1]]); 20902 dir.createAxis$int$int$int_A_A(9, Symmetry.NO_ROTATION, [[0, 1, 0, 1], [-1, 1, 0, 1], [0, 1, 0, 1]]); 20903 dir.createAxis$int$int$int_A_A(10, Symmetry.NO_ROTATION, [[1, 2, 0, 1], [0, 1, -1, 2], [0, 1, 0, 1]]); 20904 dir.createAxis$int$int$int_A_A(11, Symmetry.NO_ROTATION, [[0, 1, 1, 2], [-1, 2, 0, 1], [0, 1, 0, 1]]); 20905 const zAxis = this.mField.createVector([[0, 1, 0, 1], [0, 1, 0, 1], [1, 1, 0, 1]]); 20906 for (let p = 0; p < _DodecagonalSymmetry.ORDER; p++) { 20907 { 20908 const x = this.mOrientations[p].mapIndex(0); 20909 const y = this.mOrientations[p].mapIndex(3); 20910 this.mMatrices[p] = new AlgebraicMatrix(dir.getAxis$int$int(Symmetry.PLUS, x).normal(), dir.getAxis$int$int(Symmetry.PLUS, y).normal(), zAxis); 20911 const axis = dir.getAxis$int$int(Symmetry.PLUS, p); 20912 const norm = this.mMatrices[p].timesColumn(xAxis); 20913 if (!norm.equals(axis.normal())) throw new java.lang.IllegalStateException("matrix wrong: " + p); 20914 } 20915 ; 20916 } 20917 } 20918 /** 20919 * 20920 */ 20921 createOtherOrbits() { 20922 this.createZoneOrbit$java_lang_String$int$int$int_A_A$boolean("green", 0, Symmetry.NO_ROTATION, [[1, 1, 1, 2], [1, 2, 0, 1], [0, 1, 0, 1]], true); 20923 this.createZoneOrbit$java_lang_String$int$int$int_A_A$boolean("red", 0, 1, [[0, 1, 0, 1], [0, 1, 0, 1], [1, 1, 0, 1]], true); 20924 } 20925 /** 20926 * 20927 * @param {SpecialOrbit} which 20928 * @return {Direction} 20929 */ 20930 getSpecialOrbit(which) { 20931 switch (which) { 20932 case 0 /* BLUE */: 20933 return this.getDirection("blue"); 20934 case 1 /* RED */: 20935 return this.getDirection("red"); 20936 case 2 /* YELLOW */: 20937 return this.getDirection("green"); 20938 default: 20939 return null; 20940 } 20941 } 20942 /** 20943 * 20944 * @return {Axis} 20945 */ 20946 getPreferredAxis() { 20947 return this.getDirection("red").getAxis$int$int(0, 0); 20948 } 20949 /** 20950 * 20951 * @return {string} 20952 */ 20953 getName() { 20954 return "dodecagonal"; 20955 } 20956 /** 20957 * 20958 * @param {string} name 20959 * @return {int[]} 20960 */ 20961 subgroup(name) { 20962 return null; 20963 } 20964}; 20965DodecagonalSymmetry["__class"] = "com.vzome.core.math.symmetry.DodecagonalSymmetry"; 20966DodecagonalSymmetry["__interfaces"] = ["com.vzome.core.math.symmetry.Symmetry", "com.vzome.core.math.symmetry.Embedding"]; 20967
20968// src/worker/legacy/from-java/com/vzome/core/viewing/DodecagonalShapes.ts 20969var DodecagonalShapes = class _DodecagonalShapes extends AbstractShapes { 20970 constructor(pkgName, name, alias, symm) { 20971 super(pkgName, name, alias, symm); 20972 if (this.V0 === void 0) { 20973 this.V0 = null; 20974 } 20975 if (this.V1 === void 0) { 20976 this.V1 = null; 20977 } 20978 if (this.V2 === void 0) { 20979 this.V2 = null; 20980 } 20981 if (this.V3 === void 0) { 20982 this.V3 = null; 20983 } 20984 if (this.V4 === void 0) { 20985 this.V4 = null; 20986 } 20987 if (this.V5 === void 0) { 20988 this.V5 = null; 20989 } 20990 if (this.TWO === void 0) { 20991 this.TWO = null; 20992 } 20993 if (this.GREEN === void 0) { 20994 this.GREEN = null; 20995 } 20996 if (this.V6 === void 0) { 20997 this.V6 = null; 20998 } 20999 if (this.V7 === void 0) { 21000 this.V7 = null; 21001 } 21002 const field5 = symm.getField(); 21003 this.V0 = field5.createVector([[1, 1, 0, 1], [0, 1, 0, 1], [0, 1, 0, 1]]); 21004 this.V1 = field5.createVector([[1, 2, 0, 1], [0, 1, 1, 2], [0, 1, 0, 1]]); 21005 this.V2 = field5.createVector([[-1, 2, 0, 1], [0, 1, 1, 2], [0, 1, 0, 1]]); 21006 this.V3 = field5.createVector([[-1, 1, 0, 1], [0, 1, 0, 1], [0, 1, 0, 1]]); 21007 this.V4 = field5.createVector([[-1, 2, 0, 1], [0, 1, -1, 2], [0, 1, 0, 1]]); 21008 this.V5 = field5.createVector([[1, 2, 0, 1], [0, 1, -1, 2], [0, 1, 0, 1]]); 21009 this.TWO = field5.createVector([[2, 1, 0, 1], [0, 1, 0, 1], [0, 1, 0, 1]]); 21010 this.GREEN = field5.createVector([[1, 1, 1, 2], [1, 2, 0, 1], [0, 1, 0, 1]]); 21011 this.V6 = field5.createVector([[1, 1, 0, 1], [0, 1, 1, 3], [0, 1, 0, 1]]); 21012 this.V7 = field5.createVector([[0, 1, 2, 3], [0, 1, 0, 1], [0, 1, 0, 1]]); 21013 } 21014 /** 21015 * 21016 * @param {string} pkgName 21017 * @return {Polyhedron} 21018 */ 21019 buildConnectorShape(pkgName) { 21020 const hex = new Polyhedron(this.mSymmetry.getField()); 21021 hex.addVertex(this.V0); 21022 hex.addVertex(this.V1); 21023 hex.addVertex(this.V2); 21024 hex.addVertex(this.V3); 21025 hex.addVertex(this.V4); 21026 hex.addVertex(this.V5); 21027 let face = hex.newFace(); 21028 face.add(0); 21029 face.add(1); 21030 face.add(2); 21031 face.add(3); 21032 face.add(4); 21033 face.add(5); 21034 hex.addFace(face); 21035 face = hex.newFace(); 21036 face.add(5); 21037 face.add(4); 21038 face.add(3); 21039 face.add(2); 21040 face.add(1); 21041 face.add(0); 21042 hex.addFace(face); 21043 return hex; 21044 } 21045 /** 21046 * 21047 * @param {Direction} dir 21048 * @return {*} 21049 */ 21050 createStrutGeometry(dir) { 21051 if (dir.getName() === "blue") return new _DodecagonalShapes.BlueStrutGeometry(this); 21052 else if (dir.getName() === "green") return new _DodecagonalShapes.GreenStrutGeometry(this); 21053 else return super.createStrutGeometry(dir); 21054 } 21055}; 21056DodecagonalShapes["__class"] = "com.vzome.core.viewing.DodecagonalShapes"; 21057DodecagonalShapes["__interfaces"] = ["com.vzome.core.editor.api.Shapes"]; 21058((DodecagonalShapes2) => { 21059 class BlueStrutGeometry { 21060 /** 21061 * 21062 * @param {*} length 21063 * @return {Polyhedron} 21064 */ 21065 getStrutPolyhedron(length) { 21066 const field5 = this.__parent.mSymmetry.getField(); 21067 const hex = new Polyhedron(field5); 21068 const strut = field5.basisVector(3, 0).scale(length); 21069 const THIRD = field5["createRational$long$long"](1, 3); 21070 hex.addVertex(strut.plus(this.__parent.V5.scale(THIRD).minus(this.__parent.TWO))); 21071 hex.addVertex(strut.plus(this.__parent.V0.scale(THIRD).minus(this.__parent.TWO))); 21072 hex.addVertex(strut.plus(this.__parent.V1.scale(THIRD).minus(this.__parent.TWO))); 21073 hex.addVertex(this.__parent.V2.scale(THIRD).plus(this.__parent.TWO)); 21074 hex.addVertex(this.__parent.V3.scale(THIRD).plus(this.__parent.TWO)); 21075 hex.addVertex(this.__parent.V4.scale(THIRD).plus(this.__parent.TWO)); 21076 let face = hex.newFace(); 21077 face.add(0); 21078 face.add(1); 21079 face.add(2); 21080 face.add(3); 21081 face.add(4); 21082 face.add(5); 21083 hex.addFace(face); 21084 face = hex.newFace(); 21085 face.add(5); 21086 face.add(4); 21087 face.add(3); 21088 face.add(2); 21089 face.add(1); 21090 face.add(0); 21091 hex.addFace(face); 21092 return hex; 21093 } 21094 constructor(__parent) { 21095 this.__parent = __parent; 21096 } 21097 } 21098 DodecagonalShapes2.BlueStrutGeometry = BlueStrutGeometry; 21099 BlueStrutGeometry["__class"] = "com.vzome.core.viewing.DodecagonalShapes.BlueStrutGeometry"; 21100 BlueStrutGeometry["__interfaces"] = ["com.vzome.core.parts.StrutGeometry"]; 21101 class GreenStrutGeometry { 21102 /** 21103 * 21104 * @param {*} length 21105 * @return {Polyhedron} 21106 */ 21107 getStrutPolyhedron(length) { 21108 const field5 = this.__parent.mSymmetry.getField(); 21109 const vector = this.__parent.GREEN.scale(length); 21110 const hex = new Polyhedron(field5); 21111 hex.addVertex(vector.plus(this.__parent.GREEN.plus(this.__parent.V6)).negate()); 21112 hex.addVertex(vector.plus(this.__parent.GREEN.negate())); 21113 hex.addVertex(vector.plus(this.__parent.GREEN.plus(this.__parent.V7).negate())); 21114 hex.addVertex(this.__parent.V6.plus(this.__parent.GREEN)); 21115 hex.addVertex(this.__parent.GREEN); 21116 hex.addVertex(this.__parent.V7.plus(this.__parent.GREEN)); 21117 let face = hex.newFace(); 21118 face.add(0); 21119 face.add(1); 21120 face.add(2); 21121 face.add(3); 21122 face.add(4);
21123 face.add(5); 21124 hex.addFace(face); 21125 face = hex.newFace(); 21126 face.add(5); 21127 face.add(4); 21128 face.add(3); 21129 face.add(2); 21130 face.add(1); 21131 face.add(0); 21132 hex.addFace(face); 21133 return hex; 21134 } 21135 constructor(__parent) { 21136 this.__parent = __parent; 21137 } 21138 } 21139 DodecagonalShapes2.GreenStrutGeometry = GreenStrutGeometry; 21140 GreenStrutGeometry["__class"] = "com.vzome.core.viewing.DodecagonalShapes.GreenStrutGeometry"; 21141 GreenStrutGeometry["__interfaces"] = ["com.vzome.core.parts.StrutGeometry"]; 21142})(DodecagonalShapes || (DodecagonalShapes = {})); 21143
21144// src/worker/legacy/from-java/com/vzome/core/kinds/RootThreeFieldApplication.ts 21145var RootThreeFieldApplication = class _RootThreeFieldApplication extends DefaultFieldApplication { 21146 constructor(field5) { 21147 super(field5); 21148 this.dodecagonalPerspective = new _RootThreeFieldApplication.RootThreeFieldApplication$0(this, new DodecagonalSymmetry(this.getField())); 21149 const octahedralPerspective = super.getDefaultSymmetryPerspective(); 21150 const symm = octahedralPerspective.getSymmetry(); 21151 symm.createZoneOrbit$java_lang_String$int$int$int_A_A$boolean("red", 0, Symmetry.NO_ROTATION, [[1, 1, 1, 2], [1, 2, 0, 1], [0, 1, 0, 1]], true); 21152 symm.createZoneOrbit$java_lang_String$int$int$int_A_A("brown", 0, Symmetry.NO_ROTATION, [[1, 1, 0, 1], [1, 1, 0, 1], [2, 1, 0, 1]]); 21153 const defaultShapes = new ExportedVEFShapes(null, "rootThreeOctaSmall", "small octahedra", "small connectors", symm); 21154 octahedralPerspective.setDefaultGeometry(defaultShapes); 21155 } 21156 /** 21157 * 21158 * @return {string} 21159 */ 21160 getLabel() { 21161 return "\u221A3"; 21162 } 21163 /** 21164 * 21165 * @return {*} 21166 */ 21167 getDefaultSymmetryPerspective() { 21168 return this.dodecagonalPerspective; 21169 } 21170 /** 21171 * 21172 * @return {*} 21173 */ 21174 getSymmetryPerspectives() { 21175 return java.util.Arrays.asList(super.getDefaultSymmetryPerspective(), this.dodecagonalPerspective); 21176 } 21177 /** 21178 * 21179 * @param {string} symmName 21180 * @return {*} 21181 */ 21182 getSymmetryPerspective(symmName) { 21183 switch (symmName) { 21184 case "dodecagonal": 21185 return this.dodecagonalPerspective; 21186 default: 21187 return super.getSymmetryPerspective(symmName); 21188 } 21189 } 21190}; 21191RootThreeFieldApplication["__class"] = "com.vzome.core.kinds.RootThreeFieldApplication"; 21192RootThreeFieldApplication["__interfaces"] = ["com.vzome.core.math.symmetry.Symmetries4D", "com.vzome.core.editor.FieldApplication"]; 21193((RootThreeFieldApplication2) => { 21194 class RootThreeFieldApplication$0 extends AbstractSymmetryPerspective { 21195 /** 21196 * 21197 * @return {string} 21198 */ 21199 getName() { 21200 return "dodecagonal"; 21201 } 21202 /** 21203 * 21204 * @param {Direction} orbit 21205 * @return {boolean} 21206 */ 21207 orbitIsBuildDefault(orbit) { 21208 switch (orbit.getName()) { 21209 case "blue": 21210 case "green": 21211 return true; 21212 default: 21213 return false; 21214 } 21215 } 21216 /** 21217 * 21218 * @param {Direction} orbit 21219 * @return {*} 21220 */ 21221 getOrbitUnitLength(orbit) { 21222 switch (orbit.getName()) { 21223 case "blue": 21224 case "green": 21225 return this.__parent.getField()["createPower$int"](2); 21226 default: 21227 return super.getOrbitUnitLength(orbit); 21228 } 21229 } 21230 /** 21231 * 21232 * @param {Tool.Kind} kind 21233 * @param {ToolsModel} tools 21234 * @return {*} 21235 */ 21236 createToolFactories(kind, tools) { 21237 const result = new java.util.ArrayList(); 21238 switch (kind) { 21239 case Tool2.Kind.SYMMETRY: 21240 result.add(new SymmetryToolFactory(tools, this.symmetry)); 21241 result.add(new InversionToolFactory(tools)); 21242 result.add(new LineReflectionToolFactory(tools)); 21243 result.add(new MirrorToolFactory(tools)); 21244 result.add(new AxialSymmetryToolFactory(tools, this.symmetry)); 21245 break; 21246 case Tool2.Kind.TRANSFORM: 21247 result.add(new ScalingToolFactory(tools, this.symmetry)); 21248 result.add(new RotationToolFactory(tools, this.symmetry)); 21249 result.add(new TranslationToolFactory(tools)); 21250 result.add(new ProjectionToolFactory(tools)); 21251 break; 21252 case Tool2.Kind.LINEAR_MAP: 21253 result.add(new LinearMapToolFactory(tools, this.symmetry, false)); 21254 break; 21255 default: 21256 break; 21257 } 21258 return result; 21259 } 21260 /** 21261 * 21262 * @param {Tool.Kind} kind 21263 * @param {ToolsModel} tools 21264 * @return {*} 21265 */ 21266 predefineTools(kind, tools) { 21267 const result = new java.util.ArrayList(); 21268 switch (kind) { 21269 case Tool2.Kind.SYMMETRY: 21270 result.add(new SymmetryToolFactory(tools, this.symmetry).createPredefinedTool("dodecagonal antiprism around origin")); 21271 result.add(new InversionToolFactory(tools).createPredefinedTool("reflection through origin")); 21272 result.add(new MirrorToolFactory(tools).createPredefinedTool("reflection through XY plane")); 21273 result.add(new AxialSymmetryToolFactory(tools, this.symmetry).createPredefinedTool("symmetry around red through origin")); 21274 break; 21275 case Tool2.Kind.TRANSFORM: 21276 result.add(new ScalingToolFactory(tools, this.symmetry).createPredefinedTool("scale down")); 21277 result.add(new ScalingToolFactory(tools, this.symmetry).createPredefinedTool("scale up")); 21278 result.add(new RotationToolFactory(tools, this.symmetry, true).createPredefinedTool("rotate around red through origin")); 21279 result.add(new TranslationToolFactory(tools).createPredefinedTool("b1 move along +X")); 21280 break; 21281 default: 21282 break; 21283 } 21284 return result; 21285 } 21286 /** 21287 * 21288 * @param {string} action 21289 * @return {*} 21290 */ 21291 getLegacyCommand(action) { 21292 switch (action) { 21293 case "dodecagonsymm": 21294 return this.dodecagonsymm; 21295 default: 21296 return super.getLegacyCommand(action); 21297 } 21298 } 21299 /** 21300 * 21301 * @return {string} 21302 */ 21303 getModelResourcePath() { 21304 return "org/vorthmann/zome/app/12-gon-trackball-vef.vZome"; 21305 } 21306 constructor(__parent, __arg0) { 21307 super(__arg0); 21308 this.__parent = __parent; 21309 (() => { 21310 const defaultShapes = new ExportedVEFShapes(null, "dodecagon3d", "prisms", this.symmetry); 21311 const hexagonShapes = new DodecagonalShapes("dodecagonal", "hexagons", "flat hexagons", this.symmetry); 21312 this.setDefaultGeometry(defaultShapes); 21313 this.addShapes(hexagonShapes); 21314 })(); 21315 this.dodecagonsymm = new CommandSymmetry(this.symmetry); 21316 } 21317 } 21318 RootThreeFieldApplication2.RootThreeFieldApplication$0 = RootThreeFieldApplication$0; 21319 RootThreeFieldApplication$0["__interfaces"] = ["com.vzome.core.editor.SymmetryPerspective"]; 21320})(RootThreeFieldApplication || (RootThreeFieldApplication = {})); 21321
21322// src/worker/legacy/from-java/com/vzome/core/viewing/SchochShapes.ts 21323var SchochShapes = class extends ExportedVEFShapes { 21324 constructor(prefsFolder, name, alias, symmetry, defaultShapes) { 21325 super(prefsFolder, name, alias, symmetry, defaultShapes); 21326 } 21327 /** 21328 * 21329 * @return {number} 21330 */ 21331 getCmScaling() { 21332 return 1; 21333 } 21334}; 21335SchochShapes["__class"] = "com.vzome.core.viewing.SchochShapes"; 21336SchochShapes["__interfaces"] = ["com.vzome.core.editor.api.Shapes"]; 21337
21338// src/worker/legacy/from-java/com/vzome/core/kinds/RootTwoFieldApplication.ts 21339var RootTwoFieldApplication = class _RootTwoFieldApplication extends DefaultFieldApplication { 21340 constructor(field5) { 21341 super(field5); 21342 this.synestructicsSymmetry = new _RootTwoFieldApplication.RootTwoFieldApplication$0(this, this.getField(), "orange"); 21343 this.synestructicsPerspective = new _RootTwoFieldApplication.RootTwoFieldApplication$1(this, this.synestructicsSymmetry); 21344 const octahedralPerspective = super.getDefaultSymmetryPerspective(); 21345 const symmetry = octahedralPerspective.getSymmetry(); 21346 symmetry.createZoneOrbit$java_lang_String$int$int$int_A_A$boolean("yellow", 0, 4, [[1, 1, 0, 1], [1, 1, 0, 1], [1, 1, 0, 1]], true); 21347 symmetry.createZoneOrbit$java_lang_String$int$int$int_A_A$boolean("green", 1, 8, [[0, 1, 1, 2], [0, 1, 1, 2], [0, 1, 0, 1]], true); 21348 symmetry.createZoneOrbit$java_lang_String$int$int$int_A_A$boolean("brown", 0, Symmetry.NO_ROTATION, [[1, 1, 0, 1], [1, 1, 0, 1], [2, 1, 0, 1]], true); 21349 const defaultShapes = new ExportedVEFShapes(null, "rootTwoSmall", "small octahedra", "small connectors", symmetry); 21350 octahedralPerspective.setDefaultGeometry(defaultShapes); 21351 octahedralPerspective.addShapes(new ExportedVEFShapes(null, "rootTwoBig", "ornate", symmetry, defaultShapes)); 21352 const rootTwoShapes = new SchochShapes(null, "rootTwo", "Schoch solid", symmetry, defaultShapes); 21353 octahedralPerspective.addShapes(rootTwoShapes); 21354 octahedralPerspective.addShapes(new SchochShapes(null, "root2Lifelike", "Schoch lifelike", symmetry, rootTwoShapes)); 21355 } 21356 /** 21357 * 21358 * @return {string} 21359 */ 21360 getLabel() { 21361 return "\u221A2"; 21362 } 21363 /** 21364 * 21365 * @return {*} 21366 */ 21367 getSymmetryPerspectives() { 21368 return java.util.Arrays.asList(super.getDefaultSymmetryPerspective(), this.synestructicsPerspective); 21369 } 21370 /** 21371 * 21372 * @param {string} symmName 21373 * @return {*} 21374 */ 21375 getSymmetryPerspective(symmName) { 21376 switch (symmName) { 21377 case "synestructics": 21378 return this.synestructicsPerspective; 21379 default: 21380 return super.getSymmetryPerspective(symmName); 21381 } 21382 } 21383}; 21384RootTwoFieldApplication["__class"] = "com.vzome.core.kinds.RootTwoFieldApplication"; 21385RootTwoFieldApplication["__interfaces"] = ["com.vzome.core.math.symmetry.Symmetries4D", "com.vzome.core.editor.FieldApplication"]; 21386((RootTwoFieldApplication2) => { 21387 class RootTwoFieldApplication$0 extends OctahedralSymmetry { 21388 /** 21389 * 21390 * @return {string} 21391 */ 21392 getName() { 21393 return "synestructics"; 21394 } 21395 /** 21396 * 21397 * @param {SpecialOrbit} which 21398 * @return {Direction} 21399 */ 21400 getSpecialOrbit(which) { 21401 switch (which) { 21402 case 0 /* BLUE */: 21403 return this.getDirection(this.frameColor); 21404 case 1 /* RED */: 21405 return this.getDirection("magenta"); 21406 case 2 /* YELLOW */: 21407 return this.getDirection("yellow"); 21408 default: 21409 return null; 21410 } 21411 } 21412 /** 21413 * 21414 * @return {AlgebraicVector[]} 21415 */ 21416 getOrbitTriangle() { 21417 const magentaVertex = this.getDirection("magenta").getPrototype(); 21418 const orangeVertex = this.getDirection(this.frameColor).getPrototype(); 21419 const yellowVertex = this.getDirection("yellow").getPrototype(); 21420 return [magentaVertex, orangeVertex, yellowVertex]; 21421 } 21422 /** 21423 * 21424 */ 21425 createOtherOrbits() { 21426 let v = new AlgebraicVector(this.mField.one(), this.mField.one(), this.mField.one()); 21427 this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean("yellow", 0, 4, v, true); 21428 const sqrt2 = this.mField["createPower$int"](1); 21429 const half = this.mField["createRational$long$long"](1, 2); 21430 v = new AlgebraicVector(sqrt2, sqrt2, this.mField.zero()).scale(half); 21431 this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean("magenta", 1, 8, v, true); 21432 v = new AlgebraicVector(this.mField.one(), this.mField.one(), this.mField.one()["plus$com_vzome_core_algebra_AlgebraicNumber"](this.mField.one())); 21433 this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean("brown", 0, Symmetry.NO_ROTATION, v, true); 21434 } 21435 constructor(__parent, __arg0, __arg1) { 21436 super(__arg0, __arg1); 21437 this.__parent = __parent; 21438 } 21439 } 21440 RootTwoFieldApplication2.RootTwoFieldApplication$0 = RootTwoFieldApplication$0; 21441 RootTwoFieldApplication$0["__interfaces"] = ["com.vzome.core.math.symmetry.Symmetry", "com.vzome.core.math.symmetry.Embedding"]; 21442 class RootTwoFieldApplication$1 extends AbstractSymmetryPerspective { 21443 /** 21444 * 21445 * @param {Tool.Kind} kind 21446 * @param {ToolsModel} tools 21447 * @return {*} 21448 */ 21449 createToolFactories(kind, tools) { 21450 const result = new java.util.ArrayList(); 21451 switch (kind) { 21452 case Tool2.Kind.SYMMETRY: 21453 result.add(new OctahedralToolFactory(tools, this.symmetry)); 21454 result.add(new TetrahedralToolFactory(tools, this.symmetry)); 21455 result.add(new InversionToolFactory(tools)); 21456 result.add(new LineReflectionToolFactory(tools)); 21457 result.add(new MirrorToolFactory(tools)); 21458 result.add(new AxialSymmetryToolFactory(tools, this.symmetry)); 21459 break; 21460 case Tool2.Kind.TRANSFORM: 21461 result.add(new ScalingToolFactory(tools, this.symmetry)); 21462 result.add(new RotationToolFactory(tools, this.symmetry)); 21463 result.add(new TranslationToolFactory(tools)); 21464 result.add(new ProjectionToolFactory(tools)); 21465 break;
21466 case Tool2.Kind.LINEAR_MAP: 21467 result.add(new LinearMapToolFactory(tools, this.symmetry, false)); 21468 break; 21469 default: 21470 break; 21471 } 21472 return result; 21473 } 21474 /** 21475 * 21476 * @param {Tool.Kind} kind 21477 * @param {ToolsModel} tools 21478 * @return {*} 21479 */ 21480 predefineTools(kind, tools) { 21481 const result = new java.util.ArrayList(); 21482 switch (kind) { 21483 case Tool2.Kind.SYMMETRY: 21484 result.add(new OctahedralToolFactory(tools, this.symmetry).createPredefinedTool("octahedral around origin")); 21485 result.add(new TetrahedralToolFactory(tools, this.symmetry).createPredefinedTool("tetrahedral around origin")); 21486 result.add(new InversionToolFactory(tools).createPredefinedTool("reflection through origin")); 21487 result.add(new MirrorToolFactory(tools).createPredefinedTool("reflection through XY plane")); 21488 result.add(new AxialSymmetryToolFactory(tools, this.symmetry).createPredefinedTool("symmetry around green through origin")); 21489 break; 21490 case Tool2.Kind.TRANSFORM: 21491 result.add(new ScalingToolFactory(tools, this.symmetry).createPredefinedTool("scale down")); 21492 result.add(new ScalingToolFactory(tools, this.symmetry).createPredefinedTool("scale up")); 21493 result.add(new RotationToolFactory(tools, this.symmetry, true).createPredefinedTool("rotate around green through origin")); 21494 result.add(new TranslationToolFactory(tools).createPredefinedTool("b1 move along +X")); 21495 break; 21496 default: 21497 break; 21498 } 21499 return result; 21500 } 21501 /** 21502 * 21503 * @return {string} 21504 */ 21505 getModelResourcePath() { 21506 return "org/vorthmann/zome/app/octahedral-vef.vZome"; 21507 } 21508 constructor(__parent, __arg0) { 21509 super(__arg0); 21510 this.__parent = __parent; 21511 (() => { 21512 const defaultShapes = new ExportedVEFShapes(null, "rootTwoSmall", "small octahedra", this.symmetry, null); 21513 const synestructicsShapes = new ExportedVEFShapes(null, "rootTwo", "Synestructics", this.symmetry, defaultShapes); 21514 const ornateShapes = new ExportedVEFShapes(null, "rootTwoBig", "ornate", this.symmetry, defaultShapes); 21515 this.setDefaultGeometry(defaultShapes); 21516 this.addShapes(synestructicsShapes); 21517 this.addShapes(ornateShapes); 21518 })(); 21519 } 21520 } 21521 RootTwoFieldApplication2.RootTwoFieldApplication$1 = RootTwoFieldApplication$1; 21522 RootTwoFieldApplication$1["__interfaces"] = ["com.vzome.core.editor.SymmetryPerspective"]; 21523})(RootTwoFieldApplication || (RootTwoFieldApplication = {})); 21524
21525// src/worker/legacy/from-java/com/vzome/core/editor/SelectionImpl.ts 21526var SelectionImpl = class _SelectionImpl { 21527 static logger_$LI$() { 21528 if (_SelectionImpl.logger == null) { 21529 _SelectionImpl.logger = java.util.logging.Logger.getLogger("com.vzome.core.editor.selection"); 21530 } 21531 return _SelectionImpl.logger; 21532 } 21533 /** 21534 * 21535 * @param {*} target 21536 */ 21537 copy(target) { 21538 target.addAll(this.mManifestations); 21539 } 21540 addListener(listener) { 21541 this.mListeners.add(listener); 21542 } 21543 removeListener(listener) { 21544 this.mListeners.remove(listener); 21545 } 21546 /** 21547 * 21548 * @param {*} m 21549 * @return {boolean} 21550 */ 21551 manifestationSelected(m) { 21552 return this.mManifestations.contains(m); 21553 } 21554 isEmpty() { 21555 return this.mManifestations.isEmpty(); 21556 } 21557 /** 21558 * 21559 * @return {*} 21560 */ 21561 iterator() { 21562 return this.mManifestations.iterator(); 21563 } 21564 /** 21565 * 21566 * @param {*} m 21567 */ 21568 select(m) { 21569 if (this.mManifestations.contains(m)) return; 21570 this.mManifestations.add(m); 21571 if (_SelectionImpl.logger_$LI$().isLoggable(java.util.logging.Level.FINER)) _SelectionImpl.logger_$LI$().finer(" select: " + m.toString()); 21572 for (let index = this.mListeners.iterator(); index.hasNext(); ) { 21573 let mc = index.next(); 21574 { 21575 mc.manifestationAdded(m); 21576 } 21577 } 21578 } 21579 /** 21580 * 21581 * @param {*} m 21582 */ 21583 unselect(m) { 21584 if (this.mManifestations.remove(m)) { 21585 if (_SelectionImpl.logger_$LI$().isLoggable(java.util.logging.Level.FINER)) _SelectionImpl.logger_$LI$().finer("deselect: " + m.toString()); 21586 for (let index = this.mListeners.iterator(); index.hasNext(); ) { 21587 let mc = index.next(); 21588 { 21589 mc.manifestationRemoved(m); 21590 } 21591 } 21592 } 21593 } 21594 /** 21595 * 21596 * @param {*} m 21597 */ 21598 selectWithGrouping(m) { 21599 if (this.mManifestations.contains(m)) return; 21600 if (m == null) return; 21601 const group = Selection.biggestGroup(m); 21602 if (group == null) this.add(m); 21603 else this.selectGroup(group); 21604 this.mSelectedGroup = group; 21605 } 21606 /** 21607 * 21608 * @param {*} m 21609 */ 21610 unselectWithGrouping(m) { 21611 if (this.mManifestations.contains(m)) { 21612 const group = Selection.biggestGroup(m); 21613 if (group == null) this.remove(m); 21614 else this.unselectGroup(group); 21615 this.mSelectedGroup = null; 21616 } 21617 } 21618 /*private*/ 21619 add(m) { 21620 this.mManifestations.add(m); 21621 if (_SelectionImpl.logger_$LI$().isLoggable(java.util.logging.Level.FINER)) _SelectionImpl.logger_$LI$().finer(" select: " + m.toString()); 21622 for (let index = this.mListeners.iterator(); index.hasNext(); ) { 21623 let mc = index.next(); 21624 { 21625 mc.manifestationAdded(m); 21626 } 21627 } 21628 } 21629 /*private*/ 21630 remove(m) { 21631 if (this.mManifestations.remove(m)) { 21632 if (_SelectionImpl.logger_$LI$().isLoggable(java.util.logging.Level.FINER)) _SelectionImpl.logger_$LI$().finer("deselect: " + m.toString()); 21633 for (let index = this.mListeners.iterator(); index.hasNext(); ) { 21634 let mc = index.next(); 21635 { 21636 mc.manifestationRemoved(m); 21637 } 21638 } 21639 } 21640 } 21641 /*private*/ 21642 selectGroup(group) { 21643 for (let index = group.iterator(); index.hasNext(); ) { 21644 let next = index.next(); 21645 { 21646 if (next != null && next instanceof Group) this.selectGroup(next); 21647 else this.add(next); 21648 } 21649 } 21650 } 21651 /*private*/ 21652 unselectGroup(group) { 21653 for (let index = group.iterator(); index.hasNext(); ) { 21654 let next = index.next(); 21655 { 21656 if (next != null && next instanceof Group) this.unselectGroup(next); 21657 else this.remove(next); 21658 } 21659 } 21660 } 21661 /** 21662 * 21663 * @param {java.lang.Class} kind 21664 * @return {*} 21665 */ 21666 getSingleSelection(kind) {
21667 let count = 0; 21668 let result = null; 21669 for (let index = this.mManifestations.iterator(); index.hasNext(); ) { 21670 let next = index.next(); 21671 { 21672 if (kind === "com.vzome.core.model.Connector" && (next != null && (next.constructor != null && next.constructor["__interfaces"] != null && next.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) || kind === "com.vzome.core.model.Strut" && (next != null && (next.constructor != null && next.constructor["__interfaces"] != null && next.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) || kind === "com.vzome.core.model.Panel" && (next != null && (next.constructor != null && next.constructor["__interfaces"] != null && next.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0))) { 21673 ++count; 21674 result = next; 21675 } 21676 } 21677 } 21678 if (count === 1) return result; 21679 else return null; 21680 } 21681 /** 21682 * 21683 * @return {boolean} 21684 */ 21685 isSelectionAGroup() { 21686 return this.getSelectedGroup(false) != null; 21687 } 21688 /*private*/ 21689 getSelectedGroup(onlyOne) { 21690 let selectedGroup = null; 21691 for (let index = this.mManifestations.iterator(); index.hasNext(); ) { 21692 let m = index.next(); 21693 { 21694 if (onlyOne && selectedGroup != null) return selectedGroup; 21695 const group = Selection.biggestGroup(m); 21696 if (group == null) return null; 21697 else if (selectedGroup == null) selectedGroup = group; 21698 else if (group !== selectedGroup) return null; 21699 } 21700 } 21701 return selectedGroup; 21702 } 21703 /** 21704 * 21705 */ 21706 gatherGroup() { 21707 const newGroup = new Group(); 21708 for (let index = this.mManifestations.iterator(); index.hasNext(); ) { 21709 let m = index.next(); 21710 { 21711 const group = Selection.biggestGroup(m); 21712 if (group === newGroup) { 21713 } else if (group == null) { 21714 newGroup.add(m); 21715 m.setContainer(newGroup); 21716 } else { 21717 newGroup.add(group); 21718 group.setContainer(newGroup); 21719 } 21720 } 21721 } 21722 } 21723 /** 21724 * 21725 */ 21726 scatterGroup() { 21727 const selectedGroup = this.getSelectedGroup(true); 21728 if (selectedGroup == null) return; 21729 for (const ms = selectedGroup.iterator(); ms.hasNext(); ) { 21730 { 21731 const next = ms.next(); 21732 ms.remove(); 21733 next.setContainer(null); 21734 } 21735 ; 21736 } 21737 } 21738 /** 21739 * 21740 */ 21741 gatherGroup211() { 21742 if (this.mSelectedGroup != null) return; 21743 this.mSelectedGroup = new Group(); 21744 for (let index = this.mManifestations.iterator(); index.hasNext(); ) { 21745 let m = index.next(); 21746 { 21747 const group = Selection.biggestGroup(m); 21748 if (group == null) { 21749 this.mSelectedGroup.add(m); 21750 } else { 21751 this.mSelectedGroup.add(group); 21752 } 21753 } 21754 } 21755 for (let index = this.mSelectedGroup.iterator(); index.hasNext(); ) { 21756 let next = index.next(); 21757 { 21758 next.setContainer(this.mSelectedGroup); 21759 } 21760 } 21761 } 21762 /** 21763 * 21764 */ 21765 scatterGroup211() { 21766 if (this.mSelectedGroup == null) return; 21767 for (const ms = this.mSelectedGroup.iterator(); ms.hasNext(); ) { 21768 { 21769 const next = ms.next(); 21770 ms.remove(); 21771 next.setContainer(null); 21772 } 21773 ; 21774 } 21775 } 21776 refresh(on, otherSelection) { 21777 for (let index = this.mManifestations.iterator(); index.hasNext(); ) { 21778 let m = index.next(); 21779 { 21780 if (otherSelection == null || !otherSelection.mManifestations.contains(m)) { 21781 if (on) { 21782 for (let index2 = this.mListeners.iterator(); index2.hasNext(); ) { 21783 let mc = index2.next(); 21784 { 21785 mc.manifestationAdded(m); 21786 } 21787 } 21788 } else { 21789 for (let index2 = this.mListeners.iterator(); index2.hasNext(); ) { 21790 let mc = index2.next(); 21791 { 21792 mc.manifestationRemoved(m); 21793 } 21794 } 21795 } 21796 } 21797 } 21798 } 21799 } 21800 /** 21801 * 21802 * @return {number} 21803 */ 21804 size() { 21805 return this.mManifestations.size(); 21806 } 21807 /** 21808 * 21809 */ 21810 clear() { 21811 if (!this.mManifestations.isEmpty()) { 21812 if (_SelectionImpl.logger_$LI$().isLoggable(java.util.logging.Level.FINER)) { 21813 _SelectionImpl.logger_$LI$().finer("clearing selection"); 21814 } 21815 const temp = new java.util.LinkedHashSet(this.mManifestations); 21816 for (let index = temp.iterator(); index.hasNext(); ) { 21817 let m = index.next(); 21818 { 21819 this.unselect(m); 21820 } 21821 } 21822 } 21823 } 21824 constructor() { 21825 this.mManifestations = new java.util.LinkedHashSet(); 21826 this.mListeners = new java.util.ArrayList(); 21827 this.mSelectedGroup = null; 21828 } 21829}; 21830SelectionImpl["__class"] = "com.vzome.core.editor.SelectionImpl"; 21831SelectionImpl["__interfaces"] = ["com.vzome.core.editor.api.Selection", "java.lang.Iterable"]; 21832
21833// src/worker/legacy/from-java/com/vzome/core/algebra/SnubCubeField.ts 21834var SnubCubeField = class _SnubCubeField extends ParameterizedField { 21835 static { 21836 this.FIELD_NAME = "snubCube"; 21837 } 21838 /** 21839 * 21840 * @param radicand 21841 * @return {double[]} the coefficients of a SnubCubeField. 21842 * This can be used to determine when two fields have compatible coefficients 21843 * without having to generate an instance of the class. 21844 */ 21845 static getFieldCoefficients() { 21846 const tribonacciConstant = (1 + /* cbrt */ 21847 Math.pow(19 - 3 * Math.sqrt(33), 1 / 3) + /* cbrt */ 21848 Math.pow(19 + 3 * Math.sqrt(33), 1 / 3)) / 3; 21849 return [1, tribonacciConstant, tribonacciConstant * tribonacciConstant]; 21850 } 21851 /** 21852 * 21853 * @return {double[]} 21854 */ 21855 getCoefficients() { 21856 return _SnubCubeField.getFieldCoefficients(); 21857 } 21858 constructor(factory) { 21859 super(_SnubCubeField.FIELD_NAME, 3, factory); 21860 this.initialize(); 21861 } 21862 /** 21863 * 21864 */ 21865 initializeCoefficients() { 21866 const temp = this.getCoefficients(); 21867 let i = 0; 21868 for (let index = 0; index < temp.length; index++) { 21869 let coefficient = temp[index]; 21870 { 21871 this.coefficients[i++] = coefficient; 21872 } 21873 } 21874 } 21875 /** 21876 * 21877 */ 21878 initializeMultiplicationTensor() { 21879 const mm = [[[1, 0, 0], [0, 0, 1], [0, 1, 1]], [[0, 1, 0], [1, 0, 1], [0, 1, 2]], [[0, 0, 1], [0, 1, 1], [1, 1, 2]]]; 21880 this.multiplicationTensor = mm; 21881 } 21882 /** 21883 * 21884 */ 21885 initializeLabels() { 21886 this.irrationalLabels[1] = ["\u03C8", "psi"]; 21887 this.irrationalLabels[2] = ["\u03C8\xB2", "psi^2"]; 21888 } 21889 /** 21890 * 21891 * @return {number} 21892 */ 21893 getNumMultipliers() { 21894 return 1; 21895 } 21896}; 21897SnubCubeField["__class"] = "com.vzome.core.algebra.SnubCubeField"; 21898SnubCubeField["__interfaces"] = ["com.vzome.core.algebra.AlgebraicField"]; 21899
21900// src/worker/legacy/from-java/com/vzome/core/kinds/SnubCubeFieldApplication.ts 21901var SnubCubeFieldApplication = class extends DefaultFieldApplication { 21902 constructor(field5) { 21903 super(field5); 21904 const symmPerspective = super.getDefaultSymmetryPerspective(); 21905 symmPerspective.setModelResourcePath("org/vorthmann/zome/app/snubCubeTrackball-vef.vZome"); 21906 const symm = symmPerspective.getSymmetry(); 21907 const vSnubSquare = field5.createVector([[1, 1, 0, 1, 0, 1], [0, 1, 2, 1, -1, 1], [0, 1, 0, 1, 0, 1]]); 21908 const vSnubTriangle = field5.createVector([[1, 1, 0, 1, 0, 1], [1, 2, 1, 1, -1, 2], [1, 2, -1, 1, 1, 2]]); 21909 const vSnubDiagonal = field5.createVector([[1, 1, 0, 1, 0, 1], [0, 1, -1, 2, 1, 2], [0, 1, -1, 2, 1, 2]]); 21910 const vSnubFaceNormal = field5.createVector([[1, 1, 0, 1, 0, 1], [-2, 7, 2, 7, 1, 7], [-1, 7, -6, 7, 4, 7]]); 21911 const vSnubVertex = field5.createVector([[1, 1, 0, 1, 0, 1], [-1, 1, -1, 1, 1, 1], [0, 1, 2, 1, -1, 1]]); 21912 const vSnubSquareMidEdge = field5.createVector([[1, 1, 0, 1, 0, 1], [-1, 2, 1, 2, 0, 1], [-1, 2, -3, 2, 1, 1]]); 21913 const vSnubTriangleMidEdge = field5.createVector([[1, 1, 0, 1, 0, 1], [-1, 1, 1, 1, 0, 1], [-1, 1, -1, 1, 1, 1]]); 21914 const nSnubSquare = field5.createAlgebraicNumber$int_A([-1, 1, 0]); 21915 const nSnubTriangle = field5.createAlgebraicNumber$int_A([1, -2, 1]); 21916 const nSnubDiagonal = field5.createAlgebraicNumber$int_A([0, 4, -2]); 21917 const nSnubFaceNormal = field5.createAlgebraicNumber$int_A([2, 3, -2]); 21918 const nSnubVertex = field5.one(); 21919 const nSnubSquareMidEdge = field5.one(); 21920 const nSnubTriangleMidEdge = field5.createAlgebraicNumber$int_A([0, -1, 1]).dividedBy(field5.createRational$long(2)); 21921 symm.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber("snubSquare", 0, Symmetry.NO_ROTATION, vSnubSquare, false, false, nSnubSquare); 21922 symm.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber("snubTriangle", 0, Symmetry.NO_ROTATION, vSnubTriangle, false, false, nSnubTriangle); 21923 symm.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber("snubDiagonal", 0, Symmetry.NO_ROTATION, vSnubDiagonal, false, false, nSnubDiagonal); 21924 symm.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber("snubFaceNormal", 0, Symmetry.NO_ROTATION, vSnubFaceNormal, true, false, nSnubFaceNormal); 21925 symm.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber("snubVertex", 0, Symmetry.NO_ROTATION, vSnubVertex, true, false, nSnubVertex); 21926 symm.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber("snubSquareMid", 0, Symmetry.NO_ROTATION, vSnubSquareMidEdge, false, false, nSnubSquareMidEdge); 21927 symm.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber("snubTriangleMid", 0, Symmetry.NO_ROTATION, vSnubTriangleMidEdge, false, false, nSnubTriangleMidEdge); 21928 const defaultShapes = symmPerspective.getDefaultGeometry(); 21929 let resPath = "snubCube"; 21930 const snubCubeRhShapes = new ExportedVEFShapes(null, resPath, "snub cube right", null, symm, defaultShapes, false); 21931 const snubCubeLhShapes = new ExportedVEFShapes(null, resPath, "snub cube left", null, symm, defaultShapes, true); 21932 resPath = "snubCube/dual"; 21933 const snubDualRhShapes = new ExportedVEFShapes(null, resPath, "snub cube dual right", null, symm, defaultShapes, false); 21934 const snubDualLhShapes = new ExportedVEFShapes(null, resPath, "snub cube dual left", null, symm, defaultShapes, true); 21935 resPath = "snubCube/disdyakisDodec"; 21936 const disdyakisDodec = new ExportedVEFShapes(null, resPath, "disdyakis dodec", null, symm, defaultShapes, false); 21937 symmPerspective.addShapes(disdyakisDodec); 21938 symmPerspective.addShapes(snubCubeRhShapes); 21939 symmPerspective.addShapes(snubCubeRhShapes); 21940 symmPerspective.addShapes(snubCubeLhShapes); 21941 symmPerspective.addShapes(snubDualRhShapes); 21942 symmPerspective.addShapes(snubDualLhShapes); 21943 } 21944 /** 21945 * 21946 * @return {string} 21947 */ 21948 getLabel() { 21949 return "Snub Cube"; 21950 } 21951}; 21952SnubCubeFieldApplication["__class"] = "com.vzome.core.kinds.SnubCubeFieldApplication"; 21953SnubCubeFieldApplication["__interfaces"] = ["com.vzome.core.math.symmetry.Symmetries4D", "com.vzome.core.editor.FieldApplication"]; 21954
21955// src/worker/legacy/from-java/com/vzome/core/algebra/SnubDodecField.ts 21956var SnubDodecField = class _SnubDodecField extends AbstractAlgebraicField { 21957 static { 21958 this.FIELD_NAME = "snubDodec"; 21959 } 21960 /** 21961 * 21962 * @return {double[]} the coefficients of this AlgebraicField class. 21963 * This can be used to determine when two fields have compatible coefficients 21964 * without having to generate an instance of the class. 21965 */ 21966 static getFieldCoefficients() { 21967 return [1, _SnubDodecField.PHI_VALUE_$LI$(), _SnubDodecField.XI_VALUE, _SnubDodecField.PHI_VALUE_$LI$() * _SnubDodecField.XI_VALUE, _SnubDodecField.XI_VALUE * _SnubDodecField.XI_VALUE, _SnubDodecField.PHI_VALUE_$LI$() * _SnubDodecField.XI_VALUE * _SnubDodecField.XI_VALUE]; 21968 } 21969 /** 21970 * 21971 * @return {double[]} 21972 */ 21973 getCoefficients() { 21974 return _SnubDodecField.getFieldCoefficients(); 21975 } 21976 constructor(factory) { 21977 super(_SnubDodecField.FIELD_NAME, 6, factory); 21978 } 21979 static PHI_VALUE_$LI$() { 21980 if (_SnubDodecField.PHI_VALUE == null) { 21981 _SnubDodecField.PHI_VALUE = (1 + Math.sqrt(5)) / 2; 21982 } 21983 return _SnubDodecField.PHI_VALUE; 21984 } 21985 static { 21986 this.XI_VALUE = 1.7155614996973678; 21987 } 21988 static { 21989 this.A = 0; 21990 } 21991 static { 21992 this.B = 1; 21993 } 21994 static { 21995 this.C = 2; 21996 } 21997 static { 21998 this.D = 3; 21999 } 22000 static { 22001 this.E = 4; 22002 } 22003 static { 22004 this.F = 5; 22005 } 22006 /** 22007 * 22008 * @param {BigRational[]} a 22009 * @param {BigRational[]} b 22010 * @return {BigRational[]} 22011 */ 22012 multiply(a, b) { 22013 const result = ((s) => { 22014 let a2 = []; 22015 while (s-- > 0) a2.push(null); 22016 return a2; 22017 })(this.getOrder()); 22018 let factor = a[_SnubDodecField.A].times(b[_SnubDodecField.A]); 22019 factor = factor.plus(a[_SnubDodecField.B].times(b[_SnubDodecField.B])); 22020 factor = factor.plus(a[_SnubDodecField.F].times(b[_SnubDodecField.C])); 22021 factor = factor.plus(a[_SnubDodecField.E].times(b[_SnubDodecField.D])); 22022 factor = factor.plus(a[_SnubDodecField.F].times(b[_SnubDodecField.D])); 22023 factor = factor.plus(a[_SnubDodecField.D].times(b[_SnubDodecField.E])); 22024 factor = factor.plus(a[_SnubDodecField.C].times(b[_SnubDodecField.F])); 22025 factor = factor.plus(a[_SnubDodecField.D].times(b[_SnubDodecField.F])); 22026 result[_SnubDodecField.A] = factor; 22027 factor = a[_SnubDodecField.B].times(b[_SnubDodecField.A]); 22028 factor = factor.plus(a[_SnubDodecField.A].times(b[_SnubDodecField.B])); 22029 factor = factor.plus(a[_SnubDodecField.B].times(b[_SnubDodecField.B])); 22030 factor = factor.plus(a[_SnubDodecField.E].times(b[_SnubDodecField.C])); 22031 factor = factor.plus(a[_SnubDodecField.F].times(b[_SnubDodecField.C])); 22032 factor = factor.plus(a[_SnubDodecField.E].times(b[_SnubDodecField.D])); 22033 factor = factor.plus(a[_SnubDodecField.F].times(b[_SnubDodecField.D])); 22034 factor = factor.plus(a[_SnubDodecField.F].times(b[_SnubDodecField.D])); 22035 factor = factor.plus(a[_SnubDodecField.C].times(b[_SnubDodecField.E])); 22036 factor = factor.plus(a[_SnubDodecField.D].times(b[_SnubDodecField.E])); 22037 factor = factor.plus(a[_SnubDodecField.C].times(b[_SnubDodecField.F])); 22038 factor = factor.plus(a[_SnubDodecField.D].times(b[_SnubDodecField.F])); 22039 factor = factor.plus(a[_SnubDodecField.D].times(b[_SnubDodecField.F])); 22040 result[_SnubDodecField.B] = factor; 22041 factor = a[_SnubDodecField.C].times(b[_SnubDodecField.A]); 22042 factor = factor.plus(a[_SnubDodecField.D].times(b[_SnubDodecField.B])); 22043 factor = factor.plus(a[_SnubDodecField.A].times(b[_SnubDodecField.C])); 22044 factor = factor.plus(a[_SnubDodecField.E].times(b[_SnubDodecField.C])); 22045 factor = factor.plus(a[_SnubDodecField.E].times(b[_SnubDodecField.C])); 22046 factor = factor.plus(a[_SnubDodecField.B].times(b[_SnubDodecField.D])); 22047 factor = factor.plus(a[_SnubDodecField.F].times(b[_SnubDodecField.D])); 22048 factor = factor.plus(a[_SnubDodecField.F].times(b[_SnubDodecField.D])); 22049 factor = factor.plus(a[_SnubDodecField.C].times(b[_SnubDodecField.E])); 22050 factor = factor.plus(a[_SnubDodecField.C].times(b[_SnubDodecField.E])); 22051 factor = factor.plus(a[_SnubDodecField.F].times(b[_SnubDodecField.E])); 22052 factor = factor.plus(a[_SnubDodecField.D].times(b[_SnubDodecField.F])); 22053 factor = factor.plus(a[_SnubDodecField.D].times(b[_SnubDodecField.F])); 22054 factor = factor.plus(a[_SnubDodecField.E].times(b[_SnubDodecField.F])); 22055 factor = factor.plus(a[_SnubDodecField.F].times(b[_SnubDodecField.F])); 22056 result[_SnubDodecField.C] = factor; 22057 factor = a[_SnubDodecField.D].times(b[_SnubDodecField.A]); 22058 factor = factor.plus(a[_SnubDodecField.C].times(b[_SnubDodecField.B])); 22059 factor = factor.plus(a[_SnubDodecField.D].times(b[_SnubDodecField.B])); 22060 factor = factor.plus(a[_SnubDodecField.B].times(b[_SnubDodecField.C])); 22061 factor = factor.plus(a[_SnubDodecField.F].times(b[_SnubDodecField.C])); 22062 factor = factor.plus(a[_SnubDodecField.F].times(b[_SnubDodecField.C])); 22063 factor = factor.plus(a[_SnubDodecField.A].times(b[_SnubDodecField.D])); 22064 factor = factor.plus(a[_SnubDodecField.B].times(b[_SnubDodecField.D])); 22065 factor = factor.plus(a[_SnubDodecField.E].times(b[_SnubDodecField.D])); 22066 factor = factor.plus(a[_SnubDodecField.E].times(b[_SnubDodecField.D])); 22067 factor = factor.plus(a[_SnubDodecField.F].times(b[_SnubDodecField.D])); 22068 factor = factor.plus(a[_SnubDodecField.F].times(b[_SnubDodecField.D])); 22069 factor = factor.plus(a[_SnubDodecField.D].times(b[_SnubDodecField.E])); 22070 factor = factor.plus(a[_SnubDodecField.D].times(b[_SnubDodecField.E])); 22071 factor = factor.plus(a[_SnubDodecField.E].times(b[_SnubDodecField.E])); 22072 factor = factor.plus(a[_SnubDodecField.F].times(b[_SnubDodecField.E])); 22073 factor = factor.plus(a[_SnubDodecField.C].times(b[_SnubDodecField.F])); 22074 factor = factor.plus(a[_SnubDodecField.C].times(b[_SnubDodecField.F])); 22075 factor = factor.plus(a[_SnubDodecField.D].times(b[_SnubDodecField.F])); 22076 factor = factor.plus(a[_SnubDodecField.D].times(b[_SnubDodecField.F])); 22077 factor = factor.plus(a[_SnubDodecField.E].times(b[_SnubDodecField.F])); 22078 factor = factor.plus(a[_SnubDodecField.F].times(b[_SnubDodecField.F])); 22079 factor = factor.plus(a[_SnubDodecField.F].times(b[_SnubDodecField.F])); 22080 result[_SnubDodecField.D] = factor; 22081 factor = a[_SnubDodecField.E].times(b[_SnubDodecField.A]); 22082 factor = factor.plus(a[_SnubDodecField.F].times(b[_SnubDodecField.B])); 22083 factor = factor.plus(a[_SnubDodecField.C].times(b[_SnubDodecField.C])); 22084 factor = factor.plus(a[_SnubDodecField.D].times(b[_SnubDodecField.D])); 22085 factor = factor.plus(a[_SnubDodecField.A].times(b[_SnubDodecField.E])); 22086 factor = factor.plus(a[_SnubDodecField.E].times(b[_SnubDodecField.E])); 22087 factor = factor.plus(a[_SnubDodecField.E].times(b[_SnubDodecField.E])); 22088 factor = factor.plus(a[_SnubDodecField.B].times(b[_SnubDodecField.F])); 22089 factor = factor.plus(a[_SnubDodecField.F].times(b[_SnubDodecField.F])); 22090 factor = factor.plus(a[_SnubDodecField.F].times(b[_SnubDodecField.F])); 22091 result[_SnubDodecField.E] = factor; 22092 factor = a[_SnubDodecField.F].times(b[_SnubDodecField.A]); 22093 factor = factor.plus(a[_SnubDodecField.E].times(b[_SnubDodecField.B])); 22094 factor = factor.plus(a[_SnubDodecField.F].times(b[_SnubDodecField.B])); 22095 factor = factor.plus(a[_SnubDodecField.D].times(b[_SnubDodecField.C])); 22096 factor = factor.plus(a[_SnubDodecField.C].times(b[_SnubDodecField.D])); 22097 factor = factor.plus(a[_SnubDodecField.D].times(b[_SnubDodecField.D])); 22098 factor = factor.plus(a[_SnubDodecField.B].times(b[_SnubDodecField.E])); 22099 factor = factor.plus(a[_SnubDodecField.F].times(b[_SnubDodecField.E])); 22100 factor = factor.plus(a[_SnubDodecField.F].times(b[_SnubDodecField.E])); 22101 factor = factor.plus(a[_SnubDodecField.A].times(b[_SnubDodecField.F])); 22102 factor = factor.plus(a[_SnubDodecField.B].times(b[_SnubDodecField.F])); 22103 factor = factor.plus(a[_SnubDodecField.E].times(b[_SnubDodecField.F])); 22104 factor = factor.plus(a[_SnubDodecField.E].times(b[_SnubDodecField.F])); 22105 factor = factor.plus(a[_SnubDodecField.F].times(b[_SnubDodecField.F])); 22106 factor = factor.plus(a[_SnubDodecField.F].times(b[_SnubDodecField.F])); 22107 result[_SnubDodecField.F] = factor; 22108 return result; 22109 } 22110 /** 22111 * 22112 * @return {number} 22113 */ 22114 getNumMultipliers() { 22115 return 2; 22116 } 22117 /** 22118 * 22119 * @return {*} 22120 */ 22121 getGoldenRatio() { 22122 return this.getUnitTerm(1); 22123 } 22124 static IRRATIONAL_LABELS_$LI$() { 22125 if (_SnubDodecField.IRRATIONAL_LABELS == null) { 22126 _SnubDodecField.IRRATIONAL_LABELS = [[" ", " "], ["\u03C6", "phi"], ["\u03BE", "xi"], ["\u03C6\u03BE", "phi*xi"], ["\u03BE\xB2", "xi^2"], ["\u03C6\u03BE\xB2", "phi*xi^2"]]; 22127 } 22128 return _SnubDodecField.IRRATIONAL_LABELS; 22129 } 22130 getIrrational$int$int(i, format) { 22131 return _SnubDodecField.IRRATIONAL_LABELS_$LI$()[i][format]; 22132 } 22133 /** 22134 * 22135 * @param {number} i 22136 * @param {number} format 22137 * @return {string} 22138 */ 22139 getIrrational(i, format) {
22140 if ((typeof i === "number" || i === null) && (typeof format === "number" || format === null)) { 22141 return this.getIrrational$int$int(i, format); 22142 } else if ((typeof i === "number" || i === null) && format === void 0) { 22143 return this.getIrrational$int(i); 22144 } else throw new Error("invalid overload"); 22145 } 22146 /** 22147 * 22148 * @param {BigRational[]} factors 22149 * @return {number} 22150 */ 22151 evaluateNumber(factors) { 22152 let result = 0; 22153 result += factors[_SnubDodecField.A].evaluate(); 22154 result += _SnubDodecField.PHI_VALUE_$LI$() * factors[_SnubDodecField.B].evaluate(); 22155 result += _SnubDodecField.XI_VALUE * factors[_SnubDodecField.C].evaluate(); 22156 result += _SnubDodecField.PHI_VALUE_$LI$() * _SnubDodecField.XI_VALUE * factors[_SnubDodecField.D].evaluate(); 22157 result += _SnubDodecField.XI_VALUE * _SnubDodecField.XI_VALUE * factors[_SnubDodecField.E].evaluate(); 22158 result += _SnubDodecField.XI_VALUE * _SnubDodecField.XI_VALUE * _SnubDodecField.PHI_VALUE_$LI$() * factors[_SnubDodecField.F].evaluate(); 22159 return result; 22160 } 22161 /** 22162 * 22163 * @param {BigRational[]} factors 22164 * @param {number} whichIrrational 22165 * @return {BigRational[]} 22166 */ 22167 scaleBy(factors, whichIrrational) { 22168 switch (whichIrrational) { 22169 case 0: 22170 return factors; 22171 case 1: 22172 return [factors[_SnubDodecField.B], factors[_SnubDodecField.A].plus(factors[_SnubDodecField.B]), factors[_SnubDodecField.D], factors[_SnubDodecField.C].plus(factors[_SnubDodecField.D]), factors[_SnubDodecField.F], factors[_SnubDodecField.E].plus(factors[_SnubDodecField.F])]; 22173 case 2: 22174 return [factors[_SnubDodecField.F], factors[_SnubDodecField.E].plus(factors[_SnubDodecField.F]), factors[_SnubDodecField.A].plus(factors[_SnubDodecField.E]).plus(factors[_SnubDodecField.E]), factors[_SnubDodecField.B].plus(factors[_SnubDodecField.F]).plus(factors[_SnubDodecField.F]), factors[_SnubDodecField.C], factors[_SnubDodecField.D]]; 22175 case 3: 22176 return this.scaleBy(this.scaleBy(factors, _SnubDodecField.B), _SnubDodecField.C); 22177 case 4: 22178 return this.scaleBy(this.scaleBy(factors, _SnubDodecField.C), _SnubDodecField.C); 22179 case 5: 22180 return this.scaleBy(this.scaleBy(factors, _SnubDodecField.D), _SnubDodecField.C); 22181 default: 22182 throw new java.lang.IllegalArgumentException(whichIrrational + " is not a valid irrational in this field"); 22183 } 22184 } 22185}; 22186SnubDodecField["__class"] = "com.vzome.core.algebra.SnubDodecField"; 22187SnubDodecField["__interfaces"] = ["com.vzome.core.algebra.AlgebraicField"]; 22188
22189// src/worker/legacy/from-java/com/vzome/core/kinds/SnubDodecFieldApplication.ts 22190var SnubDodecFieldApplication = class _SnubDodecFieldApplication extends DefaultFieldApplication { 22191 constructor(field5) { 22192 super(field5); 22193 if (this.icosahedralPerspective === void 0) { 22194 this.icosahedralPerspective = null; 22195 } 22196 this.h4Builder = null; 22197 this.cmdTauDivide = new CommandTauDivision(); 22198 const icosaSymm = new _SnubDodecFieldApplication.SnubDodecFieldApplication$0(this, field5); 22199 this.icosahedralPerspective = new IcosahedralSymmetryPerspective(icosaSymm); 22200 } 22201 /** 22202 * 22203 * @return {string} 22204 */ 22205 getName() { 22206 return this.getField().getName(); 22207 } 22208 /** 22209 * 22210 * @return {string} 22211 */ 22212 getLabel() { 22213 return "Snub Dodecahedron"; 22214 } 22215 /** 22216 * 22217 * @return {*} 22218 */ 22219 getSymmetryPerspectives() { 22220 return java.util.Arrays.asList(this.icosahedralPerspective, super.getDefaultSymmetryPerspective()); 22221 } 22222 /** 22223 * 22224 * @return {*} 22225 */ 22226 getDefaultSymmetryPerspective() { 22227 return this.icosahedralPerspective; 22228 } 22229 /** 22230 * 22231 * @param {string} symmName 22232 * @return {*} 22233 */ 22234 getSymmetryPerspective(symmName) { 22235 switch (symmName) { 22236 case "icosahedral": 22237 return this.icosahedralPerspective; 22238 default: 22239 return super.getSymmetryPerspective(symmName); 22240 } 22241 } 22242 /** 22243 * 22244 * @param {string} name 22245 * @return {QuaternionicSymmetry} 22246 */ 22247 getQuaternionSymmetry(name) { 22248 return this.icosahedralPerspective.getQuaternionSymmetry(name); 22249 } 22250 /** 22251 * 22252 * @param {*} toolFactories 22253 * @param {ToolsModel} tools 22254 */ 22255 registerToolFactories(toolFactories, tools) { 22256 super.registerToolFactories(toolFactories, tools); 22257 const symm = this.icosahedralPerspective.getSymmetry(); 22258 toolFactories.put("AxialStretchTool", new AxialStretchTool.Factory(tools, symm, false, false, false)); 22259 toolFactories.put("SymmetryTool", new IcosahedralToolFactory(tools, symm)); 22260 } 22261 /** 22262 * 22263 * @param {string} groupName 22264 * @param {number} index 22265 * @param {number} edgesToRender 22266 * @param {AlgebraicNumber[]} edgeScales 22267 * @param {*} listener 22268 */ 22269 constructPolytope(groupName, index, edgesToRender, edgeScales, listener) { 22270 switch (groupName) { 22271 case "H4": 22272 if (this.h4Builder == null) { 22273 const qsymm = new QuaternionicSymmetry("H_4", "com/vzome/core/math/symmetry/H4roots.vef", this.getField()); 22274 this.h4Builder = new CommandUniformH4Polytope(this.getField(), qsymm, 0); 22275 } 22276 this.h4Builder.generate(index, edgesToRender, edgeScales, listener); 22277 break; 22278 default: 22279 super.constructPolytope(groupName, index, edgesToRender, edgeScales, listener); 22280 break; 22281 } 22282 } 22283 /** 22284 * 22285 * @param {string} action 22286 * @return {*} 22287 */ 22288 getLegacyCommand(action) { 22289 switch (action) { 22290 case "tauDivide": 22291 return this.cmdTauDivide; 22292 default: 22293 return super.getLegacyCommand(action); 22294 } 22295 } 22296}; 22297SnubDodecFieldApplication["__class"] = "com.vzome.core.kinds.SnubDodecFieldApplication"; 22298SnubDodecFieldApplication["__interfaces"] = ["com.vzome.core.math.symmetry.Symmetries4D", "com.vzome.core.editor.FieldApplication"]; 22299((SnubDodecFieldApplication2) => { 22300 class SnubDodecFieldApplication$0 extends IcosahedralSymmetry { 22301 /** 22302 * 22303 */ 22304 createOtherOrbits() { 22305 super.createOtherOrbits(); 22306 const vSnubPentagon = this.mField.createIntegerVector([[4, -4, 0, 0, -2, 2], [-4, 0, 0, 0, 2, 0], [0, 0, 0, 0, 0, 2]]); 22307 const vSnubTriangle = this.mField.createIntegerVector([[0, -4, -2, 0, 0, 2], [-4, 4, 0, -2, 2, -2], [-4, 0, -2, -2, 2, 0]]); 22308 const vSnubDiagonal = this.mField.createIntegerVector([[8, 0, 0, 4, -4, 0], [0, -4, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0]]); 22309 const vSnubFaceNorm = this.mField.createIntegerVector([[-1, 0, 1, -1, 1, 0], [1, 0, 0, 0, 0, 0], [1, 0, -1, 2, 0, 1]]); 22310 const vSnubVertex = this.mField.createIntegerVector([[1, 0, 0, 0, 0, 0], [1, 0, -1, 1, -1, 0], [1, 0, 0, 1, -1, 1]]); 22311 const scale = this.mField["createPower$int"](-3); 22312 let scaleFaceNorm; 22313 let scaleVertex = this.mField.one(); 22314 scaleFaceNorm = this.mField["createAlgebraicNumber$int_A"]([-3, 2, 2, -1, 5, -3]).reciprocal(); 22315 scaleVertex = this.mField["createAlgebraicNumber$int_A$int"]([-3, 2, 7, -4, 2, -1], 3).reciprocal(); 22316 this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber("snubPentagon", 0, Symmetry.NO_ROTATION, vSnubPentagon, false, false, scale).withCorrection(); 22317 this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber("snubTriangle", 0, Symmetry.NO_ROTATION, vSnubTriangle, false, false, scale).withCorrection(); 22318 this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber("snubDiagonal", 0, Symmetry.NO_ROTATION, vSnubDiagonal, false, false, scale).withCorrection(); 22319 this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber("snubFaceNormal", 0, Symmetry.NO_ROTATION, vSnubFaceNorm, false, false, scale["times$com_vzome_core_algebra_AlgebraicNumber"](scaleFaceNorm)).withCorrection(); 22320 this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber("snubVertex", 0, Symmetry.NO_ROTATION, vSnubVertex, true, false, scale["times$com_vzome_core_algebra_AlgebraicNumber"](scaleVertex)).withCorrection(); 22321 } 22322 constructor(__parent, __arg0) { 22323 super(__arg0); 22324 this.__parent = __parent; 22325 } 22326 } 22327 SnubDodecFieldApplication2.SnubDodecFieldApplication$0 = SnubDodecFieldApplication$0; 22328 SnubDodecFieldApplication$0["__interfaces"] = ["com.vzome.core.math.symmetry.Symmetry", "com.vzome.core.math.symmetry.Embedding"]; 22329})(SnubDodecFieldApplication || (SnubDodecFieldApplication = {})); 22330
22331// src/worker/legacy/from-java/com/vzome/fields/sqrtphi/SqrtPhiField.ts 22332var SqrtPhiField = class _SqrtPhiField extends ParameterizedField { 22333 static { 22334 this.FIELD_NAME = "sqrtPhi"; 22335 } 22336 static PHI_VALUE_$LI$() { 22337 if (_SqrtPhiField.PHI_VALUE == null) { 22338 _SqrtPhiField.PHI_VALUE = (1 + Math.sqrt(5)) / 2; 22339 } 22340 return _SqrtPhiField.PHI_VALUE; 22341 } 22342 static SQRT_PHI_VALUE_$LI$() { 22343 if (_SqrtPhiField.SQRT_PHI_VALUE == null) { 22344 _SqrtPhiField.SQRT_PHI_VALUE = Math.sqrt(_SqrtPhiField.PHI_VALUE_$LI$()); 22345 } 22346 return _SqrtPhiField.SQRT_PHI_VALUE; 22347 } 22348 /** 22349 * 22350 * @return {double[]} the coefficients of a SqrtPhiField. 22351 * This can be used to determine when two fields have compatible coefficients 22352 * without having to generate an instance of the class. 22353 */ 22354 static getFieldCoefficients() { 22355 return [1, _SqrtPhiField.SQRT_PHI_VALUE_$LI$(), _SqrtPhiField.PHI_VALUE_$LI$(), _SqrtPhiField.PHI_VALUE_$LI$() * _SqrtPhiField.SQRT_PHI_VALUE_$LI$()]; 22356 } 22357 /** 22358 * 22359 * @return {number} 22360 */ 22361 getNumMultipliers() { 22362 return 1; 22363 } 22364 /** 22365 * 22366 * @return {double[]} 22367 */ 22368 getCoefficients() { 22369 return _SqrtPhiField.getFieldCoefficients(); 22370 } 22371 constructor(factory) { 22372 super(_SqrtPhiField.FIELD_NAME, 4, factory); 22373 this.initialize(); 22374 } 22375 /** 22376 * 22377 */ 22378 initializeCoefficients() { 22379 const temp = this.getCoefficients(); 22380 let i = 0; 22381 for (let index = 0; index < temp.length; index++) { 22382 let coefficient = temp[index]; 22383 { 22384 this.coefficients[i++] = coefficient; 22385 } 22386 } 22387 } 22388 /** 22389 * 22390 */ 22391 initializeMultiplicationTensor() { 22392 const tensor = [[[1, 0, 0, 0], [0, 0, 0, 1], [0, 0, 1, 0], [0, 1, 0, 1]], [[0, 1, 0, 0], [1, 0, 0, 0], [0, 0, 0, 1], [0, 0, 1, 0]], [[0, 0, 1, 0], [0, 1, 0, 1], [1, 0, 1, 0], [0, 1, 0, 2]], [[0, 0, 0, 1], [0, 0, 1, 0], [0, 1, 0, 1], [1, 0, 1, 0]]]; 22393 this.multiplicationTensor = tensor; 22394 } 22395 /** 22396 * 22397 */ 22398 initializeLabels() { 22399 this.irrationalLabels[1] = ["\u221A\u03C6", "sqrt(phi)"]; 22400 this.irrationalLabels[2] = ["\u03C6", "phi"]; 22401 this.irrationalLabels[3] = ["\u03C6\u221A\u03C6", "phi*sqrt(phi)"]; 22402 } 22403 /** 22404 * 22405 * @param {long[]} pairs 22406 * @return {long[]} 22407 */ 22408 convertGoldenNumberPairs(pairs) { 22409 return pairs.length === 4 ? [pairs[0], pairs[1], 0, 1, pairs[2], pairs[3], 0, 1] : pairs; 22410 } 22411 /** 22412 * 22413 * @return {*} 22414 */ 22415 getGoldenRatio() { 22416 return this.getUnitTerm(2); 22417 } 22418}; 22419SqrtPhiField["__class"] = "com.vzome.fields.sqrtphi.SqrtPhiField"; 22420SqrtPhiField["__interfaces"] = ["com.vzome.core.algebra.AlgebraicField"]; 22421
22422// src/worker/legacy/from-java/com/vzome/fields/sqrtphi/PentagonalAntiprismSymmetry.ts 22423var PentagonalAntiprismSymmetry = class _PentagonalAntiprismSymmetry extends AbstractSymmetry { 22424 static FIVEFOLD_AXIS_$LI$() { 22425 if (_PentagonalAntiprismSymmetry.FIVEFOLD_AXIS == null) { 22426 _PentagonalAntiprismSymmetry.FIVEFOLD_AXIS = [[-3, 1, 0, 1, -5, 1, 0, 1], [3, 1, 0, 1, 5, 1, 0, 1], [0, 1, 1, 1, 0, 1, 2, 1]]; 22427 } 22428 return _PentagonalAntiprismSymmetry.FIVEFOLD_AXIS; 22429 } 22430 static TWOFOLD_AXIS_$LI$() { 22431 if (_PentagonalAntiprismSymmetry.TWOFOLD_AXIS == null) { 22432 _PentagonalAntiprismSymmetry.TWOFOLD_AXIS = [[0, 1], [2, 1, 0, 1, 3, 1, 0, 1], [0, 1, -3, 1, 0, 1, -5, 1]]; 22433 } 22434 return _PentagonalAntiprismSymmetry.TWOFOLD_AXIS; 22435 } 22436 static NEXT_TWOFOLD_AXIS_$LI$() { 22437 if (_PentagonalAntiprismSymmetry.NEXT_TWOFOLD_AXIS == null) { 22438 _PentagonalAntiprismSymmetry.NEXT_TWOFOLD_AXIS = [[2, 1, 0, 1, 3, 1, 0, 1], [3, 1, 0, 1, 5, 1, 0, 1], [0, 1, -2, 1, 0, 1, -3, 1]]; 22439 } 22440 return _PentagonalAntiprismSymmetry.NEXT_TWOFOLD_AXIS; 22441 } 22442 static FIVEFOLD_ROTATION_$LI$() { 22443 if (_PentagonalAntiprismSymmetry.FIVEFOLD_ROTATION == null) { 22444 _PentagonalAntiprismSymmetry.FIVEFOLD_ROTATION = [[[-1, 1, 0, 1, 1, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 1, 1, 0, 1, -1, 1]], [[1, 1, 0, 1, -1, 1, 0, 1], [-1, 1, 0, 1, 1, 1, 0, 1], [0, 1, -2, 1, 0, 1, 1, 1]], [[0, 1, 2, 1, 0, 1, -1, 1], [0, 1, -1, 1, 0, 1, 1, 1], [2, 1, 0, 1, -1, 1, 0, 1]]]; 22445 } 22446 return _PentagonalAntiprismSymmetry.FIVEFOLD_ROTATION; 22447 } 22448 static TWOFOLD_ROTATION_$LI$() { 22449 if (_PentagonalAntiprismSymmetry.TWOFOLD_ROTATION == null) { 22450 _PentagonalAntiprismSymmetry.TWOFOLD_ROTATION = [[[-1, 1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 0, 1, 0, 1, 0, 1]], [[0, 1, 0, 1, 0, 1, 0, 1], [1, 1, 0, 1, -1, 1, 0, 1], [0, 1, 1, 1, 0, 1, -1, 1]], [[0, 1, 0, 1, 0, 1, 0, 1], [0, 1, 1, 1, 0, 1, -1, 1], [-1, 1, 0, 1, 1, 1, 0, 1]]]; 22451 } 22452 return _PentagonalAntiprismSymmetry.TWOFOLD_ROTATION; 22453 } 22454 static PRINCIPAL_REFLECTION_$LI$() { 22455 if (_PentagonalAntiprismSymmetry.PRINCIPAL_REFLECTION == null) { 22456 _PentagonalAntiprismSymmetry.PRINCIPAL_REFLECTION = [[[7, 5, 0, 1, -4, 5, 0, 1], [-2, 5, 0, 1, 4, 5, 0, 1], [0, 1, -8, 5, 0, 1, 6, 5]], [[-2, 5, 0, 1, 4, 5, 0, 1], [7, 5, 0, 1, -4, 5, 0, 1], [0, 1, 8, 5, 0, 1, -6, 5]], [[0, 1, -8, 5, 0, 1, 6, 5], [0, 1, 8, 5, 0, 1, -6, 5], [-9, 5, 0, 1, 8, 5, 0, 1]]]; 22457 } 22458 return _PentagonalAntiprismSymmetry.PRINCIPAL_REFLECTION; 22459 } 22460 constructor(field5, frameColor) { 22461 super(10, field5, frameColor, field5.createMatrix(_PentagonalAntiprismSymmetry.PRINCIPAL_REFLECTION_$LI$())); 22462 if (this.preferredAxis === void 0) { 22463 this.preferredAxis = null; 22464 } 22465 } 22466 /** 22467 * Called by the super constructor. 22468 */ 22469 createInitialPermutations() { 22470 this.mOrientations[0] = new Permutation(this, null); 22471 let map = [1, 2, 3, 4, 0, 6, 7, 8, 9, 5]; 22472 this.mOrientations[1] = new Permutation(this, map); 22473 map = [5, 9, 8, 7, 6, 0, 4, 3, 2, 1]; 22474 this.mOrientations[5] = new Permutation(this, map); 22475 } 22476 /** 22477 * 22478 * @param {string} frameColor 22479 */ 22480 createFrameOrbit(frameColor) { 22481 this.mMatrices[0] = this.mField.identityMatrix(3); 22482 this.mMatrices[1] = this.mField.createMatrix(_PentagonalAntiprismSymmetry.FIVEFOLD_ROTATION_$LI$()); 22483 this.mMatrices[2] = this.mMatrices[1].times(this.mMatrices[1]); 22484 this.mMatrices[3] = this.mMatrices[1].times(this.mMatrices[2]); 22485 this.mMatrices[4] = this.mMatrices[1].times(this.mMatrices[3]); 22486 this.mMatrices[5] = this.mField.createMatrix(_PentagonalAntiprismSymmetry.TWOFOLD_ROTATION_$LI$()); 22487 this.mMatrices[6] = this.mMatrices[1].times(this.mMatrices[5]); 22488 this.mMatrices[7] = this.mMatrices[2].times(this.mMatrices[5]); 22489 this.mMatrices[8] = this.mMatrices[3].times(this.mMatrices[5]); 22490 this.mMatrices[9] = this.mMatrices[4].times(this.mMatrices[5]); 22491 } 22492 /** 22493 * 22494 */ 22495 createOtherOrbits() { 22496 } 22497 /** 22498 * 22499 * @return {AlgebraicVector[]} 22500 */ 22501 getOrbitTriangle() { 22502 const redVertex = this.mField.createVector(_PentagonalAntiprismSymmetry.FIVEFOLD_AXIS_$LI$()); 22503 const greenVertex = this.mField.createVector(_PentagonalAntiprismSymmetry.TWOFOLD_AXIS_$LI$()); 22504 const orthoVertex = this.mField.createVector(_PentagonalAntiprismSymmetry.NEXT_TWOFOLD_AXIS_$LI$()); 22505 return [greenVertex, redVertex, orthoVertex]; 22506 } 22507 createStandardOrbits(frameColor) { 22508 const redVertex = this.mField.createVector(_PentagonalAntiprismSymmetry.FIVEFOLD_AXIS_$LI$()); 22509 const greenVertex = this.mField.createVector(_PentagonalAntiprismSymmetry.TWOFOLD_AXIS_$LI$()); 22510 let unitLength = this.mField["createPower$int"](-6); 22511 const redOrbit = this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber("red", 0, 1, redVertex, true, false, unitLength); 22512 this.preferredAxis = redOrbit.getAxis$int$int(Symmetry.PLUS, 0); 22513 this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber("green", 0, 5, greenVertex, true, false, unitLength); 22514 unitLength = this.mField["createPower$int"](6); 22515 this.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber("blue", 0, -1, this.mField.basisVector(3, AlgebraicVector.X), true, false, unitLength); 22516 return this; 22517 } 22518 /** 22519 * 22520 * @return {Axis} 22521 */ 22522 getPreferredAxis() { 22523 return this.preferredAxis; 22524 } 22525 /** 22526 * 22527 * @return {string} 22528 */ 22529 getName() { 22530 return "pentagonal"; 22531 } 22532 /** 22533 * 22534 * @param {string} name 22535 * @return {int[]} 22536 */ 22537 subgroup(name) { 22538 return null; 22539 } 22540 /** 22541 * 22542 * @param {SpecialOrbit} which 22543 * @return {Direction} 22544 */ 22545 getSpecialOrbit(which) { 22546 switch (which) { 22547 case 0 /* BLUE */: 22548 return this.getDirection("blue"); 22549 case 1 /* RED */: 22550 return this.getDirection("red"); 22551 case 2 /* YELLOW */: 22552 return this.getDirection("green"); 22553 default: 22554 return null; 22555 } 22556 } 22557}; 22558PentagonalAntiprismSymmetry["__class"] = "com.vzome.fields.sqrtphi.PentagonalAntiprismSymmetry"; 22559PentagonalAntiprismSymmetry["__interfaces"] = ["com.vzome.core.math.symmetry.Symmetry", "com.vzome.core.math.symmetry.Embedding"]; 22560
22561// src/worker/legacy/from-java/com/vzome/fields/sqrtphi/SqrtPhiFieldApplication.ts 22562var SqrtPhiFieldApplication = class _SqrtPhiFieldApplication extends DefaultFieldApplication { 22563 constructor(field5) { 22564 super(field5); 22565 this.icosahedralPerspective = new _SqrtPhiFieldApplication.SqrtPhiFieldApplication$0(this, new IcosahedralSymmetry(this.getField())); 22566 this.pentagonalPerspective = new _SqrtPhiFieldApplication.SqrtPhiFieldApplication$1(this, new PentagonalAntiprismSymmetry(this.getField(), null)); 22567 this.H4 = new QuaternionicSymmetry("H_4", "com/vzome/core/math/symmetry/H4roots.vef", this.getField()); 22568 this.h4Builder = null; 22569 const octahedralPerspective = super.getDefaultSymmetryPerspective(); 22570 const symm = octahedralPerspective.getSymmetry(); 22571 const scale = field5["createPower$int"](6); 22572 symm.getDirection("blue").setUnitLength(scale); 22573 symm.getDirection("green").setUnitLength(scale); 22574 symm.getDirection("yellow").setUnitLength(scale); 22575 let x = field5["createAlgebraicNumber$int_A"]([0, -1, 0, 0]); 22576 let y = field5["createAlgebraicNumber$int_A"]([-1, 0, 0, 0]); 22577 let z = field5.zero(); 22578 const unitLength = field5["createPower$int"](4); 22579 let norm = new AlgebraicVector(x, y, z); 22580 symm.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber("slate", 0, Symmetry.NO_ROTATION, norm, true, false, unitLength); 22581 x = field5["createAlgebraicNumber$int_A"]([0, 1, 0, -1]); 22582 y = field5.one(); 22583 z = field5.one(); 22584 norm = new AlgebraicVector(x, y, z); 22585 symm.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber("mauve", 0, Symmetry.NO_ROTATION, norm, true, false, unitLength); 22586 x = field5["createAlgebraicNumber$int_A"]([1, 0, -1, 0]); 22587 y = field5["createAlgebraicNumber$int_A"]([0, -1, 0, 0]); 22588 z = field5["createAlgebraicNumber$int_A"]([0, -1, 0, 1]); 22589 norm = new AlgebraicVector(x, y, z); 22590 symm.createZoneOrbit$java_lang_String$int$int$com_vzome_core_algebra_AlgebraicVector$boolean$boolean$com_vzome_core_algebra_AlgebraicNumber("ivory", 0, Symmetry.NO_ROTATION, norm, true, false, unitLength); 22591 const defaultShapes = new OctahedralShapes("octahedral", "octahedra", symm); 22592 octahedralPerspective.setDefaultGeometry(defaultShapes); 22593 } 22594 /** 22595 * 22596 * @return {string} 22597 */ 22598 getLabel() { 22599 return "\u221A\u03C6"; 22600 } 22601 /** 22602 * 22603 * @return {*} 22604 */ 22605 getSymmetryPerspectives() { 22606 return java.util.Arrays.asList(this.pentagonalPerspective, super.getDefaultSymmetryPerspective(), this.icosahedralPerspective); 22607 } 22608 /** 22609 * 22610 * @return {*} 22611 */ 22612 getDefaultSymmetryPerspective() { 22613 return this.pentagonalPerspective; 22614 } 22615 /** 22616 * 22617 * @param {string} symmName 22618 * @return {*} 22619 */ 22620 getSymmetryPerspective(symmName) { 22621 switch (symmName) { 22622 case "pentagonal": 22623 return this.pentagonalPerspective; 22624 case "icosahedral": 22625 return this.icosahedralPerspective; 22626 default: 22627 return super.getSymmetryPerspective(symmName); 22628 } 22629 } 22630 /** 22631 * 22632 * @param {string} name 22633 * @return {QuaternionicSymmetry} 22634 */ 22635 getQuaternionSymmetry(name) { 22636 switch (name) { 22637 case "H_4": 22638 return this.H4; 22639 default: 22640 return null; 22641 } 22642 } 22643 /** 22644 * 22645 * @param {string} groupName 22646 * @param {number} index 22647 * @param {number} edgesToRender 22648 * @param {AlgebraicNumber[]} edgeScales 22649 * @param {*} listener 22650 */ 22651 constructPolytope(groupName, index, edgesToRender, edgeScales, listener) { 22652 switch (groupName) { 22653 case "H4": 22654 if (this.h4Builder == null) { 22655 const qsymm = new QuaternionicSymmetry("H_4", "com/vzome/core/math/symmetry/H4roots.vef", this.getField()); 22656 this.h4Builder = new CommandUniformH4Polytope(this.getField(), qsymm, 0); 22657 } 22658 this.h4Builder.generate(index, edgesToRender, edgeScales, listener); 22659 break; 22660 default: 22661 super.constructPolytope(groupName, index, edgesToRender, edgeScales, listener); 22662 break; 22663 } 22664 } 22665}; 22666SqrtPhiFieldApplication["__class"] = "com.vzome.fields.sqrtphi.SqrtPhiFieldApplication"; 22667SqrtPhiFieldApplication["__interfaces"] = ["com.vzome.core.math.symmetry.Symmetries4D", "com.vzome.core.editor.FieldApplication"]; 22668((SqrtPhiFieldApplication2) => { 22669 class SqrtPhiFieldApplication$0 extends IcosahedralSymmetryPerspective { 22670 constructor(__parent, __arg0) { 22671 super(__arg0); 22672 this.__parent = __parent; 22673 (() => {
22674 const icosaSymm = this.getSymmetry(); 22675 const tinyIcosaShapes = new ExportedVEFShapes(null, "sqrtPhi/tinyIcosahedra", "tiny icosahedra", null, icosaSymm); 22676 const icosahedralShapes = new ExportedVEFShapes(null, "sqrtPhi/zome", "solid Zome", icosaSymm, tinyIcosaShapes); 22677 this.clearShapes(); 22678 this.addShapes(icosahedralShapes); 22679 this.setDefaultGeometry(tinyIcosaShapes); 22680 })(); 22681 } 22682 } 22683 SqrtPhiFieldApplication2.SqrtPhiFieldApplication$0 = SqrtPhiFieldApplication$0; 22684 SqrtPhiFieldApplication$0["__interfaces"] = ["com.vzome.core.editor.SymmetryPerspective"]; 22685 class SqrtPhiFieldApplication$1 extends AbstractSymmetryPerspective { 22686 /** 22687 * 22688 * @return {PentagonalAntiprismSymmetry} 22689 */ 22690 getSymmetry() { 22691 return super.getSymmetry(); 22692 } 22693 /** 22694 * 22695 * @param {Tool.Kind} kind 22696 * @param {ToolsModel} tools 22697 * @return {*} 22698 */ 22699 createToolFactories(kind, tools) { 22700 const result = new java.util.ArrayList(); 22701 const pentaSymm = this.getSymmetry(); 22702 switch (kind) { 22703 case Tool2.Kind.SYMMETRY: 22704 result.add(new SymmetryToolFactory(tools, pentaSymm)); 22705 result.add(new InversionToolFactory(tools)); 22706 result.add(new LineReflectionToolFactory(tools)); 22707 result.add(new MirrorToolFactory(tools)); 22708 result.add(new AxialSymmetryToolFactory(tools, pentaSymm)); 22709 break; 22710 case Tool2.Kind.TRANSFORM: 22711 result.add(new ScalingToolFactory(tools, pentaSymm)); 22712 result.add(new RotationToolFactory(tools, pentaSymm)); 22713 result.add(new TranslationToolFactory(tools)); 22714 result.add(new ProjectionToolFactory(tools)); 22715 break; 22716 case Tool2.Kind.LINEAR_MAP: 22717 result.add(new LinearMapToolFactory(tools, pentaSymm, false)); 22718 break; 22719 default: 22720 break; 22721 } 22722 return result; 22723 } 22724 /** 22725 * 22726 * @param {Tool.Kind} kind 22727 * @param {ToolsModel} tools 22728 * @return {*} 22729 */ 22730 predefineTools(kind, tools) { 22731 const result = new java.util.ArrayList(); 22732 const pentaSymm = this.getSymmetry(); 22733 switch (kind) { 22734 case Tool2.Kind.SYMMETRY: 22735 result.add(new SymmetryToolFactory(tools, pentaSymm).createPredefinedTool("pentagonal antiprism around origin")); 22736 result.add(new AxialSymmetryToolFactory(tools, pentaSymm).createPredefinedTool("fivefold symmetry through origin")); 22737 result.add(new MirrorToolFactory(tools).createPredefinedTool("reflection through red plane")); 22738 break; 22739 case Tool2.Kind.TRANSFORM: 22740 result.add(new ScalingToolFactory(tools, pentaSymm).createPredefinedTool("scale down")); 22741 result.add(new ScalingToolFactory(tools, pentaSymm).createPredefinedTool("scale up")); 22742 result.add(new RotationToolFactory(tools, pentaSymm, false).createPredefinedTool("fivefold rotation through origin")); 22743 result.add(new RotationToolFactory(tools, pentaSymm, true).createPredefinedTool("fivefold rotation through origin")); 22744 break; 22745 default: 22746 break; 22747 } 22748 return result; 22749 } 22750 /** 22751 * 22752 * @param {string} action 22753 * @return {*} 22754 */ 22755 getLegacyCommand(action) { 22756 switch (action) { 22757 case "axialsymm": 22758 return this.axialsymm; 22759 default: 22760 return super.getLegacyCommand(action); 22761 } 22762 } 22763 /** 22764 * 22765 * @return {string} 22766 */ 22767 getModelResourcePath() { 22768 return "org/vorthmann/zome/app/pentagonal.vZome"; 22769 } 22770 constructor(__parent, __arg0) { 22771 super(__arg0); 22772 this.__parent = __parent; 22773 (() => { 22774 const pentaSymm = this.getSymmetry(); 22775 pentaSymm.createStandardOrbits("blue"); 22776 const octahedralShapes = new OctahedralShapes("octahedral", "octahedra", pentaSymm); 22777 const kostickShapes = new ExportedVEFShapes(null, "sqrtPhi/fivefold", "Kostick", pentaSymm, octahedralShapes); 22778 this.setDefaultGeometry(kostickShapes); 22779 this.addShapes(octahedralShapes); 22780 this.axialsymm = new CommandAxialSymmetry(pentaSymm); 22781 })(); 22782 if (this.axialsymm === void 0) { 22783 this.axialsymm = null; 22784 } 22785 } 22786 } 22787 SqrtPhiFieldApplication2.SqrtPhiFieldApplication$1 = SqrtPhiFieldApplication$1; 22788 SqrtPhiFieldApplication$1["__interfaces"] = ["com.vzome.core.editor.SymmetryPerspective"]; 22789})(SqrtPhiFieldApplication || (SqrtPhiFieldApplication = {})); 22790
22791// src/worker/legacy/from-java/com/vzome/core/algebra/SuperGoldenField.ts 22792var SuperGoldenField = class _SuperGoldenField extends ParameterizedField { 22793 static { 22794 this.FIELD_NAME = "superGolden"; 22795 } 22796 /** 22797 * 22798 * @return {double[]} the coefficients of a SuperGoldenField. 22799 * This can be used to determine when two fields have compatible coefficients 22800 * without having to generate an instance of the class. 22801 */ 22802 static getFieldCoefficients() { 22803 const narayanaCowNumber = 1.465571231876768; 22804 return [1, narayanaCowNumber, narayanaCowNumber * narayanaCowNumber]; 22805 } 22806 /** 22807 * 22808 * @return {number} 22809 */ 22810 getNumMultipliers() { 22811 return 1; 22812 } 22813 /** 22814 * 22815 * @return {double[]} 22816 */ 22817 getCoefficients() { 22818 return _SuperGoldenField.getFieldCoefficients(); 22819 } 22820 constructor(factory) { 22821 super(_SuperGoldenField.FIELD_NAME, 3, factory); 22822 this.initialize(); 22823 } 22824 /** 22825 * 22826 */ 22827 initializeCoefficients() { 22828 const temp = this.getCoefficients(); 22829 let i = 0; 22830 for (let index = 0; index < temp.length; index++) { 22831 let coefficient = temp[index]; 22832 { 22833 this.coefficients[i++] = coefficient; 22834 } 22835 } 22836 } 22837 /** 22838 * 22839 */ 22840 initializeMultiplicationTensor() { 22841 const mt = [[[1, 0, 0], [0, 0, 1], [0, 1, 1]], [[0, 1, 0], [1, 0, 0], [0, 0, 1]], [[0, 0, 1], [0, 1, 1], [1, 1, 1]]]; 22842 this.multiplicationTensor = mt; 22843 } 22844 /** 22845 * 22846 */ 22847 initializeLabels() { 22848 this.irrationalLabels[1] = ["\u03C8", "psi"]; 22849 this.irrationalLabels[2] = ["\u03C8\xB2", "psi^2"]; 22850 } 22851}; 22852SuperGoldenField["__class"] = "com.vzome.core.algebra.SuperGoldenField"; 22853SuperGoldenField["__interfaces"] = ["com.vzome.core.algebra.AlgebraicField"]; 22854
22855// src/worker/legacy/from-java/com/vzome/core/editor/SymmetrySystem.ts 22856var SymmetrySystem = class _SymmetrySystem { 22857 /* Default method injected from OrbitSource */ 22858 getOrientations(rowMajor) { 22859 if (typeof rowMajor === "boolean" || rowMajor === null) { 22860 let __args = arguments; 22861 if (this.symmetry === void 0) { 22862 this.symmetry = null; 22863 } 22864 if (this.orbits === void 0) { 22865 this.orbits = null; 22866 } 22867 if (this.shapes === void 0) { 22868 this.shapes = null; 22869 } 22870 if (this.symmetryPerspective === void 0) { 22871 this.symmetryPerspective = null; 22872 } 22873 if (this.context === void 0) { 22874 this.context = null; 22875 } 22876 if (this.editor === void 0) { 22877 this.editor = null; 22878 } 22879 if (this.colors === void 0) { 22880 this.colors = null; 22881 } 22882 this.nextNewAxis = 0; 22883 this.orbitColors = new java.util.HashMap(); 22884 this.vectorToAxis = new java.util.HashMap(); 22885 this.noKnownDirections = false; 22886 this.toolFactoryLists = new java.util.HashMap(); 22887 this.toolLists = new java.util.HashMap(); 22888 return (() => { 22889 const symmetry = this.getSymmetry(); 22890 const field5 = symmetry.getField(); 22891 const order = symmetry.getChiralOrder(); 22892 const orientations = ((s) => { 22893 let a = []; 22894 while (s-- > 0) a.push(null); 22895 return a; 22896 })(order); 22897 for (let orientation = 0; orientation < order; orientation++) { 22898 { 22899 if (rowMajor) { 22900 orientations[orientation] = symmetry.getMatrix(orientation).getRowMajorRealElements(); 22901 continue; 22902 } 22903 const asFloats = ((s) => { 22904 let a = []; 22905 while (s-- > 0) a.push(0); 22906 return a; 22907 })(16); 22908 const transform = symmetry.getMatrix(orientation); 22909 for (let i = 0; i < 3; i++) { 22910 { 22911 const columnSelect = field5.basisVector(3, i); 22912 const columnI = transform.timesColumn(columnSelect); 22913 const colRV = columnI.toRealVector(); 22914 asFloats[i * 4 + 0] = colRV.x; 22915 asFloats[i * 4 + 1] = colRV.y; 22916 asFloats[i * 4 + 2] = colRV.z; 22917 asFloats[i * 4 + 3] = 0; 22918 } 22919 ; 22920 } 22921 asFloats[12] = 0; 22922 asFloats[13] = 0; 22923 asFloats[14] = 0; 22924 asFloats[15] = 1; 22925 orientations[orientation] = asFloats; 22926 } 22927 ; 22928 } 22929 return orientations; 22930 })(); 22931 } else if (rowMajor === void 0) { 22932 return this.getOrientations$(); 22933 } else throw new Error("invalid overload"); 22934 } 22935 /* Default method injected from OrbitSource */ 22936 getOrientations$() { 22937 return this.getOrientations(false); 22938 } 22939 /* Default method injected from OrbitSource */ 22940 getZone(orbit, orientation) { 22941 return this.getSymmetry().getDirection(orbit).getAxis(Symmetry.PLUS, orientation); 22942 } 22943 /* Default method injected from OrbitSource */ 22944 getEmbedding() { 22945 const symmetry = this.getSymmetry(); 22946 const field5 = symmetry.getField(); 22947 const embedding = ((s) => { 22948 let a = []; 22949 while (s-- > 0) a.push(0); 22950 return a; 22951 })(16); 22952 for (let i = 0; i < 3; i++) { 22953 { 22954 const columnSelect = field5.basisVector(3, i); 22955 const colRV = symmetry.embedInR3(columnSelect); 22956 embedding[i * 4 + 0] = colRV.x; 22957 embedding[i * 4 + 1] = colRV.y; 22958 embedding[i * 4 + 2] = colRV.z; 22959 embedding[i * 4 + 3] = 0; 22960 } 22961 ; 22962 } 22963 embedding[12] = 0; 22964 embedding[13] = 0; 22965 embedding[14] = 0; 22966 embedding[15] = 1; 22967 return embedding; 22968 } 22969 static LOGGER_$LI$() { 22970 if (_SymmetrySystem.LOGGER == null) { 22971 _SymmetrySystem.LOGGER = java.util.logging.Logger.getLogger("com.vzome.core.editor"); 22972 } 22973 return _SymmetrySystem.LOGGER; 22974 } 22975 constructor(symmXml, symmetryPerspective, context, colors3, allowNonstandard) { 22976 this.nextNewAxis = 0; 22977 if (this.symmetry === void 0) { 22978 this.symmetry = null; 22979 } 22980 if (this.orbits === void 0) { 22981 this.orbits = null; 22982 } 22983 this.orbitColors = new java.util.HashMap(); 22984 if (this.shapes === void 0) { 22985 this.shapes = null; 22986 } 22987 this.vectorToAxis = new java.util.HashMap(); 22988 this.noKnownDirections = false;
22989 if (this.symmetryPerspective === void 0) { 22990 this.symmetryPerspective = null; 22991 } 22992 this.toolFactoryLists = new java.util.HashMap(); 22993 this.toolLists = new java.util.HashMap(); 22994 if (this.context === void 0) { 22995 this.context = null; 22996 } 22997 if (this.editor === void 0) { 22998 this.editor = null; 22999 } 23000 if (this.colors === void 0) { 23001 this.colors = null; 23002 } 23003 this.symmetryPerspective = symmetryPerspective; 23004 this.context = context; 23005 this.colors = colors3; 23006 this.symmetry = symmetryPerspective.getSymmetry(); 23007 let styleName = symmetryPerspective.getDefaultGeometry().getName(); 23008 this.orbits = new OrbitSet(this.symmetry); 23009 if (symmXml == null) { 23010 for (let index = this.symmetry.getOrbitSet().getDirections().iterator(); index.hasNext(); ) { 23011 let orbit = index.next(); 23012 { 23013 if (symmetryPerspective.orbitIsStandard(orbit) || allowNonstandard) this.orbits.add(orbit); 23014 const color = colors3.getColor(Colors.DIRECTION_$LI$() + orbit.getName()); 23015 this.orbitColors.put(orbit.getName(), color); 23016 } 23017 } 23018 } else { 23019 styleName = symmXml.getAttribute("renderingStyle"); 23020 const nodes = symmXml.getChildNodes(); 23021 for (let i = 0; i < nodes.getLength(); i++) { 23022 { 23023 const node = nodes.item(i); 23024 if (node != null && (node.constructor != null && node.constructor["__interfaces"] != null && node.constructor["__interfaces"].indexOf("org.w3c.dom.Element") >= 0)) { 23025 const dirElem = node; 23026 const name = dirElem.getAttribute("name"); 23027 let orbit = null; 23028 const nums = dirElem.getAttribute("prototype"); 23029 if (nums != null && !/* isEmpty */ 23030 (nums.length === 0)) { 23031 try { 23032 const prototype = this.symmetry.getField().parseVector(nums); 23033 orbit = this.symmetry.createNewZoneOrbit(name, 0, Symmetry.NO_ROTATION, prototype); 23034 } catch (e) { 23035 if (_SymmetrySystem.LOGGER_$LI$().isLoggable(java.util.logging.Level.INFO)) { 23036 const msg = "Integer overflow while recreating automatic orbit: " + name + ". Failed to parseVector('" + nums + "')."; 23037 _SymmetrySystem.LOGGER_$LI$().info(msg); 23038 } 23039 continue; 23040 } 23041 orbit.setAutomatic(true); 23042 try { 23043 const autoNum = javaemul.internal.IntegerHelper.parseInt(name); 23044 this.nextNewAxis = Math.max(this.nextNewAxis, autoNum + 1); 23045 } catch (e) { 23046 _SymmetrySystem.LOGGER_$LI$().fine(e.message); 23047 } 23048 } else { 23049 orbit = this.symmetry.getDirection(name); 23050 if (orbit == null) { 23051 continue; 23052 } 23053 } 23054 this.orbits.add(orbit); 23055 let color = colors3.getColor(Colors.DIRECTION_$LI$() + orbit.getCanonicalName()); 23056 const str = dirElem.getAttribute("color"); 23057 if (str != null && !/* isEmpty */ 23058 (str.length === 0) && !(str === "255,255,255")) { 23059 color = Color.parseColor(str); 23060 } 23061 this.orbitColors.put(orbit.getName(), color); 23062 this.orbitColors.put(orbit.getCanonicalName(), color); 23063 } 23064 } 23065 ; 23066 } 23067 for (let index = this.symmetry.getOrbitSet().getDirections().iterator(); index.hasNext(); ) { 23068 let orbit = index.next(); 23069 { 23070 if (this.orbits.contains(orbit)) continue; 23071 if (orbit.isStandard() || allowNonstandard) this.orbits.add(orbit); 23072 const color = colors3.getColor(Colors.DIRECTION_$LI$() + orbit.getCanonicalName()); 23073 this.orbitColors.put(orbit.getName(), color); 23074 this.orbitColors.put(orbit.getCanonicalName(), color); 23075 } 23076 } 23077 } 23078 this.setStyle(styleName); 23079 } 23080 setEditorModel(editor) { 23081 this.editor = editor; 23082 } 23083 createToolFactories(tools) { 23084 { 23085 let array = ( 23086 /* Enum.values */ 23087 (function() { 23088 let result = []; 23089 for (let val in Tool2.Kind) { 23090 if (!isNaN(val)) { 23091 result.push(parseInt(val, 10)); 23092 } 23093 } 23094 return result; 23095 })() 23096 ); 23097 for (let index = 0; index < array.length; index++) { 23098 let kind = array[index]; 23099 { 23100 const list = this.symmetryPerspective.createToolFactories(kind, tools); 23101 this.toolFactoryLists.put(kind, list); 23102 const toolList = this.symmetryPerspective.predefineTools(kind, tools); 23103 this.toolLists.put(kind, toolList); 23104 } 23105 } 23106 } 23107 } 23108 /** 23109 * 23110 * @return {string} 23111 */ 23112 getName() { 23113 return this.symmetry.getName(); 23114 } 23115 /** 23116 * 23117 * @param {AlgebraicVector} vector 23118 * @return {Axis} 23119 */ 23120 getAxis(vector) { 23121 if (vector.isOrigin()) { 23122 return null; 23123 } 23124 let line = this.vectorToAxis.get(vector.toString()); 23125 if (line != null) return line; 23126 if (!this.noKnownDirections) { 23127 line = this.symmetry["getAxis$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_math_symmetry_OrbitSet"](vector, this.orbits); 23128 if (line != null) { 23129 this.vectorToAxis.put(vector.toString(), line); 23130 return line; 23131 } 23132 } 23133 const dir = this.createAnonymousOrbit(vector); 23134 line = dir.getAxis$com_vzome_core_algebra_AlgebraicVector(vector); 23135 this.vectorToAxis.put(vector.toString(), line); 23136 return line; 23137 } 23138 createAnonymousOrbit(vector) { 23139 const symm = this.orbits.getSymmetry(); 23140 const field5 = symm.getField(); 23141 const longer = field5["createPower$int"](1); 23142 const shorter = field5["createPower$int"](-1); 23143 const rv = vector.toRealVector(); 23144 let longVector = vector; 23145 let shortVector = vector; 23146 let longLen = 2; 23147 let shortLen = 2; 23148 const len = rv.length(); 23149 if (len > 2) { 23150 longLen = len; 23151 longVector = vector; 23152 while (longLen > 2) { 23153 { 23154 shortVector = longVector.scale(shorter); 23155 shortLen = shortVector.toRealVector().length(); 23156 if (shortLen <= 2) break; 23157 longLen = shortLen; 23158 longVector = shortVector; 23159 } 23160 } 23161 ; 23162 } else { 23163 shortLen = len; 23164 shortVector = vector; 23165 while (shortLen <= 2) { 23166 { 23167 longVector = shortVector.scale(longer); 23168 longLen = longVector.toRealVector().length(); 23169 if (longLen > 2) break; 23170 shortLen = longLen; 23171 shortVector = longVector; 23172 } 23173 } 23174 ; 23175 } 23176 if (2 / shortLen > longLen) vector = longVector; 23177 else vector = shortVector; 23178 const colorName = "" + this.nextNewAxis++; 23179 const orbit = symm.createNewZoneOrbit(colorName, 0, Symmetry.NO_ROTATION, vector); 23180 orbit.setAutomatic(true); 23181 this.orbits.add(orbit);
23182 let color = this.colors.getColor(Colors.DIRECTION_$LI$() + orbit.getCanonicalName()); 23183 if (color == null) color = Color.WHITE_$LI$(); 23184 this.orbitColors.put(orbit.getName(), color); 23185 this.orbitColors.put(orbit.getCanonicalName(), color); 23186 return orbit; 23187 } 23188 /** 23189 * 23190 * @param {AlgebraicVector} vector 23191 * @return {Color} 23192 */ 23193 getVectorColor(vector) { 23194 if (vector == null || vector.isOrigin()) { 23195 return this.colors.getColor(Colors.CONNECTOR_$LI$()); 23196 } 23197 let line = this.vectorToAxis.get(vector.toString()); 23198 if (line == null) { 23199 line = this.symmetry["getAxis$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_math_symmetry_OrbitSet"](vector, this.orbits); 23200 } 23201 return line == null ? Color.WHITE_$LI$() : this.getColor(line.getDirection()); 23202 } 23203 /** 23204 * 23205 * @param {Direction} orbit 23206 * @return {Color} 23207 */ 23208 getColor(orbit) { 23209 if (orbit == null) return this.colors.getColor(Colors.CONNECTOR_$LI$()); 23210 let shapeColor = this.shapes.getColor(orbit); 23211 if (shapeColor == null) shapeColor = this.orbitColors.get(orbit.getName()); 23212 if (shapeColor == null) return Color.WHITE_$LI$(); 23213 return shapeColor; 23214 } 23215 /** 23216 * 23217 * @return {*} 23218 */ 23219 getSymmetry() { 23220 return this.symmetry; 23221 } 23222 /** 23223 * 23224 * @return {OrbitSet} 23225 */ 23226 getOrbits() { 23227 return this.orbits; 23228 } 23229 disableKnownDirection() { 23230 this.noKnownDirections = true; 23231 } 23232 getRenderingStyle() { 23233 return this.shapes; 23234 } 23235 getXml(doc) { 23236 const result = doc.createElement("SymmetrySystem"); 23237 DomUtils.addAttribute(result, "name", this.getSymmetry().getName()); 23238 DomUtils.addAttribute(result, "renderingStyle", this.shapes.getName()); 23239 for (let index = this.orbits.getDirections().iterator(); index.hasNext(); ) { 23240 let dir = index.next(); 23241 { 23242 const dirElem = doc.createElement("Direction"); 23243 if (dir.isAutomatic()) DomUtils.addAttribute(dirElem, "prototype", dir.getPrototype().getVectorExpression$int(AlgebraicField.ZOMIC_FORMAT)); 23244 DomUtils.addAttribute(dirElem, "name", dir.getName()); 23245 DomUtils.addAttribute(dirElem, "orbit", dir.getCanonicalName()); 23246 { 23247 const color = this.getColor(dir); 23248 if (color != null) DomUtils.addAttribute(dirElem, "color", color.toString()); 23249 } 23250 ; 23251 result.appendChild(dirElem); 23252 } 23253 } 23254 return result; 23255 } 23256 getStyle$java_lang_String(styleName) { 23257 const found = this.symmetryPerspective.getGeometries().stream().filter((e) => styleName === e.getName() || styleName === e.getAlias() || styleName === e.getPackage()).findFirst(); 23258 if (found.isPresent()) return found.get(); 23259 else return null; 23260 } 23261 getStyle(styleName) { 23262 if (typeof styleName === "string" || styleName === null) { 23263 return this.getStyle$java_lang_String(styleName); 23264 } else if (styleName === void 0) { 23265 return this.getStyle$(); 23266 } else throw new Error("invalid overload"); 23267 } 23268 setStyle(styleName) { 23269 const result = this.getStyle$java_lang_String(styleName); 23270 if (result != null) this.shapes = result; 23271 else { 23272 _SymmetrySystem.LOGGER_$LI$().warning("UNKNOWN STYLE NAME: " + styleName); 23273 this.shapes = this.symmetryPerspective.getDefaultGeometry(); 23274 } 23275 } 23276 getStyleNames() { 23277 return this.symmetryPerspective.getGeometries().stream().map((e) => e.getName()).toArray((arg0) => { 23278 return new Array(arg0); 23279 }); 23280 } 23281 getStyle$() { 23282 return this.shapes; 23283 } 23284 /** 23285 * 23286 * @return {*} 23287 */ 23288 getShapes() { 23289 return this.shapes; 23290 } 23291 getShape$com_vzome_core_algebra_AlgebraicVector(offset) { 23292 return this.getShape$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_editor_api_Shapes(offset, this.shapes); 23293 } 23294 getShape$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_editor_api_Shapes(offset, shapes28) { 23295 if (offset == null) return shapes28.getConnectorShape(); 23296 else { 23297 if (offset.isOrigin()) return null; 23298 const axis = this.getAxis(offset); 23299 if (axis == null) return null; 23300 const orbit = axis.getDirection(); 23301 const len = axis.getLength(offset); 23302 return shapes28.getStrutShape(orbit, len); 23303 } 23304 } 23305 getShape(offset, shapes28) { 23306 if ((offset != null && offset instanceof AlgebraicVector || offset === null) && (shapes28 != null && (shapes28.constructor != null && shapes28.constructor["__interfaces"] != null && shapes28.constructor["__interfaces"].indexOf("com.vzome.core.editor.api.Shapes") >= 0) || shapes28 === null)) {
23307 return this.getShape$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_editor_api_Shapes(offset, shapes28); 23308 } else if ((offset != null && offset instanceof AlgebraicVector || offset === null) && shapes28 === void 0) { 23309 return this.getShape$com_vzome_core_algebra_AlgebraicVector(offset); 23310 } else throw new Error("invalid overload"); 23311 } 23312 getToolFactories(kind) { 23313 return this.toolFactoryLists.get(kind); 23314 } 23315 getPredefinedTools(kind) { 23316 return this.toolLists.get(kind); 23317 } 23318 doAction(action) { 23319 const command = this.symmetryPerspective.getLegacyCommand(action); 23320 if (command != null) { 23321 const edit = new CommandEdit(command, this.editor); 23322 this.context.performAndRecord(edit); 23323 return true; 23324 } 23325 return false; 23326 } 23327 getModelResourcePath() { 23328 return this.symmetryPerspective.getModelResourcePath(); 23329 } 23330 orbitIsStandard(orbit) { 23331 return this.symmetryPerspective.orbitIsStandard(orbit); 23332 } 23333 orbitIsBuildDefault(orbit) { 23334 return this.symmetryPerspective.orbitIsBuildDefault(orbit); 23335 } 23336 getOrbitUnitLength(orbit) { 23337 return this.symmetryPerspective.getOrbitUnitLength(orbit); 23338 } 23339 resetColors() { 23340 for (let index = this.symmetry.getOrbitSet().getDirections().iterator(); index.hasNext(); ) { 23341 let orbit = index.next(); 23342 { 23343 const color = this.colors.getColor(Colors.DIRECTION_$LI$() + orbit.getName()); 23344 this.orbitColors.put(orbit.getName(), color); 23345 } 23346 } 23347 } 23348}; 23349SymmetrySystem["__class"] = "com.vzome.core.editor.SymmetrySystem"; 23350SymmetrySystem["__interfaces"] = ["com.vzome.core.editor.api.OrbitSource"]; 23351
23352// src/worker/legacy/from-java/com/vzome/core/commands/XmlSymmetryFormat.ts 23353var XmlSymmetryFormat = class _XmlSymmetryFormat extends XmlSaveFormat { 23354 static { 23355 this.__static_initialized = false; 23356 } 23357 static __static_initialize() { 23358 if (!_XmlSymmetryFormat.__static_initialized) { 23359 _XmlSymmetryFormat.__static_initialized = true; 23360 _XmlSymmetryFormat.__static_initializer_0(); 23361 } 23362 } 23363 static __com_vzome_core_commands_XmlSymmetryFormat_logger_$LI$() { 23364 _XmlSymmetryFormat.__static_initialize(); 23365 if (_XmlSymmetryFormat.__com_vzome_core_commands_XmlSymmetryFormat_logger == null) { 23366 _XmlSymmetryFormat.__com_vzome_core_commands_XmlSymmetryFormat_logger = java.util.logging.Logger.getLogger("com.vzome.core.commands.XmlSaveFormat"); 23367 } 23368 return _XmlSymmetryFormat.__com_vzome_core_commands_XmlSymmetryFormat_logger; 23369 } 23370 static __static_initializer_0() { 23371 new _XmlSymmetryFormat("http://tns.vorthmann.org/vZome/2.0/", [XmlSaveFormat.PROJECT_4D, XmlSaveFormat.SELECTION_NOT_SAVED]); 23372 new _XmlSymmetryFormat("http://tns.vorthmann.org/vZome/2.0.1/", [XmlSaveFormat.PROJECT_4D, XmlSaveFormat.SELECTION_NOT_SAVED]); 23373 new _XmlSymmetryFormat("http://tns.vorthmann.org/vZome/2.0.2/", [XmlSaveFormat.SELECTION_NOT_SAVED]); 23374 new _XmlSymmetryFormat("http://tns.vorthmann.org/vZome/2.0.3/", [XmlSaveFormat.SELECTION_NOT_SAVED]); 23375 new _XmlSymmetryFormat("http://tns.vorthmann.org/vZome/2.1.0/", [XmlSaveFormat.SELECTION_NOT_SAVED, XmlSaveFormat.FORMAT_2_1_0]); 23376 new _XmlSymmetryFormat("http://tns.vorthmann.org/vZome/3.0.0/", [XmlSaveFormat.GROUPING_IN_SELECTION]); 23377 new _XmlSymmetryFormat("http://tns.vorthmann.org/vZome/4.0.0/", [XmlSaveFormat.RATIONAL_VECTORS, XmlSaveFormat.GROUPING_IN_SELECTION]); 23378 new _XmlSymmetryFormat("http://tns.vorthmann.org/vZome/5.0.0/", [XmlSaveFormat.RATIONAL_VECTORS, XmlSaveFormat.COMPACTED_COMMAND_EDITS]); 23379 new _XmlSymmetryFormat(XmlSaveFormat.CURRENT_FORMAT, [XmlSaveFormat.RATIONAL_VECTORS, XmlSaveFormat.COMPACTED_COMMAND_EDITS, XmlSaveFormat.MULTIPLE_DESIGNS]); 23380 } 23381 static getFormat(namespace) { 23382 return XmlSaveFormat.FORMATS_$LI$().get(namespace); 23383 } 23384 initialize$com_vzome_core_algebra_AlgebraicField$com_vzome_core_math_symmetry_OrbitSet_Field$int$java_lang_String$java_util_Properties(field5, symms, scale, writerVersion, props) { 23385 super.initialize(field5, scale, writerVersion, props); 23386 this.symmetries = symms; 23387 } 23388 initialize(field5, symms, scale, writerVersion, props) { 23389 if ((field5 != null && (field5.constructor != null && field5.constructor["__interfaces"] != null && field5.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicField") >= 0) || field5 === null) && (symms != null && (symms.constructor != null && symms.constructor["__interfaces"] != null && symms.constructor["__interfaces"].indexOf("com.vzome.core.math.symmetry.OrbitSet.Field") >= 0) || symms === null) && (typeof scale === "number" || scale === null) && (typeof writerVersion === "string" || writerVersion === null) && (props != null && props instanceof Properties || props === null)) { 23390 return this.initialize$com_vzome_core_algebra_AlgebraicField$com_vzome_core_math_symmetry_OrbitSet_Field$int$java_lang_String$java_util_Properties(field5, symms, scale, writerVersion, props); 23391 } else if ((field5 != null && (field5.constructor != null && field5.constructor["__interfaces"] != null && field5.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicField") >= 0) || field5 === null) && (typeof symms === "number" || symms === null) && (typeof scale === "string" || scale === null) && (writerVersion != null && writerVersion instanceof Properties || writerVersion === null) && props === void 0) { 23392 super.initialize(field5, symms, scale, writerVersion); 23393 } else throw new Error("invalid overload"); 23394 } 23395 constructor(version, capabilities) { 23396 super(version, capabilities); 23397 if (this.symmetries === void 0) { 23398 this.symmetries = null; 23399 } 23400 } 23401 parseAlgebraicObject(valName, val) { 23402 if (valName === "Symmetry") { 23403 const name = val.getAttribute("name"); 23404 return this.parseSymmetry(name); 23405 } else if (valName === "QuaternionicSymmetry") { 23406 const name = val.getAttribute("name"); 23407 return this.getQuaternionicSymmetry(name); 23408 } else if (valName === "Axis") return this.parseAxis(val, "symm", "dir", "index", "sense"); 23409 else { 23410 return super.parseAlgebraicObject(valName, val); 23411 } 23412 } 23413 getQuaternionicSymmetry(name) { 23414 return this.symmetries.getQuaternionSet(name); 23415 } 23416 parseSymmetry(sname) { 23417 const group = this.symmetries.getGroup(sname); 23418 const symm = group.getSymmetry(); 23419 if (symm == null) { 23420 _XmlSymmetryFormat.__com_vzome_core_commands_XmlSymmetryFormat_logger_$LI$().severe("UNSUPPORTED symmetry: " + sname); 23421 throw new java.lang.IllegalStateException("no symmetry with name=" + sname); 23422 } else return symm; 23423 } 23424 static serializeAxis(xml, symmAttr, dirAttr, indexAttr, senseAttr, axis) { 23425 let str = axis.getDirection().getSymmetry().getName(); 23426 if (!("icosahedral" === str)) DomUtils.addAttribute(xml, symmAttr, str); 23427 str = axis.getDirection().getName(); 23428 if (!("blue" === str)) DomUtils.addAttribute(xml, dirAttr, str); 23429 DomUtils.addAttribute( 23430 xml, 23431 indexAttr, 23432 /* toString */ 23433 "" + axis.getOrientation() 23434 ); 23435 if (axis.getSense() !== Symmetry.PLUS) DomUtils.addAttribute(xml, "sense", "minus"); 23436 if (!axis.isOutbound()) DomUtils.addAttribute(xml, "outbound", "false"); 23437 } 23438 parseAxis(xml, symmAttr, dirAttr, indexAttr, senseAttr) { 23439 let sname = xml.getAttribute(symmAttr); 23440 if (sname == null || /* isEmpty */ 23441 sname.length === 0) sname = "icosahedral"; 23442 const group = this.symmetries.getGroup(sname); 23443 let aname = xml.getAttribute(dirAttr); 23444 if (aname == null || /* isEmpty */ 23445 aname.length === 0) aname = "blue"; 23446 else if (aname === "tan") aname = "sand"; 23447 else if (aname === "spring") aname = "apple"; 23448 const iname = xml.getAttribute(indexAttr); 23449 const index = javaemul.internal.IntegerHelper.parseInt(iname); 23450 let sense = Symmetry.PLUS; 23451 if ("minus" === xml.getAttribute(senseAttr)) { 23452 sense = Symmetry.MINUS; 23453 } 23454 let outbound = true; 23455 const outs = xml.getAttribute("outbound");
23456 if (outs != null && outs === "false") outbound = false; 23457 const dir = group.getDirection(aname); 23458 if (dir == null) { 23459 const msg = "Unsupported direction '" + aname + "' in " + sname + " symmetry"; 23460 _XmlSymmetryFormat.__com_vzome_core_commands_XmlSymmetryFormat_logger_$LI$().severe(msg); 23461 throw new java.lang.IllegalStateException(msg); 23462 } 23463 return dir.getAxis$int$int$boolean(sense, index, outbound); 23464 } 23465}; 23466XmlSymmetryFormat["__class"] = "com.vzome.core.commands.XmlSymmetryFormat"; 23467XmlSymmetryFormat.__static_initialize(); 23468
23469// src/worker/legacy/from-java/com/vzome/core/math/convexhull/GrahamScan2D.ts 23470var GrahamScan2D = class _GrahamScan2D { 23471 constructor() { 23472 } 23473 /** 23474 * Constructs the 2d convex hull of a coplanar set of 3d points. 23475 * 23476 * @param {*} points 23477 * a set of 3d input points 23478 * @return {AlgebraicVector[]} an array of the vertices of the planar convex hull. 23479 * The points are ordered so that the normal of the resulting polygon points AWAY from the origin. 23480 * The points in the array are unique, so the last point is NOT the same as the first. 23481 * This means that polygon edges derived from this array must connect the last to the first. 23482 * @throws Failure 23483 * if the number of input points is less than three, 23484 * or if the points are collinear 23485 * or if the points are not coplanar. 23486 */ 23487 static buildHull(points) { 23488 if (points.size() < 3) { 23489 _GrahamScan2D.fail("At least three input points are required for a 2d convex hull.\n\n" + points.size() + " specified."); 23490 } 23491 const normal = AlgebraicVectors.getNormal$java_util_Collection(points); 23492 if (normal.isOrigin()) { 23493 _GrahamScan2D.fail("Cannot generate a 2d convex hull from collinear points"); 23494 } 23495 if (!AlgebraicVectors.areOrthogonalTo(normal, points)) { 23496 _GrahamScan2D.fail("Cannot generate a 2d convex hull from non-coplanar points"); 23497 } 23498 const keySet = new java.util.ArrayList(); 23499 const xyTo3dMap = _GrahamScan2D.map3dToXY(points, normal, keySet); 23500 const stack2d = _GrahamScan2D.getHull2d(keySet); 23501 const vertices3d = ((s) => { 23502 let a = []; 23503 while (s-- > 0) a.push(null); 23504 return a; 23505 })(stack2d.size()); 23506 let i = 0; 23507 for (let index = stack2d.iterator(); index.hasNext(); ) { 23508 let point2d = index.next(); 23509 { 23510 const point3d = xyTo3dMap.get(point2d.toString(AlgebraicField.VEF_FORMAT)); 23511 vertices3d[i++] = point3d; 23512 } 23513 } 23514 return vertices3d; 23515 } 23516 /*private*/ 23517 static map3dToXY(points3d, normal, keySet) { 23518 const maxAxis = AlgebraicVectors.getMaxComponentIndex(normal); 23519 const mapX = (maxAxis + 1) % 3; 23520 const mapY = (maxAxis + 2) % 3; 23521 const map = new java.util.HashMap(); 23522 for (let index = points3d.iterator(); index.hasNext(); ) { 23523 let point3d = index.next(); 23524 { 23525 const point2d = new AlgebraicVector(point3d.getComponent(mapX), point3d.getComponent(mapY)); 23526 keySet.add(point2d); 23527 map.put(point2d.toString(AlgebraicField.VEF_FORMAT), point3d); 23528 } 23529 } 23530 return map; 23531 } 23532 /*private*/ 23533 static getHull2d(points2d) { 23534 const sortedPoints2d = _GrahamScan2D.getSortedPoints(points2d); 23535 const stack2d = new java.util.ArrayDeque(); 23536 stack2d.push(sortedPoints2d.get(0)); 23537 stack2d.push(sortedPoints2d.get(1)); 23538 for (let i = 2; i < sortedPoints2d.size(); i++) { 23539 { 23540 const head = sortedPoints2d.get(i); 23541 const middle = stack2d.pop(); 23542 const tail = stack2d.peek(); 23543 const turn = _GrahamScan2D.getWindingDirection(tail, middle, head); 23544 switch (turn) { 23545 case 1: 23546 stack2d.push(middle); 23547 stack2d.push(head); 23548 break; 23549 case -1: 23550 i--; 23551 break; 23552 case 0: 23553 stack2d.push(head); 23554 break; 23555 default: 23556 throw new java.lang.IllegalStateException("Illegal turn: " + turn); 23557 } 23558 } 23559 ; 23560 } 23561 return stack2d; 23562 } 23563 /** 23564 * @param {*} points2d set of 2d points to be sorted 23565 * @return {*} a list of points sorted: 23566 * 1) in increasing order of the angle they and the lowest point make with the x-axis. 23567 * 2) by increasing distance from the lowest point. 23568 * @private 23569 */ 23570 /*private*/ 23571 static getSortedPoints(points2d) { 23572 const lowest = _GrahamScan2D.getLowest2dPoint(points2d); 23573 const list = new java.util.ArrayList(points2d); 23574 java.util.Collections.sort(list, (a, b) => { 23575 if (a.equals(b)) { 23576 return 0; 23577 } 23578 if (a.equals(lowest)) { 23579 return -1; 23580 } 23581 if (b.equals(lowest)) { 23582 return 1; 23583 } 23584 const turn = _GrahamScan2D.getWindingDirection(lowest, a, b); 23585 if (turn !== 0) { 23586 return -turn; 23587 } 23588 const lengthSqA = AlgebraicVectors.getMagnitudeSquared(a.minus(lowest)); 23589 const lengthSqB = AlgebraicVectors.getMagnitudeSquared(b.minus(lowest)); 23590 return lengthSqA.compareTo(lengthSqB); 23591 }); 23592 return list; 23593 } 23594 /** 23595 * @param {*} points2d a collection of 2d points from which to determine the lowest point. 23596 * @return {AlgebraicVector} the point with the lowest y coordinate. 23597 * In case more than one point has the same minimum y coordinate, 23598 * the one with the lowest x coordinate is returned. 23599 */ 23600 static getLowest2dPoint(points2d) { 23601 let lowest = null; 23602 for (let index = points2d.iterator(); index.hasNext(); ) { 23603 let point2d = index.next(); 23604 { 23605 if (lowest == null) { 23606 lowest = point2d; 23607 } else { 23608 const signum = point2d.getComponent(AlgebraicVector.Y)["minus$com_vzome_core_algebra_AlgebraicNumber"](lowest.getComponent(AlgebraicVector.Y)).signum(); 23609 switch (signum) { 23610 case -1: 23611 lowest = point2d; 23612 break; 23613 case 0: 23614 if (point2d.getComponent(AlgebraicVector.X).lessThan(lowest.getComponent(AlgebraicVector.X))) { 23615 lowest = point2d; 23616 } 23617 break; 23618 } 23619 } 23620 } 23621 } 23622 return lowest; 23623 } 23624 /** 23625 * 23626 * @param {AlgebraicVector} a 2d coordinate 23627 * @param {AlgebraicVector} b 2d coordinate 23628 * @param {AlgebraicVector} c 2d coordinate 23629 * @return {number} -1, 0 or 1, depending on the orientation of vector ac with respect to vector ab: 23630 * 1: COUNTER_CLOCKWISE 23631 * c 23632 * / 23633 * / 23634 * a-----b 23635 * -1: CLOCKWISE 23636 * b 23637 * / 23638 * / 23639 * a-----c 23640 * 0: COLLINEAR 23641 * a-----b--c 23642 * @private 23643 */ 23644 /*private*/
23645 static getWindingDirection(a, b, c) { 23646 const ab = b.minus(a); 23647 const ac = c.minus(a); 23648 return new AlgebraicMatrix(ab, ac).determinant().signum(); 23649 } 23650 /*private*/ 23651 static fail(msg) { 23652 throw new Command.Failure(msg); 23653 } 23654}; 23655GrahamScan2D["__class"] = "com.vzome.core.math.convexhull.GrahamScan2D"; 23656
23657// src/worker/legacy/from-java/com/vzome/core/exporters/GitHubShare.ts 23658var GitHubShare = class { 23659 constructor(fileName, date, time, xml, png, shapesJson) { 23660 if (this.designName === void 0) { 23661 this.designName = null; 23662 } 23663 if (this.date === void 0) { 23664 this.date = null; 23665 } 23666 if (this.time === void 0) { 23667 this.time = null; 23668 } 23669 if (this.xml === void 0) { 23670 this.xml = null; 23671 } 23672 if (this.png === void 0) { 23673 this.png = null; 23674 } 23675 if (this.shapesJson === void 0) { 23676 this.shapesJson = null; 23677 } 23678 if (this.handler === void 0) { 23679 this.handler = null; 23680 } 23681 this.date = date; 23682 this.time = time; 23683 this.xml = xml; 23684 this.png = png; 23685 this.shapesJson = shapesJson; 23686 this.designName = /* replaceAll */ 23687 fileName.trim().replace(new RegExp(" ", "g"), "-"); 23688 const index = this.designName.toLowerCase().lastIndexOf(".vZome".toLowerCase()); 23689 if (index > 0) this.designName = this.designName.substring(0, index); 23690 while ( 23691 /* startsWith */ 23692 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(this.designName, "-") 23693 ) { 23694 this.designName = this.designName.substring(1); 23695 } 23696 ; 23697 while ( 23698 /* endsWith */ 23699 ((str, searchString) => { 23700 let pos = str.length - searchString.length; 23701 let lastIndex = str.indexOf(searchString, pos); 23702 return lastIndex !== -1 && lastIndex === pos; 23703 })(this.designName, "-") 23704 ) { 23705 this.designName = this.designName.substring(0, this.designName.lastIndexOf("-")); 23706 } 23707 ; 23708 } 23709 getDesignName() { 23710 return this.designName; 23711 } 23712 setEntryHandler(handler) { 23713 this.handler = handler; 23714 } 23715 generateContent(orgName, repoName, branchName, title, description, blog, publish, style) { 23716 const dateFolder = ( 23717 /* replace */ 23718 this.date.split("-").join("/") 23719 ); 23720 const postSrcPath = "_posts/" + this.date + "-" + this.designName + "-" + this.time + ".md"; 23721 const postPath = dateFolder + "/" + this.designName + "-" + this.time + ".html"; 23722 const assetPath = dateFolder + "/" + this.time + "-" + this.designName + "/"; 23723 const designPath = assetPath + this.designName + ".vZome"; 23724 const imagePath = assetPath + this.designName + ".png"; 23725 this.handler.addEntry(designPath, this.xml, "utf-8"); 23726 this.handler.addEntry(imagePath, this.png, "base64"); 23727 this.handler.addEntry(assetPath + this.designName + ".shapes.json", this.shapesJson, "utf-8"); 23728 const viewerTemplate = ResourceLoader.loadStringResource("com/vzome/core/exporters/github/viewerTemplate.md"); 23729 const instructionsTemplate = ResourceLoader.loadStringResource("com/vzome/core/exporters/github/instructionsTemplate.md"); 23730 let viewerControls = ""; 23731 let viewerParameters = ""; 23732 let viewerScript = ""; 23733 let componentTemplate = viewerTemplate; 23734 let postLayout = "vzome"; 23735 let simpleLayout = "design"; 23736 switch (style) { 23737 case "indexed": 23738 { 23739 viewerControls = "<div style='display:flex;'><div style='margin: auto;'><vzome-viewer-previous label='prev step'></vzome-viewer-previous><vzome-viewer-next label='next step'></vzome-viewer-next></div></div>"; 23740 viewerParameters = "indexed='true'"; 23741 break; 23742 } 23743 ; 23744 case "indexed (load-camera)": 23745 { 23746 viewerControls = "<div style='display:flex;'><div style='margin: auto;'><vzome-viewer-previous load-camera='true' label='prev step'></vzome-viewer-previous><vzome-viewer-next load-camera='true' label='next step'></vzome-viewer-next></div></div>"; 23747 viewerParameters = "indexed='true'"; 23748 break; 23749 } 23750 ; 23751 case "menu": 23752 case "menu (named)": 23753 { 23754 viewerParameters = "show-scenes='named'"; 23755 break; 23756 } 23757 ; 23758 case "menu (all)": 23759 { 23760 viewerParameters = "show-scenes='all'"; 23761 break; 23762 } 23763 ; 23764 case "javascript": 23765 { 23766 viewerParameters = "id='vzome-viewer' reactive='false'";
23767 viewerScript = "<script type='module'>\n const viewer = document.querySelector( '#vzome-viewer' );\n // viewer.scene = 'your scene';\n viewer.update();\n<\/script>\n"; 23768 break; 23769 } 23770 ; 23771 case "zometool": 23772 { 23773 componentTemplate = instructionsTemplate; 23774 postLayout = "zometool"; 23775 simpleLayout = "zometool"; 23776 break; 23777 } 23778 ; 23779 default: 23780 break; 23781 } 23782 const siteUrl = "https://" + orgName + ".github.io/" + repoName; 23783 const repoUrl = "https://github.com/" + orgName + "/" + repoName; 23784 const gitUrl = repoUrl + "/tree/" + branchName + "/" + assetPath; 23785 const rawUrl = "https://raw.githubusercontent.com/" + orgName + "/" + repoName + "/" + branchName + "/" + designPath; 23786 const postUrl = siteUrl + "/" + postPath; 23787 const postSrcUrl = repoUrl + "/edit/" + branchName + "/" + postSrcPath; 23788 const indexSrcUrl = repoUrl + "/edit/" + branchName + "/" + assetPath + "index.md"; 23789 const descriptionClean = ( 23790 /* replace */ 23791 /* replace */ 23792 description.split("\n").join(" ").split("\r").join(" ") 23793 ); 23794 const viewerComponent = ( 23795 /* replace */ 23796 /* replace */ 23797 /* replace */ 23798 /* replace */ 23799 /* replace */ 23800 componentTemplate.split("${siteUrl}").join(siteUrl).split("${imagePath}").join(imagePath).split("${designPath}").join(designPath).split("${viewerControls}").join(viewerControls).split("${viewerParameters}").join(viewerParameters) 23801 ); 23802 const indexTemplate = ResourceLoader.loadStringResource("com/vzome/core/exporters/github/indexTemplate.md"); 23803 let indexMd = ( 23804 /* replace */ 23805 /* replace */ 23806 /* replace */ 23807 /* replace */ 23808 /* replace */ 23809 /* replace */ 23810 /* replace */ 23811 indexTemplate.split("${simpleLayout}").join(simpleLayout).split("${viewerComponent}").join(viewerComponent).split("${title}").join(title).split("${description}").join(descriptionClean).split("${siteUrl}").join(siteUrl).split("${imagePath}").join(imagePath).split("${assetsUrl}").join(gitUrl) 23812 ); 23813 if (viewerScript !== "") indexMd = indexMd + viewerScript; 23814 this.handler.addEntry(assetPath + "index.md", indexMd, "utf-8"); 23815 const readmeTemplate = ResourceLoader.loadStringResource("com/vzome/core/exporters/github/readmeTemplate.md"); 23816 let readmeMd = ( 23817 /* replace */ 23818 /* replace */ 23819 /* replace */ 23820 /* replace */ 23821 /* replace */ 23822 /* replace */ 23823 /* replace */ 23824 /* replace */ 23825 readmeTemplate.split("${viewerComponent}").join(viewerComponent).split("${imageFile}").join(this.designName + ".png").split("${siteUrl}").join(siteUrl).split("${assetPath}").join(assetPath).split("${imagePath}").join(imagePath).split("${viewerScript}").join(viewerScript).split("${indexSrcUrl}").join(indexSrcUrl).split("${rawUrl}").join(rawUrl) 23826 ); 23827 if (blog) { 23828 const githubReadmeBlogPrefixTemplate = ResourceLoader.loadStringResource("com/vzome/core/exporters/github/readmeBlogPrefixTemplate.md"); 23829 const blogPostPrefix = ( 23830 /* replace */ 23831 /* replace */ 23832 githubReadmeBlogPrefixTemplate.split("${postUrl}").join(postUrl).split("${postSrcUrl}").join(postSrcUrl) 23833 ); 23834 readmeMd = blogPostPrefix + readmeMd; 23835 const postTemplate = ResourceLoader.loadStringResource("com/vzome/core/exporters/github/postTemplate.md"); 23836 let postMd = ( 23837 /* replace */ 23838 /* replace */ 23839 /* replace */ 23840 /* replace */ 23841 /* replace */ 23842 /* replace */ 23843 /* replace */ 23844 /* replace */ 23845 /* replace */ 23846 postTemplate.split("${viewerComponent}").join(viewerComponent).split("${postLayout}").join(postLayout).split("${title}").join(title).split("${description}").join(descriptionClean).split("${published}").join(publish.toString()).split("${siteUrl}").join(siteUrl).split("${postPath}").join(postPath).split("${imagePath}").join(imagePath).split("${assetsUrl}").join(gitUrl) 23847 ); 23848 if (viewerScript !== "") postMd = postMd + viewerScript; 23849 this.handler.addEntry(postSrcPath, postMd, "utf-8"); 23850 } 23851 this.handler.addEntry(assetPath + "README.md", readmeMd, "utf-8"); 23852 return gitUrl; 23853 } 23854}; 23855GitHubShare["__class"] = "com.vzome.core.exporters.GitHubShare"; 23856
23857// src/worker/legacy/from-java/com/vzome/core/edits/AdjustSelectionByClass.ts 23858var AdjustSelectionByClass = class extends ChangeSelection { 23859 constructor(editor) { 23860 super(editor.getSelection()); 23861 this.ballAction = 0 /* IGNORE */; 23862 this.strutAction = 0 /* IGNORE */; 23863 this.panelAction = 0 /* IGNORE */; 23864 if (this.editor === void 0) { 23865 this.editor = null; 23866 } 23867 this.originLast = true; 23868 this.editor = editor; 23869 } 23870 /** 23871 * 23872 * @param {*} props 23873 */ 23874 configure(props) { 23875 const mode = props.get("mode"); 23876 if (mode != null) switch (mode) { 23877 case "selectBalls": 23878 this.ballAction = 1 /* SELECT */; 23879 break; 23880 case "selectStruts": 23881 this.strutAction = 1 /* SELECT */; 23882 break; 23883 case "selectPanels": 23884 this.panelAction = 1 /* SELECT */; 23885 break; 23886 case "deselectBalls": 23887 case "unselectBalls": 23888 this.ballAction = 2 /* DESELECT */; 23889 break; 23890 case "deselectStruts": 23891 this.strutAction = 2 /* DESELECT */; 23892 break; 23893 case "deselectPanels": 23894 this.panelAction = 2 /* DESELECT */; 23895 break; 23896 case "unselectStruts": 23897 case "unselectStrutsAndPanels": 23898 this.strutAction = 2 /* DESELECT */; 23899 this.panelAction = 2 /* DESELECT */; 23900 break; 23901 } 23902 } 23903 /** 23904 * 23905 */ 23906 perform() { 23907 const whichManifestationSet = this.ballAction === 1 /* SELECT */ || this.strutAction === 1 /* SELECT */ || this.panelAction === 1 /* SELECT */ ? this.editor.getRealizedModel() : this.mSelection; 23908 let originBall = null; 23909 for (let index = whichManifestationSet.iterator(); index.hasNext(); ) { 23910 let man = index.next(); 23911 { 23912 if (man.isRendered()) { 23913 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) { 23914 if (this.originLast && originBall == null && this.ballAction === 1 /* SELECT */ && man.getLocation().isOrigin()) { 23915 originBall = man; 23916 } else { 23917 this.adjustSelection(man, this.ballAction); 23918 } 23919 } else if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) { 23920 this.adjustSelection(man, this.strutAction); 23921 } else if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0)) { 23922 this.adjustSelection(man, this.panelAction); 23923 } 23924 } 23925 } 23926 } 23927 if (originBall != null) { 23928 const ignoreGroups = true; 23929 if (this.mSelection.manifestationSelected(originBall)) { 23930 this.unselect$com_vzome_core_model_Manifestation$boolean(originBall, ignoreGroups); 23931 this.redo(); 23932 } 23933 this.select$com_vzome_core_model_Manifestation$boolean(originBall, ignoreGroups); 23934 } 23935 this.redo(); 23936 } 23937 /** 23938 * 23939 * @param {*} element 23940 */ 23941 getXmlAttributes(element) { 23942 element.setAttribute( 23943 "balls", 23944 /* Enum.name */ 23945 ActionEnum[this.ballAction] 23946 ); 23947 element.setAttribute( 23948 "struts", 23949 /* Enum.name */ 23950 ActionEnum[this.strutAction] 23951 ); 23952 element.setAttribute( 23953 "panels", 23954 /* Enum.name */ 23955 ActionEnum[this.panelAction] 23956 ); 23957 if (this.originLast) { 23958 element.setAttribute("originLast", "true"); 23959 } 23960 } 23961 /** 23962 * 23963 * @param {*} xml 23964 * @param {XmlSaveFormat} format 23965 */ 23966 setXmlAttributes(xml, format) { 23967 if (xml.getLocalName() === "DeselectByClass") { 23968 if (xml.getAttribute("class") === "balls") { 23969 this.ballAction = 2 /* DESELECT */; 23970 this.strutAction = 0 /* IGNORE */; 23971 this.panelAction = 0 /* IGNORE */; 23972 } else { 23973 this.ballAction = 0 /* IGNORE */; 23974 this.strutAction = 2 /* DESELECT */; 23975 this.panelAction = 2 /* DESELECT */; 23976 } 23977 } else { 23978 this.ballAction = ActionEnum[xml.getAttribute("balls")]; 23979 this.strutAction = ActionEnum[xml.getAttribute("struts")]; 23980 this.panelAction = ActionEnum[xml.getAttribute("panels")]; 23981 } 23982 const mode = xml.getAttribute("originLast"); 23983 this.originLast = "true" === mode; 23984 } 23985 /** 23986 * 23987 * @return {string} 23988 */ 23989 getXmlElementName() { 23990 return "AdjustSelectionByClass"; 23991 } 23992}; 23993AdjustSelectionByClass["__class"] = "com.vzome.core.edits.AdjustSelectionByClass"; 23994
23995// src/worker/legacy/from-java/com/vzome/core/edits/AdjustSelectionByOrbitLength.ts 23996var AdjustSelectionByOrbitLength = class extends ChangeSelection { 23997 constructor(editor) { 23998 super(editor.getSelection()); 23999 if (this.orbit === void 0) { 24000 this.orbit = null; 24001 } 24002 if (this.length === void 0) { 24003 this.length = null; 24004 } 24005 if (this.symmetry === void 0) { 24006 this.symmetry = null; 24007 } 24008 this.strutAction = 0 /* IGNORE */; 24009 this.panelAction = 0 /* IGNORE */; 24010 if (this.editor === void 0) { 24011 this.editor = null; 24012 } 24013 this.symmetry = editor["getSymmetrySystem$"](); 24014 this.editor = editor; 24015 } 24016 /** 24017 * 24018 * @param {*} props 24019 */ 24020 configure(props) { 24021 const mode = props.get("mode"); 24022 const strut = props.get("picked"); 24023 this.orbit = props.get("orbit"); 24024 this.length = props.get("length"); 24025 if (mode != null) switch (mode) { 24026 case "selectSimilarStruts": 24027 this.strutAction = 1 /* SELECT */; 24028 break; 24029 case "selectSimilarPanels": 24030 this.panelAction = 1 /* SELECT */; 24031 break; 24032 case "deselectSimilarStruts": 24033 this.strutAction = 2 /* DESELECT */; 24034 break; 24035 case "deselectSimilarPanels": 24036 this.panelAction = 2 /* DESELECT */; 24037 break; 24038 } 24039 if (strut != null) { 24040 const offset = strut.getOffset(); 24041 const zone = this.symmetry.getAxis(offset); 24042 this.orbit = zone.getOrbit(); 24043 this.length = zone.getLength(offset); 24044 } 24045 } 24046 /** 24047 * 24048 */ 24049 perform() { 24050 const whichManifestationSet = this.strutAction === 1 /* SELECT */ || this.panelAction === 1 /* SELECT */ ? this.editor.getRealizedModel() : this.mSelection; 24051 for (let index = whichManifestationSet.iterator(); index.hasNext(); ) { 24052 let man = index.next(); 24053 { 24054 if (man.isRendered()) { 24055 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) { 24056 const offset = man.getOffset(); 24057 const zone = this.symmetry.getAxis(offset); 24058 if (zone.getOrbit() === this.orbit) { 24059 if (this.length == null || /* equals */ 24060 ((o1, o2) => { 24061 if (o1 && o1.equals) { 24062 return o1.equals(o2); 24063 } else { 24064 return o1 === o2; 24065 } 24066 })(this.length, zone.getLength(offset))) { 24067 this.adjustSelection(man, this.strutAction); 24068 } 24069 } 24070 } else if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0)) { 24071 const zone = this.symmetry.getAxis(man["getNormal$"]()); 24072 if (zone.getOrbit() === this.orbit) { 24073 this.adjustSelection(man, this.panelAction); 24074 } 24075 } 24076 } 24077 } 24078 } 24079 this.redo(); 24080 } 24081 /** 24082 * 24083 * @return {string} 24084 */ 24085 getXmlElementName() { 24086 return "AdjustSelectionByOrbitLength"; 24087 } 24088 /** 24089 * 24090 * @param {*} element 24091 */ 24092 getXmlAttributes(element) { 24093 if (this.symmetry != null) { 24094 DomUtils.addAttribute(element, "symmetry", this.symmetry.getName()); 24095 } 24096 if (this.orbit != null) { 24097 DomUtils.addAttribute(element, "orbit", this.orbit.getName()); 24098 } 24099 if (this.length != null) { 24100 XmlSaveFormat.serializeNumber(element, "length", this.length); 24101 } 24102 element.setAttribute( 24103 "struts", 24104 /* Enum.name */ 24105 ActionEnum[this.strutAction] 24106 ); 24107 element.setAttribute( 24108 "panels", 24109 /* Enum.name */ 24110 ActionEnum[this.panelAction] 24111 ); 24112 } 24113 /** 24114 * 24115 * @param {*} xml 24116 * @param {XmlSaveFormat} format 24117 */ 24118 setXmlAttributes(xml, format) { 24119 this.symmetry = this.editor["getSymmetrySystem$java_lang_String"](xml.getAttribute("symmetry")); 24120 this.length = format.parseNumber(xml, "length"); 24121 this.orbit = this.symmetry.getOrbits().getDirection(xml.getAttribute("orbit")); 24122 if (xml.getLocalName() === "SelectSimilarSize") { 24123 this.strutAction = 1 /* SELECT */; 24124 this.panelAction = 0 /* IGNORE */; 24125 } else { 24126 this.strutAction = ActionEnum[xml.getAttribute("struts")]; 24127 this.panelAction = ActionEnum[xml.getAttribute("panels")]; 24128 } 24129 } 24130}; 24131AdjustSelectionByOrbitLength["__class"] = "com.vzome.core.edits.AdjustSelectionByOrbitLength"; 24132
24133// src/worker/legacy/from-java/com/vzome/core/edits/AffineHeptagon.ts 24134var AffineHeptagon = class extends ChangeManifestations { 24135 /** 24136 * 24137 */ 24138 perform() { 24139 const errorMsg = "Affine heptagon command requires two selected struts with a common vertex."; 24140 let strut1 = null; 24141 let strut2 = null; 24142 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 24143 let man = index.next(); 24144 { 24145 this.unselect$com_vzome_core_model_Manifestation(man); 24146 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) { 24147 if (strut1 == null) { 24148 strut1 = man; 24149 } else if (strut2 == null) { 24150 strut2 = man; 24151 } else { 24152 this.fail(errorMsg); 24153 } 24154 } 24155 } 24156 } 24157 if (strut1 == null || strut2 == null) { 24158 this.fail(errorMsg); 24159 } 24160 const field5 = strut1.getLocation().getField(); 24161 this.redo(); 24162 const s1 = strut1.getFirstConstruction(); 24163 const s2 = strut2.getFirstConstruction(); 24164 this.manifestConstruction(new SegmentEndPoint(s1, true)); 24165 this.manifestConstruction(new SegmentEndPoint(s1, false)); 24166 this.manifestConstruction(new SegmentEndPoint(s2, true)); 24167 this.manifestConstruction(new SegmentEndPoint(s2, false)); 24168 this.redo(); 24169 let offset1 = s1.getOffset(); 24170 let offset2 = s2.getOffset(); 24171 let v0 = null; 24172 let v1 = null; 24173 let v2 = null; 24174 { 24175 const s1s = s1.getStart(); 24176 const s1e = s1.getEnd(); 24177 const s2s = s2.getStart(); 24178 const s2e = s2.getEnd(); 24179 if (s1s.equals(s2s)) { 24180 v0 = s1s; 24181 v1 = s1e; 24182 v2 = s2e; 24183 } else if (s1e.equals(s2s)) { 24184 v0 = s1e; 24185 v1 = s1s; 24186 v2 = s2e; 24187 offset1 = offset1.negate(); 24188 } else if (s1e.equals(s2e)) { 24189 v0 = s1e; 24190 v1 = s1s; 24191 v2 = s2s; 24192 offset2 = offset2.negate(); 24193 offset1 = offset1.negate(); 24194 } else if (s1s.equals(s2e)) { 24195 v0 = s1s; 24196 v1 = s1e; 24197 v2 = s2s; 24198 offset2 = offset2.negate(); 24199 } else { 24200 this.fail(errorMsg); 24201 } 24202 } 24203 ; 24204 let c0 = null; 24205 let c1 = null; 24206 let c2 = null; 24207 let p1 = null; 24208 let p2 = null; 24209 for (let index = this.mManifestations.iterator(); index.hasNext(); ) { 24210 let man = index.next(); 24211 { 24212 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) { 24213 const loc = man.getLocation(); 24214 if (loc.equals(v0)) { 24215 c0 = man; 24216 } else if (loc.equals(v1)) { 24217 c1 = man; 24218 p1 = man.getFirstConstruction(); 24219 } else if (loc.equals(v2)) { 24220 c2 = man; 24221 p2 = man.getFirstConstruction(); 24222 } 24223 } 24224 } 24225 } 24226 const sigma = field5["createAlgebraicNumber$int_A"]([0, 0, 1]); 24227 const rho = field5["createAlgebraicNumber$int_A"]([0, 1, 0]); 24228 const p3 = new TransformedPoint(new Translation(offset1.scale(sigma)), p2); 24229 const p4 = new TransformedPoint(new Translation(offset2.scale(sigma)), p1); 24230 const p5 = new TransformedPoint(new Translation(offset1.scale(rho)), p4); 24231 const p6 = new TransformedPoint(new Translation(offset2.scale(rho)), p3); 24232 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new SegmentJoiningPoints(p1, p3))); 24233 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new SegmentJoiningPoints(p3, p5))); 24234 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new SegmentJoiningPoints(p5, p6))); 24235 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new SegmentJoiningPoints(p6, p4))); 24236 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new SegmentJoiningPoints(p4, p2))); 24237 this.select$com_vzome_core_model_Manifestation(c0); 24238 this.select$com_vzome_core_model_Manifestation(c1); 24239 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(p3)); 24240 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(p5)); 24241 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(p6)); 24242 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(p4)); 24243 this.select$com_vzome_core_model_Manifestation(c2); 24244 this.redo(); 24245 } 24246 constructor(editorModel) { 24247 super(editorModel); 24248 } 24249 /** 24250 * 24251 * @return {string} 24252 */ 24253 getXmlElementName() { 24254 return "AffineHeptagon"; 24255 } 24256}; 24257AffineHeptagon["__class"] = "com.vzome.core.edits.AffineHeptagon"; 24258
24259// src/worker/legacy/from-java/com/vzome/core/edits/AffinePolygon.ts 24260var AffinePolygon = class extends ChangeManifestations { 24261 /** 24262 * Intended to be used for listing the valid modes for making an "Affine Polygon" submenu 24263 * @param {*} field 24264 * @return 24265 * @return {*} 24266 */ 24267 static getPolygonModes(field5) { 24268 const modes = new java.util.TreeMap(); 24269 modes.put(2, "Parabola"); 24270 modes.put(3, "Triangle"); 24271 modes.put(4, "Square"); 24272 if (field5.getGoldenRatio() != null) { 24273 modes.put(5, "Pentagon"); 24274 } 24275 modes.put(6, "Hexagon"); 24276 if (field5.getName() === "heptagon") { 24277 modes.put(7, "Heptagon"); 24278 } else if ( 24279 /* startsWith */ 24280 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(field5.getName(), "polygon") 24281 ) { 24282 const polygonSides = field5.polygonSides(); 24283 for (let nSides = 7; nSides <= polygonSides; nSides++) { 24284 { 24285 if ((polygonSides / nSides | 0) * nSides === polygonSides) { 24286 let label; 24287 switch (nSides) { 24288 case 7: 24289 label = "Heptagon"; 24290 break; 24291 case 8: 24292 label = "Octagon"; 24293 break; 24294 case 9: 24295 label = "Nonagon"; 24296 break; 24297 case 10: 24298 label = "Decagon"; 24299 break; 24300 case 12: 24301 label = "Dodecagon"; 24302 break; 24303 default: 24304 label = nSides + "-gon"; 24305 break; 24306 } 24307 modes.put(nSides, label); 24308 } 24309 } 24310 ; 24311 } 24312 } 24313 return modes; 24314 } 24315 /** 24316 * 24317 * @param {*} props 24318 */ 24319 configure(props) { 24320 this.setMode(props.get("mode")); 24321 if (this.mode == null || /* isEmpty */ 24322 this.mode.length === 0) { 24323 this.errorMsg.append("\nMode is not specified."); 24324 } 24325 if (this.nSides < 2) { 24326 this.errorMsg.append("\nThe number of sides must be greater than 1."); 24327 } 24328 if (this.chordRatio == null) { 24329 this.errorMsg.append("\nUnsupported chord ratio."); 24330 } 24331 if (this.errorMsg.length() !== 0) { 24332 this.errorMsg.insert(0, " configuration error(s)"); 24333 this.errorMsg.insert(0, this.getXmlElementName()); 24334 } 24335 } 24336 /*private*/ 24337 setMode(newMode) { 24338 this.mode = newMode; 24339 if (this.mode != null && !/* isEmpty */ 24340 (this.mode.length === 0)) { 24341 try { 24342 this.nSides = javaemul.internal.IntegerHelper.parseInt(this.mode); 24343 } catch (e) { 24344 if (ChangeSelection.logger_$LI$().isLoggable(java.util.logging.Level.WARNING)) { 24345 ChangeSelection.logger_$LI$().warning(this.getXmlElementName() + ': Invalid mode "' + this.mode + '".\nMode should be an integer greater than one.'); 24346 } 24347 } 24348 } 24349 switch (this.nSides) { 24350 case 2: 24351 this.chordRatio = this.field["createRational$long"](3); 24352 break; 24353 case 3: 24354 this.chordRatio = this.field.zero(); 24355 break; 24356 case 4: 24357 this.chordRatio = this.field.one(); 24358 break; 24359 case 5: 24360 this.chordRatio = this.field.getGoldenRatio(); 24361 break; 24362 case 6: 24363 this.chordRatio = this.field["createRational$long"](2); 24364 break; 24365 default: 24366 if (this.nSides === 7 && this.field.getName() === "heptagon") { 24367 this.chordRatio = this.field.getUnitTerm(2); 24368 } else if (this.nSides >= 7 && /* startsWith */ 24369 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(this.field.getName(), "polygon")) { 24370 const pField = this.field; 24371 const polygonSides = pField.polygonSides(); 24372 const step = polygonSides / this.nSides | 0; 24373 if (step * this.nSides === polygonSides) { 24374 const diag0 = pField.getUnitDiagonal(step - 1); 24375 const diag2 = pField.getUnitDiagonal(step * 3 - 1); 24376 this.chordRatio = diag2.dividedBy(diag0); 24377 } 24378 } 24379 break; 24380 } 24381 } 24382 /** 24383 * 24384 */ 24385 perform() { 24386 if (this.errorMsg.length() !== 0) { 24387 this.fail(this.errorMsg.toString()); 24388 } 24389 this.errorMsg.append(this.getXmlElementName()).append(" requires two non-parallel struts with a common end point.\n"); 24390 let strut1 = null; 24391 let strut2 = null; 24392 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 24393 let man = index.next(); 24394 { 24395 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) { 24396 if (strut1 == null) { 24397 strut1 = man; 24398 } else if (strut2 == null) { 24399 strut2 = man; 24400 } else { 24401 this.fail(this.errorMsg.append("\nToo many struts are selected.").toString()); 24402 } 24403 } 24404 this.unselect$com_vzome_core_model_Manifestation(man); 24405 } 24406 } 24407 if (strut2 == null) { 24408 this.fail(this.errorMsg.append(strut1 == null ? "\nNo struts are selected." : "\nOnly one strut is selected.").toString()); 24409 } 24410 let offset1 = strut1.getOffset(); 24411 let offset2 = strut2.getOffset(); 24412 if (AlgebraicVectors.areParallel(offset1, offset2)) { 24413 this.fail(this.errorMsg.append("\nStruts are parallel or collinear.").toString()); 24414 } 24415 let pCommon = null; 24416 let pStart = null; 24417 let pEnd = null; 24418 const seg1 = strut1.getFirstConstruction(); 24419 const seg2 = strut2.getFirstConstruction(); 24420 { 24421 const s1 = strut1.getLocation(); 24422 const e1 = strut1.getEnd(); 24423 const s2 = strut2.getLocation(); 24424 const e2 = strut2.getEnd(); 24425 if (s1.equals(s2)) { 24426 pStart = new SegmentEndPoint(seg1, false); 24427 pCommon = new SegmentEndPoint(seg2, true); 24428 pEnd = new SegmentEndPoint(seg2, false); 24429 } else if (s1.equals(e2)) { 24430 offset2 = offset2.negate(); 24431 pStart = new SegmentEndPoint(seg1, false); 24432 pCommon = new SegmentEndPoint(seg2, false); 24433 pEnd = new SegmentEndPoint(seg2, true); 24434 } else if (e1.equals(s2)) { 24435 offset1 = offset1.negate(); 24436 pStart = new SegmentEndPoint(seg1, true); 24437 pCommon = new SegmentEndPoint(seg2, true); 24438 pEnd = new SegmentEndPoint(seg2, false); 24439 } else if (e1.equals(e2)) { 24440 offset1 = offset1.negate(); 24441 offset2 = offset2.negate(); 24442 pStart = new SegmentEndPoint(seg1, true); 24443 pCommon = new SegmentEndPoint(seg2, false); 24444 pEnd = new SegmentEndPoint(seg2, true); 24445 } else { 24446 this.errorMsg.append("\nStruts do not have a common end point."); 24447 this.fail(this.errorMsg.toString()); 24448 } 24449 } 24450 ; 24451 const vBegin = pStart.getLocation(); 24452 this.redo(); 24453 const man0 = this.manifestConstruction(pStart); 24454 const man1 = this.manifestConstruction(seg1); 24455 if (this.nSides !== 2) { 24456 this.select$com_vzome_core_model_Manifestation(man0); 24457 this.select$com_vzome_core_model_Manifestation(man1); 24458 } 24459 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(pCommon)); 24460 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(seg2)); 24461 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(pEnd)); 24462 for (let i = this.nSides === 2 ? 1 : 2; i < this.nSides; i++) { 24463 { 24464 const translateByChordRatio = offset2.scale(this.chordRatio); 24465 const pNew = new TransformedPoint(new Translation(translateByChordRatio), pStart); 24466 const segNew = new SegmentJoiningPoints(pEnd, pNew); 24467 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(segNew)); 24468 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(pNew)); 24469 if (pNew.getLocation().equals(vBegin)) { 24470 if (i + 1 < this.nSides) { 24471 if (ChangeSelection.logger_$LI$().isLoggable(java.util.logging.Level.INFO)) { 24472 ChangeSelection.logger_$LI$().info(this.getXmlElementName() + ": actual reps = " + (i + 1) + ", not " + this.nSides + " as specified."); 24473 } 24474 } 24475 } 24476 pStart = pCommon; 24477 offset1 = offset2.negate(); 24478 pCommon = pEnd; 24479 offset2 = segNew.getOffset(); 24480 pEnd = pNew; 24481 } 24482 ; 24483 } 24484 this.redo(); 24485 } 24486 constructor(editorModel) { 24487 super(editorModel); 24488 this.errorMsg = new java.lang.StringBuilder(); 24489 if (this.field === void 0) { 24490 this.field = null; 24491 } 24492 if (this.chordRatio === void 0) { 24493 this.chordRatio = null; 24494 } 24495 this.mode = null; 24496 this.nSides = 0; 24497 this.setOrderedSelection(true); 24498 this.field = editorModel["getSymmetrySystem$"]().getSymmetry().getField(); 24499 } 24500 /** 24501 * 24502 * @return {string} 24503 */ 24504 getXmlElementName() { 24505 return "AffinePolygon"; 24506 } 24507 /** 24508 * 24509 * @param {*} element 24510 */ 24511 getXmlAttributes(element) { 24512 if (this.mode != null) { 24513 element.setAttribute("mode", this.mode); 24514 } 24515 } 24516 /** 24517 * 24518 * @param {*} xml 24519 * @param {XmlSaveFormat} format 24520 */ 24521 setXmlAttributes(xml, format) { 24522 this.setMode(xml.getAttribute("mode")); 24523 } 24524}; 24525AffinePolygon["__class"] = "com.vzome.core.edits.AffinePolygon"; 24526
24527// src/worker/legacy/from-java/com/vzome/core/edits/AffineTransformAll.ts 24528var AffineTransformAll = class extends ChangeManifestations { 24529 constructor(editorModel) { 24530 super(editorModel); 24531 if (this.center === void 0) { 24532 this.center = null; 24533 } 24534 this.center = editorModel.getCenterPoint(); 24535 } 24536 /** 24537 * 24538 */ 24539 perform() { 24540 let s1 = null; 24541 let s2 = null; 24542 let s3 = null; 24543 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 24544 let man = index.next(); 24545 { 24546 this.unselect$com_vzome_core_model_Manifestation(man); 24547 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) { 24548 if (s1 == null) s1 = man.getFirstConstruction(); 24549 else if (s2 == null) s2 = man.getFirstConstruction(); 24550 else if (s3 == null) s3 = man.getFirstConstruction(); 24551 } 24552 } 24553 } 24554 if (s3 == null || s2 == null || s1 == null) throw new Command.Failure("three struts required"); 24555 this.redo(); 24556 const transform = new ChangeOfBasis(s1, s2, s3, this.center, true); 24557 for (let index = this.mManifestations.iterator(); index.hasNext(); ) { 24558 let m = index.next(); 24559 { 24560 if (!m.isRendered()) continue; 24561 const c = m.getFirstConstruction(); 24562 const result = transform.transform$com_vzome_core_construction_Construction(c); 24563 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(result)); 24564 } 24565 } 24566 this.redo(); 24567 } 24568 /** 24569 * 24570 * @return {string} 24571 */ 24572 getXmlElementName() { 24573 return "AffineTransformAll"; 24574 } 24575}; 24576AffineTransformAll["__class"] = "com.vzome.core.edits.AffineTransformAll"; 24577
24578// src/worker/legacy/from-java/com/vzome/core/edits/B4Polytope.ts 24579var B4Polytope = class _B4Polytope extends ChangeManifestations { 24580 constructor(editorModel, symmAxis, index) { 24581 if ((editorModel != null && (editorModel.constructor != null && editorModel.constructor["__interfaces"] != null && editorModel.constructor["__interfaces"].indexOf("com.vzome.core.editor.api.EditorModel") >= 0) || editorModel === null) && (symmAxis != null && symmAxis instanceof Segment || symmAxis === null) && (typeof index === "number" || index === null)) { 24582 let __args = arguments; 24583 super(editorModel); 24584 if (this.index === void 0) { 24585 this.index = 0; 24586 } 24587 if (this.proj === void 0) { 24588 this.proj = null; 24589 } 24590 if (this.symmAxis === void 0) { 24591 this.symmAxis = null; 24592 } 24593 if (this.field === void 0) { 24594 this.field = null; 24595 } 24596 this.field = this.mManifestations.getField(); 24597 this.index = index; 24598 this.symmAxis = symmAxis; 24599 } else if ((editorModel != null && (editorModel.constructor != null && editorModel.constructor["__interfaces"] != null && editorModel.constructor["__interfaces"].indexOf("com.vzome.core.editor.api.EditorModel") >= 0) || editorModel === null) && symmAxis === void 0 && index === void 0) { 24600 let __args = arguments; 24601 { 24602 let __args2 = arguments; 24603 let symmAxis2 = null; 24604 let index2 = 0; 24605 super(editorModel); 24606 if (this.index === void 0) { 24607 this.index = 0; 24608 } 24609 if (this.proj === void 0) { 24610 this.proj = null; 24611 } 24612 if (this.symmAxis === void 0) { 24613 this.symmAxis = null; 24614 } 24615 if (this.field === void 0) { 24616 this.field = null; 24617 } 24618 this.field = this.mManifestations.getField(); 24619 this.index = index2; 24620 this.symmAxis = symmAxis2; 24621 } 24622 } else throw new Error("invalid overload"); 24623 } 24624 /** 24625 * 24626 * @return {string} 24627 */ 24628 getXmlElementName() { 24629 return "B4Polytope"; 24630 } 24631 /** 24632 * 24633 * @param {*} result 24634 */ 24635 getXmlAttributes(result) { 24636 DomUtils.addAttribute(result, "dynkin", DomUtils.byteToBinary(this.index)); 24637 if (this.symmAxis != null) XmlSaveFormat.serializeSegment(result, "start", "end", this.symmAxis); 24638 } 24639 /** 24640 * 24641 * @param {*} xml 24642 * @param {XmlSaveFormat} format 24643 */ 24644 setXmlAttributes(xml, format) { 24645 const binary = xml.getAttribute("dynkin"); 24646 this.index = javaemul.internal.IntegerHelper.parseInt(binary, 2); 24647 if (format.commandEditsCompacted()) this.symmAxis = format.parseSegment$org_w3c_dom_Element$java_lang_String$java_lang_String(xml, "start", "end"); 24648 else { 24649 const attrs = format.loadCommandAttributes$org_w3c_dom_Element(xml); 24650 this.symmAxis = attrs.get("rotation"); 24651 } 24652 } 24653 /** 24654 * 24655 */ 24656 perform() { 24657 if (this.symmAxis == null) this.proj = new Projection.Default(this.field); 24658 else { 24659 const scale = this.field["createPower$int"](-5); 24660 this.proj = new QuaternionProjection(this.field, null, this.symmAxis.getOffset().scale(scale)); 24661 } 24662 const edgeScales = [null, null, null, null]; 24663 for (let i = 0; i < edgeScales.length; i++) { 24664 { 24665 edgeScales[i] = this.field.one(); 24666 } 24667 ; 24668 } 24669 const group = new B4Group(this.field); 24670 WythoffConstruction.constructPolytope(group, this.index, this.index, edgeScales, group, new _B4Polytope.WythoffListener(this, this.field)); 24671 this.redo(); 24672 } 24673}; 24674B4Polytope["__class"] = "com.vzome.core.edits.B4Polytope"; 24675((B4Polytope2) => { 24676 class WythoffListener { 24677 constructor(__parent, field5) { 24678 this.__parent = __parent; 24679 this.numVertices = 0; 24680 if (this.scale === void 0) { 24681 this.scale = null; 24682 } 24683 this.scale = field5["createPower$int"](5); 24684 } 24685 /** 24686 * 24687 * @param {*} p1 24688 * @param {*} p2 24689 * @return {*} 24690 */ 24691 addEdge(p1, p2) { 24692 const edge = new SegmentJoiningPoints(p1, p2); 24693 this.__parent.manifestConstruction(edge); 24694 return edge; 24695 } 24696 /** 24697 * 24698 * @param {java.lang.Object[]} vertices 24699 * @return {*} 24700 */ 24701 addFace(vertices) { 24702 return null; 24703 } 24704 /** 24705 * 24706 * @param {AlgebraicVector} vertex 24707 * @return {*} 24708 */ 24709 addVertex(vertex) { 24710 let projected = vertex; 24711 if (this.__parent.proj != null) projected = this.__parent.proj.projectImage(vertex, true); 24712 const p = new FreePoint(projected.scale(this.scale)); 24713 p.setIndex(this.numVertices++); 24714 this.__parent.manifestConstruction(p); 24715 return p; 24716 } 24717 } 24718 B4Polytope2.WythoffListener = WythoffListener; 24719 WythoffListener["__class"] = "com.vzome.core.edits.B4Polytope.WythoffListener"; 24720 WythoffListener["__interfaces"] = ["com.vzome.core.math.symmetry.WythoffConstruction.Listener"]; 24721})(B4Polytope || (B4Polytope = {})); 24722
24723// src/worker/legacy/from-java/com/vzome/core/edits/ColorManifestations.ts 24724var ColorManifestations = class extends ChangeManifestations { 24725 constructor(editorModel) { 24726 super(editorModel); 24727 if (this.color === void 0) { 24728 this.color = null; 24729 } 24730 } 24731 /** 24732 * 24733 * @param {*} props 24734 */ 24735 configure(props) { 24736 const mode = props.get("mode"); 24737 if (mode != null) this.initialize(new Color(mode)); 24738 } 24739 /*private*/ 24740 initialize(color) { 24741 this.color = color; 24742 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 24743 let m = index.next(); 24744 { 24745 if (m.isRendered()) this.colorManifestation(m, color); 24746 this.unselect$com_vzome_core_model_Manifestation$boolean(m, true); 24747 } 24748 } 24749 } 24750 /** 24751 * 24752 * @param {*} result 24753 */ 24754 getXmlAttributes(result) { 24755 result.setAttribute("red", "" + this.color.getRed()); 24756 result.setAttribute("green", "" + this.color.getGreen()); 24757 result.setAttribute("blue", "" + this.color.getBlue()); 24758 const alpha = this.color.getAlpha(); 24759 if (alpha < 255) result.setAttribute("alpha", "" + alpha); 24760 } 24761 /** 24762 * 24763 * @param {*} xml 24764 * @param {XmlSaveFormat} format 24765 */ 24766 setXmlAttributes(xml, format) { 24767 if (format.loadToRender()) { 24768 const red = xml.getAttribute("red"); 24769 const green = xml.getAttribute("green"); 24770 const blue = xml.getAttribute("blue"); 24771 const alphaStr = xml.getAttribute("alpha"); 24772 const alpha = alphaStr == null || /* isEmpty */ 24773 alphaStr.length === 0 ? 255 : javaemul.internal.IntegerHelper.parseInt(alphaStr); 24774 this.initialize(new Color(javaemul.internal.IntegerHelper.parseInt(red), javaemul.internal.IntegerHelper.parseInt(green), javaemul.internal.IntegerHelper.parseInt(blue), alpha)); 24775 } else this.initialize(null); 24776 } 24777 /** 24778 * 24779 * @return {string} 24780 */ 24781 getXmlElementName() { 24782 return "setItemColor"; 24783 } 24784}; 24785ColorManifestations["__class"] = "com.vzome.core.edits.ColorManifestations"; 24786
24787// src/worker/legacy/from-java/com/vzome/core/edits/ColorMappers.ts 24788var ColorMappers = class { 24789}; 24790ColorMappers["__class"] = "com.vzome.core.edits.ColorMappers"; 24791
24792// src/worker/legacy/from-java/com/vzome/core/edits/ConvexHull.ts 24793var ConvexHull = class extends ChangeManifestations { 24794 constructor(editorModel) { 24795 super(editorModel); 24796 } 24797 getSelectedVertexSet(unselectAll) { 24798 const vertexSet = new java.util.HashSet(); 24799 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 24800 let man = index.next(); 24801 { 24802 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) { 24803 vertexSet.add(man.getLocation()); 24804 } else if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) { 24805 vertexSet.add(man.getLocation()); 24806 vertexSet.add(man.getEnd()); 24807 } else if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0)) { 24808 for (let index2 = man.iterator(); index2.hasNext(); ) { 24809 let vertex = index2.next(); 24810 { 24811 vertexSet.add(vertex); 24812 } 24813 } 24814 } 24815 if (unselectAll) { 24816 this.unselect$com_vzome_core_model_Manifestation(man); 24817 } 24818 } 24819 } 24820 return vertexSet; 24821 } 24822}; 24823ConvexHull["__class"] = "com.vzome.core.edits.ConvexHull"; 24824
24825// src/worker/legacy/from-java/com/vzome/core/edits/ConvexHull2d.ts 24826var ConvexHull2d = class _ConvexHull2d extends ConvexHull { 24827 static { 24828 this.NAME = "ConvexHull2d"; 24829 } 24830 constructor(editorModel) { 24831 super(editorModel); 24832 } 24833 /** 24834 * 24835 * @return {string} 24836 */ 24837 getXmlElementName() { 24838 return _ConvexHull2d.NAME; 24839 } 24840 /** 24841 * 24842 */ 24843 perform() { 24844 const hull2d = GrahamScan2D.buildHull(this.getSelectedVertexSet(true)); 24845 this.redo(); 24846 const vertices = ((s) => { 24847 let a = []; 24848 while (s-- > 0) a.push(null); 24849 return a; 24850 })(hull2d.length); 24851 let p = 0; 24852 const pointMap = new java.util.HashMap(hull2d.length); 24853 for (let index = 0; index < hull2d.length; index++) { 24854 let vertex = hull2d[index]; 24855 { 24856 const point = new FreePoint(vertex); 24857 pointMap.put(vertex, point); 24858 vertices[p++] = point; 24859 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(point)); 24860 } 24861 } 24862 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new PolygonFromVertices(vertices))); 24863 let start = pointMap.get(hull2d[0]); 24864 for (let i = 1; i < hull2d.length; i++) { 24865 { 24866 const end2 = pointMap.get(hull2d[i]); 24867 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new SegmentJoiningPoints(start, end2))); 24868 start = end2; 24869 } 24870 ; 24871 } 24872 const end = pointMap.get(hull2d[0]); 24873 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new SegmentJoiningPoints(start, end))); 24874 this.redo(); 24875 } 24876}; 24877ConvexHull2d["__class"] = "com.vzome.core.edits.ConvexHull2d"; 24878
24879// src/worker/legacy/from-java/com/vzome/core/math/convexhull/Vertex.ts 24880var Vertex = class { 24881 constructor(v, idx) { 24882 if (this.pnt === void 0) { 24883 this.pnt = null; 24884 } 24885 if (this.index === void 0) { 24886 this.index = 0; 24887 } 24888 if (this.prev === void 0) { 24889 this.prev = null; 24890 } 24891 if (this.next === void 0) { 24892 this.next = null; 24893 } 24894 if (this.face === void 0) { 24895 this.face = null; 24896 } 24897 this.pnt = v; 24898 this.index = idx; 24899 } 24900}; 24901Vertex["__class"] = "com.vzome.core.math.convexhull.Vertex"; 24902
24903// src/worker/legacy/from-java/com/vzome/core/math/convexhull/HalfEdge.ts 24904var HalfEdge = class { 24905 constructor(v, f) { 24906 if ((v != null && v instanceof Vertex || v === null) && (f != null && f instanceof Face || f === null)) { 24907 let __args = arguments; 24908 if (this.vertex === void 0) { 24909 this.vertex = null; 24910 } 24911 if (this.face === void 0) { 24912 this.face = null; 24913 } 24914 if (this.next === void 0) { 24915 this.next = null; 24916 } 24917 if (this.prev === void 0) { 24918 this.prev = null; 24919 } 24920 if (this.opposite === void 0) { 24921 this.opposite = null; 24922 } 24923 this.vertex = v; 24924 this.face = f; 24925 } else if (v === void 0 && f === void 0) { 24926 let __args = arguments; 24927 if (this.vertex === void 0) { 24928 this.vertex = null; 24929 } 24930 if (this.face === void 0) { 24931 this.face = null; 24932 } 24933 if (this.next === void 0) { 24934 this.next = null; 24935 } 24936 if (this.prev === void 0) { 24937 this.prev = null; 24938 } 24939 if (this.opposite === void 0) { 24940 this.opposite = null; 24941 } 24942 } else throw new Error("invalid overload"); 24943 } 24944 /** 24945 * Sets the value of the next edge adjacent (counter-clockwise) to this one 24946 * within the triangle. 24947 * 24948 * @param {HalfEdge} edge 24949 * next adjacent edge 24950 */ 24951 setNext(edge) { 24952 this.next = edge; 24953 } 24954 /** 24955 * Gets the value of the next edge adjacent (counter-clockwise) to this one 24956 * within the triangle. 24957 * 24958 * @return {HalfEdge} next adjacent edge 24959 */ 24960 getNext() { 24961 return this.next; 24962 } 24963 /** 24964 * Sets the value of the previous edge adjacent (clockwise) to this one within 24965 * the triangle. 24966 * 24967 * @param {HalfEdge} edge 24968 * previous adjacent edge 24969 */ 24970 setPrev(edge) { 24971 this.prev = edge; 24972 } 24973 /** 24974 * Gets the value of the previous edge adjacent (clockwise) to this one within 24975 * the triangle. 24976 * 24977 * @return {HalfEdge} previous adjacent edge 24978 */ 24979 getPrev() { 24980 return this.prev; 24981 } 24982 /** 24983 * Returns the triangular face located to the left of this half-edge. 24984 * 24985 * @return {Face} left-hand triangular face 24986 */ 24987 getFace() { 24988 return this.face; 24989 } 24990 /** 24991 * Returns the half-edge opposite to this half-edge. 24992 * 24993 * @return {HalfEdge} opposite half-edge 24994 */ 24995 getOpposite() { 24996 return this.opposite; 24997 } 24998 /** 24999 * Sets the half-edge opposite to this half-edge. 25000 * 25001 * @param {HalfEdge} edge 25002 * opposite half-edge 25003 */ 25004 setOpposite(edge) { 25005 this.opposite = edge; 25006 edge.opposite = this; 25007 } 25008 /** 25009 * Returns the head vertex associated with this half-edge. 25010 * 25011 * @return {Vertex} head vertex 25012 */ 25013 head() { 25014 return this.vertex; 25015 } 25016 /** 25017 * Returns the tail vertex associated with this half-edge. 25018 * 25019 * @return {Vertex} tail vertex 25020 */ 25021 tail() { 25022 return this.prev != null ? this.prev.vertex : null; 25023 } 25024 /** 25025 * Returns the opposite triangular face associated with this half-edge. 25026 * 25027 * @return {Face} opposite triangular face 25028 */ 25029 oppositeFace() { 25030 return this.opposite == null ? null : this.opposite.face; 25031 } 25032 /** 25033 * Produces a string identifying this half-edge by the point index values of its 25034 * tail and head vertices. 25035 * 25036 * @return {string} identifying string 25037 */ 25038 getVertexString() { 25039 if (this.tail() != null) { 25040 return "" + this.tail().index + "-" + this.head().index; 25041 } else { 25042 return "?-" + this.head().index; 25043 } 25044 } 25045 /** 25046 * Returns the length squared of this half-edge. 25047 * 25048 * @return {*} half-edge length squared 25049 */ 25050 lengthSquared() { 25051 if (this.tail() == null) { 25052 return this.head().pnt.getField()["createRational$long"](-1); 25053 } 25054 const offset = this.head().pnt.minus(this.tail().pnt); 25055 return offset.dot(offset); 25056 } 25057}; 25058HalfEdge["__class"] = "com.vzome.core.math.convexhull.HalfEdge"; 25059
25060// src/worker/legacy/from-java/com/vzome/core/math/convexhull/Face.ts 25061var Face = class _Face { 25062 static { 25063 this.VISIBLE = 1; 25064 } 25065 static { 25066 this.NON_CONVEX = 2; 25067 } 25068 static { 25069 this.DELETED = 3; 25070 } 25071 computeCentroid() { 25072 const vectors = new java.util.HashSet(); 25073 let he = this.he0; 25074 do { 25075 { 25076 vectors.add(he.head().pnt); 25077 he = he.next; 25078 } 25079 } while (he !== this.he0); 25080 this.centroid = AlgebraicVectors.calculateCentroid(vectors); 25081 return this.centroid; 25082 } 25083 computeNormal() { 25084 let he1 = this.he0.next; 25085 let he2 = he1.next; 25086 const p0 = this.he0.head().pnt; 25087 let p2 = he1.head().pnt; 25088 let d2 = p2.minus(p0); 25089 this.normal = p0.getField().origin(3); 25090 this.numVerts = 2; 25091 while (he2 !== this.he0) { 25092 { 25093 const d1 = d2; 25094 p2 = he2.head().pnt; 25095 d2 = p2.minus(p0); 25096 this.normal = this.normal.plus(d1.cross(d2)); 25097 he1 = he2; 25098 he2 = he2.next; 25099 this.numVerts++; 25100 } 25101 } 25102 ; 25103 return this.normal; 25104 } 25105 /*private*/ 25106 computeNormalAndCentroid$() { 25107 this.normal = this.computeNormal(); 25108 this.centroid = this.computeCentroid(); 25109 this.planeOffset = this.normal.dot(this.centroid); 25110 let numv = 0; 25111 let he = this.he0; 25112 do { 25113 { 25114 numv++; 25115 he = he.next; 25116 } 25117 } while (he !== this.he0); 25118 if (numv !== this.numVerts) { 25119 this.fail("face " + this.getVertexString() + " numVerts=" + this.numVerts + " should be " + numv); 25120 } 25121 } 25122 computeNormalAndCentroid$double(minArea) { 25123 this.normal = this.computeNormal(); 25124 this.centroid = this.computeCentroid(); 25125 this.planeOffset = this.normal.dot(this.centroid); 25126 } 25127 computeNormalAndCentroid(minArea) { 25128 if (typeof minArea === "number" || minArea === null) { 25129 return this.computeNormalAndCentroid$double(minArea); 25130 } else if (minArea === void 0) { 25131 return this.computeNormalAndCentroid$(); 25132 } else throw new Error("invalid overload"); 25133 } 25134 static createTriangle$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex(v0, v1, v2) { 25135 return _Face.createTriangle$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex$double(v0, v1, v2, 0); 25136 } 25137 static createTriangle$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex$double(v0, v1, v2, minArea) { 25138 const face = new _Face(); 25139 const he0 = new HalfEdge(v0, face); 25140 const he1 = new HalfEdge(v1, face); 25141 const he2 = new HalfEdge(v2, face); 25142 he0.prev = he2; 25143 he0.next = he1; 25144 he1.prev = he0; 25145 he1.next = he2; 25146 he2.prev = he1; 25147 he2.next = he0; 25148 face.he0 = he0; 25149 face.computeNormalAndCentroid$double(minArea); 25150 return face; 25151 } 25152 /** 25153 * Constructs a triangule Face from vertices v0, v1, and v2. 25154 * 25155 * @param {Vertex} v0 25156 * first vertex 25157 * @param {Vertex} v1 25158 * second vertex 25159 * @param {Vertex} v2 25160 * third vertex 25161 * @param {number} minArea 25162 * @return {Face} 25163 */ 25164 static createTriangle(v0, v1, v2, minArea) { 25165 if ((v0 != null && v0 instanceof Vertex || v0 === null) && (v1 != null && v1 instanceof Vertex || v1 === null) && (v2 != null && v2 instanceof Vertex || v2 === null) && (typeof minArea === "number" || minArea === null)) { 25166 return _Face.createTriangle$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex$double(v0, v1, v2, minArea); 25167 } else if ((v0 != null && v0 instanceof Vertex || v0 === null) && (v1 != null && v1 instanceof Vertex || v1 === null) && (v2 != null && v2 instanceof Vertex || v2 === null) && minArea === void 0) { 25168 return _Face.createTriangle$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex(v0, v1, v2); 25169 } else throw new Error("invalid overload"); 25170 } 25171 static create(vtxArray, indices) { 25172 const face = new _Face(); 25173 let hePrev = null; 25174 for (let i = 0; i < indices.length; i++) { 25175 { 25176 const he = new HalfEdge(vtxArray[indices[i]], face); 25177 if (hePrev != null) { 25178 he.setPrev(hePrev); 25179 hePrev.setNext(he); 25180 } else { 25181 face.he0 = he; 25182 } 25183 hePrev = he; 25184 } 25185 ; 25186 } 25187 face.he0.setPrev(hePrev); 25188 hePrev.setNext(face.he0); 25189 face.computeNormalAndCentroid$(); 25190 return face; 25191 } 25192 constructor() { 25193 if (this.he0 === void 0) { 25194 this.he0 = null; 25195 } 25196 if (this.normal === void 0) { 25197 this.normal = null; 25198 } 25199 if (this.area === void 0) { 25200 this.area = 0; 25201 } 25202 if (this.centroid === void 0) { 25203 this.centroid = null; 25204 } 25205 if (this.planeOffset === void 0) { 25206 this.planeOffset = null; 25207 } 25208 if (this.index === void 0) { 25209 this.index = 0; 25210 } 25211 if (this.numVerts === void 0) { 25212 this.numVerts = 0; 25213 } 25214 if (this.next === void 0) { 25215 this.next = null; 25216 } 25217 this.mark = _Face.VISIBLE; 25218 if (this.outside === void 0) { 25219 this.outside = null; 25220 } 25221 this.mark = _Face.VISIBLE; 25222 } 25223 /** 25224 * Gets the i-th half-edge associated with the face. 25225 * 25226 * @param {number} i 25227 * the half-edge index, in the range 0-2. 25228 * @return {HalfEdge} the half-edge 25229 */ 25230 getEdge(i) { 25231 let he = this.he0; 25232 while (i > 0) { 25233 { 25234 he = he.next; 25235 i--; 25236 } 25237 } 25238 ; 25239 while (i < 0) { 25240 { 25241 he = he.prev; 25242 i++; 25243 } 25244 } 25245 ; 25246 return he; 25247 } 25248 getFirstEdge() { 25249 return this.he0; 25250 } 25251 /** 25252 * Finds the half-edge within this face which has tail <code>vt</code> and head 25253 * <code>vh</code>. 25254 * 25255 * @param {Vertex} vt 25256 * tail point 25257 * @param {Vertex} vh 25258 * head point 25259 * @return {HalfEdge} the half-edge, or null if none is found. 25260 */ 25261 findEdge(vt, vh) { 25262 let he = this.he0; 25263 do { 25264 { 25265 if (he.head() === vh && he.tail() === vt) { 25266 return he; 25267 } 25268 he = he.next; 25269 } 25270 } while (he !== this.he0); 25271 return null; 25272 } 25273 /** 25274 * Computes the distance from a point p to the plane of this face. 25275 * 25276 * @param {AlgebraicVector} p 25277 * the point 25278 * @return {*} distance from the point to the plane 25279 */ 25280 distanceToPlane(p) { 25281 return this.normal.dot(p)["minus$com_vzome_core_algebra_AlgebraicNumber"](this.planeOffset); 25282 } 25283 /** 25284 * Returns the normal of the plane associated with this face. 25285 * 25286 * @return {AlgebraicVector} the planar normal 25287 */ 25288 getNormal() { 25289 return this.normal; 25290 } 25291 getCentroid() { 25292 return this.centroid; 25293 } 25294 numVertices() { 25295 return this.numVerts; 25296 } 25297 getVertexString() { 25298 let s = null; 25299 let he = this.he0; 25300 do { 25301 { 25302 if (s == null) { 25303 s = "" + he.head().index; 25304 } else { 25305 s += " " + he.head().index; 25306 } 25307 he = he.next; 25308 } 25309 } while (he !== this.he0); 25310 return s; 25311 } 25312 getVertexIndices(idxs) { 25313 let he = this.he0; 25314 let i = 0; 25315 do { 25316 { 25317 idxs[i++] = he.head().index; 25318 he = he.next; 25319 } 25320 } while (he !== this.he0); 25321 } 25322 /*private*/ 25323 connectHalfEdges(hedgePrev, hedge) { 25324 let discardedFace = null; 25325 if (hedgePrev.oppositeFace() === hedge.oppositeFace()) { 25326 const oppFace = hedge.oppositeFace(); 25327 let hedgeOpp; 25328 if (hedgePrev === this.he0) { 25329 this.he0 = hedge; 25330 } 25331 if (oppFace.numVertices() === 3) { 25332 hedgeOpp = hedge.getOpposite().prev.getOpposite();
25333 oppFace.mark = _Face.DELETED; 25334 discardedFace = oppFace; 25335 } else { 25336 hedgeOpp = hedge.getOpposite().next; 25337 if (oppFace.he0 === hedgeOpp.prev) { 25338 oppFace.he0 = hedgeOpp; 25339 } 25340 hedgeOpp.prev = hedgeOpp.prev.prev; 25341 hedgeOpp.prev.next = hedgeOpp; 25342 } 25343 hedge.prev = hedgePrev.prev; 25344 hedge.prev.next = hedge; 25345 hedge.opposite = hedgeOpp; 25346 hedgeOpp.opposite = hedge; 25347 oppFace.computeNormalAndCentroid$(); 25348 } else { 25349 hedgePrev.next = hedge; 25350 hedge.prev = hedgePrev; 25351 } 25352 return discardedFace; 25353 } 25354 /*private*/ 25355 fail(msg) { 25356 throw new Command.Failure(msg); 25357 } 25358 checkConsistency() { 25359 let hedge = this.he0; 25360 let maxd = 0; 25361 let numv = 0; 25362 if (this.numVerts < 3) { 25363 this.fail("degenerate face: " + this.getVertexString()); 25364 } 25365 do { 25366 { 25367 const hedgeOpp = hedge.getOpposite(); 25368 if (hedgeOpp == null) { 25369 this.fail("face " + this.getVertexString() + ": unreflected half edge " + hedge.getVertexString()); 25370 } else if (hedgeOpp.getOpposite() !== hedge) { 25371 this.fail("face " + this.getVertexString() + ": opposite half edge " + hedgeOpp.getVertexString() + " has opposite " + hedgeOpp.getOpposite().getVertexString()); 25372 } 25373 if (hedgeOpp.head() !== hedge.tail() || hedge.head() !== hedgeOpp.tail()) { 25374 this.fail("face " + this.getVertexString() + ": half edge " + hedge.getVertexString() + " reflected by " + hedgeOpp.getVertexString()); 25375 } 25376 const oppFace = hedgeOpp.face; 25377 if (oppFace == null) { 25378 this.fail("face " + this.getVertexString() + ": no face on half edge " + hedgeOpp.getVertexString()); 25379 } else if (oppFace.mark === _Face.DELETED) { 25380 this.fail("face " + this.getVertexString() + ": opposite face " + oppFace.getVertexString() + " not on hull"); 25381 } 25382 const d = Math.abs(this.distanceToPlane(hedge.head().pnt).evaluate()); 25383 if (d > maxd) { 25384 maxd = d; 25385 } 25386 numv++; 25387 hedge = hedge.next; 25388 } 25389 } while (hedge !== this.he0); 25390 if (numv !== this.numVerts) { 25391 this.fail("face " + this.getVertexString() + " numVerts=" + this.numVerts + " should be " + numv); 25392 } 25393 } 25394 mergeAdjacentFace(hedgeAdj, discarded) { 25395 const oppFace = hedgeAdj.oppositeFace(); 25396 let numDiscarded = 0; 25397 discarded[numDiscarded++] = oppFace; 25398 oppFace.mark = _Face.DELETED; 25399 const hedgeOpp = hedgeAdj.getOpposite(); 25400 let hedgeAdjPrev = hedgeAdj.prev; 25401 let hedgeAdjNext = hedgeAdj.next; 25402 let hedgeOppPrev = hedgeOpp.prev; 25403 let hedgeOppNext = hedgeOpp.next; 25404 let foo = 0; 25405 while (hedgeAdjPrev.oppositeFace() === oppFace) { 25406 { 25407 hedgeAdjPrev = hedgeAdjPrev.prev; 25408 hedgeOppNext = hedgeOppNext.next; 25409 if (++foo > 1e3) { 25410 this.fail("Oops, it's hung."); 25411 } 25412 } 25413 } 25414 ; 25415 foo = 0; 25416 while (hedgeAdjNext.oppositeFace() === oppFace) { 25417 { 25418 hedgeOppPrev = hedgeOppPrev.prev; 25419 hedgeAdjNext = hedgeAdjNext.next; 25420 if (++foo > 1e3) { 25421 this.fail("Oops, it's hung."); 25422 } 25423 } 25424 } 25425 ; 25426 let hedge; 25427 foo = 0; 25428 for (hedge = hedgeOppNext; hedge !== hedgeOppPrev.next; hedge = hedge.next) { 25429 { 25430 hedge.face = this; 25431 if (++foo > 1e3) { 25432 this.fail("Oops, it's hung."); 25433 } 25434 } 25435 ; 25436 } 25437 if (hedgeAdj === this.he0) { 25438 this.he0 = hedgeAdjNext; 25439 } 25440 let discardedFace; 25441 discardedFace = this.connectHalfEdges(hedgeOppPrev, hedgeAdjNext); 25442 if (discardedFace != null) { 25443 discarded[numDiscarded++] = discardedFace; 25444 } 25445 discardedFace = this.connectHalfEdges(hedgeAdjPrev, hedgeOppNext); 25446 if (discardedFace != null) { 25447 discarded[numDiscarded++] = discardedFace; 25448 } 25449 this.computeNormalAndCentroid$(); 25450 this.checkConsistency(); 25451 return numDiscarded; 25452 } 25453 triangulate(newFaces) { 25454 const minArea = 0; 25455 let hedge; 25456 if (this.numVertices() < 4) { 25457 return; 25458 } 25459 const v0 = this.he0.head(); 25460 hedge = this.he0.next; 25461 let oppPrev = hedge.opposite; 25462 let face0 = null; 25463 for (hedge = hedge.next; hedge !== this.he0.prev; hedge = hedge.next) { 25464 { 25465 const face = _Face.createTriangle$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex$double(v0, hedge.prev.head(), hedge.head(), minArea); 25466 face.he0.next.setOpposite(oppPrev); 25467 face.he0.prev.setOpposite(hedge.opposite); 25468 oppPrev = face.he0; 25469 newFaces.add(face); 25470 if (face0 == null) { 25471 face0 = face; 25472 } 25473 } 25474 ; 25475 } 25476 hedge = new HalfEdge(this.he0.prev.prev.head(), this); 25477 hedge.setOpposite(oppPrev); 25478 hedge.prev = this.he0; 25479 hedge.prev.next = hedge; 25480 hedge.next = this.he0.prev; 25481 hedge.next.prev = hedge; 25482 this.computeNormalAndCentroid$double(minArea); 25483 this.checkConsistency(); 25484 for (let face = face0; face != null; face = face.next) { 25485 { 25486 face.checkConsistency(); 25487 } 25488 ; 25489 } 25490 } 25491}; 25492Face["__class"] = "com.vzome.core.math.convexhull.Face"; 25493
25494// src/worker/legacy/from-java/com/vzome/core/math/convexhull/VertexList.ts 25495var VertexList = class { 25496 /** 25497 * Clears this list. 25498 */ 25499 clear() { 25500 this.head = this.tail = null; 25501 } 25502 /** 25503 * Adds a vertex to the end of this list. 25504 * @param {Vertex} vtx 25505 */ 25506 add(vtx) { 25507 if (this.head == null) { 25508 this.head = vtx; 25509 } else { 25510 this.tail.next = vtx; 25511 } 25512 vtx.prev = this.tail; 25513 vtx.next = null; 25514 this.tail = vtx; 25515 } 25516 /** 25517 * Adds a chain of vertices to the end of this list. 25518 * @param {Vertex} vtx 25519 */ 25520 addAll(vtx) { 25521 if (this.head == null) { 25522 this.head = vtx; 25523 } else { 25524 this.tail.next = vtx; 25525 } 25526 vtx.prev = this.tail; 25527 while (vtx.next != null) { 25528 { 25529 vtx = vtx.next; 25530 } 25531 } 25532 ; 25533 this.tail = vtx; 25534 } 25535 delete$com_vzome_core_math_convexhull_Vertex(vtx) { 25536 if (vtx.prev == null) { 25537 this.head = vtx.next; 25538 } else { 25539 vtx.prev.next = vtx.next; 25540 } 25541 if (vtx.next == null) { 25542 this.tail = vtx.prev; 25543 } else { 25544 vtx.next.prev = vtx.prev; 25545 } 25546 } 25547 delete$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex(vtx1, vtx2) { 25548 if (vtx1.prev == null) { 25549 this.head = vtx2.next; 25550 } else { 25551 vtx1.prev.next = vtx2.next; 25552 } 25553 if (vtx2.next == null) { 25554 this.tail = vtx1.prev; 25555 } else { 25556 vtx2.next.prev = vtx1.prev; 25557 } 25558 } 25559 /** 25560 * Deletes a chain of vertices from this list. 25561 * @param {Vertex} vtx1 25562 * @param {Vertex} vtx2 25563 */ 25564 delete(vtx1, vtx2) { 25565 if ((vtx1 != null && vtx1 instanceof Vertex || vtx1 === null) && (vtx2 != null && vtx2 instanceof Vertex || vtx2 === null)) { 25566 return this.delete$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex(vtx1, vtx2); 25567 } else if ((vtx1 != null && vtx1 instanceof Vertex || vtx1 === null) && vtx2 === void 0) { 25568 return this.delete$com_vzome_core_math_convexhull_Vertex(vtx1); 25569 } else throw new Error("invalid overload"); 25570 } 25571 /** 25572 * Inserts a vertex into this list before another specificed vertex. 25573 * @param {Vertex} vtx 25574 * @param {Vertex} next 25575 */ 25576 insertBefore(vtx, next) { 25577 vtx.prev = next.prev; 25578 if (next.prev == null) { 25579 this.head = vtx; 25580 } else { 25581 next.prev.next = vtx; 25582 } 25583 vtx.next = next; 25584 next.prev = vtx; 25585 } 25586 /** 25587 * Returns the first element in this list. 25588 * @return {Vertex} 25589 */ 25590 first() { 25591 return this.head; 25592 } 25593 /** 25594 * Returns true if this list is empty. 25595 * @return {boolean} 25596 */ 25597 isEmpty() { 25598 return this.head == null; 25599 } 25600 constructor() { 25601 if (this.head === void 0) { 25602 this.head = null; 25603 } 25604 if (this.tail === void 0) { 25605 this.tail = null; 25606 } 25607 } 25608}; 25609VertexList["__class"] = "com.vzome.core.math.convexhull.VertexList"; 25610
25611// src/worker/legacy/from-java/com/vzome/core/math/convexhull/QuickHull3D.ts 25612var QuickHull3D = class _QuickHull3D { 25613 static { 25614 /** 25615 * Specifies that (on output) vertex indices for a face should be listed in 25616 * clockwise order. 25617 */ 25618 this.CLOCKWISE = 1; 25619 } 25620 static { 25621 /** 25622 * Specifies that (on output) the vertex indices for a face should be numbered 25623 * starting from 1. 25624 */ 25625 this.INDEXED_FROM_ONE = 2; 25626 } 25627 static { 25628 /** 25629 * Specifies that (on output) the vertex indices for a face should be numbered 25630 * starting from 0. 25631 */ 25632 this.INDEXED_FROM_ZERO = 4; 25633 } 25634 static { 25635 /** 25636 * Specifies that (on output) the vertex indices for a face should be numbered 25637 * with respect to the original input points. 25638 */ 25639 this.POINT_RELATIVE = 8; 25640 } 25641 /** 25642 * Returns true if debugging is enabled. 25643 * 25644 * @return {boolean} true is debugging is enabled 25645 * @see QuickHull3D#setDebug 25646 */ 25647 getDebug() { 25648 return this.debug; 25649 } 25650 /** 25651 * Enables the printing of debugging diagnostics. 25652 * 25653 * @param {boolean} enable 25654 * if true, enables debugging 25655 */ 25656 setDebug(enable) { 25657 this.debug = enable; 25658 } 25659 /*private*/ 25660 addPointToFace(vtx, face) { 25661 vtx.face = face; 25662 if (face.outside == null) { 25663 this.claimed.add(vtx); 25664 } else { 25665 this.claimed.insertBefore(vtx, face.outside); 25666 } 25667 face.outside = vtx; 25668 } 25669 /*private*/ 25670 removePointFromFace(vtx, face) { 25671 if (vtx === face.outside) { 25672 if (vtx.next != null && vtx.next.face === face) { 25673 face.outside = vtx.next; 25674 } else { 25675 face.outside = null; 25676 } 25677 } 25678 this.claimed.delete$com_vzome_core_math_convexhull_Vertex(vtx); 25679 } 25680 /*private*/ 25681 removeAllPointsFromFace(face) { 25682 if (face.outside != null) { 25683 let end = face.outside; 25684 while (end.next != null && end.next.face === face) { 25685 { 25686 end = end.next; 25687 } 25688 } 25689 ; 25690 this.claimed.delete$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex(face.outside, end); 25691 end.next = null; 25692 return face.outside; 25693 } else { 25694 return null; 25695 } 25696 } 25697 constructor() { 25698 this.findIndex = -1; 25699 this.debug = false; 25700 this.pointBuffer = []; 25701 this.vertexPointIndices = []; 25702 this.discardedFaces = [null, null, null]; 25703 this.maxVtxs = [null, null, null]; 25704 this.minVtxs = [null, null, null]; 25705 this.faces = new java.util.Vector(16); 25706 this.newFaces = new java.util.LinkedList(); 25707 this.unclaimed = new VertexList(); 25708 this.claimed = new VertexList(); 25709 if (this.numVertices === void 0) { 25710 this.numVertices = 0; 25711 } 25712 if (this.numFaces === void 0) { 25713 this.numFaces = 0; 25714 } 25715 if (this.numPoints === void 0) { 25716 this.numPoints = 0; 25717 } 25718 } 25719 /*private*/ 25720 findHalfEdge(tail, head) { 25721 for (let index = this.faces.iterator(); index.hasNext(); ) { 25722 let face = index.next(); 25723 { 25724 const he = face.findEdge(tail, head); 25725 if (he != null) { 25726 return he; 25727 } 25728 } 25729 } 25730 return null; 25731 } 25732 setHull(coords, nump, faceIndices, numf) { 25733 this.initBuffers(nump); 25734 this.setPoints(coords, nump); 25735 this.computeMaxAndMin(); 25736 for (let i = 0; i < numf; i++) { 25737 { 25738 const face = Face.create(this.pointBuffer, faceIndices[i]); 25739 let he = face.he0; 25740 do { 25741 { 25742 const heOpp = this.findHalfEdge(he.head(), he.tail()); 25743 if (heOpp != null) { 25744 he.setOpposite(heOpp); 25745 } 25746 he = he.next; 25747 } 25748 } while (he !== face.he0); 25749 this.faces.add(face); 25750 } 25751 ; 25752 } 25753 } 25754 build$java_util_Collection(points) { 25755 this.build$com_vzome_core_algebra_AlgebraicVector_A(points.toArray(((s) => { 25756 let a = []; 25757 while (s-- > 0) a.push(null); 25758 return a; 25759 })(points.size()))); 25760 } 25761 build$com_vzome_core_algebra_AlgebraicVector_A(points) { 25762 this.build$com_vzome_core_algebra_AlgebraicVector_A$int(points, points.length); 25763 } 25764 build$com_vzome_core_algebra_AlgebraicVector_A$int(points, nump) { 25765 if (nump < 4) { 25766 throw new Command.Failure("At least four input points are required for a 3d convex hull.\n\n" + nump + " specified."); 25767 } 25768 if (points.length < nump) { 25769 throw new Command.Failure("Point array too small for specified number of points"); 25770 } 25771 this.printPointSet(points, nump); 25772 this.initBuffers(nump); 25773 this.setPoints(points, nump); 25774 this.buildHull(); 25775 } 25776 /** 25777 * Constructs the convex hull of an array of points. 25778 * 25779 * @param {AlgebraicVector[]} points 25780 * input points 25781 * @param {number} nump 25782 * number of input points 25783 * @throws Failure 25784 * if the number of input points is less than four or greater than the 25785 * length of <code>points</code>, or the points are 25786 * coincident, collinear, or coplanar. 25787 */ 25788 build(points, nump) { 25789 if ((points != null && points instanceof Array && (points.length == 0 || points[0] == null || points[0] != null && points[0] instanceof AlgebraicVector) || points === null) && (typeof nump === "number" || nump === null)) { 25790 return this.build$com_vzome_core_algebra_AlgebraicVector_A$int(points, nump); 25791 } else if ((points != null && (points.constructor != null && points.constructor["__interfaces"] != null && points.constructor["__interfaces"].indexOf("java.util.Collection") >= 0) || points === null) && nump === void 0) { 25792 return this.build$java_util_Collection(points); 25793 } else if ((points != null && points instanceof Array && (points.length == 0 || points[0] == null || points[0] != null && points[0] instanceof AlgebraicVector) || points === null) && nump === void 0) { 25794 return this.build$com_vzome_core_algebra_AlgebraicVector_A(points); 25795 } else throw new Error("invalid overload"); 25796 } 25797 /** 25798 * prints the initial set of points. 25799 * 25800 * @param {AlgebraicVector[]} points 25801 * input points 25802 * @param {number} nump 25803 * number of input points 25804 */ 25805 printPointSet(points, nump) { 25806 if (this.debug) { 25807 console.info("initial point set:"); 25808 for (let i = 0; i < nump; i++) { 25809 { 25810 console.info(i + ": " + points[i]); 25811 } 25812 ; 25813 } 25814 } 25815 } 25816 /** 25817 * Triangulates any non-triangular hull faces. In some cases, due to precision 25818 * issues, the resulting triangles may be very thin or small, and hence appear 25819 * to be non-convex (this same limitation is present in <a href=http://www.qhull.org>qhull</a>). 25820 * @throws Failure 25821 */
25822 triangulate() { 25823 this.newFaces.clear(); 25824 for (let index = this.faces.iterator(); index.hasNext(); ) { 25825 let face = index.next(); 25826 { 25827 if (face.mark === Face.VISIBLE) { 25828 face.triangulate(this.newFaces); 25829 } 25830 } 25831 } 25832 for (let index = this.newFaces.iterator(); index.hasNext(); ) { 25833 let face = index.next(); 25834 { 25835 this.faces.add(face); 25836 } 25837 } 25838 } 25839 initBuffers(nump) { 25840 if (this.pointBuffer.length < nump) { 25841 const newBuffer = ((s) => { 25842 let a = []; 25843 while (s-- > 0) a.push(null); 25844 return a; 25845 })(nump); 25846 this.vertexPointIndices = ((s) => { 25847 let a = []; 25848 while (s-- > 0) a.push(0); 25849 return a; 25850 })(nump); 25851 for (let i = 0; i < this.pointBuffer.length; i++) { 25852 { 25853 newBuffer[i] = this.pointBuffer[i]; 25854 } 25855 ; 25856 } 25857 for (let i = this.pointBuffer.length; i < nump; i++) { 25858 { 25859 newBuffer[i] = null; 25860 } 25861 ; 25862 } 25863 this.pointBuffer = newBuffer; 25864 } 25865 this.faces.clear(); 25866 this.claimed.clear(); 25867 this.numFaces = 0; 25868 this.numPoints = nump; 25869 } 25870 setPoints(pnts, nump) { 25871 this.pointBuffer = ((s) => { 25872 let a = []; 25873 while (s-- > 0) a.push(null); 25874 return a; 25875 })(nump); 25876 for (let i = 0; i < nump; i++) { 25877 { 25878 this.pointBuffer[i] = new Vertex(pnts[i], i); 25879 } 25880 ; 25881 } 25882 } 25883 computeMaxAndMin() { 25884 for (let i = 0; i < 3; i++) { 25885 { 25886 this.maxVtxs[i] = this.minVtxs[i] = this.pointBuffer[0]; 25887 } 25888 ; 25889 } 25890 const max = this.pointBuffer[0].pnt; 25891 let maxx = max.getComponent(AlgebraicVector.X).evaluate(); 25892 let maxy = max.getComponent(AlgebraicVector.Y).evaluate(); 25893 let maxz = max.getComponent(AlgebraicVector.Z).evaluate(); 25894 let minx = maxx; 25895 let miny = maxy; 25896 let minz = maxz; 25897 for (let i = 1; i < this.numPoints; i++) { 25898 { 25899 const pnt = this.pointBuffer[i].pnt; 25900 const pntx = pnt.getComponent(AlgebraicVector.X).evaluate(); 25901 const pnty = pnt.getComponent(AlgebraicVector.Y).evaluate(); 25902 const pntz = pnt.getComponent(AlgebraicVector.Z).evaluate(); 25903 if (pntx > maxx) { 25904 maxx = pntx; 25905 this.maxVtxs[0] = this.pointBuffer[i]; 25906 } else if (pntx < minx) { 25907 minx = pntx; 25908 this.minVtxs[0] = this.pointBuffer[i]; 25909 } 25910 if (pnty > maxy) { 25911 maxy = pnty; 25912 this.maxVtxs[1] = this.pointBuffer[i]; 25913 } else if (pnty < miny) { 25914 miny = pnty; 25915 this.minVtxs[1] = this.pointBuffer[i]; 25916 } 25917 if (pntz > maxz) { 25918 maxz = pntz; 25919 this.maxVtxs[2] = this.pointBuffer[i]; 25920 } else if (pntz < minz) { 25921 minz = pntz; 25922 this.minVtxs[2] = this.pointBuffer[i]; 25923 } 25924 } 25925 ; 25926 } 25927 } 25928 /** 25929 * Creates the initial simplex from which the hull will be built. 25930 */ 25931 createInitialSimplex() { 25932 let max = 0; 25933 let imax = 0; 25934 for (let i = 0; i < 3; i++) { 25935 { 25936 const diff = this.maxVtxs[i].pnt.getComponent(i)["minus$com_vzome_core_algebra_AlgebraicNumber"](this.minVtxs[i].pnt.getComponent(i)).evaluate(); 25937 if (diff > max) { 25938 max = diff; 25939 imax = i; 25940 } 25941 } 25942 ; 25943 } 25944 if (max <= 0) { 25945 throw new Command.Failure("Input points are coincident"); 25946 } 25947 const vtx = [null, null, null, null]; 25948 vtx[0] = this.maxVtxs[imax]; 25949 vtx[1] = this.minVtxs[imax]; 25950 let diff02; 25951 let nrml = null; 25952 let maxSqr = 0; 25953 const u01 = vtx[1].pnt.minus(vtx[0].pnt); 25954 for (let i = 0; i < this.numPoints; i++) { 25955 { 25956 diff02 = this.pointBuffer[i].pnt.minus(vtx[0].pnt); 25957 const xprod = u01.cross(diff02); 25958 const lenSqr = xprod.dot(xprod); 25959 if (lenSqr.evaluate() > maxSqr && this.pointBuffer[i] !== vtx[0] && this.pointBuffer[i] !== vtx[1]) { 25960 maxSqr = lenSqr.evaluate(); 25961 vtx[2] = this.pointBuffer[i]; 25962 nrml = xprod; 25963 } 25964 } 25965 ; 25966 } 25967 if (maxSqr === 0) { 25968 throw new Command.Failure("Input points are collinear"); 25969 } 25970 const res = u01.scale(nrml.dot(u01)); 25971 nrml = nrml.minus(res); 25972 let maxDist = 0; 25973 const d0 = vtx[2].pnt.dot(nrml); 25974 for (let i = 0; i < this.numPoints; i++) { 25975 { 25976 const dist = Math.abs(this.pointBuffer[i].pnt.dot(nrml)["minus$com_vzome_core_algebra_AlgebraicNumber"](d0).evaluate()); 25977 if (dist > maxDist && this.pointBuffer[i] !== vtx[0] && this.pointBuffer[i] !== vtx[1] && this.pointBuffer[i] !== vtx[2]) { 25978 maxDist = dist; 25979 vtx[3] = this.pointBuffer[i]; 25980 } 25981 } 25982 ; 25983 } 25984 if (maxDist === 0) { 25985 throw new Command.Failure("Input points are coplanar"); 25986 } 25987 if (this.debug) { 25988 console.info("initial vertices:"); 25989 console.info(vtx[0].index + ": " + vtx[0].pnt); 25990 console.info(vtx[1].index + ": " + vtx[1].pnt); 25991 console.info(vtx[2].index + ": " + vtx[2].pnt); 25992 console.info(vtx[3].index + ": " + vtx[3].pnt); 25993 } 25994 const tris = [null, null, null, null]; 25995 if (vtx[3].pnt.dot(nrml)["minus$com_vzome_core_algebra_AlgebraicNumber"](d0).evaluate() < 0) { 25996 tris[0] = Face.createTriangle$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex(vtx[0], vtx[1], vtx[2]); 25997 tris[1] = Face.createTriangle$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex(vtx[3], vtx[1], vtx[0]); 25998 tris[2] = Face.createTriangle$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex(vtx[3], vtx[2], vtx[1]); 25999 tris[3] = Face.createTriangle$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex(vtx[3], vtx[0], vtx[2]); 26000 for (let i = 0; i < 3; i++) { 26001 {
26002 const k = (i + 1) % 3; 26003 tris[i + 1].getEdge(1).setOpposite(tris[k + 1].getEdge(0)); 26004 tris[i + 1].getEdge(2).setOpposite(tris[0].getEdge(k)); 26005 } 26006 ; 26007 } 26008 } else { 26009 tris[0] = Face.createTriangle$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex(vtx[0], vtx[2], vtx[1]); 26010 tris[1] = Face.createTriangle$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex(vtx[3], vtx[0], vtx[1]); 26011 tris[2] = Face.createTriangle$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex(vtx[3], vtx[1], vtx[2]); 26012 tris[3] = Face.createTriangle$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex(vtx[3], vtx[2], vtx[0]); 26013 for (let i = 0; i < 3; i++) { 26014 { 26015 const k = (i + 1) % 3; 26016 tris[i + 1].getEdge(0).setOpposite(tris[k + 1].getEdge(1)); 26017 tris[i + 1].getEdge(2).setOpposite(tris[0].getEdge((3 - i) % 3)); 26018 } 26019 ; 26020 } 26021 } 26022 for (let i = 0; i < 4; i++) { 26023 { 26024 this.faces.add(tris[i]); 26025 } 26026 ; 26027 } 26028 for (let i = 0; i < this.numPoints; i++) { 26029 { 26030 const v = this.pointBuffer[i]; 26031 if (v === vtx[0] || v === vtx[1] || v === vtx[2] || v === vtx[3]) { 26032 continue; 26033 } 26034 maxDist = 0; 26035 let maxFace = null; 26036 for (let k = 0; k < 4; k++) { 26037 { 26038 const dist = tris[k].distanceToPlane(v.pnt).evaluate(); 26039 if (dist > maxDist) { 26040 maxFace = tris[k]; 26041 maxDist = dist; 26042 } 26043 } 26044 ; 26045 } 26046 if (maxFace != null) { 26047 this.addPointToFace(v, maxFace); 26048 } 26049 } 26050 ; 26051 } 26052 } 26053 /** 26054 * Returns the number of vertices in this hull. 26055 * 26056 * @return {number} number of vertices 26057 */ 26058 getNumVertices() { 26059 return this.numVertices; 26060 } 26061 getVertices$() { 26062 const vtxs = ((s) => { 26063 let a = []; 26064 while (s-- > 0) a.push(null); 26065 return a; 26066 })(this.numVertices); 26067 for (let i = 0; i < this.numVertices; i++) { 26068 { 26069 vtxs[i] = this.pointBuffer[this.vertexPointIndices[i]].pnt; 26070 } 26071 ; 26072 } 26073 return vtxs; 26074 } 26075 getVertices$com_vzome_core_algebra_AlgebraicNumber_A(coords) { 26076 for (let i = 0; i < this.numVertices; i++) { 26077 { 26078 const pnt = this.pointBuffer[this.vertexPointIndices[i]].pnt; 26079 coords[i * 3 + 0] = pnt.getComponent(AlgebraicVector.X); 26080 coords[i * 3 + 1] = pnt.getComponent(AlgebraicVector.Y); 26081 coords[i * 3 + 2] = pnt.getComponent(AlgebraicVector.Z); 26082 } 26083 ; 26084 } 26085 return this.numVertices; 26086 } 26087 /** 26088 * Returns the coordinates of the vertex points of this hull. 26089 * 26090 * @param {AlgebraicNumber[]} coords 26091 * returns the x, y, z coordinates of each vertex. This length of 26092 * this array must be at least three times the number of vertices. 26093 * @return {number} the number of vertices 26094 * @see QuickHull3D#getVertices() 26095 * @see QuickHull3D#getFaces() 26096 */ 26097 getVertices(coords) { 26098 if (coords != null && coords instanceof Array && (coords.length == 0 || coords[0] == null || coords[0] != null && (coords[0].constructor != null && coords[0].constructor["__interfaces"] != null && coords[0].constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0)) || coords === null) { 26099 return this.getVertices$com_vzome_core_algebra_AlgebraicNumber_A(coords); 26100 } else if (coords === void 0) { 26101 return this.getVertices$(); 26102 } else throw new Error("invalid overload"); 26103 } 26104 /** 26105 * Returns an array specifing the index of each hull vertex with respect to the 26106 * original input points. 26107 * 26108 * @return {int[]} vertex indices with respect to the original points 26109 */ 26110 getVertexPointIndices() { 26111 const indices = ((s) => { 26112 let a = []; 26113 while (s-- > 0) a.push(0); 26114 return a; 26115 })(this.numVertices); 26116 for (let i = 0; i < this.numVertices; i++) { 26117 { 26118 indices[i] = this.vertexPointIndices[i]; 26119 } 26120 ; 26121 } 26122 return indices; 26123 } 26124 /** 26125 * Returns the number of edges in this hull. 26126 * 26127 * @return {number} number of edges 26128 */ 26129 getNumEdges() {
26130 let count = 0; 26131 for (let index = this.faces.iterator(); index.hasNext(); ) { 26132 let face = index.next(); 26133 { 26134 count += face.numVertices(); 26135 } 26136 } 26137 return count / 2 | 0; 26138 } 26139 /** 26140 * Returns the number of faces in this hull. 26141 * 26142 * @return {number} number of faces 26143 */ 26144 getNumFaces() { 26145 return this.faces.size(); 26146 } 26147 getFaces$() { 26148 return this.getFaces$int(0); 26149 } 26150 getFaces$int(indexFlags) { 26151 const allFaces = ((s) => { 26152 let a = []; 26153 while (s-- > 0) a.push(null); 26154 return a; 26155 })(this.faces.size()); 26156 let k = 0; 26157 for (let index = this.faces.iterator(); index.hasNext(); ) { 26158 let face = index.next(); 26159 { 26160 allFaces[k] = ((s) => { 26161 let a = []; 26162 while (s-- > 0) a.push(0); 26163 return a; 26164 })(face.numVertices()); 26165 this.getFaceIndices(allFaces[k], face, indexFlags); 26166 k++; 26167 } 26168 } 26169 return allFaces; 26170 } 26171 /** 26172 * Returns the faces associated with this hull. 26173 * 26174 * <p> 26175 * Each face is represented by an integer array which gives the indices of the 26176 * vertices. By default, these indices are numbered with respect to the hull 26177 * vertices (as opposed to the input points), are zero-based, and are arranged 26178 * counter-clockwise. However, this can be changed by setting 26179 * {@link #POINT_RELATIVE}, {@link #INDEXED_FROM_ONE}, or {@link #CLOCKWISE} in the indexFlags 26180 * parameter. 26181 * 26182 * @param {number} indexFlags 26183 * specifies index characteristics (0 results in the default) 26184 * @return {int[][]} array of integer arrays, giving the vertex indices for each face. 26185 * @see QuickHull3D#getVertices() 26186 */ 26187 getFaces(indexFlags) { 26188 if (typeof indexFlags === "number" || indexFlags === null) { 26189 return this.getFaces$int(indexFlags); 26190 } else if (indexFlags === void 0) { 26191 return this.getFaces$(); 26192 } else throw new Error("invalid overload"); 26193 } 26194 print$java_io_PrintStream(ps) { 26195 this.print$java_io_PrintStream$int(ps, 0); 26196 } 26197 print$java_io_PrintStream$int(ps, indexFlags) { 26198 if ((indexFlags & _QuickHull3D.INDEXED_FROM_ZERO) === 0) { 26199 indexFlags |= _QuickHull3D.INDEXED_FROM_ONE; 26200 } 26201 for (let i = 0; i < this.numVertices; i++) { 26202 { 26203 const pnt = this.pointBuffer[this.vertexPointIndices[i]].pnt; 26204 ps.println(pnt); 26205 } 26206 ; 26207 } 26208 for (let index = this.faces.iterator(); index.hasNext(); ) { 26209 let face = index.next(); 26210 { 26211 const indices = ((s) => { 26212 let a = []; 26213 while (s-- > 0) a.push(0); 26214 return a; 26215 })(face.numVertices()); 26216 this.getFaceIndices(indices, face, indexFlags); 26217 ps.print("f"); 26218 for (let k = 0; k < indices.length; k++) { 26219 { 26220 ps.print(" " + indices[k]); 26221 } 26222 ; 26223 } 26224 ps.println(""); 26225 } 26226 } 26227 } 26228 /** 26229 * Prints the vertices and faces of this hull to the stream ps. 26230 * 26231 * <p> 26232 * This is done using the Alias Wavefront .obj file format, with the vertices 26233 * printed first (each preceding by the letter <code>v</code>), followed by the 26234 * vertex indices for each face (each preceded by the letter <code>f</code>). 26235 * 26236 * <p> 26237 * By default, the face indices are numbered with respect to the hull vertices 26238 * (as opposed to the input points), with a lowest index of 1, and are arranged 26239 * counter-clockwise. However, this can be changed by setting 26240 * {@link #POINT_RELATIVE}, {@link #INDEXED_FROM_ONE}, or {@link #CLOCKWISE} in the indexFlags 26241 * parameter. 26242 * 26243 * @param {java.io.PrintStream} ps 26244 * stream used for printing 26245 * @param {number} indexFlags 26246 * specifies index characteristics (0 results in the default). 26247 * @see QuickHull3D#getVertices() 26248 * @see QuickHull3D#getFaces() 26249 */ 26250 print(ps, indexFlags) { 26251 if ((ps != null && ps instanceof java.io.PrintStream || ps === null) && (typeof indexFlags === "number" || indexFlags === null)) { 26252 return this.print$java_io_PrintStream$int(ps, indexFlags); 26253 } else if ((ps != null && ps instanceof java.io.PrintStream || ps === null) && indexFlags === void 0) { 26254 return this.print$java_io_PrintStream(ps); 26255 } else throw new Error("invalid overload"); 26256 } 26257 /*private*/ 26258 getFaceIndices(indices, face, flags) { 26259 const ccw = (flags & _QuickHull3D.CLOCKWISE) === 0; 26260 const indexedFromOne = (flags & _QuickHull3D.INDEXED_FROM_ONE) !== 0; 26261 const pointRelative = (flags & _QuickHull3D.POINT_RELATIVE) !== 0; 26262 let hedge = face.he0; 26263 let k = 0; 26264 do { 26265 { 26266 let idx = hedge.head().index; 26267 if (pointRelative) { 26268 idx = this.vertexPointIndices[idx]; 26269 } 26270 if (indexedFromOne) { 26271 idx++; 26272 } 26273 indices[k++] = idx; 26274 hedge = ccw ? hedge.next : hedge.prev; 26275 } 26276 } while (hedge !== face.he0); 26277 } 26278 resolveUnclaimedPoints(newFaces) { 26279 let vtxNext = this.unclaimed.first(); 26280 for (let vtx = vtxNext; vtx != null; vtx = vtxNext) { 26281 { 26282 vtxNext = vtx.next; 26283 let maxDist = 0; 26284 let maxFace = null; 26285 for (let index = newFaces.iterator(); index.hasNext(); ) { 26286 let newFace = index.next(); 26287 { 26288 if (newFace.mark === Face.VISIBLE) { 26289 const dist = newFace.distanceToPlane(vtx.pnt).evaluate(); 26290 if (dist > maxDist) { 26291 maxDist = dist; 26292 maxFace = newFace; 26293 } 26294 if (maxDist > 0) { 26295 break; 26296 } 26297 } 26298 } 26299 } 26300 if (maxFace != null) { 26301 this.addPointToFace(vtx, maxFace); 26302 if (this.debug && vtx.index === this.findIndex) { 26303 console.info(this.findIndex + " CLAIMED BY " + maxFace.getVertexString()); 26304 } 26305 } else { 26306 if (this.debug && vtx.index === this.findIndex) { 26307 console.info(this.findIndex + " DISCARDED"); 26308 } 26309 } 26310 } 26311 ; 26312 } 26313 } 26314 deleteFacePoints(face, absorbingFace) { 26315 const faceVtxs = this.removeAllPointsFromFace(face); 26316 if (faceVtxs != null) { 26317 if (absorbingFace == null) { 26318 this.unclaimed.addAll(faceVtxs); 26319 } else { 26320 let vtxNext = faceVtxs; 26321 for (let vtx = vtxNext; vtx != null; vtx = vtxNext) { 26322 { 26323 vtxNext = vtx.next; 26324 const dist = absorbingFace.distanceToPlane(vtx.pnt).evaluate(); 26325 if (dist > 0) { 26326 this.addPointToFace(vtx, absorbingFace); 26327 } else { 26328 this.unclaimed.add(vtx); 26329 } 26330 } 26331 ; 26332 } 26333 } 26334 } 26335 } 26336 static { 26337 this.NONCONVEX_WRT_LARGER_FACE = 1; 26338 } 26339 static { 26340 this.NONCONVEX = 2; 26341 } 26342 oppFaceDistance(he) { 26343 return he.face.distanceToPlane(he.opposite.face.getCentroid()); 26344 } 26345 /*private*/ 26346 doAdjacentMerge(face, mergeType) { 26347 let hedge = face.he0;
26348 let convex = true; 26349 do { 26350 { 26351 const oppFace = hedge.oppositeFace(); 26352 let merge = false; 26353 const tolerance = 0; 26354 if (mergeType === _QuickHull3D.NONCONVEX) { 26355 if (this.oppFaceDistance(hedge).evaluate() > -tolerance || this.oppFaceDistance(hedge.opposite).evaluate() > -tolerance) { 26356 merge = true; 26357 } 26358 } else { 26359 if (face.area > oppFace.area) { 26360 if (this.oppFaceDistance(hedge).evaluate() > -tolerance) { 26361 merge = true; 26362 } else if (this.oppFaceDistance(hedge.opposite).evaluate() > -tolerance) { 26363 convex = false; 26364 } 26365 } else { 26366 if (this.oppFaceDistance(hedge.opposite).evaluate() >= -tolerance) { 26367 merge = true; 26368 } else if (this.oppFaceDistance(hedge).evaluate() >= -tolerance) { 26369 convex = false; 26370 } 26371 } 26372 } 26373 if (merge) { 26374 if (this.debug) { 26375 console.info(" merging " + face.getVertexString() + " and " + oppFace.getVertexString()); 26376 } 26377 const numd = face.mergeAdjacentFace(hedge, this.discardedFaces); 26378 for (let i = 0; i < numd; i++) { 26379 { 26380 this.deleteFacePoints(this.discardedFaces[i], face); 26381 } 26382 ; 26383 } 26384 if (this.debug) { 26385 console.info(" result: " + face.getVertexString()); 26386 } 26387 return true; 26388 } 26389 hedge = hedge.next; 26390 } 26391 } while (hedge !== face.he0); 26392 if (!convex) { 26393 face.mark = Face.NON_CONVEX; 26394 } 26395 return false; 26396 } 26397 calculateHorizon(eyePnt, edge0, face, horizon) { 26398 this.deleteFacePoints(face, null); 26399 face.mark = Face.DELETED; 26400 if (this.debug) { 26401 console.info(" visiting face " + face.getVertexString()); 26402 } 26403 let edge; 26404 if (edge0 == null) { 26405 edge0 = face.getEdge(0); 26406 edge = edge0; 26407 } else { 26408 edge = edge0.getNext(); 26409 } 26410 const tolerance = 0; 26411 do { 26412 { 26413 const oppFace = edge.oppositeFace(); 26414 if (oppFace.mark === Face.VISIBLE) { 26415 if (oppFace.distanceToPlane(eyePnt).evaluate() > tolerance) { 26416 this.calculateHorizon(eyePnt, edge.getOpposite(), oppFace, horizon); 26417 } else { 26418 horizon.add(edge); 26419 if (this.debug) { 26420 console.info(" adding horizon edge " + edge.getVertexString()); 26421 } 26422 } 26423 } 26424 edge = edge.getNext(); 26425 } 26426 } while (edge !== edge0); 26427 } 26428 /*private*/ 26429 addAdjoiningFace(eyeVtx, he) { 26430 const face = Face.createTriangle$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex$com_vzome_core_math_convexhull_Vertex(eyeVtx, he.tail(), he.head()); 26431 this.faces.add(face); 26432 face.getEdge(-1).setOpposite(he.getOpposite()); 26433 return face.getEdge(0); 26434 } 26435 addNewFaces(newFaces, eyeVtx, horizon) { 26436 newFaces.clear(); 26437 let hedgeSidePrev = null; 26438 let hedgeSideBegin = null; 26439 for (let index = horizon.iterator(); index.hasNext(); ) { 26440 let horizonHe = index.next(); 26441 { 26442 const hedgeSide = this.addAdjoiningFace(eyeVtx, horizonHe); 26443 if (this.debug) { 26444 console.info("new face: " + hedgeSide.face.getVertexString()); 26445 } 26446 if (hedgeSidePrev != null) { 26447 hedgeSide.next.setOpposite(hedgeSidePrev); 26448 } else { 26449 hedgeSideBegin = hedgeSide; 26450 } 26451 newFaces.add(hedgeSide.getFace()); 26452 hedgeSidePrev = hedgeSide; 26453 } 26454 } 26455 hedgeSideBegin.next.setOpposite(hedgeSidePrev); 26456 } 26457 nextPointToAdd() { 26458 if (!this.claimed.isEmpty()) { 26459 const eyeFace = this.claimed.first().face; 26460 let eyeVtx = null; 26461 let maxDist = 0; 26462 for (let vtx = eyeFace.outside; vtx != null && vtx.face === eyeFace; vtx = vtx.next) { 26463 { 26464 const dist = eyeFace.distanceToPlane(vtx.pnt).evaluate(); 26465 if (dist > maxDist) { 26466 maxDist = dist; 26467 eyeVtx = vtx; 26468 } 26469 } 26470 ; 26471 } 26472 return eyeVtx; 26473 } else { 26474 return null; 26475 } 26476 } 26477 addPointToHull(eyeVtx) { 26478 const horizon = new java.util.Vector(); 26479 this.unclaimed.clear(); 26480 if (this.debug) { 26481 console.info("Adding point: " + eyeVtx.index); 26482 console.info(" which is " + eyeVtx.face.distanceToPlane(eyeVtx.pnt) + " above face " + eyeVtx.face.getVertexString()); 26483 } 26484 this.removePointFromFace(eyeVtx, eyeVtx.face); 26485 this.calculateHorizon(eyeVtx.pnt, null, eyeVtx.face, horizon); 26486 this.newFaces.clear();
26487 this.addNewFaces(this.newFaces, eyeVtx, horizon); 26488 for (let index = this.newFaces.iterator(); index.hasNext(); ) { 26489 let face = index.next(); 26490 { 26491 if (face.mark === Face.VISIBLE) { 26492 while (this.doAdjacentMerge(face, _QuickHull3D.NONCONVEX_WRT_LARGER_FACE)) { 26493 } 26494 ; 26495 } 26496 } 26497 } 26498 for (let index = this.newFaces.iterator(); index.hasNext(); ) { 26499 let face = index.next(); 26500 { 26501 if (face.mark === Face.NON_CONVEX) { 26502 face.mark = Face.VISIBLE; 26503 while (this.doAdjacentMerge(face, _QuickHull3D.NONCONVEX)) { 26504 } 26505 ; 26506 } 26507 } 26508 } 26509 this.resolveUnclaimedPoints(this.newFaces); 26510 } 26511 buildHull() { 26512 let cnt = 0; 26513 let eyeVtx; 26514 this.computeMaxAndMin(); 26515 this.createInitialSimplex(); 26516 while ((eyeVtx = this.nextPointToAdd()) != null) { 26517 { 26518 this.addPointToHull(eyeVtx); 26519 cnt++; 26520 if (this.debug) { 26521 console.info("iteration " + cnt + " done"); 26522 } 26523 } 26524 } 26525 ; 26526 this.reindexFacesAndVertices(); 26527 if (this.debug) { 26528 console.info("hull done"); 26529 } 26530 } 26531 /*private*/ 26532 markFaceVertices(face, mark) { 26533 const he0 = face.getFirstEdge(); 26534 let he = he0; 26535 do { 26536 { 26537 he.head().index = mark; 26538 he = he.next; 26539 } 26540 } while (he !== he0); 26541 } 26542 reindexFacesAndVertices() { 26543 for (let i = 0; i < this.numPoints; i++) { 26544 { 26545 this.pointBuffer[i].index = -1; 26546 } 26547 ; 26548 } 26549 this.numFaces = 0; 26550 for (const it = this.faces.iterator(); it.hasNext(); ) { 26551 { 26552 const face = it.next(); 26553 if (face.mark !== Face.VISIBLE) { 26554 it.remove(); 26555 } else { 26556 this.markFaceVertices(face, 0); 26557 this.numFaces++; 26558 } 26559 } 26560 ; 26561 } 26562 this.numVertices = 0; 26563 for (let i = 0; i < this.numPoints; i++) { 26564 { 26565 const vtx = this.pointBuffer[i]; 26566 if (vtx.index === 0) { 26567 this.vertexPointIndices[this.numVertices] = i; 26568 vtx.index = this.numVertices++; 26569 } 26570 } 26571 ; 26572 } 26573 } 26574 checkFaceConvexity(face, ps) { 26575 let he = face.he0; 26576 do { 26577 { 26578 face.checkConsistency(); 26579 let dist = this.oppFaceDistance(he); 26580 if (!dist.isZero()) { 26581 if (ps != null) { 26582 ps.println("Edge " + he.getVertexString() + " non-convex by " + dist); 26583 } 26584 return false; 26585 } 26586 dist = this.oppFaceDistance(he.opposite); 26587 if (!dist.isZero()) { 26588 if (ps != null) { 26589 ps.println("Opposite edge " + he.opposite.getVertexString() + " non-convex by " + dist); 26590 } 26591 return false; 26592 } 26593 if (he.next.oppositeFace() === he.oppositeFace()) { 26594 if (ps != null) { 26595 ps.println("Redundant vertex " + he.head().index + " in face " + face.getVertexString()); 26596 } 26597 return false; 26598 } 26599 he = he.next; 26600 } 26601 } while (he !== face.he0); 26602 return true; 26603 } 26604 checkFaces(ps) {
26605 let convex = true; 26606 for (let index = this.faces.iterator(); index.hasNext(); ) { 26607 let face = index.next(); 26608 { 26609 if (face.mark === Face.VISIBLE) { 26610 if (!this.checkFaceConvexity(face, ps)) { 26611 convex = false; 26612 } 26613 } 26614 } 26615 } 26616 return convex; 26617 } 26618 /** 26619 * Checks the correctness of the hull. This is done by making sure that no faces 26620 * are non-convex and that no points are outside any face. These tests are 26621 * performed using the distance tolerance <i>tol</i>. Faces are considered 26622 * non-convex if any edge is non-convex, and an edge is non-convex if the 26623 * centroid of either adjoining face is more than <i>tol</i> above the plane of 26624 * the other face. Similarly, a point is considered outside a face if its 26625 * distance to that face's plane is more than 10 times <i>tol</i>. 26626 * 26627 * <p> 26628 * If the hull has been {@link #triangulate}, then this routine may 26629 * fail if some of the resulting triangles are very small or thin. 26630 * 26631 * @param {java.io.PrintStream} ps 26632 * print stream for diagnostic messages; may be set to 26633 * <code>null</code> if no messages are desired. 26634 * @return {boolean} true if the hull is valid 26635 * @throws Failure 26636 * @see QuickHull3D#check(PrintStream) 26637 */ 26638 check(ps) { 26639 if (!this.checkFaces(ps)) { 26640 return false; 26641 } 26642 for (let i = 0; i < this.numPoints; i++) { 26643 { 26644 const pnt = this.pointBuffer[i].pnt; 26645 for (let index = this.faces.iterator(); index.hasNext(); ) { 26646 let face = index.next(); 26647 { 26648 if (face.mark === Face.VISIBLE) { 26649 const dist = face.distanceToPlane(pnt); 26650 if (!dist.isZero()) { 26651 if (ps != null) { 26652 ps.println("Point " + i + " " + dist + " above face " + face.getVertexString()); 26653 } 26654 return false; 26655 } 26656 } 26657 } 26658 } 26659 } 26660 ; 26661 } 26662 return true; 26663 } 26664}; 26665QuickHull3D["__class"] = "com.vzome.core.math.convexhull.QuickHull3D"; 26666
26667// src/worker/legacy/from-java/com/vzome/core/edits/ConvexHull3d.ts 26668var ConvexHull3d = class _ConvexHull3d extends ConvexHull { 26669 static { 26670 this.NAME = "ConvexHull3d"; 26671 } 26672 constructor(editorModel) { 26673 super(editorModel); 26674 this.mode = null; 26675 this.generateStruts = true; 26676 this.generatePanels = true; 26677 } 26678 /** 26679 * 26680 * @return {string} 26681 */ 26682 getXmlElementName() { 26683 return _ConvexHull3d.NAME; 26684 } 26685 /** 26686 * 26687 * @return {boolean} 26688 */ 26689 isNoOp() { 26690 return this.generateStruts || this.generatePanels ? super.isNoOp() : true; 26691 } 26692 /** 26693 * 26694 * @param {*} props 26695 */ 26696 configure(props) { 26697 this.setMode(props.get("mode")); 26698 } 26699 /*private*/ 26700 setMode(newMode) { 26701 this.mode = ""; 26702 this.generateStruts = true; 26703 this.generatePanels = true; 26704 if (newMode != null) switch (newMode) { 26705 case "": 26706 this.mode = newMode; 26707 this.generateStruts = true; 26708 this.generatePanels = true; 26709 break; 26710 case "noPanels": 26711 this.mode = newMode; 26712 this.generateStruts = true; 26713 this.generatePanels = false; 26714 break; 26715 case "onlyPanels": 26716 this.mode = newMode; 26717 this.generateStruts = false; 26718 this.generatePanels = true; 26719 break; 26720 default: 26721 if (ChangeSelection.logger_$LI$().isLoggable(java.util.logging.Level.WARNING)) { 26722 ChangeSelection.logger_$LI$().warning(_ConvexHull3d.NAME + ': Ignoring unknown mode: "' + newMode + '".'); 26723 } 26724 break; 26725 } 26726 } 26727 /** 26728 * 26729 */ 26730 perform() { 26731 const hull3d = new QuickHull3D(); 26732 hull3d.build$java_util_Collection(this.getSelectedVertexSet(true)); 26733 this.redo(); 26734 const vertices = hull3d.getVertices$(); 26735 const pointMap = new java.util.HashMap(vertices.length); 26736 for (let index = 0; index < vertices.length; index++) { 26737 let vertex = vertices[index]; 26738 { 26739 const point = new FreePoint(vertex); 26740 pointMap.put(vertex, point); 26741 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(point)); 26742 } 26743 } 26744 const faces = hull3d.getFaces$(); 26745 for (let index = 0; index < faces.length; index++) { 26746 let face = faces[index]; 26747 { 26748 const points = ((s) => { 26749 let a = []; 26750 while (s-- > 0) a.push(null); 26751 return a; 26752 })(face.length); 26753 let startIndex = face[face.length - 1]; 26754 let start = pointMap.get(vertices[startIndex]); 26755 for (let i = 0; i < face.length; i++) { 26756 { 26757 const endIndex = startIndex; 26758 startIndex = face[i]; 26759 const end = points[i] = pointMap.get(vertices[startIndex]); 26760 if (this.generateStruts && startIndex < endIndex) { 26761 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new SegmentJoiningPoints(start, end))); 26762 } 26763 start = end; 26764 } 26765 ; 26766 } 26767 if (this.generatePanels) { 26768 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new PolygonFromVertices(points))); 26769 } 26770 } 26771 } 26772 this.redo(); 26773 } 26774 /** 26775 * 26776 * @param {*} element 26777 */ 26778 getXmlAttributes(element) { 26779 if (this.mode != null) { 26780 element.setAttribute("mode", this.mode); 26781 } 26782 } 26783 /** 26784 * 26785 * @param {*} xml 26786 * @param {XmlSaveFormat} format 26787 */ 26788 setXmlAttributes(xml, format) { 26789 this.setMode(xml.getAttribute("mode")); 26790 } 26791}; 26792ConvexHull3d["__class"] = "com.vzome.core.edits.ConvexHull3d"; 26793
26794// src/worker/legacy/from-java/com/vzome/core/construction/SegmentCrossProduct.ts 26795var SegmentCrossProduct = class extends Segment { 26796 constructor(s1, s2) { 26797 super(s1.field); 26798 if (this.seg1 === void 0) { 26799 this.seg1 = null; 26800 } 26801 if (this.seg2 === void 0) { 26802 this.seg2 = null; 26803 } 26804 this.seg1 = s1; 26805 this.seg2 = s2; 26806 this.mapParamsToState(); 26807 } 26808 /** 26809 * 26810 * @return {boolean} 26811 */ 26812 mapParamsToState() { 26813 if (this.seg1.isImpossible() || this.seg2.isImpossible()) { 26814 return this.setStateVariables(null, null, true); 26815 } 26816 const v2 = AlgebraicVectors.getNormal$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector(this.seg1.getOffset(), this.seg2.getOffset()).scale(this.field["createPower$int"](-4)).scale(this.field["createRational$long$long"](1, 2)); 26817 return this.setStateVariables(this.seg1.getEnd(), v2, false); 26818 } 26819}; 26820SegmentCrossProduct["__class"] = "com.vzome.core.construction.SegmentCrossProduct"; 26821
26822// src/worker/legacy/from-java/com/vzome/core/edits/CrossProduct.ts 26823var CrossProduct = class extends ChangeManifestations { 26824 /** 26825 * 26826 */ 26827 perform() { 26828 let p1 = null; 26829 let p2 = null; 26830 let s1 = null; 26831 let success = false; 26832 this.setOrderedSelection(true); 26833 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 26834 let man = index.next(); 26835 { 26836 if (success) { 26837 this.recordSelected(man); 26838 } else { 26839 this.unselect$com_vzome_core_model_Manifestation(man); 26840 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) { 26841 const nextPoint = man.getFirstConstruction(); 26842 if (p1 == null) { 26843 p1 = nextPoint; 26844 } else if (s1 == null) { 26845 p2 = nextPoint; 26846 s1 = new SegmentJoiningPoints(p1, nextPoint); 26847 } else if (!success) { 26848 let segment = new SegmentJoiningPoints(p2, nextPoint); 26849 segment = new SegmentCrossProduct(s1, segment); 26850 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(segment)); 26851 const endpt = new SegmentEndPoint(segment); 26852 this.manifestConstruction(endpt); 26853 success = true; 26854 } else this.recordSelected(man); 26855 } 26856 } 26857 } 26858 } 26859 if (!success) throw new Command.Failure("cross-product requires three selected vertices"); 26860 this.redo(); 26861 } 26862 constructor(editorModel) { 26863 super(editorModel); 26864 } 26865 /** 26866 * 26867 * @return {string} 26868 */ 26869 getXmlElementName() { 26870 return "CrossProduct"; 26871 } 26872}; 26873CrossProduct["__class"] = "com.vzome.core.edits.CrossProduct"; 26874
26875// src/worker/legacy/from-java/com/vzome/core/edits/Delete.ts 26876var Delete = class extends ChangeManifestations { 26877 /** 26878 * 26879 */ 26880 perform() { 26881 const inputs = new java.util.ArrayList(); 26882 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 26883 let man = index.next(); 26884 { 26885 inputs.add(man); 26886 this.unselect$com_vzome_core_model_Manifestation(man); 26887 } 26888 } 26889 this.redo(); 26890 for (let index = inputs.iterator(); index.hasNext(); ) { 26891 let man = index.next(); 26892 { 26893 this.deleteManifestation(man); 26894 } 26895 } 26896 super.perform(); 26897 } 26898 constructor(editorModel) { 26899 super(editorModel); 26900 } 26901 /** 26902 * 26903 * @return {string} 26904 */ 26905 getXmlElementName() { 26906 return "Delete"; 26907 } 26908}; 26909Delete["__class"] = "com.vzome.core.edits.Delete"; 26910
26911// src/worker/legacy/from-java/com/vzome/core/edits/DodecagonSymmetry.ts 26912var DodecagonSymmetry = class extends ChangeManifestations { 26913 constructor(editor) { 26914 super(editor); 26915 if (this.center === void 0) { 26916 this.center = null; 26917 } 26918 if (this.symmetry === void 0) { 26919 this.symmetry = null; 26920 } 26921 this.center = editor.getCenterPoint(); 26922 this.symmetry = editor["getSymmetrySystem$"]().getSymmetry(); 26923 } 26924 /** 26925 * 26926 */ 26927 perform() { 26928 const transform = new SymmetryTransformation(this.symmetry, 1, this.center); 26929 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 26930 let man = index.next(); 26931 { 26932 let c = man.getFirstConstruction(); 26933 for (let i = 0; i < 11; i++) { 26934 { 26935 c = transform.transform$com_vzome_core_construction_Construction(c); 26936 if (c == null) continue; 26937 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(c)); 26938 } 26939 ; 26940 } 26941 } 26942 } 26943 this.redo(); 26944 } 26945 /** 26946 * 26947 * @return {string} 26948 */ 26949 getXmlElementName() { 26950 return "DodecagonSymmetry"; 26951 } 26952}; 26953DodecagonSymmetry["__class"] = "com.vzome.core.edits.DodecagonSymmetry"; 26954
26955// src/worker/legacy/from-java/com/vzome/core/edits/GhostSymmetry24Cell.ts 26956var GhostSymmetry24Cell = class extends ChangeManifestations { 26957 constructor(editor) { 26958 super(editor); 26959 if (this.field === void 0) { 26960 this.field = null; 26961 } 26962 if (this.proj === void 0) { 26963 this.proj = null; 26964 } 26965 if (this.symmAxis === void 0) { 26966 this.symmAxis = null; 26967 } 26968 if (this.symm === void 0) { 26969 this.symm = null; 26970 } 26971 this.symm = editor["getSymmetrySystem$"]().getSymmetry(); 26972 this.field = this.symm.getField(); 26973 this.symmAxis = editor.getSymmetrySegment(); 26974 } 26975 /** 26976 * 26977 * @return {string} 26978 */ 26979 getXmlElementName() { 26980 return "GhostSymmetry24Cell"; 26981 } 26982 /** 26983 * 26984 * @param {*} result 26985 */ 26986 getXmlAttributes(result) { 26987 if (this.symmAxis != null) XmlSaveFormat.serializeSegment(result, "start", "end", this.symmAxis); 26988 } 26989 /** 26990 * 26991 * @param {*} xml 26992 * @param {XmlSaveFormat} format 26993 */ 26994 setXmlAttributes(xml, format) { 26995 this.symmAxis = format.parseSegment$org_w3c_dom_Element$java_lang_String$java_lang_String(xml, "start", "end"); 26996 } 26997 /** 26998 * 26999 */ 27000 perform() { 27001 if (this.symmAxis == null) this.proj = new Projection.Default(this.field); 27002 else this.proj = new QuaternionProjection(this.field, null, this.symmAxis.getOffset().scale(this.field["createPower$int"](-5))); 27003 const blue = this.symm.getDirection("blue"); 27004 const green = this.symm.getDirection("green"); 27005 for (let k = 0; k < 12; k++) { 27006 { 27007 const A1 = blue.getAxis$int$int(Symmetry.PLUS, (k + 2) % 12).normal(); 27008 const A2 = green.getAxis$int$int(Symmetry.PLUS, (5 * k + 2) % 12).normal(); 27009 const B1 = green.getAxis$int$int(Symmetry.PLUS, (k + 2) % 12).normal(); 27010 const B2 = blue.getAxis$int$int(Symmetry.PLUS, (5 * k + 5) % 12).normal(); 27011 let projected = this.symm.getField().origin(4); 27012 projected.setComponent(0, A2.getComponent(0)); 27013 projected.setComponent(1, A2.getComponent(1)); 27014 projected.setComponent(2, A1.getComponent(0)); 27015 projected.setComponent(3, A1.getComponent(1)); 27016 if (this.proj != null) projected = this.proj.projectImage(projected, true); 27017 let p = new FreePoint(projected.scale(this.field["createPower$int"](5))); 27018 p.setIndex(k); 27019 this.manifestConstruction(p); 27020 projected = this.symm.getField().origin(4); 27021 projected.setComponent(0, B2.getComponent(0)); 27022 projected.setComponent(1, B2.getComponent(1)); 27023 projected.setComponent(2, B1.getComponent(0)); 27024 projected.setComponent(3, B1.getComponent(1)); 27025 if (this.proj != null) projected = this.proj.projectImage(projected, true); 27026 p = new FreePoint(projected.scale(this.field["createPower$int"](5))); 27027 p.setIndex(12 + k); 27028 this.manifestConstruction(p); 27029 } 27030 ; 27031 } 27032 this.redo(); 27033 } 27034}; 27035GhostSymmetry24Cell["__class"] = "com.vzome.core.edits.GhostSymmetry24Cell"; 27036
27037// src/worker/legacy/from-java/com/vzome/core/edits/GroupSelection.ts 27038var GroupSelection = class extends UndoableEdit { 27039 constructor(editor) { 27040 super(); 27041 if (this.mSelection === void 0) { 27042 this.mSelection = null; 27043 } 27044 this.mGrouping = false; 27045 this.recursiveGroups = true; 27046 this.unnecessary = false; 27047 this.mSelection = editor.getSelection(); 27048 } 27049 /** 27050 * 27051 * @param {*} props 27052 */ 27053 configure(props) { 27054 const mode = props.get("mode"); 27055 this.mGrouping = mode == null || /* isEmpty */ 27056 mode.length === 0 || mode === "group"; 27057 this.unnecessary = this.mGrouping === this.mSelection.isSelectionAGroup(); 27058 } 27059 /** 27060 * 27061 * @return {boolean} 27062 */ 27063 isNoOp() { 27064 return this.unnecessary; 27065 } 27066 /** 27067 * 27068 * @param {*} doc 27069 * @return {*} 27070 */ 27071 getXml(doc) { 27072 const elem = doc.createElement("GroupSelection"); 27073 if (!this.mGrouping) DomUtils.addAttribute(elem, "grouping", "false"); 27074 return elem; 27075 } 27076 /** 27077 * 27078 * @param {*} doc 27079 * @return {*} 27080 */ 27081 getDetailXml(doc) { 27082 return this.getXml(doc); 27083 } 27084 /** 27085 * 27086 * @param {*} xml 27087 * @param {XmlSaveFormat} format 27088 * @param {*} context 27089 */ 27090 loadAndPerform(xml, format, context) { 27091 const grouping = xml.getAttribute("grouping"); 27092 this.mGrouping = grouping == null || /* isEmpty */ 27093 grouping.length === 0 || grouping === "true"; 27094 this.recursiveGroups = format.groupingRecursive(); 27095 context.performAndRecord(this); 27096 } 27097 /** 27098 * 27099 * @return {boolean} 27100 */ 27101 isDestructive() { 27102 return true; 27103 } 27104 /** 27105 * 27106 * @return {boolean} 27107 */ 27108 isVisible() { 27109 return true; 27110 } 27111 /** 27112 * 27113 */ 27114 redo() { 27115 if (this.mGrouping) if (this.recursiveGroups) this.mSelection.gatherGroup(); 27116 else this.mSelection.gatherGroup211(); 27117 else if (this.recursiveGroups) this.mSelection.scatterGroup(); 27118 else this.mSelection.scatterGroup211(); 27119 } 27120 /** 27121 * 27122 */ 27123 undo() { 27124 if (!this.mGrouping) if (this.recursiveGroups) this.mSelection.gatherGroup(); 27125 else this.mSelection.gatherGroup211(); 27126 else if (this.recursiveGroups) this.mSelection.scatterGroup(); 27127 else this.mSelection.scatterGroup211(); 27128 } 27129 /** 27130 * 27131 */ 27132 perform() { 27133 if (this.unnecessary) return; 27134 this.redo(); 27135 } 27136 /** 27137 * 27138 * @return {boolean} 27139 */ 27140 isSticky() { 27141 return false; 27142 } 27143}; 27144GroupSelection["__class"] = "com.vzome.core.edits.GroupSelection"; 27145
27146// src/worker/legacy/from-java/com/vzome/core/edits/HeptagonSubdivision.ts 27147var HeptagonSubdivision = class extends ChangeManifestations { 27148 /** 27149 * 27150 */ 27151 perform() { 27152 let p1 = null; 27153 this.setOrderedSelection(true); 27154 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 27155 let man = index.next(); 27156 { 27157 this.unselect$com_vzome_core_model_Manifestation(man); 27158 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) { 27159 const nextPoint = man.getFirstConstruction(); 27160 if (p1 == null) p1 = nextPoint; 27161 else { 27162 const segment = new SegmentJoiningPoints(p1, nextPoint); 27163 const field5 = segment.getField(); 27164 const scaleFactor = field5.getUnitTerm(2).reciprocal(); 27165 const offset = segment.getOffset(); 27166 const off2 = offset.scale(scaleFactor); 27167 const off1 = off2.scale(scaleFactor); 27168 const v1 = p1.getLocation().plus(off1); 27169 const firstPoint = new FreePoint(v1); 27170 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(firstPoint)); 27171 const v2 = v1.plus(off2); 27172 const secondPoint = new FreePoint(v2); 27173 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(secondPoint)); 27174 break; 27175 } 27176 } 27177 } 27178 } 27179 this.redo(); 27180 } 27181 constructor(editor) { 27182 super(editor); 27183 } 27184 /** 27185 * 27186 * @return {string} 27187 */ 27188 getXmlElementName() { 27189 return "HeptagonSubdivision"; 27190 } 27191}; 27192HeptagonSubdivision["__class"] = "com.vzome.core.edits.HeptagonSubdivision"; 27193
27194// src/worker/legacy/from-java/com/vzome/core/edits/InvertSelection.ts 27195var InvertSelection = class extends ChangeSelection { 27196 constructor(editor) { 27197 super(editor.getSelection()); 27198 if (this.mManifestations === void 0) { 27199 this.mManifestations = null; 27200 } 27201 this.mManifestations = editor.getRealizedModel(); 27202 } 27203 /** 27204 * 27205 */ 27206 perform() { 27207 for (let index = this.mManifestations.iterator(); index.hasNext(); ) { 27208 let m = index.next(); 27209 { 27210 if (m.isRendered()) { 27211 if (this.mSelection.manifestationSelected(m)) this.unselect$com_vzome_core_model_Manifestation(m); 27212 else this.select$com_vzome_core_model_Manifestation(m); 27213 } 27214 } 27215 } 27216 this.redo(); 27217 } 27218 /** 27219 * 27220 * @return {string} 27221 */ 27222 getXmlElementName() { 27223 return "InvertSelection"; 27224 } 27225}; 27226InvertSelection["__class"] = "com.vzome.core.edits.InvertSelection"; 27227
27228// src/worker/legacy/from-java/com/vzome/core/edits/JoinPointPair.ts 27229var JoinPointPair = class extends ChangeManifestations { 27230 constructor(editor) { 27231 super(editor); 27232 if (this.start === void 0) { 27233 this.start = null; 27234 } 27235 if (this.end === void 0) { 27236 this.end = null; 27237 } 27238 } 27239 /** 27240 * 27241 * @param {*} props 27242 */ 27243 configure(props) { 27244 this.start = props.get("start"); 27245 this.end = props.get("end"); 27246 } 27247 /** 27248 * 27249 * @param {*} element 27250 */ 27251 getXmlAttributes(element) { 27252 XmlSaveFormat.serializePoint(element, "start", this.start); 27253 XmlSaveFormat.serializePoint(element, "end", this.end); 27254 } 27255 /** 27256 * 27257 * @param {*} xml 27258 * @param {XmlSaveFormat} format 27259 */ 27260 setXmlAttributes(xml, format) { 27261 this.start = format.parsePoint$org_w3c_dom_Element$java_lang_String(xml, "start"); 27262 this.end = format.parsePoint$org_w3c_dom_Element$java_lang_String(xml, "end"); 27263 } 27264 /** 27265 * 27266 */ 27267 perform() { 27268 if (this.start !== this.end && !this.start.getLocation().equals(this.end.getLocation())) { 27269 const segment = new SegmentJoiningPoints(this.start, this.end); 27270 this.manifestConstruction(segment); 27271 } 27272 this.redo(); 27273 } 27274 /** 27275 * 27276 * @return {string} 27277 */ 27278 getXmlElementName() { 27279 return "JoinPointPair"; 27280 } 27281}; 27282JoinPointPair["__class"] = "com.vzome.core.edits.JoinPointPair"; 27283
27284// src/worker/legacy/from-java/com/vzome/core/edits/JoinPoints.ts 27285var JoinPoints = class _JoinPoints extends ChangeManifestations { 27286 constructor(editor) { 27287 super(editor); 27288 this.joinMode = _JoinPoints.JoinModeEnum.CLOSED_LOOP; 27289 } 27290 /** 27291 * 27292 * @return {boolean} 27293 */ 27294 groupingAware() { 27295 return true; 27296 } 27297 /** 27298 * 27299 * @param {*} props 27300 */ 27301 configure(props) { 27302 const mode = props.get("mode"); 27303 if (mode != null) this.joinMode = _JoinPoints.JoinModeEnum[mode]; 27304 } 27305 static { 27306 this.ATTRNAME_CLOSEDLOOP = "closedLoop"; 27307 } 27308 static { 27309 this.ATTRNAME_JOINMODE = "joinMode"; 27310 } 27311 /** 27312 * 27313 * @param {*} element 27314 */ 27315 getXmlAttributes(element) { 27316 if (this.joinMode === _JoinPoints.JoinModeEnum.CLOSED_LOOP) { 27317 } else { 27318 element.setAttribute(_JoinPoints.ATTRNAME_CLOSEDLOOP, "false"); 27319 if (this.joinMode !== _JoinPoints.JoinModeEnum.CHAIN_BALLS) element.setAttribute( 27320 _JoinPoints.ATTRNAME_JOINMODE, 27321 /* Enum.name */ 27322 _JoinPoints.JoinModeEnum[this.joinMode] 27323 ); 27324 } 27325 } 27326 /** 27327 * 27328 * @param {*} xml 27329 * @param {XmlSaveFormat} format 27330 */ 27331 setXmlAttributes(xml, format) { 27332 let attr = xml.getAttribute(_JoinPoints.ATTRNAME_JOINMODE); 27333 if (attr != null && !/* isEmpty */ 27334 (attr.length === 0)) { 27335 this.joinMode = _JoinPoints.JoinModeEnum[attr]; 27336 } else { 27337 attr = xml.getAttribute(_JoinPoints.ATTRNAME_CLOSEDLOOP); 27338 if (attr != null && !/* isEmpty */ 27339 (attr.length === 0)) { 27340 this.joinMode = javaemul.internal.BooleanHelper.parseBoolean(attr) ? _JoinPoints.JoinModeEnum.CLOSED_LOOP : _JoinPoints.JoinModeEnum.CHAIN_BALLS; 27341 } else { 27342 this.joinMode = _JoinPoints.JoinModeEnum.CLOSED_LOOP; 27343 } 27344 } 27345 } 27346 /** 27347 * 27348 */ 27349 perform() { 27350 const inputs = new java.util.ArrayList(); 27351 if (this.joinMode !== _JoinPoints.JoinModeEnum.ALL_POSSIBLE) this.setOrderedSelection(true); 27352 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 27353 let man = index.next(); 27354 { 27355 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) { 27356 inputs.add(man.getFirstConstruction()); 27357 } 27358 this.unselect$com_vzome_core_model_Manifestation(man); 27359 } 27360 } 27361 this.redo(); 27362 const last = inputs.size() - 1; 27363 if (last > 0) { 27364 const points = inputs.toArray([]); 27365 switch (this.joinMode) { 27366 case _JoinPoints.JoinModeEnum.CHAIN_BALLS: 27367 for (let i = 0; i < last; i++) { 27368 { 27369 this.addSegment(points, i, i + 1); 27370 } 27371 ; 27372 } 27373 break; 27374 case _JoinPoints.JoinModeEnum.CLOSED_LOOP: 27375 for (let i = 0; i < last; i++) { 27376 { 27377 this.addSegment(points, i, i + 1); 27378 } 27379 ; 27380 } 27381 if (last > 1) { 27382 this.addSegment(points, last, 0); 27383 } 27384 break; 27385 case _JoinPoints.JoinModeEnum.ALL_TO_FIRST: 27386 for (let i = 1; i <= last; i++) { 27387 { 27388 this.addSegment(points, 0, i); 27389 } 27390 ; 27391 } 27392 break; 27393 case _JoinPoints.JoinModeEnum.ALL_TO_LAST: 27394 for (let i = 0; i < last; i++) { 27395 { 27396 this.addSegment(points, i, last); 27397 } 27398 ; 27399 } 27400 break; 27401 case _JoinPoints.JoinModeEnum.ALL_POSSIBLE: 27402 for (let start = 0; start < last; start++) { 27403 { 27404 for (let end = start + 1; end <= last; end++) { 27405 { 27406 this.addSegment(points, start, end); 27407 } 27408 ; 27409 } 27410 } 27411 ; 27412 } 27413 break; 27414 default: 27415 throw new Command.Failure("Unsupported JoinModeEnum: " + /* Enum.name */ 27416 _JoinPoints.JoinModeEnum[this.joinMode]); 27417 } 27418 this.redo(); 27419 } 27420 } 27421 addSegment(points, start, end) { 27422 if (start !== end && !points[start].getLocation().equals(points[end].getLocation())) { 27423 const segment = new SegmentJoiningPoints(points[start], points[end]); 27424 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(segment)); 27425 } 27426 } 27427 /** 27428 * 27429 * @return {string} 27430 */ 27431 getXmlElementName() { 27432 return "JoinPoints"; 27433 } 27434}; 27435JoinPoints["__class"] = "com.vzome.core.edits.JoinPoints"; 27436((JoinPoints2) => { 27437 let JoinModeEnum; 27438 ((JoinModeEnum2) => { 27439 JoinModeEnum2[JoinModeEnum2["CHAIN_BALLS"] = 0] = "CHAIN_BALLS"; 27440 JoinModeEnum2[JoinModeEnum2["CLOSED_LOOP"] = 1] = "CLOSED_LOOP"; 27441 JoinModeEnum2[JoinModeEnum2["ALL_TO_FIRST"] = 2] = "ALL_TO_FIRST"; 27442 JoinModeEnum2[JoinModeEnum2["ALL_TO_LAST"] = 3] = "ALL_TO_LAST"; 27443 JoinModeEnum2[JoinModeEnum2["ALL_POSSIBLE"] = 4] = "ALL_POSSIBLE"; 27444 })(JoinModeEnum = JoinPoints2.JoinModeEnum || (JoinPoints2.JoinModeEnum = {})); 27445})(JoinPoints || (JoinPoints = {})); 27446
27447// src/worker/legacy/from-java/com/vzome/core/edits/JoinSkewLines.ts 27448var JoinSkewLines = class _JoinSkewLines extends ChangeManifestations { 27449 static { 27450 this.NAME = "JoinSkewLines"; 27451 } 27452 constructor(editor) { 27453 super(editor); 27454 } 27455 /** 27456 * 27457 */ 27458 perform() { 27459 const errorMsg = new java.lang.StringBuilder(); 27460 errorMsg.append("This command requires two non-parallel struts.\n"); 27461 let s0 = null; 27462 let s1 = null; 27463 let qty = 0; 27464 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 27465 let man = index.next(); 27466 { 27467 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) { 27468 switch (qty) { 27469 case 0: 27470 s0 = man; 27471 break; 27472 case 1: 27473 s1 = man; 27474 break; 27475 default: 27476 errorMsg.append("\ntoo many struts are selected."); 27477 this.fail(errorMsg.toString()); 27478 } 27479 qty++; 27480 } 27481 this.unselect$com_vzome_core_model_Manifestation(man); 27482 } 27483 } 27484 if (qty < 2) { 27485 errorMsg.append(qty === 1 ? "\nonly one strut is selected." : "\nno struts are selected."); 27486 this.fail(errorMsg.toString()); 27487 } 27488 const u = s0.getOffset(); 27489 const v = s1.getOffset(); 27490 const p0 = s0.getLocation(); 27491 const q0 = s1.getLocation(); 27492 const uuA = u.dot(u); 27493 const uvB = u.dot(v); 27494 const vvC = v.dot(v); 27495 const denD = uuA["times$com_vzome_core_algebra_AlgebraicNumber"](vvC)["minus$com_vzome_core_algebra_AlgebraicNumber"](uvB["times$com_vzome_core_algebra_AlgebraicNumber"](uvB)); 27496 if (denD.isZero()) { 27497 errorMsg.append("\nstruts are parallel."); 27498 this.fail(errorMsg.toString()); 27499 } 27500 this.redo(); 27501 const w = p0.minus(q0); 27502 const uwD = u.dot(w); 27503 const vwE = v.dot(w); 27504 const sc = uvB["times$com_vzome_core_algebra_AlgebraicNumber"](vwE)["minus$com_vzome_core_algebra_AlgebraicNumber"](vvC["times$com_vzome_core_algebra_AlgebraicNumber"](uwD)).dividedBy(denD); 27505 const tc = uuA["times$com_vzome_core_algebra_AlgebraicNumber"](vwE)["minus$com_vzome_core_algebra_AlgebraicNumber"](uvB["times$com_vzome_core_algebra_AlgebraicNumber"](uwD)).dividedBy(denD); 27506 const w0 = p0.plus(u.scale(sc)); 27507 const pw0 = new FreePoint(w0); 27508 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(pw0)); 27509 const w1 = q0.plus(v.scale(tc)); 27510 if (!w1.equals(w0)) { 27511 const pw1 = new FreePoint(w1); 27512 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(pw1)); 27513 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new SegmentJoiningPoints(pw0, pw1))); 27514 } 27515 this.redo(); 27516 } 27517 /** 27518 * 27519 * @return {string} 27520 */ 27521 getXmlElementName() { 27522 return _JoinSkewLines.NAME; 27523 } 27524}; 27525JoinSkewLines["__class"] = "com.vzome.core.edits.JoinSkewLines"; 27526
27527// src/worker/legacy/from-java/com/vzome/core/edits/Label.ts 27528var Label = class extends ChangeManifestations { 27529 constructor(editorModel) { 27530 super(editorModel); 27531 if (this.target === void 0) { 27532 this.target = null; 27533 } 27534 if (this.label === void 0) { 27535 this.label = null; 27536 } 27537 } 27538 /** 27539 * 27540 * @param {*} props 27541 */ 27542 configure(props) { 27543 this.target = props.get("picked"); 27544 this.label = props.get("text"); 27545 } 27546 /** 27547 * 27548 */ 27549 perform() { 27550 this.labelManifestation(this.target, this.label); 27551 super.perform(); 27552 } 27553 /** 27554 * 27555 * @return {string} 27556 */ 27557 getXmlElementName() { 27558 return "Label"; 27559 } 27560 /** 27561 * 27562 * @param {*} element 27563 */ 27564 getXmlAttributes(element) { 27565 const construction = this.target.getFirstConstruction(); 27566 if (construction != null && construction instanceof Point) XmlSaveFormat.serializePoint(element, "point", construction); 27567 else if (construction != null && construction instanceof Segment) XmlSaveFormat.serializeSegment(element, "startSegment", "endSegment", construction); 27568 else if (construction != null && construction instanceof Polygon) XmlSaveFormat.serializePolygon(element, "polygonVertex", construction); 27569 element.setAttribute("text", this.label); 27570 } 27571 /** 27572 * 27573 * @param {*} xml 27574 * @param {XmlSaveFormat} format 27575 */ 27576 setXmlAttributes(xml, format) { 27577 this.label = xml.getAttribute("text"); 27578 let construction = format.parsePoint$org_w3c_dom_Element$java_lang_String(xml, "point"); 27579 if (construction == null) construction = format.parseSegment$org_w3c_dom_Element$java_lang_String$java_lang_String(xml, "startSegment", "endSegment"); 27580 if (construction == null) construction = format.parsePolygon$org_w3c_dom_Element$java_lang_String(xml, "polygonVertex"); 27581 if (construction != null) this.target = this.getManifestation(construction); 27582 } 27583}; 27584Label["__class"] = "com.vzome.core.edits.Label"; 27585
27586// src/worker/legacy/from-java/com/vzome/core/edits/LinePlaneIntersect.ts 27587var LinePlaneIntersect = class extends ChangeManifestations { 27588 constructor(editor) { 27589 super(editor); 27590 } 27591 /** 27592 * 27593 * @return {boolean} 27594 */ 27595 groupingAware() { 27596 return true; 27597 } 27598 /** 27599 * 27600 */ 27601 perform() { 27602 let panel = null; 27603 let strut = null; 27604 let p0 = null; 27605 let p1 = null; 27606 let p2 = null; 27607 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 27608 let man = index.next(); 27609 { 27610 this.unselect$com_vzome_core_model_Manifestation(man); 27611 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0) && p2 == null) { 27612 const nextPoint = man.getFirstConstruction(); 27613 if (p0 == null) p0 = nextPoint; 27614 else if (p1 == null) p1 = nextPoint; 27615 else if (p2 == null) p2 = nextPoint; 27616 } else if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0) && strut == null) { 27617 strut = man; 27618 } else if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0) && panel == null) { 27619 panel = man; 27620 } 27621 } 27622 } 27623 if (strut == null) { 27624 return; 27625 } 27626 let point = null; 27627 let plane = null; 27628 const line = new LineFromPointAndVector(strut.getLocation(), strut.getZoneVector()); 27629 if (p2 != null && panel == null) { 27630 const points = [p0, p1, p2]; 27631 const polygon = new PolygonFromVertices(points); 27632 plane = new PlaneExtensionOfPolygon(polygon); 27633 } else if (strut != null && panel != null) { 27634 plane = new PlaneFromPointAndNormal(panel.getFirstVertex(), panel.getZoneVector()); 27635 } 27636 if (plane != null && !plane.isImpossible()) { 27637 point = new LinePlaneIntersectionPoint(plane, line); 27638 if (!point.isImpossible()) this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(point)); 27639 } 27640 this.redo(); 27641 } 27642 /** 27643 * 27644 * @return {string} 27645 */ 27646 getXmlElementName() { 27647 return "LinePlaneIntersect"; 27648 } 27649}; 27650LinePlaneIntersect["__class"] = "com.vzome.core.edits.LinePlaneIntersect"; 27651
27652// src/worker/legacy/from-java/com/vzome/core/edits/LoadVEF.ts 27653var LoadVEF = class extends ImportMesh { 27654 constructor(editor) { 27655 super(editor); 27656 } 27657 deselectInputs() { 27658 return false; 27659 } 27660 /** 27661 * 27662 * @param {AlgebraicVector} offset 27663 * @param {ManifestConstructions} events 27664 * @param {*} registry 27665 */ 27666 parseMeshData(offset, events, registry) { 27667 const v2m = new VefToModel(this.projection, events, this.scale, offset); 27668 v2m.parseVEF(this.meshData, this.mManifestations.getField()); 27669 } 27670 /** 27671 * 27672 * @return {string} 27673 */ 27674 getXmlElementName() { 27675 return "LoadVEF"; 27676 } 27677}; 27678LoadVEF["__class"] = "com.vzome.core.edits.LoadVEF"; 27679
27680// src/worker/legacy/from-java/com/vzome/core/edits/ManifestationColorMappers.ts 27681var ManifestationColorMappers = class _ManifestationColorMappers { 27682 static { 27683 this.__static_initialized = false; 27684 } 27685 static __static_initialize() { 27686 if (!_ManifestationColorMappers.__static_initialized) { 27687 _ManifestationColorMappers.__static_initialized = true; 27688 _ManifestationColorMappers.__static_initializer_0(); 27689 } 27690 } 27691 static colorMappers_$LI$() { 27692 _ManifestationColorMappers.__static_initialize(); 27693 if (_ManifestationColorMappers.colorMappers == null) { 27694 _ManifestationColorMappers.colorMappers = new java.util.HashMap(); 27695 } 27696 return _ManifestationColorMappers.colorMappers; 27697 } 27698 static __static_initializer_0() { 27699 _ManifestationColorMappers.RegisterMapper(new _ManifestationColorMappers.RadialCentroidColorMap()); 27700 _ManifestationColorMappers.RegisterMapper(new _ManifestationColorMappers.RadialStandardBasisColorMap()); 27701 _ManifestationColorMappers.RegisterMapper(new _ManifestationColorMappers.CanonicalOrientationColorMap()); 27702 _ManifestationColorMappers.RegisterMapper(new _ManifestationColorMappers.NormalPolarityColorMap()); 27703 _ManifestationColorMappers.RegisterMapper(new _ManifestationColorMappers.CentroidByOctantAndDirectionColorMap()); 27704 _ManifestationColorMappers.RegisterMapper(new _ManifestationColorMappers.CoordinatePlaneColorMap()); 27705 _ManifestationColorMappers.RegisterMapper(new _ManifestationColorMappers.Identity()); 27706 _ManifestationColorMappers.RegisterMapper(new _ManifestationColorMappers.ColorComplementor()); 27707 _ManifestationColorMappers.RegisterMapper(new _ManifestationColorMappers.ColorInverter()); 27708 _ManifestationColorMappers.RegisterMapper(new _ManifestationColorMappers.ColorMaximizer()); 27709 _ManifestationColorMappers.RegisterMapper(new _ManifestationColorMappers.ColorSoftener()); 27710 } 27711 static RegisterMapper(mapper) { 27712 if (mapper != null) { 27713 _ManifestationColorMappers.colorMappers_$LI$().put(mapper.getName(), mapper); 27714 if (mapper.getName() === "ColorComplementor") _ManifestationColorMappers.colorMappers_$LI$().put("ColorComplimentor", mapper); 27715 } 27716 } 27717 static getColorMapper$java_lang_String(mapperName) { 27718 const strTransparency = "TransparencyMapper@"; 27719 if ( 27720 /* startsWith */ 27721 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(mapperName, strTransparency) 27722 ) { 27723 const strAlpha = mapperName.substring(strTransparency.length); 27724 const alpha = javaemul.internal.IntegerHelper.parseInt(strAlpha); 27725 return new _ManifestationColorMappers.TransparencyMapper(alpha); 27726 } 27727 switch (mapperName) { 27728 case "TransparencyMapper": 27729 return new _ManifestationColorMappers.TransparencyMapper(255); 27730 case "DarkenWithDistance": 27731 return new _ManifestationColorMappers.DarkenWithDistance(); 27732 case "DarkenNearOrigin": 27733 return new _ManifestationColorMappers.DarkenNearOrigin(); 27734 case "CopyLastSelectedColor": 27735 return new _ManifestationColorMappers.CopyLastSelectedColor(); 27736 } 27737 return _ManifestationColorMappers.colorMappers_$LI$().get(mapperName); 27738 } 27739 static getColorMapper$java_lang_String$com_vzome_core_editor_api_OrbitSource(mapperName, symmetry) {
27740 let colorMapper = mapperName === "SystemColorMap" ? new _ManifestationColorMappers.SystemColorMap(symmetry) : mapperName === "SystemCentroidColorMap" ? new _ManifestationColorMappers.SystemCentroidColorMap(symmetry) : mapperName === "NearestSpecialOrbitColorMap" ? new _ManifestationColorMappers.NearestSpecialOrbitColorMap(symmetry) : mapperName === "CentroidNearestSpecialOrbitColorMap" ? new _ManifestationColorMappers.CentroidNearestSpecialOrbitColorMap(symmetry) : mapperName === "NearestPredefinedOrbitColorMap" ? new _ManifestationColorMappers.NearestPredefinedOrbitColorMap(symmetry) : mapperName === "CentroidNearestPredefinedOrbitColorMap" ? new _ManifestationColorMappers.CentroidNearestPredefinedOrbitColorMap(symmetry) : _ManifestationColorMappers.getColorMapper$java_lang_String(mapperName); 27741 if (colorMapper == null) { 27742 colorMapper = new _ManifestationColorMappers.Identity(); 27743 } 27744 return colorMapper; 27745 } 27746 static getColorMapper(mapperName, symmetry) { 27747 if ((typeof mapperName === "string" || mapperName === null) && (symmetry != null && (symmetry.constructor != null && symmetry.constructor["__interfaces"] != null && symmetry.constructor["__interfaces"].indexOf("com.vzome.core.editor.api.OrbitSource") >= 0) || symmetry === null)) { 27748 return _ManifestationColorMappers.getColorMapper$java_lang_String$com_vzome_core_editor_api_OrbitSource(mapperName, symmetry); 27749 } else if ((typeof mapperName === "string" || mapperName === null) && symmetry === void 0) { 27750 return _ManifestationColorMappers.getColorMapper$java_lang_String(mapperName); 27751 } else throw new Error("invalid overload"); 27752 } 27753 static mapPolarity(vector, alpha) { 27754 const polarity = vector.compareTo(vector.negate()); 27755 const mid = 128; 27756 const diff = 64; 27757 const shade = polarity < 0 ? mid - diff : polarity > 0 ? mid + diff : mid; 27758 return new Color(shade, shade, shade, alpha); 27759 } 27760 /** 27761 * @param {AlgebraicVector} vector could be midpoint, start, end, normal, or any basis for mapping to a color 27762 * @param {number} alpha the transparency component of the resulting color. 27763 * @return 27764 * @return {Color} 27765 */ 27766 static mapRadially(vector, alpha) { 27767 const midPoint = 127; 27768 const rgb = [midPoint, midPoint, midPoint]; 27769 const parts = ((s) => { 27770 let a = []; 27771 while (s-- > 0) a.push(0); 27772 return a; 27773 })(rgb.length); 27774 const dimensions = Math.min(rgb.length, vector.dimension()); 27775 let whole = 0; 27776 for (let i = 0; i < dimensions; i++) { 27777 { 27778 const component = vector.getComponent(i); 27779 parts[i] = component.evaluate(); 27780 whole += Math.abs(parts[i]); 27781 } 27782 ; 27783 } 27784 if (whole !== 0) { 27785 for (let i = 0; i < parts.length; i++) { 27786 { 27787 const part = parts[i] / whole; 27788 const contribution = part * midPoint; 27789 rgb[i] = /* intValue */ 27790 (contribution | 0) + midPoint; 27791 rgb[i] = Math.min(255, rgb[i]); 27792 rgb[i] = Math.max(0, rgb[i]); 27793 } 27794 ; 27795 } 27796 } 27797 return new Color(rgb[0], rgb[1], rgb[2], alpha); 27798 } 27799 /** 27800 * @param {AlgebraicVector} vector could be midpoint, start, end, normal, or any basis for mapping to a color 27801 * @param {number} alpha the transparency component of the resulting color. 27802 * @param {number} neg the R, G or B level of vectors with a negative value in the corresponding X, Y, or Z dimension. 27803 * @param {number} zero the R, G or B level of vectors with a zero value in the corresponding X, Y, or Z dimension. 27804 * @param {number} pos the R, G or B level of vectors with a positive value in the corresponding X, Y, or Z dimension. 27805 * @return 27806 * @return {Color} 27807 */ 27808 static mapToOctant(vector, alpha, neg, zero, pos) { 27809 const src = [neg, zero, pos]; 27810 const rgb = ((s) => { 27811 let a = []; 27812 while (s-- > 0) a.push(0); 27813 return a; 27814 })(src.length); 27815 const dimensions = Math.min(rgb.length, vector.dimension()); 27816 for (let i = 0; i < dimensions; i++) { 27817 { 27818 const component = vector.getComponent(i); 27819 const dir = ( 27820 /* signum */ 27821 ((f) => { 27822 if (f > 0) { 27823 return 1; 27824 } else if (f < 0) { 27825 return -1; 27826 } else { 27827 return 0; 27828 } 27829 })(component.evaluate()) 27830 ); 27831 const index = ( 27832 /* intValue */ 27833 (dir | 0) + 1 27834 ); 27835 rgb[i] = src[index]; 27836 } 27837 ; 27838 } 27839 return new Color(rgb[0], rgb[1], rgb[2], alpha); 27840 } 27841 static mapToMagnitude(vector, offset, fullScaleSquared, initialColor) { 27842 if (vector == null || initialColor == null) { 27843 return initialColor; 27844 } 27845 const magnitudeSquared = AlgebraicVectors.getMagnitudeSquared(vector).evaluate(); 27846 const denominator = fullScaleSquared === 0 ? 1e-4 : fullScaleSquared; 27847 const scale = Math.abs(offset - magnitudeSquared) / denominator; 27848 return Color.getScaledTo(initialColor, scale); 27849 } 27850}; 27851ManifestationColorMappers["__class"] = "com.vzome.core.edits.ManifestationColorMappers"; 27852((ManifestationColorMappers2) => { 27853 class ManifestationColorMapper { 27854 /* Default method injected from ColorMappers.ColorMapper */ 27855 requiresOrderedSelection() { 27856 return false;
27857 } 27858 constructor() { 27859 } 27860 /** 27861 * Optional opportunity to initialize parameters that were not available at time of the constructor 27862 * but are determined based on the selection or model iterator 27863 * just before apply is called on each individual manifestation. 27864 * @param selection 27865 * @param model 27866 * @param {Manifestations.ManifestationIterator} manifestations 27867 */ 27868 initialize(manifestations) { 27869 } 27870 apply$com_vzome_core_model_Manifestation(man) { 27871 return man == null || !man.isRendered() ? null : this.applyTo(man); 27872 } 27873 /** 27874 * 27875 * @param {*} man 27876 * @return {Color} 27877 */ 27878 apply(man) { 27879 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Manifestation") >= 0) || man === null) { 27880 return this.apply$com_vzome_core_model_Manifestation(man); 27881 } else throw new Error("invalid overload"); 27882 } 27883 applyTo(manifestation) { 27884 let color = manifestation.getColor(); 27885 if (color == null) { 27886 color = Color.WHITE_$LI$(); 27887 } 27888 return color; 27889 } 27890 /** 27891 * subclasses should call {@code result.setAttribute()} if they have any parameters to persist 27892 * @param {*} result 27893 */ 27894 getXmlAttributes(result) { 27895 } 27896 /** 27897 * subclasses should call {@code xml.getAttribute()} to retrieve any persisted parameters 27898 * @param {*} xml 27899 */ 27900 setXmlAttributes(xml) { 27901 } 27902 } 27903 ManifestationColorMappers2.ManifestationColorMapper = ManifestationColorMapper; 27904 ManifestationColorMapper["__class"] = "com.vzome.core.edits.ManifestationColorMappers.ManifestationColorMapper"; 27905 ManifestationColorMapper["__interfaces"] = ["com.vzome.core.edits.ColorMappers.ColorMapper", "java.util.function.Function"]; 27906 class Identity extends ManifestationColorMappers2.ManifestationColorMapper { 27907 /** 27908 * 27909 * @return {string} 27910 */ 27911 getName() { 27912 return "Identity"; 27913 } 27914 /** 27915 * 27916 * @param {*} rendered 27917 * @return {Color} 27918 */ 27919 applyTo(rendered) { 27920 return rendered.getColor(); 27921 } 27922 constructor() { 27923 super(); 27924 } 27925 } 27926 ManifestationColorMappers2.Identity = Identity; 27927 Identity["__class"] = "com.vzome.core.edits.ManifestationColorMappers.Identity"; 27928 Identity["__interfaces"] = ["com.vzome.core.edits.ColorMappers.ColorMapper", "java.util.function.Function"]; 27929 class ColorComplementor extends ManifestationColorMappers2.ManifestationColorMapper { 27930 /** 27931 * 27932 * @return {string} 27933 */ 27934 getName() { 27935 return "ColorComplementor"; 27936 } 27937 /** 27938 * 27939 * @param {*} rendered 27940 * @return {Color} 27941 */ 27942 applyTo(rendered) { 27943 return Color.getComplement(super.applyTo(rendered)); 27944 } 27945 constructor() { 27946 super(); 27947 } 27948 } 27949 ManifestationColorMappers2.ColorComplementor = ColorComplementor; 27950 ColorComplementor["__class"] = "com.vzome.core.edits.ManifestationColorMappers.ColorComplementor"; 27951 ColorComplementor["__interfaces"] = ["com.vzome.core.edits.ColorMappers.ColorMapper", "java.util.function.Function"]; 27952 class ColorInverter extends ManifestationColorMappers2.ManifestationColorMapper { 27953 /** 27954 * 27955 * @return {string} 27956 */ 27957 getName() { 27958 return "ColorInverter"; 27959 } 27960 /** 27961 * 27962 * @param {*} rendered 27963 * @return {Color} 27964 */ 27965 applyTo(rendered) { 27966 return Color.getInverted(super.applyTo(rendered)); 27967 } 27968 constructor() { 27969 super(); 27970 } 27971 } 27972 ManifestationColorMappers2.ColorInverter = ColorInverter; 27973 ColorInverter["__class"] = "com.vzome.core.edits.ManifestationColorMappers.ColorInverter"; 27974 ColorInverter["__interfaces"] = ["com.vzome.core.edits.ColorMappers.ColorMapper", "java.util.function.Function"]; 27975 class ColorMaximizer extends ManifestationColorMappers2.ManifestationColorMapper { 27976 /** 27977 * 27978 * @return {string} 27979 */ 27980 getName() { 27981 return "ColorMaximizer"; 27982 } 27983 /** 27984 * 27985 * @param {*} rendered 27986 * @return {Color} 27987 */ 27988 applyTo(rendered) { 27989 return Color.getMaximum(super.applyTo(rendered)); 27990 } 27991 constructor() { 27992 super(); 27993 } 27994 } 27995 ManifestationColorMappers2.ColorMaximizer = ColorMaximizer; 27996 ColorMaximizer["__class"] = "com.vzome.core.edits.ManifestationColorMappers.ColorMaximizer"; 27997 ColorMaximizer["__interfaces"] = ["com.vzome.core.edits.ColorMappers.ColorMapper", "java.util.function.Function"]; 27998 class ColorSoftener extends ManifestationColorMappers2.ManifestationColorMapper { 27999 /** 28000 * 28001 * @return {string} 28002 */ 28003 getName() { 28004 return "ColorSoftener"; 28005 } 28006 /** 28007 * 28008 * @param {*} rendered 28009 * @return {Color} 28010 */ 28011 applyTo(rendered) { 28012 return Color.getPastel(super.applyTo(rendered)); 28013 } 28014 constructor() { 28015 super(); 28016 } 28017 } 28018 ManifestationColorMappers2.ColorSoftener = ColorSoftener; 28019 ColorSoftener["__class"] = "com.vzome.core.edits.ManifestationColorMappers.ColorSoftener"; 28020 ColorSoftener["__interfaces"] = ["com.vzome.core.edits.ColorMappers.ColorMapper", "java.util.function.Function"]; 28021 class TransparencyMapper extends ManifestationColorMappers2.ManifestationColorMapper { 28022 /** 28023 * 28024 * @return {string} 28025 */ 28026 getName() { 28027 return "TransparencyMapper"; 28028 } 28029 constructor(alpha) { 28030 super(); 28031 if (this.alpha === void 0) { 28032 this.alpha = 0; 28033 } 28034 this.setAlpha(alpha); 28035 } 28036 setAlpha(value) { 28037 this.alpha = Math.min(255, Math.max(1, value)); 28038 } 28039 static { 28040 this.ALPHA_ATTR_NAME = "alpha"; 28041 } 28042 /** 28043 * 28044 * @param {*} xml 28045 */ 28046 setXmlAttributes(xml) { 28047 this.alpha = javaemul.internal.IntegerHelper.parseInt(xml.getAttribute(TransparencyMapper.ALPHA_ATTR_NAME)); 28048 } 28049 /** 28050 * 28051 * @param {*} result 28052 */ 28053 getXmlAttributes(result) { 28054 result.setAttribute( 28055 TransparencyMapper.ALPHA_ATTR_NAME, 28056 /* toString */ 28057 "" + this.alpha 28058 ); 28059 } 28060 /** 28061 * 28062 * @param {*} rendered 28063 * @return {Color} 28064 */ 28065 applyTo(rendered) { 28066 const color = super.applyTo(rendered); 28067 return new Color(color.getRed(), color.getGreen(), color.getBlue(), this.alpha); 28068 } 28069 } 28070 ManifestationColorMappers2.TransparencyMapper = TransparencyMapper;
28071 TransparencyMapper["__class"] = "com.vzome.core.edits.ManifestationColorMappers.TransparencyMapper"; 28072 TransparencyMapper["__interfaces"] = ["com.vzome.core.edits.ColorMappers.ColorMapper", "java.util.function.Function"]; 28073 class CopyLastSelectedColor extends ManifestationColorMappers2.ManifestationColorMapper { 28074 /** 28075 * 28076 * @return {string} 28077 */ 28078 getName() { 28079 return "CopyLastSelectedColor"; 28080 } 28081 /** 28082 * 28083 * @return {boolean} 28084 */ 28085 requiresOrderedSelection() { 28086 return true; 28087 } 28088 /** 28089 * 28090 * @param {Manifestations.ManifestationIterator} selection 28091 */ 28092 initialize(selection) { 28093 if (this.color == null) { 28094 let last = null; 28095 for (let index = selection.iterator(); index.hasNext(); ) { 28096 let man = index.next(); 28097 { 28098 if (man != null && man.isRendered()) { 28099 last = man; 28100 } 28101 } 28102 } 28103 if (last != null) { 28104 this.color = last.getColor(); 28105 } 28106 } 28107 if (this.color == null) { 28108 throw new Command.Failure("select a ball, strut or panel as the color to be copied."); 28109 } 28110 } 28111 /** 28112 * 28113 * @param {*} xml 28114 */ 28115 setXmlAttributes(xml) { 28116 const red = xml.getAttribute("red"); 28117 const green = xml.getAttribute("green"); 28118 const blue = xml.getAttribute("blue"); 28119 const alphaStr = xml.getAttribute("alpha"); 28120 const alpha = alphaStr == null || /* isEmpty */ 28121 alphaStr.length === 0 ? 255 : javaemul.internal.IntegerHelper.parseInt(alphaStr); 28122 this.color = new Color(javaemul.internal.IntegerHelper.parseInt(red), javaemul.internal.IntegerHelper.parseInt(green), javaemul.internal.IntegerHelper.parseInt(blue), alpha); 28123 } 28124 /** 28125 * 28126 * @param {*} result 28127 */ 28128 getXmlAttributes(result) { 28129 result.setAttribute("red", "" + this.color.getRed()); 28130 result.setAttribute("green", "" + this.color.getGreen()); 28131 result.setAttribute("blue", "" + this.color.getBlue()); 28132 const alpha = this.color.getAlpha(); 28133 if (alpha < 255) result.setAttribute("alpha", "" + alpha); 28134 } 28135 /** 28136 * 28137 * @param {*} rendered 28138 * @return {Color} 28139 */ 28140 applyTo(rendered) { 28141 return this.color; 28142 } 28143 constructor() { 28144 super(); 28145 if (this.color === void 0) { 28146 this.color = null; 28147 } 28148 } 28149 } 28150 ManifestationColorMappers2.CopyLastSelectedColor = CopyLastSelectedColor; 28151 CopyLastSelectedColor["__class"] = "com.vzome.core.edits.ManifestationColorMappers.CopyLastSelectedColor"; 28152 CopyLastSelectedColor["__interfaces"] = ["com.vzome.core.edits.ColorMappers.ColorMapper", "java.util.function.Function"]; 28153 class CentroidColorMapper extends ManifestationColorMappers2.ManifestationColorMapper { 28154 constructor() { 28155 super(); 28156 } 28157 applyTo$com_vzome_core_model_Manifestation(rendered) { 28158 const color = rendered.getColor(); 28159 const alpha = color == null ? 255 : color.getAlpha(); 28160 return this.applyTo$com_vzome_core_algebra_AlgebraicVector$int(rendered.getCentroid(), alpha); 28161 } 28162 applyTo$com_vzome_core_algebra_AlgebraicVector$int(centroid, alpha) { 28163 throw new Error("cannot invoke abstract overloaded method... check your argument(s) type(s)"); 28164 } 28165 applyTo(centroid, alpha) { 28166 if ((centroid != null && centroid instanceof AlgebraicVector || centroid === null) && (typeof alpha === "number" || alpha === null)) { 28167 return this.applyTo$com_vzome_core_algebra_AlgebraicVector$int(centroid, alpha); 28168 } else if ((centroid != null && (centroid.constructor != null && centroid.constructor["__interfaces"] != null && centroid.constructor["__interfaces"].indexOf("com.vzome.core.model.Manifestation") >= 0) || centroid === null) && alpha === void 0) { 28169 return this.applyTo$com_vzome_core_model_Manifestation(centroid); 28170 } else throw new Error("invalid overload"); 28171 } 28172 } 28173 ManifestationColorMappers2.CentroidColorMapper = CentroidColorMapper; 28174 CentroidColorMapper["__class"] = "com.vzome.core.edits.ManifestationColorMappers.CentroidColorMapper"; 28175 CentroidColorMapper["__interfaces"] = ["com.vzome.core.edits.ColorMappers.ColorMapper", "java.util.function.Function"]; 28176 class DarkenNearOrigin extends ManifestationColorMappers2.ManifestationColorMapper { 28177 /** 28178 * 28179 * @return {string} 28180 */ 28181 getName() { 28182 return "DarkenNearOrigin"; 28183 } 28184 /** 28185 * 28186 * @param {Manifestations.ManifestationIterator} manifestations 28187 */ 28188 initialize(manifestations) { 28189 if (this.fullScaleSquared === 0) { 28190 const fullScale = DarkenNearOrigin.getMostDistantPoint(manifestations); 28191 if (fullScale == null) { 28192 throw new Command.Failure("unable to determine most distant point"); 28193 } 28194 if (fullScale.isOrigin()) { 28195 throw new Command.Failure("select at least one point other than the origin"); 28196 } 28197 this.fullScaleSquared = AlgebraicVectors.getMagnitudeSquared(fullScale).evaluate(); 28198 } 28199 } 28200 static getMostDistantPoint(manifestations) { 28201 const centroids = new java.util.ArrayList(); 28202 for (let index = manifestations.iterator(); index.hasNext(); ) { 28203 let man = index.next(); 28204 { 28205 centroids.add(man.getCentroid()); 28206 } 28207 } 28208 if (centroids.isEmpty()) { 28209 return null; 28210 } 28211 const mostDistant = AlgebraicVectors.getMostDistantFromOrigin(centroids); 28212 return mostDistant.isEmpty() ? null : mostDistant.first(); 28213 } 28214 /** 28215 * 28216 * @param {*} rendered 28217 * @return {Color} 28218 */ 28219 applyTo(rendered) { 28220 const centroid = rendered.getCentroid(); 28221 const initialColor = super.applyTo(rendered); 28222 return ManifestationColorMappers2.mapToMagnitude(centroid, this.offset, this.fullScaleSquared, initialColor); 28223 } 28224 /** 28225 * 28226 * @param {*} result 28227 */ 28228 getXmlAttributes(result) { 28229 result.setAttribute( 28230 this.FULLSCALESQUARED_ATTR_NAME, 28231 /* toString */ 28232 "" + this.fullScaleSquared 28233 ); 28234 } 28235 /** 28236 * 28237 * @param {*} xml 28238 */ 28239 setXmlAttributes(xml) { 28240 const attr = xml.getAttribute(this.FULLSCALESQUARED_ATTR_NAME); 28241 this.fullScaleSquared = javaemul.internal.DoubleHelper.parseDouble(attr); 28242 } 28243 constructor() { 28244 super(); 28245 this.offset = 0; 28246 this.fullScaleSquared = 0; 28247 this.FULLSCALESQUARED_ATTR_NAME = "fullScaleSquared"; 28248 } 28249 } 28250 ManifestationColorMappers2.DarkenNearOrigin = DarkenNearOrigin; 28251 DarkenNearOrigin["__class"] = "com.vzome.core.edits.ManifestationColorMappers.DarkenNearOrigin"; 28252 DarkenNearOrigin["__interfaces"] = ["com.vzome.core.edits.ColorMappers.ColorMapper", "java.util.function.Function"]; 28253 class ManifestationSubclassColorMapper extends ManifestationColorMappers2.ManifestationColorMapper { 28254 /** 28255 * 28256 * @param {*} man 28257 * @return {Color} 28258 */ 28259 applyTo(man) { 28260 const color = man.getColor();
28261 const alpha = color == null ? 255 : color.getAlpha(); 28262 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) { 28263 return this.applyToBall(man, alpha); 28264 } else if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) { 28265 return this.applyToStrut(man, alpha); 28266 } else if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0)) { 28267 return this.applyToPanel(man, alpha); 28268 } 28269 return null; 28270 } 28271 constructor() { 28272 super(); 28273 } 28274 } 28275 ManifestationColorMappers2.ManifestationSubclassColorMapper = ManifestationSubclassColorMapper; 28276 ManifestationSubclassColorMapper["__class"] = "com.vzome.core.edits.ManifestationColorMappers.ManifestationSubclassColorMapper"; 28277 ManifestationSubclassColorMapper["__interfaces"] = ["com.vzome.core.edits.ColorMappers.ColorMapper", "java.util.function.Function"]; 28278 class RadialCentroidColorMap extends ManifestationColorMappers2.CentroidColorMapper { 28279 /** 28280 * 28281 * @return {string} 28282 */ 28283 getName() { 28284 return "RadialCentroidColorMap"; 28285 } 28286 applyTo$com_vzome_core_algebra_AlgebraicVector$int(centroid, alpha) { 28287 return ManifestationColorMappers2.mapRadially(centroid, alpha); 28288 } 28289 /** 28290 * 28291 * @param {AlgebraicVector} centroid 28292 * @param {number} alpha 28293 * @return {Color} 28294 */ 28295 applyTo(centroid, alpha) { 28296 if ((centroid != null && centroid instanceof AlgebraicVector || centroid === null) && (typeof alpha === "number" || alpha === null)) { 28297 return this.applyTo$com_vzome_core_algebra_AlgebraicVector$int(centroid, alpha); 28298 } else if ((centroid != null && (centroid.constructor != null && centroid.constructor["__interfaces"] != null && centroid.constructor["__interfaces"].indexOf("com.vzome.core.model.Manifestation") >= 0) || centroid === null) && alpha === void 0) { 28299 return this.applyTo$com_vzome_core_model_Manifestation(centroid); 28300 } else throw new Error("invalid overload"); 28301 } 28302 constructor() { 28303 super(); 28304 } 28305 } 28306 ManifestationColorMappers2.RadialCentroidColorMap = RadialCentroidColorMap; 28307 RadialCentroidColorMap["__class"] = "com.vzome.core.edits.ManifestationColorMappers.RadialCentroidColorMap"; 28308 RadialCentroidColorMap["__interfaces"] = ["com.vzome.core.edits.ColorMappers.ColorMapper", "java.util.function.Function"]; 28309 class CentroidByOctantAndDirectionColorMap extends ManifestationColorMappers2.CentroidColorMapper { 28310 /** 28311 * 28312 * @return {string} 28313 */ 28314 getName() { 28315 return "CentroidByOctantAndDirectionColorMap"; 28316 } 28317 applyTo$com_vzome_core_algebra_AlgebraicVector$int(vector, alpha) { 28318 return Color.getMaximum(ManifestationColorMappers2.mapToOctant(vector, alpha, 0, 127, 255)); 28319 } 28320 /** 28321 * 28322 * @param {AlgebraicVector} vector 28323 * @param {number} alpha 28324 * @return {Color} 28325 */ 28326 applyTo(vector, alpha) { 28327 if ((vector != null && vector instanceof AlgebraicVector || vector === null) && (typeof alpha === "number" || alpha === null)) { 28328 return this.applyTo$com_vzome_core_algebra_AlgebraicVector$int(vector, alpha); 28329 } else if ((vector != null && (vector.constructor != null && vector.constructor["__interfaces"] != null && vector.constructor["__interfaces"].indexOf("com.vzome.core.model.Manifestation") >= 0) || vector === null) && alpha === void 0) { 28330 return this.applyTo$com_vzome_core_model_Manifestation(vector); 28331 } else throw new Error("invalid overload"); 28332 } 28333 constructor() { 28334 super(); 28335 } 28336 } 28337 ManifestationColorMappers2.CentroidByOctantAndDirectionColorMap = CentroidByOctantAndDirectionColorMap; 28338 CentroidByOctantAndDirectionColorMap["__class"] = "com.vzome.core.edits.ManifestationColorMappers.CentroidByOctantAndDirectionColorMap"; 28339 CentroidByOctantAndDirectionColorMap["__interfaces"] = ["com.vzome.core.edits.ColorMappers.ColorMapper", "java.util.function.Function"]; 28340 class CoordinatePlaneColorMap extends ManifestationColorMappers2.CentroidColorMapper { 28341 /** 28342 * 28343 * @return {string} 28344 */ 28345 getName() { 28346 return "CoordinatePlaneColorMap"; 28347 }
28348 applyTo$com_vzome_core_algebra_AlgebraicVector$int(vector, alpha) { 28349 return Color.getInverted(ManifestationColorMappers2.mapToOctant(vector, alpha, 0, 255, 0)); 28350 } 28351 /** 28352 * 28353 * @param {AlgebraicVector} vector 28354 * @param {number} alpha 28355 * @return {Color} 28356 */ 28357 applyTo(vector, alpha) { 28358 if ((vector != null && vector instanceof AlgebraicVector || vector === null) && (typeof alpha === "number" || alpha === null)) { 28359 return this.applyTo$com_vzome_core_algebra_AlgebraicVector$int(vector, alpha); 28360 } else if ((vector != null && (vector.constructor != null && vector.constructor["__interfaces"] != null && vector.constructor["__interfaces"].indexOf("com.vzome.core.model.Manifestation") >= 0) || vector === null) && alpha === void 0) { 28361 return this.applyTo$com_vzome_core_model_Manifestation(vector); 28362 } else throw new Error("invalid overload"); 28363 } 28364 constructor() { 28365 super(); 28366 } 28367 } 28368 ManifestationColorMappers2.CoordinatePlaneColorMap = CoordinatePlaneColorMap; 28369 CoordinatePlaneColorMap["__class"] = "com.vzome.core.edits.ManifestationColorMappers.CoordinatePlaneColorMap"; 28370 CoordinatePlaneColorMap["__interfaces"] = ["com.vzome.core.edits.ColorMappers.ColorMapper", "java.util.function.Function"]; 28371 class SystemCentroidColorMap extends ManifestationColorMappers2.CentroidColorMapper { 28372 /** 28373 * 28374 * @return {string} 28375 */ 28376 getName() { 28377 return "SystemCentroidColorMap"; 28378 } 28379 constructor(symmetry) { 28380 super(); 28381 if (this.symmetrySystem === void 0) { 28382 this.symmetrySystem = null; 28383 } 28384 this.symmetrySystem = symmetry; 28385 } 28386 applyTo$com_vzome_core_algebra_AlgebraicVector$int(centroid, alpha) { 28387 return this.symmetrySystem.getVectorColor(centroid); 28388 } 28389 /** 28390 * 28391 * @param {AlgebraicVector} centroid 28392 * @param {number} alpha 28393 * @return {Color} 28394 */ 28395 applyTo(centroid, alpha) { 28396 if ((centroid != null && centroid instanceof AlgebraicVector || centroid === null) && (typeof alpha === "number" || alpha === null)) { 28397 return this.applyTo$com_vzome_core_algebra_AlgebraicVector$int(centroid, alpha); 28398 } else if ((centroid != null && (centroid.constructor != null && centroid.constructor["__interfaces"] != null && centroid.constructor["__interfaces"].indexOf("com.vzome.core.model.Manifestation") >= 0) || centroid === null) && alpha === void 0) { 28399 return this.applyTo$com_vzome_core_model_Manifestation(centroid); 28400 } else throw new Error("invalid overload"); 28401 } 28402 /** 28403 * 28404 * @param {*} element 28405 */ 28406 getXmlAttributes(element) { 28407 if (this.symmetrySystem != null) { 28408 DomUtils.addAttribute(element, "symmetry", this.symmetrySystem.getName()); 28409 } 28410 } 28411 } 28412 ManifestationColorMappers2.SystemCentroidColorMap = SystemCentroidColorMap; 28413 SystemCentroidColorMap["__class"] = "com.vzome.core.edits.ManifestationColorMappers.SystemCentroidColorMap"; 28414 SystemCentroidColorMap["__interfaces"] = ["com.vzome.core.edits.ColorMappers.ColorMapper", "java.util.function.Function"]; 28415 class DarkenWithDistance extends ManifestationColorMappers2.DarkenNearOrigin { 28416 /** 28417 * 28418 * @return {string} 28419 */ 28420 getName() { 28421 return "DarkenWithDistance"; 28422 } 28423 /** 28424 * 28425 * @param {Manifestations.ManifestationIterator} manifestations 28426 */ 28427 initialize(manifestations) { 28428 super.initialize(manifestations); 28429 this.offset = this.fullScaleSquared; 28430 } 28431 constructor() { 28432 super(); 28433 } 28434 } 28435 ManifestationColorMappers2.DarkenWithDistance = DarkenWithDistance; 28436 DarkenWithDistance["__class"] = "com.vzome.core.edits.ManifestationColorMappers.DarkenWithDistance"; 28437 DarkenWithDistance["__interfaces"] = ["com.vzome.core.edits.ColorMappers.ColorMapper", "java.util.function.Function"]; 28438 class RadialStandardBasisColorMap extends ManifestationColorMappers2.ManifestationSubclassColorMapper { 28439 /** 28440 * 28441 * @return {string} 28442 */ 28443 getName() { 28444 return "RadialStandardBasisColorMap"; 28445 } 28446 /** 28447 * 28448 * @param {*} ball 28449 * @param {number} alpha 28450 * @return {Color} 28451 */ 28452 applyToBall(ball, alpha) { 28453 return this.applyTo$com_vzome_core_algebra_AlgebraicVector$int(ball.getLocation(), alpha); 28454 } 28455 /** 28456 * 28457 * @param {*} strut 28458 * @param {number} alpha 28459 * @return {Color} 28460 */ 28461 applyToStrut(strut, alpha) { 28462 return this.applyTo$com_vzome_core_algebra_AlgebraicVector$int(strut.getOffset(), alph
28462a); 28463 } 28464 /** 28465 * 28466 * @param {*} panel 28467 * @param {number} alpha 28468 * @return {Color} 28469 */ 28470 applyToPanel(panel, alpha) { 28471 return this.applyTo$com_vzome_core_algebra_AlgebraicVector$int(panel["getNormal$"](), alpha); 28472 } 28473 applyTo$com_vzome_core_algebra_AlgebraicVector$int(vector, alpha) { 28474 return ManifestationColorMappers2.mapRadially(vector, alpha); 28475 } 28476 applyTo(vector, alpha) { 28477 if ((vector != null && vector instanceof AlgebraicVector || vector === null) && (typeof alpha === "number" || alpha === null)) { 28478 return this.applyTo$com_vzome_core_algebra_AlgebraicVector$int(vector, alpha); 28479 } else if ((vector != null && (vector.constructor != null && vector.constructor["__interfaces"] != null && vector.constructor["__interfaces"].indexOf("com.vzome.core.model.Manifestation") >= 0) || vector === null) && alpha === void 0) { 28480 return super.applyTo(vector); 28481 } else throw new Error("invalid overload"); 28482 } 28483 constructor() { 28484 super(); 28485 } 28486 } 28487 ManifestationColorMappers2.RadialStandardBasisColorMap = RadialStandardBasisColorMap; 28488 RadialStandardBasisColorMap["__class"] = "com.vzome.core.edits.ManifestationColorMappers.RadialStandardBasisColorMap"; 28489 RadialStandardBasisColorMap["__interfaces"] = ["com.vzome.core.edits.ColorMappers.ColorMapper", "java.util.function.Function"]; 28490 class SystemColorMap extends ManifestationColorMappers2.ManifestationSubclassColorMapper { 28491 /** 28492 * 28493 * @return {string} 28494 */ 28495 getName() { 28496 return "SystemColorMap"; 28497 } 28498 constructor(symmetry) { 28499 super(); 28500 if (this.symmetrySystem === void 0) { 28501 this.symmetrySystem = null; 28502 } 28503 this.symmetrySystem = symmetry; 28504 } 28505 /** 28506 * 28507 * @param {*} ball 28508 * @param {number} alpha 28509 * @return {Color} 28510 */ 28511 applyToBall(ball, alpha) { 28512 return this.symmetrySystem.getVectorColor(null); 28513 } 28514 /** 28515 * 28516 * @param {*} strut 28517 * @param {number} alpha 28518 * @return {Color} 28519 */ 28520 applyToStrut(strut, alpha) { 28521 return this.applyToVector(strut.getOffset()); 28522 } 28523 /** 28524 * 28525 * @param {*} panel 28526 * @param {number} alpha 28527 * @return {Color} 28528 */ 28529 applyToPanel(panel, alpha) { 28530 return this.applyToVector(panel["getNormal$"]()).getPastel(); 28531 } 28532 applyToVector(vector) { 28533 return this.symmetrySystem.getVectorColor(vector); 28534 } 28535 /** 28536 * 28537 * @param {*} element 28538 */ 28539 getXmlAttributes(element) { 28540 if (this.symmetrySystem != null) { 28541 DomUtils.addAttribute(element, "symmetry", this.symmetrySystem.getName()); 28542 } 28543 } 28544 } 28545 ManifestationColorMappers2.SystemColorMap = SystemColorMap; 28546 SystemColorMap["__class"] = "com.vzome.core.edits.ManifestationColorMappers.SystemColorMap"; 28547 SystemColorMap["__interfaces"] = ["com.vzome.core.edits.ColorMappers.ColorMapper", "java.util.function.Function"]; 28548 class CanonicalOrientationColorMap extends ManifestationColorMappers2.RadialStandardBasisColorMap { 28549 /** 28550 * 28551 * @return {string} 28552 */ 28553 getName() { 28554 return "CanonicalOrientationColorMap"; 28555 } 28556 /** 28557 * 28558 * @param {*} ball 28559 * @param {number} alpha 28560 * @return {Color} 28561 */ 28562 applyToBall(ball, alpha) { 28563 return super.applyToBall(ball, alpha); 28564 } 28565 applyTo$com_vzome_core_algebra_AlgebraicVector$int(vector, alpha) { 28566 return super.applyTo$com_vzome_core_algebra_AlgebraicVector$int(AlgebraicVectors.getCanonicalOrientation(vector), alpha); 28567 } 28568 /** 28569 * 28570 * @param {AlgebraicVector} vector 28571 * @param {number} alpha 28572 * @return {Color} 28573 */ 28574 applyTo(vector, alpha) { 28575 if ((vector != null && vector instanceof AlgebraicVector || vector === null) && (typeof alpha === "number" || alpha === null)) { 28576 return this.applyTo$com_vzome_core_algebra_AlgebraicVector$int(vector, alpha); 28577 } else if ((vector != null && (vector.constructor != null && vector.constructor["__interfaces"] != null && vector.constructor["__interfaces"].indexOf("com.vzome.core.model.Manifestation") >= 0) || vector === null) && alpha === void 0) { 28578 return super.applyTo(vector); 28579 } else throw new Error("invalid overload"); 28580 } 28581 constructor() { 28582 super(); 28583 } 28584 } 28585 ManifestationColorMappers2.CanonicalOrientationColorMap = CanonicalOrientationColorMap; 28586 CanonicalOrientationColorMap["__class"] = "com.vzome.core.edits.ManifestationColorMappers.CanonicalOrientationColorMap"; 28587 CanonicalOrientationColorMap["__interfaces"] = ["com.vzome.core.edits.ColorMappers.ColorMapper", "java.util.function.Function"]; 28588 class NormalPolarityColorMap extends ManifestationColorMappers2.RadialStandardBasisColorMap { 28589 /** 28590 * 28591 * @return {string} 28592 */ 28593 getName() { 28594 return "NormalPolarityColorMap"; 28595 }
28596 applyTo$com_vzome_core_algebra_AlgebraicVector$int(vector, alpha) { 28597 return ManifestationColorMappers2.mapPolarity(vector, alpha); 28598 } 28599 /** 28600 * 28601 * @param {AlgebraicVector} vector 28602 * @param {number} alpha 28603 * @return {Color} 28604 */ 28605 applyTo(vector, alpha) { 28606 if ((vector != null && vector instanceof AlgebraicVector || vector === null) && (typeof alpha === "number" || alpha === null)) { 28607 return this.applyTo$com_vzome_core_algebra_AlgebraicVector$int(vector, alpha); 28608 } else if ((vector != null && (vector.constructor != null && vector.constructor["__interfaces"] != null && vector.constructor["__interfaces"].indexOf("com.vzome.core.model.Manifestation") >= 0) || vector === null) && alpha === void 0) { 28609 return super.applyTo(vector); 28610 } else throw new Error("invalid overload"); 28611 } 28612 constructor() { 28613 super(); 28614 } 28615 } 28616 ManifestationColorMappers2.NormalPolarityColorMap = NormalPolarityColorMap; 28617 NormalPolarityColorMap["__class"] = "com.vzome.core.edits.ManifestationColorMappers.NormalPolarityColorMap"; 28618 NormalPolarityColorMap["__interfaces"] = ["com.vzome.core.edits.ColorMappers.ColorMapper", "java.util.function.Function"]; 28619 class NearestSpecialOrbitColorMap extends ManifestationColorMappers2.SystemColorMap { 28620 /** 28621 * 28622 * @return {string} 28623 */ 28624 getName() { 28625 return "NearestSpecialOrbitColorMap"; 28626 } 28627 constructor(symm) { 28628 super(symm); 28629 this.specialOrbits = new java.util.LinkedHashSet(); 28630 this.specialOrbits.add(symm.getSymmetry().getSpecialOrbit(0 /* BLUE */)); 28631 this.specialOrbits.add(symm.getSymmetry().getSpecialOrbit(2 /* YELLOW */)); 28632 this.specialOrbits.add(symm.getSymmetry().getSpecialOrbit(1 /* RED */)); 28633 } 28634 /** 28635 * 28636 * @param {*} ball 28637 * @param {number} alpha 28638 * @return {Color} 28639 */ 28640 applyToBall(ball, alpha) { 28641 return this.applyToVector(ball.getLocation()); 28642 } 28643 /** 28644 * 28645 * @param {*} strut 28646 * @param {number} alpha 28647 * @return {Color} 28648 */ 28649 applyToStrut(strut, alpha) { 28650 return this.applyToVector(strut.getOffset()); 28651 } 28652 /** 28653 * 28654 * @param {*} panel 28655 * @param {number} alpha 28656 * @return {Color} 28657 */ 28658 applyToPanel(panel, alpha) { 28659 return this.applyToVector(panel["getNormal$"]()).getPastel(); 28660 } 28661 /** 28662 * 28663 * @param {AlgebraicVector} vector 28664 * @return {Color} 28665 */ 28666 applyToVector(vector) { 28667 if (vector.isOrigin()) { 28668 return this.symmetrySystem.getVectorColor(null); 28669 } 28670 const nearestSpecialOrbit = this.symmetrySystem.getSymmetry()["getAxis$com_vzome_core_math_RealVector$java_util_Collection"](vector.toRealVector(), this.specialOrbits); 28671 const normal = nearestSpecialOrbit.normal(); 28672 return this.symmetrySystem.getVectorColor(normal); 28673 } 28674 } 28675 ManifestationColorMappers2.NearestSpecialOrbitColorMap = NearestSpecialOrbitColorMap; 28676 NearestSpecialOrbitColorMap["__class"] = "com.vzome.core.edits.ManifestationColorMappers.NearestSpecialOrbitColorMap"; 28677 NearestSpecialOrbitColorMap["__interfaces"] = ["com.vzome.core.edits.ColorMappers.ColorMapper", "java.util.function.Function"]; 28678 class CentroidNearestSpecialOrbitColorMap extends ManifestationColorMappers2.NearestSpecialOrbitColorMap { 28679 /** 28680 * 28681 * @return {string} 28682 */ 28683 getName() { 28684 return "CentroidNearestSpecialOrbitColorMap"; 28685 } 28686 constructor(symm) { 28687 super(symm); 28688 } 28689 /** 28690 * 28691 * @param {*} ball 28692 * @param {number} alpha 28693 * @return {Color} 28694 */ 28695 applyToBall(ball, alpha) { 28696 return this.applyToVector(ball.getCentroid()); 28697 } 28698 /** 28699 * 28700 * @param {*} strut 28701 * @param {number} alpha 28702 * @return {Color} 28703 */ 28704 applyToStrut(strut, alpha) { 28705 return this.applyToVector(strut.getCentroid()); 28706 } 28707 /** 28708 * 28709 * @param {*} panel 28710 * @param {number} alpha 28711 * @return {Color} 28712 */ 28713 applyToPanel(panel, alpha) { 28714 return this.applyToVector(panel.getCentroid()).getPastel(); 28715 } 28716 } 28717 ManifestationColorMappers2.CentroidNearestSpecialOrbitColorMap = CentroidNearestSpecialOrbitColorMap; 28718 CentroidNearestSpecialOrbitColorMap["__class"] = "com.vzome.core.edits.ManifestationColorMappers.CentroidNearestSpecialOrbitColorMap"; 28719 CentroidNearestSpecialOrbitColorMap["__interfaces"] = ["com.vzome.core.edits.ColorMappers.ColorMapper", "java.util.function.Function"]; 28720 class NearestPredefinedOrbitColorMap extends ManifestationColorMappers2.NearestSpecialOrbitColorMap { 28721 /** 28722 * 28723 * @return {string} 28724 */ 28725 getName() { 28726 return "NearestPredefinedOrbitColorMap"; 28727 } 28728 constructor(symm) { 28729 super(symm); 28730 this.specialOrbits = null; 28731 } 28732 } 28733 ManifestationColorMappers2.NearestPredefinedOrbitColorMap = NearestPredefinedOrbitColorMap; 28734 NearestPredefinedOrbitColorMap["__class"] = "com.vzome.core.edits.ManifestationColorMappers.NearestPredefinedOrbitColorMap"; 28735 NearestPredefinedOrbitColorMap["__interfaces"] = ["com.vzome.core.edits.ColorMappers.ColorMapper", "java.util.function.Function"]; 28736 class CentroidNearestPredefinedOrbitColorMap extends ManifestationColorMappers2.CentroidNearestSpecialOrbitColorMap { 28737 /** 28738 * 28739 * @return {string} 28740 */ 28741 getName() { 28742 return "CentroidNearestPredefinedOrbitColorMap"; 28743 } 28744 constructor(symm) { 28745 super(symm); 28746 this.specialOrbits = null; 28747 } 28748 } 28749 ManifestationColorMappers2.CentroidNearestPredefinedOrbitColorMap = CentroidNearestPredefinedOrbitColorMap; 28750 CentroidNearestPredefinedOrbitColorMap["__class"] = "com.vzome.core.edits.ManifestationColorMappers.CentroidNearestPredefinedOrbitColorMap"; 28751 CentroidNearestPredefinedOrbitColorMap["__interfaces"] = ["com.vzome.core.edits.ColorMappers.ColorMapper", "java.util.function.Function"]; 28752})(ManifestationColorMappers || (ManifestationColorMappers = {})); 28753ManifestationColorMappers.__static_initialize(); 28754
28755// src/worker/legacy/from-java/com/vzome/core/edits/MapToColor.ts 28756var MapToColor = class _MapToColor extends ChangeManifestations { 28757 constructor(editor) { 28758 super(editor); 28759 if (this.colorMapper === void 0) { 28760 this.colorMapper = null; 28761 } 28762 if (this.editor === void 0) { 28763 this.editor = null; 28764 } 28765 this.editor = editor; 28766 } 28767 /** 28768 * 28769 * @param {*} props 28770 */ 28771 configure(props) { 28772 const colorMapperName = props.get("mode"); 28773 const symmetry = this.editor["getSymmetrySystem$"](); 28774 if (colorMapperName != null) this.colorMapper = ManifestationColorMappers.getColorMapper$java_lang_String$com_vzome_core_editor_api_OrbitSource(colorMapperName, symmetry); 28775 } 28776 /** 28777 * Either configure() or setXmlAttributes() is always called before perform() 28778 */ 28779 perform() { 28780 if (this.colorMapper.requiresOrderedSelection()) { 28781 this.setOrderedSelection(true); 28782 } 28783 this.colorMapper.initialize(this.getRenderedSelection()); 28784 for (let index = this.getRenderedSelection().iterator(); index.hasNext(); ) { 28785 let man = index.next(); 28786 { 28787 const newColor = this.colorMapper.apply$com_vzome_core_model_Manifestation(man); 28788 this.plan(new _MapToColor.ColorMapManifestation(this, man, newColor)); 28789 this.unselect$com_vzome_core_model_Manifestation$boolean(man, true); 28790 } 28791 } 28792 this.redo(); 28793 } 28794 static { 28795 this.COLORMAPPER_ATTR_NAME = "colorMapper"; 28796 } 28797 /** 28798 * 28799 * @param {*} result 28800 */ 28801 getXmlAttributes(result) { 28802 result.setAttribute(_MapToColor.COLORMAPPER_ATTR_NAME, this.colorMapper.getName()); 28803 this.colorMapper.getXmlAttributes(result); 28804 } 28805 /** 28806 * 28807 * @param {*} xml 28808 * @param {XmlSaveFormat} format 28809 */ 28810 setXmlAttributes(xml, format) { 28811 const symmetry = this.editor["getSymmetrySystem$java_lang_String"](xml.getAttribute("symmetry")); 28812 const colorMapperName = xml.getAttribute(_MapToColor.COLORMAPPER_ATTR_NAME); 28813 this.colorMapper = ManifestationColorMappers.getColorMapper$java_lang_String$com_vzome_core_editor_api_OrbitSource(colorMapperName, symmetry); 28814 this.colorMapper.setXmlAttributes(xml); 28815 } 28816 /** 28817 * 28818 * @return {string} 28819 */ 28820 getXmlElementName() { 28821 return "MapToColor"; 28822 } 28823}; 28824MapToColor["__class"] = "com.vzome.core.edits.MapToColor"; 28825((MapToColor2) => { 28826 class ColorMapManifestation { 28827 constructor(__parent, manifestation, color) { 28828 this.__parent = __parent; 28829 if (this.mManifestation === void 0) { 28830 this.mManifestation = null; 28831 } 28832 if (this.oldColor === void 0) { 28833 this.oldColor = null; 28834 } 28835 if (this.newColor === void 0) { 28836 this.newColor = null; 28837 } 28838 this.mManifestation = manifestation; 28839 this.newColor = color; 28840 this.oldColor = manifestation.getColor(); 28841 } 28842 /** 28843 * 28844 */ 28845 redo() { 28846 this.__parent.mManifestations.setColor(this.mManifestation, this.newColor); 28847 } 28848 /** 28849 * 28850 */ 28851 undo() { 28852 this.__parent.mManifestations.setColor(this.mManifestation, this.oldColor); 28853 } 28854 /** 28855 * 28856 * @param {*} doc 28857 * @return {*} 28858 */ 28859 getXml(doc) { 28860 const result = doc.createElement("color"); 28861 DomUtils.addAttribute(result, "rgb", this.newColor.toString()); 28862 const man = this.mManifestation.getXml(doc); 28863 result.appendChild(man); 28864 return result; 28865 } 28866 } 28867 MapToColor2.ColorMapManifestation = ColorMapManifestation; 28868 ColorMapManifestation["__class"] = "com.vzome.core.edits.MapToColor.ColorMapManifestation"; 28869 ColorMapManifestation["__interfaces"] = ["com.vzome.core.editor.api.SideEffect"]; 28870})(MapToColor || (MapToColor = {})); 28871
28872// src/worker/legacy/from-java/com/vzome/core/edits/NewCentroid.ts 28873var NewCentroid = class extends ChangeManifestations { 28874 /** 28875 * 28876 */ 28877 perform() { 28878 const verticesList = new java.util.ArrayList(); 28879 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 28880 let man = index.next(); 28881 { 28882 this.unselect$com_vzome_core_model_Manifestation(man); 28883 const construction = man.toConstruction(); 28884 if (construction != null && construction instanceof Point) { 28885 const nextPoint = construction; 28886 verticesList.add(nextPoint); 28887 } 28888 } 28889 } 28890 if (verticesList.size() < 2) throw new Command.Failure("Select at least two balls to compute the centroid."); 28891 const points = []; 28892 const centroid = new CentroidPoint(verticesList.toArray(points)); 28893 this.manifestConstruction(centroid); 28894 this.redo(); 28895 } 28896 constructor(editorModel) { 28897 super(editorModel); 28898 } 28899 /** 28900 * 28901 * @return {boolean} 28902 */ 28903 groupingAware() { 28904 return true; 28905 } 28906 /** 28907 * 28908 * @return {string} 28909 */ 28910 getXmlElementName() { 28911 return "NewCentroid"; 28912 } 28913}; 28914NewCentroid["__class"] = "com.vzome.core.edits.NewCentroid"; 28915
28916// src/worker/legacy/from-java/com/vzome/core/edits/PanelCentroids.ts 28917var PanelCentroids = class extends ChangeManifestations { 28918 constructor(editorModel) { 28919 super(editorModel); 28920 } 28921 /** 28922 * 28923 */ 28924 perform() { 28925 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 28926 let man = index.next(); 28927 { 28928 this.unselect$com_vzome_core_model_Manifestation(man); 28929 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0)) { 28930 const panel = man; 28931 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new FreePoint(panel.getCentroid()))); 28932 } 28933 } 28934 } 28935 this.redo(); 28936 } 28937 /** 28938 * 28939 * @return {string} 28940 */ 28941 getXmlElementName() { 28942 return "PanelCentroids"; 28943 } 28944}; 28945PanelCentroids["__class"] = "com.vzome.core.edits.PanelCentroids"; 28946
28947// src/worker/legacy/from-java/com/vzome/core/construction/PolygonPolygonProjectionToSegment.ts 28948var PolygonPolygonProjectionToSegment = class extends Segment { 28949 constructor(polygon0, polygon1) { 28950 super(polygon0.getField()); 28951 this.polygons = [null, null]; 28952 this.polygons[0] = polygon0; 28953 this.polygons[1] = polygon1; 28954 this.mapParamsToState(); 28955 } 28956 /** 28957 * 28958 * @return {boolean} 28959 */ 28960 mapParamsToState() { 28961 if (this.polygons[0].isImpossible() || this.polygons[1].isImpossible()) { 28962 return this.setStateVariables(null, null, true); 28963 } 28964 if (AlgebraicVectors.areParallel(this.polygons[0].getNormal(), this.polygons[1].getNormal())) { 28965 return this.setStateVariables(null, null, true); 28966 } 28967 const intersections = new java.util.HashSet(2); 28968 for (let poly = 0; poly < 2; poly++) { 28969 { 28970 const edgePolygon = this.polygons[poly]; 28971 const planePolygon = this.polygons[(poly + 1) % 2]; 28972 const centroid = planePolygon.getCentroid(); 28973 const normal = planePolygon.getNormal(); 28974 const nVertices = edgePolygon.getVertexCount(); 28975 for (let i = 0; i < nVertices; i++) { 28976 { 28977 const lineStart = edgePolygon.getVertex(i); 28978 const lineDirection = lineStart.minus(edgePolygon.getVertex((i + 1) % nVertices)); 28979 if (!lineDirection.isOrigin()) { 28980 const intersection = AlgebraicVectors.getLinePlaneIntersection(lineStart, lineDirection, centroid, normal); 28981 if (intersection != null) { 28982 intersections.add(intersection); 28983 if (intersections.size() === 2) { 28984 break; 28985 } 28986 } 28987 } 28988 } 28989 ; 28990 } 28991 if (intersections.size() === 2) { 28992 break; 28993 } 28994 } 28995 ; 28996 } 28997 if (intersections.size() !== 2) { 28998 for (let poly = 0; poly < 2; poly++) { 28999 { 29000 const edgePolygon = this.polygons[poly]; 29001 const planePolygon = this.polygons[(poly + 1) % 2]; 29002 const centroid = planePolygon.getCentroid(); 29003 const normal = planePolygon.getNormal(); 29004 const lineStart = edgePolygon.getCentroid(); 29005 for (let i = 0; i < edgePolygon.getVertexCount(); i++) { 29006 { 29007 const lineDirection = lineStart.minus(edgePolygon.getVertex(i)); 29008 if (!lineDirection.isOrigin()) { 29009 const intersection = AlgebraicVectors.getLinePlaneIntersection(lineStart, lineDirection, centroid, normal); 29010 if (intersection != null) { 29011 intersections.add(intersection); 29012 if (intersections.size() === 2) { 29013 break; 29014 } 29015 } 29016 } 29017 } 29018 ; 29019 } 29020 if (intersections.size() === 2) { 29021 break; 29022 } 29023 } 29024 ; 29025 } 29026 } 29027 if (intersections.size() !== 2) { 29028 return this.setStateVariables(null, null, true); 29029 } 29030 let v0 = null; 29031 let v1 = null; 29032 for (let index = intersections.iterator(); index.hasNext(); ) { 29033 let v = index.next(); 29034 { 29035 if (v0 == null) { 29036 v0 = v; 29037 } else { 29038 v1 = v; 29039 } 29040 } 29041 } 29042 const intersectionLine = new LineExtensionOfSegment(new SegmentJoiningPoints(new FreePoint(v0), new FreePoint(v1))); 29043 const projections = new java.util.TreeSet(); 29044 for (let poly = 0; poly < 2; poly++) { 29045 { 29046 const polygon = this.polygons[poly]; 29047 const v2 = v0.plus(polygon.getNormal()); 29048 const vProjection = AlgebraicVectors.getNormal$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector(v0, v1, v2); 29049 for (let i = 0; i < polygon.getVertexCount(); i++) { 29050 { 29051 const vertex = polygon.getVertex(i); 29052 if (AlgebraicVectors.areCollinear$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector(v0, v1, vertex)) { 29053 projections.add(vertex); 29054 } else { 29055 const projectionLine = new LineFromPointAndVector(vertex, vProjection); 29056 const projection = new LineLineIntersectionPoint(intersectionLine, projectionLine);
29057 projections.add(projection.getLocation()); 29058 } 29059 } 29060 ; 29061 } 29062 } 29063 ; 29064 } 29065 let start = null; 29066 let offset = null; 29067 let n = 0; 29068 for (let index = projections.iterator(); index.hasNext(); ) { 29069 let v = index.next(); 29070 { 29071 if (n === 0) { 29072 start = v; 29073 } else if (n === projections.size() - 1) { 29074 offset = v.minus(start); 29075 } 29076 n++; 29077 } 29078 } 29079 return this.setStateVariables(start, offset, start == null || offset == null); 29080 } 29081}; 29082PolygonPolygonProjectionToSegment["__class"] = "com.vzome.core.construction.PolygonPolygonProjectionToSegment"; 29083
29084// src/worker/legacy/from-java/com/vzome/core/edits/PanelPanelIntersection.ts 29085var PanelPanelIntersection = class _PanelPanelIntersection extends ChangeManifestations { 29086 constructor(editor) { 29087 super(editor); 29088 } 29089 /** 29090 * 29091 */ 29092 perform() { 29093 let panel0 = null; 29094 let panel1 = null; 29095 let nPanels = 0; 29096 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 29097 let man = index.next(); 29098 { 29099 this.unselect$com_vzome_core_model_Manifestation(man); 29100 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0)) { 29101 switch (nPanels++) { 29102 case 0: 29103 panel0 = man; 29104 break; 29105 case 1: 29106 panel1 = man; 29107 break; 29108 default: 29109 break; 29110 } 29111 } 29112 } 29113 } 29114 if (nPanels !== 2) { 29115 let msg; 29116 switch (nPanels) { 29117 case 0: 29118 msg = "No panels are selected."; 29119 break; 29120 case 1: 29121 msg = "One panel is selected."; 29122 break; 29123 default: 29124 msg = nPanels + " panels are selected."; 29125 break; 29126 } 29127 this.fail(msg + " Two are required."); 29128 } 29129 if (AlgebraicVectors.areParallel(panel0["getNormal$"](), panel1["getNormal$"]())) { 29130 const vertices = new java.util.ArrayList(); 29131 { 29132 let array = [panel0, panel1]; 29133 for (let index = 0; index < array.length; index++) { 29134 let panel = array[index]; 29135 { 29136 for (let index1 = panel.iterator(); index1.hasNext(); ) { 29137 let v = index1.next(); 29138 { 29139 vertices.add(v); 29140 } 29141 } 29142 } 29143 } 29144 } 29145 this.fail("Panels are " + (AlgebraicVectors.areCoplanar(vertices) ? "coplanar" : "parallel") + "."); 29146 } 29147 this.redo(); 29148 const segment = new PolygonPolygonProjectionToSegment(_PanelPanelIntersection.polygonFromPanel(panel0), _PanelPanelIntersection.polygonFromPanel(panel1)); 29149 const start = new FreePoint(segment.getStart()); 29150 const end = new FreePoint(segment.getEnd()); 29151 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(segment)); 29152 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(start)); 29153 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(end)); 29154 this.redo(); 29155 } 29156 /*private*/ 29157 static polygonFromPanel(panel) { 29158 const vertices = new java.util.ArrayList(panel.getVertexCount()); 29159 for (let index = panel.iterator(); index.hasNext(); ) { 29160 let vector = index.next(); 29161 { 29162 vertices.add(new FreePoint(vector)); 29163 } 29164 } 29165 return new PolygonFromVertices(vertices); 29166 } 29167 /** 29168 * 29169 * @return {string} 29170 */ 29171 getXmlElementName() { 29172 return ( 29173 /* getSimpleName */ 29174 ((c) => typeof c === "string" ? c.substring(c.lastIndexOf(".") + 1) : c["__class"] ? c["__class"].substring(c["__class"].lastIndexOf(".") + 1) : c["name"].substring(c["name"].lastIndexOf(".") + 1))(this.constructor) 29175 ); 29176 } 29177}; 29178PanelPanelIntersection["__class"] = "com.vzome.core.edits.PanelPanelIntersection"; 29179
29180// src/worker/legacy/from-java/com/vzome/core/edits/PanelPerimeters.ts 29181var PanelPerimeters = class extends ChangeManifestations { 29182 constructor(editorModel) { 29183 super(editorModel); 29184 } 29185 /** 29186 * 29187 */ 29188 perform() { 29189 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 29190 let man = index.next(); 29191 { 29192 if (!(man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0))) { 29193 this.unselect$com_vzome_core_model_Manifestation(man); 29194 } 29195 } 29196 } 29197 this.redo(); 29198 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 29199 let man = index.next(); 29200 { 29201 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0)) { 29202 this.unselect$com_vzome_core_model_Manifestation(man); 29203 const panel = man; 29204 const polygon = panel.getFirstConstruction(); 29205 const vertices = polygon.getVertices(); 29206 const first = new FreePoint(vertices[0]); 29207 let start = first; 29208 for (let i = 1; i < vertices.length; i++) { 29209 { 29210 const end = new FreePoint(vertices[i]); 29211 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(start)); 29212 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new SegmentJoiningPoints(start, end))); 29213 start = end; 29214 } 29215 ; 29216 } 29217 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(start)); 29218 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new SegmentJoiningPoints(start, first))); 29219 } 29220 } 29221 } 29222 this.redo(); 29223 } 29224 /** 29225 * 29226 * @return {string} 29227 */ 29228 getXmlElementName() { 29229 return "PanelPerimeters"; 29230 } 29231}; 29232PanelPerimeters["__class"] = "com.vzome.core.edits.PanelPerimeters"; 29233
29234// src/worker/legacy/from-java/com/vzome/core/edits/Parallelepiped.ts 29235var Parallelepiped = class extends ChangeManifestations { 29236 constructor(editor) { 29237 super(editor); 29238 } 29239 /** 29240 * 29241 * @return {string} 29242 */ 29243 getXmlElementName() { 29244 return "Parallelepiped"; 29245 } 29246 /** 29247 * 29248 */ 29249 perform() { 29250 const errorMsg = "Parallelepiped command requires three selected struts with a common vertex."; 29251 let strut1 = null; 29252 let strut2 = null; 29253 let strut3 = null; 29254 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 29255 let man = index.next(); 29256 { 29257 this.unselect$com_vzome_core_model_Manifestation(man); 29258 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) { 29259 if (strut1 == null) { 29260 strut1 = man; 29261 } else if (strut2 == null) { 29262 strut2 = man; 29263 } else if (strut3 == null) { 29264 strut3 = man; 29265 } else this.fail(errorMsg); 29266 } else this.fail(errorMsg); 29267 } 29268 } 29269 if (strut1 == null || strut2 == null || strut3 == null) { 29270 this.fail(errorMsg); 29271 } 29272 const s1 = strut1.getFirstConstruction(); 29273 const s2 = strut2.getFirstConstruction(); 29274 const s3 = strut3.getFirstConstruction(); 29275 let offset1 = s1.getOffset(); 29276 let offset2 = s2.getOffset(); 29277 let offset3 = s3.getOffset(); 29278 let v0 = null; 29279 let v1 = null; 29280 let v2 = null; 29281 let v3 = null; 29282 { 29283 const s1s = s1.getStart(); 29284 const s1e = s1.getEnd(); 29285 const s2s = s2.getStart(); 29286 const s2e = s2.getEnd(); 29287 if (s1s.equals(s2s)) { 29288 v1 = s1e; 29289 v2 = s2e; 29290 v0 = s2s; 29291 } else if (s1e.equals(s2s)) { 29292 v1 = s1s; 29293 v2 = s2e; 29294 v0 = s2s; 29295 offset1 = offset1.negate(); 29296 } else if (s1e.equals(s2e)) { 29297 v1 = s1s; 29298 v2 = s2s; 29299 v0 = s2e; 29300 offset2 = offset2.negate(); 29301 offset1 = offset1.negate(); 29302 } else if (s1s.equals(s2e)) { 29303 v1 = s1e; 29304 v2 = s2s; 29305 v0 = s2e; 29306 offset2 = offset2.negate(); 29307 } else { 29308 this.fail(errorMsg); 29309 } 29310 const s3s = s3.getStart(); 29311 const s3e = s3.getEnd(); 29312 if (s3s.equals(v0)) { 29313 v3 = s3e; 29314 } else if (s3e.equals(v0)) { 29315 v3 = s3s; 29316 offset3 = offset3.negate(); 29317 } else { 29318 this.fail(errorMsg); 29319 } 29320 } 29321 ; 29322 this.redo(); 29323 const p0 = new FreePoint(v0); 29324 const p1 = new FreePoint(v1); 29325 const p2 = new FreePoint(v2); 29326 const p3 = new FreePoint(v3); 29327 this.manifestConstruction(p0); 29328 this.manifestConstruction(p1); 29329 this.manifestConstruction(p2); 29330 this.manifestConstruction(p3); 29331 this.redo(); 29332 const v4 = v2.plus(offset3); 29333 const p4 = new FreePoint(v4); 29334 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(p4)); 29335 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new SegmentJoiningPoints(p2, p4))); 29336 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new SegmentJoiningPoints(p3, p4))); 29337 const v5 = v3.plus(offset1); 29338 const p5 = new FreePoint(v5); 29339 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(p5)); 29340 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new SegmentJoiningPoints(p1, p5))); 29341 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new SegmentJoiningPoints(p3, p5))); 29342 const v6 = v1.plus(offset2); 29343 const p6 = new FreePoint(v6); 29344 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(p6)); 29345 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new SegmentJoiningPoints(p1, p6))); 29346 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new SegmentJoiningPoints(p2, p6))); 29347 const v7 = v4.plus(offset1); 29348 const p7 = new FreePoint(v7); 29349 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(p7)); 29350 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new SegmentJoiningPoints(p4, p7))); 29351 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new SegmentJoiningPoints(p5, p7))); 29352 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new SegmentJoiningPoints(p6, p7))); 29353 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new PolygonFromVertices([p0, p3, p4, p2]))); 29354 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new PolygonFromVertices([p0, p1, p5, p3]))); 29355 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new PolygonFromVertices([p0, p2, p6, p1]))); 29356 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new PolygonFromVertices([p7, p4, p3, p5]))); 29357 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new PolygonFromVertices([p7, p6, p2, p4]))); 29358 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new PolygonFromVertices([p7, p5, p1, p6]))); 29359 this.redo(); 29360 } 29361}; 29362Parallelepiped["__class"] = "com.vzome.core.edits.Parallelepiped"; 29363
29364// src/worker/legacy/from-java/com/vzome/core/edits/PolarZonohedron.ts 29365var PolarZonohedron = class _PolarZonohedron extends ChangeManifestations { 29366 constructor(editor) { 29367 super(editor); 29368 if (this.symmetry === void 0) { 29369 this.symmetry = null; 29370 } 29371 if (this.editor === void 0) { 29372 this.editor = null; 29373 } 29374 this.editor = editor; 29375 this.symmetry = editor["getSymmetrySystem$"](); 29376 } 29377 /** 29378 * 29379 * @return {string} 29380 */ 29381 getXmlElementName() { 29382 return "PolarZonohedron"; 29383 } 29384 /** 29385 * 29386 * @param {*} element 29387 */ 29388 getXmlAttributes(element) { 29389 if (this.symmetry != null) { 29390 DomUtils.addAttribute(element, "symmetry", this.symmetry.getName()); 29391 } 29392 } 29393 /** 29394 * 29395 * @param {*} xml 29396 * @param {XmlSaveFormat} format 29397 */ 29398 setXmlAttributes(xml, format) { 29399 this.symmetry = this.editor["getSymmetrySystem$java_lang_String"](xml.getAttribute("symmetry")); 29400 } 29401 /** 29402 * 29403 */ 29404 perform() { 29405 const errorMsg = new java.lang.StringBuilder(); 29406 errorMsg.append("The Polar Zonohedron command requires either of the following selections:\n\n1) Two non-collinear struts with a common end point.\n The first strut must have more than 2-fold rotational symmetry.\n The second strut will be rotated around the first.\n\n2) Any three or more struts having a common end point.\n"); 29407 const struts = new java.util.ArrayList(); 29408 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 29409 let man = index.next(); 29410 { 29411 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) { 29412 struts.add(man); 29413 } 29414 this.unselect$com_vzome_core_model_Manifestation(man); 29415 } 29416 } 29417 if (struts.size() < 2) { 29418 errorMsg.append(struts.size() === 1 ? "\nonly one strut is selected." : "\nno struts are selected."); 29419 this.fail(errorMsg.toString()); 29420 } 29421 const common = struts.size() === 2 ? this.useRotationalSymmetry(struts, errorMsg) : this.useRadialSelection(struts); 29422 if (common == null) { 29423 this.fail(errorMsg.append("\nselected struts do not have a common end point").toString()); 29424 } 29425 const L1 = 0; 29426 const L2 = 1; 29427 const layers = struts.size(); 29428 const offsets = new java.util.ArrayList(layers); 29429 const vertices = [null, null]; 29430 vertices[L1] = ((s) => { 29431 let a = []; 29432 while (s-- > 0) a.push(null); 29433 return a; 29434 })(layers); 29435 for (let i = 0; i < layers; i++) { 29436 { 29437 const strut = struts.get(i); 29438 const start = strut.getLocation(); 29439 const end = strut.getEnd(); 29440 const offset = strut.getOffset(); 29441 if (start.equals(common)) { 29442 vertices[L1][i] = end; 29443 offsets.add(offset); 29444 } else { 29445 vertices[L1][i] = start; 29446 offsets.add(offset.negate()); 29447 } 29448 } 29449 ; 29450 } 29451 for (let layer = 1; layer < layers; layer++) { 29452 { 29453 vertices[L2] = ((s) => { 29454 let a = []; 29455 while (s-- > 0) a.push(null); 29456 return a; 29457 })(layers); 29458 for (let i = 0; i < layers; i++) { 29459 { 29460 const off = (i + layer) % layers; 29461 const offset = offsets.get(off); 29462 const v1 = vertices[L1][i]; 29463 const v2 = v1.plus(offset); 29464 const v3 = vertices[L1][(i + 1) % layers]; 29465 const v0 = v3.minus(offset); 29466 vertices[L2][i] = v2; 29467 const p0 = new FreePoint(v0); 29468 const p1 = new FreePoint(v1); 29469 const p2 = new FreePoint(v2); 29470 const p3 = new FreePoint(v3); 29471 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(p0)); 29472 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(p1)); 29473 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(p2)); 29474 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(p3)); 29475 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new SegmentJoiningPoints(p1, p2))); 29476 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new SegmentJoiningPoints(p2, p3))); 29477 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new PolygonFromVertices([p0, p1, p2, p3]))); 29478 } 29479 ; 29480 } 29481 vertices[L1] = vertices[L2]; 29482 } 29483 ; 29484 } 29485 this.redo(); 29486 } 29487 static getCommonEndpoint(strut1, strut2) { 29488 if ( 29489 /* equals */ 29490 ((o1, o2) => { 29491 if (o1 && o1.equals) { 29492 return o1.equals(o2); 29493 } else { 29494 return o1 === o2; 29495 } 29496 })(strut1, strut2) 29497 ) { 29498 throw new java.lang.IllegalArgumentException("Identical struts have both end points in common."); 29499 } 29500 const start1 = strut1.getLocation(); 29501 const end1 = strut1.getEnd(); 29502 const start2 = strut2.getLocation(); 29503 const end2 = strut2.getEnd(); 29504 if (start1.equals(start2) || start1.equals(end2)) return start1; 29505 if (end1.equals(start2) || end1.equals(end2)) return end1; 29506 return null; 29507 } 29508 /*private*/ 29509 useRotationalSymmetry(struts, errorMsg) { 29510 const axisStrut = struts.get(0); 29511 const axisSegment = axisStrut.getFirstConstruction(); 29512 let v1 = axisSegment.getOffset(); 29513 v1 = axisSegment.getField().projectTo3d(v1, true); 29514 const axis1 = this.symmetry.getAxis(v1); 29515 if (axis1 == null) { 29516 this.fail(errorMsg.append("\nfirst selected strut is not an axis of rotational symmetry").toString()); 29517 } 29518 const perm = axis1.getRotationPermutation(); 29519 if (perm == null) { 29520 this.fail(errorMsg.append("\nfirst selected strut is not an axis of rotation").toString()); 29521 } 29522 let rotation = perm.mapIndex(0); 29523 const order = perm.getOrder();
29524 if (order <= 2) { 29525 this.fail(errorMsg.append("\nfirst selected strut has " + order + "-fold symmetry").toString()); 29526 } 29527 const spokeStrut = struts.get(1); 29528 const spokeSegment = spokeStrut.getFirstConstruction(); 29529 let v2 = spokeSegment.getOffset(); 29530 if (v1.equals(v2) || v1.equals(v2.negate())) { 29531 this.fail(errorMsg.append("\nselected struts are collinear").toString()); 29532 } 29533 const common = _PolarZonohedron.getCommonEndpoint(axisStrut, spokeStrut); 29534 if (common == null) { 29535 this.fail(errorMsg.append("\nselected struts do not have a common end point").toString()); 29536 } 29537 let s1 = axisSegment.getStart(); 29538 let e1 = axisSegment.getEnd(); 29539 const center = new SegmentEndPoint(axisSegment, common.equals(e1)); 29540 let s2 = spokeSegment.getStart(); 29541 let e2 = spokeSegment.getEnd(); 29542 if (common.equals(s1)) { 29543 if (common.equals(e2)) { 29544 v2 = v2.negate(); 29545 e2 = s2; 29546 s2 = common; 29547 } 29548 } else { 29549 v1 = v1.negate(); 29550 e1 = s1; 29551 s1 = common; 29552 if (common.equals(e2)) { 29553 v2 = v2.negate(); 29554 e2 = s2; 29555 s2 = common; 29556 } 29557 } 29558 this.redo(); 29559 struts.remove(axisStrut); 29560 this.select$com_vzome_core_model_Manifestation(spokeStrut); 29561 const p0 = new FreePoint(s2); 29562 const p1 = new FreePoint(e2); 29563 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(p0)); 29564 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(p1)); 29565 for (let i = 0; i < order - 1; i++) { 29566 { 29567 const transform = new SymmetryTransformation(this.symmetry.getSymmetry(), rotation, center); 29568 rotation = perm.mapIndex(rotation); 29569 const ball = this.manifestConstruction(new TransformedPoint(transform, p1)); 29570 const strut = this.manifestConstruction(new TransformedSegment(transform, spokeSegment)); 29571 struts.add(strut); 29572 this.select$com_vzome_core_model_Manifestation(ball); 29573 this.select$com_vzome_core_model_Manifestation(strut); 29574 } 29575 ; 29576 } 29577 this.redo(); 29578 return common; 29579 } 29580 /*private*/ 29581 useRadialSelection(struts) { 29582 const first = struts.get(0); 29583 const common = _PolarZonohedron.getCommonEndpoint(first, struts.get(1)); 29584 if (common == null) { 29585 return null; 29586 } 29587 for (let i = 1; i < struts.size(); i++) { 29588 { 29589 if (!common.equals(_PolarZonohedron.getCommonEndpoint(first, struts.get(i)))) { 29590 return null; 29591 } 29592 } 29593 ; 29594 } 29595 this.redo(); 29596 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new FreePoint(common))); 29597 for (let index = struts.iterator(); index.hasNext(); ) { 29598 let strut = index.next(); 29599 { 29600 this.select$com_vzome_core_model_Manifestation(strut); 29601 const start = strut.getLocation(); 29602 if (common.equals(start)) { 29603 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new FreePoint(strut.getEnd()))); 29604 } else { 29605 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(new FreePoint(start))); 29606 } 29607 } 29608 } 29609 this.redo(); 29610 return common; 29611 } 29612}; 29613PolarZonohedron["__class"] = "com.vzome.core.edits.PolarZonohedron"; 29614
29615// src/worker/legacy/from-java/com/vzome/core/edits/Polytope4d.ts 29616var Polytope4d = class _Polytope4d extends ChangeManifestations { 29617 constructor(editor) { 29618 super(editor); 29619 if (this.index === void 0) { 29620 this.index = 0; 29621 } 29622 if (this.field === void 0) { 29623 this.field = null; 29624 } 29625 if (this.proj === void 0) { 29626 this.proj = null; 29627 } 29628 if (this.quaternion === void 0) { 29629 this.quaternion = null; 29630 } 29631 if (this.groupName === void 0) { 29632 this.groupName = null; 29633 } 29634 this.edgesToRender = 15; 29635 this.edgeScales = [null, null, null, null]; 29636 if (this.renderGroupName === void 0) { 29637 this.renderGroupName = null; 29638 } 29639 if (this.symmetries === void 0) { 29640 this.symmetries = null; 29641 } 29642 this.symmetries = editor.get4dSymmetries(); 29643 this.field = editor.getRealizedModel().getField(); 29644 for (let i = 0; i < this.edgeScales.length; i++) { 29645 { 29646 this.edgeScales[i] = this.field.one(); 29647 } 29648 ; 29649 } 29650 } 29651 /** 29652 * 29653 * @param {*} params 29654 */ 29655 configure(params) { 29656 this.groupName = params.get("groupName"); 29657 this.renderGroupName = params.get("renderGroupName"); 29658 this.index = params.get("index") | 0; 29659 this.edgesToRender = params.get("edgesToRender") | 0; 29660 this.edgeScales = params.get("edgeScales"); 29661 this.quaternion = params.get("quaternion"); 29662 } 29663 /** 29664 * 29665 * @return {string} 29666 */ 29667 getXmlElementName() { 29668 return "Polytope4d"; 29669 } 29670 /** 29671 * 29672 * @param {*} xml 29673 */ 29674 getXmlAttributes(xml) { 29675 if (this.quaternion != null) DomUtils.addAttribute(xml, "quaternion", this.quaternion.toParsableString()); 29676 DomUtils.addAttribute(xml, "group", this.groupName); 29677 DomUtils.addAttribute(xml, "wythoff", DomUtils.byteToBinary(this.index)); 29678 if (this.edgesToRender !== 15) DomUtils.addAttribute(xml, "renderEdges", DomUtils.byteToBinary(this.edgesToRender)); 29679 if (!(this.renderGroupName === this.groupName)) DomUtils.addAttribute(xml, "renderGroup", this.renderGroupName); 29680 } 29681 /** 29682 * 29683 * @param {*} xml 29684 * @param {XmlSaveFormat} format 29685 */ 29686 setXmlAttributes(xml, format) { 29687 const binary = xml.getAttribute("wythoff"); 29688 this.index = javaemul.internal.IntegerHelper.parseInt(binary, 2); 29689 const renderString = xml.getAttribute("renderEdges"); 29690 this.edgesToRender = renderString == null || /* isEmpty */ 29691 renderString.length === 0 ? this.index : javaemul.internal.IntegerHelper.parseInt(renderString, 2); 29692 this.groupName = xml.getAttribute("group"); 29693 const rgString = xml.getAttribute("renderGroup"); 29694 this.renderGroupName = rgString == null || /* isEmpty */ 29695 rgString.length === 0 ? this.groupName : rgString; 29696 let quatString = xml.getAttribute("quaternion"); 29697 if (quatString != null && !("" === quatString)) { 29698 if ( 29699 /* contains */ 29700 quatString.indexOf("+") != -1 29701 ) { 29702 quatString = /* replace */ 29703 quatString.split(",").join(" "); 29704 quatString = /* replace */ 29705 quatString.split("(").join(" "); 29706 quatString = /* replace */ 29707 quatString.split(")").join(" "); 29708 quatString = /* replace */ 29709 quatString.split("+").join(" "); 29710 const irrat = this.field["getIrrational$int"](0).charAt(0); 29711 quatString = /* replace */ 29712 quatString.split(irrat).join(" "); 29713 quatString = quatString + " 0 0 0"; 29714 } 29715 this.quaternion = this.field.parseVector(quatString); 29716 } else { 29717 let segment = null; 29718 if (format.commandEditsCompacted()) segment = format.parseSegment$org_w3c_dom_Element$java_lang_String$java_lang_String(xml, "start", "end"); 29719 else { 29720 const attrs = format.loadCommandAttributes$org_w3c_dom_Element(xml); 29721 segment = attrs.get("rotation"); 29722 } 29723 if (segment != null) this.quaternion = segment.getOffset().inflateTo4d$(); 29724 } 29725 } 29726 /** 29727 * 29728 */ 29729 perform() { 29730 if (this.quaternion == null) this.proj = new Projection.Default(this.field); 29731 else this.proj = new QuaternionProjection(this.field, null, this.quaternion.scale(this.field["createPower$int"](-5))); 29732 this.symmetries.constructPolytope(this.groupName, this.index, this.edgesToRender, this.edgeScales, new _Polytope4d.WythoffListener(this)); 29733 this.redo(); 29734 }
29735 static getSupportedGroups() { 29736 return ["A4", "B4/C4", "D4", "F4", "H4"]; 29737 } 29738}; 29739Polytope4d["__class"] = "com.vzome.core.edits.Polytope4d"; 29740((Polytope4d2) => { 29741 class WythoffListener { 29742 /** 29743 * 29744 * @param {*} p1 29745 * @param {*} p2 29746 * @return {*} 29747 */ 29748 addEdge(p1, p2) { 29749 const edge = new SegmentJoiningPoints(p1, p2); 29750 this.__parent.manifestConstruction(edge); 29751 return edge; 29752 } 29753 /** 29754 * 29755 * @param {java.lang.Object[]} vertices 29756 * @return {*} 29757 */ 29758 addFace(vertices) { 29759 return null; 29760 } 29761 /** 29762 * 29763 * @param {AlgebraicVector} vertex 29764 * @return {*} 29765 */ 29766 addVertex(vertex) { 29767 let p = this.vertices.get(vertex.toString()); 29768 if (p == null) { 29769 let projected = vertex; 29770 if (this.__parent.proj != null) projected = this.__parent.proj.projectImage(vertex, true); 29771 projected = projected.scale(this.__parent.field["createPower$int"](5)); 29772 p = new FreePoint(projected); 29773 p.setIndex(this.numVertices++); 29774 this.__parent.manifestConstruction(p); 29775 this.vertices.put(vertex.toString(), p); 29776 } 29777 return p; 29778 } 29779 constructor(__parent) { 29780 this.__parent = __parent; 29781 this.numVertices = 0; 29782 this.vertices = new java.util.HashMap(); 29783 } 29784 } 29785 Polytope4d2.WythoffListener = WythoffListener; 29786 WythoffListener["__class"] = "com.vzome.core.edits.Polytope4d.WythoffListener"; 29787 WythoffListener["__interfaces"] = ["com.vzome.core.math.symmetry.WythoffConstruction.Listener"]; 29788})(Polytope4d || (Polytope4d = {})); 29789
29790// src/worker/legacy/from-java/com/vzome/core/edits/RealizeMetaParts.ts 29791var RealizeMetaParts = class _RealizeMetaParts extends ChangeManifestations { 29792 static { 29793 this.NAME = "realizeMetaParts"; 29794 } 29795 /** 29796 * 29797 */ 29798 perform() { 29799 let scale = null; 29800 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 29801 let man = index.next(); 29802 { 29803 this.unselect$com_vzome_core_model_Manifestation(man); 29804 const rm = man.getRenderedObject(); 29805 if (rm != null) { 29806 const shape = rm.getShape(); 29807 if (scale == null) { 29808 const field5 = shape.getField(); 29809 scale = field5["createPower$int"](5); 29810 } 29811 const orientation = rm.getOrientation(); 29812 const vertexList = shape.getVertexList(); 29813 for (let index2 = shape.getVertexList().iterator(); index2.hasNext(); ) { 29814 let vertex = index2.next(); 29815 { 29816 const vertexPt = this.transformVertex(vertex, man.getLocation(), scale, orientation); 29817 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(vertexPt)); 29818 } 29819 } 29820 for (let index2 = shape.getFaceSet().iterator(); index2.hasNext(); ) { 29821 let face = index2.next(); 29822 { 29823 const vertices = ((s) => { 29824 let a = []; 29825 while (s-- > 0) a.push(null); 29826 return a; 29827 })(face.size()); 29828 for (let i = 0; i < vertices.length; i++) { 29829 { 29830 const vertexIndex = face.getVertex(i); 29831 const vertex = vertexList.get(vertexIndex); 29832 vertices[i] = this.transformVertex(vertex, man.getLocation(), scale, orientation); 29833 } 29834 ; 29835 } 29836 const polygon = new PolygonFromVertices(vertices); 29837 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(polygon)); 29838 } 29839 } 29840 } 29841 } 29842 } 29843 this.redo(); 29844 } 29845 /*private*/ 29846 transformVertex(vertex, offset, scale, orientation) { 29847 if (orientation != null) vertex = orientation.timesColumn(vertex); 29848 if (offset != null) vertex = vertex.plus(offset); 29849 return new FreePoint(vertex.scale(scale)); 29850 } 29851 constructor(editor) { 29852 super(editor); 29853 } 29854 /** 29855 * 29856 * @return {string} 29857 */ 29858 getXmlElementName() { 29859 return _RealizeMetaParts.NAME; 29860 } 29861}; 29862RealizeMetaParts["__class"] = "com.vzome.core.edits.RealizeMetaParts"; 29863
29864// src/worker/legacy/from-java/com/vzome/core/math/VefToPolyhedron.ts 29865var VefToPolyhedron = class _VefToPolyhedron extends VefParser { 29866 static importPolyhedron(field5, vef) { 29867 const result = new Polyhedron(field5); 29868 const parser = new _VefToPolyhedron(result); 29869 parser.parseVEF(vef, field5); 29870 return result; 29871 } 29872 constructor(polyhedron) { 29873 super(); 29874 if (this.polyhedron === void 0) { 29875 this.polyhedron = null; 29876 } 29877 this.polyhedron = polyhedron; 29878 } 29879 /** 29880 * 29881 * @param {number} index 29882 * @param {AlgebraicVector} location 29883 */ 29884 addVertex(index, location) { 29885 this.polyhedron.addVertex(this.getField().projectTo3d(location, true)); 29886 } 29887 /** 29888 * 29889 * @param {number} index 29890 * @param {int[]} verts 29891 */ 29892 addFace(index, verts) { 29893 const face = this.polyhedron.newFace(); 29894 for (let index1 = 0; index1 < verts.length; index1++) { 29895 let i = verts[index1]; 29896 face.add(i); 29897 } 29898 this.polyhedron.addFace(face); 29899 } 29900 /** 29901 * 29902 * @param {number} numVertices 29903 */ 29904 startVertices(numVertices) { 29905 } 29906 /** 29907 * 29908 * @param {number} numFaces 29909 */ 29910 startFaces(numFaces) { 29911 } 29912 /** 29913 * 29914 * @param {number} numEdges 29915 */ 29916 startEdges(numEdges) { 29917 } 29918 /** 29919 * 29920 * @param {number} index 29921 * @param {number} v1 29922 * @param {number} v2 29923 */ 29924 addEdge(index, v1, v2) { 29925 } 29926 /** 29927 * 29928 * @param {number} numVertices 29929 */ 29930 startBalls(numVertices) { 29931 } 29932 /** 29933 * 29934 * @param {number} index 29935 * @param {number} vertex 29936 */ 29937 addBall(index, vertex) { 29938 } 29939}; 29940VefToPolyhedron["__class"] = "com.vzome.core.math.VefToPolyhedron"; 29941
29942// src/worker/legacy/from-java/com/vzome/core/edits/ReplaceWithShape.ts 29943var ReplaceWithShape = class _ReplaceWithShape extends ChangeManifestations { 29944 static { 29945 this.NAME = "ReplaceWithShape"; 29946 } 29947 /*private*/ 29948 replace(man, renderedObject, shape) { 29949 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0)) return; 29950 if (renderedObject != null) { 29951 const orientation = renderedObject.getOrientation(); 29952 const vertexList = shape.getVertexList(); 29953 for (let index = shape.getFaceSet().iterator(); index.hasNext(); ) { 29954 let face = index.next(); 29955 { 29956 const vertices = ((s) => { 29957 let a = []; 29958 while (s-- > 0) a.push(null); 29959 return a; 29960 })(face.size()); 29961 for (let i = 0; i < vertices.length; i++) { 29962 { 29963 const vertexIndex = face.getVertex(i); 29964 const vertex = vertexList.get(vertexIndex); 29965 vertices[i] = _ReplaceWithShape.transformVertex(vertex, renderedObject.getLocationAV(), orientation); 29966 } 29967 ; 29968 } 29969 const polygon = new PolygonFromVertices(vertices); 29970 const panel = this.manifestConstruction(polygon); 29971 this.select$com_vzome_core_model_Manifestation(panel); 29972 } 29973 } 29974 } 29975 this.deleteManifestation(man); 29976 } 29977 /** 29978 * 29979 */ 29980 perform() { 29981 if (this.symmetryShapes != null) { 29982 const tokens = this.symmetryShapes.split(":"); 29983 const symmetrySystem = this.editor["getSymmetrySystem$java_lang_String"](tokens[0]); 29984 const shapes28 = symmetrySystem.getStyle$java_lang_String(tokens[1]); 29985 const model = new RenderedModel(symmetrySystem.getSymmetry().getField(), new _ReplaceWithShape.ReplaceWithShape$0(this, symmetrySystem, shapes28)); 29986 if (this.ballOrStrut != null) { 29987 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 29988 let man = index.next(); 29989 { 29990 this.unselect$com_vzome_core_model_Manifestation(man); 29991 } 29992 } 29993 this.redo(); 29994 const rm = model.render(this.ballOrStrut); 29995 this.replace(this.ballOrStrut, rm, rm.getShape()); 29996 } else for (let index = this.mSelection.iterator(); index.hasNext(); ) { 29997 let man = index.next(); 29998 { 29999 this.unselect$com_vzome_core_model_Manifestation(man); 30000 const rm = model.render(man); 30001 this.replace(man, rm, rm.getShape()); 30002 } 30003 } 30004 } else { 30005 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 30006 let man = index.next(); 30007 { 30008 this.unselect$com_vzome_core_model_Manifestation(man); 30009 } 30010 } 30011 this.redo(); 30012 this.replace(this.ballOrStrut, this.ballOrStrut.getRenderedObject(), this.shape); 30013 } 30014 super.perform(); 30015 } 30016 /*private*/ 30017 static transformVertex(vertex, offset, orientation) { 30018 if (orientation != null) vertex = orientation.timesColumn(vertex); 30019 if (offset != null) vertex = vertex.plus(offset); 30020 return new FreePoint(vertex); 30021 } 30022 constructor(editor) { 30023 super(editor); 30024 if (this.vef === void 0) { 30025 this.vef = null; 30026 } 30027 if (this.shape === void 0) { 30028 this.shape = null; 30029 } 30030 if (this.ballOrStrut === void 0) { 30031 this.ballOrStrut = null; 30032 } 30033 if (this.symmetryShapes === void 0) { 30034 this.symmetryShapes = null; 30035 } 30036 if (this.editor === void 0) { 30037 this.editor = null; 30038 } 30039 this.editor = editor; 30040 } 30041 /** 30042 * 30043 * @param {*} props 30044 */ 30045 configure(props) { 30046 const m = props.get("picked"); 30047 if (m != null) { 30048 this.symmetryShapes = m.getRenderedObject().getSymmetryShapes(); 30049 this.ballOrStrut = m; 30050 } else this.symmetryShapes = props.get("mode"); 30051 } 30052 /** 30053 * 30054 * @param {*} element 30055 */ 30056 getXmlAttributes(element) { 30057 if (this.ballOrStrut != null) { 30058 const construction = this.ballOrStrut.getFirstConstruction(); 30059 if (construction != null && construction instanceof Point) XmlSaveFormat.serializePoint(element, "point", construction); 30060 else XmlSaveFormat.serializeSegment(element, "startSegment", "endSegment", construction); 30061 } 30062 if (this.shape != null) { 30063 if (this.vef == null) { 30064 this.vef = VefVectorExporter.exportPolyhedron(this.shape); 30065 } 30066 const textNode = element.getOwnerDocument().createTextNode(XmlSaveFormat.escapeNewlines(this.vef)); 30067 element.appendChild(textNode); 30068 } else { 30069 element.setAttribute("shapes", this.symmetryShapes); 30070 } 30071 } 30072 /** 30073 * 30074 * @param {*} xml 30075 * @param {XmlSaveFormat} format 30076 */ 30077 setXmlAttributes(xml, format) { 30078 const attr = xml.getAttribute("shapes"); 30079 if (attr != null && !/* isEmpty */ 30080 (attr.length === 0)) { 30081 this.symmetryShapes = attr; 30082 } else { 30083 this.vef = xml.getTextContent(); 30084 this.shape = VefToPolyhedron.importPolyhedron(format.getField(), this.vef); 30085 }
30086 let construction = format.parsePoint$org_w3c_dom_Element$java_lang_String(xml, "point"); 30087 if (construction == null) construction = format.parseSegment$org_w3c_dom_Element$java_lang_String$java_lang_String(xml, "startSegment", "endSegment"); 30088 if (construction != null) this.ballOrStrut = this.getManifestation(construction); 30089 } 30090 /** 30091 * 30092 * @return {string} 30093 */ 30094 getXmlElementName() { 30095 return _ReplaceWithShape.NAME; 30096 } 30097}; 30098ReplaceWithShape["__class"] = "com.vzome.core.edits.ReplaceWithShape"; 30099((ReplaceWithShape2) => { 30100 class ReplaceWithShape$0 { 30101 constructor(__parent, symmetrySystem, shapes28) { 30102 this.symmetrySystem = symmetrySystem; 30103 this.shapes = shapes28; 30104 this.__parent = __parent; 30105 } 30106 /* Default method injected from OrbitSource */ 30107 getOrientations(rowMajor) { 30108 if (typeof rowMajor === "boolean" || rowMajor === null) { 30109 let __args = arguments; 30110 return (() => { 30111 const symmetry = this.getSymmetry(); 30112 const field5 = symmetry.getField(); 30113 const order = symmetry.getChiralOrder(); 30114 const orientations = ((s) => { 30115 let a = []; 30116 while (s-- > 0) a.push(null); 30117 return a; 30118 })(order); 30119 for (let orientation = 0; orientation < order; orientation++) { 30120 { 30121 if (rowMajor) { 30122 orientations[orientation] = symmetry.getMatrix(orientation).getRowMajorRealElements(); 30123 continue; 30124 } 30125 const asFloats = ((s) => { 30126 let a = []; 30127 while (s-- > 0) a.push(0); 30128 return a; 30129 })(16); 30130 const transform = symmetry.getMatrix(orientation); 30131 for (let i = 0; i < 3; i++) { 30132 { 30133 const columnSelect = field5.basisVector(3, i); 30134 const columnI = transform.timesColumn(columnSelect); 30135 const colRV = columnI.toRealVector(); 30136 asFloats[i * 4 + 0] = colRV.x; 30137 asFloats[i * 4 + 1] = colRV.y; 30138 asFloats[i * 4 + 2] = colRV.z; 30139 asFloats[i * 4 + 3] = 0; 30140 } 30141 ; 30142 } 30143 asFloats[12] = 0; 30144 asFloats[13] = 0; 30145 asFloats[14] = 0; 30146 asFloats[15] = 1; 30147 orientations[orientation] = asFloats; 30148 } 30149 ; 30150 } 30151 return orientations; 30152 })(); 30153 } else if (rowMajor === void 0) { 30154 return this.getOrientations$(); 30155 } else throw new Error("invalid overload"); 30156 } 30157 /* Default method injected from OrbitSource */ 30158 getOrientations$() { 30159 return this.getOrientations(false); 30160 } 30161 /* Default method injected from OrbitSource */ 30162 getZone(orbit, orientation) { 30163 return this.getSymmetry().getDirection(orbit).getAxis(Symmetry.PLUS, orientation); 30164 } 30165 /* Default method injected from OrbitSource */ 30166 getEmbedding() { 30167 const symmetry = this.getSymmetry(); 30168 const field5 = symmetry.getField(); 30169 const embedding = ((s) => { 30170 let a = []; 30171 while (s-- > 0) a.push(0); 30172 return a; 30173 })(16); 30174 for (let i = 0; i < 3; i++) { 30175 { 30176 const columnSelect = field5.basisVector(3, i); 30177 const colRV = symmetry.embedInR3(columnSelect); 30178 embedding[i * 4 + 0] = colRV.x; 30179 embedding[i * 4 + 1] = colRV.y; 30180 embedding[i * 4 + 2] = colRV.z; 30181 embedding[i * 4 + 3] = 0; 30182 } 30183 ; 30184 } 30185 embedding[12] = 0; 30186 embedding[13] = 0; 30187 embedding[14] = 0; 30188 embedding[15] = 1; 30189 return embedding; 30190 } 30191 /** 30192 * 30193 * @return {*} 30194 */ 30195 getSymmetry() { 30196 return this.symmetrySystem.getSymmetry(); 30197 } 30198 /** 30199 * 30200 * @return {*} 30201 */ 30202 getShapes() { 30203 return this.shapes; 30204 } 30205 /** 30206 * 30207 * @return {OrbitSet} 30208 */ 30209 getOrbits() { 30210 return this.symmetrySystem.getOrbits(); 30211 } 30212 /** 30213 * 30214 * @param {Direction} orbit 30215 * @return {Color} 30216 */ 30217 getColor(orbit) { 30218 return this.symmetrySystem.getColor(orbit); 30219 } 30220 /** 30221 * 30222 * @param {AlgebraicVector} vector 30223 * @return {Axis} 30224 */ 30225 getAxis(vector) { 30226 return this.symmetrySystem.getAxis(vector); 30227 } 30228 /** 30229 * 30230 * @return {string} 30231 */ 30232 getName() { 30233 return this.symmetrySystem.getName(); 30234 } 30235 /** 30236 * 30237 * @param {AlgebraicVector} vector 30238 * @return {Color} 30239 */ 30240 getVectorColor(vector) { 30241 return this.symmetrySystem.getVectorColor(vector); 30242 } 30243 } 30244 ReplaceWithShape2.ReplaceWithShape$0 = ReplaceWithShape$0; 30245 ReplaceWithShape$0["__interfaces"] = ["com.vzome.core.editor.api.OrbitSource"]; 30246})(ReplaceWithShape || (ReplaceWithShape = {})); 30247
30248// src/worker/legacy/from-java/com/vzome/core/edits/ReversePanel.ts 30249var ReversePanel = class extends ChangeManifestations { 30250 /** 30251 * 30252 */ 30253 perform() { 30254 if (this.panel != null) { 30255 if (this.mSelection.manifestationSelected(this.panel)) this.unselect$com_vzome_core_model_Manifestation(this.panel); 30256 const polygon = this.panel.getFirstConstruction(); 30257 this.unmanifestConstruction(polygon); 30258 } 30259 this.redo(); 30260 } 30261 constructor(singlePanel, editor) { 30262 super(editor); 30263 if (this.panel === void 0) { 30264 this.panel = null; 30265 } 30266 if (singlePanel != null) this.panel = singlePanel; 30267 else this.panel = null; 30268 } 30269 /** 30270 * 30271 * @return {string} 30272 */ 30273 getXmlElementName() { 30274 return "ReversePanel"; 30275 } 30276}; 30277ReversePanel["__class"] = "com.vzome.core.edits.ReversePanel"; 30278
30279// src/worker/legacy/from-java/com/vzome/core/edits/RunZomicScript.ts 30280var RunZomicScript = class extends ChangeManifestations { 30281 constructor(editor) { 30282 super(editor); 30283 if (this.programText === void 0) { 30284 this.programText = null; 30285 } 30286 if (this.origin === void 0) { 30287 this.origin = null; 30288 } 30289 if (this.symm === void 0) { 30290 this.symm = null; 30291 } 30292 this.origin = editor.getCenterPoint(); 30293 this.symm = editor["getSymmetrySystem$"]().getSymmetry(); 30294 } 30295 /** 30296 * 30297 * @param {*} props 30298 */ 30299 configure(props) { 30300 this.programText = props.get("script"); 30301 } 30302 /** 30303 * 30304 * @return {string} 30305 */ 30306 getXmlElementName() { 30307 return "RunZomicScript"; 30308 } 30309 getScriptDialect() { 30310 return "zomic"; 30311 } 30312 /** 30313 * 30314 * @param {*} element 30315 */ 30316 getXmlAttributes(element) { 30317 element.setTextContent(XmlSaveFormat.escapeNewlines(this.programText)); 30318 } 30319 /** 30320 * 30321 * @param {*} xml 30322 * @param {XmlSaveFormat} format 30323 */ 30324 setXmlAttributes(xml, format) { 30325 this.programText = xml.getTextContent(); 30326 this.symm = format.parseSymmetry("icosahedral"); 30327 } 30328 /** 30329 * 30330 */ 30331 perform() { 30332 let offset = null; 30333 let pointFound = false; 30334 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 30335 let man = index.next(); 30336 { 30337 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) { 30338 const nextPoint = man.getFirstConstruction(); 30339 if (!pointFound) { 30340 pointFound = true; 30341 offset = nextPoint; 30342 } else { 30343 offset = null; 30344 } 30345 } 30346 } 30347 } 30348 if (offset == null) offset = this.origin; 30349 try { 30350 this.symm.interpretScript(this.programText, this.getScriptDialect(), offset, this.symm, new ManifestConstructions(this)); 30351 } catch (e) { 30352 throw new Command.Failure(e.message, e); 30353 } 30354 this.redo(); 30355 } 30356}; 30357RunZomicScript["__class"] = "com.vzome.core.edits.RunZomicScript"; 30358
30359// src/worker/legacy/from-java/com/vzome/core/edits/SelectAutomaticStruts.ts 30360var SelectAutomaticStruts = class extends ChangeManifestations { 30361 constructor(editor) { 30362 super(editor); 30363 if (this.symmetry === void 0) { 30364 this.symmetry = null; 30365 } 30366 if (this.editor === void 0) { 30367 this.editor = null; 30368 } 30369 this.editor = editor; 30370 this.symmetry = editor["getSymmetrySystem$"](); 30371 } 30372 /** 30373 * 30374 */ 30375 perform() { 30376 this.unselectAll(); 30377 for (let index = this.getVisibleStruts$java_util_function_Predicate((strut) => { 30378 return this.isAutomaticStrut(strut); 30379 }).iterator(); index.hasNext(); ) { 30380 let strut = index.next(); 30381 { 30382 this.select$com_vzome_core_model_Manifestation(strut); 30383 } 30384 } 30385 super.perform(); 30386 } 30387 /*private*/ 30388 isAutomaticStrut(strut) { 30389 return this.symmetry.getAxis(strut.getOffset()).getOrbit().isAutomatic(); 30390 } 30391 /** 30392 * 30393 * @return {string} 30394 */ 30395 getXmlElementName() { 30396 return "SelectAutomaticStruts"; 30397 } 30398 /** 30399 * 30400 * @param {*} element 30401 */ 30402 getXmlAttributes(element) { 30403 if (this.symmetry != null) { 30404 DomUtils.addAttribute(element, "symmetry", this.symmetry.getName()); 30405 } 30406 } 30407 /** 30408 * 30409 * @param {*} xml 30410 * @param {XmlSaveFormat} format 30411 */ 30412 setXmlAttributes(xml, format) { 30413 this.symmetry = this.editor["getSymmetrySystem$java_lang_String"](xml.getAttribute("symmetry")); 30414 } 30415}; 30416SelectAutomaticStruts["__class"] = "com.vzome.core.edits.SelectAutomaticStruts"; 30417
30418// src/worker/legacy/from-java/com/vzome/core/edits/SelectByBoundary.ts 30419var SelectByBoundary = class extends ChangeManifestations { 30420 constructor(editor) { 30421 super(editor); 30422 } 30423 /** 30424 * 30425 * @param {string} message 30426 */ 30427 fail(message) { 30428 const errorMsg = new java.lang.StringBuilder(); 30429 const usage = this.usage(); 30430 if (usage != null) { 30431 errorMsg.append(usage); 30432 } 30433 if (message != null) { 30434 if (errorMsg.length() > 0) { 30435 errorMsg.append("\n"); 30436 } 30437 errorMsg.append(message); 30438 } 30439 super.fail(errorMsg.toString()); 30440 } 30441 /** 30442 * 30443 */ 30444 perform() { 30445 const errMsg = this.setBoundary(); 30446 if (errMsg != null) { 30447 this.fail(errMsg); 30448 } 30449 this.unselectAll(); 30450 this.selectBoundedManifestations(); 30451 this.redo(); 30452 } 30453 selectBoundedManifestations() { 30454 for (let index = this.getConnectors().iterator(); index.hasNext(); ) { 30455 let connector = index.next(); 30456 { 30457 if (this.boundaryContains$com_vzome_core_model_Connector(connector)) { 30458 this.select$com_vzome_core_model_Manifestation(connector); 30459 } 30460 } 30461 } 30462 for (let index = this.getStruts().iterator(); index.hasNext(); ) { 30463 let strut = index.next(); 30464 { 30465 if (this.boundaryContains$com_vzome_core_model_Strut(strut)) { 30466 this.select$com_vzome_core_model_Manifestation(strut); 30467 } 30468 } 30469 } 30470 for (let index = this.getPanels().iterator(); index.hasNext(); ) { 30471 let panel = index.next(); 30472 { 30473 if (this.boundaryContains$com_vzome_core_model_Panel(panel)) { 30474 this.select$com_vzome_core_model_Manifestation(panel); 30475 } 30476 } 30477 } 30478 } 30479 boundaryContains$com_vzome_core_model_Connector(connector) { 30480 return this.boundaryContains$com_vzome_core_algebra_AlgebraicVector(connector.getLocation()); 30481 } 30482 boundaryContains(connector) { 30483 if (connector != null && (connector.constructor != null && connector.constructor["__interfaces"] != null && connector.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0) || connector === null) { 30484 return this.boundaryContains$com_vzome_core_model_Connector(connector); 30485 } else if (connector != null && (connector.constructor != null && connector.constructor["__interfaces"] != null && connector.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0) || connector === null) { 30486 return this.boundaryContains$com_vzome_core_model_Strut(connector); 30487 } else if (connector != null && (connector.constructor != null && connector.constructor["__interfaces"] != null && connector.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0) || connector === null) { 30488 return this.boundaryContains$com_vzome_core_model_Panel(connector); 30489 } else if (connector != null && connector instanceof AlgebraicVector || connector === null) { 30490 return this.boundaryContains$com_vzome_core_algebra_AlgebraicVector(connector); 30491 } else throw new Error("invalid overload"); 30492 } 30493 /*private*/ 30494 boundaryContains$com_vzome_core_model_Strut(strut) { 30495 return this.boundaryContains$com_vzome_core_algebra_AlgebraicVector(strut.getLocation()) && this.boundaryContains$com_vzome_core_algebra_AlgebraicVector(strut.getEnd()); 30496 } 30497 /*private*/ 30498 boundaryContains$com_vzome_core_model_Panel(panel) { 30499 for (let index = panel.iterator(); index.hasNext(); ) { 30500 let vertex = index.next(); 30501 { 30502 if (!this.boundaryContains$com_vzome_core_algebra_AlgebraicVector(vertex)) { 30503 return false; 30504 } 30505 } 30506 } 30507 return true; 30508 } 30509 boundaryContains$com_vzome_core_algebra_AlgebraicVector(v) { 30510 throw new Error("cannot invoke abstract overloaded method... check your argument(s) type(s)"); 30511 } 30512}; 30513SelectByBoundary["__class"] = "com.vzome.core.edits.SelectByBoundary"; 30514
30515// src/worker/legacy/from-java/com/vzome/core/edits/SelectByDiameter.ts 30516var SelectByDiameter = class _SelectByDiameter extends SelectByBoundary { 30517 static { 30518 this.NAME = "SelectByDiameter"; 30519 } 30520 /** 30521 * 30522 * @return {string} 30523 */ 30524 getXmlElementName() { 30525 return _SelectByDiameter.NAME; 30526 } 30527 constructor(editor) { 30528 super(editor); 30529 if (this.center === void 0) { 30530 this.center = null; 30531 } 30532 if (this.maxRadiusSquared === void 0) { 30533 this.maxRadiusSquared = null; 30534 } 30535 } 30536 /** 30537 * 30538 * @return {string} 30539 */ 30540 usage() { 30541 return "This command requires two connectors which define the\ndiameter of a sphere centered at their midpoint.\n\nAll parts that are completely within the sphere will be selected.\n"; 30542 } 30543 adjustBoundary(vectors) { 30544 switch (vectors.size()) { 30545 case 1: 30546 return null; 30547 case 2: 30548 this.center = AlgebraicVectors.calculateCentroid(vectors); 30549 const v1 = vectors.get(0).minus(this.center); 30550 this.maxRadiusSquared = v1.dot(v1); 30551 return null; 30552 } 30553 return "Too many connectors are selected."; 30554 } 30555 /** 30556 * 30557 * @return {string} 30558 */ 30559 setBoundary() { 30560 this.center = null; 30561 this.maxRadiusSquared = null; 30562 const vectors = new java.util.ArrayList(); 30563 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 30564 let man = index.next(); 30565 { 30566 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) { 30567 vectors.add(man.getLocation()); 30568 const errMsg = this.adjustBoundary(vectors); 30569 if (errMsg != null) { 30570 return errMsg; 30571 } 30572 } 30573 } 30574 } 30575 if (vectors.isEmpty()) { 30576 return "No connectors are selected."; 30577 } 30578 if (this.center == null || this.maxRadiusSquared == null) { 30579 const n = vectors.size(); 30580 return n === 1 ? "Only one connector is selected." : "Only " + n + " connectors are selected."; 30581 } 30582 return null; 30583 } 30584 boundaryContains$com_vzome_core_algebra_AlgebraicVector(v) { 30585 v = v.minus(this.center); 30586 const vSq = v.dot(v); 30587 return vSq.compareTo(this.maxRadiusSquared) <= 0; 30588 } 30589 /** 30590 * 30591 * @param {AlgebraicVector} v 30592 * @return {boolean} 30593 */ 30594 boundaryContains(v) { 30595 if (v != null && v instanceof AlgebraicVector || v === null) { 30596 return this.boundaryContains$com_vzome_core_algebra_AlgebraicVector(v); 30597 } else if (v != null && (v.constructor != null && v.constructor["__interfaces"] != null && v.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0) || v === null) { 30598 return super.boundaryContains(v); 30599 } else if (v != null && (v.constructor != null && v.constructor["__interfaces"] != null && v.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0) || v === null) { 30600 return this.boundaryContains$com_vzome_core_model_Strut(v); 30601 } else if (v != null && (v.constructor != null && v.constructor["__interfaces"] != null && v.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0) || v === null) { 30602 return this.boundaryContains$com_vzome_core_model_Panel(v); 30603 } else throw new Error("invalid overload"); 30604 } 30605}; 30606SelectByDiameter["__class"] = "com.vzome.core.edits.SelectByDiameter"; 30607
30608// src/worker/legacy/from-java/com/vzome/core/edits/SelectByPlane.ts 30609var SelectByPlane = class _SelectByPlane extends SelectByBoundary { 30610 static { 30611 this.NAME = "SelectByPlane"; 30612 } 30613 /** 30614 * 30615 * @return {string} 30616 */ 30617 getXmlElementName() { 30618 return _SelectByPlane.NAME; 30619 } 30620 constructor(editor) { 30621 super(editor); 30622 if (this.plane === void 0) { 30623 this.plane = null; 30624 } 30625 if (this.anchor === void 0) { 30626 this.anchor = null; 30627 } 30628 if (this.desiredOrientation === void 0) { 30629 this.desiredOrientation = 0; 30630 } 30631 } 30632 /** 30633 * 30634 * @return {string} 30635 */ 30636 usage() { 30637 return "This command requires four selected connectors.\n\nThe first three connectors must not be collinear,\nso that they define a plane.\nThe fourth connector must lie outside of that plane,\nand defines which half space you wish to select.\n\nAll parts that are completely within that half-space will be selected.\n"; 30638 } 30639 /** 30640 * 30641 */ 30642 perform() { 30643 this.setOrderedSelection(true); 30644 super.perform(); 30645 } 30646 /** 30647 * 30648 * @return {string} 30649 */ 30650 setBoundary() { 30651 let p1 = null; 30652 let p2 = null; 30653 let p3 = null; 30654 let p4 = null; 30655 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 30656 let man = index.next(); 30657 { 30658 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) { 30659 if (p1 == null) { 30660 p1 = man.getLocation(); 30661 continue; 30662 } 30663 if (p2 == null) { 30664 p2 = man.getLocation(); 30665 continue; 30666 } 30667 if (p3 == null) { 30668 p3 = man.getLocation(); 30669 continue; 30670 } 30671 if (p4 == null) { 30672 p4 = man.getLocation(); 30673 continue; 30674 } else { 30675 return "You have selected more than four connectors."; 30676 } 30677 } 30678 } 30679 } 30680 if (p4 == null) return "You have selected fewer than four connectors."; 30681 const v1 = new Vector3d(p2.minus(p1)); 30682 const v2 = new Vector3d(p3.minus(p1)); 30683 this.plane = v1.outer(v2); 30684 this.anchor = p1; 30685 this.desiredOrientation = this.orient(p4); 30686 if (this.desiredOrientation === 0) { 30687 return "Your last selected connector lies in the plane of the other three."; 30688 } 30689 return null; 30690 } 30691 /*private*/ 30692 orient(point) { 30693 const diff = point.minus(this.anchor); 30694 const v = new Vector3d(diff); 30695 const volume = this.plane.outer(v); 30696 if (volume.isZero()) return 0; 30697 else { 30698 const volD = volume.evaluate(); 30699 return volD > 0 ? 1 : -1; 30700 } 30701 } 30702 boundaryContains$com_vzome_core_algebra_AlgebraicVector(v) { 30703 const orientation = this.orient(v); 30704 return orientation === 0 || orientation === this.desiredOrientation; 30705 } 30706 /** 30707 * 30708 * @param {AlgebraicVector} v 30709 * @return {boolean} 30710 */ 30711 boundaryContains(v) { 30712 if (v != null && v instanceof AlgebraicVector || v === null) { 30713 return this.boundaryContains$com_vzome_core_algebra_AlgebraicVector(v); 30714 } else if (v != null && (v.constructor != null && v.constructor["__interfaces"] != null && v.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0) || v === null) { 30715 return super.boundaryContains(v); 30716 } else if (v != null && (v.constructor != null && v.constructor["__interfaces"] != null && v.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0) || v === null) { 30717 return this.boundaryContains$com_vzome_core_model_Strut(v); 30718 } else if (v != null && (v.constructor != null && v.constructor["__interfaces"] != null && v.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0) || v === null) { 30719 return this.boundaryContains$com_vzome_core_model_Panel(v); 30720 } else throw new Error("invalid overload"); 30721 } 30722}; 30723SelectByPlane["__class"] = "com.vzome.core.edits.SelectByPlane"; 30724
30725// src/worker/legacy/from-java/com/vzome/core/edits/SelectByRadius.ts 30726var SelectByRadius = class _SelectByRadius extends SelectByDiameter { 30727 static { 30728 this.NAME = "SelectByRadius"; 30729 } 30730 /** 30731 * 30732 * @return {string} 30733 */ 30734 getXmlElementName() { 30735 return _SelectByRadius.NAME; 30736 } 30737 constructor(editor) { 30738 super(editor); 30739 if (this.minRadiusSquared === void 0) { 30740 this.minRadiusSquared = null; 30741 } 30742 } 30743 /** 30744 * 30745 * @return {string} 30746 */ 30747 usage() { 30748 return "This command requires either two or three selected connectors.\n\nThe first connector marks the center of a sphere.\nThe second connector defines its radius.\nAn optional third connector defines the radius of\n a second sphere with the same center.\n\nAll parts that are completely within the larger sphere will be selected.\n\nIf a second sphere is defined then any parts\n within the smaller sphere, even partially, will be excluded.\n"; 30749 } 30750 /** 30751 * 30752 */ 30753 perform() { 30754 this.setOrderedSelection(true); 30755 super.perform(); 30756 } 30757 /** 30758 * 30759 * @param {*} vectors 30760 * @return {string} 30761 */ 30762 adjustBoundary(vectors) { 30763 const v = vectors.get(vectors.size() - 1); 30764 switch (vectors.size()) { 30765 case 1: 30766 this.center = v; 30767 this.maxRadiusSquared = null; 30768 this.minRadiusSquared = null; 30769 return null; 30770 case 2: 30771 const v2 = v.minus(this.center); 30772 this.maxRadiusSquared = v2.dot(v2); 30773 return null; 30774 case 3: 30775 const v3 = v.minus(this.center); 30776 this.minRadiusSquared = v3.dot(v3); 30777 if (this.maxRadiusSquared.compareTo(this.minRadiusSquared) < 0) { 30778 const temp = this.maxRadiusSquared; 30779 this.maxRadiusSquared = this.minRadiusSquared; 30780 this.minRadiusSquared = temp; 30781 } 30782 return null; 30783 } 30784 return super.adjustBoundary(vectors); 30785 } 30786 boundaryContains$com_vzome_core_algebra_AlgebraicVector(v) { 30787 if (super.boundaryContains$com_vzome_core_algebra_AlgebraicVector(v)) { 30788 if (this.minRadiusSquared != null) { 30789 const v1 = v.minus(this.center); 30790 return v1.dot(v1).compareTo(this.minRadiusSquared) >= 0; 30791 } 30792 return true; 30793 } 30794 return false; 30795 } 30796 /** 30797 * 30798 * @param {AlgebraicVector} v 30799 * @return {boolean} 30800 */ 30801 boundaryContains(v) { 30802 if (v != null && v instanceof AlgebraicVector || v === null) { 30803 return this.boundaryContains$com_vzome_core_algebra_AlgebraicVector(v); 30804 } else if (v != null && (v.constructor != null && v.constructor["__interfaces"] != null && v.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0) || v === null) { 30805 return super.boundaryContains(v); 30806 } else if (v != null && (v.constructor != null && v.constructor["__interfaces"] != null && v.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0) || v === null) { 30807 return this.boundaryContains$com_vzome_core_model_Strut(v); 30808 } else if (v != null && (v.constructor != null && v.constructor["__interfaces"] != null && v.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0) || v === null) { 30809 return this.boundaryContains$com_vzome_core_model_Panel(v); 30810 } else throw new Error("invalid overload"); 30811 } 30812}; 30813SelectByRadius["__class"] = "com.vzome.core.edits.SelectByRadius"; 30814
30815// src/worker/legacy/from-java/com/vzome/core/edits/SelectCollinear.ts 30816var SelectCollinear = class extends ChangeManifestations { 30817 constructor(editor) { 30818 super(editor); 30819 this.vector1 = null; 30820 this.vector2 = null; 30821 } 30822 /** 30823 * 30824 * @param {*} props 30825 */ 30826 configure(props) { 30827 const strut = props.get("picked"); 30828 if (strut != null) { 30829 this.vector1 = strut.getLocation(); 30830 this.vector2 = strut.getEnd(); 30831 } 30832 } 30833 /** 30834 * 30835 */ 30836 perform() { 30837 if (this.vector1 == null || this.vector2 == null) { 30838 const lastStrut = this.getLastSelectedStrut(); 30839 if (lastStrut != null) { 30840 this.vector1 = lastStrut.getLocation(); 30841 this.vector2 = lastStrut.getEnd(); 30842 } else { 30843 for (let index = this.getSelectedConnectors().iterator(); index.hasNext(); ) { 30844 let ball = index.next(); 30845 { 30846 this.vector1 = this.vector2; 30847 this.vector2 = ball.getLocation(); 30848 } 30849 } 30850 } 30851 } 30852 if (this.vector1 == null || this.vector2 == null) { 30853 throw new Command.Failure("select a strut or two balls as a reference."); 30854 } 30855 this.unselectAll(); 30856 const balls = new java.util.TreeSet(); 30857 for (let index = this.getVisibleConnectors$java_util_function_Predicate((ball) => { 30858 return this.isCollinearWith(ball); 30859 }).iterator(); index.hasNext(); ) { 30860 let ball = index.next(); 30861 { 30862 balls.add(ball); 30863 } 30864 } 30865 const struts = new java.util.TreeSet(); 30866 for (let index = this.getVisibleStruts$().iterator(); index.hasNext(); ) { 30867 let strut = index.next(); 30868 { 30869 if (this.isCollinearWith$com_vzome_core_model_Strut(strut)) { 30870 struts.add(strut); 30871 } 30872 } 30873 } 30874 for (let index = struts.iterator(); index.hasNext(); ) { 30875 let strut = index.next(); 30876 { 30877 this.select$com_vzome_core_model_Manifestation(strut); 30878 } 30879 } 30880 for (let index = balls.iterator(); index.hasNext(); ) { 30881 let ball = index.next(); 30882 { 30883 this.select$com_vzome_core_model_Manifestation(ball); 30884 } 30885 } 30886 const level = java.util.logging.Level.FINER; 30887 if (ChangeSelection.logger_$LI$().isLoggable(level)) { 30888 const sb = new java.lang.StringBuilder("Selected:\n"); 30889 const indent = " "; 30890 for (let index = struts.iterator(); index.hasNext(); ) { 30891 let strut = index.next(); 30892 { 30893 sb.append(indent).append(strut.toString()).append("\n"); 30894 } 30895 } 30896 for (let index = balls.iterator(); index.hasNext(); ) { 30897 let ball = index.next(); 30898 { 30899 sb.append(indent).append(ball.toString()).append("\n"); 30900 } 30901 } 30902 ChangeSelection.logger_$LI$().log(level, sb.toString()); 30903 } 30904 super.perform(); 30905 } 30906 isCollinearWith$com_vzome_core_model_Connector(ball) { 30907 return this.isCollinear(ball.getLocation()); 30908 } 30909 isCollinearWith(ball) { 30910 if (ball != null && (ball.constructor != null && ball.constructor["__interfaces"] != null && ball.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0) || ball === null) { 30911 return this.isCollinearWith$com_vzome_core_model_Connector(ball); 30912 } else if (ball != null && (ball.constructor != null && ball.constructor["__interfaces"] != null && ball.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0) || ball === null) { 30913 return this.isCollinearWith$com_vzome_core_model_Strut(ball); 30914 } else throw new Error("invalid overload"); 30915 } 30916 /*private*/ 30917 isCollinearWith$com_vzome_core_model_Strut(strut) { 30918 return this.isCollinear(strut.getLocation()) && this.isCollinear(strut.getEnd()); 30919 } 30920 /*private*/ 30921 isCollinear(vec) { 30922 return AlgebraicVectors.areCollinear$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector$com_vzome_core_algebra_AlgebraicVector(vec, this.vector1, this.vector2); 30923 } 30924 /** 30925 * 30926 * @return {string} 30927 */ 30928 getXmlElementName() { 30929 return "SelectCollinear"; 30930 } 30931 /** 30932 * 30933 * @param {*} element 30934 */ 30935 getXmlAttributes(element) { 30936 DomUtils.addAttribute(element, "vector1", this.vector1.toParsableString()); 30937 DomUtils.addAttribute(element, "vector2", this.vector2.toParsableString()); 30938 } 30939 /** 30940 * 30941 * @param {*} xml 30942 * @param {XmlSaveFormat} format 30943 */ 30944 setXmlAttributes(xml, format) { 30945 this.vector1 = format.parseRationalVector(xml, "vector1"); 30946 this.vector2 = format.parseRationalVector(xml, "vector2"); 30947 } 30948}; 30949SelectCollinear["__class"] = "com.vzome.core.edits.SelectCollinear"; 30950
30951// src/worker/legacy/from-java/com/vzome/core/edits/SelectCoplanar.ts 30952var SelectCoplanar = class _SelectCoplanar extends SelectByBoundary { 30953 constructor(editor) { 30954 super(editor); 30955 this.pickedVectors = new java.util.ArrayList(); 30956 this.vectors = new java.util.HashSet(); 30957 this.pointOnPlane = null; 30958 this.normal = null; 30959 } 30960 /** 30961 * 30962 * @return {string} 30963 */ 30964 usage() { 30965 return "Select any combination of connectors, struts or panels to specify\n3 or more points that are all coplanar, but not simply collinear.\n\nAll parts that are completely on the corresponding plane will be selected.\n"; 30966 } 30967 /** 30968 * 30969 * @param {*} props 30970 */ 30971 configure(props) { 30972 const panel = props.get("picked"); 30973 if (panel != null) { 30974 for (let index = panel.iterator(); index.hasNext(); ) { 30975 let v = index.next(); 30976 { 30977 this.pickedVectors.add(v); 30978 } 30979 } 30980 } 30981 } 30982 /** 30983 * 30984 * @return {string} 30985 */ 30986 setBoundary() { 30987 if (this.pickedVectors.isEmpty()) { 30988 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 30989 let man = index.next(); 30990 { 30991 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) { 30992 this.vectors.add(man.getLocation()); 30993 } else if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) { 30994 this.vectors.add(man.getLocation()); 30995 this.vectors.add(man.getEnd()); 30996 } else if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0)) { 30997 for (let index2 = man.iterator(); index2.hasNext(); ) { 30998 let v = index2.next(); 30999 { 31000 this.vectors.add(v); 31001 } 31002 } 31003 } else { 31004 throw new java.lang.IllegalStateException("Unknown manifestation: " + /* getSimpleName */ 31005 ((c) => typeof c === "string" ? c.substring(c.lastIndexOf(".") + 1) : c["__class"] ? c["__class"].substring(c["__class"].lastIndexOf(".") + 1) : c["name"].substring(c["name"].lastIndexOf(".") + 1))(man.constructor)); 31006 } 31007 } 31008 } 31009 if (this.vectors.size() < 3) { 31010 return "Additional connectors, struts or panels must be selected to define a plane."; 31011 } 31012 if (AlgebraicVectors.areCollinear$java_util_Collection(this.vectors)) { 31013 return "Selected items are collinear. Select another non-collinear ball to specify the plane."; 31014 } 31015 if (!AlgebraicVectors.areCoplanar(this.vectors)) { 31016 return "Selected items are not coplanar."; 31017 } 31018 } else { 31019 this.vectors.addAll(this.pickedVectors); 31020 this.unselectAll(); 31021 this.redo(); 31022 } 31023 for (let index = this.vectors.iterator(); index.hasNext(); ) { 31024 let v = index.next(); 31025 { 31026 this.pointOnPlane = v; 31027 break; 31028 } 31029 } 31030 this.normal = AlgebraicVectors.getNormal$java_util_Collection(this.vectors); 31031 return null; 31032 } 31033 boundaryContains$com_vzome_core_algebra_AlgebraicVector(v) { 31034 return this.vectors.contains(v) || this.pointOnPlane.minus(v).dot(this.normal).isZero(); 31035 } 31036 /** 31037 * 31038 * @param {AlgebraicVector} v 31039 * @return {boolean} 31040 */ 31041 boundaryContains(v) { 31042 if (v != null && v instanceof AlgebraicVector || v === null) { 31043 return this.boundaryContains$com_vzome_core_algebra_AlgebraicVector(v); 31044 } else if (v != null && (v.constructor != null && v.constructor["__interfaces"] != null && v.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0) || v === null) { 31045 return super.boundaryContains(v); 31046 } else if (v != null && (v.constructor != null && v.constructor["__interfaces"] != null && v.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0) || v === null) { 31047 return this.boundaryContains$com_vzome_core_model_Strut(v); 31048 } else if (v != null && (v.constructor != null && v.constructor["__interfaces"] != null && v.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0) || v === null) { 31049 return this.boundaryContains$com_vzome_core_model_Panel(v); 31050 } else throw new Error("invalid overload"); 31051 } 31052 static { 31053 this.NAME = "SelectCoplanar"; 31054 } 31055 /** 31056 * 31057 * @return {string} 31058 */ 31059 getXmlElementName() { 31060 return _SelectCoplanar.NAME; 31061 } 31062 /** 31063 * 31064 * @param {*} element 31065 */ 31066 getXmlAttributes(element) { 31067 if (!this.pickedVectors.isEmpty()) { 31068 DomUtils.addAttribute( 31069 element, 31070 "nPickedVectors", 31071 /* toString */ 31072 "" + this.pickedVectors.size() 31073 ); 31074 for (let i = 0; i < this.pickedVectors.size(); i++) { 31075 { 31076 DomUtils.addAttribute(element, "vector" + i, this.pickedVectors.get(i).toParsableString()); 31077 } 31078 ; 31079 } 31080 } 31081 } 31082 /** 31083 * 31084 * @param {*} xml 31085 * @param {XmlSaveFormat} format 31086 */ 31087 setXmlAttributes(xml, format) { 31088 const nPickedVectors = xml.getAttribute("nPickedVectors"); 31089 if (nPickedVectors != null && !/* isEmpty */ 31090 (nPickedVectors.length === 0)) { 31091 const nPicked = javaemul.internal.IntegerHelper.parseInt(nPickedVectors); 31092 for (let i = 0; i < nPicked; i++) { 31093 { 31094 this.pickedVectors.add(format.parseRationalVector(xml, "vector" + i)); 31095 } 31096 ; 31097 } 31098 } 31099 } 31100}; 31101SelectCoplanar["__class"] = "com.vzome.core.edits.SelectCoplanar"; 31102
31103// src/worker/legacy/from-java/com/vzome/core/edits/SelectNeighbors.ts 31104var SelectNeighbors = class extends ChangeSelection { 31105 constructor(editor) { 31106 super(editor.getSelection()); 31107 if (this.editor === void 0) { 31108 this.editor = null; 31109 } 31110 this.withPanels = false; 31111 this.editor = editor; 31112 } 31113 perform() { 31114 const model = this.editor.getRealizedModel(); 31115 const panels = new java.util.LinkedHashSet(); 31116 const struts = new java.util.LinkedHashSet(); 31117 const balls = new java.util.LinkedHashSet(); 31118 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 31119 let man = index.next(); 31120 { 31121 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) struts.add(man); 31122 else if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0)) balls.add(man); 31123 else if (this.withPanels && (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0))) panels.add(man); 31124 } 31125 } 31126 for (let index = balls.iterator(); index.hasNext(); ) { 31127 let ball = index.next(); 31128 { 31129 const loc = ball.getLocation(); 31130 for (let index2 = model.iterator(); index2.hasNext(); ) { 31131 let man = index2.next(); 31132 { 31133 if (!man.isRendered()) continue; 31134 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0) && !struts.contains(man)) { 31135 const strut = man; 31136 if (loc.equals(strut.getLocation()) || loc.equals(strut.getEnd())) this.select$com_vzome_core_model_Manifestation(strut); 31137 } else if (this.withPanels && (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0)) && !panels.contains(man)) { 31138 const panel = man; 31139 for (let index3 = panel.iterator(); index3.hasNext(); ) { 31140 let vertex = index3.next(); 31141 { 31142 if (loc.equals(vertex)) { 31143 this.select$com_vzome_core_model_Manifestation(panel); 31144 break; 31145 } 31146 } 31147 } 31148 } 31149 } 31150 } 31151 } 31152 } 31153 for (let index = struts.iterator(); index.hasNext(); ) { 31154 let strut = index.next(); 31155 { 31156 const loc = strut.getLocation(); 31157 const end = strut.getEnd(); 31158 for (let index2 = model.iterator(); index2.hasNext(); ) { 31159 let man = index2.next(); 31160 { 31161 if (!man.isRendered()) continue; 31162 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0) && !balls.contains(man)) { 31163 const bloc = man.getLocation(); 31164 if (bloc.equals(loc) || bloc.equals(end)) this.select$com_vzome_core_model_Manifestation(man); 31165 } 31166 } 31167 } 31168 } 31169 } 31170 if (this.withPanels) { 31171 for (let index = panels.iterator(); index.hasNext(); ) { 31172 let panel = index.next(); 31173 { 31174 for (let index2 = panel.iterator(); index2.hasNext(); ) { 31175 let loc = index2.next(); 31176 { 31177 for (let index3 = model.iterator(); index3.hasNext(); ) { 31178 let man = index3.next(); 31179 { 31180 if (man.isRendered()) { 31181 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0) && !balls.contains(man)) { 31182 const bloc = man.getLocation(); 31183 if (bloc.equals(loc)) { 31184 this.select$com_vzome_core_model_Manifestation(man); 31185 } 31186 } 31187 } 31188 } 31189 } 31190 } 31191 } 31192 } 31193 } 31194 } 31195 super.perform(); 31196 } 31197 /** 31198 * 31199 * @return {string} 31200 */ 31201 getXmlElementName() { 31202 return "SelectNeighbors"; 31203 } 31204}; 31205SelectNeighbors["__class"] = "com.vzome.core.edits.SelectNeighbors"; 31206
31207// src/worker/legacy/from-java/com/vzome/core/edits/SelectParallelStruts.ts 31208var SelectParallelStruts = class extends ChangeManifestations { 31209 constructor(editor) { 31210 super(editor); 31211 if (this.symmetry === void 0) { 31212 this.symmetry = null; 31213 } 31214 if (this.orbit === void 0) { 31215 this.orbit = null; 31216 } 31217 if (this.axis === void 0) { 31218 this.axis = null; 31219 } 31220 if (this.editor === void 0) { 31221 this.editor = null; 31222 } 31223 this.editor = editor; 31224 this.symmetry = editor["getSymmetrySystem$"](); 31225 } 31226 /** 31227 * 31228 * @param {*} props 31229 */ 31230 configure(props) { 31231 const strut = props.get("picked"); 31232 if (strut != null) { 31233 this.axis = this.symmetry.getAxis(strut.getOffset()); 31234 this.orbit = this.axis.getOrbit(); 31235 } 31236 } 31237 /** 31238 * 31239 */ 31240 perform() { 31241 if (this.orbit == null || this.axis == null) { 31242 const lastStrut = this.getLastSelectedStrut(); 31243 if (lastStrut != null) { 31244 const offset = lastStrut.getOffset(); 31245 this.orbit = this.symmetry.getAxis(offset).getOrbit(); 31246 this.axis = this.orbit.getAxis$com_vzome_core_algebra_AlgebraicVector(offset); 31247 } 31248 } 31249 if (this.orbit == null || this.axis == null) { 31250 throw new Command.Failure("select a reference strut."); 31251 } 31252 this.unselectAll(); 31253 const oppositeAxis = this.symmetry.getSymmetry().getPrincipalReflection() == null ? this.orbit.getAxis$int$int((this.axis.getSense() + 1) % 2, this.axis.getOrientation()) : this.orbit.getAxis$int$int$boolean(this.axis.getSense(), this.axis.getOrientation(), !this.axis.isOutbound()); 31254 for (let index = this.getStruts().iterator(); index.hasNext(); ) { 31255 let strut = index.next(); 31256 { 31257 const strutAxis = this.symmetry.getAxis(strut.getOffset()); 31258 if (strutAxis != null && strutAxis.getOrbit().equals(this.orbit)) { 31259 if (strutAxis.equals(this.axis) || strutAxis.equals(oppositeAxis)) { 31260 this.select$com_vzome_core_model_Manifestation(strut); 31261 } 31262 } 31263 } 31264 } 31265 super.perform(); 31266 } 31267 /** 31268 * 31269 * @return {string} 31270 */ 31271 getXmlElementName() { 31272 return "SelectParallelStruts"; 31273 } 31274 /** 31275 * 31276 * @param {*} element 31277 */ 31278 getXmlAttributes(element) { 31279 if (this.symmetry != null) DomUtils.addAttribute(element, "symmetry", this.symmetry.getName()); 31280 if (this.orbit != null) DomUtils.addAttribute(element, "orbit", this.orbit.getName()); 31281 if (this.axis != null) XmlSymmetryFormat.serializeAxis(element, "symm", "dir", "index", "sense", this.axis); 31282 } 31283 /** 31284 * 31285 * @param {*} xml 31286 * @param {XmlSaveFormat} format 31287 */ 31288 setXmlAttributes(xml, format) { 31289 this.symmetry = this.editor["getSymmetrySystem$java_lang_String"](xml.getAttribute("symmetry")); 31290 this.orbit = this.symmetry.getOrbits().getDirection(xml.getAttribute("orbit")); 31291 this.axis = format.parseAxis(xml, "symm", "dir", "index", "sense"); 31292 } 31293}; 31294SelectParallelStruts["__class"] = "com.vzome.core.edits.SelectParallelStruts"; 31295
31296// src/worker/legacy/from-java/com/vzome/core/edits/ShowHidden.ts 31297var ShowHidden = class extends ChangeManifestations { 31298 constructor(editor) { 31299 super(editor); 31300 } 31301 /** 31302 * 31303 */ 31304 perform() { 31305 for (let index = this.mManifestations.iterator(); index.hasNext(); ) { 31306 let m = index.next(); 31307 { 31308 if (m.isHidden()) { 31309 this.showManifestation(m); 31310 this.select$com_vzome_core_model_Manifestation(m); 31311 } else if (this.mSelection.manifestationSelected(m)) this.unselect$com_vzome_core_model_Manifestation(m); 31312 } 31313 } 31314 this.redo(); 31315 } 31316 /** 31317 * 31318 * @return {string} 31319 */ 31320 getXmlElementName() { 31321 return "ShowHidden"; 31322 } 31323}; 31324ShowHidden["__class"] = "com.vzome.core.edits.ShowHidden"; 31325
31326// src/worker/legacy/from-java/com/vzome/core/edits/ShowNormals.ts 31327var ShowNormals = class _ShowNormals extends ChangeManifestations { 31328 static { 31329 this.NAME = "ShowNormals"; 31330 } 31331 /** 31332 * 31333 */ 31334 perform() { 31335 const SCALE_DOWN = this.mManifestations.getField()["createAlgebraicNumber$int$int$int$int"](1, 0, 2, -3); 31336 this.unselectConnectors(); 31337 this.unselectStruts(); 31338 for (let index = Manifestations.getPanels$java_lang_Iterable(this.mSelection).iterator(); index.hasNext(); ) { 31339 let panel = index.next(); 31340 { 31341 this.unselect$com_vzome_core_model_Manifestation(panel); 31342 const centroid = panel.getCentroid(); 31343 const tip = centroid.plus(panel["getNormal$"]().scale(SCALE_DOWN)); 31344 const p1 = new FreePoint(centroid); 31345 const p2 = new FreePoint(tip); 31346 const s = new SegmentJoiningPoints(p1, p2); 31347 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(p1)); 31348 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(p2)); 31349 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(s)); 31350 } 31351 } 31352 this.redo(); 31353 } 31354 constructor(editor) { 31355 super(editor); 31356 } 31357 /** 31358 * 31359 * @return {string} 31360 */ 31361 getXmlElementName() { 31362 return _ShowNormals.NAME; 31363 } 31364}; 31365ShowNormals["__class"] = "com.vzome.core.edits.ShowNormals"; 31366
31367// src/worker/legacy/from-java/com/vzome/core/edits/ShowPoint.ts 31368var ShowPoint = class extends ChangeManifestations { 31369 constructor(editor) { 31370 super(editor); 31371 if (this.point === void 0) { 31372 this.point = null; 31373 } 31374 if (this.parameters === void 0) { 31375 this.parameters = null; 31376 } 31377 this.parameters = editor; 31378 } 31379 /** 31380 * 31381 * @param {*} props 31382 */ 31383 configure(props) { 31384 switch (props.get("mode")) { 31385 case "origin": 31386 const origin = this.mManifestations.getField().origin(3); 31387 this.point = new FreePoint(origin); 31388 break; 31389 case "symmCenter": 31390 this.point = this.parameters.getCenterPoint(); 31391 break; 31392 } 31393 } 31394 /** 31395 * 31396 */ 31397 perform() { 31398 this.manifestConstruction(this.point); 31399 this.redo(); 31400 } 31401 /** 31402 * 31403 * @param {*} xml 31404 */ 31405 getXmlAttributes(xml) { 31406 XmlSaveFormat.serializePoint(xml, "point", this.point); 31407 } 31408 /** 31409 * 31410 * @param {*} xml 31411 * @param {XmlSaveFormat} format 31412 */ 31413 setXmlAttributes(xml, format) { 31414 if (format.commandEditsCompacted()) this.point = format.parsePoint$org_w3c_dom_Element$java_lang_String(xml, "point"); 31415 else { 31416 const attrs = format.loadCommandAttributes$org_w3c_dom_Element(xml); 31417 this.point = attrs.get("point"); 31418 } 31419 } 31420 /** 31421 * 31422 * @return {string} 31423 */ 31424 getXmlElementName() { 31425 return "ShowPoint"; 31426 } 31427}; 31428ShowPoint["__class"] = "com.vzome.core.edits.ShowPoint"; 31429
31430// src/worker/legacy/from-java/com/vzome/core/construction/PolygonVertex.ts 31431var PolygonVertex = class extends Point { 31432 constructor(polygon, index) { 31433 super(polygon.field); 31434 if (this.polygon === void 0) { 31435 this.polygon = null; 31436 } 31437 if (this.index === void 0) { 31438 this.index = 0; 31439 } 31440 this.polygon = polygon; 31441 this.index = index; 31442 this.mapParamsToState(); 31443 } 31444 /** 31445 * 31446 * @return {boolean} 31447 */ 31448 mapParamsToState() { 31449 if (this.polygon.isImpossible()) { 31450 return this.setStateVariable(null, true); 31451 } 31452 const loc = this.polygon.getVertex(this.index); 31453 return this.setStateVariable(loc, false); 31454 } 31455}; 31456PolygonVertex["__class"] = "com.vzome.core.construction.PolygonVertex"; 31457
31458// src/worker/legacy/from-java/com/vzome/core/edits/ShowVertices.ts 31459var ShowVertices = class _ShowVertices extends ChangeManifestations { 31460 static { 31461 this.NAME = "ShowVertices"; 31462 } 31463 /** 31464 * 31465 */ 31466 perform() { 31467 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 31468 let man = index.next(); 31469 { 31470 this.unselect$com_vzome_core_model_Manifestation(man); 31471 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) { 31472 const s = man.getFirstConstruction(); 31473 const start = new SegmentEndPoint(s, true); 31474 this.manifestConstruction(start); 31475 const end = new SegmentEndPoint(s, false); 31476 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(end)); 31477 } else if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0)) { 31478 const polygon = man.getFirstConstruction(); 31479 for (let i = 0; i < polygon.getVertexCount(); i++) { 31480 { 31481 const v = new PolygonVertex(polygon, i); 31482 this.select$com_vzome_core_model_Manifestation(this.manifestConstruction(v)); 31483 } 31484 ; 31485 } 31486 } 31487 } 31488 } 31489 this.redo(); 31490 } 31491 constructor(editor) { 31492 super(editor); 31493 } 31494 /** 31495 * 31496 * @return {string} 31497 */ 31498 getXmlElementName() { 31499 return _ShowVertices.NAME; 31500 } 31501}; 31502ShowVertices["__class"] = "com.vzome.core.edits.ShowVertices"; 31503
31504// src/worker/legacy/from-java/com/vzome/core/edits/StrutCreation.ts 31505var StrutCreation = class extends ChangeManifestations { 31506 /** 31507 * 31508 * @param {*} params 31509 */ 31510 configure(params) { 31511 this.mAnchor = params.get("anchor"); 31512 this.mAxis = params.get("zone"); 31513 this.mLength = params.get("length"); 31514 } 31515 constructor(anchor, axis, len, editor) { 31516 if ((anchor != null && anchor instanceof Point || anchor === null) && (axis != null && axis instanceof Axis || axis === null) && (len != null && (len.constructor != null && len.constructor["__interfaces"] != null && len.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || len === null) && (editor != null && (editor.constructor != null && editor.constructor["__interfaces"] != null && editor.constructor["__interfaces"].indexOf("com.vzome.core.editor.api.EditorModel") >= 0) || editor === null)) { 31517 let __args = arguments; 31518 super(editor); 31519 if (this.mAnchor === void 0) { 31520 this.mAnchor = null; 31521 } 31522 if (this.mAxis === void 0) { 31523 this.mAxis = null; 31524 } 31525 if (this.mLength === void 0) { 31526 this.mLength = null; 31527 } 31528 this.mAnchor = anchor; 31529 this.mAxis = axis; 31530 this.mLength = len; 31531 } else if ((anchor != null && (anchor.constructor != null && anchor.constructor["__interfaces"] != null && anchor.constructor["__interfaces"].indexOf("com.vzome.core.editor.api.EditorModel") >= 0) || anchor === null) && axis === void 0 && len === void 0 && editor === void 0) { 31532 let __args = arguments; 31533 let editor2 = __args[0]; 31534 { 31535 let __args2 = arguments; 31536 let anchor2 = null; 31537 let axis2 = null; 31538 let len2 = null; 31539 super(editor2); 31540 if (this.mAnchor === void 0) { 31541 this.mAnchor = null; 31542 } 31543 if (this.mAxis === void 0) { 31544 this.mAxis = null; 31545 } 31546 if (this.mLength === void 0) { 31547 this.mLength = null; 31548 } 31549 this.mAnchor = anchor2; 31550 this.mAxis = axis2; 31551 this.mLength = len2; 31552 } 31553 } else throw new Error("invalid overload"); 31554 } 31555 /** 31556 * 31557 */ 31558 perform() { 31559 const segment = new AnchoredSegment(this.mAxis, this.mLength, this.mAnchor); 31560 this.manifestConstruction(segment); 31561 const point = new SegmentEndPoint(segment); 31562 this.manifestConstruction(point); 31563 this.redo(); 31564 } 31565 /** 31566 * 31567 * @param {*} xml 31568 */ 31569 getXmlAttributes(xml) { 31570 XmlSaveFormat.serializePoint(xml, "anchor", this.mAnchor); 31571 XmlSymmetryFormat.serializeAxis(xml, "symm", "dir", "index", "sense", this.mAxis); 31572 XmlSaveFormat.serializeNumber(xml, "len", this.mLength); 31573 } 31574 /** 31575 * 31576 * @param {*} xml 31577 * @param {XmlSaveFormat} format 31578 */ 31579 setXmlAttributes(xml, format) { 31580 if (format.rationalVectors()) { 31581 this.mAnchor = format.parsePoint$org_w3c_dom_Element$java_lang_String(xml, "anchor"); 31582 this.mAxis = format.parseAxis(xml, "symm", "dir", "index", "sense"); 31583 this.mLength = format.parseNumber(xml, "len"); 31584 } else { 31585 const attrs = format.loadCommandAttributes$org_w3c_dom_Element$boolean(xml, true); 31586 this.mAnchor = attrs.get("anchor"); 31587 this.mAxis = attrs.get("axis"); 31588 this.mLength = attrs.get("len"); 31589 } 31590 } 31591 /** 31592 * 31593 * @return {string} 31594 */ 31595 getXmlElementName() { 31596 return "StrutCreation"; 31597 } 31598}; 31599StrutCreation["__class"] = "com.vzome.core.edits.StrutCreation"; 31600
31601// src/worker/legacy/from-java/com/vzome/core/edits/StrutIntersection.ts 31602var StrutIntersection = class extends ChangeManifestations { 31603 constructor(editor) { 31604 super(editor); 31605 } 31606 /** 31607 * 31608 */ 31609 perform() { 31610 let s1 = null; 31611 let s2 = null; 31612 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 31613 let man = index.next(); 31614 { 31615 this.unselect$com_vzome_core_model_Manifestation(man); 31616 if (man != null && (man.constructor != null && man.constructor["__interfaces"] != null && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0)) if (s1 == null) s1 = man; 31617 else if (s2 == null) s2 = man; 31618 else throw new Command.Failure("only two struts are allowed"); 31619 } 31620 } 31621 if (s1 == null || s2 == null) throw new Command.Failure("two struts are required"); 31622 const l1 = new LineFromPointAndVector(s1.getLocation(), s1.getZoneVector()); 31623 const l2 = new LineFromPointAndVector(s2.getLocation(), s2.getZoneVector()); 31624 const point = new LineLineIntersectionPoint(l1, l2); 31625 if (point.isImpossible()) throw new Command.Failure("lines are parallel or non-intersecting"); 31626 const ball = this.manifestConstruction(point); 31627 this.select$com_vzome_core_model_Manifestation(ball); 31628 this.redo(); 31629 } 31630 /** 31631 * 31632 * @return {string} 31633 */ 31634 getXmlElementName() { 31635 return "StrutIntersection"; 31636 } 31637}; 31638StrutIntersection["__class"] = "com.vzome.core.edits.StrutIntersection"; 31639
31640// src/worker/legacy/from-java/com/vzome/core/edits/StrutMove.ts 31641var StrutMove = class extends StrutCreation { 31642 constructor(editor) { 31643 super(editor); 31644 if (this.oldStrut === void 0) { 31645 this.oldStrut = null; 31646 } 31647 } 31648 /** 31649 * 31650 * @param {*} params 31651 */ 31652 configure(params) { 31653 super.configure(params); 31654 this.oldStrut = params.get("oldStrut"); 31655 } 31656 /** 31657 * 31658 */ 31659 perform() { 31660 this.deleteManifestation(this.oldStrut); 31661 this.manifestConstruction(this.mAnchor); 31662 super.redo(); 31663 super.perform(); 31664 } 31665 /** 31666 * 31667 * @param {*} xml 31668 */ 31669 getXmlAttributes(xml) { 31670 XmlSaveFormat.serializeSegment(xml, "startSegment", "endSegment", this.oldStrut.getFirstConstruction()); 31671 super.getXmlAttributes(xml); 31672 } 31673 /** 31674 * 31675 * @param {*} xml 31676 * @param {XmlSaveFormat} format 31677 */ 31678 setXmlAttributes(xml, format) { 31679 const construction = format.parseSegment$org_w3c_dom_Element$java_lang_String$java_lang_String(xml, "startSegment", "endSegment"); 31680 if (construction != null) this.oldStrut = this.getManifestation(construction); 31681 super.setXmlAttributes(xml, format); 31682 } 31683 /** 31684 * 31685 * @return {string} 31686 */ 31687 getXmlElementName() { 31688 return "StrutMove"; 31689 } 31690}; 31691StrutMove["__class"] = "com.vzome.core.edits.StrutMove"; 31692
31693// src/worker/legacy/from-java/com/vzome/core/edits/Symmetry4d.ts 31694var Symmetry4d = class _Symmetry4d extends ChangeManifestations { 31695 constructor(editor, left, right) { 31696 if ((editor != null && (editor.constructor != null && editor.constructor["__interfaces"] != null && editor.constructor["__interfaces"].indexOf("com.vzome.core.editor.api.EditorModel") >= 0) || editor === null) && (left != null && left instanceof QuaternionicSymmetry || left === null) && (right != null && right instanceof QuaternionicSymmetry || right === null)) { 31697 let __args = arguments; 31698 super(editor); 31699 if (this.left === void 0) { 31700 this.left = null; 31701 } 31702 if (this.right === void 0) { 31703 this.right = null; 31704 } 31705 this.left = left; 31706 this.right = right; 31707 } else if ((editor != null && (editor.constructor != null && editor.constructor["__interfaces"] != null && editor.constructor["__interfaces"].indexOf("com.vzome.core.editor.api.EditorModel") >= 0) || editor === null) && left === void 0 && right === void 0) { 31708 let __args = arguments; 31709 super(editor); 31710 if (this.left === void 0) { 31711 this.left = null; 31712 } 31713 if (this.right === void 0) { 31714 this.right = null; 31715 } 31716 this.left = editor.get4dSymmetries().getQuaternionSymmetry("H_4"); 31717 this.right = this.left; 31718 } else throw new Error("invalid overload"); 31719 } 31720 /** 31721 * 31722 * @param {*} parameters 31723 */ 31724 configure(parameters) { 31725 this.left = parameters.get("left"); 31726 this.right = parameters.get("right"); 31727 } 31728 /** 31729 * 31730 * @return {string} 31731 */ 31732 getXmlElementName() { 31733 return "Symmetry4d"; 31734 } 31735 /*private*/ 31736 static inW0hyperplane(v) { 31737 if (v.dimension() > 3) return v.getComponent(AlgebraicVector.W4).isZero(); 31738 else return true; 31739 } 31740 /** 31741 * 31742 */ 31743 perform() { 31744 const params = new java.util.ArrayList(); 31745 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 31746 let man = index.next(); 31747 { 31748 this.unselect$com_vzome_core_model_Manifestation(man); 31749 const cs = man.getConstructions(); 31750 let useThis = null; 31751 if (!cs.hasNext()) throw new Command.Failure("No construction for this manifestation"); 31752 for (const iterator = man.getConstructions(); iterator.hasNext(); ) { 31753 { 31754 const construction = iterator.next(); 31755 if (construction != null && construction instanceof Point) { 31756 const p = construction; 31757 if (!_Symmetry4d.inW0hyperplane(p.getLocation())) throw new Command.Failure("Some ball is not in the W=0 hyperplane."); 31758 } else if (construction != null && construction instanceof Segment) { 31759 const s = construction; 31760 if (!_Symmetry4d.inW0hyperplane(s.getStart())) throw new Command.Failure("Some strut end is not in the W=0 hyperplane."); 31761 if (!_Symmetry4d.inW0hyperplane(s.getEnd())) throw new Command.Failure("Some strut end is not in the W=0 hyperplane."); 31762 } else if (construction != null && construction instanceof Polygon) { 31763 const p = construction; 31764 for (let i = 0; i < p.getVertexCount(); i++) { 31765 { 31766 if (!_Symmetry4d.inW0hyperplane(p.getVertex(i))) { 31767 throw new Command.Failure("Some panel vertex is not in the W=0 hyperplane."); 31768 } 31769 } 31770 ; 31771 } 31772 } else { 31773 throw new Command.Failure("Unknown construction type."); 31774 } 31775 useThis = construction; 31776 } 31777 ; 31778 } 31779 if (useThis != null) params.add(useThis); 31780 } 31781 } 31782 this.redo(); 31783 const leftRoots = this.left.getRoots(); 31784 const rightRoots = this.right.getRoots(); 31785 for (let index = 0; index < leftRoots.length; index++) { 31786 let leftRoot = leftRoots[index]; 31787 { 31788 for (let index1 = 0; index1 < rightRoots.length; index1++) { 31789 let rightRoot = rightRoots[index1]; 31790 { 31791 for (let index2 = params.iterator(); index2.hasNext(); ) { 31792 let construction = index2.next(); 31793 { 31794 let result = null; 31795 if (construction != null && construction instanceof Point) { 31796 result = new PointRotated4D(leftRoot, rightRoot, construction); 31797 } else if (construction != null && construction instanceof Segment) { 31798 result = new SegmentRotated4D(leftRoot, rightRoot, construction); 31799 } else if (construction != null && construction instanceof Polygon) { 31800 result = new PolygonRotated4D(leftRoot, rightRoot, construction); 31801 } else { 31802 } 31803 if (result == null) continue; 31804 this.manifestConstruction(result); 31805 } 31806 } 31807 } 31808 } 31809 } 31810 } 31811 this.redo(); 31812 } 31813 rotateAndProject(loc3d, leftQuaternion, rightQuaternion) { 31814 let loc = loc3d.inflateTo4d$boolean(true); 31815 loc = rightQuaternion.leftMultiply(loc); 31816 loc = leftQuaternion.rightMultiply(loc); 31817 loc = loc.projectTo3d(true); 31818 return new FreePoint(loc); 31819 } 31820}; 31821Symmetry4d["__class"] = "com.vzome.core.edits.Symmetry4d"; 31822
31823// src/worker/legacy/from-java/com/vzome/core/edits/TransformSelection.ts 31824var TransformSelection = class extends ChangeManifestations { 31825 constructor(editor, transform) { 31826 super(editor); 31827 if (this.transform === void 0) { 31828 this.transform = null; 31829 } 31830 this.transform = transform; 31831 } 31832 /** 31833 * 31834 */ 31835 perform() { 31836 const inputs = new java.util.ArrayList(); 31837 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 31838 let man = index.next(); 31839 { 31840 this.unselect$com_vzome_core_model_Manifestation(man); 31841 inputs.add(man); 31842 } 31843 } 31844 this.redo(); 31845 for (let index = inputs.iterator(); index.hasNext(); ) { 31846 let m = index.next(); 31847 { 31848 if (!m.isRendered()) continue; 31849 const c = m.getFirstConstruction(); 31850 const result = this.transform.transform$com_vzome_core_construction_Construction(c); 31851 this.select$com_vzome_core_model_Manifestation$boolean(this.manifestConstruction(result), true); 31852 } 31853 } 31854 this.redo(); 31855 } 31856 /** 31857 * 31858 * @return {string} 31859 */ 31860 getXmlElementName() { 31861 return "TransformSelection"; 31862 } 31863}; 31864TransformSelection["__class"] = "com.vzome.core.edits.TransformSelection"; 31865
31866// src/worker/legacy/from-java/com/vzome/core/edits/Validate2Manifold.ts 31867var Validate2Manifold = class _Validate2Manifold extends ChangeManifestations { 31868 constructor(editor) { 31869 super(editor); 31870 } 31871 showStrut(strut) { 31872 const a = new FreePoint(strut.getLocation()); 31873 this.manifestConstruction(a); 31874 const b = new FreePoint(strut.getEnd()); 31875 this.manifestConstruction(b); 31876 const segment = new SegmentJoiningPoints(a, b); 31877 this.manifestConstruction(segment); 31878 } 31879 /** 31880 * 31881 */ 31882 perform() { 31883 for (let index = this.mSelection.iterator(); index.hasNext(); ) { 31884 let man = index.next(); 31885 super.unselect$com_vzome_core_model_Manifestation$boolean(man, true); 31886 } 31887 this.hideConnectors(); 31888 this.hideStruts(); 31889 this.redo(); 31890 const edges = new _Validate2Manifold.Edges(); 31891 for (let index = Manifestations.getVisiblePanels(this.mManifestations).iterator(); index.hasNext(); ) { 31892 let panel = index.next(); 31893 { 31894 let v0 = null; 31895 let prev = null; 31896 for (let index2 = panel.iterator(); index2.hasNext(); ) { 31897 let vertex = index2.next(); 31898 { 31899 if (v0 == null) { 31900 v0 = vertex; 31901 prev = vertex; 31902 } else { 31903 const strut2 = new StrutImpl(prev, vertex); 31904 edges.addStrut(strut2, panel); 31905 prev = vertex; 31906 } 31907 } 31908 } 31909 const strut = new StrutImpl(prev, v0); 31910 edges.addStrut(strut, panel); 31911 } 31912 } 31913 let invalid = false; 31914 for (let index = edges.entrySet().iterator(); index.hasNext(); ) { 31915 let entry = index.next(); 31916 { 31917 if (entry.getValue().size() !== 2) { 31918 this.showStrut(entry.getKey()); 31919 invalid = true; 31920 } 31921 } 31922 } 31923 if (invalid) { 31924 this.hidePanels(); 31925 this.redo(); 31926 return; 31927 } 31928 for (let index = edges.entrySet().iterator(); index.hasNext(); ) { 31929 let entry = index.next(); 31930 { 31931 const strut = entry.getKey(); 31932 const v1 = strut.getLocation(); 31933 const v2 = strut.getEnd(); 31934 const oriented = /* @__PURE__ */ ((v12, v22) => { 31935 return (p) => { 31936 let prev = null; 31937 for (let index2 = p.iterator(); index2.hasNext(); ) { 31938 let v = index2.next(); 31939 { 31940 if (v.equals(v22) && prev != null) return v12.equals(prev); 31941 prev = v; 31942 } 31943 } 31944 return v12.equals(prev); 31945 }; 31946 })(v1, v2); 31947 const panels = [null, null]; 31948 entry.getValue().toArray(panels); 31949 const c1 = ((target) => typeof target === "function" ? target(panels[0]) : target.apply(panels[0]))(oriented); 31950 const c2 = ((target) => typeof target === "function" ? target(panels[1]) : target.apply(panels[1]))(oriented); 31951 if (c1 === c2) { 31952 invalid = true; 31953 this.showStrut(strut); 31954 } 31955 } 31956 } 31957 if (invalid) { 31958 this.redo(); 31959 return; 31960 } 31961 } 31962 /** 31963 * 31964 * @return {string} 31965 */ 31966 getXmlElementName() { 31967 return "Validate2Manifold"; 31968 } 31969}; 31970Validate2Manifold["__class"] = "com.vzome.core.edits.Validate2Manifold"; 31971((Validate2Manifold2) => { 31972 class Edges extends java.util.HashMap { 31973 addStrut(strut, panel) { 31974 let existing = this.get(strut); 31975 if (existing == null) { 31976 existing = new java.util.HashSet(); 31977 this.put(strut, existing); 31978 } 31979 existing.add(panel); 31980 } 31981 constructor() { 31982 super(); 31983 } 31984 } 31985 Validate2Manifold2.Edges = Edges; 31986 Edges["__class"] = "com.vzome.core.edits.Validate2Manifold.Edges"; 31987 Edges["__interfaces"] = ["java.lang.Cloneable", "java.util.Map", "java.io.Serializable"]; 31988})(Validate2Manifold || (Validate2Manifold = {})); 31989
31990// src/worker/legacy/from-java/com/vzome/core/edits/ValidateSelection.ts 31991var ValidateSelection = class extends ChangeSelection { 31992 /** 31993 * 31994 */ 31995 perform() { 31996 if (this.mSelection.size() === 0) throw new Command.Failure("selection is empty"); 31997 } 31998 constructor(editor) { 31999 super(editor.getSelection()); 32000 } 32001 /** 32002 * 32003 * @return {string} 32004 */ 32005 getXmlElementName() { 32006 return "ValidateSelection"; 32007 } 32008}; 32009ValidateSelection["__class"] = "com.vzome.core.edits.ValidateSelection"; 32010
32011// src/worker/legacy/from-java/com/vzome/core/commands/CommandBuildAnchoredSegment.ts 32012var CommandBuildAnchoredSegment = class _CommandBuildAnchoredSegment extends AbstractCommand { 32013 /** 32014 * 32015 * @param {*} xml 32016 * @param {AttributeMap} attributes 32017 */ 32018 getXml(xml, attributes) { 32019 XmlSymmetryFormat.serializeAxis(xml, "symm", "dir", "index", "sense", attributes.get("axis")); 32020 XmlSaveFormat.serializeNumber(xml, "len", attributes.get("length")); 32021 } 32022 /** 32023 * 32024 * @param {*} xml 32025 * @param {XmlSaveFormat} format 32026 * @return {AttributeMap} 32027 */ 32028 setXml(xml, format) { 32029 const attrs = super.setXml(xml, format); 32030 if (format.commandEditsCompacted()) { 32031 attrs.put("axis", format.parseAxis(xml, "symm", "dir", "index", "sense")); 32032 attrs.put("length", format.parseNumber(xml, "len")); 32033 } 32034 return attrs; 32035 } 32036 static { 32037 this.AXIS_ATTR = "axis"; 32038 } 32039 static { 32040 this.LENGTH_ATTR = "length"; 32041 } 32042 static PARAM_SIGNATURE_$LI$() { 32043 if (_CommandBuildAnchoredSegment.PARAM_SIGNATURE == null) { 32044 _CommandBuildAnchoredSegment.PARAM_SIGNATURE = [["start", Point]]; 32045 } 32046 return _CommandBuildAnchoredSegment.PARAM_SIGNATURE; 32047 } 32048 /** 32049 * 32050 * @return {java.lang.Object[][]} 32051 */ 32052 getParameterSignature() { 32053 return _CommandBuildAnchoredSegment.PARAM_SIGNATURE_$LI$(); 32054 } 32055 /** 32056 * 32057 * @return {java.lang.Object[][]} 32058 */ 32059 getAttributeSignature() { 32060 return null; 32061 } 32062 /** 32063 * 32064 * @param {ConstructionList} parameters 32065 * @param {AttributeMap} attrs 32066 * @param {*} effects 32067 * @return {ConstructionList} 32068 */ 32069 apply(parameters, attrs, effects) { 32070 const result = new ConstructionList(); 32071 if (parameters == null || parameters.size() !== 1) throw new Command.Failure("start parameter must be a single point"); 32072 const c = parameters.get(0); 32073 if (!(c != null && c instanceof Point)) throw new Command.Failure("start parameter must be a single point"); 32074 const pt1 = c; 32075 const axis = attrs.get(_CommandBuildAnchoredSegment.AXIS_ATTR); 32076 const len = attrs.get(_CommandBuildAnchoredSegment.LENGTH_ATTR); 32077 const segment = new AnchoredSegment(axis, len, pt1); 32078 effects["constructionAdded$com_vzome_core_construction_Construction"](segment); 32079 result.addConstruction(segment); 32080 const pt2 = new SegmentEndPoint(segment); 32081 effects["constructionAdded$com_vzome_core_construction_Construction"](pt2); 32082 result.addConstruction(pt2); 32083 return result; 32084 } 32085 constructor() { 32086 super(); 32087 } 32088}; 32089CommandBuildAnchoredSegment["__class"] = "com.vzome.core.commands.CommandBuildAnchoredSegment"; 32090CommandBuildAnchoredSegment["__interfaces"] = ["com.vzome.core.commands.Command"]; 32091
32092// src/worker/legacy/from-java/com/vzome/core/commands/CommandExecuteZomicScript.ts 32093var CommandExecuteZomicScript = class _CommandExecuteZomicScript extends AbstractCommand { 32094 /** 32095 * 32096 * @param {AttributeMap} attributes 32097 * @param {XmlSaveFormat} format 32098 */ 32099 setFixedAttributes(attributes, format) { 32100 super.setFixedAttributes(attributes, format); 32101 this.symmetry = attributes.get(CommandTransform.SYMMETRY_GROUP_ATTR_NAME); 32102 if (this.symmetry == null) this.symmetry = format.parseSymmetry("icosahedral"); 32103 } 32104 constructor(symmetry) { 32105 if (symmetry != null && symmetry instanceof IcosahedralSymmetry || symmetry === null) { 32106 let __args = arguments; 32107 super(); 32108 if (this.symmetry === void 0) { 32109 this.symmetry = null; 32110 } 32111 this.symmetry = symmetry; 32112 } else if (symmetry === void 0) { 32113 let __args = arguments; 32114 super(); 32115 if (this.symmetry === void 0) { 32116 this.symmetry = null; 32117 } 32118 this.symmetry = null; 32119 } else throw new Error("invalid overload"); 32120 } 32121 static { 32122 this.SCRIPT_ATTR = "script"; 32123 } 32124 static PARAM_SIGNATURE_$LI$() { 32125 if (_CommandExecuteZomicScript.PARAM_SIGNATURE == null) { 32126 _CommandExecuteZomicScript.PARAM_SIGNATURE = [["start", Point]]; 32127 } 32128 return _CommandExecuteZomicScript.PARAM_SIGNATURE; 32129 } 32130 static ATTR_SIGNATURE_$LI$() { 32131 if (_CommandExecuteZomicScript.ATTR_SIGNATURE == null) { 32132 _CommandExecuteZomicScript.ATTR_SIGNATURE = [[_CommandExecuteZomicScript.SCRIPT_ATTR, ZomicStatement]]; 32133 } 32134 return _CommandExecuteZomicScript.ATTR_SIGNATURE; 32135 } 32136 /** 32137 * 32138 * @return {java.lang.Object[][]} 32139 */ 32140 getParameterSignature() { 32141 return _CommandExecuteZomicScript.PARAM_SIGNATURE_$LI$(); 32142 } 32143 /** 32144 * 32145 * @return {java.lang.Object[][]} 32146 */ 32147 getAttributeSignature() { 32148 return _CommandExecuteZomicScript.ATTR_SIGNATURE_$LI$(); 32149 } 32150 /** 32151 * 32152 * @param {ConstructionList} parameters 32153 * @param {AttributeMap} attrs 32154 * @param {*} effects 32155 * @return {ConstructionList} 32156 */ 32157 apply(parameters, attrs, effects) { 32158 const script = attrs.get(_CommandExecuteZomicScript.SCRIPT_ATTR); 32159 const result = new ConstructionList(); 32160 if (parameters.size() !== 1) throw new Command.Failure("start parameter must be a single connector"); 32161 const c = parameters.get(0); 32162 if (!(c != null && c instanceof Point)) throw new Command.Failure("start parameter must be a connector"); 32163 const pt1 = c; 32164 try { 32165 this.symmetry.interpretScript(script, "zomic", pt1, this.symmetry, effects); 32166 } catch (e) { 32167 throw new Command.Failure(e.message, e); 32168 } 32169 return result; 32170 } 32171}; 32172CommandExecuteZomicScript["__class"] = "com.vzome.core.commands.CommandExecuteZomicScript"; 32173CommandExecuteZomicScript["__interfaces"] = ["com.vzome.core.commands.Command"]; 32174
32175// src/worker/legacy/from-java/com/vzome/core/commands/CommandFreePoint.ts 32176var CommandFreePoint = class _CommandFreePoint extends AbstractCommand { 32177 static PARAMS_$LI$() { 32178 if (_CommandFreePoint.PARAMS == null) { 32179 _CommandFreePoint.PARAMS = []; 32180 } 32181 return _CommandFreePoint.PARAMS; 32182 } 32183 /** 32184 * 32185 * @return {java.lang.Object[][]} 32186 */ 32187 getParameterSignature() { 32188 return _CommandFreePoint.PARAMS_$LI$(); 32189 } 32190 /** 32191 * 32192 * @return {java.lang.Object[][]} 32193 */ 32194 getAttributeSignature() { 32195 return null; 32196 } 32197 /** 32198 * 32199 * @param {ConstructionList} parameters 32200 * @param {AttributeMap} attributes 32201 * @param {*} effects 32202 * @return {ConstructionList} 32203 */ 32204 apply(parameters, attributes, effects) { 32205 const result = new ConstructionList(); 32206 const loc = attributes.get("where"); 32207 const pt2 = new FreePoint(loc); 32208 effects["constructionAdded$com_vzome_core_construction_Construction"](pt2); 32209 result.addConstruction(pt2); 32210 return result; 32211 } 32212 constructor() { 32213 super(); 32214 } 32215}; 32216CommandFreePoint["__class"] = "com.vzome.core.commands.CommandFreePoint"; 32217CommandFreePoint["__interfaces"] = ["com.vzome.core.commands.Command"]; 32218
32219// src/worker/legacy/from-java/com/vzome/core/commands/CommandJoinPoints.ts 32220var CommandJoinPoints = class _CommandJoinPoints extends AbstractCommand { 32221 static PARAM_SIGNATURE_$LI$() { 32222 if (_CommandJoinPoints.PARAM_SIGNATURE == null) { 32223 _CommandJoinPoints.PARAM_SIGNATURE = [["start", Point], ["end", Point]]; 32224 } 32225 return _CommandJoinPoints.PARAM_SIGNATURE; 32226 } 32227 static ATTR_SIGNATURE_$LI$() { 32228 if (_CommandJoinPoints.ATTR_SIGNATURE == null) { 32229 _CommandJoinPoints.ATTR_SIGNATURE = []; 32230 } 32231 return _CommandJoinPoints.ATTR_SIGNATURE; 32232 } 32233 /** 32234 * 32235 * @return {java.lang.Object[][]} 32236 */ 32237 getParameterSignature() { 32238 return _CommandJoinPoints.PARAM_SIGNATURE_$LI$(); 32239 } 32240 /** 32241 * 32242 * @return {java.lang.Object[][]} 32243 */ 32244 getAttributeSignature() { 32245 return _CommandJoinPoints.ATTR_SIGNATURE_$LI$(); 32246 } 32247 /** 32248 * 32249 * @return {boolean} 32250 */ 32251 ordersSelection() { 32252 return true; 32253 } 32254 /** 32255 * 32256 * @param {ConstructionList} parameters 32257 * @param {AttributeMap} attrs 32258 * @param {*} effects 32259 * @return {ConstructionList} 32260 */ 32261 apply(parameters, attrs, effects) { 32262 const result = new ConstructionList(); 32263 if (parameters == null || parameters.size() !== 2) throw new Command.Failure("parameters must be two points"); 32264 try { 32265 const pt1 = parameters.get(0); 32266 const pt2 = parameters.get(1); 32267 const segment = new SegmentJoiningPoints(pt1, pt2); 32268 result.addConstruction(segment); 32269 effects["constructionAdded$com_vzome_core_construction_Construction"](segment); 32270 } catch (e) { 32271 throw new Command.Failure("parameters must be two points"); 32272 } 32273 return result; 32274 } 32275 constructor() { 32276 super(); 32277 } 32278}; 32279CommandJoinPoints["__class"] = "com.vzome.core.commands.CommandJoinPoints"; 32280CommandJoinPoints["__interfaces"] = ["com.vzome.core.commands.Command"]; 32281
32282// src/worker/legacy/from-java/com/vzome/core/commands/CommandLinePlaneIntersect.ts 32283var CommandLinePlaneIntersect = class _CommandLinePlaneIntersect extends AbstractCommand { 32284 static PARAM_SIGNATURE_$LI$() { 32285 if (_CommandLinePlaneIntersect.PARAM_SIGNATURE == null) { 32286 _CommandLinePlaneIntersect.PARAM_SIGNATURE = [["panel", Polygon], ["segment", Segment]]; 32287 } 32288 return _CommandLinePlaneIntersect.PARAM_SIGNATURE; 32289 } 32290 static ATTR_SIGNATURE_$LI$() { 32291 if (_CommandLinePlaneIntersect.ATTR_SIGNATURE == null) { 32292 _CommandLinePlaneIntersect.ATTR_SIGNATURE = []; 32293 } 32294 return _CommandLinePlaneIntersect.ATTR_SIGNATURE; 32295 } 32296 /** 32297 * 32298 * @return {java.lang.Object[][]} 32299 */ 32300 getParameterSignature() { 32301 return _CommandLinePlaneIntersect.PARAM_SIGNATURE_$LI$(); 32302 } 32303 /** 32304 * 32305 * @return {java.lang.Object[][]} 32306 */ 32307 getAttributeSignature() { 32308 return _CommandLinePlaneIntersect.ATTR_SIGNATURE_$LI$(); 32309 } 32310 /** 32311 * 32312 * @param {ConstructionList} parameters 32313 * @param {AttributeMap} attrs 32314 * @param {*} effects 32315 * @return {ConstructionList} 32316 */ 32317 apply(parameters, attrs, effects) { 32318 const result = new ConstructionList(); 32319 if (parameters == null || parameters.size() !== 2) throw new Command.Failure("Intersection requires a panel and a strut."); 32320 try { 32321 let panel; 32322 let segment; 32323 const first = parameters.get(0); 32324 if (first != null && first instanceof Polygon) { 32325 panel = first; 32326 segment = parameters.get(1); 32327 } else { 32328 segment = first; 32329 panel = parameters.get(1); 32330 } 32331 const plane = new PlaneExtensionOfPolygon(panel); 32332 const line = new LineExtensionOfSegment(segment); 32333 const point = new LinePlaneIntersectionPoint(plane, line); 32334 result.addConstruction(point); 32335 effects["constructionAdded$com_vzome_core_construction_Construction"](point); 32336 } catch (e) { 32337 throw new Command.Failure("Intersection requires a panel and a strut."); 32338 } 32339 return result; 32340 } 32341 constructor() { 32342 super(); 32343 } 32344}; 32345CommandLinePlaneIntersect["__class"] = "com.vzome.core.commands.CommandLinePlaneIntersect"; 32346CommandLinePlaneIntersect["__interfaces"] = ["com.vzome.core.commands.Command"]; 32347
32348// src/worker/legacy/from-java/com/vzome/core/commands/CommandLoad.ts 32349var CommandLoad = class _CommandLoad extends AbstractCommand { 32350 static { 32351 this.XML_ATTR = "xml"; 32352 } 32353 static PARAM_SIGNATURE_$LI$() { 32354 if (_CommandLoad.PARAM_SIGNATURE == null) { 32355 _CommandLoad.PARAM_SIGNATURE = []; 32356 } 32357 return _CommandLoad.PARAM_SIGNATURE; 32358 } 32359 static ATTR_SIGNATURE_$LI$() { 32360 if (_CommandLoad.ATTR_SIGNATURE == null) { 32361 _CommandLoad.ATTR_SIGNATURE = [[_CommandLoad.XML_ATTR, "org.w3c.dom.Element"]]; 32362 } 32363 return _CommandLoad.ATTR_SIGNATURE; 32364 } 32365 /** 32366 * 32367 * @return {java.lang.Object[][]} 32368 */ 32369 getParameterSignature() { 32370 return _CommandLoad.PARAM_SIGNATURE_$LI$(); 32371 } 32372 /** 32373 * 32374 * @return {java.lang.Object[][]} 32375 */ 32376 getAttributeSignature() { 32377 return _CommandLoad.ATTR_SIGNATURE_$LI$(); 32378 } 32379 /** 32380 * 32381 * @param {ConstructionList} parameters 32382 * @param {AttributeMap} attributes 32383 * @param {*} effects 32384 * @return {ConstructionList} 32385 */ 32386 apply(parameters, attributes, effects) { 32387 const result = new ConstructionList(); 32388 return result; 32389 } 32390 constructor() { 32391 super(); 32392 } 32393}; 32394CommandLoad["__class"] = "com.vzome.core.commands.CommandLoad"; 32395CommandLoad["__interfaces"] = ["com.vzome.core.commands.Command"]; 32396
32397// src/worker/legacy/from-java/com/vzome/core/commands/CommandSetColor.ts 32398var CommandSetColor = class _CommandSetColor extends AbstractCommand { 32399 static { 32400 this.MANIFESTATION_ATTR = "manifestation.context"; 32401 } 32402 static { 32403 this.COLOR_ATTR = "color"; 32404 } 32405 static PARAM_SIGNATURE_$LI$() { 32406 if (_CommandSetColor.PARAM_SIGNATURE == null) { 32407 _CommandSetColor.PARAM_SIGNATURE = []; 32408 } 32409 return _CommandSetColor.PARAM_SIGNATURE; 32410 } 32411 /** 32412 * 32413 * @return {java.lang.Object[][]} 32414 */ 32415 getParameterSignature() { 32416 return _CommandSetColor.PARAM_SIGNATURE_$LI$(); 32417 } 32418 /** 32419 * 32420 * @return {java.lang.Object[][]} 32421 */ 32422 getAttributeSignature() { 32423 return null; 32424 } 32425 /** 32426 * 32427 * @param {ConstructionList} parameters 32428 * @param {AttributeMap} attributes 32429 * @param {*} effects 32430 * @return {ConstructionList} 32431 */ 32432 apply(parameters, attributes, effects) { 32433 return parameters; 32434 } 32435 constructor() { 32436 super(); 32437 } 32438}; 32439CommandSetColor["__class"] = "com.vzome.core.commands.CommandSetColor"; 32440CommandSetColor["__interfaces"] = ["com.vzome.core.commands.Command"]; 32441
32442// src/worker/legacy/from-java/com/vzome/core/editor/Snapshot.ts 32443var Snapshot = class extends UndoableEdit { 32444 /** 32445 * 32446 * @return {boolean} 32447 */ 32448 isNoOp() { 32449 return false; 32450 } 32451 /** 32452 * 32453 */ 32454 perform() { 32455 this.recorder.recordSnapshot(this.id); 32456 } 32457 constructor(id, controller) { 32458 super(); 32459 if (this.id === void 0) { 32460 this.id = 0; 32461 } 32462 if (this.recorder === void 0) { 32463 this.recorder = null; 32464 } 32465 this.id = id; 32466 this.recorder = controller; 32467 } 32468 /** 32469 * 32470 */ 32471 undo() { 32472 } 32473 /** 32474 * 32475 */ 32476 redo() { 32477 } 32478 /** 32479 * 32480 * @param {*} props 32481 */ 32482 configure(props) { 32483 const idProp = props.get("id"); 32484 if (idProp != null) this.id = /* intValue */ 32485 idProp | 0; 32486 } 32487 /** 32488 * 32489 * @return {boolean} 32490 */ 32491 isVisible() { 32492 return false; 32493 } 32494 /** 32495 * 32496 * @return {boolean} 32497 */ 32498 isDestructive() { 32499 return false; 32500 } 32501 /** 32502 * 32503 * @param {*} doc 32504 * @return {*} 32505 */ 32506 getXml(doc) { 32507 const xml = doc.createElement("Snapshot"); 32508 DomUtils.addAttribute( 32509 xml, 32510 "id", 32511 /* toString */ 32512 "" + this.id 32513 ); 32514 return xml; 32515 } 32516 /** 32517 * 32518 * @param {*} doc 32519 * @return {*} 32520 */ 32521 getDetailXml(doc) { 32522 return this.getXml(doc); 32523 } 32524 /** 32525 * 32526 * @param {*} xml 32527 * @param {XmlSaveFormat} format 32528 * @param {*} context 32529 */ 32530 loadAndPerform(xml, format, context) { 32531 this.id = javaemul.internal.IntegerHelper.parseInt(xml.getAttribute("id")); 32532 context.performAndRecord(this); 32533 } 32534 /** 32535 * 32536 * @return {boolean} 32537 */ 32538 isSticky() { 32539 return true; 32540 } 32541}; 32542Snapshot["__class"] = "com.vzome.core.editor.Snapshot"; 32543
32544// src/worker/legacy/registry.js 32545var editClasses = { 32546 AdjustSelectionByClass, 32547 AdjustSelectionByOrbitLength, 32548 AffineHeptagon, 32549 AffinePentagon, 32550 AffinePolygon, 32551 AffineTransformAll, 32552 B4Polytope, 32553 ColorManifestations, 32554 ColorMappers, 32555 ConvexHull2d, 32556 ConvexHull3d, 32557 CrossProduct, 32558 Delete, 32559 DeselectAll, 32560 DodecagonSymmetry, 32561 GhostSymmetry24Cell, 32562 GroupSelection, 32563 HeptagonSubdivision, 32564 InvertSelection, 32565 JoinPointPair, 32566 JoinPoints, 32567 JoinSkewLines, 32568 Label, 32569 LinePlaneIntersect, 32570 LoadVEF, 32571 ManifestationColorMappers, 32572 MapToColor, 32573 NewCentroid, 32574 PanelCentroids, 32575 PanelPanelIntersection, 32576 PanelPerimeters, 32577 Parallelepiped, 32578 PolarZonohedron, 32579 Polytope4d, 32580 RealizeMetaParts, 32581 ReplaceWithShape, 32582 ReversePanel, 32583 RunZomicScript, 32584 SelectAll, 32585 SelectAutomaticStruts, 32586 SelectByDiameter, 32587 SelectByPlane, 32588 SelectByRadius, 32589 SelectCollinear, 32590 SelectCoplanar, 32591 SelectManifestation, 32592 SelectNeighbors, 32593 SelectParallelStruts, 32594 ShowHidden, 32595 ShowNormals, 32596 ShowPoint, 32597 ShowVertices, 32598 StrutCreation, 32599 StrutIntersection, 32600 StrutMove, 32601 Symmetry4d, 32602 SymmetryAxisChange, 32603 SymmetryCenterChange, 32604 TransformSelection, 32605 Validate2Manifold, 32606 ValidateSelection 32607}; 32608var commandClasses = { 32609 AttributeMap, 32610 CommandAxialSymmetry, 32611 CommandBuildAnchoredSegment, 32612 CommandCentralSymmetry, 32613 CommandCentroid, 32614 CommandExecuteZomicScript, 32615 CommandFreePoint, 32616 CommandHide, 32617 CommandImportVEFData, 32618 CommandJoinPoints, 32619 CommandLinePlaneIntersect, 32620 CommandLoad, 32621 CommandMidpoint, 32622 CommandMirrorSymmetry, 32623 CommandObliquePentagon, 32624 CommandPolygon, 32625 CommandQuaternionSymmetry, 32626 CommandRotate, 32627 CommandSetColor, 32628 CommandSymmetry, 32629 CommandTauDivision, 32630 CommandTetrahedralSymmetry, 32631 CommandTranslate, 32632 CommandUniformH4Polytope, 32633 CommandVanOss600Cell, 32634 XmlSaveFormat, 32635 XmlSymmetryFormat, 32636 ZomicVirtualMachine 32637}; 32638var editorClasses = { 32639 ApplyTool, 32640 BeginBlock, 32641 Branch, 32642 CommandEdit, 32643 Duplicator, 32644 EditHistory, 32645 EndBlock, 32646 SelectToolParameters, 32647 SelectionImpl, 32648 SelectionSummary, 32649 Snapshot, 32650 SymmetrySystem, 32651 ToolsModel 32652}; 32653
32654// src/worker/legacy/edit.js 32655var ParsedEdit = class _ParsedEdit { 32656 constructor(txmlElement, parent, interpretEdit) { 32657 this.nativeElement = txmlElement; 32658 this.parentEdit = parent; 32659 this.interpret = interpretEdit; 32660 this.legacyEdit = void 0; 32661 const kids = txmlElement.children.filter((kid) => kid.tagName !== "effects"); 32662 if (kids.length === 1 && typeof kids[0] === "string") 32663 this.children = []; 32664 else 32665 this.children = kids.map((child) => new _ParsedEdit(child, this, interpretEdit)); 32666 } 32667 // these are for the interpreter 32668 isBranch() { 32669 return this.nativeElement.tagName && this.nativeElement.tagName === "Branch"; 32670 } 32671 id() { 32672 return this.nativeElement.id; 32673 } 32674 firstChild() { 32675 return this.children.length > 0 && this.children[0]; 32676 } 32677 nextSibling() { 32678 if (!this.parentEdit) return null; 32679 const next = this.nativeElement.index + 1; 32680 if (next >= this.parentEdit.children.length) return null; 32681 return this.parentEdit.children[next]; 32682 } 32683 perform(context) { 32684 this.legacyEdit = this.interpret.call(this, this.nativeElement, context); 32685 } 32686 // these are for the debugger UI 32687 name() { 32688 return this.nativeElement.tagName; 32689 } 32690 toString() { 32691 return this.name(); 32692 } 32693 getAttributeNames() { 32694 return this.nativeElement.attributes.keys(); 32695 } 32696 getAttribute(name) { 32697 return this.nativeElement.attributes[name]; 32698 } 32699 // const serialize = () => serializeLegacyEdit( txmlElement ); 32700}; 32701
vendor: 7,620 bytes, lines 32702-32951
32702// node_modules/txml/dist/txml.mjs 32703function parse(S, options) { 32704 "txml"; 32705 options = options || {}; 32706 var pos = options.pos || 0; 32707 var keepComments = !!options.keepComments; 32708 var keepWhitespace = !!options.keepWhitespace; 32709 var openBracket = "<"; 32710 var openBracketCC = "<".charCodeAt(0); 32711 var closeBracket = ">"; 32712 var closeBracketCC = ">".charCodeAt(0); 32713 var minusCC = "-".charCodeAt(0); 32714 var slashCC = "/".charCodeAt(0); 32715 var exclamationCC = "!".charCodeAt(0); 32716 var singleQuoteCC = "'".charCodeAt(0); 32717 var doubleQuoteCC = '"'.charCodeAt(0); 32718 var openCornerBracketCC = "[".charCodeAt(0); 32719 var closeCornerBracketCC = "]".charCodeAt(0); 32720 function parseChildren(tagName) { 32721 var children = []; 32722 while (S[pos]) { 32723 if (S.charCodeAt(pos) == openBracketCC) { 32724 if (S.charCodeAt(pos + 1) === slashCC) { 32725 var closeStart = pos + 2; 32726 pos = S.indexOf(closeBracket, pos); 32727 var closeTag = S.substring(closeStart, pos); 32728 if (closeTag.indexOf(tagName) == -1) { 32729 var parsedText = S.substring(0, pos).split("\n"); 32730 throw new Error( 32731 "Unexpected close tag\nLine: " + (parsedText.length - 1) + "\nColumn: " + (parsedText[parsedText.length - 1].length + 1) + "\nChar: " + S[pos] 32732 ); 32733 } 32734 if (pos + 1) pos += 1; 32735 return children; 32736 } else if (S.charCodeAt(pos + 1) === exclamationCC) { 32737 if (S.charCodeAt(pos + 2) == minusCC) { 32738 const startCommentPos = pos; 32739 while (pos !== -1 && !(S.charCodeAt(pos) === closeBracketCC && S.charCodeAt(pos - 1) == minusCC && S.charCodeAt(pos - 2) == minusCC && pos != -1)) { 32740 pos = S.indexOf(closeBracket, pos + 1); 32741 } 32742 if (pos === -1) { 32743 pos = S.length; 32744 } 32745 if (keepComments) { 32746 children.push(S.substring(startCommentPos, pos + 1)); 32747 } 32748 } else if (S.charCodeAt(pos + 2) === openCornerBracketCC && S.charCodeAt(pos + 8) === openCornerBracketCC && S.substr(pos + 3, 5).toLowerCase() === "cdata") { 32749 var cdataEndIndex = S.indexOf("]]>", pos); 32750 if (cdataEndIndex == -1) { 32751 children.push(S.substr(pos + 9)); 32752 pos = S.length; 32753 } else { 32754 children.push(S.substring(pos + 9, cdataEndIndex)); 32755 pos = cdataEndIndex + 3; 32756 } 32757 continue; 32758 } else { 32759 const startDoctype = pos + 1; 32760 pos += 2; 32761 var encapsuled = false; 32762 while ((S.charCodeAt(pos) !== closeBracketCC || encapsuled === true) && S[pos]) { 32763 if (S.charCodeAt(pos) === openCornerBracketCC) { 32764 encapsuled = true; 32765 } else if (encapsuled === true && S.charCodeAt(pos) === closeCornerBracketCC) { 32766 encapsuled = false; 32767 } 32768 pos++; 32769 } 32770 children.push(S.substring(startDoctype, pos)); 32771 } 32772 pos++; 32773 continue; 32774 } 32775 var node = parseNode(); 32776 children.push(node); 32777 if (node.tagName[0] === "?") { 32778 children.push(...node.children); 32779 node.children = []; 32780 } 32781 } else { 32782 var text = parseText(); 32783 if (keepWhitespace) { 32784 if (text.length > 0) { 32785 children.push(text); 32786 } 32787 } else { 32788 var trimmed = text.trim(); 32789 if (trimmed.length > 0) { 32790 children.push(trimmed); 32791 } 32792 } 32793 pos++; 32794 } 32795 } 32796 return children; 32797 } 32798 function parseText() { 32799 var start = pos; 32800 pos = S.indexOf(openBracket, pos) - 1; 32801 if (pos === -2) 32802 pos = S.length; 32803 return S.slice(start, pos + 1); 32804 } 32805 var nameSpacer = "\r\n >/= "; 32806 function parseName() { 32807 var start = pos; 32808 while (nameSpacer.indexOf(S[pos]) === -1 && S[pos]) { 32809 pos++; 32810 } 32811 return S.slice(start, pos); 32812 } 32813 var NoChildNodes = options.noChildNodes || ["img", "br", "input", "meta", "link", "hr"]; 32814 function parseNode() { 32815 pos++; 32816 const tagName = parseName(); 32817 const attributes = {}; 32818 let children = []; 32819 while (S.charCodeAt(pos) !== closeBracketCC && S[pos]) { 32820 var c = S.charCodeAt(pos); 32821 if (c > 64 && c < 91 || c > 96 && c < 123) { 32822 var name = parseName(); 32823 var code = S.charCodeAt(pos); 32824 while (code && code !== singleQuoteCC && code !== doubleQuoteCC && !(code > 64 && code < 91 || code > 96 && code < 123) && code !== closeBracketCC) { 32825 pos++; 32826 code = S.charCodeAt(pos); 32827 } 32828 if (code === singleQuoteCC || code === doubleQuoteCC) { 32829 var value = parseString(); 32830 if (pos === -1) { 32831 return { 32832 tagName, 32833 attributes, 32834 children 32835 }; 32836 } 32837 } else { 32838 value = null; 32839 pos--; 32840 } 32841 attributes[name] = value; 32842 } 32843 pos++; 32844 } 32845 if (S.charCodeAt(pos - 1) !== slashCC) { 32846 if (tagName == "script") { 32847 var start = pos + 1; 32848 pos = S.indexOf("<\/script>", pos); 32849 children = [S.slice(start, pos)]; 32850 pos += 9; 32851 } else if (tagName == "style") { 32852 var start = pos + 1; 32853 pos = S.indexOf("</style>", pos); 32854 children = [S.slice(start, pos)]; 32855 pos += 8; 32856 } else if (NoChildNodes.indexOf(tagName) === -1) { 32857 pos++; 32858 children = parseChildren(tagName); 32859 } else { 32860 pos++; 32861 } 32862 } else { 32863 pos++; 32864 } 32865 return { 32866 tagName, 32867 attributes, 32868 children 32869 }; 32870 } 32871 function parseString() { 32872 var startChar = S[pos]; 32873 var startpos = pos + 1; 32874 pos = S.indexOf(startChar, startpos); 32875 return S.slice(startpos, pos); 32876 } 32877 function findElements() { 32878 var r = new RegExp("\\s" + options.attrName + `\\s*=['"]` + options.attrValue + `['"]`).exec(S); 32879 if (r) { 32880 return r.index; 32881 } else { 32882 return -1; 32883 } 32884 } 32885 var out = null; 32886 if (options.attrValue !== void 0) { 32887 options.attrName = options.attrName || "id"; 32888 var out = []; 32889 while ((pos = findElements()) !== -1) { 32890 pos = S.lastIndexOf("<", pos); 32891 if (pos !== -1) { 32892 out.push(parseNode()); 32893 } 32894 S = S.substr(pos); 32895 pos = 0; 32896 } 32897 } else if (options.parseNode) { 32898 out = parseNode(); 32899 } else { 32900 out = parseChildren(""); 32901 } 32902 if (options.filter) { 32903 out = filter(out, options.filter); 32904 } 32905 if (options.simplify) { 32906 return simplify2(Array.isArray(out) ? out : [out]); 32907 } 32908 if (options.setPos) { 32909 out.pos = pos; 32910 } 32911 return out; 32912} 32913function simplify2(children) { 32914 var out = {}; 32915 if (!children.length) { 32916 return ""; 32917 } 32918 if (children.length === 1 && typeof children[0] == "string") { 32919 return children[0]; 32920 } 32921 children.forEach(function(child) { 32922 if (typeof child !== "object") { 32923 return; 32924 } 32925 if (!out[child.tagName]) 32926 out[child.tagName] = []; 32927 var kids = simplify2(child.children); 32928 out[child.tagName].push(kids); 32929 if (Object.keys(child.attributes).length && typeof kids !== "string") { 32930 kids._attributes = child.attributes; 32931 } 32932 }); 32933 for (var i in out) { 32934 if (out[i].length == 1) { 32935 out[i] = out[i][0]; 32936 } 32937 } 32938 return out; 32939} 32940function filter(children, f, dept = 0, path = "") { 32941 var out = []; 32942 children.forEach(function(child, i) { 32943 if (typeof child === "object" && f(child, i, dept, path)) out.push(child); 32944 if (child.children) { 32945 var kids = filter(child.children, f, dept + 1, (path ? path + "." : "") + i + "." + child.tagName); 32946 out = out.concat(kids); 32947 } 32948 }); 32949 return out; 32950} 32951
32952// src/worker/legacy/parser.js 32953var assignIds = (txmlElement, id = ":") => { 32954 if (txmlElement.tagName === "effects") 32955 return txmlElement; 32956 txmlElement.id = id; 32957 txmlElement.children.map((child, index) => { 32958 if (child instanceof Object && child.tagName !== "effects") { 32959 child.index = index; 32960 assignIds(child, `${id}${index}:`); 32961 } 32962 }); 32963 return txmlElement; 32964}; 32965var parseVector = (element, name) => { 32966 const child = element.getChildElement(name); 32967 const x = parseFloat(child.getAttribute("x")); 32968 const y = parseFloat(child.getAttribute("y")); 32969 const z = parseFloat(child.getAttribute("z")); 32970 return [x, y, z]; 32971}; 32972var parseColor = (rgbCsv) => { 32973 const [r, g, b] = rgbCsv.split(",").map((s) => parseInt(s)); 32974 const componentToHex = (c) => { 32975 const hex = c.toString(16); 32976 return hex.length === 1 ? "0" + hex : hex; 32977 }; 32978 return "#" + componentToHex(r) + componentToHex(g) + componentToHex(b); 32979}; 32980var parseLighting = (sceneElement) => { 32981 const backgroundColor = parseColor(sceneElement.getAttribute("background")); 32982 return { 32983 backgroundColor, 32984 // TODO: parse these too, in case they change someday 32985 ambientColor: "#292929", 32986 directionalLights: [ 32987 // These are the vZome defaults, for consistency 32988 { direction: [1, -1, -0.3], color: "#FDFDFD" }, 32989 { direction: [-1, 0, 0], color: "#808080" }, 32990 { direction: [0, 0, -1], color: "#1E1E1E" } 32991 ] 32992 }; 32993}; 32994var parseViewXml = (viewingElement) => { 32995 const viewModel = viewingElement.getChildElement("ViewModel"); 32996 const distance = parseFloat(viewModel.getAttribute("distance")); 32997 const near = parseFloat(viewModel.getAttribute("near")); 32998 const far = parseFloat(viewModel.getAttribute("far")); 32999 const width = parseFloat(viewModel.getAttribute("width")); 33000 const parallelAttr = viewModel.getAttribute("parallel"); 33001 const orthographic = parallelAttr ? parallelAttr.toLowerCase() == "true" : false;
33002 const lookAt = parseVector(viewModel, "LookAtPoint"); 33003 const up = parseVector(viewModel, "UpDirection"); 33004 const lookDir = parseVector(viewModel, "LookDirection"); 33005 const camera = { 33006 near, 33007 far, 33008 width, 33009 distance, 33010 up, 33011 lookAt, 33012 lookDir, 33013 perspective: !orthographic 33014 }; 33015 return camera; 33016}; 33017var findSnapshotNodes = (xmlTree) => { 33018 const snapshotNodes = []; 33019 const findSnapshots = (txmlElement) => { 33020 if (txmlElement.tagName === "Snapshot") { 33021 const snapshotId = parseInt(txmlElement.attributes.id); 33022 snapshotNodes[snapshotId] = txmlElement.id; 33023 } else { 33024 txmlElement.children.map((child) => { 33025 if (child instanceof Object) { 33026 findSnapshots(child, snapshotNodes); 33027 } 33028 }); 33029 } 33030 }; 33031 findSnapshots(xmlTree); 33032 return snapshotNodes; 33033}; 33034var parseArticle = (notesElement) => { 33035 if (!notesElement) 33036 return []; 33037 const parseArticlePage = (pageElement) => { 33038 const { snapshot, title } = pageElement.attributes; 33039 const pageDom = new JavaDomElement(pageElement); 33040 const camera = parseViewXml(pageDom); 33041 const content = pageDom.getChildElement("content")?.getTextContent() || ""; 33042 return { title, snapshot, camera, content }; 33043 }; 33044 return notesElement.nativeElement.children.map((pageElement) => parseArticlePage(pageElement)).filter((snapshot) => snapshot.title !== "How to save notes"); 33045}; 33046var createParser = (documentFactory2) => (xmlText) => { 33047 const domDoc = parse( 33048 xmlText 33049 /*, options */ 33050 ); 33051 let vZomeRoot = new JavaDomElement(domDoc.filter((n) => n.tagName === "vzome:vZome")[0]); 33052 const namespace = vZomeRoot.getAttribute("xmlns:vzome"); 33053 const fieldName = vZomeRoot.getAttribute("field"); 33054 const legacyDesign = documentFactory2(fieldName, namespace, vZomeRoot); 33055 const viewing = vZomeRoot.getChildElement("Viewing"); 33056 const camera = viewing && parseViewXml(viewing); 33057 const scene = vZomeRoot.getChildElement("sceneModel"); 33058 const lighting = scene && parseLighting(scene); 33059 const historyElement = vZomeRoot.getChildElement("EditHistory") || vZomeRoot.getChildElement("editHistory") || vZomeRoot.getChildElement("EditHistoryDetails"); 33060 const xmlTree = assignIds(historyElement.nativeElement); 33061 const edits = new ParsedEdit(xmlTree, null, legacyDesign.interpretEdit); 33062 const targetEdit = Number(edits.getAttribute("editNumber")); 33063 const targetEditId = `:${targetEdit}:`;
33064 const firstEdit = edits.firstChild(); 33065 const snapshotNodes = [...findSnapshotNodes(xmlTree), targetEditId]; 33066 const scenes = parseArticle(vZomeRoot.getChildElement("notes")); 33067 return { ...legacyDesign, firstEdit, camera, lighting, xmlTree, scenes, snapshotNodes, targetEdit }; 33068}; 33069
33070// src/worker/legacy/meshes.js 33071var getCentroid = AlgebraicVectors.getCentroid; 33072var coloredMeshToSimpleMesh = (coloredMesh) => { 33073 const simpleMesh = { 33074 field: coloredMesh.field, 33075 vertices: coloredMesh.vertices, 33076 edges: [], 33077 faces: [] 33078 }; 33079 if (coloredMesh.struts) { 33080 simpleMesh.edges = coloredMesh.struts.map((strut) => strut.vertices); 33081 } 33082 if (coloredMesh.panels) { 33083 simpleMesh.faces = coloredMesh.panels.map((panel) => panel.vertices); 33084 } 33085 return simpleMesh; 33086}; 33087var simpleMeshToTopologicalMesh = (simpleMesh) => { 33088 const topologicalMesh = { 33089 field: simpleMesh.field, 33090 vertices: simpleMesh.vertices, 33091 edges: [], 33092 faces: [], 33093 cells: [] 33094 }; 33095 const edgeMap = /* @__PURE__ */ new Map(); 33096 const getEdgeKey = (v1, v2) => v1 < v2 ? `${v1},${v2}` : `${v2},${v1}`; 33097 if (simpleMesh.edges) { 33098 simpleMesh.edges.forEach(([v1, v2]) => { 33099 const key = getEdgeKey(v1, v2); 33100 if (!edgeMap.has(key)) { 33101 const edgeIndex = topologicalMesh.edges.length; 33102 topologicalMesh.edges.push([v1, v2]); 33103 edgeMap.set(key, edgeIndex); 33104 } 33105 }); 33106 } 33107 if (simpleMesh.faces) { 33108 simpleMesh.faces.forEach((vertexIndices) => { 33109 const edgeIndices = []; 33110 for (let i = 0; i < vertexIndices.length; i++) { 33111 const v1 = vertexIndices[i]; 33112 const v2 = vertexIndices[(i + 1) % vertexIndices.length]; 33113 const key = getEdgeKey(v1, v2); 33114 let edgeIndex = edgeMap.get(key); 33115 if (edgeIndex === void 0) { 33116 edgeIndex = topologicalMesh.edges.length; 33117 topologicalMesh.edges.push([v1, v2]); 33118 edgeMap.set(key, edgeIndex); 33119 } 33120 edgeIndices.push(edgeIndex); 33121 } 33122 topologicalMesh.faces.push(edgeIndices); 33123 }); 33124 } 33125 return topologicalMesh; 33126}; 33127var enhanceFace = (edgeIndices, index, edges) => { 33128 const face = { index, adjacentEdges: [], adjacentCells: [] }; 33129 edgeIndices.forEach((edgeIndex) => { 33130 const edge = edges[edgeIndex]; 33131 face.adjacentEdges.push(edge); 33132 edge.adjacentFaces.push(face); 33133 }); 33134 face.centroid = getCentroid(face.adjacentEdges.map((e) => e.centroid)); 33135 return face; 33136}; 33137var enhanceCell = (faceIndices, index, faces) => { 33138 const cell = { index, adjacentFaces: [] }; 33139 faceIndices.forEach((faceIndex) => { 33140 const face = faces[faceIndex]; 33141 cell.adjacentFaces.push(face); 33142 face.adjacentCells.push(cell); 33143 }); 33144 cell.centroid = getCentroid(cell.adjacentFaces.map((f) => f.centroid)); 33145 return cell; 33146}; 33147var enhanceTopologicalMesh = (getField2) => (topoMesh) => { 33148 const field5 = getField2(topoMesh.field); 33149 const vertices = topoMesh.vertices.map((nums, index) => { 33150 let vector = field5.createVectorFromTDs(nums); 33151 return { index, vector, adjacentEdges: [] }; 33152 }); 33153 const edges = topoMesh.edges.map((strut, index) => { 33154 const v1 = vertices[strut[0]]; 33155 const v2 = vertices[strut[1]]; 33156 const edge = { index, endpoints: [v1, v2], adjacentFaces: [] }; 33157 edge.centroid = getCentroid([v1.vector, v2.vector]); 33158 v1.adjacentEdges.push(edge); 33159 v2.adjacentEdges.push(edge); 33160 return edge; 33161 }); 33162 const faces = (topoMesh.faces || []).map((edgeIndices, index) => enhanceFace(edgeIndices, index, edges)); 33163 const cells = (topoMesh.cells || []).map((faceIndices, index) => enhanceCell(faceIndices, index, faces)); 33164 return { field: field5, vertices, edges, faces, cells }; 33165}; 33166var enhanced4dToTopologicalMesh = (enhancedMesh) => { 33167 const cellSet = /* @__PURE__ */ new Set(); 33168 const faceSet = /* @__PURE__ */ new Set(); 33169 const edgeSet = /* @__PURE__ */ new Set(); 33170 const vertexSet = /* @__PURE__ */ new Set(); 33171 enhancedMesh.cells.forEach((cell) => { 33172 if (cell.is4D) { 33173 cellSet.add(cell); 33174 cell.adjacentFaces.forEach((face) => { 33175 if (face.is4D) { 33176 faceSet.add(face); 33177 face.adjacentEdges.forEach((edge) => { 33178 edgeSet.add(edge); 33179 edge.endpoints.forEach((vertex) => { 33180 vertexSet.add(vertex); 33181 }); 33182 }); 33183 } 33184 }); 33185 } 33186 }); 33187 const vertexArray = Array.from(vertexSet); 33188 vertexArray.forEach((vertex, index) => { 33189 vertex.newIndex = index; 33190 }); 33191 const edgeArray = Array.from(edgeSet); 33192 edgeArray.forEach((edge, index) => { 33193 edge.newIndex = index; 33194 }); 33195 const faceArray = Array.from(faceSet); 33196 faceArray.forEach((face, index) => { 33197 face.newIndex = index; 33198 }); 33199 const cellArray = Array.from(cellSet); 33200 cellArray.forEach((cell, index) => { 33201 cell.newIndex = index; 33202 }); 33203 const topologicalMesh = { 33204 field: enhancedMesh.field.getName(), 33205 vertices: [], 33206 edges: [], 33207 faces: [], 33208 cells: [] 33209 }; 33210 vertexArray.forEach((vertex) => { 33211 const vec4d = vertex.vector4d; 33212 topologicalMesh.vertices.push( 33213 [ 33214 vec4d.getComponent(0).toTrailingDivisor(), 33215 vec4d.getComponent(1).toTrailingDivisor(), 33216 vec4d.getComponent(2).toTrailingDivisor(), 33217 vec4d.getComponent(3).toTrailingDivisor() 33218 ] 33219 ); 33220 }); 33221 edgeArray.forEach((edge) => { 33222 const vIndices = edge.endpoints.map((vertex) => vertex.newIndex); 33223 topologicalMesh.edges.push(vIndices); 33224 }); 33225 faceArray.forEach((face) => { 33226 const edgeIndices = face.adjacentEdges.map((edge) => edge.newIndex); 33227 topologicalMesh.faces.push(edgeIndices); 33228 }); 33229 cellArray.forEach((cell) => { 33230 const faceIndices = cell.adjacentFaces.map((face) => face.newIndex); 33231 topologicalMesh.cells.push(faceIndices); 33232 }); 33233 return topologicalMesh; 33234}; 33235var enhanced4dToSimpleMesh = (enhancedMesh) => { 33236 const faceSet = /* @__PURE__ */ new Set(); 33237 const edgeSet = /* @__PURE__ */ new Set(); 33238 const vertexSet = /* @__PURE__ */ new Set();
33239 enhancedMesh.faces.forEach((face) => { 33240 if (face.is4D) { 33241 faceSet.add(face); 33242 face.adjacentEdges.forEach((edge) => { 33243 edgeSet.add(edge); 33244 edge.endpoints.forEach((vertex) => { 33245 vertexSet.add(vertex); 33246 }); 33247 }); 33248 } 33249 }); 33250 const vertexArray = Array.from(vertexSet); 33251 vertexArray.forEach((vertex, index) => { 33252 vertex.newIndex = index; 33253 }); 33254 const edgeArray = Array.from(edgeSet); 33255 edgeArray.forEach((edge, index) => { 33256 edge.newIndex = index; 33257 }); 33258 const faceArray = Array.from(faceSet); 33259 faceArray.forEach((face, index) => { 33260 face.newIndex = index; 33261 }); 33262 const inflatedSimpleMesh = { field: enhancedMesh.field.getName(), vertices: [], edges: [], faces: [] }; 33263 vertexArray.forEach((vertex) => { 33264 const vec4d = vertex.vector4d; 33265 inflatedSimpleMesh.vertices.push( 33266 [ 33267 vec4d.getComponent(1).toTrailingDivisor(), 33268 vec4d.getComponent(2).toTrailingDivisor(), 33269 vec4d.getComponent(3).toTrailingDivisor(), 33270 vec4d.getComponent(0).toTrailingDivisor() 33271 ] 33272 ); 33273 }); 33274 edgeArray.forEach((edge) => { 33275 const vIndices = edge.endpoints.map((vertex) => vertex.newIndex); 33276 inflatedSimpleMesh.edges.push(vIndices); 33277 }); 33278 faceArray.forEach((face) => { 33279 const uniqueVIndices = []; 33280 const vIndexSet = /* @__PURE__ */ new Set(); 33281 face.adjacentEdges.forEach((edge) => { 33282 edge.endpoints.forEach((vertex) => { 33283 if (!vIndexSet.has(vertex.newIndex)) { 33284 vIndexSet.add(vertex.newIndex); 33285 uniqueVIndices.push(vertex.newIndex); 33286 } 33287 }); 33288 }); 33289 const orderedVIndices = []; 33290 let currentVIndex = uniqueVIndices[0]; 33291 orderedVIndices.push(currentVIndex); 33292 while (orderedVIndices.length < uniqueVIndices.length) { 33293 let foundNext = false; 33294 for (const edge of face.adjacentEdges) { 33295 const v1 = edge.endpoints[0].newIndex; 33296 const v2 = edge.endpoints[1].newIndex; 33297 if (v1 === currentVIndex && !orderedVIndices.includes(v2)) { 33298 orderedVIndices.push(v2); 33299 currentVIndex = v2; 33300 foundNext = true; 33301 break; 33302 } else if (v2 === currentVIndex && !orderedVIndices.includes(v1)) { 33303 orderedVIndices.push(v1); 33304 currentVIndex = v1; 33305 foundNext = true; 33306 break; 33307 } 33308 } 33309 if (!foundNext) { 33310 console.error("Could not find next vertex in face!"); 33311 break; 33312 } 33313 } 33314 inflatedSimpleMesh.faces.push(orderedVIndices); 33315 }); 33316 return inflatedSimpleMesh; 33317}; 33318var enhancedMeshTo4OFF = ({ vertices, edges, faces, cells }) => { 33319 let off = "4OFF\n"; 33320 off += `${vertices.length} ${faces.length} ${edges.length} ${cells.length} 0 33321`; 33322 off += "\n# Vertices\n"; 33323 vertices.forEach((vertex) => { 33324 let vec4d = vertex.vector4d; 33325 if (!vec4d) { 33326 vec4d = vertex.vector.inflateTo4d(true); 33327 } 33328 const components = vec4d.getComponents().map((comp) => comp.evaluate()); 33329 off += `${components[1].toString()} ${components[2].toString()} ${components[3].toString()} ${components[0].toString()} 33330`; 33331 }); 33332 off += "\n# Faces\n"; 33333 faces.forEach((face) => { 33334 off += `${face.adjacentEdges.length} `; 33335 face.adjacentEdges.forEach((edge) => { 33336 off += `${edge.index} `; 33337 }); 33338 off += "\n"; 33339 }); 33340 off += "\n"; 33341 off += "# Cells\n"; 33342 cells.forEach((cell) => { 33343 off += `${cell.adjacentFaces.length} `; 33344 cell.adjacentFaces.forEach((face) => { 33345 off += `${face.index} `; 33346 }); 33347 off += "\n"; 33348 }); 33349 off += "\n"; 33350 return off; 33351}; 33352
33353// src/worker/legacy/core.js 33354SideEffects.logBugAccommodation = function(message) { 33355 console.log("SideEffects logBugAccommodation: " + message); 33356 throw new Error(message); 33357}; 33358var defaults = { 33359 // Standard Zometool colors 33360 // color.blue = 0,142,194 #008ec2 33361 // color.yellow = 255,179,26 #ffb31a 33362 // color.red = 217,18,24 #d91218 33363 // color.green = 0,153,63 #00993f 33364 // color.turquoise = 0,179,161 #00b3a1 33365 // color.white = 242,242,242 #f2f2f2 33366 // color.black = 50,50,50 #323232 33367 // color.orange = 235,82,0 #eb5200 33368 // color.purple = 125,54,211 #7d36d3 33369 // color.gray = 133,133,133 #858585 33370 "color.blue": "0,142,194", 33371 "color.yellow": "255,179,26", 33372 "color.red": "217,18,24", 33373 "color.green": "0,153,63", 33374 "color.turquoise": "0,179,161", 33375 "color.white": "242,242,242", 33376 "color.black": "50,50,50", 33377 "color.orange": "235,82,0", 33378 "color.purple": "125,54,211", 33379 "color.gray": "133,133,133", 33380 "color.olive": "100,113,0", 33381 "color.lavender": "175,135,255", 33382 "color.maroon": "117,0,50", 33383 "color.rose": "255,51,143", 33384 "color.navy": "0,0,153", 33385 "color.brown": "107,53,26", 33386 "color.apple": "116,195,0", 33387 "color.sand": "154,117,74", 33388 "color.coral": "255,126,106", 33389 "color.sulfur": "230,245,62", 33390 "color.cinnamon": "136,37,0", 33391 "color.spruce": "18,73,48", 33392 "color.magenta": "255,41,183", 33393 "color.snubPentagon": "187,57,48", 33394 "color.snubTriangle": "87,188,48", 33395 "color.snubDiagonal": "228,225,199", 33396 "color.snubFaceNormal": "216,216,208", 33397 "color.snubVertex": "204,204,0", 33398 "color.slate": "108, 126, 142", 33399 "color.mauve": "137, 104, 112", 33400 "color.ivory": "228,225,199", 33401 "color.panels": "225,225,225", 33402 "color.background": "175,200,220", 33403 "color.highlight": "195,195,195", 33404 "color.highlight.mac ": "153,255,0", 33405 "color.light.directional.1": "235, 235, 228", 33406 "color.light.directional.2": "228, 228, 235", 33407 "color.light.directional.3": "30, 30, 30", 33408 "color.light.ambient": "41, 41, 41", 33409 // direction values are given as "x,y,z", a vector of real numbers. 33410 // The X axis points to the right of your screen, the Y axis points to 33411 // the top of the screen, and the Z axis points out of the screen toward you. 33412 "direction.light.1": "1.0,-1.0,-1.0", 33413 "direction.light.2": "-1.0,0.0,0.0", 33414 "direction.light.3": "0.0,0.0,-1.0" 33415}; 33416var makeFloatMatrices = (matrices) => { 33417 return matrices.map((am) => { 33418 let m = []; 33419 for (let i = 0; i < 3; i++) { 33420 for (let j = 0; j < 3; j++) { 33421 const an = am.getElement(i, j); 33422 m[i * 4 + j] = an.evaluate(); 33423 } 33424 } 33425 m[3] = m[7] = m[11] = m[12] = m[13] = m[14] = 0; 33426 m[15] = 1; 33427 return m; 33428 }); 33429}; 33430var util = java.util; 33431java.lang.System.propertyMap_$LI$().put("gwt.logging.enabled", "TRUE"); 33432configureLogging(util.logging); 33433var verticesBigIntReviver = (key, value, context) => { 33434 if (typeof value === "number" && context && context.source) { 33435 if (context.source !== value.toString()) { 33436 return context.source; 33437 } 33438 return value; 33439 } 33440 return value; 33441}; 33442var ImportColoredMeshJson = class extends ImportMesh { 33443 getXmlElementName() { 33444 return "ImportColoredMeshJson"; 33445 } 33446 parseMeshData(offset, events, registry) { 33447 const coloredMesh = JSON.parse(this.meshData, verticesBigIntReviver); 33448 const field5 = registry.getField(coloredMesh.field); 33449 const vertices = coloredMesh.vertices.map((nums) => { 33450 let vertex = field5.createVectorFromTDs(nums); 33451 if (vertex.dimension() > 3) 33452 vertex = this.projection.projectImage(vertex, false); 33453 if (offset != null) 33454 vertex = offset.plus(vertex); 33455 return vertex; 33456 }); 33457 coloredMesh.balls.forEach((ball) => { 33458 const vertex = vertices[ball.vertex]; 33459 const color = ball.color && Color.parseWebColor(ball.color); 33460 events.constructionAdded(new FreePoint(vertex), color); 33461 }); 33462 coloredMesh.struts.forEach((strut) => { 33463 const point1 = new FreePoint(vertices[strut.vertices[0]]); 33464 const point2 = new FreePoint(vertices[strut.vertices[1]]); 33465 const color = strut.color && Color.parseWebColor(strut.color); 33466 events.constructionAdded(new SegmentJoiningPoints(point1, point2), color); 33467 });
33468 coloredMesh.panels.forEach((panel) => { 33469 const points = []; 33470 panel.vertices.forEach((i) => { 33471 points.push(new FreePoint(vertices[i])); 33472 }); 33473 const color = panel.color && Color.parseWebColor(panel.color); 33474 events.constructionAdded(new PolygonFromVertices(points), color); 33475 }); 33476 } 33477}; 33478var ImportSimpleMeshJson = class extends ImportMesh { 33479 scaleAndProject = true; 33480 getXmlElementName() { 33481 return "ImportSimpleMeshJson"; 33482 } 33483 getXmlAttributes(element) { 33484 if (this.scaleAndProject) 33485 element.setAttribute("scaleAndProject", "true"); 33486 super.getXmlAttributes(element); 33487 } 33488 setXmlAttributes(xml, format) { 33489 const boolStr = xml.getAttribute("scaleAndProject"); 33490 if (!boolStr) 33491 this.scaleAndProject = false; 33492 super.setXmlAttributes(xml, format); 33493 } 33494 parseMeshData(offset, events, registry) { 33495 let wFirst = false; 33496 if (!this.scaleAndProject) { 33497 const field6 = this.mManifestations.getField(); 33498 this.scale = field6.one(); 33499 this.projection = new Projection.Default(field6); 33500 } 33501 const simpleMesh = JSON.parse(this.meshData, verticesBigIntReviver); 33502 const field5 = registry.getField(simpleMesh.field || "golden"); 33503 const vertices = simpleMesh.vertices.map((nums) => { 33504 let vertex = field5.createVectorFromTDs(nums); 33505 vertex = vertex.scale(this.scale); 33506 if (vertex.dimension() > 3) 33507 vertex = this.projection.projectImage(vertex, wFirst); 33508 if (offset != null) 33509 vertex = offset.plus(vertex); 33510 return vertex; 33511 });
33512 simpleMesh.edges.forEach((strut) => { 33513 const point1 = new FreePoint(vertices[strut[0]]); 33514 const point2 = new FreePoint(vertices[strut[1]]); 33515 events.constructionAdded(point1); 33516 events.constructionAdded(point2); 33517 events.constructionAdded(new SegmentJoiningPoints(point1, point2)); 33518 }); 33519 simpleMesh.faces.forEach((panel) => { 33520 const points = []; 33521 panel.forEach((i) => { 33522 points.push(new FreePoint(vertices[i])); 33523 }); 33524 events.constructionAdded(new PolygonFromVertices(points)); 33525 }); 33526 } 33527}; 33528var xmlToEditClass = (editName) => { 33529 if (editName === "CommandEdit") { 33530 return void 0; 33531 } 33532 const legacyNames = { 33533 setItemColor: "ColorManifestations", 33534 BnPolyope: "B4Polytope", 33535 DeselectByClass: "AdjustSelectionByClass", 33536 realizeMetaParts: "RealizeMetaParts", 33537 SelectSimilarSize: "AdjustSelectionByOrbitLength", 33538 zomic: "RunZomicScript", 33539 py: "RunPythonScript", 33540 apiProxy: "ApiEdit" 33541 }; 33542 editName = legacyNames[editName] || editName; 33543 return editClasses[editName] || editorClasses[editName]; 33544}; 33545var editFactory = (editor, toolFactories, toolsModel) => (xmlElement) => { 33546 editor.setAdapter(null); 33547 let editName = xmlElement.getLocalName(); 33548 if (editName === "ImportColoredMeshJson") 33549 return new ImportColoredMeshJson(editor); 33550 if (editName === "ImportSimpleMeshJson") 33551 return new ImportSimpleMeshJson(editor); 33552 if (toolsModel) { 33553 const toolEdit = toolsModel.createEdit(editName); 33554 if (toolEdit) 33555 return toolEdit; 33556 } 33557 const toolId = xmlElement.getAttribute("name"); 33558 if (toolId) { 33559 const factory = toolFactories.get(editName); 33560 if (factory) { 33561 const edit = factory.deserializeTool(toolId); 33562 if (edit) 33563 return edit; 33564 } 33565 } 33566 const editClass = xmlToEditClass(editName); 33567 if (editClass) { 33568 const edit = new editClass(editor); 33569 if (editName === "Snapshot") { 33570 edit.recorder = { recordSnapshot: () => { 33571 } }; 33572 } 33573 if (editName === "GroupSelection") { 33574 const label = xmlElement.getAttribute("label"); 33575 if (label) { 33576 edit.label = label; 33577 } 33578 } 33579 return edit; 33580 } else 33581 return new CommandEdit(null, editor); 33582}; 33583var resources2 = {}; 33584var loadAndInjectResource = async (path, url) => { 33585 const response = await fetch(url); 33586 if (!response.ok) { 33587 console.debug(`No resource for ${path}`); 33588 return; 33589 } 33590 const text = await response.text(); 33591 if (text[0] === "<") { 33592 return; 33593 } 33594 resources2[path] = text; 33595}; 33596ResourceLoader.setResourceLoader({ 33597 loadTextResource: (path) => resources2[path] 33598}); 33599var groupResourcesReady = Promise.all(Object.entries(symmetry_default).map(([key, value]) => loadAndInjectResource(`com/vzome/core/math/symmetry/${key}.vef`, value))); 33600var properties = new JsProperties(defaults); 33601var colors2 = new Colors(properties); 33602var shapesReady = Promise.all(Object.entries(parts_default).map( 33603 async ([family, shapes28]) => { 33604 await Promise.all(Object.entries(shapes28).map(([key, value]) => loadAndInjectResource(`com/vzome/core/parts/${family}/${key}.vef`, value))); 33605 } 33606)); 33607var shapeColorsReady = Promise.all(Object.entries(colors_default5).map(([pkg, url]) => loadAndInjectResource(`com/vzome/core/parts/${pkg}/colors.properties`, url))); 33608var fieldRegistry = { 33609 golden: { kind: "new", label: "Zome (Golden)", jsField: golden_default, appClass: () => GoldenFieldApplication }, 33610 rootTwo: { kind: "new", label: "\u221A2", jsField: root2_default, appClass: () => RootTwoFieldApplication }, 33611 rootThree: { kind: "new", label: "\u221A3", jsField: root3_default, appClass: () => RootThreeFieldApplication }, 33612 heptagon: { kind: "new", label: "Heptagon", jsField: heptagon_default, appClass: () => HeptagonFieldApplication }, 33613 sqrtPhi: { kind: "legacy", label: "\u221A\u03C6", fieldClass: () => SqrtPhiField, appClass: () => SqrtPhiFieldApplication }, 33614 snubCube: { kind: "legacy", label: "Snub Cube", fieldClass: () => SnubCubeField, appClass: () => SnubCubeFieldApplication }, 33615 snubDodec: { kind: "legacy", label: "Snub Dodecahedron", fieldClass: () => SnubDodecField, appClass: () => SnubDodecFieldApplication }, 33616 superGolden: { kind: "legacy", label: null, fieldClass: () => SuperGoldenField, appClass: () => DefaultFieldApplication }, 33617 plasticNumber: { kind: "legacy", label: null, fieldClass: () => PlasticNumberField, appClass: () => DefaultFieldApplication }, 33618 plasticPhi: { kind: "legacy", label: null, fieldClass: () => PlasticPhiField, appClass: () => PlasticPhiFieldApplication }, 33619 edPegg: { kind: "legacy", label: null, fieldClass: () => EdPeggField, appClass: () => DefaultFieldApplication } 33620}; 33621var fieldApps = {}; 33622var wrapLegacyField = (legacyField) => ({ 33623 name: legacyField.getName() 33624}); 33625var constructFieldApp = (name) => { 33626 if (name.startsWith("polygon")) { 33627 const nsides = parseInt(name.replace(/^polygon/, "")); 33628 const legacyField = new PolygonField("polygon" + nsides, nsides, algebraicNumberFactory); 33629 legacyField.delegate = wrapLegacyField(legacyField); 33630 const fieldApp2 = new PolygonFieldApplication(legacyField); 33631 fieldApps[legacyField.getName()] = fieldApp2; 33632 return fieldApp2; 33633 } 33634 const entry = fieldRegistry[name]; 33635 if (!entry) 33636 return void 0; 33637 let fieldApp;
33638 if (entry.kind === "new") { 33639 const legacyField = new JsAlgebraicField(entry.jsField); 33640 fieldApp = new (entry.appClass())(legacyField); 33641 } else { 33642 const legacyField = new (entry.fieldClass())(algebraicNumberFactory); 33643 legacyField.delegate = wrapLegacyField(legacyField); 33644 fieldApp = new (entry.appClass())(legacyField); 33645 } 33646 fieldApps[name] = fieldApp; 33647 return fieldApp; 33648}; 33649var getFieldApp = (name = "golden") => fieldApps[name] || constructFieldApp(name); 33650var getFieldNames = () => Object.keys(fieldRegistry); 33651var getField = (fieldName) => { 33652 const fieldApp = getFieldApp(fieldName); 33653 if (!fieldApp) 33654 return { name: fieldName, unknown: true }; 33655 return fieldApp.getField(); 33656}; 33657var getFieldLabel = (fieldName) => { 33658 const entry = fieldRegistry[fieldName]; 33659 if (entry) 33660 return entry.label; 33661 const fieldApp = getFieldApp(fieldName); 33662 if (!fieldApp) 33663 return { error: `No such field name: ${fieldName}` }; 33664 return fieldApp.getLabel(); 33665}; 33666var getSymmetry = (fieldName, symmName) => { 33667 const fieldApp = getFieldApp(fieldName); 33668 if (!fieldApp) 33669 return { error: `No such field name: ${fieldName}` }; 33670 const symmPersp = fieldApp.getSymmetryPerspective(symmName); 33671 if (!symmPersp) 33672 return { error: `No such symmetry name: ${symmName}` }; 33673 return symmPersp.getSymmetry(); 33674}; 33675var documentFactory = (fieldName, namespace, xml) => { 33676 const fieldApp = getFieldApp(fieldName); 33677 if (!fieldApp) 33678 return { field: { name: fieldName, unknown: true } }; 33679 const legacyField = fieldApp.getField(); 33680 const field5 = legacyField.delegate; 33681 const originPoint = new FreePoint(legacyField.origin(3)); 33682 const systemXml = xml && xml.getChildElement("SymmetrySystem"); 33683 const symmName = systemXml && systemXml.getAttribute("name"); 33684 const symmPer = symmName && fieldApp.getSymmetryPerspective(symmName) || fieldApp.getDefaultSymmetryPerspective(); 33685 const history = new EditHistory(); 33686 history.setSerializer({ serialize: (element) => element.serialize("") }); 33687 let changeCount = 0; 33688 const getChangeCount = () => changeCount; 33689 const editContext = { 33690 // Since we are not creating Branch edits, this should never be used 33691 createEdit: () => { 33692 throw new Error("createEdit should never be called"); 33693 }, 33694 createLegacyCommand: (name) => { 33695 const constructor = commandClasses[name]; 33696 if (constructor) 33697 return new constructor(); 33698 else 33699 throw new Error(`${name} command is not available yet`); 33700 }, 33701 performAndRecord: (edit) => { 33702 edit.perform(); 33703 if (edit.isNoOp()) 33704 return; 33705 history.mergeSelectionChanges(); 33706 history.addEdit(edit, editContext); 33707 editor.notifyListeners(); 33708 ++changeCount; 33709 }, 33710 doEdit: (className, props) => { 33711 if (editor.selection.isEmpty() && className === "hideball") { 33712 className = "ShowHidden"; 33713 } 33714 const command = fieldApp.getLegacyCommand(className); 33715 if (command) { 33716 const edit2 = new CommandEdit(command, editor); 33717 editContext.performAndRecord(edit2); 33718 return; 33719 } 33720 const [action, mode] = className.split("/"); 33721 if (mode) 33722 props.put("mode", mode); 33723 const edit = editFactory(editor, toolFactories, toolsModel)(new JavaDomElement({ tagName: action })); 33724 if (!edit) 33725 return; 33726 edit.configure(props); 33727 editContext.performAndRecord(edit); 33728 } 33729 };
33730 const configureAndPerformEdit = (className, config, adapter) => { 33731 const props = new JsProperties(config); 33732 editContext.doEdit(className, props); 33733 }; 33734 const toolsModel = new ToolsModel(editContext, originPoint); 33735 const symmetrySystems = {}; 33736 const symmPerspectives = fieldApp.getSymmetryPerspectives().iterator(); 33737 while (symmPerspectives.hasNext()) { 33738 const perspective = symmPerspectives.next(); 33739 const osm = new SymmetrySystem(null, perspective, editContext, colors2, true); 33740 symmetrySystems[osm.getName()] = osm; 33741 } 33742 symmetrySystems[symmPer.getName()] = new SymmetrySystem(systemXml, symmPer, editContext, colors2, true); 33743 if (xml) { 33744 const symms = xml.getChildElement("OtherSymmetries"); 33745 if (symms) { 33746 const nodes = symms.getElementsByTagName("SymmetrySystem"); 33747 for (let i = 0; i < nodes.getLength(); i++) { 33748 const symmElem = nodes.item(i); 33749 const symmName2 = symmElem.getAttribute("name"); 33750 const symmPerspective = fieldApp.getSymmetryPerspective(symmName2); 33751 const otherSymmetrySystem = new SymmetrySystem(symmElem, symmPerspective, void 0, colors2, true); 33752 symmetrySystems[symmName2] = otherSymmetrySystem; 33753 } 33754 } 33755 } 33756 class OSField { 33757 constructor() { 33758 } 33759 getGroup(name) { 33760 return symmetrySystems[name].getOrbits(); 33761 } 33762 getQuaternionSet(name) { 33763 return fieldApp.getQuaternionSymmetry(name); 33764 } 33765 } 33766 OSField.__interfaces = ["com.vzome.core.math.symmetry.OrbitSet.Field"]; 33767 const orbitSetField = new OSField(); 33768 const projection = new Projection.Default(legacyField); 33769 const realizedModel = new RealizedModelImpl(legacyField, projection); 33770 let orbitSource = symmetrySystems[symmPer.getName()]; 33771 const renderedModel = new RenderedModel(legacyField, orbitSource); 33772 realizedModel.addListener(renderedModel); 33773 const originBall = realizedModel.manifest(originPoint); 33774 originBall.addConstruction(originPoint); 33775 realizedModel.add(originBall); 33776 realizedModel.show(originBall); 33777 const getBall = (location) => realizedModel.getManifestation(new FreePoint(location)); 33778 const selection = new SelectionImpl(); 33779 const editor = new JsEditorModel(realizedModel, selection, fieldApp, orbitSource, symmetrySystems); 33780 for (const symmetrySystem of Object.values(symmetrySystems)) { 33781 symmetrySystem.setEditorModel(editor); 33782 } 33783 toolsModel.setEditorModel(editor); 33784 history.setListener({ publishChanges: () => { 33785 editor.notifyListeners(); 33786 } }); 33787 selection.addListener({ 33788 manifestationAdded: (m) => renderedModel.setManifestationGlow(m, true), 33789 manifestationRemoved: (m) => renderedModel.setManifestationGlow(m, false) 33790 }); 33791 const setSymmetrySystem = (symmName2) => { 33792 orbitSource = symmetrySystems[symmName2]; 33793 if (!orbitSource.orientations) { 33794 orbitSource.orientations = makeFloatMatrices(orbitSource.getSymmetry().getMatrices()); 33795 orbitSource.permutations = orbitSource.getSymmetry().getPermutations().map((p) => p.getJsonValue()); 33796 collectBuildPlanes(orbitSource); 33797 } 33798 editor.symmetries = orbitSource; 33799 renderedModel.setOrbitSource(orbitSource); 33800 }; 33801 setSymmetrySystem(symmPer.getName()); 33802 const getSymmetrySystem = (name) => { 33803 return editor.getSymmetrySystem(name ? name : void 0); 33804 }; 33805 const format = namespace && XmlSymmetryFormat.getFormat(namespace); 33806 format && format.initialize(legacyField, orbitSetField, 0, "vZome Online", new Properties()); 33807 const toolFactories = new util.HashMap(); 33808 for (const symmetrySystem of Object.values(symmetrySystems)) { 33809 symmetrySystem.createToolFactories(toolsModel); 33810 for (let toolkind of [0, 1, 2]) { 33811 for (let index = symmetrySystem.getToolFactories(toolkind).iterator(); index.hasNext(); ) { 33812 let factory = index.next(); 33813 editor.addSelectionSummaryListener(factory); 33814 } 33815 } 33816 } 33817 fieldApp.registerToolFactories(toolFactories, toolsModel); 33818 const bookmarkFactory = new BookmarkToolFactory(toolsModel); 33819 editor.addSelectionSummaryListener(bookmarkFactory); 33820 bookmarkFactory.createPredefinedTool("ball at origin"); 33821 const toolsXml = xml && xml.getChildElement("Tools"); 33822 toolsXml && toolsModel.loadFromXml(toolsXml); 33823 const interpretEdit = (xmlElement, context) => { 33824 const wrappedElement = new JavaDomElement(xmlElement); 33825 const edit = editFactory(editor, toolFactories, toolsModel)(wrappedElement); 33826 if (!edit) 33827 return null; 33828 if (xmlElement.tagName === "GroupSelection" && !!edit.label) { 33829 console.log(`Performed GroupSelection with label ${edit.label}`); 33830 const selection2 = edit.mSelection; 33831 for (let index = selection2.mManifestations.iterator(); index.hasNext(); ) { 33832 let m = index.next(); 33833 m.mRendered.label = edit.label; 33834 } 33835 } 33836 try { 33837 edit.loadAndPerform(wrappedElement, format, context); 33838 } catch (error) { 33839 if (error.message.endsWith("command is not available yet")) 33840 throw new Error(`${xmlElement.tagName} command is not available`); 33841 else 33842 throw new Error(`${xmlElement.tagName} failure: ${error.message}`); 33843 } 33844 checkSideEffects(edit, wrappedElement); 33845 return edit; 33846 }; 33847 const checkSideEffects = (edit, element) => { 33848 const expectedEffects = element.nativeElement.children.filter((kid) => kid.tagName === "effects")[0]; 33849 if (expectedEffects) { 33850 const actualEffects = edit.getDetailXml(element.getOwnerDocument()).getChildElement("effects").nativeElement; 33851 const expectedText = JSON.stringify(expectedEffects, null, 2); 33852 const actualText = JSON.stringify(actualEffects, null, 2); 33853 if (actualText !== expectedText) { 33854 const { id, index, tagName } = element.nativeElement; 33855 const editNumber = element.getAttribute("editNumber"); 33856 const nExpected = expectedEffects.children.length; 33857 const nActual = actualEffects.children.length; 33858 console.groupCollapsed(`${tagName} effects do not match recorded history!`); 33859 console.log({ editNumber, id, index, nExpected, nActual, tagName }); 33860 console.log("EXPECTED: ", expectedText); 33861 console.log("ACTUAL : ", actualText); 33862 console.groupEnd(); 33863 if (nExpected != nActual) { 33864 throw new Error(`Side effects from edit number ${editNumber} (${tagName}) do not match recorded history!`); 33865 } 33866 } 33867 } 33868 }; 33869 const serializeLegacyEdit = (txmlElement) => { 33870 const editType = txmlElement.nodeName; 33871 const result = { editType }; 33872 if (editType === "Branch") { 33873 result.edits = []; 33874 return result; 33875 }
33876 txmlElement.getAttributeNames().forEach((name) => { 33877 if (name !== "id") result[name] = txmlElement.getAttribute(name); 33878 }); 33879 if (txmlElement.textContent) { 33880 const text = txmlElement.textContent.trim(); 33881 if (!!text) 33882 result.textContent = text; 33883 } 33884 if (txmlElement.firstElementChild) { 33885 console.log(`Nested XML: ${txmlElement.nodeName} ${txmlElement.firstElementChild.outerHTML}`); 33886 } 33887 return result; 33888 }; 33889 const batchRender = (renderingListener) => { 33890 const RM = RenderedModel; 33891 RM.renderChange(new RM(null, null), renderedModel, renderingListener); 33892 }; 33893 const serializeToDom = (doc, root) => { 33894 root.setAttribute("field", field5.name); 33895 let childElement; 33896 { 33897 childElement = history.getXml(doc); 33898 let edits = 0, lastStickyEdit = -1; 33899 const undoables = history.iterator(); 33900 while (undoables.hasNext()) { 33901 const undoable = undoables.next(); 33902 childElement.appendChild(undoable.getXml(doc)); 33903 ++edits; 33904 if (undoable.isSticky()) 33905 lastStickyEdit = edits; 33906 } 33907 childElement.setAttribute("lastStickyEdit", "" + lastStickyEdit); 33908 } 33909 root.appendChild(childElement); 33910 childElement = orbitSource.getXml(doc); 33911 root.appendChild(childElement); 33912 childElement = doc.createElement("OtherSymmetries"); 33913 for (const symmetrySystem of Object.values(symmetrySystems)) { 33914 if (symmetrySystem === orbitSource) 33915 continue; 33916 const symmElement = symmetrySystem.getXml(doc); 33917 childElement.appendChild(symmElement); 33918 } 33919 root.appendChild(childElement); 33920 childElement = toolsModel.getXml(doc); 33921 root.appendChild(childElement); 33922 }; 33923 const getOrbitSource = () => orbitSource; 33924 return { 33925 interpretEdit, 33926 configureAndPerformEdit, 33927 batchRender, 33928 serializeToDom, 33929 setSymmetrySystem, 33930 getSymmetrySystem, 33931 getChangeCount, 33932 getOrbitSource, 33933 getBall, 33934 snapshotNodes: ["--END--"], 33935 scenes: [], 33936 editor, 33937 field: field5, 33938 legacyField, 33939 fieldApp, 33940 renderedModel, 33941 symmetrySystems, 33942 toolsModel, 33943 bookmarkFactory, 33944 history, 33945 editContext 33946 }; 33947}; 33948var ZOMETOOL_COLOR_NAMES = [ 33949 "blue", 33950 "yellow", 33951 "red", 33952 "green", 33953 "turquoise", 33954 "white", 33955 "black", 33956 "orange", 33957 "purple", 33958 "gray" 33959]; 33960var capitalize = (s) => s.charAt(0).toUpperCase() + s.slice(1); 33961var getZometoolColors = () => ZOMETOOL_COLOR_NAMES.map((name) => { 33962 const rgb = defaults[`color.${name}`].split(",").map((n) => Number(n.trim()).toString(16).padStart(2, "0")).join(""); 33963 return `${capitalize(name)} #${rgb}`; 33964}); 33965var initialize = async () => { 33966 await Promise.all([groupResourcesReady, shapesReady, shapeColorsReady]); 33967 const parse2 = createParser(documentFactory); 33968 return { 33969 getFieldNames, 33970 getField, 33971 getFieldLabel, 33972 getSymmetry, 33973 getZometoolColors, 33974 documentFactory, 33975 parse: parse2, 33976 enhanceTopologicalMesh: enhanceTopologicalMesh(getField) 33977 }; 33978}; 33979var convertColor = (color) => { 33980 if (!color) 33981 return "#ffffff"; 33982 const componentToHex = (c) => { 33983 let hex = c.toString(16); 33984 return hex.length == 1 ? "0" + hex : hex; 33985 }; 33986 return "#" + componentToHex(color.getRed()) + componentToHex(color.getGreen()) + componentToHex(color.getBlue()); 33987}; 33988var collectBuildPlanes = (orbitSource) => { 33989 const field5 = orbitSource.getSymmetry().getField(); 33990 orbitSource.buildPlanes = {}; 33991 const orbitIterator = orbitSource.getOrbits().getDirections().iterator(); 33992 while (orbitIterator.hasNext()) { 33993 const planeOrbit = orbitIterator.next(); 33994 if (!planeOrbit.isStandard()) 33995 continue; 33996 const planeName = planeOrbit.getName(); 33997 const color = convertColor(orbitSource.getColor(planeOrbit)); 33998 const planeZone = planeOrbit.getAxis(0, 0); 33999 const orientation = planeZone.orientation; 34000 const normal = planeZone.normal(); 34001 const zones = []; 34002 const planeOrbits = new PlaneOrbitSet(orbitSource.getOrbits(), normal); 34003 const iterator = planeOrbits.zones(); 34004 while (iterator.hasNext()) { 34005 const zone = iterator.next(); 34006 const orientation2 = zone.getOrientation(); 34007 const orbit = zone.getDirection(); 34008 if (!orbit.isStandard()) 34009 continue; 34010 const vectors = []; 34011 const zoneNormal = zone.normal(); 34012 const zoneColor = convertColor(orbitSource.getVectorColor(zoneNormal)); 34013 let scale = orbit.getUnitLength(); 34014 for (let i = 0; i < 5; i++) { 34015 scale = scale.times(field5.createPower(1)); 34016 const gridPoint = zoneNormal.scale(scale); 34017 vectors.push({ point: gridPoint, scale }); 34018 } 34019 zones.push({ name: orbit.getName(), zone, orientation: orientation2, color: zoneColor, vectors }); 34020 } 34021 orbitSource.buildPlanes[planeName] = { color, normal, zones, orientation }; 34022 } 34023}; 34024
34025// src/worker/legacy/scenes.js 34026var realizeShape = (shape, polygons) => { 34027 const vertices = shape.getVertexList().toArray().map((av) => { 34028 const { x, y, z } = av.toRealVector(); 34029 return { x, y, z }; 34030 }); 34031 const faces = polygons ? shape.getFaceSet().toArray().map((value) => ({ vertices: [...value.array] })) : shape.getTriangleFaces().toArray().map(({ vertices: vertices2 }) => ({ vertices: vertices2 })); 34032 const id = "s" + shape.getGuid().toString(); 34033 const name = shape.getName(); 34034 if (name === "ball") { 34035 return { id, name, vertices, faces }; 34036 } else if (!!name) { 34037 const orbit = shape.getOrbit().getCanonicalName(); 34038 const length = JSON.stringify(shape.getLength().toTrailingDivisor()); 34039 return { id, orbit, length, vertices, faces }; 34040 } 34041 return { id, vertices, faces }; 34042}; 34043var toWebColor = (color) => { 34044 const componentToHex = (c) => { 34045 let hex = c.toString(16); 34046 return hex.length == 1 ? "0" + hex : hex; 34047 }; 34048 let result = "#ffffff"; 34049 if (color) 34050 result = "#" + componentToHex(color.getRed()) + componentToHex(color.getGreen()) + componentToHex(color.getBlue()); 34051 return result; 34052}; 34053var normalizeRenderedManifestation = (rm) => { 34054 const id = rm.getGuid().toString(); 34055 const label = rm.label; 34056 const type = rm.getShape().name; 34057 const shapeId = "s" + rm.getShapeId().toString(); 34058 const positionAV = rm.getLocationAV(); 34059 const { x, y, z } = positionAV && positionAV.toRealVector() || { x: 0, y: 0, z: 0 }; 34060 const orientation = rm.getStrutZone(); 34061 const selected = rm.getGlow() > 1e-3; 34062 const componentToHex = (c) => { 34063 let hex = c.toString(16); 34064 return hex.length == 1 ? "0" + hex : hex; 34065 }; 34066 let color = toWebColor(rm.getColor()); 34067 return { id, position: [x, y, z], orientation, color, selected, shapeId, type, label }; 34068}; 34069var renderedModelTransducer = (shapeCache, clientEvents) => { 34070 const manifestationAdded = (rm) => { 34071 const shapeId = "s" + rm.getShapeId().toString(); 34072 let shape = shapeCache[shapeId]; 34073 if (!shape) { 34074 shape = realizeShape(rm.getShape()); 34075 shapeCache[shapeId] = shape; 34076 clientEvents.shapeDefined(shape); 34077 } 34078 let instance = normalizeRenderedManifestation(rm); 34079 clientEvents.instanceAdded(instance); 34080 }; 34081 const manifestationRemoved = (rm) => { 34082 const shapeId = "s" + rm.getShapeId().toString(); 34083 const id = rm.getGuid().toString(); 34084 clientEvents.instanceRemoved(shapeId, id); 34085 }; 34086 const glowChanged = (rm) => { 34087 const shapeId = "s" + rm.getShapeId().toString(); 34088 const id = rm.getGuid().toString(); 34089 const selected = rm.getGlow() > 1e-3; 34090 clientEvents.selectionToggled(shapeId, id, selected); 34091 }; 34092 return { manifestationAdded, manifestationRemoved, glowChanged }; 34093}; 34094var resolveBuildPlanes = (buildPlanes) => { 34095 const resolveAV = (av) => { 34096 const { x, y, z } = av.toRealVector(); 34097 return [x, y, z]; 34098 }; 34099 const planes = {}; 34100 for (const [name, plane] of Object.entries(buildPlanes)) { 34101 const zones = []; 34102 for (const zone of plane.zones) { 34103 const vectors = zone.vectors.map(({ point }) => resolveAV(point)); 34104 zones.push({ name: zone.name, color: zone.color, vectors, orientation: zone.orientation }); 34105 } 34106 const { x, y, z } = plane.normal.toRealVector().normalize(); 34107 planes[name] = { color: plane.color, normal: [x, y, z], zones, orientation: plane.orientation }; 34108 } 34109 return planes; 34110}; 34111
34112// src/worker/legacy/interpreter.js 34113var Step = { IN: 0, OVER: 1, OUT: 2, DONE: 3 }; 34114var RenderHistory = class { 34115 constructor(design, polygons) { 34116 const { firstEdit } = design; 34117 this.shapes = {}; 34118 this.snapshotsAfter = {}; 34119 this.shapshotsBefore = {}; 34120 this.design = design; 34121 this.currentSnapshot = []; 34122 this.polygons = polygons; 34123 this.recordSnapshot("--START--", firstEdit ? firstEdit.id() : "--END--"); 34124 } 34125 // partial implementation of legacy RenderListener 34126 // TODO replace this with scenes.js renderedModelTransducer? Only if we want incremental events. 34127 manifestationAdded(rm) { 34128 const shapeId = "s" + rm.getShapeId().toString(); 34129 let shape = this.shapes[shapeId]; 34130 if (!shape) { 34131 shape = realizeShape(rm.getShape(), this.polygons); 34132 this.shapes[shapeId] = shape; 34133 } 34134 let instance = normalizeRenderedManifestation(rm); 34135 this.currentSnapshot.push(instance); 34136 } 34137 recordSnapshot(afterId, beforeId) { 34138 this.currentSnapshot = []; 34139 this.snapshotsAfter[afterId] = this.currentSnapshot; 34140 this.shapshotsBefore[beforeId] = this.currentSnapshot; 34141 this.design.batchRender(this); 34142 } 34143 getSnapshot(editId, before = false) { 34144 let snapshot = before ? this.shapshotsBefore[editId] : this.snapshotsAfter[editId]; 34145 if (!snapshot) { 34146 editId = before ? "--END--" : this.lastEdit; 34147 snapshot = before ? this.shapshotsBefore[editId] : this.snapshotsAfter[editId]; 34148 } 34149 return snapshot; 34150 } 34151 getShapes() { 34152 return this.shapes; 34153 } 34154}; 34155var Interpreter = class { 34156 constructor(design, effects) { 34157 this.design = design; 34158 this.effects = effects; 34159 this.cursor = new EditCursor(design.history, design.firstEdit); 34160 this.stack = []; 34161 this.editContext = { 34162 performAndRecord: (edit) => { 34163 edit.perform(); 34164 if (edit.isNoOp()) 34165 console.log("WARNING: No-op edit:", edit.constructor.name); 34166 this.cursor.history.addEdit(edit); 34167 }, 34168 createLegacyCommand: (name) => this.design.editContext.createLegacyCommand(name) 34169 }; 34170 this.lastEdit = "--START--"; 34171 this.breakpoint = null; 34172 this.error = null; 34173 this.internalEditNumbers = /* @__PURE__ */ new Map(); 34174 } 34175 /** 34176 * Translates a file-level edit number to the internal history edit number that replaying 34177 * it produced. Returns undefined when the file number was never reached, in which case 34178 * the caller should leave the history where interpretation left it. 34179 */ 34180 getInternalEditNumber(fileEditNumber) { 34181 return this.internalEditNumbers.get(`:${fileEditNumber}:`); 34182 } 34183 /** Notes where the history stands after finishing one top-level edit. */ 34184 recordInternalEditNumber(editId) { 34185 if (/^:\d+:$/.test(editId)) 34186 this.internalEditNumbers.set(editId, this.design.history.mEditNumber); 34187 } 34188 getLastEdit() { 34189 return this.lastEdit; 34190 } 34191 step() { 34192 let edit = this.cursor.getNextEdit(); 34193 if (!edit) 34194 return Step.DONE; 34195 if (edit.isBranch()) { 34196 this.stack.push({ branch: edit, cursor: this.cursor }); 34197 this.cursor = this.cursor.startBranch(edit, this.editContext); 34198 this.effects.recordSnapshot(edit.id(), edit.firstChild().id()); 34199 this.lastEdit = edit.id(); 34200 if (edit.nextSibling()) { 34201 this.effects.recordSnapshot(edit.id(), edit.nextSibling().id()); 34202 this.lastEdit = edit.id(); 34203 } 34204 return Step.IN; 34205 } else { 34206 edit.perform(this.editContext); 34207 const breakpointHit = edit.id() === this.breakpoint; 34208 if (edit.nextSibling()) { 34209 this.effects.recordSnapshot(edit.id(), edit.nextSibling().id()); 34210 this.lastEdit = edit.id(); 34211 this.recordInternalEditNumber(edit.id()); 34212 this.cursor.setNextEdit(edit.nextSibling()); 34213 return breakpointHit ? Step.DONE : Step.OVER; 34214 } else { 34215 this.effects.recordSnapshot(edit.id(), "--END--"); 34216 this.lastEdit = edit.id(); 34217 this.recordInternalEditNumber(edit.id()); 34218 let top; 34219 do { 34220 top = this.stack.pop(); 34221 if (!!top) { 34222 this.cursor.endBranch(top.branch); 34223 this.cursor = top.cursor; 34224 this.recordInternalEditNumber(top.branch.id()); 34225 this.cursor.setNextEdit(top.branch.nextSibling()); 34226 } 34227 } while (top && !top.branch.nextSibling()); 34228 if (top) { 34229 return breakpointHit ? Step.DONE : Step.OUT; 34230 } else { 34231 return Step.DONE; 34232 } 34233 } 34234 } 34235 } 34236 conTinue() { 34237 let stepped; 34238 do { 34239 stepped = this.stepOut(); 34240 } while (stepped !== Step.DONE); 34241 } 34242 stepOver() { 34243 let stepped = this.step(); 34244 switch (stepped) { 34245 case Step.IN: 34246 stepped = this.stepOut(); 34247 return stepped; 34248 default: 34249 return stepped; 34250 } 34251 } 34252 stepOut() { 34253 let stepped; 34254 do { 34255 stepped = this.stepOver(); 34256 } while (stepped !== Step.OUT && stepped !== Step.DONE); 34257 return stepped; 34258 } 34259 interpret(action, breakpoint = null) { 34260 this.breakpoint = breakpoint; 34261 switch (action) { 34262 case Step.IN: 34263 this.step(); 34264 break; 34265 case Step.OVER: 34266 this.stepOver(); 34267 break; 34268 case Step.OUT: 34269 this.stepOut(); 34270 break; 34271 case Step.DONE: 34272 default: 34273 this.conTinue(); 34274 break; 34275 } 34276 } 34277}; 34278var EditCursor = class _EditCursor { 34279 constructor(history, firstEdit) { 34280 this.history = history; 34281 this.nextEdit = firstEdit; 34282 } 34283 toString() { 34284 return this.nextEdit?.name() || "nameless"; 34285 } 34286 getNextEdit() { 34287 return this.nextEdit; 34288 } 34289 setNextEdit(edit) { 34290 this.nextEdit = edit; 34291 } 34292 startBranch(parsedEdit, editContext) { 34293 const branch = new Branch(editContext);
34294 this.history.addEdit(branch, editContext); 34295 parsedEdit.legacyEdit = branch; 34296 return new _EditCursor(branch, parsedEdit.firstChild()); 34297 } 34298 endBranch(parsedEdit) { 34299 const reversed = parsedEdit.children.toReversed(); 34300 for (const edit of reversed) { 34301 const trueEdit = edit.legacyEdit; 34302 if (trueEdit) { 34303 trueEdit.undo(); 34304 } else 34305 console.log("No true edit?"); 34306 } 34307 } 34308}; 34309
34310// src/worker/legacy/controllers/wrapper.js 34311var ControllerWrapper = class _ControllerWrapper { 34312 constructor(path, name, controller, clientEvents) { 34313 this.__path = path; 34314 this.__name = name; 34315 this.controller = controller; 34316 this.__clientEvents = clientEvents; 34317 this.__changeTables = {}; 34318 this.children = {}; 34319 this.macro = []; 34320 } 34321 createChildWrapper(name, controller) { 34322 const controllerPath = this.__path ? this.__path + ":" + name : name; 34323 const child = new _ControllerWrapper(controllerPath, name, controller, this.__clientEvents); 34324 this.children[name] = child; 34325 const thisController = this.controller; 34326 return child; 34327 } 34328 getSubControllerByNames(names) { 34329 if (!names || names.length === 0) { 34330 return this; 34331 } else { 34332 const name = names[0]; 34333 let child = this.children[name]; 34334 if (!child) { 34335 const controller = this.controller.getSubController(name); 34336 if (!controller) { 34337 console.log(`No subcontroller for path ${this.__path} ${name}`); 34338 return void 0; 34339 } 34340 child = this.createChildWrapper(name, controller); 34341 }
34342 return child.getSubControllerByNames(names.slice(1)); 34343 } 34344 } 34345 getControllerByPath(controllerPath) { 34346 const controllerNames = controllerPath ? controllerPath.split(":") : []; 34347 return this.getSubControllerByNames(controllerNames); 34348 } 34349 fetchAndFirePropertyChange(propName, isList) { 34350 const value = isList ? this.controller.getCommandList(propName) : this.controller.getProperty(propName); 34351 this.__clientEvents.propertyChanged(this.__path, propName, value); 34352 } 34353 // This is only ever called on the root controller 34354 registerPropertyInterest(controllerPath, propName, changeName, isList) { 34355 const wrapper = this.getControllerByPath(controllerPath); 34356 if (!wrapper) 34357 return; 34358 wrapper.registerPropertyInterest2(propName, changeName, isList); 34359 wrapper.fetchAndFirePropertyChange(propName, isList); 34360 } 34361 registerPropertyInterest2(propName, changeName, isList) { 34362 if (Object.entries(this.__changeTables).length === 0) { 34363 this.controller.addPropertyListener(this); 34364 } 34365 if (!this.__changeTables[changeName]) { 34366 this.__changeTables[changeName] = { [propName]: isList }; 34367 } else { 34368 const change = this.__changeTables[changeName]; 34369 if (change[propName] === void 0) { 34370 this.__changeTables[changeName] = { ...change, [propName]: isList }; 34371 } 34372 } 34373 } 34374 setProperty(controllerPath, name, value) { 34375 const wrapper = this.getControllerByPath(controllerPath); 34376 wrapper.controller.setProperty(name, value); 34377 } 34378 doAction(controllerPath, action, parameters = {}) { 34379 const wrapper = this.getControllerByPath(controllerPath); 34380 if (parameters && Object.keys(parameters).length !== 0) 34381 wrapper.controller.paramActionPerformed(null, action, new JsProperties(parameters)); 34382 else 34383 wrapper.controller.actionPerformed(null, action); 34384 this.renderScene(); 34385 } 34386 controllerChange(parent) { 34387 this.controller = parent.getSubController(this.__name); 34388 for (const changes of Object.values(this.__changeTables)) { 34389 for (const [propName, isList] of Object.entries(changes)) { 34390 this.fetchAndFirePropertyChange(propName, isList); 34391 } 34392 } 34393 this.children = {}; 34394 } 34395 propertyChange(pce) { 34396 const name = pce.getPropertyName(); 34397 for (const [cName, changes] of Object.entries(this.__changeTables)) { 34398 if (name === cName) { 34399 for (const [propName, isList] of Object.entries(changes)) { 34400 this.fetchAndFirePropertyChange(propName, isList); 34401 } 34402 } 34403 } 34404 } 34405}; 34406
34407// src/worker/legacy/from-java/com/vzome/desktop/api/Controller.ts 34408var Controller; 34409((Controller2) => { 34410 Controller2.USER_ERROR_CODE = "user.command.error"; 34411 Controller2.UNKNOWN_ERROR_CODE = "unknown.exception"; 34412 Controller2.UNKNOWN_ACTION = "unknown.action"; 34413 Controller2.UNKNOWN_PROPERTY = "unknown.property"; 34414})(Controller || (Controller = {})); 34415
34416// src/worker/legacy/from-java/com/vzome/desktop/controller/DefaultController.ts 34417var DefaultController = class _DefaultController { 34418 static logger_$LI$() { 34419 if (_DefaultController.logger == null) { 34420 _DefaultController.logger = java.util.logging.Logger.getLogger("org.vorthmann.zome.controller"); 34421 } 34422 return _DefaultController.logger; 34423 } 34424 properggties() { 34425 return this.pcs; 34426 } 34427 /** 34428 * 34429 * @param {*} source 34430 * @param {string} action 34431 */ 34432 actionPerformed(source, action) { 34433 try { 34434 if (_DefaultController.logger_$LI$().isLoggable(java.util.logging.Level.FINE)) _DefaultController.logger_$LI$().fine("ACTION: " + this.getPath() + "||" + action); 34435 this.doAction(action); 34436 } catch (ex) { 34437 console.error(ex.message, ex); 34438 this.mErrors.reportError(Controller.UNKNOWN_ERROR_CODE, [ex, action]); 34439 } 34440 } 34441 /** 34442 * This is only overridden or called in Javascript code, in vZome Online. 34443 * @param {*} source 34444 * @param {string} action 34445 * @param {Properties} params 34446 */ 34447 paramActionPerformed(source, action, params) { 34448 try { 34449 if (_DefaultController.logger_$LI$().isLoggable(java.util.logging.Level.FINE)) _DefaultController.logger_$LI$().fine("PARAM ACTION: " + this.getPath() + "||" + action); 34450 this.doParamAction(action, params); 34451 } catch (ex) { 34452 console.error(ex.message, ex); 34453 this.mErrors.reportError(Controller.UNKNOWN_ERROR_CODE, [ex]); 34454 } 34455 } 34456 /*private*/ 34457 getPath() { 34458 if (this.mNextController == null) return this.name; 34459 else return this.mNextController.getPath() + "::" + this.name; 34460 } 34461 /** 34462 * 34463 * @param {*} listener 34464 */ 34465 addPropertyListener(listener) { 34466 this.pcs.addPropertyChangeListener$java_beans_PropertyChangeListener(listener); 34467 } 34468 /** 34469 * 34470 * @param {*} listener 34471 */ 34472 removePropertyListener(listener) { 34473 this.pcs.removePropertyChangeListener$java_beans_PropertyChangeListener(listener); 34474 } 34475 doAction(action) { 34476 if (this.mNextController != null) this.mNextController.doAction(action); 34477 else this.mErrors.reportError(Controller.UNKNOWN_ACTION, [action]); 34478 } 34479 /** 34480 * This is only overridden or called in Javascript code, in vZome Online. 34481 * @param source 34482 * @param {string} action 34483 * @param {Properties} params 34484 */ 34485 doParamAction(action, params) { 34486 if (this.mNextController != null) this.mNextController.doParamAction(action, params); 34487 else this.mErrors.reportError(Controller.UNKNOWN_ACTION, [action]); 34488 } 34489 /** 34490 * 34491 * @param {string} command 34492 * @param {File} file 34493 */ 34494 doFileAction(command, file) { 34495 if (this.mNextController != null) this.mNextController.doFileAction(command, file); 34496 else this.mErrors.reportError(Controller.UNKNOWN_ACTION, [command]); 34497 } 34498 /** 34499 * 34500 * @param {string} command 34501 * @param {string} script 34502 */ 34503 doScriptAction(command, script) { 34504 if (this.mNextController != null) this.mNextController.doScriptAction(command, script); 34505 else this.mErrors.reportError(Controller.UNKNOWN_ACTION, [command]); 34506 } 34507 /** 34508 * 34509 * @param {string} listName 34510 * @return {java.lang.String[]} 34511 */ 34512 getCommandList(listName) { 34513 if (this.mNextController != null) return this.mNextController.getCommandList(listName); 34514 else return []; 34515 } 34516 /** 34517 * 34518 * @param {string} string 34519 * @return {boolean[]} 34520 */ 34521 getCommandListDefaultStates(string) { 34522 return null; 34523 } 34524 /** 34525 * 34526 * @param {string} string 34527 * @return {string} 34528 */ 34529 getProperty(string) { 34530 if (this.mNextController != null) return this.mNextController.getProperty(string); 34531 return null; 34532 } 34533 /** 34534 * 34535 * @param {string} propName 34536 * @return {boolean} 34537 */ 34538 propertyIsTrue(propName) { 34539 return "true" === this.getProperty(propName); 34540 } 34541 /** 34542 * 34543 * @param {string} name 34544 * @param {*} sub 34545 */ 34546 addSubController(name, sub) { 34547 sub.name = name; 34548 this.subcontrollers.put(name, sub); 34549 sub.setNextController(this, name); 34550 } 34551 /** 34552 * 34553 * @param {string} name 34554 * @return {*} 34555 */ 34556 getSubController(name) { 34557 const subc = this.subcontrollers.get(name); 34558 if (subc != null) return subc; 34559 if (this.mNextController != null) return this.mNextController.getSubController(name); 34560 return null; 34561 } 34562 /** 34563 * 34564 * @param {*} errors 34565 */ 34566 setErrorChannel(errors) { 34567 this.mErrors = errors; 34568 } 34569 /** 34570 * 34571 * @param {string} name 34572 * @param {*} value 34573 */ 34574 setProperty(name, value) { 34575 if (_DefaultController.logger_$LI$().isLoggable(java.util.logging.Level.FINE)) _DefaultController.logger_$LI$().fine("SETPROP: " + this.getPath() + "||" + name + "=" + value); 34576 this.setModelProperty(name, value); 34577 } 34578 setModelProperty(name, value) { 34579 if (this.mNextController != null) this.mNextController.setProperty(name, value); 34580 } 34581 /*private*/ 34582 setNextController(controller, name) { 34583 this.name = name; 34584 this.mNextController = controller; 34585 this.mNextController.addPropertyListener(new _DefaultController.DefaultController$0(this)); 34586 if (this.mNextController != null && this.mNextController instanceof _DefaultController) this.mErrors = this.mNextController.mErrors; 34587 } 34588 firePropertyChange$java_beans_PropertyChangeEvent(event) { 34589 if (_DefaultController.logger_$LI$().isLoggable(java.util.logging.Level.FINE)) _DefaultController.logger_$LI$().fine("CHGEVENT: " + this.getPath() + "||" + event.getPropertyName() + "=" + event.getNewValue()); 34590 this.pcs.firePropertyChange$java_beans_PropertyChangeEvent(event); 34591 } 34592 firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object(propName, oldValue, newValue) { 34593 if (_DefaultController.logger_$LI$().isLoggable(java.util.logging.Level.FINE)) _DefaultController.logger_$LI$().fine("CHGEVENT: " + this.getPath() + "||" + propName + "=" + newValue); 34594 this.pcs.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object(propName, oldValue, newValue); 34595 } 34596 firePropertyChange(propName, oldValue, newValue) { 34597 if ((typeof propName === "string" || propName === null) && (oldValue != null || oldValue === null) && (newValue != null || newValue === null)) { 34598 return this.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object(propName, oldValue, newValue); 34599 } else if ((propName != null && propName instanceof PropertyChangeEvent || propName === null) && oldValue === void 0 && newValue === void 0) { 34600 return this.firePropertyChange$java_beans_PropertyChangeEvent(propName); 34601 } else throw new Error("invalid overload"); 34602 } 34603 /** 34604 * 34605 * @param {string} propName 34606 * @return {boolean} 34607 */ 34608 userHasEntitlement(propName) { 34609 if (this.mNextController != null) return this.mNextController.userHasEntitlement(propName); 34610 return false;
34611 } 34612 openApplication(file) { 34613 if (this.mNextController != null) this.mNextController.openApplication(file); 34614 } 34615 runScript(script, file) { 34616 if (this.mNextController != null) this.mNextController.runScript(script, file); 34617 } 34618 constructor() { 34619 this.pcs = new PropertyChangeSupport(this); 34620 if (this.mErrors === void 0) { 34621 this.mErrors = null; 34622 } 34623 if (this.mNextController === void 0) { 34624 this.mNextController = null; 34625 } 34626 this.subcontrollers = new java.util.HashMap(); 34627 this.name = ""; 34628 } 34629}; 34630DefaultController["__class"] = "com.vzome.desktop.controller.DefaultController"; 34631DefaultController["__interfaces"] = ["com.vzome.desktop.api.Controller"]; 34632((DefaultController2) => { 34633 class DefaultController$0 { 34634 /** 34635 * 34636 * @param {PropertyChangeEvent} event 34637 */ 34638 propertyChange(event) { 34639 this.__parent.pcs.firePropertyChange$java_beans_PropertyChangeEvent(event); 34640 } 34641 constructor(__parent) { 34642 this.__parent = __parent; 34643 } 34644 } 34645 DefaultController2.DefaultController$0 = DefaultController$0; 34646 DefaultController$0["__interfaces"] = ["java.util.EventListener", "java.beans.PropertyChangeListener"]; 34647})(DefaultController || (DefaultController = {})); 34648
34649// src/worker/legacy/from-java/com/vzome/desktop/controller/MeasureController.ts 34650var MeasureController = class extends DefaultController { 34651 constructor(model, renderedModel) { 34652 super(); 34653 if (this.selection === void 0) { 34654 this.selection = null; 34655 } 34656 if (this.editorModel === void 0) { 34657 this.editorModel = null; 34658 } 34659 this.measurements = new java.util.LinkedHashMap(); 34660 if (this.renderedModel === void 0) { 34661 this.renderedModel = null; 34662 } 34663 this.twoPlaces = NumberFormat.getInstance(); 34664 this.fourPlaces = NumberFormat.getInstance(); 34665 this.renderedModel = renderedModel; 34666 this.selection = model.getSelection(); 34667 this.editorModel = model; 34668 model.addSelectionSummaryListener(this); 34669 this.twoPlaces.setMaximumFractionDigits(2); 34670 this.fourPlaces.setMaximumFractionDigits(4); 34671 } 34672 /** 34673 * 34674 * @param {string} listName 34675 * @return {java.lang.String[]} 34676 */ 34677 getCommandList(listName) { 34678 return this.measurements.keySet().toArray(((s) => { 34679 let a = []; 34680 while (s-- > 0) a.push(null); 34681 return a; 34682 })(this.measurements.keySet().size())); 34683 } 34684 /** 34685 * 34686 * @param {string} key 34687 * @return {string} 34688 */ 34689 getProperty(key) { 34690 return this.measurements.get(key); 34691 } 34692 /** 34693 * 34694 * @param {number} total 34695 * @param {number} balls 34696 * @param {number} struts 34697 * @param {number} panels 34698 */ 34699 selectionChanged(total, balls, struts, panels) { 34700 this.measurements.clear(); 34701 if (total !== 0) { 34702 if (balls !== 0) { 34703 this.measurements.put( 34704 "balls", 34705 /* toString */ 34706 "" + balls 34707 ); 34708 } 34709 if (struts !== 0) { 34710 this.measurements.put( 34711 "struts", 34712 /* toString */ 34713 "" + struts 34714 ); 34715 } 34716 if (panels !== 0) { 34717 this.measurements.put( 34718 "panels", 34719 /* toString */ 34720 "" + panels 34721 ); 34722 } 34723 if (total === 1 || total === 2) { 34724 this.measurements.put("", ""); 34725 } 34726 if (total === 1) { 34727 if (panels === 1) { 34728 const panel = Manifestations.getPanels$java_lang_Iterable(this.selection).next(); 34729 this.measurements.put( 34730 "vertices", 34731 /* toString */ 34732 "" + panel.getVertexCount() 34733 ); 34734 } else if (struts === 1) { 34735 const strut = Manifestations.getStruts$java_lang_Iterable(this.selection).next(); 34736 const cm = this.renderedModel.measureLengthCm$com_vzome_core_model_Strut(strut); 34737 this.measurements.put("length (cm)", this.twoPlaces.format(cm) + " cm"); 34738 const inches = cm / 2.54; 34739 this.measurements.put("length (in)", this.twoPlaces.format(inches) + " in"); 34740 const offset = strut.getOffset(); 34741 this.measurements.put("quadrance", offset.dot(offset).toString(AlgebraicField.DEFAULT_FORMAT)); 34742 } else if (balls === 1) { 34743 const conn = Manifestations.getConnectors$java_lang_Iterable(this.selection).next(); 34744 this.measurements.put("location", conn.getLocation().toString()); 34745 } 34746 } else if (total === 2) { 34747 if (panels === 2) { 34748 let p1 = null; 34749 let p2 = null; 34750 for (let index = Manifestations.getPanels$java_lang_Iterable(this.selection).iterator(); index.hasNext(); ) { 34751 let panel = index.next(); 34752 { 34753 if (p1 == null) p1 = panel; 34754 else p2 = panel; 34755 } 34756 } 34757 const radians = this.renderedModel.measureDihedralAngle(p1, p2); 34758 this.reportAngles(radians); 34759 } else if (struts === 2) { 34760 let s1 = null; 34761 let s2 = null; 34762 for (let index = Manifestations.getStruts$java_lang_Iterable(this.selection).iterator(); index.hasNext(); ) { 34763 let strut = index.next(); 34764 { 34765 if (s1 == null) s1 = strut; 34766 else s2 = strut; 34767 } 34768 } 34769 const points = new java.util.HashSet(); 34770 points.add(s1.getLocation()); 34771 points.add(s1.getEnd()); 34772 points.add(s2.getLocation()); 34773 points.add(s2.getEnd()); 34774 if (points.size() > 3) { 34775 this.measurements.put("coplanar", AlgebraicVectors.areCoplanar(points) ? "yes" : "no"); 34776 } 34777 const radians = this.renderedModel.measureAngle(s1, s2); 34778 this.reportAngles(radians); 34779 this.reportSpread(s1, s2); 34780 this.reportRatio(s1, s2); 34781 } else if (balls === 2) { 34782 let b1 = null; 34783 let b2 = null; 34784 for (let index = Manifestations.getConnectors$java_lang_Iterable(this.selection).iterator(); index.hasNext(); ) { 34785 let conn = index.next(); 34786 { 34787 if (b1 == null) b1 = conn; 34788 else b2 = conn; 34789 } 34790 } 34791 const cm = this.renderedModel.measureDistanceCm(b1, b2); 34792 this.measurements.put("distance (cm)", this.twoPlaces.format(cm) + " cm"); 34793 const inches = cm / 2.54; 34794 this.measurements.put("distance (in)", this.twoPlaces.format(inches) + " in"); 34795 } 34796 } 34797 } 34798 this.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("measures", false, true); 34799 } 34800 /*private*/ 34801 reportAngles(radians) { 34802 if ( 34803 /* isFinite */ 34804 ((value) => !isNaN(value) && Number.NEGATIVE_INFINITY !== value && Number.POSITIVE_INFINITY !== value)(radians) 34805 ) { 34806 const fraction = radians / Math.PI; 34807 const supplement = 1 - fraction; 34808 this.measurements.put("radians", this.fourPlaces.format(fraction) + "\u03C0"); 34809 this.measurements.put("radians (supplement)", this.fourPlaces.format(supplement) + "\u03C0"); 34810 this.measurements.put("degrees", this.twoPlaces.format(fraction * 180) + "\xB0"); 34811 this.measurements.put("degrees (supplement)", this.twoPlaces.format(supplement * 180) + "\xB0"); 34812 } else { 34813 this.measurements.put( 34814 "angle", 34815 /* toString */ 34816 "" + radians 34817 ); 34818 } 34819 } 34820 /** 34821 * Use Rational Trigonometry (the cross law) to compute the spread between struts 34822 * @param {*} s1 34823 * @param {*} s2 34824 * @private 34825 */ 34826 /*private*/ 34827 reportSpread(s1, s2) { 34828 const v1 = s1.getOffset(); 34829 const v2 = s2.getOffset(); 34830 const v3 = v2.minus(v1); 34831 const Q1 = v2.dot(v2); 34832 const Q2 = v1.dot(v1); 34833 const Q3 = v3.dot(v3); 34834 const one = Q1.getField().one(); 34835 const four = Q1.getField()["createRational$long"](4); 34836 const a = Q1["plus$com_vzome_core_algebra_AlgebraicNumber"](Q2)["minus$com_vzome_core_algebra_AlgebraicNumber"](Q3); 34837 const denom = four["times$com_vzome_core_algebra_AlgebraicNumber"](Q1)["times$com_vzome_core_algebra_AlgebraicNumber"](Q2); 34838 const ratio = a["times$com_vzome_core_algebra_AlgebraicNumber"](a).dividedBy(denom); 34839 const spread3 = one["minus$com_vzome_core_algebra_AlgebraicNumber"](ratio
34839); 34840 this.measurements.put("spread", spread3.toString(AlgebraicField.DEFAULT_FORMAT)); 34841 } 34842 /*private*/ 34843 reportRatio(s1, s2) { 34844 const v1 = s1.getOffset(); 34845 const v2 = s2.getOffset(); 34846 const ss = this.editorModel["getSymmetrySystem$"](); 34847 const axis1 = ss.getAxis(v1); 34848 const axis2 = ss.getAxis(v2); 34849 const dir1 = axis1.getDirection(); 34850 const dir2 = axis2.getDirection(); 34851 const sameOrbit = dir1.equals(dir2); 34852 let name1 = dir1.getName(); 34853 let name2 = dir2.getName(); 34854 const auto = "auto"; 34855 if (dir1.isAutomatic()) { 34856 name1 = auto + name1; 34857 } 34858 if (dir2.isAutomatic()) { 34859 name2 = auto + name2; 34860 } 34861 if (sameOrbit) { 34862 name1 += "\u2081"; 34863 name2 += "\u2082"; 34864 } 34865 const n1n2 = name1 + " / " + name2; 34866 const n2n1 = name2 + " / " + name1; 34867 this.measurements.put(" ", " "); 34868 const len1 = ss.getSymmetry().embedInR3(v1).length(); 34869 const len2 = ss.getSymmetry().embedInR3(v2).length(); 34870 const length1 = ( 34871 /* floatValue */ 34872 len1 34873 ); 34874 const length2 = ( 34875 /* floatValue */ 34876 len2 34877 ); 34878 const ratio = Math.fround(length1 / length2); 34879 let comparison = "equal"; 34880 if (Math.abs(Math.fround(length1 - length2)) > 1e-6) { 34881 comparison = name1 + " " + (length1 > length2 ? ">" : "<") + " " + name2; 34882 } 34883 this.measurements.put("relative strut lengths", comparison); 34884 if (!(comparison === "equal")) { 34885 const recip = Math.fround(1 / ratio); 34886 this.measurements.put(n1n2 + " (approx)", this.fourPlaces.format(ratio)); 34887 this.measurements.put(n2n1 + " (approx)", this.fourPlaces.format(recip)); 34888 if (sameOrbit) { 34889 const exactLength1 = axis1.getLength(v1); 34890 const exactength2 = axis2.getLength(v2); 34891 const exactRatio = exactLength1.dividedBy(exactength2); 34892 const exactRecip = exactRatio.reciprocal(); 34893 this.measurements.put(n1n2, exactRatio.toString(AlgebraicField.DEFAULT_FORMAT)); 34894 this.measurements.put(n2n1, exactRecip.toString(AlgebraicField.DEFAULT_FORMAT)); 34895 } 34896 } 34897 } 34898}; 34899MeasureController["__class"] = "com.vzome.desktop.controller.MeasureController"; 34900MeasureController["__interfaces"] = ["com.vzome.core.editor.SelectionSummary.Listener", "com.vzome.desktop.api.Controller"]; 34901
34902// src/worker/legacy/from-java/com/vzome/desktop/controller/PolytopesController.ts 34903var PolytopesController = class _PolytopesController extends DefaultController { 34904 constructor(model, context) { 34905 super(); 34906 if (this.model === void 0) { 34907 this.model = null; 34908 } 34909 if (this.context === void 0) { 34910 this.context = null; 34911 } 34912 this.group = "H4"; 34913 if (this.groups === void 0) { 34914 this.groups = null; 34915 } 34916 this.generateEdge = [false, false, false, true]; 34917 this.renderEdge = [true, true, true, true]; 34918 this.edgeScales = [null, null, null, null]; 34919 if (this.field === void 0) { 34920 this.field = null; 34921 } 34922 if (this.defaultScaleFactor === void 0) { 34923 this.defaultScaleFactor = null; 34924 } 34925 this.model = model; 34926 this.context = context; 34927 this.field = model.getRealizedModel().getField(); 34928 this.defaultScaleFactor = this.field["createPower$int"](Direction.USER_SCALE + 2); 34929 for (let i = 0; i < this.edgeScales.length; i++) { 34930 { 34931 this.edgeScales[i] = this.field.one(); 34932 } 34933 ; 34934 } 34935 if (null == this.field.getGoldenRatio()) { 34936 this.groups = ["A4", "B4/C4", "D4", "F4"]; 34937 this.group = "F4"; 34938 } else { 34939 this.groups = ["A4", "B4/C4", "D4", "F4", "H4"]; 34940 this.group = "H4"; 34941 } 34942 } 34943 /** 34944 * 34945 * @param {string} action 34946 */ 34947 doAction(action) { 34948 switch (action) { 34949 case "setQuaternion": 34950 const strut = this.model.getSelectedConstruction(Segment); 34951 if (strut != null) { 34952 let vector = strut.getOffset(); 34953 const symm = this.model["getSymmetrySystem$"](); 34954 const zone = symm.getAxis(vector); 34955 let len = zone.getLength(vector); 34956 len = zone.getOrbit().getLengthInUnits(len); 34957 vector = zone.normal().scale(len); 34958 const vc = super.getSubController("quaternion"); 34959 vc.setVector(vector.inflateTo4d$()); 34960 } else { 34961 } 34962 return; 34963 default: 34964 break; 34965 } 34966 if ("generate" === action) { 34967 const index = _PolytopesController.encodeBits(this.generateEdge); 34968 const edgesToRender = _PolytopesController.encodeBits(this.renderEdge); 34969 const vc = super.getSubController("quaternion"); 34970 const quaternion = vc.getVector().scale(this.defaultScaleFactor); 34971 const params = new java.util.HashMap(); 34972 params.put("groupName", this.group); 34973 params.put("renderGroupName", this.group); 34974 params.put("index", index); 34975 params.put("edgesToRender", edgesToRender); 34976 params.put("edgeScales", this.edgeScales); 34977 params.put("quaternion", quaternion); 34978 this.context.doEdit("Polytope4d", params); 34979 } else if ( 34980 /* startsWith */ 34981 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(action, "setGroup.") 34982 ) { 34983 const oldGroup = this.group; 34984 this.group = action.substring("setGroup.".length); 34985 this.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("group", oldGroup, this.group); 34986 } else if ( 34987 /* startsWith */ 34988 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(action, "edge.") 34989 ) { 34990 const edgeName = action.substring("edge.".length); 34991 const edge = javaemul.internal.IntegerHelper.parseInt(edgeName); 34992 const state = this.generateEdge[edge]; 34993 this.generateEdge[edge] = !state; 34994 this.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("edge." + edge, state, this.generateEdge[edge]); 34995 } else if ( 34996 /* startsWith */ 34997 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(action, "render.") 34998 ) { 34999 const edgeName = action.substring("render.".length); 35000 const edge = javaemul.internal.IntegerHelper.parseInt(edgeName); 35001 const state = this.renderEdge[edge]; 35002 this.renderEdge[edge] = !state; 35003 } else super.doAction(action); 35004 } 35005 /*private*/ 35006 static encodeBits(bits) { 35007 let result = 0; 35008 for (let i = 0; i < 4; i++) { 35009 { 35010 if (bits[i]) result += 1 << i; 35011 } 35012 ; 35013 } 35014 return result; 35015 } 35016 /** 35017 * 35018 * @param {string} command 35019 * @param {File} file 35020 */ 35021 doFileAction(command, file) { 35022 try { 35023 const out = new java.io.FileWriter(file);
35024 try { 35025 const index = _PolytopesController.encodeBits(this.generateEdge); 35026 const edgesToRender = _PolytopesController.encodeBits(this.renderEdge); 35027 const vc = super.getSubController("quaternion"); 35028 let quaternion = vc.getVector().scale(this.defaultScaleFactor); 35029 quaternion = quaternion.scale(this.field["createPower$int"](-5)); 35030 const rightQuat = new Quaternion(this.field, quaternion); 35031 const exporter = new VefVectorExporter(out, this.field); 35032 this.model.get4dSymmetries().constructPolytope(this.group, index, edgesToRender, this.edgeScales, new _PolytopesController.PolytopesController$0(this, rightQuat, exporter)); 35033 exporter.finishExport(); 35034 } finally { 35035 out.close(); 35036 } 35037 } catch (e) { 35038 this.mErrors.reportError(Controller.UNKNOWN_ERROR_CODE, [e]); 35039 } 35040 } 35041 /** 35042 * 35043 * @param {string} listName 35044 * @return {java.lang.String[]} 35045 */ 35046 getCommandList(listName) { 35047 return this.groups; 35048 } 35049 /** 35050 * 35051 * @param {string} propName 35052 * @return {string} 35053 */ 35054 getProperty(propName) { 35055 if ("group" === propName) { 35056 return this.group; 35057 } else if ( 35058 /* startsWith */ 35059 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(propName, "edge.") 35060 ) { 35061 const edgeName = propName.substring("edge.".length); 35062 const edge = javaemul.internal.IntegerHelper.parseInt(edgeName); 35063 return javaemul.internal.BooleanHelper.toString(this.generateEdge[edge]); 35064 } else if ( 35065 /* startsWith */ 35066 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(propName, "render.") 35067 ) { 35068 const edgeName = propName.substring("render.".length); 35069 const edge = javaemul.internal.IntegerHelper.parseInt(edgeName); 35070 return javaemul.internal.BooleanHelper.toString(this.renderEdge[edge]); 35071 } else return super.getProperty(propName); 35072 } 35073 /** 35074 * 35075 * @param {string} name 35076 * @return {*} 35077 */ 35078 getSubController(name) { 35079 switch (name) { 35080 default: 35081 return super.getSubController(name); 35082 } 35083 } 35084}; 35085PolytopesController["__class"] = "com.vzome.desktop.controller.PolytopesController"; 35086PolytopesController["__interfaces"] = ["com.vzome.desktop.api.Controller"]; 35087((PolytopesController2) => { 35088 class PolytopesController$0 { 35089 constructor(__parent, rightQuat, exporter) { 35090 this.rightQuat = rightQuat; 35091 this.exporter = exporter; 35092 this.__parent = __parent; 35093 } 35094 /** 35095 * 35096 * @param {AlgebraicVector} v 35097 * @return {*} 35098 */ 35099 addVertex(v) { 35100 const projected = this.rightQuat.leftMultiply(v); 35101 this.exporter.exportPoint(projected); 35102 return projected; 35103 } 35104 /** 35105 * 35106 * @param {*} p1 35107 * @param {*} p2 35108 * @return {*} 35109 */ 35110 addEdge(p1, p2) { 35111 this.exporter.exportSegment(p1, p2); 35112 return null; 35113 } 35114 /** 35115 * 35116 * @param {java.lang.Object[]} vertices 35117 * @return {*} 35118 */ 35119 addFace(vertices) { 35120 return null; 35121 } 35122 } 35123 PolytopesController2.PolytopesController$0 = PolytopesController$0; 35124 PolytopesController$0["__interfaces"] = ["com.vzome.core.math.symmetry.WythoffConstruction.Listener"]; 35125})(PolytopesController || (PolytopesController = {})); 35126
35127// src/worker/legacy/from-java/com/vzome/core/render/TransparentRendering.ts 35128var TransparentRendering = class { 35129 constructor(realOne) { 35130 if (this.mRealOne === void 0) { 35131 this.mRealOne = null; 35132 } 35133 this.mRealOne = realOne; 35134 } 35135 /** 35136 * 35137 */ 35138 reset() { 35139 this.mRealOne.reset(); 35140 } 35141 /** 35142 * 35143 * @param {RenderedManifestation} manifestation 35144 */ 35145 manifestationAdded(manifestation) { 35146 manifestation.setTransparency(0.5); 35147 manifestation.setPickable(false); 35148 this.mRealOne.manifestationAdded(manifestation); 35149 } 35150 /** 35151 * 35152 * @param {RenderedManifestation} manifestation 35153 */ 35154 manifestationRemoved(manifestation) { 35155 this.mRealOne.manifestationRemoved(manifestation); 35156 } 35157 /** 35158 * 35159 * @param {RenderedManifestation} manifestation 35160 */ 35161 glowChanged(manifestation) { 35162 this.mRealOne.glowChanged(manifestation); 35163 } 35164 /** 35165 * 35166 * @param {RenderedManifestation} manifestation 35167 */ 35168 labelChanged(manifestation) { 35169 this.mRealOne.labelChanged(manifestation); 35170 } 35171 /** 35172 * 35173 * @param {RenderedManifestation} manifestation 35174 */ 35175 colorChanged(manifestation) { 35176 this.mRealOne.colorChanged(manifestation); 35177 } 35178 /** 35179 * 35180 * @param {RenderedManifestation} manifestation 35181 */ 35182 locationChanged(manifestation) { 35183 this.mRealOne.locationChanged(manifestation); 35184 } 35185 /** 35186 * 35187 * @param {RenderedManifestation} manifestation 35188 */ 35189 orientationChanged(manifestation) { 35190 this.mRealOne.orientationChanged(manifestation); 35191 } 35192 /** 35193 * 35194 * @param {RenderedManifestation} manifestation 35195 */ 35196 shapeChanged(manifestation) { 35197 this.mRealOne.shapeChanged(manifestation); 35198 } 35199 /** 35200 * 35201 * @param {RenderedManifestation} from 35202 * @param {RenderedManifestation} to 35203 */ 35204 manifestationSwitched(from, to) { 35205 throw new java.lang.IllegalStateException(); 35206 } 35207 /** 35208 * 35209 * @param {*} shapes 35210 * @return {boolean} 35211 */ 35212 shapesChanged(shapes28) { 35213 return this.mRealOne.shapesChanged(shapes28); 35214 } 35215}; 35216TransparentRendering["__class"] = "com.vzome.core.render.TransparentRendering"; 35217TransparentRendering["__interfaces"] = ["com.vzome.core.render.RenderingChanges"]; 35218
35219// src/worker/legacy/from-java/com/vzome/desktop/controller/ZoneVectorBall.ts 35220var ZoneVectorBall = class _ZoneVectorBall { 35221 static logger_$LI$() { 35222 if (_ZoneVectorBall.logger == null) { 35223 _ZoneVectorBall.logger = java.util.logging.Logger.getLogger("com.vzome.desktop.controller.ZoneVectorBall"); 35224 } 35225 return _ZoneVectorBall.logger; 35226 } 35227 initializeZone(orbits, worldEye) { 35228 this.orbits = orbits; 35229 this.zoneVector3d = new RealVector(worldEye.x, worldEye.y, worldEye.z); 35230 this.mapVectorToAxis(false); 35231 return this.zone; 35232 } 35233 trackballRolled(rotation) { 35234 const x = rotation[0].dot(this.zoneVector3d); 35235 const y = rotation[1].dot(this.zoneVector3d); 35236 const z = rotation[2].dot(this.zoneVector3d); 35237 this.zoneVector3d = new RealVector(x, y, z); 35238 this.mapVectorToAxis(true); 35239 } 35240 /** 35241 * This is used when we're doing some non-trackball drag 35242 * to define a new vector, as for the working plane. 35243 * @param {RealVector} vector 35244 */ 35245 setVector(vector) { 35246 this.zoneVector3d = vector; 35247 this.mapVectorToAxis(true); 35248 } 35249 /*private*/ 35250 mapVectorToAxis(notify) { 35251 const vector = new RealVector(this.zoneVector3d.x, this.zoneVector3d.y, this.zoneVector3d.z); 35252 const oldAxis = this.zone; 35253 this.zone = this.orbits.getAxis(vector); 35254 if (this.zone == null && oldAxis == null) { 35255 if (_ZoneVectorBall.logger_$LI$().isLoggable(java.util.logging.Level.FINER)) _ZoneVectorBall.logger_$LI$().finer("mapVectorToAxis null zone for " + vector); 35256 return; 35257 } 35258 if (this.zone != null && this.zone.equals(oldAxis)) { 35259 if (_ZoneVectorBall.logger_$LI$().isLoggable(java.util.logging.Level.FINER)) _ZoneVectorBall.logger_$LI$().finer("mapVectorToAxis zone " + this.zone + " unchanged for " + vector); 35260 return; 35261 } 35262 if (_ZoneVectorBall.logger_$LI$().isLoggable(java.util.logging.Level.FINER)) _ZoneVectorBall.logger_$LI$().finer("preview finished at " + this.zone + " for " + vector); 35263 if (notify) this.zoneChanged(oldAxis, this.zone); 35264 } 35265 constructor() { 35266 if (this.orbits === void 0) { 35267 this.orbits = null; 35268 } 35269 if (this.zoneVector3d === void 0) { 35270 this.zoneVector3d = null; 35271 } 35272 this.zone = null; 35273 } 35274}; 35275ZoneVectorBall["__class"] = "com.vzome.desktop.controller.ZoneVectorBall"; 35276
35277// src/worker/legacy/from-java/com/vzome/desktop/controller/PreviewStrut.ts 35278var PreviewStrut = class _PreviewStrut { 35279 static logger_$LI$() { 35280 if (_PreviewStrut.logger == null) { 35281 _PreviewStrut.logger = java.util.logging.Logger.getLogger("org.vorthmann.zome.app.impl.PreviewStrut"); 35282 } 35283 return _PreviewStrut.logger; 35284 } 35285 constructor(field5, mainScene, context) { 35286 if (this.model === void 0) { 35287 this.model = null; 35288 } 35289 if (this.editorModel === void 0) { 35290 this.editorModel = null; 35291 } 35292 if (this.rendering === void 0) { 35293 this.rendering = null; 35294 } 35295 if (this.zoneBall === void 0) { 35296 this.zoneBall = null; 35297 } 35298 if (this.context === void 0) { 35299 this.context = null; 35300 } 35301 if (this.point === void 0) { 35302 this.point = null; 35303 } 35304 if (this.zone === void 0) { 35305 this.zone = null; 35306 } 35307 if (this.symmetryController === void 0) { 35308 this.symmetryController = null; 35309 } 35310 if (this.length === void 0) { 35311 this.length = null; 35312 } 35313 if (this.strut === void 0) { 35314 this.strut = null; 35315 } 35316 this.workingPlaneDual = null; 35317 this.context = context; 35318 this.rendering = new RenderedModel(field5, null); 35319 const transp = new TransparentRendering(mainScene); 35320 this.rendering.addListener(transp); 35321 this.model = new RealizedModelImpl(field5, new Projection.Default(field5)); 35322 this.model.addListener(this.rendering); 35323 this.editorModel = new _PreviewStrut.PreviewStrut$0(this); 35324 this.zoneBall = new _PreviewStrut.PreviewStrut$1(this); 35325 } 35326 /** 35327 * 35328 * @param {*} obj 35329 * @return {boolean} 35330 */ 35331 equals(obj) { 35332 if (this === obj) return true; 35333 if (obj == null) return false; 35334 if (this.constructor !== obj.constructor) return false; 35335 return false; 35336 } 35337 /** 35338 * 35339 * @return {number} 35340 */ 35341 hashCode() { 35342 return ( 35343 /* hashCode */ 35344 ((o) => { 35345 if (o.hashCode) { 35346 return o.hashCode(); 35347 } else { 35348 return o.toString().split("").reduce((prevHash, currVal) => (prevHash << 5) - prevHash + currVal.charCodeAt(0) | 0, 0); 35349 } 35350 })(this) 35351 ); 35352 } 35353 /*private*/ 35354 setZone(zone) { 35355 this.zone = zone; 35356 } 35357 startRendering(point, workingPlaneAxis, worldEye) { 35358 this.point = point; 35359 let orbits = this.symmetryController.getBuildOrbits(); 35360 if (workingPlaneAxis != null) { 35361 orbits = new PlaneOrbitSet(orbits, workingPlaneAxis); 35362 const normal = workingPlaneAxis.toRealVector(); 35363 let other = new RealVector(1, 0, 0); 35364 let v1 = normal.cross(other); 35365 const len = v1.length(); 35366 if (len < 1e-4) { 35367 other = new RealVector(0, 1, 0); 35368 v1 = normal.cross(other); 35369 } 35370 const v2 = normal.cross(v1); 35371 const p = this.point.getLocation().toRealVector(); 35372 const q = p.plus(v1); 35373 const r = p.plus(v2); 35374 const e12 = Math.fround(Math.fround(p.x * q.y) - Math.fround(q.x * p.y)); 35375 const e23 = Math.fround(Math.fround(p.y * q.z) - Math.fround(q.y * p.z)); 35376 const e31 = Math.fround(Math.fround(p.z * q.x) - Math.fround(q.z * p.x)); 35377 const e10 = Math.fround(p.x - q.x); 35378 const e20 = Math.fround(p.y - q.y); 35379 const e30 = Math.fround(p.z - q.z); 35380 const P_e123 = e12 * r.z + e23 * r.x + e31 * r.y; 35381 const P_e310 = e10 * r.z + e31 * 1 - e30 * r.x; 35382 const P_e320 = e20 * r.z - e30 * r.y - e23 * 1; 35383 const P_e120 = e12 * 1 + e20 * r.x - e10 * r.y; 35384 this.workingPlaneDual = [0, 0, 0, 0]; 35385 this.workingPlaneDual[0] = -P_e123; 35386 this.workingPlaneDual[1] = -P_e320; 35387 this.workingPlaneDual[2] = P_e310; 35388 this.workingPlaneDual[3] = P_e120; 35389 } 35390 this.zone = this.zoneBall.initializeZone(orbits, worldEye); 35391 if (this.zone == null) { 35392 this.length = null; 35393 return; 35394 } 35395 this.length = this.symmetryController.orbitLengths.get(this.zone.getDirection()); 35396 this.adjustStrut(); 35397 this.length.addPropertyListener(this); 35398 } 35399 finishPreview() { 35400 if (this.length == null) return; 35401 this.length.removePropertyListener(this); 35402 this.strut.undo(); 35403 this.strut = null; 35404 if (_PreviewStrut.logger_$LI$().isLoggable(java.util.logging.Level.FINE)) _PreviewStrut.logger_$LI$().fine("preview finished at " + this.zone); 35405 const params = new java.util.HashMap(); 35406 params.put("anchor", this.point); 35407 params.put("zone", this.zone); 35408 params.put("length", this.length.getValue()); 35409 this.context.doEdit("StrutCreation", params); 35410 this.point = null; 35411 this.zone = null; 35412 this.length = null; 35413 this.workingPlaneDual = null; 35414 } 35415 /*private*/ 35416 adjustStrut() { 35417 if (this.strut != null) this.strut.undo(); 35418 if (this.length == null) return; 35419 if (_PreviewStrut.logger_$LI$().isLoggable(java.util.logging.Level.FINER)) _PreviewStrut.logger_$LI$().finer("preview now " + this.zone); 35420 this.strut = new StrutCreation(this.point, this.zone, this.length.getValue(), this.editorModel); 35421 this.strut.perform(); 35422 } 35423 /** 35424 * 35425 * @param {PropertyChangeEvent} evt 35426 */ 35427 propertyChange(evt) { 35428 if ("length" === evt.getPropertyName()) this.adjustStrut(); 35429 } 35430 setSymmetryController(symmetryController) { 35431 this.symmetryController = symmetryController; 35432 this.rendering.setOrbitSource(symmetryController.getOrbitSource()); 35433 } 35434 /*private*/ 35435 usingWorkingPlane() { 35436 return this.workingPlaneDual != null; 35437 } 35438 trackballRolled(rowMajor) { 35439 if (this.point != null && !this.usingWorkingPlane()) this.zoneBall.trackballRolled(rowMajor); 35440 } 35441 workingPlaneDrag(ray) { 35442 if (this.usingWorkingPlane()) { 35443 if (this.point == null && _PreviewStrut.logger_$LI$().isLoggable(java.util.logging.Level.SEVERE)) { 35444 _PreviewStrut.logger_$LI$().severe("No point during workingPlaneDrag!"); 35445 return; 35446 } 35447 const planeIntersection = this.intersectWorkingPlane(ray); 35448 const vectorInPlane = planeIntersection.minus(this.point.getLocation().toRealVector()); 35449 const almostPlanarVector = new RealVector(vectorInPlane.x, vectorInPlane.y, vectorInPlane.z); 35450 this.zoneBall.setVector(almostPlanarVector); 35451 } 35452 } 35453 /*private*/ 35454 intersectWorkingPlane(ray) { 35455 const s = ray.getOrigin(); 35456 const t = s.plus(ray.getDirection()); 35457 const e12 = Math.fround(Math.fround(s.x * t.y) - Math.fround(t.x * s.y)); 35458 const e23 = Math.fround(Math.fround(s.y * t.z) - Math.fround(t.y * s.z)); 35459 const e31 = Math.fround(Math.fround(s.z * t.x) - Math.fround(t.z * s.x)); 35460 const e10 = Math.fround(s.x - t.x); 35461 const e20 = Math.fround(s.y - t.y); 35462 const e30 = Math.fround(s.z - t.z); 35463 const x_e1 = -this.workingPlaneDual[2] * e12 - this.workingPlaneDual[0] * e10 + this.workingPlaneDual[3] * e31; 35464 const x_e2 = -this.workingPlaneDual[3] * e23 - this.workingPlaneDual[0] * e20 + this.workingPlaneDual[1] * e12; 35465 const x_e3 = -this.workingPlaneDual[1] * e31 - this.workingPlaneDual[0] * e30 + this.workingPlaneDual[2] * e23; 35466 const x_e0 = this.workingPlaneDual[1] * e10 + this.workingPlaneDual[2] * e20 + this.workingPlaneDual[3] * e30; 35467 return new RealVector(x_e1 / x_e0, x_e2 / x_e0, x_e3 / x_e0); 35468 } 35469 getLengthController() { 35470 return this.length; 35471 } 35472}; 35473PreviewStrut["__class"] = "com.vzome.desktop.controller.PreviewStrut"; 35474PreviewStrut["__interfaces"] = ["java.util.EventListener", "java.beans.PropertyChangeListener"]; 35475((PreviewStrut2) => { 35476 class PreviewStrut$0 { 35477 /** 35478 * 35479 * @return {*} 35480 */ 35481 getRealizedModel() { 35482 return this.__parent.model; 35483 } 35484 /** 35485 * 35486 * @return {*} 35487 */ 35488 getSelection() { 35489 return null; 35490 } 35491 getSymmetrySystem$() { 35492 return null; 35493 }
35494 getSymmetrySystem$java_lang_String(name) { 35495 return null; 35496 } 35497 /** 35498 * 35499 * @param {string} name 35500 * @return {*} 35501 */ 35502 getSymmetrySystem(name) { 35503 if (typeof name === "string" || name === null) { 35504 return this.getSymmetrySystem$java_lang_String(name); 35505 } else if (name === void 0) { 35506 return this.getSymmetrySystem$(); 35507 } else throw new Error("invalid overload"); 35508 } 35509 /** 35510 * 35511 * @return {*} 35512 */ 35513 get4dSymmetries() { 35514 return null; 35515 } 35516 /** 35517 * 35518 * @param {*} listener 35519 */ 35520 addSelectionSummaryListener(listener) { 35521 } 35522 constructor(__parent) { 35523 this.__parent = __parent; 35524 } 35525 } 35526 PreviewStrut2.PreviewStrut$0 = PreviewStrut$0; 35527 PreviewStrut$0["__interfaces"] = ["com.vzome.core.editor.api.EditorModel", "com.vzome.core.editor.api.SymmetryAware"]; 35528 class PreviewStrut$1 extends ZoneVectorBall { 35529 /** 35530 * 35531 * @param {Axis} oldZone 35532 * @param {Axis} newZone 35533 */ 35534 zoneChanged(oldZone, newZone) { 35535 if (this.__parent.length != null) this.__parent.length.removePropertyListener(this.__parent); 35536 this.__parent.setZone(newZone); 35537 if (newZone == null) return; 35538 this.__parent.length = this.__parent.symmetryController.orbitLengths.get(newZone.getDirection()); 35539 this.__parent.adjustStrut(); 35540 this.__parent.length.addPropertyListener(this.__parent); 35541 } 35542 constructor(__parent) { 35543 super(); 35544 this.__parent = __parent; 35545 } 35546 } 35547 PreviewStrut2.PreviewStrut$1 = PreviewStrut$1; 35548})(PreviewStrut || (PreviewStrut = {})); 35549
35550// src/worker/legacy/from-java/com/vzome/desktop/controller/StrutBuilderController.ts 35551var StrutBuilderController = class extends DefaultController { 35552 constructor(context, field5) { 35553 super(); 35554 this.useGraphicalViews = false; 35555 this.showStrutScales = false; 35556 this.useWorkingPlane = false; 35557 this.workingPlaneAxis = null; 35558 if (this.previewStrut === void 0) { 35559 this.previewStrut = null; 35560 } 35561 if (this.field === void 0) { 35562 this.field = null; 35563 } 35564 if (this.context === void 0) { 35565 this.context = null; 35566 } 35567 this.context = context; 35568 this.field = field5; 35569 } 35570 withGraphicalViews(value) { 35571 this.useGraphicalViews = value; 35572 return this; 35573 } 35574 withShowStrutScales(value) { 35575 this.showStrutScales = value; 35576 return this; 35577 } 35578 /** 35579 * 35580 * @param {string} propName 35581 * @return {string} 35582 */ 35583 getProperty(propName) { 35584 switch (propName) { 35585 case "useGraphicalViews": 35586 return javaemul.internal.BooleanHelper.toString(this.useGraphicalViews); 35587 case "useWorkingPlane": 35588 return javaemul.internal.BooleanHelper.toString(this.useWorkingPlane); 35589 case "workingPlaneDefined": 35590 return javaemul.internal.BooleanHelper.toString(this.workingPlaneAxis != null); 35591 case "showStrutScales": 35592 return javaemul.internal.BooleanHelper.toString(this.showStrutScales); 35593 default: 35594 return super.getProperty(propName); 35595 } 35596 } 35597 /** 35598 * 35599 * @param {string} name 35600 * @param {*} value 35601 */ 35602 setModelProperty(name, value) { 35603 switch (name) { 35604 case "useGraphicalViews": 35605 { 35606 const old = this.useGraphicalViews; 35607 this.useGraphicalViews = /* equals */ 35608 ((o1, o2) => o1 && o1.equals ? o1.equals(o2) : o1 === o2)("true", value); 35609 this.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object(name, old, this.useGraphicalViews); 35610 break; 35611 } 35612 ; 35613 case "showStrutScales": 35614 { 35615 const old = this.showStrutScales; 35616 this.showStrutScales = /* equals */ 35617 ((o1, o2) => o1 && o1.equals ? o1.equals(o2) : o1 === o2)("true", value); 35618 this.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object(name, old, this.showStrutScales); 35619 break; 35620 } 35621 ; 35622 default: 35623 super.setModelProperty(name, value); 35624 } 35625 } 35626 /** 35627 * 35628 * @param {string} action 35629 */ 35630 doAction(action) { 35631 switch (action) { 35632 case "toggleWorkingPlane": 35633 this.useWorkingPlane = !this.useWorkingPlane; 35634 break; 35635 case "toggleOrbitViews": 35636 { 35637 const old = this.useGraphicalViews; 35638 this.useGraphicalViews = !old; 35639 this.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("useGraphicalViews", old, this.useGraphicalViews); 35640 break; 35641 } 35642 ; 35643 case "toggleStrutScales": 35644 { 35645 const old = this.showStrutScales; 35646 this.showStrutScales = !old; 35647 this.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("showStrutScales", old, this.showStrutScales); 35648 break; 35649 } 35650 ; 35651 default: 35652 super.doAction(action); 35653 } 35654 } 35655 setWorkingPlaneAxis(axis) { 35656 this.workingPlaneAxis = axis; 35657 this.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("workingPlaneDefined", false, true); 35658 } 35659 setMainScene(mainScene) { 35660 this.previewStrut = new PreviewStrut(this.field, mainScene, this.context); 35661 } 35662 getPreviewStrut() { 35663 return this.previewStrut; 35664 } 35665 startRendering(point, worldEye) { 35666 const axis = this.useWorkingPlane ? this.workingPlaneAxis : null; 35667 this.previewStrut.startRendering(point, axis, worldEye); 35668 } 35669 setSymmetryController(symmetryController) { 35670 if (this.previewStrut != null) this.previewStrut.setSymmetryController(symmetryController); 35671 } 35672}; 35673StrutBuilderController["__class"] = "com.vzome.desktop.controller.StrutBuilderController"; 35674StrutBuilderController["__interfaces"] = ["com.vzome.desktop.api.Controller"]; 35675
35676// src/worker/legacy/from-java/com/vzome/desktop/controller/NumberController.ts 35677var NumberController = class _NumberController extends DefaultController { 35678 constructor(field5) { 35679 super(); 35680 if (this.value === void 0) { 35681 this.value = null; 35682 } 35683 if (this.field === void 0) { 35684 this.field = null; 35685 } 35686 this.field = field5; 35687 this.value = field5.one(); 35688 } 35689 /** 35690 * 35691 * @param {string} listName 35692 * @return {java.lang.String[]} 35693 */ 35694 getCommandList(listName) { 35695 switch (listName) { 35696 case "labels": 35697 const order = this.field.getOrder(); 35698 let result = ((s) => { 35699 let a = []; 35700 while (s-- > 0) a.push(null); 35701 return a; 35702 })(order + 1); 35703 result[0] = "1"; 35704 result[order] = "/"; 35705 for (let i = 1; i < order; i++) { 35706 result[i] = this.field["getIrrational$int"](i); 35707 } 35708 return result; 35709 case "values": 35710 const td = this.value.toTrailingDivisor(); 35711 result = ((s) => { 35712 let a = []; 35713 while (s-- > 0) a.push(null); 35714 return a; 35715 })(td.length); 35716 for (let i = 0; i < td.length; i++) { 35717 result[i] = td[i]; 35718 } 35719 return result; 35720 case "named-values": 35721 return this.getNamedValues(); 35722 case "math.operations": 35723 return _NumberController.MATH_OPS_$LI$(); 35724 default: 35725 return super.getCommandList(listName); 35726 } 35727 } 35728 static OPTIONAL_NAMED_VALUES_$LI$() { 35729 if (_NumberController.OPTIONAL_NAMED_VALUES == null) { 35730 _NumberController.OPTIONAL_NAMED_VALUES = ["phi", "rho", "sigma", "alpha", "beta", "gamma", "delta", "epsilon", "theta", "kappa", "lambda", "mu", "seperator", "\u221A2", "\u221A3", "\u221A5", "\u221A6", "\u221A7", "\u221A8", "\u221A10"]; 35731 } 35732 return _NumberController.OPTIONAL_NAMED_VALUES; 35733 } 35734 /*private*/ 35735 getNamedValues() { 35736 let seperateNext = false; 35737 const list = new java.util.ArrayList(); 35738 list.add("zero"); 35739 list.add("one"); 35740 for (let index = 0; index < _NumberController.OPTIONAL_NAMED_VALUES_$LI$().length; index++) { 35741 let test = _NumberController.OPTIONAL_NAMED_VALUES_$LI$()[index]; 35742 { 35743 if (test === "seperator") { 35744 seperateNext = true; 35745 } else { 35746 if (this.field.getNumberByName(test) != null) { 35747 if (seperateNext) { 35748 seperateNext = false; 35749 list.add("seperator"); 35750 } 35751 list.add(test); 35752 } 35753 } 35754 } 35755 } 35756 return list.toArray(((s) => { 35757 let a = []; 35758 while (s-- > 0) a.push(null); 35759 return a; 35760 })(list.size())); 35761 } 35762 /** 35763 * 35764 * @param {string} property 35765 * @param {*} value 35766 */ 35767 setModelProperty(property, value) { 35768 switch (property) { 35769 case "values": 35770 const tokens = value.split(" "); 35771 const divisor = tokens[tokens.length - 1]; 35772 let rejoined = ""; 35773 for (let i = 0; i < tokens.length - 1; i++) { 35774 { 35775 rejoined += tokens[i] + "/" + divisor + " "; 35776 } 35777 ; 35778 } 35779 this.value = this.field.parseNumber(rejoined); 35780 return; 35781 case "named-value": 35782 this.setValueByName( 35783 /* valueOf */ 35784 String(value).toString() 35785 ); 35786 return; 35787 case "math.operation": 35788 if (this.doMath( 35789 /* valueOf */ 35790 String(value).toString() 35791 )) { 35792 return; 35793 } 35794 } 35795 super.setModelProperty(property, value); 35796 } 35797 /*private*/ 35798 setValueByName(name) { 35799 const n = this.field.getNumberByName(name); 35800 if (n != null) { 35801 this.setValue(n); 35802 } 35803 } 35804 static MATH_OPS_$LI$() { 35805 if (_NumberController.MATH_OPS == null) { 35806 _NumberController.MATH_OPS = ["Negate", "Reciprocal", "Square"]; 35807 } 35808 return _NumberController.MATH_OPS; 35809 } 35810 /*private*/ 35811 doMath(operation) { 35812 switch (operation) { 35813 case "Negate": 35814 this.setValue(this.getValue().negate()); 35815 return true; 35816 case "Reciprocal": 35817 if (!this.getValue().isZero()) { 35818 this.setValue(this.getValue().reciprocal()); 35819 } 35820 return true; 35821 case "Square": 35822 this.setValue(this.getValue()["times$com_vzome_core_algebra_AlgebraicNumber"](this.getValue())); 35823 return true; 35824 } 35825 return false;
35826 } 35827 /** 35828 * 35829 * @param {string} property 35830 * @return {string} 35831 */ 35832 getProperty(property) { 35833 switch (property) { 35834 case "value": 35835 return this.value.toString(AlgebraicField.DEFAULT_FORMAT); 35836 case "evaluate": 35837 return ( 35838 /* valueOf */ 35839 String(this.value.evaluate()).toString() 35840 ); 35841 default: 35842 return super.getProperty(property); 35843 } 35844 } 35845 getValue() { 35846 return this.value; 35847 } 35848 setValue(value) { 35849 this.value = value; 35850 } 35851}; 35852NumberController["__class"] = "com.vzome.desktop.controller.NumberController"; 35853NumberController["__interfaces"] = ["com.vzome.desktop.api.Controller"]; 35854
35855// src/worker/legacy/from-java/com/vzome/desktop/controller/LengthController.ts 35856var LengthController = class _LengthController extends DefaultController { 35857 static SCALE_OFFSET_$LI$() { 35858 if (_LengthController.SCALE_OFFSET == null) { 35859 _LengthController.SCALE_OFFSET = Direction.USER_SCALE; 35860 } 35861 return _LengthController.SCALE_OFFSET; 35862 } 35863 constructor(fixedFactor, standardUnitFactor, field5) { 35864 if ((fixedFactor != null && (fixedFactor.constructor != null && fixedFactor.constructor["__interfaces"] != null && fixedFactor.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || fixedFactor === null) && (standardUnitFactor != null && (standardUnitFactor.constructor != null && standardUnitFactor.constructor["__interfaces"] != null && standardUnitFactor.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicNumber") >= 0) || standardUnitFactor === null) && (field5 != null && (field5.constructor != null && field5.constructor["__interfaces"] != null && field5.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicField") >= 0) || field5 === null)) { 35865 let __args = arguments; 35866 super(); 35867 if (this.currentScales === void 0) { 35868 this.currentScales = null; 35869 } 35870 if (this.unitController === void 0) { 35871 this.unitController = null; 35872 } 35873 if (this.fixedFactor === void 0) { 35874 this.fixedFactor = null; 35875 } 35876 if (this.unitFactor === void 0) { 35877 this.unitFactor = null; 35878 } 35879 if (this.multiplier === void 0) { 35880 this.multiplier = 0; 35881 } 35882 if (this.standardUnitFactor === void 0) { 35883 this.standardUnitFactor = null; 35884 } 35885 if (this.field === void 0) { 35886 this.field = null; 35887 } 35888 this.half = false; 35889 this.fixedFactor = fixedFactor; 35890 this.standardUnitFactor = standardUnitFactor; 35891 this.field = field5; 35892 this.multiplier = 0; 35893 this.unitFactor = standardUnitFactor; 35894 this.currentScales = ((s) => { 35895 let a = []; 35896 while (s-- > 0) a.push(null); 35897 return a; 35898 })(field5.getNumMultipliers()); 35899 for (let i = 0; i < this.currentScales.length; i++) { 35900 { 35901 this.currentScales[i] = new _LengthController.ScaleController(this); 35902 this.addSubController("scale." + i, this.currentScales[i]); 35903 } 35904 ; 35905 } 35906 this.unitController = new NumberController(field5); 35907 this.addSubController("unit", this.unitController); 35908 } else if ((fixedFactor != null && (fixedFactor.constructor != null && fixedFactor.constructor["__interfaces"] != null && fixedFactor.constructor["__interfaces"].indexOf("com.vzome.core.algebra.AlgebraicField") >= 0) || fixedFactor === null) && standardUnitFactor === void 0 && field5 === void 0) { 35909 let __args = arguments; 35910 let field6 = __args[0]; 35911 { 35912 let __args2 = arguments; 35913 let fixedFactor2 = __args2[2].one(); 35914 let standardUnitFactor2 = __args2[2].one(); 35915 super(); 35916 if (this.currentScales === void 0) { 35917 this.currentScales = null; 35918 } 35919 if (this.unitController === void 0) { 35920 this.unitController = null; 35921 } 35922 if (this.fixedFactor === void 0) { 35923 this.fixedFactor = null; 35924 } 35925 if (this.unitFactor === void 0) { 35926 this.unitFactor = null; 35927 } 35928 if (this.multiplier === void 0) { 35929 this.multiplier = 0; 35930 } 35931 if (this.standardUnitFactor === void 0) { 35932 this.standardUnitFactor = null; 35933 } 35934 if (this.field === void 0) { 35935 this.field = null; 35936 } 35937 this.half = false; 35938 this.fixedFactor = fixedFactor2; 35939 this.standardUnitFactor = standardUnitFactor2; 35940 this.field = field6; 35941 this.multiplier = 0; 35942 this.unitFactor = standardUnitFactor2; 35943 this.currentScales = ((s) => { 35944 let a = []; 35945 while (s-- > 0) a.push(null); 35946 return a; 35947 })(field6.getNumMultipliers()); 35948 for (let i = 0; i < this.currentScales.length; i++) { 35949 { 35950 this.currentScales[i] = new _LengthController.ScaleController(this); 35951 this.addSubController("scale." + i, this.currentScales[i]); 35952 } 35953 ; 35954 } 35955 this.unitController = new NumberController(field6); 35956 this.addSubController("unit", this.unitController); 35957 } 35958 } else throw new Error("invalid overload"); 35959 } 35960 /** 35961 * 35962 * @param {string} name 35963 * @return {*} 35964 */ 35965 getSubController(name) { 35966 switch (name) { 35967 case "unit": 35968 return this.unitController; 35969 case "scale": 35970 return this.currentScales[this.multiplier]; 35971 default: 35972 return super.getSubController(name); 35973 } 35974 } 35975 fireLengthChange() { 35976 this.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("length", true, false); 35977 } 35978 resetScales() { 35979 for (let i = 0; i < this.currentScales.length; i++) { 35980 { 35981 this.currentScales[i].setScale(0); 35982 } 35983 ; 35984 } 35985 } 35986 /** 35987 * 35988 * @param {string} action 35989 */ 35990 doAction(action) { 35991 switch (action) { 35992 case "setCustomUnit": 35993 this.unitController.setValue(this.unitFactor); 35994 return; 35995 case "getCustomUnit": 35996 this.unitFactor = this.unitController.getValue(); 35997 this.resetScales(); 35998 this.multiplier = 0; 35999 this.fireLengthChange(); 36000 return; 36001 case "toggleHalf": 36002 { 36003 this.half = !this.half; 36004 this.fireLengthChange(); 36005 return; 36006 } 36007 ; 36008 case "reset": 36009 case "short": 36010 { 36011 this.unitFactor = this.standardUnitFactor; 36012 this.resetScales(); 36013 this.multiplier = 0; 36014 this.fireLengthChange(); 36015 return; 36016 } 36017 ; 36018 case "supershort": 36019 { 36020 this.unitFactor = this.standardUnitFactor; 36021 this.resetScales(); 36022 this.currentScales[0].setScale(-1); 36023 this.multiplier = 0; 36024 this.fireLengthChange(); 36025 return; 36026 } 36027 ; 36028 case "medium": 36029 { 36030 this.unitFactor = this.standardUnitFactor; 36031 this.resetScales(); 36032 this.currentScales[0].setScale(1); 36033 this.multiplier = 0; 36034 this.fireLengthChange(); 36035 return; 36036 } 36037 ; 36038 case "long": 36039 { 36040 this.unitFactor = this.standardUnitFactor; 36041 this.resetScales(); 36042 this.currentScales[0].setScale(2); 36043 this.multiplier = 0; 36044 this.fireLengthChange(); 36045 return; 36046 } 36047 ; 36048 case "scaleUp": 36049 case "scaleDown": 36050 this.currentScales[this.multiplier].doAction(action); 36051 return; 36052 case "newZeroScale": 36053 { 36054 this.unitFactor = this.applyScales(this.unitFactor); 36055 this.resetScales(); 36056 this.multiplier = 0; 36057 this.fireLengthChange(); 36058 return; 36059 } 36060 ; 36061 default: 36062 if ( 36063 /* startsWith */ 36064 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(action, "setMultiplier.") 36065 ) { 36066 action = action.substring("setMultiplier.".length); 36067 const i = javaemul.internal.IntegerHelper.parseInt(action); 36068 this.multiplier = i; 36069 this.fireLengthChange(); 36070 } else super.doAction(action); 36071 } 36072 } 36073 /** 36074 * 36075 * @param {string} property 36076 * @param {*} value 36077 */ 36078 setModelProperty(property, value) { 36079 switch (property) { 36080 case "half": 36081 { 36082 const oldHalf = this.half; 36083 this.half = javaemul.internal.BooleanHelper.parseBoolean(value); 36084 if (this.half !== oldHalf) this.fireLengthChange(); 36085 break; 36086 } 36087 ; 36088 case "scale": 36089 { 36090 this.currentScales[this.multiplier].setModelProperty(property, value); 36091 return; 36092 } 36093 ; 36094 default: 36095 super.setModelProperty(property, value); 36096 } 36097 } 36098 /** 36099 * 36100 * @param {string} name 36101 * @return {string} 36102 */ 36103 getProperty(name) { 36104 switch (name) { 36105 case "multiplier": 36106 return ( 36107 /* toString */ 36108 "" + this.multiplier 36109 ); 36110 case "half": 36111 return javaemul.internal.BooleanHelper.toString(this.half); 36112 case "scale": 36113 return this.currentScales[this.multiplier].getProperty(name); 36114 case "unitText": 36115 return this.readable(this.unitFactor); 36116 case "unitIsCustom": 36117 return javaemul.internal.BooleanHelper.toString(!/* equals */ 36118 ((o1, o2) => { 36119 if (o1 && o1.equals) { 36120 return o1.equals(o2); 36121 } else { 36122 return o1 === o2; 36123 } 36124 })(this.unitFactor, this.standardUnitFactor)); 36125 case "lengthText": 36126 { 36127 let result = this.unitFactor; 36128 result = this.applyScales(result); 36129 return this.readable(result); 36130 } 36131 ; 36132 case "lengthMathML": 36133 { 36134 let result = this.unitFactor; 36135 result = this.applyScales(result); 36136 return result.getMathML(); 36137 } 36138 ; 36139 case "scaleFactorHtml": 36140 { 36141 let html = ""; 36142 for (let i = 0; i < this.currentScales.length; i++) { 36143 { 36144 html += this.field["getIrrational$int"](i + 1) + this.currentScales[i].getProperty("scaleHtml") + " \u2715 "; 36145 } 36146 ; 36147 } 36148 return html; 36149 } 36150 ; 36151 default: 36152 return super.getProperty(name); 36153 } 36154 } 36155 applyScales(value) { 36156 for (let i = 0; i < this.currentScales.length; i++) { 36157 { 36158 const scale = this.currentScales[i].getScale(); 36159 value = value["times$com_vzome_core_algebra_AlgebraicNumber"](this.field["createPower$int$int"](scale, i + 1)); 36160 } 36161 ; 36162 } 36163 return value; 36164 } 36165 readable(unitFactor2) { 36166 const buf = new java.lang.StringBuffer(); 36167 unitFactor2.getNumberExpression(buf, AlgebraicField.DEFAULT_FORMAT); 36168 return buf.toString(); 36169 } 36170 /** 36171 * Get the actual length value to use when rendering. This value will multiply the zone's normal vector, 36172 * whatever its length is (not necessarily a unit vector). 36173 * @return {*} 36174 */ 36175 getValue() { 36176 let result = this.unitFactor["times$com_vzome_core_algebra_AlgebraicNumber"](this.fixedFactor); 36177 if (this.half) result = result["times$com_vzome_core_algebra_AlgebraicNumber"](this.field["createRational$long$long"](1, 2)); 36178 result = result["times$com_vzome_core_algebra_AlgebraicNumber"](this.field["createPower$int"](_LengthController.SCALE_OFFSET_$LI$())); 36179 result = this.applyScales(result); 36180 return result; 36181 } 36182 getScale() { 36183 return this.currentScales[this.multiplier].getScale(); 36184 } 36185 setScale(amt) { 36186 this.currentScales[this.multiplier].setScale(amt); 36187 } 36188 /** 36189 * This is basically an inverse of getValue(), but with scale fixed at zero, 36190 * thus forcing unitFactor to float. 36191 * 36192 * @param {*} length 36193 */ 36194 setActualLength(length) { 36195 this.half = false;
36196 this.resetScales(); 36197 length = length["times$com_vzome_core_algebra_AlgebraicNumber"](this.field["createPower$int"](-_LengthController.SCALE_OFFSET_$LI$())); 36198 this.unitFactor = length.dividedBy(this.fixedFactor); 36199 this.fireLengthChange(); 36200 } 36201}; 36202LengthController["__class"] = "com.vzome.desktop.controller.LengthController"; 36203LengthController["__interfaces"] = ["com.vzome.desktop.api.Controller"]; 36204((LengthController2) => { 36205 class ScaleController extends DefaultController { 36206 static { 36207 this.MAX_SCALE = 6; 36208 } 36209 static { 36210 this.MIN_SCALE = -6; 36211 } 36212 /** 36213 * 36214 * @param {string} action 36215 */ 36216 doAction(action) { 36217 if ("scaleUp" === action) this.setScale(this.scale + 1); 36218 else if ("scaleDown" === action) this.setScale(this.scale - 1); 36219 else super.doAction(action); 36220 } 36221 /** 36222 * 36223 * @param {string} property 36224 * @param {*} value 36225 */ 36226 setModelProperty(property, value) { 36227 if ("scale" === property) { 36228 this.setScale(javaemul.internal.IntegerHelper.parseInt(value)); 36229 return; 36230 } else super.setModelProperty(property, value); 36231 } 36232 /** 36233 * 36234 * @param {string} string 36235 * @return {string} 36236 */ 36237 getProperty(string) { 36238 if ("scale" === string) return ( 36239 /* toString */ 36240 "" + this.scale 36241 ); 36242 if ("scaleHtml" === string) { 36243 if (this.scale === 0) return "\u2070"; 36244 const absScale = Math.abs(this.scale); 36245 let result = absScale === this.scale ? "" : "\u207B"; 36246 switch (absScale) { 36247 case 1: 36248 result += "\xB9"; 36249 break; 36250 case 2: 36251 result += "\xB2"; 36252 break; 36253 case 3: 36254 result += "\xB3"; 36255 break; 36256 case 4: 36257 result += "\u2074"; 36258 break; 36259 case 5: 36260 result += "\u2075"; 36261 break; 36262 case 6: 36263 result += "\u2076"; 36264 break; 36265 case 7: 36266 result += "\u2077"; 36267 break; 36268 case 8: 36269 result += "\u2078"; 36270 break; 36271 case 9: 36272 result += "\u2079"; 36273 break; 36274 default: 36275 result += "\u207F"; 36276 break; 36277 } 36278 return result; 36279 } 36280 return super.getProperty(string); 36281 } 36282 setScale(amt) { 36283 const oldScale = this.scale; 36284 this.scale = amt; 36285 if (this.scale > ScaleController.MAX_SCALE) this.scale = ScaleController.MAX_SCALE; 36286 else if (this.scale < ScaleController.MIN_SCALE) this.scale = ScaleController.MIN_SCALE; 36287 if (oldScale !== this.scale) this.__parent.fireLengthChange(); 36288 } 36289 getScale() { 36290 return this.scale; 36291 } 36292 constructor(__parent) { 36293 super(); 36294 this.__parent = __parent; 36295 this.scale = 0; 36296 } 36297 } 36298 LengthController2.ScaleController = ScaleController; 36299 ScaleController["__class"] = "com.vzome.desktop.controller.LengthController.ScaleController"; 36300 ScaleController["__interfaces"] = ["com.vzome.desktop.api.Controller"]; 36301})(LengthController || (LengthController = {})); 36302
36303// src/worker/legacy/from-java/com/vzome/desktop/controller/OrbitSetController.ts 36304var OrbitSetController = class _OrbitSetController extends DefaultController { 36305 constructor(orbits, allOrbits, colorSource) { 36306 super(); 36307 if (this.colorSource === void 0) { 36308 this.colorSource = null; 36309 } 36310 if (this.orbits === void 0) { 36311 this.orbits = null; 36312 } 36313 if (this.allOrbits === void 0) { 36314 this.allOrbits = null; 36315 } 36316 this.lastOrbit = null; 36317 this.mOneAtATime = true; 36318 this.orbitDots = new java.util.HashMap(); 36319 this.orbits = orbits; 36320 this.allOrbits = allOrbits; 36321 this.colorSource = colorSource; 36322 this.mOneAtATime = orbits.size() === 1; 36323 this.recalculateDots(); 36324 } 36325 recalculateDots() { 36326 this.orbits.retainAll(this.allOrbits); 36327 const symmetry = this.allOrbits.getSymmetry(); 36328 let test = new RealVector(0.1, 0.1, 1); 36329 if (symmetry != null && symmetry instanceof OctahedralSymmetry) test = new RealVector(2, 1, 4); 36330 else if (symmetry != null && symmetry instanceof DodecagonalSymmetry) test = new RealVector(10, 1, 1); 36331 symmetry.computeOrbitDots(); 36332 this.orbitDots.clear(); 36333 let lastOrbitChanged = false; 36334 for (let index = this.allOrbits.getDirections().iterator(); index.hasNext(); ) { 36335 let dir = index.next(); 36336 { 36337 if (this.lastOrbit == null) { 36338 this.lastOrbit = dir; 36339 lastOrbitChanged = true; 36340 } 36341 const orbit = new _OrbitSetController.OrbitState(); 36342 this.orbitDots.put(dir, orbit); 36343 orbit.color = this.colorSource.getColor(dir); 36344 orbit.dotX = dir.getDotX(); 36345 if (orbit.dotX >= -90) { 36346 orbit.dotY = dir.getDotY(); 36347 } else { 36348 const axis = symmetry["getAxis$com_vzome_core_math_RealVector$java_util_Collection"](test, java.util.Collections.singleton(dir)); 36349 const v = axis.normal(); 36350 let z = v.getComponent(2).evaluate(); 36351 if (z === 0) { 36352 z = 1; 36353 } 36354 orbit.dotX = v.getComponent(0).evaluate(); 36355 orbit.dotX = orbit.dotX / z; 36356 orbit.dotY = v.getComponent(1).evaluate(); 36357 orbit.dotY = orbit.dotY / z; 36358 } 36359 } 36360 } 36361 if (this.lastOrbit == null || !this.allOrbits.contains(this.lastOrbit)) { 36362 lastOrbitChanged = true; 36363 if (!this.orbits.isEmpty()) this.lastOrbit = this.orbits.last(); 36364 else if (!this.orbitDots.isEmpty()) this.lastOrbit = this.orbitDots.keySet().iterator().next(); 36365 else this.lastOrbit = null; 36366 } 36367 if (lastOrbitChanged) this.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("selectedOrbit", null, this.lastOrbit == null ? null : this.lastOrbit.getName()); 36368 } 36369 /** 36370 * 36371 * @param {string} action 36372 */ 36373 doAction(action) { 36374 if (action === "refreshDots") { 36375 this.recalculateDots(); 36376 return; 36377 } 36378 if (action === "toggleHalf" || action === "reset" || action === "short" || action === "medium" || action === "long" || /* startsWith */ 36379 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(action, "adjustScale.") || action === "scaleUp" || action === "scaleDown") {
36380 this.getSubController("currentLength").actionPerformed(null, action); 36381 return; 36382 } 36383 if (action === "setNoDirections") { 36384 this.orbits.clear(); 36385 } else if (action === "setAllDirections") { 36386 this.mOneAtATime = false; 36387 this.orbits.addAll(this.allOrbits); 36388 } else if (action === "rZomeOrbits") { 36389 this.mOneAtATime = false; 36390 this.orbits.clear(); 36391 for (let index = this.allOrbits.getDirections().iterator(); index.hasNext(); ) { 36392 let dir = index.next(); 36393 { 36394 if (dir.isStandard()) { 36395 this.orbits.add(dir); 36396 } 36397 } 36398 } 36399 } else if (action === "predefinedOrbits") { 36400 this.mOneAtATime = false; 36401 this.orbits.clear(); 36402 for (let index = this.allOrbits.getDirections().iterator(); index.hasNext(); ) { 36403 let dir = index.next(); 36404 { 36405 if (!dir.isAutomatic()) { 36406 this.orbits.add(dir); 36407 } 36408 } 36409 } 36410 } else if (action === "oneAtATime") { 36411 this.mOneAtATime = !this.mOneAtATime; 36412 if (!this.mOneAtATime) return; 36413 this.orbits.clear(); 36414 if (this.lastOrbit != null) this.orbits.add(this.lastOrbit); 36415 } else if ( 36416 /* startsWith */ 36417 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(action, "setSingleOrbit.") 36418 ) { 36419 const lastValue = this.mOneAtATime; 36420 const value = action.substring("setSingleOrbit.".length); 36421 this.mOneAtATime = javaemul.internal.BooleanHelper.parseBoolean(value); 36422 if (this.mOneAtATime) { 36423 this.orbits.clear(); 36424 if (this.lastOrbit != null) this.orbits.add(this.lastOrbit); 36425 } 36426 this.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("oneAtATime", lastValue, this.mOneAtATime); 36427 } else if ( 36428 /* startsWith */ 36429 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(action, "enableDirection.") 36430 ) { 36431 const dirName = action.substring("enableDirection.".length); 36432 const dir = this.allOrbits.getDirection(dirName); 36433 if (dir != null && !this.orbits.contains(dir)) this.toggleOrbit(dir); 36434 } else if ( 36435 /* startsWith */ 36436 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(action, "toggleDirection.") 36437 ) { 36438 const dirName = action.substring("toggleDirection.".length); 36439 const dir = this.allOrbits.getDirection(dirName); 36440 this.toggleOrbit(dir); 36441 } else if ( 36442 /* startsWith */ 36443 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(action, "setSingleDirection.") 36444 ) { 36445 this.mOneAtATime = true; 36446 const dirName = action.substring("setSingleDirection.".length); 36447 const dir = this.allOrbits.getDirection(dirName); 36448 this.toggleOrbit(dir); 36449 } 36450 this.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("orbits", true, false); 36451 } 36452 /** 36453 * 36454 * @param {PropertyChangeEvent} evt 36455 */ 36456 propertyChange(evt) { 36457 if ("length" === evt.getPropertyName() && evt.getSource() === this.getSubController("currentLength")) this.firePropertyChange$java_beans_PropertyChangeEvent(evt); 36458 if ("orbits" === evt.getPropertyName()) { 36459 this.recalculateDots(); 36460 this.firePropertyChange$java_beans_PropertyChangeEvent(evt); 36461 } 36462 } 36463 toggleOrbit(dir) { 36464 if (this.mOneAtATime) this.orbits.clear(); 36465 if (this.orbits.add(dir)) { 36466 this.lastOrbit = dir; 36467 this.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("selectedOrbit", null, dir.getName()); 36468 } else if (this.orbits.remove(dir)) { 36469 } else throw new java.lang.IllegalStateException("could not toggle direction " + dir.getName()); 36470 } 36471 /** 36472 * 36473 * @param {string} name 36474 * @return {*} 36475 */ 36476 getSubController(name) { 36477 if ("currentLength" === name) return super.getSubController("length." + this.getProperty("selectedOrbit")); 36478 return super.getSubController(name); 36479 } 36480 /** 36481 * 36482 * @param {string} string 36483 * @return {string} 36484 */ 36485 getProperty(string) { 36486 if ("oneAtATime" === string) return javaemul.internal.BooleanHelper.toString(this.mOneAtATime); 36487 if ("reverseOrbitTriangle" === string) return javaemul.internal.BooleanHelper.toString(this.allOrbits.getSymmetry().reverseOrbitTriangle()); 36488 if ("selectedOrbit" === string) if (this.lastOrbit != null) return this.lastOrbit.getName(); 36489 else return null; 36490 if ("halfSizes" === string) if (this.lastOrbit != null && this.lastOrbit.hasHalfSizes()) return "true"; 36491 else return "false"; 36492 if ("scaleName.superShort" === string) return this.lastOrbit == null ? null : this.lastOrbit.getScaleName(0); 36493 if ("scaleName.short" === string) return this.lastOrbit == null ? null : this.lastOrbit.getScaleName(1); 36494 if ("scaleName.medium" === string) return this.lastOrbit == null ? null : this.lastOrbit.getScaleName(2); 36495 if ("scaleName.long" === string) return this.lastOrbit == null ? null : this.lastOrbit.getScaleName(3); 36496 if ("color" === string) { 36497 const color = this.colorSource.getColor(this.lastOrbit); 36498 if (color == null) return null; 36499 const rgb = color.getRGB(); 36500 return "0x" + javaemul.internal.IntegerHelper.toHexString(rgb); 36501 } 36502 if (/* @__PURE__ */ ((lhs, rhs) => lhs || rhs)(/* @__PURE__ */ ((lhs, rhs) => lhs || rhs)("half" === string, "unitText" === string), "multiplierText" === string)) return this.get
36502SubController("currentLength").getProperty(string); 36503 if ( 36504 /* startsWith */ 36505 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(string, "orbitDot.") 36506 ) { 36507 const orbitName = string.substring("orbitDot.".length); 36508 const orbit = this.allOrbits.getDirection(orbitName); 36509 const dot = this.orbitDots.get(orbit); 36510 if (dot == null) return "0xffffff/0/0"; 36511 return "0x" + javaemul.internal.IntegerHelper.toHexString(dot.color.getRGB()) + "/" + dot.dotX + "/" + dot.dotY; 36512 } 36513 if ( 36514 /* startsWith */ 36515 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(string, "orbitEnabled.") 36516 ) { 36517 const orbitName = string.substring("orbitEnabled.".length); 36518 const orbit = this.orbits.getDirection(orbitName); 36519 return javaemul.internal.BooleanHelper.toString(orbit != null); 36520 } 36521 return super.getProperty(string); 36522 } 36523 /** 36524 * 36525 * @param {string} cmd 36526 * @param {*} value 36527 */ 36528 setModelProperty(cmd, value) { 36529 if ("oneAtATime" === cmd) this.mOneAtATime = /* equals */ 36530 ((o1, o2) => o1 && o1.equals ? o1.equals(o2) : o1 === o2)("true", value); 36531 else if (/* @__PURE__ */ ((lhs, rhs) => lhs || rhs)("multiplier" === cmd, "half" === cmd)) this.getSubController("currentLength").setProperty(cmd, value); 36532 else super.setModelProperty(cmd, value); 36533 } 36534 /** 36535 * 36536 * @param {string} listName 36537 * @return {java.lang.String[]} 36538 */ 36539 getCommandList(listName) { 36540 if (listName === "orbits") { 36541 const result = ((s) => { 36542 let a = []; 36543 while (s-- > 0) a.push(null); 36544 return a; 36545 })(this.orbits.size()); 36546 let i = 0; 36547 for (let index = this.orbits.getDirections().iterator(); index.hasNext(); ) { 36548 let dir = index.next(); 36549 { 36550 result[i] = dir.getName(); 36551 i++; 36552 } 36553 } 36554 return result; 36555 } 36556 if (listName === "allOrbits") { 36557 const result = ((s) => { 36558 let a = []; 36559 while (s-- > 0) a.push(null); 36560 return a; 36561 })(this.allOrbits.size()); 36562 let i = 0; 36563 for (let index = this.allOrbits.getDirections().iterator(); index.hasNext(); ) { 36564 let dir = index.next(); 36565 { 36566 result[i] = dir.getName(); 36567 i++; 36568 } 36569 } 36570 return result; 36571 } 36572 return super.getCommandList(listName); 36573 } 36574}; 36575OrbitSetController["__class"] = "com.vzome.desktop.controller.OrbitSetController"; 36576OrbitSetController["__interfaces"] = ["java.util.EventListener", "java.beans.PropertyChangeListener", "com.vzome.desktop.api.Controller"]; 36577((OrbitSetController2) => { 36578 class OrbitState { 36579 constructor() { 36580 if (this.dotX === void 0) { 36581 this.dotX = 0; 36582 } 36583 if (this.dotY === void 0) { 36584 this.dotY = 0; 36585 } 36586 if (this.color === void 0) { 36587 this.color = null; 36588 } 36589 } 36590 } 36591 OrbitSetController2.OrbitState = OrbitState; 36592 OrbitState["__class"] = "com.vzome.desktop.controller.OrbitSetController.OrbitState"; 36593})(OrbitSetController || (OrbitSetController = {})); 36594
36595// src/worker/legacy/from-java/com/vzome/desktop/controller/SymmetrySnapper.ts 36596var SymmetrySnapper = class { 36597 constructor(orbitSet) { 36598 if (this.orbitSet === void 0) { 36599 this.orbitSet = null; 36600 } 36601 if (this.embedding === void 0) { 36602 this.embedding = null; 36603 } 36604 this.orbitSet = orbitSet; 36605 this.embedding = orbitSet.getSymmetry(); 36606 } 36607 /** 36608 * 36609 * @param {RealVector} zIn 36610 * @return {RealVector} 36611 */ 36612 snapZ(zIn) { 36613 const lookZone = this.orbitSet.getAxis(zIn); 36614 if (lookZone == null) return zIn; 36615 return this.embedding.embedInR3(lookZone.normal()); 36616 } 36617 /** 36618 * 36619 * @param {RealVector} zOut 36620 * @param {RealVector} yIn 36621 * @return {RealVector} 36622 */ 36623 snapY(zOut, yIn) { 36624 const upZone = this.orbitSet.getAxis(yIn); 36625 if (upZone == null) return yIn; 36626 yIn = this.embedding.embedInR3(upZone.normal()); 36627 const left = zOut.cross(yIn); 36628 return left.cross(zOut); 36629 } 36630}; 36631SymmetrySnapper["__class"] = "com.vzome.desktop.controller.SymmetrySnapper"; 36632SymmetrySnapper["__interfaces"] = ["com.vzome.desktop.controller.OrbitSnapper"]; 36633
36634// src/worker/legacy/from-java/com/vzome/desktop/controller/ToolFactoryController.ts 36635var ToolFactoryController = class extends DefaultController { 36636 constructor(factory) { 36637 super(); 36638 if (this.factory === void 0) { 36639 this.factory = null; 36640 } 36641 this.factory = factory; 36642 factory.addListener(this); 36643 } 36644 /** 36645 * 36646 * @param {PropertyChangeEvent} evt 36647 */ 36648 propertyChange(evt) { 36649 switch (evt.getPropertyName()) { 36650 case "enabled": 36651 this.firePropertyChange$java_beans_PropertyChangeEvent(evt); 36652 break; 36653 default: 36654 break; 36655 } 36656 } 36657 /** 36658 * 36659 * @param {string} name 36660 * @return {string} 36661 */ 36662 getProperty(name) { 36663 switch (name) { 36664 case "title": 36665 return this.factory.getLabel(); 36666 case "tooltip": 36667 return this.factory.getToolTip(); 36668 case "enabled": 36669 return javaemul.internal.BooleanHelper.toString(this.factory.isEnabled()); 36670 default: 36671 return super.getProperty(name); 36672 } 36673 } 36674 /** 36675 * 36676 * @param {string} action 36677 */ 36678 doAction(action) { 36679 switch (action) { 36680 case "createTool": 36681 this.factory.createTool(); 36682 break; 36683 default: 36684 super.doAction(action); 36685 } 36686 } 36687}; 36688ToolFactoryController["__class"] = "com.vzome.desktop.controller.ToolFactoryController"; 36689ToolFactoryController["__interfaces"] = ["java.util.EventListener", "java.beans.PropertyChangeListener", "com.vzome.desktop.api.Controller"]; 36690
36691// src/worker/legacy/from-java/com/vzome/desktop/controller/SymmetryController.ts 36692var SymmetryController = class _SymmetryController extends DefaultController { 36693 static UNTOOLBARED_LABELS_$LI$() { 36694 if (_SymmetryController.UNTOOLBARED_LABELS == null) { 36695 _SymmetryController.UNTOOLBARED_LABELS = new java.util.HashSet(java.util.Arrays.asList("reflection through XY plane", "reflection through X=Y green plane", "symmetry around red through origin", "rotate around red through origin", "b1 move along +X")); 36696 } 36697 return _SymmetryController.UNTOOLBARED_LABELS; 36698 } 36699 /** 36700 * 36701 * @param {string} string 36702 * @return {string} 36703 */ 36704 getProperty(string) { 36705 switch (string) { 36706 case "label": 36707 return this.label; 36708 case "name": 36709 return this.symmetrySystem.getName(); 36710 case "renderingStyle": 36711 return this.symmetrySystem.getStyle$().getName(); 36712 case "modelResourcePath": 36713 return this.symmetrySystem.getModelResourcePath(); 36714 default: 36715 if ( 36716 /* startsWith */ 36717 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(string, "orbitColor.") 36718 ) { 36719 const name = string.substring("orbitColor.".length); 36720 const dir = this.symmetrySystem.getOrbits().getDirection(name); 36721 const color = this.getColor(dir); 36722 return color.toString(); 36723 } 36724 return super.getProperty(string); 36725 } 36726 } 36727 getSymmetry() { 36728 return this.symmetrySystem.getSymmetry(); 36729 } 36730 getSnapper() { 36731 return this.snapper; 36732 } 36733 constructor(label, parent, model, mRenderedModel) { 36734 super(); 36735 if (this.symmetrySystem === void 0) { 36736 this.symmetrySystem = null; 36737 } 36738 if (this.availableOrbits === void 0) { 36739 this.availableOrbits = null; 36740 } 36741 if (this.snapOrbits === void 0) { 36742 this.snapOrbits = null; 36743 } 36744 if (this.buildOrbits === void 0) { 36745 this.buildOrbits = null; 36746 } 36747 if (this.renderOrbits === void 0) { 36748 this.renderOrbits = null; 36749 } 36750 if (this.snapper === void 0) { 36751 this.snapper = null; 36752 } 36753 if (this.availableController === void 0) { 36754 this.availableController = null; 36755 } 36756 if (this.snapController === void 0) { 36757 this.snapController = null; 36758 } 36759 if (this.buildController === void 0) { 36760 this.buildController = null; 36761 } 36762 if (this.renderController === void 0) { 36763 this.renderController = null; 36764 } 36765 this.orbitLengths = new java.util.HashMap(); 36766 this.symmetryToolFactories = new java.util.LinkedHashMap(); 36767 this.transformToolFactories = new java.util.LinkedHashMap(); 36768 this.linearMapToolFactories = new java.util.LinkedHashMap(); 36769 if (this.renderedModel === void 0) { 36770 this.renderedModel = null; 36771 } 36772 if (this.label === void 0) { 36773 this.label = null; 36774 } 36775 this.label = label; 36776 this.symmetrySystem = model; 36777 this.renderedModel = mRenderedModel; 36778 const symmetry = model.getSymmetry(); 36779 this.availableOrbits = new OrbitSet(symmetry); 36780 this.snapOrbits = new OrbitSet(symmetry); 36781 this.buildOrbits = new OrbitSet(symmetry); 36782 this.renderOrbits = new OrbitSet(symmetry); 36783 this.snapper = new SymmetrySnapper(this.snapOrbits); 36784 for (let index = symmetry.getOrbitSet().getDirections().iterator(); index.hasNext(); ) { 36785 let orbit = index.next(); 36786 { 36787 if (model.orbitIsStandard(orbit)) { 36788 this.availableOrbits.add(orbit); 36789 this.snapOrbits.add(orbit); 36790 if (model.orbitIsBuildDefault(orbit)) { 36791 this.buildOrbits.add(orbit); 36792 } 36793 } 36794 this.renderOrbits.add(orbit); 36795 } 36796 } 36797 this.availableController = new OrbitSetController(this.availableOrbits, this.symmetrySystem.getOrbits(), this.symmetrySystem); 36798 this.addSubController("availableOrbits", this.availableController); 36799 this.snapController = new OrbitSetController(this.snapOrbits, this.availableOrbits, this.symmetrySystem); 36800 this.addSubController("snapOrbits", this.snapController); 36801 this.buildController = new OrbitSetController(this.buildOrbits, this.availableOrbits, this.symmetrySystem); 36802 this.addSubController("buildOrbits", this.buildController); 36803 if (parent.propertyIsTrue("single.orbit")) try { 36804 this.buildController.doAction("oneAtATime"); 36805 } catch (e) { 36806 console.error(e.message, e); 36807 } 36808 this.renderController = new OrbitSetController(this.renderOrbits, this.symmetrySystem.getOrbits(), this.symmetrySystem); 36809 this.addSubController("renderOrbits", this.renderController); 36810 for (let index = this.symmetrySystem.getOrbits().getDirections().iterator(); index.hasNext(); ) { 36811 let orbit = index.next(); 36812 { 36813 const unitLength = this.symmetrySystem.getOrbitUnitLength(orbit); 36814 const field5 = symmetry.getField(); 36815 const lengthModel = new LengthController(unitLength, field5.one(), field5); 36816 this.buildController.addSubController("length." + orbit.getName(), lengthModel); 36817 this.orbitLengths.put(orbit, lengthModel); 36818 } 36819 } 36820 if (parent.propertyIsTrue("disable.known.directions")) this.symmetrySystem.disableKnownDirection(); 36821 this.availableController.addPropertyListener(this.buildController); 36822 this.availableController.addPropertyListener(this.snapController); 36823 this.availableController.addPropertyListener(new _SymmetryController.SymmetryController$0(this)); 36824 const presetStyle = parent.getProperty("defaultShapes." + model.getSymmetry().getField().getName() + "." + model.getName()); 36825 if (presetStyle != null) this.symmetrySystem.setStyle(presetStyle); 36826 } 36827 /** 36828 * 36829 * @param {string} listName 36830 * @return {java.lang.String[]} 36831 */ 36832 getCommandList(listName) { 36833 switch (listName) { 36834 case "styles": 36835 return this.symmetrySystem.getStyleNames(); 36836 case "orbitNames": 36837 const list = new java.util.ArrayList(); 36838 for (let index = this.symmetrySystem.getSymmetry().getDirections().iterator(); index.hasNext(); ) { 36839 let dir = index.next(); 36840 { 36841 if (!dir.isAutomatic()) list.add(dir.getCanonicalName()); 36842 } 36843 } 36844 return list.toArray([]); 36845 case "orbits": 36846 const result = ((s) => { 36847 let a = []; 36848 while (s-- > 0) a.push(null); 36849 return a; 36850 })(this.symmetrySystem.getOrbits().size()); 36851 let i = 0; 36852 for (let index = this.symmetrySystem.getOrbits().getDirections().iterator(); index.hasNext(); ) { 36853 let orbit = index.next(); 36854 { 36855 result[i] = orbit.getName(); 36856 i++; 36857 } 36858 } 36859 return result; 36860 case "symmetryToolFactories": 36861 if (this.symmetryToolFactories.isEmpty()) { 36862 for (let index = this.symmetrySystem.getToolFactories(Tool2.Kind.SYMMETRY).iterator(); index.hasNext(); ) { 36863 let factory = index.next(); 36864 this.symmetryToolFactories.put(factory.getId(), new ToolFactoryController(factory)); 36865 } 36866 } 36867 return this.symmetryToolFactories.keySet().toArray([]); 36868 case "transformToolFactories": 36869 if (this.transformToolFactories.isEmpty()) { 36870 for (let index = this.symmetrySystem.getToolFactories(Tool2.Kind.TRANSFORM).iterator(); index.hasNext(); ) { 36871 let factory = index.next(); 36872 this.transformToolFactories.put(factory.getId(), new ToolFactoryController(factory)); 36873 } 36874 } 36875 return this.transformToolFactories.keySet().toArray([]); 36876 case "linearMapToolFactories": 36877 if (this.linearMapToolFactories.isEmpty()) { 36878 for (let index = this.symmetrySystem.getToolFactories(Tool2.Kind.L
36878INEAR_MAP).iterator(); index.hasNext(); ) { 36879 let factory = index.next(); 36880 this.linearMapToolFactories.put(factory.getId(), new ToolFactoryController(factory)); 36881 } 36882 } 36883 return this.linearMapToolFactories.keySet().toArray([]); 36884 case "builtInSymmetryTools": 36885 const toolNames = new java.util.ArrayList(); 36886 for (let index = this.symmetrySystem.getPredefinedTools(Tool2.Kind.SYMMETRY).iterator(); index.hasNext(); ) { 36887 let tool = index.next(); 36888 if (!_SymmetryController.UNTOOLBARED_LABELS_$LI$().contains(tool.getLabel())) toolNames.add(tool.getId()); 36889 } 36890 return toolNames.toArray([]); 36891 case "builtInTransformTools": 36892 const transformToolNames = new java.util.ArrayList(); 36893 for (let index = this.symmetrySystem.getPredefinedTools(Tool2.Kind.TRANSFORM).iterator(); index.hasNext(); ) { 36894 let tool = index.next(); 36895 if (!_SymmetryController.UNTOOLBARED_LABELS_$LI$().contains(tool.getLabel())) transformToolNames.add(tool.getId()); 36896 } 36897 return transformToolNames.toArray([]); 36898 default: 36899 return super.getCommandList(listName); 36900 } 36901 } 36902 /** 36903 * 36904 * @param {string} name 36905 * @return {*} 36906 */ 36907 getSubController(name) { 36908 switch (name) { 36909 case "availableOrbits": 36910 return this.availableController; 36911 case "snapOrbits": 36912 return this.snapController; 36913 case "buildOrbits": 36914 return this.buildController; 36915 case "renderOrbits": 36916 return this.renderController; 36917 default: 36918 if ( 36919 /* startsWith */ 36920 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(name, "length.") 36921 ) { 36922 const dirName = name.substring("length.".length); 36923 const dir = this.symmetrySystem.getOrbits().getDirection(dirName); 36924 return this.getLengthController(dir); 36925 } 36926 let result = this.symmetryToolFactories.get(name); 36927 if (result != null) return result; 36928 result = this.transformToolFactories.get(name); 36929 if (result != null) return result; 36930 result = this.linearMapToolFactories.get(name); 36931 if (result != null) return result; 36932 return super.getSubController(name); 36933 } 36934 } 36935 /** 36936 * 36937 * @param {string} action 36938 */ 36939 doAction(action) { 36940 switch (action) { 36941 case "rZomeOrbits": 36942 case "predefinedOrbits": 36943 case "setAllDirections": 36944 this.availableController.doAction(action); 36945 break; 36946 case "ReplaceWithShape": 36947 action += "/" + this.symmetrySystem.getName() + ":" + this.symmetrySystem.getStyle$().getName(); 36948 super.doAction(action); 36949 break; 36950 case "resetOrbitColors": 36951 this.symmetrySystem.resetColors(); 36952 this.availableController.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("orbits", true, false); 36953 break; 36954 default: 36955 if ( 36956 /* startsWith */ 36957 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(action, "setStyle.") 36958 ) { 36959 const styleName = action.substring("setStyle.".length); 36960 this.symmetrySystem.setStyle(styleName); 36961 this.renderedModel.setShapes(this.symmetrySystem.getShapes()); 36962 this.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("renderingStyle", null, styleName); 36963 } else { 36964 const handled = this.symmetrySystem.doAction(action); 36965 if (!handled) super.doAction(action); 36966 } 36967 break; 36968 } 36969 } 36970 /*private*/ 36971 getLengthController(orbit) { 36972 let result = this.orbitLengths.get(orbit); 36973 if (result == null && orbit != null) { 36974 const unitLength = this.symmetrySystem.getOrbitUnitLength(orbit); 36975 const field5 = this.symmetrySystem.getSymmetry().getField(); 36976 result = new LengthController(unitLength, field5.one(), field5); 36977 this.buildController.addSubController("length." + orbit.getName(), result); 36978 this.orbitLengths.put(orbit, result); 36979 this.renderOrbits.add(orbit); 36980 this.availableOrbits.add(orbit); 36981 } 36982 return result; 36983 } 36984 getOrbits() { 36985 return this.symmetrySystem.getOrbits(); 36986 } 36987 getOrbitSource() { 36988 return this.symmetrySystem; 36989 } 36990 getZone(offset) { 36991 return this.symmetrySystem.getAxis(offset); 36992 } 36993 getColor(orbit) { 36994 return this.symmetrySystem.getColor(orbit); 36995 } 36996 getBuildOrbits() { 36997 return this.buildOrbits; 36998 } 36999 getRenderingStyle() { 37000 return this.symmetrySystem.getRenderingStyle(); 37001 } 37002 parseOrbitLength(string, props) { 37003 const sections = string.split("/", 3); 37004 const mode = sections[0]; 37005 props.put("mode", mode); 37006 const orbitStr = sections[1]; 37007 const orbit = this.getOrbits().getDirection(orbitStr); 37008 props.put("orbit", orbit); 37009 if ( 37010 /* endsWith */ 37011 ((str, searchString) => { 37012 let pos = str.length - searchString.length; 37013 let lastIndex = str.indexOf(searchString, pos); 37014 return lastIndex !== -1 && lastIndex === pos; 37015 })(mode, "Struts") 37016 ) { 37017 const lengthStr = sections[2]; 37018 const unitScalar = orbit.getLengthInUnits(this.getSymmetry().getField().one()); 37019 const length = unitScalar.getField().parseNumber(lengthStr); 37020 const rawLength = length.dividedBy(unitScalar); 37021 if (rawLength != null) props.put("length", rawLength); 37022 } 37023 } 37024}; 37025SymmetryController["__class"] = "com.vzome.desktop.controller.SymmetryController"; 37026SymmetryController["__interfaces"] = ["com.vzome.desktop.api.Controller"]; 37027((SymmetryController2) => { 37028 class SymmetryController$0 { 37029 /** 37030 * 37031 * @param {PropertyChangeEvent} event 37032 */ 37033 propertyChange(event) { 37034 if ("orbits" === event.getPropertyName()) { 37035 } 37036 } 37037 constructor(__parent) { 37038 this.__parent = __parent; 37039 } 37040 } 37041 SymmetryController2.SymmetryController$0 = SymmetryController$0; 37042 SymmetryController$0["__interfaces"] = ["java.util.EventListener", "java.beans.PropertyChangeListener"]; 37043})(SymmetryController || (SymmetryController = {})); 37044
37045// src/worker/legacy/from-java/com/vzome/desktop/controller/ToolController.ts 37046var ToolController = class extends DefaultController { 37047 constructor(tool) { 37048 super(); 37049 if (this.tool === void 0) { 37050 this.tool = null; 37051 } 37052 if (this.selectOutputs === void 0) { 37053 this.selectOutputs = false; 37054 } 37055 if (this.justSelect === void 0) { 37056 this.justSelect = false; 37057 } 37058 this.tool = tool; 37059 this.selectOutputs = true; 37060 this.justSelect = false; 37061 } 37062 /** 37063 * 37064 * @param {string} action 37065 */ 37066 doAction(action) { 37067 const selectInputs = this.tool.isSelectInputs(); 37068 let deleteInputs = this.tool.isDeleteInputs(); 37069 let copyColors = this.tool.isCopyColors(); 37070 switch (action) { 37071 case "apply": 37072 const createOutputs = !this.justSelect; 37073 this.tool.apply(selectInputs, deleteInputs, createOutputs, this.selectOutputs, copyColors); 37074 break; 37075 case "hideTool": 37076 this.tool.setHidden(true); 37077 this.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("hidden", null, "true"); 37078 break; 37079 case "unhideTool": 37080 this.tool.setHidden(false); 37081 this.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("hidden", null, "false"); 37082 break; 37083 case "selectParams": 37084 this.tool.selectParameters(); 37085 break; 37086 case "selectInputs": 37087 this.tool.setInputBehaviors(!selectInputs, deleteInputs); 37088 this.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("selectInputs", null, javaemul.internal.BooleanHelper.toString(this.tool.isSelectInputs())); 37089 break; 37090 case "deleteInputs": 37091 deleteInputs = !deleteInputs; 37092 this.tool.setInputBehaviors(selectInputs && !deleteInputs, deleteInputs); 37093 if (deleteInputs) { 37094 this.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("selectInputs", null, "false"); 37095 } 37096 this.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("deleteInputs", null, javaemul.internal.BooleanHelper.toString(deleteInputs)); 37097 break; 37098 case "copyColors": 37099 copyColors = !copyColors; 37100 this.tool.setCopyColors(copyColors); 37101 this.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("copyColors", null, javaemul.internal.BooleanHelper.toString(copyColors)); 37102 break; 37103 case "selectOutputs": 37104 this.selectOutputs = !this.selectOutputs; 37105 this.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("selectOutputs", null, javaemul.internal.BooleanHelper.toString(this.selectOutputs)); 37106 break; 37107 case "createOutputs": 37108 this.justSelect = !this.justSelect; 37109 if (this.justSelect) { 37110 this.selectOutputs = true; 37111 this.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("selectOutputs", null, "true"); 37112 } 37113 this.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("createOutputs", null, javaemul.internal.BooleanHelper.toString(!this.justSelect)); 37114 break; 37115 default: 37116 super.doAction(action); 37117 } 37118 } 37119 /** 37120 * 37121 * @param {string} name 37122 * @return {string} 37123 */ 37124 getProperty(name) { 37125 switch (name) { 37126 case "id": 37127 return this.tool.getId(); 37128 case "label": 37129 return this.tool.getLabel(); 37130 case "kind": 37131 return this.tool.getCategory(); 37132 case "predefined": 37133 return javaemul.internal.BooleanHelper.toString(this.tool.isPredefined()); 37134 case "hidden": 37135 return javaemul.internal.BooleanHelper.toString(this.tool.isHidden()); 37136 case "selectInputs": 37137 return javaemul.internal.BooleanHelper.toString(this.tool.isSelectInputs()); 37138 case "deleteInputs": 37139 return javaemul.internal.BooleanHelper.toString(this.tool.isDeleteInputs()); 37140 case "copyColors": 37141 return javaemul.internal.BooleanHelper.toString(this.tool.isCopyColors()); 37142 case "selectOutputs": 37143 return javaemul.internal.BooleanHelper.toString(this.selectOutputs); 37144 case "createOutputs": 37145 return javaemul.internal.BooleanHelper.toString(!this.justSelect); 37146 default: 37147 return super.getProperty(name); 37148 } 37149 } 37150 /** 37151 * 37152 * @param {string} name 37153 * @param {*} value 37154 */ 37155 setModelProperty(name, value) { 37156 switch (name) { 37157 case "label": 37158 this.tool.setLabel(value); 37159 this.firePropertyChange$java_lang_String$java_lang_Object$java_lang_Object("label", null, value); 37160 return; 37161 default: 37162 super.setModelProperty(name, value); 37163 } 37164 } 37165}; 37166ToolController["__class"] = "com.vzome.desktop.controller.ToolController"; 37167ToolController["__interfaces"] = ["com.vzome.desktop.api.Controller"]; 37168
37169// src/worker/legacy/from-java/com/vzome/desktop/controller/ToolsController.ts 37170var ToolsController = class extends DefaultController { 37171 constructor(tools) { 37172 super(); 37173 if (this.tools === void 0) { 37174 this.tools = null; 37175 } 37176 this.tools = tools; 37177 tools.addPropertyListener(this); 37178 } 37179 /** 37180 * 37181 * @param {string} action 37182 * @param {Properties} params 37183 */ 37184 doParamAction(action, params) { 37185 switch (action) { 37186 case "reorderTools": 37187 case "reorderBookmarks": 37188 const order = params.getProperty("order"); 37189 const ids = order == null || /* isEmpty */ 37190 order.length === 0 ? [] : order.split(","); 37191 this.tools.reorderTools(action === "reorderBookmarks", ids); 37192 break; 37193 default: 37194 super.doParamAction(action, params); 37195 } 37196 } 37197 /** 37198 * 37199 * @param {string} name 37200 * @return {*} 37201 */ 37202 getSubController(name) { 37203 const tool = this.tools.get(name); 37204 if (tool != null) { 37205 const controller = new ToolController(tool); 37206 this.addSubController(name, controller); 37207 return controller; 37208 } 37209 return null; 37210 } 37211 addTool(tool) { 37212 const controller = new ToolController(tool); 37213 this.addSubController(tool.getId(), controller); 37214 this.firePropertyChange$java_beans_PropertyChangeEvent(new PropertyChangeEvent(this, "tool.added", null, controller)); 37215 } 37216 /** 37217 * 37218 * @param {PropertyChangeEvent} evt 37219 */ 37220 propertyChange(evt) { 37221 switch (evt.getPropertyName()) { 37222 case "customTools": 37223 this.firePropertyChange$java_beans_PropertyChangeEvent(new PropertyChangeEvent(this, evt.getPropertyName(), null, evt.getNewValue())); 37224 this.firePropertyChange$java_beans_PropertyChangeEvent(new PropertyChangeEvent(this, "allCustomTools", null, this.tools.getAllCustomToolIDs(false))); 37225 break; 37226 case "customBookmarks": 37227 this.firePropertyChange$java_beans_PropertyChangeEvent(new PropertyChangeEvent(this, evt.getPropertyName(), null, evt.getNewValue())); 37228 this.firePropertyChange$java_beans_PropertyChangeEvent(new PropertyChangeEvent(this, "allCustomBookmarks", null, this.tools.getAllCustomToolIDs(true))); 37229 break; 37230 case "tool.instances": 37231 if (evt.getOldValue() == null) { 37232 const tool = evt.getNewValue(); 37233 if (tool.isPredefined() || tool.isHidden()) return; 37234 const controller = new ToolController(tool); 37235 this.firePropertyChange$java_beans_PropertyChangeEvent(new PropertyChangeEvent(this, "tool.added", null, controller)); 37236 } else { 37237 const tool = evt.getOldValue(); 37238 this.firePropertyChange$java_beans_PropertyChangeEvent(new PropertyChangeEvent(this, "tool.hidden", tool.getId(), null)); 37239 } 37240 break; 37241 default: 37242 break; 37243 } 37244 } 37245 /** 37246 * 37247 * @param {string} listName 37248 * @return {java.lang.String[]} 37249 */ 37250 getCommandList(listName) { 37251 switch (listName) { 37252 case "customTools": 37253 return this.tools.getToolIDs(false); 37254 case "customBookmarks": 37255 return this.tools.getToolIDs(true); 37256 case "allCustomTools": 37257 return this.tools.getAllCustomToolIDs(false); 37258 case "allCustomBookmarks": 37259 return this.tools.getAllCustomToolIDs(true); 37260 default: 37261 break; 37262 } 37263 return super.getCommandList(listName); 37264 } 37265}; 37266ToolsController["__class"] = "com.vzome.desktop.controller.ToolsController"; 37267ToolsController["__interfaces"] = ["java.util.EventListener", "java.beans.PropertyChangeListener", "com.vzome.desktop.api.Controller"]; 37268
37269// src/worker/legacy/from-java/com/vzome/desktop/controller/UndoRedoController.ts 37270var UndoRedoController = class extends DefaultController { 37271 constructor(model) { 37272 super(); 37273 if (this.model === void 0) { 37274 this.model = null; 37275 } 37276 this.model = model; 37277 } 37278 /** 37279 * 37280 * @param {string} key 37281 * @return {string} 37282 */ 37283 getProperty(key) { 37284 switch (key) { 37285 case "line.number": 37286 return ( 37287 /* toString */ 37288 "" + this.model.getNextLineNumber() 37289 ); 37290 case "breakpoints": 37291 return this.model.getBreakpoints().stream().map((x) => x.toString()).collect(java.util.stream.Collectors.joining(",")); 37292 default: 37293 return super.getProperty(key); 37294 } 37295 } 37296 /** 37297 * 37298 * @param {string} action 37299 */ 37300 doAction(action) { 37301 switch (action) { 37302 case "undo": 37303 this.model.undo$boolean(true); 37304 break; 37305 case "redo": 37306 this.model.redo$boolean(true); 37307 break; 37308 case "redoToBreakpoint": 37309 this.model.redoToBreakpoint(); 37310 break; 37311 case "undoAll": 37312 this.model.undoAll(); 37313 break; 37314 case "redoAll": 37315 this.model.redoAll(-1); 37316 break; 37317 default: 37318 if ( 37319 /* startsWith */ 37320 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(action, "setBreakpoints.") 37321 ) { 37322 const breakpointList = action.substring("setBreakpoints.".length).trim(); 37323 const breakpoints = breakpointList.split(","); 37324 const breakpointInts = ((s) => { 37325 let a = []; 37326 while (s-- > 0) a.push(0); 37327 return a; 37328 })(breakpoints.length); 37329 for (let i = 0; i < breakpointInts.length; i++) { 37330 { 37331 const breakpoint = breakpoints[i]; 37332 let lineNum = -1; 37333 try { 37334 lineNum = javaemul.internal.IntegerHelper.parseInt(breakpoint); 37335 } catch (ex) { 37336 this.mErrors.reportError("'" + breakpoint + "' is not a valid integer. Line number must be a positive integer.", []); 37337 } 37338 if (lineNum <= 0) { 37339 this.mErrors.reportError("Edit number must be a positive integer.", []); 37340 } else { 37341 breakpointInts[i] = lineNum; 37342 } 37343 } 37344 ; 37345 } 37346 this.model.setBreakpoints(breakpointInts); 37347 } else if ( 37348 /* startsWith */ 37349 ((str, searchString, position = 0) => str.substr(position, searchString.length) === searchString)(action, "redoUntilEdit.") 37350 ) { 37351 const editNum = action.substring("redoUntilEdit.".length).trim(); 37352 if (!(editNum === "null" || editNum === "")) { 37353 let eNum = -1; 37354 try { 37355 eNum = javaemul.internal.IntegerHelper.parseInt(editNum); 37356 } catch (ex) { 37357 this.mErrors.reportError("'" + editNum + "' is not a valid integer. Edit number must be a positive integer.", []); 37358 } 37359 if (eNum <= 0) { 37360 this.mErrors.reportError("Edit number must be a positive integer.", []); 37361 } else { 37362 this.model.redoAll(eNum); 37363 } 37364 } 37365 } else super.doAction(action); 37366 break; 37367 } 37368 } 37369}; 37370UndoRedoController["__class"] = "com.vzome.desktop.controller.UndoRedoController"; 37371UndoRedoController["__interfaces"] = ["com.vzome.desktop.api.Controller"]; 37372
37373// src/worker/legacy/from-java/com/vzome/desktop/controller/VectorController.ts 37374var VectorController = class extends DefaultController { 37375 constructor(initial) { 37376 super(); 37377 if (this.coordinates === void 0) { 37378 this.coordinates = null; 37379 } 37380 if (this.field === void 0) { 37381 this.field = null; 37382 } 37383 this.field = initial.getField(); 37384 this.coordinates = ((s) => { 37385 let a = []; 37386 while (s-- > 0) a.push(null); 37387 return a; 37388 })(initial.dimension()); 37389 for (let i = 0; i < this.coordinates.length; i++) { 37390 { 37391 this.coordinates[i] = new NumberController(initial.getField()); 37392 this.coordinates[i].setValue(initial.getComponent(i)); 37393 } 37394 ; 37395 } 37396 } 37397 /** 37398 * 37399 * @param {string} name 37400 * @return {*} 37401 */ 37402 getSubController(name) { 37403 switch (name) { 37404 case "w": 37405 return this.coordinates[0]; 37406 case "x": 37407 return this.coordinates[1]; 37408 case "y": 37409 return this.coordinates[2]; 37410 case "z": 37411 return this.coordinates[3]; 37412 default: 37413 return super.getSubController(name); 37414 } 37415 } 37416 setVector(vector) { 37417 for (let i = 0; i < this.coordinates.length; i++) { 37418 { 37419 const numberController = this.coordinates[i]; 37420 const coord = vector.getComponent(i); 37421 numberController.setValue(coord); 37422 } 37423 ; 37424 } 37425 } 37426 getVector() { 37427 const result = this.field.basisVector(this.coordinates.length, 0); 37428 for (let i = 0; i < this.coordinates.length; i++) { 37429 { 37430 const numberController = this.coordinates[i]; 37431 const coord = numberController.getValue(); 37432 result.setComponent(i, coord); 37433 } 37434 ; 37435 } 37436 return result; 37437 } 37438}; 37439VectorController["__class"] = "com.vzome.desktop.controller.VectorController"; 37440VectorController["__interfaces"] = ["com.vzome.desktop.api.Controller"]; 37441
37442// src/worker/legacy/controllers/picking.js 37443var PickingController = class extends DefaultController { 37444 constructor(renderedModel) { 37445 super(); 37446 this.renderedModel = renderedModel; 37447 } 37448 // There are no implementors of doParamAction() in the Java code 37449 doParamAction(action, params) { 37450 const config = params.getConfig(); 37451 const { id } = config; 37452 if (id) { 37453 const rm = this.renderedModel.getRenderedManifestation(id); 37454 const picked = rm.getManifestation(); 37455 const orbit = rm.getStrutOrbit(); 37456 const length = rm.getStrutLength(); 37457 super.doParamAction(action, new JsProperties({ ...config, picked, orbit, length })); 37458 } else 37459 super.doParamAction(action, params); 37460 } 37461}; 37462
37463// src/worker/legacy/controllers/buildplane.js 37464var BuildPlaneController = class extends DefaultController { 37465 constructor(design, clientEvents) { 37466 super(); 37467 this.design = design; 37468 this.clientEvents = clientEvents; 37469 this.renderedModel = design.renderedModel; 37470 this.orbitSource = design.getOrbitSource(); 37471 this.buildPlanes = this.orbitSource.buildPlanes; 37472 this.renderedModel.addListener({ 37473 shapesChanged: () => false, 37474 // important so RenderedModel.setShapes() will not fail and re-render all the parts 37475 manifestationAdded: (rm) => { 37476 if (rm.getManifestation()?.constructor["__interfaces"]?.indexOf("com.vzome.core.model.Connector") >= 0) 37477 this.latestBall = normalizeRenderedManifestation(rm); 37478 }, 37479 manifestationRemoved: () => { 37480 }, 37481 labelChanged: () => { 37482 }, 37483 colorChanged: () => { 37484 }, 37485 glowChanged: () => { 37486 } 37487 }); 37488 } 37489 setOrbitSource(orbitSource) { 37490 this.orbitSource = orbitSource; 37491 this.buildPlanes = orbitSource.buildPlanes; 37492 this.clientEvents.latestBallAdded(this.latestBall); 37493 } 37494 // There are no implementors of doParamAction() in the Java code, except for 37495 // DefaultController, which just propagates the calls up to the next controller. 37496 doParamAction(action, params) { 37497 const config = params.getConfig(); 37498 switch (action) { 37499 case "STRUT_CREATION_TRIGGERED": { 37500 const { id, plane, zone, index, orientation } = config; 37501 if (id) { 37502 const rm = this.renderedModel.getRenderedManifestation(id); 37503 const anchor = rm.getManifestation().toConstruction(); 37504 const buildPlane = this.buildPlanes[plane]; 37505 const buildZone = buildPlane.zones[zone]; 37506 let axis = buildZone.zone; 37507 const orbit = axis.getOrbit(); 37508 const symmetry = orbit.getSymmetry(); 37509 const permutation = symmetry.getPermutation(orientation); 37510 axis = permutation.permute(axis, 0); 37511 const length = buildZone.vectors[index].scale; 37512 super.doParamAction("StrutCreation", new JsProperties({ anchor, zone: axis, length })); 37513 this.clientEvents.latestBallAdded(this.latestBall); 37514 return; 37515 } 37516 } 37517 case "JOIN_BALLS_TRIGGERED": { 37518 const { id1, id2 } = config; 37519 if (id1 && id2) { 37520 const rm1 = this.renderedModel.getRenderedManifestation(id1); 37521 const rm2 = this.renderedModel.getRenderedManifestation(id2); 37522 const start = rm1.getManifestation().toConstruction(); 37523 const end = rm2.getManifestation().toConstruction(); 37524 super.doParamAction("JoinPointPair", new JsProperties({ start, end })); 37525 return; 37526 } 37527 } 37528 case "HINGE_STRUT_SELECTED": { 37529 const { strutId, centerId, hingeZone: oldHingeZone } = config; 37530 const vectorAlgebra = AlgebraicVectors; 37531 const oldCenterRm = this.renderedModel.getRenderedManifestation(centerId); 37532 if (!oldCenterRm) return; 37533 const id = oldCenterRm.getGuid().toString(); 37534 const oldCenter = oldCenterRm.getLocationAV(); 37535 const { x, y, z } = oldCenter.toRealVector(); 37536 let center = { id, position: [x, y, z] }; 37537 const strutRm = this.renderedModel.getRenderedManifestation(strutId); 37538 if (!strutRm) return; 37539 const strut = strutRm.getManifestation(); 37540 const start = strut.getLocation(); 37541 const end = strut.getEnd(); 37542 const hingeZone = { orbit: strutRm.getStrutOrbit().getName(), orientation: strutRm.getStrutZone() }; 37543 const normal = vectorAlgebra.getNormal(oldCenter, start, end); 37544 if (normal.isOrigin()) { 37545 const strutEnds = new java.util.ArrayList(); 37546 strutEnds.add(start); 37547 strutEnds.add(end); 37548 let { diskZone } = config; 37549 let { orbit, orientation } = diskZone; 37550 const diskNormal = this.orbitSource.getZone(orbit, orientation).normal(); 37551 if (vectorAlgebra.areOrthogonalTo(diskNormal, strutEnds)) { 37552 this.clientEvents.buildPlaneSelected(center, diskZone, hingeZone); 37553 return; 37554 } else { 37555 const { orbit: hingeOrbit, orientation: hingeOrientation } = oldHingeZone; 37556 const hingeNormal = this.orbitSource.getZone(hingeOrbit, hingeOrientation).normal(); 37557 const planeNormal = hingeNormal.cross(strut.getOffset()); 37558 const diskZone2 = this.getZone(planeNormal); 37559 if (!diskZone2) return; 37560 this.clientEvents.buildPlaneSelected(center, diskZone2, hingeZone); 37561 return; 37562 } 37563 } else { 37564 const ball = this.design.getBall(start); 37565 if (!ball) return; 37566 const newCenter = ball.getLocation(); 37567 const newCenterRm = ball.getRenderedObject(); 37568 const id2 = newCenterRm.getGuid().toString(); 37569 const { x: x2, y: y2, z: z2 } = newCenter.toRealVector(); 37570 let center2 = { id: id2, position: [x2, y2, z2] }; 37571 const planeNormal = newCenter.minus(oldCenter).cross(strut.getOffset()); 37572 const diskZone = this.getZone(planeNormal); 37573 if (!diskZone) return; 37574 this.clientEvents.buildPlaneSelected(center2, diskZone, hingeZone); 37575 return; 37576 } 37577 } 37578 default: 37579 super.doParamAction(action, params); 37580 } 37581 } 37582 getZone(normal) { 37583 const planeAxis = this.orbitSource.getAxis(normal); 37584 if (!planeAxis) return null; 37585 const planeDir = planeAxis.getOrbit(); 37586 if (!planeDir.isStandard()) return null; 37587 const orbit = planeDir.getName(); 37588 const orientation = planeAxis.getOrientation(); 37589 return { orbit, orientation }; 37590 } 37591}; 37592
37593// src/worker/legacy/json.js 37594var VertexSet = class { 37595 constructor() { 37596 this.map = /* @__PURE__ */ new Map(); 37597 } 37598 add(vertex) { 37599 const key = vertex.toString(); 37600 if (this.map.has(key)) return; 37601 this.map.set(key, vertex); 37602 } 37603 indexOf(vertex) { 37604 const key = vertex.toString(); 37605 let index = 0; 37606 for (const item of this.map.keys()) { 37607 if (item === key) return index; 37608 ++index; 37609 } 37610 return -1; 37611 } 37612 asArray() { 37613 return Array.from(this.map.values()); 37614 } 37615}; 37616var modelToJS = (manifestations, legacyField, withColors = true) => { 37617 const sortedVertices = new VertexSet(); 37618 const field5 = legacyField.getName(); 37619 let origin = Manifestations.sortVertices(manifestations, sortedVertices); 37620 if (!origin) { 37621 origin = legacyField.origin(3); 37622 } 37623 const balls = []; 37624 const struts = []; 37625 const panels = []; 37626 const iterator = manifestations.iterator(); 37627 while (iterator.hasNext()) { 37628 const man = iterator.next(); 37629 const color = toWebColor(man.getColor()); 37630 if (withColors && man.constructor["__interfaces"].indexOf("com.vzome.core.model.Connector") >= 0) { 37631 const vertex = sortedVertices.indexOf(man.getLocation()); 37632 balls.push({ vertex, color }); 37633 } else if (man.constructor["__interfaces"].indexOf("com.vzome.core.model.Strut") >= 0) { 37634 const vertices2 = [sortedVertices.indexOf(man.getLocation()), sortedVertices.indexOf(man.getEnd())]; 37635 struts.push(withColors ? { vertices: vertices2, color } : vertices2); 37636 } else if (man.constructor["__interfaces"].indexOf("com.vzome.core.model.Panel") >= 0) { 37637 const vertices2 = []; 37638 const panel = man.iterator(); 37639 while (panel.hasNext()) vertices2.push(sortedVertices.indexOf(panel.next())); 37640 panels.push(withColors ? { vertices: vertices2, color } : vertices2); 37641 } 37642 } 37643 const vertices = sortedVertices.asArray().map((vertex) => { 37644 const xyzANs = vertex.minus(origin).getComponents(); 37645 return xyzANs.map((an) => an.toTrailingDivisor().map((str) => BigInt(str))); 37646 }); 37647 if (withColors) 37648 return { field: field5, vertices, balls, struts, panels }; 37649 else 37650 return { field: field5, vertices, edges: struts, faces: panels }; 37651}; 37652
37653// src/worker/legacy/controllers/editor.js 37654var EditorController = class extends DefaultController { 37655 constructor(legacyDesign, core, clientEvents) { 37656 super(); 37657 this.legacyDesign = legacyDesign; 37658 this.core = core; 37659 this.clientEvents = clientEvents; 37660 this.symmetries = {}; 37661 this.symmController = null; 37662 this.changeCount = 0; 37663 } 37664 reportError(message, args) { 37665 console.log("controller error:", message, args); 37666 if (message === Controller.UNKNOWN_ERROR_CODE) { 37667 const exception = args[0]; 37668 const action = args[1]; 37669 if (exception.constructor.__class === "com.vzome.core.commands.Command.Failure") { 37670 this.clientEvents.errorReported(exception.message); 37671 } else { 37672 this.clientEvents.errorReported(`Internal error: unable to perform action "${action}"`); 37673 } 37674 } else 37675 this.clientEvents.errorReported(message); 37676 } 37677 initialize() { 37678 const { 37679 renderedModel, 37680 toolsModel, 37681 bookmarkFactory, 37682 history, 37683 fieldApp, 37684 legacyField, 37685 editor, 37686 editContext 37687 } = this.legacyDesign; 37688 this.changeCount = this.legacyDesign.getChangeCount(); 37689 this.setErrorChannel({ 37690 reportError: (message, args) => this.reportError(message, args) 37691 }); 37692 const pickingController = new PickingController(renderedModel); 37693 this.addSubController("picking", pickingController); 37694 const buildPlaneController = new BuildPlaneController(this.legacyDesign, this.clientEvents); 37695 this.addSubController("buildPlane", buildPlaneController); 37696 const polytopesController = new PolytopesController(editor, editContext); 37697 this.addSubController("polytopes", polytopesController); 37698 const undoRedoController = new UndoRedoController(history); 37699 this.addSubController("undoRedo", undoRedoController); 37700 const bookmarkController = new ToolFactoryController(bookmarkFactory); 37701 this.addSubController("bookmark", bookmarkController); 37702 const quaternionController = new VectorController(legacyField.basisVector(4, AlgebraicVector.W4)); 37703 this.addSubController("quaternion", quaternionController); 37704 const measureController = new MeasureController(editor, renderedModel); 37705 this.addSubController("measure", measureController); 37706 const strutBuilder = new StrutBuilderController(editContext, legacyField).withGraphicalViews(true).withShowStrutScales(true); 37707 this.addSubController("strutBuilder", strutBuilder); 37708 const docSymmetrySystem = editor.getSymmetrySystem(); 37709 let docLabel = fieldApp.getDefaultSymmetryPerspective().getLabel(); 37710 const symmPerspectives = fieldApp.getSymmetryPerspectives().iterator(); 37711 while (symmPerspectives.hasNext()) { 37712 const symper = symmPerspectives.next(); 37713 const label = symper.getLabel(); 37714 if (!!label) { 37715 let name = symper.getSymmetry().getName(); 37716 const system = this.legacyDesign.getSymmetrySystem(name); 37717 if (system.getName() === docSymmetrySystem.getName()) { 37718 docLabel = label; 37719 } 37720 const symmController = new SymmetryController(label, strutBuilder, system, renderedModel); 37721 strutBuilder.addSubController(`symmetry.${label}`, symmController); 37722 this.addSubController(`symmetry.${label}`, symmController); 37723 this.symmetries[label] = symmController; 37724 } 37725 } 37726 const toolsController = new ToolsController(toolsModel); 37727 toolsController.addTool(toolsModel.get("bookmark.builtin/ball at origin")); 37728 strutBuilder.addSubController("tools", toolsController); 37729 renderedModel.addListener({ 37730 shapesChanged: () => false, 37731 // this allows RenderedModel.setShapes() to not fail and re-render all the parts 37732 manifestationAdded: () => { 37733 }, 37734 // We don't need these incremental changes, since we'll batch render after 37735 manifestationRemoved: () => { 37736 }, 37737 labelChanged: () => { 37738 }, 37739 colorChanged: () => { 37740 }, 37741 glowChanged: () => { 37742 } 37743 }); 37744 return docLabel; 37745 } 37746 getProperty(name) { 37747 switch (name) { 37748 case "edited": { 37749 return new Boolean(this.changeCount !== this.legacyDesign.getChangeCount()).toString(); 37750 } 37751 case "symmetry": 37752 return this.symmController.getProperty("label"); 37753 case "single.orbit": 37754 case "disable.known.directions": 37755 return super.getProperty(name); 37756 default: 37757 if (name.startsWith("field.label.")) { 37758 return this.core.getFieldLabel(name.substring("field.label.".length)); 37759 } 37760 if (!name.startsWith("defaultShapes.")) 37761 console.log("EditorController getProperty fall through: ", name); 37762 return super.getProperty(name); 37763 } 37764 } 37765 getCommandList(name) { 37766 const { symmetrySystems, legacyField } = this.legacyDesign; 37767 switch (name) { 37768 case "symmetryPerspectives": 37769 return Object.keys(this.symmetries); 37770 case "field.irrationals": 37771 return AlgebraicField.getIrrationals(legacyField); 37772 case "field.multipliers": 37773 return AlgebraicField.getMultipliers(legacyField); 37774 case "fields": 37775 return this.core.getFieldNames(); 37776 // Each entry is "Name #rrggbb"; see getZometoolColors in core.js. 37777 case "zometoolColors": 37778 return this.core.getZometoolColors(); 37779 case "affinePolygon.modes": { 37780 const modes = AffinePolygon.getPolygonModes(legacyField).keySet().toArray(); 37781 return modes.slice(3); 37782 } 37783 case "affinePolygon.labels": { 37784 const modes = AffinePolygon.getPolygonModes(legacyField).values().toArray(); 37785 return modes.slice(3); 37786 } 37787 default: 37788 console.log("EditorController getCommandList fall through: ", name); 37789 return super.getCommandList(name); 37790 } 37791 } 37792 setSymmetryController(label) { 37793 this.symmController = this.symmetries[label]; 37794 let symmetrySystem = this.symmController.getOrbitSource(); 37795 this.legacyDesign.setSymmetrySystem(symmetrySystem.getName()); 37796 const planes = resolveBuildPlanes(symmetrySystem.buildPlanes); 37797 const { orientations, symmetry, permutations } = symmetrySystem; 37798 const scalars = ((field5) => { 37799 return [...Array(field5.getOrder() - 1).keys()].map((i) => field5.getUnitTerm(i + 1).evaluate()); 37800 })(symmetry.getField()); 37801 const resourcePath = symmetrySystem.getModelResourcePath(); 37802 const embedding = symmetrySystem.getEmbedding(); 37803 const fieldName = symmetry.getField().getName(); 37804 const symmetryName = symmetrySystem.getName(); 37805 this.clientEvents.symmetryChanged({ orientations, permutations, scalars, planes, resourcePath, fieldName, symmetryName, embedding });
37806 this.getSubController("buildPlane").setOrbitSource(symmetrySystem); 37807 this.getSubController("strutBuilder").setSymmetryController(this.symmController); 37808 this.firePropertyChange("symmetry", "", label); 37809 } 37810 // There are no implementors of doParamAction() in the Java code, except for 37811 // DefaultController, which just propagates the calls up to the next controller. 37812 doParamAction(action, params) { 37813 switch (action) { 37814 case "undoToManifestation": { 37815 const { history, editor } = this.legacyDesign; 37816 const { picked } = params.getConfig(); 37817 history.undoToManifestation(picked); 37818 editor.notifyListeners(); 37819 break; 37820 } 37821 case "clearChanges": { 37822 this.changeCount = this.legacyDesign.getChangeCount(); 37823 this.firePropertyChange("edited", "", "false"); 37824 break; 37825 } 37826 case "usedOrbits": { 37827 const { renderedModel } = this.legacyDesign; 37828 const usedOrbits = new java.util.HashSet(); 37829 const rMans = renderedModel.iterator(); 37830 while (rMans.hasNext()) { 37831 const rm = rMans.next(); 37832 const shape = rm.getShape(); 37833 const orbit = shape.getOrbit(); 37834 if (orbit != null) 37835 usedOrbits.add(orbit); 37836 } 37837 this.symmController.availableController.doAction("setNoDirections"); 37838 const orbits = usedOrbits.iterator(); 37839 while (orbits.hasNext()) { 37840 const orbit = orbits.next(); 37841 this.symmController.availableController.doAction("enableDirection." + orbit.getName()); 37842 } 37843 break; 37844 } 37845 case "setBuildOrbitAndLength": { 37846 const { picked } = params.getConfig(); 37847 const rm = picked.getRenderedObject(); 37848 const length = rm.getStrutLength(); 37849 const orbit = rm.getStrutOrbit(); 37850 this.symmController.availableController.doAction("enableDirection." + orbit.getName()); 37851 this.symmController.buildController.doAction("setSingleDirection." + orbit.getName()); 37852 const lmodel = this.symmController.buildController.getSubController("currentLength"); 37853 lmodel.setActualLength(length); 37854 break; 37855 } 37856 case "exportText": 37857 const { 37858 format, 37859 selection, 37860 camera, 37861 lighting, 37862 exporters, 37863 height = 500, 37864 width = 800, 37865 useShapes = true, 37866 drawOutlines = true, 37867 monochrome = false, 37868 showBackground = true, 37869 useLighting = true 37870 } = params.getConfig(); 37871 let exported; 37872 switch (format) { 37873 case "mesh": 37874 case "cmesh": { 37875 const source = selection ? this.legacyDesign.editor.selection : this.legacyDesign.editor.getRealizedModel(); 37876 const mesh = modelToJS(source, this.legacyDesign.legacyField, format === "cmesh"); 37877 exported = JSON.stringify(mesh, null, 2); 37878 break; 37879 } 37880 case "pdf": 37881 case "ps": 37882 case "svg": { 37883 const { renderedModel } = this.legacyDesign; 37884 const config = { format, height, width, useShapes, drawOutlines, monochrome, showBackground, useLighting }; 37885 exported = exporters.export2d({ renderedModel, camera, lighting }, config); 37886 break; 37887 } 37888 case "pov": { 37889 lighting.useWorldDirection = true; 37890 exported = exporters.export3dDocument(this.legacyDesign, c
37890amera, lighting, { format, height, width }); 37891 break; 37892 } 37893 default: { 37894 const { renderedModel } = this.legacyDesign; 37895 exported = exporters.export3d({ renderedModel, camera, lighting }, { format, height, width }); 37896 break; 37897 } 37898 } 37899 this.clientEvents.textExported(action, exported); 37900 break; 37901 default: 37902 if (action.startsWith("setSymmetry.")) { 37903 const name = action.replace(/^setSymmetry\./, ""); 37904 this.setSymmetryController(name); 37905 } else if (action.startsWith("AdjustSelectionByOrbitLength/")) { 37906 const { orbit, length } = params.getConfig(); 37907 const tail = action.substring("AdjustSelectionByOrbitLength/".length); 37908 let config; 37909 if (orbit && length) { 37910 const mode = tail; 37911 config = { mode, orbit, length }; 37912 } else { 37913 const props = new JsProperties({}); 37914 this.symmController.parseOrbitLength(tail, props); 37915 config = props.getConfig(); 37916 } 37917 this.legacyDesign.configureAndPerformEdit("AdjustSelectionByOrbitLength/" + config.mode, config); 37918 this.firePropertyChange("edited", "", "true"); 37919 } else { 37920 this.legacyDesign.configureAndPerformEdit(action, params && params.getConfig()); 37921 this.firePropertyChange("edited", "", "true"); 37922 } 37923 break; 37924 } 37925 } 37926 doAction(action) { 37927 this.doParamAction(action, new JsProperties()); 37928 } 37929}; 37930
37931// src/worker/legacy/serializer.js 37932var serializeLighting = (lighting, doc) => { 37933 const getRGB = (color) => { 37934 const [r, g, b] = [parseInt(color.substr(1, 2), 16), parseInt(color.substr(3, 2), 16), parseInt(color.substr(5, 2), 16)]; 37935 return r + "," + g + "," + b; 37936 }; 37937 const { ambientColor, backgroundColor, directionalLights } = lighting; 37938 const sceneModel = doc.createElement("sceneModel"); 37939 sceneModel.setAttribute("ambientLight", getRGB(ambientColor)); 37940 sceneModel.setAttribute("background", getRGB(backgroundColor)); 37941 for (const dlight of directionalLights) { 37942 const { color, direction } = dlight; 37943 const child = doc.createElement("directionalLight"); 37944 child.setAttribute("color", getRGB(color)); 37945 child.setAttribute("x", String(direction[0])); 37946 child.setAttribute("y", String(direction[1])); 37947 child.setAttribute("z", String(direction[2])); 37948 sceneModel.appendChild(child); 37949 } 37950 return sceneModel; 37951}; 37952var serializeViewing = (camera, doc) => { 37953 const viewing = doc.createElement("Viewing"); 37954 const viewmodel = serializeCamera(camera, doc); 37955 viewing.appendChild(viewmodel); 37956 return viewing; 37957}; 37958var serializeCamera = (camera, doc) => { 37959 const { near, far, width, distance, perspective, lookAt, lookDir, up } = camera; 37960 const viewmodel = doc.createElement("ViewModel"); 37961 viewmodel.setAttribute("distance", String(distance)); 37962 viewmodel.setAttribute("far", String(far)); 37963 viewmodel.setAttribute("near", String(near)); 37964 viewmodel.setAttribute("parallel", String(!perspective)); 37965 viewmodel.setAttribute("stereoAngle", "0.0"); 37966 viewmodel.setAttribute("width", String(width)); 37967 { 37968 const child = doc.createElement("LookAtPoint"); 37969 child.setAttribute("x", String(lookAt[0])); 37970 child.setAttribute("y", String(lookAt[1])); 37971 child.setAttribute("z", String(lookAt[2])); 37972 viewmodel.appendChild(child); 37973 } 37974 { 37975 const child = doc.createElement("UpDirection"); 37976 child.setAttribute("x", String(up[0])); 37977 child.setAttribute("y", String(up[1])); 37978 child.setAttribute("z", String(up[2])); 37979 viewmodel.appendChild(child); 37980 } 37981 { 37982 const child = doc.createElement("LookDirection"); 37983 child.setAttribute("x", String(lookDir[0])); 37984 child.setAttribute("y", String(lookDir[1])); 37985 child.setAttribute("z", String(lookDir[2])); 37986 viewmodel.appendChild(child); 37987 } 37988 return viewmodel; 37989}; 37990var serializeScenes = (scenes, doc) => { 37991 const notes = doc.createElement("notes"); 37992 for (const scene of scenes) { 37993 const { title, snapshot, camera, content } = scene; 37994 if (snapshot < 0) 37995 continue; 37996 const page = doc.createElement("page"); 37997 page.setAttribute("title", title); 37998 page.setAttribute("snapshot", snapshot); 37999 const viewModel = serializeCamera(camera, doc); 38000 page.appendChild(viewModel); 38001 const contentElem = doc.createElement("content"); 38002 contentElem.setAttribute("xml:space", "preserve"); 38003 if (!!content) { 38004 contentElem.setTextContent(content); 38005 } 38006 page.appendChild(contentElem); 38007 notes.appendChild(page); 38008 } 38009 return notes; 38010}; 38011var serializeVZomeXml = (legacyDesign, lighting, camera, scenes) => { 38012 const doc = new JavaDomDocument(); 38013 const newRoot = doc.createElement("vzome:vZome"); 38014 newRoot.setAttribute("xmlns:vzome", "http://xml.vzome.com/vZome/4.0.0/"); 38015 newRoot.setAttribute("edition", "online"); 38016 newRoot.setAttribute("version", "1.0"); 38017 newRoot.setAttribute("buildNumber", REVISION); 38018 legacyDesign.serializeToDom(doc, newRoot); 38019 const sceneModel = serializeLighting(lighting, doc); 38020 const frustumRatio = camera.far / camera.distance; 38021 camera.far = camera.distance * frustumRatio; 38022 const viewing = serializeViewing(camera, doc); 38023 const notes = serializeScenes(scenes, doc); 38024 newRoot.appendChild(sceneModel); 38025 newRoot.appendChild(viewing); 38026 newRoot.appendChild(notes); 38027 return '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n' + newRoot.toIndentedString(""); 38028}; 38029
38030// src/worker/legacy/controllers/index.js 38031var createControllers = (design, core, renderingChanges, clientEvents) => { 38032 const { renderedModel } = design; 38033 const controller = new EditorController(design, core, clientEvents); 38034 const symmLabel = controller.initialize(); 38035 const strutBuilder = controller.getSubController("strutBuilder"); 38036 strutBuilder.setMainScene(renderingChanges); 38037 controller.setSymmetryController(symmLabel); 38038 const wrapper = new ControllerWrapper("", "", controller, clientEvents); 38039 wrapper.startPreviewStrut = (ballId, direction) => { 38040 const [x, y, z] = direction; 38041 const rm = renderedModel.getRenderedManifestation(ballId); 38042 const point = rm?.getManifestation()?.toConstruction(); 38043 if (point) { 38044 strutBuilder.startRendering(point, new RealVector(x, y, z)); 38045 } else 38046 throw new Error(`No ball for ID ${ballId}`); 38047 }; 38048 wrapper.movePreviewStrut = (direction) => { 38049 const [x, y, z] = direction; 38050 strutBuilder.previewStrut.zoneBall.setVector(new RealVector(x, y, z)); 38051 }; 38052 wrapper.scalePreviewStrut = (increment) => { 38053 const lengthController = strutBuilder.previewStrut.getLengthController(); 38054 lengthController.setScale(lengthController.getScale() + increment); 38055 }; 38056 wrapper.endPreviewStrut = () => { 38057 strutBuilder.previewStrut.finishPreview(); 38058 wrapper.renderScene(); 38059 controller.firePropertyChange("edited", "", "true"); 38060 }; 38061 return wrapper; 38062}; 38063var snapCamera = (symmController, upArray, lookArray) => { 38064 const snapper = symmController.getSnapper(); 38065 let up = new RealVector(...upArray); 38066 let look = new RealVector(...lookArray); 38067 look = snapper.snapZ(look).normalize(); 38068 up = snapper.snapY(look, up).normalize(); 38069 const toArray = (rv) => { 38070 const { x, y, z } = rv; 38071 return [x, y, z]; 38072 }; 38073 return { up: toArray(up), lookDir: toArray(look) }; 38074}; 38075var initializeDesign = (loading, polygons, legacyDesign, core, clientEvents) => { 38076 const { lighting, camera, scenes, snapshotNodes, history, targetEdit } = legacyDesign; 38077 const renderHistory = new RenderHistory(legacyDesign, polygons); 38078 const interpreter = new Interpreter(legacyDesign, renderHistory); 38079 const renderingChanges = renderedModelTransducer(renderHistory.getShapes(), clientEvents); 38080 if (loading) { 38081 interpreter.interpret(Step.DONE); 38082 const internalTarget = interpreter.getInternalEditNumber(targetEdit); 38083 if (internalTarget !== void 0) 38084 history.goToEdit(internalTarget); 38085 } 38086 const shapes28 = renderHistory.getShapes(); 38087 const orbitSource = legacyDesign.getOrbitSource(); 38088 const { orientations } = orbitSource; 38089 const embedding = orbitSource.getEmbedding(); 38090 let instances; 38091 let snapshots; 38092 if (loading) { 38093 snapshots = snapshotNodes.map((nodeId) => renderHistory.getSnapshot(nodeId, true)); 38094 instances = snapshots.pop(); 38095 } else { 38096 instances = renderHistory.getSnapshot("--START--"); 38097 snapshots = []; 38098 } 38099 scenes.splice(0, 0, { title: "default scene", camera, snapshot: -1 }); 38100 if (polygons) 38101 clientEvents.scenesDiscovered({ lighting, scenes }); 38102 else 38103 clientEvents.sceneChanged({ shapes: [], camera, lighting }); 38104 const rendered = { embedding, orientations, polygons, shapes: shapes28, instances, snapshots }; 38105 const renderedClientEvents = { 38106 ...clientEvents, 38107 symmetryChanged: (details) => { 38108 rendered.orientations = details.orientations; 38109 rendered.embedding = details.embedding; 38110 clientEvents.symmetryChanged(details); 38111 } 38112 }; 38113 const wrapper = createControllers(legacyDesign, core, renderingChanges, renderedClientEvents); 38114 wrapper.snapCamera = snapCamera; 38115 wrapper.renderScene = () => { 38116 renderHistory.recordSnapshot("--END--", "--END--", []); 38117 instances.splice(0, Infinity, ...renderHistory.currentSnapshot); 38118 }; 38119 wrapper.getScene = (editId, before) => renderHistory.getSnapshot(editId, before); 38120 wrapper.interpretToBreakpoint = (editId, before) => { 38121 interpreter.interpret(Step.DONE, editId); 38122 return before ? "--END--" : interpreter.getLastEdit(); 38123 }; 38124 wrapper.serializeVZomeXml = (camera2, lighting2, scenes2) =>
38124 serializeVZomeXml(legacyDesign, camera2, lighting2, scenes2); 38125 return { wrapper, rendered }; 38126}; 38127var newDesign = async (fieldName, clientEvents) => { 38128 const core = await initialize(); 38129 const legacyDesign = core.documentFactory(fieldName); 38130 return initializeDesign(false, true, legacyDesign, core, clientEvents); 38131}; 38132var loadDesign = async (xml, debug, polygons, clientEvents) => { 38133 const core = await initialize(); 38134 const legacyDesign = core.parse(xml); 38135 const { xmlTree, field: field5 } = legacyDesign; 38136 if (field5.unknown) { 38137 throw new Error(`Field "${field5.name}" is not supported.`); 38138 } 38139 clientEvents.xmlParsed(xmlTree); 38140 return initializeDesign(!debug, polygons, legacyDesign, core, clientEvents); 38141}; 38142export { 38143 AlgebraicMatrix, 38144 AlgebraicVector, 38145 AlgebraicVectors, 38146 GitHubShare, 38147 GrahamScan2D, 38148 coloredMeshToSimpleMesh, 38149 enhanced4dToSimpleMesh, 38150 enhanced4dToTopologicalMesh, 38151 enhancedMeshTo4OFF, 38152 initialize, 38153 loadAndInjectResource, 38154 loadDesign, 38155 newDesign, 38156 simpleMeshToTopologicalMesh, 38157 util 38158};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.