FlexPainter.js 172 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453
  1. /** FlexPainter Beta version 0.42e
  2. *
  3. * Copyright (c) 2020 by CVH.
  4. * All rights reserved.
  5. *
  6. * Permission to use, copy, modify, and/or distribute this software
  7. * for any purpose with or without fee is hereby granted, provided
  8. * that the above copyright notice and this permission notice appear
  9. * in all copies.
  10. *
  11. * With the unmatched assistance of Andrew Mustun.
  12. * This script and auxiliary files are donated to the QCAD project.
  13. * Copyright (c) 2011-2020 by Andrew Mustun. All rights reserved.
  14. *
  15. * QCAD is free software: you can redistribute it and/or modify
  16. * it under the terms of the GNU General Public License as published by
  17. * the Free Software Foundation, either version 3 of the License, or
  18. * (at your option) any later version.
  19. *
  20. * QCAD is distributed in the hope that it will be useful,
  21. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  22. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  23. * GNU General Public License for more details.
  24. *
  25. * You should have received a copy of the GNU General Public License
  26. * along with QCAD.
  27. */
  28. include("../MathExamples.js");
  29. include("scripts/simple.js"); // Added for simple API
  30. //# Issue Solved # Use "scripts/simple.js" instead of "simple.js"
  31. //https://qcad.org/rsforum/viewtopic.php?t=6528
  32. /**
  33. * \class FlexPainter
  34. * \ingroup ecma_misc_examples_mathexamples
  35. * \brief Cast and morphs flexible painters over selected based entities.
  36. *
  37. */
  38. function FlexPainter(guiAction) {
  39. MathExamples.call(this, guiAction);
  40. };
  41. FlexPainter.prototype = new MathExamples();
  42. FlexPainter.includeBasePath = includeBasePath;
  43. /**
  44. * This action paints over all selected line based entities from start to end
  45. * and minimalistic morphs the painter set to the curvatures.
  46. * Casting common entities locally and/or globally the user can edit with any tool available.
  47. * If to much torsion is applied to a roller stamp it actually smudges. This is not considered as a flaw.
  48. * Results may be better with radii of curvature of about the painters actual side width or larger.
  49. */
  50. FlexPainter.prototype.beginEvent = function() {
  51. MathExamples.prototype.beginEvent.call(this);
  52. //debugger;
  53. // FlexPainter.init test for PROTOOLS to prevent loading the addon
  54. // These should be available at runtime
  55. // Prevent FlexPainter to run without PRO resources:
  56. if (!hasPlugin("PROTOOLS")) {
  57. // Push warning to command history and terminate
  58. qDebug("FlexPainter: NO PROTOOLS!");
  59. EAction.handleUserWarning("FlexPainter: NO PROTOOLS!");
  60. EAction.handleUserMessage("Nothing casted. Command terminated");
  61. this.terminate();
  62. return;
  63. } // -> Continue with PRO resources
  64. // FlexPainter.init states "Requires Document"
  65. // A document should be available....Retrieve document, units:
  66. var document = this.getDocument();
  67. this.units = document.getUnit();
  68. var di = this.getDocumentInterface();
  69. //debugger;
  70. // Terminate without document units:
  71. if (isNull(this.units) || !isNumber(this.units) || this.units == 0) {
  72. // Push warning to command history and terminate
  73. qDebug("NO Doc units! ; Command terminated");
  74. EAction.handleUserWarning("NO Doc units! FlexPainter syncs with units.");
  75. EAction.handleUserMessage("Nothing casted. Command terminated");
  76. debugger; // ###### Catch this In the act !!!
  77. // CAN NOT handle no units! Halt in debugger mode
  78. // # ToDo # Revert to defaults
  79. debugger; // ######
  80. this.terminate(); // Or terminate altogether
  81. return;
  82. } // -> Continue with document units
  83. // FlexPainter.init states "Requires Selection"
  84. // A selection should be available....Retrieve selection:
  85. var ids = document.querySelectedEntities(); // Query Qlist with selected
  86. const idn = ids.length; // Number of selected entities
  87. // Terminate without selection:
  88. if (idn == 0) {
  89. // Push warning to command history and terminate
  90. qDebug("No selection! Command terminated");
  91. EAction.handleUserWarning("No selection!");
  92. EAction.handleUserInfo("Please, make a selection");
  93. this.terminate();
  94. return;
  95. } // -> Continue with selection
  96. // Show Dialog & terminate if cancelled
  97. if (!this.showDialog()) {
  98. // Push 'Cancelled' to command history and terminate
  99. qDebug("Dialog cancelled! Command terminated");
  100. EAction.handleUserMessage("Cancelled!");
  101. EAction.handleUserMessage("Command terminated");
  102. this.terminate();
  103. return;
  104. }
  105. // Cronometration
  106. var crono = Date.now();
  107. //debugger;
  108. // Retrieve painters specifics
  109. var painterLength = this.mainData[0][2];
  110. var painterStepSize = this.mainData[0][3];
  111. var knotlength = this.knotData[0][2];
  112. var appendiceslength = 0.00;
  113. // Sum used appendice lengths, do is locked with required and existing
  114. if (this.doBeginApex) appendiceslength += this.beginApexData[0][2];
  115. if (this.doEndApex) appendiceslength += this.endApexData[0][2];
  116. if (this.doInserts) appendiceslength += knotlength * this.insertions;
  117. // # Busy # SetType: Slanted, Boxed, Stepped, Periodic v0.38 postponed
  118. var underStepped = (painterStepSize * this.mainScaleS) < (painterLength * this.mainScaleX);
  119. var boxStepped = (painterStepSize * this.mainScaleS) == (painterLength * this.mainScaleX);
  120. var overStepped = (painterStepSize * this.mainScaleS) > (painterLength * this.mainScaleX);
  121. // # Busy # There is a difference between A: hasNeatEnds or B: underStepped v0.39 postponed
  122. this.hasNeatEnds = (this.beginData[0][0] > 0 || this.endData[0][0] > 0);
  123. // Initiate pi/2, counters, trash can and intermediate message string
  124. this.orthoAngle = Math.PI/2;
  125. this.countEntities = 0;
  126. this.countNewEntities = 0;
  127. this.countCastpoints = 0;
  128. this.trashCan = []; // create Empty trash collector Array
  129. var msg = "";
  130. // With grouped castings: collect all additions to one single operation
  131. if (this.groupCasts) startTransaction();
  132. // Intentional +TAB: Transaction Block
  133. // Process all selected entities
  134. for (var i=0; i<idn; i++) { // Cycle through all selected entities
  135. var id = ids[i]; // Pick Qlist entry
  136. var entity = document.queryEntity(id); // Pick entity
  137. // Limit selection
  138. // (entity based)
  139. if (
  140. !isLineEntity(entity) &&
  141. !isArcEntity(entity) &&
  142. !isCircleEntity(entity) &&
  143. !isEllipseEntity(entity) &&
  144. !isPolylineEntity(entity) &&
  145. !isSplineEntity(entity)
  146. ) {
  147. // Push smothered warning to command history
  148. msg = entityTypeToString(entity.getType(), false) + " skipped!";
  149. qDebug(msg);
  150. if (!this.beVerbose) EAction.handleUserWarning(msg);
  151. continue; // Skip to next selected entity
  152. }
  153. var shape = entity.castToShape();
  154. // Set isTanCloObj flag for all geometrically and tangentially Closed Forms
  155. // (entity based)
  156. this.isTanCloObj = false;
  157. if (isPolylineEntity(entity) || isSplineEntity(entity)) {
  158. if (entity.isGeometricallyClosed()) {
  159. if (isSplineEntity(entity)) {
  160. this.isTanCloObj = entity.isPeriodic();
  161. }
  162. else if (isPolylineEntity(entity)) {
  163. // Near tangentially connected
  164. this.isTanCloObj = RMath.fuzzyAngleCompare(shape.getDirection1() + Math.PI, shape.getDirection2());
  165. }
  166. }
  167. }
  168. else if (isCircleEntity(entity) || isFullEllipseEntity(entity)) {
  169. this.isTanCloObj = true;
  170. }
  171. // Determine casting type
  172. // # Issue Solved # Its far more faster to set how to cast on the selected
  173. // base entity then to test how to cast every castpoint.
  174. if (isLineShape(shape) || isArcShape(shape) || isSplineShape(shape)) this.castingType = 1;
  175. if (isPolylineShape(shape)) this.castingType = 3;
  176. // # Issue Fixed # No mathematical Closed Form.
  177. // Is by serie expansion. Is very time consuming
  178. if (isEllipseEntity(entity)) {
  179. // # Workaround # Ellipses by casting on a Polyline approximateWithArcs
  180. // # Issue # Relative accuracy, absolute accuracy sizes with the magnetude
  181. var shape = shape.approximateWithArcs(128);
  182. this.castingType = 3;
  183. if (this.isTanCloObj) shape.convertToClosed;
  184. }
  185. if (this.isTanCloObj) this.castingType++; // Promote type 1 > 2 || 3 > 4
  186. if (isCircleShape(shape)) this.castingType = 5;
  187. //debugger;
  188. // Get entity length after possible approximateWithArcs
  189. this.objlength = shape.getLength();
  190. // Understepped on Open Form:
  191. // Reserve 1 painter Length, n.knots+1 times
  192. var chainsN = this.insertions + 1;
  193. var reservedLength = 0.00;
  194. if (!this.isTanCloObj) {
  195. if (underStepped) {
  196. var reservedLength = chainsN * painterLength;
  197. }
  198. }
  199. // Fit a number of actual painter StepSize lengths
  200. if (this.isTanCloObj) { // Closed Forms: +No apexes, +n.knots, 1 more as possible
  201. var fitN = Math.ceil(
  202. (this.objlength - (knotlength * this.insertions * this.mainScaleX)) /
  203. // Divided by
  204. (painterStepSize * this.mainScaleS));
  205. }
  206. else { // Open Forms: +Apexes, +n.knots, 1 more as possible
  207. var fitN = Math.ceil(
  208. (this.objlength - ((reservedLength + appendiceslength) * this.mainScaleX)) /
  209. // Divided by
  210. (painterStepSize * this.mainScaleS));
  211. // Not forced to scale: ceil() - 1 = floor()
  212. if (!this.forcedDyn) fitN--;
  213. }
  214. // Fit a larger multiple of chainsN to neatly divide in subchains
  215. fitN = Math.trunc(Math.ceil(fitN / chainsN)) * chainsN;
  216. // Test for too small entities
  217. if (fitN <= 3) {
  218. // Push smothered warning to command history
  219. qDebug("Too short. Skipped");
  220. if (!this.beVerbose) EAction.handleUserWarning(entityTypeToString(entity.getType(), false) + " Too short. Skipped!");
  221. continue; // Skip to next selected entity
  222. }
  223. // Test for too many castings
  224. if (fitN > 9999) {
  225. // Push smothered warning to command history
  226. qDebug("Too many castings (>9999). Base skipped");
  227. if (!this.beVerbose) EAction.handleUserWarning("Too many castings (>9999). Base skipped!");
  228. continue; // Skip to next selected entity
  229. }
  230. //debugger;
  231. // Dynamic scaler for continuous Closed Forms and forced to scale Open Forms
  232. var dynScale = 1.00;
  233. if (this.isTanCloObj) { // Continuous Closed Forms: +No apexes, +n.Knots
  234. dynScale =
  235. this.objlength /
  236. // Divided by sum
  237. ((knotlength * this.insertions * this.mainScaleX)
  238. + (fitN * painterStepSize * this.mainScaleS));
  239. }
  240. else { // Open Forms: +Apexes, +n.Konts
  241. if (this.forcedDyn) { // Forced to scale Open Forms
  242. dynScale =
  243. this.objlength /
  244. // Divided by sum
  245. (((reservedLength + appendiceslength) * this.mainScaleX)
  246. + (fitN * painterStepSize * this.mainScaleS));
  247. } // Else: Dynamic scaler stays f1.00
  248. }
  249. // Set actual scalers
  250. this.scalerY = this.mainScaleY;
  251. if (this.preserveLook) this.scalerY = this.mainScaleY * dynScale;
  252. this.scalerS = this.mainScaleS * dynScale;
  253. this.scalerX = this.mainScaleX * dynScale;
  254. // Push smothered dynScale info to command history
  255. msg = entityTypeToString(entity.getType(), false);
  256. msg += (dynScale == 1) ? " not dynScaled" : " dynScaled : " + dynScale;
  257. qDebug(msg);
  258. if (!this.beVerbose) EAction.handleUserInfo(msg);
  259. // Only overtepped painters end in voids
  260. if (overStepped) {
  261. var painterVoid = (painterStepSize * this.scalerS) - (painterLength * this.scalerX);
  262. }
  263. else {
  264. var painterVoid = 0.00;
  265. }
  266. // Local surplus absolute:
  267. // Any chain can locally only end with one such void if any
  268. var surPlusLabs = painterVoid;
  269. // Global surplus absolute:
  270. // Any void left globally
  271. var surPlusGabs =
  272. this.objlength
  273. - ((reservedLength + appendiceslength) * this.scalerX)
  274. - (fitN * painterStepSize * this.scalerS);
  275. // # ToDo # Treat originally slanted with neat ends different
  276. if (!this.isTanCloObj) {
  277. if (!this.forcedDyn) {
  278. // Pro / Cons ??? v0.39 postponed
  279. // Aligned and exposing a void globally is automatic
  280. // Overstepped with Apex not
  281. }
  282. }
  283. // On Open Forms:
  284. // In any chain fits one single Null-Length painter extra
  285. // Except centered: There will be no place for more then 1 full painter
  286. if (!this.isTanCloObj && (this.factorsurPlus != 0.50)) {
  287. if (painterLength == 0.00) {
  288. fitN+= chainsN;
  289. surPlusLabs -= painterVoid
  290. }
  291. }
  292. // On Open Forms: Besides Null-Length painters:
  293. // The complete chain may expose a void globally
  294. // The global void may admit only one more painter
  295. // Except centered: There will be no place for more then 1 full painter
  296. if (!this.isTanCloObj && painterLength > 0.00) {
  297. if (!this.doBeginApex) { // Required and existing
  298. // Aligned at end may expose a void globally
  299. if (this.factorsurPlus == 1.00) {
  300. if (surPlusGabs > painterLength * this.scalerX) {
  301. // Add extra
  302. fitN ++;
  303. surPlusGabs -= painterLength * this.scalerX;
  304. // The local void is then no longer exposed
  305. surPlusLabs = 0.0;
  306. }
  307. }
  308. }
  309. if (!this.doEndApex) { // Required and existing
  310. // Aligned at start may expose a void globally
  311. if (this.factorsurPlus == 0.00) {
  312. if (surPlusGabs > painterLength * this.scalerX) {
  313. // Add extra
  314. fitN ++;
  315. surPlusGabs -= painterLength * this.scalerX;
  316. // The local void is then no longer exposed
  317. surPlusLabs = 0.0;
  318. }
  319. }
  320. }
  321. }
  322. // Cast reserved too if any
  323. if (reservedLength > 0.00) fitN += chainsN;
  324. // Initiate global collector
  325. this.dotStringData = []; // Empty global splines fitpoint collector
  326. this.nodStringData = []; // Empty global polylines vertices collector
  327. // Aligning & Shifting
  328. if (this.isTanCloObj) { // All Closed Forms shifting by % off stepsize
  329. this.distFromStart = painterStepSize * this.scalerS * this.closeShift;
  330. }
  331. else { // All Open Forms aligning
  332. this.distFromStart = surPlusGabs * this.factorsurPlus;
  333. }
  334. // With non-grouped casting: collects additions to one single operation every entity
  335. if (!this.groupCasts) startTransaction();
  336. // Intentional +TAB Transaction Block
  337. // Optionally add active sublayer to the entity it's layer.
  338. if (this.subLayerCasts) {
  339. var layerName = entity.getLayerName() + " ... Painted";
  340. this.addActiveLayer(layerName, document, di)
  341. }
  342. // Cast & morphs painters over Entities
  343. // ------------------------------------
  344. //debugger;
  345. // Optionally cast begin apex painter On Open Forms
  346. if (this.doBeginApex) { // Required and existing
  347. if (!this.isTanCloObj) { // On Open Forms
  348. this.countCastpoints += this.castPainter(shape, this.beginApexData);
  349. this.countNewEntities += this.beginApexData[0][0] - this.beginApexData[0][1];
  350. this.distFromStart += this.beginApexData[0][2] * this.scalerX;
  351. }
  352. }
  353. // Repeat chain + insertion over whole the entity
  354. // Runs at least once, no insertion on last run
  355. for (var m=0; m<=this.insertions; m++) { // Cycle through all chains
  356. // Sub-chain shifting
  357. this.distFromStart += surPlusLabs * this.factorsurPlus / chainsN;
  358. // Add begin painter if any on Open Forms
  359. if (this.beginData[0][0] > 0) {
  360. if (!this.isTanCloObj) { // On Open Forms
  361. this.countCastpoints += this.castPainter(shape, this.beginData);
  362. this.countNewEntities += this.beginData[0][0] - this.beginData[0][1];
  363. // Length=0=fixed!
  364. }
  365. }
  366. // Cast main painters repetitively
  367. var startedAt = this.distFromStart
  368. var nMax = fitN / chainsN;
  369. for (var n=1; n<=nMax; n++) { // Cycle and repeat main painter. Zero omitted = virtual(n+1)
  370. this.countCastpoints += this.castPainter(shape, this.mainData);
  371. this.countNewEntities += this.mainData[0][0] - this.mainData[0][1];
  372. this.distFromStart = startedAt + (n * painterStepSize * this.scalerS);
  373. } // Loop main painter
  374. // Add end painter if any on Open Forms
  375. if (this.endData[0][0] > 0) {
  376. if (!this.isTanCloObj) { // On Open Forms
  377. this.distFromStart += (painterLength * this.scalerX) - (painterStepSize * this.scalerS);
  378. this.countCastpoints += this.castPainter(shape, this.endData);
  379. this.countNewEntities += this.endData[0][0] - this.endData[0][1];
  380. // Length=0=fixed!
  381. }
  382. }
  383. // Sub-chain shifting
  384. this.distFromStart += surPlusLabs * (1-this.factorsurPlus) / chainsN
  385. // Optionally cast insertion
  386. // Except for the last loop
  387. if (m < this.insertions) {
  388. if (this.doInserts) { // Required and existing
  389. this.countCastpoints += this.castPainter(shape, this.knotData);
  390. this.countNewEntities += this.knotData[0][0] - this.knotData[0][1];
  391. this.distFromStart += this.knotData[0][2] * this.scalerX;
  392. }
  393. }
  394. } // Loop chains
  395. // Optionally cast end apex painter on Open Forms
  396. if (this.doEndApex) { // Required and existing
  397. if (!this.isTanCloObj) { // On Open Forms
  398. this.distFromStart = this.objlength
  399. - (surPlusGabs * (1-this.factorsurPlus))
  400. - (this.endApexData[0][2] * this.scalerX);
  401. this.countCastpoints += this.castPainter(shape, this.endApexData);
  402. this.countNewEntities += this.endApexData[0][0] - this.endApexData[0][1];
  403. //this.distFromStart += this.endApexData[0][2] * this.scalerX;
  404. }
  405. }
  406. // Cast global splines if any.
  407. // Open/closed on open/closed Forms
  408. var jsn = this.dotStringData.length;
  409. for (var js=0; js<jsn; js++) { // Cycle through all global splines
  410. addSpline(this.dotStringData[js], this.isTanCloObj);
  411. } // Loop global splines
  412. this.countNewEntities += jsn;
  413. // Cast global polys if any.
  414. // Open/closed on open/closed Forms
  415. var jpn = this.nodStringData.length;
  416. for (var jp=0; jp<jpn; jp++) { // Cycle through all global polys
  417. addPolyline(this.nodStringData[jp], this.isTanCloObj, false);
  418. } // Loop global polys
  419. this.countNewEntities += jpn;
  420. // ------------------------------------
  421. // Intentional -TAB Transaction Block
  422. // Optionally parse all additions as one single operation every entity
  423. if (!this.groupCasts) {
  424. var castResult = endTransaction(); // No error if without any
  425. if (castResult.isFailed()) { // Casting failed
  426. break; // Break out selected entities loop
  427. }
  428. // When not cast in group cast one by one
  429. // # Issue Fixed # 1.Not showing castings sequentially
  430. // # Issue Fixed # 2.Fix slows down unnecessary
  431. if (i != idn - 1) { // # Workaround # 2.Skip only one and last
  432. this.updatePreview(); // # Workaround # 1.Best fix to show progress sequentially
  433. }
  434. }
  435. // Optionally mark for deletion and increase processed entities counter
  436. if (this.delEntity) this.trashCan.push(id);
  437. this.countEntities++;
  438. } // Loop all selected entities
  439. // Intentional -TAB: Transaction Block
  440. // Optionally parse all additions as one single operation
  441. if (this.groupCasts) var castResult = endTransaction(); // No error if without any
  442. // Optionally empty trash can
  443. if (this.delEntity) {
  444. var jn = this.trashCan.length;
  445. if (jn > 0) {
  446. // Collect deletions
  447. op = new RDeleteObjectsOperation();
  448. for (var j=0; j<jn; j++) { // Cycle through all necessary deletions
  449. // Query the entity stored copy back from the document
  450. // and use this to delete the entity. See ExDeleteObject.js
  451. op.deleteObject(document.queryEntity(this.trashCan[j]));
  452. } // Loop all deletions
  453. di.applyOperation(op);
  454. // # ToDo # On groupCasts transfer selection to casted v0.42 ???
  455. // # Issue # Selecting too many can greatly slow down Qcad
  456. }
  457. }
  458. // Push summary to command history
  459. if (this.countEntities == 0 || castResult.isFailed()) { // With no castings
  460. // If none casted
  461. if (this.countEntities == 0) {
  462. qDebug("Nothing casted!? Command terminated");
  463. EAction.handleUserWarning("Nothing casted!? Command terminated");
  464. }
  465. // If castResult.isFailed
  466. // # Issue Fixed # Without suited entities in selection castResult is not set
  467. // # Workaround # Also countEntities isNull, 2e test of OR is not processed
  468. // Added 'else' to if (castResult.isFailed())
  469. else if (castResult.isFailed()) {
  470. qDebug("Casting failed! Command terminated");
  471. EAction.handleUserWarning("Casting failed! Command terminated");
  472. }
  473. }
  474. else { // With any castings
  475. if (!this.beVerbose) { // Smothered
  476. qDebug("- - - = * = - - -");
  477. EAction.handleUserInfo("- - - = * = - - -");
  478. msg = "Casted " + this.countNewEntities + " entities by casting " + this.countCastpoints + " points";
  479. qDebug(msg);
  480. EAction.handleUserInfo(msg);
  481. msg = "over " + this.countEntities;
  482. if (this.countEntities == idn) {
  483. msg += (this.countEntities > 1) ? " entities" : " entity";
  484. }
  485. else {
  486. msg += " of " + idn;
  487. msg += (idn > 1) ? " entities" : " entity";
  488. }
  489. msg += " as ";
  490. if (this.countEntities == 1 || this.groupCasts ) {
  491. msg += "one addition";
  492. }
  493. else {
  494. msg += this.countEntities;
  495. msg += (this.countEntities > 1) ? " addition" : " additions";
  496. }
  497. qDebug(msg);
  498. EAction.handleUserInfo(msg);
  499. msg = (this.subLayerCasts) ? "on sub layers. " : "on the active layer.";
  500. qDebug(msg);
  501. EAction.handleUserInfo(msg);
  502. if (this.delEntity && jn > 0) {
  503. msg = "Deleted " + jn;
  504. msg += (jn > 1) ? " base entities" : " base entity";
  505. msg += " as one deletion";
  506. qDebug(msg);
  507. EAction.handleUserInfo(msg);
  508. }
  509. } // Else: not smothered
  510. // Push command end message to command history
  511. qDebug("Command end");
  512. msg = "Casting complete (" + (Date.now() - crono) + "ms)";
  513. EAction.handleUserMessage(msg);
  514. }
  515. // Command end
  516. this.terminate();
  517. return;
  518. };
  519. /**
  520. * Casts painter points local / global.
  521. *
  522. * \return Number of casted points
  523. */
  524. // Sub-script of FlexPainter.beginEvent
  525. FlexPainter.prototype.castPainter = function (shape, painterData) {
  526. // Faster: local const // Faster: at top
  527. const objlength = this.objlength;
  528. const distFromStart = this.distFromStart;
  529. const skn = painterData[0][0]; // Number of entries in the dataset
  530. var countCastpoints = 0;
  531. // Cycle through all painter definitions
  532. for (var sk=1; sk<=skn;sk++) { // Zero omitted = Header
  533. var newEntityData = []; // Empty local collector
  534. var partData = painterData[sk]; // Pick painter data part
  535. var nominator = partData[0];
  536. if (nominator.startsWith("Dots")) {
  537. var dotStringN = 1*nominator.slice(4); // Isolate dot-string number
  538. nominator = nominator.substring(0,4);
  539. }
  540. if (nominator.startsWith("Nods")) {
  541. var nodStringN = 1*nominator.slice(4); // Isolate node-string number
  542. nominator = nominator.substring(0,4);
  543. }
  544. var kn = partData.length - 1; // Number of painter coordinates
  545. countCastpoints += kn;
  546. // Cycle through all painter data parts
  547. for (var k=1; k<=kn;k++) { // Zero omitted = header
  548. var offsetAtDist = partData[k][0];
  549. var scaledOffsetSize = partData[k][1] * this.scalerY;
  550. var activeDist = distFromStart + (offsetAtDist * this.scalerX);
  551. // Catch end crossers
  552. if (activeDist > objlength) {
  553. // activeDist = objlength;
  554. if (!this.isTanCloObj) {
  555. qDebug("TooFarCaster"); //non-MSWinTesting
  556. if (!this.beVerbose) EAction.handleUserWarning("TooFarCaster"); //MSWinTesting
  557. debugger; // ###### Catch this In the act !!!
  558. // Faulty! Halt in debugger mode
  559. debugger; // ######
  560. }
  561. }
  562. // Use different methods to determine castPoint & castAngle
  563. switch(this.castingType) {
  564. case 1:
  565. // Over Lines, Arcs & open Splines simply by castPoint on shape
  566. // Lines, Arcs NO hard ending. Splines stiff ending, is no error, avoid crossing
  567. // # Issue # IS NOT accurate on Splines, flaw larger rather near an ending?!
  568. var castPoint = shape.getPointWithDistanceToStart(activeDist);
  569. // # Issue Fixed # Geo closed spline: Cast on begin has angle of ending
  570. if (RMath.fuzzyCompare(activeDist, 0.00, RS.PointTolerance)) {
  571. // # Workaround # Fixed with offset a tiny bit from start
  572. // # Issue # Fixing solution slows center loop
  573. // # Issue # Fixing solution counts for all type 1
  574. var castAngle = shape.getAngleAt(2*RS.PointTolerance, RS.FromStart);
  575. qDebug("Type1BeginCastFix"); //non-MSWinTesting
  576. if (!this.beVerbose) EAction.handleUserWarning("Type1BeginCastFix"); //MSWinTesting
  577. }
  578. else {
  579. var castAngle = shape.getAngleAt(activeDist, RS.FromStart);
  580. }
  581. break;
  582. case 2:
  583. // Over continuous closed Splines simply by castPoint on shape.
  584. // isTanCloObj, simply restart from zero
  585. var castPoint = shape.getPointWithDistanceToStart(activeDist % objlength);
  586. var castAngle = shape.getAngleAt(activeDist, RS.FromStart);
  587. break;
  588. case 3:
  589. // Over open Polyline & EllipseArc by castPoint on ClosestSegment
  590. // Hard ending, avoid crossing
  591. // # Issue Fixed # Geo closed poly: Cast on end has angle of beginning
  592. // As does casting on all vertices = angle at next segment
  593. if (RMath.fuzzyCompare(activeDist, objlength, RS.PointTolerance)) {
  594. // # Workaround # Fixed with offset a tiny bit from end
  595. // # Issue # This IS NOT a tiny bit. SEE also case 4
  596. // # Issue # Fixing solution slows center loop
  597. qDebug("Type3HugeEndCastFix"); //non-MSWinTesting
  598. if (!this.beVerbose) EAction.handleUserWarning("Type3HugeEndCastFix"); //MSWinTesting
  599. var castPoint = shape.getPointWithDistanceToStart(objlength - (2000*RS.PointTolerance));
  600. }
  601. else {
  602. var castPoint = shape.getPointWithDistanceToStart(activeDist);
  603. }
  604. var segmentShape = shape.getSegmentAt(shape.getClosestSegment(castPoint));
  605. var castAngle = segmentShape.getAngleAtPoint(castPoint);
  606. break;
  607. case 4:
  608. // Over continuous closed Polyline by castPoint on ClosestSegment.
  609. // isTanCloObj, simply restart from zero
  610. // # Issue Fixed # Freak BUG casting non dynscaled very near endpoint eg. delta 4e-14, @453.25--7166 on 453.25--717 long
  611. if (RMath.fuzzyCompare(activeDist, objlength, RS.PointTolerance)) {
  612. // # Workaround # Fixed with catching ClPolyNearEnder and force at full length
  613. // # Issue # Fixing solution slows center loop
  614. activeDist = objlength;
  615. qDebug("ClPolyNearEnderFix"); //non-MSWinTesting
  616. if (!this.beVerbose) EAction.handleUserWarning("ClPolyNearEnderFix"); //MSWinTesting
  617. };
  618. var castPoint = shape.getPointWithDistanceToStart(activeDist % objlength);
  619. var segmentShape = shape.getSegmentAt(shape.getClosestSegment(castPoint));
  620. var castAngle = segmentShape.getAngleAtPoint(castPoint);
  621. break;
  622. case 5:
  623. // Over Circles by equation for castPoint & castAngle.
  624. // Circles have no ending
  625. var centerAngle = activeDist / shape.getRadius();
  626. var castPoint = shape.getPointAtAngle(centerAngle);
  627. var castAngle = centerAngle + this.orthoAngle;
  628. break;
  629. default:
  630. // Should not occur, good practices to include
  631. } // End switch(this.castingType)
  632. // Cast a new vector
  633. var castVector = new RVector(castPoint.x - Math.sin(castAngle) * scaledOffsetSize,
  634. castPoint.y + Math.cos(castAngle) * scaledOffsetSize);
  635. // Catch casting null-vectors
  636. if (isNull(castVector)) {
  637. qDebug("Casting a Null-Vector!");
  638. EAction.handleUserWarning("Casting a Null-Vector!"); //MSWinTesting
  639. debugger; // ###### Catch this In the act !!!
  640. // Faulty! Halt in debugger mode
  641. debugger; // ######
  642. }
  643. // Push casted point to collectors
  644. switch(nominator) {
  645. case "Point": // One point
  646. case "Line": // Two points
  647. case "Poly": // [Vertex, Bulge, Relative] in an array
  648. // # Issue Fixed # addPoly not working with Rvectors
  649. // # Workaround # Split castVector back in x and y
  650. // https://qcad.org/rsforum/viewtopic.php?t=6618
  651. var bulging = partData[k][2];
  652. newEntityData.push([castVector.x,castVector.y,bulging]);
  653. break;
  654. case "Spline": // Points in an array
  655. newEntityData.push(castVector);
  656. break;
  657. case "Arc": // Center point, radius, startAngle, endAngle, reversed
  658. newEntityData.push(castVector);
  659. // Add radius[2], beginangle[3], endangle[4], reversed[5]
  660. newEntityData.push(partData[k][2] * this.scalerY);
  661. // # Issue Solved # simple_create.js works with degrees and deg2rad
  662. // Solved with rad2deg(val)
  663. newEntityData.push(partData[k][3] + rad2deg(castAngle));
  664. newEntityData.push(partData[k][4] + rad2deg(castAngle));
  665. newEntityData.push(partData[k][5]);
  666. break;
  667. case "Circle": // Center point, radius
  668. newEntityData.push(castVector);
  669. // Add radius[2]
  670. newEntityData.push(partData[k][2] * this.scalerY);
  671. break;
  672. case "Dots": // Push to global splines
  673. // Solution not push but add past end
  674. if (this.dotStringData.length == dotStringN) {
  675. // Start a new dot-string collector with this first item
  676. this.dotStringData[this.dotStringData.length] = [castVector];
  677. }
  678. else { // Add to existing dot-string collector
  679. this.dotStringData[dotStringN][this.dotStringData[dotStringN].length] = castVector;
  680. }
  681. break;
  682. case "Nods": // Push to global polys
  683. // Solution not push but add past end
  684. var bulging = partData[k][2];
  685. // # Issue Solved # Global bulges don't flip
  686. // Solved with flip sign
  687. if (bulging != 0.00) { // When bulging isNOT zero
  688. if (this.flipPainter) bulging = -bulging;
  689. } // -> Continue with conditioned bulge
  690. if (this.nodStringData.length == nodStringN) {
  691. // Start a new node-string collector with this first item (double squared brackets)
  692. this.nodStringData[this.nodStringData.length] = [[castVector.x,castVector.y,bulging]];
  693. }
  694. else { // Add to existing node-string collector
  695. this.nodStringData[nodStringN][this.nodStringData[nodStringN].length] = [castVector.x,castVector.y,bulging];
  696. }
  697. break;
  698. default:
  699. // Should not occur, good practices to include
  700. } // End switch(nominator)
  701. } // Loop all painter data parts
  702. // Cast new entity with local collector
  703. // # Issue Fixed # Is no error with empty newEntityData, may eventually lead to AppCrash
  704. // # Issue # Speed: Replace simple_create calls with function return addShape
  705. if (!isNull(newEntityData)) { // # Workaround # Catch null-vectors, only cast with data
  706. switch(nominator) {
  707. case "Spline": // Cast open spline with array of collected casted fitpoints
  708. addSpline(newEntityData, false);
  709. break;
  710. case "Line": // Cast line with collected casted ending points
  711. addLine(
  712. newEntityData[0],
  713. newEntityData[1]);
  714. break;
  715. case "Point": // Cast point at casted point
  716. addPoint(newEntityData[0]);
  717. break;
  718. case "Arc": // Cast arc at casted center point
  719. addArc(
  720. newEntityData[0],
  721. newEntityData[1],
  722. newEntityData[2],
  723. newEntityData[3],
  724. newEntityData[4]);
  725. break;
  726. case "Circle": // Cast circle at casted center point
  727. addCircle(
  728. newEntityData[0],
  729. newEntityData[1]);
  730. break;
  731. case "Poly": // Cast open poly non-relative with array of collected: casted vertices & bulges
  732. addPolyline(newEntityData, false, false);
  733. default:
  734. // Dots and Nods are not handled local
  735. } // End switch(nominator)
  736. } // Else: cast nothing
  737. } // Loop all painter definitions
  738. return countCastpoints;
  739. };
  740. /**
  741. * Shows the painter dialog.
  742. *
  743. * \return True if the dialog was accepted, false if it was cancelled.
  744. */
  745. // Based on the scaling dialog Widget
  746. FlexPainter.prototype.showDialog = function() {
  747. var dialog = WidgetFactory.createDialog(FlexPainter.includeBasePath, "FlexPainterDialog.ui");
  748. var widgets = getWidgets(dialog);
  749. // Initiate the dialog comboboxes:
  750. // Before any dialog change functions is active
  751. this.initWidgetsCombo(dialog);
  752. // Initiate the dialog change functions:
  753. // # Issue Fixed # Immediately active, and not fully functional yet
  754. // The order of initWidgets and restoreState has pro an cons
  755. // # Workaround # Chosen for initWidgetsCombo--initWidgets--restoreState
  756. this.initWidgets(dialog);
  757. // Load persistent dialog entries:
  758. // Restoring old values will trigger dialog change functions
  759. WidgetFactory.restoreState(dialog);
  760. // Detect first load:
  761. // A zero-width painter never makes sense
  762. if (widgets["MainWidth"].getValue() == 0.00) { // Is the first load
  763. // Painters, Insertions, Icons and Prefs are by default in UI
  764. qDebug("Initial Use: " + RUnit.unitToName(this.units)); //non-MSWinTesting
  765. EAction.handleUserMessage("Initial Use: " + RUnit.unitToName(this.units)); //MSWinTesting
  766. // Remember using current document units:
  767. widgets["UnitsLabel"].text = RUnit.unitToName(this.units);
  768. // Initiate default painter set:
  769. // Normally done with:
  770. // this.PainterSetInit("Default");
  771. // # Workaround # 1: Tried with success:
  772. // widgets["PainterSelection"].setCurrentText("Default");
  773. // # Issue Solved # 2: The Dialog starts with the non-existent set "Default"
  774. // Solved with "CurtainRopeProto". Offcourse
  775. widgets["PainterSelection"].setCurrentText("CurtainRopeProto");
  776. // Set an appropriate default painter width:
  777. // The idee behind this is: Metric starts with 10 units
  778. // 10mm with mm, 10m with m, 10km with km
  779. // Imperial start with an equivalent counterpart
  780. switch(this.units) {
  781. case 4:
  782. default: // and all not specified (Metric)
  783. widgets["MainWidth"].setValue(10.00);
  784. // # Issue Fixed # 1: Not functional for first use
  785. // This activates the change function and fails again for the same reason the get's are created
  786. // And this did not occur with WidgetFactory.restoreState without any former use
  787. // Fixed with setCurrentText some lines higher
  788. break;
  789. case 1: // 1 Inch 25.4mm => 10mm
  790. case 8: // 1 Microinch 25.4nm => 10nm
  791. case 9: // 1 Mil 25.4micron => 10micron
  792. widgets["MainWidth"].setValue(0.3937);
  793. break;
  794. case 2: // 1 Foot 0.3048m => 10m
  795. widgets["MainWidth"].setValue(32.8084);
  796. break;
  797. case 3: // 1 Mile 1.609km => 10km
  798. widgets["MainWidth"].setValue(6.215);
  799. break;
  800. case 10: // 1 Yard 0.9144m => 10m
  801. widgets["MainWidth"].setValue(10.9361);
  802. break;
  803. } // End switch(this.units)
  804. // 'PreserveLook' is set by default
  805. // The change functions are active
  806. // Values in MainPainterBox will auto adapt
  807. }
  808. else { // Not the first load
  809. // When former used units differs adapt dimensions appropriately:
  810. if (widgets["UnitsLabel"].text != RUnit.unitToName(this.units)) {
  811. // When current or former is non metric apply correction:
  812. if (!RUnit.isMetric(RUnit.parseUnit(widgets["UnitsLabel"].text)) || !RUnit.isMetric(this.units)) {
  813. qDebug("ReCalcPersistentDims"); //non-MSWinTesting
  814. EAction.handleUserMessage("ReCalcPersistentDims"); //MSWinTesting
  815. var correction = RUnit.convert(1.00, this.units, RUnit.parseUnit(widgets["UnitsLabel"].text));
  816. // Apply correction on all 3 preferences separately if relevant:
  817. if (widgets["PreserveLook"].checked===false) { // Not base9
  818. // # Issue Fixed # Dialog RMathLineEdit not active yet.
  819. // # .getValue returns no real values
  820. // # .text may return a formula
  821. // # Workaround # RMath.eval(text)
  822. // # Issue # Not checked if its a number
  823. widgets["MainWidth"].setValue(RMath.eval(widgets["MainWidth"].text) / correction);
  824. // Values in MainPainterBox are prevented to adapt proportionally:
  825. widgets["MainLengthX"].setValue(RMath.eval(widgets["MainLengthX"].text) / correction);
  826. widgets["MainStepX"].setValue(RMath.eval(widgets["MainStepX"].text) / correction);
  827. }
  828. else { // is base9, apply correction and adapt base9:
  829. widgets["MainWidth"].setValue(RMath.eval(widgets["MainWidth"].text) / correction);
  830. // Values in MainPainterBox will auto adapt
  831. }
  832. } // Else: Both metric: Do nothing
  833. // Remember using current document units:
  834. widgets["UnitsLabel"].text = RUnit.unitToName(this.units);
  835. } // Else: No change: Do nothing
  836. // # Issue Solved # When PainterSelection is equal former use
  837. // only PainterBox checked-state is included in restoreState(dialog)
  838. // Later found Q&A @ https://www.qcad.org/bugtracker/index.php?do=details&task_id=1863
  839. // Without change in PainterSelection, PainterBox enabled-state can not adapt
  840. // Solved with no current text and currentIndex = -1 in UI combo
  841. // restoreState(dialog) will set former painter set used
  842. // PainterBox enabled-state will auto adapt by change function
  843. } // End first load detection
  844. //debugger;
  845. // Repeat Dialog until entries are flawless
  846. do {
  847. // # Issue # Simple & Dirty! Surely there are neater ways to do this
  848. var errmsg = undefined; // Reset former error
  849. // Activate FlexPainter dialog modal
  850. if (!dialog.exec()) {
  851. destr(dialog);
  852. EAction.activateMainWindow();
  853. return false; // Dialog rejected
  854. }
  855. // Retrieve user numerical preferences
  856. // -----------------------------------
  857. // A) Get and validate mainScaleY entry:
  858. this.mainScaleY = Math.abs(widgets["MainWidth"].getValue()) / 9;
  859. // # Issue # Not checked if its a number or positif
  860. // Limit mainScaleY:
  861. if (this.mainScaleY > 111) { // Upper limit
  862. this.mainScaleY = 111;
  863. errmsg = "! Width crossed upper limit !";
  864. }
  865. if (this.mainScaleY < 0.01) { // Lower limit
  866. this.mainScaleY = 0.01;
  867. errmsg = "! Width crossed lower limit !";
  868. }
  869. // Push any 'width error' warning to command history:
  870. if (!isNull(errmsg)) { // when a width error
  871. qDebug(errmsg);
  872. EAction.handleUserWarning(errmsg);
  873. errmsg = "!"; // Remember there was an error
  874. } // End is length error
  875. // Text entries stay text, re-parse value to UI as text:
  876. widgets["MainWidth"].setText(this.mainScaleY * 9);
  877. // B) Get and validate MainPainterBox entries:
  878. if (widgets["PreserveLook"].checked===true) {
  879. this.preserveLook = true;
  880. // Preserve the look with uniform scaling:
  881. this.mainScaleX = this.mainScaleY;
  882. this.mainScaleS = this.mainScaleY;
  883. }
  884. else { // 'PreserveLook' NOT checked
  885. this.preserveLook = false;
  886. // Get and validate mainScaleX entry:
  887. // Painter set can have main painter length zero, avoid Div0
  888. if (this.mainData[0][2] == 0.00){
  889. this.mainScaleX = 1.00; // Just to avoid zero or Div0 later on
  890. if (widgets["MainLengthX"].getValue() > 0.00) {
  891. // # Issue # Not checked if its a number
  892. errmsg = "! Is zero-length painter !";
  893. }
  894. }
  895. else { // Not a null-length painter
  896. this.mainScaleX = Math.abs(widgets["MainLengthX"].getValue()) / this.mainData[0][2];
  897. // # Issue # Not checked if its a number or positif
  898. }
  899. // Limit mainScaleY:
  900. if (this.mainScaleX > 111) { // Upper limit
  901. this.mainScaleX = 111;
  902. errmsg = "! Length crossed upper limit !";
  903. }
  904. if (this.mainScaleX < 0.01) { // Lower limit
  905. this.mainScaleX = 0.01;
  906. errmsg = "! Length crossed lower limit !";
  907. }
  908. // Push any 'length error' warning to command history
  909. if (!isNull(errmsg)) {
  910. if (errmsg != "!") { // when a length error
  911. qDebug(errmsg);
  912. EAction.handleUserWarning(errmsg);
  913. errmsg ="!" // Remember there was an error
  914. } // End is length error
  915. } // End push error
  916. // Text entries stay text, re-parse value to UI as text:
  917. widgets["MainLengthX"].setText(this.mainData[0][2] * this.mainScaleX);
  918. // Get and validate mainScaleS entry
  919. this.mainScaleS = Math.abs(widgets["MainStepX"].getValue()) / this.mainData[0][3];
  920. // # Issue # Not checked if its a number or positif
  921. if (this.mainScaleS > 111) { // Upper limit
  922. this.mainScaleS = 111;
  923. errmsg = "! Stepsize crossed upper limit !";
  924. }
  925. if (this.mainScaleS < 0.01) { // Lower limit
  926. this.mainScaleS = 0.01;
  927. errmsg = "! Stepsize crossed lower limit !";
  928. }
  929. // Push stepsize error warning to command history:
  930. if (!isNull(errmsg)) {
  931. if (errmsg != "!") { // when a stepsize error
  932. qDebug(errmsg);
  933. EAction.handleUserWarning(errmsg);
  934. errmsg ="!" // Remember there was an error
  935. } // End is stepsize error
  936. } // End push error
  937. // Text entries stay text, re-parse value to UI as text:
  938. widgets["MainStepX"].setValue(this.mainData[0][3] * this.mainScaleS);
  939. } // End validate MainPainterBox
  940. } // Loop until entries are flawless
  941. while (!isNull(errmsg));
  942. // Retrieve user Closed Forms shifting preference (0-100)
  943. this.closeShift = widgets["CloseShift"].value / 100;
  944. // Retrieve user casting preferences
  945. this.flipPainter = (widgets["FlipPainter"].checked===true);
  946. this.groupCasts = (widgets["GroupCasts"].checked===true);
  947. this.subLayerCasts = (widgets["SubLayerCasts"].checked===true);
  948. this.doBeginApex = (widgets["DoBeginApex"].checked===true);
  949. // Only do if definition has length (doubling the checked/enabled lock)
  950. if (this.beginApexData[0][2] === 0) this.doBeginApex = false;
  951. this.doEndApex = (widgets["DoEndApex"].checked===true);
  952. // Only do if definition has length (doubling the checked/enabled lock)
  953. if (this.endApexData[0][2] === 0) this.doEndApex = false;
  954. this.doInserts = (widgets["DoInserts"].checked===true);
  955. // Only do if definition has length (doubling the checked/enabled lock)
  956. if (this.knotData[0][2] === 0) this.doInserts = false;
  957. // # ToDo # Temporary fixed insertions for testing
  958. // Should be zero with doInserts = false
  959. this.insertions = 0;
  960. this.beVerbose = (widgets["BeVerbose"].checked===true);
  961. this.delEntity = (widgets["DelEntity"].checked===true);
  962. // Flipping is inverse scaling in Y
  963. if (this.flipPainter) this.mainScaleY = -(this.mainScaleY);
  964. // Retrieve user Open Forms scaling preferences
  965. this.factorsurPlus = 0.00;
  966. if (widgets["ForcedDyn"].checked===true) {
  967. this.forcedDyn = true; // Start with no surPlusGabs length
  968. }
  969. else { // Not forced to scale dynamically: May have some surPlusGabs length
  970. if (widgets["AlignCenter"].checked===true) {
  971. this.factorsurPlus = 0.50; // Start with half the surPlusGabs length
  972. }
  973. else if (widgets["AlignEnd"].checked===true) {
  974. this.factorsurPlus = 1.00; // Start with the full surPlusGabs length
  975. } // Else: ("AlignStart") or start with none
  976. }
  977. // Retrieve user painter set selection
  978. // Both text based
  979. this.painterSet = widgets["PainterSelection"].currentText;
  980. this.painterKnot = widgets["KnotSelection"].currentText;
  981. // Push smothered painter summary to command history
  982. if (!this.beVerbose) {
  983. EAction.handleUserInfo("Version Beta 0.42e");
  984. EAction.handleUserInfo("Painter set: " + this.painterSet);
  985. EAction.handleUserInfo("Width: " + (9 * this.mainScaleY));
  986. EAction.handleUserInfo("Length: " + (this.mainData[0][2] * this.mainScaleX));
  987. EAction.handleUserInfo("Stepsize: " + (this.mainData[0][3] * this.mainScaleS));
  988. EAction.handleUserInfo("- - - = * = - - -");
  989. }
  990. // Force persistent dialog entries, save them and finish
  991. widgets["BeVerbose"].checked = true; // Super persistent =checked
  992. widgets["DelEntity"].checked = false; // Super persistent =unchecked
  993. WidgetFactory.saveState(dialog);
  994. destr(dialog);
  995. return true; // Dialog accepted
  996. };
  997. /**
  998. * Add an Active Layer.
  999. */
  1000. // Based on ExAddLayer.js
  1001. FlexPainter.prototype.addActiveLayer = function(layerName, document, di) {
  1002. if (!document.hasLayer(layerName)) {
  1003. var op = new RModifyObjectsOperation();
  1004. // Set tool title used for undo/redo information:
  1005. op.setText(qsTr("Add Active SubLayer"));
  1006. var linetypeId = document.getLinetypeId("CONTINUOUS");
  1007. // new RLayer (document, name, frozen & locked = false, color, linetypeId, lineweight, off)
  1008. var layer = new RLayer(document, layerName, false, false, new RColor("green"), linetypeId, RLineweight.Weight013, false);
  1009. op.addObject(layer);
  1010. di.applyOperation(op);
  1011. EAction.handleUserInfo(qsTr("FP added layer:"));
  1012. EAction.handleUserInfo("> " + layerName);
  1013. }
  1014. di.setCurrentLayer(layerName);
  1015. };
  1016. /**
  1017. * Initiate the FlexPainter dialog change functions.
  1018. */
  1019. // Based on the scaling dialog Widget
  1020. FlexPainter.prototype.initWidgets = function(widget, postfix) {
  1021. if (isNull(postfix)) { // Unknown purpose, left as was
  1022. postfix = "";
  1023. }
  1024. //debugger;
  1025. // HERE IN SCOPE (but static)
  1026. // widget (parsed)
  1027. // postfix (parsed)
  1028. var widgets = getWidgets(widget);
  1029. // this.beVerbose
  1030. // FlexPainter.includeBasePath
  1031. // HERE NOT IN SCOPE
  1032. // this.PainterSetInit("whatever")
  1033. // this.mainData[0][(0,1)]
  1034. // this.beginApexData[0][0]
  1035. // this.endApexData[0][0]
  1036. // this.knotData[0][0]
  1037. // On PainterSelection change:
  1038. // Continuously: Adapt Preview icons
  1039. // Re-initiate painter set & Prefs
  1040. // Force base9 and parse MainWidth to MainPainterBox
  1041. widgets["PainterSelection"].currentTextChanged.connect(
  1042. function(currentText) {
  1043. // # ToDo # Check set data named 'currentText' and report if none
  1044. // Adapt icons:
  1045. widgets["PreviewPainters"].icon = new QIcon(FlexPainter.includeBasePath + "/Icons/" + currentText + ".svg");
  1046. // # ToDo # Only one icon set yet. currentText Hardcoded here as "CurtainRopeProto"
  1047. widgets["PreviewKnot"].icon = new QIcon(FlexPainter.includeBasePath + "/Icons/" + "CurtainRopeProto" + "Knot" +".svg");
  1048. //debugger;
  1049. // Re-initiate painter set:
  1050. // # Issue Fixed # FlexPainter.PainterSetInit() out of scope
  1051. // # Workaround # getPainterSet functions (calls PainterSetInit)
  1052. getPainterSet(currentText, widgets["BeVerbose"].checked===true);
  1053. // Adapt for Apexes and Insertions:
  1054. // # Issue Fixed # Painter data out of scope
  1055. // # Workaround # getDoBeginApex, getDoEndApex and getDoInserts functions (return boolean)
  1056. widgets["DoBeginApex"].setEnabled(getDoBeginApex());
  1057. widgets["DoEndApex"].setEnabled(getDoEndApex());
  1058. widgets["DoInserts"].setEnabled(getDoInserts());
  1059. // Width remains: Force MainPainterBox to base9 by PreserveLook:
  1060. // # Issue # Simple & Dirty! Toggle twice to get the correct state and actions
  1061. widgets["PreserveLook"].checked = false
  1062. widgets["PreserveLook"].checked = true
  1063. // OR The same actions as in widgets["PreserveLook"].toggled.connect when ischecked
  1064. });
  1065. // On MainWidth change:
  1066. // Continuously: Dismiss negative entries
  1067. // With PreserveLook parse entries in MainWidth to MainPainterBox
  1068. widgets["MainWidth"].textChanged.connect(
  1069. function(text) {
  1070. // Don't allow entry to start with 'minus' and some kind of digit:
  1071. widgets["MainWidth"].text = text.replace(/^-(\d||[\.\,]\d)/, "\$1");
  1072. // With PreserveLook parse MainWidth to MainPainterBox base9:
  1073. if (widgets["PreserveLook"].checked===true) {
  1074. var scaleW = widgets["MainWidth"].getValue() / 9; // can be NaN
  1075. // # Issue Fixed # Painter data out of scope
  1076. // # Workaround # getBase9Length and getBase9Stepsize functions (return dimension)
  1077. widgets["MainLengthX"].setValue(getBase9Length() * scaleW);
  1078. widgets["MainStepX"].setValue(getBase9Stepsize() * scaleW);
  1079. }
  1080. });
  1081. // On PreserveLook toggled: (can be on or off)
  1082. // Continuously: Adapt PreserveLook icon
  1083. // When checked parse MainWidth to MainPainterBox base9
  1084. // Adapt for Null-Length painter if applicable
  1085. widgets["PreserveLook"].toggled.connect(
  1086. function(checked) {
  1087. // Adapt Icon:
  1088. if (checked) { // Toggled to Checked
  1089. widgets["PreserveLook"].icon = new QIcon(FlexPainter.includeBasePath + "/PreserveLookOn" + postfix + ".svg");
  1090. }
  1091. else { // Toggled to Un-checked
  1092. widgets["PreserveLook"].icon = new QIcon(FlexPainter.includeBasePath + "/PreserveLookOff" + postfix + ".svg");
  1093. }
  1094. // When checked parse MainWidth to MainPainterBox base9:
  1095. if (checked) {
  1096. var scaleW = widgets["MainWidth"].getValue() / 9; // can be NaN
  1097. // # Issue Fixed # Painter data out of scope
  1098. // # Workaround # getBase9Length and getBase9Stepsize functions (return dimension)
  1099. widgets["MainLengthX"].setValue(getBase9Length() * scaleW);
  1100. widgets["MainStepX"].setValue(getBase9Stepsize() * scaleW);
  1101. }
  1102. // Adapt for Null-Length painter:
  1103. // # Issue Fixed # Painter data out of scope
  1104. // # Workaround # getBase9Length function (return dimension)
  1105. if (!checked && getBase9Length() == 0.00) {
  1106. widgets["LabelLength"].setEnabled(false);
  1107. widgets["MainLengthX"].setEnabled(false);
  1108. }
  1109. });
  1110. // On MainLength change:
  1111. // Continuously: Dismiss negative entries
  1112. // Adapt for Null-Length painter if applicable
  1113. widgets["MainLengthX"].textChanged.connect(
  1114. function(text) {
  1115. // Don't allow entry to start with 'minus' and some kind of digit:
  1116. widgets["MainLengthX"].text = text.replace(/^-(\d||[\.\,]\d)/, "\$1");
  1117. // Adapt for Null-Length painter:
  1118. // # Issue Fixed # Painter data out of scope
  1119. // # Workaround # getBase9Length function (return dimension)
  1120. if (getBase9Length() == 0.00) {
  1121. widgets["MainLengthX"].text = "0";
  1122. widgets["LabelLength"].setEnabled(false);
  1123. widgets["MainLengthX"].setEnabled(false);
  1124. }
  1125. });
  1126. // On MainStepX change:
  1127. // Continuously dismiss negative entries
  1128. widgets["MainStepX"].textChanged.connect(
  1129. function(text) {
  1130. // Don't allow entry to start with 'minus' and some kind of digit:
  1131. widgets["MainStepX"].text = text.replace(/^-(\d||[\.\,]\d)/, "\$1");
  1132. });
  1133. };
  1134. /**
  1135. * Get functions for dialog change functions.
  1136. */
  1137. // Based on OrthogonalProjections.js Line 194 & 261
  1138. // https://qcad.org/rsforum/viewtopic.php?t=6626
  1139. // # Issue # Can't explain this but while in debugger mode:
  1140. // Found FlexPainter under 'this' but no painter data
  1141. // Found painter data under 'this.FlexPainter.prototype.xyz'
  1142. // I was astonished that it worked...
  1143. // # Issue # As I am not mistaken this are Global Functions !!!
  1144. getPainterSet = function(painterSet, beVerbose) {
  1145. this.FlexPainter.prototype.PainterSetInit(painterSet, beVerbose);
  1146. // # Issue # Painter Data has different scope but is functional
  1147. };
  1148. getBase9Length = function() {
  1149. return this.FlexPainter.prototype.mainData[0][2];
  1150. };
  1151. getBase9Stepsize = function() {
  1152. return this.FlexPainter.prototype.mainData[0][3];
  1153. };
  1154. getDoBeginApex = function() {
  1155. return (this.FlexPainter.prototype.beginApexData[0][2] > 0);
  1156. };
  1157. getDoEndApex = function() {
  1158. return (this.FlexPainter.prototype.endApexData[0][2] > 0);
  1159. };
  1160. getDoInserts = function() {
  1161. return (this.FlexPainter.prototype.knotData[0][2] > 0);
  1162. };
  1163. /**
  1164. * Initiate painter set data.
  1165. *
  1166. * \return painterSet + "done" for now, never fails to get a set. # ToDo # Sources
  1167. */
  1168. // Sub-script of FlexPainter.beginEvent
  1169. FlexPainter.prototype.PainterSetInit = function(painterSet, beVerbose) {
  1170. // ** HARDCODED in Arrays (Works similar as objects) **
  1171. qDebug("Asked for: " + painterSet); //non-MSWinTesting
  1172. // Smothered
  1173. if (!beVerbose) EAction.handleUserMessage("Asked for: " + painterSet); //MSWinTesting
  1174. // # Issue # this.verbose out of scope
  1175. // # Issue # Painter Data has different scope but is functional
  1176. // ** ADJUSTABLE DATA SETS **
  1177. // Local casting:
  1178. // Spline [x1,y1],[x2,y2],[x3... Spline fitpoints, open type
  1179. // Poly [x1,y1,B1],[x2,y2,B2],[x3... Poly vertices & bulging, open type
  1180. // Line [x1,y1],[x2,y2]
  1181. // Point [x,y]
  1182. // Circle [x,y,r]
  1183. // Arc [x1,y1,r,a0,a1,Rev] (Angles in degrees)
  1184. // Global casting: 00-99 individual Splines and/or Polys
  1185. // Dots## [x1,y1],[x2,y2],[x3... Spline fitpoints, open/closed type as base entity
  1186. // Nods## [x1,y1,B1],[x2,y2,B2],[x3... Poly vertices & bulging, open/closed type as base entity
  1187. //
  1188. // Note on Polys: Morphing is in se non-uniform scaling
  1189. // Bulging does not adapt, it is added for completeness and may act weird
  1190. // The real distance between casted points affects how wide the bulge actually is
  1191. // The painter stepsize also affects the last bulging of every set
  1192. // If of any use, tangent scaling travers functions can be found in scale.js by CVH
  1193. // # ToDo # Fix poly bulging !!!
  1194. switch(painterSet) { // * = fixed for all
  1195. case "CurtainRopeProto":
  1196. // # ToDo # Change apex chains to Poly if applicable
  1197. // # ToDo # Split proto kinds
  1198. default:
  1199. this.beginApexData = [[29,0,12.6000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1200. this.beginApexData.push(["Spline",[11.3175,4.1786],[11.2744,4.3393],[11.1568,4.4569],[10.9961,4.5000],[10.8354,4.4569],[10.7177,4.3393],[10.6746,4.1786]]);
  1201. this.beginApexData.push(["Spline",[8.1032,4.1786],[7.5600,-2.8607]]);
  1202. this.beginApexData.push(["Spline",[10.0318,4.1786],[9.9887,4.3393],[9.8711,4.4569],[9.7104,4.5000],[9.5496,4.4569],[9.4320,4.3393],[9.3889,4.1786]]);
  1203. this.beginApexData.push(["Spline",[8.7461,4.1786],[8.7030,4.3393],[8.5854,4.4569],[8.4246,4.5000],[8.2639,4.4569],[8.1463,4.3393],[8.1032,4.1786]]);
  1204. this.beginApexData.push(["Spline",[8.7461,4.1786],[8.1032,-4.1786]]);
  1205. this.beginApexData.push(["Line",[11.9604,4.1786],[11.9604,-2.9663]]);
  1206. this.beginApexData.push(["Spline",[11.3175,-4.1786],[11.3606,-4.3393],[11.4782,-4.4569],[11.6389,-4.5000],[11.7996,-4.4569],[11.9173,-4.3393],[12.6643,-3.5281]]);
  1207. this.beginApexData.push(["Spline",[12.6643,-3.5281],[11.9604,-2.9663]]);
  1208. this.beginApexData.push(["Spline",[1.0286,-5.3036],[2.3143,-4.4679],[4.2429,-3.6321],[5.8500,-3.3750]]);
  1209. this.beginApexData.push(["Spline",[6.8143,3.8571],[6.4929,3.8571],[2.9571,5.1429],[0.7071,6.4286],[0.0855,3.4413],[0.0032,0.0000],[0.0855,-3.4413],[0.7071,-6.4286],[2.9571,-5.1429],[6.4929,-3.8571],[6.8143,-3.8571]]);
  1210. this.beginApexData.push(["Spline",[0.9643,-4.2107],[1.9929,-3.6321],[3.2786,-3.1821],[4.5643,-2.9571]]);
  1211. this.beginApexData.push(["Spline",[1.0286,-3.1500],[2.0571,-2.7321],[2.8286,-2.5393]]);
  1212. this.beginApexData.push(["Line",[6.8143,-3.8571],[6.8143,3.8571]]);
  1213. this.beginApexData.push(["Line",[7.4604,-4.1786],[7.4604,4.1786]]);
  1214. this.beginApexData.push(["Spline",[11.3175,4.1786],[10.6746,-4.1786]]);
  1215. this.beginApexData.push(["Spline",[10.0318,4.1786],[9.3889,-4.1786]]);
  1216. this.beginApexData.push(["Spline",[11.8607,2.8607],[11.3175,-4.1786]]);
  1217. this.beginApexData.push(["Spline",[8.1032,-4.1786],[8.0602,-4.3393],[7.9425,-4.4569],[7.7818,-4.5000],[7.6211,-4.4569],[7.5034,-4.3393],[7.4604,-4.1786]]);
  1218. this.beginApexData.push(["Spline",[10.6746,4.1786],[10.0318,-4.1786]]);
  1219. this.beginApexData.push(["Spline",[10.6746,-4.1786],[10.6316,-4.3393],[10.5139,-4.4569],[10.3532,-4.5000],[10.1925,-4.4569],[10.0748,-4.3393],[10.0318,-4.1786]]);
  1220. this.beginApexData.push(["Spline",[9.3889,-4.1786],[9.3459,-4.3393],[9.2282,-4.4569],[9.0675,-4.5000],[8.9068,-4.4569],[8.7891,-4.3393],[8.7461,-4.1786]]);
  1221. this.beginApexData.push(["Spline",[9.3889,4.1786],[8.7461,-4.1786]]);
  1222. this.beginApexData.push(["Spline",[11.9604,4.1786],[11.9173,4.3393],[11.7996,4.4569],[11.6389,4.5000],[11.4782,4.4569],[11.3606,4.3393],[11.3175,4.1786]]);
  1223. this.beginApexData.push(["Spline",[10.6746,4.1786],[10.6316,4.3393],[10.5139,4.4569],[10.3532,4.5000],[10.1925,4.4569],[10.0748,4.3393],[10.0318,4.1786]]);
  1224. this.beginApexData.push(["Spline",[9.3889,4.1786],[9.3459,4.3393],[9.2282,4.4569],[9.0675,4.5000],[8.9068,4.4569],[8.7891,4.3393],[8.7461,4.1786]]);
  1225. this.beginApexData.push(["Spline",[8.1032,4.1786],[8.0602,4.3393],[7.9425,4.4569],[7.7818,4.5000],[7.6211,4.4569],[7.5034,4.3393],[7.4604,4.1786]]);
  1226. this.beginApexData.push(["Spline",[8.7461,-4.1786],[8.7030,-4.3393],[8.5854,-4.4569],[8.4246,-4.5000],[8.2639,-4.4569],[8.1463,-4.3393],[8.1032,-4.1786]]);
  1227. this.beginApexData.push(["Spline",[11.3175,-4.1786],[11.2744,-4.3393],[11.1568,-4.4569],[10.9961,-4.5000],[10.8354,-4.4569],[10.7177,-4.3393],[10.6746,-4.1786]]);
  1228. this.beginApexData.push(["Spline",[10.0318,-4.1786],[9.9887,-4.3393],[9.8711,-4.4569],[9.7104,-4.5000],[9.5496,-4.4569],[9.4320,-4.3393],[9.3889,-4.1786]]);
  1229. this.beginData = [[4,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1230. this.beginData.push(["Line",[0.0000,2.1437],[0.0032,-2.1437]]);
  1231. this.beginData.push(["Spline",[0.0032,-2.1437],[1.4047,-3.3837],[1.8885,-3.8107],[3.3783,-4.5514],[5.0389,-4.4480],[6.4286,-3.5309]]);
  1232. this.beginData.push(["Spline",[6.4286,-3.5309],[4.8198,-2.1109],[3.2143,-0.6936],[1.6088,0.7236],[0.0000,2.1437]]);
  1233. this.beginData.push(["Spline",[2.7321,-2.5714],[3.8912,-3.5028],[5.0389,-4.4480]]);
  1234. this.mainData = [[4,1,12.8571,6.4286,"Slanted"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, painterType, .......
  1235. this.mainData.push(["Spline",[0.0032,3.5281],[2.0817,1.6934],[4.1601,-0.1413],[6.2386,-1.9760],[7.8333,-3.3837],[8.3170,-3.8107],[9.8069,-4.5514],[11.4675,-4.4480],[12.8539,-3.5281]]);
  1236. this.mainData.push(["Spline",[12.8539,-3.5281],[10.7787,-1.6898],[8.6970,0.1413],[6.8286,1.7957],[5.0221,3.3853],[4.5401,3.8107],[3.0503,4.5514],[1.3896,4.4480],[0.0032,3.5281]]);
  1237. this.mainData.push(["Spline",[9.1607,-2.5714],[10.3198,-3.5028],[11.4675,-4.4480]]);
  1238. this.mainData.push(["Dots00",[0.0000,4.2337],[1.4464,4.8607],[3.375,4.8607],[5.7857,4.0571]]);
  1239. this.endData = [[12,1,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1240. this.endData.push(["Spline",[-6.4286,3.5281],[-4.8222,2.1102],[-3.2159,0.6922],[-1.6096,-0.7258],[0.0000,-2.1466]]);
  1241. this.endData.push(["Line",[0.0000,-2.1466],[0.0000,2.1380]]);
  1242. this.endData.push(["Spline",[0.0000,2.1380],[-1.4097,3.3853],[-1.8917,3.8107],[-3.3815,4.5514],[-5.0422,4.4480],[-6.4286,3.5281]]);
  1243. // - - - - CVH mark - - - -
  1244. this.endData.push(["Spline",[-0.1284,0.0475],[-0.1284,0.0550],[-0.1246,0.0775],[-0.1146,0.0875],[-0.0896,0.0875],[-0.0796,0.0775],[-0.0759,0.0550],[-0.0759,0.0475]]);
  1245. this.endData.push(["Spline",[-0.0759,0.0475],[-0.1271,0.0300]]);
  1246. this.endData.push(["Spline",[-0.1271,0.0300],[-0.0771,0.0050]]);
  1247. this.endData.push(["Spline",[-0.0771,0.0050],[-0.0771,-0.0700]]);
  1248. this.endData.push(["Spline",[-0.0771,-0.0700],[-0.0896,-0.0700]]);
  1249. this.endData.push(["Spline",[-0.0896,-0.0200],[-0.1271,-0.0200]]);
  1250. this.endData.push(["Spline",[-0.1084,-0.0200],[-0.1084,-0.0450]]);
  1251. this.endData.push(["Spline",[-0.0896,-0.0450],[-0.1271,-0.0450]]);
  1252. // - - - - CVH mark - - - - -
  1253. this.endData.push(["Dots00",[-6.4286,4.2337],[-4.9821,4.8607],[-3.0536,4.8607],[-0.6429,4.0571],[0.0000,4.2337]]);
  1254. this.endApexData = [[25,1,12.8571]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1255. this.endApexData.push(["Line",[1.2825,-4.1786],[1.2825,4.1786]]);
  1256. this.endApexData.push(["Line",[0.6396,-4.1786],[0.6396,2.9663]]);
  1257. this.endApexData.push(["Spline",[1.2825,4.1786],[1.2394,4.3393],[1.1218,4.4569],[0.9611,4.5000],[0.8004,4.4569],[0.6827,4.3393],[-0.0643,3.5281]]);
  1258. this.endApexData.push(["Spline",[-0.0643,3.5281],[0.6396,2.9663]]);
  1259. this.endApexData.push(["Spline",[5.7857,-3.8571],[6.1071,-3.8571],[9.6429,-5.1429],[11.8929,-6.4286]]);
  1260. this.endApexData.push(["Spline",[5.7857,3.8571],[6.1071,3.8571],[9.6429,5.1429],[11.8929,6.4286]]);
  1261. this.endApexData.push(["Spline",[12.5145,-3.4413],[11.2179,-2.9250],[9.8036,-2.5714]]);
  1262. this.endApexData.push(["Spline",[11.8929,6.4286],[12.8539,0.0000],[11.8929,-6.4286]]);
  1263. this.endApexData.push(["Spline",[12.3223,-4.4512],[10.9286,-3.7929],[9.6429,-3.2786],[8.0357,-2.9571]]);
  1264. this.endApexData.push(["Spline",[12.1096,-5.4547],[10.2857,-4.5000],[8.3571,-3.6643],[7.0714,-3.4071]]);
  1265. this.endApexData.push(["Line",[5.1396,4.1786],[5.1396,-4.1786]]);
  1266. this.endApexData.push(["Line",[3.8539,4.1786],[3.8539,-4.1786]]);
  1267. this.endApexData.push(["Spline",[4.4968,-4.1786],[4.5398,-4.3393],[4.6575,-4.4569],[4.8182,-4.5000],[4.9789,-4.4569],[5.0966,-4.3393],[5.1396,-4.1786]]);
  1268. this.endApexData.push(["Spline",[3.2111,-4.1786],[3.2541,-4.3393],[3.3718,-4.4569],[3.5325,-4.5000],[3.6932,-4.4569],[3.8109,-4.3393],[3.8539,-4.1786]]);
  1269. this.endApexData.push(["Line",[2.5682,4.1786],[2.5682,-4.1786]]);
  1270. this.endApexData.push(["Spline",[1.9254,-4.1786],[1.9684,-4.3393],[2.0861,-4.4569],[2.2468,-4.5000],[2.4075,-4.4569],[2.5252,-4.3393],[2.5682,-4.1786]]);
  1271. this.endApexData.push(["Spline",[0.6396,-4.1786],[0.6827,-4.3393],[0.8004,-4.4569],[0.9611,-4.5000],[1.1218,-4.4569],[1.2394,-4.3393],[1.2825,-4.1786]]);
  1272. this.endApexData.push(["Line",[4.4968,4.1786],[4.4968,-4.1786]]);
  1273. this.endApexData.push(["Spline",[1.9254,4.1786],[1.9684,4.3393],[2.0861,4.4569],[2.2468,4.5000],[2.4075,4.4569],[2.5252,4.3393],[2.5682,4.1786]]);
  1274. this.endApexData.push(["Spline",[3.2111,4.1786],[3.2541,4.3393],[3.3718,4.4569],[3.5325,4.5000],[3.6932,4.4569],[3.8109,4.3393],[3.8539,4.1786]]);
  1275. this.endApexData.push(["Spline",[4.4968,4.1786],[4.5398,4.3393],[4.6575,4.4569],[4.8182,4.5000],[4.9789,4.4569],[5.0966,4.3393],[5.1396,4.1786]]);
  1276. this.endApexData.push(["Line",[3.2111,4.1786],[3.2111,-4.1786]]);
  1277. this.endApexData.push(["Line",[1.9254,4.1786],[1.9254,-4.1786]]);
  1278. this.endApexData.push(["Line",[5.7857,-3.8571],[5.7857,3.8571]]);
  1279. this.endApexData.push(["Dots01",[-0.2327,-4.4996],[-1.5183,-5.6245],[-2.6432,-5.7852],[-4.5716,-5.4638],[-4.5716,-5.1424],[-2.6432,-5.3031],[-0.2327,-4.1782]]);
  1280. this.knotData = [[0,0,0.0000,1,50.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1281. // # ToDo # 1 insertions, insertPoint 50% with length zero to work without knots
  1282. // this.knotData.push([[0.0,0.0],[0.0,0.0],....]);
  1283. break;
  1284. case "GreekMeander14": // Not implemented
  1285. this.beginApexData = [[4,2,1.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1286. this.beginApexData.push(["Nods00",[0.0,4.5,0.0],[5.7857,4.5,0.0]]);
  1287. this.beginApexData.push(["Poly",[5.7857,1.9286],[2.5714,1.9286],[2.5714,-3.2143],[1.2857,-3.2143],[1.2857,3.2143],[5.7857,3.2143]]);
  1288. this.beginApexData.push(["Line",[0.0,4.5],[0.0,-4.5]]);
  1289. this.beginApexData.push(["Nods01",[0.0,-4.5,0.0],[5.7857,-4.5,0.0]]);
  1290. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1291. this.mainData = [[4,2,8.0000,8.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1292. this.mainData.push(["Nods00",[8.0,4.5,0.0]]);
  1293. this.mainData.push(["Poly",[0.0,3.5],[6.5,3.5],[6.5,-1.5],[3.5,-1.5],[3.5,0.5],[2.5,0.5],[2.5,-2.5],[7.5,-2.5],[7.5,3.5],[8.0,3.5]]);
  1294. this.mainData.push(["Poly",[8.0,-3.5],[1.5,-3.5],[1.5,1.5],[4.5,1.5],[4.5,-0.5],[5.5,-0.5],[5.5,2.5],[0.5,2.5],[0.5,-3.5],[0.0,-3.5]]);
  1295. this.mainData.push(["Nods01",[8.0,-4.5,0.0]]);
  1296. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1297. this.endApexData = [[4,2,1.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1298. this.endApexData.push(["Nods00",[0.0,4.5,0.0],[1.5,4.5,0.0]]);
  1299. this.endApexData.push(["Poly",[0.0,3.5],[0.5,3.5],[0.5,-3.5],[0.0,-3.5]]);
  1300. this.endApexData.push(["Line",[1.5,-4.5],[1.5,4.5]]);
  1301. this.endApexData.push(["Nods01",[0.0,-4.5,0.0],[1.5,-4.5,0.0]]);
  1302. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1303. break;
  1304. case "GreekMeander15":
  1305. this.beginApexData = [[4,2,1.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1306. this.beginApexData.push(["Nods00",[0.0,4.5,0.0],[1.5,4.5,0.0]]);
  1307. this.beginApexData.push(["Poly",[1.5,-3.5],[1.0,-3.5],[1.0,3.5],[1.5,3.5]]);
  1308. this.beginApexData.push(["Line",[0.0,4.5],[0.0,-4.5]]);
  1309. this.beginApexData.push(["Nods01",[0.0,-4.5,0.0],[1.5,-4.5,0.0]]);
  1310. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1311. this.mainData = [[4,2,8.0000,8.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1312. this.mainData.push(["Nods00",[8.0,4.5,0.0]]);
  1313. this.mainData.push(["Poly",[0.0,3.5],[6.5,3.5],[6.5,-1.5],[3.5,-1.5],[3.5,0.5],[2.5,0.5],[2.5,-2.5],[7.5,-2.5],[7.5,3.5],[8.0,3.5]]);
  1314. this.mainData.push(["Poly",[8.0,-3.5],[1.5,-3.5],[1.5,1.5],[4.5,1.5],[4.5,-0.5],[5.5,-0.5],[5.5,2.5],[0.5,2.5],[0.5,-3.5],[0.0,-3.5]]);
  1315. this.mainData.push(["Nods01",[8.0,-4.5,0.0]]);
  1316. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1317. this.endApexData = [[4,2,1.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1318. this.endApexData.push(["Nods00",[0.0,4.5,0.0],[1.5,4.5,0.0]]);
  1319. this.endApexData.push(["Poly",[0.0,3.5],[0.5,3.5],[0.5,-3.5],[0.0,-3.5]]);
  1320. this.endApexData.push(["Line",[1.5,-4.5],[1.5,4.5]]);
  1321. this.endApexData.push(["Nods01",[0.0,-4.5,0.0],[1.5,-4.5,0.0]]);
  1322. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1323. break;
  1324. case "GreekMeander15Flexing":
  1325. this.beginApexData = [[6,2,1.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1326. this.beginApexData.push(["Dots00",[0.0,4.5],[0.5,4.5],[1.0,4.5]]);
  1327. this.beginApexData.push(["Spline",[1.5,-3.5],[1.25,-3.5],[1.0,-3.5]]);
  1328. this.beginApexData.push(["Line",[1.0,-3.5],[1.0,3.5]]);
  1329. this.beginApexData.push(["Spline",[1.0,3.5],[1.25,3.5],[1.5,3.5]]);
  1330. this.beginApexData.push(["Line",[0.0,4.5],[0.0,-4.5]]);
  1331. this.beginApexData.push(["Dots01",[0.0,-4.5],[0.5,-4.5],[1.0,-4.5]]);
  1332. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1333. this.mainData = [[20,2,8.0000,8.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1334. this.mainData.push(["Dots00",[0.0,4.5],[1.0,4.5],[2.0,4.5],[3.0,4.5],[4.0,4.5],[5.0,4.5],[6.0,4.5],[7.0,4.5]]);
  1335. this.mainData.push(["Spline",[0.0,3.5],[0.5,3.5],[1.5,3.5],[2.5,3.5],[3.5,3.5],[4.5,3.5],[5.5,3.5],[6.5,3.5]]);
  1336. this.mainData.push(["Line",[6.5,3.5],[6.5,-1.5]]);
  1337. this.mainData.push(["Spline",[6.5,-1.5],[5.5,-1.5],[4.5,-1.5],[3.5,-1.5]]);
  1338. this.mainData.push(["Line",[3.5,-1.5],[3.5,0.5]]);
  1339. this.mainData.push(["Spline",[3.5,0.5],[3.0,0.5],[2.5,0.5]]);
  1340. this.mainData.push(["Line",[2.5,0.5],[2.5,-2.5]]);
  1341. this.mainData.push(["Spline",[2.5,-2.5],[3.5,-2.5],[4.5,-2.5],[5.5,-2.5],[6.5,-2.5],[7.5,-2.5]]);
  1342. this.mainData.push(["Line",[7.5,-2.5],[7.5,3.5]]);
  1343. this.mainData.push(["Spline",[7.5,3.5],[7.75,3.5],[8.0,3.5]]);
  1344. this.mainData.push(["Spline",[8.0,-3.5],[7.5,-3.5],[6.5,-3.5],[5.5,-3.5],[4.5,-3.5],[3.5,-3.5],[2.5,-3.5],[1.5,-3.5]]);
  1345. this.mainData.push(["Line",[1.5,-3.5],[1.5,1.5]]);
  1346. this.mainData.push(["Spline",[1.5,1.5],[2.5,1.5],[3.5,1.5],[4.5,1.5]]);
  1347. this.mainData.push(["Line",[4.5,1.5],[4.5,-0.5]]);
  1348. this.mainData.push(["Spline",[4.5,-0.5],[5.0,-0.5],[5.5,-0.5]]);
  1349. this.mainData.push(["Line",[5.5,-0.5],[5.5,2.5]]);
  1350. this.mainData.push(["Spline",[5.5,2.5],[4.5,2.5],[3.5,2.5],[2.5,2.5],[1.5,2.5],[0.5,2.5]]);
  1351. this.mainData.push(["Line",[0.5,2.5],[0.5,-3.5]]);
  1352. this.mainData.push(["Spline",[0.5,-3.5],[0.25,-3.5],[0.0,-3.5]]);
  1353. this.mainData.push(["Dots01",[0.0,-4.5],[1.0,-4.5],[2.0,-4.5],[3.0,-4.5],[4.0,-4.5],[5.0,-4.5],[6.0,-4.5],[7.0,-4.5]]);
  1354. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1355. this.endApexData = [[6,2,1.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1356. this.endApexData.push(["Dots00",[0.0,4.5],[0.5,4.5],[1.0,4.5],[1.5,4.5]]);
  1357. this.endApexData.push(["Spline",[0.0,3.5],[0.25,3.5],[0.5,3.5]]);
  1358. this.endApexData.push(["Line",[0.5,3.5],[0.5,-3.5]]);
  1359. this.endApexData.push(["Spline",[0.5,-3.5],[0.25,-3.5],[0.0,-3.5]]);
  1360. this.endApexData.push(["Line",[1.5,-4.5],[1.5,4.5]]);
  1361. this.endApexData.push(["Dots01",[0.0,-4.5],[0.5,-4.5],[1.0,-4.5],[1.5,-4.5]]);
  1362. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1363. break;
  1364. case "CelticMeanderRounded":
  1365. this.beginApexData = [[4,0,5.1213]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1366. this.beginApexData.push(["Spline",[5.1213,-1.9092],[4.9743,-1.6771],[4.5759,-0.5824],[4.5249,0.0000],[4.5759,0.5824],[4.9743,1.6771],[5.1213,1.9092]]);
  1367. this.beginApexData.push(["Spline",[4.2728,-2.6917],[3.9791,-2.2516],[3.4337,-0.7838],[3.3594,0.0000],[3.4224,0.7858],[3.9505,2.2681],[4.2728,2.7577],[4.6971,3.1820],[5.1213,3.5560]]);
  1368. this.beginApexData.push(["Spline",[5.1213,-1.9092],[4.6971,-2.3335],[4.2728,-2.6917],[4.0790,-2.8827],[3.5539,-3.1876],[2.9558,-3.2948],[2.3564,-3.1909],[1.8284,-2.8878],[1.4358,-2.4218],[1.2268,-1.8491],[1.2000,-1.5442],[1.2000,-1.2382],[1.2000,0.0000],[1.2000,1.2381],[1.2000,1.5442],[1.2264,1.8491],[1.4329,2.4234],[1.8226,2.8947],[2.3508,3.2065],[2.9558,3.3201],[3.5656,3.2195],[4.1057,2.9146],[4.2728,2.7577]]);
  1369. this.beginApexData.push(["Spline",[5.1213,-3.5560],[4.8557,-3.8085],[3.9667,-4.3217],[2.9558,-4.5000],[1.9449,-4.3217],[1.0558,-3.8085],[0.3960,-3.0221],[0.0449,-2.0575],[0.0000,-1.5442],[0.0000,-1.0290],[0.0000,0.0000],[0.0000,1.0290],[0.0000,1.5442],[0.0449,2.0575],[0.3960,3.0221],[1.0558,3.8085],[1.9449,4.3217],[2.9558,4.5000],[3.9667,4.3217],[4.8557,3.8085],[5.1213,3.5560]]);
  1370. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1371. this.mainData = [[10,0,5.5154,5.5154,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1372. this.mainData.push(["Spline",[0.0000,1.9092],[0.4243,2.3335],[0.8874,2.7188],[1.8226,3.1647],[2.7577,3.3000],[3.6929,3.1647],[4.1843,2.9757],[4.6280,2.7188]]);
  1373. this.mainData.push(["Spline",[2.7577,0.8485],[3.6929,1.7837],[4.6280,2.7188],[5.0912,3.1820],[5.5154,3.5560]]);
  1374. this.mainData.push(["Spline",[0.0000,-3.5560],[0.4437,-3.1625],[0.8874,-2.7188],[1.8226,-1.7837],[2.7577,-0.8485]]);
  1375. this.mainData.push(["Spline",[0.0000,-1.9092],[0.8874,-1.0218],[1.9092,0.0000]]);
  1376. this.mainData.push(["Spline",[0.0000,1.9092],[0.8874,1.0218],[1.9092,0.0000],[2.3335,-0.4243],[2.7577,-0.8485],[3.6929,-1.7837],[4.6280,-2.7188]]);
  1377. this.mainData.push(["Spline",[0.0000,3.5560],[0.4437,3.8595],[0.8874,4.0929],[1.8226,4.4018],[2.7577,4.5000],[3.6929,4.4018],[4.6280,4.0929],[5.0717,3.8595],[5.5154,3.5560]]);
  1378. this.mainData.push(["Spline",[0.8874,2.7188],[1.8226,1.7837],[2.7577,0.8485],[3.6062,0.0000],[4.6280,-1.0218],[5.5154,-1.9092]]);
  1379. this.mainData.push(["Spline",[3.6062,0.0000],[4.6280,1.0218],[5.5154,1.9092]]);
  1380. this.mainData.push(["Spline",[0.0000,-3.5560],[0.4437,-3.8595],[0.8874,-4.0929],[1.8226,-4.4018],[2.7577,-4.5000],[3.6929,-4.4018],[4.6280,-4.0929],[5.0717,-3.8595],[5.5154,-3.5560]]);
  1381. this.mainData.push(["Spline",[0.8874,-2.7188],[1.3311,-2.9757],[1.8226,-3.1647],[2.7577,-3.3000],[3.6929,-3.1647],[4.6280,-2.7188],[5.0912,-2.3335],[5.5154,-1.9092]]);
  1382. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1383. this.endApexData = [[4,0,5.1213]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1384. this.endApexData.push(["Spline",[0.0000,1.9092],[0.1470,1.6771],[0.5454,0.5824],[0.5964,0.0000],[0.5454,-0.5824],[0.1470,-1.6771],[0.0000,-1.9092]]);
  1385. this.endApexData.push(["Spline",[0.8485,2.6917],[1.1422,2.2516],[1.6877,0.7838],[1.7620,0.0000],[1.6989,-0.7858],[1.1708,-2.2681],[0.8485,-2.7577],[0.4243,-3.1820],[0.0000,-3.5560]]);
  1386. this.endApexData.push(["Spline",[0.0000,1.9092],[0.4243,2.3335],[0.8485,2.6917],[1.0424,2.8827],[1.5674,3.1876],[2.1655,3.2948],[2.7649,3.1909],[3.2929,2.8878],[3.6855,2.4218],[3.8946,1.8491],[3.9213,1.5442],[3.9213,1.2382],[3.9213,0.0000],[3.9213,-1.2381],[3.9213,-1.5442],[3.8949,-1.8491],[3.6884,-2.4234],[3.2987,-2.8947],[2.7706,-3.2065],[2.1655,-3.3201],[1.5558,-3.2195],[1.0156,-2.9146],[0.8485,-2.7577]]);
  1387. this.endApexData.push(["Spline",[0.0000,3.5560],[0.2656,3.8085],[1.1546,4.3217],[2.1655,4.5000],[3.1765,4.3217],[4.0655,3.8085],[4.7253,3.0221],[5.0764,2.0575],[5.1213,1.5442],[5.1213,1.0290],[5.1213,0.0000],[5.1213,-1.0290],[5.1213,-1.5442],[5.0764,-2.0575],[4.7253,-3.0221],[4.0655,-3.8085],[3.1765,-4.3217],[2.1655,-4.5000],[1.1546,-4.3217],[0.2656,-3.8085],[0.0000,-3.5560]]);
  1388. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1389. break;
  1390. case "CelticMeanderHardBend":
  1391. this.beginApexData = [[8,0,4.5577]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1392. this.beginApexData.push(["Line",[1.2000,-3.3000],[1.2000,3.3000]]);
  1393. this.beginApexData.push(["Line",[0.0000,-4.5000],[0.0000,4.5000]]);
  1394. this.beginApexData.push(["Spline",[4.5577,-1.9092],[4.4107,-1.6771],[4.0123,-0.5824],[3.9613,0.0000],[4.0123,0.5824],[4.4107,1.6771],[4.5577,1.9092]]);
  1395. this.beginApexData.push(["Spline",[3.7092,-2.6917],[3.4183,-2.2500],[2.8838,-0.7814],[2.8154,0.0000],[2.8838,0.7814],[3.4183,2.2500],[3.7092,2.6917],[4.1335,3.1820],[4.5577,3.5560]]);
  1396. this.beginApexData.push(["Spline",[4.5577,-3.5560],[4.1140,-3.8595],[3.6703,-4.0929],[3.2266,-4.2679],[2.7351,-4.4018],[1.8000,-4.5000],[1.5577,-4.5000],[0.0000,-4.5000]]);
  1397. this.beginApexData.push(["Spline",[1.2000,3.3000],[1.8000,3.3000],[2.7351,3.1647],[3.2266,2.9757],[3.7092,2.6917]]);
  1398. this.beginApexData.push(["Spline",[0.0000,4.5000],[1.5577,4.5000],[1.8000,4.5000],[2.7351,4.4018],[3.2266,4.2679],[3.6703,4.0929],[4.1140,3.8595],[4.5577,3.5560]]);
  1399. this.beginApexData.push(["Spline",[4.5577,-1.9092],[4.1140,-2.3527],[3.7092,-2.6917],[3.2266,-2.9757],[2.7351,-3.1647],[1.8000,-3.3000],[1.2000,-3.3000]]);
  1400. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1401. this.mainData = [[10,0,5.5154,5.5154,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1402. this.mainData.push(["Spline",[0.0000,1.9092],[0.4243,2.3335],[0.8874,2.7188],[1.8226,3.1647],[2.7577,3.3000],[3.6929,3.1647],[4.1843,2.9757],[4.6280,2.7188]]);
  1403. this.mainData.push(["Spline",[2.7577,0.8485],[3.6929,1.7837],[4.6280,2.7188],[5.0912,3.1820],[5.5154,3.5560]]);
  1404. this.mainData.push(["Spline",[0.0000,-3.5560],[0.4437,-3.1625],[0.8874,-2.7188],[1.8226,-1.7837],[2.7577,-0.8485]]);
  1405. this.mainData.push(["Spline",[0.0000,-1.9092],[0.8874,-1.0218],[1.9092,0.0000]]);
  1406. this.mainData.push(["Spline",[0.0000,1.9092],[0.8874,1.0218],[1.9092,0.0000],[2.3335,-0.4243],[2.7577,-0.8485],[3.6929,-1.7837],[4.6280,-2.7188]]);
  1407. this.mainData.push(["Spline",[0.0000,3.5560],[0.4437,3.8595],[0.8874,4.0929],[1.8226,4.4018],[2.7577,4.5000],[3.6929,4.4018],[4.6280,4.0929],[5.0717,3.8595],[5.5154,3.5560]]);
  1408. this.mainData.push(["Spline",[0.8874,2.7188],[1.8226,1.7837],[2.7577,0.8485],[3.6062,0.0000],[4.6280,-1.0218],[5.5154,-1.9092]]);
  1409. this.mainData.push(["Spline",[3.6062,0.0000],[4.6280,1.0218],[5.5154,1.9092]]);
  1410. this.mainData.push(["Spline",[0.0000,-3.5560],[0.4437,-3.8595],[0.8874,-4.0929],[1.8226,-4.4018],[2.7577,-4.5000],[3.6929,-4.4018],[4.6280,-4.0929],[5.0717,-3.8595],[5.5154,-3.5560]]);
  1411. this.mainData.push(["Spline",[0.8874,-2.7188],[1.3311,-2.9757],[1.8226,-3.1647],[2.7577,-3.3000],[3.6929,-3.1647],[4.6280,-2.7188],[5.0912,-2.3335],[5.5154,-1.9092]]);
  1412. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1413. this.endApexData = [[8,0,4.5577]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1414. this.endApexData.push(["Line",[3.3577,3.3000],[3.3577,-3.3000]]);
  1415. this.endApexData.push(["Line",[4.5577,4.5000],[4.5577,-4.5000]]);
  1416. this.endApexData.push(["Spline",[0.8485,2.6917],[1.1394,2.2500],[1.6739,0.7814],[1.7423,0.0000],[1.6739,-0.7814],[1.1394,-2.2500],[0.8485,-2.6917],[0.4243,-3.1820],[0.0000,-3.5560]]);
  1417. this.endApexData.push(["Spline",[0.0000,3.5560],[0.4437,3.8595],[0.8874,4.0929],[1.3311,4.2679],[1.8226,4.4018],[2.7577,4.5000],[3.0000,4.5000],[4.5577,4.5000]]);
  1418. this.endApexData.push(["Spline",[3.3577,-3.3000],[2.7577,-3.3000],[1.8226,-3.1647],[1.3311,-2.9757],[0.8485,-2.6917]]);
  1419. this.endApexData.push(["Spline",[4.5577,-4.5000],[3.0000,-4.5000],[2.7577,-4.5000],[1.8226,-4.4018],[1.3311,-4.2679],[0.8874,-4.0929],[0.4437,-3.8595],[0.0000,-3.5560]]);
  1420. this.endApexData.push(["Spline",[0.0000,1.9092],[0.4437,2.3527],[0.8485,2.6917],[1.3311,2.9757],[1.8226,3.1647],[2.7577,3.3000],[3.3577,3.3000]]);
  1421. this.endApexData.push(["Spline",[0.0000,1.9092],[0.1470,1.6771],[0.5454,0.5824],[0.5964,0.0000],[0.5454,-0.5824],[0.1470,-1.6771],[0.0000,-1.9092]]);
  1422. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1423. break;
  1424. case "CelticMeanderRound":
  1425. this.beginApexData = [[6,0,7.2577]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1426. this.beginApexData.push(["Spline",[5.3485,0.0000],[6.3031,0.9546],[7.2577,1.9092]]);
  1427. this.beginApexData.push(["Spline",[7.2577,-1.9092],[6.3031,-0.9546],[5.3485,0.0000]]);
  1428. this.beginApexData.push(["Spline",[7.2577,-3.5560],[6.7500,-3.8971],[5.2814,-4.4316],[3.7186,-4.4316],[2.2500,-3.8971],[1.3180,-3.1820],[0.6029,-2.2500],[0.0684,-0.7814],[0.0000,0.0000],[0.0684,0.7814],[0.6029,2.2500],[1.3180,3.1820],[2.2500,3.8971],[3.7186,4.4316],[5.2814,4.4316],[6.7500,3.8971],[7.2577,3.5560]]);
  1429. this.beginApexData.push(["Spline",[7.2577,-1.9092],[6.8335,-2.3335],[6.3703,-2.7188],[5.0730,-3.2499],[3.9270,-3.2499],[2.8500,-2.8579],[2.1665,-2.3335],[1.6421,-1.6500],[1.2501,-0.5730],[1.2000,0.0000],[1.2501,0.5730],[1.6421,1.6500],[2.1665,2.3335],[2.8500,2.8579],[3.9270,3.2499],[5.0730,3.2499],[6.1500,2.8579],[6.3703,2.7188]]);
  1430. this.beginApexData.push(["Spline",[6.3703,-2.7188],[5.6591,-2.0076],[4.6816,-1.0302],[3.6515,0.0000]]);
  1431. this.beginApexData.push(["Spline",[3.6515,0.0000],[4.6816,1.0302],[5.6591,2.0076],[6.3703,2.7188],[6.8335,3.1820],[7.2577,3.5560]]);
  1432. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1433. this.mainData = [[10,0,5.5154,5.5154,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1434. this.mainData.push(["Spline",[0.0000,1.9092],[0.4243,2.3335],[0.8874,2.7188],[1.8226,3.1647],[2.7577,3.3000],[3.6929,3.1647],[4.1843,2.9757],[4.6280,2.7188]]);
  1435. this.mainData.push(["Spline",[2.7577,0.8485],[3.6929,1.7837],[4.6280,2.7188],[5.0912,3.1820],[5.5154,3.5560]]);
  1436. this.mainData.push(["Spline",[0.0000,-3.5560],[0.4437,-3.1625],[0.8874,-2.7188],[1.8226,-1.7837],[2.7577,-0.8485]]);
  1437. this.mainData.push(["Spline",[0.0000,-1.9092],[0.8874,-1.0218],[1.9092,0.0000]]);
  1438. this.mainData.push(["Spline",[0.0000,1.9092],[0.8874,1.0218],[1.9092,0.0000],[2.3335,-0.4243],[2.7577,-0.8485],[3.6929,-1.7837],[4.6280,-2.7188]]);
  1439. this.mainData.push(["Spline",[0.0000,3.5560],[0.4437,3.8595],[0.8874,4.0929],[1.8226,4.4018],[2.7577,4.5000],[3.6929,4.4018],[4.6280,4.0929],[5.0717,3.8595],[5.5154,3.5560]]);
  1440. this.mainData.push(["Spline",[0.8874,2.7188],[1.8226,1.7837],[2.7577,0.8485],[3.6062,0.0000],[4.6280,-1.0218],[5.5154,-1.9092]]);
  1441. this.mainData.push(["Spline",[3.6062,0.0000],[4.6280,1.0218],[5.5154,1.9092]]);
  1442. this.mainData.push(["Spline",[0.0000,-3.5560],[0.4437,-3.8595],[0.8874,-4.0929],[1.8226,-4.4018],[2.7577,-4.5000],[3.6929,-4.4018],[4.6280,-4.0929],[5.0717,-3.8595],[5.5154,-3.5560]]);
  1443. this.mainData.push(["Spline",[0.8874,-2.7188],[1.3311,-2.9757],[1.8226,-3.1647],[2.7577,-3.3000],[3.6929,-3.1647],[4.6280,-2.7188],[5.0912,-2.3335],[5.5154,-1.9092]]);
  1444. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1445. this.endApexData = [[6,0,7.2577]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1446. this.endApexData.push(["Spline",[0.8874,2.7188],[1.5986,2.0076],[2.5761,1.0302],[3.6062,0.0000]]);
  1447. this.endApexData.push(["Spline",[3.6062,0.0000],[2.5761,-1.0302],[1.5986,-2.0076],[0.8874,-2.7188],[0.4243,-3.1820],[0.0000,-3.5560]]);
  1448. this.endApexData.push(["Spline",[1.9092,0.0000],[0.9546,-0.9546],[0.0000,-1.9092]]);
  1449. this.endApexData.push(["Spline",[0.0000,1.9092],[0.9546,0.9546],[1.9092,0.0000]]);
  1450. this.endApexData.push(["Spline",[0.0000,3.5560],[0.5077,3.8971],[1.9763,4.4316],[3.5391,4.4316],[5.0077,3.8971],[5.9397,3.1820],[6.6548,2.2500],[7.1894,0.7814],[7.2577,0.0000],[7.1894,-0.7814],[6.6548,-2.2500],[5.9397,-3.1820],[5.0077,-3.8971],[3.5391,-4.4316],[1.9763,-4.4316],[0.5077,-3.8971],[0.0000,-3.5560]]);
  1451. this.endApexData.push(["Spline",[0.0000,1.9092],[0.4243,2.3335],[0.8874,2.7188],[2.1847,3.2499],[3.3308,3.2499],[4.4077,2.8579],[5.0912,2.3335],[5.6156,1.6500],[6.0076,0.5730],[6.0577,0.0000],[6.0076,-0.5730],[5.6156,-1.6500],[5.0912,-2.3335],[4.4077,-2.8579],[3.3308,-3.2499],[2.1847,-3.2499],[1.1077,-2.8579],[0.8874,-2.7188]]);
  1452. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1453. break;
  1454. case "CelticMeanderEndless":
  1455. this.beginApexData = [[8,0,4.4316]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1456. this.beginApexData.push(["Spline",[4.4316,-1.9092],[3.4770,-0.9546],[2.5224,0.0000],[2.0981,0.4243],[1.7128,0.8874],[1.4290,1.3885],[1.1817,2.1847],[1.1418,3.0174],[1.1703,3.2613]]);
  1457. this.beginApexData.push(["Spline",[1.1703,-3.2613],[1.1418,-3.0174],[1.1817,-2.1847],[1.4290,-1.3885],[1.7128,-0.8874]]);
  1458. this.beginApexData.push(["Spline",[4.4316,-1.9092],[4.0073,-2.3335],[3.5442,-2.7188],[3.0431,-3.0026],[2.2469,-3.2499],[1.4142,-3.2898],[1.1703,-3.2613]]);
  1459. this.beginApexData.push(["Spline",[3.5442,-2.7188],[2.6285,-1.8031],[1.7128,-0.8874],[1.2496,-0.4243],[0.8756,0.0000],[0.5345,0.5077],[0.0000,1.9763],[0.0000,3.5391],[0.0590,3.8210],[0.2575,4.1741],[0.6106,4.3726],[0.8925,4.4316],[2.4553,4.4316],[3.9239,3.8971],[4.4316,3.5560]]);
  1460. this.beginApexData.push(["Spline",[2.5224,0.0000],[3.4770,0.9546],[4.4316,1.9092]]);
  1461. this.beginApexData.push(["Spline",[4.4316,-3.5560],[3.9239,-3.8971],[2.4553,-4.4316],[0.8925,-4.4316],[0.6106,-4.3726],[0.2575,-4.1741],[0.0590,-3.8210],[0.0000,-3.5391],[0.0000,-1.9763],[0.5345,-0.5077],[0.8756,0.0000]]);
  1462. this.beginApexData.push(["Spline",[1.1703,3.2613],[1.4142,3.2898],[2.2469,3.2499],[3.0431,3.0026],[3.5442,2.7188]]);
  1463. this.beginApexData.push(["Spline",[1.7128,0.8874],[2.6285,1.8031],[3.5442,2.7188],[4.0073,3.1820],[4.4316,3.5560]]);
  1464. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1465. this.mainData = [[10,0,5.5154,5.5154,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1466. this.mainData.push(["Spline",[0.0000,1.9092],[0.4243,2.3335],[0.8874,2.7188],[1.8226,3.1647],[2.7577,3.3000],[3.6929,3.1647],[4.1843,2.9757],[4.6280,2.7188]]);
  1467. this.mainData.push(["Spline",[2.7577,0.8485],[3.6929,1.7837],[4.6280,2.7188],[5.0912,3.1820],[5.5154,3.5560]]);
  1468. this.mainData.push(["Spline",[0.0000,-3.5560],[0.4437,-3.1625],[0.8874,-2.7188],[1.8226,-1.7837],[2.7577,-0.8485]]);
  1469. this.mainData.push(["Spline",[0.0000,-1.9092],[0.8874,-1.0218],[1.9092,0.0000]]);
  1470. this.mainData.push(["Spline",[0.0000,1.9092],[0.8874,1.0218],[1.9092,0.0000],[2.3335,-0.4243],[2.7577,-0.8485],[3.6929,-1.7837],[4.6280,-2.7188]]);
  1471. this.mainData.push(["Spline",[0.0000,3.5560],[0.4437,3.8595],[0.8874,4.0929],[1.8226,4.4018],[2.7577,4.5000],[3.6929,4.4018],[4.6280,4.0929],[5.0717,3.8595],[5.5154,3.5560]]);
  1472. this.mainData.push(["Spline",[0.8874,2.7188],[1.8226,1.7837],[2.7577,0.8485],[3.6062,0.0000],[4.6280,-1.0218],[5.5154,-1.9092]]);
  1473. this.mainData.push(["Spline",[3.6062,0.0000],[4.6280,1.0218],[5.5154,1.9092]]);
  1474. this.mainData.push(["Spline",[0.0000,-3.5560],[0.4437,-3.8595],[0.8874,-4.0929],[1.8226,-4.4018],[2.7577,-4.5000],[3.6929,-4.4018],[4.6280,-4.0929],[5.0717,-3.8595],[5.5154,-3.5560]]);
  1475. this.mainData.push(["Spline",[0.8874,-2.7188],[1.3311,-2.9757],[1.8226,-3.1647],[2.7577,-3.3000],[3.6929,-3.1647],[4.6280,-2.7188],[5.0912,-2.3335],[5.5154,-1.9092]]);
  1476. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1477. this.endApexData = [[8,0,4.4316]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1478. this.endApexData.push(["Spline",[1.9092,0.0000],[0.9546,-0.9546],[0.0000,-1.9092]]);
  1479. this.endApexData.push(["Spline",[0.0000,1.9092],[0.4243,2.3335],[0.8874,2.7188],[1.3885,3.0026],[2.1847,3.2499],[3.0174,3.2898],[3.2613,3.2613]]);
  1480. this.endApexData.push(["Spline",[0.8874,2.7188],[1.5986,2.0076],[2.7188,0.8874],[3.1820,0.4243],[3.5560,0.0000],[3.8971,-0.5077],[4.4316,-1.9763],[4.4316,-3.5391],[4.3726,-3.8210],[4.1741,-4.1741],[3.8210,-4.3726],[3.5391,-4.4316],[1.9763,-4.4316],[0.5077,-3.8971],[0.0000,-3.5560]]);
  1481. this.endApexData.push(["Spline",[0.0000,3.5560],[0.5077,3.8971],[1.9763,4.4316],[3.5391,4.4316],[3.8210,4.3726],[4.1741,4.1741],[4.3726,3.8210],[4.4316,3.5391],[4.4316,1.9763],[3.8971,0.5077],[3.5560,0.0000]]);
  1482. this.endApexData.push(["Spline",[3.2613,-3.2613],[3.0174,-3.2898],[2.1847,-3.2499],[1.3885,-3.0026],[0.8874,-2.7188]]);
  1483. this.endApexData.push(["Spline",[0.0000,1.9092],[0.9546,0.9546],[1.9092,0.0000],[2.3335,-0.4243],[2.7188,-0.8874],[3.0026,-1.3885],[3.2499,-2.1847],[3.2898,-3.0174],[3.2613,-3.2613]]);
  1484. this.endApexData.push(["Spline",[3.2613,3.2613],[3.2898,3.0174],[3.2499,2.1847],[3.0026,1.3885],[2.7188,0.8874]]);
  1485. this.endApexData.push(["Spline",[2.7188,-0.8874],[1.8031,-1.8031],[0.8874,-2.7188],[0.4243,-3.1820],[0.0000,-3.5560]]);
  1486. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1487. break;
  1488. case "CelticMeanderEndless_L":
  1489. this.beginApexData = [[12,0,2.7901]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1490. this.beginApexData.push(["Spline",[1.6064,1.7099],[2.1983,2.3017],[2.7901,2.8936]]);
  1491. this.beginApexData.push(["Spline",[2.2399,-3.3956],[1.6721,-2.8279],[1.1044,-2.2601],[0.8172,-1.9729],[0.5853,-1.7099],[0.3972,-1.4348],[0.2524,-1.1596],[0.0609,-0.5798],[0.0000,0.0000],[0.0609,0.5798],[0.2524,1.1596],[0.3972,1.4348],[0.5853,1.7099]]);
  1492. this.beginApexData.push(["Spline",[2.7901,-2.8936],[2.5271,-3.1567],[2.2399,-3.3956],[1.9292,-3.5715],[1.4356,-3.7249],[0.9193,-3.7496],[0.7680,-3.7320]]);
  1493. this.beginApexData.push(["Spline",[1.1044,2.2601],[1.6721,2.8279],[2.2399,3.3956],[2.5271,3.6828],[2.7901,3.9147]]);
  1494. this.beginApexData.push(["Spline",[0.7680,-3.7320],[0.7504,-3.5807],[0.7751,-3.0644],[0.9285,-2.5708],[1.1044,-2.2601]]);
  1495. this.beginApexData.push(["Spline",[2.7901,-2.8936],[2.1983,-2.3017],[1.6064,-1.7099],[1.3433,-1.4468],[1.1044,-1.1596],[0.8279,-0.5798],[0.7440,0.0000],[0.8279,0.5798],[0.9451,0.8845],[1.1044,1.1596]]);
  1496. this.beginApexData.push(["Spline",[2.7901,-3.9147],[2.4753,-4.1262],[1.5648,-4.4576],[0.5958,-4.4576],[0.4210,-4.4210],[0.2020,-4.2980],[0.0790,-4.0790],[0.0424,-3.9042],[0.0424,-2.9352],[0.3738,-2.0247],[0.5853,-1.7099]]);
  1497. this.beginApexData.push(["Spline",[2.7901,0.5261],[2.1983,1.1180],[1.6064,1.7099],[1.3433,1.9729],[1.1044,2.2601],[0.9285,2.5708],[0.7751,3.0644],[0.7504,3.5807],[0.7680,3.7320]]);
  1498. this.beginApexData.push(["Spline",[1.6064,-1.7099],[2.1983,-1.1180],[2.7901,-0.5261]]);
  1499. this.beginApexData.push(["Spline",[2.2640,0.0000],[1.6721,0.5919],[1.1044,1.1596],[0.8172,1.4468],[0.5853,1.7099],[0.3738,2.0247],[0.0424,2.9352],[0.0424,3.9042],[0.0790,4.0790],[0.2020,4.2980],[0.4210,4.4210],[0.5958,4.4576],[1.5648,4.4576],[2.4753,4.1262],[2.7901,3.9147]]);
  1500. this.beginApexData.push(["Spline",[1.1044,-1.1596],[1.6721,-0.5919],[2.2640,0.0000],[2.7901,0.5261]]);
  1501. this.beginApexData.push(["Spline",[0.7680,3.7320],[0.9193,3.7496],[1.4356,3.7249],[1.9292,3.5715],[2.2399,3.3956]]);
  1502. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1503. this.mainData = [[16,0,3.4197,3.4197,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1504. this.mainData.push(["Spline",[0.5502,3.3956],[1.1180,2.8279],[1.7099,2.2360],[2.2360,1.7099],[2.8279,1.1180],[3.4197,0.5261]]);
  1505. this.mainData.push(["Spline",[3.4197,-2.8936],[2.8279,-2.3017],[2.2360,-1.7099],[1.7099,-1.1838],[1.1180,-0.5919],[0.5261,0.0000]]);
  1506. this.mainData.push(["Spline",[3.4197,-3.9147],[3.1446,-4.1028],[2.8695,-4.2476],[2.2897,-4.4391],[1.7099,-4.5000],[1.1300,-4.4391],[0.5502,-4.2476],[0.2751,-4.1028],[0.0000,-3.9147]]);
  1507. this.mainData.push(["Spline",[1.7340,2.2601],[2.3017,2.8279],[2.8695,3.3956],[3.1567,3.6828],[3.4197,3.9147]]);
  1508. this.mainData.push(["Spline",[3.4197,-2.8936],[3.1567,-3.1567],[2.8695,-3.3956],[2.2897,-3.6721],[1.7099,-3.7560],[1.1300,-3.6721],[0.8253,-3.5549],[0.5502,-3.3956]]);
  1509. this.mainData.push(["Spline",[2.8695,-3.3956],[2.3017,-2.8279],[1.7099,-2.2360],[1.1838,-1.7099],[0.5919,-1.1180],[0.0000,-0.5261]]);
  1510. this.mainData.push(["Spline",[3.4197,0.5261],[2.8936,0.0000],[2.3017,-0.5919],[1.7099,-1.1838]]);
  1511. this.mainData.push(["Spline",[0.0000,2.8936],[0.2631,3.1567],[0.5502,3.3956],[1.1300,3.6721],[1.7099,3.7560],[2.2897,3.6721],[2.5944,3.5549],[2.8695,3.3956]]);
  1512. this.mainData.push(["Spline",[0.0000,2.8936],[0.5919,2.3017],[1.1838,1.7099],[1.7099,1.1838],[2.3017,0.5919],[2.8936,0.0000]]);
  1513. this.mainData.push(["Spline",[0.0000,-2.8936],[0.5919,-2.3017],[1.1838,-1.7099]]);
  1514. this.mainData.push(["Spline",[3.4197,-0.5261],[2.8279,-1.1180],[2.2360,-1.7099]]);
  1515. this.mainData.push(["Spline",[0.0000,-0.5261],[0.5261,0.0000],[1.1180,0.5919],[1.7099,1.1838]]);
  1516. this.mainData.push(["Spline",[0.0000,0.5261],[0.5919,1.1180],[1.1838,1.7099]]);
  1517. this.mainData.push(["Spline",[0.0000,3.9147],[0.2751,4.1028],[0.5502,4.2476],[1.1300,4.4391],[1.7099,4.5000],[2.2897,4.4391],[2.8695,4.2476],[3.1446,4.1028],[3.4197,3.9147]]);
  1518. this.mainData.push(["Spline",[1.7099,-2.2360],[0.5502,-3.3956],[0.2631,-3.6828],[0.0000,-3.9147]]);
  1519. this.mainData.push(["Spline",[2.2360,1.7099],[2.8279,2.3017],[3.4197,2.8936]]);
  1520. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1521. this.endApexData = [[12,0,2.7901]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1522. this.endApexData.push(["Spline",[1.1838,1.7099],[0.5919,1.1180],[0.0000,0.5261]]);
  1523. this.endApexData.push(["Spline",[2.0221,3.7320],[2.0398,3.5807],[2.0150,3.0644],[1.8617,2.5708],[1.6858,2.2601]]);
  1524. this.endApexData.push(["Spline",[0.0000,2.8936],[0.5919,2.3017],[1.1838,1.7099],[1.4468,1.4468],[1.6858,1.1596],[1.9622,0.5798],[2.0461,0.0000],[1.9622,-0.5798],[1.8450,-0.8845],[1.6858,-1.1596]]);
  1525. this.endApexData.push(["Spline",[0.0000,3.9147],[0.3148,4.1262],[1.2254,4.4576],[2.1944,4.4576],[2.3692,4.4210],[2.5881,4.2980],[2.7111,4.0790],[2.7477,3.9042],[2.7477,2.9352],[2.4163,2.0247],[2.2048,1.7099]]);
  1526. this.endApexData.push(["Spline",[0.0000,-0.5261],[0.5919,-1.1180],[1.1838,-1.7099],[1.4468,-1.9729],[1.6858,-2.2601],[1.8617,-2.5708],[2.0150,-3.0644],[2.0398,-3.5807],[2.0221,-3.7320]]);
  1527. this.endApexData.push(["Spline",[1.6858,-2.2601],[1.1180,-2.8279],[0.5502,-3.3956],[0.2631,-3.6828],[0.0000,-3.9147]]);
  1528. this.endApexData.push(["Spline",[0.5261,0.0000],[1.1180,-0.5919],[1.6858,-1.1596],[1.9729,-1.4468],[2.2048,-1.7099],[2.4163,-2.0247],[2.7477,-2.9352],[2.7477,-3.9042],[2.7111,-4.0790],[2.5881,-4.2980],[2.3692,-4.4210],[2.1944,-4.4576],[1.2254,-4.4576],[0.3148,-4.1262],[0.0000,-3.9147]]);
  1529. this.endApexData.push(["Spline",[1.6858,1.1596],[1.1180,0.5919],[0.5261,0.0000],[0.0000,-0.5261]]);
  1530. this.endApexData.push(["Spline",[2.0221,-3.7320],[1.8709,-3.7496],[1.3546,-3.7249],[0.8609,-3.5715],[0.5502,-3.3956]]);
  1531. this.endApexData.push(["Spline",[0.0000,2.8936],[0.2631,3.1567],[0.5502,3.3956],[0.8609,3.5715],[1.3546,3.7249],[1.8709,3.7496],[2.0221,3.7320]]);
  1532. this.endApexData.push(["Spline",[1.1838,-1.7099],[0.5919,-2.3017],[0.0000,-2.8936]]);
  1533. this.endApexData.push(["Spline",[0.5502,3.3956],[1.1180,2.8279],[1.6858,2.2601],[1.9729,1.9729],[2.2048,1.7099],[2.3930,1.4348],[2.5377,1.1596],[2.7292,0.5798],[2.7901,0.0000],[2.7292,-0.5798],[2.5377,-1.1596],[2.3930,-1.4348],[2.2048,-1.7099]]);
  1534. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1535. break;
  1536. case "TelephoneCoilMedio": //3.513000 lost what this value stands for
  1537. this.beginApexData = [[9,0,4.4870]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1538. this.beginApexData.push(["Spline",[0.0000,-1.3756],[0.4881,-0.4313],[1.0995,0.9276],[1.7086,2.3363],[2.4397,3.5918],[3.2335,4.3045],[4.1065,4.5001],[4.4870,4.4889]]);
  1539. this.beginApexData.push(["Spline",[2.7591,-2.3569],[3.1885,-1.5145],[3.5936,-0.6075],[3.9656,0.4000]]);
  1540. this.beginApexData.push(["Spline",[0.0611,-1.3901],[0.7869,-0.1409],[1.3999,1.0000],[1.9270,2.0109],[2.5464,2.6949],[3.0114,2.3214],[3.3331,1.8477],[3.6502,1.2324],[3.9656,0.4000],[4.1032,0.0000],[4.4870,-1.0314]]);
  1541. this.beginApexData.push(["Spline",[2.1751,3.2097],[2.5904,3.6145],[3.0070,3.6281],[3.4558,3.1890],[3.6420,2.7315],[3.7013,2.3000],[3.7013,2.0000],[3.7594,1.7348],[3.9991,1.0394],[4.1068,0.4266],[4.4870,-1.0314]]);
  1542. this.beginApexData.push(["Spline",[2.7591,-1.4284],[3.0240,-1.0208],[3.6916,0.1369],[3.9227,0.5243]]);
  1543. this.beginApexData.push(["Spline",[0.0000,-1.3756],[1.4093,-1.6041],[2.7591,-1.4284]]);
  1544. this.beginApexData.push(["Spline",[0.0000,-2.3041],[0.4043,-2.8469],[1.3448,-3.2106],[2.3345,-2.8841],[2.7591,-2.3569]]);
  1545. this.beginApexData.push(["Line",[2.7591,-1.4284],[2.7591,-2.3569]]);
  1546. this.beginApexData.push(["Line",[0.0000,-1.3756],[0.0000,-2.3041]]);
  1547. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1548. this.mainData = [[6,0,8.0000,8.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1549. this.mainData.push(["Spline",[0.0000,4.4889],[0.4910,4.3664],[1.1525,3.8522],[1.5235,3.2665],[1.8966,2.3007],[2.5146,0.5675],[3.1783,-0.8466],[3.8636,-1.8200],[4.5371,-2.3453],[5.2195,-2.3961],[5.8310,-1.9725],[6.5370,-1.0208],[7.2046,0.1369],[7.4358,0.5243]]);
  1550. this.mainData.push(["Spline",[0.0000,-1.0314],[0.2677,-1.6785],[0.6442,-2.4108],[1.5457,-3.6638],[2.4762,-4.2638],[3.5530,-4.5000],[4.4983,-4.3223],[5.1804,-3.8614],[5.8609,-3.0369],[6.7015,-1.5145],[7.1066,-0.6075],[7.4786,0.4000]]);
  1551. this.mainData.push(["Spline",[3.5130,-1.3756],[4.0011,-0.4313],[4.6125,0.9276],[5.2216,2.3363],[5.9527,3.5918],[6.7465,4.3045],[7.6195,4.5001],[8.0000,4.4889]]);
  1552. this.mainData.push(["Spline",[3.5510,-1.4288],[4.2999,-0.1409],[4.9129,1.0000],[5.4400,2.0109],[6.0594,2.6949],[6.5244,2.3214],[6.8461,1.8477],[7.1632,1.2324],[7.4786,0.4000],[7.6162,0.0000],[8.0000,-1.0314]]);
  1553. this.mainData.push(["Spline",[2.2963,1.1446],[2.8107,-0.6372],[3.3810,-1.9055],[3.8615,-2.7353],[4.3637,-3.3283],[4.8364,-3.5330],[5.2606,-3.4788],[5.8609,-3.0369]]);
  1554. this.mainData.push(["Spline",[5.6881,3.2097],[6.1034,3.6145],[6.5200,3.6281],[6.9688,3.1890],[7.1550,2.7315],[7.2143,2.3000],[7.2143,2.0000],[7.2724,1.7348],[7.5121,1.0394],[7.6198,0.4266],[8.0000,-1.0314]]);
  1555. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1556. this.endApexData = [[5,0,6.2721]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1557. this.endApexData.push(["Spline",[0.0000,4.4889],[0.4910,4.3664],[1.1525,3.8522],[1.5235,3.2665],[1.8966,2.3007],[2.5146,0.5675],[3.1783,-0.8466],[3.8636,-1.8200],[4.5371,-2.3453],[5.2195,-2.3961],[5.8310,-1.9725],[6.2721,-1.4284]]);
  1558. this.endApexData.push(["Spline",[0.0000,-1.0314],[0.2677,-1.6785],[0.6442,-2.4108],[1.5457,-3.6638],[2.4762,-4.2638],[3.5530,-4.5000],[4.4983,-4.3223],[5.1804,-3.8614],[5.8609,-3.0369],[6.2721,-2.3569]]);
  1559. this.endApexData.push(["Spline",[2.2963,1.1446],[2.8107,-0.6372],[3.3810,-1.9055],[3.8615,-2.7353],[4.3637,-3.3283],[4.8364,-3.5330],[5.2606,-3.4788],[5.8609,-3.0369]]);
  1560. this.endApexData.push(["Spline",[3.5130,-1.3756],[4.9223,-1.6041],[6.2721,-1.4284]]);
  1561. this.endApexData.push(["Line",[6.2721,-1.4284],[6.2721,-2.3569]]);
  1562. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1563. break;
  1564. case "RailwayTrackLineArt":
  1565. this.beginApexData = [[2,2,1.4000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1566. this.beginApexData.push(["Dots00",[0.00,4.50],[0.70,4.50]]);
  1567. this.beginApexData.push(["Dots01",[0.00,-4.50],[0.70,-4.50]]);
  1568. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1569. this.mainData = [[3,2,4.4000,4.4000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1570. this.mainData.push(["Poly",[0.00,7.10],[1.60,7.10],[1.60,-7.10],[0.00,-7.10],[0.00,7.10]]);
  1571. this.mainData.push(["Dots00",[0.00,4.50],[0.88,4.50],[1.76,4.50],[2.64,4.50],[3.52,4.50]]);
  1572. this.mainData.push(["Dots01",[0.00,-4.50],[0.88,-4.50],[1.76,-4.50],[2.64,-4.50],[3.52,-4.50]]);
  1573. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1574. this.endApexData = [[3,2,3.0000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1575. this.endApexData.push(["Poly",[0.00,7.10],[1.60,7.10],[1.60,-7.10],[0.00,-7.10],[0.00,7.10]]);
  1576. this.endApexData.push(["Dots00",[0.00,4.50],[1.00,4.50],[2.00,4.50],[3.00,4.50]]);
  1577. this.endApexData.push(["Dots01",[0.00,-4.50],[1.00,-4.50],[2.00,-4.50],[3.00,-4.50]]);
  1578. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1579. break;
  1580. case "RailwayTrackConcrete":
  1581. this.beginApexData = [[6,4,1.4000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1582. this.beginApexData.push(["Line",[0.00,4.95],[0.00,4.50]]);
  1583. this.beginApexData.push(["Line",[0.00,-4.50],[0.00,-4.95]]);
  1584. this.beginApexData.push(["Dots00",[0.00,4.95],[0.70,4.95]]);
  1585. this.beginApexData.push(["Dots01",[0.00,4.50],[0.70,4.50]]);
  1586. this.beginApexData.push(["Dots02",[0.00,-4.50],[0.70,-4.50]]);
  1587. this.beginApexData.push(["Dots03",[0.00,-4.95],[0.70,-4.95]]);
  1588. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1589. this.mainData = [[18,4,4.4000,4.4000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1590. this.mainData.push(["Line",[0.00,4.50],[0.00,-4.50]]);
  1591. this.mainData.push(["Line",[1.60,4.50],[1.60,-4.50]]);
  1592. this.mainData.push(["Poly",[0.00,4.95],[0.00,7.55],[1.60,7.55],[1.60,4.95]]);
  1593. this.mainData.push(["Poly",[0.23,4.95],[0.23,5.75],[1.37,5.75],[1.37,4.95]]);
  1594. this.mainData.push(["Poly",[0.23,4.50],[0.23,3.70],[1.37,3.70],[1.37,4.50]]);
  1595. this.mainData.push(["Poly",[0.23,-4.50],[0.23,-3.70],[1.37,-3.70],[1.37,-4.50]]);
  1596. this.mainData.push(["Poly",[0.23,-4.95],[0.23,-5.75],[1.37,-5.75],[1.37,-4.95]]);
  1597. this.mainData.push(["Poly",[0.00,-4.95],[0.00,-7.55],[1.60,-7.55],[1.60,-4.95]]);
  1598. this.mainData.push(["Line",[0.00,6.70],[1.60,6.70]]);
  1599. this.mainData.push(["Line",[0.00,2.75],[1.60,2.75]]);
  1600. this.mainData.push(["Line",[0.00,1.20],[1.60,1.20]]);
  1601. this.mainData.push(["Line",[0.00,-1.20],[1.60,-1.20]]);
  1602. this.mainData.push(["Line",[0.00,-2.75],[1.60,-2.75]]);
  1603. this.mainData.push(["Line",[0.00,-6.70],[1.60,-6.70]]);
  1604. this.mainData.push(["Dots00",[0.00,4.95],[0.88,4.95],[1.76,4.95],[2.64,4.95],[3.52,4.95]]);
  1605. this.mainData.push(["Dots01",[0.00,4.50],[0.88,4.50],[1.76,4.50],[2.64,4.50],[3.52,4.50]]);
  1606. this.mainData.push(["Dots02",[0.00,-4.50],[0.88,-4.50],[1.76,-4.50],[2.64,-4.50],[3.52,-4.50]]);
  1607. this.mainData.push(["Dots03",[0.00,-4.95],[0.88,-4.95],[1.76,-4.95],[2.64,-4.95],[3.52,-4.95]]);
  1608. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1609. this.endApexData = [[20,4,3.0000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1610. this.endApexData.push(["Line",[0.00,4.50],[0.00,-4.50]]);
  1611. this.endApexData.push(["Line",[1.60,4.50],[1.60,-4.50]]);
  1612. this.endApexData.push(["Poly",[0.00,4.95],[0.00,7.55],[1.60,7.55],[1.60,4.95]]);
  1613. this.endApexData.push(["Poly",[0.23,4.95],[0.23,5.75],[1.37,5.75],[1.37,4.95]]);
  1614. this.endApexData.push(["Poly",[0.23,4.50],[0.23,3.70],[1.37,3.70],[1.37,4.50]]);
  1615. this.endApexData.push(["Poly",[0.23,-4.50],[0.23,-3.70],[1.37,-3.70],[1.37,-4.50]]);
  1616. this.endApexData.push(["Poly",[0.23,-4.95],[0.23,-5.75],[1.37,-5.75],[1.37,-4.95]]);
  1617. this.endApexData.push(["Poly",[0.00,-4.95],[0.00,-7.55],[1.60,-7.55],[1.60,-4.95]]);
  1618. this.endApexData.push(["Line",[0.00,6.70],[1.60,6.70]]);
  1619. this.endApexData.push(["Line",[0.00,2.75],[1.60,2.75]]);
  1620. this.endApexData.push(["Line",[0.00,1.20],[1.60,1.20]]);
  1621. this.endApexData.push(["Line",[0.00,-1.20],[1.60,-1.20]]);
  1622. this.endApexData.push(["Line",[0.00,-2.75],[1.60,-2.75]]);
  1623. this.endApexData.push(["Line",[0.00,-6.70],[1.60,-6.70]]);
  1624. this.endApexData.push(["Dots00",[0.00,4.95],[1.00,4.95],[2.00,4.95],[3.00,4.95]]);
  1625. this.endApexData.push(["Dots01",[0.00,4.50],[1.00,4.50],[2.00,4.50],[3.00,4.50]]);
  1626. this.endApexData.push(["Dots02",[0.00,-4.50],[1.00,-4.50],[2.00,-4.50],[3.00,-4.50]]);
  1627. this.endApexData.push(["Dots03",[0.00,-4.95],[1.00,-4.95],[2.00,-4.95],[3.00,-4.95]]);
  1628. this.endApexData.push(["Line",[3.00,4.95],[3.00,4.50]]);
  1629. this.endApexData.push(["Line",[3.00,-4.50],[3.00,-4.95]]);
  1630. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1631. break;
  1632. case "OrthogonalMark":
  1633. this.beginApexData = [[0,0,4.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1634. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1635. this.mainData = [[1,0,0.0000,9.0000,"Stepped"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1636. this.mainData.push(["Line",[0.0000,9.000],[0.0000,0.0000]]);
  1637. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1638. this.endApexData = [[0,0,4.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1639. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1640. break;
  1641. case "OrthogonalBar":
  1642. this.beginApexData = [[0,0,4.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1643. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1644. this.mainData = [[1,0,0.0000,9.0000,"Stepped"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1645. this.mainData.push(["Line",[0.0000,4.5000],[0.0000,-4.5000]]);
  1646. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1647. this.endApexData = [[0,0,4.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1648. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1649. break;
  1650. case "1_OrthoPointGlobal":
  1651. this.beginApexData = [[0,0,4.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1652. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1653. this.mainData = [[1,1,0.0000,9.0000,"Stepped"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1654. this.mainData.push(["Nods00",[0.0000,9.0000,0.0000]]);
  1655. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1656. this.endApexData = [[0,0,4.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1657. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1658. break;
  1659. case "1_OrthoPointGlobalFlex":
  1660. this.beginApexData = [[0,0,4.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1661. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1662. this.mainData = [[1,1,0.0000,9.0000,"Stepped"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1663. this.mainData.push(["Dots00",[0.0000,9.0000]]);
  1664. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1665. this.endApexData = [[0,0,4.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1666. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1667. break;
  1668. case "2_OrthoPointsGlobal":
  1669. this.beginApexData = [[0,0,4.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1670. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1671. this.mainData = [[2,2,0.0000,9.0000,"Stepped"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1672. this.mainData.push(["Nods00",[0.0000,4.5000,0.0000]]);
  1673. this.mainData.push(["Nods01",[0.0000,-4.5000,0.0000]]);
  1674. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1675. this.endApexData = [[0,0,4.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1676. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1677. break;
  1678. case "2_OrthoPointsGlobalFlex":
  1679. this.beginApexData = [[0,0,4.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1680. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1681. this.mainData = [[2,2,0.0000,9.0000,"Stepped"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1682. this.mainData.push(["Dots00",[0.0000,4.5000]]);
  1683. this.mainData.push(["Dots01",[0.0000,-4.5000]]);
  1684. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1685. this.endApexData = [[0,0,4.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1686. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1687. break;
  1688. case "ApproxSegments":
  1689. this.beginApexData = [[0,0,4.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1690. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1691. this.mainData = [[1,1,0.0000,9.0000,"Stepped"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1692. this.mainData.push(["Nods00",[0.0000,0.0000,0.0000]]);
  1693. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1694. this.endApexData = [[0,0,4.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1695. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1696. break;
  1697. case "ApproxSpline":
  1698. this.beginApexData = [[0,0,4.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1699. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1700. this.mainData = [[1,1,0.0000,9.0000,"Stepped"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1701. this.mainData.push(["Dots00",[0.0000,0.0000]]);
  1702. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1703. this.endApexData = [[0,0,4.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1704. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1705. break;
  1706. case "RulerMetric":
  1707. this.beginApexData = [[0,0,4.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1708. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1709. this.mainData = [[10,0,9.0000,9.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1710. this.mainData.push(["Line",[0.0000,9.0000],[0.0000,0.0000]]);
  1711. this.mainData.push(["Line",[0.9000,4.5000],[0.9000,0.0000]]);
  1712. this.mainData.push(["Line",[1.8000,4.5000],[1.8000,0.0000]]);
  1713. this.mainData.push(["Line",[2.7000,4.5000],[2.7000,0.0000]]);
  1714. this.mainData.push(["Line",[3.6000,4.5000],[3.6000,0.0000]]);
  1715. this.mainData.push(["Line",[4.5000,6.7500],[4.5000,0.0000]]);
  1716. this.mainData.push(["Line",[5.4000,4.5000],[5.4000,0.0000]]);
  1717. this.mainData.push(["Line",[6.3000,4.5000],[6.3000,0.0000]]);
  1718. this.mainData.push(["Line",[7.2000,4.5000],[7.2000,0.0000]]);
  1719. this.mainData.push(["Line",[8.1000,4.5000],[8.1000,0.0000]]);
  1720. this.endData = [[1,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1721. this.endData.push(["Line",[0.0000,9.000],[0.0000,0.0000]]);
  1722. this.endApexData = [[0,0,4.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1723. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1724. break;
  1725. case "RulerInch":
  1726. this.beginApexData = [[0,0,11.4300]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1727. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1728. this.mainData = [[8,0,22.8600,22.8600,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1729. this.mainData.push(["Line",[0.0000,8.5725],[0.0000,0.0000]]);
  1730. this.mainData.push(["Line",[2.8575,4.28625],[2.8575,0.0000]]);
  1731. this.mainData.push(["Line",[5.7150,5.7150],[5.7150,0.0000]]);
  1732. this.mainData.push(["Line",[8.5725,4.28625],[8.5725,0.0000]]);
  1733. this.mainData.push(["Line",[11.4300,6.7500],[11.4300,0.0000]]);
  1734. this.mainData.push(["Line",[14.2875,4.28625],[14.2875,0.0000]]);
  1735. this.mainData.push(["Line",[17.1450,5.7150],[17.1450,0.0000]]);
  1736. this.mainData.push(["Line",[20.0025,4.28625],[20.0025,0.0000]]);
  1737. this.endData = [[1,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1738. this.endData.push(["Line",[0.0000,8.5725],[0.0000,0.0000]]);
  1739. this.endApexData = [[0,0,11.4300]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1740. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1741. break;
  1742. case "Riverbanks_In_1-1":
  1743. this.beginApexData = [[0,0,4.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1744. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1745. this.mainData = [[2,0,9.0000,9.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1746. this.mainData.push(["Line",[0.0000,0.0000],[0.0000,9.0000]]);
  1747. this.mainData.push(["Line",[4.5000,0.0000],[4.5000,4,5000]]);
  1748. this.endData = [[1,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1749. this.endData.push(["Line",[0.0000,0.0000],[0.0000,9.0000]]);
  1750. this.endApexData = [[0,0,4.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1751. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1752. break;
  1753. case "Riverbanks+L_In_1-1":
  1754. this.beginApexData = [[0,0,4.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1755. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1756. this.mainData = [[4,2,9.0000,9.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1757. this.mainData.push(["Line",[0.0000,0.0000],[0.0000,9.0000]]);
  1758. this.mainData.push(["Line",[4.5000,0.0000],[4.5000,4,5000]]);
  1759. this.mainData.push(["Dots00",[0.0000,9.0000]]);
  1760. this.mainData.push(["Dots00",[4.5000,9.0000]]);
  1761. this.endData = [[2,1,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1762. this.endData.push(["Line",[0.0000,0.0000],[0.0000,9.0000]]);
  1763. this.endData.push(["Dots00",[0.0000,9.0000]]);
  1764. this.endApexData = [[0,0,4.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1765. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1766. break;
  1767. case "Riverbanks+L_Out_1-1":
  1768. this.beginApexData = [[0,0,4.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1769. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1770. this.mainData = [[4,2,9.0000,9.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1771. this.mainData.push(["Line",[0.0000,0.0000],[0.0000,9.0000]]);
  1772. this.mainData.push(["Line",[4.5000,4.5000],[4.5000,9.0000]]);
  1773. this.mainData.push(["Dots00",[0.0000,9.0000]]);
  1774. this.mainData.push(["Dots00",[4.5000,9.0000]]);
  1775. this.endData = [[2,1,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1776. this.endData.push(["Line",[0.0000,0.0000],[0.0000,9.0000]]);
  1777. this.endData.push(["Dots00",[0.0000,9.0000]]);
  1778. this.endApexData = [[0,0,4.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1779. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1780. break;
  1781. case "Riverbanks_In_2-3":
  1782. this.beginApexData = [[0,0,3.0000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1783. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1784. this.mainData = [[2,0,6.0000,6.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1785. this.mainData.push(["Line",[0.0000,0.0000],[0.0000,9.0000]]);
  1786. this.mainData.push(["Line",[3.0000,0.0000],[3.0000,4.5000]]);
  1787. this.endData = [[1,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1788. this.endData.push(["Line",[0.0000,0.0000],[0.0000,9.0000]]);
  1789. this.endApexData = [[0,0,3.0000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1790. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1791. break;
  1792. case "Riverbanks+L_In_2-3":
  1793. this.beginApexData = [[0,0,3.0000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1794. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1795. this.mainData = [[4,2,6.0000,6.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1796. this.mainData.push(["Line",[0.0000,0.0000],[0.0000,9.0000]]);
  1797. this.mainData.push(["Line",[3.0000,0.0000],[3.0000,4.5000]]);
  1798. this.mainData.push(["Dots00",[0.0000,9.0000]]);
  1799. this.mainData.push(["Dots00",[3.0000,9.0000]]);
  1800. this.endData = [[2,1,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1801. this.endData.push(["Line",[0.0000,0.0000],[0.0000,9.0000]]);
  1802. this.endData.push(["Dots00",[0.0000,9.0000]]);
  1803. this.endApexData = [[0,0,3.0000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1804. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1805. break;
  1806. case "Riverbanks+L_Out_2-3":
  1807. this.beginApexData = [[0,0,3.0000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1808. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1809. this.mainData = [[4,2,6.0000,6.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1810. this.mainData.push(["Line",[0.0000,0.0000],[0.0000,9.0000]]);
  1811. this.mainData.push(["Line",[3.0000,4.5000],[3.0000,9.0000]]);
  1812. this.mainData.push(["Dots00",[0.0000,9.0000]]);
  1813. this.mainData.push(["Dots00",[3.0000,9.0000]]);
  1814. this.endData = [[2,1,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1815. this.endData.push(["Line",[0.0000,0.0000],[0.0000,9.0000]]);
  1816. this.endData.push(["Dots00",[0.0000,9.0000]]);
  1817. this.endApexData = [[0,0,3.0000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1818. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1819. break;
  1820. case "RevisionCloud_L":
  1821. this.beginApexData = [[1,1,15.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1822. this.beginApexData.push(["Nods00",[0.0000,0.0000,0.0000],[2.5000,15.0000,0.0000],[5.0000,0.0000,-0.6337]]);
  1823. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1824. this.mainData = [[1,1,20.0000,20.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1825. this.mainData.push(["Nods00",[0.0,-4.5,-0.9]]);
  1826. this.endData = [[1,1,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1827. this.endData.push(["Nods00",[0.0,-4.5,-0.6337]]);
  1828. this.endApexData = [[1,1,7.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1829. this.endApexData.push(["Nods00",[7.5000,0.0000,0.0000]]);
  1830. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1831. break;
  1832. case "RevisionCloud_SL":
  1833. this.beginApexData = [[1,1,15.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1834. this.beginApexData.push(["Nods00",[0.0000,0.0000,0.0000],[2.5000,15.0000,0.0000],[5.0000,0.0000,-0.6337]]);
  1835. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1836. this.mainData = [[1,1,25.0000,25.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1837. this.mainData.push(["Nods00",[0.0,-4.5,-0.9],[5.0,-4.5,-0.9]]);
  1838. this.endData = [[1,1,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1839. this.endData.push(["Nods00",[0.0,-4.5,-0.6337]]);
  1840. this.endApexData = [[1,1,7.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1841. this.endApexData.push(["Nods00",[7.5000,0.0000,0.0000]]);
  1842. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1843. break;
  1844. case "RevisionCloud_ML":
  1845. this.beginApexData = [[1,1,15.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1846. this.beginApexData.push(["Nods00",[0.0000,0.0000,0.0000],[2.5000,15.0000,0.0000],[5.0000,0.0000,-0.6337]]);
  1847. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1848. this.mainData = [[1,1,32.0000,32.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1849. this.mainData.push(["Nods00",[0.0,-4.5,-0.9],[12.0,-4.5,-0.9]]);
  1850. this.endData = [[1,1,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1851. this.endData.push(["Nods00",[0.0,-4.5,-0.6337]]);
  1852. this.endApexData = [[1,1,7.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1853. this.endApexData.push(["Nods00",[7.5000,0.0000,0.0000]]);
  1854. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1855. break;
  1856. case "RevisionCloud_SML":
  1857. this.beginApexData = [[1,1,15.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1858. this.beginApexData.push(["Nods00",[0.0000,0.0000,0.0000],[2.5000,15.0000,0.0000],[5.0000,0.0000,-0.6337]]);
  1859. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1860. this.mainData = [[1,1,37.0000,37.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1861. this.mainData.push(["Nods00",[0.0,-4.5,-0.9],[5.0,-4.5,-0.9],[17.0,-4.5,-0.9]]);
  1862. this.endData = [[1,1,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1863. this.endData.push(["Nods00",[0.0,-4.5,-0.6337]]);
  1864. this.endApexData = [[1,1,7.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1865. this.endApexData.push(["Nods00",[7.5000,0.0000,0.0000]]);
  1866. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1867. break;
  1868. case "RevisionCloud_MSML":
  1869. this.beginApexData = [[1,1,15.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1870. this.beginApexData.push(["Nods00",[0.0000,0.0000,0.0000],[2.5000,15.0000,0.0000],[5.0000,0.0000,-0.6337]]);
  1871. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1872. this.mainData = [[1,1,49.0000,49.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1873. this.mainData.push(["Nods00",[0.0,-4.5,-0.9],[12.0,-4.5,-0.9],[17.0,-4.5,-0.9],[29.0,-4.5,-0.9]]);
  1874. this.endData = [[1,1,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1875. this.endData.push(["Nods00",[0.0,-4.5,-0.6337]]);
  1876. this.endApexData = [[1,1,7.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1877. this.endApexData.push(["Nods00",[7.5000,0.0000,0.0000]]);
  1878. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1879. break;
  1880. case "RevisionCloud_Multi":
  1881. this.beginApexData = [[1,1,15.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1882. this.beginApexData.push(["Nods00",[0.0000,0.0000,0.0000],[2.5000,15.0000,0.0000],[5.0000,0.0000,-0.6337]]);
  1883. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1884. this.mainData = [[1,1,37.0000,37.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1885. this.mainData.push(["Nods00",[0.0000,-4.5000,-0.8315],[4.8604,-3.5980,-0.6337],[15.7420,-2.7896,-1.5189],[17.3856,-2.6098,-0.8166]]);
  1886. this.endData = [[1,1,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1887. this.endData.push(["Nods00",[0.0,-4.5,-0.6337]]);
  1888. this.endApexData = [[1,1,7.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1889. this.endApexData.push(["Nods00",[7.5000,0.0000,0.0000]]);
  1890. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1891. break;
  1892. case "RevisionCloud_Complex":
  1893. this.beginApexData = [[1,1,15.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1894. this.beginApexData.push(["Nods00",[0.0000,0.0000,0.0000],[2.5000,15.0000,0.0000],[5.0000,0.0000,-0.6337]]);
  1895. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1896. this.mainData = [[3,1,37.0000,37.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1897. this.mainData.push(["Nods00",[0.0000,-4.5000,-0.8315],[4.8604,-3.5980,-0.6337],[15.7420,-2.7896,-0.1155],[17.3856,-2.6098,-0.8166]]);
  1898. this.mainData.push(["Poly",[15.7420,-2.7896,0.0985],[14.5249,-3.5113,0.0000]]);
  1899. this.mainData.push(["Poly",[17.3856,-2.6098,-0.0985],[18.7300,-3.0513,0.5000]]);
  1900. this.endData = [[1,1,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1901. this.endData.push(["Nods00",[0.0,-4.5,-0.6337]]);
  1902. this.endApexData = [[1,1,7.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1903. this.endApexData.push(["Nods00",[7.5000,0.0000,0.0000]]);
  1904. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1905. break;
  1906. case "SinusoidWave":
  1907. this.beginApexData = [[0,0,4.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1908. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1909. this.mainData = [[2,0,9.0000,9.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1910. this.mainData.push(["Spline",[0.0000,0.0000],[0.5000,1.5391],[1.0000,2.8925],[1.5000,3.8971],[1.7500,4.2286],[2.0000,4.4316],[2.2500,4.5000],[2.5000,4.4316],[2.7500,4.2286],[3.0000,3.8971],[3.5000,2.8925],[4.0000,1.5391],[4.5000,0.0000]]);
  1911. this.mainData.push(["Spline",[4.5000,0.0000],[5.0000,-1.5391],[5.5000,-2.8925],[6.0000,-3.8971],[6.2500,-4.2286],[6.5000,-4.4316],[6.7500,-4.5000],[7.0000,-4.4316],[7.2500,-4.2286],[7.5000,-3.8971],[8.0000,-2.8925],[8.5000,-1.5391],[9.0000,0.0000]]);
  1912. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1913. this.endApexData = [[0,0,4.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1914. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1915. break;
  1916. case "SinusoidWaveGlobal":
  1917. this.beginApexData = [[0,0,4.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1918. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1919. this.mainData = [[2,2,9.0000,9.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1920. this.mainData.push(["Dots00",[0.0000,0.0000],[0.5000,1.5391],[1.0000,2.8925],[1.5000,3.8971],[1.7500,4.2286],[2.0000,4.4316],[2.2500,4.5000],[2.5000,4.4316],[2.7500,4.2286],[3.0000,3.8971],[3.5000,2.8925],[4.0000,1.5391]]);
  1921. this.mainData.push(["Dots00",[4.5000,0.0000],[5.0000,-1.5391],[5.5000,-2.8925],[6.0000,-3.8971],[6.2500,-4.2286],[6.5000,-4.4316],[6.7500,-4.5000],[7.0000,-4.4316],[7.2500,-4.2286],[7.5000,-3.8971],[8.0000,-2.8925],[8.5000,-1.5391]]);
  1922. this.endData = [[1,1,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1923. this.endData.push(["Dots00",[0.0000,0.0000]]);
  1924. this.endApexData = [[0,0,4.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1925. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1926. break;
  1927. case "3PhaseWaveGlobal":
  1928. this.beginApexData = [[0,0,4.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1929. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1930. this.mainData = [[8,8,9.0000,9.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1931. this.mainData.push(["Dots00",[0.0000,0.0000],[0.5000,1.5391],[1.0000,2.8925],[1.5000,3.8971],[1.7500,4.2286],[2.0000,4.4316],[2.2500,4.5000],[2.5000,4.4316],[2.7500,4.2286],[3.0000,3.8971],[3.5000,2.8925],[4.0000,1.5391],[4.5000,0.0000]]);
  1932. this.mainData.push(["Dots00",[5.0000,-1.5391],[5.5000,-2.8925],[6.0000,-3.8971],[6.2500,-4.2286],[6.5000,-4.4316],[6.7500,-4.5000],[7.0000,-4.4316],[7.2500,-4.2286],[7.5000,-3.8971],[8.0000,-2.8925],[8.5000,-1.5391]]);
  1933. this.mainData.push(["Dots01",[0.0000,3.8971],[0.5000,2.8925],[1.0000,1.5391],[1.5000,0.0000]]);
  1934. this.mainData.push(["Dots01",[2.0000,-1.5391],[2.5000,-2.8925],[3.0000,-3.8971],[3.2500,-4.2286],[3.5000,-4.4316],[3.7500,-4.5000],[4.0000,-4.4316],[4.2500,-4.2286],[4.5000,-3.8971],[5.0000,-2.8925],[5.5000,-1.5391]]);
  1935. this.mainData.push(["Dots01",[6.0000,0.0000],[6.5000,1.5391],[7.0000,2.8925],[7.5000,3.8971],[7.7500,4.2286],[8.0000,4.4316],[8.2500,4.5000],[8.5000,4.4316],[8.7500,4.2286]]);
  1936. this.mainData.push(["Dots02",[0.0000,-3.8971],[0.2500,-4.2286],[0.5000,-4.4316],[0.7500,-4.5000],[1.0000,-4.4316],[1.2500,-4.2286],[1.5000,-3.8971],[2.0000,-2.8925],[2.5000,-1.5391],[3.0000,0.0000]]);
  1937. this.mainData.push(["Dots02",[3.5000,1.5391],[4.0000,2.8925],[4.5000,3.8971],[4.7500,4.2286],[5.0000,4.4316],[5.2500,4.5000],[5.5000,4.4316],[5.7500,4.2286],[6.0000,3.8971],[6.5000,2.8925],[7.0000,1.5391]]);
  1938. this.mainData.push(["Dots02",[7.5000,0.0000],[8.0000,-1.5391],[8.5000,-2.8925]]);
  1939. this.endData = [[3,3,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1940. this.endData.push(["Dots00",[0.0000,0.0000]]);
  1941. this.endData.push(["Dots01",[0.0000,3.8971]]);
  1942. this.endData.push(["Dots02",[0.0000,-3.8971]]);
  1943. this.endApexData = [[0,0,4.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1944. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1945. break;
  1946. case "TriangleWave":
  1947. this.beginApexData = [[0,0,4.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1948. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1949. this.mainData = [[2,0,9.0000,9.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1950. this.mainData.push(["Poly",[0.0000,0.0000],[2.2500,4.5000],[4.5000,0.0000]]);
  1951. this.mainData.push(["Poly",[4.5000,0.0000],[6.7500,-4.5000],[9.0000,0.0000]]);
  1952. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1953. this.endApexData = [[0,0,4.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1954. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1955. break;
  1956. case "TriangleWaveGlobal":
  1957. this.beginApexData = [[0,0,4.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1958. this.beginData = [[1,1,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1959. this.beginData.push(["Nods00",[0.0000,0.0000,0.0000]]);
  1960. this.mainData = [[1,0,9.0000,9.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1961. this.mainData.push(["Nods00",[2.2500,4.5000,0.0000],[6.7500,-4.5000,0.0000]]);
  1962. this.endData = [[1,1,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1963. this.endData.push(["Nods00",[0.0000,0.0000,0.0000]]);
  1964. this.endApexData = [[0,0,4.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1965. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1966. break;
  1967. case "SawtoothWave":
  1968. this.beginApexData = [[0,0,4.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1969. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1970. this.mainData = [[2,0,9.0000,9.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1971. this.mainData.push(["Poly",[0.0000,0.0000],[4.5000,4.5000],[4.5000,0.0000]]);
  1972. this.mainData.push(["Poly",[4.5000,0.0000],[4.5000,-4.5000],[9.0000,0.0000]]);
  1973. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1974. this.endApexData = [[0,0,4.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1975. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1976. break;
  1977. case "SawtoothWaveGlobal":
  1978. this.beginApexData = [[0,0,4.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1979. this.beginData = [[1,1,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1980. this.beginData.push(["Nods00",[0.0000,0.0000,0.0000]]);
  1981. this.mainData = [[1,0,9.0000,9.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1982. this.mainData.push(["Nods00",[4.5000,4.5000,0.0000],[4.5000,-4.5000,0.0000]]);
  1983. this.endData = [[1,1,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1984. this.endData.push(["Nods00",[0.0000,0.0000,0.0000]]);
  1985. this.endApexData = [[0,0,4.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1986. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1987. break;
  1988. case "SquareWave":
  1989. this.beginApexData = [[0,0,4.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  1990. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  1991. this.mainData = [[2,0,9.0000,9.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  1992. this.mainData.push(["Poly",[0.0000,0.0000],[0.0000,4.5000],[4.5000,4.5000],[4.5000,0.0000]]);
  1993. this.mainData.push(["Poly",[4.5000,0.0000],[4.5000,-4.5000],[9.0000,-4.5000],[9.0000,0.0000]]);
  1994. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  1995. this.endApexData = [[0,0,4.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  1996. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  1997. break;
  1998. case "SquareWaveFlexing":
  1999. this.beginApexData = [[0,0,4.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  2000. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  2001. this.mainData = [[6,0,9.0000,9.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  2002. this.mainData.push(["Line",[0.0000,0.0000],[0.0000,4.5000]]);
  2003. this.mainData.push(["Spline",[0.0000,4.5000],[1.5000,4.5000],[3.0000,4.5000],[4.5000,4.5000]]);
  2004. this.mainData.push(["Line",[4.5000,4.5000],[4.5000,0.0000]]);
  2005. this.mainData.push(["Line",[4.5000,0.0000],[4.5000,-4.5000]]);
  2006. this.mainData.push(["Spline",[4.5000,-4.5000],[6.0000,-4.5000],[7.5000,-4.5000],[9.0000,-4.5000]]);
  2007. this.mainData.push(["Line",[9.0000,-4.5000],[9.0000,0.0000]]);
  2008. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  2009. this.endApexData = [[0,0,4.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  2010. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  2011. break;
  2012. case "SquareWaveGlobal":
  2013. this.beginApexData = [[0,0,4.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  2014. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  2015. this.mainData = [[1,0,9.0000,9.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  2016. this.mainData.push(["Nods00",[0.0000,0.0000,0.0000],[0.0000,4.5000,0.0000],[4.5000,4.5000,0.0000],[4.5000,0.0000,0.0000],[4.5000,-4.5000,0.0000],[9.0000,-4.5000,0.0000]]);
  2017. this.endData = [[1,1,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  2018. this.endData.push(["Nods00",[0.0000,0.0000,0.0000]]);
  2019. this.endApexData = [[0,0,4.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  2020. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  2021. break;
  2022. case "SteppedWave":
  2023. this.beginApexData = [[0,0,4.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  2024. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  2025. this.mainData = [[2,0,9.0000,9.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  2026. this.mainData.push(["Poly",[0.0000,0.0000],[0.0000,1.5000],[0.9000,1.5000],[0.9000,3.0000],[1.8000,3.0000],[1.8000,4.5000],[2.7000,4.5000],[2.7000,3.0000],[3.6000,3.0000],[3.6000,1.5000],[4.5000,1.5000],[4.5000,0.0000]]);
  2027. this.mainData.push(["Poly",[4.5000,0.0000],[4.5000,-1.5000],[5.4000,-1.5000],[5.4000,-3.0000],[6.3000,-3.0000],[6.3000,-4.5000],[7.2000,-4.5000],[7.2000,-3.0000],[8.1000,-3.0000],[8.1000,-1.5000],[9.0000,-1.5000],[9.0000,0.0000]]);
  2028. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  2029. this.endApexData = [[0,0,4.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  2030. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  2031. break;
  2032. case "SteppedWaveGlobal":
  2033. this.beginApexData = [[0,0,4.5000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  2034. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  2035. this.mainData = [[2,0,9.0000,9.0000,"Boxed"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  2036. this.mainData.push(["Nods00",[0.0000,0.0000,0.0000],[0.0000,1.5000,0.0000],[0.9000,1.5000,0.0000],[0.9000,3.0000,0.0000],[1.8000,3.0000,0.0000],[1.8000,4.5000,0.0000],[2.7000,4.5000,0.0000],[2.7000,3.0000,0.0000],[3.6000,3.0000,0.0000],[3.6000,1.5000,0.0000],[4.5000,1.5000,0.0000],[4.5000,0.0000,0.0000]]);
  2037. this.mainData.push(["Nods00",[4.5000,-1.5000,0.0000],[5.4000,-1.5000,0.0000],[5.4000,-3.0000,0.0000],[6.3000,-3.0000,0.0000],[6.3000,-4.5000,0.0000],[7.2000,-4.5000,0.0000],[7.2000,-3.0000,0.0000],[8.1000,-3.0000,0.0000],[8.1000,-1.5000,0.0000],[9.0000,-1.5000,0.0000]]);
  2038. this.endData = [[1,1,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  2039. this.endData.push(["Nods00",[0.0000,0.0000,0.0000]]);
  2040. this.endApexData = [[0,0,4.5000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  2041. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  2042. break;
  2043. case "Quadrilar":
  2044. this.beginApexData = [[0,0,9.0000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  2045. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  2046. this.mainData = [[1,0,9.0000,18.0000,"Stepped"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  2047. this.mainData.push(["Poly",[0.0000,4.5000],[0.0000,-4.5000],[9.0000,-4.5000],[9.0000,4.5000],[0.0000,4.5000]]);
  2048. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  2049. this.endApexData = [[0,0,9.0000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  2050. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  2051. break;
  2052. case "QuadrilarFlexing":
  2053. this.beginApexData = [[0,0,9.0000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  2054. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  2055. this.mainData = [[4,0,9.0000,18.0000,"Stepped"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  2056. this.mainData.push(["Line",[0.0000,4.5000],[0.0000,-4.5000]]);
  2057. this.mainData.push(["Spline",[0.0000,-4.5000],[1.0000,-4.5000],[2.0000,-4.5000],[3.0000,-4.5000],[4.0000,-4.5000],[5.0000,-4.5000],[6.0000,-4.5000],[7.0000,-4.5000],[8.0000,-4.5000],[9.0000,-4.5000]]);
  2058. this.mainData.push(["Line",[9.0000,-4.5000],[9.0000,4.5000]]);
  2059. this.mainData.push(["Spline",[9.0000,4.5000],[8.0000,4.5000],[7.0000,4.5000],[6.0000,4.5000],[5.0000,4.5000],[4.0000,4.5000],[3.0000,4.5000],[2.0000,4.5000],[1.0000,4.5000],[0.0000,4.5000]]);
  2060. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  2061. this.endApexData = [[0,0,9.0000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  2062. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  2063. break;
  2064. case "SideQuadrilar":
  2065. this.beginApexData = [[0,0,9.0000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  2066. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  2067. this.mainData = [[1,0,9.0000,18.0000,"Stepped"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  2068. this.mainData.push(["Poly",[0.0000,9.0000],[0.0000,0.0000],[9.0000,0.0000],[9.0000,9.0000],[0.0000,9.0000]]);
  2069. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  2070. this.endApexData = [[0,0,9.0000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  2071. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  2072. break;
  2073. case "SideQuadrilarFlexing":
  2074. this.beginApexData = [[0,0,9.0000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  2075. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  2076. this.mainData = [[4,0,9.0000,18.0000,"Stepped"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  2077. this.mainData.push(["Line",[0.0000,9.000],[0.0000,0.000]]);
  2078. this.mainData.push(["Spline",[0.0000,0.0000],[1.0000,0.0000],[2.0000,0.0000],[3.0000,0.0000],[4.0000,0.0000],[5.0000,0.0000],[6.0000,0.0000],[7.0000,0.0000],[8.0000,0.0000],[9.0000,0.0000]]);
  2079. this.mainData.push(["Line",[9.0000,0.0000],[9.0000,9.0000]]);
  2080. this.mainData.push(["Spline",[9.0000,9.0000],[8.0000,9.0000],[7.0000,9.0000],[6.0000,9.0000],[5.0000,9.0000],[4.0000,9.0000],[3.0000,9.0000],[2.0000,9.0000],[1.0000,9.0000],[0.0000,9.0000]]);
  2081. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  2082. this.endApexData = [[0,0,9.0000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  2083. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  2084. break;
  2085. case "AllPainterDataTypes":
  2086. this.beginApexData = [[0,0,0.0000]]; // *beginApexData.count, *Dots/Nods.count, *painterLength, .......
  2087. this.beginData = [[0,0,0.0000]]; // *beginData.count, *Dots/Nods.count, *painterLength, .......
  2088. this.mainData = [[9,3,2.0000,9.0000,"Stepped"]]; // *mainData.count, *Dots/Nods.count, *painterLength, painterStepSize, .......
  2089. this.mainData.push(["Point",[1.0000,4.0000]]);
  2090. this.mainData.push(["Line",[0.0000,4.5000],[2.0000,-4.5000]]);
  2091. this.mainData.push(["Poly",[0.0000,4.900,0.0000],[0.5000,4.8000,0.5000],[2.0000,5.2000,0.0000],[0.0000,5.3000,0.0000]]);
  2092. this.mainData.push(["Spline",[1.5145,-3.4413],[1.2179,-2.9250],[0.8036,-2.5714],[0.0000,0.0000]]);
  2093. this.mainData.push(["Arc",[0.0000,4.5000,2.1000,90.0000,270.0000,false]]);
  2094. this.mainData.push(["Circle",[2.0000,-4.5000,1.2000]]);
  2095. this.mainData.push(["Nods00",[0.0000,2.2000,0.0000],[1.0000,-2.2000,0.0000],[2.0000,2.2000,0.0000]]);
  2096. this.mainData.push(["Dots00",[0.0000,4.000],[1.0000,3.500],[2.0000,4.000]]);
  2097. this.mainData.push(["Dots01",[0.0000,-4.5000],[1.5000,-4.5000],[3.0000,-4.5000],[4.5000,-4.5000],[6.0000,-4.5000],[7.5000,-4.5000]]);
  2098. this.endData = [[0,0,0.0000]]; // *endData.count, *Dots/Nods.count, *painterLength, .......
  2099. this.endApexData = [[0,0,0.0000]]; // *endApexData.count, *Dots/Nods.count, *painterLength, .......
  2100. this.knotData = [[0,0,0.0000,0,0.00]]; // *knotData.count, *Dots/Nods.count, *painterLength, insertions, insertPoints.......
  2101. break;
  2102. } // End switch(painterSet)
  2103. // ** USER-ADJUSTABLE PARAMETERS ABOVE **
  2104. return painterSet + " done";
  2105. };
  2106. /**
  2107. * Initiate the FlexPainter dialog Comboboxes. # ToDo # Sources
  2108. */
  2109. // Based on Dimension.js initUiOptions
  2110. FlexPainter.prototype.initWidgetsCombo = function(widget) {
  2111. // ** HARDCODED 51 ** 51 cases, 51 icons, 1 knot icon
  2112. var widgets = getWidgets(widget);
  2113. var painterSetCombo = widgets["PainterSelection"];
  2114. painterSetCombo.clear();
  2115. painterSetCombo.addItem("CurtainRopeProto"); // =Flexing Slanted: Passed: Over, Boxed, Under
  2116. // On open forms & step > length: Apex detached, is in se correct
  2117. // painterSetCombo.addItem("GreekMeander14"); // Similar Boxed
  2118. painterSetCombo.addItem("GreekMeander15"); // Similar Boxed
  2119. painterSetCombo.addItem("GreekMeander15Flexing"); // Similar Boxed
  2120. painterSetCombo.addItem("CelticMeanderRounded"); // =Flexing Similar Boxed
  2121. painterSetCombo.addItem("CelticMeanderHardBend"); // =Flexing Similar Boxed
  2122. painterSetCombo.addItem("CelticMeanderRound"); // =Flexing Similar Boxed
  2123. painterSetCombo.addItem("CelticMeanderEndless"); // =Flexing Similar Boxed
  2124. painterSetCombo.addItem("CelticMeanderEndless_L"); // =Flexing Similar Boxed
  2125. painterSetCombo.addItem("TelephoneCoilMedio"); // =Flexing Similar Boxed
  2126. // Railways are not so ideal to morph, the sleepers get transformed to trapezoids
  2127. painterSetCombo.addItem("RailwayTrackLineArt"); // =Mixed Flexing Similar Boxed
  2128. painterSetCombo.addItem("RailwayTrackConcrete"); // =Mixed Flexing Similar Boxed
  2129. painterSetCombo.addItem("OrthogonalMark"); // Similar Stepped Null-length
  2130. painterSetCombo.addItem("OrthogonalBar"); // Stepped Null-length: Passed: Over
  2131. painterSetCombo.addItem("1_OrthoPointGlobal"); // Similar Stepped Null-length
  2132. painterSetCombo.addItem("1_OrthoPointGlobalFlex"); // Similar Stepped Null-length
  2133. painterSetCombo.addItem("2_OrthoPointsGlobal"); // Similar Stepped Null-length
  2134. painterSetCombo.addItem("2_OrthoPointsGlobalFlex"); // Similar Stepped Null-length
  2135. painterSetCombo.addItem("ApproxSegments"); // Similar Stepped Null-length
  2136. painterSetCombo.addItem("ApproxSpline"); // Similar Stepped Null-length
  2137. painterSetCombo.addItem("Quadrilar"); // Similar Stepped
  2138. painterSetCombo.addItem("QuadrilarFlexing"); // Similar Stepped
  2139. painterSetCombo.addItem("SideQuadrilar"); // Similar Stepped
  2140. painterSetCombo.addItem("SideQuadrilarFlexing"); // Similar Stepped
  2141. // Rulers are only accurate if no dynamic scaling is involved
  2142. painterSetCombo.addItem("RulerMetric"); // Similar Boxed
  2143. painterSetCombo.addItem("RulerInch"); // Similar Boxed
  2144. painterSetCombo.addItem("Riverbanks_In_1-1"); // Similar Boxed
  2145. painterSetCombo.addItem("Riverbanks+L_In_1-1"); // Similar Boxed
  2146. painterSetCombo.addItem("Riverbanks+L_Out_1-1"); // Similar Boxed
  2147. painterSetCombo.addItem("Riverbanks_In_2-3"); // Similar Boxed
  2148. painterSetCombo.addItem("Riverbanks+L_In_2-3"); // Similar Boxed
  2149. painterSetCombo.addItem("Riverbanks+L_Out_2-3"); // Similar Boxed
  2150. // RevisionClouds mostly rely on the bulging of a global polyline
  2151. painterSetCombo.addItem("RevisionCloud_L"); // Similar Boxed
  2152. painterSetCombo.addItem("RevisionCloud_SL"); // Similar Boxed
  2153. painterSetCombo.addItem("RevisionCloud_ML"); // Similar Boxed
  2154. painterSetCombo.addItem("RevisionCloud_SML"); // Similar Boxed
  2155. painterSetCombo.addItem("RevisionCloud_MSML"); // Similar Boxed
  2156. painterSetCombo.addItem("RevisionCloud_Multi"); // Similar Boxed
  2157. painterSetCombo.addItem("RevisionCloud_Complex"); // Similar Boxed
  2158. painterSetCombo.addItem("SinusoidWave"); // Similar Boxed
  2159. painterSetCombo.addItem("SinusoidWaveGlobal"); // Similar Boxed
  2160. painterSetCombo.addItem("3PhaseWaveGlobal"); // Similar Boxed
  2161. painterSetCombo.addItem("TriangleWave"); // Similar Boxed
  2162. painterSetCombo.addItem("TriangleWaveGlobal"); // Similar Boxed
  2163. painterSetCombo.addItem("SawtoothWave"); // Similar Boxed
  2164. painterSetCombo.addItem("SawtoothWaveGlobal"); // Similar Boxed
  2165. painterSetCombo.addItem("SquareWave"); // Similar Boxed
  2166. painterSetCombo.addItem("SquareWaveFlexing"); // Similar Boxed
  2167. painterSetCombo.addItem("SquareWaveGlobal"); // Similar Boxed
  2168. painterSetCombo.addItem("SteppedWave"); // Boxed: Passed: Over, Boxed, Under
  2169. painterSetCombo.addItem("SteppedWaveGlobal"); // Similar Boxed
  2170. painterSetCombo.addItem("AllPainterDataTypes"); // Stepped: Passed: Over, Boxed, Under
  2171. // Same solution for PainterBox enabled-state
  2172. painterSetCombo.currentText = "";
  2173. painterSetCombo.currentIndex = -1;
  2174. return;
  2175. };
  2176. /**
  2177. * Major remark block as dummy function. Collapsible in NPP as such.
  2178. */
  2179. FlexPainter.Remarks = function(only4DummysLikeMe) {
  2180. // Recheck last status!!!
  2181. // # Error 0 # MAJOR ISSUE 0/2 # Fixed 2 # Workaround 2 #
  2182. // # Issue 18/54 # Unsolvable 1 # Solved 12 # Fixed 23 # Workaround 23 #
  2183. // # ToDo 21 # Done 8 # Busy 4 # Reminder 2 #
  2184. // *************************************************************************************************
  2185. // # ToDo # Solution for Painter data sets.(Partially prepared UI & code)
  2186. // # ToDo # Investigate entities in Blocks or Files, icons are in files
  2187. // # Busy # Casting on newly added sublayer 'Painted'
  2188. // # Issue # Interferes with group castings.
  2189. // # Busy # Insertable painters (eg. Knots) @(aaa%,bbb%,ccc%,...)(Partially prepared UI & code)
  2190. // # Busy # Check user numerical entries ... mainScaleX/Y != -n; 0; huge v.37
  2191. // # ToDo # Investigate '.setValidator' for QLineEdit (Occurs in eg. InvoluteSpur.js)
  2192. // # ToDo # Check that values are numbers
  2193. // Done: Can't start entries with '-', can enter expression that gives negative result v.37
  2194. // Done: Made absolute and factor limited to 0.01 & 111 and written back to Widget v.38
  2195. // Done: limited casting main painter to 9999 / entity v.38
  2196. // (# ToDo # Revise: On short line in test f0.01 14s 21139 splines /3 is about 7000 painters)
  2197. // Done: Dirty loop Dialog until flawless v.39
  2198. // *************************************************************************************************
  2199. // # MAJOR ISSUE Fixed # Fails in CE
  2200. // # Workaround # hasPlugin("PROTOOLS")
  2201. // Initiate conditional in FlexPainter.init
  2202. // Run conditional from beginEvent
  2203. // # ToDo # Can it be CE lean ???
  2204. // # MAJOR ISSUE Fixed # Dialog painter set selection coding and how to have scope...
  2205. // - FlexPainter.PainterSetInit() out of scope
  2206. // - Painter data out of scope
  2207. // JAVAscript/Qt related Asked for help
  2208. // # Workaround # Get functions analogue OrthogonalProjections.js Line 194 & 261
  2209. // https://qcad.org/rsforum/viewtopic.php?t=6626
  2210. // - getPainterSet functions (calling PainterSetInit)
  2211. // - getDoBeginApex, getDoEndApex and getDoInserts functions (return boolean)
  2212. // - getBase9Length and getBase9Stepsize functions (return dimension)
  2213. // # Issue Fixed # Not functional for first use
  2214. // # Workaround # Instead of: this.PainterSetInit("Default") what returns "CurtainRopeProto"
  2215. // Tried with success: widgets["PainterSelection"].setCurrentText("Default");
  2216. // And let change function take over
  2217. // # Issue Solved # The Dialog starts with the non-existent set "Default"
  2218. // Solved with "CurtainRopeProto". Offcourse
  2219. // # MAJOR ISSUE Fixed # AppCrash on casting Null-splines followed by:
  2220. // - Select All
  2221. // - Select Layer Entities: cast layer
  2222. // - Invert Selection (with base entity(-ies) still selected)
  2223. // - Selection filter: entities on cast layer
  2224. // - Selection filter: splines
  2225. // - draw select including origin
  2226. // NOT with draw select excluding the origin
  2227. // # Workaround # Difference in target & catching null-vectors
  2228. // For usability only reports and halts in debugger mode
  2229. // # ToDo # Debate the casting of a NULL entry
  2230. // # Issue Unsolvable # Can't find where qDebug("...") is sending to
  2231. // Windows can not!: https://qcad.org/rsforum/viewtopic.php?t=6202
  2232. // # Issue Solved # Not functional spinbox
  2233. // Solved by setting 'singleStep' to 1 in UI spinbox, added 'accelerated'
  2234. // # Issue Solved # Two options
  2235. // Solved by knowing the difference
  2236. // widgets["MainLengthX"].text = xyz;
  2237. // widgets["MainLengthX"].setValue(xyz);
  2238. // ... = widgets["FactorY"].text;
  2239. // ... = widgets["FactorY"].getValue();
  2240. // See: https://qcad.org/rsforum/viewtopic.php?t=6583
  2241. // # Issue Solved # metric vs imperial
  2242. // Solved with base 9 & Units
  2243. // See: https://qcad.org/rsforum/viewtopic.php?t=6547#p24624
  2244. // # Issue Solved # Division Pi/2 was used 3 times in each painter spline fitpoint casting loop
  2245. // Solved with: appropriate math, script global this.var, locals as var and some as const (faster)
  2246. // Still interesting for overal speed
  2247. // Exec time: factor x1: literal (1.570796...)
  2248. // factor ~x2: const orthoAngle (not Global)
  2249. // factor ~x4: var orthoAngle && Global const orthoAngle && this.orthoAngle
  2250. // factor ~x8...12: Math.PI/2
  2251. // # Issue Solved # 'if () {...}' with multiple AND conditions take longer to evaluate.
  2252. // Solved for AND in frequent looping with: Multistage testing, test larger variations first
  2253. // Solved for OR with: Test more likely to be true first
  2254. // Kept multistage testing for uniflow main script loop
  2255. // # Reminder # Check 'if() {...}' block conditions
  2256. // # Issue Solved # 'For(){...}' loops work faster with less calculations in the conditions
  2257. // # Reminder # Check 'For() {...}' loop conditions
  2258. // # Issue Fixed # Pushing to an object defined as array doesn't work out well
  2259. // # Workaround # Append beyond end: xyz.object.length = item to append
  2260. // # Issue Fixed # castAngle failing @startPoint or @distance zero or @endpoint or @distance objlength
  2261. // Some such castings return null vectors for castpoint and subsequently an error for castAngle
  2262. // # Done # Isolate cases see FlexPainter.prototype.castPainter...switch(this.castingType){}
  2263. // # Done # File topic/bugreport =related to= offset to poly @startPoint || @endpoint
  2264. // https://www.ribbonsoft.com/rsforum/viewtopic.php?t=6590
  2265. // https://qcad.org/rsforum/viewtopic.php?t=6601
  2266. // Prior v0.39: AVOID the use of fitpoints on the reference margins
  2267. // Final # Workaround # Offset tiny bit from start- or endpoint
  2268. // # Issue # On geo closed have to offset >999 times RS.PointTolerance (1e-6) to stay away from first segment
  2269. // Tested RS.PointTolerance times { 2,10,100,1000(ok),500,750,999,1000(ok) => 2000 times}
  2270. // # Issue Fixed # Angle at polyline
  2271. // shape.getAngleAtPoint(RVector) == NaN
  2272. // shape.getAngleAt(distance,RS.FromStart) == NaN
  2273. // # Workaround # Angle at segment
  2274. // # Issue Fixed # Dialog pops up with lots of decimals without initWidgets(dialog)
  2275. // With the dialog change functions active less are displayed
  2276. // RMathLineEdit is with precision 6 and displaying is java related
  2277. // # Workaround # Reordered sequence
  2278. // And get stuck with precision 6, always better then an endless number of digits.
  2279. // # Issue Solved # Pushing messages to command history is slow (80ms/entry vs casting fitpoints: 10/ms)
  2280. // Solved with optionally suppress if not critical or essential
  2281. // With beVerbose flag in Dialog. Super persistently set
  2282. // # Done # Optionally delete base entity(-ies) in one operation at end. Super persistently cleared
  2283. // # Done # Beside dynamically scale Open Forms optionally Align @start @end @center
  2284. // # Done # With fitN rather fit N or N+1 instead of cast until end
  2285. // Kind of a hybrid starting from version 0.40
  2286. // # Done # Closed forms align too.
  2287. // Use shift closed forms placement 0-100% actual painter stepsize
  2288. // # Done # Beside splines add painter entities types: Line, Point, Arc, Circle, Poly, Poly global
  2289. // # Done # Include poly and global poly bulging
  2290. // ***Reminders*************************************************************************************
  2291. // !! Use '==' not '=' !! apart from the fact '==' is always conditional
  2292. // Don't use '>>' by mistake nor '<<' '=<' '=>'
  2293. // Code on lines must end with ';' or '}' and nothing else unless the code is properly multilined
  2294. // Simple test: even counts of '[', ']', '(', ')', '{', '}' forget 1 ')' will lead to crash
  2295. // 'this.variable' in FlexPainter.prototype.xyz functions Scope: all FlexPainter.prototype.xyz functions
  2296. // const only have function scope
  2297. // bool true = multipler 1, bool false = multipler 0 BUT TAKE CARE
  2298. // Return more variables: var ret = []; ret.push(...); ret.push(...); return ret;
  2299. // RMath.fuzzyCompare(value, value, tolerance); RS.PointTolerance
  2300. // Math.round ECMAScript rounds to nearest integer tie breaking half towards positive infinity
  2301. // meaning: m.500 rounds up = m+1 , -m.500 rounds up = -m+1
  2302. // Common is rounding to nearest integer tie breaking half away from zero (towards infinity)
  2303. // meaning: m.500 up = m+1 , -m.500 down = -m-1
  2304. // https://upload.wikimedia.org/wikipedia/commons/8/8a/Comparison_rounding_graphs_SMIL.svg
  2305. // Math.trunc simply cuts of the point and the digits. Is not done by Math!
  2306. // Progress see Ucs.js ??? ISNOT part of EAction Class. See RProgressHandler Class
  2307. // EAction.setProgressText("Applying operation...");
  2308. // EAction.setProgress((100 / ids.length) * i);
  2309. // EAction.setProgress(100);
  2310. // EAction.setProgressEnd();
  2311. // this.updatePreview();
  2312. };