Doodle3D/Doodle3D-Slicer

improve intersections to slice step

casperlamboo opened this issue · 2 comments

The intersections to slice step takes a lot of time when a model contains lots of points. I think there is some room for improvement in this step.

This step connects layer points to 2d shapes for each layer. I've witten a small piece of code that converts first layer of a model to shapes.

const subtract = (a, b) => ({
  x: a.x - b.x,
  y: a.y - b.y
});
const add = (a, b) => ({
  x: a.x + b.x,
  y: a.y + b.y
});
const scale = (a, factor) => ({
  x: a.x * factor,
  y: a.y * factor
});
const devide = (a, factor) => ({
  x: a.x / factor,
  y: a.y / factor
});
const normal = (a) => ({
  x: -a.y,
  y: a.x
});
const dot = (a, b) => a.x * b.x + a.y * b.y;
const length = (v) => Math.sqrt(v.x * v.x + v.y * v.y);
const distanceTo = (a, b) => length(subtract(a, b));
const normalize = (v) => {
  const l = length(v);

  return {
    x: v.x / l,
    y: v.y / l
  };
}
const clone = (v) => ({ x: v.x, y: v.y });

const openObjectIndexes = [false];
const points = {"1":{"x":51.37942251205445,"y":68.26273472070694},"2":{"x":51.351933002471924,"y":69.59923321008682},"3":{"x":51.37970018386841,"y":68.24923473596573},"6":{"x":51.613368568420405,"y":66.9835503411293},"7":{"x":51.61572885513306,"y":66.97076565027237},"10":{"x":52.10213153839111,"y":65.73326565027237},"11":{"x":52.10704469680786,"y":65.72076565027237},"14":{"x":52.42387083053589,"y":65.05594928979873},"15":{"x":52.42707109451294,"y":65.04923397302628},"18":{"x":53.81539140701294,"y":63.63911163568497},"19":{"x":53.82941484451294,"y":63.62486797571182},"22":{"x":54.54756364822388,"y":63.26423385858536},"23":{"x":54.55481767654419,"y":63.260591089725494},"26":{"x":55.97203992843628,"y":62.75290188074112},"27":{"x":55.98635530471802,"y":62.747773706912994},"30":{"x":57.45015752792358,"y":62.60071861505508},"31":{"x":57.46494340896606,"y":62.59923321008682},"34":{"x":58.81972040176391,"y":62.74973251581192},"35":{"x":58.83340501785278,"y":62.751252710819244},"38":{"x":59.91845512390137,"y":63.110874712467194},"39":{"x":59.929415225982666,"y":63.114507257938385},"42":{"x":60.91941522598267,"y":63.641925165653234},"43":{"x":60.929415225982666,"y":63.64725261926651},"46":{"x":62.052908725738526,"y":64.49945007562637},"47":{"x":62.06425714492798,"y":64.50805813074112},"50":{"x":64.6570855140686,"y":67.3301457619667},"51":{"x":64.68327569961548,"y":67.35865169763565},"54":{"x":67.17177686691285,"y":70.11810146570205},"55":{"x":67.19691324234009,"y":70.14597469568253},"58":{"x":68.21758638381958,"y":70.90204761743546},"59":{"x":68.2278962135315,"y":70.90968471765518},"62":{"x":68.7243992805481,"y":71.19448192834854},"63":{"x":68.72941446304321,"y":71.1973586678505},"66":{"x":69.87774633407592,"y":71.19921673059464},"67":{"x":69.88934564590454,"y":71.19923549890518},"70":{"x":70.1667332649231,"y":71.05579078912734},"71":{"x":70.1695351600647,"y":71.05434185266495},"74":{"x":70.75445482254028,"y":70.56064476251602},"75":{"x":70.76036310195923,"y":70.55565792322159},"78":{"x":71.1812634086609,"y":69.78437305688858},"79":{"x":71.1855149269104,"y":69.776582300663},"82":{"x":71.29888696670531,"y":69.35555736780167},"83":{"x":71.30003213882446,"y":69.35130459070206},"86":{"x":71.24198656082154,"y":68.9278249001503},"87":{"x":71.2414002418518,"y":68.92354732751846},"90":{"x":71.03981931686401,"y":68.2224949669838},"91":{"x":71.03778314590454,"y":68.2154136300087},"94":{"x":70.51636995315552,"y":67.5691552376747},"95":{"x":70.51110315322876,"y":67.56262737512589},"98":{"x":69.48388147354126,"y":66.86801403284073},"99":{"x":69.47350549697876,"y":66.86099773645401},"102":{"x":67.49935537338256,"y":66.08742805719376},"103":{"x":67.4794144630432,"y":66.07961422204971},"106":{"x":68.13317686080931,"y":64.18855575799941},"107":{"x":68.13978052139282,"y":64.16945415735245},"110":{"x":68.8808454322815,"y":62.20337829828262},"111":{"x":68.88833093643188,"y":62.18351894617081},"114":{"x":68.97563344955444,"y":62.01946182489395},"115":{"x":68.97651529312134,"y":62.01780468225479},"118":{"x":69.64619962692261,"y":62.21782966852188},"119":{"x":69.65296411514282,"y":62.21985012292862},"122":{"x":70.91665071487427,"y":62.68953212976456},"123":{"x":70.92941522598267,"y":62.69427639245987},"126":{"x":72.10322370529175,"y":63.33635414361954},"127":{"x":72.1150803565979,"y":63.342839777469635},"130":{"x":73.08938501358031,"y":64.07166866540909},"131":{"x":73.09922647476195,"y":64.07903057336807},"134":{"x":73.9187190055847,"y":65.03448646783828},"135":{"x":73.92699670791626,"y":65.0441375374794},"138":{"x":74.55737092971802,"y":66.13818527460099},"139":{"x":74.56373834609985,"y":66.14923626184464},"142":{"x":74.93075860977173,"y":67.28751873254775},"143":{"x":74.93446588516235,"y":67.29901653528212},"146":{"x":75.09610223770142,"y":67.94230278253555},"147":{"x":75.0977349281311,"y":67.9488006234169},"150":{"x":75.0943511390686,"y":70.52322963953017},"151":{"x":75.0943169593811,"y":70.54923397302626},"154":{"x":74.92509351730347,"y":71.24223472833633},"155":{"x":74.92338418960571,"y":71.24923473596573},"158":{"x":74.32801858901978,"y":72.83323322534561},"159":{"x":74.32200479507446,"y":72.84923321008682},"162":{"x":73.51860414505005,"y":74.19521461725235},"163":{"x":73.510488986969,"y":74.2088103890419},"166":{"x":72.73722520828247,"y":74.96811603784562},"167":{"x":72.72941446304321,"y":74.97578579187393},"170":{"x":71.82766489028931,"y":75.53373333215713},"171":{"x":71.81855630874634,"y":75.53936916589737},"174":{"x":70.63055555343628,"y":75.95320732355118},"175":{"x":70.61855554580688,"y":75.95738750696182},"178":{"x":69.9363066291809,"y":76.11760765314102},"179":{"x":69.92941522598267,"y":76.11922603845596},"182":{"x":69.08612665176392,"y":76.12111431360245},"183":{"x":69.07760858535767,"y":76.12113338708878},"186":{"x":67.6421078300476,"y":76.00404899835587},"187":{"x":67.62760782241821,"y":76.0028663277626},"190":{"x":66.24339639663695,"y":75.5028170800209},"191":{"x":66.22941446304321,"y":75.49776607751846},"194":{"x":64.64541597366333,"y":74.48122448205947},"195":{"x":64.62941598892212,"y":74.47095638513565},"198":{"x":63.83741674423218,"y":73.83548382043838},"199":{"x":63.82941675186157,"y":73.82906490564346},"202":{"x":58.868372230529786,"y":68.40403152704239},"203":{"x":58.81826066970825,"y":68.34923321008682},"206":{"x":57.696617679595946,"y":67.57400562524795},"207":{"x":57.685287952423096,"y":67.56617504358292},"210":{"x":56.639974708557126,"y":67.48420501947403},"211":{"x":56.62941598892212,"y":67.48337703943253},"214":{"x":55.74327301025391,"y":67.95797233819962},"215":{"x":55.73432207107544,"y":67.96276623010635},"218":{"x":55.26746492385865,"y":68.86995781183242},"219":{"x":55.26274919509888,"y":68.879121363163},"222":{"x":55.26274919509888,"y":69.79243473291397},"223":{"x":55.26274919509888,"y":69.80166012048721},"226":{"x":55.47679084777832,"y":70.2438110756874},"227":{"x":55.47895288467407,"y":70.24827724695206},"230":{"x":56.07496994018555,"y":70.9929600930214},"231":{"x":56.08099031448364,"y":71.00048214197159},"234":{"x":57.087948913574216,"y":71.58342289209365},"235":{"x":57.09812021255493,"y":71.58931118249892},"238":{"x":58.24285303115845,"y":71.99180458307265},"239":{"x":58.25441598892212,"y":71.99587017297745},"242":{"x":58.774165611267094,"y":72.20173748254777},"243":{"x":58.77941560745239,"y":72.2038169503212},"246":{"x":58.0884485244751,"y":73.94090923547745},"247":{"x":58.08146905899048,"y":73.9584556221962},"250":{"x":57.34431287765503,"y":75.65794857263565},"251":{"x":57.33686685562134,"y":75.67511516809464},"254":{"x":56.76558431625366,"y":75.59965591669082},"255":{"x":56.75981378555297,"y":75.59889370203018},"258":{"x":55.60284683227539,"y":75.22919586420059},"259":{"x":55.5911602973938,"y":75.22546154260635},"262":{"x":54.353660297393795,"y":74.61864921808244},"263":{"x":54.3411602973938,"y":74.612519800663},"266":{"x":53.07325340270996,"y":73.59444870233536},"267":{"x":53.06044626235961,"y":73.5841651558876},"270":{"x":52.39816585540771,"y":72.92485122919082},"271":{"x":52.39147615432739,"y":72.91819149255753},"274":{"x":52.05371282577514,"y":72.24055752038956},"275":{"x":52.05030107498169,"y":72.2337127327919},"278":{"x":51.55403026580811,"y":70.91258102655411},"279":{"x":51.54901742935181,"y":70.89923626184464},"282":{"x":51.35390384674072,"y":69.6122332406044},"285":{"x":44.945414972305294,"y":80.09338711023331},"286":{"x":44.8794150352478,"y":82.81457287073135},"287":{"x":44.94608163833618,"y":80.06590038537979},"290":{"x":48.312081260681154,"y":79.99990139245986},"291":{"x":48.346081256866455,"y":79.99923473596573},"294":{"x":51.646081886291505,"y":79.99923473596573},"295":{"x":51.679415225982666,"y":79.99923473596573},"298":{"x":51.679415225982666,"y":77.83026371240616},"299":{"x":51.679415225982666,"y":77.80835491418839},"302":{"x":53.36368490219116,"y":77.77909042596816},"303":{"x":53.38069772720337,"y":77.77879482507706},"306":{"x":55.16269697189331,"y":77.7825298333168},"307":{"x":55.180696964263916,"y":77.78256756067275},"310":{"x":55.27842842102051,"y":77.81556705713271},"311":{"x":55.27941560745239,"y":77.81590038537979},"314":{"x":55.27941560745239,"y":79.97740139245987},"315":{"x":55.27941560745239,"y":79.99923473596573},"318":{"x":68.16484092712402,"y":79.99923473596573},"319":{"x":68.29499673843382,"y":79.99923473596573},"322":{"x":70.7050702857971,"y":80.21770061731338},"323":{"x":70.72941446304321,"y":80.2199073433876},"326":{"x":71.50109964370728,"y":80.46288303613663},"327":{"x":71.50889444351196,"y":80.46533733606339},"330":{"x":72.86139039993286,"y":81.04871616601945},"331":{"x":72.87505197525024,"y":81.05460888147354},"334":{"x":73.83614248275758,"y":81.82703426599502},"335":{"x":73.84585046768188,"y":81.83483654260635},"338":{"x":74.45982313156128,"y":82.73478092432022},"339":{"x":74.46602487564087,"y":82.74387127161026},"342":{"x":74.83632696151733,"y":83.72298347711563},"343":{"x":74.8400673866272,"y":83.73287349939346},"346":{"x":75.03751676559448,"y":85.33306961297988},"347":{"x":75.03951120376587,"y":85.34923321008682},"350":{"x":74.99780298233033,"y":87.675735476017},"351":{"x":74.9973816871643,"y":87.69923549890518},"354":{"x":74.82762197494507,"y":89.10998474359512},"355":{"x":74.8259072303772,"y":89.12423473596571},"358":{"x":74.75869596481323,"y":89.29748398065566},"359":{"x":74.75801706314087,"y":89.29923397302626},"362":{"x":70.72976346969604,"y":89.29923397302626},"363":{"x":70.68907403945923,"y":89.29923397302626},"366":{"x":70.72260225296021,"y":86.87373321771621},"367":{"x":70.72294092178345,"y":86.84923321008682},"370":{"x":70.33335199356078,"y":86.05723396539689},"371":{"x":70.32941675186157,"y":86.04923397302628},"374":{"x":69.43841524124146,"y":85.55423397302627},"375":{"x":69.42941522598267,"y":85.54923397302628},"378":{"x":55.470414848327636,"y":85.54923397302628},"379":{"x":55.32941484451294,"y":85.54923397302628},"382":{"x":55.230414466857916,"y":88.91523548364638},"383":{"x":55.22941446304321,"y":88.94923549890517},"386":{"x":51.71960947036743,"y":89.00328548669815},"387":{"x":51.68415689468384,"y":89.0038314461708},"390":{"x":51.629963397979736,"y":85.58377994775772},"391":{"x":51.62941598892212,"y":85.54923397302628},"394":{"x":44.94691504478455,"y":85.49710247278213},"395":{"x":44.8794150352478,"y":85.49657589197159},"398":{"x":44.8794150352478,"y":82.84139290094376},"401":{"x":45.003165035247804,"y":33.046805281639095},"402":{"x":44.8794150352478,"y":33.09295779466629},"403":{"x":45.0044150352478,"y":33.046339094638824},"406":{"x":48.34566597938537,"y":32.97519620418549},"407":{"x":48.37941598892212,"y":32.9744775891304},"410":{"x":51.59691598892212,"y":32.94948721170426},"411":{"x":51.62941598892212,"y":32.949234783649445},"414":{"x":51.68630971908569,"y":30.877350016832352},"415":{"x":51.68688440322876,"y":30.856421887874603},"418":{"x":51.80693716049194,"y":30.78013020217419},"419":{"x":51.80814981460571,"y":30.779359579086304},"422":{"x":53.429855270385744,"y":30.70155196249485},"423":{"x":53.44623613357544,"y":30.700766026973724},"426":{"x":55.10448726654053,"y":30.759341915249824},"427":{"x":55.12123727798462,"y":30.759933590888977},"430":{"x":55.27783382415771,"y":30.82002552807331},"431":{"x":55.27941560745239,"y":30.820632517337796},"434":{"x":55.27941560745239,"y":32.97744871377945},"435":{"x":55.27941560745239,"y":32.99923473596573},"438":{"x":68.42543800354004,"y":32.99923473596573},"439":{"x":68.55822610855103,"y":32.99923473596573},"442":{"x":69.58346509933472,"y":33.1004389667511},"443":{"x":69.59382104873657,"y":33.10146123170853},"446":{"x":71.31206079483033,"y":33.40036999464035},"447":{"x":71.32941675186157,"y":33.403389275074005},"450":{"x":72.56691675186157,"y":33.871204957962036},"451":{"x":72.57941675186157,"y":33.8759303689003},"454":{"x":73.69686399459839,"y":34.71130187749863},"455":{"x":73.70815134048462,"y":34.719739973545074},"458":{"x":74.28110311508179,"y":35.285000331401825},"459":{"x":74.28689050674438,"y":35.29071003198624},"462":{"x":74.49654569625854,"y":35.76466945409775},"463":{"x":74.49866342544556,"y":35.769456923007965},"466":{"x":74.84078866958619,"y":36.73892665147781},"467":{"x":74.84424448013306,"y":36.74871927499771},"470":{"x":75.03755853652953,"y":38.33322995901108},"471":{"x":75.03951120376587,"y":38.349235117435455},"474":{"x":75.1003514289856,"y":39.43823455095291},"475":{"x":75.10096597671509,"y":39.449234545230865},"478":{"x":74.89184328079223,"y":41.99064234972},"479":{"x":74.88973093032837,"y":42.01631313562393},"482":{"x":74.65727293014527,"y":42.29640570878983},"483":{"x":74.65492486953735,"y":42.29923492670059},"486":{"x":70.72873254776,"y":42.29923492670059},"487":{"x":70.68907403945923,"y":42.29923492670059},"490":{"x":70.72260225296021,"y":39.873735115528106},"491":{"x":70.72294092178345,"y":39.849235117435455},"494":{"x":70.52814645767212,"y":39.45962352991104},"495":{"x":70.52617883682251,"y":39.45568805932999},"498":{"x":70.08388437271117,"y":38.88682817697525},"499":{"x":70.07941675186156,"y":38.881082117557526},"502":{"x":69.28597108840941,"y":38.60173352479934},"503":{"x":69.27795648574829,"y":38.59891182184219},"506":{"x":68.73201082229615,"y":38.49881341218948},"507":{"x":68.72649621963501,"y":38.49780231714249},"510":{"x":55.46338565826416,"y":38.548720600605016},"511":{"x":55.32941484451294,"y":38.54923492670059},"514":{"x":55.230414466857916,"y":41.91523454904556},"515":{"x":55.22941446304321,"y":41.949234545230865},"518":{"x":51.71960947036743,"y":42.00328453302384},"519":{"x":51.68415689468384,"y":42.00383049249649},"522":{"x":51.629963397979736,"y":38.58378088235855},"523":{"x":51.62941598892212,"y":38.54923492670059},"526":{"x":44.94691504478455,"y":38.49710059404373},"527":{"x":44.8794150352478,"y":38.496573984622955},"530":{"x":44.8794150352478,"y":33.14699395656586},"533":{"x":51.376598052978515,"y":51.1672343659401},"534":{"x":51.34479761123657,"y":52.94923549890518},"535":{"x":51.37691926956177,"y":51.149234354496},"538":{"x":51.62304271697998,"y":49.713735487461086},"539":{"x":51.62552881240845,"y":49.69923549890518},"542":{"x":52.154328937530515,"y":48.36987091302872},"543":{"x":52.159670352935784,"y":48.356442987918854},"546":{"x":53.01748542785644,"y":47.16180116891861},"547":{"x":53.02615022659302,"y":47.1497340798378},"550":{"x":54.21738182067871,"y":46.23256674051285},"551":{"x":54.22941446304321,"y":46.22330242395401},"554":{"x":55.66491521835327,"y":45.56832208871841},"555":{"x":55.679415225982666,"y":45.56170612573624},"558":{"x":57.36241598129272,"y":45.137046263217925},"559":{"x":57.37941598892211,"y":45.132756769657135},"562":{"x":58.31991485595703,"y":44.9546877026558},"563":{"x":58.32941484451294,"y":44.952889025211334},"566":{"x":67.93241371154785,"y":44.94927109003067},"567":{"x":68.02941370010376,"y":44.949234545230865},"570":{"x":69.02295988082886,"y":45.121170494556424},"571":{"x":69.03299570083618,"y":45.12290722131729},"574":{"x":70.74026834487914,"y":45.53759604692459},"575":{"x":70.7575135231018,"y":45.541784822940826},"578":{"x":72.09046960830689,"y":46.10881591081619},"579":{"x":72.10393381118774,"y":46.11454349756241},"582":{"x":72.72315965652466,"y":46.43881887674332},"583":{"x":72.72941446304321,"y":46.44209438562393},"586":{"x":74.01641370773315,"y":47.73616333246231},"587":{"x":74.02941370010376,"y":47.74923473596573},"590":{"x":74.34386816024781,"y":48.3927343583107},"591":{"x":74.34704446792603,"y":48.399234354496},"594":{"x":74.887174243927,"y":49.884234354496},"595":{"x":74.89263010025024,"y":49.899234354496},"598":{"x":75.11830541610718,"y":50.74073473215103},"599":{"x":75.1205849647522,"y":50.74923473596573},"602":{"x":75.09763109207152,"y":53.81823511362076},"603":{"x":75.09739923477173,"y":53.849235117435455},"606":{"x":74.87829889297485,"y":54.690735495090486},"607":{"x":74.87608575820923,"y":54.69923549890518},"610":{"x":74.30959943771363,"y":56.23373474359512},"611":{"x":74.30387735366821,"y":56.24923473596573},"614":{"x":73.95649515151977,"y":56.94223549127579},"615":{"x":73.95298624038696,"y":56.94923549890518},"618":{"x":72.64155271530151,"y":58.23623474359512},"619":{"x":72.62830591201782,"y":58.24923473596572},"622":{"x":72.03485502243042,"y":58.561311857700346},"623":{"x":72.02886056900024,"y":58.56446415185928},"626":{"x":70.79190816879272,"y":59.07271795511245},"627":{"x":70.77941370010375,"y":59.07785183191299},"630":{"x":69.2449144554138,"y":59.39225530862808},"631":{"x":69.22941446304321,"y":59.395431101322174},"634":{"x":67.61676328659058,"y":59.48117767572403},"635":{"x":67.60047388076782,"y":59.48204380273819},"638":{"x":66.878820438385,"y":59.449563581943515},"639":{"x":66.87153100967407,"y":59.44923549890518},"642":{"x":66.87152345657348,"y":54.40023512125015},"643":{"x":66.87152338027954,"y":54.349235117435455},"646":{"x":69.40383630752564,"y":54.242309648990634},"647":{"x":69.42941522598267,"y":54.241229593753815},"650":{"x":70.45968458175659,"y":53.88980837106705},"651":{"x":70.47009134292603,"y":53.88625866174698},"654":{"x":71.05321336746216,"y":53.22211830377579},"655":{"x":71.05910348892212,"y":53.21540981531143},"658":{"x":71.12736085891723,"y":52.81140390634537},"659":{"x":71.12805032730103,"y":52.80732303857803},"662":{"x":71.13218187332154,"y":52.02377004861832},"663":{"x":71.13222360610962,"y":52.01585537195206},"666":{"x":70.87342039108276,"y":51.31618900537491},"667":{"x":70.8708062171936,"y":51.309121668338776},"670":{"x":70.67612882614135,"y":50.98899860620498},"671":{"x":70.6741623878479,"y":50.9857650399208},"674":{"x":69.5408611869812,"y":50.45460079431533},"675":{"x":69.52941370010376,"y":50.44923549890518},"678":{"x":63.539914455413815,"y":50.38234524011612},"679":{"x":63.47941446304321,"y":50.38166958093643},"682":{"x":63.47941446304321,"y":59.408059084415434},"683":{"x":63.47941446304321,"y":59.49923473596573},"686":{"x":58.93222320556641,"y":59.49923473596573},"687":{"x":58.88629198074341,"y":59.49923473596573},"690":{"x":57.769137420654296,"y":59.34659790277481},"691":{"x":57.75785303115845,"y":59.34505611658096},"694":{"x":55.91808012008667,"y":58.99752285242081},"695":{"x":55.89949655532837,"y":58.99401241540909},"698":{"x":54.56299617767334,"y":58.49225239038467},"699":{"x":54.54949617385864,"y":58.48718410730362},"702":{"x":53.40644203186035,"y":57.77590673685074},"703":{"x":53.394896030426025,"y":57.768722116947174},"706":{"x":52.48846164703369,"y":56.80877023935318},"707":{"x":52.47930574417114,"y":56.79907375574112},"710":{"x":51.85598045349121,"y":55.65513401269912},"711":{"x":51.84968423843384,"y":55.64357906579971},"714":{"x":51.49928457260132,"y":54.51067817926407},"715":{"x":51.49574518203735,"y":54.49923473596573},"718":{"x":51.34630708694458,"y":52.96473549127579},"721":{"x":55.41521953582764,"y":53.11944671869278},"722":{"x":55.28575372695923,"y":52.32744747400284},"723":{"x":55.41652727127075,"y":53.127446711063385},"726":{"x":55.79059646606446,"y":53.66542007684708},"727":{"x":55.79437494277954,"y":53.67085415124893},"730":{"x":56.475383262634274,"y":54.05769186258316},"731":{"x":56.482262134552,"y":54.0615993142128},"734":{"x":56.92494369506836,"y":54.22903267145156},"735":{"x":56.929415225982666,"y":54.23072391748428},"738":{"x":60.740915603637696,"y":54.319550268650055},"739":{"x":60.77941560745239,"y":54.32044750452041},"742":{"x":60.77941560745239,"y":50.412482702732085},"743":{"x":60.77941560745239,"y":50.37300831079483},"746":{"x":57.066915607452394,"y":50.47726564645767},"747":{"x":57.02941560745239,"y":50.47831875085831},"750":{"x":56.03141876220703,"y":50.79137022256852},"751":{"x":56.02133798599243,"y":50.79453235864639},"754":{"x":55.75876388549805,"y":51.06911022424698},"755":{"x":55.75611162185669,"y":51.071883738040924},"758":{"x":55.395133838653564,"y":51.59396160364151},"759":{"x":55.39148759841919,"y":51.599235117435455},"762":{"x":55.286811065673824,"y":52.320165350437165}};
const faceIndexes = [138,139,279,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,334,335,391,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,454,455,519,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,636,637,729,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,730,731,751,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750];
const faces = [null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,{"lineIndexes":[0,1,2],"flatNormal":{"x":-0.9997885394912382,"y":-0.0205639563794716},"objectIndex":0},{"lineIndexes":[1,3,4],"flatNormal":{"x":-0.9997885394912382,"y":-0.0205639563794716},"objectIndex":0},{"lineIndexes":[5,6,3],"flatNormal":{"x":-0.9833816847436402,"y":-0.18155016417166886},"objectIndex":0},{"lineIndexes":[6,7,8],"flatNormal":{"x":-0.9833816847436402,"y":-0.18155016417166886},"objectIndex":0},{"lineIndexes":[9,10,7],"flatNormal":{"x":-0.9306895471852331,"y":-0.3658100145706046},"objectIndex":0},{"lineIndexes":[10,11,12],"flatNormal":{"x":-0.9306895471852331,"y":-0.3658100145706046},"objectIndex":0},{"lineIndexes":[13,14,11],"flatNormal":{"x":-0.9027303332393356,"y":-0.43020686355473015},"objectIndex":0},{"lineIndexes":[14,15,16],"flatNormal":{"x":-0.9027303332393356,"y":-0.43020686355473015},"objectIndex":0},{"lineIndexes":[17,18,15],"flatNormal":{"x":-0.712594062423918,"y":-0.7015765832738271},"objectIndex":0},{"lineIndexes":[18,19,20],"flatNormal":{"x":-0.712594062423918,"y":-0.7015765832738271},"objectIndex":0},{"lineIndexes":[21,22,19],"flatNormal":{"x":-0.44876562353165284,"y":-0.8936494923269676},"objectIndex":0},{"lineIndexes":[22,23,24],"flatNormal":{"x":-0.44876562353165284,"y":-0.8936494923269676},"objectIndex":0},{"lineIndexes":[25,26,23],"flatNormal":{"x":-0.3372425555716632,"y":-0.9414177917967632},"objectIndex":0},{"lineIndexes":[26,27,28],"flatNormal":{"x":-0.3372425555716632,"y":-0.9414177917967632},"objectIndex":0},{"lineIndexes":[29,30,27],"flatNormal":{"x":-0.09995789648498098,"y":-0.9949916677692823},"objectIndex":0},{"lineIndexes":[30,31,32],"flatNormal":{"x":-0.09995789648498098,"y":-0.9949916677692823},"objectIndex":0},{"lineIndexes":[33,34,31],"flatNormal":{"x":0.1104087197857912,"y":-0.9938862684408426},"objectIndex":0},{"lineIndexes":[34,35,36],"flatNormal":{"x":0.1104087197857912,"y":-0.9938862684408426},"objectIndex":0},{"lineIndexes":[37,38,35],"flatNormal":{"x":0.31460431172528447,"y":-0.9492229069316964},"objectIndex":0},{"lineIndexes":[38,39,40],"flatNormal":{"x":0.31460431172528447,"y":-0.9492229069316964},"objectIndex":0},{"lineIndexes":[41,42,39],"flatNormal":{"x":0.47018417825013015,"y":-0.8825683194649862},"objectIndex":0},{"lineIndexes":[42,43,44],"flatNormal":{"x":0.47018417825013015,"y":-0.8825683194649862},"objectIndex":0},{"lineIndexes":[45,46,43],"flatNormal":{"x":0.6043378874962531,"y":-0.7967281328888582},"objectIndex":0},{"lineIndexes":[46,47,48],"flatNormal":{"x":0.6043378874962531,"y":-0.7967281328888582},"objectIndex":0},{"lineIndexes":[49,50,47],"flatNormal":{"x":0.7363848944516121,"y":-0.6765628479479848},"objectIndex":0},{"lineIndexes":[50,51,52],"flatNormal":{"x":0.7363848944516121,"y":-0.6765628479479848},"objectIndex":0},{"lineIndexes":[53,54,51],"flatNormal":{"x":0.7426251752297648,"y":-0.6697072861444476},"objectIndex":0},{"lineIndexes":[54,55,56],"flatNormal":{"x":0.7426251752297648,"y":-0.6697072861444476},"objectIndex":0},{"lineIndexes":[57,58,55],"flatNormal":{"x":0.5952370784618456,"y":-0.8035501356008888},"objectIndex":0},{"lineIndexes":[58,59,60],"flatNormal":{"x":0.5952370784618456,"y":-0.8035501356008888},"objectIndex":0},{"lineIndexes":[61,62,59],"flatNormal":{"x":0.49756220337887597,"y":-0.8674282989208723},"objectIndex":0},{"lineIndexes":[62,63,64],"flatNormal":{"x":0.49756220337887597,"y":-0.8674282989208723},"objectIndex":0},{"lineIndexes":[65,66,63],"flatNormal":{"x":0.0016180516788924044,"y":-0.9999986909535254},"objectIndex":0},{"lineIndexes":[66,67,68],"flatNormal":{"x":0.0016180516788924044,"y":-0.9999986909535254},"objectIndex":0},{"lineIndexes":[69,70,67],"flatNormal":{"x":-0.459342971355313,"y":-0.8882589907602806},"objectIndex":0},{"lineIndexes":[70,71,72],"flatNormal":{"x":-0.459342971355313,"y":-0.8882589907602806},"objectIndex":0},{"lineIndexes":[73,74,71],"flatNormal":{"x":-0.6450015262876625,"y":-0.7641812815599359},"objectIndex":0},{"lineIndexes":[74,75,76],"flatNormal":{"x":-0.6450015262876625,"y":-0.7641812815599359},"objectIndex":0},{"lineIndexes":[77,78,75],"flatNormal":{"x":-0.8778001213252027,"y":-0.47902708378698117},"objectIndex":0},{"lineIndexes":[78,79,80],"flatNormal":{"x":-0.8778001213252027,"y":-0.47902708378698117},"objectIndex":0},{"lineIndexes":[81,82,79],"flatNormal":{"x":-0.965604718877221,"y":-0.260014474370261},"objectIndex":0},{"lineIndexes":[82,83,84],"flatNormal":{"x":-0.965604718877221,"y":-0.260014474370261},"objectIndex":0},{"lineIndexes":[85,86,83],"flatNormal":{"x":-0.9907364884825098,"y":0.13579841821371016},"objectIndex":0},{"lineIndexes":[86,87,88],"flatNormal":{"x":-0.9907364884825098,"y":0.13579841821371016},"objectIndex":0},{"lineIndexes":[89,90,87],"flatNormal":{"x":-0.9610589750117838,"y":0.2763433490230939},"objectIndex":0},{"lineIndexes":[90,91,92],"flatNormal":{"x":-0.9610589750117838,"y":0.2763433490230939},"objectIndex":0},{"lineIndexes":[93,94,91],"flatNormal":{"x":-0.7782735116506355,"y":0.6279254263549042},"objectIndex":0},{"lineIndexes":[94,95,96],"flatNormal":{"x":-0.7782735116506355,"y":0.6279254263549042},"objectIndex":0},{"lineIndexes":[97,98,95],"flatNormal":{"x":-0.5601589217500568,"y":0.8283851654778795},"objectIndex":0},{"lineIndexes":[98,99,100],"flatNormal":{"x":-0.5601589217500568,"y":0.8283851654778795},"objectIndex":0},{"lineIndexes":[101,102,99],"flatNormal":{"x":-0.36483945926504824,"y":0.9310704425354653},"objectIndex":0},{"lineIndexes":[102,103,104],"flatNormal":{"x":-0.36483945926504824,"y":0.9310704425354653},"objectIndex":0},{"lineIndexes":[105,106,103],"flatNormal":{"x":-0.9451149623041349,"y":-0.32673798069531734},"objectIndex":0},{"lineIndexes":[106,107,108],"flatNormal":{"x":-0.9451149623041349,"y":-0.32673798069531734},"objectIndex":0},{"lineIndexes":[109,110,107],"flatNormal":{"x":-0.9357353628523095,"y":-0.3527028929675183},"objectIndex":0},{"lineIndexes":[110,111,112],"flatNormal":{"x":-0.9357353628523095,"y":-0.3527028929675183},"objectIndex":0},{"lineIndexes":[113,114,111],"flatNormal":{"x":-0.8827874029470667,"y":-0.46977271227474826},"objectIndex":0},{"lineIndexes":[114,115,116],"flatNormal":{"x":-0.8827874029470667,"y":-0.46977271227474826},"objectIndex":0},{"lineIndexes":[117,118,115],"flatNormal":{"x":0.2861921377497604,"y":-0.9581722498017892},"objectIndex":0},{"lineIndexes":[118,119,120],"flatNormal":{"x":0.2861921377497604,"y":-0.9581722498017892},"objectIndex":0},{"lineIndexes":[121,122,119],"flatNormal":{"x":0.3483903480931425,"y":-0.9373495427830213},"objectIndex":0},{"lineIndexes":[122,123,124],"flatNormal":{"x":0.3483903480931425,"y":-0.9373495427830213},"objectIndex":0},{"lineIndexes":[125,126,123],"flatNormal":{"x":0.4798993543853807,"y":-0.8773235490174048},"objectIndex":0},{"lineIndexes":[126,127,128],"flatNormal":{"x":0.4798993543853807,"y":-0.8773235490174048},"objectIndex":0},{"lineIndexes":[129,130,127],"flatNormal":{"x":0.5990003497219581,"y":-0.80074876274208},"objectIndex":0},{"lineIndexes":[130,131,132],"flatNormal":{"x":0.5990003497219581,"y":-0.80074876274208},"objectIndex":0},{"lineIndexes":[133,134,131],"flatNormal":{"x":0.7590483830744756,"y":-0.6510342173434699},"objectIndex":0},{"lineIndexes":[134,135,136],"flatNormal":{"x":0.7590483830744756,"y":-0.6510342173434699},"objectIndex":0},{"lineIndexes":[137,138,135],"flatNormal":{"x":0.8664621572796523,"y":-0.49924275658470113},"objectIndex":0},{"lineIndexes":[138,139,140],"flatNormal":{"x":0.8664621572796523,"y":-0.49924275658470113},"objectIndex":0},{"lineIndexes":[141,142,139],"flatNormal":{"x":0.9517495609015664,"y":-0.3068758272065036},"objectIndex":0},{"lineIndexes":[142,143,144],"flatNormal":{"x":0.9517495609015664,"y":-0.3068758272065036},"objectIndex":0},{"lineIndexes":[145,146,143],"flatNormal":{"x":0.9698527707260881,"y":-0.24369161478173604},"objectIndex":0},{"lineIndexes":[146,147,148],"flatNormal":{"x":0.9698527707260881,"y":-0.24369161478173604},"objectIndex":0},{"lineIndexes":[149,150,147],"flatNormal":{"x":0.9999991361980842,"y":0.001314383157740027},"objectIndex":0},{"lineIndexes":[150,151,152],"flatNormal":{"x":0.9999991361980842,"y":0.001314383157740027},"objectIndex":0},{"lineIndexes":[153,154,151],"flatNormal":{"x":0.9714561270283988,"y":0.23721929360611396},"objectIndex":0},{"lineIndexes":[154,155,156],"flatNormal":{"x":0.9714561270283988,"y":0.23721929360611396},"objectIndex":0},{"lineIndexes":[157,158,155],"flatNormal":{"x":0.9360634844885641,"y":0.3518311427476651},"objectIndex":0},{"lineIndexes":[158,159,160],"flatNormal":{"x":0.9360634844885641,"y":0.3518311427476651},"objectIndex":0},{"lineIndexes":[161,162,159],"flatNormal":{"x":0.8586694370980159,"y":0.5125298018591471},"objectIndex":0},{"lineIndexes":[162,163,164],"flatNormal":{"x":0.8586694370980159,"y":0.5125298018591471},"objectIndex":0},{"lineIndexes":[165,166,163],"flatNormal":{"x":0.7006376308733001,"y":0.7135172809429702},"objectIndex":0},{"lineIndexes":[166,167,168],"flatNormal":{"x":0.7006376308733001,"y":0.7135172809429702},"objectIndex":0},{"lineIndexes":[169,170,167],"flatNormal":{"x":0.5261648067868908,"y":0.8503826174722259},"objectIndex":0},{"lineIndexes":[170,171,172],"flatNormal":{"x":0.5261648067868908,"y":0.8503826174722259},"objectIndex":0},{"lineIndexes":[173,174,171],"flatNormal":{"x":0.32896059534841054,"y":0.9443436486301051},"objectIndex":0},{"lineIndexes":[174,175,176],"flatNormal":{"x":0.32896059534841054,"y":0.9443436486301051},"objectIndex":0},{"lineIndexes":[177,178,175],"flatNormal":{"x":0.2286215097290615,"y":0.9735153852349765},"objectIndex":0},{"lineIndexes":[178,179,180],"flatNormal":{"x":0.2286215097290615,"y":0.9735153852349765},"objectIndex":0},{"lineIndexes":[181,182,179],"flatNormal":{"x":0.00223917466735916,"y":0.9999974930452621},"objectIndex":0},{"lineIndexes":[182,183,184],"flatNormal":{"x":0.00223917466735916,"y":0.9999974930452621},"objectIndex":0},{"lineIndexes":[185,186,183],"flatNormal":{"x":-0.08129348815330194,"y":0.996690207027173},"objectIndex":0},{"lineIndexes":[186,187,188],"flatNormal":{"x":-0.08129348815330194,"y":0.996690207027173},"objectIndex":0},{"lineIndexes":[189,190,187],"flatNormal":{"x":-0.33976174406290244,"y":0.9405115402116738},"objectIndex":0},{"lineIndexes":[190,191,192],"flatNormal":{"x":-0.33976174406290244,"y":0.9405115402116738},"objectIndex":0},{"lineIndexes":[193,194,191],"flatNormal":{"x":-0.5401020954722526,"y":0.8415995047922032},"objectIndex":0},{"lineIndexes":[194,195,196],"flatNormal":{"x":-0.5401020954722526,"y":0.8415995047922032},"objectIndex":0},{"lineIndexes":[197,198,195],"flatNormal":{"x":-0.6258192250494817,"y":0.7799681388098275},"objectIndex":0},{"lineIndexes":[198,199,200],"flatNormal":{"x":-0.6258192250494817,"y":0.7799681388098275},"objectIndex":0},{"lineIndexes":[201,202,199],"flatNormal":{"x":-0.7379601173730738,"y":0.6748443266166793},"objectIndex":0},{"lineIndexes":[202,203,204],"flatNormal":{"x":-0.7379601173730738,"y":0.6748443266166793},"objectIndex":0},{"lineIndexes":[205,206,203],"flatNormal":{"x":-0.5685680094213534,"y":0.8226362614562039},"objectIndex":0},{"lineIndexes":[206,207,208],"flatNormal":{"x":-0.5685680094213534,"y":0.8226362614562039},"objectIndex":0},{"lineIndexes":[209,210,207],"flatNormal":{"x":-0.07817671568451431,"y":0.9969395172851674},"objectIndex":0},{"lineIndexes":[210,211,212],"flatNormal":{"x":-0.07817671568451431,"y":0.9969395172851674},"objectIndex":0},{"lineIndexes":[213,214,211],"flatNormal":{"x":0.4721254431620209,"y":0.8815313754592433},"objectIndex":0},{"lineIndexes":[214,215,216],"flatNormal":{"x":0.4721254431620209,"y":0.8815313754592433},"objectIndex":0},{"lineIndexes":[217,218,215],"flatNormal":{"x":0.889167592950478,"y":0.4575816775687736},"objectIndex":0},{"lineIndexes":[218,219,220],"flatNormal":{"x":0.889167592950478,"y":0.4575816775687736},"objectIndex":0},{"lineIndexes":[221,222,219],"flatNormal":{"x":1,"y":0},"objectIndex":0},{"lineIndexes":[222,223,224],"flatNormal":{"x":1,"y":0},"objectIndex":0},{"lineIndexes":[225,226,223],"flatNormal":{"x":0.9000813048774006,"y":-0.435721980866465},"objectIndex":0},{"lineIndexes":[226,227,228],"flatNormal":{"x":0.9000813048774006,"y":-0.435721980866465},"objectIndex":0},{"lineIndexes":[229,230,227],"flatNormal":{"x":0.780730309235606,"y":-0.624868133481677},"objectIndex":0},{"lineIndexes":[230,231,232],"flatNormal":{"x":0.780730309235606,"y":-0.624868133481677},"objectIndex":0},{"lineIndexes":[233,234,231],"flatNormal":{"x":0.5010135599444048,"y":-0.8654394333238082},"objectIndex":0},{"lineIndexes":[234,235,236],"flatNormal":{"x":0.5010135599444048,"y":-0.8654394333238082},"objectIndex":0},{"lineIndexes":[237,238,235],"flatNormal":{"x":0.33169870099257354,"y":-0.9433853781778894},"objectIndex":0},{"lineIndexes":[238,239,240],"flatNormal":{"x":0.33169870099257354,"y":-0.9433853781778894},"objectIndex":0},{"lineIndexes":[241,242,239],"flatNormal":{"x":0.36825425446009413,"y":-0.9297251228573101},"objectIndex":0},{"lineIndexes":[242,243,244],"flatNormal":{"x":0.36825425446009413,"y":-0.9297251228573101},"objectIndex":0},{"lineIndexes":[245,246,243],"flatNormal":{"x":0.9291887736054841,"y":0.36960549644930385},"objectIndex":0},{"lineIndexes":[246,247,248],"flatNormal":{"x":0.9291887736054841,"y":0.36960549644930385},"objectIndex":0},{"lineIndexes":[249,250,247],"flatNormal":{"x":0.9174158917722071,"y":0.397929744457242},"objectIndex":0},{"lineIndexes":[250,251,252],"flatNormal":{"x":0.9174158917722071,"y":0.397929744457242},"objectIndex":0},{"lineIndexes":[253,254,251],"flatNormal":{"x":-0.13095003662385002,"y":0.9913889690268963},"objectIndex":0},{"lineIndexes":[254,255,256],"flatNormal":{"x":-0.13095003662385002,"y":0.9913889690268963},"objectIndex":0},{"lineIndexes":[257,258,255],"flatNormal":{"x":-0.3043786895168075,"y":0.9525511080084003},"objectIndex":0},{"lineIndexes":[258,259,260],"flatNormal":{"x":-0.3043786895168075,"y":0.9525511080084003},"objectIndex":0},{"lineIndexes":[261,262,259],"flatNormal":{"x":-0.4402710961039125,"y":0.8978648906909432},"objectIndex":0},{"lineIndexes":[262,263,264],"flatNormal":{"x":-0.4402710961039125,"y":0.8978648906909432},"objectIndex":0},{"lineIndexes":[265,266,263],"flatNormal":{"x":-0.6260985965214991,"y":0.7797438986191615},"objectIndex":0},{"lineIndexes":[266,267,268],"flatNormal":{"x":-0.6260985965214991,"y":0.7797438986191615},"objectIndex":0},{"lineIndexes":[269,270,267],"flatNormal":{"x":-0.7055178161474337,"y":0.7086921836019895},"objectIndex":0},{"lineIndexes":[270,271,272],"flatNormal":{"x":-0.7055178161474337,"y":0.7086921836019895},"objectIndex":0},{"lineIndexes":[273,274,271],"flatNormal":{"x":-0.8949831442201658,"y":0.44609995691748944},"objectIndex":0},{"lineIndexes":[274,275,276],"flatNormal":{"x":-0.8949831442201658,"y":0.44609995691748944},"objectIndex":0},{"lineIndexes":[277,278,275],"flatNormal":{"x":-0.9361318490193682,"y":0.3516492019777364},"objectIndex":0},{"lineIndexes":[278,279,280],"flatNormal":{"x":-0.9361318490193682,"y":0.3516492019777364},"objectIndex":0},{"lineIndexes":[281,282,279],"flatNormal":{"x":-0.9887026286682687,"y":0.14989033345901784},"objectIndex":0},{"lineIndexes":[282,2,283],"flatNormal":{"x":-0.9887026286682687,"y":0.14989033345901784},"objectIndex":0},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,{"lineIndexes":[284,285,286],"flatNormal":{"x":-0.9997059987951844,"y":-0.024246978634933886},"objectIndex":0},{"lineIndexes":[285,287,288],"flatNormal":{"x":-0.9997059987951844,"y":-0.024246978634933886},"objectIndex":0},{"lineIndexes":[289,290,287],"flatNormal":{"x":-0.019603778113601426,"y":-0.999807827476697},"objectIndex":0},{"lineIndexes":[290,291,292],"flatNormal":{"x":-0.019603778113601426,"y":-0.999807827476697},"objectIndex":0},{"lineIndexes":[293,294,291],"flatNormal":{"x":0,"y":-1},"objectIndex":0},{"lineIndexes":[294,295,296],"flatNormal":{"x":0,"y":-1},"objectIndex":0},{"lineIndexes":[297,298,295],"flatNormal":{"x":-1,"y":0},"objectIndex":0},{"lineIndexes":[298,299,300],"flatNormal":{"x":-1,"y":0},"objectIndex":0},{"lineIndexes":[301,302,299],"flatNormal":{"x":-0.017372557497660007,"y":-0.9998490857354377},"objectIndex":0},{"lineIndexes":[302,303,304],"flatNormal":{"x":-0.017372557497660007,"y":-0.9998490857354377},"objectIndex":0},{"lineIndexes":[305,306,303],"flatNormal":{"x":0.002095960504375616,"y":-0.9999978034723698},"objectIndex":0},{"lineIndexes":[306,307,308],"flatNormal":{"x":0.002095960504375616,"y":-0.9999978034723698},"objectIndex":0},{"lineIndexes":[309,310,307],"flatNormal":{"x":0.3199103167628323,"y":-0.9474478292912515},"objectIndex":0},{"lineIndexes":[310,311,312],"flatNormal":{"x":0.3199103167628323,"y":-0.9474478292912515},"objectIndex":0},{"lineIndexes":[313,314,311],"flatNormal":{"x":1,"y":0},"objectIndex":0},{"lineIndexes":[314,315,316],"flatNormal":{"x":1,"y":0},"objectIndex":0},{"lineIndexes":[317,318,315],"flatNormal":{"x":0,"y":-1},"objectIndex":0},{"lineIndexes":[318,319,320],"flatNormal":{"x":0,"y":-1},"objectIndex":0},{"lineIndexes":[321,322,319],"flatNormal":{"x":0.090276839034961,"y":-0.995916709536423},"objectIndex":0},{"lineIndexes":[322,323,324],"flatNormal":{"x":0.090276839034961,"y":-0.995916709536423},"objectIndex":0},{"lineIndexes":[325,326,323],"flatNormal":{"x":0.30032834552101956,"y":-0.9538358794240271},"objectIndex":0},{"lineIndexes":[326,327,328],"flatNormal":{"x":0.30032834552101956,"y":-0.9538358794240271},"objectIndex":0},{"lineIndexes":[329,330,327],"flatNormal":{"x":0.3960620344135785,"y":-0.9182237553538775},"objectIndex":0},{"lineIndexes":[330,331,332],"flatNormal":{"x":0.3960620344135785,"y":-0.9182237553538775},"objectIndex":0},{"lineIndexes":[333,334,331],"flatNormal":{"x":0.626450495251903,"y":-0.779461209425232},"objectIndex":0},{"lineIndexes":[334,335,336],"flatNormal":{"x":0.626450495251903,"y":-0.779461209425232},"objectIndex":0},{"lineIndexes":[337,338,335],"flatNormal":{"x":0.8260674286192817,"y":-0.5635712939587396},"objectIndex":0},{"lineIndexes":[338,339,340],"flatNormal":{"x":0.8260674286192817,"y":-0.5635712939587396},"objectIndex":0},{"lineIndexes":[341,342,339],"flatNormal":{"x":0.9353408853887833,"y":-0.353747689914898},"objectIndex":0},{"lineIndexes":[342,343,344],"flatNormal":{"x":0.9353408853887833,"y":-0.353747689914898},"objectIndex":0},{"lineIndexes":[345,346,343],"flatNormal":{"x":0.9924732028574409,"y":-0.12246200067732527},"objectIndex":0},{"lineIndexes":[346,347,348],"flatNormal":{"x":0.9924732028574409,"y":-0.12246200067732527},"objectIndex":0},{"lineIndexes":[349,350,347],"flatNormal":{"x":0.999839342236512,"y":0.01792455623046599},"objectIndex":0},{"lineIndexes":[350,351,352],"flatNormal":{"x":0.999839342236512,"y":0.01792455623046599},"objectIndex":0},{"lineIndexes":[353,354,351],"flatNormal":{"x":0.9928376724427266,"y":0.1194711520765965},"objectIndex":0},{"lineIndexes":[354,355,356],"flatNormal":{"x":0.9928376724427266,"y":0.1194711520765965},"objectIndex":0},{"lineIndexes":[357,358,355],"flatNormal":{"x":0.9323014613612551,"y":0.36168216038901924},"objectIndex":0},{"lineIndexes":[358,359,360],"flatNormal":{"x":0.9323014613612551,"y":0.36168216038901924},"objectIndex":0},{"lineIndexes":[361,362,359],"flatNormal":{"x":0,"y":1},"objectIndex":0},{"lineIndexes":[362,363,364],"flatNormal":{"x":0,"y":1},"objectIndex":0},{"lineIndexes":[365,366,363],"flatNormal":{"x":-0.9999044730814168,"y":-0.013821892481649473},"objectIndex":0},{"lineIndexes":[366,367,368],"flatNormal":{"x":-0.9999044730814168,"y":-0.013821892481649473},"objectIndex":0},{"lineIndexes":[369,370,367],"flatNormal":{"x":-0.8973135739692484,"y":0.4413936451406321},"objectIndex":0},{"lineIndexes":[370,371,372],"flatNormal":{"x":-0.8973135739692484,"y":0.4413936451406321},"objectIndex":0},{"lineIndexes":[373,374,371],"flatNormal":{"x":-0.4856423020009496,"y":0.8741576256643985},"objectIndex":0},{"lineIndexes":[374,375,376],"flatNormal":{"x":-0.4856423020009496,"y":0.8741576256643985},"objectIndex":0},{"lineIndexes":[377,378,375],"flatNormal":{"x":0,"y":1},"objectIndex":0},{"lineIndexes":[378,379,380],"flatNormal":{"x":0,"y":1},"objectIndex":0},{"lineIndexes":[381,382,379],"flatNormal":{"x":0.9995677515564373,"y":0.029399150470863833},"objectIndex":0},{"lineIndexes":[382,383,384],"flatNormal":{"x":0.9995677515564373,"y":0.029399150470863833},"objectIndex":0},{"lineIndexes":[385,386,383],"flatNormal":{"x":0.015397886787786313,"y":0.9998814455136522},"objectIndex":0},{"lineIndexes":[386,387,388],"flatNormal":{"x":0.015397886787786313,"y":0.9998814455136522},"objectIndex":0},{"lineIndexes":[389,390,387],"flatNormal":{"x":-0.9998744787415476,"y":0.015843824074970248},"objectIndex":0},{"lineIndexes":[390,391,392],"flatNormal":{"x":-0.9998744787415476,"y":0.015843824074970248},"objectIndex":0},{"lineIndexes":[393,394,391],"flatNormal":{"x":-0.007800958716757038,"y":0.9999695720586199},"objectIndex":0},{"lineIndexes":[394,395,396],"flatNormal":{"x":-0.007800958716757038,"y":0.9999695720586199},"objectIndex":0},{"lineIndexes":[397,398,395],"flatNormal":{"x":-1,"y":0},"objectIndex":0},{"lineIndexes":[398,286,399],"flatNormal":{"x":-1,"y":0},"objectIndex":0},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,{"lineIndexes":[400,401,402],"flatNormal":{"x":-0.3494385854405978,"y":-0.9369592707291359},"objectIndex":0},{"lineIndexes":[401,403,404],"flatNormal":{"x":-0.3494385854405978,"y":-0.9369592707291359},"objectIndex":0},{"lineIndexes":[405,406,403],"flatNormal":{"x":-0.0212874669975923,"y":-0.9997733961997721},"objectIndex":0},{"lineIndexes":[406,407,408],"flatNormal":{"x":-0.0212874669975923,"y":-0.9997733961997721},"objectIndex":0},{"lineIndexes":[409,410,407],"flatNormal":{"x":-0.007766782802975003,"y":-0.9999698380875752},"objectIndex":0},{"lineIndexes":[410,411,412],"flatNormal":{"x":-0.007766782802975003,"y":-0.9999698380875752},"objectIndex":0},{"lineIndexes":[413,414,411],"flatNormal":{"x":-0.9996231902745359,"y":-0.027449543991821517},"objectIndex":0},{"lineIndexes":[414,415,416],"flatNormal":{"x":-0.9996231902745359,"y":-0.027449543991821517},"objectIndex":0},{"lineIndexes":[417,418,415],"flatNormal":{"x":-0.5363473620978837,"y":-0.8439973383670364},"objectIndex":0},{"lineIndexes":[418,419,420],"flatNormal":{"x":-0.5363473620978837,"y":-0.8439973383670364},"objectIndex":0},{"lineIndexes":[421,422,419],"flatNormal":{"x":-0.04792375527197637,"y":-0.9988509967360657},"objectIndex":0},{"lineIndexes":[422,423,424],"flatNormal":{"x":-0.04792375527197637,"y":-0.9988509967360657},"objectIndex":0},{"lineIndexes":[425,426,423],"flatNormal":{"x":0.035301877042679994,"y":-0.9993766944837484},"objectIndex":0},{"lineIndexes":[426,427,428],"flatNormal":{"x":0.035301877042679994,"y":-0.9993766944837484},"objectIndex":0},{"lineIndexes":[429,430,427],"flatNormal":{"x":0.3582648279515193,"y":-0.9336200046340419},"objectIndex":0},{"lineIndexes":[430,431,432],"flatNormal":{"x":0.3582648279515193,"y":-0.9336200046340419},"objectIndex":0},{"lineIndexes":[433,434,431],"flatNormal":{"x":1,"y":0},"objectIndex":0},{"lineIndexes":[434,435,436],"flatNormal":{"x":1,"y":0},"objectIndex":0},{"lineIndexes":[437,438,435],"flatNormal":{"x":0,"y":-1},"objectIndex":0},{"lineIndexes":[438,439,440],"flatNormal":{"x":0,"y":-1},"objectIndex":0},{"lineIndexes":[441,442,439],"flatNormal":{"x":0.09823536560578124,"y":-0.9951632091995255},"objectIndex":0},{"lineIndexes":[442,443,444],"flatNormal":{"x":0.09823536560578124,"y":-0.9951632091995255},"objectIndex":0},{"lineIndexes":[445,446,443],"flatNormal":{"x":0.17138818005647072,"y":-0.9852035788287267},"objectIndex":0},{"lineIndexes":[446,447,448],"flatNormal":{"x":0.17138818005647072,"y":-0.9852035788287267},"objectIndex":0},{"lineIndexes":[449,450,447],"flatNormal":{"x":0.3536093749214914,"y":-0.935393184691674},"objectIndex":0},{"lineIndexes":[450,451,452],"flatNormal":{"x":0.3536093749214914,"y":-0.935393184691674},"objectIndex":0},{"lineIndexes":[453,454,451],"flatNormal":{"x":0.5987543387712403,"y":-0.8009327323830728},"objectIndex":0},{"lineIndexes":[454,455,456],"flatNormal":{"x":0.5987543387712403,"y":-0.8009327323830728},"objectIndex":0},{"lineIndexes":[457,458,455],"flatNormal":{"x":0.7023125045264292,"y":-0.7118687701998272},"objectIndex":0},{"lineIndexes":[458,459,460],"flatNormal":{"x":0.7023125045264292,"y":-0.7118687701998272},"objectIndex":0},{"lineIndexes":[461,462,459],"flatNormal":{"x":0.914521567063448,"y":-0.40453714709012256},"objectIndex":0},{"lineIndexes":[462,463,464],"flatNormal":{"x":0.914521567063448,"y":-0.40453714709012256},"objectIndex":0},{"lineIndexes":[465,466,463],"flatNormal":{"x":0.9430027096267122,"y":-0.33278505020009375},"objectIndex":0},{"lineIndexes":[466,467,468],"flatNormal":{"x":0.9430027096267122,"y":-0.33278505020009375},"objectIndex":0},{"lineIndexes":[469,470,467],"flatNormal":{"x":0.9926397752518293,"y":-0.12110440366889123},"objectIndex":0},{"lineIndexes":[470,471,472],"flatNormal":{"x":0.9926397752518293,"y":-0.12110440366889123},"objectIndex":0},{"lineIndexes":[473,474,471],"flatNormal":{"x":0.998443026849788,"y":-0.055781019487218024},"objectIndex":0},{"lineIndexes":[474,475,476],"flatNormal":{"x":0.998443026849788,"y":-0.055781019487218024},"objectIndex":0},{"lineIndexes":[477,478,475],"flatNormal":{"x":0.9966315897610585,"y":0.08200898908257089},"objectIndex":0},{"lineIndexes":[478,479,480],"flatNormal":{"x":0.9966315897610585,"y":0.08200898908257089},"objectIndex":0},{"lineIndexes":[481,482,479],"flatNormal":{"x":0.7695066632516839,"y":0.6386387830466136},"objectIndex":0},{"lineIndexes":[482,483,484],"flatNormal":{"x":0.7695066632516839,"y":0.6386387830466136},"objectIndex":0},{"lineIndexes":[485,486,483],"flatNormal":{"x":0,"y":1},"objectIndex":0},{"lineIndexes":[486,487,488],"flatNormal":{"x":0,"y":1},"objectIndex":0},{"lineIndexes":[489,490,487],"flatNormal":{"x":-0.9999044730070588,"y":-0.013821897860860336},"objectIndex":0},{"lineIndexes":[490,491,492],"flatNormal":{"x":-0.9999044730070588,"y":-0.013821897860860336},"objectIndex":0},{"lineIndexes":[493,494,491],"flatNormal":{"x":-0.8944375946226597,"y":0.44719278764938825},"objectIndex":0},{"lineIndexes":[494,495,496],"flatNormal":{"x":-0.8944375946226597,"y":0.44719278764938825},"objectIndex":0},{"lineIndexes":[497,498,495],"flatNormal":{"x":-0.7894545073928991,"y":0.6138090751667289},"objectIndex":0},{"lineIndexes":[498,499,500],"flatNormal":{"x":-0.7894545073928991,"y":0.6138090751667289},"objectIndex":0},{"lineIndexes":[501,502,499],"flatNormal":{"x":-0.3320894936928047,"y":0.9432478826792333},"objectIndex":0},{"lineIndexes":[502,503,504],"flatNormal":{"x":-0.3320894936928047,"y":0.9432478826792333},"objectIndex":0},{"lineIndexes":[505,506,503],"flatNormal":{"x":-0.1803424606473667,"y":0.9836038821027767},"objectIndex":0},{"lineIndexes":[506,507,508],"flatNormal":{"x":-0.1803424606473667,"y":0.9836038821027767},"objectIndex":0},{"lineIndexes":[509,510,507],"flatNormal":{"x":0.0038390623374909096,"y":0.9999926307730317},"objectIndex":0},{"lineIndexes":[510,511,512],"flatNormal":{"x":0.0038390623374909096,"y":0.9999926307730317},"objectIndex":0},{"lineIndexes":[513,514,511],"flatNormal":{"x":0.9995677510717819,"y":0.029399166949090307},"objectIndex":0},{"lineIndexes":[514,515,516],"flatNormal":{"x":0.9995677510717819,"y":0.029399166949090307},"objectIndex":0},{"lineIndexes":[517,518,515],"flatNormal":{"x":0.015397886787786313,"y":0.9998814455136522},"objectIndex":0},{"lineIndexes":[518,519,520],"flatNormal":{"x":0.015397886787786313,"y":0.9998814455136522},"objectIndex":0},{"lineIndexes":[521,522,519],"flatNormal":{"x":-0.9998744786029682,"y":0.015843832820454245},"objectIndex":0},{"lineIndexes":[522,523,524],"flatNormal":{"x":-0.9998744786029682,"y":0.015843832820454245},"objectIndex":0},{"lineIndexes":[525,526,523],"flatNormal":{"x":-0.007801382533256842,"y":0.9999695687522545},"objectIndex":0},{"lineIndexes":[526,527,528],"flatNormal":{"x":-0.007801382533256842,"y":0.9999695687522545},"objectIndex":0},{"lineIndexes":[529,530,527],"flatNormal":{"x":-1,"y":0},"objectIndex":0},{"lineIndexes":[530,402,531],"flatNormal":{"x":-1,"y":0},"objectIndex":0},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,{"lineIndexes":[532,533,534],"flatNormal":{"x":-0.9998408096837448,"y":-0.01784251358283975},"objectIndex":0},{"lineIndexes":[533,535,536],"flatNormal":{"x":-0.9998408096837448,"y":-0.01784251358283975},"objectIndex":0},{"lineIndexes":[537,538,535],"flatNormal":{"x":-0.9856179177574417,"y":-0.16898911265370048},"objectIndex":0},{"lineIndexes":[538,539,540],"flatNormal":{"x":-0.9856179177574417,"y":-0.16898911265370048},"objectIndex":0},{"lineIndexes":[541,542,539],"flatNormal":{"x":-0.9291849805613218,"y":-0.36961503202556045},"objectIndex":0},{"lineIndexes":[542,543,544],"flatNormal":{"x":-0.9291849805613218,"y":-0.36961503202556045},"objectIndex":0},{"lineIndexes":[545,546,543],"flatNormal":{"x":-0.8122839454525983,"y":-0.583262198295038},"objectIndex":0},{"lineIndexes":[546,547,548],"flatNormal":{"x":-0.8122839454525983,"y":-0.583262198295038},"objectIndex":0},{"lineIndexes":[549,550,547],"flatNormal":{"x":-0.6100597805647041,"y":-0.7923553900475122},"objectIndex":0},{"lineIndexes":[550,551,552],"flatNormal":{"x":-0.6100597805647041,"y":-0.7923553900475122},"objectIndex":0},{"lineIndexes":[553,554,551],"flatNormal":{"x":-0.41510512531902216,"y":-0.9097734525330353},"objectIndex":0},{"lineIndexes":[554,555,556],"flatNormal":{"x":-0.41510512531902216,"y":-0.9097734525330353},"objectIndex":0},{"lineIndexes":[557,558,555],"flatNormal":{"x":-0.24465499020970713,"y":-0.9696101978452414},"objectIndex":0},{"lineIndexes":[558,559,560],"flatNormal":{"x":-0.24465499020970713,"y":-0.9696101978452414},"objectIndex":0},{"lineIndexes":[561,562,559],"flatNormal":{"x":-0.18602969273307388,"y":-0.9825441228879436},"objectIndex":0},{"lineIndexes":[562,563,564],"flatNormal":{"x":-0.18602969273307388,"y":-0.9825441228879436},"objectIndex":0},{"lineIndexes":[565,566,563],"flatNormal":{"x":-0.0003767505311613716,"y":-0.9999999290295162},"objectIndex":0},{"lineIndexes":[566,567,568],"flatNormal":{"x":-0.0003767505311613716,"y":-0.9999999290295162},"objectIndex":0},{"lineIndexes":[569,570,567],"flatNormal":{"x":0.17051835599727805,"y":-0.9853544997958783},"objectIndex":0},{"lineIndexes":[570,571,572],"flatNormal":{"x":0.17051835599727805,"y":-0.9853544997958783},"objectIndex":0},{"lineIndexes":[573,574,571],"flatNormal":{"x":0.23603251629788774,"y":-0.9717451575645167},"objectIndex":0},{"lineIndexes":[574,575,576],"flatNormal":{"x":0.23603251629788774,"y":-0.9717451575645167},"objectIndex":0},{"lineIndexes":[577,578,575],"flatNormal":{"x":0.3914474561188955,"y":-0.9202004613659165},"objectIndex":0},{"lineIndexes":[578,579,580],"flatNormal":{"x":0.3914474561188955,"y":-0.9202004613659165},"objectIndex":0},{"lineIndexes":[581,582,579],"flatNormal":{"x":0.4639160431129962,"y":-0.8858791706222585},"objectIndex":0},{"lineIndexes":[582,583,584],"flatNormal":{"x":0.4639160431129962,"y":-0.8858791706222585},"objectIndex":0},{"lineIndexes":[585,586,583],"flatNormal":{"x":0.7090409297315907,"y":-0.7051673276360452},"objectIndex":0},{"lineIndexes":[586,587,588],"flatNormal":{"x":0.7090409297315907,"y":-0.7051673276360452},"objectIndex":0},{"lineIndexes":[589,590,587],"flatNormal":{"x":0.8984644248262328,"y":-0.4390463270791214},"objectIndex":0},{"lineIndexes":[590,591,592],"flatNormal":{"x":0.8984644248262328,"y":-0.4390463270791214},"objectIndex":0},{"lineIndexes":[593,594,591],"flatNormal":{"x":0.9397670440016772,"y":-0.3418155979594113},"objectIndex":0},{"lineIndexes":[594,595,596],"flatNormal":{"x":0.9397670440016772,"y":-0.3418155979594113},"objectIndex":0},{"lineIndexes":[597,598,595],"flatNormal":{"x":0.9658695703846402,"y":-0.2590289038022414},"objectIndex":0},{"lineIndexes":[598,599,600],"flatNormal":{"x":0.9658695703846402,"y":-0.2590289038022414},"objectIndex":0},{"lineIndexes":[601,602,599],"flatNormal":{"x":0.9999720314573558,"y":0.0074790576310828985},"objectIndex":0},{"lineIndexes":[602,603,604],"flatNormal":{"x":0.9999720314573558,"y":0.0074790576310828985},"objectIndex":0},{"lineIndexes":[605,606,603],"flatNormal":{"x":0.9677355590473161,"y":0.2519680292326362},"objectIndex":0},{"lineIndexes":[606,607,608],"flatNormal":{"x":0.9677355590473161,"y":0.2519680292326362},"objectIndex":0},{"lineIndexes":[609,610,607],"flatNormal":{"x":0.9381159432749236,"y":0.34632134928906766},"objectIndex":0},{"lineIndexes":[610,611,612],"flatNormal":{"x":0.9381159432749236,"y":0.34632134928906766},"objectIndex":0},{"lineIndexes":[613,614,611],"flatNormal":{"x":0.8939717062223266,"y":0.4481234076389474},"objectIndex":0},{"lineIndexes":[614,615,616],"flatNormal":{"x":0.8939717062223266,"y":0.4481234076389474},"objectIndex":0},{"lineIndexes":[617,618,615],"flatNormal":{"x":0.7004265579255136,"y":0.7137244825229251},"objectIndex":0},{"lineIndexes":[618,619,620],"flatNormal":{"x":0.7004265579255136,"y":0.7137244825229251},"objectIndex":0},{"lineIndexes":[621,622,619],"flatNormal":{"x":0.4654363838746887,"y":0.8850813366949127},"objectIndex":0},{"lineIndexes":[622,623,624],"flatNormal":{"x":0.4654363838746887,"y":0.8850813366949127},"objectIndex":0},{"lineIndexes":[625,626,623],"flatNormal":{"x":0.3800594752578486,"y":0.9249620507170706},"objectIndex":0},{"lineIndexes":[626,627,628],"flatNormal":{"x":0.3800594752578486,"y":0.9249620507170706},"objectIndex":0},{"lineIndexes":[629,630,627],"flatNormal":{"x":0.20072015872711,"y":0.9796486195981516},"objectIndex":0},{"lineIndexes":[630,631,632],"flatNormal":{"x":0.20072015872711,"y":0.9796486195981516},"objectIndex":0},{"lineIndexes":[633,634,631],"flatNormal":{"x":0.05309618209879152,"y":0.9985894028310796},"objectIndex":0},{"lineIndexes":[634,635,636],"flatNormal":{"x":0.05309618209879152,"y":0.9985894028310796},"objectIndex":0},{"lineIndexes":[637,638,635],"flatNormal":{"x":-0.04496254127350358,"y":0.9989886735505206},"objectIndex":0},{"lineIndexes":[638,639,640],"flatNormal":{"x":-0.04496254127350358,"y":0.9989886735505206},"objectIndex":0},{"lineIndexes":[641,642,639],"flatNormal":{"x":-0.9999999999988811,"y":0.0000014959596001133656},"objectIndex":0},{"lineIndexes":[642,643,644],"flatNormal":{"x":-0.9999999999988811,"y":0.0000014959596001133656},"objectIndex":0},{"lineIndexes":[645,646,643],"flatNormal":{"x":-0.04218683865063289,"y":-0.9991097390400444},"objectIndex":0},{"lineIndexes":[646,647,648],"flatNormal":{"x":-0.04218683865063289,"y":-0.9991097390400444},"objectIndex":0},{"lineIndexes":[649,650,647],"flatNormal":{"x":-0.3228327897296841,"y":-0.9464560158165564},"objectIndex":0},{"lineIndexes":[650,651,652],"flatNormal":{"x":-0.3228327897296841,"y":-0.9464560158165564},"objectIndex":0},{"lineIndexes":[653,654,651],"flatNormal":{"x":-0.7514545899046443,"y":-0.6597848128831422},"objectIndex":0},{"lineIndexes":[654,655,656],"flatNormal":{"x":-0.7514545899046443,"y":-0.6597848128831422},"objectIndex":0},{"lineIndexes":[657,658,655],"flatNormal":{"x":-0.9860261659731993,"y":-0.16659051598513336},"objectIndex":0},{"lineIndexes":[658,659,660],"flatNormal":{"x":-0.9860261659731993,"y":-0.16659051598513336},"objectIndex":0},{"lineIndexes":[661,662,659],"flatNormal":{"x":-0.9999860988927689,"y":-0.005272762200366251},"objectIndex":0},{"lineIndexes":[662,663,664],"flatNormal":{"x":-0.9999860988927689,"y":-0.005272762200366251},"objectIndex":0},{"lineIndexes":[665,666,663],"flatNormal":{"x":-0.9378938340279632,"y":0.34692240644318056},"objectIndex":0},{"lineIndexes":[666,667,668],"flatNormal":{"x":-0.9378938340279632,"y":0.34692240644318056},"objectIndex":0},{"lineIndexes":[669,670,667],"flatNormal":{"x":-0.8544120054301839,"y":0.5195961171686826},"objectIndex":0},{"lineIndexes":[670,671,672],"flatNormal":{"x":-0.8544120054301839,"y":0.5195961171686826},"objectIndex":0},{"lineIndexes":[673,674,671],"flatNormal":{"x":-0.4243875690158585,"y":0.9054806410215571},"objectIndex":0},{"lineIndexes":[674,675,676],"flatNormal":{"x":-0.4243875690158585,"y":0.9054806410215571},"objectIndex":0},{"lineIndexes":[677,678,675],"flatNormal":{"x":-0.011167225353467407,"y":0.9999376445948542},"objectIndex":0},{"lineIndexes":[678,679,680],"flatNormal":{"x":-0.011167225353467407,"y":0.9999376445948542},"objectIndex":0},{"lineIndexes":[681,682,679],"flatNormal":{"x":1,"y":0},"objectIndex":0},{"lineIndexes":[682,683,684],"flatNormal":{"x":1,"y":0},"objectIndex":0},{"lineIndexes":[685,686,683],"flatNormal":{"x":0,"y":1},"objectIndex":0},{"lineIndexes":[686,687,688],"flatNormal":{"x":0,"y":1},"objectIndex":0},{"lineIndexes":[689,690,687],"flatNormal":{"x":-0.13537229887540733,"y":0.9907948025182548},"objectIndex":0},{"lineIndexes":[690,691,692],"flatNormal":{"x":-0.13537229887540733,"y":0.9907948025182548},"objectIndex":0},{"lineIndexes":[693,694,691],"flatNormal":{"x":-0.18561739980707334,"y":0.9826220946472053},"objectIndex":0},{"lineIndexes":[694,695,696],"flatNormal":{"x":-0.18561739980707334,"y":0.9826220946472053},"objectIndex":0},{"lineIndexes":[697,698,695],"flatNormal":{"x":-0.3514749306959814,"y":0.9361972938928286},"objectIndex":0},{"lineIndexes":[698,699,700],"flatNormal":{"x":-0.3514749306959814,"y":0.9361972938928286},"objectIndex":0},{"lineIndexes":[701,702,699],"flatNormal":{"x":-0.528325277074388,"y":0.849042049373452},"objectIndex":0},{"lineIndexes":[702,703,704],"flatNormal":{"x":-0.528325277074388,"y":0.849042049373452},"objectIndex":0},{"lineIndexes":[705,706,703],"flatNormal":{"x":-0.7270837890198242,"y":0.6865487336996376},"objectIndex":0},{"lineIndexes":[706,707,708],"flatNormal":{"x":-0.7270837890198242,"y":0.6865487336996376},"objectIndex":0},{"lineIndexes":[709,710,707],"flatNormal":{"x":-0.8781026071816419,"y":0.4784723725157005},"objectIndex":0},{"lineIndexes":[710,711,712],"flatNormal":{"x":-0.8781026071816419,"y":0.4784723725157005},"objectIndex":0},{"lineIndexes":[713,714,711],"flatNormal":{"x":-0.9553478316284638,"y":0.2954835369403725},"objectIndex":0},{"lineIndexes":[714,715,716],"flatNormal":{"x":-0.9553478316284638,"y":0.2954835369403725},"objectIndex":0},{"lineIndexes":[717,718,715],"flatNormal":{"x":-0.9952914897637797,"y":0.09692703649547961},"objectIndex":0},{"lineIndexes":[718,534,719],"flatNormal":{"x":-0.9952914897637797,"y":0.09692703649547961},"objectIndex":0},{"lineIndexes":[720,721,722],"flatNormal":{"x":0.9869011936679297,"y":-0.1613258625788672},"objectIndex":0},{"lineIndexes":[721,723,724],"flatNormal":{"x":0.9869011936679297,"y":-0.1613258625788672},"objectIndex":0},{"lineIndexes":[725,726,723],"flatNormal":{"x":0.8210290592595683,"y":-0.5708864018798735},"objectIndex":0},{"lineIndexes":[726,727,728],"flatNormal":{"x":0.8210290592595683,"y":-0.5708864018798735},"objectIndex":0},{"lineIndexes":[729,730,727],"flatNormal":{"x":0.4939140098029215,"y":-0.8695107537692675},"objectIndex":0},{"lineIndexes":[730,731,732],"flatNormal":{"x":0.4939140098029215,"y":-0.8695107537692675},"objectIndex":0},{"lineIndexes":[733,734,731],"flatNormal":{"x":0.3537668303620481,"y":-0.9353336462116553},"objectIndex":0},{"lineIndexes":[734,735,736],"flatNormal":{"x":0.3537668303620481,"y":-0.9353336462116553},"objectIndex":0},{"lineIndexes":[737,738,735],"flatNormal":{"x":0.02329849947029959,"y":-0.9997285531195118},"objectIndex":0},{"lineIndexes":[738,739,740],"flatNormal":{"x":0.02329849947029959,"y":-0.9997285531195118},"objectIndex":0},{"lineIndexes":[741,742,739],"flatNormal":{"x":-1,"y":0},"objectIndex":0},{"lineIndexes":[742,743,744],"flatNormal":{"x":-1,"y":0},"objectIndex":0},{"lineIndexes":[745,746,743],"flatNormal":{"x":0.028071716920364517,"y":0.999605911701778},"objectIndex":0},{"lineIndexes":[746,747,748],"flatNormal":{"x":0.028071716920364517,"y":0.999605911701778},"objectIndex":0},{"lineIndexes":[749,750,747],"flatNormal":{"x":0.2993004031260808,"y":0.9541589326147745},"objectIndex":0},{"lineIndexes":[750,751,752],"flatNormal":{"x":0.2993004031260808,"y":0.9541589326147745},"objectIndex":0},{"lineIndexes":[753,754,751],"flatNormal":{"x":0.7227280966773632,"y":0.6911324751978567},"objectIndex":0},{"lineIndexes":[754,755,756],"flatNormal":{"x":0.7227280966773632,"y":0.6911324751978567},"objectIndex":0},{"lineIndexes":[757,758,755],"flatNormal":{"x":0.8225317630514037,"y":0.5687191739088365},"objectIndex":0},{"lineIndexes":[758,759,760],"flatNormal":{"x":0.8225317630514037,"y":0.5687191739088365},"objectIndex":0},{"lineIndexes":[761,762,759],"flatNormal":{"x":0.9896227851903389,"y":0.14368974574449095},"objectIndex":0},{"lineIndexes":[762,722,763],"flatNormal":{"x":0.9896227851903389,"y":0.14368974574449095},"objectIndex":0}];

