designix-uis 1.0.28 → 1.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/public/_app/immutable/assets/0.Z6QhVM7R.css +1 -0
- package/dist/public/_app/immutable/assets/3.PKAk05Ur.css +1 -0
- package/dist/public/_app/immutable/chunks/BkVLPnKR.js +3 -0
- package/dist/public/_app/immutable/chunks/Dn5S8cZ1.js +125 -0
- package/dist/public/_app/immutable/chunks/SRK2Lmkd.js +1 -0
- package/dist/public/_app/immutable/chunks/Za7VFBJZ.js +216 -0
- package/dist/public/_app/immutable/chunks/xihTtKlq.js +1 -0
- package/dist/public/_app/immutable/chunks/zy21FDY2.js +1 -0
- package/dist/public/_app/immutable/entry/app.BqRw2uic.js +2 -0
- package/dist/public/_app/immutable/entry/start.CpOM7lAH.js +1 -0
- package/dist/public/_app/immutable/nodes/0.ByCi17z7.js +2 -0
- package/dist/public/_app/immutable/nodes/1.CQmzcrhO.js +1 -0
- package/dist/public/_app/immutable/nodes/2.Cm_cidf8.js +1 -0
- package/dist/public/_app/immutable/nodes/3.1SU5XEb2.js +5 -0
- package/dist/public/_app/version.json +1 -1
- package/dist/public/gear/gear_bar.html +19 -23
- package/dist/public/gear/gear_epicycloid.html +19 -23
- package/dist/public/gear/gear_ring.html +19 -23
- package/dist/public/gear/gear_wheel.html +19 -23
- package/dist/public/heliostat/base.html +19 -23
- package/dist/public/heliostat/haxis_guidance.html +19 -23
- package/dist/public/heliostat/heliostat.html +20 -24
- package/dist/public/heliostat/heliostat_2.html +20 -24
- package/dist/public/heliostat/pole_static.html +20 -24
- package/dist/public/heliostat/rake.html +19 -23
- package/dist/public/heliostat/rake_stopper.html +19 -23
- package/dist/public/heliostat/ring.html +19 -23
- package/dist/public/heliostat/ring_guidance.html +19 -23
- package/dist/public/heliostat/rod.html +19 -23
- package/dist/public/heliostat/spider.html +19 -23
- package/dist/public/heliostat/surface.html +19 -23
- package/dist/public/heliostat/swing.html +19 -23
- package/dist/public/heliostat/trapeze.html +19 -23
- package/dist/public/heliostat/vaxis.html +19 -23
- package/dist/public/heliostat/vaxis_guidance.html +19 -23
- package/dist/public/heliostat/vaxis_holder.html +19 -23
- package/dist/public/index.html +16 -20
- package/package.json +14 -12
- package/dist/public/_app/env.js +0 -1
- package/dist/public/_app/immutable/assets/0.CW0MaQv7.css +0 -1
- package/dist/public/_app/immutable/assets/3.XhKpYbOE.css +0 -1
- package/dist/public/_app/immutable/chunks/B2rYf0-P.js +0 -1
- package/dist/public/_app/immutable/chunks/C9162_lF.js +0 -1
- package/dist/public/_app/immutable/chunks/CBJmzK5-.js +0 -2
- package/dist/public/_app/immutable/chunks/CEi5igkA.js +0 -1
- package/dist/public/_app/immutable/chunks/CQjbWJoy.js +0 -1
- package/dist/public/_app/immutable/chunks/CTzLJgFn.js +0 -125
- package/dist/public/_app/immutable/chunks/CgtJ9oav.js +0 -1
- package/dist/public/_app/immutable/chunks/DbdoZ-jc.js +0 -216
- package/dist/public/_app/immutable/chunks/DsnmJJEf.js +0 -1
- package/dist/public/_app/immutable/chunks/STfePW3F.js +0 -1
- package/dist/public/_app/immutable/chunks/h6_dS3X8.js +0 -1
- package/dist/public/_app/immutable/entry/app.8UqCQ_tR.js +0 -2
- package/dist/public/_app/immutable/entry/start.DnQvWv3N.js +0 -1
- package/dist/public/_app/immutable/nodes/0.g-5snx6W.js +0 -2
- package/dist/public/_app/immutable/nodes/1.tZylGp1J.js +0 -1
- package/dist/public/_app/immutable/nodes/2.Bk5PIUDO.js +0 -1
- package/dist/public/_app/immutable/nodes/3.DW5qpCqX.js +0 -10
|
@@ -0,0 +1 @@
|
|
|
1
|
+
body{background-color:#008b8b;margin:0;font-family:Courier New,Helvetica,Arial,Verdana}h1.svelte-12qhfyh{color:#7fffd4;margin:1rem 1rem .2rem}h6.svelte-12qhfyh{margin:.2rem 1rem 1rem}nav.svelte-12qhfyh{margin:1rem}nav.svelte-12qhfyh>a:where(.svelte-12qhfyh){color:#000;background-color:#f8f8ff;border:.2rem solid brown;border-radius:.6rem;margin-top:.1rem;margin-left:.1rem;padding-left:.3rem;padding-right:.3rem;text-decoration:none;display:inline-block}nav.svelte-12qhfyh>a:where(.svelte-12qhfyh):hover{background-color:#ff0}main.svelte-12qhfyh{background-color:#f8f8ff;min-height:70vh;padding-top:2rem;padding-bottom:3rem}footer.svelte-12qhfyh{margin:5rem 1rem}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
aside.backdrop.svelte-qoipkr{z-index:10;background-color:#0006;justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:fixed;top:0;left:0}aside.svelte-qoipkr>div.dialog:where(.svelte-qoipkr){background-color:#e0ffff;max-width:80vw;max-height:80vh}aside.svelte-qoipkr>div:where(.svelte-qoipkr)>button:where(.svelte-qoipkr){background-color:#fff;border:none;width:100%;height:100%;margin:0;padding:0}section.svelte-12sscyt{margin:1rem}section.svelte-12sscyt>button:where(.svelte-12sscyt){background-color:#fff;border:none;margin:.2rem;padding:0;font-size:.6rem}section.svelte-12sscyt>button:where(.svelte-12sscyt)>img:where(.svelte-12sscyt){max-width:200px;max-height:200px}aside.backdrop.svelte-c5gucl{z-index:10;background-color:#0006;justify-content:center;align-items:center;width:100%;height:100%;display:flex;position:fixed;top:0;left:0}aside.svelte-c5gucl>div.dialog:where(.svelte-c5gucl){background-color:#e0ffff;flex-direction:column;justify-content:space-between;align-items:stretch;width:40rem;max-width:80vw;height:20rem;max-height:80vh;display:flex}aside.svelte-c5gucl>div.dialog.sizeLarge:where(.svelte-c5gucl){width:60rem;height:30rem}aside.svelte-c5gucl>div:where(.svelte-c5gucl)>article.question:where(.svelte-c5gucl){flex-direction:column;justify-content:center;align-items:center;height:80%;font-size:1.2rem;display:flex;overflow:auto}aside.svelte-c5gucl>div:where(.svelte-c5gucl)>footer:where(.svelte-c5gucl){justify-content:space-between;align-items:flex-end;display:flex}aside.svelte-c5gucl>div:where(.svelte-c5gucl)>footer:where(.svelte-c5gucl)>button:where(.svelte-c5gucl){color:#00008b;background-color:#add8e6;border:.1rem solid #00008b;border-radius:.2rem;margin:.5rem 3rem;padding:.6rem 2.2rem;font-size:1.2rem;font-weight:400}div.deleteKeys.svelte-bifaxb{justify-content:space-between;align-items:center;display:flex}div.svelte-bifaxb>button:where(.svelte-bifaxb){color:#00008b;background-color:#add8e6;border:.1rem solid #00008b;border-radius:.2rem;height:1.6rem;margin:.5rem;padding:.2rem .4rem;font-size:.8rem;font-weight:400}div.svelte-bifaxb>table:where(.svelte-bifaxb){margin:.5rem 2rem;font-size:.8rem;font-weight:400}div.svelte-bifaxb>table:where(.svelte-bifaxb)>thead:where(.svelte-bifaxb){background-color:#ddd}div.svelte-bifaxb>table:where(.svelte-bifaxb)>tbody:where(.svelte-bifaxb){background-color:#eee}div.svelte-bifaxb>table:where(.svelte-bifaxb)>tbody:where(.svelte-bifaxb)>tr:where(.svelte-bifaxb)>td:where(.svelte-bifaxb)>button:where(.svelte-bifaxb){color:#00008b;background-color:#0000;border:0}p.diagTitle.svelte-bifaxb{margin:.2rem;font-size:1rem;font-weight:400}p.diagItem.svelte-bifaxb{margin:0;font-size:.8rem;font-weight:400}div.svelte-8w4g7s{flex-direction:column;justify-content:flex-start;align-items:center;min-height:6rem;display:flex}div.svelte-8w4g7s>label:where(.svelte-8w4g7s),div.svelte-8w4g7s>input:where(.svelte-8w4g7s),div.svelte-8w4g7s>p.warnMsg:where(.svelte-8w4g7s){color:orange;margin:.2rem;font-size:1rem;font-weight:400}div.svelte-74yr5r{flex-direction:column;justify-content:flex-start;align-items:center;min-height:6rem;display:flex}div.svelte-74yr5r>label:where(.svelte-74yr5r),div.svelte-74yr5r>input:where(.svelte-74yr5r){margin:.2rem;font-size:1rem;font-weight:400}canvas.svelte-1a2f2q3{background-color:pink}section.svelte-e6cp59>h2:where(.svelte-e6cp59){color:gray;margin:1rem .5rem 0}section.svelte-e6cp59>main:where(.svelte-e6cp59){display:inline-block}section.svelte-e6cp59>main:where(.svelte-e6cp59)>label.fileUpload:where(.svelte-e6cp59){color:#00008b;background-color:#add8e6;border:.1rem solid #00008b;border-radius:.2rem;height:1.2rem;margin:.5rem;padding:.1rem .4rem;font-size:.8rem;font-weight:400;display:inline-block}section.svelte-e6cp59>main:where(.svelte-e6cp59)>input[type=file]:where(.svelte-e6cp59){display:none}section.svelte-e6cp59>main:where(.svelte-e6cp59)>textarea:where(.svelte-e6cp59){margin:.2rem .2rem .2rem .5rem;font-size:.8rem;font-weight:400;display:block}section.svelte-e6cp59>main:where(.svelte-e6cp59)>textarea.colorWarn:where(.svelte-e6cp59){background-color:orange}section.svelte-e6cp59>main:where(.svelte-e6cp59)>table:where(.svelte-e6cp59){margin:.2rem .5rem;font-size:.8rem;font-weight:400}section.svelte-e6cp59>main:where(.svelte-e6cp59)>table:where(.svelte-e6cp59)>thead:where(.svelte-e6cp59){background-color:#ddd}section.svelte-e6cp59>main:where(.svelte-e6cp59)>table:where(.svelte-e6cp59)>thead:where(.svelte-e6cp59)>tr:where(.svelte-e6cp59)>td:where(.svelte-e6cp59)>span:where(.svelte-e6cp59){margin-left:5rem}section.svelte-e6cp59>main:where(.svelte-e6cp59)>table:where(.svelte-e6cp59)>thead:where(.svelte-e6cp59)>tr:where(.svelte-e6cp59)>td:where(.svelte-e6cp59)>span:where(.svelte-e6cp59)>button:where(.svelte-e6cp59){color:#00f;background-color:#add8e6;border:0;border-radius:30%;padding-left:1rem;padding-right:1rem;font-weight:700}section.svelte-e6cp59>main:where(.svelte-e6cp59)>table:where(.svelte-e6cp59)>tbody:where(.svelte-e6cp59){background-color:#eee}section.svelte-e6cp59>main:where(.svelte-e6cp59)>table:where(.svelte-e6cp59)>tbody.collaps:where(.svelte-e6cp59){visibility:collapse}section.svelte-e6cp59>main:where(.svelte-e6cp59)>table:where(.svelte-e6cp59)>tbody:where(.svelte-e6cp59)>tr.changed:where(.svelte-e6cp59){background-color:#ded}section.svelte-e6cp59>main:where(.svelte-e6cp59)>table:where(.svelte-e6cp59)>tbody:where(.svelte-e6cp59)>tr.separator:where(.svelte-e6cp59){background-color:tan;font-weight:700}tr.separator.svelte-e6cp59>td:where(.svelte-e6cp59){text-align:center}tr.separator.svelte-e6cp59>td:where(.svelte-e6cp59)>label:where(.svelte-e6cp59)>input[type=checkbox]:where(.svelte-e6cp59){display:none}tr.separator.svelte-e6cp59>td:where(.svelte-e6cp59)>label:where(.svelte-e6cp59)>span:where(.svelte-e6cp59){background-color:#add8e6;border:1px solid gray;border-radius:6px;width:50px;height:8px;display:inline-block;position:relative}tr.separator.svelte-e6cp59>td:where(.svelte-e6cp59)>label:where(.svelte-e6cp59)>span:where(.svelte-e6cp59):after{content:"";background-color:gray;border-radius:50%;width:8px;height:8px;display:inline-block;position:absolute;top:0;left:1px}tr.separator.svelte-e6cp59>td:where(.svelte-e6cp59)>label:where(.svelte-e6cp59)>input[type=checkbox]:where(.svelte-e6cp59):checked+span:where(.svelte-e6cp59){background:#00008b}tr.separator.svelte-e6cp59>td:where(.svelte-e6cp59)>label:where(.svelte-e6cp59)>input[type=checkbox]:where(.svelte-e6cp59):checked+span:where(.svelte-e6cp59):after{left:37px}section.svelte-e6cp59>main:where(.svelte-e6cp59)>table:where(.svelte-e6cp59)>thead:where(.svelte-e6cp59)>tr:where(.svelte-e6cp59)>td:where(.svelte-e6cp59),section.svelte-e6cp59>main:where(.svelte-e6cp59)>table:where(.svelte-e6cp59)>tbody:where(.svelte-e6cp59)>tr:where(.svelte-e6cp59)>td:where(.svelte-e6cp59){padding-left:.4rem;padding-right:.4rem}section.svelte-e6cp59>main:where(.svelte-e6cp59)>table:where(.svelte-e6cp59)>tbody:where(.svelte-e6cp59)>tr:where(.svelte-e6cp59)>td:where(.svelte-e6cp59)>button:where(.svelte-e6cp59){color:#00008b;background-color:#0000;border:0}section.svelte-e6cp59>main:where(.svelte-e6cp59)>table:where(.svelte-e6cp59)>tbody:where(.svelte-e6cp59)>tr:where(.svelte-e6cp59)>td:where(.svelte-e6cp59)>input:where(.svelte-e6cp59){height:.8rem}section.svelte-e6cp59>main:where(.svelte-e6cp59)>table:where(.svelte-e6cp59)>tbody:where(.svelte-e6cp59)>tr:where(.svelte-e6cp59)>td:where(.svelte-e6cp59)>input.input-number:where(.svelte-e6cp59){width:5rem}section.svelte-e6cp59>main:where(.svelte-e6cp59)>table:where(.svelte-e6cp59)>thead:where(.svelte-e6cp59)>tr:where(.svelte-e6cp59)>td.hideColumn:where(.svelte-e6cp59),section.svelte-e6cp59>main:where(.svelte-e6cp59)>table:where(.svelte-e6cp59)>tbody:where(.svelte-e6cp59)>tr:where(.svelte-e6cp59)>td.hideColumn:where(.svelte-e6cp59){display:none}section.svelte-e6cp59>main:where(.svelte-e6cp59)>div.comment:where(.svelte-e6cp59){margin-left:.5rem;font-size:.8rem}section.svelte-e6cp59>main:where(.svelte-e6cp59)>button:where(.svelte-e6cp59){color:#00008b;background-color:#add8e6;border:.1rem solid #00008b;border-radius:.2rem;height:1.6rem;margin:.5rem;padding:.2rem .4rem;font-size:.8rem;font-weight:400}p.cUrl.svelte-e6cp59{margin:0 1rem}section.svelte-e6cp59>button.side-img:where(.svelte-e6cp59){vertical-align:top;z-index:1;background-color:#fff;border:none;margin:.2rem;padding:0;font-size:.6rem;position:sticky;top:.5rem}section.svelte-e6cp59>button.side-img:where(.svelte-e6cp59)>img:where(.svelte-e6cp59){max-width:200px;max-height:200px}section.svelte-e6cp59>div.mini-canvas:where(.svelte-e6cp59){vertical-align:top;z-index:1;margin:.2rem;display:inline-block;position:sticky;top:.5rem}nav.svelte-p0ndb1>button:where(.svelte-p0ndb1){color:#00008b;background-color:#add8e6;border:.1rem solid #00008b;border-radius:.2rem;width:1.6rem;height:1.6rem;margin:0;padding:0;font-size:1rem;font-weight:900}nav.svelte-p0ndb1>input[type=range]:where(.svelte-p0ndb1){width:8rem}nav.svelte-p0ndb1>input[type=number]:where(.svelte-p0ndb1){background-color:#add8e6;border-color:#00008b;width:3rem}nav.svelte-1iutb4n>button:where(.svelte-1iutb4n){background-color:#90ee90;border:.1rem solid #006400;border-radius:.2rem;width:2rem;height:2rem;margin:.1rem;padding:0}nav.svelte-1iutb4n>button:where(.svelte-1iutb4n)>div.zero:where(.svelte-1iutb4n){background-color:#0000;border:.3rem solid #006400;border-radius:1rem;width:.8rem;height:.8rem;margin:auto}nav.svelte-1iutb4n>button:where(.svelte-1iutb4n)>div.zoomin:where(.svelte-1iutb4n){background-color:#006400;border:.3rem solid gray;border-radius:0;width:.8rem;height:.8rem;margin:auto}nav.svelte-1iutb4n>button:where(.svelte-1iutb4n)>div.zoomout:where(.svelte-1iutb4n){background-color:gray;border:.3rem solid #006400;border-radius:0;width:.8rem;height:.8rem;margin:auto}nav.svelte-1iutb4n>button:where(.svelte-1iutb4n)>div.arrowleft:where(.svelte-1iutb4n){border-top:.7rem solid #0000;border-bottom:.7rem solid #0000;border-right:1.26rem solid #006400;width:0;height:0;margin:auto}nav.svelte-1iutb4n>button:where(.svelte-1iutb4n)>div.arrowright:where(.svelte-1iutb4n){border-top:.7rem solid #0000;border-bottom:.7rem solid #0000;border-left:1.26rem solid #006400;width:0;height:0;margin:auto}nav.svelte-1iutb4n>button:where(.svelte-1iutb4n)>div.arrowup:where(.svelte-1iutb4n){border-bottom:1.26rem solid #006400;border-left:.7rem solid #0000;border-right:.7rem solid #0000;width:0;height:0;margin:auto}nav.svelte-1iutb4n>button:where(.svelte-1iutb4n)>div.arrowdown:where(.svelte-1iutb4n){border-top:1.26rem solid #006400;border-left:.7rem solid #0000;border-right:.7rem solid #0000;width:0;height:0;margin:auto}div.svelte-1u36vsa>label:where(.svelte-1u36vsa)>input:where(.svelte-1u36vsa){margin-left:1rem}section.svelte-n9qac9>div.rack:where(.svelte-n9qac9){text-align:center;margin:0 1rem;display:inline-block}section.svelte-n9qac9>div.rack:where(.svelte-n9qac9)>canvas:where(.svelte-n9qac9){background-color:pink;margin:.2rem}section.svelte-xyzrxn{background-color:#d3d3d3;border-radius:.5rem;margin-left:.25rem;margin-right:1rem}section.svelte-xyzrxn>h2:where(.svelte-xyzrxn){color:gray;margin:1rem .5rem 0 .25rem}section.svelte-xyzrxn>h2:where(.svelte-xyzrxn)>span:where(.svelte-xyzrxn){color:#fff;margin-left:1rem;font-size:1rem;font-weight:400}section.svelte-xyzrxn>ol:where(.svelte-xyzrxn)>li:where(.svelte-xyzrxn){color:#000;font-size:1rem;font-weight:400}section.svelte-xyzrxn>ol:where(.svelte-xyzrxn)>li:where(.svelte-xyzrxn)>button:where(.svelte-xyzrxn){color:#00008b;background-color:#add8e6;border:.1rem solid #00008b;border-radius:.2rem;height:1.6rem;margin:.5rem;padding:.2rem .4rem;font-size:.8rem;font-weight:400}input.toggle.svelte-xyzrxn{display:none}div.nested.svelte-xyzrxn{padding-left:1rem;display:none}input.toggle.svelte-xyzrxn:checked~div.nested:where(.svelte-xyzrxn){display:block}div.arrow.svelte-xyzrxn{border-top:.4rem solid #0000;border-bottom:.4rem solid #0000;border-left:.72rem solid #ff8c00;width:0;height:0;margin-left:.5rem;display:inline-block}input.toggle.svelte-xyzrxn:checked~label:where(.svelte-xyzrxn)>div.arrow:where(.svelte-xyzrxn){border:.4rem solid #0000;border-top:.72rem solid #ff8c00;border-bottom:0}div.svelte-xyzrxn>article:where(.svelte-xyzrxn){margin:.5rem}div.svelte-xyzrxn>table:where(.svelte-xyzrxn){margin-left:1rem;padding-bottom:1rem;font-size:.8rem;font-weight:400}div.svelte-xyzrxn>table:where(.svelte-xyzrxn)>thead:where(.svelte-xyzrxn){background-color:#ddd}div.svelte-xyzrxn>table:where(.svelte-xyzrxn)>tbody:where(.svelte-xyzrxn){background-color:#eee}div.svelte-xyzrxn>table:where(.svelte-xyzrxn)>tbody:where(.svelte-xyzrxn)>tr.changed:where(.svelte-xyzrxn){background-color:#ded}section.svelte-zsilp8>h2:where(.svelte-zsilp8){color:gray;margin:1rem .5rem 0}section.svelte-zsilp8>h2:where(.svelte-zsilp8)>button:where(.svelte-zsilp8){color:#00008b;background-color:#add8e6;border:.1rem solid #00008b;border-radius:.2rem;height:1.6rem;margin:.5rem;padding:.2rem .4rem;font-size:.8rem;font-weight:400}section.svelte-zsilp8>h2:where(.svelte-zsilp8)>button.theFace:where(.svelte-zsilp8){border-width:.2rem;border-color:#00f}section.svelte-zsilp8>textarea:where(.svelte-zsilp8){margin-left:.5rem}section.svelte-zsilp8>textarea.colorWarn:where(.svelte-zsilp8){background-color:orange}section.svelte-zsilp8>textarea.colorErr:where(.svelte-zsilp8){background-color:violet}table.svelte-zsilp8{border-collapse:collapse;margin:.2rem 1rem 2rem}table.svelte-zsilp8>caption:where(.svelte-zsilp8){color:#00008b;background-color:#add8e6;font-weight:700}table.svelte-zsilp8>thead:where(.svelte-zsilp8)>tr:where(.svelte-zsilp8)>th:where(.svelte-zsilp8),table.svelte-zsilp8>tbody:where(.svelte-zsilp8)>tr:where(.svelte-zsilp8)>td:where(.svelte-zsilp8){border:1px solid #00008b;padding:.2rem 1rem}table.svelte-zsilp8>tbody:where(.svelte-zsilp8)>tr:where(.svelte-zsilp8):nth-child(odd){background-color:#ffffe0}table.svelte-zsilp8>tbody:where(.svelte-zsilp8)>tr:where(.svelte-zsilp8):nth-child(2n){background-color:#add8e6}section.svelte-zsilp8>table:where(.svelte-zsilp8)>tbody:where(.svelte-zsilp8)>tr:where(.svelte-zsilp8)>td:where(.svelte-zsilp8)>button:where(.svelte-zsilp8){color:#00008b;background-color:inherit;border-style:none;margin:0;padding:.1rem .4rem;font-size:1rem;font-weight:700}section.svelte-zsilp8>table:where(.svelte-zsilp8)>tbody:where(.svelte-zsilp8)>tr:where(.svelte-zsilp8)>td:where(.svelte-zsilp8)>button:where(.svelte-zsilp8):hover{background-color:#fff}dialog#dBview.svelte-zsilp8{display:none}dialog#dBview[open].svelte-zsilp8{display:block}dialog#dBview.svelte-zsilp8::backdrop{background-color:#0006}dialog#dBview.svelte-zsilp8>textarea:where(.svelte-zsilp8){resize:none;background-color:#ffffe0;width:80vw;height:70vh;margin:0;display:block}dialog#dBview.svelte-zsilp8>button.bback:where(.svelte-zsilp8){color:#fff;background-color:#000;border:none;outline:none;width:100%;height:2rem;margin:1rem 0 0;display:block}h1.svelte-1nzn10d{margin:1rem 1rem 0}article.svelte-1nzn10d{margin:0 1rem 2rem;font-size:1rem;font-style:italic;font-weight:400}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),u=Array.isArray,d=Array.prototype.indexOf,f=Array.prototype.includes,p=Array.from,m=Object.defineProperty,h=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyDescriptors,_=Object.prototype,v=Array.prototype,y=Object.getPrototypeOf,b=Object.isExtensible,x=()=>{};function S(e){return e()}function ee(e){for(var t=0;t<e.length;t++)e[t]()}function te(){var e,t;return{promise:new Promise((n,r)=>{e=n,t=r}),resolve:e,reject:t}}function ne(e,t){if(Array.isArray(e))return e;if(t===void 0||!(Symbol.iterator in e))return Array.from(e);let n=[];for(let r of e)if(n.push(r),n.length===t)break;return n}var C=1024,w=2048,re=4096,ie=8192,ae=16384,oe=32768,se=1<<25,ce=65536,le=1<<19,ue=1<<20,de=1<<25,fe=65536,pe=1<<21,me=1<<22,he=1<<23,ge=Symbol(`$state`),_e=Symbol(`legacy props`),ve=Symbol(``),ye=Symbol(`proxy path`),be=Symbol(`attributes`),xe=Symbol(`class`),Se=Symbol(`style`),Ce=Symbol(`text`),we=Symbol(`form reset`),Te=new class extends Error{name=`StaleReactionError`;message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Ee=!!globalThis.document?.contentType&&globalThis.document.contentType.includes(`xml`);function De(e){throw Error(`https://svelte.dev/e/experimental_async_required`)}function Oe(e){throw Error(`https://svelte.dev/e/lifecycle_outside_component`)}function ke(){throw Error(`https://svelte.dev/e/missing_context`)}function Ae(){throw Error(`https://svelte.dev/e/async_derived_orphan`)}function je(e,t,n){throw Error(`https://svelte.dev/e/each_key_duplicate`)}function Me(e){throw Error(`https://svelte.dev/e/effect_in_teardown`)}function Ne(){throw Error(`https://svelte.dev/e/effect_in_unowned_derived`)}function Pe(e){throw Error(`https://svelte.dev/e/effect_orphan`)}function Fe(){throw Error(`https://svelte.dev/e/effect_update_depth_exceeded`)}function Ie(){throw Error(`https://svelte.dev/e/fork_discarded`)}function Le(){throw Error(`https://svelte.dev/e/fork_timing`)}function Re(){throw Error(`https://svelte.dev/e/get_abort_signal_outside_reaction`)}function ze(){throw Error(`https://svelte.dev/e/hydration_failed`)}function Be(e){throw Error(`https://svelte.dev/e/lifecycle_legacy_only`)}function Ve(e){throw Error(`https://svelte.dev/e/props_invalid_value`)}function He(){throw Error(`https://svelte.dev/e/set_context_after_init`)}function Ue(){throw Error(`https://svelte.dev/e/state_descriptors_fixed`)}function We(){throw Error(`https://svelte.dev/e/state_prototype_fixed`)}function Ge(){throw Error(`https://svelte.dev/e/state_unsafe_mutation`)}function Ke(){throw Error(`https://svelte.dev/e/svelte_boundary_reset_onerror`)}var qe={},T=Symbol(`uninitialized`),Je=`http://www.w3.org/1999/xhtml`;function Ye(){console.warn(`https://svelte.dev/e/derived_inert`)}function Xe(e){console.warn(`https://svelte.dev/e/hydratable_missing_but_expected`)}function Ze(e){console.warn(`https://svelte.dev/e/hydration_mismatch`)}function Qe(){console.warn(`https://svelte.dev/e/select_multiple_invalid_value`)}function $e(){console.warn(`https://svelte.dev/e/svelte_boundary_reset_noop`)}var E=!1;function D(e){E=e}var O;function k(e){if(e===null)throw Ze(),qe;return O=e}function et(){return k(z(O))}function tt(e){if(E){if(z(O)!==null)throw Ze(),qe;O=e}}function nt(e=1){if(E){for(var t=e,n=O;t--;)n=z(n);O=n}}function rt(e=!0){for(var t=0,n=O;;){if(n.nodeType===8){var r=n.data;if(r===`]`){if(t===0)return n;--t}else (r===`[`||r===`[!`||r[0]===`[`&&!isNaN(Number(r.slice(1))))&&(t+=1)}var i=z(n);e&&n.remove(),n=i}}function it(e){if(!e||e.nodeType!==8)throw Ze(),qe;return e.data}function at(e){return e===this.v}function ot(e,t){return e==e?e!==t||typeof e==`object`&&!!e||typeof e==`function`:t==t}function st(e){return!ot(e,this.v)}var A=!1,ct=!1;function lt(){ct=!0}function ut(e,t){return e.label=t,dt(e.v,t),e}function dt(e,t){return e?.[ye]?.(t),e}var j=null;function ft(e){j=e}function pt(){let e={};return[()=>(gt(e)||ke(),mt(e)),t=>ht(e,t)]}function mt(e){return xt(`getContext`).get(e)}function ht(e,t){let n=xt(`setContext`);if(A){var r=K.f;!U&&r&32&&!j.i||He()}return n.set(e,t),t}function gt(e){return xt(`hasContext`).has(e)}function _t(){return xt(`getAllContexts`)}function vt(e,t=!1,n){j={p:j,i:!1,c:null,e:null,s:e,x:null,r:K,l:ct&&!t?{s:null,u:null,$:[]}:null}}function yt(e){var t=j,n=t.e;if(n!==null){t.e=null;for(var r of n)sr(r)}return e!==void 0&&(t.x=e),t.i=!0,j=t.p,e??{}}function bt(){return!ct||j!==null&&j.l===null}function xt(e){return j===null&&Oe(e),j.c??=new Map(St(j)||void 0)}function St(e){let t=e.p;for(;t!==null;){let e=t.c;if(e!==null)return e;t=t.p}return null}var Ct=[];function wt(){var e=Ct;Ct=[],ee(e)}function Tt(e){if(Ct.length===0&&!sn){var t=Ct;queueMicrotask(()=>{t===Ct&&wt()})}Ct.push(e)}function Et(){for(;Ct.length>0;)wt()}function Dt(e){var t=K;if(t===null)return U.f|=he,e;if(!(t.f&32768)&&!(t.f&4))throw e;Ot(e,t)}function Ot(e,t){if(!(t!==null&&t.f&16384)){for(;t!==null;){if(t.f&128){if(!(t.f&32768))throw e;try{t.b.error(e);return}catch(t){e=t}}t=t.parent}throw e}}var kt=~(w|re|C);function M(e,t){e.f=e.f&kt|t}function At(e){e.f&512||e.deps===null?M(e,C):M(e,re)}function jt(e){if(e!==null)for(let t of e)!(t.f&2)||!(t.f&65536)||(t.f^=fe,jt(t.deps))}function Mt(e,t,n){e.f&2048?t.add(e):e.f&4096&&n.add(e),jt(e.deps),M(e,C)}var Nt=[];function Pt(e,t=x){let n=null,r=new Set;function i(t){if(ot(e,t)&&(e=t,n)){let t=!Nt.length;for(let t of r)t[1](),Nt.push(t,e);if(t){for(let e=0;e<Nt.length;e+=2)Nt[e][0](Nt[e+1]);Nt.length=0}}}function a(t){i(t(e))}function o(o,s=x){let c=[o,s];return r.add(c),r.size===1&&(n=t(i,a)||x),o(e),()=>{r.delete(c),r.size===0&&n&&(n(),n=null)}}return{set:i,update:a,subscribe:o}}var Ft=!1,It=!1;function Lt(e){var t=It;try{return It=!1,[e(),It]}finally{It=t}}function Rt(e){let t=0,n=On(0),r;return()=>{ir()&&(Q(n),fr(()=>(t===0&&(r=$(()=>e(()=>Nn(n)))),t+=1,()=>{Tt(()=>{--t,t===0&&(r?.(),r=void 0,Nn(n))})})))}}var zt=ce|le;function Bt(e,t,n,r){new Vt(e,t,n,r)}var Vt=class{parent;is_pending=!1;transform_error;#e;#t=E?O:null;#n;#r;#i;#a=null;#o=null;#s=null;#c=null;#l=0;#u=0;#d=!1;#f=new Set;#p=new Set;#m=null;#h=Rt(()=>(this.#m=On(this.#l),()=>{this.#m=null}));constructor(e,t,n,r){this.#e=e,this.#n=t,this.#r=e=>{var t=K;t.b=this,t.f|=128,n(e)},this.parent=K.b,this.transform_error=r??this.parent?.transform_error??(e=>e),this.#i=mr(()=>{if(E){let e=this.#t;et();let t=e.data===`[!`;if(e.data.startsWith(`[?`)){let t=JSON.parse(e.data.slice(2));this.#_(t)}else t?this.#v():this.#g()}else this.#y()},zt),E&&(this.#e=O)}#g(){try{this.#a=V(()=>this.#r(this.#e))}catch(e){this.error(e)}}#_(e){let t=this.#n.failed;t&&(this.#s=V(()=>{t(this.#e,()=>e,()=>()=>{})}))}#v(){let e=this.#n.pending;e&&(this.is_pending=!0,this.#o=V(()=>e(this.#e)),Tt(()=>{var e=this.#c=document.createDocumentFragment(),t=L();e.append(t),this.#a=this.#x(()=>V(()=>this.#r(t))),this.#u===0&&(this.#e.before(e),this.#c=null,br(this.#o,()=>{this.#o=null}),this.#b(N))}))}#y(){try{if(this.is_pending=this.has_pending_snippet(),this.#u=0,this.#l=0,this.#a=V(()=>{this.#r(this.#e)}),this.#u>0){var e=this.#c=document.createDocumentFragment();wr(this.#a,e);let t=this.#n.pending;this.#o=V(()=>t(this.#e))}else this.#b(N)}catch(e){this.error(e)}}#b(e){this.is_pending=!1,e.transfer_effects(this.#f,this.#p)}defer_effect(e){Mt(e,this.#f,this.#p)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#n.pending}#x(e){var t=K,n=U,r=j;q(this.#i),G(this.#i),ft(this.#i.ctx);try{return pn.ensure(),e()}catch(e){return Dt(e),null}finally{q(t),G(n),ft(r)}}#S(e,t){if(!this.has_pending_snippet()){this.parent&&this.parent.#S(e,t);return}this.#u+=e,this.#u===0&&(this.#b(t),this.#o&&br(this.#o,()=>{this.#o=null}),this.#c&&=(this.#e.before(this.#c),null))}update_pending_count(e,t){this.#S(e,t),this.#l+=e,!(!this.#m||this.#d)&&(this.#d=!0,Tt(()=>{this.#d=!1,this.#m&&jn(this.#m,this.#l)}))}get_effect_pending(){return this.#h(),Q(this.#m)}error(e){if(!this.#n.onerror&&!this.#n.failed)throw e;N?.is_fork?(this.#a&&N.skip_effect(this.#a),this.#o&&N.skip_effect(this.#o),this.#s&&N.skip_effect(this.#s),N.oncommit(()=>{this.#C(e)})):this.#C(e)}#C(e){this.#a&&=(H(this.#a),null),this.#o&&=(H(this.#o),null),this.#s&&=(H(this.#s),null),E&&(k(this.#t),nt(),k(rt()));var t=this.#n.onerror;let n=this.#n.failed;var r=!1,i=!1;let a=()=>{if(r){$e();return}r=!0,i&&Ke(),this.#s!==null&&br(this.#s,()=>{this.#s=null}),this.#x(()=>{this.#y()})},o=e=>{try{i=!0,t?.(e,a),i=!1}catch(e){Ot(e,this.#i&&this.#i.parent)}n&&(this.#s=this.#x(()=>{try{return V(()=>{var t=K;t.b=this,t.f|=128,n(this.#e,()=>e,()=>a)})}catch(e){return Ot(e,this.#i.parent),null}}))};Tt(()=>{var t;try{t=this.transform_error(e)}catch(e){Ot(e,this.#i&&this.#i.parent);return}typeof t==`object`&&t&&typeof t.then==`function`?t.then(o,e=>Ot(e,this.#i&&this.#i.parent)):o(t)})}};function Ht(e,t,n,r){let i=bt()?Kt:Xt;var a=e.filter(e=>!e.settled),o=t.map(i);if(n.length===0&&a.length===0){r(o);return}var s=K,c=Ut(),l=a.length===1?a[0].promise:a.length>1?Promise.all(a.map(e=>e.promise)):null;function u(e){if(!(s.f&16384)){c();try{r([...o,...e])}catch(e){Ot(e,s)}Wt()}}var d=Gt();if(n.length===0){l.then(()=>u([])).finally(d);return}function f(){Promise.all(n.map(e=>Jt(e))).then(u).catch(e=>Ot(e,s)).finally(d)}l?l.then(()=>{c(),f(),Wt()}):f()}function Ut(){var e=K,t=U,n=j,r=N;return function(i=!0){q(e),G(t),ft(n),i&&!(e.f&16384)&&(r?.activate(),r?.apply())}}function Wt(e=!0){q(null),G(null),ft(null),e&&N?.deactivate()}function Gt(){var e=K,t=e.b,n=N,r=!!t?.is_rendered();return t?.update_pending_count(1,n),n.increment(r,e),()=>{t?.update_pending_count(-1,n),n.decrement(r,e)}}function Kt(e){var t=2|w;return K!==null&&(K.f|=le),{ctx:j,deps:null,effects:null,equals:at,f:t,fn:e,reactions:null,rv:0,v:T,wv:0,parent:K,ac:null}}var qt=Symbol(`obsolete`);function Jt(e,t,n){let r=K;r===null&&Ae();var i=void 0,a=On(T),o=!U,s=new Set;return dr(()=>{var t=K,n=te();i=n.promise;try{Promise.resolve(e()).then(n.resolve,e=>{e!==Te&&n.reject(e)}).finally(Wt)}catch(e){n.reject(e),Wt()}var c=N;if(o){if(t.f&32768)var l=Gt();if(r.b?.is_rendered())c.async_deriveds.get(t)?.reject(qt);else for(let e of s.values())e.reject(qt);s.add(n),c.async_deriveds.set(t,n)}let u=(e,t=void 0)=>{l?.(),s.delete(n),t!==qt&&(c.activate(),t?(a.f|=he,jn(a,t)):(a.f&8388608&&(a.f^=he),jn(a,e)),c.deactivate())};n.promise.then(u,e=>u(null,e||`unknown`))}),ar(()=>{for(let e of s)e.reject(qt)}),new Promise(e=>{function t(n){function r(){n===i?e(a):t(i)}n.then(r,r)}t(i)})}function Yt(e){let t=Kt(e);return A||kr(t),t}function Xt(e){let t=Kt(e);return t.equals=st,t}function Zt(e){var t=e.effects;if(t!==null){e.effects=null;for(var n=0;n<t.length;n+=1)H(t[n])}}function Qt(e){var t,n=K,r=e.parent;if(!Dr&&r!==null&&e.v!==T&&r.f&24576)return Ye(),e.v;q(r);try{e.f&=~fe,Zt(e),t=Rr(e)}finally{q(n)}return t}function $t(e){var t=Qt(e);if(!e.equals(t)&&(e.wv=Fr(),(!N?.is_fork||e.deps===null)&&(N===null?e.v=t:(N.capture(e,t,!0),an?.capture(e,t,!0)),e.deps===null))){M(e,C);return}Dr||(P===null?At(e):(ir()||N?.is_fork)&&P.set(e,t))}function en(e){if(e.effects!==null)for(let t of e.effects)(t.teardown||t.ac)&&(t.teardown?.(),t.ac?.abort(Te),t.fn!==null&&(t.teardown=x),t.ac=null,Br(t,0),gr(t))}function tn(e){if(e.effects!==null)for(let t of e.effects)t.teardown&&t.fn!==null&&Vr(t)}var nn=null,rn=null,N=null,an=null,P=null,on=null,sn=!1,cn=!1,ln=null,un=null,dn=0,fn=1,pn=class e{id=fn++;#e=!1;linked=!0;#t=null;#n=null;async_deriveds=new Map;current=new Map;previous=new Map;#r=new Set;#i=new Set;#a=0;#o=new Map;#s=null;#c=[];#l=[];#u=new Set;#d=new Set;#f=new Map;#p=new Set;is_fork=!1;#m=!1;constructor(){rn===null?nn=rn=this:(rn.#n=this,this.#t=rn),rn=this}#h(){if(this.is_fork)return!0;for(let n of this.#o.keys()){for(var e=n,t=!1;e.parent!==null;){if(this.#f.has(e)){t=!0;break}e=e.parent}if(!t)return!0}return!1}skip_effect(e){this.#f.has(e)||this.#f.set(e,{d:[],m:[]}),this.#p.delete(e)}unskip_effect(e,t=e=>this.schedule(e)){var n=this.#f.get(e);if(n){this.#f.delete(e);for(var r of n.d)M(r,w),t(r);for(r of n.m)M(r,re),t(r)}this.#p.add(e)}#g(){this.#e=!0,dn++>1e3&&(this.#S(),hn());for(let e of this.#u)this.#d.delete(e),M(e,w),this.schedule(e);for(let e of this.#d)M(e,re),this.schedule(e);let t=this.#c;this.#c=[],this.apply();var n=ln=[],r=[],i=un=[];for(let e of t)try{this.#_(e,n,r)}catch(t){throw Sn(e),this.#h()||this.discard(),t}if(N=null,i.length>0){var a=e.ensure();for(let e of i)a.schedule(e)}if(ln=null,un=null,this.#h()){this.#b(r),this.#b(n);for(let[e,t]of this.#f)xn(e,t);i.length>0&&N.#g();return}let o=this.#v();if(o){this.#b(r),this.#b(n),o.#y(this);return}this.#u.clear(),this.#d.clear();for(let e of this.#r)e(this);this.#r.clear(),an=this,gn(r),gn(n),an=null,this.#s?.resolve();var s=N;if(this.#a===0&&(this.#c.length===0||s!==null)&&(this.#S(),A&&(this.#x(),N=s)),this.#c.length>0)if(s!==null){let e=s;e.#c.push(...this.#c.filter(t=>!e.#c.includes(t)))}else s=this;s!==null&&s.#g()}#_(e,t,n){e.f^=C;for(var r=e.first;r!==null;){var i=r.f,a=(i&96)!=0;if(!(a&&i&1024||i&8192||this.#f.has(r))&&r.fn!==null){a?r.f^=C:i&4?t.push(r):A&&i&16777224?n.push(r):Ir(r)&&(i&16&&this.#d.add(r),Vr(r));var o=r.first;if(o!==null){r=o;continue}}for(;r!==null;){var s=r.next;if(s!==null){r=s;break}r=r.parent}}}#v(){for(var e=this.#t;e!==null;){if(!e.is_fork){for(let[t,[,n]]of this.current)if(e.current.has(t)&&!n)return e}e=e.#t}return null}#y(e){for(let[t,n]of e.current)!this.previous.has(t)&&e.previous.has(t)&&this.previous.set(t,e.previous.get(t)),this.current.set(t,n);for(let[t,n]of e.async_deriveds){let e=this.async_deriveds.get(t);e&&n.promise.then(e.resolve).catch(e.reject)}e.async_deriveds.clear(),this.transfer_effects(e.#u,e.#d);let t=e=>{var n=e.reactions;if(n!==null)for(let e of n){var r=e.f;if(r&2)t(e);else{var i=e;r&4194320&&!this.async_deriveds.has(i)&&(this.#d.delete(i),M(i,w),this.schedule(i))}}};for(let e of this.current.keys())t(e);this.oncommit(()=>e.discard()),e.#S(),N=this,this.#g()}#b(e){for(var t=0;t<e.length;t+=1)Mt(e[t],this.#u,this.#d)}capture(e,t,n=!1){e.v!==T&&!this.previous.has(e)&&this.previous.set(e,e.v),e.f&8388608||(this.current.set(e,[t,n]),P?.set(e,t)),this.is_fork||(e.v=t)}activate(){N=this}deactivate(){N=null,P=null}flush(){try{cn=!0,N=this,this.#g()}finally{dn=0,on=null,ln=null,un=null,cn=!1,N=null,P=null,Tn.clear()}}discard(){for(let e of this.#i)e(this);this.#i.clear();for(let e of this.async_deriveds.values())e.reject(qt);this.#S(),this.#s?.resolve()}register_created_effect(e){this.#l.push(e)}#x(){for(let u=nn;u!==null;u=u.#n){var e=u.id<this.id,t=[];for(let[r,[i,a]]of this.current){if(u.current.has(r)){var n=u.current.get(r)[0];if(e&&i!==n)u.current.set(r,[i,a]);else continue}t.push(r)}if(e)for(let[e,t]of this.async_deriveds){let n=u.async_deriveds.get(e);n&&t.promise.then(n.resolve).catch(n.reject)}var r=[...u.current.keys()].filter(e=>!u.current.get(e)[1]);if(!(!u.#e||r.length===0)){var i=r.filter(e=>!this.current.has(e));if(i.length===0)e&&u.discard();else if(t.length>0){if(e)for(let e of this.#p)u.unskip_effect(e,e=>{e.f&4194320?u.schedule(e):u.#b([e])});u.activate();var a=new Set,o=new Map;for(var s of t)_n(s,i,a,o);o=new Map;var c=[...u.current].filter(([e,t])=>{let n=this.current.get(e);return n?n[0]!==t[0]||n[1]!==t[1]:!0}).map(([e])=>e);if(c.length>0)for(let e of this.#l)!(e.f&155648)&&yn(e,c,o)&&(e.f&4194320?(M(e,w),u.schedule(e)):u.#u.add(e));if(u.#c.length>0&&!u.#m){u.apply();for(var l of u.#c)u.#_(l,[],[]);u.#c=[]}u.deactivate()}}}}increment(e,t){if(this.#a+=1,e){let e=this.#o.get(t)??0;this.#o.set(t,e+1)}}decrement(e,t){if(--this.#a,e){let e=this.#o.get(t)??0;e===1?this.#o.delete(t):this.#o.set(t,e-1)}this.#m||(this.#m=!0,Tt(()=>{this.#m=!1,this.linked&&this.flush()}))}transfer_effects(e,t){for(let t of e)this.#u.add(t);for(let e of t)this.#d.add(e);e.clear(),t.clear()}oncommit(e){this.#r.add(e)}ondiscard(e){this.#i.add(e)}settled(){return(this.#s??=te()).promise}static ensure(){if(N===null){let t=N=new e;!cn&&!sn&&Tt(()=>{t.#e||t.flush()})}return N}apply(){if(!A||!this.is_fork&&this.#t===null&&this.#n===null){P=null;return}P=new Map;for(let[e,[t]]of this.current)P.set(e,t);for(let t=nn;t!==null;t=t.#n)if(!(t===this||t.is_fork)){var e=!1;if(t.id<this.id){for(let[n,[,r]]of t.current)if(!r&&this.current.has(n)){e=!0;break}}if(!e)for(let[e,n]of t.previous)P.has(e)||P.set(e,n)}}schedule(e){if(on=e,e.b?.is_pending&&e.f&16777228&&!(e.f&32768)){e.b.defer_effect(e);return}for(var t=e;t.parent!==null;){t=t.parent;var n=t.f;if(ln!==null&&t===K&&(A||(U===null||!(U.f&2))&&!Ft))return;if(n&96){if(!(n&1024))return;t.f^=C}}this.#c.push(t)}#S(){if(this.linked){var e=this.#t,t=this.#n;e===null?nn=t:e.#n=t,t===null?rn=e:t.#t=e,this.linked=!1}}};function mn(e){var t=sn;sn=!0;try{var n;for(e&&(N!==null&&!N.is_fork&&N.flush(),n=e());;){if(Et(),N===null)return n;N.flush()}}finally{sn=t}}function hn(){try{Fe()}catch(e){Ot(e,on)}}var F=null;function gn(e){var t=e.length;if(t!==0){for(var n=0;n<t;){var r=e[n++];if(!(r.f&24576)&&Ir(r)&&(F=new Set,Vr(r),r.deps===null&&r.first===null&&r.nodes===null&&r.teardown===null&&r.ac===null&&yr(r),F?.size>0)){Tn.clear();for(let e of F){if(e.f&24576)continue;let t=[e],n=e.parent;for(;n!==null;)F.has(n)&&(F.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){let n=t[e];n.f&24576||Vr(n)}}F.clear()}}F=null}}function _n(e,t,n,r){if(!n.has(e)&&(n.add(e),e.reactions!==null))for(let i of e.reactions){let e=i.f;e&2?_n(i,t,n,r):e&4194320&&!(e&2048)&&yn(i,t,r)&&(M(i,w),bn(i))}}function vn(e,t){if(e.reactions!==null)for(let n of e.reactions){let e=n.f;e&2?vn(n,t):e&131072&&(M(n,w),t.add(n))}}function yn(e,t,n){let r=n.get(e);if(r!==void 0)return r;if(e.deps!==null)for(let r of e.deps){if(f.call(t,r))return!0;if(r.f&2&&yn(r,t,n))return n.set(r,!0),!0}return n.set(e,!1),!1}function bn(e){N.schedule(e)}function xn(e,t){if(!(e.f&32&&e.f&1024)){e.f&2048?t.d.push(e):e.f&4096&&t.m.push(e),M(e,C);for(var n=e.first;n!==null;)xn(n,t),n=n.next}}function Sn(e){M(e,C);for(var t=e.first;t!==null;)Sn(t),t=t.next}function Cn(e){A||De(`fork`),N!==null&&Le();var t=pn.ensure();t.is_fork=!0,P=new Map;var n=!1,r=t.settled();return mn(e),{commit:async()=>{if(n){await r;return}t.linked||Ie(),n=!0,t.is_fork=!1;for(var[e,[i]]of t.current)e.v=i,e.wv=Fr();mn(()=>{var e=new Set;for(var n of t.current.keys())vn(n,e);En(e),Mn()}),t.flush(),await r},discard:()=>{for(var e of t.current.keys())e.wv=Fr();!n&&t.linked&&t.discard()}}}var wn=new Set,Tn=new Map;function En(e){wn=e}var Dn=!1;function On(e,t){return{f:0,v:e,reactions:null,equals:at,rv:0,wv:0}}function kn(e,t){let n=On(e,t);return kr(n),n}function An(e,t=!1,n=!0){let r=On(e);return t||(r.equals=st),ct&&n&&j!==null&&j.l!==null&&(j.l.s??=[]).push(r),r}function I(e,t,n=!1){return U!==null&&(!W||U.f&131072)&&bt()&&U.f&4325394&&(J===null||!J.has(e))&&Ge(),jn(e,n?Fn(t):t,un)}function jn(e,t,n=null){if(!e.equals(t)){Tn.set(e,Dr?t:e.v);var r=pn.ensure();if(r.capture(e,t),e.f&2){let t=e;e.f&2048&&Qt(t),P===null&&At(t)}e.wv=Fr(),Pn(e,w,n),bt()&&K!==null&&K.f&1024&&!(K.f&96)&&(Z===null?Ar([e]):Z.push(e)),!r.is_fork&&wn.size>0&&!Dn&&Mn()}return t}function Mn(){Dn=!1;for(let e of wn){e.f&1024&&M(e,re);let t;try{t=Ir(e)}catch{t=!0}t&&Vr(e)}wn.clear()}function Nn(e){I(e,e.v+1)}function Pn(e,t,n){var r=e.reactions;if(r!==null)for(var i=bt(),a=r.length,o=0;o<a;o++){var s=r[o],c=s.f;if(!(!i&&s===K)){var l=(c&w)===0;if(l&&M(s,t),c&131072)wn.add(s);else if(c&2){var u=s;P?.delete(u),c&65536||(c&512&&(K===null||!(K.f&2097152))&&(s.f|=fe),Pn(u,re,n))}else if(l){var d=s;c&16&&F!==null&&F.add(d),n===null?bn(d):n.push(d)}}}}function Fn(e){if(typeof e!=`object`||!e||ge in e)return e;let t=y(e);if(t!==_&&t!==v)return e;var n=new Map,r=u(e),i=kn(0),a=null,o=Nr,s=e=>{if(Nr===o)return e();var t=U,n=Nr;G(null),Pr(o);var r=e();return G(t),Pr(n),r};return r&&n.set(`length`,kn(e.length,a)),new Proxy(e,{defineProperty(e,t,r){(!(`value`in r)||r.configurable===!1||r.enumerable===!1||r.writable===!1)&&Ue();var i=n.get(t);return i===void 0?s(()=>{var e=kn(r.value,a);return n.set(t,e),e}):I(i,r.value,!0),!0},deleteProperty(e,t){var r=n.get(t);if(r===void 0){if(t in e){let e=s(()=>kn(T,a));n.set(t,e),Nn(i)}}else I(r,T),Nn(i);return!0},get(t,r,i){if(r===ge)return e;var o=n.get(r),c=r in t;if(o===void 0&&(!c||h(t,r)?.writable)&&(o=s(()=>kn(Fn(c?t[r]:T),a)),n.set(r,o)),o!==void 0){var l=Q(o);return l===T?void 0:l}return Reflect.get(t,r,i)},getOwnPropertyDescriptor(e,t){var r=Reflect.getOwnPropertyDescriptor(e,t);if(r&&`value`in r){var i=n.get(t);i&&(r.value=Q(i))}else if(r===void 0){var a=n.get(t),o=a?.v;if(a!==void 0&&o!==T)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return r},has(e,t){if(t===ge)return!0;var r=n.get(t),i=r!==void 0&&r.v!==T||Reflect.has(e,t);return(r!==void 0||K!==null&&(!i||h(e,t)?.writable))&&(r===void 0&&(r=s(()=>kn(i?Fn(e[t]):T,a)),n.set(t,r)),Q(r)===T)?!1:i},set(e,t,o,c){var l=n.get(t),u=t in e;if(r&&t===`length`)for(var d=o;d<l.v;d+=1){var f=n.get(d+``);f===void 0?d in e&&(f=s(()=>kn(T,a)),n.set(d+``,f)):I(f,T)}if(l===void 0)(!u||h(e,t)?.writable)&&(l=s(()=>kn(void 0,a)),I(l,Fn(o)),n.set(t,l));else{u=l.v!==T;var p=s(()=>Fn(o));I(l,p)}var m=Reflect.getOwnPropertyDescriptor(e,t);if(m?.set&&m.set.call(c,o),!u){if(r&&typeof t==`string`){var g=n.get(`length`),_=Number(t);Number.isInteger(_)&&_>=g.v&&I(g,_+1)}Nn(i)}return!0},ownKeys(e){Q(i);var t=Reflect.ownKeys(e).filter(e=>{var t=n.get(e);return t===void 0||t.v!==T});for(var[r,a]of n)a.v!==T&&!(r in e)&&t.push(r);return t},setPrototypeOf(){We()}})}function In(e){try{if(typeof e==`object`&&e&&ge in e)return e[ge]}catch{}return e}function Ln(e,t){return Object.is(In(e),In(t))}new Set([`copyWithin`,`fill`,`pop`,`push`,`reverse`,`shift`,`sort`,`splice`,`unshift`]);var Rn,zn,Bn,Vn;function Hn(){if(Rn===void 0){Rn=window,zn=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Bn=h(t,`firstChild`).get,Vn=h(t,`nextSibling`).get,b(e)&&(e[xe]=void 0,e[be]=null,e[Se]=void 0,e.__e=void 0),b(n)&&(n[Ce]=void 0)}}function L(e=``){return document.createTextNode(e)}function R(e){return Bn.call(e)}function z(e){return Vn.call(e)}function Un(e,t){if(!E)return R(e);var n=R(O);if(n===null)n=O.appendChild(L());else if(t&&n.nodeType!==3){var r=L();return n?.before(r),k(r),r}return t&&Yn(n),k(n),n}function Wn(e,t=!1){if(!E){var n=R(e);return n instanceof Comment&&n.data===``?z(n):n}if(t){if(O?.nodeType!==3){var r=L();return O?.before(r),k(r),r}Yn(O)}return O}function Gn(e,t=1,n=!1){let r=E?O:e;for(var i;t--;)i=r,r=z(r);if(!E)return r;if(n){if(r?.nodeType!==3){var a=L();return r===null?i?.after(a):r.before(a),k(a),a}Yn(r)}return k(r),r}function Kn(e){e.textContent=``}function qn(){return!A||F!==null?!1:(K.f&oe)!==0}function Jn(e,t,n){return t==null||t===`http://www.w3.org/1999/xhtml`?n?document.createElement(e,{is:n}):document.createElement(e):n?document.createElementNS(t,e,{is:n}):document.createElementNS(t,e)}function Yn(e){if(e.nodeValue.length<65536)return;let t=e.nextSibling;for(;t!==null&&t.nodeType===3;)t.remove(),e.nodeValue+=t.nodeValue,t=e.nextSibling}function Xn(e){E&&R(e)!==null&&Kn(e)}var Zn=!1;function Qn(){Zn||(Zn=!0,document.addEventListener(`reset`,e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(let t of e.target.elements)t[we]?.()})},{capture:!0}))}function $n(e,t,n,r=!0){r&&n();for(var i of t)e.addEventListener(i,n);ar(()=>{for(var r of t)e.removeEventListener(r,n)})}function er(e){var t=U,n=K;G(null),q(null);try{return e()}finally{G(t),q(n)}}function tr(e,t,n,r=n){e.addEventListener(t,()=>er(n));let i=e[we];i?e[we]=()=>{i(),r(!0)}:e[we]=()=>r(!0),Qn()}function nr(e){K===null&&(U===null&&Pe(e),Ne()),Dr&&Me(e)}function rr(e,t){var n=t.last;n===null?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}function B(e,t){var n=K;n!==null&&n.f&8192&&(e|=ie);var r={ctx:j,deps:null,nodes:null,f:e|w|512,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};N?.register_created_effect(r);var i=r;if(e&4)ln===null?pn.ensure().schedule(r):ln.push(r);else if(t!==null){try{Vr(r)}catch(e){throw H(r),e}i.deps===null&&i.teardown===null&&i.nodes===null&&i.first===i.last&&!(i.f&524288)&&(i=i.first,e&16&&e&65536&&i!==null&&(i.f|=ce))}if(i!==null&&(i.parent=n,n!==null&&rr(i,n),U!==null&&U.f&2&&!(e&64))){var a=U;(a.effects??=[]).push(i)}return r}function ir(){return U!==null&&!W}function ar(e){let t=B(8,null);return M(t,C),t.teardown=e,t}function or(e){nr(`$effect`);var t=K.f;if(!U&&t&32&&j!==null&&!j.i){var n=j;(n.e??=[]).push(e)}else return sr(e)}function sr(e){return B(4|ue,e)}function cr(e){return nr(`$effect.pre`),B(8|ue,e)}function lr(e){pn.ensure();let t=B(64|le,e);return(e={})=>new Promise(n=>{e.outro?br(t,()=>{H(t),n(void 0)}):(H(t),n(void 0))})}function ur(e){return B(4,e)}function dr(e){return B(me|le,e)}function fr(e,t=0){return B(8|t,e)}function pr(e,t=[],n=[],r=[]){Ht(r,t,n,t=>{B(8,()=>{e(...t.map(Q))})})}function mr(e,t=0){return B(16|t,e)}function V(e){return B(32|le,e)}function hr(e){var t=e.teardown;if(t!==null){let e=Dr,n=U;Or(!0),G(null);try{t.call(null)}finally{Or(e),G(n)}}}function gr(e,t=!1){var n=e.first;for(e.first=e.last=null;n!==null;){let e=n.ac;e!==null&&er(()=>{e.abort(Te)});var r=n.next;n.f&64?n.parent=null:H(n,t),n=r}}function _r(e){for(var t=e.first;t!==null;){var n=t.next;t.f&32||H(t),t=n}}function H(e,t=!0){var n=!1;(t||e.f&262144)&&e.nodes!==null&&e.nodes.end!==null&&(vr(e.nodes.start,e.nodes.end),n=!0),e.f|=se,gr(e,t&&!n),Br(e,0);var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)e.stop();hr(e),e.f^=se,e.f|=ae;var i=e.parent;i!==null&&i.first!==null&&yr(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=e.b=null}function vr(e,t){for(;e!==null;){var n=e===t?null:z(e);e.remove(),e=n}}function yr(e){var t=e.parent,n=e.prev,r=e.next;n!==null&&(n.next=r),r!==null&&(r.prev=n),t!==null&&(t.first===e&&(t.first=r),t.last===e&&(t.last=n))}function br(e,t,n=!0){var r=[];xr(e,r,!0);var i=()=>{n&&H(e),t&&t()},a=r.length;if(a>0){var o=()=>--a||i();for(var s of r)s.out(o)}else i()}function xr(e,t,n){if(!(e.f&8192)){e.f^=ie;var r=e.nodes&&e.nodes.t;if(r!==null)for(let e of r)(e.is_global||n)&&t.push(e);for(var i=e.first;i!==null;){var a=i.next;if(!(i.f&64)){var o=(i.f&65536)!=0||(i.f&32)!=0&&(e.f&16)!=0;xr(i,t,o?n:!1)}i=a}}}function Sr(e){Cr(e,!0)}function Cr(e,t){if(e.f&8192){e.f^=ie,e.f&1024||(M(e,w),pn.ensure().schedule(e));for(var n=e.first;n!==null;){var r=n.next,i=(n.f&65536)!=0||(n.f&32)!=0;Cr(n,i?t:!1),n=r}var a=e.nodes&&e.nodes.t;if(a!==null)for(let e of a)(e.is_global||t)&&e.in()}}function wr(e,t){if(e.nodes)for(var n=e.nodes.start,r=e.nodes.end;n!==null;){var i=n===r?null:z(n);t.append(n),n=i}}var Tr=null,Er=!1,Dr=!1;function Or(e){Dr=e}var U=null,W=!1;function G(e){U=e}var K=null;function q(e){K=e}var J=null;function kr(e){U!==null&&(!A||U.f&2)&&(J??=new Set).add(e)}var Y=null,X=0,Z=null;function Ar(e){Z=e}var jr=1,Mr=0,Nr=Mr;function Pr(e){Nr=e}function Fr(){return++jr}function Ir(e){var t=e.f;if(t&2048)return!0;if(t&2&&(e.f&=~fe),t&4096){for(var n=e.deps,r=n.length,i=0;i<r;i++){var a=n[i];if(Ir(a)&&$t(a),a.wv>e.wv)return!0}t&512&&P===null&&M(e,C)}return!1}function Lr(e,t,n=!0){var r=e.reactions;if(r!==null&&!(!A&&J!==null&&J.has(e)))for(var i=0;i<r.length;i++){var a=r[i];a.f&2?Lr(a,t,!1):t===a&&(n?M(a,w):a.f&1024&&M(a,re),bn(a))}}function Rr(e){var t=Y,n=X,r=Z,i=U,a=J,o=j,s=W,c=Nr,l=e.f;Y=null,X=0,Z=null,U=l&96?null:e,J=null,ft(e.ctx),W=!1,Nr=++Mr,e.ac!==null&&(er(()=>{e.ac.abort(Te)}),e.ac=null);try{e.f|=pe;var u=e.fn,d=u();e.f|=oe;var f=e.deps,p=N?.is_fork;if(Y!==null){var m;if(p||Br(e,X),f!==null&&X>0)for(f.length=X+Y.length,m=0;m<Y.length;m++)f[X+m]=Y[m];else e.deps=f=Y;if(ir()&&e.f&512)for(m=X;m<f.length;m++)(f[m].reactions??=[]).push(e)}else !p&&f!==null&&X<f.length&&(Br(e,X),f.length=X);if(bt()&&Z!==null&&!W&&f!==null&&!(e.f&6146))for(m=0;m<Z.length;m++)Lr(Z[m],e);if(i!==null&&i!==e){if(Mr++,i.deps!==null)for(let e=0;e<n;e+=1)i.deps[e].rv=Mr;if(t!==null)for(let e of t)e.rv=Mr;Z!==null&&(r===null?r=Z:r.push(...Z))}return e.f&8388608&&(e.f^=he),d}catch(e){return Dt(e)}finally{e.f^=pe,Y=t,X=n,Z=r,U=i,J=a,ft(o),W=s,Nr=c}}function zr(e,t){let n=t.reactions;if(n!==null){var r=d.call(n,e);if(r!==-1){var i=n.length-1;i===0?n=t.reactions=null:(n[r]=n[i],n.pop())}}if(n===null&&t.f&2&&(Y===null||!f.call(Y,t))){var a=t;a.f&512&&(a.f^=512,a.f&=~fe),a.v!==T&&At(a),en(a),Br(a,0)}}function Br(e,t){var n=e.deps;if(n!==null)for(var r=t;r<n.length;r++)zr(e,n[r])}function Vr(e){var t=e.f;if(!(t&16384)){M(e,C);var n=K,r=Er;K=e,Er=!0;try{t&16777232?_r(e):gr(e),hr(e);var i=Rr(e);e.teardown=typeof i==`function`?i:null,e.wv=jr}finally{Er=r,K=n}}}async function Hr(){if(A)return new Promise(e=>{requestAnimationFrame(()=>e()),setTimeout(()=>e())});await Promise.resolve(),mn()}function Ur(){return pn.ensure().settled()}function Q(e){var t=(e.f&2)!=0;if(Tr?.add(e),U!==null&&!W&&!(K!==null&&K.f&16384)&&(J===null||!J.has(e))){var n=U.deps;if(U.f&2097152)e.rv<Mr&&(e.rv=Mr,Y===null&&n!==null&&n[X]===e?X++:Y===null?Y=[e]:Y.push(e));else{U.deps??=[],f.call(U.deps,e)||U.deps.push(e);var r=e.reactions;r===null?e.reactions=[U]:f.call(r,U)||r.push(U)}}if(Dr&&Tn.has(e))return Tn.get(e);if(t){var i=e;if(Dr){var a=i.v;return(!(i.f&1024)&&i.reactions!==null||Gr(i))&&(a=Qt(i)),Tn.set(i,a),a}var o=(i.f&512)==0&&!W&&U!==null&&(Er||(U.f&512)!=0),s=(i.f&oe)===0;Ir(i)&&(o&&(i.f|=512),$t(i)),o&&!s&&(tn(i),Wr(i))}if(P?.has(e))return P.get(e);if(e.f&8388608)throw e.v;return e.v}function Wr(e){if(e.f|=512,e.deps!==null)for(let t of e.deps)(t.reactions??=[]).push(e),t.f&2&&!(t.f&512)&&(tn(t),Wr(t))}function Gr(e){if(e.v===T)return!0;if(e.deps===null)return!1;for(let t of e.deps)if(Tn.has(t)||t.f&2&&Gr(t))return!0;return!1}function $(e){var t=W;try{return W=!0,e()}finally{W=t}}function Kr(e){if(!(typeof e!=`object`||!e||e instanceof EventTarget)){if(ge in e)qr(e);else if(!Array.isArray(e))for(let t in e){let n=e[t];typeof n==`object`&&n&&ge in n&&qr(n)}}}function qr(e,t=new Set){if(typeof e==`object`&&e&&!(e instanceof EventTarget)&&!t.has(e)){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{qr(e[n],t)}catch{}let n=y(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){let t=g(n);for(let n in t){let r=t[n].get;if(r)try{r.call(e)}catch{}}}}}[...`allowfullscreen.async.autofocus.autoplay.checked.controls.default.disabled.formnovalidate.indeterminate.inert.ismap.loop.multiple.muted.nomodule.novalidate.open.playsinline.readonly.required.reversed.seamless.selected.webkitdirectory.defer.disablepictureinpicture.disableremoteplayback`.split(`.`)];var Jr=[`touchstart`,`touchmove`];function Yr(e){return Jr.includes(e)}var Xr=Symbol(`events`),Zr=new Set,Qr=new Set;function $r(e,t,n,r={}){function i(e){if(r.capture||ii.call(t,e),!e.cancelBubble)return er(()=>n?.call(this,e))}return e.startsWith(`pointer`)||e.startsWith(`touch`)||e===`wheel`?Tt(()=>{t.addEventListener(e,i,r)}):t.addEventListener(e,i,r),i}function ei(e,t,n,r,i){var a={capture:r,passive:i},o=$r(e,t,n,a);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&ar(()=>{t.removeEventListener(e,o,a)})}function ti(e,t,n){(t[Xr]??={})[e]=n}function ni(e){for(var t=0;t<e.length;t++)Zr.add(e[t]);for(var n of Qr)n(e)}var ri=null;function ii(e){var t=this,n=t.ownerDocument,r=e.type,i=e.composedPath?.()||[],a=i[0]||e.target;ri=e;var o=0,s=ri===e&&e[Xr];if(s){var c=i.indexOf(s);if(c!==-1&&(t===document||t===window)){e[Xr]=t;return}var l=i.indexOf(t);if(l===-1)return;c<=l&&(o=c)}if(a=i[o]||e.target,a!==t){m(e,`currentTarget`,{configurable:!0,get(){return a||n}});var u=U,d=K;G(null),q(null);try{for(var f,p=[];a!==null&&a!==t;){try{var h=a[Xr]?.[r];h!=null&&(!a.disabled||e.target===a)&&h.call(a,e)}catch(e){f?p.push(e):f=e}if(e.cancelBubble)break;o++,a=o<i.length?i[o]:null}if(f){for(let e of p)queueMicrotask(()=>{throw e});throw f}}finally{e[Xr]=t,delete e.currentTarget,G(u),q(d)}}}var ai=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy(`svelte-trusted-html`,{createHTML:e=>e});function oi(e){return ai?.createHTML(e)??e}function si(e){var t=Jn(`template`);return t.innerHTML=oi(e.replaceAll(`<!>`,`<!---->`)),t.content}function ci(e,t){var n=K;n.nodes===null&&(n.nodes={start:e,end:t,a:null,t:null})}function li(e,t){var n=(t&1)!=0,r=(t&2)!=0,i,a=!e.startsWith(`<!>`);return()=>{if(E)return ci(O,null),O;i===void 0&&(i=si(a?e:`<!>`+e),n||(i=R(i)));var t=r||zn?document.importNode(i,!0):i.cloneNode(!0);if(n){var o=R(t),s=t.lastChild;ci(o,s)}else ci(t,t);return t}}function ui(e=``){if(!E){var t=L(e+``);return ci(t,t),t}var n=O;return n.nodeType===3?Yn(n):(n.before(n=L()),k(n)),ci(n,n),n}function di(){if(E)return ci(O,null),O;var e=document.createDocumentFragment(),t=document.createComment(``),n=L();return e.append(t,n),ci(t,n),e}function fi(e,t){if(E){var n=K;(!(n.f&32768)||n.nodes.end===null)&&(n.nodes.end=O),et();return}e!==null&&e.before(t)}function pi(e,t){var n=t==null?``:typeof t==`object`?`${t}`:t;n!==(e[Ce]??=e.nodeValue)&&(e[Ce]=n,e.nodeValue=`${n}`)}function mi(e,t){return _i(e,t)}function hi(e,t){Hn(),t.intro=t.intro??!1;let n=t.target,r=E,i=O;try{for(var a=R(n);a&&(a.nodeType!==8||a.data!==`[`);)a=z(a);if(!a)throw qe;D(!0),k(a);let r=_i(e,{...t,anchor:a});return D(!1),r}catch(r){if(r instanceof Error&&r.message.split(`
|
|
2
|
+
`).some(e=>e.startsWith(`https://svelte.dev/e/`)))throw r;return r!==qe&&console.warn(`Failed to hydrate: `,r),t.recover===!1&&ze(),Hn(),Kn(n),D(!1),mi(e,t)}finally{D(r),k(i)}}var gi=new Map;function _i(e,{target:t,anchor:n,props:r={},events:i,context:a,intro:o=!0,transformError:s}){Hn();var c=void 0,l=lr(()=>{var o=n??t.appendChild(L());Bt(o,{pending:()=>{}},t=>{vt({});var n=j;if(a&&(n.c=a),i&&(r.$$events=i),E&&ci(t,null),c=e(t,r)||{},E&&(K.nodes.end=O,O===null||O.nodeType!==8||O.data!==`]`))throw Ze(),qe;yt()},s);var l=new Set,u=e=>{for(var n=0;n<e.length;n++){var r=e[n];if(!l.has(r)){l.add(r);var i=Yr(r);for(let e of[t,document]){var a=gi.get(e);a===void 0&&(a=new Map,gi.set(e,a));var o=a.get(r);o===void 0?(e.addEventListener(r,ii,{passive:i}),a.set(r,1)):a.set(r,o+1)}}}};return u(p(Zr)),Qr.add(u),()=>{for(var e of l)for(let n of[t,document]){var r=gi.get(n),i=r.get(e);--i==0?(n.removeEventListener(e,ii),r.delete(e),r.size===0&&gi.delete(n)):r.set(e,i)}Qr.delete(u),o!==n&&o.parentNode?.removeChild(o)}});return vi.set(c,l),c}var vi=new WeakMap;function yi(e,t){let n=vi.get(e);return n?(vi.delete(e),n(t)):Promise.resolve()}var bi=class{anchor;#e=new Map;#t=new Map;#n=new Map;#r=new Set;#i=!0;constructor(e,t=!0){this.anchor=e,this.#i=t}#a=e=>{if(this.#e.has(e)){var t=this.#e.get(e),n=this.#t.get(t);if(n)Sr(n),this.#r.delete(t);else{var r=this.#n.get(t);r&&(Sr(r.effect),this.#t.set(t,r.effect),this.#n.delete(t),r.fragment.lastChild.remove(),this.anchor.before(r.fragment),n=r.effect)}for(let[t,n]of this.#e){if(this.#e.delete(t),t===e)break;let r=this.#n.get(n);r&&(H(r.effect),this.#n.delete(n))}for(let[e,r]of this.#t){if(e===t||this.#r.has(e))continue;let i=()=>{if(Array.from(this.#e.values()).includes(e)){var t=document.createDocumentFragment();wr(r,t),t.append(L()),this.#n.set(e,{effect:r,fragment:t})}else H(r);this.#r.delete(e),this.#t.delete(e)};this.#i||!n?(this.#r.add(e),br(r,i,!1)):i()}}};#o=e=>{this.#e.delete(e);let t=Array.from(this.#e.values());for(let[e,n]of this.#n)t.includes(e)||(H(n.effect),this.#n.delete(e))};ensure(e,t){var n=N,r=qn();if(t&&!this.#t.has(e)&&!this.#n.has(e))if(r){var i=document.createDocumentFragment(),a=L();i.append(a),this.#n.set(e,{effect:V(()=>t(a)),fragment:i})}else this.#t.set(e,V(()=>t(this.anchor)));if(this.#e.set(n,e),r){for(let[t,r]of this.#t)t===e?n.unskip_effect(r):n.skip_effect(r);for(let[t,r]of this.#n)t===e?n.unskip_effect(r.effect):n.skip_effect(r.effect);n.oncommit(this.#a),n.ondiscard(this.#o)}else E&&(this.anchor=O),this.#a(n)}};function xi(e,t,n=!1){var r;E&&(r=O,et());var i=new bi(e),a=n?ce:0;function o(e,t){if(E){var n=it(r);if(e!==parseInt(n.substring(1))){var a=rt();k(a),i.anchor=a,D(!1),i.ensure(e,t),D(!0);return}}i.ensure(e,t)}mr(()=>{var e=!1;t((t,n=0)=>{e=!0,o(n,t)}),e||o(-1,null)},a)}function Si(e,t,n){for(var r=[],i=t.length,a,o=t.length,s=0;s<i;s++){let n=t[s];br(n,()=>{if(a){if(a.pending.delete(n),a.done.add(n),a.pending.size===0){var t=e.outrogroups;Ci(e,p(a.done)),t.delete(a),t.size===0&&(e.outrogroups=null)}}else --o},!1)}if(o===0){var c=r.length===0&&n!==null;if(c){var l=n,u=l.parentNode;Kn(u),u.append(l),e.items.clear()}Ci(e,t,!c)}else a={pending:new Set(t),done:new Set},(e.outrogroups??=new Set).add(a)}function Ci(e,t,n=!0){var r;if(e.pending.size>0){r=new Set;for(let t of e.pending.values())for(let n of t)r.add(e.items.get(n).e)}for(var i=0;i<t.length;i++){var a=t[i];r?.has(a)?(a.f|=de,wr(a,document.createDocumentFragment())):H(t[i],n)}}var wi;function Ti(e,t,n,r,i,a=null){var o=e,s=new Map;if(t&4){var c=e;o=E?k(R(c)):c.appendChild(L())}E&&et();var l=null,d=Xt(()=>{var e=n();return u(e)?e:e==null?[]:p(e)}),f,m=new Map,h=!0;function g(e){v.effect.f&16384||(v.pending.delete(e),v.fallback=l,Di(v,f,o,t,r),l!==null&&(f.length===0?l.f&33554432?(l.f^=de,ki(l,null,o)):Sr(l):br(l,()=>{l=null})))}function _(e){v.pending.delete(e)}var v={effect:mr(()=>{f=Q(d);var e=f.length;let c=!1;E&&it(o)===`[!`!=(e===0)&&(o=rt(),k(o),D(!1),c=!0);for(var u=new Set,p=N,v=qn(),y=0;y<e;y+=1){E&&O.nodeType===8&&O.data===`]`&&(o=O,c=!0,D(!1));var b=f[y],x=r(b,y),S=h?null:s.get(x);S?(S.v&&jn(S.v,b),S.i&&jn(S.i,y),v&&p.unskip_effect(S.e)):(S=Oi(s,h?o:wi??=L(),b,x,y,i,t,n),h||(S.e.f|=de),s.set(x,S)),u.add(x)}if(e===0&&a&&!l&&(h?l=V(()=>a(o)):(l=V(()=>a(wi??=L())),l.f|=de)),e>u.size&&je(``,``,``),E&&e>0&&k(rt()),!h)if(m.set(p,u),v){for(let[e,t]of s)u.has(e)||p.skip_effect(t.e);p.oncommit(g),p.ondiscard(_)}else g(p);c&&D(!0),Q(d)}),flags:t,items:s,pending:m,outrogroups:null,fallback:l};h=!1,E&&(o=O)}function Ei(e){for(;e!==null&&!(e.f&32);)e=e.next;return e}function Di(e,t,n,r,i){var a=(r&8)!=0,o=t.length,s=e.items,c=Ei(e.effect.first),l,u=null,d,f=[],m=[],h,g,_,v;if(a)for(v=0;v<o;v+=1)h=t[v],g=i(h,v),_=s.get(g).e,_.f&33554432||(_.nodes?.a?.measure(),(d??=new Set).add(_));for(v=0;v<o;v+=1){if(h=t[v],g=i(h,v),_=s.get(g).e,e.outrogroups!==null)for(let t of e.outrogroups)t.pending.delete(_),t.done.delete(_);if(_.f&8192&&(Sr(_),a&&(_.nodes?.a?.unfix(),(d??=new Set).delete(_))),_.f&33554432)if(_.f^=de,_===c)ki(_,null,n);else{var y=u?u.next:c;_===e.effect.last&&(e.effect.last=_.prev),_.prev&&(_.prev.next=_.next),_.next&&(_.next.prev=_.prev),Ai(e,u,_),Ai(e,_,y),ki(_,y,n),u=_,f=[],m=[],c=Ei(u.next);continue}if(_!==c){if(l!==void 0&&l.has(_)){if(f.length<m.length){var b=m[0],x;u=b.prev;var S=f[0],ee=f[f.length-1];for(x=0;x<f.length;x+=1)ki(f[x],b,n);for(x=0;x<m.length;x+=1)l.delete(m[x]);Ai(e,S.prev,ee.next),Ai(e,u,S),Ai(e,ee,b),c=b,u=ee,--v,f=[],m=[]}else l.delete(_),ki(_,c,n),Ai(e,_.prev,_.next),Ai(e,_,u===null?e.effect.first:u.next),Ai(e,u,_),u=_;continue}for(f=[],m=[];c!==null&&c!==_;)(l??=new Set).add(c),m.push(c),c=Ei(c.next);if(c===null)continue}_.f&33554432||f.push(_),u=_,c=Ei(_.next)}if(e.outrogroups!==null){for(let t of e.outrogroups)t.pending.size===0&&(Ci(e,p(t.done)),e.outrogroups?.delete(t));e.outrogroups.size===0&&(e.outrogroups=null)}if(c!==null||l!==void 0){var te=[];if(l!==void 0)for(_ of l)_.f&8192||te.push(_);for(;c!==null;)!(c.f&8192)&&c!==e.fallback&&te.push(c),c=Ei(c.next);var ne=te.length;if(ne>0){var C=r&4&&o===0?n:null;if(a){for(v=0;v<ne;v+=1)te[v].nodes?.a?.measure();for(v=0;v<ne;v+=1)te[v].nodes?.a?.fix()}Si(e,te,C)}}a&&Tt(()=>{if(d!==void 0)for(_ of d)_.nodes?.a?.apply()})}function Oi(e,t,n,r,i,a,o,s){var c=o&1?o&16?On(n):An(n,!1,!1):null,l=o&2?On(i):null;return{v:c,i:l,e:V(()=>(a(t,c??n,l??i,s),()=>{e.delete(r)}))}}function ki(e,t,n){if(e.nodes)for(var r=e.nodes.start,i=e.nodes.end,a=t&&!(t.f&33554432)?t.nodes.start:n;r!==null;){var o=z(r);if(a.before(r),r===i)return;r=o}}function Ai(e,t,n){t===null?e.effect.first=n:t.next=n,n===null?e.effect.last=t:n.prev=t}function ji(e,t,...n){var r=new bi(e);mr(()=>{let e=t()??null;r.ensure(e,e&&(t=>e(t,...n)))},ce)}function Mi(e){return(t,...n)=>{var r=e(...n),i;E?(i=O,et()):(i=R(si(r.render().trim())),t.before(i));let a=r.setup?.(i);ci(i,i),typeof a==`function`&&ar(a)}}function Ni(e,t,n){var r;E&&(r=O,et());var i=new bi(e);mr(()=>{var e=t()??null;if(E&&it(r)===`[`!=(e!==null)){var a=rt();k(a),i.anchor=a,D(!1),i.ensure(e,e&&(t=>n(t,e))),D(!0);return}i.ensure(e,e&&(t=>n(t,e)))},ce)}function Pi(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Pi(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Fi(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Pi(e))&&(r&&(r+=` `),r+=t);return r}function Ii(e){return typeof e==`object`?Fi(e):e??``}var Li=[...`
|
|
3
|
+
\r\f\xA0\v`];function Ri(e,t,n){var r=e==null?``:``+e;if(t&&(r=r?r+` `+t:t),n){for(var i of Object.keys(n))if(n[i])r=r?r+` `+i:i;else if(r.length)for(var a=i.length,o=0;(o=r.indexOf(i,o))>=0;){var s=o+a;(o===0||Li.includes(r[o-1]))&&(s===r.length||Li.includes(r[s]))?r=(o===0?``:r.substring(0,o))+r.substring(s+1):o=s}}return r===``?null:r}function zi(e,t,n,r,i,a){var o=e[xe];if(E||o!==n||o===void 0){var s=Ri(n,r,a);(!E||s!==e.getAttribute(`class`))&&(s==null?e.removeAttribute(`class`):t?e.className=s:e.setAttribute(`class`,s)),e[xe]=n}else if(a&&i!==a)for(var c in a){var l=!!a[c];(i==null||l!==!!i[c])&&e.classList.toggle(c,l)}return a}function Bi(e,t,n=!1){if(e.multiple){if(t==null)return;if(!u(t))return Qe();for(var r of e.options)r.selected=t.includes(Ui(r));return}for(r of e.options)if(Ln(Ui(r),t)){r.selected=!0;return}(!n||t!==void 0)&&(e.selectedIndex=-1)}function Vi(e){var t=new MutationObserver(()=>{Bi(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:[`value`]}),ar(()=>{t.disconnect()})}function Hi(e,t,n=t){var r=new WeakSet,i=!0;tr(e,`change`,t=>{var i=t?`[selected]`:`:checked`,a;if(e.multiple)a=[].map.call(e.querySelectorAll(i),Ui);else{var o=e.querySelector(i)??e.querySelector(`option:not([disabled])`);a=o&&Ui(o)}n(a),e.__value=a,N!==null&&r.add(N)}),ur(()=>{var a=t();if(e===document.activeElement){var o=A?an:N;if(r.has(o))return}if(Bi(e,a,i),i&&a===void 0){var s=e.querySelector(`:checked`);s!==null&&(a=Ui(s),n(a))}e.__value=a,i=!1}),Vi(e)}function Ui(e){return`__value`in e?e.__value:e.value}var Wi=Symbol(`is custom element`),Gi=Symbol(`is html`),Ki=Ee?`link`:`LINK`,qi=Ee?`progress`:`PROGRESS`;function Ji(e){if(E){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute(`value`)){var n=e.value;Zi(e,`value`,null),e.value=n}if(e.hasAttribute(`checked`)){var r=e.checked;Zi(e,`checked`,null),e.checked=r}}};e[we]=n,Tt(n),Qn()}}function Yi(e,t){var n=Qi(e);n.value===(n.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!==qi)||(e.value=t??``)}function Xi(e,t){var n=Qi(e);n.checked!==(n.checked=t??void 0)&&(e.checked=t)}function Zi(e,t,n,r){var i=Qi(e);E&&(i[t]=e.getAttribute(t),t===`src`||t===`srcset`||t===`href`&&e.nodeName===Ki)||i[t]!==(i[t]=n)&&(t===`loading`&&(e[ve]=n),n==null?e.removeAttribute(t):typeof n!=`string`&&ea(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Qi(e){return e[be]??={[Wi]:e.nodeName.includes(`-`),[Gi]:e.namespaceURI===Je}}var $i=new Map;function ea(e){var t=e.getAttribute(`is`)||e.nodeName,n=$i.get(t);if(n)return n;$i.set(t,n=[]);for(var r,i=e,a=Element.prototype;a!==i;){for(var o in r=g(i),r)r[o].set&&o!==`innerHTML`&&o!==`textContent`&&o!==`innerText`&&n.push(o);i=y(i)}return n}function ta(e,t,n=t){var r=new WeakSet;tr(e,`input`,async i=>{var a=i?e.defaultValue:e.value;if(a=ra(e)?ia(a):a,n(a),N!==null&&r.add(N),await Hr(),a!==(a=t())){var o=e.selectionStart,s=e.selectionEnd,c=e.value.length;if(e.value=a??``,s!==null){var l=e.value.length;o===s&&s===c&&l>c?(e.selectionStart=l,e.selectionEnd=l):(e.selectionStart=o,e.selectionEnd=Math.min(s,l))}}}),(E&&e.defaultValue!==e.value||$(t)==null&&e.value)&&(n(ra(e)?ia(e.value):e.value),N!==null&&r.add(N)),fr(()=>{var n=t();if(e===document.activeElement){var i=A?an:N;if(r.has(i))return}ra(e)&&n===ia(e.value)||e.type===`date`&&!n&&!e.value||n!==e.value&&(e.value=n??``)})}function na(e,t,n=t){tr(e,`change`,t=>{n(t?e.defaultChecked:e.checked)}),(E&&e.defaultChecked!==e.checked||$(t)==null)&&n(e.checked),fr(()=>{e.checked=!!t()})}function ra(e){var t=e.type;return t===`number`||t===`range`}function ia(e){return e===``?null:+e}function aa(e,t){return e===t||e?.[ge]===t}function oa(e={},t,n,r){var i=j.r,a=K;return ur(()=>{var o,s;return fr(()=>{o=s,s=r?.()||[],$(()=>{aa(n(...s),e)||(t(e,...s),o&&aa(n(...o),e)&&t(null,...o))})}),()=>{let r=a;for(;r!==i&&r.parent!==null&&r.parent.f&33554432;)r=r.parent;let o=()=>{s&&aa(n(...s),e)&&t(null,...s)},c=r.teardown;r.teardown=()=>{o(),c?.()}}}),e}function sa(e,t){$n(window,[`resize`],()=>er(()=>t(window[e])))}function ca(e=!1){let t=j,n=t.l.u;if(!n)return;let r=()=>Kr(t.s);if(e){let e=0,n={},i=Kt(()=>{let r=!1,i=t.s;for(let e in i)i[e]!==n[e]&&(n[e]=i[e],r=!0);return r&&e++,e});r=()=>Q(i)}n.b.length&&cr(()=>{la(t,r),ee(n.b)}),or(()=>{let e=$(()=>n.m.map(S));return()=>{for(let t of e)typeof t==`function`&&t()}}),n.a.length&&or(()=>{la(t,r),ee(n.a)})}function la(e,t){if(e.l.s)for(let t of e.l.s)Q(t);t()}function ua(e){var t=On(0);return function(){return arguments.length===1?(I(t,Q(t)+1),arguments[0]):(Q(t),e())}}function da(e,t,n,r){var i=!ct||(n&2)!=0,a=(n&8)!=0,o=(n&16)!=0,s=r,c=!0,l=void 0,u=()=>o&&i?(l??=Kt(r),Q(l)):(c&&(c=!1,s=o?$(r):r),s);let d;if(a){var f=ge in e||_e in e;d=h(e,t)?.set??(f&&t in e?n=>e[t]=n:void 0)}var p,m=!1;a?[p,m]=Lt(()=>e[t]):p=e[t],p===void 0&&r!==void 0&&(p=u(),d&&(i&&Ve(t),d(p)));var g=i?()=>{var n=e[t];return n===void 0?u():(c=!0,n)}:()=>{var n=e[t];return n!==void 0&&(s=void 0),n===void 0?s:n};if(i&&!(n&4))return g;if(d){var _=e.$$legacy;return(function(e,t){return arguments.length>0?((!i||!t||_||m)&&d(t?g():e),e):g()})}var v=!1,y=(n&1?Kt:Xt)(()=>(v=!1,g()));a&&Q(y);var b=K;return(function(e,t){if(arguments.length>0){let n=t?Q(y):i&&a?Fn(e):e;return I(y,n),v=!0,s!==void 0&&(s=n),e}return Dr&&v||b.f&16384?y.v:Q(y)})}function fa(e){return class extends pa{constructor(t){super({component:e,...t})}}}var pa=class{#e;#t;constructor(e){var t=new Map,n=(e,n)=>{var r=An(n,!1,!1);return t.set(e,r),r};let r=new Proxy({...e.props||{},$$events:{}},{get(e,r){return Q(t.get(r)??n(r,Reflect.get(e,r)))},has(e,r){return r===_e?!0:(Q(t.get(r)??n(r,Reflect.get(e,r))),Reflect.has(e,r))},set(e,r,i){return I(t.get(r)??n(r,i),i),Reflect.set(e,r,i)}});this.#t=(e.hydrate?hi:mi)(e.component,{target:e.target,anchor:e.anchor,props:r,context:e.context,intro:e.intro??!1,recover:e.recover,transformError:e.transformError}),!A&&(!e?.props?.$$host||e.sync===!1)&&mn(),this.#e=r.$$events;for(let e of Object.keys(this.#t))e===`$set`||e===`$destroy`||e===`$on`||m(this,e,{get(){return this.#t[e]},set(t){this.#t[e]=t},enumerable:!0});this.#t.$set=e=>{Object.assign(r,e)},this.#t.$destroy=()=>{yi(this.#t)}}$set(e){this.#t.$set(e)}$on(e,t){this.#e[e]=this.#e[e]||[];let n=(...e)=>t.call(this,...e);return this.#e[e].push(n),()=>{this.#e[e]=this.#e[e].filter(e=>e!==n)}}$destroy(){this.#t.$destroy()}};function ma(e,t){if(A||De(`hydratable`),E){let t=window.__svelte?.h;if(t?.has(e))return t.get(e);Xe(e)}return t()}var ha=s({afterUpdate:()=>Sa,beforeUpdate:()=>xa,createContext:()=>pt,createEventDispatcher:()=>ba,createRawSnippet:()=>Mi,flushSync:()=>mn,fork:()=>Cn,getAbortSignal:()=>ga,getAllContexts:()=>_t,getContext:()=>mt,hasContext:()=>gt,hydratable:()=>ma,hydrate:()=>hi,mount:()=>mi,onDestroy:()=>va,onMount:()=>_a,setContext:()=>ht,settled:()=>Ur,tick:()=>Hr,unmount:()=>yi,untrack:()=>$});function ga(){return U===null&&Re(),(U.ac??=new AbortController).signal}function _a(e){j===null&&Oe(`onMount`),ct&&j.l!==null?Ca(j).m.push(e):or(()=>{let t=$(e);if(typeof t==`function`)return t})}function va(e){j===null&&Oe(`onDestroy`),_a(()=>()=>$(e))}function ya(e,t,{bubbles:n=!1,cancelable:r=!1}={}){return new CustomEvent(e,{detail:t,bubbles:n,cancelable:r})}function ba(){let e=j;return e===null&&Oe(`createEventDispatcher`),(t,n,r)=>{let i=e.s.$$events?.[t];if(i){let a=u(i)?i.slice():[i],o=ya(t,n,r);for(let t of a)t.call(e.x,o);return!o.defaultPrevented}return!0}}function xa(e){j===null&&Oe(`beforeUpdate`),j.l===null&&Be(`beforeUpdate`),Ca(j).b.push(e)}function Sa(e){j===null&&Oe(`afterUpdate`),j.l===null&&Be(`afterUpdate`),Ca(j).a.push(e)}function Ca(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}var wa=`modulepreload`,Ta=function(e,t){return new URL(e,t).href},Ea={},Da=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=Ta(t,n),t in Ea)return;Ea[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:wa,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};export{ht as $,ti as A,Rn as B,xi as C,li as D,di as E,$ as F,Nn as G,Wn as H,pr as I,Yt as J,I as K,or as L,Q as M,Ur as N,ui as O,Hr as P,vt as Q,cr as R,Ti as S,fi as T,Gn as U,Un as V,Fn as W,mt as X,Pt as Y,yt as Z,Hi as _,fa as a,ne as at,Ni as b,ca as c,l as ct,na as d,ut as et,ta as f,Yi as g,Xi as h,_a as i,x as it,ei as j,ni as k,sa as l,Zi as m,ha as n,nt,da as o,o as ot,Ji as p,kn as q,va as r,tt as rt,ua as s,s as st,Da as t,lt as tt,oa as u,zi as v,pi as w,ji as x,Ii as y,Xn as z};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import{tt as e}from"./BkVLPnKR.js";import{B as t,C as n,D as r,E as i,F as a,G as o,H as s,J as c,K as l,L as u,O as d,Q as f,S as p,T as m,V as h,Y as g,Z as _,_ as v,a as y,h as b,k as x,n as S,o as C,q as w,t as T,v as E,w as D,x as O,z as k}from"./Za7VFBJZ.js";e();var A=class{base_center_x;base_center_y;base_radius;initial_angle;right_nleft;constructor(e,t,n,r,i){this.base_center_x=e,this.base_center_y=t,this.base_radius=n,this.initial_angle=r,this.right_nleft=i}angleSign(){return this.right_nleft?1:-1}lFromU(e){return this.base_radius*Math.sqrt(1+e**2)}wFromU(e){if(e<0)throw`err729: involute parameter au ${e} is negative`;if(Math.abs(e)>Math.PI/2)throw`err730: involute parameter au ${e} is larger than PI/2`;return this.angleSign()*(e-Math.atan(e))}w2FromU(e){return this.initial_angle+this.wFromU(e)}ptc(e){let t=this.lFromU(e),n=this.w2FromU(e);return[this.base_center_x+Math.cos(n)*t,this.base_center_y+Math.sin(n)*t]}ptcta(e){return this.initial_angle+this.angleSign()*e}uFromL(e){return Math.sqrt(e**2/this.base_radius**2-1)}uFromWslow(e){let t=10**-4,n=Math.PI/3,r=n/2,i=this.wFromU(n),a=0;for(;Math.abs(i-e)>t;)i<e?n+=r:n-=r,i=this.wFromU(n),r/=2,a+=1;return console.log(`dbg072: uFromWslow itcnt ${a}`),n}laptc(e,t,n,r){if(Math.sign(t)*this.angleSign()<0)throw`err904: Invole.laptc angle-of-pressure ${t} not compatible with right_nleft ${this.right_nleft}`;let i=e+t,a=this.base_center_x+Math.cos(i)*this.base_radius,o=this.base_center_y+Math.sin(i)*this.base_radius,s=i-this.angleSign()*Math.PI/2,c=n*this.base_radius,l=a+Math.cos(s)*c,u=o+Math.sin(s)*c,d=this.lFromU(n)*r,f=n;return[l,u,Math.cos(f)*d,Math.sin(f)*d]}};function j(e,t,n,r,i){return new A(e,t,n,r,i)}var M=class{mod=1;TN=23;as=1;cx=0;cy=0;brr=50;blr=50;ar=54;pr=53;dr=52;br=51;bRound=1;adt=.5;initAngle=0;axisAngle=0;involArcPairs=1;skinThickness=0;involuteR=j(0,0,50,0,!0);involuteL=j(0,0,50,0,!1);rud=0;rup=0;rua=0;rwd=0;rwp=0;rwa=0;lud=0;lup=0;lua=0;lwd=0;lwp=0;lwa=0;msg;initStep=0;constructor(){this.mod=1,this.msg=``,this.initStep=0}incInitStep(e){if(this.initStep+1!==e)throw`err834: incInitStep initStep ${this.initStep} and target ${e} are not compatible`;this.initStep=e}checkInitStep(e,t){if(this.initStep<e)throw`err835: checkInitStep for ${t} initStep ${this.initStep} is too small compare to targetMin ${e}`}set1ModuleToothNumber(e,t){this.incInitStep(1),this.mod=e,this.TN=t,this.pr=this.mod*this.TN/2,this.as=2*Math.PI/this.TN}set2CenterPosition(e,t){this.incInitStep(2),this.cx=e,this.cy=t}set3CircleRadius(e,t,n,r){this.incInitStep(3),this.ar=this.pr+this.mod*e,this.dr=this.pr-this.mod*t,this.br=this.dr-this.mod*n,this.bRound=r}set4BaseCircles(e,t){this.incInitStep(4),this.brr=e,this.blr=t}set5AddendumThickness(e){this.incInitStep(5),this.adt=e/100}set6Angles(e,t){this.incInitStep(6),this.initAngle=e,this.axisAngle=t}set7InvoluteDetails(e,t){this.incInitStep(7),this.involArcPairs=e,this.skinThickness=t}getRefCircles(){return this.checkInitStep(4,`getRefCircles`),[E(this.cx,this.cy,this.ar,`Azure`),E(this.cx,this.cy,this.pr,`Azure`),E(this.cx,this.cy,this.dr,`Azure`),E(this.cx,this.cy,this.br,`Azure`),E(this.cx,this.cy,this.brr,`CornFlowerBlue`),E(this.cx,this.cy,this.blr,`Crimson`)]}calcInvoluteAngles(){this.checkInitStep(4,`calcInvoluteAngles`),this.involuteR=j(this.cx,this.cy,this.brr,0,!0),this.dr>this.brr?this.rud=this.involuteR.uFromL(this.dr):this.rud=0,this.rup=this.involuteR.uFromL(this.pr),this.rua=this.involuteR.uFromL(this.ar),this.rwd=this.involuteR.wFromU(this.rud),this.rwp=this.involuteR.wFromU(this.rup),this.rwa=this.involuteR.wFromU(this.rua),this.involuteL=j(this.cx,this.cy,this.blr,0,!1),this.dr>this.blr?this.lud=this.involuteL.uFromL(this.dr):this.lud=0,this.lup=this.involuteL.uFromL(this.pr),this.lua=this.involuteL.uFromL(this.ar),this.lwd=this.involuteL.wFromU(this.lud),this.lwp=this.involuteL.wFromU(this.lup),this.lwa=this.involuteL.wFromU(this.lua)}checkProfileConditions(){let e=this.as*this.adt,t=this.rwa-this.rwp,n=Math.abs(this.lwa-this.lwp),r=e-t-n;if(r<0)throw`err554: No remaining Addendum reserve ${d(r)}
|
|
2
|
+
`;let i=this.as*(1-this.adt),a=this.rwp-this.rwd,o=Math.abs(this.lwp-this.lwd),s=i-a-o;if(s<2*Math.atan2(this.bRound,this.br))throw`err555: No remaining Dedendum reserve ${d(s)} compare to bRound ${d(this.bRound)}
|
|
3
|
+
`}getToothRef(){let e=6*this.involArcPairs;this.checkInitStep(7,`getProfile`),this.calcInvoluteAngles();let t=(this.rua-this.rud)/e,n=(this.lua-this.lud)/e,r=this.initAngle+0*this.as,i=j(this.cx,this.cy,this.brr,r-this.rwp,!0),[a,o]=i.ptc(this.rud+0*t),s=v(a,o,`Gold`);for(let n=0;n<e;n++){let[e,r]=i.ptc(this.rud+(n+1)*t);s.addSegStrokeA(e,r)}let c=r+this.as*this.adt,l=j(this.cx,this.cy,this.blr,c-this.lwp,!1);for(let t=0;t<e+1;t++){let[r,i]=l.ptc(this.lud+(e-t)*n);s.addSegStrokeA(r,i)}return s.closeSegStroke(),s}getProfile(){this.checkInitStep(7,`getProfile`),this.calcInvoluteAngles(),this.checkProfileConditions();let e=this.rwd-this.rwp,t=this.lwd-this.lwp,n=this.dr>this.brr?this.dr:this.brr,r=this.dr>this.blr?this.dr:this.blr;if(this.bRound>n-this.br)throw`err409: getProfile bRound ${d(this.bRound)} too large for erdr ${d(n)} and br ${d(this.br)}`;if(this.bRound>r-this.br)throw`err408: getProfile bRound ${d(this.bRound)} too large for eldr ${d(r)} and br ${d(this.br)}`;let i=(this.rua-this.rud)/this.involArcPairs,a=(this.lua-this.lud)/this.involArcPairs,s=o(this.cx,this.cy),c=s.translatePolar(this.initAngle+e,this.br),l=v(c.cx,c.cy);for(let n=0;n<this.TN;n++){let r=this.initAngle+n*this.as,c=s.translatePolar(r+e,this.br);l.addSegStrokeA(c.cx,c.cy).addCornerRounded(this.bRound);let u=j(this.cx,this.cy,this.brr,r-this.rwp,!0),[d,f]=u.ptc(this.rud),p=u.ptcta(this.rud),m=o(d,f).translatePolar(p-Math.PI/2,this.skinThickness);l.addSegStrokeA(m.cx,m.cy);for(let e=0;e<this.involArcPairs;e++){let t=this.rud+e*i,[n,r]=u.ptc(t+i),a=u.ptcta(t),s=u.ptcta(t+i)+Math.PI,c=o(n,r).translatePolar(a-Math.PI/2,this.skinThickness);l.addPointA(c.cx,c.cy).addSeg2Arcs(a,s)}let h=r+this.as*this.adt,g=j(this.cx,this.cy,this.blr,h-this.lwp,!1),_=this.lud+this.involArcPairs*a,[v,y]=g.ptc(_),b=g.ptcta(_)+Math.PI,x=o(v,y).translatePolar(b-Math.PI/2,this.skinThickness);l.addSegStrokeA(x.cx,x.cy);for(let e=0;e<this.involArcPairs;e++){let t=this.lud+(this.involArcPairs-e)*a,[n,r]=g.ptc(t-a),i=g.ptcta(t)+Math.PI,s=g.ptcta(t-a),c=o(n,r).translatePolar(i-Math.PI/2,this.skinThickness);l.addPointA(c.cx,c.cy).addSeg2Arcs(i,s)}let S=s.translatePolar(h+t,this.br);l.addSegStrokeA(S.cx,S.cy).addCornerRounded(this.bRound)}return l.closeSegStroke(),l}getMsg(){return this.msg}};function N(){return new M}function P(e,t,n,r){e.checkInitStep(1,`helper.gw2center-1`),t.checkInitStep(1,`helper.gw2center-2`);let i=e.pr+t.pr+r;return[e.cx+i*Math.cos(n),e.cy+i*Math.sin(n),i]}function F(e,t,n,r,a,o,s,c,l,u,d){e.checkInitStep(3,`helper.baseCircles-1`),t.checkInitStep(3,`helper.baseCircles-2`);let f=n,p=a,m=r,h=o,g=e.pr+t.pr,_=u,v=d;switch(_){case 0:t.TN>e.TN?(f=e.dr,p=f*t.TN/e.TN):(p=t.dr,f=p*e.TN/t.TN);break;case 1:p=f*t.TN/e.TN;break;case 2:f=p*e.TN/t.TN;break;case 3:f=g*e.TN/(e.TN+t.TN)*Math.cos(i(s)),p=f*t.TN/e.TN;break;case 4:break;default:console.log(`err337: involROpt2 case ${_} is not implemented!`)}switch(v){case 0:t.TN>e.TN?(m=e.dr,h=m*t.TN/e.TN):(h=t.dr,m=h*e.TN/t.TN);break;case 1:h=m*t.TN/e.TN;break;case 2:m=h*e.TN/t.TN;break;case 3:m=g*e.TN/(e.TN+t.TN)*Math.cos(i(c)),h=m*t.TN/e.TN;break;case 4:break;default:console.log(`err358: involLOpt2 case ${v} is not implemented!`)}return l===1&&(m=f,h=p),[f,m,p,h]}var I=class{gw1;gw2;initAngle1;angleCenterCenter;interAxis;rightLeftCenter2;msg;apr;apl;lBDr=0;lBDl=0;laStartRr1=0;laStartRr2=0;laStartRl1=0;laStartRl2=0;aFODr1=0;aFODr2=0;aFODl1=0;aFODl2=0;lasr1=0;lasr2=0;lasl1=0;lasl2=0;firstToothUr1=0;firstToothUl1=0;ftdr1=0;ftdl1=0;constructor(e,t,n,r,i,a){this.gw1=e,this.gw2=t,this.initAngle1=n,this.angleCenterCenter=r,this.interAxis=i,this.rightLeftCenter2=a,this.msg=``,this.apr=0,this.apl=0}check1(){this.gw1.checkInitStep(4,`ActionLine.check1-1`),this.gw2.checkInitStep(4,`ActionLine.check1-2`),this.interAxis>this.gw1.ar+this.gw2.ar&&(this.msg+=`warn333: initAngle2 interAxis ${d(this.interAxis)} is too large compare to gw1.ar ${d(this.gw1.ar)} and gw2.ar ${d(this.gw2.ar)}
|
|
4
|
+
`),c(this.gw1.brr*this.gw2.TN-this.gw2.brr*this.gw1.TN)!==0&&(this.msg+=`warn407: right ratios differ N1/N2 = ${this.gw1.TN} / ${this.gw2.TN} = ${d(this.gw1.TN/this.gw2.TN)} and brr1/brr2 = ${d(this.gw1.brr)}/${d(this.gw2.brr)} = ${d(this.gw1.brr/this.gw2.brr)}
|
|
5
|
+
`),c(this.gw1.blr*this.gw2.TN-this.gw2.blr*this.gw1.TN)!==0&&(this.msg+=`warn408: left ratios differ N1/N2 = ${this.gw1.TN} / ${this.gw2.TN} = ${d(this.gw1.TN/this.gw2.TN)} and blr1/blr2 = ${d(this.gw1.blr)}/${d(this.gw2.blr)} = ${d(this.gw1.blr/this.gw2.blr)}
|
|
6
|
+
`)}check2(){this.gw1.checkInitStep(5,`ActionLine.check2-1`),this.gw2.checkInitStep(5,`ActionLine.check2-2`),c(this.gw1.adt+this.gw2.adt-1)>0&&(this.msg+=`warn281: addendum thickness too large: adt1 ${d(this.gw1.adt)} adt2 ${d(this.gw2.adt)}
|
|
7
|
+
`);let e=this.gw1.ar-this.gw1.pr,t=this.gw1.pr-this.gw1.dr,n=this.gw2.ar-this.gw2.pr,r=this.gw2.pr-this.gw2.dr;c(r-e)<0&&(this.msg+=`warn282: addendum-1 ${d(e)} larger than dedendum-2 ${d(r)}
|
|
8
|
+
`),c(t-n)<0&&(this.msg+=`warn283: addendum-2 ${d(n)} larger than dedendum-1 ${d(t)}
|
|
9
|
+
`)}calcActionLine(){this.gw1.checkInitStep(4,`ActionLine.calcActionLine-1`),this.gw2.checkInitStep(4,`ActionLine.calcActionLine-2`),this.gw1.calcInvoluteAngles(),this.gw2.calcInvoluteAngles();let e=this.interAxis*this.gw1.brr/(this.gw1.brr+this.gw2.brr),t=this.interAxis*this.gw1.blr/(this.gw1.blr+this.gw2.blr),n=this.interAxis-e,r=this.interAxis-t;this.apr=Math.acos((this.gw1.brr+this.gw2.brr)/this.interAxis),this.apl=Math.acos((this.gw1.blr+this.gw2.blr)/this.interAxis),this.msg+=`Pressure angular: right: ${d(w(this.apr))} left: ${d(w(this.apl))} degree
|
|
10
|
+
`,this.lBDr=this.interAxis*Math.sin(this.apr),this.lBDl=this.interAxis*Math.sin(this.apl),this.msg+=`Line of Action Maximum length: right: ${d(this.lBDr)} left: ${d(this.lBDl)} mm
|
|
11
|
+
`;let i=Math.PI/2+this.apr,a=C(this.gw1.ar,e,i);this.aFODr1=Math.PI-i-a;let o=this.gw1.rua-this.apr-this.gw1.rwa;if(c(this.aFODr1-o)!==0)throw`dbg378: aFODr1 ${this.aFODr1} and aFODr1Alt ${o} differ`;let s=u(e,this.gw1.ar,this.aFODr1),l=i,f=C(this.gw2.ar,n,l);this.aFODr2=Math.PI-l-f;let p=this.gw2.rua-this.apr-this.gw2.rwa;if(c(this.aFODr2-p)!==0)throw`dbg379: aFODr2 ${this.aFODr2} and aFODr2Alt ${p} differ`;let m=s+u(n,this.gw2.ar,this.aFODr2),h=m/this.gw1.brr,g=m/this.gw2.brr,_=this.gw1.rua-h,v=this.gw2.rua-g;this.laStartRr1=this.gw1.involuteR.lFromU(_),this.laStartRr2=this.gw2.involuteR.lFromU(v);let y=Math.PI/2+this.apl,b=C(this.gw1.ar,t,y);this.aFODl1=Math.PI-y-b;let x=this.gw1.lua-this.apl+this.gw1.lwa;if(c(this.aFODl1-x)!==0)throw`dbg388: aFODl1 ${this.aFODl1} and aFODl1Alt ${x} differ`;let S=u(t,this.gw1.ar,this.aFODl1),T=y,E=C(this.gw2.ar,r,T);this.aFODl2=Math.PI-T-E;let D=this.gw2.lua-this.apl+this.gw2.lwa;if(c(this.aFODl2-D)!==0)throw`dbg389: aFODl2 ${this.aFODl2} and aFODl2Alt ${D} differ`;let O=S+u(r,this.gw2.ar,this.aFODl2),k=O/this.gw1.blr,A=O/this.gw2.blr,j=this.gw1.lua-k,M=this.gw2.lua-A;this.laStartRl1=this.gw1.involuteL.lFromU(j),this.laStartRl2=this.gw2.involuteL.lFromU(M),this.msg+=`Line of Action Effective length: right: ${d(m)} left: ${d(O)} mm
|
|
12
|
+
`,this.msg+=`Line of Action Effective rotation angle: right-1: ${d(w(h))} right-2: ${d(w(g))} left-1: ${d(w(k))} left-2: ${d(w(A))} degree
|
|
13
|
+
`,this.msg+=`Line of Action Effective height: right-1: ${d(this.gw1.ar-this.laStartRr1)} right-2: ${d(this.gw2.ar-this.laStartRr2)} left-1: ${d(this.gw1.ar-this.laStartRl1)} left-2: ${d(this.gw2.ar-this.laStartRl2)} mm
|
|
14
|
+
`,this.lasr1=2*Math.PI/this.gw1.TN*this.gw1.brr,this.lasr2=2*Math.PI/this.gw2.TN*this.gw2.brr,this.msg+=`Line of Action right: step length: 1: ${d(this.lasr1)} 2: ${d(this.lasr2)} mm
|
|
15
|
+
`,this.msg+=`Line of Action right: nb of contact point: 1: ${d(m/this.lasr1)} 2: ${d(m/this.lasr2)}
|
|
16
|
+
`,this.lasl1=2*Math.PI/this.gw1.TN*this.gw1.blr,this.lasl2=2*Math.PI/this.gw2.TN*this.gw2.blr,this.msg+=`Line of Action left: step length: 1: ${d(this.lasl1)} 2: ${d(this.lasl2)} mm
|
|
17
|
+
`,this.msg+=`Line of Action left: nb of contact point: 1: ${d(O/this.lasl1)} 2: ${d(O/this.lasl2)}
|
|
18
|
+
`}calcContactPoint1(){for(this.gw1.checkInitStep(5,`ActionLine.calcContactPoint1`),this.firstToothUr1=f(this.apr-(this.initAngle1-this.angleCenterCenter)+this.gw1.rwp);c(this.firstToothUr1-this.gw1.as)>=0;)this.firstToothUr1=c(this.firstToothUr1-this.gw1.as);for(this.firstToothUl1=f(this.apl+(this.initAngle1-this.angleCenterCenter)+this.gw1.as*this.gw1.adt-this.gw1.lwp);c(this.firstToothUl1-this.gw1.as)>=0;)this.firstToothUl1=c(this.firstToothUl1-this.gw1.as);this.ftdr1=this.gw1.brr*this.firstToothUr1,this.ftdl1=this.gw1.blr*this.firstToothUl1}prepare(){this.check1(),this.check2(),this.calcActionLine(),this.calcContactPoint1()}oneContactSpeed(e,t,n,r,i,a,s,c,l,u){let f=(r+Math.floor(t/(2*n))*n)/i,p=e?1:-1,[m,h,g,_]=a.laptc(s,p*c,f,.4);this.msg+=`speed ${l}: vx ${d(g)} vy: ${d(_)} m/s
|
|
19
|
+
`;let y=o(m,h),b=s+p*c,x=v(m,h,u),S=y.translatePolar(b,-_);x.addSegStrokeA(S.cx,S.cy);let C=S.translatePolar(b-p*Math.PI/2,g);return x.addSegStrokeA(C.cx,C.cy),x.closeSegStroke(),x}getContactSpeed(){let e=this.oneContactSpeed(!0,this.lBDr,this.lasr1,this.ftdr1,this.gw1.brr,this.gw1.involuteR,this.angleCenterCenter,this.apr,`R1`,`Black`),t=this.oneContactSpeed(!1,this.lBDl,this.lasl1,this.ftdl1,this.gw1.blr,this.gw1.involuteL,this.angleCenterCenter,this.apl,`L1`,`Black`),n=[];return n.push(e),n.push(t),n}getContours(){let e=[];e.push(E(this.gw1.cx,this.gw1.cy,this.laStartRr1,`SkyBlue`)),e.push(E(this.gw1.cx,this.gw1.cy,this.laStartRl1,`SlateBlue`)),e.push(E(this.gw2.cx,this.gw2.cy,this.laStartRr2,`SkyBlue`)),e.push(E(this.gw2.cx,this.gw2.cy,this.laStartRl2,`SlateBlue`));let t=o(this.gw1.cx,this.gw1.cy),n=o(this.gw2.cx,this.gw2.cy),r=t.translatePolar(this.angleCenterCenter+this.apr,this.gw1.brr),i=n.translatePolar(this.angleCenterCenter+Math.PI+this.apr,this.gw2.brr),a=v(r.cx,r.cy,`YellowGreen`);a.addSegStrokeA(i.cx,i.cy),a.closeSegStroke(),e.push(a);let s=t.translatePolar(this.angleCenterCenter-this.aFODr1,this.gw1.ar),c=n.translatePolar(this.angleCenterCenter+Math.PI-this.aFODr2,this.gw2.ar),l=v(s.cx,s.cy,`Yellow`);l.addSegStrokeA(c.cx,c.cy),l.closeSegStroke(),e.push(l);let u=t.translatePolar(this.angleCenterCenter-this.apl,this.gw1.blr),d=n.translatePolar(this.angleCenterCenter+Math.PI-this.apl,this.gw2.blr),f=v(u.cx,u.cy,`YellowGreen`);f.addSegStrokeA(d.cx,d.cy),f.closeSegStroke(),e.push(f);let p=t.translatePolar(this.angleCenterCenter+this.aFODl1,this.gw1.ar),m=n.translatePolar(this.angleCenterCenter+Math.PI+this.aFODl2,this.gw2.ar),h=v(p.cx,p.cy,`Yellow`);return h.addSegStrokeA(m.cx,m.cy),h.closeSegStroke(),e.push(h),e.push(...this.getContactSpeed()),e}getContactPoint(){let e=[],t=o(this.gw1.cx,this.gw1.cy),n=t.translatePolar(this.angleCenterCenter+this.apr,this.gw1.brr),r=t.translatePolar(this.angleCenterCenter-this.apl,this.gw1.blr);e.push(o(n.cx,n.cy,y.eBigSquare)),e.push(o(r.cx,r.cy,y.eBigSquare));let i=this.angleCenterCenter+this.apr-Math.PI/2,a=this.angleCenterCenter-this.apl+Math.PI/2,s=n.translatePolar(i,this.ftdr1),c=r.translatePolar(a,this.ftdl1);e.push(o(s.cx,s.cy,y.eBigSquare)),e.push(o(c.cx,c.cy,y.eBigSquare));let l=this.ftdr1;for(;l+this.lasr1<this.lBDr;){l+=this.lasr1;let t=n.translatePolar(i,l);e.push(o(t.cx,t.cy,y.eBigSquare))}let u=this.ftdl1;for(;u+this.lasl1<this.lBDl;){u+=this.lasl1;let t=r.translatePolar(a,u);e.push(o(t.cx,t.cy,y.eBigSquare))}return e}getMsg(){return this.msg}getInitAngle2(){let e=this.lBDr-this.ftdr1;for(;c(e-this.lasr2)>=0;)e=c(e-this.lasr2);let t=this.lBDl-this.ftdl1;for(;c(t-this.lasl2)>=0;)t=c(t-this.lasl2);let n=e/this.gw2.brr,r=t/this.gw2.blr,i=this.angleCenterCenter+Math.PI+this.apr-n+this.gw2.rwp,a=this.angleCenterCenter+Math.PI-this.apl+r+this.gw2.lwp-this.gw2.as*this.gw2.adt,o=2*Math.PI+f(a);for(;c(o-this.gw2.as-i)>=0;)o=c(o-this.gw2.as);let s=o-i,l=s*this.gw2.brr/this.gw1.brr,u=s*this.gw2.brr,p=s*this.gw2.blr;this.msg+=`slack angle: 1: ${d(w(l))} 2: ${d(w(s))} degree
|
|
20
|
+
`,this.msg+=`slack on action line: right-2: ${d(u)} left-2: ${d(p)} mm
|
|
21
|
+
`;let m=0;if(this.rightLeftCenter2===0)m=i;else if(this.rightLeftCenter2===1)m=a;else if(this.rightLeftCenter2===2)m=i+s/2;else throw`err221: initAngle2 rightLeftCenter2 ${this.rightLeftCenter2} has an unkown value`;return _(m)}};function L(e,t,n,r,i,a){return new I(e,t,n,r,i,a)}function R(e,t,n,r,i,a,s,c,l){let u=E(e,t,n);if(r>0){if(i>2*n)throw`err383: axisTorque ribWidth ${d(i)} larger than 2x axisRadius ${d(n)}`;let f=Math.asin(i/(2*n)),p=2*Math.PI/r;if(p-2.5*f<0)throw`err384: axisTorque ribWidth ${d(i)} or ribNb ${r} are too large`;if(s>i/2)throw`err385: axisTorque ribRound1 ${d(s)} too large compare to ribWidth ${d(i)}`;if(s+c>a)throw`err386: axisTorque ribRound12 ${d(s)} ${d(c)} too large compare to ribHeight ${d(i)}`;let m=p-2*f>Math.PI,h=o(e,t),g=h.translatePolar(l,n+a).translatePolar(l+Math.PI/2,i/2);u=v(g.cx,g.cy);for(let e=0;e<r;e++){let t=l+e*p,r=t+p,o=h.translatePolar(t+f,n),d=h.translatePolar(r-f,n),g=h.translatePolar(t,n+a).translatePolar(t+Math.PI/2,i/2),_=h.translatePolar(r,n+a).translatePolar(r-Math.PI/2,i/2);u.addSegStrokeA(g.cx,g.cy).addCornerRounded(s),u.addSegStrokeA(o.cx,o.cy).addCornerRounded(c),u.addPointA(d.cx,d.cy).addSegArc(n,m,!0).addCornerRounded(c),u.addSegStrokeA(_.cx,_.cy).addCornerRounded(s)}u.closeSegStroke()}return u}function z(e,t,n,r,i,a,s,c){let l=2*Math.PI/i,u=Math.asin(a/(2*r)),f=Math.asin(a/(2*n));if(a>2*r)throw`err905: hollowStraight spokeWidth ${d(a)} too large for hollowInt ${d(r)}`;if(n-r<2.1*s)throw`err906: hollowStraight hollowExt ${d(n)}, hollowInt ${d(r)} and spokeRound ${d(s)} do not fit`;if(l-2*f<2.5*Math.asin(s/n))throw`err907: hollowStraight spokeNb ${i}, spokeWidth ${d(a)} or spokeRound ${d(s)} are too large`;let p=a/(2*Math.sin(l/2)),m=l-2*u<2.1*Math.asin(s/r),h=l-2*f>Math.PI,g=o(e,t),_=[];for(let e=0;e<i;e++){let t=c+e*l,i=t+l,a=t+l/2,o=g.translatePolar(t+f,n),d=g.translatePolar(i-f,n),y=g.translatePolar(i-u,r),b=g.translatePolar(t+u,r),x=g.translatePolar(a,p),S=v(o.cx,o.cy);S.addCornerRounded(s),S.addPointA(d.cx,d.cy).addSegArc(n,h,!0).addCornerRounded(s),m?S.addSegStrokeA(x.cx,x.cy).addCornerRounded(s):(S.addSegStrokeA(y.cx,y.cy).addCornerRounded(s),S.addPointA(b.cx,b.cy).addSegArc(r,h,!1).addCornerRounded(s)),S.closeSegStroke(),_.push(S)}return _}function B(e,t,n,r,i,a,o,s,c,l){let u=l?1:-1,d=e/2,f=d+t,p=f+n,m=v(0,-p);return m.addSegStrokeA(u*r,-p).addCornerRounded(o).addSegStrokeA(u*r,-f).addCornerRounded(s).addSegStrokeA(u*i,-f).addSegStrokeA(u*a,-d).addCornerRounded(c).addSegStrokeA(u*a,d).addCornerRounded(c).addSegStrokeA(u*i,f).addSegStrokeA(u*r,f).addCornerRounded(s).addSegStrokeA(u*r,p).addCornerRounded(o).addSegStrokeA(0,p).closeSegStroke(),m}var V={partName:`gear_wheel`,params:[h(`module`,`mm`,10,.1,100,.1),h(`N1`,`scalar`,23,3,1e3,1),h(`N2`,`scalar`,19,3,1e3,1),h(`angleCenterCenter`,`degree`,0,-180,180,1),h(`addInterAxis`,`mm`,0,0,100,.05),h(`c1x`,`mm`,0,-200,200,1),h(`c1y`,`mm`,0,-200,200,1),s(`Tooth addendum dedendum`),h(`ah1`,`scalar`,1,.1,2,.05),h(`dh1`,`scalar`,1,.1,2,.05),h(`bh1`,`scalar`,.25,.1,2,.05),h(`bRound1`,`mm`,2,0,50,.1),h(`ah2`,`scalar`,1,.1,2,.05),h(`dh2`,`scalar`,1,.1,2,.05),h(`bh2`,`scalar`,.25,.1,2,.05),h(`bRound2`,`mm`,2,0,50,.1),h(`at1`,`%`,50,10,90,.5),h(`at2`,`%`,50,10,90,.5),s(`Tooth involute of circle`),k(`involSym`,!0),t(`involROpt`,[`Optimum`,`Base-1`,`Base-2`,`PressureAngle`,`FreeBase-12`]),t(`involLOpt`,[`Optimum`,`Base-1`,`Base-2`,`PressureAngle`,`FreeBase-12`]),h(`brr1`,`mm`,102.9,10,2e3,.05),h(`blr1`,`mm`,102.9,10,2e3,.05),h(`brr2`,`mm`,85,10,2e3,.05),h(`blr2`,`mm`,85,10,2e3,.05),h(`rightPressureAngle`,`degree`,26,1,45,.5),h(`leftPressureAngle`,`degree`,26,1,45,.5),h(`involArcPairs1`,`scalar`,2,1,40,1),h(`involArcPairs2`,`scalar`,2,1,40,1),h(`skinThickness1`,`mm`,0,-3,3,.01),h(`skinThickness2`,`mm`,0,-3,3,.01),h(`initAngle1`,`degree`,0,-180,180,1),t(`gw2Position`,[`right`,`left`,`center`]),s(`Inner`),k(`centralAxis`,!0),h(`axisRadius`,`mm`,10,.1,200,.1),h(`ribNb`,`scalar`,5,0,32,1),h(`ribWidth`,`mm`,8,1,100,.1),h(`ribHeight`,`mm`,8,1,100,.1),h(`ribRound1`,`mm`,2,0,20,.1),h(`ribRound2`,`mm`,2,0,20,.1),k(`hollow`,!0),h(`materialHeightExt`,`mm`,20,1,200,.5),h(`materialHeightInt`,`mm`,15,1,200,.5),h(`spokeNb`,`scalar`,5,1,18,1),h(`spokeWidth`,`mm`,15,1,200,.1),h(`spokeRound`,`mm`,10,0,20,.1),s(`Axis`),k(`wheelAxis`,!0),h(`wheelHeight`,`mm`,40,.1,400,.1),h(`wheelMidExtra`,`mm`,6,0,10,.1),h(`wheelAxisLength`,`mm`,40,0,400,.1),h(`wheelAxisRadius`,`mm`,20,0,200,.1),h(`wheelMidRadius`,`mm`,60,0,200,.1),h(`wheelRadiusExtra`,`mm`,1,0,20,.1),h(`wheelAxisExtRound`,`mm`,4,0,20,.1),h(`wheelAxisIntRound`,`mm`,0,0,20,.1),h(`wheelExtraRound`,`mm`,4,0,20,.1)],paramSvg:{module:`gearwheel_params_main.svg`,N1:`gearwheel_params_main.svg`,N2:`gearwheel_params_main.svg`,angleCenterCenter:`gearwheel_params_interaxis.svg`,addInterAxis:`gearwheel_params_interaxis.svg`,c1x:`gearwheel_params_main.svg`,c1y:`gearwheel_params_main.svg`,ah1:`gearwheel_params_teeth_height.svg`,dh1:`gearwheel_params_teeth_height.svg`,bh1:`gearwheel_params_teeth_height.svg`,bRound1:`gearwheel_params_teeth_height.svg`,ah2:`gearwheel_params_teeth_height.svg`,dh2:`gearwheel_params_teeth_height.svg`,bh2:`gearwheel_params_teeth_height.svg`,bRound2:`gearwheel_params_teeth_height.svg`,at1:`gearwheel_params_addendum_portion.svg`,at2:`gearwheel_params_addendum_portion.svg`,involSym:`gearwheel_params_involSym.svg`,involROpt:`gearwheel_params_main.svg`,involLOpt:`gearwheel_params_main.svg`,brr1:`gearwheel_params_baseCircles.svg`,brr2:`gearwheel_params_baseCircles.svg`,blr1:`gearwheel_params_baseCircles.svg`,blr2:`gearwheel_params_baseCircles.svg`,rightPressureAngle:`gearwheel_params_baseCircles.svg`,leftPressureAngle:`gearwheel_params_baseCircles.svg`,involArcPairs1:`gearwheel_params_skin.svg`,skinThickness1:`gearwheel_params_skin.svg`,involArcPairs2:`gearwheel_params_skin.svg`,skinThickness2:`gearwheel_params_skin.svg`,initAngle1:`gearwheel_params_initAngle.svg`,gw2Position:`gearwheel_params_initAngle.svg`,centralAxis:`gearwheel_params_hollow_axis.svg`,axisRadius:`gearwheel_params_hollow_axis.svg`,ribNb:`gearwheel_params_hollow_axis.svg`,ribWidth:`gearwheel_params_hollow_axis.svg`,ribHeight:`gearwheel_params_hollow_axis.svg`,ribRound1:`gearwheel_params_hollow_axis.svg`,ribRound2:`gearwheel_params_hollow_axis.svg`,hollow:`gearwheel_params_hollow_axis.svg`,materialHeightExt:`gearwheel_params_hollow_axis.svg`,materialHeightInt:`gearwheel_params_hollow_axis.svg`,spokeNb:`gearwheel_params_hollow_axis.svg`,spokeWidth:`gearwheel_params_hollow_axis.svg`,spokeRound:`gearwheel_params_hollow_axis.svg`,wheelAxis:`gearwheel_params_side.svg`,wheelHeight:`gearwheel_params_side.svg`,wheelMidExtra:`gearwheel_params_side.svg`,wheelAxisLength:`gearwheel_params_side.svg`,wheelAxisRadius:`gearwheel_params_side.svg`,wheelMidRadius:`gearwheel_params_side.svg`,wheelRadiusExtra:`gearwheel_params_side.svg`,wheelAxisExtRound:`gearwheel_params_side.svg`,wheelAxisIntRound:`gearwheel_params_side.svg`,wheelExtraRound:`gearwheel_params_side.svg`},sim:{tMax:100,tStep:.5,tUpdate:500}};function H(e,t,n=``){let r=a(V.partName+n),o=x(),s=x();r.logstr+=`${r.partName} simTime: ${e}
|
|
22
|
+
`;try{let n=[],a=N(),c=N();a.set1ModuleToothNumber(t.module,t.N1),c.set1ModuleToothNumber(t.module,t.N2),a.set2CenterPosition(t.c1x,t.c1y);let l=i(t.angleCenterCenter),[u,f,p]=P(a,c,l,t.addInterAxis);c.set2CenterPosition(u,f),a.set3CircleRadius(t.ah1,t.dh1,t.bh1,t.bRound1),c.set3CircleRadius(t.ah2,t.dh2,t.bh2,t.bRound2);let[m,h,g,_]=F(a,c,t.brr1,t.blr1,t.brr2,t.blr2,t.rightPressureAngle,t.leftPressureAngle,t.involSym,t.involROpt,t.involLOpt);r.logstr+=`base-circles: brr1: ${m.toFixed(2)} blr1: ${h.toFixed(2)} brr2: ${g.toFixed(2)} blr2: ${_.toFixed(2)}
|
|
23
|
+
`,a.set4BaseCircles(m,h),c.set4BaseCircles(g,_),a.set5AddendumThickness(t.at1),c.set5AddendumThickness(t.at2);let y=i(t.initAngle1)+e*3*a.as/100;a.set6Angles(y,l);let b=L(a,c,y,l,p,t.gw2Position);b.prepare();for(let e of b.getContours())o.addDynamics(e);o.addPoints(b.getContactPoint()),c.set6Angles(b.getInitAngle2(),l+Math.PI),r.logstr+=b.getMsg(),a.set7InvoluteDetails(t.involArcPairs1,t.skinThickness1),c.set7InvoluteDetails(t.involArcPairs2,t.skinThickness2);for(let e of a.getRefCircles())o.addDynamics(e);for(let e of c.getRefCircles())o.addDynamics(e);o.addDynamics(a.getToothRef()),o.addDynamics(c.getToothRef());let x=a.getProfile();if(r.logstr+=a.getMsg(),r.logstr+=x.check(),n.push(x),t.centralAxis===1){let e=R(a.cx,a.cy,t.axisRadius,t.ribNb,t.ribWidth,t.ribHeight,t.ribRound1,t.ribRound2,y);r.logstr+=e.check(),n.push(e)}if(t.hollow===1){let e=a.br,i=t.axisRadius+t.ribHeight,o=e-t.materialHeightExt,s=i+t.materialHeightInt;if(s>o)throw`err902: hollowMaterialInt ${d(s)} bigger than hollowMaterialExt ${d(o)}`;let c=z(a.cx,a.cy,o,s,t.spokeNb,t.spokeWidth,t.spokeRound,y);for(let e of c)r.logstr+=e.check(),n.push(e)}o.addMainOI(n);let C=c.getProfile();r.logstr+=C.check(),o.addSecond(C);let w=[],E=a.ar+t.wheelRadiusExtra;if(t.wheelAxis===1){let e=B(t.wheelHeight,t.wheelMidExtra,t.wheelAxisLength,t.wheelAxisRadius,t.wheelMidRadius,E,t.wheelAxisExtRound,t.wheelAxisIntRound,t.wheelExtraRound,!0),n=B(t.wheelHeight,t.wheelMidExtra,t.wheelAxisLength,t.wheelAxisRadius,t.wheelMidRadius,E,t.wheelAxisExtRound,t.wheelAxisIntRound,t.wheelExtraRound,!1);w.push(e),s.addSecond(n)}else{let e=v(0,-t.wheelHeight/2).addSegStrokeR(0,t.wheelHeight).addSegStrokeR(E,0).addSegStrokeR(0,-t.wheelHeight).closeSegStroke(),n=v(0,-t.wheelHeight/2).addSegStrokeR(0,t.wheelHeight).addSegStrokeR(-E,0).addSegStrokeR(0,-t.wheelHeight).closeSegStroke();w.push(e),s.addSecond(n)}s.addMainOI(w),r.fig={teethProfile:o,axisProfile:s};let D=r.partName,O=t.wheelHeight/2+t.wheelMidExtra+t.wheelAxisLength+10;r.vol={extrudes:[{outName:`subpax_${D}_teethProfile`,face:`${D}_teethProfile`,extrudeMethod:S.eLinearOrtho,length:2*O,rotate:[0,0,0],translate:[0,0,-O]},{outName:`subpax_${D}_axisProfile`,face:`${D}_axisProfile`,extrudeMethod:S.eRotate,rotate:[0,0,0],translate:[0,0,0]}],volumes:[{outName:`pax_${D}`,boolMethod:T.eIntersection,inList:[`subpax_${D}_teethProfile`,`subpax_${D}_axisProfile`]}]},r.logstr+=`gear_wheel drawn successfully!
|
|
24
|
+
`,r.calcErr=!1}catch(e){r.logstr+=e,console.log(e)}return r}var U={pTitle:`Gearwheel`,pDescription:`Gear-system with two wheels`,pDef:V,pGeom:H},W={partName:`gear_bar`,params:[h(`H1`,`mm`,40,1,4e3,1),h(`H2`,`mm`,50,1,4e3,1),h(`radius`,`mm`,10,1,4e3,1),s(`corners`),h(`Rc`,`mm`,10,0,400,1)],paramSvg:{H1:`voila_face.svg`,H2:`voila_face.svg`,radius:`voila_face.svg`,Rc:`voila_face.svg`},sim:{tMax:180,tStep:.5,tUpdate:500}};function G(e,t,n=``){let r=a(W.partName+n),i=x();r.logstr+=`${r.partName} simTime: ${e}
|
|
25
|
+
`;try{let e=[],n=v(-t.H1/2,-t.H2/2).addCornerRounded(t.Rc).addSegStrokeA(t.H1/2,-t.H2/2).addSegStrokeA(t.H1/2,t.H2/2).addCornerRounded(t.Rc).addSegStrokeA(-t.H1/2,t.H2/2).closeSegStroke();e.push(n),e.push(E(0,0,t.radius)),i.addMainOI(e),r.fig={faceVoila:i};let a=r.partName;r.vol={extrudes:[{outName:`subpax_${a}_top`,face:`${a}_faceVoila`,extrudeMethod:S.eLinearOrtho,length:10,rotate:[0,0,0],translate:[0,0,0]}],volumes:[{outName:`pax_${a}`,boolMethod:T.eIdentity,inList:[`subpax_${a}_top`]}]},r.sub={},r.logstr+=`gear_bar drawn successfully!
|
|
26
|
+
`,r.calcErr=!1}catch(e){r.logstr+=e,console.log(e)}return r}var K={pTitle:`Gearbar`,pDescription:`Gear-system with a bar and a wheel`,pDef:W,pGeom:G},q={partName:`gear_ring`,params:[h(`H1`,`mm`,40,1,4e3,1),h(`H2`,`mm`,50,1,4e3,1),h(`radius`,`mm`,10,1,4e3,1),s(`corners`),h(`Rc`,`mm`,10,0,400,1)],paramSvg:{H1:`voila_face.svg`,H2:`voila_face.svg`,radius:`voila_face.svg`,Rc:`voila_face.svg`},sim:{tMax:180,tStep:.5,tUpdate:500}};function J(e,t,n=``){let r=a(q.partName+n),i=x();r.logstr+=`${r.partName} simTime: ${e}
|
|
27
|
+
`;try{let e=[],n=v(-t.H1/2,-t.H2/2).addCornerRounded(t.Rc).addSegStrokeA(t.H1/2,-t.H2/2).addSegStrokeA(t.H1/2,t.H2/2).addCornerRounded(t.Rc).addSegStrokeA(-t.H1/2,t.H2/2).closeSegStroke();e.push(n),e.push(E(0,0,t.radius)),i.addMainOI(e),r.fig={faceVoila:i};let a=r.partName;r.vol={extrudes:[{outName:`subpax_${a}_top`,face:`${a}_faceVoila`,extrudeMethod:S.eLinearOrtho,length:10,rotate:[0,0,0],translate:[0,0,0]}],volumes:[{outName:`pax_${a}`,boolMethod:T.eIdentity,inList:[`subpax_${a}_top`]}]},r.sub={},r.logstr+=`gear_ring drawn successfully!
|
|
28
|
+
`,r.calcErr=!1}catch(e){r.logstr+=e,console.log(e)}return r}var ee={pTitle:`Gearring`,pDescription:`Gear-system with a ring and a wheel`,pDef:q,pGeom:J},Y={partName:`gear_epicycloid`,params:[h(`H1`,`mm`,40,1,4e3,1),h(`H2`,`mm`,50,1,4e3,1),h(`radius`,`mm`,10,1,4e3,1),s(`corners`),h(`Rc`,`mm`,10,0,400,1)],paramSvg:{H1:`voila_face.svg`,H2:`voila_face.svg`,radius:`voila_face.svg`,Rc:`voila_face.svg`},sim:{tMax:180,tStep:.5,tUpdate:500}};function te(e,t,n=``){let r=a(Y.partName+n),i=x();r.logstr+=`${r.partName} simTime: ${e}
|
|
29
|
+
`;try{let e=[],n=v(-t.H1/2,-t.H2/2).addCornerRounded(t.Rc).addSegStrokeA(t.H1/2,-t.H2/2).addSegStrokeA(t.H1/2,t.H2/2).addCornerRounded(t.Rc).addSegStrokeA(-t.H1/2,t.H2/2).closeSegStroke();e.push(n),e.push(E(0,0,t.radius)),i.addMainOI(e),r.fig={faceVoila:i};let a=r.partName;r.vol={extrudes:[{outName:`subpax_${a}_top`,face:`${a}_faceVoila`,extrudeMethod:S.eLinearOrtho,length:10,rotate:[0,0,0],translate:[0,0,0]}],volumes:[{outName:`pax_${a}`,boolMethod:T.eIdentity,inList:[`subpax_${a}_top`]}]},r.sub={},r.logstr+=`gear_epicycloid drawn successfully!
|
|
30
|
+
`,r.calcErr=!1}catch(e){r.logstr+=e,console.log(e)}return r}var ne={pTitle:`Gear-epicycloid`,pDescription:`The epicycloid gear system`,pDef:Y,pGeom:te};function re(e){let t=``,n=e.PHD1/2,r=e.PHD5/2,i=2*Math.asin(e.PHR4/n),a=2*Math.asin(e.PHL2/(2*r)),s=2*Math.PI/e.PHN1-a,c=e.PHL2/2,l=Math.sqrt(r**2-c**2)-n,u=Math.sqrt(c**2+l**2),f=Math.acos(l/u),p=Math.acos(e.PHR4/u),m=Math.PI-f-p;if(r<n+e.PHR4)throw`err211: PHD5 ${e.PHD5} too small compare to PHD1 ${e.PHD1} or PHR4 ${e.PHR4}`;if(s<a)throw`err212: PHL2 ${e.PHL2} too large compare to PHN1 ${e.PHN1}`;if(e.PHD3>2*e.PHR4)throw`err213: PHD3 ${e.PHD3} too large compare to PHR4 ${e.PHR4}`;m>Math.PI/2-i&&(t+=`warn345: PHL2 is quiet small ${d(e.PHL2)} mm
|
|
31
|
+
`),t+=`petal angle: ${d(w(a))} degree
|
|
32
|
+
`,t+=`hollow angle: ${d(w(s))} degree
|
|
33
|
+
`;let h=o(0,0),g=o(r,0).rotate(h,-a/2),_=o(n,0),y=o(n-e.PHR4,0),b=y.rotate(_,m),x=y.rotate(_,-m),S=v(g.cx,g.cy).addCornerRounded(e.PHR6).addSegStrokeA(b.cx,b.cy).addPointA(n-e.PHR4,0).addPointA(x.cx,x.cy).addSegArc2().addSegStrokeAP(a/2,r).addCornerRounded(e.PHR6).addPointAP(a/2+s/2,r).addPointAP(a/2+s,r).addSegArc2(),C=v(g.cx,g.cy),T=[...Array(e.PHN1).keys()].map(e=>e*(a+s));for(let e of T)C.addPartial(S.rotate(0,0,e));return[t,C,T]}function ie(e){let t=e.D1/2,n=e.D2/2,r=e.D4/2,i=2*Math.PI/e.N1,a=e.L1/2,s=Math.sqrt(n**2-a**2),c=Math.asin(a/n),l=t-s,u=Math.atan2(a,l),d=Math.sqrt(a**2+l**2),f=u+Math.acos(r/d),p=(i-2*c)/2;if(p<0)throw`err464: N1 ${e.N1} is too large compare to D2 ${e.D2}, L1 ${e.L1}`;if(t<n)throw`err465: D2 ${e.D2} is too large compare to D1 ${e.D1}`;let m=v(s,-a),h=o(0,0),g=o(n,0),_=o(t,0),y=o(t-r,0).rotate(_,f),b=g.rotate(h,c+p),x=g.rotate(h,i-c),S=v(s,-a).addCornerRounded(e.R5).addSegStrokeA(y.cx,y.cy).addPointA(t+r,0).addPointA(y.cx,-y.cy).addSegArc2().addSegStrokeA(s,a).addCornerRounded(e.R5).addPointA(b.cx,b.cy).addPointA(x.cx,x.cy).addSegArc2();for(let t=0;t<e.N1;t++)m.addPartial(S.rotate(0,0,t*i));return[``,m,i]}function ae(e,t){let n=``,r=e.SD2/2,i=r+e.SE1,a=2*i,o=!1,s=-r,c=-i;if(t&&(o=!0,s=i,c=r),e.SL2<i)throw`err421: SL2 ${e.SL2} is too small compare to SD2 ${e.SD2} and SE1 ${e.SE1}`;n+=`info309: spring height: ${d(e.SL1+a)} length: ${d(e.SN1*2*(e.SD2+e.SE1))}
|
|
34
|
+
`;let l=v(0,0);for(let t=0;t<e.SN1;t++)l.addSegStrokeR(0,-e.SL1).addPointR(2*s,0).addSegArc(Math.abs(s),!1,o),t<e.SN1-1?l.addSegStrokeR(0,e.SL1).addPointR(2*c,0).addSegArc(Math.abs(c),!1,!o):e.Send===1?l.addSegStrokeR(0,e.SL2):l.addSegStrokeR(0,e.SL2-i).addPointR(2*c,0).addSegArc(Math.abs(c),!1,!o);e.Send===1?l.addSegStrokeR(-e.SE1,0):l.addSegStrokeR(e.SE1,0);for(let t=0;t<e.SN1;t++)t>0?l.addPointR(-2*s,0).addSegArc(Math.abs(s),!1,o).addSegStrokeR(0,-e.SL1):e.Send===1?l.addSegStrokeR(0,-e.SL2):l.addPointR(-2*s,0).addSegArc(Math.abs(s),!1,o).addSegStrokeR(0,-e.SL2+i),l.addPointR(-2*c,0).addSegArc(Math.abs(c),!1,!o).addSegStrokeR(0,e.SL1);return[n,l]}function X(e){let t=``,n=e.D6/2,r=2*Math.PI/e.N2,a=e.E2/2,s=2*Math.asin(a/n),c=(r-s)/2,l=(e.N2<3?0:Math.PI/e.N2)+i(e.SA1),u=Math.PI/2-l,d=-Math.PI/2+l,f=e.SD1/2;if(c<0)throw`err564: N2 ${e.N2} is too large compare to D6 ${e.D6}, E2 ${e.E2}`;if(e.orientation===2&&e.N2%2==1)throw`err565: N2 ${e.N2} is odd and orientation is alt`;let[p,m]=ae(e,!1),[,h]=ae(e,!0);t+=p;let g=o(0,-n),_=o(0,0),y=g.rotate(_,s),b=g.translate(0,e.L2),x=b.translate(-f,0),S=x.translate(0,f),C=x.translate(0,f+e.SE1),w=C.rotate(x,u),T=b.translate(0,f+e.SE1).translate(e.SE1,0),E=g.rotate(_,-s),D=b.translate(f,0),O=D.translate(0,f),k=O.rotate(D,d),A=D.translate(0,f+e.SE1),j=b.translate(0,f+e.SE1).translate(-e.SE1,0),M=v(y.cx,y.cy).addSegStrokeA(T.cx,T.cy).addSegStrokeA(C.cx,C.cy),N=v(C.cx,C.cy).addPointA(w.cx,w.cy).addSegArc(f+e.SE1,!1,!0);N.addPartial(m.rotate(0,0,-l).translate(w.cx,w.cy)),N.addPointA(S.cx,S.cy).addPointA(b.cx,b.cy).addSegArc2().addSegStrokeA(g.cx,g.cy),M.addPartial(N);let P=v(g.cx,g.cy).addSegStrokeA(b.cx,b.cy).addPointA(O.cx,O.cy).addPointA(k.cx,k.cy).addSegArc2();P.addPartial(h.rotate(0,0,l).translate(k.cx,k.cy)),P.addPointA(A.cx,A.cy).addSegArc(f+e.SE1,!1,!0);let F=v(A.cx,A.cy).addSegStrokeA(j.cx,j.cy).addSegStrokeA(E.cx,E.cy),I=v(g.cx,g.cy).addPartial(P).addPartial(F),L=v(n,0);if(e.orientation===2)for(let t=0;t<e.N2/2;t++){L.addPointAP(-2*t*r-2*c,n).addPointAP(-2*t*r-4*c,n).addSegArc2(),L.addCornerRounded(e.R7);let i=Math.PI/2-(2*t+2)*r,a=i+2*s;L.addPartial(P.rotate(0,0,a));let o=N.rotate(0,0,i),l=o.getFirstPoint();L.addCornerRounded(e.R7),L.addSegStrokeA(l.cx,l.cy),L.addCornerRounded(e.R7),L.addPartial(o),L.addCornerRounded(e.R7)}else for(let t=0;t<e.N2;t++)L.addPointAP(-t*r-c,n).addPointAP(-t*r-2*c,n).addSegArc2().addCornerRounded(e.R7),e.orientation===0?L.addPartial(I.rotate(0,0,Math.PI/2-(t+1)*r+s)):e.orientation===1&&L.addPartial(M.rotate(0,0,Math.PI/2-(t+1)*r)),L.addCornerRounded(e.R7);return[t,L]}var Z={partName:`vaxis_holder`,params:[h(`PHD1`,`mm`,700,1,2e3,1),h(`PHD2`,`mm`,900,1,4e3,1),h(`PHD5`,`mm`,800,1,4e3,1),h(`PHN1`,`holes`,6,1,24,1),s(`screw holes`),h(`PHD3`,`mm`,40,1,100,1),h(`PHR4`,`mm`,40,1,100,1),h(`PHL2`,`mm`,120,1,400,1),h(`PHR6`,`mm`,20,0,400,1),s(`section`),h(`PHE1`,`mm`,10,1,80,1),h(`PHH1`,`mm`,50,1,200,1),h(`PHA`,`degree`,5,-45,45,.1),h(`PHL1`,`mm`,300,1,500,1),h(`PHE2`,`mm`,10,1,80,1),h(`PHE3`,`mm`,10,1,80,1),s(`for reuse`),k(`withOuterCone`,!0)],paramSvg:{PHD1:`vaxis_holder_top.svg`,PHD2:`vaxis_holder_top.svg`,PHD5:`vaxis_holder_top.svg`,PHD3:`vaxis_holder_top.svg`,PHR4:`vaxis_holder_top.svg`,PHN1:`vaxis_holder_top.svg`,PHL2:`vaxis_holder_top.svg`,PHR6:`vaxis_holder_top.svg`,PHE1:`vaxis_holder_section.svg`,PHH1:`vaxis_holder_section.svg`,PHA:`vaxis_holder_section.svg`,PHL1:`vaxis_holder_section.svg`,PHE2:`vaxis_holder_section.svg`,PHE3:`vaxis_holder_top.svg`,withOuterCone:`vaxis_holder_section.svg`},sim:{tMax:180,tStep:.5,tUpdate:500}};function oe(e,t,n=``){let r=a(Z.partName+n),s=x(),c=x(),l=x(),u=x(),f=x();r.logstr+=`${r.partName} simTime: ${e}
|
|
35
|
+
`;try{let e=i(t.PHA),n=t.PHD1/2,a=t.PHD2/2,p=t.PHD3/2,m=t.PHD5/2,h=a+t.PHL1/2*Math.sin(e),_=a-t.PHL1/2*Math.sin(e),y=t.PHL1*Math.cos(e),b=a-t.PHE2/Math.cos(e)+t.PHE1/2*Math.tan(e),x=a-t.PHE2/Math.cos(e)-t.PHE1/2*Math.tan(e),C=Math.min(b,x),w=(t.PHL1-t.PHE1/Math.cos(e))/2,D=a-t.PHE2/Math.cos(e);if(C<m)throw`err210: PHD5 ${t.PHD5} too large compare to PHE2 ${t.PHE2} or PHA ${t.PHA}`;r.logstr+=`vaxis_holder's height: ${d(y)} mm
|
|
36
|
+
`,r.logstr+=`vaxis_holder outerD1: ${d(2*h)} mm
|
|
37
|
+
`,r.logstr+=`vaxis_holder outerD2: ${d(2*_)} mm
|
|
38
|
+
`,r.logstr+=`vaxis_holder innerD: ${d(t.PHD1-2*t.PHR4)} mm
|
|
39
|
+
`,r.logstr+=`vaxis_holder D2-next: ${d(2*D)} mm
|
|
40
|
+
`;let O=function(n){let r=m+(b-m)/2;return v(n*r,-t.PHE1/2).addSegStrokeR(n*(b-r),0).addSegStrokeRP(-Math.PI/2+n*e,w).addSegStrokeRP(-Math.PI/2+n*(Math.PI/2+e),t.PHE2).addSegStrokeRP(Math.PI/2+n*e,t.PHL1).addSegStrokeRP(Math.PI/2+n*(Math.PI/2+e),t.PHE2).addSegStrokeRP(-Math.PI/2+n*e,w).addSegStrokeA(n*r,t.PHE1/2).closeSegStroke()},k=function(e){return v(e*C,-t.PHE1/2).addSegStrokeA(e*C,t.PHE1/2).addSegStrokeA(e*(n-t.PHR4),t.PHE1/2).addSegStrokeA(e*(n-t.PHR4),-t.PHE1/2).closeSegStroke()},A=function(e){return v(e*(n+p),-t.PHE1/2).addSegStrokeA(e*(n+p),t.PHE1/2).addSegStrokeA(e*(n-p),t.PHE1/2).addSegStrokeA(e*(n-p),-t.PHE1/2).closeSegStroke()};s.addMainO(O(1)),s.addSecond(O(-1)),s.addSecond(k(1)),s.addSecond(A(1)),s.addSecond(k(-1)),s.addSecond(A(-1));let j=function(r){return v(r*(n+t.PHR4),-t.PHE1/2).addSegStrokeA(r*b,-t.PHE1/2).addSegStrokeRP(-Math.PI/2+r*e,w).closeSegStroke()},M=function(r){return v(r*(n+t.PHR4),t.PHE1/2).addSegStrokeA(r*x,t.PHE1/2).addSegStrokeRP(Math.PI/2+r*e,w).addSegStrokeA(r*(n+t.PHR4),t.PHE1/2+t.PHH1).closeSegStroke()};s.addSecond(j(-1)),s.addSecond(M(-1)),l.mergeFigure(s,!0),u.mergeFigure(s,!0),f.mergeFigure(s,!0),s.addSecond(j(1)),s.addSecond(M(1)),l.addMainO(j(1)),l.addSecond(M(1)),u.addSecond(j(1)),u.addMainO(M(1)),f.addMainO(function(r){let i=o(r*x,t.PHE1/2).translatePolar(Math.PI/2+r*e,w),s=o(r*b,-t.PHE1/2).translatePolar(-Math.PI/2+r*e,w);return v(r*(a-t.PHE2/2),0).addSegStrokeA(i.cx,i.cy).addSegStrokeA(r*(n+t.PHR4),t.PHE1/2+t.PHH1).addSegStrokeA(r*(n+t.PHR4),t.PHE1/2).addSegStrokeA(r*(n+t.PHR4),-t.PHE1/2).addSegStrokeA(s.cx,s.cy).closeSegStroke()}(1));let N=[];N.push(E(0,0,C)),c.addSecond(E(0,0,a)),c.addSecond(E(0,0,Math.max(h,_)));let[P,F,I]=re(t);r.logstr+=P,N.push(F);for(let e of I){let r=o(0,0).translatePolar(e,n);N.push(E(r.cx,r.cy,t.PHD3/2))}let L=v(n+t.PHR4,-t.PHE3).addSegStrokeA(C,-t.PHE3).addSegStrokeA(C,t.PHE3).addSegStrokeA(n+t.PHR4,t.PHE3).closeSegStroke();for(let e of I)c.addSecond(L.rotate(0,0,e));c.addMainOI(N),r.fig={facePetal:c,faceOuter:s,faceButtress1:l,faceButtress2:u,faceButtress12:f};let R=r.partName,z=g();z.addRotation(Math.PI/2,0,0),z.addTranslation(0,t.PHE3/2,0);let B=I.map((e,n)=>{let r=g(z.getMatrix());return r.addRotation(0,0,e),{outName:`subpax_${R}_b2_${n}`,face:`${R}_faceButtress12`,extrudeMethod:S.eLinearOrtho,length:t.PHE3,rotate:r.getRotation(),translate:r.getTranslation()}}),V=I.map((e,t)=>`subpax_${R}_b2_${t}`),H=t.withOuterCone?[`subpax_${R}_outer`]:[];r.vol={extrudes:[{outName:`subpax_${R}_outer`,face:`${R}_faceOuter`,extrudeMethod:S.eRotate,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${R}_petal`,face:`${R}_facePetal`,extrudeMethod:S.eLinearOrtho,length:t.PHE1,rotate:[0,0,0],translate:[0,0,-t.PHE1/2]},...B],volumes:[{outName:`pax_${R}`,boolMethod:T.eUnion,inList:[`subpax_${R}_petal`,...H,...V]}]},r.sub={},r.logstr+=`vaxis_holder drawn successfully!
|
|
41
|
+
`,r.calcErr=!1}catch(e){r.logstr+=e,console.log(e)}return r}var se={pTitle:`Heliostat vaxis_holder`,pDescription:`The holders of the guidance mechanism for azimuth motion`,pDef:Z,pGeom:oe},ce={partName:`pole_static`,params:[h(`D1`,`mm`,1e3,20,4e3,1),h(`D2`,`mm`,700,10,4e3,1),h(`D3`,`mm`,800,10,4e3,1),h(`H1`,`mm`,3e3,10,4e4,10),h(`H2`,`mm`,7e3,50,4e4,10),s(`thickness`),h(`E1`,`mm`,30,1,80,1),h(`E2`,`mm`,5,1,80,1),s(`base holes`),h(`N1`,``,32,3,100,1),h(`D5`,`mm`,40,1,100,1),h(`L1`,`mm`,45,1,300,1),s(`door`),h(`D4`,`mm`,600,1,1200,1),h(`H3`,`mm`,300,5,1200,1),h(`H4`,`mm`,1800,10,2500,1),h(`L2`,`mm`,30,1,100,1),h(`E3`,`mm`,40,1,100,1),s(`holders`),k(`holders`,!0),h(`PHL1A`,`mm`,400,1,1e3,1),h(`PHL1B`,`mm`,400,1,1e3,1),h(`PHB`,`mm`,5e3,1,2e4,1),h(`PHD1A`,`mm`,600,1,4e3,1),h(`PHD1B`,`mm`,380,1,4e3,1),h(`PHN1AB`,`petal`,6,1,24,1),s(`holder-B`),h(`PHD5B2`,`mm`,600,1,4e3,1),h(`PHD5B1`,`mm`,600,1,4e3,1),h(`PHR4B`,`mm`,30,1,400,1),h(`PHD3B`,`mm`,40,1,400,1),h(`PHL2B`,`mm`,140,1,400,1),h(`PHE3B`,`mm`,10,1,50,1),h(`PHR6B`,`mm`,20,0,400,1),h(`PHE1B`,`mm`,10,1,50,1),h(`PHH1B`,`mm`,10,1,50,1),s(`holder-A`),h(`PHD5A`,`mm`,900,1,4e3,1),h(`PHR4A`,`mm`,30,1,400,1),h(`PHD3A`,`mm`,40,1,400,1),h(`PHL2A`,`mm`,200,1,400,1),h(`PHE3A`,`mm`,10,1,50,1),h(`PHR6A`,`mm`,20,0,400,1),h(`PHE1A`,`mm`,10,1,50,1),h(`PHH1A`,`mm`,10,1,50,1)],paramSvg:{D1:`pole_stator_cut.svg`,D2:`pole_stator_cut.svg`,D3:`pole_stator_cut.svg`,H1:`pole_stator_cut.svg`,H2:`pole_stator_cut.svg`,E1:`pole_stator_cut.svg`,E2:`pole_stator_E2.svg`,N1:`pole_stator_bottom.svg`,D5:`pole_stator_bottom.svg`,L1:`pole_stator_bottom.svg`,D4:`pole_stator_face.svg`,H3:`pole_stator_face.svg`,H4:`pole_stator_face.svg`,L2:`pole_stator_face.svg`,E3:`pole_stator_right.svg`,holders:`pole_stator_holders.svg`,PHL1A:`pole_stator_holders.svg`,PHL1B:`pole_stator_holders.svg`,PHB:`pole_stator_holders.svg`,PHD1A:`pole_stator_holders.svg`,PHD1B:`pole_stator_holders.svg`,PHN1AB:`pole_stator_holderB_top.svg`,PHD5A:`pole_stator_holderB_top.svg`,PHR4A:`pole_stator_holderB_top.svg`,PHD3A:`pole_stator_holderB_top.svg`,PHL2A:`pole_stator_holderB_top.svg`,PHE3A:`pole_stator_holderB_top.svg`,PHR6A:`pole_stator_holderB_top.svg`,PHE1A:`pole_stator_holderB_section.svg`,PHH1A:`pole_stator_holderB_section.svg`,PHD5B1:`pole_stator_holderB_top.svg`,PHD5B2:`pole_stator_holderB_top.svg`,PHR4B:`pole_stator_holderB_top.svg`,PHD3B:`pole_stator_holderB_top.svg`,PHL2B:`pole_stator_holderB_top.svg`,PHE3B:`pole_stator_holderB_top.svg`,PHR6B:`pole_stator_holderB_top.svg`,PHE1B:`pole_stator_holderB_section.svg`,PHH1B:`pole_stator_holderB_section.svg`},sim:{tMax:180,tStep:.5,tUpdate:500}};function Q(e,t,n=``){let i=a(ce.partName+n),o=x(),s=x(),c=x(),u=x(),f=x(),p=x(),m=x(),h=x(),g=x(),_=x(),y=x();i.logstr+=`${i.partName} simTime: ${e}
|
|
42
|
+
`;try{let e=t.D1/2,n=t.D2/2,a=t.D3/2,x=t.H1+t.H2,C=Math.atan2(e-n,t.H2),D=t.E2*Math.tan(C/2),k=t.H1-D,A=t.PHL1B/Math.cos(C),j=n+t.PHL1B/2*Math.tan(C),M=t.H1+t.H2-t.PHL1B/2,N=n+(t.PHL1B/2+t.PHB)*Math.tan(C),P=t.H1+t.H2-t.PHL1B/2-t.PHB,F=t.PHL1A/Math.cos(C),I=e-t.PHL1A/2*Math.tan(C),L=t.H1+t.PHL1A/2;if(n>e)throw`err091: D2 ${t.D2} is larger than D1 ${t.D1}`;if(a+t.E2>e)throw`err095: D3 ${t.D3} and E2 ${t.E2} are too large compare to D1 ${t.D1}`;if(t.holders){if(t.PHB<t.PHL1B)throw`err131: PHB ${t.PHB} is too small compare to PHL1B ${t.PHL1B}`;if(t.PHB>t.H2-t.PHL1B-t.PHL1A)throw`err132: PHB ${t.PHB} is too large compare to H2 ${t.H2}, PHL1B ${t.PHL1B} and PHL1A ${t.PHL1A}`}i.logstr+=`pole-height: ${d(x)} mm
|
|
43
|
+
`,i.logstr+=`cone-half-angle: ${d(w(C))} degree
|
|
44
|
+
`,i.logstr+=`holder position: A: ${d(L)} B1: ${d(P)} B2: ${d(M)} mm
|
|
45
|
+
`;let R=function(e){let r=n-t.E2*Math.cos(C);return r+=(x-t.E2*Math.sin(C)-e)*Math.tan(C),r},z=function(r,i){let o=v(r*e,0).addSegStrokeA(r*e,t.H1).addSegStrokeA(r*n,x).addSegStrokeR(-r*t.E2*Math.cos(C),-t.E2*Math.sin(C));if(i&&t.holders){let e=t.H1+t.PHL1A/2-t.PHE1A/2,n=e+t.PHE1A,i=x-t.PHL1B/2+t.PHE1B/2,a=i-t.PHE1B,s=i-t.PHB,c=s-t.PHE1B;o.addSegStrokeA(r*R(i),i).addSegStrokeA(r*(t.PHD1B/2-t.PHR4B),i).addSegStrokeA(r*(t.PHD1B/2-t.PHR4B),a).addSegStrokeA(r*R(a),a).addSegStrokeA(r*R(s),s).addSegStrokeA(r*(t.PHD1B/2-t.PHR4B),s).addSegStrokeA(r*(t.PHD1B/2-t.PHR4B),c).addSegStrokeA(r*R(c),c).addSegStrokeA(r*R(n),n).addSegStrokeA(r*(t.PHD1A/2-t.PHR4A),n).addSegStrokeA(r*(t.PHD1A/2-t.PHR4A),e).addSegStrokeA(r*R(e),e)}return o.addSegStrokeA(r*(e-t.E2),k),i?o.addSegStrokeA(r*(e-t.E2),t.E1).addSegStrokeA(r*a,t.E1).addSegStrokeA(r*a,0):o.addSegStrokeA(r*(e-t.E2),0),o.closeSegStroke(),o};o.addMainO(z(1,!1)),o.addSecond(z(1,!0)),o.addSecond(z(-1,!0));let B=t.D4/2,V=t.H4-2*B;if(V<0)throw`err121: H4 ${t.H4} is too small compare to D4 ${t.D4}`;if(B-t.L2<0)throw`err121: D4 ${t.D4} is too small compare to L2 ${t.L2}`;let H=function(e){let n=B-e;return O(0,t.H3+B-n,2*n,V+2*n,Math.PI/2)};s.addMainOI([H(0),H(t.L2)]);let U=v(e,0).addSegStrokeA(e,t.H1).addSegStrokeA(n,x).addSegStrokeA(-n,x).addSegStrokeA(-e,t.H1).addSegStrokeA(-e,0).closeSegStroke();s.addSecond(U);let W=v(-e,t.H3).addSegStrokeR(0,t.H4).addSegStrokeR(-t.E3,0).addSegStrokeR(0,-t.H4).closeSegStroke();s.addSecond(W);let G=[];G.push(E(0,0,e)),G.push(E(0,0,a));let K=a+t.L1,q=2*Math.PI/t.N1;for(let e=0;e<t.N1;e++){let n=K*Math.cos(e*q),r=K*Math.sin(e*q);G.push(E(n,r,t.D5/2))}c.addSecond(E(0,0,n)),c.addSecond(E(0,0,e-t.E2)),c.addMainOI(G),u.addMainOI([E(0,0,e+t.E3),E(0,0,e-t.E2)]),f.addMainO(H(t.L2));let J=i.partName,ee=[],Y=[],te={};if(t.holders){let e=r(se.pDef,`B2`);e.setVal(`PHD1`,t.PHD1B),e.setVal(`PHD2`,2*j),e.setVal(`PHD5`,t.PHD5B2),e.setVal(`PHN1`,t.PHN1AB),e.setVal(`PHD3`,t.PHD3B),e.setVal(`PHR4`,t.PHR4B),e.setVal(`PHL2`,t.PHL2B),e.setVal(`PHR6`,t.PHR6B),e.setVal(`PHE1`,t.PHE1B),e.setVal(`PHH1`,t.PHH1B),e.setVal(`PHA`,w(C)),e.setVal(`PHL1`,A),e.setVal(`PHE2`,t.E2),e.setVal(`PHE3`,t.PHE3B),e.setVal(`withOuterCone`,1);let n=se.pGeom(0,e.getParamVal(),e.getSuffix());b(n),i.logstr+=l(n.logstr,e.getPartNameSuffix()),p.mergeFigure(n.fig.faceOuter),m.mergeFigure(n.fig.facePetal);let a={outName:`inpax_${J}_hB2`,subdesign:`pax_vaxis_holderB2`,subgeom:n,rotate:[0,0,0],translate:[0,0,M]};ee.push(a),Y.push(`inpax_${J}_hB2`);let o=r(se.pDef,`B1`);o.setVal(`PHD1`,t.PHD1B),o.setVal(`PHD2`,2*N),o.setVal(`PHD5`,t.PHD5B1),o.setVal(`PHN1`,t.PHN1AB),o.setVal(`PHD3`,t.PHD3B),o.setVal(`PHR4`,t.PHR4B),o.setVal(`PHL2`,t.PHL2B),o.setVal(`PHR6`,t.PHR6B),o.setVal(`PHE1`,t.PHE1B),o.setVal(`PHH1`,t.PHH1B),o.setVal(`PHA`,w(C)),o.setVal(`PHL1`,A),o.setVal(`PHE2`,t.E2),o.setVal(`PHE3`,t.PHE3B),o.setVal(`withOuterCone`,1);let s=se.pGeom(0,o.getParamVal(),o.getSuffix());b(s),i.logstr+=l(s.logstr,o.getPartNameSuffix()),h.mergeFigure(s.fig.faceOuter),g.mergeFigure(s.fig.facePetal);let c={outName:`inpax_${J}_hB1`,subdesign:`pax_vaxis_holderB1`,subgeom:s,rotate:[0,0,0],translate:[0,0,P]};ee.push(c),Y.push(`inpax_${J}_hB1`);let u=r(se.pDef,`A`);u.setVal(`PHD1`,t.PHD1A),u.setVal(`PHD2`,2*I),u.setVal(`PHD5`,t.PHD5A),u.setVal(`PHN1`,t.PHN1AB),u.setVal(`PHD3`,t.PHD3A),u.setVal(`PHR4`,t.PHR4A),u.setVal(`PHL2`,t.PHL2A),u.setVal(`PHR6`,t.PHR6A),u.setVal(`PHE1`,t.PHE1A),u.setVal(`PHH1`,t.PHH1A),u.setVal(`PHA`,w(C)),u.setVal(`PHL1`,F),u.setVal(`PHE2`,t.E2),u.setVal(`PHE3`,t.PHE3A),u.setVal(`withOuterCone`,1);let d=se.pGeom(0,u.getParamVal(),u.getSuffix());b(d),i.logstr+=l(d.logstr,u.getPartNameSuffix()),_.mergeFigure(d.fig.faceOuter),y.mergeFigure(d.fig.facePetal);let f={outName:`inpax_${J}_hA`,subdesign:`pax_vaxis_holderA`,subgeom:d,rotate:[0,0,0],translate:[0,0,L]};ee.push(f),Y.push(`inpax_${J}_hA`),te={vaxis_holder_B2:{partName:e.getPartName(),dparam:e.getDesignParamList(),orientation:[0,0,0],position:[0,0,M]},vaxis_holder_B1:{partName:o.getPartName(),dparam:o.getDesignParamList(),orientation:[0,0,0],position:[0,0,P]},vaxis_holder_A:{partName:u.getPartName(),dparam:u.getDesignParamList(),orientation:[0,0,0],position:[0,0,L]}}}i.fig={poleCut:o,poleFace:s,poleBottom:c,emptyPole:u,emptyDoor:f,holderB2Section:p,holderB2Top:m,holderB1Section:h,holderB1Top:g,holderASection:_,holderATop:y},i.vol={inherits:ee,extrudes:[{outName:`subpax_${J}_pole`,face:`${J}_poleCut`,extrudeMethod:S.eRotate,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${J}_bottom`,face:`${J}_poleBottom`,extrudeMethod:S.eLinearOrtho,length:t.E1,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${J}_door`,face:`${J}_poleFace`,extrudeMethod:S.eLinearOrtho,length:e+t.E3,rotate:[Math.PI/2,0,0],translate:[0,0,0]},{outName:`subpax_${J}_emptyPole`,face:`${J}_emptyPole`,extrudeMethod:S.eLinearOrtho,length:t.H1,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${J}_emptyDoor`,face:`${J}_emptyDoor`,extrudeMethod:S.eLinearOrtho,length:e+t.E3+10,rotate:[Math.PI/2,0,0],translate:[0,0,0]}],volumes:[{outName:`ipax_${J}_door`,boolMethod:T.eIntersection,inList:[`subpax_${J}_door`,`subpax_${J}_emptyPole`]},{outName:`ipax_${J}_pole`,boolMethod:T.eSubstraction,inList:[`subpax_${J}_pole`,`subpax_${J}_emptyDoor`]},{outName:`pax_${J}`,boolMethod:T.eUnion,inList:[`ipax_${J}_pole`,`subpax_${J}_bottom`,`ipax_${J}_door`,...Y]}]},i.sub=te,i.logstr+=`pole_static drawn successfully!
|
|
46
|
+
`,i.calcErr=!1}catch(e){i.logstr+=e,console.log(e)}return i}var le={pTitle:`Heliostat pole static`,pDescription:`The vertical pole of an heliostat`,pDef:ce,pGeom:Q},ue={partName:`rake`,params:[h(`D1`,`mm`,600,10,4e3,1),h(`D2`,`mm`,400,10,4e3,1),h(`D3`,`mm`,400,10,4e3,1),h(`H1`,`mm`,800,1,4e3,1),h(`H2`,`mm`,3e3,20,6e3,1),h(`H3`,`mm`,400,0,4e3,1),h(`E1`,`mm`,20,1,80,1),h(`E3`,`mm`,30,1,80,1),s(`transversal`),h(`H4`,`mm`,400,10,1e3,1),h(`D4`,`mm`,300,10,1e3,1),h(`E4`,`mm`,20,1,80,1),h(`H5`,`mm`,1e3,10,2e3,1),h(`D5`,`mm`,200,1,1e3,1),h(`L4`,`mm`,300,1,1e3,1),h(`L5`,`mm`,2e3,10,4e3,1),h(`L6`,`mm`,2e3,1,4e3,1),h(`D8`,`mm`,400,1,1e3,1),s(`diagonal`),h(`D6`,`mm`,100,1,600,1),h(`E6`,`mm`,10,1,80,1),h(`L7`,`mm`,100,1,1e3,1),h(`L8`,`mm`,200,1,1e3,1),s(`base`),h(`N1`,``,24,3,100,1),h(`D7`,`mm`,40,1,100,1),h(`L1`,`mm`,30,1,300,1),s(`door`),h(`H6`,`mm`,100,1,1e3,1),h(`H7`,`mm`,600,10,2e3,1),h(`L9`,`mm`,300,1,1e3,1),h(`R9`,`mm`,50,0,300,1),h(`doorOrientation`,`degree`,0,-180,180,1)],paramSvg:{D1:`rake_face.svg`,D2:`rake_side.svg`,D3:`rake_face.svg`,H1:`rake_face.svg`,H2:`rake_face.svg`,H3:`rake_face.svg`,E1:`rake_face.svg`,E3:`rake_face.svg`,H4:`rake_side.svg`,D4:`rake_side.svg`,E4:`rake_side.svg`,H5:`rake_side.svg`,D5:`rake_side.svg`,L4:`rake_face.svg`,L5:`rake_face.svg`,L6:`rake_face.svg`,D6:`rake_face.svg`,E6:`rake_face.svg`,L7:`rake_face.svg`,L8:`rake_face.svg`,N1:`rake_top.svg`,D7:`rake_top.svg`,L1:`rake_top.svg`,D8:`rake_side.svg`,H6:`rake_door.svg`,H7:`rake_door.svg`,L9:`rake_door.svg`,R9:`rake_door.svg`,doorOrientation:`rake_door.svg`},sim:{tMax:180,tStep:.5,tUpdate:500}};function de(e,t,r=``){let o=a(ue.partName+r),s=x(),c=x(),l=x(),u=x(),f=x(),h=x(),g=x(),_=x(),y=x();o.logstr+=`${o.partName} simTime: ${e}
|
|
47
|
+
`;try{let e=Math.PI/2,r=-Math.PI/2,a=t.D1/2,b=t.D2/2,x=t.D3/2,C=t.D4/2,O=t.D5/2,k=t.D6/2,A=t.D7/2,j=t.D8/2,M=t.D4-2*t.E4,N=t.H1+t.H2,P=N-t.H4+t.H5,F=4*t.L4+t.L5+2*t.L6,I=t.H1+t.H2-t.H4,L=C*Math.cos(Math.PI/6),R=C*Math.sin(Math.PI/6),z=O*Math.cos(Math.PI/6),B=O*Math.sin(Math.PI/6),V=j*Math.cos(Math.PI/6),H=j*Math.sin(Math.PI/6),U=[-F/2,-t.L5/2-t.L4,t.L5/2,F/2-t.L4],W=t.H2-t.L8-t.H4-C,G=Math.atan2(a-b,t.H2),K=F/2-t.L7-a+t.L8*Math.tan(G),q=Math.sqrt(K**2+W**2),J=Math.atan2(K,W),ee=t.E1/Math.sin(J+G),Y=q+t.E4/Math.cos(J)+ee,te=a-t.L8*Math.tan(G)-ee*Math.sin(J),ne=t.H1+t.L8-ee*Math.cos(J),re=te-k*Math.cos(J),ie=ne+k*Math.sin(J),ae=k-t.E6,X=te-t.E6*Math.cos(J),Z=ne+t.E6*Math.sin(J),oe=Math.PI/2-J,se=t.L9/2,ce=se-t.H7*Math.tan(G);if(t.D2>t.D1)throw`err110: D2 ${t.D2} is larger than D1 ${t.D1}`;if(t.D3+t.E1>t.D1)throw`err113: D3 ${t.D3} is too large compare to D1 ${t.D1} and E1 ${t.E1}`;if(t.H3+t.E3>t.H1)throw`err116: H3 ${t.H3} is too large compare to H1 ${t.H1} and E3 ${t.E3}`;if(t.H4+C>t.H2)throw`err119: H4 ${t.H4} is too large compare to H2 ${t.H2} and D4 ${t.D4}`;if(t.E4>C)throw`err122: E4 ${t.E4} is too large compare to D4 ${t.D4}`;if(t.D8<=t.D5)throw`err146: D8 ${t.D8} is too small compare to D5 ${t.D5}`;if(W<0)throw`err140: H2 ${t.H2} too small compare to L8 ${t.L8}, H4 ${t.H4} and D4 ${t.D4}`;if(ce<t.R9)throw`err177: R9 ${t.R9} too large compare to doorHighX ${ce} and L9 ${t.L9}`;if(t.L9>t.D1)throw`err180: L9 ${t.L9} too large compare to D1 ${t.D1}`;if(t.E6>t.D6/2)throw`err197: E6 ${t.E6} is too large compare to D6 ${t.D6}`;o.logstr+=`rake-L4: ${d(t.L4)} mm (compare with swing)
|
|
48
|
+
`,o.logstr+=`rake-L5: ${d(t.L5)} mm (compare with swing)
|
|
49
|
+
`,o.logstr+=`rake-L6: ${d(t.L6)} mm (compare with swing)
|
|
50
|
+
`,o.logstr+=`rake-beamL (4*L4+L5+2*L6): ${d(F)} mm (compare with swing)
|
|
51
|
+
`,o.logstr+=`cone-height: ${d(N)} mm
|
|
52
|
+
`,o.logstr+=`cone-height total: ${d(P)} mm
|
|
53
|
+
`,o.logstr+=`cone-angle: ${d(w(G))} degree
|
|
54
|
+
`,o.logstr+=`wing-angle: ${d(w(J))} degree
|
|
55
|
+
`;let Q=t.E1*Math.cos(G),le=t.E1*Math.sin(G),ue=t.E1*Math.tan(G/2),de=function(e){return v(e*a,0).addSegStrokeA(e*a,t.H1).addSegStrokeA(e*b,N).addSegStrokeA(e*(b-Q),N-le).addSegStrokeA(e*(a-t.E1),t.H1-ue).addSegStrokeA(e*(a-t.E1),0).closeSegStroke()},fe=function(e){return v(e*a,0).addSegStrokeA(e*a,t.H1).addSegStrokeA(e*b,N).addSegStrokeA(e*(b-Q),N-le).addSegStrokeA(e*(a-t.E1),t.H1-ue).addSegStrokeA(e*(a-t.E1),t.H1-t.H3).addSegStrokeA(e*x,t.H1-t.H3).addSegStrokeA(e*x,t.H1-t.H3-t.E3).addSegStrokeA(e*(a-t.E1),t.H1-t.H3-t.E3).addSegStrokeA(e*(a-t.E1),0).closeSegStroke()},pe=I-C-(t.H1-ue),me=a-t.E1-Math.tan(G)*pe,he=v(0,I-C).addSegStrokeA(me,I-C).addSegStrokeA(a-t.E1,t.H1-ue).addSegStrokeA(a-t.E1,t.H1-t.H3).addSegStrokeA(0,t.H1-t.H3).closeSegStroke(),ge=m(-se,t.H1+t.H6,t.L9,2*ce,t.H7,t.R9);s.addMainO(de(1)),s.addSecond(fe(1)),s.addSecond(fe(-1)),s.addSecond(n(-F/2,I,F,t.D4,0)),s.addSecond(n(-F/2,I,F,M,0));for(let e of U)s.addSecond(D(e,I+R,t.L4,t.H5-R-B));s.addSecond(p(te,ne,Y,2*k,oe)),s.addSecond(p(X,Z,Y,2*ae,oe)),s.addSecond(p(-te,ne,2*k,Y,J)),s.addSecond(p(-X,Z,2*ae,Y,J)),s.addSecond(ge),c.mergeFigure(s,!0),c.addMainO(he);let _e=[],ve=v(L,I+R).addSegStrokeA(V,I+t.H5-H).addSegStrokeA(z,I+t.H5-B).addPointA(-z,I+t.H5-B).addSegArc(O,!1,!1).addSegStrokeA(-V,I+t.H5-H).addSegStrokeA(-L,I+R).closeSegArc(C,!1,!1);_e.push(E(0,I,C)),_e.push(E(0,I,C-t.E4)),l.addSecond(fe(1)),l.addSecond(fe(-1)),l.addSecond(ve),l.addSecond(E(0,I+t.H5,O)),l.addSecond(n(0,t.H1+t.L8,W,2*k,e)),l.addSecond(n(0,t.H1+t.L8,W,2*ae,e)),l.addSecond(ge),l.addMainOI(_e),u.addMainO(E(0,I,C-t.E4)),u.addSecond(E(0,I,C)),u.addSecond(ve);let ye=[];ye.push(E(0,0,a)),ye.push(E(0,0,x));let be=x+t.L1,xe=2*Math.PI/t.N1;for(let e=0;e<t.N1;e++){let t=be*Math.cos(e*xe),n=be*Math.sin(e*xe);ye.push(E(t,n,A))}f.addSecond(E(0,0,a-t.E1)),f.addSecond(E(0,0,b)),f.addSecond(n(0,-F/2,F,t.D4,e)),f.addSecond(n(0,-F/2,F,M,e));for(let r of U)f.addSecond(n(0,r,t.L4,2*L,e)),f.addSecond(n(0,r,t.L4,2*z,e)),f.addSecond(n(0,r,t.L4,2*V,e));let Se=a-t.L8*Math.tan(G);f.addSecond(n(0,Se,K,2*k,e)),f.addSecond(n(0,Se,K,2*ae,e)),f.addSecond(n(0,-Se,K,2*k,r)),f.addSecond(n(0,-Se,K,2*ae,r)),f.addMainOI(ye),h.addMainO(ve),h.addSecond(E(0,I,C)),h.addSecond(E(0,I,C-t.E4)),h.addSecond(E(0,I+t.H5,O));let Ce=[];Ce.push(E(0,0,k)),Ce.push(E(0,0,ae)),g.addMainOI(Ce),_.addSecond(E(0,0,k)),_.addMainO(E(0,0,ae)),y.addMainO(ge),y.addSecond(fe(1)),y.addSecond(fe(-1)),y.addSecond(n(-F/2,I,F,t.D4,0)),y.addSecond(n(-F/2,I,F,M,0));for(let e of U)y.addSecond(D(e,I+R,t.L4,t.H5-R-B));y.addSecond(p(te,ne,Y,2*k,oe)),y.addSecond(p(X,Z,Y,2*ae,oe)),y.addSecond(p(-te,ne,2*k,Y,J)),y.addSecond(p(-X,Z,2*ae,Y,J)),o.fig={faceCone:s,faceConeHollow:c,faceBeam:l,faceBeamHollow:u,faceDisc:f,faceHand:h,faceWing:g,faceWingHollow:_,faceDoor:y};let $=o.partName,we=U.map((e,n)=>({outName:`subpax_${$}_hand_${n}`,face:`${$}_faceHand`,extrudeMethod:S.eLinearOrtho,length:t.L4,rotate:[Math.PI/2,0,0],translate:[0,-e,0]}));o.vol={extrudes:[{outName:`subpax_${$}_cone`,face:`${$}_faceCone`,extrudeMethod:S.eRotate,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${$}_coneHollow`,face:`${$}_faceConeHollow`,extrudeMethod:S.eRotate,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${$}_beam`,face:`${$}_faceBeam`,extrudeMethod:S.eLinearOrtho,length:F,rotate:[Math.PI/2,0,0],translate:[0,F/2,0]},{outName:`subpax_${$}_beamHollow`,face:`${$}_faceBeamHollow`,extrudeMethod:S.eLinearOrtho,length:F,rotate:[Math.PI/2,0,0],translate:[0,F/2,0]},{outName:`subpax_${$}_disc`,face:`${$}_faceDisc`,extrudeMethod:S.eLinearOrtho,length:t.E3,rotate:[0,0,0],translate:[0,0,t.H1-t.H3-t.E3]},{outName:`subpax_${$}_wing_right`,face:`${$}_faceWing`,extrudeMethod:S.eLinearOrtho,length:Y,rotate:[-J,0,0],translate:[0,re,ie]},{outName:`subpax_${$}_wing_left`,face:`${$}_faceWing`,extrudeMethod:S.eLinearOrtho,length:Y,rotate:[J,0,0],translate:[0,-re,ie]},{outName:`subpax_${$}_wing_hollow_right`,face:`${$}_faceWingHollow`,extrudeMethod:S.eLinearOrtho,length:Y,rotate:[-J,0,0],translate:[0,re,ie]},{outName:`subpax_${$}_wing_hollow_left`,face:`${$}_faceWingHollow`,extrudeMethod:S.eLinearOrtho,length:Y,rotate:[J,0,0],translate:[0,-re,ie]},{outName:`subpax_${$}_door`,face:`${$}_faceDoor`,extrudeMethod:S.eLinearOrtho,length:t.D1,rotate:[Math.PI/2,0,-Math.PI/2+i(t.doorOrientation)],translate:[0,0,0]},...we],volumes:[{outName:`ipax_${$}_plus`,boolMethod:T.eUnion,inList:[`subpax_${$}_cone`,`subpax_${$}_beam`,`subpax_${$}_disc`,`subpax_${$}_hand_0`,`subpax_${$}_hand_1`,`subpax_${$}_hand_2`,`subpax_${$}_hand_3`,`subpax_${$}_wing_right`,`subpax_${$}_wing_left`]},{outName:`ipax_${$}_hollow`,boolMethod:T.eUnion,inList:[`subpax_${$}_coneHollow`,`subpax_${$}_beamHollow`,`subpax_${$}_wing_hollow_right`,`subpax_${$}_wing_hollow_left`,`subpax_${$}_door`]},{outName:`pax_${$}`,boolMethod:T.eSubstraction,inList:[`ipax_${$}_plus`,`ipax_${$}_hollow`]}]},o.sub={},o.logstr+=`heliostat-rake drawn successfully!
|
|
56
|
+
`,o.calcErr=!1}catch(e){o.logstr+=e,console.log(e)}return o}var fe={pTitle:`Heliostat rake`,pDescription:`The rake on top of the V-Axis of the heliostat`,pDef:ue,pGeom:de},pe={partName:`spider`,params:[h(`D1`,`mm`,100,1,400,1),h(`L1`,`mm`,400,1,1e3,1),h(`L2`,`mm`,400,1,1e3,1),h(`L3`,`mm`,100,1,400,1),h(`L4`,`mm`,3e3,10,8e3,10),s(`longitude`),h(`L5`,`mm`,2e3,1,8e3,1),h(`N1`,``,6,1,20,1),h(`L6`,`mm`,30,1,100,1),s(`thickness`),h(`E1`,`mm`,3,1,80,1),h(`E2`,`mm`,50,1,200,1),h(`E3`,`mm`,3,1,80,1),h(`R2`,`mm`,100,0,400,10)],paramSvg:{D1:`spider_profile.svg`,L1:`spider_profile.svg`,L2:`spider_profile.svg`,L3:`spider_profile.svg`,L4:`spider_profile.svg`,L5:`spider_lateral.svg`,L6:`spider_lateral.svg`,E1:`spider_profile.svg`,E2:`spider_profile.svg`,E3:`spider_profile.svg`,R2:`spider_profile.svg`,N1:`spider_lateral.svg`},sim:{tMax:360,tStep:.5,tUpdate:500}};function me(e,t,n=``){let r=a(pe.partName+n),i,o,s=x(),c=x(),l=x();r.logstr+=`${r.partName} simTime: ${e}
|
|
57
|
+
`;try{let n=t.D1/2;if(t.D1<t.E2)throw`err476: D1 ${t.D1} smaller then E2 ${t.E2}`;let a=t.E2/2,u=Math.sqrt(n**2-a**2),f=t.L1+t.L2*Math.sqrt(2),p=t.L2+t.L1*Math.sqrt(2),m=t.L4-p;if(m<t.R2)throw`err984: L4 ${t.L4} too small compare to R2 ${t.R2}`;let h=m*Math.cos(Math.PI/4),g=m*Math.sin(Math.PI/4),_=t.E2*Math.cos(Math.PI/4),y=t.E2*Math.sin(Math.PI/4),b=t.E2*Math.tan(Math.PI/8);if(n<t.E1)throw`err092: D1 ${t.D1} too small compare to E1 ${t.E1}`;if(t.L3<t.E2)throw`err994: L3 ${t.L3} smaller than E2 ${t.E2}`;if(t.L3<2*t.E3)throw`err997: L3 ${t.L3} too small compare to E3 ${t.E3}`;let x=(t.L3-t.E2)/2*Math.cos(Math.PI/4),C=f+h+x,D=-t.L1-g+x,O=D-t.E3*Math.sqrt(2);if(t.L5<t.N1*t.L6)throw`err110: L5 ${t.L5} too small compare to N1 ${t.N1} and L6 ${t.L6}`;let k=1;t.N1>1&&(k=(t.L5-t.L6)/(t.N1-1));let A=[...Array(t.N1).keys()].map(e=>e*k);i=function(e,t,n){return v(e,t).addSegStrokeA(e+n*Math.cos(Math.PI/4),t-n*Math.sin(Math.PI/4)).addSegStrokeA(e,t-2*n*Math.sin(Math.PI/4)).addSegStrokeA(e-n*Math.cos(Math.PI/4),t-n*Math.sin(Math.PI/4)).closeSegStroke()},o=function(e,t,n,r){return v(n,r).addSegStrokeA(n+e,r).addSegStrokeA(n+e,r+t).addSegStrokeA(n,r+t).closeSegStroke()};let j=Math.sin(2*Math.PI*e/pe.sim.tMax)*Math.PI/2;r.logstr+=`spide leg number: ${t.N1}
|
|
58
|
+
`,r.logstr+=`spide position angle: ${d(w(j))} degree
|
|
59
|
+
`;let M=[],N=v(a,-u).addCornerRounded(t.R2).addSegStrokeA(a,-t.L1).addCornerRounded(t.R2).addSegStrokeA(f,-t.L1).addCornerRounded(t.R2+t.E2).addSegStrokeA(f+h,-t.L1-g).addSegStrokeA(f+h-_,-t.L1-g-y).addSegStrokeA(f-b,-t.L1-t.E2).addCornerRounded(t.R2).addSegStrokeA(-f+b,-t.L1-t.E2).addCornerRounded(t.R2).addSegStrokeA(-f-h+_,-t.L1-g-y).addSegStrokeA(-f-h,-t.L1-g).addSegStrokeA(-f,-t.L1).addCornerRounded(t.R2+t.E2).addSegStrokeA(-a,-t.L1).addCornerRounded(t.R2).addSegStrokeA(-a,-u).addCornerRounded(t.R2).closeSegArc(n,!0,!1);M.push(N),M.push(E(0,0,n-t.E1)),s.addSecond(i(C,D,t.L3)),s.addSecond(i(C,O,t.L3-2*t.E3)),s.addSecond(i(-C,D,t.L3)),s.addSecond(i(-C,O,t.L3-2*t.E3)),s.addMainOI(M),c.addMainOI([E(0,0,n),E(0,0,n-t.E1)]),c.addMainOI([i(C,D,t.L3),i(C,O,t.L3-2*t.E3)]),c.addMainOI([i(-C,D,t.L3),i(-C,O,t.L3-2*t.E3)]),c.addSecond(N),l.addSecond(o(t.L5,t.D1,0,-t.D1/2)),l.addSecond(o(t.L5,t.L3,0,-t.L4-t.L3));for(let e of A)l.addSecond(o(t.L6,t.L4,e,-t.L4));r.fig={faceLegs:s.rotate(0,0,j),faceTube:c.rotate(0,0,j),faceBody:l};let P=r.partName,F=A.map((e,n)=>({outName:`subpax_${P}_leg_${n}`,face:`${P}_faceLegs`,extrudeMethod:S.eLinearOrtho,length:t.L6,rotate:[0,0,0],translate:[0,0,e]})),I=A.map((e,t)=>`subpax_${P}_leg_${t}`);r.vol={extrudes:[{outName:`subpax_${P}_tube`,face:`${P}_faceTube`,extrudeMethod:S.eLinearOrtho,length:t.L5,rotate:[0,0,0],translate:[0,0,0]},...F],volumes:[{outName:`pax_${P}`,boolMethod:T.eUnion,inList:[`subpax_${P}_tube`,...I]}]},r.sub={},r.logstr+=`heliostat-spider drawn successfully!
|
|
60
|
+
`,r.calcErr=!1}catch(e){r.logstr+=e,console.log(e)}return r}var he={pTitle:`Heliostat spider`,pDescription:`The spider part for the control of the inclination of the heliostat`,pDef:pe,pGeom:me},ge={partName:`swing`,params:[h(`L1`,`mm`,12500,100,4e4,1),h(`L2`,`mm`,6e3,100,4e4,1),s(`radial`),h(`D1`,`mm`,400,1,1e3,1),h(`E1`,`mm`,5,1,80,1),h(`H2`,`mm`,100,1,400,1),h(`H4`,`mm`,100,1,400,1),h(`E2`,`mm`,3,1,80,1),h(`L3`,`mm`,500,1,4e3,1),s(`longitudinal`),h(`L4`,`mm`,600,1,4e3,1),h(`L5`,`mm`,2e3,1,1e4,1),h(`L6`,`mm`,2e3,1,1e4,1),h(`H1`,`mm`,100,1,400,1),h(`H3`,`mm`,100,1,400,1),h(`E3`,`mm`,3,1,80,1),s(`buttress`),h(`S1`,`mm`,300,0,3e3,1),h(`S2`,`mm`,10,0,2e3,1),h(`R2`,`mm`,100,0,1e3,1),s(`rod overlay`),h(`rod1`,``,10,1,40,1),h(`rod2`,`mm`,1300,10,4e3,1),h(`rod3`,`mm`,400,10,1e3,1),h(`rod4`,`mm`,100,1,400,1)],paramSvg:{L1:`swing_top.svg`,L2:`swing_top.svg`,L3:`swing_top.svg`,L4:`swing_top.svg`,L5:`swing_top.svg`,L6:`swing_top.svg`,D1:`swing_top.svg`,H1:`swing_top.svg`,H2:`swing_top.svg`,H3:`swing_side.svg`,H4:`swing_side.svg`,E1:`swing_side.svg`,E2:`swing_side.svg`,E3:`swing_face.svg`,S1:`swing_buttress.svg`,S2:`swing_buttress.svg`,R2:`swing_buttress.svg`,rod1:`swing_with_rod.svg`,rod2:`swing_with_rod.svg`,rod3:`swing_with_rod.svg`,rod4:`swing_with_rod.svg`},sim:{tMax:180,tStep:.5,tUpdate:500}};function _e(e,t,n=``){let r=a(ge.partName+n),i=x(),s=x(),c=x(),l=x(),u=x();r.logstr+=`${r.partName} simTime: ${e}
|
|
61
|
+
`;try{let e=t.D1/2,n=e+t.S2,a=4*t.L4+t.L5+2*t.L6-2*t.H1,f=t.L4-2*t.H1,p=t.L5+2*t.H1,m=t.L6+2*t.H1;r.logstr+=`swing size: L1 ${d(t.L1)} x L2 ${d(t.L2)} mm
|
|
62
|
+
`,r.logstr+=`rake-L4: ${d(f)} mm (compare with rake)
|
|
63
|
+
`,r.logstr+=`rake-L5: ${d(p)} mm (compare with rake)
|
|
64
|
+
`,r.logstr+=`rake-L6: ${d(m)} mm (compare with rake)
|
|
65
|
+
`,r.logstr+=`rake-beamL: (4*L4+L5+2*L6-2*H1) ${d(a)} mm (compare with rake)
|
|
66
|
+
`,i.addMainOI([E(0,0,e),E(0,0,e-t.E1)]);let h=[-t.L2/2,-t.L3-t.H2,t.L3,t.L2/2-t.H2];for(let e of h)i.addMainOI([D(e,n-t.H4,t.H2,t.H4),D(e+t.E2,n-t.H4+t.E2,t.H2-2*t.E2,t.H4-2*t.E2)]);i.addSecond(D(-t.L2/2,n,t.L2,t.H3));let g=[];g.push(-t.L1/2),g.push(t.L1/2-t.H1);for(let e of[-t.L5/2-2*t.L4-t.L6,-t.L5/2-t.L4,t.L5/2,t.L5/2+t.L4+t.L6])for(let n of[0,t.L4-t.H1])g.push(e+n);for(let e of g)s.addMainOI([D(e,n,t.H1,t.H3),D(e+t.E3,n+t.E3,t.H1-2*t.E3,t.H3-2*t.E3)]);s.addSecond(D(-t.L1/2,-e,t.L1,t.D1)),s.addSecond(D(-t.L1/2,n-t.H4,t.L1,t.H4));for(let e of g)c.addSecond(D(e,-t.L2/2,t.H1,t.L2));for(let e of h)c.addSecond(D(-t.L1/2,e,t.L1,t.H2));c.addSecond(D(-t.L1/2,-e,t.L1,t.D1));let _=Math.sqrt(n**2+t.S1**2),y=Math.acos(e/_),b=Math.atan2(t.S1,n),x=o(0,0),C=x.translatePolar(Math.PI/2+b,e).rotate(x,y),w=v(-t.L3,n).addSegStrokeA(-t.S1,n).addCornerRounded(t.R2).addSegStrokeA(C.cx,C.cy).addPointA(0,-e).addPointA(-C.cx,C.cy).addSegArc2().addSegStrokeA(t.S1,n).addCornerRounded(t.R2).addSegStrokeA(t.L3,n).addSegStrokeA(t.L3,n+t.E3).addSegStrokeA(-t.L3,n+t.E3).closeSegStroke();l.addMainOI([w,E(0,0,e-t.E1)]),i.addSecond(w);for(let e of g)u.addMainO(D(e,-t.L2/2,t.H1,t.L2));for(let e of h)u.addMainO(D(-t.L1/2,e,t.L1,t.H2));u.addMainO(D(-t.L1/2,-e,t.L1,t.D1));let O=-((t.rod1-1)*t.rod2+t.rod3)/2,k=(t.rod3-t.rod4)/2,A=t.rod3/2,j=1.2*t.L2,M=(j-A)/3,N=-j/2;for(let e=0;e<t.rod1;e++){let n=O+e*t.rod2;u.addSecond(D(n+k,N,t.rod4,j));for(let e=0;e<4;e++)u.addSecond(D(n,N+e*M,t.rod3,A,A/4))}r.fig={faceSide:i,faceFace:s,faceTop:c,faceButtress:l,faceTopWithRods:u};let P=r.partName;r.vol={extrudes:[{outName:`subpax_${P}_side`,face:`${P}_faceSide`,extrudeMethod:S.eLinearOrtho,length:t.L1,rotate:[0,0,0],translate:[0,0,-t.L1/2]},{outName:`subpax_${P}_face`,face:`${P}_faceFace`,extrudeMethod:S.eLinearOrtho,length:t.L2,rotate:[0,Math.PI/2,0],translate:[-t.L2/2,0,0]},...g.map((e,n)=>({outName:`subpax_${P}_buttress_${n}`,face:`${P}_faceButtress`,extrudeMethod:S.eLinearOrtho,length:t.H1,rotate:[0,0,0],translate:[0,0,e]}))],volumes:[{outName:`pax_${P}`,boolMethod:T.eUnion,inList:[`subpax_${P}_side`,`subpax_${P}_face`,...g.map((e,t)=>`subpax_${P}_buttress_${t}`)]}]},r.sub={},r.logstr+=`heliostat-swing drawn successfully!
|
|
67
|
+
`,r.calcErr=!1}catch(e){r.logstr+=e,console.log(e)}return r}var ve={pTitle:`Heliostat swing`,pDescription:`The swing for the heliostat inclination`,pDef:ge,pGeom:_e},ye={partName:`heliostat`,params:[h(`H1`,`mm`,3e3,10,4e4,1),h(`H2`,`mm`,2500,50,4e4,1),h(`D1`,`mm`,1e3,20,4e3,1),h(`D2`,`mm`,700,20,4e3,1),h(`E1`,`mm`,30,1,80,1),s(`rake`),h(`H3`,`mm`,200,1,500,1),h(`H4`,`mm`,800,1,4e3,1),h(`H5`,`mm`,3e3,50,6e3,1),h(`H6`,`mm`,200,1,4e3,1),h(`H7`,`mm`,800,1,4e3,1),h(`H8`,`mm`,200,1,4e3,1),h(`D3`,`mm`,900,20,4e3,1),h(`D4`,`mm`,400,20,4e3,1),h(`D5`,`mm`,300,20,1e3,1),h(`D6`,`mm`,200,10,1e3,1),h(`D7`,`mm`,400,10,1e3,1),s(`rake diagonal`),h(`D9`,`mm`,100,1,1e3,1),h(`L7`,`mm`,100,1,1e3,1),h(`L8`,`mm`,200,1,1e3,1),s(`spider`),h(`D8`,`mm`,100,1,1e3,1),h(`S1`,`mm`,250,1,800,1),h(`S2`,`mm`,200,1,800,1),h(`E2`,`mm`,50,1,80,1),s(`swing`),h(`L1`,`mm`,12500,100,4e4,1),h(`L2`,`mm`,6e3,100,4e4,1),h(`L3`,`mm`,100,1,500,1),h(`L4`,`mm`,600,1,4e3,1),h(`L5`,`mm`,2e3,10,6e3,1),h(`L6`,`mm`,2e3,1,6e3,1),h(`H9`,`mm`,100,1,400,1),s(`motion amplitude`),h(`al`,`degree`,80,0,95,1),h(`ar`,`degree`,80,0,95,1)],paramSvg:{H1:`heliostat_overview.svg`,H2:`heliostat_side.svg`,H3:`heliostat_side_sizing.svg`,H4:`heliostat_side_sizing.svg`,H5:`heliostat_side_sizing.svg`,H6:`heliostat_side_sizing.svg`,H7:`heliostat_side_sizing.svg`,H8:`heliostat_side_sizing.svg`,H9:`heliostat_side_sizing.svg`,D1:`heliostat_side_sizing.svg`,D2:`heliostat_side_sizing.svg`,D3:`heliostat_side_sizing.svg`,D4:`heliostat_side_sizing.svg`,D5:`heliostat_side_sizing.svg`,D6:`heliostat_side_sizing.svg`,D7:`heliostat_side_sizing.svg`,D8:`heliostat_side_sizing.svg`,D9:`heliostat_face_sizing.svg`,S1:`heliostat_side_sizing.svg`,S2:`heliostat_side_sizing.svg`,E1:`heliostat_side_sizing.svg`,E2:`heliostat_side_sizing.svg`,L1:`heliostat_face_sizing.svg`,L2:`heliostat_side_sizing.svg`,L3:`heliostat_face_sizing.svg`,L4:`heliostat_face_sizing.svg`,L5:`heliostat_face_sizing.svg`,L6:`heliostat_face_sizing.svg`,L7:`heliostat_face_sizing.svg`,L8:`heliostat_face_sizing.svg`,al:`heliostat_side_sizing.svg`,ar:`heliostat_side_sizing.svg`},sim:{tMax:100,tStep:.5,tUpdate:500}};function be(e,t,n=``){let o=a(ye.partName+n),s=x(),c=x();o.logstr+=`${o.partName} simTime: ${e}
|
|
68
|
+
`;try{let n=t.H1+t.H2-t.H3+t.H4+t.H5-t.H6+t.H7;o.logstr+=`heliostat-height: ${d(n)}, diameter ${d(t.D1)} m
|
|
69
|
+
`,o.logstr+=`heliostat-swing-length: ${d(t.L1)}, width ${d(t.L2)} m
|
|
70
|
+
`;let a=i((t.al-t.ar)/2-Math.sin(2*Math.PI*e/ye.sim.tMax)*(t.al+t.ar)/2);o.logstr+=`swing position angle: ${d(w(a))} degree
|
|
71
|
+
`;let u=t.H1+t.H2-t.H3,f=u+t.H4+t.H5-t.H6+t.H7,p=f+t.H8,m=r(le.pDef),h=r(fe.pDef),g=r(he.pDef),_=r(ve.pDef);m.setVal(`H1`,t.H1),m.setVal(`H2`,t.H2),m.setVal(`D1`,t.D1),m.setVal(`D2`,t.D2),m.setVal(`D3`,t.D1-6*t.E1),m.setVal(`E1`,t.E1),m.setVal(`E2`,t.E1);let v=(t.D1-6*t.E1)/128;m.setVal(`N1`,32),m.setVal(`D5`,v),m.setVal(`L1`,t.E1+v/2),m.setVal(`H3`,t.H1/4),m.setVal(`H4`,t.H1/2),m.setVal(`D4`,t.H1/4),m.setVal(`L2`,t.H1/80),m.setVal(`E3`,t.H1/80),m.setVal(`holders`,0),h.setVal(`H1`,t.H4),h.setVal(`H2`,t.H5),h.setVal(`H3`,t.H4-2*t.E1),h.setVal(`D1`,t.D3),h.setVal(`D2`,t.D4),h.setVal(`L9`,t.D3/2),h.setVal(`H7`,t.D3/2*1.6),h.setVal(`H6`,t.D3/20),h.setVal(`R9`,t.D3/20),h.setVal(`E1`,t.E1),h.setVal(`E3`,t.E1),h.setVal(`E4`,t.E1),h.setVal(`E6`,t.E1);let y=t.D2*.6,x=y/96;if(h.setVal(`D3`,y),t.D2>t.D3-2*t.E1)throw`err153: D2 ${t.D2} too large compare to D3 ${t.D3} and E1 ${t.E1}`;if(h.setVal(`N1`,24),h.setVal(`D7`,x),h.setVal(`L1`,x),h.setVal(`H4`,t.H6),h.setVal(`D4`,t.D5),h.setVal(`L7`,t.L7),h.setVal(`L8`,t.L8),h.setVal(`D6`,t.D9),h.setVal(`H5`,t.H7+t.H8),h.setVal(`D5`,t.D6),h.setVal(`D8`,t.D7),t.D6>=t.D7)throw`err164: D6 ${t.D6} too large compare to D7 ${t.D7}`;let S=t.L4-2*t.L3;if(h.setVal(`L4`,S),S<=0)throw`err169: L3 ${t.L3} too large compare to L4 ${t.L4}`;h.setVal(`L5`,t.L5+2*t.L3),h.setVal(`L6`,t.L6+2*t.L3);let C=t.L5*.96;if(g.setVal(`L5`,C),g.setVal(`D1`,t.D8),g.setVal(`L1`,t.S1),g.setVal(`L2`,t.S2),g.setVal(`L3`,t.E2*2),g.setVal(`E1`,t.E1),g.setVal(`E2`,t.E2),g.setVal(`E3`,t.E1),g.setVal(`L4`,t.L2/2-t.H8),g.setVal(`R2`,0),g.setVal(`N1`,6),g.setVal(`L6`,C/60),_.setVal(`L2`,t.L2),_.setVal(`D1`,t.D6),_.setVal(`H3`,t.H9),_.setVal(`H4`,t.H9),_.setVal(`L1`,t.L1),t.L1<4*t.L4+2*t.L6+t.L5+2*t.L3)throw`err185: L1 ${t.L1} too small compare to L4 ${t.L4}, L5 ${t.L5}, L6 ${t.L6}`;_.setVal(`H1`,t.L3),_.setVal(`H2`,t.L3),_.setVal(`L4`,t.L4),_.setVal(`L5`,t.L5),_.setVal(`L6`,t.L6),_.setVal(`L3`,t.D7),_.setVal(`S1`,t.D6/2),_.setVal(`R2`,0);let E=le.pGeom(0,m.getParamVal(),m.getSuffix());b(E),o.logstr+=l(E.logstr,m.getPartNameSuffix());let D=fe.pGeom(0,h.getParamVal(),h.getSuffix());b(D),o.logstr+=l(D.logstr,h.getPartNameSuffix());let O=he.pGeom(0,g.getParamVal(),g.getSuffix());b(O),o.logstr+=l(O.logstr,g.getPartNameSuffix());let k=ve.pGeom(0,_.getParamVal(),_.getSuffix());b(k),o.logstr+=l(k.logstr,_.getPartNameSuffix()),s.mergeFigure(E.fig.poleCut),s.mergeFigure(D.fig.faceBeam.translate(0,u)),s.mergeFigure(O.fig.faceLegs.translate(0,f).rotate(0,f,a/2)),s.mergeFigure(k.fig.faceSide.translate(0,p).rotate(0,p,a)),c.mergeFigure(E.fig.poleCut),c.mergeFigure(D.fig.faceCone.translate(0,u)),c.mergeFigure(O.fig.faceBody.translate(-C/2,f)),c.mergeFigure(k.fig.faceFace.translate(0,p)),o.fig={faceSide:s,faceFace:c};let A=o.partName;o.vol={inherits:[{outName:`inpax_${A}_poleStatic`,subdesign:`pax_pole_static`,subgeom:E,rotate:[0,0,0],translate:[0,0,0]},{outName:`inpax_${A}_rake`,subdesign:`pax_rake`,subgeom:D,rotate:[0,0,0],translate:[0,0,u]},{outName:`inpax_${A}_swing`,subdesign:`pax_swing`,subgeom:k,rotate:[Math.PI/2,0,0],translate:[0,0,p]},{outName:`inpax_${A}_spider`,subdesign:`pax_spider`,subgeom:O,rotate:[Math.PI/2,0,0],translate:[0,C/2,f]}],extrudes:[],volumes:[{outName:`pax_${A}`,boolMethod:T.eUnion,inList:[`inpax_${A}_poleStatic`,`inpax_${A}_rake`,`inpax_${A}_swing`,`inpax_${A}_spider`]}]},o.sub={pole_static_1:{partName:m.getPartName(),dparam:m.getDesignParamList(),orientation:[0,0,0],position:[0,0,0]},rake_1:{partName:h.getPartName(),dparam:h.getDesignParamList(),orientation:[0,0,0],position:[0,0,u]},spider_1:{partName:g.getPartName(),dparam:g.getDesignParamList(),orientation:[Math.PI/2,0,0],position:[0,C/2,f]},swing_1:{partName:_.getPartName(),dparam:_.getDesignParamList(),orientation:[Math.PI/2,0,0],position:[0,0,p]}},o.logstr+=`heliostat-overview drawn successfully!
|
|
72
|
+
`,o.calcErr=!1}catch(e){o.logstr+=e,console.log(e)}return o}var xe={pTitle:`Heliostat overview`,pDescription:`The heliostat inclination mechanism`,pDef:ye,pGeom:be},Se={partName:`rake_stopper`,params:[h(`D1`,`mm`,600,10,4e3,1),h(`D2`,`mm`,400,10,4e3,1),h(`D3`,`mm`,400,1,4e3,1),h(`H1`,`mm`,800,1,4e3,1),h(`H2`,`mm`,3e3,20,6e3,1),h(`H3`,`mm`,400,0,4e3,1),h(`E1`,`mm`,20,1,80,1),h(`E3`,`mm`,30,1,80,1),s(`transversal`),h(`H4`,`mm`,200,1,1e3,1),h(`D4`,`mm`,300,1,1e3,1),h(`E4`,`mm`,20,1,80,1),h(`H5`,`mm`,400,1,2e3,1),h(`D5`,`mm`,200,1,1e3,1),h(`L4`,`mm`,300,1,1e3,1),h(`L5`,`mm`,2e3,1,4e3,1),h(`L6`,`mm`,2e3,1,4e3,1),h(`D8`,`mm`,400,1,1e3,1),s(`diagonal`),h(`D6`,`mm`,100,1,600,1),h(`E6`,`mm`,10,1,80,1),h(`L7`,`mm`,100,1,1e3,1),h(`L8`,`mm`,200,1,1e3,1),s(`base`),h(`N1`,``,24,3,100,1),h(`D7`,`mm`,40,1,100,1),h(`L1`,`mm`,30,1,300,1),s(`door`),h(`H6`,`mm`,100,1,1e3,1),h(`H7`,`mm`,600,1,2e3,1),h(`L9`,`mm`,300,1,1e3,1),h(`R9`,`mm`,50,0,300,1),h(`doorOrientation`,`degree`,0,-180,180,1),s(`stoppers`),h(`S1`,`mm`,100,1,300,1),h(`S2`,`mm`,2e3,1,8e3,1),h(`S3`,`mm`,100,0,8e3,1),h(`E7`,`mm`,5,1,80,1),s(`low stopper`),h(`JD1`,`mm`,200,1,500,1),h(`JE1`,`mm`,5,1,80,1),h(`JL1`,`mm`,260,1,2e3,1),h(`JH1`,`mm`,20,-500,500,1),h(`JS1`,`mm`,100,1,500,1),h(`JS2`,`mm`,200,1,500,1),s(`high stopper`),h(`JD3`,`mm`,200,1,500,1),h(`JE3`,`mm`,5,1,80,1),h(`JS3`,`mm`,120,1,500,1),h(`JD4`,`mm`,200,1,500,1),h(`JE4`,`mm`,5,1,80,1),h(`JS4`,`mm`,120,1,500,1)],paramSvg:{D1:`rake_face.svg`,D2:`rake_side.svg`,D3:`rake_face.svg`,H1:`rake_face.svg`,H2:`rake_face.svg`,H3:`rake_face.svg`,E1:`rake_face.svg`,E3:`rake_face.svg`,H4:`rake_side.svg`,D4:`rake_side.svg`,E4:`rake_side.svg`,H5:`rake_side.svg`,D5:`rake_side.svg`,L4:`rake_face.svg`,L5:`rake_face.svg`,L6:`rake_face.svg`,D6:`rake_face.svg`,E6:`rake_face.svg`,L7:`rake_face.svg`,L8:`rake_face.svg`,N1:`rake_top.svg`,D7:`rake_top.svg`,L1:`rake_top.svg`,D8:`rake_side.svg`,H6:`rake_door.svg`,H7:`rake_door.svg`,L9:`rake_door.svg`,R9:`rake_door.svg`,doorOrientation:`rake_door.svg`,S1:`rake_side_stopper.svg`,S2:`rake_top_stopper.svg`,S3:`rake_side_stopper.svg`,E7:`rake_side_stopper.svg`,JD1:`rake_low_stopper_holder.svg`,JE1:`rake_low_stopper_holder.svg`,JL1:`rake_low_stopper_holder.svg`,JH1:`rake_low_stopper_holder.svg`,JS1:`rake_side_stopper.svg`,JS2:`rake_top_stopper.svg`,JD3:`rake_side_stopper.svg`,JE3:`rake_side_stopper.svg`,JS3:`rake_top_stopper.svg`,JD4:`rake_top_stopper.svg`,JE4:`rake_top_stopper.svg`,JS4:`rake_side_stopper.svg`},sim:{tMax:180,tStep:.5,tUpdate:500}};function Ce(e,t,i=``){let o=a(Se.partName+i),s=x(),c=x(),u=x(),f=x(),p=x(),m=x(),h=x(),g=x(),_=x(),v=x(),y=x(),C=x(),D=x(),O=x(),k=x(),A=x(),j=x(),M=x(),N=x();o.logstr+=`${o.partName} simTime: ${e}
|
|
73
|
+
`;try{let e=Math.PI,i=Math.PI/2,a=-Math.PI/2,x=t.D1/2,P=t.H1+t.H2,F=P-t.H4+t.H5,I=F-t.S2,L=t.H1+t.H2-t.H4,R=L+t.D4/2,z=t.H1+t.S3,B=t.L5/2,V=t.S1/2,H=t.S1-2*t.E7,U=H/2,W=t.S2-V,G=I-t.JH1,K=t.JD1/2,q=K-t.JE1,J=x+t.JS2,ee=B-V,Y=x+t.JS3,te=t.JD3-2*t.JE3,ne=t.D4/2+t.JS4,re=t.JD4-2*t.JE4;if(2*t.E7>=t.S1)throw`err135: E7 ${t.E7} too large compare to S1 ${t.S1}`;if(t.L5<t.D2)throw`err138: L5 ${t.L5} too small compare to D2 ${t.D2}`;if(I-t.JH1-t.JD1/2<0)throw`err143: S2 ${t.S2} too large compare to H1H5 ${d(F)}`;if(t.JS1<t.S1/2)throw`err144: JS1 ${t.JS1} too small compare to S1 ${t.S1}`;if(t.JE1>t.JD1/2)throw`err145: JE1 ${t.JE1} too large compare to JD1 ${t.JD1}`;if(t.JL1>t.D1)throw`err146: JL1 ${t.JL1} too large compare to D1 ${t.D1}`;if(t.JL1<t.JD1)throw`err147: JL1 ${t.JL1} too small compare to JD1 ${t.JD1}`;if(Math.abs(t.JH1)>t.JD1/2+V)throw`err148: JH1 ${t.JH1} too large compare to JD1 ${t.JD1} and S1 ${t.S1}`;if(t.JS2<t.JS1-V)throw`err149: JS2 ${t.JS2} too small compare to JS1 ${t.JS1} and S1 ${t.S1}`;if(t.S3>t.H2-t.H4)throw`err150: S3 ${t.S3} too large compare to H2 ${t.H2} and H4 ${t.H4}`;if(t.JE3>t.JD3/2)throw`err151: JE3 ${t.JE3} too large compare to JD3 ${t.JD3}`;if(t.JE4>t.JD4/2)throw`err152: JE4 ${t.JE4} too large compare to JD4 ${t.JD4}`;o.logstr+=`cone-height: ${d(P)} mm
|
|
74
|
+
`,o.logstr+=`cone-height total: ${d(F)} mm
|
|
75
|
+
`;let ie=[],ae=[];A.addSecond(n(-B,I,t.L5,t.S1,0)),A.addSecond(n(-B,I,t.L5,H,0)),ie.push(E(-t.JL1/2,G,K)),ie.push(E(-t.JL1/2,G,q)),ae.push(E(t.JL1/2,G,K)),ae.push(E(t.JL1/2,G,q)),A.addMainOI(ie),A.addMainOI(ae);let X=r(fe.pDef);X.setVal(`D1`,t.D1),X.setVal(`D2`,t.D2),X.setVal(`D3`,t.D3),X.setVal(`H1`,t.H1),X.setVal(`H2`,t.H2),X.setVal(`H3`,t.H3),X.setVal(`E1`,t.E1),X.setVal(`E3`,t.E3),X.setVal(`H4`,t.H4),X.setVal(`D4`,t.D4),X.setVal(`E4`,t.E4),X.setVal(`H5`,t.H5),X.setVal(`D5`,t.D5),X.setVal(`L4`,t.L4),X.setVal(`L5`,t.L5),X.setVal(`L6`,t.L6),X.setVal(`D6`,t.D6),X.setVal(`E6`,t.E6),X.setVal(`L7`,t.L7),X.setVal(`L8`,t.L8),X.setVal(`N1`,t.N1),X.setVal(`D7`,t.D7),X.setVal(`L1`,t.L1),X.setVal(`D8`,t.D8),X.setVal(`H6`,t.H6),X.setVal(`H7`,t.H7),X.setVal(`L9`,t.L9),X.setVal(`R9`,t.R9),X.setVal(`doorOrientation`,t.doorOrientation);let Z=fe.pGeom(0,X.getParamVal(),X.getSuffix());b(Z),o.logstr+=l(Z.logstr,X.getPartNameSuffix()),s.mergeFigure(Z.fig.faceCone),s.mergeFigure(A,!0),c.mergeFigure(Z.fig.faceBeam),u.mergeFigure(Z.fig.faceBeamHollow),f.mergeFigure(Z.fig.faceDisc),p.mergeFigure(Z.fig.faceHand),m.mergeFigure(Z.fig.faceWing),h.mergeFigure(Z.fig.faceWingHollow),g.mergeFigure(Z.fig.faceDoor),g.mergeFigure(A,!0),_.mergeFigure(Z.fig.faceDisc,!0),_.addMainOI([n(-x-t.JS1,-B,t.L5,t.S1,i),n(-x-t.JS1,-B,t.L5,H,i)]),_.addMainOI([n(W,-B,t.L5,t.S1,i),n(W,-B,t.L5,H,i)]),_.addMainOI([n(0,-B+V,W,t.S1,0),n(0,-B+V,W,H,0)]),_.addMainOI([n(0,B-V,W,t.S1,0),n(0,B-V,W,H,0)]),_.addMainOI([n(0,-x-V,W,t.S1,0),n(0,-x-V,W,H,0)]),_.addMainOI([n(0,x+V,W,t.S1,0),n(0,x+V,W,H,0)]),_.addSecond(n(0,-t.JL1/2,J,2*K,e)),_.addSecond(n(0,-t.JL1/2,J,2*q,e)),_.addSecond(n(0,t.JL1/2,J,2*K,e)),_.addSecond(n(0,t.JL1/2,J,2*q,e)),_.addSecond(n(0,0,Y,t.JD3,a)),_.addSecond(n(0,0,Y,te,a)),_.addSecond(n(0,0,Y,t.JD3,i)),_.addSecond(n(0,0,Y,te,i)),v.mergeFigure(Z.fig.faceBeam,!0),v.addMainOI([E(-x-t.JS1,I,V),E(-x-t.JS1,I,U)]),v.addMainOI([E(W,R+V,V),E(W,R+V,U)]),v.addSecond(n(0,R+V,W,t.S1,0)),v.addSecond(n(0,R+V,W,H,0));let oe=R+V-z,se=Math.sqrt(W**2+oe**2),ce=Math.atan2(oe,W);o.logstr+=`stopper-rod: L ${d(se)} mm, A ${d(w(ce))} degree
|
|
76
|
+
`,v.addSecond(n(0,z,se,t.S1,ce)),v.addSecond(n(0,z,se,H,ce)),v.addSecond(n(0,G,J,2*K,e)),v.addSecond(n(0,G,J,2*q,e)),v.addSecond(E(0,z,t.JD3/2)),v.addSecond(E(0,z,t.JD3/2-t.JE3)),v.addSecond(n(0,L,ne,t.JD4,i)),v.addSecond(n(0,L,ne,re,i)),y.mergeFigure(v,!0),y.addMainO(E(-x-t.JS1,I,U)),y.addMainO(E(t.S2-V,R+V,U)),C.mergeFigure(Z.fig.faceCone,!0),C.mergeFigure(A,!0),C.addMainOI([E(-t.L5/2+V,R+V,V),E(-t.L5/2+V,R+V,U)]),C.addMainOI([E(t.L5/2-V,R+V,V),E(t.L5/2-V,R+V,U)]),D.mergeFigure(Z.fig.faceCone,!0),D.mergeFigure(A,!0),D.addSecond(E(-t.L5/2+V,R+V,V)),D.addMainO(E(-t.L5/2+V,R+V,U)),D.addSecond(E(t.L5/2-V,R+V,V)),D.addMainO(E(t.L5/2-V,R+V,U)),O.mergeFigure(Z.fig.faceCone,!0),O.mergeFigure(A,!0),O.addMainOI([E(-x-V,0,V),E(-x-V,0,U)]),O.addMainOI([E(x+V,0,V),E(x+V,0,U)]),k.mergeFigure(Z.fig.faceCone,!0),k.mergeFigure(A,!0),k.addSecond(E(-x-V,0,V)),k.addMainO(E(-x-V,0,U)),k.addSecond(E(x+V,0,V)),k.addMainO(E(x+V,0,U)),j.mergeFigure(Z.fig.faceCone,!0),j.mergeFigure(A),j.addSecond(n(-ee,L,ne,t.JD4,i)),j.addSecond(n(-ee,L,ne,re,i)),j.addSecond(n(ee,L,ne,t.JD4,i)),j.addSecond(n(ee,L,ne,re,i)),j.addSecond(n(0,z,Y,t.JD3,e)),j.addSecond(n(0,z,Y,te,e)),j.addSecond(n(0,z,Y,t.JD3,0)),j.addSecond(n(0,z,Y,te,0)),M.mergeFigure(v,!0),M.addMainOI([E(0,z,t.JD3/2),E(0,z,t.JD3/2-t.JE3)]),N.mergeFigure(_,!0),N.addMainOI([E(0,-ee,t.JD4/2),E(0,-ee,t.JD4/2-t.JE4)]),N.addMainOI([E(0,ee,t.JD4/2),E(0,ee,t.JD4/2-t.JE4)]),o.fig={faceCone:s,faceBeam:c,faceBeamHollow:u,faceDisc:f,faceHand:p,faceWing:m,faceWingHollow:h,faceDoor:g,faceStopperTop:_,faceStopperSide:v,faceStopperSideH:y,faceStopperFaceT:C,faceStopperFaceTH:D,faceStopperFaceB:O,faceStopperFaceBH:k,faceLowStopperHolder:j,faceHi1StopperHolder:M,faceHi2StopperHolder:N};let Q=o.partName;o.vol={inherits:[{outName:`inpax_${Q}_rake`,subdesign:`pax_rake`,subgeom:Z,rotate:[0,0,0],translate:[0,0,0]},{outName:`inpax_${Q}_coneHollow`,subdesign:`subpax_rake_coneHollow`,subgeom:Z,rotate:[0,0,0],translate:[0,0,0]},{outName:`inpax_${Q}_beamHollow`,subdesign:`subpax_rake_beamHollow`,subgeom:Z,rotate:[0,0,0],translate:[0,0,0]}],extrudes:[{outName:`subpax_${Q}_stpSide`,face:`${Q}_faceStopperSide`,extrudeMethod:S.eLinearOrtho,length:t.L5,rotate:[Math.PI/2,0,0],translate:[0,t.L5/2,0]},{outName:`subpax_${Q}_stpSideH`,face:`${Q}_faceStopperSideH`,extrudeMethod:S.eLinearOrtho,length:t.L5,rotate:[Math.PI/2,0,0],translate:[0,t.L5/2,0]},{outName:`subpax_${Q}_stpFaceT`,face:`${Q}_faceStopperFaceT`,extrudeMethod:S.eLinearOrtho,length:W,rotate:[Math.PI/2,0,Math.PI/2],translate:[0,0,0]},{outName:`subpax_${Q}_stpFaceTH`,face:`${Q}_faceStopperFaceTH`,extrudeMethod:S.eLinearOrtho,length:W,rotate:[Math.PI/2,0,Math.PI/2],translate:[0,0,0]},{outName:`subpax_${Q}_stpFaceB`,face:`${Q}_faceStopperFaceB`,extrudeMethod:S.eLinearOrtho,length:se,rotate:[Math.PI/2-ce,0,Math.PI/2],translate:[0,0,z]},{outName:`subpax_${Q}_stpFaceBH`,face:`${Q}_faceStopperFaceBH`,extrudeMethod:S.eLinearOrtho,length:se,rotate:[Math.PI/2-ce,0,Math.PI/2],translate:[0,0,z]},{outName:`subpax_${Q}_lowSH`,face:`${Q}_faceLowStopperHolder`,extrudeMethod:S.eLinearOrtho,length:J,rotate:[Math.PI/2,0,-Math.PI/2],translate:[0,0,0]},{outName:`subpax_${Q}_Hi1SH1`,face:`${Q}_faceHi1StopperHolder`,extrudeMethod:S.eLinearOrtho,length:Y,rotate:[Math.PI/2,0,0],translate:[0,0,0]},{outName:`subpax_${Q}_Hi1SH2`,face:`${Q}_faceHi1StopperHolder`,extrudeMethod:S.eLinearOrtho,length:Y,rotate:[Math.PI/2,0,Math.PI],translate:[0,0,0]},{outName:`subpax_${Q}_Hi2SH`,face:`${Q}_faceHi2StopperHolder`,extrudeMethod:S.eLinearOrtho,length:ne,rotate:[0,0,0],translate:[0,0,L]}],volumes:[{outName:`ipax_${Q}_plus`,boolMethod:T.eUnion,inList:[`subpax_${Q}_stpSide`,`subpax_${Q}_stpFaceT`,`subpax_${Q}_stpFaceB`,`subpax_${Q}_lowSH`,`subpax_${Q}_Hi1SH1`,`subpax_${Q}_Hi1SH2`,`subpax_${Q}_Hi2SH`]},{outName:`ipax_${Q}_hollow`,boolMethod:T.eUnion,inList:[`inpax_${Q}_coneHollow`,`inpax_${Q}_beamHollow`,`subpax_${Q}_stpSideH`,`subpax_${Q}_stpFaceTH`,`subpax_${Q}_stpFaceBH`]},{outName:`ipax_${Q}_stopper`,boolMethod:T.eSubstraction,inList:[`ipax_${Q}_plus`,`ipax_${Q}_hollow`]},{outName:`pax_${Q}`,boolMethod:T.eUnion,inList:[`inpax_${Q}_rake`,`ipax_${Q}_stopper`]}]},o.sub={},o.logstr+=`heliostat-rake drawn successfully!
|
|
77
|
+
`,o.calcErr=!1}catch(e){o.logstr+=e,console.log(e)}return o}var $={pTitle:`Heliostat rake with stopper`,pDescription:`The rake-stopper on top of the V-Axis of the heliostat`,pDef:Se,pGeom:Ce},we={partName:`heliostat_2`,params:[h(`H1`,`mm`,3e3,10,4e4,1),h(`H2`,`mm`,2500,50,4e4,1),h(`D1`,`mm`,1e3,20,4e3,1),h(`D2`,`mm`,700,20,4e3,1),h(`E1`,`mm`,30,1,80,1),s(`rake`),h(`H3`,`mm`,200,1,500,1),h(`H4`,`mm`,800,1,4e3,1),h(`H5`,`mm`,3e3,50,6e3,1),h(`H6`,`mm`,200,1,4e3,1),h(`H7`,`mm`,400,1,4e3,1),h(`D3`,`mm`,900,20,4e3,1),h(`D4`,`mm`,400,20,4e3,1),h(`D5`,`mm`,300,20,1e3,1),h(`D6`,`mm`,200,10,1e3,1),h(`D7`,`mm`,400,10,1e3,1),s(`rake diagonal`),h(`D9`,`mm`,100,1,1e3,1),h(`L7`,`mm`,100,1,1e3,1),h(`L8`,`mm`,200,1,1e3,1),s(`rake stopper`),h(`S1`,`mm`,100,1,800,1),s(`swing`),h(`L1`,`mm`,12500,100,4e4,1),h(`L2`,`mm`,6e3,100,4e4,1),h(`L3`,`mm`,100,1,500,1),h(`L4`,`mm`,600,1,4e3,1),h(`L5`,`mm`,2e3,10,6e3,1),h(`L6`,`mm`,2e3,1,6e3,1),h(`H9`,`mm`,100,1,400,1),h(`S2`,`mm`,10,0,2e3,1),s(`motion amplitude`),h(`al`,`degree`,80,0,95,1)],paramSvg:{H1:`heliostat_overview.svg`,H2:`heliostat_side.svg`,H3:`heliostat2_side_sizing.svg`,H4:`heliostat2_side_sizing.svg`,H5:`heliostat2_side_sizing.svg`,H6:`heliostat2_side_sizing.svg`,H7:`heliostat2_side_sizing.svg`,H9:`heliostat2_side_sizing.svg`,D1:`heliostat2_side_sizing.svg`,D2:`heliostat2_side_sizing.svg`,D3:`heliostat2_side_sizing.svg`,D4:`heliostat2_side_sizing.svg`,D5:`heliostat2_side_sizing.svg`,D6:`heliostat2_side_sizing.svg`,D7:`heliostat2_side_sizing.svg`,D9:`heliostat2_face_sizing.svg`,E1:`heliostat2_side_sizing.svg`,L1:`heliostat2_face_sizing.svg`,L2:`heliostat2_side_sizing.svg`,L3:`heliostat2_face_sizing.svg`,L4:`heliostat2_face_sizing.svg`,L5:`heliostat2_face_sizing.svg`,L6:`heliostat2_face_sizing.svg`,L7:`heliostat2_face_sizing.svg`,L8:`heliostat2_face_sizing.svg`,S1:`heliostat2_side_sizing.svg`,S2:`heliostat2_side_sizing.svg`,al:`heliostat2_side_sizing.svg`},sim:{tMax:100,tStep:.5,tUpdate:500}};function Te(e,t,n=``){let o=a(we.partName+n),s=x(),c=x(),u=x();o.logstr+=`${o.partName} simTime: ${e}
|
|
78
|
+
`;try{let n=t.H1+t.H2-t.H3+t.H4+t.H5-t.H6+t.H7;o.logstr+=`heliostat-height: ${d(n)}, diameter ${d(t.D1)} m
|
|
79
|
+
`,o.logstr+=`heliostat-swing-length: ${d(t.L1)}, width ${d(t.L2)} m
|
|
80
|
+
`;let a=i(t.al*e/we.sim.tMax);o.logstr+=`swing position angle: ${d(w(a))} degree
|
|
81
|
+
`;let f=t.H1+t.H2-t.H3,p=f+t.H4+t.H5-t.H6+t.H7,m=r(le.pDef),h=r($.pDef),g=r(ve.pDef);m.setVal(`H1`,t.H1),m.setVal(`H2`,t.H2),m.setVal(`D1`,t.D1),m.setVal(`D2`,t.D2),m.setVal(`D3`,t.D1-6*t.E1),m.setVal(`E1`,t.E1),m.setVal(`E2`,t.E1);let _=(t.D1-6*t.E1)/128;m.setVal(`N1`,32),m.setVal(`D5`,_),m.setVal(`L1`,t.E1+_/2),m.setVal(`H3`,t.H1/4),m.setVal(`H4`,t.H1/2),m.setVal(`D4`,t.H1/4),m.setVal(`L2`,t.H1/80),m.setVal(`E3`,t.H1/80),m.setVal(`holders`,0),h.setVal(`H1`,t.H4),h.setVal(`H2`,t.H5),h.setVal(`H3`,t.H4-2*t.E1),h.setVal(`D1`,t.D3),h.setVal(`D2`,t.D4),h.setVal(`L9`,t.D3/2),h.setVal(`H7`,t.D3/2*1.6),h.setVal(`H6`,t.D3/20),h.setVal(`R9`,t.D3/20),h.setVal(`E1`,t.E1),h.setVal(`E3`,t.E1),h.setVal(`E4`,t.E1),h.setVal(`E6`,t.E1),h.setVal(`E7`,t.E1);let v=t.D2*.6,y=v/96;if(h.setVal(`D3`,v),t.D2>t.D3-2*t.E1)throw`err153: D2 ${t.D2} too large compare to D3 ${t.D3} and E1 ${t.E1}`;if(h.setVal(`N1`,24),h.setVal(`D7`,y),h.setVal(`L1`,y),h.setVal(`H4`,t.H6),h.setVal(`D4`,t.D5),h.setVal(`L7`,t.L7),h.setVal(`L8`,t.L8),h.setVal(`D6`,t.D9),h.setVal(`H5`,t.H7),h.setVal(`D5`,t.D6),h.setVal(`D8`,t.D7),t.D6>=t.D7)throw`err164: D6 ${t.D6} too large compare to D7 ${t.D7}`;let x=t.L4-2*t.L3;if(h.setVal(`L4`,x),x<=0)throw`err169: L3 ${t.L3} too large compare to L4 ${t.L4}`;if(h.setVal(`L5`,t.L5+2*t.L3),h.setVal(`L6`,t.L6+2*t.L3),h.setVal(`S1`,t.S1),h.setVal(`S2`,t.L2/2),h.setVal(`S3`,0),h.setVal(`S3`,0),h.setVal(`JD1`,t.D3/4),h.setVal(`JE1`,t.E1),h.setVal(`JL1`,t.D3/3),h.setVal(`JH1`,0),h.setVal(`JS1`,t.S1/2),h.setVal(`JS2`,t.S1/2),h.setVal(`JD3`,t.D4/4),h.setVal(`JE3`,t.E1),h.setVal(`JS3`,t.D4/4),h.setVal(`JD4`,t.D4/4),h.setVal(`JE4`,t.E1),h.setVal(`JS4`,t.D4/4),g.setVal(`L2`,t.L2),g.setVal(`D1`,t.D6),g.setVal(`H3`,t.H9),g.setVal(`H4`,t.H9),g.setVal(`L1`,t.L1),t.L1<4*t.L4+2*t.L6+t.L5+2*t.L3)throw`err185: L1 ${t.L1} too small compare to L4 ${t.L4}, L5 ${t.L5}, L6 ${t.L6}`;g.setVal(`H1`,t.L3),g.setVal(`H2`,t.L3),g.setVal(`L4`,t.L4),g.setVal(`L5`,t.L5),g.setVal(`L6`,t.L6),g.setVal(`L3`,t.D7),g.setVal(`S1`,t.D6/2),g.setVal(`S2`,t.S2),g.setVal(`R2`,0);let S=le.pGeom(0,m.getParamVal(),m.getSuffix());b(S),o.logstr+=l(S.logstr,m.getPartNameSuffix());let C=$.pGeom(0,h.getParamVal(),h.getSuffix());b(C),o.logstr+=l(C.logstr,h.getPartNameSuffix());let E=ve.pGeom(0,g.getParamVal(),g.getSuffix());b(E),o.logstr+=l(E.logstr,g.getPartNameSuffix()),s.mergeFigure(S.fig.poleCut),s.mergeFigure(C.fig.faceStopperSide.translate(0,f)),s.mergeFigure(E.fig.faceSide.translate(0,p).rotate(0,p,a)),c.mergeFigure(S.fig.poleCut),c.mergeFigure(C.fig.faceStopperFaceT.translate(0,f)),c.mergeFigure(E.fig.faceFace.translate(0,p)),u.mergeFigure(S.fig.poleBottom.translate(0,0)),u.mergeFigure(C.fig.faceStopperTop.translate(0,0)),u.mergeFigure(E.fig.faceTop.rotate(0,0,Math.PI/2)),o.fig={faceSide:s,faceFace:c,faceTop:u};let D=o.partName;o.vol={inherits:[{outName:`inpax_${D}_poleStatic`,subdesign:`pax_pole_static`,subgeom:S,rotate:[0,0,0],translate:[0,0,0]},{outName:`inpax_${D}_rake`,subdesign:`pax_rake_stopper`,subgeom:C,rotate:[0,0,0],translate:[0,0,f]},{outName:`inpax_${D}_swing`,subdesign:`pax_swing`,subgeom:E,rotate:[Math.PI/2,0,0],translate:[0,0,p]}],extrudes:[],volumes:[{outName:`pax_${D}`,boolMethod:T.eUnion,inList:[`inpax_${D}_poleStatic`,`inpax_${D}_rake`,`inpax_${D}_swing`]}]};let O=m.getDesignParamList();o.sub={pole_static_1:{partName:m.getPartName(),dparam:O,orientation:[0,0,0],position:[0,0,0]},rake_1:{partName:h.getPartName(),dparam:h.getDesignParamList(),orientation:[0,0,0],position:[0,0,f]},swing_1:{partName:g.getPartName(),dparam:g.getDesignParamList(),orientation:[0,0,0],position:[0,0,p]}},o.logstr+=`heliostat-2-overview drawn successfully!
|
|
82
|
+
`,o.calcErr=!1}catch(e){o.logstr+=e,console.log(e)}return o}var Ee={pTitle:`Heliostat-2 overview`,pDescription:`The heliostat-2 inclination mechanism`,pDef:we,pGeom:Te},De={partName:`base`,params:[h(`D1`,`mm`,600,10,4e3,10),h(`D2`,`mm`,700,10,4e3,10),h(`D3`,`mm`,400,10,4e3,10),h(`D4`,`mm`,500,10,4e3,10),h(`E1`,`mm`,30,1,80,1),h(`E2`,`mm`,30,1,80,1),h(`E3`,`mm`,30,1,80,1),h(`H1`,`mm`,800,10,4e3,10),h(`H2`,`mm`,50,1,4e3,1),s(`side holes`),h(`H3`,`mm`,400,10,4e3,10),h(`N2`,``,12,1,100,1),h(`L2`,`mm`,100,1,400,1),s(`base holes`),h(`N1`,``,24,3,100,1),h(`D5`,`mm`,40,1,100,1),h(`L1`,`mm`,34,1,300,1)],paramSvg:{D1:`base_cut.svg`,D2:`base_cut.svg`,D3:`base_cut.svg`,D4:`base_cut.svg`,E1:`base_cut.svg`,E2:`base_cut.svg`,E3:`base_cut.svg`,H1:`base_cut.svg`,H2:`base_hollow.svg`,H3:`base_hollow.svg`,N2:`base_hollow.svg`,L2:`base_hollow.svg`,N1:`base_top.svg`,D5:`base_top.svg`,L1:`base_top.svg`},sim:{tMax:180,tStep:.5,tUpdate:500}};function Oe(e,t,n=``){let r=a(De.partName+n),i,o,s,c=x(),l=x(),u=x();r.logstr+=`${r.partName} simTime: ${e}
|
|
83
|
+
`;try{let e=t.D1/2,n=t.D2/2,a=t.D3/2,f=t.D4/2,p=t.D5/2,m=t.L2/2;if(n<e)throw`err089: D2 ${t.D2} too small compare to D1 ${t.D1}`;if(f>e-t.E2)throw`err189: D4 ${t.D4} too large compare to D1 ${t.D1} and E2 ${t.E2}`;r.logstr+=`base-height: ${d(t.H1)} mm
|
|
84
|
+
`,r.logstr+=`base-external-diameter: ${d(t.D2)} mm
|
|
85
|
+
`;let h=t.D1*Math.PI/t.N2-t.L2;if(r.logstr+=`inter-hollow: ${d(h)} mm
|
|
86
|
+
`,i=function(r){return v(r*n,0).addSegStrokeA(r*n,t.E3).addSegStrokeA(r*e,t.E3).addSegStrokeA(r*e,t.H1).addSegStrokeA(r*(e-t.E2),t.H1).addSegStrokeA(r*(e-t.E2),t.E3).addSegStrokeA(r*f,t.E3).addSegStrokeA(r*f,0).closeSegStroke()},o=function(r){return v(r*n,0).addSegStrokeA(r*n,t.E3).addSegStrokeA(r*e,t.E3).addSegStrokeA(r*e,t.H1).addSegStrokeA(r*a,t.H1).addSegStrokeA(r*a,t.H1-t.E1).addSegStrokeA(r*(e-t.E2),t.H1-t.E1).addSegStrokeA(r*(e-t.E2),t.E3).addSegStrokeA(r*f,t.E3).addSegStrokeA(r*f,0).closeSegStroke()},t.H1<t.E3+t.H2+t.H3+t.E1)throw`err125: H1 ${t.H1} too small compare to E3 ${t.H3}, H2 ${t.H2}, H3 ${t.H3}, E1 ${t.E1}`;if(t.D5>t.H3)throw`err128: D5 ${t.D5} too large compare to H3 ${t.H3}`;let g=2*Math.asin(m/(e-t.E2));if(t.N2*g>2*Math.PI)throw`err132: N2 ${t.N2} too large compare to L2 ${t.L2}, D1 ${t.D1}, E2 ${t.E2}`;let _=t.E3+t.H2+m;s=function(e){return v(e*m,_).addSegStrokeA(e*m,_+t.H3-t.L2).addPointA(-e*m,_+t.H3-t.L2).addSegArc(m,!1,!0).addSegStrokeA(-e*m,_).closeSegArc(m,!1,!0)},c.addMainO(i(1)),c.addSecond(o(1)),c.addSecond(o(-1)),c.addSecond(s(1));let y=[];if(a+t.L1+p>e-t.E2)throw`err127: D3 ${t.D3} too large compare to D1 ${t.D1}, E2 ${t.E2}, L1 ${t.L1}, R5 ${t.D5}`;if(p>t.L1)throw`err130: D5 ${t.D5} too large compare to L1 ${t.L1}`;let b=2*Math.asin(p/(n+t.L1));if(t.N1*b>2*Math.PI)throw`err134: N1 ${t.N1} too large compare to D5 ${t.D5}, L1 ${t.L1}, D2 ${t.D2}`;y.push(E(0,0,e)),y.push(E(0,0,a));let x=a+t.L1,C=2*Math.PI/t.N1;for(let e=0;e<t.N1;e++){let t=x*Math.cos(e*C),n=x*Math.sin(e*C);y.push(E(t,n,p))}l.addMainOI(y),l.addSecond(E(0,0,e-t.E1)),l.addSecond(E(0,0,n)),l.addSecond(E(0,0,f)),u.addMainO(s(1)),u.addSecond(o(1)),u.addSecond(o(-1)),r.fig={faceCut:c,faceTop:l,faceHollow:u};let w=r.partName,D=2*Math.PI/t.N2,O=[...Array(t.N2).keys()],k=O.map(e=>({outName:`subpax_${w}_hollow_${e}`,face:`${w}_faceHollow`,extrudeMethod:S.eLinearOrtho,length:n+t.E2,rotate:[Math.PI/2,0,e*D],translate:[0,0,0]})),A=O.map(e=>`subpax_${w}_hollow_${e}`);r.vol={extrudes:[{outName:`subpax_${w}_cut`,face:`${w}_faceCut`,extrudeMethod:S.eRotate,rotate:[0,0,0],translate:[Math.PI/2,0,0]},{outName:`subpax_${w}_top`,face:`${w}_faceTop`,extrudeMethod:S.eLinearOrtho,length:t.E1,rotate:[0,0,0],translate:[0,0,t.H1-t.E1]},...k],volumes:[{outName:`ipax_${w}_hollows`,boolMethod:T.eUnion,inList:[...A]},{outName:`ipax_${w}_cylinder`,boolMethod:T.eSubstraction,inList:[`subpax_${w}_cut`,`ipax_${w}_hollows`]},{outName:`pax_${w}`,boolMethod:T.eUnion,inList:[`ipax_${w}_cylinder`,`subpax_${w}_top`]}]},r.sub={},r.logstr+=`heliostat-base drawn successfully!
|
|
87
|
+
`,r.calcErr=!1}catch(e){r.logstr+=e,console.log(e)}return r}var ke={pTitle:`Heliostat base`,pDescription:`The base for the static-pole of the heliostat`,pDef:De,pGeom:Oe},Ae={partName:`vaxis`,params:[h(`D1`,`mm`,600,1,4e3,1),h(`D2`,`mm`,400,1,4e3,1),h(`H1`,`mm`,8e3,10,4e4,10),h(`E1`,`mm`,5,1,80,1),h(`E2`,`mm`,30,1,80,1),s(`base holes`),h(`N1`,``,24,3,100,1),h(`D3`,`mm`,40,1,100,1),h(`L1`,`mm`,45,1,300,1)],paramSvg:{D1:`vaxis_cut.svg`,D2:`vaxis_cut.svg`,H1:`vaxis_cut.svg`,E1:`vaxis_cut.svg`,E2:`vaxis_cut.svg`,N1:`vaxis_ends.svg`,D3:`vaxis_ends.svg`,L1:`vaxis_ends.svg`},sim:{tMax:180,tStep:.5,tUpdate:500}};function je(e,t,n=``){let r=a(Ae.partName+n),i,o=x(),s=x();r.logstr+=`${r.partName} simTime: ${e}
|
|
88
|
+
`;try{let e=t.D1/2,n=t.D2/2,a=t.D3/2;r.logstr+=`vaxis-height: ${d(t.H1)} mm
|
|
89
|
+
`;let c=v(e,0).addSegStrokeA(e,t.H1).addSegStrokeA(e-t.E1,t.H1).addSegStrokeA(e-t.E1,0).closeSegStroke();o.addMainO(c),i=function(r){return v(r*e,0).addSegStrokeA(r*e,t.H1).addSegStrokeA(r*n,t.H1).addSegStrokeA(r*n,t.H1-t.E2).addSegStrokeA(r*(e-t.E1),t.H1-t.E2).addSegStrokeA(r*(e-t.E1),t.E2).addSegStrokeA(r*n,t.E2).addSegStrokeA(r*n,0).closeSegStroke()},o.addSecond(i(1)),o.addSecond(i(-1));let l=[];l.push(E(0,0,e)),l.push(E(0,0,n));let u=n+t.L1,f=2*Math.PI/t.N1;for(let e=0;e<t.N1;e++){let t=u*Math.cos(e*f),n=u*Math.sin(e*f);l.push(E(t,n,a))}s.addSecond(E(0,0,e-t.E1)),s.addMainOI(l),r.fig={faceCut:o,faceBottom:s};let p=r.partName;r.vol={extrudes:[{outName:`subpax_${p}_pole`,face:`${p}_faceCut`,extrudeMethod:S.eRotate,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${p}_bottom`,face:`${p}_faceBottom`,extrudeMethod:S.eLinearOrtho,length:t.E2,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${p}_top`,face:`${p}_faceBottom`,extrudeMethod:S.eLinearOrtho,length:t.E2,rotate:[0,0,0],translate:[0,0,t.H1-t.E2]}],volumes:[{outName:`pax_${p}`,boolMethod:T.eUnion,inList:[`subpax_${p}_pole`,`subpax_${p}_bottom`,`subpax_${p}_top`]}]},r.sub={},r.logstr+=`V-Axis drawn successfully!
|
|
90
|
+
`,r.calcErr=!1}catch(e){r.logstr+=e,console.log(e)}return r}var Me={pTitle:`Heliostat V-Axis`,pDescription:`The vertical axis inside the pole of an heliostat`,pDef:Ae,pGeom:je},Ne={partName:`ring`,params:[h(`D1`,`mm`,400,1,2e3,1),h(`D3`,`mm`,800,1,4e3,1),h(`H1`,`mm`,20,1,100,1),h(`H2`,`mm`,100,1,600,1),s(`ring holes`),h(`N2`,``,24,3,100,1),h(`D2`,`mm`,40,1,100,1),h(`L1`,`mm`,45,1,300,1),s(`ring fake teeth`),h(`N1`,``,100,3,1e4,1),h(`L2`,`mm`,30,1,200,1),h(`L3`,`mm`,30,1,200,1)],paramSvg:{D1:`ring_top.svg`,D3:`ring_top.svg`,H1:`ring_section.svg`,H2:`ring_section.svg`,N2:`ring_top.svg`,D2:`ring_top.svg`,L1:`ring_top.svg`,N1:`ring_top.svg`,L2:`ring_top.svg`,L3:`ring_top.svg`},sim:{tMax:180,tStep:.5,tUpdate:500}};function Pe(e,t,n=``){let r=a(Ne.partName+n),i=x(),o=x(),s=x();r.logstr+=`${r.partName} simTime: ${e}
|
|
91
|
+
`;try{let e=t.D1/2,n=t.D2/2,a=t.D3/2,c=t.H1+t.H2;if(t.L1<n)throw`err203: L1 ${t.L1} too small compare to D2 ${t.D2}`;if(e+t.L1+n>a-t.L2-t.L3)throw`err204: D3 ${t.D3} too small compare to D1 ${t.D1}, L1 ${t.L1}, L2 ${t.L2}, L3 ${t.L3}`;if(2*Math.atan2(n,e+t.L1)>2*Math.PI/t.N2)throw`err205: D2 ${t.D2} too large compare to N2 ${t.N2}`;r.logstr+=`ring-height: ${d(c)} mm
|
|
92
|
+
`;let l=a-t.L3,u=l-t.L2,f=2*Math.PI/(2*t.N1),p=v(l,0);for(let e=0;e<t.N1;e++){let t=2*e+1,n=2*e+2,r=u*Math.cos(t*f),i=u*Math.sin(t*f),a=l*Math.cos(n*f),o=l*Math.sin(n*f);p.addSegStrokeA(r,i).addSegStrokeA(a,o)}let m=[];m.push(E(0,0,a)),m.push(E(0,0,e));let h=e+t.L1,g=2*Math.PI/t.N2;for(let e=0;e<t.N2;e++){let t=h*Math.cos(e*g),r=h*Math.sin(e*g);m.push(E(t,r,n)),o.addSecond(E(t,r,n))}i.addSecond(p),i.addMainOI(m);let _=[];_.push(E(0,0,a)),_.push(p),o.addSecond(E(0,0,e)),o.addMainOI(_);let y=v(e,0).addSegStrokeA(-e,0).addSegStrokeA(-e,-t.H1).addSegStrokeA(e,-t.H1).closeSegStroke(),b=function(r){return v(r*(e+t.L1)+n,0).addSegStrokeR(-2*n,0).addSegStrokeR(0,-t.H1).addSegStrokeR(2*n,0).closeSegStroke()},x=function(e){return v(e*(a-t.L3),-t.H1).addSegStrokeR(-e*t.L2,0).addSegStrokeR(0,-t.H2).addSegStrokeR(e*t.L2,0).closeSegStroke()},C=function(n){return v(n*a,0).addSegStrokeR(-n*(a-e),0).addSegStrokeR(0,-t.H1).addSegStrokeR(n*(a-t.L2-t.L3-e),0).addSegStrokeR(0,-t.H2).addSegStrokeR(n*(t.L2+t.L3),0).closeSegStroke()};s.addSecond(y),s.addSecond(b(1)),s.addSecond(b(-1)),s.addSecond(x(1)),s.addSecond(x(-1)),s.addMainO(C(1)),s.addSecond(C(-1)),r.fig={faceRingBase:i,faceRingTeeth:o,faceSection:s};let w=r.partName;r.vol={extrudes:[{outName:`subpax_${w}_base`,face:`${w}_faceRingBase`,extrudeMethod:S.eLinearOrtho,length:t.H1,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${w}_teeth`,face:`${w}_faceRingTeeth`,extrudeMethod:S.eLinearOrtho,length:c,rotate:[0,0,0],translate:[0,0,0]}],volumes:[{outName:`pax_${w}`,boolMethod:T.eUnion,inList:[`subpax_${w}_base`,`subpax_${w}_teeth`]}]},r.sub={},r.logstr+=`ring drawn successfully!
|
|
93
|
+
`,r.calcErr=!1}catch(e){r.logstr+=e,console.log(e)}return r}var Fe={pTitle:`Heliostat ring`,pDescription:`The gear ring for adjusting the azimuth of the heliostat`,pDef:Ne,pGeom:Pe},Ie={partName:`ring_guidance`,params:[h(`D1`,`mm`,700,5,2500,1),h(`N1`,`legs`,6,1,24,1),h(`D2`,`mm`,600,5,2e3,1),s(`leg details`),h(`D3`,`mm`,30,1,200,1),h(`D4`,`mm`,50,1,200,1),h(`L1`,`mm`,90,1,900,1),h(`R5`,`mm`,20,0,500,1),s(`inner`),h(`D6`,`mm`,300,1,1e3,1),h(`N2`,`motors`,8,1,200,1),h(`L2`,`mm`,50,1,200,1),h(`D7`,`mm`,80,1,200,1),s(`thickness`),h(`T1`,`mm`,10,1,200,1)],paramSvg:{D1:`ring_guidance_top.svg`,D2:`ring_guidance_top.svg`,D3:`ring_guidance_top.svg`,D4:`ring_guidance_top.svg`,R5:`ring_guidance_top.svg`,D6:`ring_guidance_top.svg`,D7:`ring_guidance_top.svg`,N1:`ring_guidance_top.svg`,N2:`ring_guidance_top.svg`,L1:`ring_guidance_top.svg`,L2:`ring_guidance_top.svg`,T1:`ring_guidance_top.svg`},sim:{tMax:100,tStep:.5,tUpdate:500}};function Le(e,t,n=``){let r=a(Ie.partName+n),i=x(),o=x();r.logstr+=`${r.partName} simTime: ${e}
|
|
94
|
+
`;try{let e=t.D1/2,n=t.D3/2,a=t.D4/2,s=t.D6/2,c=t.D7/2,l=2*Math.PI/t.N2;if(c>t.L2)throw`err461: D7 ${t.D7} is too large compare to L2 ${t.L2}`;if(t.N2*t.D7>(t.D6+2*t.L2)*Math.PI)throw`err462: N2 ${t.N2} is too large compare to D6 ${t.D6}, D7 ${t.D7} and L2 ${t.L2}`;if(t.D2<t.D6+2*t.L2+2*c)throw`err463: D2 ${t.D2} is too small compare to D6 ${t.D6}, L2 ${t.L2} and D7 ${t.D7}`;r.logstr+=`ring_guidance: Dmax ${d(t.D1+2*a)} mm
|
|
95
|
+
`;let u=[],[f,p,m]=ie(t);r.logstr+=f,u.push(p),u.push(E(0,0,s));for(let e=0;e<t.N2;e++)u.push(E(s+t.L2,0,c).rotate(0,0,e*l));for(let r=0;r<t.N1;r++)u.push(E(e,0,n).rotate(0,0,r*m));i.addMainOI(u);let h=function(e,t,n,r){return v(e,t).addSegStrokeR(n,0).addSegStrokeR(0,r).addSegStrokeR(-n,0).closeSegStroke()},g=e-s+a;o.addMainO(h(s,0,g,t.T1)),o.addMainO(h(-s-g,0,g,t.T1)),o.addSecond(h(e-n,0,2*n,t.T1)),o.addSecond(h(-e-n,0,2*n,t.T1));let _=s+t.L2;o.addSecond(h(_-c,0,2*c,t.T1)),o.addSecond(h(-_-c,0,2*c,t.T1)),r.fig={faceTop:i,faceSection:o};let y=r.partName;r.vol={extrudes:[{outName:`subpax_${y}_top`,face:`${y}_faceTop`,extrudeMethod:S.eLinearOrtho,length:t.T1,rotate:[0,0,0],translate:[0,0,0]}],volumes:[{outName:`pax_${y}`,boolMethod:T.eIdentity,inList:[`subpax_${y}_top`]}]},r.sub={},r.logstr+=`ring_guidance drawn successfully!
|
|
96
|
+
`,r.calcErr=!1}catch(e){r.logstr+=e,console.log(e)}return r}var Re={pTitle:`Ring-guidance`,pDescription:`The guidance of the gear-ring for the heliostat azimuth`,pDef:Ie,pGeom:Le},ze={partName:`vaxis_guidance`,params:[h(`D1`,`mm`,700,5,2500,1),h(`N1`,`legs`,6,1,24,1),h(`D2`,`mm`,600,5,2e3,1),s(`leg details`),h(`D3`,`mm`,30,1,200,1),h(`D4`,`mm`,50,1,200,1),h(`L1`,`mm`,90,1,900,1),h(`R5`,`mm`,20,0,500,1),s(`inner`),h(`D6`,`mm`,540,1,1e3,1),h(`N2`,`springs`,6,1,24,1),t(`orientation`,[`ccw`,`cw`,`alt`]),h(`R7`,`mm`,10,0,100,1),h(`L2`,`mm`,100,1,900,1),h(`E2`,`mm`,20,1,200,1),s(`spring`),h(`SA1`,`degree`,0,-45,45,1),h(`SE1`,`mm`,10,.1,200,.1),h(`SD1`,`mm`,20,1,200,1),h(`SD2`,`mm`,10,1,200,1),h(`SN1`,`loops`,2,0,8,1),h(`SL1`,`mm`,40,1,900,1),h(`SL2`,`mm`,70,0,900,1),t(`Send`,[`round`,`pike`]),s(`thickness`),h(`T1`,`mm`,10,1,200,1),h(`Dvaxis`,`mm`,260,5,1e3,1)],paramSvg:{D1:`vaxis_guidance_top.svg`,N1:`vaxis_guidance_top.svg`,D2:`vaxis_guidance_top.svg`,D3:`vaxis_guidance_top.svg`,D4:`vaxis_guidance_top.svg`,L1:`vaxis_guidance_top.svg`,R5:`vaxis_guidance_top.svg`,D6:`vaxis_guidance_top.svg`,N2:`vaxis_guidance_top.svg`,orientation:`vaxis_guidance_top.svg`,R7:`vaxis_guidance_top.svg`,L2:`vaxis_guidance_spring.svg`,E2:`vaxis_guidance_spring.svg`,SA1:`vaxis_guidance_spring.svg`,SE1:`vaxis_guidance_spring.svg`,SD1:`vaxis_guidance_spring.svg`,SD2:`vaxis_guidance_spring.svg`,SN1:`vaxis_guidance_spring.svg`,SL1:`vaxis_guidance_spring.svg`,SL2:`vaxis_guidance_spring.svg`,Send:`vaxis_guidance_spring.svg`,T1:`vaxis_guidance_top.svg`,Dvaxis:`vaxis_guidance_top.svg`},sim:{tMax:100,tStep:.5,tUpdate:500}};function Be(e,t,n=``){let r=a(ze.partName+n),i=x(),o=x();r.logstr+=`${r.partName} simTime: ${e}
|
|
97
|
+
`;try{let e=t.D1/2,n=t.D2/2,a=t.D3/2,s=t.D4/2,c=t.D6/2;if(n<c)throw`err466: D6 ${t.D6} is too large compare to D2 ${t.D2}`;r.logstr+=`vaxis_guidance: Dmax ${d(t.D1+2*s)} mm
|
|
98
|
+
`;let l=[],[u,f,p]=ie(t);r.logstr+=u,l.push(f);for(let n=0;n<t.N1;n++)l.push(E(e,0,a).rotate(0,0,n*p));let[m,h]=X(t);r.logstr+=m,l.push(h),i.addSecond(E(0,0,t.Dvaxis/2)),i.addMainOI(l);let g=e-c+s;o.addMainO(D(c,0,g,t.T1)),o.addMainO(D(-c-g,0,g,t.T1)),o.addSecond(D(e-a,0,2*a,t.T1)),o.addSecond(D(-e-a,0,2*a,t.T1)),r.fig={faceTop:i,faceSection:o};let _=r.partName;r.vol={extrudes:[{outName:`subpax_${_}_top`,face:`${_}_faceTop`,extrudeMethod:S.eLinearOrtho,length:t.T1,rotate:[0,0,0],translate:[0,0,0]}],volumes:[{outName:`pax_${_}`,boolMethod:T.eIdentity,inList:[`subpax_${_}_top`]}]},r.sub={},r.logstr+=`vaxis_guidance drawn successfully!
|
|
99
|
+
`,r.calcErr=!1}catch(e){r.logstr+=e,console.log(e)}return r}var Ve={pTitle:`Vaxis-guidance`,pDescription:`The guidance of the V-Axis for the heliostat azimuth`,pDef:ze,pGeom:Be},He={partName:`haxis_guidance`,params:[h(`D5`,`mm`,600,1,2e3,1),h(`D8`,`mm`,1e3,1,2e3,1),s(`outer details`),h(`E5`,`mm`,1,0,200,1),h(`E8`,`mm`,20,1,200,1),h(`L5`,`mm`,20,1,200,1),h(`R9`,`mm`,20,0,500,1),s(`inner spring`),h(`SA1`,`degree`,0,-45,45,1),h(`SE1`,`mm`,2,.1,100,.1),h(`SD1`,`mm`,20,1,200,1),h(`SD2`,`mm`,10,1,200,1),h(`SN1`,`springs`,7,1,24,1),h(`SL1`,`mm`,60,0,500,1),h(`SL2`,`mm`,100,0,500,1),t(`Send`,[`round`,`pike`]),s(`thickness`),h(`L4`,`mm`,400,1,2e3,1)],paramSvg:{D5:`haxis_guidance_outer.svg`,D8:`haxis_guidance_outer.svg`,E5:`haxis_guidance_outer.svg`,E8:`haxis_guidance_outer.svg`,L5:`haxis_guidance_outer.svg`,R9:`haxis_guidance_outer.svg`,SA1:`haxis_guidance_spring.svg`,SE1:`haxis_guidance_spring.svg`,SD1:`haxis_guidance_spring.svg`,SD2:`haxis_guidance_spring.svg`,SN1:`haxis_guidance_spring.svg`,SL1:`haxis_guidance_spring.svg`,SL2:`haxis_guidance_spring.svg`,Send:`haxis_guidance_spring.svg`,L4:`haxis_guidance_outer.svg`},sim:{tMax:100,tStep:.5,tUpdate:500}};function Ue(e,t,n=``){let r=a(He.partName+n),s=x(),c=x();r.logstr+=`${r.partName} simTime: ${e}
|
|
100
|
+
`;try{let e=t.D5/2,n=t.D8/2,a=t.SD1/2,l=e+t.E5,u=n-t.E8,f=2*Math.asin(t.L5/(2*l)),p=Math.PI/12+i(t.SA1),m=Math.PI/2+f-p,h=Math.PI-p,g=Math.PI/2-Math.PI/6+p;if(l+a+t.SE1>u)throw`err411: D8 ${t.D8} is too small compare to D5 ${t.D5}, E5 ${t.E5}, E8 ${t.E8}`;if(2*Math.PI/3-2*f<t.R9/u)throw`err412: L5 ${t.L5} is too large compare to R9 ${t.R9}`;r.logstr+=`haxis_guidance: Dinner ${d(2*l)} mm
|
|
101
|
+
`,s.addSecond(E(0,0,e)),s.addSecond(E(0,0,n));let[_,y]=ae(t,!1),[,b]=ae(t,!0);r.logstr+=_;let x=Math.PI/2-f,C=-Math.PI/6+f,w=o(0,0),O=w.translatePolar(x,l+t.SE1+a),k=O.translatePolar(x-Math.PI/2,a),A=k.translatePolar(x+Math.PI,a+t.SE1),j=k.translatePolar(x+Math.PI,a),M=A.rotate(k,m),N=w.translatePolar(C,l+t.SE1+a),P=N.translatePolar(C+Math.PI/2,a),F=P.translatePolar(C+Math.PI,a+t.SE1),I=P.translatePolar(C+Math.PI,a),L=I.rotate(P,-m),R=v(0,l).addSegStrokeA(A.cx,A.cy).addPointA(M.cx,M.cy).addSegArc(a+t.SE1,!1,!0);R.addPartial(y.rotate(0,0,h).translate(M.cx,M.cy)),R.addPointA(j.cx,j.cy).addPointA(O.cx,O.cy).addSegArc2().addSegStrokeAP(x,u).addCornerRounded(t.R9).addPointAP(C,u).addSegArc(u,!1,!1).addCornerRounded(t.R9).addSegStrokeA(N.cx,N.cy).addPointA(I.cx,I.cy).addPointA(L.cx,L.cy).addSegArc2(),R.addPartial(b.rotate(0,0,g).translate(L.cx,L.cy)),R.addPointA(F.cx,F.cy).addSegArc(a+t.SE1,!1,!0).addSegStrokeAP(-Math.PI/6,l).addSegStrokeAP(-Math.PI/6,n).addPointAP(Math.PI/2,n).addSegArc(n,!1,!0).closeSegStroke(),s.addMainO(R);let z=n*Math.sin(Math.PI/6);c.addMainO(D(0,-z,t.L4,n+z)),c.addSecond(D(0,-n,t.L4,2*n)),c.addSecond(D(0,-e,t.L4,2*e)),r.fig={faceProfile:s,faceSide:c};let B=r.partName;r.vol={extrudes:[{outName:`subpax_${B}_profile`,face:`${B}_faceProfile`,extrudeMethod:S.eLinearOrtho,length:t.L4,rotate:[0,0,0],translate:[0,0,0]}],volumes:[{outName:`pax_${B}`,boolMethod:T.eIdentity,inList:[`subpax_${B}_profile`]}]},r.sub={},r.logstr+=`haxis_guidance drawn successfully!
|
|
102
|
+
`,r.calcErr=!1}catch(e){r.logstr+=e,console.log(e)}return r}var We={pTitle:`Haxis-guidance`,pDescription:`The guidance of the H-Axis for the heliostat inclination`,pDef:He,pGeom:Ue},Ge={partName:`rod`,params:[h(`L1`,`mm`,1e4,100,4e4,10),h(`L2`,`mm`,100,2,400,1),h(`L3`,`mm`,400,10,1e3,1),h(`L4`,`mm`,600,10,1e3,1),h(`N1`,``,10,2,50,1),s(`section`),h(`H1`,`mm`,200,5,4e3,1),h(`E1`,`mm`,2,1,80,1),h(`E2`,`mm`,10,1,80,1),s(`pad`),h(`N3`,``,2,1,20,1),h(`N4`,``,4,1,20,1),h(`R3`,`mm`,100,1,500,1),h(`D2`,`mm`,10,1,100,1),h(`L7`,`mm`,10,1,300,1)],paramSvg:{L1:`rod_top.svg`,L2:`rod_top.svg`,L3:`rod_top.svg`,L4:`rod_top.svg`,H1:`rod_cut.svg`,E1:`rod_cut.svg`,E2:`rod_cut.svg`,N1:`rod_top.svg`,N3:`rod_top.svg`,N4:`rod_top.svg`,R3:`rod_top.svg`,D2:`rod_plate.svg`,L7:`rod_plate.svg`},sim:{tMax:180,tStep:.5,tUpdate:500}};function Ke(e,t,n=``){let r=a(Ge.partName+n),i=x(),o=x(),s=x();r.logstr+=`${r.partName} simTime: ${e}
|
|
103
|
+
`;try{let e=t.D2/2,n=t.L3/(t.N3+1),a=t.L4/(t.N4+1);r.logstr+=`rod-length: ${d(t.L1)} mm
|
|
104
|
+
`;let c=(t.L1-t.L3)/(t.N1-1);r.logstr+=`space-length: ${d(c)} mm
|
|
105
|
+
`;let l=function(r){let i=[],o=v(t.L4/2,r).addCornerRounded(t.R3).addSegStrokeA(t.L4/2,r+t.L3).addCornerRounded(t.R3).addSegStrokeA(-t.L4/2,r+t.L3).addCornerRounded(t.R3).addSegStrokeA(-t.L4/2,r).addCornerRounded(t.R3).closeSegStroke();i.push(o);for(let a=1;a<t.N3+1;a++)i.push(E(t.L4/2-t.L7,r+a*n,e)),i.push(E(-t.L4/2+t.L7,r+a*n,e));for(let n=1;n<t.N4+1;n++)i.push(E(-t.L4/2+n*a,r+t.L7,e)),i.push(E(-t.L4/2+n*a,r+t.L3-t.L7,e));return i},u=function(e,n){return v(t.L2/2,e).addSegStrokeA(t.L2/2,e+n).addSegStrokeA(-t.L2/2,e+n).addSegStrokeA(-t.L2/2,e).closeSegStroke()},f=[],p=t.L2/2,m=t.L4/2,h=(t.L2-2*t.E1)/2,g=t.H1-t.E1,_=v(p,0).addSegStrokeA(p,t.H1).addSegStrokeA(-p,t.H1).addSegStrokeA(-p,0).closeSegStroke(),y=v(h,t.E1).addSegStrokeA(h,g).addSegStrokeA(-h,g).addSegStrokeA(-h,t.E1).closeSegStroke(),b=v(m,t.H1).addSegStrokeA(m,t.H1+t.E2).addSegStrokeA(-m,t.H1+t.E2).addSegStrokeA(-m,t.H1).closeSegStroke();f.push(_),f.push(y),i.addSecond(b),i.addMainOI(f),o.addMainOI(l(0)),o.addSecond(u(-t.L3/2,2*t.L3));let x=(t.L1-t.L3)/(t.N1-1);for(let e=0;e<t.N1;e++)s.addMainOI(l(e*x));s.addSecond(u(0,t.L1)),r.fig={faceCut:i,facePlate:o,faceTop:s};let C=r.partName;r.vol={extrudes:[{outName:`subpax_${C}_rod`,face:`${C}_faceCut`,extrudeMethod:S.eLinearOrtho,length:t.L1,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${C}_plates`,face:`${C}_faceTop`,extrudeMethod:S.eLinearOrtho,length:t.E2,rotate:[Math.PI/2,0,0],translate:[0,t.E2+t.H1,0]}],volumes:[{outName:`pax_${C}`,boolMethod:T.eUnion,inList:[`subpax_${C}_rod`,`subpax_${C}_plates`]}]},r.sub={},r.logstr+=`heliostat-rod drawn successfully!
|
|
106
|
+
`,r.calcErr=!1}catch(e){r.logstr+=e,console.log(e)}return r}var qe={pTitle:`Heliostat rod`,pDescription:`The rod of an heliostat-surface`,pDef:Ge,pGeom:Ke},Je={partName:`trapeze`,params:[h(`L1`,`mm`,1600,10,4e3,1),h(`L2`,`mm`,1e3,10,4e3,1),h(`L3`,`mm`,400,5,800,1),h(`L4`,`mm`,300,5,800,1),s(`outer frame`),h(`N1`,``,7,1,20,1),h(`N2`,``,4,1,20,1),h(`D1`,`mm`,10,1,40,1),h(`L5`,`mm`,100,1,400,1),h(`L6`,`mm`,20,1,400,1),h(`R1`,`mm`,60,1,400,1),h(`R2`,`mm`,20,1,400,1),s(`inner pad`),h(`N3`,``,2,1,20,1),h(`N4`,``,2,1,20,1),h(`D2`,`mm`,10,1,40,1),h(`L7`,`mm`,20,1,400,1),h(`R3`,`mm`,20,1,400,1),s(`diagonal shaft`),h(`D3`,`mm`,30,1,100,1),h(`D4`,`mm`,26,1,100,1),h(`H1`,`mm`,300,.5,800,.5),h(`H2`,`mm`,2,.5,800,.5),h(`H3`,`mm`,5,.5,800,.5)],paramSvg:{L1:`trapeze_top.svg`,L2:`trapeze_top.svg`,L3:`trapeze_top.svg`,L4:`trapeze_top.svg`,N1:`trapeze_top.svg`,N2:`trapeze_top.svg`,N3:`trapeze_top.svg`,N4:`trapeze_top.svg`,L5:`trapeze_top.svg`,L6:`trapeze_top.svg`,L7:`trapeze_top.svg`,D1:`trapeze_top.svg`,D2:`trapeze_top.svg`,D3:`trapeze_rod.svg`,D4:`trapeze_rod.svg`,R1:`trapeze_top.svg`,R2:`trapeze_top.svg`,R3:`trapeze_top.svg`,H1:`trapeze_side.svg`,H2:`trapeze_side.svg`,H3:`trapeze_side.svg`},sim:{tMax:180,tStep:.5,tUpdate:500}};function Ye(e,t,n=``){let r=a(Je.partName+n),i,o,s=x(),c=x(),l=x(),u=x(),f=x();r.logstr+=`${r.partName} simTime: ${e}
|
|
107
|
+
`;try{if(t.L3>t.L1-t.L5)throw`err595: L3 ${t.L3} too large compare to L1 ${t.L1} and L5 ${t.L5}`;if(t.L4>t.L2-t.L5)throw`err596: L4 ${t.L4} too large compare to L2 ${t.L2} and L5 ${t.L5}`;if(t.H1-t.H2-t.H3<4*t.D3)throw`err597: H1 ${t.H1} too small compare to H2 ${t.H2}, H3 ${t.H3} and D3 ${t.D3}`;let e=t.R1*(1-1/Math.sqrt(2)),n=t.R3*(1-1/Math.sqrt(2)),a=t.L2/2-e-(t.L4/2-n),p=t.L1/2-e-(t.L3/2-n),m=Math.sqrt(a**2+p**2),h=t.H1-t.H2-t.H3,g=Math.sqrt(m**2+h**2),_=Math.atan2(h,m),y=Math.atan2(p,a);r.logstr+=`rod-slope: length: ${d(g)} mm, angle: ${d(w(_))} degree
|
|
108
|
+
`,r.logstr+=`rod-xy-angle: ${d(w(y))} degree
|
|
109
|
+
`;let b=t.D3/Math.cos(Math.PI/2-_);r.logstr+=`rod-footprint-length: ${d(b)} mm
|
|
110
|
+
`;let x=Math.sqrt((b/2)**2+(t.D3/2)**2),C=Math.atan2(t.D3,b);i=function(e,t,n){return v(e,t).addPointRP(n+Math.PI-C,x).addSeg2Arcs(n+Math.PI/2,n).addPointRP(n+Math.PI+C,x).addSeg2Arcs(n+Math.PI,n+Math.PI/2).addPointRP(n-C,x).addSeg2Arcs(n+3*Math.PI/2,n+Math.PI).addPointRP(n+C,x).addSeg2Arcs(n,n-Math.PI/2)},o=function(e,n,r){return v(e+x*Math.cos(r+Math.PI-C),n+x*Math.sin(r+Math.PI-C)).addSegStrokeRP(r+Math.PI,m).addSegStrokeRP(r-Math.PI/2,t.D3).addSegStrokeRP(r,m).closeSegStroke()};let D=[];if(t.R1>t.L1/4||t.R1>t.L2/4)throw`err614: R1 ${t.R1} too large compare to L1 ${t.L1} or L2 ${t.L2}`;let O=v(t.L2/2,t.L1/2).addSegStrokeA(-t.L2/2,t.L1/2).addCornerRounded(t.R1).addSegStrokeA(-t.L2/2,-t.L1/2).addCornerRounded(t.R1).addSegStrokeA(t.L2/2,-t.L1/2).addCornerRounded(t.R1).closeSegStroke().addCornerRounded(t.R1);if(t.R2>(t.L1-2*t.L5)/4||t.R2>(t.L2-2*t.L5)/4)throw`err627: R2 ${t.R2} too large compare to L1 ${t.L1}, L2 ${t.L2} and L5 ${t.L5}`;let k=v(t.L2/2-t.L5,t.L1/2-t.L5).addSegStrokeA(-t.L2/2+t.L5,t.L1/2-t.L5).addCornerRounded(t.R2).addSegStrokeA(-t.L2/2+t.L5,-t.L1/2+t.L5).addCornerRounded(t.R2).addSegStrokeA(t.L2/2-t.L5,-t.L1/2+t.L5).addCornerRounded(t.R2).closeSegStroke().addCornerRounded(t.R2);if(t.R3>t.L3/4||t.R3>t.L4/4)throw`err639: R3 ${t.R3} too large compare to L3 ${t.L3} or L4 ${t.L4}`;let A=v(t.L4/2,t.L3/2).addSegStrokeA(-t.L4/2,t.L3/2).addCornerRounded(t.R3).addSegStrokeA(-t.L4/2,-t.L3/2).addCornerRounded(t.R3).addSegStrokeA(t.L4/2,-t.L3/2).addCornerRounded(t.R3).closeSegStroke().addCornerRounded(t.R3);D.push(O),D.push(k),s.addSecond(A);let j=t.L1/(t.N1+1),M=t.L2/(t.N2+1),N=t.L3/(t.N3+1),P=t.L4/(t.N4+1);if(t.L5<t.D1/2+t.L6)throw`err658: L5 ${t.L5} too small compare to D1 ${t.D1} or L6 ${t.L6}`;if(N<t.D2/2+t.L7)throw`err661: D2 ${t.D2} or L7 ${t.L7} too large compare to L3 ${t.l3}`;if(P<t.D2/2+t.L7)throw`err664: D2 ${t.D2} or L7 ${t.L7} too large compare to L4 ${t.l4}`;let F=[];for(let e=1;e<t.N1+1;e++)F.push(E(t.L2/2-t.L6,-t.L1/2+e*j,t.D1/2)),F.push(E(-t.L2/2+t.L6,-t.L1/2+e*j,t.D1/2));for(let e=1;e<t.N2+1;e++)F.push(E(-t.L2/2+e*M,t.L1/2-t.L6,t.D1/2)),F.push(E(-t.L2/2+e*M,-t.L1/2+t.L6,t.D1/2));let I=[];for(let e=1;e<t.N3+1;e++)I.push(E(t.L4/2-t.L7,-t.L3/2+e*N,t.D2/2)),I.push(E(-t.L4/2+t.L7,-t.L3/2+e*N,t.D2/2));for(let e=1;e<t.N4+1;e++)I.push(E(-t.L4/2+e*P,t.L3/2-t.L7,t.D2/2)),I.push(E(-t.L4/2+e*P,-t.L3/2+t.L7,t.D2/2));F.forEach(e=>{D.push(e)}),I.forEach(e=>{s.addSecond(e)}),s.addMainOI(D);let L=[];L.push(i(t.L2/2-e,t.L1/2-e,y)),L.push(i(t.L4/2-n,t.L3/2-n,y)),L.push(i(-t.L2/2+e,t.L1/2-e,Math.PI-y)),L.push(i(-t.L4/2+n,t.L3/2-n,Math.PI-y)),L.push(i(-t.L2/2+e,-t.L1/2+e,Math.PI+y)),L.push(i(-t.L4/2+n,-t.L3/2+n,Math.PI+y)),L.push(i(t.L2/2-e,-t.L1/2+e,-y)),L.push(i(t.L4/2-n,-t.L3/2+n,-y));let R=[];R.push(o(t.L2/2-e,t.L1/2-e,y)),R.push(o(-t.L2/2+e,t.L1/2-e,Math.PI-y)),R.push(o(-t.L2/2+e,-t.L1/2+e,Math.PI+y)),R.push(o(t.L2/2-e,-t.L1/2+e,-y)),L.forEach(e=>{s.addSecond(e)}),R.forEach(e=>{s.addSecond(e)});let z=[];if(z.push(A),I.forEach(e=>{z.push(e)}),c.addSecond(O),c.addSecond(k),F.forEach(e=>{c.addSecond(e)}),L.forEach(e=>{c.addSecond(e)}),R.forEach(e=>{c.addSecond(e)}),c.addMainOI(z),t.D4>=t.D3)throw`err218: D4 ${t.D4} larger than D3 ${t.D3}`;l.addMainO(E(0,0,t.D3/2)),l.addSecond(E(0,0,t.D4/2)),u.addMainO(E(0,0,t.D4/2)),u.addSecond(E(0,0,t.D3/2));let B=t.D3*Math.cos(_),V=B/Math.tan(_),H=n+(b/2+V)*Math.cos(y),U=n+(b/2+V)*Math.sin(y),W=g+2*(b+V+B),G=W+t.L3+t.L4+B,K=v(G,G).addSegStrokeA(-G,G).addSegStrokeA(-G,-G).addSegStrokeA(G,-G).closeSegStroke();f.addMainO(K),r.fig={faceFrame:s,facePlate:c,faceRod:l,faceRodHollow:u,faceCutRod:f};let q=r.partName;r.vol={extrudes:[{outName:`subpax_${q}_frame`,face:`${q}_faceFrame`,extrudeMethod:S.eLinearOrtho,length:t.H2,rotate:[0,0,0],translate:[0,0,t.H1-t.H2]},{outName:`subpax_${q}_plate`,face:`${q}_facePlate`,extrudeMethod:S.eLinearOrtho,length:t.H3,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${q}_rod1`,face:`${q}_faceRod`,extrudeMethod:S.eLinearOrtho,length:W,rotate:[0,Math.PI/2-_,y],translate:[t.L4/2-H,t.L3/2-U,t.H3-B]},{outName:`subpax_${q}_rod2`,face:`${q}_faceRod`,extrudeMethod:S.eLinearOrtho,length:W,rotate:[0,Math.PI/2-_,Math.PI-y],translate:[-t.L4/2+H,t.L3/2-U,t.H3-B]},{outName:`subpax_${q}_rod3`,face:`${q}_faceRod`,extrudeMethod:S.eLinearOrtho,length:W,rotate:[0,Math.PI/2-_,Math.PI+y],translate:[-t.L4/2+H,-t.L3/2+U,t.H3-B]},{outName:`subpax_${q}_rod4`,face:`${q}_faceRod`,extrudeMethod:S.eLinearOrtho,length:W,rotate:[0,Math.PI/2-_,-y],translate:[t.L4/2-H,-t.L3/2+U,t.H3-B]},{outName:`subpax_${q}_rodH1`,face:`${q}_faceRodHollow`,extrudeMethod:S.eLinearOrtho,length:W,rotate:[0,Math.PI/2-_,y],translate:[t.L4/2-H,t.L3/2-U,t.H3-B]},{outName:`subpax_${q}_rodH2`,face:`${q}_faceRodHollow`,extrudeMethod:S.eLinearOrtho,length:W,rotate:[0,Math.PI/2-_,Math.PI-y],translate:[-t.L4/2+H,t.L3/2-U,t.H3-B]},{outName:`subpax_${q}_rodH3`,face:`${q}_faceRodHollow`,extrudeMethod:S.eLinearOrtho,length:W,rotate:[0,Math.PI/2-_,Math.PI+y],translate:[-t.L4/2+H,-t.L3/2+U,t.H3-B]},{outName:`subpax_${q}_rodH4`,face:`${q}_faceRodHollow`,extrudeMethod:S.eLinearOrtho,length:W,rotate:[0,Math.PI/2-_,-y],translate:[t.L4/2-H,-t.L3/2+U,t.H3-B]},{outName:`subpax_${q}_cut1`,face:`${q}_faceCutRod`,extrudeMethod:S.eLinearOrtho,length:G,rotate:[0,0,0],translate:[0,0,-G]},{outName:`subpax_${q}_cut2`,face:`${q}_faceCutRod`,extrudeMethod:S.eLinearOrtho,length:G,rotate:[0,0,0],translate:[0,0,t.H1]}],volumes:[{outName:`ipax_${q}_rawRod`,boolMethod:T.eUnion,inList:[`subpax_${q}_rod1`,`subpax_${q}_rod2`,`subpax_${q}_rod3`,`subpax_${q}_rod4`]},{outName:`ipax_${q}_rodHollow`,boolMethod:T.eUnion,inList:[`subpax_${q}_rodH1`,`subpax_${q}_rodH2`,`subpax_${q}_rodH3`,`subpax_${q}_rodH4`]},{outName:`ipax_${q}_halfRods`,boolMethod:T.eSubstraction,inList:[`ipax_${q}_rawRod`,`subpax_${q}_cut1`]},{outName:`ipax_${q}_rods`,boolMethod:T.eSubstraction,inList:[`ipax_${q}_halfRods`,`subpax_${q}_cut2`]},{outName:`ipax_${q}_plus`,boolMethod:T.eUnion,inList:[`subpax_${q}_frame`,`subpax_${q}_plate`,`ipax_${q}_rods`]},{outName:`pax_${q}`,boolMethod:T.eSubstraction,inList:[`ipax_${q}_plus`,`ipax_${q}_rodHollow`]}]},r.sub={},r.logstr+=`trapeze drawn successfully!
|
|
111
|
+
`,r.calcErr=!1}catch(e){r.logstr+=e,console.log(e)}return r}var Xe={pTitle:`Heliostat trapeze`,pDescription:`The support of one solar panel. Made out of aluminium for lightness and cooling`,pDef:Je,pGeom:Ye},Ze={partName:`surface`,params:[h(`LH`,`mm`,1600,10,4e3,1),h(`LV`,`mm`,1e3,10,4e3,1),h(`LZ`,`mm`,40,0,100,1),h(`nx`,``,9,1,40,1),h(`ny`,``,9,1,40,1),s(`main fantasia`),t(`main_direction`,[`horizontal`,`vertical`]),k(`crenel`,!1),h(`first_row`,``,9,1,40,1),h(`second_row`,``,9,1,40,1),s(`horizontal spacing`),h(`EH`,`mm`,10,0,1e3,1),k(`EH_gradient`,!1),h(`EH_sup`,`mm`,500,0,1e3,1),h(`EH_cycle`,``,1,0,3,.05),h(`EH_start`,``,0,0,1,.05),t(`EH_shape`,[`sinusoid`,`triangle`,`sawUp`,`sawDown`]),s(`vertical spacing`),h(`EV`,`mm`,10,0,1e3,1),k(`EV_gradient`,!1),h(`EV_sup`,`mm`,500,0,1e3,1),h(`EV_cycle`,``,1,0,3,.05),h(`EV_start`,``,0,0,1,.05),t(`EV_shape`,[`sinusoid`,`triangle`,`sawUp`,`sawDown`]),s(`solar power`),h(`power_efficiency`,`%`,16,0,100,.1),h(`solar_power`,`W/m2`,816,100,2e3,1)],paramSvg:{LH:`surface_main.svg`,LV:`surface_main.svg`,LZ:`surface_lz.svg`,nx:`surface_main.svg`,ny:`surface_main.svg`,main_direction:`surface_crenel.svg`,crenel:`surface_crenel.svg`,first_row:`surface_extremities.svg`,second_row:`surface_extremities.svg`,EH:`surface_main.svg`,EH_gradient:`surface_space_evolution.svg`,EH_sup:`surface_space_evolution.svg`,EH_cycle:`surface_space_evolution.svg`,EH_start:`surface_space_evolution.svg`,EH_shape:`surface_space_shape.svg`,EV:`surface_main.svg`,EV_gradient:`surface_space_evolution.svg`,EV_sup:`surface_space_evolution.svg`,EV_cycle:`surface_space_evolution.svg`,EV_start:`surface_space_evolution.svg`,EV_shape:`surface_space_shape.svg`,power_efficiency:`surface_power.svg`,solar_power:`surface_power.svg`},sim:{tMax:180,tStep:.5,tUpdate:500}};function Qe(e,t,n=``){let r=a(Ze.partName+n),i,o=x(),s=x();r.logstr+=`${r.partName} simTime: ${e}
|
|
112
|
+
`;try{let e=t.LH*t.LV/10**6,n=t.solar_power*e*t.power_efficiency/100;r.logstr+=`panel surface: ${d(e)} m2
|
|
113
|
+
`,r.logstr+=`panel power: ${d(n)} W
|
|
114
|
+
`;let a=t.nx*t.ny;r.logstr+=`max panel number: ${a}
|
|
115
|
+
`,r.logstr+=`max panel surface: ${d(a*e)} m2
|
|
116
|
+
`,r.logstr+=`max panel power: ${d(a*n)} W
|
|
117
|
+
`;let c=t.main_direction===1?t.ny:t.nx,l=t.main_direction===1?t.nx:t.ny,u=t.main_direction===1?t.EV:t.EH,f=t.main_direction===1?t.EV_gradient:t.EH_gradient,p=t.main_direction===1?t.EV_sup:t.EH_sup,m=t.main_direction===1?t.EV_cycle:t.EH_cycle,h=t.main_direction===1?t.EV_start:t.EH_start,g=t.main_direction===1?t.EV_shape:t.EH_shape,_=t.main_direction===0?t.EV:t.EH,y=t.main_direction===0?t.EV_gradient:t.EH_gradient,b=t.main_direction===0?t.EV_sup:t.EH_sup,x=t.main_direction===0?t.EV_cycle:t.EH_cycle,C=t.main_direction===0?t.EV_start:t.EH_start,w=t.main_direction===0?t.EV_shape:t.EH_shape,E=Math.max(l,t.first_row,t.second_row),D=[];for(let e=0;e<c;e++){let n=(e+1)%2,r=t.crenel?l-n:l;D.push(r)}D[0]=t.first_row,D[D.length-1]=t.first_row,c>2&&(D[1]=t.second_row,D[D.length-2]=t.second_row);let O=0;D.forEach(e=>{O+=e}),r.logstr+=`actual panel number: ${O} (${d(100*O/a)} %)
|
|
118
|
+
`,r.logstr+=`actual panel surface: ${d(O*e)} m2
|
|
119
|
+
`,r.logstr+=`actual panel power: ${d(O*n)} W
|
|
120
|
+
`;let k=[];for(let e=0;e<c-1;e++){let t=u;if(f===1){let n=c>2?c-2:1,r=(h+e*m/n)%1;switch(g){case 0:t+=p*(1-Math.cos(r*2*Math.PI))/2;break;case 1:t+=p*(1-2*Math.abs(r-.5));break;case 2:t+=p*r;break;case 3:t+=p*(1-r);break;default:t+=p}}k.push(t)}let A=0,j=[];j.push(0),k.forEach(e=>{A+=e,j.push(A)});let M=[];for(let e=0;e<E-1;e++){let t=_;if(y===1){let n=E>2?E-2:1,r=(C+e*x/n)%1;switch(w){case 0:t+=b*(1-Math.cos(r*2*Math.PI))/2;break;case 1:t+=b*(1-2*Math.abs(r-.5));break;case 2:t+=b*r;break;case 3:t+=b*(1-r);break;default:t+=b}}M.push(t)}let N=0,P=[];P.push(0),M.forEach(e=>{N+=e,P.push(N)});let F=0,I=0;t.main_direction===0?(F=c*t.LH+A,I=E*t.LV+N):(F=E*t.LH+N,I=c*t.LV+A);let L=F*I/10**6;r.logstr+=`global horizontal width: ${d(F/1e3)} m
|
|
121
|
+
`,r.logstr+=`global vertical height: ${d(I/1e3)} m
|
|
122
|
+
`,r.logstr+=`global area: ${d(L)} m2
|
|
123
|
+
`,r.logstr+=`area efficiency: ${d(100*O*e/L)} %
|
|
124
|
+
`;let R=-F/2,z=-I/2;i=function(e,n){return v(e,n).addSegStrokeA(e+t.LH,n).addSegStrokeA(e+t.LH,n+t.LV).addSegStrokeA(e,n+t.LV).closeSegStroke()};let B=[];D.forEach((e,n)=>{let r=(E-e)%2,i=Math.floor((E-e)/2);for(let a=0;a<e;a++){let e=0,o=0;t.main_direction===0?(e=R+n*t.LH+j[n],o=z+(i+a)*t.LV+P[i+a],r===1&&(o+=(t.LV+P[i+a+1]-P[i+a])/2)):(o=z+n*t.LV+j[n],e=R+(i+a)*t.LH+P[i+a],r===1&&(e+=(t.LH+P[i+a+1]-P[i+a])/2)),B.push([e,o])}});for(let e of B)o.addMainO(i(e[0],e[1]));s.addMainO(i(0,0)),r.fig={faceSurface:o,faceOnePanel:s};let V=r.partName;r.vol={extrudes:B.map((e,n)=>({outName:`subpax_${V}_panel_${n}`,face:`${V}_faceOnePanel`,extrudeMethod:S.eLinearOrtho,length:t.LZ,rotate:[0,0,0],translate:[e[0],e[1],0]})),volumes:[{outName:`pax_${V}`,boolMethod:T.eUnion,inList:B.map((e,t)=>`subpax_${V}_panel_${t}`)}]},r.sub={},r.logstr+=`panel-surface drawn successfully!
|
|
125
|
+
`,r.calcErr=!1}catch(e){r.logstr+=e,console.log(e)}return r}var $e={pTitle:`Heliostat panel-surface`,pDescription:`The surface collecting the solar power`,pDef:Ze,pGeom:Qe};h(`angle`,`degree`,15,5,45,1),h(`amplitude-offset`,`mm`,1,.5,4,.1),h(`amplitude-scale`,`scalar`,.2,.1,.5,.01),h(`width`,`mm`,15,3,40,.5),h(`height`,`mm`,10,3,40,.5),h(`H1`,`mm`,4e3,100,4e4,10),h(`H2`,`mm`,5e3,100,4e4,10),h(`radius`,`mm`,1e3,100,4e4,10),h(`H1`,`mm`,40,1,4e3,1),h(`H2`,`mm`,50,1,4e3,1),h(`radius`,`mm`,10,1,4e3,1),s(`corners`),h(`Rc`,`mm`,10,0,400,1),h(`p1x`,`mm`,30,-200,200,1),h(`p1y`,`mm`,50,-200,200,1),h(`p2a`,`degree`,30,-200,200,1),h(`p2l`,`mm`,60,0,200,1),h(`rotateOrig`,`degree`,45,-200,200,1),h(`scaleOrig`,`scalar`,1.5,.1,2,.1),h(`p1x`,`mm`,30,-200,200,1),h(`p1y`,`mm`,50,-200,200,1),h(`p2x`,`mm`,-10,-200,200,1),h(`p2y`,`mm`,60,-200,200,1),h(`p3x`,`mm`,70,-200,200,1),h(`p3y`,`mm`,-20,-200,200,1),h(`dist`,`mm`,50,0,200,1),h(`p1x`,`mm`,30,-200,200,1),h(`p1y`,`mm`,50,-200,200,1),h(`p2x`,`mm`,40,-200,200,1),h(`p2y`,`mm`,-20,-200,200,1),h(`p3x`,`mm`,-30,-200,200,1),h(`p3y`,`mm`,30,-200,200,1),h(`l1cx`,`mm`,10,-200,200,1),h(`l1cy`,`mm`,20,-200,200,1),h(`l1ca`,`degree`,15,-200,200,1),h(`l2cx`,`mm`,30,-200,200,1),h(`l2cy`,`mm`,50,-200,200,1),h(`l2ca`,`degree`,35,-200,200,1),h(`p3x`,`mm`,-30,-200,200,1),h(`p3y`,`mm`,30,-200,200,1),h(`p1x`,`mm`,30,-200,200,1),h(`p1y`,`mm`,50,-200,200,1),h(`p2x`,`mm`,40,-200,200,1),h(`p2y`,`mm`,-20,-200,200,1),h(`p3x`,`mm`,-30,-200,200,1),h(`p3y`,`mm`,30,-200,200,1),h(`p1x`,`mm`,30,-200,200,1),h(`p1y`,`mm`,50,-200,200,1),h(`p2x`,`mm`,80,-200,200,1),h(`p2y`,`mm`,-30,-200,200,1),h(`v1a`,`degree`,30,-200,200,1),h(`v1l`,`mm`,60,0,200,1),h(`v2a`,`degree`,30,-200,200,1),h(`v2l`,`mm`,60,0,200,1),h(`r1`,`mm`,30,10,200,1),h(`d1`,`mm`,20,10,200,1),h(`w1`,`mm`,100,10,200,1),h(`r2`,`mm`,60,10,200,1),h(`l1`,`mm`,10,5,200,1),h(`l2`,`mm`,30,5,200,1),h(`r1`,`mm`,20,5,200,1),h(`a1`,`deg`,30,-200,200,1),h(`at1`,`deg`,30,-200,200,1),h(`at2`,`deg`,50,-200,200,1),h(`r1`,`mm`,10,0,200,1),h(`r2`,`mm`,10,0,200,1),h(`r3`,`mm`,10,0,200,1),h(`r4`,`mm`,10,0,200,1),h(`r5`,`mm`,10,0,200,1),h(`r6`,`mm`,5,0,200,1),h(`n1`,`scalar`,16,1,50,1),h(`n2`,`scalar`,6,3,50,1),h(`r1`,`mm`,5,0,20,1),h(`L1`,`mm`,100,10,200,1),h(`L2`,`mm`,100,10,200,1),h(`R1`,`mm`,10,0,100,1),h(`R2`,`mm`,10,0,100,1),k(`circle`,!0),h(`circle-size`,`mm`,100,1,1e3,1),k(`contour`,!0),h(`contour-size`,`mm`,30,1,1e3,1),k(`contour-arc-large`,!1);var et={"gear/gear_wheel":U,"gear/gear_bar":K,"gear/gear_ring":ee,"gear/gear_epicycloid":ne,"heliostat/heliostat":xe,"heliostat/heliostat_2":Ee,"heliostat/base":ke,"heliostat/pole_static":le,"heliostat/vaxis":Me,"heliostat/ring":Fe,"heliostat/vaxis_holder":se,"heliostat/ring_guidance":Re,"heliostat/vaxis_guidance":Ve,"heliostat/rake":fe,"heliostat/rake_stopper":$,"heliostat/haxis_guidance":We,"heliostat/spider":he,"heliostat/swing":ve,"heliostat/rod":qe,"heliostat/trapeze":Xe,"heliostat/surface":$e};function tt(e){return e.replace(/^.*\//g,``)}function nt(e){let t={};for(let n of Object.keys(e)){let e=tt(n);t[e]=`/${n}`}return t}function rt(e){let t=[];for(let n of Object.keys(e))t.push(n);return t}var it=nt(et),at=rt(et);export{at as n,et as r,it as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./BkVLPnKR.js";import{i as e,o as t}from"./zy21FDY2.js";var n={get data(){return t.data},get error(){return t.error},get form(){return t.form},get params(){return t.params},get route(){return t.route},get state(){return t.state},get status(){return t.status},get url(){return t.url}};e.updated.check;var r=n;export{r as t};
|