designix-uis 0.5.41 → 1.0.1
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/designix-uis.js +3 -3
- package/dist/public/_app/immutable/assets/{3.CSM_vx3m.css → 3.F_XryGBu.css} +1 -1
- package/dist/public/_app/immutable/assets/{_page.CSM_vx3m.css → _page.F_XryGBu.css} +1 -1
- package/dist/public/_app/immutable/chunks/71jGndfk.js +1 -0
- package/dist/public/_app/immutable/chunks/B6f9MN2N.js +1 -0
- package/dist/public/_app/immutable/chunks/Bpmoxeo_.js +1 -0
- package/dist/public/_app/immutable/chunks/BxEGwKtU.js +1 -0
- package/dist/public/_app/immutable/chunks/C6gpjNdh.js +1 -0
- package/dist/public/_app/immutable/chunks/CNuAIbK8.js +1 -0
- package/dist/public/_app/immutable/chunks/Cfb4YnNO.js +131 -0
- package/dist/public/_app/immutable/chunks/Cyy3J-St.js +1 -0
- package/dist/public/_app/immutable/chunks/DzodC9Fi.js +1 -0
- package/dist/public/_app/immutable/chunks/UedIxzRF.js +3 -0
- package/dist/public/_app/immutable/chunks/vc0esDx2.js +2 -0
- package/dist/public/_app/immutable/entry/app.CG242Ik5.js +2 -0
- package/dist/public/_app/immutable/entry/start.B5keCfEW.js +1 -0
- package/dist/public/_app/immutable/nodes/0.BBqlSwyG.js +2 -0
- package/dist/public/_app/immutable/nodes/1.CRPDCYJR.js +1 -0
- package/dist/public/_app/immutable/nodes/2.DywDsvzu.js +1 -0
- package/dist/public/_app/immutable/nodes/3.Qz57JPTx.js +217 -0
- package/dist/public/_app/version.json +1 -1
- package/dist/public/gear/gear_bar.html +22 -22
- package/dist/public/gear/gear_epicycloid.html +22 -22
- package/dist/public/gear/gear_ring.html +22 -22
- package/dist/public/gear/gear_wheel.html +22 -22
- package/dist/public/heliostat/base.html +22 -22
- package/dist/public/heliostat/haxis_guidance.html +22 -22
- package/dist/public/heliostat/heliostat.html +22 -22
- package/dist/public/heliostat/heliostat_2.html +22 -22
- package/dist/public/heliostat/pole_static.html +22 -22
- package/dist/public/heliostat/rake.html +22 -22
- package/dist/public/heliostat/rake_stopper.html +22 -22
- package/dist/public/heliostat/ring.html +22 -22
- package/dist/public/heliostat/ring_guidance.html +22 -22
- package/dist/public/heliostat/rod.html +22 -22
- package/dist/public/heliostat/spider.html +22 -22
- package/dist/public/heliostat/surface.html +22 -22
- package/dist/public/heliostat/swing.html +22 -22
- package/dist/public/heliostat/trapeze.html +22 -22
- package/dist/public/heliostat/vaxis.html +22 -22
- package/dist/public/heliostat/vaxis_guidance.html +22 -22
- package/dist/public/heliostat/vaxis_holder.html +22 -22
- package/dist/public/index.html +18 -18
- package/package.json +3 -3
- package/dist/public/_app/immutable/chunks/3KMmcniM.js +0 -125
- package/dist/public/_app/immutable/chunks/6zLRVRT9.js +0 -1
- package/dist/public/_app/immutable/chunks/B6cXXlIB.js +0 -3
- package/dist/public/_app/immutable/chunks/BGDGtrfQ.js +0 -1
- package/dist/public/_app/immutable/chunks/BGe1NobS.js +0 -1
- package/dist/public/_app/immutable/chunks/BWo6ipe6.js +0 -1
- package/dist/public/_app/immutable/chunks/BsuezFLB.js +0 -216
- package/dist/public/_app/immutable/chunks/Bvx3yFzP.js +0 -1
- package/dist/public/_app/immutable/chunks/CD5k8j7s.js +0 -1
- package/dist/public/_app/immutable/chunks/V239f71F.js +0 -1
- package/dist/public/_app/immutable/chunks/xh_wmC9C.js +0 -1
- package/dist/public/_app/immutable/entry/app.DBTU_iS4.js +0 -2
- package/dist/public/_app/immutable/entry/start.BQQKiKIr.js +0 -1
- package/dist/public/_app/immutable/nodes/0.kz1bJhtd.js +0 -2
- package/dist/public/_app/immutable/nodes/1.CVGBSdoz.js +0 -1
- package/dist/public/_app/immutable/nodes/2.y3SbG7e6.js +0 -1
- package/dist/public/_app/immutable/nodes/3.BknMTOmK.js +0 -7
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
var Et=Object.defineProperty;var bt=(s,e,_)=>e in s?Et(s,e,{enumerable:!0,configurable:!0,writable:!0,value:_}):s[e]=_;var G=(s,e,_)=>bt(s,typeof e!="symbol"?e+"":e,_);import{p as t,a as z,b as xe,c as $e,d as _e,f as ve,g as L,h as J,E as U,j as re,k as P,l as le,t as Ke,r as ae,m as At,n as Le,o as He,q as De,u as kt,v as X,w as ge,x as Me,y as B,z as Se,A as ye,B as Oe,C as ze,S as ke,D as Rt}from"./BsuezFLB.js";var Nt=class{constructor(s,e,_,o,i){G(this,"base_center_x");G(this,"base_center_y");G(this,"base_radius");G(this,"initial_angle");G(this,"right_nleft");this.base_center_x=s,this.base_center_y=e,this.base_radius=_,this.initial_angle=o,this.right_nleft=i}angleSign(){return this.right_nleft?1:-1}lFromU(s){return this.base_radius*Math.sqrt(1+s**2)}wFromU(s){if(s<0)throw`err729: involute parameter au ${s} is negative`;if(Math.abs(s)>Math.PI/2)throw`err730: involute parameter au ${s} is larger than PI/2`;return this.angleSign()*(s-Math.atan(s))}w2FromU(s){return this.initial_angle+this.wFromU(s)}ptc(s){const e=this.lFromU(s),_=this.w2FromU(s),o=this.base_center_x+Math.cos(_)*e,i=this.base_center_y+Math.sin(_)*e;return[o,i]}ptcta(s){return this.initial_angle+this.angleSign()*s}uFromL(s){return Math.sqrt(s**2/this.base_radius**2-1)}uFromWslow(s){let _=Math.PI/3,o=_/2,i=this.wFromU(_),d=0;for(;Math.abs(i-s)>1e-4;)i<s?_+=o:_-=o,i=this.wFromU(_),o=o/2,d+=1;return console.log(`dbg072: uFromWslow itcnt ${d}`),_}laptc(s,e,_,o){if(Math.sign(e)*this.angleSign()<0)throw`err904: Invole.laptc angle-of-pressure ${e} not compatible with right_nleft ${this.right_nleft}`;const i=s+e,d=this.base_center_x+Math.cos(i)*this.base_radius,c=this.base_center_y+Math.sin(i)*this.base_radius,n=i-this.angleSign()*Math.PI/2,l=_*this.base_radius,h=d+Math.cos(n)*l,a=c+Math.sin(n)*l,g=this.lFromU(_)*o,r=_,u=Math.cos(r)*g,f=Math.sin(r)*g;return[h,a,u,f]}};function Ee(s,e,_,o,i){return new Nt(s,e,_,o,i)}var Ct=class{constructor(){G(this,"mod",1);G(this,"TN",23);G(this,"as",1);G(this,"cx",0);G(this,"cy",0);G(this,"brr",50);G(this,"blr",50);G(this,"ar",54);G(this,"pr",53);G(this,"dr",52);G(this,"br",51);G(this,"bRound",1);G(this,"adt",.5);G(this,"initAngle",0);G(this,"axisAngle",0);G(this,"involArcPairs",1);G(this,"skinThickness",0);G(this,"involuteR",Ee(0,0,50,0,!0));G(this,"involuteL",Ee(0,0,50,0,!1));G(this,"rud",0);G(this,"rup",0);G(this,"rua",0);G(this,"rwd",0);G(this,"rwp",0);G(this,"rwa",0);G(this,"lud",0);G(this,"lup",0);G(this,"lua",0);G(this,"lwd",0);G(this,"lwp",0);G(this,"lwa",0);G(this,"msg");G(this,"initStep",0);this.mod=1,this.msg="",this.initStep=0}incInitStep(s){if(this.initStep+1!==s)throw`err834: incInitStep initStep ${this.initStep} and target ${s} are not compatible`;this.initStep=s}checkInitStep(s,e){if(this.initStep<s)throw`err835: checkInitStep for ${e} initStep ${this.initStep} is too small compare to targetMin ${s}`}set1ModuleToothNumber(s,e){this.incInitStep(1),this.mod=s,this.TN=e,this.pr=this.mod*this.TN/2,this.as=2*Math.PI/this.TN}set2CenterPosition(s,e){this.incInitStep(2),this.cx=s,this.cy=e}set3CircleRadius(s,e,_,o){this.incInitStep(3),this.ar=this.pr+this.mod*s,this.dr=this.pr-this.mod*e,this.br=this.dr-this.mod*_,this.bRound=o}set4BaseCircles(s,e){this.incInitStep(4),this.brr=s,this.blr=e}set5AddendumThickness(s){this.incInitStep(5),this.adt=s/100}set6Angles(s,e){this.incInitStep(6),this.initAngle=s,this.axisAngle=e}set7InvoluteDetails(s,e){this.incInitStep(7),this.involArcPairs=s,this.skinThickness=e}getRefCircles(){return this.checkInitStep(4,"getRefCircles"),[P(this.cx,this.cy,this.ar,"Azure"),P(this.cx,this.cy,this.pr,"Azure"),P(this.cx,this.cy,this.dr,"Azure"),P(this.cx,this.cy,this.br,"Azure"),P(this.cx,this.cy,this.brr,"CornFlowerBlue"),P(this.cx,this.cy,this.blr,"Crimson")]}calcInvoluteAngles(){this.checkInitStep(4,"calcInvoluteAngles"),this.involuteR=Ee(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=Ee(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(){const s=this.as*this.adt,e=this.rwa-this.rwp,_=Math.abs(this.lwa-this.lwp),o=s-e-_;if(o<0)throw`err554: No remaining Addendum reserve ${L(o)}
|
|
2
|
-
`;const i=this.as*(1-this.adt),d=this.rwp-this.rwd,c=Math.abs(this.lwp-this.lwd),n=i-d-c;if(n<2*Math.atan2(this.bRound,this.br))throw`err555: No remaining Dedendum reserve ${L(n)} compare to bRound ${L(this.bRound)}
|
|
3
|
-
`}getToothRef(){const s=6*this.involArcPairs,e=0;this.checkInitStep(7,"getProfile"),this.calcInvoluteAngles();const _=(this.rua-this.rud)/s,o=(this.lua-this.lud)/s,i=this.initAngle+e*this.as,d=Ee(this.cx,this.cy,this.brr,i-this.rwp,!0),[c,n]=d.ptc(this.rud+0*_),l=J(c,n,"Gold");for(let S=0;S<s;S++){const[g,r]=d.ptc(this.rud+(S+1)*_);l.addSegStrokeA(g,r)}const h=i+this.as*this.adt,a=Ee(this.cx,this.cy,this.blr,h-this.lwp,!1);for(let S=0;S<s+1;S++){const[g,r]=a.ptc(this.lud+(s-S)*o);l.addSegStrokeA(g,r)}return l.closeSegStroke(),l}getProfile(){this.checkInitStep(7,"getProfile"),this.calcInvoluteAngles(),this.checkProfileConditions();const s=this.rwd-this.rwp,e=this.lwd-this.lwp,_=this.dr>this.brr?this.dr:this.brr,o=this.dr>this.blr?this.dr:this.blr;if(this.bRound>_-this.br)throw`err409: getProfile bRound ${L(this.bRound)} too large for erdr ${L(_)} and br ${L(this.br)}`;if(this.bRound>o-this.br)throw`err408: getProfile bRound ${L(this.bRound)} too large for eldr ${L(o)} and br ${L(this.br)}`;const i=(this.rua-this.rud)/this.involArcPairs,d=(this.lua-this.lud)/this.involArcPairs,c=le(this.cx,this.cy),n=c.translatePolar(this.initAngle+s,this.br),l=J(n.cx,n.cy);for(let h=0;h<this.TN;h++){const a=this.initAngle+h*this.as,S=c.translatePolar(a+s,this.br);l.addSegStrokeA(S.cx,S.cy).addCornerRounded(this.bRound);const g=Ee(this.cx,this.cy,this.brr,a-this.rwp,!0),[r,u]=g.ptc(this.rud),f=g.ptcta(this.rud),H=le(r,u).translatePolar(f-Math.PI/2,this.skinThickness);l.addSegStrokeA(H.cx,H.cy);for(let x=0;x<this.involArcPairs;x++){const O=this.rud+x*i,[C,$]=g.ptc(O+i),m=g.ptcta(O),q=g.ptcta(O+i)+Math.PI,F=le(C,$).translatePolar(m-Math.PI/2,this.skinThickness);l.addPointA(F.cx,F.cy).addSeg2Arcs(m,q)}const k=a+this.as*this.adt,M=Ee(this.cx,this.cy,this.blr,k-this.lwp,!1),D=this.lud+this.involArcPairs*d,[b,N]=M.ptc(D),R=M.ptcta(D)+Math.PI,v=le(b,N).translatePolar(R-Math.PI/2,this.skinThickness);l.addSegStrokeA(v.cx,v.cy);for(let x=0;x<this.involArcPairs;x++){const O=this.lud+(this.involArcPairs-x)*d,[C,$]=M.ptc(O-d),m=M.ptcta(O)+Math.PI,q=M.ptcta(O-d),F=le(C,$).translatePolar(m-Math.PI/2,this.skinThickness);l.addPointA(F.cx,F.cy).addSeg2Arcs(m,q)}const E=c.translatePolar(k+e,this.br);l.addSegStrokeA(E.cx,E.cy).addCornerRounded(this.bRound)}return l.closeSegStroke(),l}getMsg(){return this.msg}};function Qe(){return new Ct}function It(s,e,_,o){s.checkInitStep(1,"helper.gw2center-1"),e.checkInitStep(1,"helper.gw2center-2");const i=s.pr+e.pr+o,d=s.cx+i*Math.cos(_),c=s.cy+i*Math.sin(_);return[d,c,i]}function Vt(s,e,_,o,i,d,c,n,l,h,a){s.checkInitStep(3,"helper.baseCircles-1"),e.checkInitStep(3,"helper.baseCircles-2");let S=_,g=i,r=o,u=d;const f=s.pr+e.pr,H=h,k=a;switch(H){case 0:e.TN>s.TN?(S=s.dr,g=S*e.TN/s.TN):(g=e.dr,S=g*s.TN/e.TN);break;case 1:g=S*e.TN/s.TN;break;case 2:S=g*s.TN/e.TN;break;case 3:S=f*s.TN/(s.TN+e.TN)*Math.cos(ve(c)),g=S*e.TN/s.TN;break;case 4:break;default:console.log(`err337: involROpt2 case ${H} is not implemented!`)}switch(k){case 0:e.TN>s.TN?(r=s.dr,u=r*e.TN/s.TN):(u=e.dr,r=u*s.TN/e.TN);break;case 1:u=r*e.TN/s.TN;break;case 2:r=u*s.TN/e.TN;break;case 3:r=f*s.TN/(s.TN+e.TN)*Math.cos(ve(n)),u=r*e.TN/s.TN;break;case 4:break;default:console.log(`err358: involLOpt2 case ${k} is not implemented!`)}return l===1&&(r=S,u=g),[S,r,g,u]}var Bt=class{constructor(s,e,_,o,i,d){G(this,"gw1");G(this,"gw2");G(this,"initAngle1");G(this,"angleCenterCenter");G(this,"interAxis");G(this,"rightLeftCenter2");G(this,"msg");G(this,"apr");G(this,"apl");G(this,"lBDr",0);G(this,"lBDl",0);G(this,"laStartRr1",0);G(this,"laStartRr2",0);G(this,"laStartRl1",0);G(this,"laStartRl2",0);G(this,"aFODr1",0);G(this,"aFODr2",0);G(this,"aFODl1",0);G(this,"aFODl2",0);G(this,"lasr1",0);G(this,"lasr2",0);G(this,"lasl1",0);G(this,"lasl2",0);G(this,"firstToothUr1",0);G(this,"firstToothUl1",0);G(this,"ftdr1",0);G(this,"ftdl1",0);this.gw1=s,this.gw2=e,this.initAngle1=_,this.angleCenterCenter=o,this.interAxis=i,this.rightLeftCenter2=d,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 ${L(this.interAxis)} is too large compare to gw1.ar ${L(this.gw1.ar)} and gw2.ar ${L(this.gw2.ar)}
|
|
4
|
-
`),Se(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} = ${L(this.gw1.TN/this.gw2.TN)} and brr1/brr2 = ${L(this.gw1.brr)}/${L(this.gw2.brr)} = ${L(this.gw1.brr/this.gw2.brr)}
|
|
5
|
-
`),Se(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} = ${L(this.gw1.TN/this.gw2.TN)} and blr1/blr2 = ${L(this.gw1.blr)}/${L(this.gw2.blr)} = ${L(this.gw1.blr/this.gw2.blr)}
|
|
6
|
-
`)}check2(){this.gw1.checkInitStep(5,"ActionLine.check2-1"),this.gw2.checkInitStep(5,"ActionLine.check2-2"),Se(this.gw1.adt+this.gw2.adt-1)>0&&(this.msg+=`warn281: addendum thickness too large: adt1 ${L(this.gw1.adt)} adt2 ${L(this.gw2.adt)}
|
|
7
|
-
`);const s=this.gw1.ar-this.gw1.pr,e=this.gw1.pr-this.gw1.dr,_=this.gw2.ar-this.gw2.pr,o=this.gw2.pr-this.gw2.dr;Se(o-s)<0&&(this.msg+=`warn282: addendum-1 ${L(s)} larger than dedendum-2 ${L(o)}
|
|
8
|
-
`),Se(e-_)<0&&(this.msg+=`warn283: addendum-2 ${L(_)} larger than dedendum-1 ${L(e)}
|
|
9
|
-
`)}calcActionLine(){this.gw1.checkInitStep(4,"ActionLine.calcActionLine-1"),this.gw2.checkInitStep(4,"ActionLine.calcActionLine-2"),this.gw1.calcInvoluteAngles(),this.gw2.calcInvoluteAngles();const s=this.interAxis*this.gw1.brr/(this.gw1.brr+this.gw2.brr),e=this.interAxis*this.gw1.blr/(this.gw1.blr+this.gw2.blr),_=this.interAxis-s,o=this.interAxis-e;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: ${L(ae(this.apr))} left: ${L(ae(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: ${L(this.lBDr)} left: ${L(this.lBDl)} mm
|
|
11
|
-
`;const i=Math.PI/2+this.apr,d=ye(this.gw1.ar,s,i);this.aFODr1=Math.PI-i-d;const c=this.gw1.rua-this.apr-this.gw1.rwa;if(Se(this.aFODr1-c)!==0)throw`dbg378: aFODr1 ${this.aFODr1} and aFODr1Alt ${c} differ`;const n=Oe(s,this.gw1.ar,this.aFODr1),l=i,h=ye(this.gw2.ar,_,l);this.aFODr2=Math.PI-l-h;const a=this.gw2.rua-this.apr-this.gw2.rwa;if(Se(this.aFODr2-a)!==0)throw`dbg379: aFODr2 ${this.aFODr2} and aFODr2Alt ${a} differ`;const S=Oe(_,this.gw2.ar,this.aFODr2),g=n+S,r=g/this.gw1.brr,u=g/this.gw2.brr,f=this.gw1.rua-r,H=this.gw2.rua-u;this.laStartRr1=this.gw1.involuteR.lFromU(f),this.laStartRr2=this.gw2.involuteR.lFromU(H);const k=Math.PI/2+this.apl,M=ye(this.gw1.ar,e,k);this.aFODl1=Math.PI-k-M;const D=this.gw1.lua-this.apl+this.gw1.lwa;if(Se(this.aFODl1-D)!==0)throw`dbg388: aFODl1 ${this.aFODl1} and aFODl1Alt ${D} differ`;const b=Oe(e,this.gw1.ar,this.aFODl1),N=k,R=ye(this.gw2.ar,o,N);this.aFODl2=Math.PI-N-R;const v=this.gw2.lua-this.apl+this.gw2.lwa;if(Se(this.aFODl2-v)!==0)throw`dbg389: aFODl2 ${this.aFODl2} and aFODl2Alt ${v} differ`;const E=Oe(o,this.gw2.ar,this.aFODl2),x=b+E,O=x/this.gw1.blr,C=x/this.gw2.blr,$=this.gw1.lua-O,m=this.gw2.lua-C;this.laStartRl1=this.gw1.involuteL.lFromU($),this.laStartRl2=this.gw2.involuteL.lFromU(m),this.msg+=`Line of Action Effective length: right: ${L(g)} left: ${L(x)} mm
|
|
12
|
-
`,this.msg+=`Line of Action Effective rotation angle: right-1: ${L(ae(r))} right-2: ${L(ae(u))} left-1: ${L(ae(O))} left-2: ${L(ae(C))} degree
|
|
13
|
-
`,this.msg+=`Line of Action Effective height: right-1: ${L(this.gw1.ar-this.laStartRr1)} right-2: ${L(this.gw2.ar-this.laStartRr2)} left-1: ${L(this.gw1.ar-this.laStartRl1)} left-2: ${L(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: ${L(this.lasr1)} 2: ${L(this.lasr2)} mm
|
|
15
|
-
`,this.msg+=`Line of Action right: nb of contact point: 1: ${L(g/this.lasr1)} 2: ${L(g/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: ${L(this.lasl1)} 2: ${L(this.lasl2)} mm
|
|
17
|
-
`,this.msg+=`Line of Action left: nb of contact point: 1: ${L(x/this.lasl1)} 2: ${L(x/this.lasl2)}
|
|
18
|
-
`}calcContactPoint1(){for(this.gw1.checkInitStep(5,"ActionLine.calcContactPoint1"),this.firstToothUr1=ze(this.apr-(this.initAngle1-this.angleCenterCenter)+this.gw1.rwp);Se(this.firstToothUr1-this.gw1.as)>=0;)this.firstToothUr1=Se(this.firstToothUr1-this.gw1.as);for(this.firstToothUl1=ze(this.apl+(this.initAngle1-this.angleCenterCenter)+this.gw1.as*this.gw1.adt-this.gw1.lwp);Se(this.firstToothUl1-this.gw1.as)>=0;)this.firstToothUl1=Se(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(s,e,_,o,i,d,c,n,l,h){const S=Math.floor(e/(2*_)),g=(o+S*_)/i,r=s?1:-1,[u,f,H,k]=d.laptc(c,r*n,g,.4);this.msg+=`speed ${l}: vx ${L(H)} vy: ${L(k)} m/s
|
|
19
|
-
`;const M=le(u,f),D=c+r*n,b=J(u,f,h),N=M.translatePolar(D,-k);b.addSegStrokeA(N.cx,N.cy);const R=N.translatePolar(D-r*Math.PI/2,H);return b.addSegStrokeA(R.cx,R.cy),b.closeSegStroke(),b}getContactSpeed(){const s=this.oneContactSpeed(!0,this.lBDr,this.lasr1,this.ftdr1,this.gw1.brr,this.gw1.involuteR,this.angleCenterCenter,this.apr,"R1","Black"),e=this.oneContactSpeed(!1,this.lBDl,this.lasl1,this.ftdl1,this.gw1.blr,this.gw1.involuteL,this.angleCenterCenter,this.apl,"L1","Black"),_=[];return _.push(s),_.push(e),_}getContours(){const s=[];s.push(P(this.gw1.cx,this.gw1.cy,this.laStartRr1,"SkyBlue")),s.push(P(this.gw1.cx,this.gw1.cy,this.laStartRl1,"SlateBlue")),s.push(P(this.gw2.cx,this.gw2.cy,this.laStartRr2,"SkyBlue")),s.push(P(this.gw2.cx,this.gw2.cy,this.laStartRl2,"SlateBlue"));const e=le(this.gw1.cx,this.gw1.cy),_=le(this.gw2.cx,this.gw2.cy),o=e.translatePolar(this.angleCenterCenter+this.apr,this.gw1.brr),i=_.translatePolar(this.angleCenterCenter+Math.PI+this.apr,this.gw2.brr),d=J(o.cx,o.cy,"YellowGreen");d.addSegStrokeA(i.cx,i.cy),d.closeSegStroke(),s.push(d);const c=e.translatePolar(this.angleCenterCenter-this.aFODr1,this.gw1.ar),n=_.translatePolar(this.angleCenterCenter+Math.PI-this.aFODr2,this.gw2.ar),l=J(c.cx,c.cy,"Yellow");l.addSegStrokeA(n.cx,n.cy),l.closeSegStroke(),s.push(l);const h=e.translatePolar(this.angleCenterCenter-this.apl,this.gw1.blr),a=_.translatePolar(this.angleCenterCenter+Math.PI-this.apl,this.gw2.blr),S=J(h.cx,h.cy,"YellowGreen");S.addSegStrokeA(a.cx,a.cy),S.closeSegStroke(),s.push(S);const g=e.translatePolar(this.angleCenterCenter+this.aFODl1,this.gw1.ar),r=_.translatePolar(this.angleCenterCenter+Math.PI+this.aFODl2,this.gw2.ar),u=J(g.cx,g.cy,"Yellow");return u.addSegStrokeA(r.cx,r.cy),u.closeSegStroke(),s.push(u),s.push(...this.getContactSpeed()),s}getContactPoint(){const s=[],e=le(this.gw1.cx,this.gw1.cy),_=e.translatePolar(this.angleCenterCenter+this.apr,this.gw1.brr),o=e.translatePolar(this.angleCenterCenter-this.apl,this.gw1.blr);s.push(le(_.cx,_.cy,ke.eBigSquare)),s.push(le(o.cx,o.cy,ke.eBigSquare));const i=this.angleCenterCenter+this.apr-Math.PI/2,d=this.angleCenterCenter-this.apl+Math.PI/2,c=_.translatePolar(i,this.ftdr1),n=o.translatePolar(d,this.ftdl1);s.push(le(c.cx,c.cy,ke.eBigSquare)),s.push(le(n.cx,n.cy,ke.eBigSquare));let l=this.ftdr1;for(;l+this.lasr1<this.lBDr;){l+=this.lasr1;const a=_.translatePolar(i,l);s.push(le(a.cx,a.cy,ke.eBigSquare))}let h=this.ftdl1;for(;h+this.lasl1<this.lBDl;){h+=this.lasl1;const a=o.translatePolar(d,h);s.push(le(a.cx,a.cy,ke.eBigSquare))}return s}getMsg(){return this.msg}getInitAngle2(){let s=this.lBDr-this.ftdr1;for(;Se(s-this.lasr2)>=0;)s=Se(s-this.lasr2);let e=this.lBDl-this.ftdl1;for(;Se(e-this.lasl2)>=0;)e=Se(e-this.lasl2);const _=s/this.gw2.brr,o=e/this.gw2.blr,i=this.angleCenterCenter+Math.PI+this.apr-_+this.gw2.rwp,c=this.angleCenterCenter+Math.PI-this.apl+o+this.gw2.lwp-this.gw2.as*this.gw2.adt;let n=2*Math.PI+ze(c);for(;Se(n-this.gw2.as-i)>=0;)n=Se(n-this.gw2.as);const l=n-i,h=l*this.gw2.brr/this.gw1.brr,a=l*this.gw2.brr,S=l*this.gw2.blr;this.msg+=`slack angle: 1: ${L(ae(h))} 2: ${L(ae(l))} degree
|
|
20
|
-
`,this.msg+=`slack on action line: right-2: ${L(a)} left-2: ${L(S)} mm
|
|
21
|
-
`;let g=0;if(this.rightLeftCenter2===0)g=i;else if(this.rightLeftCenter2===1)g=c;else if(this.rightLeftCenter2===2)g=i+l/2;else throw`err221: initAngle2 rightLeftCenter2 ${this.rightLeftCenter2} has an unkown value`;return Rt(g)}};function yt(s,e,_,o,i,d){return new Bt(s,e,_,o,i,d)}function Ot(s,e,_,o,i,d,c,n,l){let h=P(s,e,_);if(o>0){if(i>2*_)throw`err383: axisTorque ribWidth ${L(i)} larger than 2x axisRadius ${L(_)}`;const a=Math.asin(i/(2*_)),S=2*Math.PI/o;if(S-2.5*a<0)throw`err384: axisTorque ribWidth ${L(i)} or ribNb ${o} are too large`;if(c>i/2)throw`err385: axisTorque ribRound1 ${L(c)} too large compare to ribWidth ${L(i)}`;if(c+n>d)throw`err386: axisTorque ribRound12 ${L(c)} ${L(n)} too large compare to ribHeight ${L(i)}`;const g=S-2*a>Math.PI,r=le(s,e),f=r.translatePolar(l,_+d).translatePolar(l+Math.PI/2,i/2);h=J(f.cx,f.cy);for(let H=0;H<o;H++){const k=l+H*S,M=k+S,D=r.translatePolar(k+a,_),b=r.translatePolar(M-a,_),R=r.translatePolar(k,_+d).translatePolar(k+Math.PI/2,i/2),E=r.translatePolar(M,_+d).translatePolar(M-Math.PI/2,i/2);h.addSegStrokeA(R.cx,R.cy).addCornerRounded(c),h.addSegStrokeA(D.cx,D.cy).addCornerRounded(n),h.addPointA(b.cx,b.cy).addSegArc(_,g,!0).addCornerRounded(n),h.addSegStrokeA(E.cx,E.cy).addCornerRounded(c)}h.closeSegStroke()}return h}function Tt(s,e,_,o,i,d,c,n){const l=2*Math.PI/i,h=Math.asin(d/(2*o)),a=Math.asin(d/(2*_));if(d>2*o)throw`err905: hollowStraight spokeWidth ${L(d)} too large for hollowInt ${L(o)}`;if(_-o<2.1*c)throw`err906: hollowStraight hollowExt ${L(_)}, hollowInt ${L(o)} and spokeRound ${L(c)} do not fit`;if(l-2*a<2.5*Math.asin(c/_))throw`err907: hollowStraight spokeNb ${i}, spokeWidth ${L(d)} or spokeRound ${L(c)} are too large`;const S=d/(2*Math.sin(l/2)),g=l-2*h<2.1*Math.asin(c/o),r=l-2*a>Math.PI,u=le(s,e),f=[];for(let H=0;H<i;H++){const k=n+H*l,M=k+l,D=k+l/2,b=u.translatePolar(k+a,_),N=u.translatePolar(M-a,_),R=u.translatePolar(M-h,o),v=u.translatePolar(k+h,o),E=u.translatePolar(D,S),x=J(b.cx,b.cy);x.addCornerRounded(c),x.addPointA(N.cx,N.cy).addSegArc(_,r,!0).addCornerRounded(c),g?x.addSegStrokeA(E.cx,E.cy).addCornerRounded(c):(x.addSegStrokeA(R.cx,R.cy).addCornerRounded(c),x.addPointA(v.cx,v.cy).addSegArc(o,r,!1).addCornerRounded(c)),x.closeSegStroke(),f.push(x)}return f}function et(s,e,_,o,i,d,c,n,l,h){const a=h?1:-1,S=s/2,g=S+e,r=g+_,u=J(0,-r);return u.addSegStrokeA(a*o,-r).addCornerRounded(c).addSegStrokeA(a*o,-g).addCornerRounded(n).addSegStrokeA(a*i,-g).addSegStrokeA(a*d,-S).addCornerRounded(l).addSegStrokeA(a*d,S).addCornerRounded(l).addSegStrokeA(a*i,g).addSegStrokeA(a*o,g).addCornerRounded(n).addSegStrokeA(a*o,r).addCornerRounded(c).addSegStrokeA(0,r).closeSegStroke(),u}var tt={partName:"gear_wheel",params:[t("module","mm",10,.1,100,.1),t("N1","scalar",23,3,1e3,1),t("N2","scalar",19,3,1e3,1),t("angleCenterCenter","degree",0,-180,180,1),t("addInterAxis","mm",0,0,100,.05),t("c1x","mm",0,-200,200,1),t("c1y","mm",0,-200,200,1),z("Tooth addendum dedendum"),t("ah1","scalar",1,.1,2,.05),t("dh1","scalar",1,.1,2,.05),t("bh1","scalar",.25,.1,2,.05),t("bRound1","mm",2,0,50,.1),t("ah2","scalar",1,.1,2,.05),t("dh2","scalar",1,.1,2,.05),t("bh2","scalar",.25,.1,2,.05),t("bRound2","mm",2,0,50,.1),t("at1","%",50,10,90,.5),t("at2","%",50,10,90,.5),z("Tooth involute of circle"),xe("involSym",!0),$e("involROpt",["Optimum","Base-1","Base-2","PressureAngle","FreeBase-12"]),$e("involLOpt",["Optimum","Base-1","Base-2","PressureAngle","FreeBase-12"]),t("brr1","mm",102.9,10,2e3,.05),t("blr1","mm",102.9,10,2e3,.05),t("brr2","mm",85,10,2e3,.05),t("blr2","mm",85,10,2e3,.05),t("rightPressureAngle","degree",26,1,45,.5),t("leftPressureAngle","degree",26,1,45,.5),t("involArcPairs1","scalar",2,1,40,1),t("involArcPairs2","scalar",2,1,40,1),t("skinThickness1","mm",0,-3,3,.01),t("skinThickness2","mm",0,-3,3,.01),t("initAngle1","degree",0,-180,180,1),$e("gw2Position",["right","left","center"]),z("Inner"),xe("centralAxis",!0),t("axisRadius","mm",10,.1,200,.1),t("ribNb","scalar",5,0,32,1),t("ribWidth","mm",8,1,100,.1),t("ribHeight","mm",8,1,100,.1),t("ribRound1","mm",2,0,20,.1),t("ribRound2","mm",2,0,20,.1),xe("hollow",!0),t("materialHeightExt","mm",20,1,200,.5),t("materialHeightInt","mm",15,1,200,.5),t("spokeNb","scalar",5,1,18,1),t("spokeWidth","mm",15,1,200,.1),t("spokeRound","mm",10,0,20,.1),z("Axis"),xe("wheelAxis",!0),t("wheelHeight","mm",40,.1,400,.1),t("wheelMidExtra","mm",6,0,10,.1),t("wheelAxisLength","mm",40,0,400,.1),t("wheelAxisRadius","mm",20,0,200,.1),t("wheelMidRadius","mm",60,0,200,.1),t("wheelRadiusExtra","mm",1,0,20,.1),t("wheelAxisExtRound","mm",4,0,20,.1),t("wheelAxisIntRound","mm",0,0,20,.1),t("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 Ft(s,e,_=""){const o=_e(tt.partName+_),i=B(),d=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
22
|
-
`;try{const c=[],n=Qe(),l=Qe();n.set1ModuleToothNumber(e.module,e.N1),l.set1ModuleToothNumber(e.module,e.N2),n.set2CenterPosition(e.c1x,e.c1y);const h=ve(e.angleCenterCenter),[a,S,g]=It(n,l,h,e.addInterAxis);l.set2CenterPosition(a,S),n.set3CircleRadius(e.ah1,e.dh1,e.bh1,e.bRound1),l.set3CircleRadius(e.ah2,e.dh2,e.bh2,e.bRound2);const[r,u,f,H]=Vt(n,l,e.brr1,e.blr1,e.brr2,e.blr2,e.rightPressureAngle,e.leftPressureAngle,e.involSym,e.involROpt,e.involLOpt);o.logstr+=`base-circles: brr1: ${r.toFixed(2)} blr1: ${u.toFixed(2)} brr2: ${f.toFixed(2)} blr2: ${H.toFixed(2)}
|
|
23
|
-
`,n.set4BaseCircles(r,u),l.set4BaseCircles(f,H),n.set5AddendumThickness(e.at1),l.set5AddendumThickness(e.at2);const k=ve(e.initAngle1)+s*3*n.as/100;n.set6Angles(k,h);const M=yt(n,l,k,h,g,e.gw2Position);M.prepare();for(const x of M.getContours())i.addDynamics(x);i.addPoints(M.getContactPoint()),l.set6Angles(M.getInitAngle2(),h+Math.PI),o.logstr+=M.getMsg(),n.set7InvoluteDetails(e.involArcPairs1,e.skinThickness1),l.set7InvoluteDetails(e.involArcPairs2,e.skinThickness2);for(const x of n.getRefCircles())i.addDynamics(x);for(const x of l.getRefCircles())i.addDynamics(x);i.addDynamics(n.getToothRef()),i.addDynamics(l.getToothRef());const D=n.getProfile();if(o.logstr+=n.getMsg(),o.logstr+=D.check(),c.push(D),e.centralAxis===1){const x=Ot(n.cx,n.cy,e.axisRadius,e.ribNb,e.ribWidth,e.ribHeight,e.ribRound1,e.ribRound2,k);o.logstr+=x.check(),c.push(x)}if(e.hollow===1){const x=n.br,O=e.axisRadius+e.ribHeight,C=x-e.materialHeightExt,$=O+e.materialHeightInt;if($>C)throw`err902: hollowMaterialInt ${L($)} bigger than hollowMaterialExt ${L(C)}`;const m=Tt(n.cx,n.cy,C,$,e.spokeNb,e.spokeWidth,e.spokeRound,k);for(const q of m)o.logstr+=q.check(),c.push(q)}i.addMainOI(c);const b=l.getProfile();o.logstr+=b.check(),i.addSecond(b);const N=[],R=n.ar+e.wheelRadiusExtra;if(e.wheelAxis===1){const x=et(e.wheelHeight,e.wheelMidExtra,e.wheelAxisLength,e.wheelAxisRadius,e.wheelMidRadius,R,e.wheelAxisExtRound,e.wheelAxisIntRound,e.wheelExtraRound,!0),O=et(e.wheelHeight,e.wheelMidExtra,e.wheelAxisLength,e.wheelAxisRadius,e.wheelMidRadius,R,e.wheelAxisExtRound,e.wheelAxisIntRound,e.wheelExtraRound,!1);N.push(x),d.addSecond(O)}else{const x=J(0,-e.wheelHeight/2).addSegStrokeR(0,e.wheelHeight).addSegStrokeR(R,0).addSegStrokeR(0,-e.wheelHeight).closeSegStroke(),O=J(0,-e.wheelHeight/2).addSegStrokeR(0,e.wheelHeight).addSegStrokeR(-R,0).addSegStrokeR(0,-e.wheelHeight).closeSegStroke();N.push(x),d.addSecond(O)}d.addMainOI(N),o.fig={teethProfile:i,axisProfile:d};const v=o.partName,E=e.wheelHeight/2+e.wheelMidExtra+e.wheelAxisLength+10;o.vol={extrudes:[{outName:`subpax_${v}_teethProfile`,face:`${v}_teethProfile`,extrudeMethod:U.eLinearOrtho,length:2*E,rotate:[0,0,0],translate:[0,0,-E]},{outName:`subpax_${v}_axisProfile`,face:`${v}_axisProfile`,extrudeMethod:U.eRotate,rotate:[0,0,0],translate:[0,0,0]}],volumes:[{outName:`pax_${v}`,boolMethod:re.eIntersection,inList:[`subpax_${v}_teethProfile`,`subpax_${v}_axisProfile`]}]},o.logstr+=`gear_wheel drawn successfully!
|
|
24
|
-
`,o.calcErr=!1}catch(c){o.logstr+=c,console.log(c)}return o}var pt={pTitle:"Gearwheel",pDescription:"Gear-system with two wheels",pDef:tt,pGeom:Ft},ot={partName:"gear_bar",params:[t("H1","mm",40,1,4e3,1),t("H2","mm",50,1,4e3,1),t("radius","mm",10,1,4e3,1),z("corners"),t("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 Jt(s,e,_=""){const o=_e(ot.partName+_),i=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
25
|
-
`;try{const d=[],c=J(-e.H1/2,-e.H2/2).addCornerRounded(e.Rc).addSegStrokeA(e.H1/2,-e.H2/2).addSegStrokeA(e.H1/2,e.H2/2).addCornerRounded(e.Rc).addSegStrokeA(-e.H1/2,e.H2/2).closeSegStroke();d.push(c),d.push(P(0,0,e.radius)),i.addMainOI(d),o.fig={faceVoila:i};const n=o.partName;o.vol={extrudes:[{outName:`subpax_${n}_top`,face:`${n}_faceVoila`,extrudeMethod:U.eLinearOrtho,length:10,rotate:[0,0,0],translate:[0,0,0]}],volumes:[{outName:`pax_${n}`,boolMethod:re.eIdentity,inList:[`subpax_${n}_top`]}]},o.sub={},o.logstr+=`gear_bar drawn successfully!
|
|
26
|
-
`,o.calcErr=!1}catch(d){o.logstr+=d,console.log(d)}return o}var mt={pTitle:"Gearbar",pDescription:"Gear-system with a bar and a wheel",pDef:ot,pGeom:Jt},st={partName:"gear_ring",params:[t("H1","mm",40,1,4e3,1),t("H2","mm",50,1,4e3,1),t("radius","mm",10,1,4e3,1),z("corners"),t("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 zt(s,e,_=""){const o=_e(st.partName+_),i=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
27
|
-
`;try{const d=[],c=J(-e.H1/2,-e.H2/2).addCornerRounded(e.Rc).addSegStrokeA(e.H1/2,-e.H2/2).addSegStrokeA(e.H1/2,e.H2/2).addCornerRounded(e.Rc).addSegStrokeA(-e.H1/2,e.H2/2).closeSegStroke();d.push(c),d.push(P(0,0,e.radius)),i.addMainOI(d),o.fig={faceVoila:i};const n=o.partName;o.vol={extrudes:[{outName:`subpax_${n}_top`,face:`${n}_faceVoila`,extrudeMethod:U.eLinearOrtho,length:10,rotate:[0,0,0],translate:[0,0,0]}],volumes:[{outName:`pax_${n}`,boolMethod:re.eIdentity,inList:[`subpax_${n}_top`]}]},o.sub={},o.logstr+=`gear_ring drawn successfully!
|
|
28
|
-
`,o.calcErr=!1}catch(d){o.logstr+=d,console.log(d)}return o}var Gt={pTitle:"Gearring",pDescription:"Gear-system with a ring and a wheel",pDef:st,pGeom:zt},it={partName:"gear_epicycloid",params:[t("H1","mm",40,1,4e3,1),t("H2","mm",50,1,4e3,1),t("radius","mm",10,1,4e3,1),z("corners"),t("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 Ut(s,e,_=""){const o=_e(it.partName+_),i=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
29
|
-
`;try{const d=[],c=J(-e.H1/2,-e.H2/2).addCornerRounded(e.Rc).addSegStrokeA(e.H1/2,-e.H2/2).addSegStrokeA(e.H1/2,e.H2/2).addCornerRounded(e.Rc).addSegStrokeA(-e.H1/2,e.H2/2).closeSegStroke();d.push(c),d.push(P(0,0,e.radius)),i.addMainOI(d),o.fig={faceVoila:i};const n=o.partName;o.vol={extrudes:[{outName:`subpax_${n}_top`,face:`${n}_faceVoila`,extrudeMethod:U.eLinearOrtho,length:10,rotate:[0,0,0],translate:[0,0,0]}],volumes:[{outName:`pax_${n}`,boolMethod:re.eIdentity,inList:[`subpax_${n}_top`]}]},o.sub={},o.logstr+=`gear_epicycloid drawn successfully!
|
|
30
|
-
`,o.calcErr=!1}catch(d){o.logstr+=d,console.log(d)}return o}var qt={pTitle:"Gear-epicycloid",pDescription:"The epicycloid gear system",pDef:it,pGeom:Ut};function Wt(s){let e="";const _=s.PHD1/2,o=s.PHD5/2,i=2*Math.asin(s.PHR4/_),d=2*Math.asin(s.PHL2/(2*o)),c=2*Math.PI/s.PHN1-d,n=s.PHL2/2,l=Math.sqrt(o**2-n**2)-_,h=Math.sqrt(n**2+l**2),a=Math.acos(l/h),S=Math.acos(s.PHR4/h),g=Math.PI-a-S;if(o<_+s.PHR4)throw`err211: PHD5 ${s.PHD5} too small compare to PHD1 ${s.PHD1} or PHR4 ${s.PHR4}`;if(c<d)throw`err212: PHL2 ${s.PHL2} too large compare to PHN1 ${s.PHN1}`;if(s.PHD3>2*s.PHR4)throw`err213: PHD3 ${s.PHD3} too large compare to PHR4 ${s.PHR4}`;g>Math.PI/2-i&&(e+=`warn345: PHL2 is quiet small ${L(s.PHL2)} mm
|
|
31
|
-
`),e+=`petal angle: ${L(ae(d))} degree
|
|
32
|
-
`,e+=`hollow angle: ${L(ae(c))} degree
|
|
33
|
-
`;const r=le(0,0),f=le(o,0).rotate(r,-d/2),H=le(_,0),k=le(_-s.PHR4,0),M=k.rotate(H,g),D=k.rotate(H,-g),b=J(f.cx,f.cy).addCornerRounded(s.PHR6).addSegStrokeA(M.cx,M.cy).addPointA(_-s.PHR4,0).addPointA(D.cx,D.cy).addSegArc2().addSegStrokeAP(d/2,o).addCornerRounded(s.PHR6).addPointAP(d/2+c/2,o).addPointAP(d/2+c,o).addSegArc2(),N=J(f.cx,f.cy),R=[...Array(s.PHN1).keys()].map(v=>v*(d+c));for(const v of R)N.addPartial(b.rotate(0,0,v));return[e,N,R]}function nt(s){const e="",_=s.D1/2,o=s.D2/2,i=s.D4/2,d=2*Math.PI/s.N1,c=s.L1/2,n=Math.sqrt(o**2-c**2),l=Math.asin(c/o),h=_-n,a=Math.atan2(c,h),S=Math.sqrt(c**2+h**2),g=Math.acos(i/S),r=a+g,u=(d-2*l)/2;if(u<0)throw`err464: N1 ${s.N1} is too large compare to D2 ${s.D2}, L1 ${s.L1}`;if(_<o)throw`err465: D2 ${s.D2} is too large compare to D1 ${s.D1}`;const f=J(n,-c),H=le(0,0),k=le(o,0),M=le(_,0),b=le(_-i,0).rotate(M,r),N=k.rotate(H,l+u),R=k.rotate(H,d-l),v=J(n,-c).addCornerRounded(s.R5).addSegStrokeA(b.cx,b.cy).addPointA(_+i,0).addPointA(b.cx,-b.cy).addSegArc2().addSegStrokeA(n,c).addCornerRounded(s.R5).addPointA(N.cx,N.cy).addPointA(R.cx,R.cy).addSegArc2();for(let E=0;E<s.N1;E++)f.addPartial(v.rotate(0,0,E*d));return[e,f,d]}function Te(s,e){let _="";const o=s.SD2/2,i=o+s.SE1,d=2*i;let c=!1,n=-o,l=-i;if(e&&(c=!0,n=i,l=o),s.SL2<i)throw`err421: SL2 ${s.SL2} is too small compare to SD2 ${s.SD2} and SE1 ${s.SE1}`;_+=`info309: spring height: ${L(s.SL1+d)} length: ${L(s.SN1*2*(s.SD2+s.SE1))}
|
|
34
|
-
`;const h=J(0,0);for(let a=0;a<s.SN1;a++)h.addSegStrokeR(0,-s.SL1).addPointR(2*n,0).addSegArc(Math.abs(n),!1,c),a<s.SN1-1?h.addSegStrokeR(0,s.SL1).addPointR(2*l,0).addSegArc(Math.abs(l),!1,!c):s.Send===1?h.addSegStrokeR(0,s.SL2):h.addSegStrokeR(0,s.SL2-i).addPointR(2*l,0).addSegArc(Math.abs(l),!1,!c);s.Send===1?h.addSegStrokeR(-s.SE1,0):h.addSegStrokeR(s.SE1,0);for(let a=0;a<s.SN1;a++)a>0?h.addPointR(-2*n,0).addSegArc(Math.abs(n),!1,c).addSegStrokeR(0,-s.SL1):s.Send===1?h.addSegStrokeR(0,-s.SL2):h.addPointR(-2*n,0).addSegArc(Math.abs(n),!1,c).addSegStrokeR(0,-s.SL2+i),h.addPointR(-2*l,0).addSegArc(Math.abs(l),!1,!c).addSegStrokeR(0,s.SL1);return[_,h]}function Yt(s){let e="";const _=s.D6/2,o=2*Math.PI/s.N2,i=s.E2/2,d=2*Math.asin(i/_),c=(o-d)/2,l=(s.N2<3?0:Math.PI/s.N2)+ve(s.SA1),h=Math.PI/2-l,a=-Math.PI/2+l,S=s.SD1/2;if(c<0)throw`err564: N2 ${s.N2} is too large compare to D6 ${s.D6}, E2 ${s.E2}`;if(s.orientation===2&&s.N2%2===1)throw`err565: N2 ${s.N2} is odd and orientation is alt`;const[g,r]=Te(s,!1),[,u]=Te(s,!0);e+=g;const f=le(0,-_),H=le(0,0),k=f.rotate(H,d),M=f.translate(0,s.L2),D=M.translate(-S,0),b=D.translate(0,S),N=D.translate(0,S+s.SE1),R=N.rotate(D,h),v=M.translate(0,S+s.SE1).translate(s.SE1,0),E=f.rotate(H,-d),x=M.translate(S,0),O=x.translate(0,S),C=O.rotate(x,a),$=x.translate(0,S+s.SE1),m=M.translate(0,S+s.SE1).translate(-s.SE1,0),q=J(k.cx,k.cy).addSegStrokeA(v.cx,v.cy).addSegStrokeA(N.cx,N.cy),F=J(N.cx,N.cy).addPointA(R.cx,R.cy).addSegArc(S+s.SE1,!1,!0);F.addPartial(r.rotate(0,0,-l).translate(R.cx,R.cy)),F.addPointA(b.cx,b.cy).addPointA(M.cx,M.cy).addSegArc2().addSegStrokeA(f.cx,f.cy),q.addPartial(F);const T=J(f.cx,f.cy).addSegStrokeA(M.cx,M.cy).addPointA(O.cx,O.cy).addPointA(C.cx,C.cy).addSegArc2();T.addPartial(u.rotate(0,0,l).translate(C.cx,C.cy)),T.addPointA($.cx,$.cy).addSegArc(S+s.SE1,!1,!0);const p=J($.cx,$.cy).addSegStrokeA(m.cx,m.cy).addSegStrokeA(E.cx,E.cy),Y=J(f.cx,f.cy).addPartial(T).addPartial(p),I=J(_,0);if(s.orientation===2)for(let K=0;K<s.N2/2;K++){I.addPointAP(-2*K*o-2*c,_).addPointAP(-2*K*o-4*c,_).addSegArc2(),I.addCornerRounded(s.R7);const ie=Math.PI/2-(2*K+2)*o,V=ie+2*d;I.addPartial(T.rotate(0,0,V));const te=F.rotate(0,0,ie),w=te.getFirstPoint();I.addCornerRounded(s.R7),I.addSegStrokeA(w.cx,w.cy),I.addCornerRounded(s.R7),I.addPartial(te),I.addCornerRounded(s.R7)}else for(let K=0;K<s.N2;K++)I.addPointAP(-K*o-c,_).addPointAP(-K*o-2*c,_).addSegArc2().addCornerRounded(s.R7),s.orientation===0?I.addPartial(Y.rotate(0,0,Math.PI/2-(K+1)*o+d)):s.orientation===1&&I.addPartial(q.rotate(0,0,Math.PI/2-(K+1)*o)),I.addCornerRounded(s.R7);return[e,I]}var ct={partName:"vaxis_holder",params:[t("PHD1","mm",700,1,2e3,1),t("PHD2","mm",900,1,4e3,1),t("PHD5","mm",800,1,4e3,1),t("PHN1","holes",6,1,24,1),z("screw holes"),t("PHD3","mm",40,1,100,1),t("PHR4","mm",40,1,100,1),t("PHL2","mm",120,1,400,1),t("PHR6","mm",20,0,400,1),z("section"),t("PHE1","mm",10,1,80,1),t("PHH1","mm",50,1,200,1),t("PHA","degree",5,-45,45,.1),t("PHL1","mm",300,1,500,1),t("PHE2","mm",10,1,80,1),t("PHE3","mm",10,1,80,1),z("for reuse"),xe("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 Xt(s,e,_=""){const o=_e(ct.partName+_),i=B(),d=B(),c=B(),n=B(),l=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
35
|
-
`;try{const h=ve(e.PHA),a=e.PHD1/2,S=e.PHD2/2,g=e.PHD3/2,r=e.PHD5/2,u=S+e.PHL1/2*Math.sin(h),f=S-e.PHL1/2*Math.sin(h),H=e.PHL1*Math.cos(h),k=S-e.PHE2/Math.cos(h)+e.PHE1/2*Math.tan(h),M=S-e.PHE2/Math.cos(h)-e.PHE1/2*Math.tan(h),D=Math.min(k,M),b=(e.PHL1-e.PHE1/Math.cos(h))/2,N=S-e.PHE2/Math.cos(h);if(D<r)throw`err210: PHD5 ${e.PHD5} too large compare to PHE2 ${e.PHE2} or PHA ${e.PHA}`;o.logstr+=`vaxis_holder's height: ${L(H)} mm
|
|
36
|
-
`,o.logstr+=`vaxis_holder outerD1: ${L(2*u)} mm
|
|
37
|
-
`,o.logstr+=`vaxis_holder outerD2: ${L(2*f)} mm
|
|
38
|
-
`,o.logstr+=`vaxis_holder innerD: ${L(e.PHD1-2*e.PHR4)} mm
|
|
39
|
-
`,o.logstr+=`vaxis_holder D2-next: ${L(2*N)} mm
|
|
40
|
-
`;const R=function(V){const te=r+(k-r)/2;return J(V*te,-e.PHE1/2).addSegStrokeR(V*(k-te),0).addSegStrokeRP(-Math.PI/2+V*h,b).addSegStrokeRP(-Math.PI/2+V*(Math.PI/2+h),e.PHE2).addSegStrokeRP(Math.PI/2+V*h,e.PHL1).addSegStrokeRP(Math.PI/2+V*(Math.PI/2+h),e.PHE2).addSegStrokeRP(-Math.PI/2+V*h,b).addSegStrokeA(V*te,e.PHE1/2).closeSegStroke()},v=function(V){return J(V*D,-e.PHE1/2).addSegStrokeA(V*D,e.PHE1/2).addSegStrokeA(V*(a-e.PHR4),e.PHE1/2).addSegStrokeA(V*(a-e.PHR4),-e.PHE1/2).closeSegStroke()},E=function(V){return J(V*(a+g),-e.PHE1/2).addSegStrokeA(V*(a+g),e.PHE1/2).addSegStrokeA(V*(a-g),e.PHE1/2).addSegStrokeA(V*(a-g),-e.PHE1/2).closeSegStroke()};i.addMainO(R(1)),i.addSecond(R(-1)),i.addSecond(v(1)),i.addSecond(E(1)),i.addSecond(v(-1)),i.addSecond(E(-1));const x=function(V){return J(V*(a+e.PHR4),-e.PHE1/2).addSegStrokeA(V*k,-e.PHE1/2).addSegStrokeRP(-Math.PI/2+V*h,b).closeSegStroke()},O=function(V){return J(V*(a+e.PHR4),e.PHE1/2).addSegStrokeA(V*M,e.PHE1/2).addSegStrokeRP(Math.PI/2+V*h,b).addSegStrokeA(V*(a+e.PHR4),e.PHE1/2+e.PHH1).closeSegStroke()},C=function(V){const te=le(V*M,e.PHE1/2).translatePolar(Math.PI/2+V*h,b),w=le(V*k,-e.PHE1/2).translatePolar(-Math.PI/2+V*h,b),W=S-e.PHE2/2;return J(V*W,0).addSegStrokeA(te.cx,te.cy).addSegStrokeA(V*(a+e.PHR4),e.PHE1/2+e.PHH1).addSegStrokeA(V*(a+e.PHR4),e.PHE1/2).addSegStrokeA(V*(a+e.PHR4),-e.PHE1/2).addSegStrokeA(w.cx,w.cy).closeSegStroke()};i.addSecond(x(-1)),i.addSecond(O(-1)),c.mergeFigure(i,!0),n.mergeFigure(i,!0),l.mergeFigure(i,!0),i.addSecond(x(1)),i.addSecond(O(1)),c.addMainO(x(1)),c.addSecond(O(1)),n.addSecond(x(1)),n.addMainO(O(1)),l.addMainO(C(1));const $=[];$.push(P(0,0,D)),d.addSecond(P(0,0,S)),d.addSecond(P(0,0,Math.max(u,f)));const[m,q,F]=Wt(e);o.logstr+=m,$.push(q);for(const V of F){const te=le(0,0).translatePolar(V,a);$.push(P(te.cx,te.cy,e.PHD3/2))}const T=J(a+e.PHR4,-e.PHE3).addSegStrokeA(D,-e.PHE3).addSegStrokeA(D,e.PHE3).addSegStrokeA(a+e.PHR4,e.PHE3).closeSegStroke();for(const V of F)d.addSecond(T.rotate(0,0,V));d.addMainOI($),o.fig={facePetal:d,faceOuter:i,faceButtress1:c,faceButtress2:n,faceButtress12:l};const p=o.partName,Y=Ke();Y.addRotation(Math.PI/2,0,0),Y.addTranslation(0,e.PHE3/2,0);const I=F.map((V,te)=>{const w=Ke(Y.getMatrix());return w.addRotation(0,0,V),{outName:`subpax_${p}_b2_${te}`,face:`${p}_faceButtress12`,extrudeMethod:U.eLinearOrtho,length:e.PHE3,rotate:w.getRotation(),translate:w.getTranslation()}}),K=F.map((V,te)=>`subpax_${p}_b2_${te}`),ie=e.withOuterCone?[`subpax_${p}_outer`]:[];o.vol={extrudes:[{outName:`subpax_${p}_outer`,face:`${p}_faceOuter`,extrudeMethod:U.eRotate,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${p}_petal`,face:`${p}_facePetal`,extrudeMethod:U.eLinearOrtho,length:e.PHE1,rotate:[0,0,0],translate:[0,0,-e.PHE1/2]},...I],volumes:[{outName:`pax_${p}`,boolMethod:re.eUnion,inList:[`subpax_${p}_petal`,...ie,...K]}]},o.sub={},o.logstr+=`vaxis_holder drawn successfully!
|
|
41
|
-
`,o.calcErr=!1}catch(h){o.logstr+=h,console.log(h)}return o}var be={pTitle:"Heliostat vaxis_holder",pDescription:"The holders of the guidance mechanism for azimuth motion",pDef:ct,pGeom:Xt},rt={partName:"pole_static",params:[t("D1","mm",1e3,20,4e3,1),t("D2","mm",700,10,4e3,1),t("D3","mm",800,10,4e3,1),t("H1","mm",3e3,10,4e4,10),t("H2","mm",7e3,50,4e4,10),z("thickness"),t("E1","mm",30,1,80,1),t("E2","mm",5,1,80,1),z("base holes"),t("N1","",32,3,100,1),t("D5","mm",40,1,100,1),t("L1","mm",45,1,300,1),z("door"),t("D4","mm",600,1,1200,1),t("H3","mm",300,5,1200,1),t("H4","mm",1800,10,2500,1),t("L2","mm",30,1,100,1),t("E3","mm",40,1,100,1),z("holders"),xe("holders",!0),t("PHL1A","mm",400,1,1e3,1),t("PHL1B","mm",400,1,1e3,1),t("PHB","mm",5e3,1,2e4,1),t("PHD1A","mm",600,1,4e3,1),t("PHD1B","mm",380,1,4e3,1),t("PHN1AB","petal",6,1,24,1),z("holder-B"),t("PHD5B2","mm",600,1,4e3,1),t("PHD5B1","mm",600,1,4e3,1),t("PHR4B","mm",30,1,400,1),t("PHD3B","mm",40,1,400,1),t("PHL2B","mm",140,1,400,1),t("PHE3B","mm",10,1,50,1),t("PHR6B","mm",20,0,400,1),t("PHE1B","mm",10,1,50,1),t("PHH1B","mm",10,1,50,1),z("holder-A"),t("PHD5A","mm",900,1,4e3,1),t("PHR4A","mm",30,1,400,1),t("PHD3A","mm",40,1,400,1),t("PHL2A","mm",200,1,400,1),t("PHE3A","mm",10,1,50,1),t("PHR6A","mm",20,0,400,1),t("PHE1A","mm",10,1,50,1),t("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 jt(s,e,_=""){const o=_e(rt.partName+_),i=B(),d=B(),c=B(),n=B(),l=B(),h=B(),a=B(),S=B(),g=B(),r=B(),u=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
42
|
-
`;try{const f=e.D1/2,H=e.D2/2,k=e.D3/2,M=e.H1+e.H2,D=Math.atan2(f-H,e.H2),b=e.E2*Math.tan(D/2),N=e.H1-b,R=e.PHL1B/Math.cos(D),v=H+e.PHL1B/2*Math.tan(D),E=e.H1+e.H2-e.PHL1B/2,x=H+(e.PHL1B/2+e.PHB)*Math.tan(D),O=e.H1+e.H2-e.PHL1B/2-e.PHB,C=e.PHL1A/Math.cos(D),$=f-e.PHL1A/2*Math.tan(D),m=e.H1+e.PHL1A/2;if(H>f)throw`err091: D2 ${e.D2} is larger than D1 ${e.D1}`;if(k+e.E2>f)throw`err095: D3 ${e.D3} and E2 ${e.E2} are too large compare to D1 ${e.D1}`;if(e.holders){if(e.PHB<e.PHL1B)throw`err131: PHB ${e.PHB} is too small compare to PHL1B ${e.PHL1B}`;if(e.PHB>e.H2-e.PHL1B-e.PHL1A)throw`err132: PHB ${e.PHB} is too large compare to H2 ${e.H2}, PHL1B ${e.PHL1B} and PHL1A ${e.PHL1A}`}o.logstr+=`pole-height: ${L(M)} mm
|
|
43
|
-
`,o.logstr+=`cone-half-angle: ${L(ae(D))} degree
|
|
44
|
-
`,o.logstr+=`holder position: A: ${L(m)} B1: ${L(O)} B2: ${L(E)} mm
|
|
45
|
-
`;const q=function(A){let Z=H-e.E2*Math.cos(D);return Z+=(M-e.E2*Math.sin(D)-A)*Math.tan(D),Z},F=function(A,Z){const j=J(A*f,0).addSegStrokeA(A*f,e.H1).addSegStrokeA(A*H,M).addSegStrokeR(-A*e.E2*Math.cos(D),-e.E2*Math.sin(D));if(Z&&e.holders){const he=e.H1+e.PHL1A/2-e.PHE1A/2,ce=he+e.PHE1A,ue=M-e.PHL1B/2+e.PHE1B/2,oe=ue-e.PHE1B,Q=ue-e.PHB,fe=Q-e.PHE1B;j.addSegStrokeA(A*q(ue),ue).addSegStrokeA(A*(e.PHD1B/2-e.PHR4B),ue).addSegStrokeA(A*(e.PHD1B/2-e.PHR4B),oe).addSegStrokeA(A*q(oe),oe).addSegStrokeA(A*q(Q),Q).addSegStrokeA(A*(e.PHD1B/2-e.PHR4B),Q).addSegStrokeA(A*(e.PHD1B/2-e.PHR4B),fe).addSegStrokeA(A*q(fe),fe).addSegStrokeA(A*q(ce),ce).addSegStrokeA(A*(e.PHD1A/2-e.PHR4A),ce).addSegStrokeA(A*(e.PHD1A/2-e.PHR4A),he).addSegStrokeA(A*q(he),he)}return j.addSegStrokeA(A*(f-e.E2),N),Z?j.addSegStrokeA(A*(f-e.E2),e.E1).addSegStrokeA(A*k,e.E1).addSegStrokeA(A*k,0):j.addSegStrokeA(A*(f-e.E2),0),j.closeSegStroke(),j};i.addMainO(F(1,!1)),i.addSecond(F(1,!0)),i.addSecond(F(-1,!0));const T=e.D4/2,p=e.H4-2*T;if(p<0)throw`err121: H4 ${e.H4} is too small compare to D4 ${e.D4}`;if(T-e.L2<0)throw`err121: D4 ${e.D4} is too small compare to L2 ${e.L2}`;const Y=function(A){const Z=T-A;return At(0,e.H3+T-Z,2*Z,p+2*Z,Math.PI/2)};d.addMainOI([Y(0),Y(e.L2)]);const I=J(f,0).addSegStrokeA(f,e.H1).addSegStrokeA(H,M).addSegStrokeA(-H,M).addSegStrokeA(-f,e.H1).addSegStrokeA(-f,0).closeSegStroke();d.addSecond(I);const K=J(-f,e.H3).addSegStrokeR(0,e.H4).addSegStrokeR(-e.E3,0).addSegStrokeR(0,-e.H4).closeSegStroke();d.addSecond(K);const ie=[];ie.push(P(0,0,f)),ie.push(P(0,0,k));const V=k+e.L1,te=2*Math.PI/e.N1;for(let A=0;A<e.N1;A++){const Z=V*Math.cos(A*te),j=V*Math.sin(A*te);ie.push(P(Z,j,e.D5/2))}c.addSecond(P(0,0,H)),c.addSecond(P(0,0,f-e.E2)),c.addMainOI(ie),n.addMainOI([P(0,0,f+e.E3),P(0,0,f-e.E2)]),l.addMainO(Y(e.L2));const w=o.partName,W=[],ne=[];let y={};if(e.holders){const Z=Le(be.pDef,"B2");Z.setVal("PHD1",e.PHD1B),Z.setVal("PHD2",2*v),Z.setVal("PHD5",e.PHD5B2),Z.setVal("PHN1",e.PHN1AB),Z.setVal("PHD3",e.PHD3B),Z.setVal("PHR4",e.PHR4B),Z.setVal("PHL2",e.PHL2B),Z.setVal("PHR6",e.PHR6B),Z.setVal("PHE1",e.PHE1B),Z.setVal("PHH1",e.PHH1B),Z.setVal("PHA",ae(D)),Z.setVal("PHL1",R),Z.setVal("PHE2",e.E2),Z.setVal("PHE3",e.PHE3B),Z.setVal("withOuterCone",1);const j=be.pGeom(0,Z.getParamVal(),Z.getSuffix());He(j),o.logstr+=De(j.logstr,Z.getPartNameSuffix()),h.mergeFigure(j.fig.faceOuter),a.mergeFigure(j.fig.facePetal);const he={outName:`inpax_${w}_hB2`,subdesign:"pax_vaxis_holderB2",subgeom:j,rotate:[0,0,0],translate:[0,0,E]};W.push(he),ne.push(`inpax_${w}_hB2`);const ce=Le(be.pDef,"B1");ce.setVal("PHD1",e.PHD1B),ce.setVal("PHD2",2*x),ce.setVal("PHD5",e.PHD5B1),ce.setVal("PHN1",e.PHN1AB),ce.setVal("PHD3",e.PHD3B),ce.setVal("PHR4",e.PHR4B),ce.setVal("PHL2",e.PHL2B),ce.setVal("PHR6",e.PHR6B),ce.setVal("PHE1",e.PHE1B),ce.setVal("PHH1",e.PHH1B),ce.setVal("PHA",ae(D)),ce.setVal("PHL1",R),ce.setVal("PHE2",e.E2),ce.setVal("PHE3",e.PHE3B),ce.setVal("withOuterCone",1);const ue=be.pGeom(0,ce.getParamVal(),ce.getSuffix());He(ue),o.logstr+=De(ue.logstr,ce.getPartNameSuffix()),S.mergeFigure(ue.fig.faceOuter),g.mergeFigure(ue.fig.facePetal);const oe={outName:`inpax_${w}_hB1`,subdesign:"pax_vaxis_holderB1",subgeom:ue,rotate:[0,0,0],translate:[0,0,O]};W.push(oe),ne.push(`inpax_${w}_hB1`);const Q=Le(be.pDef,"A");Q.setVal("PHD1",e.PHD1A),Q.setVal("PHD2",2*$),Q.setVal("PHD5",e.PHD5A),Q.setVal("PHN1",e.PHN1AB),Q.setVal("PHD3",e.PHD3A),Q.setVal("PHR4",e.PHR4A),Q.setVal("PHL2",e.PHL2A),Q.setVal("PHR6",e.PHR6A),Q.setVal("PHE1",e.PHE1A),Q.setVal("PHH1",e.PHH1A),Q.setVal("PHA",ae(D)),Q.setVal("PHL1",C),Q.setVal("PHE2",e.E2),Q.setVal("PHE3",e.PHE3A),Q.setVal("withOuterCone",1);const fe=be.pGeom(0,Q.getParamVal(),Q.getSuffix());He(fe),o.logstr+=De(fe.logstr,Q.getPartNameSuffix()),r.mergeFigure(fe.fig.faceOuter),u.mergeFigure(fe.fig.facePetal);const Pe={outName:`inpax_${w}_hA`,subdesign:"pax_vaxis_holderA",subgeom:fe,rotate:[0,0,0],translate:[0,0,m]};W.push(Pe),ne.push(`inpax_${w}_hA`),y={vaxis_holder_B2:{partName:Z.getPartName(),dparam:Z.getDesignParamList(),orientation:[0,0,0],position:[0,0,E]},vaxis_holder_B1:{partName:ce.getPartName(),dparam:ce.getDesignParamList(),orientation:[0,0,0],position:[0,0,O]},vaxis_holder_A:{partName:Q.getPartName(),dparam:Q.getDesignParamList(),orientation:[0,0,0],position:[0,0,m]}}}o.fig={poleCut:i,poleFace:d,poleBottom:c,emptyPole:n,emptyDoor:l,holderB2Section:h,holderB2Top:a,holderB1Section:S,holderB1Top:g,holderASection:r,holderATop:u},o.vol={inherits:W,extrudes:[{outName:`subpax_${w}_pole`,face:`${w}_poleCut`,extrudeMethod:U.eRotate,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${w}_bottom`,face:`${w}_poleBottom`,extrudeMethod:U.eLinearOrtho,length:e.E1,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${w}_door`,face:`${w}_poleFace`,extrudeMethod:U.eLinearOrtho,length:f+e.E3,rotate:[Math.PI/2,0,0],translate:[0,0,0]},{outName:`subpax_${w}_emptyPole`,face:`${w}_emptyPole`,extrudeMethod:U.eLinearOrtho,length:e.H1,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${w}_emptyDoor`,face:`${w}_emptyDoor`,extrudeMethod:U.eLinearOrtho,length:f+e.E3+10,rotate:[Math.PI/2,0,0],translate:[0,0,0]}],volumes:[{outName:`ipax_${w}_door`,boolMethod:re.eIntersection,inList:[`subpax_${w}_door`,`subpax_${w}_emptyPole`]},{outName:`ipax_${w}_pole`,boolMethod:re.eSubstraction,inList:[`subpax_${w}_pole`,`subpax_${w}_emptyDoor`]},{outName:`pax_${w}`,boolMethod:re.eUnion,inList:[`ipax_${w}_pole`,`subpax_${w}_bottom`,`ipax_${w}_door`,...ne]}]},o.sub=y,o.logstr+=`pole_static drawn successfully!
|
|
46
|
-
`,o.calcErr=!1}catch(f){o.logstr+=f,console.log(f)}return o}var Ne={pTitle:"Heliostat pole static",pDescription:"The vertical pole of an heliostat",pDef:rt,pGeom:jt},dt={partName:"rake",params:[t("D1","mm",600,10,4e3,1),t("D2","mm",400,10,4e3,1),t("D3","mm",400,10,4e3,1),t("H1","mm",800,1,4e3,1),t("H2","mm",3e3,20,6e3,1),t("H3","mm",400,0,4e3,1),t("E1","mm",20,1,80,1),t("E3","mm",30,1,80,1),z("transversal"),t("H4","mm",400,10,1e3,1),t("D4","mm",300,10,1e3,1),t("E4","mm",20,1,80,1),t("H5","mm",1e3,10,2e3,1),t("D5","mm",200,1,1e3,1),t("L4","mm",300,1,1e3,1),t("L5","mm",2e3,10,4e3,1),t("L6","mm",2e3,1,4e3,1),t("D8","mm",400,1,1e3,1),z("diagonal"),t("D6","mm",100,1,600,1),t("E6","mm",10,1,80,1),t("L7","mm",100,1,1e3,1),t("L8","mm",200,1,1e3,1),z("base"),t("N1","",24,3,100,1),t("D7","mm",40,1,100,1),t("L1","mm",30,1,300,1),z("door"),t("H6","mm",100,1,1e3,1),t("H7","mm",600,10,2e3,1),t("L9","mm",300,1,1e3,1),t("R9","mm",50,0,300,1),t("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 Zt(s,e,_=""){const o=_e(dt.partName+_),i=B(),d=B(),c=B(),n=B(),l=B(),h=B(),a=B(),S=B(),g=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
47
|
-
`;try{const u=Math.PI/2,f=-Math.PI/2,H=e.D1/2,k=e.D2/2,M=e.D3/2,D=e.D4/2,b=e.D5/2,N=e.D6/2,R=e.D7/2,v=e.D8/2,E=e.D4-2*e.E4,x=e.H1+e.H2,O=x-e.H4+e.H5,C=4*e.L4+e.L5+2*e.L6,$=e.H1+e.H2-e.H4,m=D*Math.cos(Math.PI/6),q=D*Math.sin(Math.PI/6),F=b*Math.cos(Math.PI/6),T=b*Math.sin(Math.PI/6),p=v*Math.cos(Math.PI/6),Y=v*Math.sin(Math.PI/6),I=[-C/2,-e.L5/2-e.L4,e.L5/2,C/2-e.L4],K=e.H2-e.L8-e.H4-D,ie=Math.atan2(H-k,e.H2),V=C/2-e.L7-H+e.L8*Math.tan(ie),te=Math.sqrt(V**2+K**2),w=Math.atan2(V,K),W=e.E1/Math.sin(w+ie),ne=te+e.E4/Math.cos(w)+W,y=H-e.L8*Math.tan(ie)-W*Math.sin(w),A=e.H1+e.L8-W*Math.cos(w),Z=y-N*Math.cos(w),j=A+N*Math.sin(w),he=N-e.E6,ce=y-e.E6*Math.cos(w),ue=A+e.E6*Math.sin(w),oe=Math.PI/2-w,Q=e.L9/2,fe=Q-e.H7*Math.tan(ie);if(e.D2>e.D1)throw`err110: D2 ${e.D2} is larger than D1 ${e.D1}`;if(e.D3+e.E1>e.D1)throw`err113: D3 ${e.D3} is too large compare to D1 ${e.D1} and E1 ${e.E1}`;if(e.H3+e.E3>e.H1)throw`err116: H3 ${e.H3} is too large compare to H1 ${e.H1} and E3 ${e.E3}`;if(e.H4+D>e.H2)throw`err119: H4 ${e.H4} is too large compare to H2 ${e.H2} and D4 ${e.D4}`;if(e.E4>D)throw`err122: E4 ${e.E4} is too large compare to D4 ${e.D4}`;if(e.D8<=e.D5)throw`err146: D8 ${e.D8} is too small compare to D5 ${e.D5}`;if(K<0)throw`err140: H2 ${e.H2} too small compare to L8 ${e.L8}, H4 ${e.H4} and D4 ${e.D4}`;if(fe<e.R9)throw`err177: R9 ${e.R9} too large compare to doorHighX ${fe} and L9 ${e.L9}`;if(e.L9>e.D1)throw`err180: L9 ${e.L9} too large compare to D1 ${e.D1}`;if(e.E6>e.D6/2)throw`err197: E6 ${e.E6} is too large compare to D6 ${e.D6}`;o.logstr+=`rake-L4: ${L(e.L4)} mm (compare with swing)
|
|
48
|
-
`,o.logstr+=`rake-L5: ${L(e.L5)} mm (compare with swing)
|
|
49
|
-
`,o.logstr+=`rake-L6: ${L(e.L6)} mm (compare with swing)
|
|
50
|
-
`,o.logstr+=`rake-beamL (4*L4+L5+2*L6): ${L(C)} mm (compare with swing)
|
|
51
|
-
`,o.logstr+=`cone-height: ${L(x)} mm
|
|
52
|
-
`,o.logstr+=`cone-height total: ${L(O)} mm
|
|
53
|
-
`,o.logstr+=`cone-angle: ${L(ae(ie))} degree
|
|
54
|
-
`,o.logstr+=`wing-angle: ${L(ae(w))} degree
|
|
55
|
-
`;const Pe=e.E1*Math.cos(ie),we=e.E1*Math.sin(ie),ee=e.E1*Math.tan(ie/2),vt=function(de){return J(de*H,0).addSegStrokeA(de*H,e.H1).addSegStrokeA(de*k,x).addSegStrokeA(de*(k-Pe),x-we).addSegStrokeA(de*(H-e.E1),e.H1-ee).addSegStrokeA(de*(H-e.E1),0).closeSegStroke()},Ae=function(de){return J(de*H,0).addSegStrokeA(de*H,e.H1).addSegStrokeA(de*k,x).addSegStrokeA(de*(k-Pe),x-we).addSegStrokeA(de*(H-e.E1),e.H1-ee).addSegStrokeA(de*(H-e.E1),e.H1-e.H3).addSegStrokeA(de*M,e.H1-e.H3).addSegStrokeA(de*M,e.H1-e.H3-e.E3).addSegStrokeA(de*(H-e.E1),e.H1-e.H3-e.E3).addSegStrokeA(de*(H-e.E1),0).closeSegStroke()},xt=$-D-(e.H1-ee),$t=H-e.E1-Math.tan(ie)*xt,wt=J(0,$-D).addSegStrokeA($t,$-D).addSegStrokeA(H-e.E1,e.H1-ee).addSegStrokeA(H-e.E1,e.H1-e.H3).addSegStrokeA(0,e.H1-e.H3).closeSegStroke(),Fe=kt(-Q,e.H1+e.H6,e.L9,2*fe,e.H7,e.R9);i.addMainO(vt(1)),i.addSecond(Ae(1)),i.addSecond(Ae(-1)),i.addSecond(X(-C/2,$,C,e.D4,0)),i.addSecond(X(-C/2,$,C,E,0));for(const de of I)i.addSecond(ge(de,$+q,e.L4,e.H5-q-T));i.addSecond(Me(y,A,ne,2*N,oe)),i.addSecond(Me(ce,ue,ne,2*he,oe)),i.addSecond(Me(-y,A,2*N,ne,w)),i.addSecond(Me(-ce,ue,2*he,ne,w)),i.addSecond(Fe),d.mergeFigure(i,!0),d.addMainO(wt);const pe=[],Je=J(m,$+q).addSegStrokeA(p,$+e.H5-Y).addSegStrokeA(F,$+e.H5-T).addPointA(-F,$+e.H5-T).addSegArc(b,!1,!1).addSegStrokeA(-p,$+e.H5-Y).addSegStrokeA(-m,$+q).closeSegArc(D,!1,!1);pe.push(P(0,$,D)),pe.push(P(0,$,D-e.E4)),c.addSecond(Ae(1)),c.addSecond(Ae(-1)),c.addSecond(Je),c.addSecond(P(0,$+e.H5,b)),c.addSecond(X(0,e.H1+e.L8,K,2*N,u)),c.addSecond(X(0,e.H1+e.L8,K,2*he,u)),c.addSecond(Fe),c.addMainOI(pe),n.addMainO(P(0,$,D-e.E4)),n.addSecond(P(0,$,D)),n.addSecond(Je);const Ve=[];Ve.push(P(0,0,H)),Ve.push(P(0,0,M));const Xe=M+e.L1,je=2*Math.PI/e.N1;for(let de=0;de<e.N1;de++){const Re=Xe*Math.cos(de*je),Ze=Xe*Math.sin(de*je);Ve.push(P(Re,Ze,R))}l.addSecond(P(0,0,H-e.E1)),l.addSecond(P(0,0,k)),l.addSecond(X(0,-C/2,C,e.D4,u)),l.addSecond(X(0,-C/2,C,E,u));for(const de of I)l.addSecond(X(0,de,e.L4,2*m,u)),l.addSecond(X(0,de,e.L4,2*F,u)),l.addSecond(X(0,de,e.L4,2*p,u));const Be=H-e.L8*Math.tan(ie);l.addSecond(X(0,Be,V,2*N,u)),l.addSecond(X(0,Be,V,2*he,u)),l.addSecond(X(0,-Be,V,2*N,f)),l.addSecond(X(0,-Be,V,2*he,f)),l.addMainOI(Ve),h.addMainO(Je),h.addSecond(P(0,$,D)),h.addSecond(P(0,$,D-e.E4)),h.addSecond(P(0,$+e.H5,b));const me=[];me.push(P(0,0,N)),me.push(P(0,0,he)),a.addMainOI(me),S.addSecond(P(0,0,N)),S.addMainO(P(0,0,he)),g.addMainO(Fe),g.addSecond(Ae(1)),g.addSecond(Ae(-1)),g.addSecond(X(-C/2,$,C,e.D4,0)),g.addSecond(X(-C/2,$,C,E,0));for(const de of I)g.addSecond(ge(de,$+q,e.L4,e.H5-q-T));g.addSecond(Me(y,A,ne,2*N,oe)),g.addSecond(Me(ce,ue,ne,2*he,oe)),g.addSecond(Me(-y,A,2*N,ne,w)),g.addSecond(Me(-ce,ue,2*he,ne,w)),o.fig={faceCone:i,faceConeHollow:d,faceBeam:c,faceBeamHollow:n,faceDisc:l,faceHand:h,faceWing:a,faceWingHollow:S,faceDoor:g};const se=o.partName,Mt=I.map((de,Re)=>({outName:`subpax_${se}_hand_${Re}`,face:`${se}_faceHand`,extrudeMethod:U.eLinearOrtho,length:e.L4,rotate:[Math.PI/2,0,0],translate:[0,-de,0]}));o.vol={extrudes:[{outName:`subpax_${se}_cone`,face:`${se}_faceCone`,extrudeMethod:U.eRotate,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${se}_coneHollow`,face:`${se}_faceConeHollow`,extrudeMethod:U.eRotate,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${se}_beam`,face:`${se}_faceBeam`,extrudeMethod:U.eLinearOrtho,length:C,rotate:[Math.PI/2,0,0],translate:[0,C/2,0]},{outName:`subpax_${se}_beamHollow`,face:`${se}_faceBeamHollow`,extrudeMethod:U.eLinearOrtho,length:C,rotate:[Math.PI/2,0,0],translate:[0,C/2,0]},{outName:`subpax_${se}_disc`,face:`${se}_faceDisc`,extrudeMethod:U.eLinearOrtho,length:e.E3,rotate:[0,0,0],translate:[0,0,e.H1-e.H3-e.E3]},{outName:`subpax_${se}_wing_right`,face:`${se}_faceWing`,extrudeMethod:U.eLinearOrtho,length:ne,rotate:[-w,0,0],translate:[0,Z,j]},{outName:`subpax_${se}_wing_left`,face:`${se}_faceWing`,extrudeMethod:U.eLinearOrtho,length:ne,rotate:[w,0,0],translate:[0,-Z,j]},{outName:`subpax_${se}_wing_hollow_right`,face:`${se}_faceWingHollow`,extrudeMethod:U.eLinearOrtho,length:ne,rotate:[-w,0,0],translate:[0,Z,j]},{outName:`subpax_${se}_wing_hollow_left`,face:`${se}_faceWingHollow`,extrudeMethod:U.eLinearOrtho,length:ne,rotate:[w,0,0],translate:[0,-Z,j]},{outName:`subpax_${se}_door`,face:`${se}_faceDoor`,extrudeMethod:U.eLinearOrtho,length:e.D1,rotate:[Math.PI/2,0,-Math.PI/2+ve(e.doorOrientation)],translate:[0,0,0]},...Mt],volumes:[{outName:`ipax_${se}_plus`,boolMethod:re.eUnion,inList:[`subpax_${se}_cone`,`subpax_${se}_beam`,`subpax_${se}_disc`,`subpax_${se}_hand_0`,`subpax_${se}_hand_1`,`subpax_${se}_hand_2`,`subpax_${se}_hand_3`,`subpax_${se}_wing_right`,`subpax_${se}_wing_left`]},{outName:`ipax_${se}_hollow`,boolMethod:re.eUnion,inList:[`subpax_${se}_coneHollow`,`subpax_${se}_beamHollow`,`subpax_${se}_wing_hollow_right`,`subpax_${se}_wing_hollow_left`,`subpax_${se}_door`]},{outName:`pax_${se}`,boolMethod:re.eSubstraction,inList:[`ipax_${se}_plus`,`ipax_${se}_hollow`]}]},o.sub={},o.logstr+=`heliostat-rake drawn successfully!
|
|
56
|
-
`,o.calcErr=!1}catch(r){o.logstr+=r,console.log(r)}return o}var Ce={pTitle:"Heliostat rake",pDescription:"The rake on top of the V-Axis of the heliostat",pDef:dt,pGeom:Zt},Ge={partName:"spider",params:[t("D1","mm",100,1,400,1),t("L1","mm",400,1,1e3,1),t("L2","mm",400,1,1e3,1),t("L3","mm",100,1,400,1),t("L4","mm",3e3,10,8e3,10),z("longitude"),t("L5","mm",2e3,1,8e3,1),t("N1","",6,1,20,1),t("L6","mm",30,1,100,1),z("thickness"),t("E1","mm",3,1,80,1),t("E2","mm",50,1,200,1),t("E3","mm",3,1,80,1),t("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 Kt(s,e,_=""){const o=_e(Ge.partName+_);let i,d;const c=B(),n=B(),l=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
57
|
-
`;try{const h=e.D1/2;if(e.D1<e.E2)throw`err476: D1 ${e.D1} smaller then E2 ${e.E2}`;const a=e.E2/2,S=Math.sqrt(h**2-a**2),g=e.L1+e.L2*Math.sqrt(2),r=e.L2+e.L1*Math.sqrt(2),u=e.L4-r;if(u<e.R2)throw`err984: L4 ${e.L4} too small compare to R2 ${e.R2}`;const f=u*Math.cos(Math.PI/4),H=u*Math.sin(Math.PI/4),k=e.E2*Math.cos(Math.PI/4),M=e.E2*Math.sin(Math.PI/4),D=e.E2*Math.tan(Math.PI/8);if(h<e.E1)throw`err092: D1 ${e.D1} too small compare to E1 ${e.E1}`;if(e.L3<e.E2)throw`err994: L3 ${e.L3} smaller than E2 ${e.E2}`;if(e.L3<2*e.E3)throw`err997: L3 ${e.L3} too small compare to E3 ${e.E3}`;const b=(e.L3-e.E2)/2*Math.cos(Math.PI/4),N=g+f+b,R=-e.L1-H+b,v=R-e.E3*Math.sqrt(2);if(e.L5<e.N1*e.L6)throw`err110: L5 ${e.L5} too small compare to N1 ${e.N1} and L6 ${e.L6}`;let E=1;e.N1>1&&(E=(e.L5-e.L6)/(e.N1-1));const x=[...Array(e.N1).keys()].map(T=>T*E);i=function(T,p,Y){return J(T,p).addSegStrokeA(T+Y*Math.cos(Math.PI/4),p-Y*Math.sin(Math.PI/4)).addSegStrokeA(T,p-2*Y*Math.sin(Math.PI/4)).addSegStrokeA(T-Y*Math.cos(Math.PI/4),p-Y*Math.sin(Math.PI/4)).closeSegStroke()},d=function(T,p,Y,I){return J(Y,I).addSegStrokeA(Y+T,I).addSegStrokeA(Y+T,I+p).addSegStrokeA(Y,I+p).closeSegStroke()};const O=Math.sin(2*Math.PI*s/Ge.sim.tMax)*Math.PI/2;o.logstr+=`spide leg number: ${e.N1}
|
|
58
|
-
`,o.logstr+=`spide position angle: ${L(ae(O))} degree
|
|
59
|
-
`;const C=[],$=J(a,-S).addCornerRounded(e.R2).addSegStrokeA(a,-e.L1).addCornerRounded(e.R2).addSegStrokeA(g,-e.L1).addCornerRounded(e.R2+e.E2).addSegStrokeA(g+f,-e.L1-H).addSegStrokeA(g+f-k,-e.L1-H-M).addSegStrokeA(g-D,-e.L1-e.E2).addCornerRounded(e.R2).addSegStrokeA(-g+D,-e.L1-e.E2).addCornerRounded(e.R2).addSegStrokeA(-g-f+k,-e.L1-H-M).addSegStrokeA(-g-f,-e.L1-H).addSegStrokeA(-g,-e.L1).addCornerRounded(e.R2+e.E2).addSegStrokeA(-a,-e.L1).addCornerRounded(e.R2).addSegStrokeA(-a,-S).addCornerRounded(e.R2).closeSegArc(h,!0,!1);C.push($),C.push(P(0,0,h-e.E1)),c.addSecond(i(N,R,e.L3)),c.addSecond(i(N,v,e.L3-2*e.E3)),c.addSecond(i(-N,R,e.L3)),c.addSecond(i(-N,v,e.L3-2*e.E3)),c.addMainOI(C),n.addMainOI([P(0,0,h),P(0,0,h-e.E1)]),n.addMainOI([i(N,R,e.L3),i(N,v,e.L3-2*e.E3)]),n.addMainOI([i(-N,R,e.L3),i(-N,v,e.L3-2*e.E3)]),n.addSecond($),l.addSecond(d(e.L5,e.D1,0,-e.D1/2)),l.addSecond(d(e.L5,e.L3,0,-e.L4-e.L3));for(const T of x)l.addSecond(d(e.L6,e.L4,T,-e.L4));o.fig={faceLegs:c.rotate(0,0,O),faceTube:n.rotate(0,0,O),faceBody:l};const m=o.partName,q=x.map((T,p)=>({outName:`subpax_${m}_leg_${p}`,face:`${m}_faceLegs`,extrudeMethod:U.eLinearOrtho,length:e.L6,rotate:[0,0,0],translate:[0,0,T]})),F=x.map((T,p)=>`subpax_${m}_leg_${p}`);o.vol={extrudes:[{outName:`subpax_${m}_tube`,face:`${m}_faceTube`,extrudeMethod:U.eLinearOrtho,length:e.L5,rotate:[0,0,0],translate:[0,0,0]},...q],volumes:[{outName:`pax_${m}`,boolMethod:re.eUnion,inList:[`subpax_${m}_tube`,...F]}]},o.sub={},o.logstr+=`heliostat-spider drawn successfully!
|
|
60
|
-
`,o.calcErr=!1}catch(h){o.logstr+=h,console.log(h)}return o}var Ue={pTitle:"Heliostat spider",pDescription:"The spider part for the control of the inclination of the heliostat",pDef:Ge,pGeom:Kt},lt={partName:"swing",params:[t("L1","mm",12500,100,4e4,1),t("L2","mm",6e3,100,4e4,1),z("radial"),t("D1","mm",400,1,1e3,1),t("E1","mm",5,1,80,1),t("H2","mm",100,1,400,1),t("H4","mm",100,1,400,1),t("E2","mm",3,1,80,1),t("L3","mm",500,1,4e3,1),z("longitudinal"),t("L4","mm",600,1,4e3,1),t("L5","mm",2e3,1,1e4,1),t("L6","mm",2e3,1,1e4,1),t("H1","mm",100,1,400,1),t("H3","mm",100,1,400,1),t("E3","mm",3,1,80,1),z("buttress"),t("S1","mm",300,0,3e3,1),t("S2","mm",10,0,2e3,1),t("R2","mm",100,0,1e3,1),z("rod overlay"),t("rod1","",10,1,40,1),t("rod2","mm",1300,10,4e3,1),t("rod3","mm",400,10,1e3,1),t("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 Qt(s,e,_=""){const o=_e(lt.partName+_),i=B(),d=B(),c=B(),n=B(),l=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
61
|
-
`;try{const h=e.D1/2,a=h+e.S2,S=4*e.L4+e.L5+2*e.L6-2*e.H1,g=e.L4-2*e.H1,r=e.L5+2*e.H1,u=e.L6+2*e.H1;o.logstr+=`swing size: L1 ${L(e.L1)} x L2 ${L(e.L2)} mm
|
|
62
|
-
`,o.logstr+=`rake-L4: ${L(g)} mm (compare with rake)
|
|
63
|
-
`,o.logstr+=`rake-L5: ${L(r)} mm (compare with rake)
|
|
64
|
-
`,o.logstr+=`rake-L6: ${L(u)} mm (compare with rake)
|
|
65
|
-
`,o.logstr+=`rake-beamL: (4*L4+L5+2*L6-2*H1) ${L(S)} mm (compare with rake)
|
|
66
|
-
`,i.addMainOI([P(0,0,h),P(0,0,h-e.E1)]);const f=[-e.L2/2,-e.L3-e.H2,e.L3,e.L2/2-e.H2];for(const F of f)i.addMainOI([ge(F,a-e.H4,e.H2,e.H4),ge(F+e.E2,a-e.H4+e.E2,e.H2-2*e.E2,e.H4-2*e.E2)]);i.addSecond(ge(-e.L2/2,a,e.L2,e.H3));const H=[];H.push(-e.L1/2),H.push(e.L1/2-e.H1);for(const F of[-e.L5/2-2*e.L4-e.L6,-e.L5/2-e.L4,e.L5/2,e.L5/2+e.L4+e.L6])for(const T of[0,e.L4-e.H1])H.push(F+T);for(const F of H)d.addMainOI([ge(F,a,e.H1,e.H3),ge(F+e.E3,a+e.E3,e.H1-2*e.E3,e.H3-2*e.E3)]);d.addSecond(ge(-e.L1/2,-h,e.L1,e.D1)),d.addSecond(ge(-e.L1/2,a-e.H4,e.L1,e.H4));for(const F of H)c.addSecond(ge(F,-e.L2/2,e.H1,e.L2));for(const F of f)c.addSecond(ge(-e.L1/2,F,e.L1,e.H2));c.addSecond(ge(-e.L1/2,-h,e.L1,e.D1));const k=Math.sqrt(a**2+e.S1**2),M=Math.acos(h/k),D=Math.atan2(e.S1,a),b=le(0,0),R=b.translatePolar(Math.PI/2+D,h).rotate(b,M),v=J(-e.L3,a).addSegStrokeA(-e.S1,a).addCornerRounded(e.R2).addSegStrokeA(R.cx,R.cy).addPointA(0,-h).addPointA(-R.cx,R.cy).addSegArc2().addSegStrokeA(e.S1,a).addCornerRounded(e.R2).addSegStrokeA(e.L3,a).addSegStrokeA(e.L3,a+e.E3).addSegStrokeA(-e.L3,a+e.E3).closeSegStroke();n.addMainOI([v,P(0,0,h-e.E1)]),i.addSecond(v);for(const F of H)l.addMainO(ge(F,-e.L2/2,e.H1,e.L2));for(const F of f)l.addMainO(ge(-e.L1/2,F,e.L1,e.H2));l.addMainO(ge(-e.L1/2,-h,e.L1,e.D1));const E=-((e.rod1-1)*e.rod2+e.rod3)/2,x=(e.rod3-e.rod4)/2,O=e.rod3/2,C=1.2*e.L2,$=(C-O)/3,m=-C/2;for(let F=0;F<e.rod1;F++){const T=E+F*e.rod2;l.addSecond(ge(T+x,m,e.rod4,C));for(let p=0;p<4;p++)l.addSecond(ge(T,m+p*$,e.rod3,O,O/4))}o.fig={faceSide:i,faceFace:d,faceTop:c,faceButtress:n,faceTopWithRods:l};const q=o.partName;o.vol={extrudes:[{outName:`subpax_${q}_side`,face:`${q}_faceSide`,extrudeMethod:U.eLinearOrtho,length:e.L1,rotate:[0,0,0],translate:[0,0,-e.L1/2]},{outName:`subpax_${q}_face`,face:`${q}_faceFace`,extrudeMethod:U.eLinearOrtho,length:e.L2,rotate:[0,Math.PI/2,0],translate:[-e.L2/2,0,0]},...H.map((F,T)=>({outName:`subpax_${q}_buttress_${T}`,face:`${q}_faceButtress`,extrudeMethod:U.eLinearOrtho,length:e.H1,rotate:[0,0,0],translate:[0,0,F]}))],volumes:[{outName:`pax_${q}`,boolMethod:re.eUnion,inList:[`subpax_${q}_side`,`subpax_${q}_face`,...H.map((F,T)=>`subpax_${q}_buttress_${T}`)]}]},o.sub={},o.logstr+=`heliostat-swing drawn successfully!
|
|
67
|
-
`,o.calcErr=!1}catch(h){o.logstr+=h,console.log(h)}return o}var Ie={pTitle:"Heliostat swing",pDescription:"The swing for the heliostat inclination",pDef:lt,pGeom:Qt},qe={partName:"heliostat",params:[t("H1","mm",3e3,10,4e4,1),t("H2","mm",2500,50,4e4,1),t("D1","mm",1e3,20,4e3,1),t("D2","mm",700,20,4e3,1),t("E1","mm",30,1,80,1),z("rake"),t("H3","mm",200,1,500,1),t("H4","mm",800,1,4e3,1),t("H5","mm",3e3,50,6e3,1),t("H6","mm",200,1,4e3,1),t("H7","mm",800,1,4e3,1),t("H8","mm",200,1,4e3,1),t("D3","mm",900,20,4e3,1),t("D4","mm",400,20,4e3,1),t("D5","mm",300,20,1e3,1),t("D6","mm",200,10,1e3,1),t("D7","mm",400,10,1e3,1),z("rake diagonal"),t("D9","mm",100,1,1e3,1),t("L7","mm",100,1,1e3,1),t("L8","mm",200,1,1e3,1),z("spider"),t("D8","mm",100,1,1e3,1),t("S1","mm",250,1,800,1),t("S2","mm",200,1,800,1),t("E2","mm",50,1,80,1),z("swing"),t("L1","mm",12500,100,4e4,1),t("L2","mm",6e3,100,4e4,1),t("L3","mm",100,1,500,1),t("L4","mm",600,1,4e3,1),t("L5","mm",2e3,10,6e3,1),t("L6","mm",2e3,1,6e3,1),t("H9","mm",100,1,400,1),z("motion amplitude"),t("al","degree",80,0,95,1),t("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 eo(s,e,_=""){const o=_e(qe.partName+_),i=B(),d=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
68
|
-
`;try{const c=e.H1+e.H2-e.H3+e.H4+e.H5-e.H6+e.H7;o.logstr+=`heliostat-height: ${L(c)}, diameter ${L(e.D1)} m
|
|
69
|
-
`,o.logstr+=`heliostat-swing-length: ${L(e.L1)}, width ${L(e.L2)} m
|
|
70
|
-
`;const l=(e.al-e.ar)/2-Math.sin(2*Math.PI*s/qe.sim.tMax)*(e.al+e.ar)/2,h=ve(l);o.logstr+=`swing position angle: ${L(ae(h))} degree
|
|
71
|
-
`;const a=e.H1+e.H2-e.H3,S=a+e.H4+e.H5-e.H6+e.H7,g=S+e.H8,r=Le(Ne.pDef),u=Le(Ce.pDef),f=Le(Ue.pDef),H=Le(Ie.pDef);r.setVal("H1",e.H1),r.setVal("H2",e.H2),r.setVal("D1",e.D1),r.setVal("D2",e.D2),r.setVal("D3",e.D1-6*e.E1),r.setVal("E1",e.E1),r.setVal("E2",e.E1);const k=32,M=(e.D1-6*e.E1)/(k*4);r.setVal("N1",k),r.setVal("D5",M),r.setVal("L1",e.E1+M/2),r.setVal("H3",e.H1/4),r.setVal("H4",e.H1/2),r.setVal("D4",e.H1/4),r.setVal("L2",e.H1/80),r.setVal("E3",e.H1/80),r.setVal("holders",0),u.setVal("H1",e.H4),u.setVal("H2",e.H5),u.setVal("H3",e.H4-2*e.E1),u.setVal("D1",e.D3),u.setVal("D2",e.D4),u.setVal("L9",e.D3/2),u.setVal("H7",e.D3/2*1.6),u.setVal("H6",e.D3/20),u.setVal("R9",e.D3/20),u.setVal("E1",e.E1),u.setVal("E3",e.E1),u.setVal("E4",e.E1),u.setVal("E6",e.E1);const D=e.D2*.6,b=24,N=D/(b*4);if(u.setVal("D3",D),e.D2>e.D3-2*e.E1)throw`err153: D2 ${e.D2} too large compare to D3 ${e.D3} and E1 ${e.E1}`;if(u.setVal("N1",b),u.setVal("D7",N),u.setVal("L1",N),u.setVal("H4",e.H6),u.setVal("D4",e.D5),u.setVal("L7",e.L7),u.setVal("L8",e.L8),u.setVal("D6",e.D9),u.setVal("H5",e.H7+e.H8),u.setVal("D5",e.D6),u.setVal("D8",e.D7),e.D6>=e.D7)throw`err164: D6 ${e.D6} too large compare to D7 ${e.D7}`;const R=e.L4-2*e.L3;if(u.setVal("L4",R),R<=0)throw`err169: L3 ${e.L3} too large compare to L4 ${e.L4}`;u.setVal("L5",e.L5+2*e.L3),u.setVal("L6",e.L6+2*e.L3);const v=e.L5*.96,E=6;if(f.setVal("L5",v),f.setVal("D1",e.D8),f.setVal("L1",e.S1),f.setVal("L2",e.S2),f.setVal("L3",e.E2*2),f.setVal("E1",e.E1),f.setVal("E2",e.E2),f.setVal("E3",e.E1),f.setVal("L4",e.L2/2-e.H8),f.setVal("R2",0),f.setVal("N1",E),f.setVal("L6",v/(E*10)),H.setVal("L2",e.L2),H.setVal("D1",e.D6),H.setVal("H3",e.H9),H.setVal("H4",e.H9),H.setVal("L1",e.L1),e.L1<4*e.L4+2*e.L6+e.L5+2*e.L3)throw`err185: L1 ${e.L1} too small compare to L4 ${e.L4}, L5 ${e.L5}, L6 ${e.L6}`;H.setVal("H1",e.L3),H.setVal("H2",e.L3),H.setVal("L4",e.L4),H.setVal("L5",e.L5),H.setVal("L6",e.L6),H.setVal("L3",e.D7),H.setVal("S1",e.D6/2),H.setVal("R2",0);const x=Ne.pGeom(0,r.getParamVal(),r.getSuffix());He(x),o.logstr+=De(x.logstr,r.getPartNameSuffix());const O=Ce.pGeom(0,u.getParamVal(),u.getSuffix());He(O),o.logstr+=De(O.logstr,u.getPartNameSuffix());const C=Ue.pGeom(0,f.getParamVal(),f.getSuffix());He(C),o.logstr+=De(C.logstr,f.getPartNameSuffix());const $=Ie.pGeom(0,H.getParamVal(),H.getSuffix());He($),o.logstr+=De($.logstr,H.getPartNameSuffix()),i.mergeFigure(x.fig.poleCut),i.mergeFigure(O.fig.faceBeam.translate(0,a)),i.mergeFigure(C.fig.faceLegs.translate(0,S).rotate(0,S,h/2)),i.mergeFigure($.fig.faceSide.translate(0,g).rotate(0,g,h)),d.mergeFigure(x.fig.poleCut),d.mergeFigure(O.fig.faceCone.translate(0,a)),d.mergeFigure(C.fig.faceBody.translate(-v/2,S)),d.mergeFigure($.fig.faceFace.translate(0,g)),o.fig={faceSide:i,faceFace:d};const m=o.partName;o.vol={inherits:[{outName:`inpax_${m}_poleStatic`,subdesign:"pax_pole_static",subgeom:x,rotate:[0,0,0],translate:[0,0,0]},{outName:`inpax_${m}_rake`,subdesign:"pax_rake",subgeom:O,rotate:[0,0,0],translate:[0,0,a]},{outName:`inpax_${m}_swing`,subdesign:"pax_swing",subgeom:$,rotate:[Math.PI/2,0,0],translate:[0,0,g]},{outName:`inpax_${m}_spider`,subdesign:"pax_spider",subgeom:C,rotate:[Math.PI/2,0,0],translate:[0,v/2,S]}],extrudes:[],volumes:[{outName:`pax_${m}`,boolMethod:re.eUnion,inList:[`inpax_${m}_poleStatic`,`inpax_${m}_rake`,`inpax_${m}_swing`,`inpax_${m}_spider`]}]};const q={partName:r.getPartName(),dparam:r.getDesignParamList(),orientation:[0,0,0],position:[0,0,0]},F={partName:u.getPartName(),dparam:u.getDesignParamList(),orientation:[0,0,0],position:[0,0,a]},T={partName:f.getPartName(),dparam:f.getDesignParamList(),orientation:[Math.PI/2,0,0],position:[0,v/2,S]},p={partName:H.getPartName(),dparam:H.getDesignParamList(),orientation:[Math.PI/2,0,0],position:[0,0,g]};o.sub={pole_static_1:q,rake_1:F,spider_1:T,swing_1:p},o.logstr+=`heliostat-overview drawn successfully!
|
|
72
|
-
`,o.calcErr=!1}catch(c){o.logstr+=c,console.log(c)}return o}var to={pTitle:"Heliostat overview",pDescription:"The heliostat inclination mechanism",pDef:qe,pGeom:eo},gt={partName:"rake_stopper",params:[t("D1","mm",600,10,4e3,1),t("D2","mm",400,10,4e3,1),t("D3","mm",400,1,4e3,1),t("H1","mm",800,1,4e3,1),t("H2","mm",3e3,20,6e3,1),t("H3","mm",400,0,4e3,1),t("E1","mm",20,1,80,1),t("E3","mm",30,1,80,1),z("transversal"),t("H4","mm",200,1,1e3,1),t("D4","mm",300,1,1e3,1),t("E4","mm",20,1,80,1),t("H5","mm",400,1,2e3,1),t("D5","mm",200,1,1e3,1),t("L4","mm",300,1,1e3,1),t("L5","mm",2e3,1,4e3,1),t("L6","mm",2e3,1,4e3,1),t("D8","mm",400,1,1e3,1),z("diagonal"),t("D6","mm",100,1,600,1),t("E6","mm",10,1,80,1),t("L7","mm",100,1,1e3,1),t("L8","mm",200,1,1e3,1),z("base"),t("N1","",24,3,100,1),t("D7","mm",40,1,100,1),t("L1","mm",30,1,300,1),z("door"),t("H6","mm",100,1,1e3,1),t("H7","mm",600,1,2e3,1),t("L9","mm",300,1,1e3,1),t("R9","mm",50,0,300,1),t("doorOrientation","degree",0,-180,180,1),z("stoppers"),t("S1","mm",100,1,300,1),t("S2","mm",2e3,1,8e3,1),t("S3","mm",100,0,8e3,1),t("E7","mm",5,1,80,1),z("low stopper"),t("JD1","mm",200,1,500,1),t("JE1","mm",5,1,80,1),t("JL1","mm",260,1,2e3,1),t("JH1","mm",20,-500,500,1),t("JS1","mm",100,1,500,1),t("JS2","mm",200,1,500,1),z("high stopper"),t("JD3","mm",200,1,500,1),t("JE3","mm",5,1,80,1),t("JS3","mm",120,1,500,1),t("JD4","mm",200,1,500,1),t("JE4","mm",5,1,80,1),t("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 oo(s,e,_=""){const o=_e(gt.partName+_),i=B(),d=B(),c=B(),n=B(),l=B(),h=B(),a=B(),S=B(),g=B(),r=B(),u=B(),f=B(),H=B(),k=B(),M=B(),D=B(),b=B(),N=B(),R=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
73
|
-
`;try{const E=Math.PI,x=Math.PI/2,O=-Math.PI/2,C=e.D1/2,$=e.H1+e.H2,m=$-e.H4+e.H5,q=m-e.S2,F=e.H1+e.H2-e.H4,T=F+e.D4/2,p=e.H1+e.S3,Y=e.L5/2,I=e.S1/2,K=e.S1-2*e.E7,ie=K/2,V=e.S2-I,te=q-e.JH1,w=e.JD1/2,W=w-e.JE1,ne=C+e.JS2,y=Y-I,A=C+e.JS3,Z=e.JD3-2*e.JE3,j=e.D4/2+e.JS4,he=e.JD4-2*e.JE4;if(2*e.E7>=e.S1)throw`err135: E7 ${e.E7} too large compare to S1 ${e.S1}`;if(e.L5<e.D2)throw`err138: L5 ${e.L5} too small compare to D2 ${e.D2}`;if(q-e.JH1-e.JD1/2<0)throw`err143: S2 ${e.S2} too large compare to H1H5 ${L(m)}`;if(e.JS1<e.S1/2)throw`err144: JS1 ${e.JS1} too small compare to S1 ${e.S1}`;if(e.JE1>e.JD1/2)throw`err145: JE1 ${e.JE1} too large compare to JD1 ${e.JD1}`;if(e.JL1>e.D1)throw`err146: JL1 ${e.JL1} too large compare to D1 ${e.D1}`;if(e.JL1<e.JD1)throw`err147: JL1 ${e.JL1} too small compare to JD1 ${e.JD1}`;if(Math.abs(e.JH1)>e.JD1/2+I)throw`err148: JH1 ${e.JH1} too large compare to JD1 ${e.JD1} and S1 ${e.S1}`;if(e.JS2<e.JS1-I)throw`err149: JS2 ${e.JS2} too small compare to JS1 ${e.JS1} and S1 ${e.S1}`;if(e.S3>e.H2-e.H4)throw`err150: S3 ${e.S3} too large compare to H2 ${e.H2} and H4 ${e.H4}`;if(e.JE3>e.JD3/2)throw`err151: JE3 ${e.JE3} too large compare to JD3 ${e.JD3}`;if(e.JE4>e.JD4/2)throw`err152: JE4 ${e.JE4} too large compare to JD4 ${e.JD4}`;o.logstr+=`cone-height: ${L($)} mm
|
|
74
|
-
`,o.logstr+=`cone-height total: ${L(m)} mm
|
|
75
|
-
`;const ce=[],ue=[];D.addSecond(X(-Y,q,e.L5,e.S1,0)),D.addSecond(X(-Y,q,e.L5,K,0)),ce.push(P(-e.JL1/2,te,w)),ce.push(P(-e.JL1/2,te,W)),ue.push(P(e.JL1/2,te,w)),ue.push(P(e.JL1/2,te,W)),D.addMainOI(ce),D.addMainOI(ue);const oe=Le(Ce.pDef);oe.setVal("D1",e.D1),oe.setVal("D2",e.D2),oe.setVal("D3",e.D3),oe.setVal("H1",e.H1),oe.setVal("H2",e.H2),oe.setVal("H3",e.H3),oe.setVal("E1",e.E1),oe.setVal("E3",e.E3),oe.setVal("H4",e.H4),oe.setVal("D4",e.D4),oe.setVal("E4",e.E4),oe.setVal("H5",e.H5),oe.setVal("D5",e.D5),oe.setVal("L4",e.L4),oe.setVal("L5",e.L5),oe.setVal("L6",e.L6),oe.setVal("D6",e.D6),oe.setVal("E6",e.E6),oe.setVal("L7",e.L7),oe.setVal("L8",e.L8),oe.setVal("N1",e.N1),oe.setVal("D7",e.D7),oe.setVal("L1",e.L1),oe.setVal("D8",e.D8),oe.setVal("H6",e.H6),oe.setVal("H7",e.H7),oe.setVal("L9",e.L9),oe.setVal("R9",e.R9),oe.setVal("doorOrientation",e.doorOrientation);const Q=Ce.pGeom(0,oe.getParamVal(),oe.getSuffix());He(Q),o.logstr+=De(Q.logstr,oe.getPartNameSuffix()),i.mergeFigure(Q.fig.faceCone),i.mergeFigure(D,!0),d.mergeFigure(Q.fig.faceBeam),c.mergeFigure(Q.fig.faceBeamHollow),n.mergeFigure(Q.fig.faceDisc),l.mergeFigure(Q.fig.faceHand),h.mergeFigure(Q.fig.faceWing),a.mergeFigure(Q.fig.faceWingHollow),S.mergeFigure(Q.fig.faceDoor),S.mergeFigure(D,!0),g.mergeFigure(Q.fig.faceDisc,!0),g.addMainOI([X(-C-e.JS1,-Y,e.L5,e.S1,x),X(-C-e.JS1,-Y,e.L5,K,x)]),g.addMainOI([X(V,-Y,e.L5,e.S1,x),X(V,-Y,e.L5,K,x)]),g.addMainOI([X(0,-Y+I,V,e.S1,0),X(0,-Y+I,V,K,0)]),g.addMainOI([X(0,Y-I,V,e.S1,0),X(0,Y-I,V,K,0)]),g.addMainOI([X(0,-C-I,V,e.S1,0),X(0,-C-I,V,K,0)]),g.addMainOI([X(0,C+I,V,e.S1,0),X(0,C+I,V,K,0)]),g.addSecond(X(0,-e.JL1/2,ne,2*w,E)),g.addSecond(X(0,-e.JL1/2,ne,2*W,E)),g.addSecond(X(0,e.JL1/2,ne,2*w,E)),g.addSecond(X(0,e.JL1/2,ne,2*W,E)),g.addSecond(X(0,0,A,e.JD3,O)),g.addSecond(X(0,0,A,Z,O)),g.addSecond(X(0,0,A,e.JD3,x)),g.addSecond(X(0,0,A,Z,x)),r.mergeFigure(Q.fig.faceBeam,!0),r.addMainOI([P(-C-e.JS1,q,I),P(-C-e.JS1,q,ie)]),r.addMainOI([P(V,T+I,I),P(V,T+I,ie)]),r.addSecond(X(0,T+I,V,e.S1,0)),r.addSecond(X(0,T+I,V,K,0));const fe=T+I-p,Pe=Math.sqrt(V**2+fe**2),we=Math.atan2(fe,V);o.logstr+=`stopper-rod: L ${L(Pe)} mm, A ${L(ae(we))} degree
|
|
76
|
-
`,r.addSecond(X(0,p,Pe,e.S1,we)),r.addSecond(X(0,p,Pe,K,we)),r.addSecond(X(0,te,ne,2*w,E)),r.addSecond(X(0,te,ne,2*W,E)),r.addSecond(P(0,p,e.JD3/2)),r.addSecond(P(0,p,e.JD3/2-e.JE3)),r.addSecond(X(0,F,j,e.JD4,x)),r.addSecond(X(0,F,j,he,x)),u.mergeFigure(r,!0),u.addMainO(P(-C-e.JS1,q,ie)),u.addMainO(P(e.S2-I,T+I,ie)),f.mergeFigure(Q.fig.faceCone,!0),f.mergeFigure(D,!0),f.addMainOI([P(-e.L5/2+I,T+I,I),P(-e.L5/2+I,T+I,ie)]),f.addMainOI([P(e.L5/2-I,T+I,I),P(e.L5/2-I,T+I,ie)]),H.mergeFigure(Q.fig.faceCone,!0),H.mergeFigure(D,!0),H.addSecond(P(-e.L5/2+I,T+I,I)),H.addMainO(P(-e.L5/2+I,T+I,ie)),H.addSecond(P(e.L5/2-I,T+I,I)),H.addMainO(P(e.L5/2-I,T+I,ie)),k.mergeFigure(Q.fig.faceCone,!0),k.mergeFigure(D,!0),k.addMainOI([P(-C-I,0,I),P(-C-I,0,ie)]),k.addMainOI([P(C+I,0,I),P(C+I,0,ie)]),M.mergeFigure(Q.fig.faceCone,!0),M.mergeFigure(D,!0),M.addSecond(P(-C-I,0,I)),M.addMainO(P(-C-I,0,ie)),M.addSecond(P(C+I,0,I)),M.addMainO(P(C+I,0,ie)),b.mergeFigure(Q.fig.faceCone,!0),b.mergeFigure(D),b.addSecond(X(-y,F,j,e.JD4,x)),b.addSecond(X(-y,F,j,he,x)),b.addSecond(X(y,F,j,e.JD4,x)),b.addSecond(X(y,F,j,he,x)),b.addSecond(X(0,p,A,e.JD3,E)),b.addSecond(X(0,p,A,Z,E)),b.addSecond(X(0,p,A,e.JD3,0)),b.addSecond(X(0,p,A,Z,0)),N.mergeFigure(r,!0),N.addMainOI([P(0,p,e.JD3/2),P(0,p,e.JD3/2-e.JE3)]),R.mergeFigure(g,!0),R.addMainOI([P(0,-y,e.JD4/2),P(0,-y,e.JD4/2-e.JE4)]),R.addMainOI([P(0,y,e.JD4/2),P(0,y,e.JD4/2-e.JE4)]),o.fig={faceCone:i,faceBeam:d,faceBeamHollow:c,faceDisc:n,faceHand:l,faceWing:h,faceWingHollow:a,faceDoor:S,faceStopperTop:g,faceStopperSide:r,faceStopperSideH:u,faceStopperFaceT:f,faceStopperFaceTH:H,faceStopperFaceB:k,faceStopperFaceBH:M,faceLowStopperHolder:b,faceHi1StopperHolder:N,faceHi2StopperHolder:R};const ee=o.partName;o.vol={inherits:[{outName:`inpax_${ee}_rake`,subdesign:"pax_rake",subgeom:Q,rotate:[0,0,0],translate:[0,0,0]},{outName:`inpax_${ee}_coneHollow`,subdesign:"subpax_rake_coneHollow",subgeom:Q,rotate:[0,0,0],translate:[0,0,0]},{outName:`inpax_${ee}_beamHollow`,subdesign:"subpax_rake_beamHollow",subgeom:Q,rotate:[0,0,0],translate:[0,0,0]}],extrudes:[{outName:`subpax_${ee}_stpSide`,face:`${ee}_faceStopperSide`,extrudeMethod:U.eLinearOrtho,length:e.L5,rotate:[Math.PI/2,0,0],translate:[0,e.L5/2,0]},{outName:`subpax_${ee}_stpSideH`,face:`${ee}_faceStopperSideH`,extrudeMethod:U.eLinearOrtho,length:e.L5,rotate:[Math.PI/2,0,0],translate:[0,e.L5/2,0]},{outName:`subpax_${ee}_stpFaceT`,face:`${ee}_faceStopperFaceT`,extrudeMethod:U.eLinearOrtho,length:V,rotate:[Math.PI/2,0,Math.PI/2],translate:[0,0,0]},{outName:`subpax_${ee}_stpFaceTH`,face:`${ee}_faceStopperFaceTH`,extrudeMethod:U.eLinearOrtho,length:V,rotate:[Math.PI/2,0,Math.PI/2],translate:[0,0,0]},{outName:`subpax_${ee}_stpFaceB`,face:`${ee}_faceStopperFaceB`,extrudeMethod:U.eLinearOrtho,length:Pe,rotate:[Math.PI/2-we,0,Math.PI/2],translate:[0,0,p]},{outName:`subpax_${ee}_stpFaceBH`,face:`${ee}_faceStopperFaceBH`,extrudeMethod:U.eLinearOrtho,length:Pe,rotate:[Math.PI/2-we,0,Math.PI/2],translate:[0,0,p]},{outName:`subpax_${ee}_lowSH`,face:`${ee}_faceLowStopperHolder`,extrudeMethod:U.eLinearOrtho,length:ne,rotate:[Math.PI/2,0,-Math.PI/2],translate:[0,0,0]},{outName:`subpax_${ee}_Hi1SH1`,face:`${ee}_faceHi1StopperHolder`,extrudeMethod:U.eLinearOrtho,length:A,rotate:[Math.PI/2,0,0],translate:[0,0,0]},{outName:`subpax_${ee}_Hi1SH2`,face:`${ee}_faceHi1StopperHolder`,extrudeMethod:U.eLinearOrtho,length:A,rotate:[Math.PI/2,0,Math.PI],translate:[0,0,0]},{outName:`subpax_${ee}_Hi2SH`,face:`${ee}_faceHi2StopperHolder`,extrudeMethod:U.eLinearOrtho,length:j,rotate:[0,0,0],translate:[0,0,F]}],volumes:[{outName:`ipax_${ee}_plus`,boolMethod:re.eUnion,inList:[`subpax_${ee}_stpSide`,`subpax_${ee}_stpFaceT`,`subpax_${ee}_stpFaceB`,`subpax_${ee}_lowSH`,`subpax_${ee}_Hi1SH1`,`subpax_${ee}_Hi1SH2`,`subpax_${ee}_Hi2SH`]},{outName:`ipax_${ee}_hollow`,boolMethod:re.eUnion,inList:[`inpax_${ee}_coneHollow`,`inpax_${ee}_beamHollow`,`subpax_${ee}_stpSideH`,`subpax_${ee}_stpFaceTH`,`subpax_${ee}_stpFaceBH`]},{outName:`ipax_${ee}_stopper`,boolMethod:re.eSubstraction,inList:[`ipax_${ee}_plus`,`ipax_${ee}_hollow`]},{outName:`pax_${ee}`,boolMethod:re.eUnion,inList:[`inpax_${ee}_rake`,`ipax_${ee}_stopper`]}]},o.sub={},o.logstr+=`heliostat-rake drawn successfully!
|
|
77
|
-
`,o.calcErr=!1}catch(v){o.logstr+=v,console.log(v)}return o}var We={pTitle:"Heliostat rake with stopper",pDescription:"The rake-stopper on top of the V-Axis of the heliostat",pDef:gt,pGeom:oo},Ye={partName:"heliostat_2",params:[t("H1","mm",3e3,10,4e4,1),t("H2","mm",2500,50,4e4,1),t("D1","mm",1e3,20,4e3,1),t("D2","mm",700,20,4e3,1),t("E1","mm",30,1,80,1),z("rake"),t("H3","mm",200,1,500,1),t("H4","mm",800,1,4e3,1),t("H5","mm",3e3,50,6e3,1),t("H6","mm",200,1,4e3,1),t("H7","mm",400,1,4e3,1),t("D3","mm",900,20,4e3,1),t("D4","mm",400,20,4e3,1),t("D5","mm",300,20,1e3,1),t("D6","mm",200,10,1e3,1),t("D7","mm",400,10,1e3,1),z("rake diagonal"),t("D9","mm",100,1,1e3,1),t("L7","mm",100,1,1e3,1),t("L8","mm",200,1,1e3,1),z("rake stopper"),t("S1","mm",100,1,800,1),z("swing"),t("L1","mm",12500,100,4e4,1),t("L2","mm",6e3,100,4e4,1),t("L3","mm",100,1,500,1),t("L4","mm",600,1,4e3,1),t("L5","mm",2e3,10,6e3,1),t("L6","mm",2e3,1,6e3,1),t("H9","mm",100,1,400,1),t("S2","mm",10,0,2e3,1),z("motion amplitude"),t("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 so(s,e,_=""){const o=_e(Ye.partName+_),i=B(),d=B(),c=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
78
|
-
`;try{const n=e.H1+e.H2-e.H3+e.H4+e.H5-e.H6+e.H7;o.logstr+=`heliostat-height: ${L(n)}, diameter ${L(e.D1)} m
|
|
79
|
-
`,o.logstr+=`heliostat-swing-length: ${L(e.L1)}, width ${L(e.L2)} m
|
|
80
|
-
`;const l=e.al*s/Ye.sim.tMax,h=ve(l);o.logstr+=`swing position angle: ${L(ae(h))} degree
|
|
81
|
-
`;const a=e.H1+e.H2-e.H3,S=a+e.H4+e.H5-e.H6+e.H7,g=Le(Ne.pDef),r=Le(We.pDef),u=Le(Ie.pDef);g.setVal("H1",e.H1),g.setVal("H2",e.H2),g.setVal("D1",e.D1),g.setVal("D2",e.D2),g.setVal("D3",e.D1-6*e.E1),g.setVal("E1",e.E1),g.setVal("E2",e.E1);const f=32,H=(e.D1-6*e.E1)/(f*4);g.setVal("N1",f),g.setVal("D5",H),g.setVal("L1",e.E1+H/2),g.setVal("H3",e.H1/4),g.setVal("H4",e.H1/2),g.setVal("D4",e.H1/4),g.setVal("L2",e.H1/80),g.setVal("E3",e.H1/80),g.setVal("holders",0),r.setVal("H1",e.H4),r.setVal("H2",e.H5),r.setVal("H3",e.H4-2*e.E1),r.setVal("D1",e.D3),r.setVal("D2",e.D4),r.setVal("L9",e.D3/2),r.setVal("H7",e.D3/2*1.6),r.setVal("H6",e.D3/20),r.setVal("R9",e.D3/20),r.setVal("E1",e.E1),r.setVal("E3",e.E1),r.setVal("E4",e.E1),r.setVal("E6",e.E1),r.setVal("E7",e.E1);const k=e.D2*.6,M=24,D=k/(M*4);if(r.setVal("D3",k),e.D2>e.D3-2*e.E1)throw`err153: D2 ${e.D2} too large compare to D3 ${e.D3} and E1 ${e.E1}`;if(r.setVal("N1",M),r.setVal("D7",D),r.setVal("L1",D),r.setVal("H4",e.H6),r.setVal("D4",e.D5),r.setVal("L7",e.L7),r.setVal("L8",e.L8),r.setVal("D6",e.D9),r.setVal("H5",e.H7),r.setVal("D5",e.D6),r.setVal("D8",e.D7),e.D6>=e.D7)throw`err164: D6 ${e.D6} too large compare to D7 ${e.D7}`;const b=e.L4-2*e.L3;if(r.setVal("L4",b),b<=0)throw`err169: L3 ${e.L3} too large compare to L4 ${e.L4}`;if(r.setVal("L5",e.L5+2*e.L3),r.setVal("L6",e.L6+2*e.L3),r.setVal("S1",e.S1),r.setVal("S2",e.L2/2),r.setVal("S3",0),r.setVal("S3",0),r.setVal("JD1",e.D3/4),r.setVal("JE1",e.E1),r.setVal("JL1",e.D3/3),r.setVal("JH1",0),r.setVal("JS1",e.S1/2),r.setVal("JS2",e.S1/2),r.setVal("JD3",e.D4/4),r.setVal("JE3",e.E1),r.setVal("JS3",e.D4/4),r.setVal("JD4",e.D4/4),r.setVal("JE4",e.E1),r.setVal("JS4",e.D4/4),u.setVal("L2",e.L2),u.setVal("D1",e.D6),u.setVal("H3",e.H9),u.setVal("H4",e.H9),u.setVal("L1",e.L1),e.L1<4*e.L4+2*e.L6+e.L5+2*e.L3)throw`err185: L1 ${e.L1} too small compare to L4 ${e.L4}, L5 ${e.L5}, L6 ${e.L6}`;u.setVal("H1",e.L3),u.setVal("H2",e.L3),u.setVal("L4",e.L4),u.setVal("L5",e.L5),u.setVal("L6",e.L6),u.setVal("L3",e.D7),u.setVal("S1",e.D6/2),u.setVal("S2",e.S2),u.setVal("R2",0);const N=Ne.pGeom(0,g.getParamVal(),g.getSuffix());He(N),o.logstr+=De(N.logstr,g.getPartNameSuffix());const R=We.pGeom(0,r.getParamVal(),r.getSuffix());He(R),o.logstr+=De(R.logstr,r.getPartNameSuffix());const v=Ie.pGeom(0,u.getParamVal(),u.getSuffix());He(v),o.logstr+=De(v.logstr,u.getPartNameSuffix()),i.mergeFigure(N.fig.poleCut),i.mergeFigure(R.fig.faceStopperSide.translate(0,a)),i.mergeFigure(v.fig.faceSide.translate(0,S).rotate(0,S,h)),d.mergeFigure(N.fig.poleCut),d.mergeFigure(R.fig.faceStopperFaceT.translate(0,a)),d.mergeFigure(v.fig.faceFace.translate(0,S)),c.mergeFigure(N.fig.poleBottom.translate(0,0)),c.mergeFigure(R.fig.faceStopperTop.translate(0,0)),c.mergeFigure(v.fig.faceTop.rotate(0,0,Math.PI/2)),o.fig={faceSide:i,faceFace:d,faceTop:c};const E=o.partName;o.vol={inherits:[{outName:`inpax_${E}_poleStatic`,subdesign:"pax_pole_static",subgeom:N,rotate:[0,0,0],translate:[0,0,0]},{outName:`inpax_${E}_rake`,subdesign:"pax_rake_stopper",subgeom:R,rotate:[0,0,0],translate:[0,0,a]},{outName:`inpax_${E}_swing`,subdesign:"pax_swing",subgeom:v,rotate:[Math.PI/2,0,0],translate:[0,0,S]}],extrudes:[],volumes:[{outName:`pax_${E}`,boolMethod:re.eUnion,inList:[`inpax_${E}_poleStatic`,`inpax_${E}_rake`,`inpax_${E}_swing`]}]};const x=g.getDesignParamList(),O={partName:g.getPartName(),dparam:x,orientation:[0,0,0],position:[0,0,0]},C={partName:r.getPartName(),dparam:r.getDesignParamList(),orientation:[0,0,0],position:[0,0,a]},$={partName:u.getPartName(),dparam:u.getDesignParamList(),orientation:[0,0,0],position:[0,0,S]};o.sub={pole_static_1:O,rake_1:C,swing_1:$},o.logstr+=`heliostat-2-overview drawn successfully!
|
|
82
|
-
`,o.calcErr=!1}catch(n){o.logstr+=n,console.log(n)}return o}var io={pTitle:"Heliostat-2 overview",pDescription:"The heliostat-2 inclination mechanism",pDef:Ye,pGeom:so},ht={partName:"base",params:[t("D1","mm",600,10,4e3,10),t("D2","mm",700,10,4e3,10),t("D3","mm",400,10,4e3,10),t("D4","mm",500,10,4e3,10),t("E1","mm",30,1,80,1),t("E2","mm",30,1,80,1),t("E3","mm",30,1,80,1),t("H1","mm",800,10,4e3,10),t("H2","mm",50,1,4e3,1),z("side holes"),t("H3","mm",400,10,4e3,10),t("N2","",12,1,100,1),t("L2","mm",100,1,400,1),z("base holes"),t("N1","",24,3,100,1),t("D5","mm",40,1,100,1),t("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 no(s,e,_=""){const o=_e(ht.partName+_);let i,d,c;const n=B(),l=B(),h=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
83
|
-
`;try{const a=e.D1/2,S=e.D2/2,g=e.D3/2,r=e.D4/2,u=e.D5/2,f=e.L2/2;if(S<a)throw`err089: D2 ${e.D2} too small compare to D1 ${e.D1}`;if(r>a-e.E2)throw`err189: D4 ${e.D4} too large compare to D1 ${e.D1} and E2 ${e.E2}`;o.logstr+=`base-height: ${L(e.H1)} mm
|
|
84
|
-
`,o.logstr+=`base-external-diameter: ${L(e.D2)} mm
|
|
85
|
-
`;const H=e.D1*Math.PI/e.N2-e.L2;if(o.logstr+=`inter-hollow: ${L(H)} mm
|
|
86
|
-
`,i=function($){return J($*S,0).addSegStrokeA($*S,e.E3).addSegStrokeA($*a,e.E3).addSegStrokeA($*a,e.H1).addSegStrokeA($*(a-e.E2),e.H1).addSegStrokeA($*(a-e.E2),e.E3).addSegStrokeA($*r,e.E3).addSegStrokeA($*r,0).closeSegStroke()},d=function($){return J($*S,0).addSegStrokeA($*S,e.E3).addSegStrokeA($*a,e.E3).addSegStrokeA($*a,e.H1).addSegStrokeA($*g,e.H1).addSegStrokeA($*g,e.H1-e.E1).addSegStrokeA($*(a-e.E2),e.H1-e.E1).addSegStrokeA($*(a-e.E2),e.E3).addSegStrokeA($*r,e.E3).addSegStrokeA($*r,0).closeSegStroke()},e.H1<e.E3+e.H2+e.H3+e.E1)throw`err125: H1 ${e.H1} too small compare to E3 ${e.H3}, H2 ${e.H2}, H3 ${e.H3}, E1 ${e.E1}`;if(e.D5>e.H3)throw`err128: D5 ${e.D5} too large compare to H3 ${e.H3}`;const k=2*Math.asin(f/(a-e.E2));if(e.N2*k>2*Math.PI)throw`err132: N2 ${e.N2} too large compare to L2 ${e.L2}, D1 ${e.D1}, E2 ${e.E2}`;const M=e.E3+e.H2+f;c=function($){return J($*f,M).addSegStrokeA($*f,M+e.H3-e.L2).addPointA(-$*f,M+e.H3-e.L2).addSegArc(f,!1,!0).addSegStrokeA(-$*f,M).closeSegArc(f,!1,!0)},n.addMainO(i(1)),n.addSecond(d(1)),n.addSecond(d(-1)),n.addSecond(c(1));const D=[];if(g+e.L1+u>a-e.E2)throw`err127: D3 ${e.D3} too large compare to D1 ${e.D1}, E2 ${e.E2}, L1 ${e.L1}, R5 ${e.D5}`;if(u>e.L1)throw`err130: D5 ${e.D5} too large compare to L1 ${e.L1}`;const b=2*Math.asin(u/(S+e.L1));if(e.N1*b>2*Math.PI)throw`err134: N1 ${e.N1} too large compare to D5 ${e.D5}, L1 ${e.L1}, D2 ${e.D2}`;D.push(P(0,0,a)),D.push(P(0,0,g));const N=g+e.L1,R=2*Math.PI/e.N1;for(let $=0;$<e.N1;$++){const m=N*Math.cos($*R),q=N*Math.sin($*R);D.push(P(m,q,u))}l.addMainOI(D),l.addSecond(P(0,0,a-e.E1)),l.addSecond(P(0,0,S)),l.addSecond(P(0,0,r)),h.addMainO(c(1)),h.addSecond(d(1)),h.addSecond(d(-1)),o.fig={faceCut:n,faceTop:l,faceHollow:h};const v=o.partName,E=2*Math.PI/e.N2,x=[...Array(e.N2).keys()],O=x.map($=>({outName:`subpax_${v}_hollow_${$}`,face:`${v}_faceHollow`,extrudeMethod:U.eLinearOrtho,length:S+e.E2,rotate:[Math.PI/2,0,$*E],translate:[0,0,0]})),C=x.map($=>`subpax_${v}_hollow_${$}`);o.vol={extrudes:[{outName:`subpax_${v}_cut`,face:`${v}_faceCut`,extrudeMethod:U.eRotate,rotate:[0,0,0],translate:[Math.PI/2,0,0]},{outName:`subpax_${v}_top`,face:`${v}_faceTop`,extrudeMethod:U.eLinearOrtho,length:e.E1,rotate:[0,0,0],translate:[0,0,e.H1-e.E1]},...O],volumes:[{outName:`ipax_${v}_hollows`,boolMethod:re.eUnion,inList:[...C]},{outName:`ipax_${v}_cylinder`,boolMethod:re.eSubstraction,inList:[`subpax_${v}_cut`,`ipax_${v}_hollows`]},{outName:`pax_${v}`,boolMethod:re.eUnion,inList:[`ipax_${v}_cylinder`,`subpax_${v}_top`]}]},o.sub={},o.logstr+=`heliostat-base drawn successfully!
|
|
87
|
-
`,o.calcErr=!1}catch(a){o.logstr+=a,console.log(a)}return o}var co={pTitle:"Heliostat base",pDescription:"The base for the static-pole of the heliostat",pDef:ht,pGeom:no},at={partName:"vaxis",params:[t("D1","mm",600,1,4e3,1),t("D2","mm",400,1,4e3,1),t("H1","mm",8e3,10,4e4,10),t("E1","mm",5,1,80,1),t("E2","mm",30,1,80,1),z("base holes"),t("N1","",24,3,100,1),t("D3","mm",40,1,100,1),t("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 ro(s,e,_=""){const o=_e(at.partName+_);let i;const d=B(),c=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
88
|
-
`;try{const n=e.D1/2,l=e.D2/2,h=e.D3/2;o.logstr+=`vaxis-height: ${L(e.H1)} mm
|
|
89
|
-
`;const a=J(n,0).addSegStrokeA(n,e.H1).addSegStrokeA(n-e.E1,e.H1).addSegStrokeA(n-e.E1,0).closeSegStroke();d.addMainO(a),i=function(f){return J(f*n,0).addSegStrokeA(f*n,e.H1).addSegStrokeA(f*l,e.H1).addSegStrokeA(f*l,e.H1-e.E2).addSegStrokeA(f*(n-e.E1),e.H1-e.E2).addSegStrokeA(f*(n-e.E1),e.E2).addSegStrokeA(f*l,e.E2).addSegStrokeA(f*l,0).closeSegStroke()},d.addSecond(i(1)),d.addSecond(i(-1));const S=[];S.push(P(0,0,n)),S.push(P(0,0,l));const g=l+e.L1,r=2*Math.PI/e.N1;for(let f=0;f<e.N1;f++){const H=g*Math.cos(f*r),k=g*Math.sin(f*r);S.push(P(H,k,h))}c.addSecond(P(0,0,n-e.E1)),c.addMainOI(S),o.fig={faceCut:d,faceBottom:c};const u=o.partName;o.vol={extrudes:[{outName:`subpax_${u}_pole`,face:`${u}_faceCut`,extrudeMethod:U.eRotate,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${u}_bottom`,face:`${u}_faceBottom`,extrudeMethod:U.eLinearOrtho,length:e.E2,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${u}_top`,face:`${u}_faceBottom`,extrudeMethod:U.eLinearOrtho,length:e.E2,rotate:[0,0,0],translate:[0,0,e.H1-e.E2]}],volumes:[{outName:`pax_${u}`,boolMethod:re.eUnion,inList:[`subpax_${u}_pole`,`subpax_${u}_bottom`,`subpax_${u}_top`]}]},o.sub={},o.logstr+=`V-Axis drawn successfully!
|
|
90
|
-
`,o.calcErr=!1}catch(n){o.logstr+=n,console.log(n)}return o}var lo={pTitle:"Heliostat V-Axis",pDescription:"The vertical axis inside the pole of an heliostat",pDef:at,pGeom:ro},ut={partName:"ring",params:[t("D1","mm",400,1,2e3,1),t("D3","mm",800,1,4e3,1),t("H1","mm",20,1,100,1),t("H2","mm",100,1,600,1),z("ring holes"),t("N2","",24,3,100,1),t("D2","mm",40,1,100,1),t("L1","mm",45,1,300,1),z("ring fake teeth"),t("N1","",100,3,1e4,1),t("L2","mm",30,1,200,1),t("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 go(s,e,_=""){const o=_e(ut.partName+_),i=B(),d=B(),c=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
91
|
-
`;try{const n=e.D1/2,l=e.D2/2,h=e.D3/2,a=e.H1+e.H2;if(e.L1<l)throw`err203: L1 ${e.L1} too small compare to D2 ${e.D2}`;if(n+e.L1+l>h-e.L2-e.L3)throw`err204: D3 ${e.D3} too small compare to D1 ${e.D1}, L1 ${e.L1}, L2 ${e.L2}, L3 ${e.L3}`;if(2*Math.atan2(l,n+e.L1)>2*Math.PI/e.N2)throw`err205: D2 ${e.D2} too large compare to N2 ${e.N2}`;o.logstr+=`ring-height: ${L(a)} mm
|
|
92
|
-
`;const S=h-e.L3,g=S-e.L2,r=2*Math.PI/(2*e.N1),u=J(S,0);for(let E=0;E<e.N1;E++){const x=2*E+1,O=2*E+2,C=g*Math.cos(x*r),$=g*Math.sin(x*r),m=S*Math.cos(O*r),q=S*Math.sin(O*r);u.addSegStrokeA(C,$).addSegStrokeA(m,q)}const f=[];f.push(P(0,0,h)),f.push(P(0,0,n));const H=n+e.L1,k=2*Math.PI/e.N2;for(let E=0;E<e.N2;E++){const x=H*Math.cos(E*k),O=H*Math.sin(E*k);f.push(P(x,O,l)),d.addSecond(P(x,O,l))}i.addSecond(u),i.addMainOI(f);const M=[];M.push(P(0,0,h)),M.push(u),d.addSecond(P(0,0,n)),d.addMainOI(M);const D=J(n,0).addSegStrokeA(-n,0).addSegStrokeA(-n,-e.H1).addSegStrokeA(n,-e.H1).closeSegStroke(),b=function(E){return J(E*(n+e.L1)+l,0).addSegStrokeR(-2*l,0).addSegStrokeR(0,-e.H1).addSegStrokeR(2*l,0).closeSegStroke()},N=function(E){return J(E*(h-e.L3),-e.H1).addSegStrokeR(-E*e.L2,0).addSegStrokeR(0,-e.H2).addSegStrokeR(E*e.L2,0).closeSegStroke()},R=function(E){return J(E*h,0).addSegStrokeR(-E*(h-n),0).addSegStrokeR(0,-e.H1).addSegStrokeR(E*(h-e.L2-e.L3-n),0).addSegStrokeR(0,-e.H2).addSegStrokeR(E*(e.L2+e.L3),0).closeSegStroke()};c.addSecond(D),c.addSecond(b(1)),c.addSecond(b(-1)),c.addSecond(N(1)),c.addSecond(N(-1)),c.addMainO(R(1)),c.addSecond(R(-1)),o.fig={faceRingBase:i,faceRingTeeth:d,faceSection:c};const v=o.partName;o.vol={extrudes:[{outName:`subpax_${v}_base`,face:`${v}_faceRingBase`,extrudeMethod:U.eLinearOrtho,length:e.H1,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${v}_teeth`,face:`${v}_faceRingTeeth`,extrudeMethod:U.eLinearOrtho,length:a,rotate:[0,0,0],translate:[0,0,0]}],volumes:[{outName:`pax_${v}`,boolMethod:re.eUnion,inList:[`subpax_${v}_base`,`subpax_${v}_teeth`]}]},o.sub={},o.logstr+=`ring drawn successfully!
|
|
93
|
-
`,o.calcErr=!1}catch(n){o.logstr+=n,console.log(n)}return o}var ho={pTitle:"Heliostat ring",pDescription:"The gear ring for adjusting the azimuth of the heliostat",pDef:ut,pGeom:go},_t={partName:"ring_guidance",params:[t("D1","mm",700,5,2500,1),t("N1","legs",6,1,24,1),t("D2","mm",600,5,2e3,1),z("leg details"),t("D3","mm",30,1,200,1),t("D4","mm",50,1,200,1),t("L1","mm",90,1,900,1),t("R5","mm",20,0,500,1),z("inner"),t("D6","mm",300,1,1e3,1),t("N2","motors",8,1,200,1),t("L2","mm",50,1,200,1),t("D7","mm",80,1,200,1),z("thickness"),t("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 ao(s,e,_=""){const o=_e(_t.partName+_),i=B(),d=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
94
|
-
`;try{const c=e.D1/2,n=e.D3/2,l=e.D4/2,h=e.D6/2,a=e.D7/2,S=2*Math.PI/e.N2;if(a>e.L2)throw`err461: D7 ${e.D7} is too large compare to L2 ${e.L2}`;if(e.N2*e.D7>(e.D6+2*e.L2)*Math.PI)throw`err462: N2 ${e.N2} is too large compare to D6 ${e.D6}, D7 ${e.D7} and L2 ${e.L2}`;if(e.D2<e.D6+2*e.L2+2*a)throw`err463: D2 ${e.D2} is too small compare to D6 ${e.D6}, L2 ${e.L2} and D7 ${e.D7}`;o.logstr+=`ring_guidance: Dmax ${L(e.D1+2*l)} mm
|
|
95
|
-
`;const g=[],[r,u,f]=nt(e);o.logstr+=r,g.push(u),g.push(P(0,0,h));for(let b=0;b<e.N2;b++)g.push(P(h+e.L2,0,a).rotate(0,0,b*S));for(let b=0;b<e.N1;b++)g.push(P(c,0,n).rotate(0,0,b*f));i.addMainOI(g);const H=function(b,N,R,v){return J(b,N).addSegStrokeR(R,0).addSegStrokeR(0,v).addSegStrokeR(-R,0).closeSegStroke()},k=c-h+l;d.addMainO(H(h,0,k,e.T1)),d.addMainO(H(-h-k,0,k,e.T1)),d.addSecond(H(c-n,0,2*n,e.T1)),d.addSecond(H(-c-n,0,2*n,e.T1));const M=h+e.L2;d.addSecond(H(M-a,0,2*a,e.T1)),d.addSecond(H(-M-a,0,2*a,e.T1)),o.fig={faceTop:i,faceSection:d};const D=o.partName;o.vol={extrudes:[{outName:`subpax_${D}_top`,face:`${D}_faceTop`,extrudeMethod:U.eLinearOrtho,length:e.T1,rotate:[0,0,0],translate:[0,0,0]}],volumes:[{outName:`pax_${D}`,boolMethod:re.eIdentity,inList:[`subpax_${D}_top`]}]},o.sub={},o.logstr+=`ring_guidance drawn successfully!
|
|
96
|
-
`,o.calcErr=!1}catch(c){o.logstr+=c,console.log(c)}return o}var uo={pTitle:"Ring-guidance",pDescription:"The guidance of the gear-ring for the heliostat azimuth",pDef:_t,pGeom:ao},St={partName:"vaxis_guidance",params:[t("D1","mm",700,5,2500,1),t("N1","legs",6,1,24,1),t("D2","mm",600,5,2e3,1),z("leg details"),t("D3","mm",30,1,200,1),t("D4","mm",50,1,200,1),t("L1","mm",90,1,900,1),t("R5","mm",20,0,500,1),z("inner"),t("D6","mm",540,1,1e3,1),t("N2","springs",6,1,24,1),$e("orientation",["ccw","cw","alt"]),t("R7","mm",10,0,100,1),t("L2","mm",100,1,900,1),t("E2","mm",20,1,200,1),z("spring"),t("SA1","degree",0,-45,45,1),t("SE1","mm",10,.1,200,.1),t("SD1","mm",20,1,200,1),t("SD2","mm",10,1,200,1),t("SN1","loops",2,0,8,1),t("SL1","mm",40,1,900,1),t("SL2","mm",70,0,900,1),$e("Send",["round","pike"]),z("thickness"),t("T1","mm",10,1,200,1),t("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 _o(s,e,_=""){const o=_e(St.partName+_),i=B(),d=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
97
|
-
`;try{const c=e.D1/2,n=e.D2/2,l=e.D3/2,h=e.D4/2,a=e.D6/2;if(n<a)throw`err466: D6 ${e.D6} is too large compare to D2 ${e.D2}`;o.logstr+=`vaxis_guidance: Dmax ${L(e.D1+2*h)} mm
|
|
98
|
-
`;const S=[],[g,r,u]=nt(e);o.logstr+=g,S.push(r);for(let D=0;D<e.N1;D++)S.push(P(c,0,l).rotate(0,0,D*u));const[f,H]=Yt(e);o.logstr+=f,S.push(H),i.addSecond(P(0,0,e.Dvaxis/2)),i.addMainOI(S);const k=c-a+h;d.addMainO(ge(a,0,k,e.T1)),d.addMainO(ge(-a-k,0,k,e.T1)),d.addSecond(ge(c-l,0,2*l,e.T1)),d.addSecond(ge(-c-l,0,2*l,e.T1)),o.fig={faceTop:i,faceSection:d};const M=o.partName;o.vol={extrudes:[{outName:`subpax_${M}_top`,face:`${M}_faceTop`,extrudeMethod:U.eLinearOrtho,length:e.T1,rotate:[0,0,0],translate:[0,0,0]}],volumes:[{outName:`pax_${M}`,boolMethod:re.eIdentity,inList:[`subpax_${M}_top`]}]},o.sub={},o.logstr+=`vaxis_guidance drawn successfully!
|
|
99
|
-
`,o.calcErr=!1}catch(c){o.logstr+=c,console.log(c)}return o}var So={pTitle:"Vaxis-guidance",pDescription:"The guidance of the V-Axis for the heliostat azimuth",pDef:St,pGeom:_o},ft={partName:"haxis_guidance",params:[t("D5","mm",600,1,2e3,1),t("D8","mm",1e3,1,2e3,1),z("outer details"),t("E5","mm",1,0,200,1),t("E8","mm",20,1,200,1),t("L5","mm",20,1,200,1),t("R9","mm",20,0,500,1),z("inner spring"),t("SA1","degree",0,-45,45,1),t("SE1","mm",2,.1,100,.1),t("SD1","mm",20,1,200,1),t("SD2","mm",10,1,200,1),t("SN1","springs",7,1,24,1),t("SL1","mm",60,0,500,1),t("SL2","mm",100,0,500,1),$e("Send",["round","pike"]),z("thickness"),t("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 fo(s,e,_=""){const o=_e(ft.partName+_),i=B(),d=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
100
|
-
`;try{const c=e.D5/2,n=e.D8/2,l=e.SD1/2,h=c+e.E5,a=n-e.E8,S=2*Math.asin(e.L5/(2*h)),g=Math.PI/12+ve(e.SA1),r=Math.PI/2+S-g,u=Math.PI-g,f=Math.PI/2-Math.PI/6+g;if(h+l+e.SE1>a)throw`err411: D8 ${e.D8} is too small compare to D5 ${e.D5}, E5 ${e.E5}, E8 ${e.E8}`;if(2*Math.PI/3-2*S<e.R9/a)throw`err412: L5 ${e.L5} is too large compare to R9 ${e.R9}`;o.logstr+=`haxis_guidance: Dinner ${L(2*h)} mm
|
|
101
|
-
`,i.addSecond(P(0,0,c)),i.addSecond(P(0,0,n));const[H,k]=Te(e,!1),[,M]=Te(e,!0);o.logstr+=H;const D=Math.PI/2-S,b=-Math.PI/6+S,N=le(0,0),R=N.translatePolar(D,h+e.SE1+l),v=R.translatePolar(D-Math.PI/2,l),E=v.translatePolar(D+Math.PI,l+e.SE1),x=v.translatePolar(D+Math.PI,l),O=E.rotate(v,r),C=N.translatePolar(b,h+e.SE1+l),$=C.translatePolar(b+Math.PI/2,l),m=$.translatePolar(b+Math.PI,l+e.SE1),q=$.translatePolar(b+Math.PI,l),F=q.rotate($,-r),T=J(0,h).addSegStrokeA(E.cx,E.cy).addPointA(O.cx,O.cy).addSegArc(l+e.SE1,!1,!0);T.addPartial(k.rotate(0,0,u).translate(O.cx,O.cy)),T.addPointA(x.cx,x.cy).addPointA(R.cx,R.cy).addSegArc2().addSegStrokeAP(D,a).addCornerRounded(e.R9).addPointAP(b,a).addSegArc(a,!1,!1).addCornerRounded(e.R9).addSegStrokeA(C.cx,C.cy).addPointA(q.cx,q.cy).addPointA(F.cx,F.cy).addSegArc2(),T.addPartial(M.rotate(0,0,f).translate(F.cx,F.cy)),T.addPointA(m.cx,m.cy).addSegArc(l+e.SE1,!1,!0).addSegStrokeAP(-Math.PI/6,h).addSegStrokeAP(-Math.PI/6,n).addPointAP(Math.PI/2,n).addSegArc(n,!1,!0).closeSegStroke(),i.addMainO(T);const p=n*Math.sin(Math.PI/6);d.addMainO(ge(0,-p,e.L4,n+p)),d.addSecond(ge(0,-n,e.L4,2*n)),d.addSecond(ge(0,-c,e.L4,2*c)),o.fig={faceProfile:i,faceSide:d};const Y=o.partName;o.vol={extrudes:[{outName:`subpax_${Y}_profile`,face:`${Y}_faceProfile`,extrudeMethod:U.eLinearOrtho,length:e.L4,rotate:[0,0,0],translate:[0,0,0]}],volumes:[{outName:`pax_${Y}`,boolMethod:re.eIdentity,inList:[`subpax_${Y}_profile`]}]},o.sub={},o.logstr+=`haxis_guidance drawn successfully!
|
|
102
|
-
`,o.calcErr=!1}catch(c){o.logstr+=c,console.log(c)}return o}var Lo={pTitle:"Haxis-guidance",pDescription:"The guidance of the H-Axis for the heliostat inclination",pDef:ft,pGeom:fo},Lt={partName:"rod",params:[t("L1","mm",1e4,100,4e4,10),t("L2","mm",100,2,400,1),t("L3","mm",400,10,1e3,1),t("L4","mm",600,10,1e3,1),t("N1","",10,2,50,1),z("section"),t("H1","mm",200,5,4e3,1),t("E1","mm",2,1,80,1),t("E2","mm",10,1,80,1),z("pad"),t("N3","",2,1,20,1),t("N4","",4,1,20,1),t("R3","mm",100,1,500,1),t("D2","mm",10,1,100,1),t("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 Ho(s,e,_=""){const o=_e(Lt.partName+_),i=B(),d=B(),c=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
103
|
-
`;try{const n=e.D2/2,l=e.L3/(e.N3+1),h=e.L4/(e.N4+1);o.logstr+=`rod-length: ${L(e.L1)} mm
|
|
104
|
-
`;const a=(e.L1-e.L3)/(e.N1-1);o.logstr+=`space-length: ${L(a)} mm
|
|
105
|
-
`;const S=function(v){const E=[],x=J(e.L4/2,v).addCornerRounded(e.R3).addSegStrokeA(e.L4/2,v+e.L3).addCornerRounded(e.R3).addSegStrokeA(-e.L4/2,v+e.L3).addCornerRounded(e.R3).addSegStrokeA(-e.L4/2,v).addCornerRounded(e.R3).closeSegStroke();E.push(x);for(let O=1;O<e.N3+1;O++)E.push(P(e.L4/2-e.L7,v+O*l,n)),E.push(P(-e.L4/2+e.L7,v+O*l,n));for(let O=1;O<e.N4+1;O++)E.push(P(-e.L4/2+O*h,v+e.L7,n)),E.push(P(-e.L4/2+O*h,v+e.L3-e.L7,n));return E},g=function(v,E){return J(e.L2/2,v).addSegStrokeA(e.L2/2,v+E).addSegStrokeA(-e.L2/2,v+E).addSegStrokeA(-e.L2/2,v).closeSegStroke()},r=[],u=e.L2/2,f=e.L4/2,H=(e.L2-2*e.E1)/2,k=e.H1-e.E1,M=J(u,0).addSegStrokeA(u,e.H1).addSegStrokeA(-u,e.H1).addSegStrokeA(-u,0).closeSegStroke(),D=J(H,e.E1).addSegStrokeA(H,k).addSegStrokeA(-H,k).addSegStrokeA(-H,e.E1).closeSegStroke(),b=J(f,e.H1).addSegStrokeA(f,e.H1+e.E2).addSegStrokeA(-f,e.H1+e.E2).addSegStrokeA(-f,e.H1).closeSegStroke();r.push(M),r.push(D),i.addSecond(b),i.addMainOI(r),d.addMainOI(S(0)),d.addSecond(g(-e.L3/2,2*e.L3));const N=(e.L1-e.L3)/(e.N1-1);for(let v=0;v<e.N1;v++)c.addMainOI(S(v*N));c.addSecond(g(0,e.L1)),o.fig={faceCut:i,facePlate:d,faceTop:c};const R=o.partName;o.vol={extrudes:[{outName:`subpax_${R}_rod`,face:`${R}_faceCut`,extrudeMethod:U.eLinearOrtho,length:e.L1,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${R}_plates`,face:`${R}_faceTop`,extrudeMethod:U.eLinearOrtho,length:e.E2,rotate:[Math.PI/2,0,0],translate:[0,e.E2+e.H1,0]}],volumes:[{outName:`pax_${R}`,boolMethod:re.eUnion,inList:[`subpax_${R}_rod`,`subpax_${R}_plates`]}]},o.sub={},o.logstr+=`heliostat-rod drawn successfully!
|
|
106
|
-
`,o.calcErr=!1}catch(n){o.logstr+=n,console.log(n)}return o}var Do={pTitle:"Heliostat rod",pDescription:"The rod of an heliostat-surface",pDef:Lt,pGeom:Ho},Ht={partName:"trapeze",params:[t("L1","mm",1600,10,4e3,1),t("L2","mm",1e3,10,4e3,1),t("L3","mm",400,5,800,1),t("L4","mm",300,5,800,1),z("outer frame"),t("N1","",7,1,20,1),t("N2","",4,1,20,1),t("D1","mm",10,1,40,1),t("L5","mm",100,1,400,1),t("L6","mm",20,1,400,1),t("R1","mm",60,1,400,1),t("R2","mm",20,1,400,1),z("inner pad"),t("N3","",2,1,20,1),t("N4","",2,1,20,1),t("D2","mm",10,1,40,1),t("L7","mm",20,1,400,1),t("R3","mm",20,1,400,1),z("diagonal shaft"),t("D3","mm",30,1,100,1),t("D4","mm",26,1,100,1),t("H1","mm",300,.5,800,.5),t("H2","mm",2,.5,800,.5),t("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 Po(s,e,_=""){const o=_e(Ht.partName+_);let i,d;const c=B(),n=B(),l=B(),h=B(),a=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
107
|
-
`;try{if(e.L3>e.L1-e.L5)throw`err595: L3 ${e.L3} too large compare to L1 ${e.L1} and L5 ${e.L5}`;if(e.L4>e.L2-e.L5)throw`err596: L4 ${e.L4} too large compare to L2 ${e.L2} and L5 ${e.L5}`;if(e.H1-e.H2-e.H3<4*e.D3)throw`err597: H1 ${e.H1} too small compare to H2 ${e.H2}, H3 ${e.H3} and D3 ${e.D3}`;const S=e.R1*(1-1/Math.sqrt(2)),g=e.R3*(1-1/Math.sqrt(2)),r=e.L2/2-S-(e.L4/2-g),u=e.L1/2-S-(e.L3/2-g),f=Math.sqrt(r**2+u**2),H=e.H1-e.H2-e.H3,k=Math.sqrt(f**2+H**2),M=Math.atan2(H,f),D=Math.atan2(u,r);o.logstr+=`rod-slope: length: ${L(k)} mm, angle: ${L(ae(M))} degree
|
|
108
|
-
`,o.logstr+=`rod-xy-angle: ${L(ae(D))} degree
|
|
109
|
-
`;const b=e.D3/Math.cos(Math.PI/2-M);o.logstr+=`rod-footprint-length: ${L(b)} mm
|
|
110
|
-
`;const N=Math.sqrt((b/2)**2+(e.D3/2)**2),R=Math.atan2(e.D3,b);i=function(A,Z,j){return J(A,Z).addPointRP(j+Math.PI-R,N).addSeg2Arcs(j+Math.PI/2,j).addPointRP(j+Math.PI+R,N).addSeg2Arcs(j+Math.PI,j+Math.PI/2).addPointRP(j-R,N).addSeg2Arcs(j+3*Math.PI/2,j+Math.PI).addPointRP(j+R,N).addSeg2Arcs(j,j-Math.PI/2)},d=function(A,Z,j){const he=A+N*Math.cos(j+Math.PI-R),ce=Z+N*Math.sin(j+Math.PI-R);return J(he,ce).addSegStrokeRP(j+Math.PI,f).addSegStrokeRP(j-Math.PI/2,e.D3).addSegStrokeRP(j,f).closeSegStroke()};const v=[];if(e.R1>e.L1/4||e.R1>e.L2/4)throw`err614: R1 ${e.R1} too large compare to L1 ${e.L1} or L2 ${e.L2}`;const E=J(e.L2/2,e.L1/2).addSegStrokeA(-e.L2/2,e.L1/2).addCornerRounded(e.R1).addSegStrokeA(-e.L2/2,-e.L1/2).addCornerRounded(e.R1).addSegStrokeA(e.L2/2,-e.L1/2).addCornerRounded(e.R1).closeSegStroke().addCornerRounded(e.R1);if(e.R2>(e.L1-2*e.L5)/4||e.R2>(e.L2-2*e.L5)/4)throw`err627: R2 ${e.R2} too large compare to L1 ${e.L1}, L2 ${e.L2} and L5 ${e.L5}`;const x=J(e.L2/2-e.L5,e.L1/2-e.L5).addSegStrokeA(-e.L2/2+e.L5,e.L1/2-e.L5).addCornerRounded(e.R2).addSegStrokeA(-e.L2/2+e.L5,-e.L1/2+e.L5).addCornerRounded(e.R2).addSegStrokeA(e.L2/2-e.L5,-e.L1/2+e.L5).addCornerRounded(e.R2).closeSegStroke().addCornerRounded(e.R2);if(e.R3>e.L3/4||e.R3>e.L4/4)throw`err639: R3 ${e.R3} too large compare to L3 ${e.L3} or L4 ${e.L4}`;const O=J(e.L4/2,e.L3/2).addSegStrokeA(-e.L4/2,e.L3/2).addCornerRounded(e.R3).addSegStrokeA(-e.L4/2,-e.L3/2).addCornerRounded(e.R3).addSegStrokeA(e.L4/2,-e.L3/2).addCornerRounded(e.R3).closeSegStroke().addCornerRounded(e.R3);v.push(E),v.push(x),c.addSecond(O);const C=e.L1/(e.N1+1),$=e.L2/(e.N2+1),m=e.L3/(e.N3+1),q=e.L4/(e.N4+1);if(e.L5<e.D1/2+e.L6)throw`err658: L5 ${e.L5} too small compare to D1 ${e.D1} or L6 ${e.L6}`;if(m<e.D2/2+e.L7)throw`err661: D2 ${e.D2} or L7 ${e.L7} too large compare to L3 ${e.l3}`;if(q<e.D2/2+e.L7)throw`err664: D2 ${e.D2} or L7 ${e.L7} too large compare to L4 ${e.l4}`;const F=[];for(let A=1;A<e.N1+1;A++)F.push(P(e.L2/2-e.L6,-e.L1/2+A*C,e.D1/2)),F.push(P(-e.L2/2+e.L6,-e.L1/2+A*C,e.D1/2));for(let A=1;A<e.N2+1;A++)F.push(P(-e.L2/2+A*$,e.L1/2-e.L6,e.D1/2)),F.push(P(-e.L2/2+A*$,-e.L1/2+e.L6,e.D1/2));const T=[];for(let A=1;A<e.N3+1;A++)T.push(P(e.L4/2-e.L7,-e.L3/2+A*m,e.D2/2)),T.push(P(-e.L4/2+e.L7,-e.L3/2+A*m,e.D2/2));for(let A=1;A<e.N4+1;A++)T.push(P(-e.L4/2+A*q,e.L3/2-e.L7,e.D2/2)),T.push(P(-e.L4/2+A*q,-e.L3/2+e.L7,e.D2/2));F.forEach(A=>{v.push(A)}),T.forEach(A=>{c.addSecond(A)}),c.addMainOI(v);const p=[];p.push(i(e.L2/2-S,e.L1/2-S,D)),p.push(i(e.L4/2-g,e.L3/2-g,D)),p.push(i(-e.L2/2+S,e.L1/2-S,Math.PI-D)),p.push(i(-e.L4/2+g,e.L3/2-g,Math.PI-D)),p.push(i(-e.L2/2+S,-e.L1/2+S,Math.PI+D)),p.push(i(-e.L4/2+g,-e.L3/2+g,Math.PI+D)),p.push(i(e.L2/2-S,-e.L1/2+S,-D)),p.push(i(e.L4/2-g,-e.L3/2+g,-D));const Y=[];Y.push(d(e.L2/2-S,e.L1/2-S,D)),Y.push(d(-e.L2/2+S,e.L1/2-S,Math.PI-D)),Y.push(d(-e.L2/2+S,-e.L1/2+S,Math.PI+D)),Y.push(d(e.L2/2-S,-e.L1/2+S,-D)),p.forEach(A=>{c.addSecond(A)}),Y.forEach(A=>{c.addSecond(A)});const I=[];if(I.push(O),T.forEach(A=>{I.push(A)}),n.addSecond(E),n.addSecond(x),F.forEach(A=>{n.addSecond(A)}),p.forEach(A=>{n.addSecond(A)}),Y.forEach(A=>{n.addSecond(A)}),n.addMainOI(I),e.D4>=e.D3)throw`err218: D4 ${e.D4} larger than D3 ${e.D3}`;l.addMainO(P(0,0,e.D3/2)),l.addSecond(P(0,0,e.D4/2)),h.addMainO(P(0,0,e.D4/2)),h.addSecond(P(0,0,e.D3/2));const K=e.D3*Math.cos(M),ie=K/Math.tan(M),V=g+(b/2+ie)*Math.cos(D),te=g+(b/2+ie)*Math.sin(D),w=k+2*(b+ie+K),W=w+e.L3+e.L4+K,ne=J(W,W).addSegStrokeA(-W,W).addSegStrokeA(-W,-W).addSegStrokeA(W,-W).closeSegStroke();a.addMainO(ne),o.fig={faceFrame:c,facePlate:n,faceRod:l,faceRodHollow:h,faceCutRod:a};const y=o.partName;o.vol={extrudes:[{outName:`subpax_${y}_frame`,face:`${y}_faceFrame`,extrudeMethod:U.eLinearOrtho,length:e.H2,rotate:[0,0,0],translate:[0,0,e.H1-e.H2]},{outName:`subpax_${y}_plate`,face:`${y}_facePlate`,extrudeMethod:U.eLinearOrtho,length:e.H3,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${y}_rod1`,face:`${y}_faceRod`,extrudeMethod:U.eLinearOrtho,length:w,rotate:[0,Math.PI/2-M,D],translate:[e.L4/2-V,e.L3/2-te,e.H3-K]},{outName:`subpax_${y}_rod2`,face:`${y}_faceRod`,extrudeMethod:U.eLinearOrtho,length:w,rotate:[0,Math.PI/2-M,Math.PI-D],translate:[-e.L4/2+V,e.L3/2-te,e.H3-K]},{outName:`subpax_${y}_rod3`,face:`${y}_faceRod`,extrudeMethod:U.eLinearOrtho,length:w,rotate:[0,Math.PI/2-M,Math.PI+D],translate:[-e.L4/2+V,-e.L3/2+te,e.H3-K]},{outName:`subpax_${y}_rod4`,face:`${y}_faceRod`,extrudeMethod:U.eLinearOrtho,length:w,rotate:[0,Math.PI/2-M,-D],translate:[e.L4/2-V,-e.L3/2+te,e.H3-K]},{outName:`subpax_${y}_rodH1`,face:`${y}_faceRodHollow`,extrudeMethod:U.eLinearOrtho,length:w,rotate:[0,Math.PI/2-M,D],translate:[e.L4/2-V,e.L3/2-te,e.H3-K]},{outName:`subpax_${y}_rodH2`,face:`${y}_faceRodHollow`,extrudeMethod:U.eLinearOrtho,length:w,rotate:[0,Math.PI/2-M,Math.PI-D],translate:[-e.L4/2+V,e.L3/2-te,e.H3-K]},{outName:`subpax_${y}_rodH3`,face:`${y}_faceRodHollow`,extrudeMethod:U.eLinearOrtho,length:w,rotate:[0,Math.PI/2-M,Math.PI+D],translate:[-e.L4/2+V,-e.L3/2+te,e.H3-K]},{outName:`subpax_${y}_rodH4`,face:`${y}_faceRodHollow`,extrudeMethod:U.eLinearOrtho,length:w,rotate:[0,Math.PI/2-M,-D],translate:[e.L4/2-V,-e.L3/2+te,e.H3-K]},{outName:`subpax_${y}_cut1`,face:`${y}_faceCutRod`,extrudeMethod:U.eLinearOrtho,length:W,rotate:[0,0,0],translate:[0,0,-W]},{outName:`subpax_${y}_cut2`,face:`${y}_faceCutRod`,extrudeMethod:U.eLinearOrtho,length:W,rotate:[0,0,0],translate:[0,0,e.H1]}],volumes:[{outName:`ipax_${y}_rawRod`,boolMethod:re.eUnion,inList:[`subpax_${y}_rod1`,`subpax_${y}_rod2`,`subpax_${y}_rod3`,`subpax_${y}_rod4`]},{outName:`ipax_${y}_rodHollow`,boolMethod:re.eUnion,inList:[`subpax_${y}_rodH1`,`subpax_${y}_rodH2`,`subpax_${y}_rodH3`,`subpax_${y}_rodH4`]},{outName:`ipax_${y}_halfRods`,boolMethod:re.eSubstraction,inList:[`ipax_${y}_rawRod`,`subpax_${y}_cut1`]},{outName:`ipax_${y}_rods`,boolMethod:re.eSubstraction,inList:[`ipax_${y}_halfRods`,`subpax_${y}_cut2`]},{outName:`ipax_${y}_plus`,boolMethod:re.eUnion,inList:[`subpax_${y}_frame`,`subpax_${y}_plate`,`ipax_${y}_rods`]},{outName:`pax_${y}`,boolMethod:re.eSubstraction,inList:[`ipax_${y}_plus`,`ipax_${y}_rodHollow`]}]},o.sub={},o.logstr+=`trapeze drawn successfully!
|
|
111
|
-
`,o.calcErr=!1}catch(S){o.logstr+=S,console.log(S)}return o}var vo={pTitle:"Heliostat trapeze",pDescription:"The support of one solar panel. Made out of aluminium for lightness and cooling",pDef:Ht,pGeom:Po},Dt={partName:"surface",params:[t("LH","mm",1600,10,4e3,1),t("LV","mm",1e3,10,4e3,1),t("LZ","mm",40,0,100,1),t("nx","",9,1,40,1),t("ny","",9,1,40,1),z("main fantasia"),$e("main_direction",["horizontal","vertical"]),xe("crenel",!1),t("first_row","",9,1,40,1),t("second_row","",9,1,40,1),z("horizontal spacing"),t("EH","mm",10,0,1e3,1),xe("EH_gradient",!1),t("EH_sup","mm",500,0,1e3,1),t("EH_cycle","",1,0,3,.05),t("EH_start","",0,0,1,.05),$e("EH_shape",["sinusoid","triangle","sawUp","sawDown"]),z("vertical spacing"),t("EV","mm",10,0,1e3,1),xe("EV_gradient",!1),t("EV_sup","mm",500,0,1e3,1),t("EV_cycle","",1,0,3,.05),t("EV_start","",0,0,1,.05),$e("EV_shape",["sinusoid","triangle","sawUp","sawDown"]),z("solar power"),t("power_efficiency","%",16,0,100,.1),t("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 xo(s,e,_=""){const o=_e(Dt.partName+_);let i;const d=B(),c=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
112
|
-
`;try{const n=e.LH*e.LV/1e6,l=e.solar_power*n*e.power_efficiency/100;o.logstr+=`panel surface: ${L(n)} m2
|
|
113
|
-
`,o.logstr+=`panel power: ${L(l)} W
|
|
114
|
-
`;const h=e.nx*e.ny;o.logstr+=`max panel number: ${h}
|
|
115
|
-
`,o.logstr+=`max panel surface: ${L(h*n)} m2
|
|
116
|
-
`,o.logstr+=`max panel power: ${L(h*l)} W
|
|
117
|
-
`;const a=e.main_direction===1?e.ny:e.nx,S=e.main_direction===1?e.nx:e.ny,g=e.main_direction===1?e.EV:e.EH,r=e.main_direction===1?e.EV_gradient:e.EH_gradient,u=e.main_direction===1?e.EV_sup:e.EH_sup,f=e.main_direction===1?e.EV_cycle:e.EH_cycle,H=e.main_direction===1?e.EV_start:e.EH_start,k=e.main_direction===1?e.EV_shape:e.EH_shape,M=e.main_direction===0?e.EV:e.EH,D=e.main_direction===0?e.EV_gradient:e.EH_gradient,b=e.main_direction===0?e.EV_sup:e.EH_sup,N=e.main_direction===0?e.EV_cycle:e.EH_cycle,R=e.main_direction===0?e.EV_start:e.EH_start,v=e.main_direction===0?e.EV_shape:e.EH_shape,E=Math.max(S,e.first_row,e.second_row),x=[];for(let w=0;w<a;w++){const W=(w+1)%2,ne=e.crenel?S-W:S;x.push(ne)}x[0]=e.first_row,x[x.length-1]=e.first_row,a>2&&(x[1]=e.second_row,x[x.length-2]=e.second_row);let O=0;x.forEach(w=>{O+=w}),o.logstr+=`actual panel number: ${O} (${L(100*O/h)} %)
|
|
118
|
-
`,o.logstr+=`actual panel surface: ${L(O*n)} m2
|
|
119
|
-
`,o.logstr+=`actual panel power: ${L(O*l)} W
|
|
120
|
-
`;const C=[];for(let w=0;w<a-1;w++){let W=g;if(r===1){const ne=a>2?a-2:1,y=(H+w*f/ne)%1;switch(k){case 0:W+=u*(1-Math.cos(y*2*Math.PI))/2;break;case 1:W+=u*(1-2*Math.abs(y-.5));break;case 2:W+=u*y;break;case 3:W+=u*(1-y);break;default:W+=u}}C.push(W)}let $=0;const m=[];m.push(0),C.forEach(w=>{$+=w,m.push($)});const q=[];for(let w=0;w<E-1;w++){let W=M;if(D===1){const ne=E>2?E-2:1,y=(R+w*N/ne)%1;switch(v){case 0:W+=b*(1-Math.cos(y*2*Math.PI))/2;break;case 1:W+=b*(1-2*Math.abs(y-.5));break;case 2:W+=b*y;break;case 3:W+=b*(1-y);break;default:W+=b}}q.push(W)}let F=0;const T=[];T.push(0),q.forEach(w=>{F+=w,T.push(F)});let p=0,Y=0;e.main_direction===0?(p=a*e.LH+$,Y=E*e.LV+F):(p=E*e.LH+F,Y=a*e.LV+$);const I=p*Y/10**6;o.logstr+=`global horizontal width: ${L(p/1e3)} m
|
|
121
|
-
`,o.logstr+=`global vertical height: ${L(Y/1e3)} m
|
|
122
|
-
`,o.logstr+=`global area: ${L(I)} m2
|
|
123
|
-
`,o.logstr+=`area efficiency: ${L(100*O*n/I)} %
|
|
124
|
-
`;const K=-p/2,ie=-Y/2;i=function(w,W){return J(w,W).addSegStrokeA(w+e.LH,W).addSegStrokeA(w+e.LH,W+e.LV).addSegStrokeA(w,W+e.LV).closeSegStroke()};const V=[];x.forEach((w,W)=>{const ne=(E-w)%2,y=Math.floor((E-w)/2);for(let A=0;A<w;A++){let Z=0,j=0;e.main_direction===0?(Z=K+W*e.LH+m[W],j=ie+(y+A)*e.LV+T[y+A],ne===1&&(j+=(e.LV+T[y+A+1]-T[y+A])/2)):(j=ie+W*e.LV+m[W],Z=K+(y+A)*e.LH+T[y+A],ne===1&&(Z+=(e.LH+T[y+A+1]-T[y+A])/2)),V.push([Z,j])}});for(const w of V)d.addMainO(i(w[0],w[1]));c.addMainO(i(0,0)),o.fig={faceSurface:d,faceOnePanel:c};const te=o.partName;o.vol={extrudes:V.map((w,W)=>({outName:`subpax_${te}_panel_${W}`,face:`${te}_faceOnePanel`,extrudeMethod:U.eLinearOrtho,length:e.LZ,rotate:[0,0,0],translate:[w[0],w[1],0]})),volumes:[{outName:`pax_${te}`,boolMethod:re.eUnion,inList:V.map((w,W)=>`subpax_${te}_panel_${W}`)}]},o.sub={},o.logstr+=`panel-surface drawn successfully!
|
|
125
|
-
`,o.calcErr=!1}catch(n){o.logstr+=n,console.log(n)}return o}var $o={pTitle:"Heliostat panel-surface",pDescription:"The surface collecting the solar power",pDef:Dt,pGeom:xo};const Pt={"gear/gear_wheel":pt,"gear/gear_bar":mt,"gear/gear_ring":Gt,"gear/gear_epicycloid":qt,"heliostat/heliostat":to,"heliostat/heliostat_2":io,"heliostat/base":co,"heliostat/pole_static":Ne,"heliostat/vaxis":lo,"heliostat/ring":ho,"heliostat/vaxis_holder":be,"heliostat/ring_guidance":uo,"heliostat/vaxis_guidance":So,"heliostat/rake":Ce,"heliostat/rake_stopper":We,"heliostat/haxis_guidance":Lo,"heliostat/spider":Ue,"heliostat/swing":Ie,"heliostat/rod":Do,"heliostat/trapeze":vo,"heliostat/surface":$o};function wo(s){const e=/^.*\//g;return s.replace(e,"")}function Mo(s){const e={};for(const _ of Object.keys(s)){const o=wo(_);e[o]=`/${_}`}return e}function Eo(s){const e=[];for(const _ of Object.keys(s))e.push(_);return e}const ko=Mo(Pt),Ro=Eo(Pt);export{Pt as a,ko as b,Ro as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as c,f as a,y as d,i as r,z as m,e as g}from"./BWo6ipe6.js";function _(n){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function h(n,e,s){if(n==null)return e(void 0),c;const u=a(()=>n.subscribe(e,s));return u.unsubscribe?()=>u.unsubscribe():u}const i=[];function z(n,e=c){let s=null;const u=new Set;function f(o){if(d(n,o)&&(n=o,s)){const l=!i.length;for(const t of u)t[1](),i.push(t,n);if(l){for(let t=0;t<i.length;t+=2)i[t][0](i[t+1]);i.length=0}}}function b(o){f(o(n))}function p(o,l=c){const t=[o,l];return u.add(t),u.size===1&&(s=e(f,b)||c),o(n),()=>{u.delete(t),u.size===0&&s&&(s(),s=null)}}return{set:f,update:b,subscribe:p}}function k(n){let e;return h(n,s=>e=s)(),e}function y(n){r===null&&_(),m&&r.l!==null?w(r).m.push(n):g(()=>{const e=a(n);if(typeof e=="function")return e})}function x(n){r===null&&_(),y(()=>()=>a(n))}function w(n){var e=n.l;return e.u??(e.u={a:[],b:[],m:[]})}export{x as a,k as g,y as o,h as s,z as w};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
var Ye=e=>{throw TypeError(e)};var Ct=(e,t,n)=>t.has(e)||Ye("Cannot "+n);var A=(e,t,n)=>(Ct(e,t,"read from private field"),n?n.call(e):t.get(e)),x=(e,t,n)=>t.has(e)?Ye("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n);import{ad as C,g as O,F as N,ac as Ot}from"./BWo6ipe6.js";import{w as Ce,o as Je}from"./6zLRVRT9.js";import{a as Nt,b as P}from"./CD5k8j7s.js";new URL("sveltekit-internal://");function jt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function $t(e){return e.split("%25").map(decodeURI).join("%25")}function Dt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function Re({href:e}){return e.split("#")[0]}function Ft(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(i,o){if(o==="get"||o==="getAll"||o==="has")return f=>(n(f),i[o](f));t();const c=Reflect.get(i,o);return typeof c=="function"?c.bind(i):c}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const i of s)Object.defineProperty(a,i,{get(){return t(),e[i]},enumerable:!0,configurable:!0});return a}const Vt="/__data.json",Bt=".html__data.json";function Gt(e){return e.endsWith(".html")?e.replace(/\.html$/,Bt):e.replace(/\/$/,"")+Vt}function Mt(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}function qt(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n.buffer}const Ht=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:(t==null?void 0:t.method)||"GET")!=="GET"&&K.delete(Oe(e)),Ht(e,t));const K=new Map;function Kt(e,t){const n=Oe(e,t),r=document.querySelector(n);if(r!=null&&r.textContent){let{body:a,...s}=JSON.parse(r.textContent);const i=r.getAttribute("data-ttl");return i&&K.set(n,{body:a,init:s,ttl:1e3*Number(i)}),r.getAttribute("data-b64")!==null&&(a=qt(a)),Promise.resolve(new Response(a,s))}return window.fetch(e,t)}function Wt(e,t,n){if(K.size>0){const r=Oe(e,n),a=K.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(a.body,a.init);K.delete(r)}}return window.fetch(t,n)}function Oe(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t!=null&&t.headers||t!=null&&t.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${Mt(...a)}"]`}return r}const Yt=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function Jt(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${Xt(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return t.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const i=r.split(/\[(.+?)\](?!\])/);return"/"+i.map((c,f)=>{if(f%2){if(c.startsWith("x+"))return Ie(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return Ie(String.fromCharCode(...c.slice(2).split("-").map(l=>parseInt(l,16))));const h=Yt.exec(c),[,u,y,d,m]=h;return t.push({name:d,matcher:m,optional:!!u,rest:!!y,chained:y?f===1&&i[0]==="":!1}),y?"(.*?)":u?"([^/]*)?":"([^/]+?)"}return Ie(c)}).join("")}).join("")}/?$`),params:t}}function zt(e){return!/^\([^)]+\)$/.test(e)}function Xt(e){return e.slice(1).split("/").filter(zt)}function Zt(e,t,n){const r={},a=e.slice(1),s=a.filter(o=>o!==void 0);let i=0;for(let o=0;o<t.length;o+=1){const c=t[o];let f=a[o-i];if(c.chained&&c.rest&&i&&(f=a.slice(o-i,o+1).filter(h=>h).join("/"),i=0),f===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||n[c.matcher](f)){r[c.name]=f;const h=t[o+1],u=a[o+1];h&&!h.rest&&h.optional&&u&&c.chained&&(i=0),!h&&!u&&Object.keys(r).length===s.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return r}function Ie(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function Qt({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[c,f,h]])=>{const{pattern:u,params:y}=Jt(o),d={id:o,exec:m=>{const l=u.exec(m);if(l)return Zt(l,y,r)},errors:[1,...h||[]].map(m=>e[m]),layouts:[0,...f||[]].map(i),leaf:s(c)};return d.errors.length=d.layouts.length=Math.max(d.errors.length,d.layouts.length),d});function s(o){const c=o<0;return c&&(o=~o),[c,e[o]]}function i(o){return o===void 0?o:[a.has(o),e[o]]}}function ct(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function ze(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}const en="1737140369653",lt="sveltekit:snapshot",ft="sveltekit:scroll",ut="sveltekit:states",tn="sveltekit:pageurl",B="sveltekit:history",J="sveltekit:navigation",fe={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},le=location.origin;function dt(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function Ne(){return{x:pageXOffset,y:pageYOffset}}function V(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const Xe={...fe,"":fe.hover};function ht(e){let t=e.assignedSlot??e.parentNode;return(t==null?void 0:t.nodeType)===11&&(t=t.host),t}function pt(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=ht(e)}}function Te(e,t,n){let r;try{r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI)}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,s=!r||!!a||ve(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),i=(r==null?void 0:r.origin)===le&&e.hasAttribute("download");return{url:r,external:s,target:a,download:i}}function ue(e){let t=null,n=null,r=null,a=null,s=null,i=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=V(o,"preload-code")),a===null&&(a=V(o,"preload-data")),t===null&&(t=V(o,"keepfocus")),n===null&&(n=V(o,"noscroll")),s===null&&(s=V(o,"reload")),i===null&&(i=V(o,"replacestate")),o=ht(o);function c(f){switch(f){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:Xe[r??"off"],preload_data:Xe[a??"off"],keepfocus:c(t),noscroll:c(n),reload:c(s),replace_state:c(i)}}function Ze(e){const t=Ce(e);let n=!0;function r(){n=!0,t.update(i=>i)}function a(i){n=!1,t.set(i)}function s(i){let o;return t.subscribe(c=>{(o===void 0||n&&c!==o)&&i(o=c)})}return{notify:r,set:a,subscribe:s}}const gt={v:()=>{}};function nn(){const{set:e,subscribe:t}=Ce(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${Nt}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==en;return i&&(e(!0),gt.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:t,check:r}}function ve(e,t,n){return e.origin!==le||!e.pathname.startsWith(t)?!0:n?!(e.pathname===t+"/"||e.pathname===t+"/index.html"||e.protocol==="file:"&&e.pathname.replace(/\/[^/]+\.html?$/,"")===t):!1}function Qe(e){const t=an(e),n=new ArrayBuffer(t.length),r=new DataView(n);for(let a=0;a<n.byteLength;a++)r.setUint8(a,t.charCodeAt(a));return n}const rn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function an(e){e.length%4===0&&(e=e.replace(/==?$/,""));let t="",n=0,r=0;for(let a=0;a<e.length;a++)n<<=6,n|=rn.indexOf(e[a]),r+=6,r===24&&(t+=String.fromCharCode((n&16711680)>>16),t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255),n=r=0);return r===12?(n>>=4,t+=String.fromCharCode(n)):r===18&&(n>>=2,t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255)),t}const on=-1,sn=-2,cn=-3,ln=-4,fn=-5,un=-6;function dn(e,t){if(typeof e=="number")return a(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,r=Array(n.length);function a(s,i=!1){if(s===on)return;if(s===cn)return NaN;if(s===ln)return 1/0;if(s===fn)return-1/0;if(s===un)return-0;if(i)throw new Error("Invalid input");if(s in r)return r[s];const o=n[s];if(!o||typeof o!="object")r[s]=o;else if(Array.isArray(o))if(typeof o[0]=="string"){const c=o[0],f=t==null?void 0:t[c];if(f)return r[s]=f(a(o[1]));switch(c){case"Date":r[s]=new Date(o[1]);break;case"Set":const h=new Set;r[s]=h;for(let d=1;d<o.length;d+=1)h.add(a(o[d]));break;case"Map":const u=new Map;r[s]=u;for(let d=1;d<o.length;d+=2)u.set(a(o[d]),a(o[d+1]));break;case"RegExp":r[s]=new RegExp(o[1],o[2]);break;case"Object":r[s]=Object(o[1]);break;case"BigInt":r[s]=BigInt(o[1]);break;case"null":const y=Object.create(null);r[s]=y;for(let d=1;d<o.length;d+=2)y[o[d]]=a(o[d+1]);break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":{const d=globalThis[c],m=o[1],l=Qe(m),g=new d(l);r[s]=g;break}case"ArrayBuffer":{const d=o[1],m=Qe(d);r[s]=m;break}default:throw new Error(`Unknown type ${c}`)}}else{const c=new Array(o.length);r[s]=c;for(let f=0;f<o.length;f+=1){const h=o[f];h!==sn&&(c[f]=a(h))}}else{const c={};r[s]=c;for(const f in o){const h=o[f];c[f]=a(h)}}return r[s]}return a(0)}const mt=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...mt];const hn=new Set([...mt]);[...hn];function pn(e){return e.filter(t=>t!=null)}class be{constructor(t,n){this.status=t,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${t}`}}toString(){return JSON.stringify(this.body)}}class je{constructor(t,n){this.status=t,this.location=n}}class $e extends Error{constructor(t,n,r){super(r),this.status=t,this.text=n}}const gn="x-sveltekit-invalidated",mn="x-sveltekit-trailing-slash";function de(e){return e instanceof be||e instanceof $e?e.status:500}function yn(e){return e instanceof $e?e.text:"Internal Error"}let U,z,Ue;const wn=Je.toString().includes("$$")||/function \w+\(\) \{\}/.test(Je.toString());var Q,ee,te,ne,re,ae,oe,se,ot,ie,st,ce,it;wn?(U={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},z={current:null},Ue={current:!1}):(U=new(ot=class{constructor(){x(this,Q,C({}));x(this,ee,C(null));x(this,te,C(null));x(this,ne,C({}));x(this,re,C({id:null}));x(this,ae,C({}));x(this,oe,C(-1));x(this,se,C(new URL("https://example.com")))}get data(){return O(A(this,Q))}set data(t){N(A(this,Q),t)}get form(){return O(A(this,ee))}set form(t){N(A(this,ee),t)}get error(){return O(A(this,te))}set error(t){N(A(this,te),t)}get params(){return O(A(this,ne))}set params(t){N(A(this,ne),t)}get route(){return O(A(this,re))}set route(t){N(A(this,re),t)}get state(){return O(A(this,ae))}set state(t){N(A(this,ae),t)}get status(){return O(A(this,oe))}set status(t){N(A(this,oe),t)}get url(){return O(A(this,se))}set url(t){N(A(this,se),t)}},Q=new WeakMap,ee=new WeakMap,te=new WeakMap,ne=new WeakMap,re=new WeakMap,ae=new WeakMap,oe=new WeakMap,se=new WeakMap,ot),z=new(st=class{constructor(){x(this,ie,C(null))}get current(){return O(A(this,ie))}set current(t){N(A(this,ie),t)}},ie=new WeakMap,st),Ue=new(it=class{constructor(){x(this,ce,C(!1))}get current(){return O(A(this,ce))}set current(t){N(A(this,ce),t)}},ce=new WeakMap,it),gt.v=()=>Ue.current=!0);function _n(e){Object.assign(U,e)}const vn=new Set(["icon","shortcut icon","apple-touch-icon"]),F=ct(ft)??{},X=ct(lt)??{},$={url:Ze({}),page:Ze({}),navigating:Ce(null),updated:nn()};function De(e){F[e]=Ne()}function bn(e,t){let n=e+1;for(;F[n];)delete F[n],n+=1;for(n=t+1;X[n];)delete X[n],n+=1}function M(e){return location.href=e.href,new Promise(()=>{})}async function yt(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(P||"/");e&&await e.update()}}function et(){}let Ae,xe,he,j,Pe,S;const pe=[],ge=[];let L=null;const wt=new Set,An=new Set,W=new Set;let _={branch:[],error:null,url:null},Fe=!1,me=!1,tt=!0,Z=!1,q=!1,_t=!1,Ve=!1,vt,I,T,ye;const Y=new Set;async function Vn(e,t,n){var a,s,i,o;document.URL!==location.href&&(location.href=location.href),S=e,await((s=(a=e.hooks).init)==null?void 0:s.call(a)),Ae=Qt(e),j=document.documentElement,Pe=t,xe=e.nodes[0],he=e.nodes[1],xe(),he(),I=(i=history.state)==null?void 0:i[B],T=(o=history.state)==null?void 0:o[J],I||(I=T=Date.now(),history.replaceState({...history.state,[B]:I,[J]:T},""));const r=F[I];r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y)),n?await xn(Pe,n):Un(S.hash?Pt(new URL(location.href)):location.href,{replaceState:!0}),Tn()}function Sn(){pe.length=0,Ve=!1}function bt(e){ge.some(t=>t==null?void 0:t.snapshot)&&(X[e]=ge.map(t=>{var n;return(n=t==null?void 0:t.snapshot)==null?void 0:n.capture()}))}function At(e){var t;(t=X[e])==null||t.forEach((n,r)=>{var a,s;(s=(a=ge[r])==null?void 0:a.snapshot)==null||s.restore(n)})}function nt(){De(I),ze(ft,F),bt(T),ze(lt,X)}async function Be(e,t,n,r){return H({type:"goto",url:dt(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(Ve=!0),t.invalidate&&t.invalidate.forEach(Ln)}})}async function En(e){if(e.id!==(L==null?void 0:L.id)){const t={};Y.add(t),L={id:e.id,token:t,promise:Et({...e,preload:t}).then(n=>(Y.delete(t),n.type==="loaded"&&n.state.error&&(L=null),n))}}return L.promise}async function Le(e){const t=kt(e);if(!t)return;const n=Ae.find(r=>r.exec(Rt(t)));n&&await Promise.all([...n.layouts,n.leaf].map(r=>r==null?void 0:r[1]()))}function St(e,t,n){var s;_=e.state;const r=document.querySelector("style[data-sveltekit]");r&&r.remove(),Object.assign(U,e.props.page),vt=new S.root({target:t,props:{...e.props,stores:$,components:ge},hydrate:n,sync:!1}),At(T);const a={from:null,to:{params:_.params,route:{id:((s=_.route)==null?void 0:s.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};W.forEach(i=>i(a)),me=!0}function we({url:e,params:t,branch:n,status:r,error:a,route:s,form:i}){let o="never";if(P&&(e.pathname===P||e.pathname===P+"/"))o="always";else for(const d of n)(d==null?void 0:d.slash)!==void 0&&(o=d.slash);e.pathname=jt(e.pathname,o),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:s},props:{constructors:pn(n).map(d=>d.node.component),page:He(U)}};i!==void 0&&(c.props.form=i);let f={},h=!U,u=0;for(let d=0;d<Math.max(n.length,_.branch.length);d+=1){const m=n[d],l=_.branch[d];(m==null?void 0:m.data)!==(l==null?void 0:l.data)&&(h=!0),m&&(f={...f,...m.data},h&&(c.props[`data_${u}`]=f),u+=1)}return(!_.url||e.href!==_.url.href||_.error!==a||i!==void 0&&i!==U.form||h)&&(c.props.page={error:a,params:t,route:{id:(s==null?void 0:s.id)??null},state:{},status:r,url:new URL(e),form:i??null,data:h?f:U.data}),c}async function Ge({loader:e,parent:t,url:n,params:r,route:a,server_data_node:s}){var h,u,y;let i=null,o=!0;const c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},f=await e();if((h=f.universal)!=null&&h.load){let d=function(...l){for(const g of l){const{href:w}=new URL(g,n);c.dependencies.add(w)}};const m={route:new Proxy(a,{get:(l,g)=>(o&&(c.route=!0),l[g])}),params:new Proxy(r,{get:(l,g)=>(o&&c.params.add(g),l[g])}),data:(s==null?void 0:s.data)??null,url:Ft(n,()=>{o&&(c.url=!0)},l=>{o&&c.search_params.add(l)},S.hash),async fetch(l,g){let w;l instanceof Request?(w=l.url,g={body:l.method==="GET"||l.method==="HEAD"?void 0:await l.blob(),cache:l.cache,credentials:l.credentials,headers:[...l.headers].length?l.headers:void 0,integrity:l.integrity,keepalive:l.keepalive,method:l.method,mode:l.mode,redirect:l.redirect,referrer:l.referrer,referrerPolicy:l.referrerPolicy,signal:l.signal,...g}):w=l;const R=new URL(w,n);return o&&d(R.href),R.origin===n.origin&&(w=R.href.slice(n.origin.length)),me?Wt(w,R.href,g):Kt(w,g)},setHeaders:()=>{},depends:d,parent(){return o&&(c.parent=!0),t()},untrack(l){o=!1;try{return l()}finally{o=!0}}};i=await f.universal.load.call(null,m)??null}return{node:f,loader:e,server:s,universal:(u=f.universal)!=null&&u.load?{type:"data",data:i,uses:c}:null,data:i??(s==null?void 0:s.data)??null,slash:((y=f.universal)==null?void 0:y.trailingSlash)??(s==null?void 0:s.slash)}}function rt(e,t,n,r,a,s){if(Ve)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const i of a.search_params)if(r.has(i))return!0;for(const i of a.params)if(s[i]!==_.params[i])return!0;for(const i of a.dependencies)if(pe.some(o=>o(new URL(i))))return!0;return!1}function Me(e,t){return(e==null?void 0:e.type)==="data"?e:(e==null?void 0:e.type)==="skip"?t??null:null}function kn(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),s=t.searchParams.getAll(r);a.every(i=>s.includes(i))&&s.every(i=>a.includes(i))&&n.delete(r)}return n}function at({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:He(U),constructors:[]}}}async function Et({id:e,invalidating:t,url:n,params:r,route:a,preload:s}){if((L==null?void 0:L.id)===e)return Y.delete(L.token),L.promise;const{errors:i,layouts:o,leaf:c}=a,f=[...o,c];i.forEach(p=>p==null?void 0:p().catch(()=>{})),f.forEach(p=>p==null?void 0:p[1]().catch(()=>{}));let h=null;const u=_.url?e!==_e(_.url):!1,y=_.route?a.id!==_.route.id:!1,d=kn(_.url,n);let m=!1;const l=f.map((p,v)=>{var D;const E=_.branch[v],k=!!(p!=null&&p[0])&&((E==null?void 0:E.loader)!==p[1]||rt(m,y,u,d,(D=E.server)==null?void 0:D.uses,r));return k&&(m=!0),k});if(l.some(Boolean)){try{h=await Lt(n,l)}catch(p){const v=await G(p,{url:n,params:r,route:{id:e}});return Y.has(s)?at({error:v,url:n,params:r,route:a}):Se({status:de(p),error:v,url:n,route:a})}if(h.type==="redirect")return h}const g=h==null?void 0:h.nodes;let w=!1;const R=f.map(async(p,v)=>{var Ee;if(!p)return;const E=_.branch[v],k=g==null?void 0:g[v];if((!k||k.type==="skip")&&p[1]===(E==null?void 0:E.loader)&&!rt(w,y,u,d,(Ee=E.universal)==null?void 0:Ee.uses,r))return E;if(w=!0,(k==null?void 0:k.type)==="error")throw k;return Ge({loader:p[1],url:n,params:r,route:a,parent:async()=>{var We;const Ke={};for(let ke=0;ke<v;ke+=1)Object.assign(Ke,(We=await R[ke])==null?void 0:We.data);return Ke},server_data_node:Me(k===void 0&&p[0]?{type:"skip"}:k??null,p[0]?E==null?void 0:E.server:void 0)})});for(const p of R)p.catch(()=>{});const b=[];for(let p=0;p<f.length;p+=1)if(f[p])try{b.push(await R[p])}catch(v){if(v instanceof je)return{type:"redirect",location:v.location};if(Y.has(s))return at({error:await G(v,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let E=de(v),k;if(g!=null&&g.includes(v))E=v.status??E,k=v.error;else if(v instanceof be)k=v.body;else{if(await $.updated.check())return await yt(),await M(n);k=await G(v,{params:r,url:n,route:{id:a.id}})}const D=await Rn(p,b,i);return D?we({url:n,params:r,branch:b.slice(0,D.idx).concat(D.node),status:E,error:k,route:a}):await Ut(n,{id:a.id},k,E)}else b.push(void 0);return we({url:n,params:r,branch:b,status:200,error:null,route:a,form:t?void 0:null})}async function Rn(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function Se({status:e,error:t,url:n,route:r}){const a={};let s=null;if(S.server_loads[0]===0)try{const o=await Lt(n,[!0]);if(o.type!=="data"||o.nodes[0]&&o.nodes[0].type!=="data")throw 0;s=o.nodes[0]??null}catch{(n.origin!==le||n.pathname!==location.pathname||Fe)&&await M(n)}try{const o=await Ge({loader:xe,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Me(s)}),c={node:await he(),loader:he,universal:null,server:null,data:null};return we({url:n,params:a,branch:[o,c],status:e,error:t,route:null})}catch(o){if(o instanceof je)return Be(new URL(o.location,location.href),{},0);throw o}}function kt(e){let t;try{if(t=S.hooks.reroute({url:new URL(e)})??e,typeof t=="string"){const n=new URL(e);S.hash?n.hash=t:n.pathname=t,t=n}}catch{return}return t}function qe(e,t){if(!e||ve(e,P,S.hash))return;const n=kt(e);if(!n)return;const r=Rt(n);for(const a of Ae){const s=a.exec(r);if(s)return{id:_e(e),invalidating:t,route:a,params:Dt(s),url:e}}}function Rt(e){return $t(S.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(P.length))||"/"}function _e(e){return(S.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function It({url:e,type:t,intent:n,delta:r}){let a=!1;const s=xt(_,n,e,t);r!==void 0&&(s.navigation.delta=r);const i={...s.navigation,cancel:()=>{a=!0,s.reject(new Error("navigation cancelled"))}};return Z||wt.forEach(o=>o(i)),a?null:s}async function H({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i={},redirect_count:o=0,nav_token:c={},accept:f=et,block:h=et}){const u=qe(t,!1),y=It({url:t,type:e,delta:n==null?void 0:n.delta,intent:u});if(!y){h();return}const d=I,m=T;f(),Z=!0,me&&$.navigating.set(z.current=y.navigation),ye=c;let l=u&&await Et(u);if(!l){if(ve(t,P,S.hash))return await M(t);l=await Ut(t,{id:null},await G(new $e(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404)}if(t=(u==null?void 0:u.url)||t,ye!==c)return y.reject(new Error("navigation aborted")),!1;if(l.type==="redirect")if(o>=20)l=await Se({status:500,error:await G(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}});else return Be(new URL(l.location,t).href,{},o+1,c),!1;else l.props.page.status>=400&&await $.updated.check()&&(await yt(),await M(t));if(Sn(),De(d),bt(m),l.props.page.url.pathname!==t.pathname&&(t.pathname=l.props.page.url.pathname),i=n?n.state:i,!n){const b=s?0:1,p={[B]:I+=b,[J]:T+=b,[ut]:i};(s?history.replaceState:history.pushState).call(history,p,"",t),s||bn(I,T)}if(L=null,l.props.page.state=i,me){_=l.state,l.props.page&&(l.props.page.url=t);const b=(await Promise.all(Array.from(An,p=>p(y.navigation)))).filter(p=>typeof p=="function");if(b.length>0){let p=function(){b.forEach(v=>{W.delete(v)})};b.push(p),b.forEach(v=>{W.add(v)})}vt.$set(l.props),_n(l.props.page),_t=!0}else St(l,Pe,!1);const{activeElement:g}=document;await Ot();const w=n?n.scroll:a?Ne():null;if(tt){const b=t.hash&&document.getElementById(decodeURIComponent(S.hash?t.hash.split("#")[2]??"":t.hash.slice(1)));w?scrollTo(w.x,w.y):b?b.scrollIntoView():scrollTo(0,0)}const R=document.activeElement!==g&&document.activeElement!==document.body;!r&&!R&&Pn(),tt=!0,l.props.page&&Object.assign(U,l.props.page),Z=!1,e==="popstate"&&At(T),y.fulfil(void 0),W.forEach(b=>b(y.navigation)),$.navigating.set(z.current=null)}async function Ut(e,t,n,r){return e.origin===le&&e.pathname===location.pathname&&!Fe?await Se({status:r,error:n,url:e,route:t}):await M(e)}function In(){let e;j.addEventListener("mousemove",s=>{const i=s.target;clearTimeout(e),e=setTimeout(()=>{r(i,2)},20)});function t(s){s.defaultPrevented||r(s.composedPath()[0],1)}j.addEventListener("mousedown",t),j.addEventListener("touchstart",t,{passive:!0});const n=new IntersectionObserver(s=>{for(const i of s)i.isIntersecting&&(Le(new URL(i.target.href)),n.unobserve(i.target))},{threshold:0});function r(s,i){const o=pt(s,j);if(!o)return;const{url:c,external:f,download:h}=Te(o,P,S.hash);if(f||h)return;const u=ue(o),y=c&&_e(_.url)===_e(c);if(!u.reload&&!y)if(i<=u.preload_data){const d=qe(c,!1);d&&En(d)}else i<=u.preload_code&&Le(c)}function a(){n.disconnect();for(const s of j.querySelectorAll("a")){const{url:i,external:o,download:c}=Te(s,P,S.hash);if(o||c)continue;const f=ue(s);f.reload||(f.preload_code===fe.viewport&&n.observe(s),f.preload_code===fe.eager&&Le(i))}}W.add(a),a()}function G(e,t){if(e instanceof be)return e.body;const n=de(e),r=yn(e);return S.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Un(e,t={}){return e=new URL(dt(e)),e.origin!==le?Promise.reject(new Error("goto: invalid URL")):Be(e,t,0)}function Ln(e){if(typeof e=="function")pe.push(e);else{const{href:t}=new URL(e,location.href);pe.push(n=>n.href===t)}}function Tn(){var t;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let r=!1;if(nt(),!Z){const a=xt(_,void 0,null,"leave"),s={...a.navigation,cancel:()=>{r=!0,a.reject(new Error("navigation cancelled"))}};wt.forEach(i=>i(s))}r?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&nt()}),(t=navigator.connection)!=null&&t.saveData||In(),j.addEventListener("click",async n=>{if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const r=pt(n.composedPath()[0],j);if(!r)return;const{url:a,external:s,target:i,download:o}=Te(r,P,S.hash);if(!a)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const c=ue(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||o)return;const[h,u]=(S.hash?a.hash.replace(/^#/,""):a.href).split("#"),y=h===Re(location);if(s||c.reload&&(!y||!u)){It({url:a,type:"link"})?Z=!0:n.preventDefault();return}if(u!==void 0&&y){const[,d]=_.url.href.split("#");if(d===u){if(n.preventDefault(),u===""||u==="top"&&r.ownerDocument.getElementById("top")===null)window.scrollTo({top:0});else{const m=r.ownerDocument.getElementById(decodeURIComponent(u));m&&(m.scrollIntoView(),m.focus())}return}if(q=!0,De(I),e(a),!c.replace_state)return;q=!1}n.preventDefault(),await new Promise(d=>{requestAnimationFrame(()=>{setTimeout(d,0)}),setTimeout(d,100)}),H({type:"link",url:a,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??a.href===location.href})}),j.addEventListener("submit",n=>{if(n.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(n.target),a=n.submitter;if(((a==null?void 0:a.formTarget)||r.target)==="_blank"||((a==null?void 0:a.formMethod)||r.method)!=="get")return;const o=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(ve(o,P,!1))return;const c=n.target,f=ue(c);if(f.reload)return;n.preventDefault(),n.stopPropagation();const h=new FormData(c),u=a==null?void 0:a.getAttribute("name");u&&h.append(u,(a==null?void 0:a.getAttribute("value"))??""),o.search=new URLSearchParams(h).toString(),H({type:"form",url:o,keepfocus:f.keepfocus,noscroll:f.noscroll,replace_state:f.replace_state??o.href===location.href})}),addEventListener("popstate",async n=>{var r;if((r=n.state)!=null&&r[B]){const a=n.state[B];if(ye={},a===I)return;const s=F[a],i=n.state[ut]??{},o=new URL(n.state[tn]??location.href),c=n.state[J],f=_.url?Re(location)===Re(_.url):!1;if(c===T&&(_t||f)){i!==U.state&&(U.state=i),e(o),F[I]=Ne(),s&&scrollTo(s.x,s.y),I=a;return}const u=a-I;await H({type:"popstate",url:o,popped:{state:i,scroll:s,delta:u},accept:()=>{I=a,T=c},block:()=>{history.go(-u)},nav_token:ye})}else if(!q){const a=new URL(location.href);e(a)}}),addEventListener("hashchange",()=>{q?(q=!1,history.replaceState({...history.state,[B]:++I,[J]:T},"",location.href)):S.hash&&_.url.hash===location.hash&&H({type:"goto",url:Pt(_.url)})});for(const n of document.querySelectorAll("link"))vn.has(n.rel)&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&$.navigating.set(z.current=null)});function e(n){_.url=U.url=n,$.page.set(He(U)),$.page.notify()}}async function xn(e,{status:t=200,error:n,node_ids:r,params:a,route:s,data:i,form:o}){Fe=!0;const c=new URL(location.href);({params:a={},route:s={id:null}}=qe(c,!1)||{});let f,h=!0;try{const u=r.map(async(m,l)=>{const g=i[l];return g!=null&&g.uses&&(g.uses=Tt(g.uses)),Ge({loader:S.nodes[m],url:c,params:a,route:s,parent:async()=>{const w={};for(let R=0;R<l;R+=1)Object.assign(w,(await u[R]).data);return w},server_data_node:Me(g)})}),y=await Promise.all(u),d=Ae.find(({id:m})=>m===s.id);if(d){const m=d.layouts;for(let l=0;l<m.length;l++)m[l]||y.splice(l,0,void 0)}f=we({url:c,params:a,branch:y,status:t,error:n,form:o,route:d??null})}catch(u){if(u instanceof je){await M(new URL(u.location,location.href));return}f=await Se({status:de(u),error:await G(u,{url:c,params:a,route:s}),url:c,route:s}),e.textContent="",h=!1}f.props.page&&(f.props.page.state={}),St(f,e,h)}async function Lt(e,t){var s;const n=new URL(e);n.pathname=Gt(e.pathname),e.pathname.endsWith("/")&&n.searchParams.append(mn,"1"),n.searchParams.append(gn,t.map(i=>i?"1":"0").join(""));const r=window.fetch,a=await r(n.href,{});if(!a.ok){let i;throw(s=a.headers.get("content-type"))!=null&&s.includes("application/json")?i=await a.json():a.status===404?i="Not Found":a.status===500&&(i="Internal Error"),new be(a.status,i)}return new Promise(async i=>{var y;const o=new Map,c=a.body.getReader(),f=new TextDecoder;function h(d){return dn(d,{...S.decoders,Promise:m=>new Promise((l,g)=>{o.set(m,{fulfil:l,reject:g})})})}let u="";for(;;){const{done:d,value:m}=await c.read();if(d&&!u)break;for(u+=!m&&u?`
|
|
2
|
-
`:f.decode(m,{stream:!0});;){const l=u.indexOf(`
|
|
3
|
-
`);if(l===-1)break;const g=JSON.parse(u.slice(0,l));if(u=u.slice(l+1),g.type==="redirect")return i(g);if(g.type==="data")(y=g.nodes)==null||y.forEach(w=>{(w==null?void 0:w.type)==="data"&&(w.uses=Tt(w.uses),w.data=h(w.data))}),i(g);else if(g.type==="chunk"){const{id:w,data:R,error:b}=g,p=o.get(w);o.delete(w),b?p.reject(h(b)):p.fulfil(h(R))}}}})}function Tt(e){return{dependencies:new Set((e==null?void 0:e.dependencies)??[]),params:new Set((e==null?void 0:e.params)??[]),parent:!!(e!=null&&e.parent),route:!!(e!=null&&e.route),url:!!(e!=null&&e.url),search_params:new Set((e==null?void 0:e.search_params)??[])}}function Pn(){const e=document.querySelector("[autofocus]");if(e)e.focus();else{const t=document.body,n=t.getAttribute("tabindex");t.tabIndex=-1,t.focus({preventScroll:!0,focusVisible:!1}),n!==null?t.setAttribute("tabindex",n):t.removeAttribute("tabindex");const r=getSelection();if(r&&r.type!=="None"){const a=[];for(let s=0;s<r.rangeCount;s+=1)a.push(r.getRangeAt(s));setTimeout(()=>{if(r.rangeCount===a.length){for(let s=0;s<r.rangeCount;s+=1){const i=a[s],o=r.getRangeAt(s);if(i.commonAncestorContainer!==o.commonAncestorContainer||i.startContainer!==o.startContainer||i.endContainer!==o.endContainer||i.startOffset!==o.startOffset||i.endOffset!==o.endOffset)return}r.removeAllRanges()}})}}}function xt(e,t,n,r){var c,f;let a,s;const i=new Promise((h,u)=>{a=h,s=u});return i.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:((c=e.route)==null?void 0:c.id)??null},url:e.url},to:n&&{params:(t==null?void 0:t.params)??null,route:{id:((f=t==null?void 0:t.route)==null?void 0:f.id)??null},url:n},willUnload:!t,type:r,complete:i},fulfil:a,reject:s}}function He(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function Pt(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}export{be as H,Vn as a,Un as g,U as p,$ as s,Ue as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{b as o,E as f,a as i,n as p,d as c,h as d,c as h}from"./BWo6ipe6.js";function _(s,e,...t){var r=s,n=p,a;o(()=>{n!==(n=e())&&(a&&(c(a),a=null),a=i(()=>n(r,...t)))},f),d&&(r=h)}export{_ as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{u as d,e as c,f as g,r as l,g as p,i as m,j as b,k,l as v}from"./BWo6ipe6.js";function x(n=!1){const s=m,e=s.l.u;if(!e)return;let r=()=>k(s.s);if(n){let f=0,t={};const _=v(()=>{let i=!1;const a=s.s;for(const o in a)a[o]!==t[o]&&(t[o]=a[o],i=!0);return i&&f++,f});r=()=>p(_)}e.b.length&&d(()=>{u(s,r),l(e.b)}),c(()=>{const f=g(()=>e.m.map(b));return()=>{for(const t of f)typeof t=="function"&&t()}}),e.a.length&&c(()=>{u(s,r),l(e.a)})}function u(n,s){if(n.l.s)for(const e of n.l.s)p(e);s()}export{x as i};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var Pn=Array.isArray,Jt=Array.prototype.indexOf,Fn=Array.from,Ln=Object.defineProperty,pt=Object.getOwnPropertyDescriptor,Qt=Object.getOwnPropertyDescriptors,Mn=Object.prototype,Yn=Array.prototype,tn=Object.getPrototypeOf;const Hn=()=>{};function jn(t){return t()}function yt(t){for(var n=0;n<t.length;n++)t[n]()}const y=2,Tt=4,j=8,ot=16,g=32,B=64,K=128,O=256,$=512,d=1024,k=2048,P=4096,b=8192,F=16384,nn=32768,mt=65536,Bn=1<<17,rn=1<<19,At=1<<20,ht=Symbol("$state"),Un=Symbol("legacy props"),Vn=Symbol("");function gt(t){return t===this.v}function en(t,n){return t!=t?n==n:t!==n||t!==null&&typeof t=="object"||typeof t=="function"}function kt(t){return!en(t,this.v)}function ln(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function sn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function an(t){throw new Error("https://svelte.dev/e/effect_orphan")}function un(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function Gn(){throw new Error("https://svelte.dev/e/hydration_failed")}function Kn(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function $n(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function Zn(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function on(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function fn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}let tt=!1;function zn(){tt=!0}const Wn=1,Xn=2,Jn=4,Qn=8,tr=16,nr=1,rr=2,er=4,lr=8,sr=16,ar=1,ur=2,_n="[",cn="[!",vn="]",Dt={},or=Symbol();function it(t,n){var r={f:0,v:t,reactions:null,equals:gt,rv:0,wv:0};return r}function ir(t){return pn(it(t))}function fr(t,n=!1){var e;const r=it(t);return n||(r.equals=kt),tt&&_!==null&&_.l!==null&&((e=_.l).s??(e.s=[])).push(r),r}function pn(t){return u!==null&&u.f&y&&(m===null?Rn([t]):m.push(t)),t}function _r(t,n){return u!==null&&nt()&&u.f&(y|ot)&&(m===null||!m.includes(t))&&fn(),hn(t,n)}function hn(t,n){return t.equals(n)||(t.v,t.v=n,t.wv=Gt(),It(t,k),nt()&&f!==null&&f.f&d&&!(f.f&(g|B))&&(A===null?Sn([t]):A.push(t))),n}function It(t,n){var r=t.reactions;if(r!==null)for(var e=nt(),l=r.length,s=0;s<l;s++){var a=r[s],o=a.f;o&k||!e&&a===f||(T(a,n),o&(d|O)&&(o&y?It(a,P):et(a)))}}function Rt(t){console.warn("https://svelte.dev/e/hydration_mismatch")}let R=!1;function cr(t){R=t}let p;function q(t){if(t===null)throw Rt(),Dt;return p=t}function vr(){return q(x(p))}function pr(t){if(R){if(x(p)!==null)throw Rt(),Dt;p=t}}function hr(t=1){if(R){for(var n=t,r=p;n--;)r=x(r);p=r}}function dr(){for(var t=0,n=p;;){if(n.nodeType===8){var r=n.data;if(r===vn){if(t===0)return n;t-=1}else(r===_n||r===cn)&&(t+=1)}var e=x(n);n.remove(),n=e}}var dt,St,Ot;function Er(){if(dt===void 0){dt=window;var t=Element.prototype,n=Node.prototype;St=pt(n,"firstChild").get,Ot=pt(n,"nextSibling").get,t.__click=void 0,t.__className="",t.__attributes=null,t.__styles=null,t.__e=void 0,Text.prototype.__t=void 0}}function Z(t=""){return document.createTextNode(t)}function lt(t){return St.call(t)}function x(t){return Ot.call(t)}function wr(t,n){if(!R)return lt(t);var r=lt(p);if(r===null)r=p.appendChild(Z());else if(n&&r.nodeType!==3){var e=Z();return r==null||r.before(e),q(e),e}return q(r),r}function yr(t,n){if(!R){var r=lt(t);return r instanceof Comment&&r.data===""?x(r):r}if(n&&(p==null?void 0:p.nodeType)!==3){var e=Z();return p==null||p.before(e),q(e),e}return p}function Tr(t,n=1,r=!1){let e=R?p:t;for(var l;n--;)l=e,e=x(e);if(!R)return e;var s=e==null?void 0:e.nodeType;if(r&&s!==3){var a=Z();return e===null?l==null||l.after(a):e.before(a),q(a),a}return q(e),e}function mr(t){t.textContent=""}function dn(t){var n=y|k;f===null?n|=O:f.f|=At;var r=u!==null&&u.f&y?u:null;const e={children:null,ctx:_,deps:null,equals:gt,f:n,fn:t,reactions:null,rv:0,v:null,wv:0,parent:r??f};return r!==null&&(r.children??(r.children=[])).push(e),e}function Ar(t){const n=dn(t);return n.equals=kt,n}function xt(t){var n=t.children;if(n!==null){t.children=null;for(var r=0;r<n.length;r+=1){var e=n[r];e.f&y?ft(e):S(e)}}}function En(t){for(var n=t.parent;n!==null;){if(!(n.f&y))return n;n=n.parent}return null}function Ct(t){var n,r=f;J(En(t));try{xt(t),n=$t(t)}finally{J(r)}return n}function Nt(t){var n=Ct(t),r=(I||t.f&O)&&t.deps!==null?P:d;T(t,r),t.equals(n)||(t.v=n,t.wv=Gt())}function ft(t){xt(t),H(t,0),T(t,F),t.v=t.children=t.deps=t.ctx=t.reactions=null}function bt(t){f===null&&u===null&&an(),u!==null&&u.f&O&&sn(),_t&&ln()}function wn(t,n){var r=n.last;r===null?n.last=n.first=t:(r.next=t,t.prev=r,n.last=t)}function L(t,n,r,e=!0){var l=(t&B)!==0,s=f,a={ctx:_,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:t|k,first:null,fn:n,last:null,next:null,parent:l?null:s,prev:null,teardown:null,transitions:null,wv:0};if(r){var o=C;try{Et(!0),ct(a),a.f|=nn}catch(v){throw S(a),v}finally{Et(o)}}else n!==null&&et(a);var c=r&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&(At|K))===0;if(!c&&!l&&e&&(s!==null&&wn(a,s),u!==null&&u.f&y)){var h=u;(h.children??(h.children=[])).push(a)}return a}function gr(t){const n=L(j,null,!1);return T(n,d),n.teardown=t,n}function kr(t){bt();var n=f!==null&&(f.f&g)!==0&&_!==null&&!_.m;if(n){var r=_;(r.e??(r.e=[])).push({fn:t,effect:f,reaction:u})}else{var e=qt(t);return e}}function Dr(t){return bt(),yn(t)}function Ir(t){const n=L(B,t,!0);return(r={})=>new Promise(e=>{r.outro?An(n,()=>{S(n),e(void 0)}):(S(n),e(void 0))})}function qt(t){return L(Tt,t,!1)}function yn(t){return L(j,t,!0)}function Rr(t){return Tn(t)}function Tn(t,n=0){return L(j|ot|n,t,!0)}function Sr(t,n=!0){return L(j|g,t,!0,n)}function Pt(t){var n=t.teardown;if(n!==null){const r=_t,e=u;wt(!0),X(null);try{n.call(null)}finally{wt(r),X(e)}}}function Ft(t){var n=t.deriveds;if(n!==null){t.deriveds=null;for(var r=0;r<n.length;r+=1)ft(n[r])}}function Lt(t,n=!1){var r=t.first;for(t.first=t.last=null;r!==null;){var e=r.next;S(r,n),r=e}}function mn(t){for(var n=t.first;n!==null;){var r=n.next;n.f&g||S(n),n=r}}function S(t,n=!0){var r=!1;if((n||t.f&rn)&&t.nodes_start!==null){for(var e=t.nodes_start,l=t.nodes_end;e!==null;){var s=e===l?null:x(e);e.remove(),e=s}r=!0}Lt(t,n&&!r),Ft(t),H(t,0),T(t,F);var a=t.transitions;if(a!==null)for(const c of a)c.stop();Pt(t);var o=t.parent;o!==null&&o.first!==null&&Mt(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function Mt(t){var n=t.parent,r=t.prev,e=t.next;r!==null&&(r.next=e),e!==null&&(e.prev=r),n!==null&&(n.first===t&&(n.first=e),n.last===t&&(n.last=r))}function An(t,n){var r=[];Yt(t,r,!0),gn(r,()=>{S(t),n&&n()})}function gn(t,n){var r=t.length;if(r>0){var e=()=>--r||n();for(var l of t)l.out(e)}else n()}function Yt(t,n,r){if(!(t.f&b)){if(t.f^=b,t.transitions!==null)for(const a of t.transitions)(a.is_global||r)&&n.push(a);for(var e=t.first;e!==null;){var l=e.next,s=(e.f&mt)!==0||(e.f&g)!==0;Yt(e,n,s?r:!1),e=l}}}function Or(t){Ht(t,!0)}function Ht(t,n){if(t.f&b){t.f^=b,t.f&d||(t.f^=d),U(t)&&(T(t,k),et(t));for(var r=t.first;r!==null;){var e=r.next,l=(r.f&mt)!==0||(r.f&g)!==0;Ht(r,l?n:!1),r=e}if(t.transitions!==null)for(const s of t.transitions)(s.is_global||n)&&s.in()}}const kn=typeof requestIdleCallback>"u"?t=>setTimeout(t,1):requestIdleCallback;let z=!1,W=!1,st=[],at=[];function jt(){z=!1;const t=st.slice();st=[],yt(t)}function Bt(){W=!1;const t=at.slice();at=[],yt(t)}function xr(t){z||(z=!0,queueMicrotask(jt)),st.push(t)}function Cr(t){W||(W=!0,kn(Bt)),at.push(t)}function Dn(){z&&jt(),W&&Bt()}const Ut=0,In=1;let V=!1,G=Ut,M=!1,Y=null,C=!1,_t=!1;function Et(t){C=t}function wt(t){_t=t}let D=[],N=0;let u=null;function X(t){u=t}let f=null;function J(t){f=t}let m=null;function Rn(t){m=t}let E=null,w=0,A=null;function Sn(t){A=t}let Vt=1,Q=0,I=!1,_=null;function Gt(){return++Vt}function nt(){return!tt||_!==null&&_.l===null}function U(t){var h;var n=t.f;if(n&k)return!0;if(n&P){var r=t.deps,e=(n&O)!==0;if(r!==null){var l,s,a=(n&$)!==0,o=e&&f!==null&&!I,c=r.length;if(a||o){for(l=0;l<c;l++)s=r[l],(a||!((h=s==null?void 0:s.reactions)!=null&&h.includes(t)))&&(s.reactions??(s.reactions=[])).push(t);a&&(t.f^=$)}for(l=0;l<c;l++)if(s=r[l],U(s)&&Nt(s),s.wv>t.wv)return!0}(!e||f!==null&&!I)&&T(t,d)}return!1}function On(t,n){for(var r=n;r!==null;){if(r.f&K)try{r.fn(t);return}catch{r.f^=K}r=r.parent}throw V=!1,t}function xn(t){return(t.f&F)===0&&(t.parent===null||(t.parent.f&K)===0)}function rt(t,n,r,e){if(V){if(r===null&&(V=!1),xn(n))throw t;return}r!==null&&(V=!0);{On(t,n);return}}function Kt(t,n,r=0){var e=t.reactions;if(e!==null)for(var l=0;l<e.length;l++){var s=e[l];s.f&y?Kt(s,n,r+1):n===s&&(r===0?T(s,k):s.f&d&&T(s,P),et(s))}}function $t(t){var vt;var n=E,r=w,e=A,l=u,s=I,a=m,o=_,c=t.f;E=null,w=0,A=null,u=c&(g|B)?null:t,I=!C&&(c&O)!==0,m=null,_=t.ctx,Q++;try{var h=(0,t.fn)(),v=t.deps;if(E!==null){var i;if(H(t,w),v!==null&&w>0)for(v.length=w+E.length,i=0;i<E.length;i++)v[w+i]=E[i];else t.deps=v=E;if(!I)for(i=w;i<v.length;i++)((vt=v[i]).reactions??(vt.reactions=[])).push(t)}else v!==null&&w<v.length&&(H(t,w),v.length=w);if(nt()&&A!==null&&!(t.f&(y|P|k)))for(i=0;i<A.length;i++)Kt(A[i],t);return l!==null&&Q++,h}finally{E=n,w=r,A=e,u=l,I=s,m=a,_=o}}function Cn(t,n){let r=n.reactions;if(r!==null){var e=Jt.call(r,t);if(e!==-1){var l=r.length-1;l===0?r=n.reactions=null:(r[e]=r[l],r.pop())}}r===null&&n.f&y&&(E===null||!E.includes(n))&&(T(n,P),n.f&(O|$)||(n.f^=$),H(n,0))}function H(t,n){var r=t.deps;if(r!==null)for(var e=n;e<r.length;e++)Cn(t,r[e])}function ct(t){var n=t.f;if(!(n&F)){T(t,d);var r=f,e=_;f=t;try{n&ot?mn(t):Lt(t),Ft(t),Pt(t);var l=$t(t);t.teardown=typeof l=="function"?l:null,t.wv=Vt;var s=t.deps,a}catch(o){rt(o,t,r,e||t.ctx)}finally{f=r}}}function Zt(){if(N>1e3){N=0;try{un()}catch(t){if(Y!==null)rt(t,Y,null);else throw t}}N++}function zt(t){var n=t.length;if(n!==0){Zt();var r=C;C=!0;try{for(var e=0;e<n;e++){var l=t[e];l.f&d||(l.f^=d);var s=[];Wt(l,s),Nn(s)}}finally{C=r}}}function Nn(t){var n=t.length;if(n!==0)for(var r=0;r<n;r++){var e=t[r];if(!(e.f&(F|b)))try{U(e)&&(ct(e),e.deps===null&&e.first===null&&e.nodes_start===null&&(e.teardown===null?Mt(e):e.fn=null))}catch(l){rt(l,e,null,e.ctx)}}}function bn(){if(M=!1,N>1001)return;const t=D;D=[],zt(t),M||(N=0,Y=null)}function et(t){G===Ut&&(M||(M=!0,queueMicrotask(bn))),Y=t;for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(r&(B|g)){if(!(r&d))return;n.f^=d}}D.push(n)}function Wt(t,n){var r=t.first,e=[];t:for(;r!==null;){var l=r.f,s=(l&g)!==0,a=s&&(l&d)!==0,o=r.next;if(!a&&!(l&b))if(l&j){if(s)r.f^=d;else try{U(r)&&ct(r)}catch(i){rt(i,r,null,r.ctx)}var c=r.first;if(c!==null){r=c;continue}}else l&Tt&&e.push(r);if(o===null){let i=r.parent;for(;i!==null;){if(t===i)break t;var h=i.next;if(h!==null){r=h;continue t}i=i.parent}}r=o}for(var v=0;v<e.length;v++)c=e[v],n.push(c),Wt(c,n)}function Xt(t){var n=G,r=D;try{Zt();const l=[];G=In,D=l,M=!1,zt(r);var e=t==null?void 0:t();return Dn(),(D.length>0||l.length>0)&&Xt(),N=0,Y=null,e}finally{G=n,D=r}}async function Nr(){await Promise.resolve(),Xt()}function br(t){var v;var n=t.f,r=(n&y)!==0;if(r&&n&F){var e=Ct(t);return ft(t),e}if(u!==null){m!==null&&m.includes(t)&&on();var l=u.deps;t.rv<Q&&(t.rv=Q,E===null&&l!==null&&l[w]===t?w++:E===null?E=[t]:E.push(t))}else if(r&&t.deps===null)for(var s=t,a=s.parent,o=s;a!==null;)if(a.f&y){var c=a;o=c,a=c.parent}else{var h=a;(v=h.deriveds)!=null&&v.includes(o)||(h.deriveds??(h.deriveds=[])).push(o);break}return r&&(s=t,U(s)&&Nt(s)),t.v}function qr(t){const n=u;try{return u=null,t()}finally{u=n}}const qn=-7169;function T(t,n){t.f=t.f&qn|n}function Pr(t,n=!1,r){_={p:_,c:null,e:null,m:!1,s:t,x:null,l:null},tt&&!n&&(_.l={s:null,u:null,r1:[],r2:it(!1)})}function Fr(t){const n=_;if(n!==null){const a=n.e;if(a!==null){var r=f,e=u;n.e=null;try{for(var l=0;l<a.length;l++){var s=a[l];J(s.effect),X(s.reaction),qt(s.fn)}}finally{J(r),X(e)}}_=n.p,n.m=!0}return{}}function Lr(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(ht in t)ut(t);else if(!Array.isArray(t))for(let n in t){const r=t[n];typeof r=="object"&&r&&ht in r&&ut(r)}}}function ut(t,n=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!n.has(t)){n.add(t),t instanceof Date&&t.getTime();for(let e in t)try{ut(t[e],n)}catch{}const r=tn(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const e=Qt(r);for(let l in e){const s=e[l].get;if(s)try{s.call(t)}catch{}}}}}export{Bn as $,Mn as A,Yn as B,it as C,$n as D,mt as E,_r as F,pt as G,f as H,Zn as I,tn as J,Pn as K,vr as L,cn as M,dr as N,q as O,cr as P,Or as Q,An as R,ht as S,qt as T,or as U,yn as V,xr as W,fr as X,gr as Y,Ln as Z,Kn as _,Sr as a,er as a0,kt as a1,g as a2,B as a3,J as a4,nr as a5,rr as a6,lr as a7,Un as a8,Ar as a9,gn as aA,Qn as aB,tr as aC,Vn as aD,Qt as aE,Cr as aF,nt as aG,dt as aH,sr as aa,Xt as ab,Nr as ac,ir as ad,lt as ae,mr as af,X as ag,u as ah,Z as ai,ar as aj,ur as ak,Er as al,_n as am,x as an,Dt as ao,vn as ap,Rt as aq,Gn as ar,Fn as as,Ir as at,Jn as au,b as av,Wn as aw,hn as ax,Xn as ay,Yt as az,Tn as b,p as c,S as d,kr as e,qr as f,br as g,R as h,_ as i,jn as j,Lr as k,dn as l,zn as m,Hn as n,yr as o,wr as p,pr as q,yt as r,Tr as s,Rr as t,Dr as u,Pr as v,Fr as w,hr as x,en as y,tt as z};
|