const fillShapes = [];
const lineShapesOpen = [];
const lineShapesClosed = [];

const shapes = {};

for (let i = 0; i < faceIndexes.length; i ++) {
  const { lineIndexes, objectIndex, flatNormal } = faces[faceIndexes[i]];

  const a = points[lineIndexes[0]];
  const b = points[lineIndexes[1]];
  const c = points[lineIndexes[2]];

  const lineSegment = [];
  if (a && b) {
    lineSegment.push(a, b);
  } else if (b && c) {
    lineSegment.push(b, c);
  } else if (c && a) {
    lineSegment.push(c, a);
  } else {
    continue;
  }

  const segmentNormal = normalize(normal(subtract(lineSegment[1], lineSegment[0])));
  if (dot(segmentNormal, flatNormal) < 0) lineSegment.reverse();

  if (!shapes[objectIndex]) shapes[objectIndex] = { lineSegments: [] };
  const shape = shapes[objectIndex];

  shape.lineSegments.push(lineSegment)
}

for (const objectIndex in shapes) {
  const shape = shapes[objectIndex];
  const openShape = openObjectIndexes[objectIndex];

  const lines = [shape.lineSegments.pop()];

  loop: while (shape.lineSegments.length !== 0) {
    for (let i = 0; i < lines.length; i ++) {
      const line = lines[i];

      const lastPoint = line[line.length - 1];

      let closestSegmentEnd;
      let endHit = false;
      const distanceEnd = new WeakMap();
      for (let i = 0; i < shape.lineSegments.length; i ++) {
        const lineSegment = shape.lineSegments[i];
        if (lastPoint === lineSegment[0]) {
          closestSegmentEnd = lineSegment;
          endHit = true;
          break;
        }
        const distance = distanceTo(lastPoint, lineSegment[0]);
        distanceEnd.set(lineSegment, distance);
      }

      if (!endHit) {
        closestSegmentEnd = shape.lineSegments.sort((a, b) => {
          const distanceA = distanceEnd.get(a);
          const distanceB = distanceEnd.get(b);
          if (distanceA === distanceB) return distanceTo(a[0], a[1]) - distanceTo(b[0], b[1]);
          return distanceA - distanceB;
        })[0];

        if (distanceTo(closestSegmentEnd[0], lastPoint) < .001) endHit = true;
      }

      if (endHit) {
        shape.lineSegments.splice(shape.lineSegments.indexOf(closestSegmentEnd), 1);
        line.splice(line.length, 0, closestSegmentEnd[1]);
        continue loop;
      }

      const firstPoint = line[0];

      let closestSegmentStart;
      let hitStart = false;
      const distanceStart = new WeakMap();
      for (let i = 0; i < shape.lineSegments.length; i ++) {
        const lineSegment = shape.lineSegments[i];
        if (firstPoint === lineSegment[1]) {
          closestSegmentStart = lineSegment;
          hitStart = true;
          break;
        }
        const distance = distanceTo(firstPoint, lineSegment[1]);
        distanceStart.set(lineSegment, distance);
      }

      if (!hitStart) {
        closestSegmentStart = shape.lineSegments.sort((a, b) => {
          const distanceA = distanceStart.get(a);
          const distanceB = distanceStart.get(b);
          if (distanceA === distanceB) return distanceTo(a[0], a[1]) - distanceTo(b[0], b[1]);
          return distanceA - distanceB;
        })[0];

        if (distanceTo(closestSegmentStart[1], firstPoint) < .001) hitStart = true;
      }

      if (hitStart) {
        shape.lineSegments.splice(shape.lineSegments.indexOf(closestSegmentStart), 1);
        line.splice(0, 0, closestSegmentStart[0]);
        continue loop;
      }
    }
    lines.push(shape.lineSegments.pop());
  }

  if (openShape) {
    for (const line of lines) {
      const closed = distanceTo(line[0], line[line.length - 1]) < .001;
      if (closed) {
        lineShapesClosed.push(line);
      } else {
        lineShapesOpen.push(line);
      }
    }
  } else {
    fillShapes.push(...lines);
  }
}

const canvas = document.createElement('canvas');
canvas.width = 360;
canvas.height = 360;
document.body.appendChild(canvas);
const context = canvas.getContext('2d');

context.fillStyle = 'rgba(255, 0, 0, 0.5)';
for (const path of fillShapes) {
  context.beginPath();
  for (const { x, y }  of path) {
    context.lineTo(x * 3, y * 3);
  }
  context.fill();
  context.stroke();
}

In this example a simple text is sliced. text contains relatively many points. this step can take up to 1 second(!) per layer.

I've made some improvements to the first part of this step. This step creates small line segments, that will later have to be connected.

const shapes = {};

for (let i = 0; i < faceIndexes.length; i ++) {
  const { lineIndexes, objectIndex, flatNormal } = faces[faceIndexes[i]];

  const a = points[lineIndexes[0]];
  const b = points[lineIndexes[1]];
  const c = points[lineIndexes[2]];

  const lineSegment = [];
  if (a && b) {
    lineSegment.push(a, b);
  } else if (b && c) {
    lineSegment.push(b, c);
  } else if (c && a) {
    lineSegment.push(c, a);
  } else {
    continue;
  }

  const segmentNormal = normalize(normal(subtract(lineSegment[1], lineSegment[0])));
  if (dot(segmentNormal, flatNormal) < 0) lineSegment.reverse();

  if (!shapes[objectIndex]) shapes[objectIndex] = { lineSegments: [] };
  const shape = shapes[objectIndex];

  shape.lineSegments.push(lineSegment)
}

Problem was that this script was only generating lines with just 2 points, making the "connecting lines" part of this step very time consuming. We know that connecting line segments share the same point index. By creating the startConnects and endConnects index objects I was able to join line segments in this step.

const shapes = {};

const startConnects = {};
const endConnects = {};

for (let i = 0; i < faceIndexes.length; i ++) {
  const faceIndex = faceIndexes[i];
  const { lineIndexes, flatNormal, objectIndex } = faces[faceIndex];

  const a = lineIndexes[0];
  const b = lineIndexes[1];
  const c = lineIndexes[2];

  let pointA;
  let pointB;
  if (points[a] && points[b]) {
    pointA = a;
    pointB = b;
  } else if (points[b] && points[c]) {
    pointA = b;
    pointB = c;
  } else if (points[c] && points[a]) {
    pointA = c;
    pointB = a;
  } else {
    // should never happen
    continue;
  }

  const segmentNormal = normalize(normal(subtract(points[pointA], points[pointB])));
  if (dot(segmentNormal, flatNormal) < 0) {
    const temp = pointB;
    pointB = pointA;
    pointA = temp;
  }

  if (endConnects[pointA]) {
    const lineSegment = endConnects[pointA];
    lineSegment.push(points[pointB]);
    delete endConnects[pointA];
    endConnects[pointB] = lineSegment;
  } else if (startConnects[pointB]) {
    const lineSegment = startConnects[pointB];
    lineSegment.unshift(points[pointA]);
    delete startConnects[pointB];
    startConnects[pointA] = lineSegment;
  } else {
    const lineSegment = [points[pointA], points[pointB]];
    startConnects[pointA] = lineSegment;
    endConnects[pointB] = lineSegment;

    if (!shapes[objectIndex]) shapes[objectIndex] = { lineSegments: [] };
    const shape = shapes[objectIndex];

    shape.lineSegments.push(lineSegment)
  }
}

before this step took around 400ms. Currently this step only takes around 3ms(!!!)