designix-uis 0.5.37 → 0.5.38
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 +1 -1
- package/dist/public/_app/immutable/chunks/{disclose-version.BhJaPCe6.js → disclose-version.CTbzJKR1.js} +1 -1
- package/dist/public/_app/immutable/chunks/{entry.BOPLbfqM.js → entry.ePISknOx.js} +1 -1
- package/dist/public/_app/immutable/chunks/index-client.DJLnd-Ox.js +1 -0
- package/dist/public/_app/immutable/chunks/index.MrfhoAO-.js +216 -0
- package/dist/public/_app/immutable/chunks/legacy.CkgfcumT.js +1 -0
- package/dist/public/_app/immutable/chunks/makeList.Biqvl4Wy.js +125 -0
- package/dist/public/_app/immutable/chunks/paths.fUfODpPY.js +1 -0
- package/dist/public/_app/immutable/chunks/{runtime.DszaluMK.js → runtime.35-nNaov.js} +1 -1
- package/dist/public/_app/immutable/chunks/{snippet.Dyz5snsn.js → snippet.D5M1YHe-.js} +1 -1
- package/dist/public/_app/immutable/chunks/{store.BRUYvPrV.js → store.DP-XV34k.js} +1 -1
- package/dist/public/_app/immutable/chunks/{stores.D82DeJyw.js → stores.QaV378ul.js} +1 -1
- package/dist/public/_app/immutable/entry/{app.AtOxma3-.js → app.5zT9ZjUC.js} +2 -2
- package/dist/public/_app/immutable/entry/start.DtIei6-w.js +1 -0
- package/dist/public/_app/immutable/nodes/0.KV9sX62Q.js +2 -0
- package/dist/public/_app/immutable/nodes/1.pfXIICvL.js +1 -0
- package/dist/public/_app/immutable/nodes/2.DQHEtYhy.js +1 -0
- package/dist/public/_app/immutable/nodes/3.CXaRiscD.js +7 -0
- package/dist/public/_app/version.json +1 -1
- package/dist/public/gear/gear_bar.html +21 -21
- package/dist/public/gear/gear_epicycloid.html +21 -21
- package/dist/public/gear/gear_ring.html +21 -21
- package/dist/public/gear/gear_wheel.html +21 -21
- package/dist/public/heliostat/base.html +21 -21
- package/dist/public/heliostat/haxis_guidance.html +21 -21
- package/dist/public/heliostat/heliostat.html +21 -21
- package/dist/public/heliostat/heliostat_2.html +21 -21
- package/dist/public/heliostat/pole_static.html +21 -21
- package/dist/public/heliostat/rake.html +21 -21
- package/dist/public/heliostat/rake_stopper.html +21 -21
- package/dist/public/heliostat/ring.html +21 -21
- package/dist/public/heliostat/ring_guidance.html +21 -21
- package/dist/public/heliostat/rod.html +21 -21
- package/dist/public/heliostat/spider.html +21 -21
- package/dist/public/heliostat/surface.html +21 -21
- package/dist/public/heliostat/swing.html +21 -21
- package/dist/public/heliostat/trapeze.html +21 -21
- package/dist/public/heliostat/vaxis.html +21 -21
- package/dist/public/heliostat/vaxis_guidance.html +21 -21
- package/dist/public/heliostat/vaxis_holder.html +21 -21
- package/dist/public/index.html +18 -18
- package/package.json +1 -1
- package/dist/public/_app/immutable/chunks/index-client.BOL5qd8o.js +0 -1
- package/dist/public/_app/immutable/chunks/index.Zd1pjIe_.js +0 -216
- package/dist/public/_app/immutable/chunks/legacy.CatByI85.js +0 -1
- package/dist/public/_app/immutable/chunks/makeList.9UufwhFd.js +0 -125
- package/dist/public/_app/immutable/chunks/paths.Dxjvtojq.js +0 -1
- package/dist/public/_app/immutable/entry/start.D3m-RfHI.js +0 -1
- package/dist/public/_app/immutable/nodes/0.DannA4GN.js +0 -2
- package/dist/public/_app/immutable/nodes/1.B0-aIHPM.js +0 -1
- package/dist/public/_app/immutable/nodes/2.GeWVa4XV.js +0 -1
- package/dist/public/_app/immutable/nodes/3.CE8L2BIi.js +0 -7
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as a}from"./runtime.35-nNaov.js";a();
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
var Rt=Object.defineProperty;var Nt=(s,e,l)=>e in s?Rt(s,e,{enumerable:!0,configurable:!0,writable:!0,value:l}):s[e]=l;var z=(s,e,l)=>Nt(s,typeof e!="symbol"?e+"":e,l);import{L as It,A as Ke,h as it,B as Ct,C as Vt}from"./runtime.35-nNaov.js";import{b as yt}from"./disclose-version.CTbzJKR1.js";import{p as o,a as G,b as xe,c as $e,d as _e,f as ve,g as L,h as J,E as U,j as ce,k as P,l as le,t as Qe,r as ae,m as Bt,n as Le,o as He,q as De,s as Ot,u as X,v as ge,w as Me,x as y,y as Se,z as Be,A as Oe,B as Ge,S as ke,C as Tt}from"./index.MrfhoAO-.js";function po(s){if(it){var e=!1,l=()=>{if(!e){if(e=!0,s.hasAttribute("value")){var t=s.value;et(s,"value",null),s.value=t}if(s.hasAttribute("checked")){var i=s.checked;et(s,"checked",null),s.checked=i}}};s.__on_r=l,Vt(l),yt()}}function Jo(s,e){var l=s.__attributes??(s.__attributes={});l.value===(l.value=e)||s.value===e&&(e!==0||s.nodeName!=="PROGRESS")||(s.value=e)}function mo(s,e){var l=s.__attributes??(s.__attributes={});l.checked!==(l.checked=e)&&(s.checked=e)}function et(s,e,l,t){var i=s.__attributes??(s.__attributes={});it&&(i[e]=s.getAttribute(e),e==="src"||e==="srcset"||e==="href"&&s.nodeName==="LINK")||i[e]!==(i[e]=l)&&(e==="style"&&"__styles"in s&&(s.__styles={}),e==="loading"&&(s[It]=l),l==null?s.removeAttribute(e):typeof l!="string"&&Ft(s).includes(e)?s[e]=l:s.setAttribute(e,l))}var tt=new Map;function Ft(s){var e=tt.get(s.nodeName);if(e)return e;tt.set(s.nodeName,e=[]);for(var l,t=Ke(s),i=Element.prototype;i!==t;){l=Ct(t);for(var c in l)l[c].set&&e.push(c);t=Ke(t)}return e}var pt=class{constructor(s,e,l,t,i){z(this,"base_center_x");z(this,"base_center_y");z(this,"base_radius");z(this,"initial_angle");z(this,"right_nleft");this.base_center_x=s,this.base_center_y=e,this.base_radius=l,this.initial_angle=t,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),l=this.w2FromU(s),t=this.base_center_x+Math.cos(l)*e,i=this.base_center_y+Math.sin(l)*e;return[t,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 l=Math.PI/3,t=l/2,i=this.wFromU(l),c=0;for(;Math.abs(i-s)>1e-4;)i<s?l+=t:l-=t,i=this.wFromU(l),t=t/2,c+=1;return console.log(`dbg072: uFromWslow itcnt ${c}`),l}laptc(s,e,l,t){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,c=this.base_center_x+Math.cos(i)*this.base_radius,r=this.base_center_y+Math.sin(i)*this.base_radius,n=i-this.angleSign()*Math.PI/2,g=l*this.base_radius,a=c+Math.cos(n)*g,u=r+Math.sin(n)*g,h=this.lFromU(l)*t,d=l,_=Math.cos(d)*h,f=Math.sin(d)*h;return[a,u,_,f]}};function Ee(s,e,l,t,i){return new pt(s,e,l,t,i)}var Jt=class{constructor(){z(this,"mod",1);z(this,"TN",23);z(this,"as",1);z(this,"cx",0);z(this,"cy",0);z(this,"brr",50);z(this,"blr",50);z(this,"ar",54);z(this,"pr",53);z(this,"dr",52);z(this,"br",51);z(this,"bRound",1);z(this,"adt",.5);z(this,"initAngle",0);z(this,"axisAngle",0);z(this,"involArcPairs",1);z(this,"skinThickness",0);z(this,"involuteR",Ee(0,0,50,0,!0));z(this,"involuteL",Ee(0,0,50,0,!1));z(this,"rud",0);z(this,"rup",0);z(this,"rua",0);z(this,"rwd",0);z(this,"rwp",0);z(this,"rwa",0);z(this,"lud",0);z(this,"lup",0);z(this,"lua",0);z(this,"lwd",0);z(this,"lwp",0);z(this,"lwa",0);z(this,"msg");z(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,l,t){this.incInitStep(3),this.ar=this.pr+this.mod*s,this.dr=this.pr-this.mod*e,this.br=this.dr-this.mod*l,this.bRound=t}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,l=Math.abs(this.lwa-this.lwp),t=s-e-l;if(t<0)throw`err554: No remaining Addendum reserve ${L(t)}
|
|
2
|
+
`;const i=this.as*(1-this.adt),c=this.rwp-this.rwd,r=Math.abs(this.lwp-this.lwd),n=i-c-r;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 l=(this.rua-this.rud)/s,t=(this.lua-this.lud)/s,i=this.initAngle+e*this.as,c=Ee(this.cx,this.cy,this.brr,i-this.rwp,!0),[r,n]=c.ptc(this.rud+0*l),g=J(r,n,"Gold");for(let S=0;S<s;S++){const[h,d]=c.ptc(this.rud+(S+1)*l);g.addSegStrokeA(h,d)}const a=i+this.as*this.adt,u=Ee(this.cx,this.cy,this.blr,a-this.lwp,!1);for(let S=0;S<s+1;S++){const[h,d]=u.ptc(this.lud+(s-S)*t);g.addSegStrokeA(h,d)}return g.closeSegStroke(),g}getProfile(){this.checkInitStep(7,"getProfile"),this.calcInvoluteAngles(),this.checkProfileConditions();const s=this.rwd-this.rwp,e=this.lwd-this.lwp,l=this.dr>this.brr?this.dr:this.brr,t=this.dr>this.blr?this.dr:this.blr;if(this.bRound>l-this.br)throw`err409: getProfile bRound ${L(this.bRound)} too large for erdr ${L(l)} and br ${L(this.br)}`;if(this.bRound>t-this.br)throw`err408: getProfile bRound ${L(this.bRound)} too large for eldr ${L(t)} and br ${L(this.br)}`;const i=(this.rua-this.rud)/this.involArcPairs,c=(this.lua-this.lud)/this.involArcPairs,r=le(this.cx,this.cy),n=r.translatePolar(this.initAngle+s,this.br),g=J(n.cx,n.cy);for(let a=0;a<this.TN;a++){const u=this.initAngle+a*this.as,S=r.translatePolar(u+s,this.br);g.addSegStrokeA(S.cx,S.cy).addCornerRounded(this.bRound);const h=Ee(this.cx,this.cy,this.brr,u-this.rwp,!0),[d,_]=h.ptc(this.rud),f=h.ptcta(this.rud),H=le(d,_).translatePolar(f-Math.PI/2,this.skinThickness);g.addSegStrokeA(H.cx,H.cy);for(let x=0;x<this.involArcPairs;x++){const O=this.rud+x*i,[I,$]=h.ptc(O+i),m=h.ptcta(O),q=h.ptcta(O+i)+Math.PI,F=le(I,$).translatePolar(m-Math.PI/2,this.skinThickness);g.addPointA(F.cx,F.cy).addSeg2Arcs(m,q)}const k=u+this.as*this.adt,M=Ee(this.cx,this.cy,this.blr,k-this.lwp,!1),D=this.lud+this.involArcPairs*c,[A,N]=M.ptc(D),R=M.ptcta(D)+Math.PI,v=le(A,N).translatePolar(R-Math.PI/2,this.skinThickness);g.addSegStrokeA(v.cx,v.cy);for(let x=0;x<this.involArcPairs;x++){const O=this.lud+(this.involArcPairs-x)*c,[I,$]=M.ptc(O-c),m=M.ptcta(O)+Math.PI,q=M.ptcta(O-c),F=le(I,$).translatePolar(m-Math.PI/2,this.skinThickness);g.addPointA(F.cx,F.cy).addSeg2Arcs(m,q)}const E=r.translatePolar(k+e,this.br);g.addSegStrokeA(E.cx,E.cy).addCornerRounded(this.bRound)}return g.closeSegStroke(),g}getMsg(){return this.msg}};function ot(){return new Jt}function mt(s,e,l,t){s.checkInitStep(1,"helper.gw2center-1"),e.checkInitStep(1,"helper.gw2center-2");const i=s.pr+e.pr+t,c=s.cx+i*Math.cos(l),r=s.cy+i*Math.sin(l);return[c,r,i]}function Gt(s,e,l,t,i,c,r,n,g,a,u){s.checkInitStep(3,"helper.baseCircles-1"),e.checkInitStep(3,"helper.baseCircles-2");let S=l,h=i,d=t,_=c;const f=s.pr+e.pr,H=a,k=u;switch(H){case 0:e.TN>s.TN?(S=s.dr,h=S*e.TN/s.TN):(h=e.dr,S=h*s.TN/e.TN);break;case 1:h=S*e.TN/s.TN;break;case 2:S=h*s.TN/e.TN;break;case 3:S=f*s.TN/(s.TN+e.TN)*Math.cos(ve(r)),h=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?(d=s.dr,_=d*e.TN/s.TN):(_=e.dr,d=_*s.TN/e.TN);break;case 1:_=d*e.TN/s.TN;break;case 2:d=_*s.TN/e.TN;break;case 3:d=f*s.TN/(s.TN+e.TN)*Math.cos(ve(n)),_=d*e.TN/s.TN;break;case 4:break;default:console.log(`err358: involLOpt2 case ${k} is not implemented!`)}return g===1&&(d=S,_=h),[S,d,h,_]}var zt=class{constructor(s,e,l,t,i,c){z(this,"gw1");z(this,"gw2");z(this,"initAngle1");z(this,"angleCenterCenter");z(this,"interAxis");z(this,"rightLeftCenter2");z(this,"msg");z(this,"apr");z(this,"apl");z(this,"lBDr",0);z(this,"lBDl",0);z(this,"laStartRr1",0);z(this,"laStartRr2",0);z(this,"laStartRl1",0);z(this,"laStartRl2",0);z(this,"aFODr1",0);z(this,"aFODr2",0);z(this,"aFODl1",0);z(this,"aFODl2",0);z(this,"lasr1",0);z(this,"lasr2",0);z(this,"lasl1",0);z(this,"lasl2",0);z(this,"firstToothUr1",0);z(this,"firstToothUl1",0);z(this,"ftdr1",0);z(this,"ftdl1",0);this.gw1=s,this.gw2=e,this.initAngle1=l,this.angleCenterCenter=t,this.interAxis=i,this.rightLeftCenter2=c,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,l=this.gw2.ar-this.gw2.pr,t=this.gw2.pr-this.gw2.dr;Se(t-s)<0&&(this.msg+=`warn282: addendum-1 ${L(s)} larger than dedendum-2 ${L(t)}
|
|
8
|
+
`),Se(e-l)<0&&(this.msg+=`warn283: addendum-2 ${L(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),l=this.interAxis-s,t=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,c=Be(this.gw1.ar,s,i);this.aFODr1=Math.PI-i-c;const r=this.gw1.rua-this.apr-this.gw1.rwa;if(Se(this.aFODr1-r)!==0)throw`dbg378: aFODr1 ${this.aFODr1} and aFODr1Alt ${r} differ`;const n=Oe(s,this.gw1.ar,this.aFODr1),g=i,a=Be(this.gw2.ar,l,g);this.aFODr2=Math.PI-g-a;const u=this.gw2.rua-this.apr-this.gw2.rwa;if(Se(this.aFODr2-u)!==0)throw`dbg379: aFODr2 ${this.aFODr2} and aFODr2Alt ${u} differ`;const S=Oe(l,this.gw2.ar,this.aFODr2),h=n+S,d=h/this.gw1.brr,_=h/this.gw2.brr,f=this.gw1.rua-d,H=this.gw2.rua-_;this.laStartRr1=this.gw1.involuteR.lFromU(f),this.laStartRr2=this.gw2.involuteR.lFromU(H);const k=Math.PI/2+this.apl,M=Be(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 A=Oe(e,this.gw1.ar,this.aFODl1),N=k,R=Be(this.gw2.ar,t,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(t,this.gw2.ar,this.aFODl2),x=A+E,O=x/this.gw1.blr,I=x/this.gw2.blr,$=this.gw1.lua-O,m=this.gw2.lua-I;this.laStartRl1=this.gw1.involuteL.lFromU($),this.laStartRl2=this.gw2.involuteL.lFromU(m),this.msg+=`Line of Action Effective length: right: ${L(h)} left: ${L(x)} mm
|
|
12
|
+
`,this.msg+=`Line of Action Effective rotation angle: right-1: ${L(ae(d))} right-2: ${L(ae(_))} left-1: ${L(ae(O))} left-2: ${L(ae(I))} 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(h/this.lasr1)} 2: ${L(h/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=Ge(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=Ge(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,l,t,i,c,r,n,g,a){const S=Math.floor(e/(2*l)),h=(t+S*l)/i,d=s?1:-1,[_,f,H,k]=c.laptc(r,d*n,h,.4);this.msg+=`speed ${g}: vx ${L(H)} vy: ${L(k)} m/s
|
|
19
|
+
`;const M=le(_,f),D=r+d*n,A=J(_,f,a),N=M.translatePolar(D,-k);A.addSegStrokeA(N.cx,N.cy);const R=N.translatePolar(D-d*Math.PI/2,H);return A.addSegStrokeA(R.cx,R.cy),A.closeSegStroke(),A}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"),l=[];return l.push(s),l.push(e),l}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),l=le(this.gw2.cx,this.gw2.cy),t=e.translatePolar(this.angleCenterCenter+this.apr,this.gw1.brr),i=l.translatePolar(this.angleCenterCenter+Math.PI+this.apr,this.gw2.brr),c=J(t.cx,t.cy,"YellowGreen");c.addSegStrokeA(i.cx,i.cy),c.closeSegStroke(),s.push(c);const r=e.translatePolar(this.angleCenterCenter-this.aFODr1,this.gw1.ar),n=l.translatePolar(this.angleCenterCenter+Math.PI-this.aFODr2,this.gw2.ar),g=J(r.cx,r.cy,"Yellow");g.addSegStrokeA(n.cx,n.cy),g.closeSegStroke(),s.push(g);const a=e.translatePolar(this.angleCenterCenter-this.apl,this.gw1.blr),u=l.translatePolar(this.angleCenterCenter+Math.PI-this.apl,this.gw2.blr),S=J(a.cx,a.cy,"YellowGreen");S.addSegStrokeA(u.cx,u.cy),S.closeSegStroke(),s.push(S);const h=e.translatePolar(this.angleCenterCenter+this.aFODl1,this.gw1.ar),d=l.translatePolar(this.angleCenterCenter+Math.PI+this.aFODl2,this.gw2.ar),_=J(h.cx,h.cy,"Yellow");return _.addSegStrokeA(d.cx,d.cy),_.closeSegStroke(),s.push(_),s.push(...this.getContactSpeed()),s}getContactPoint(){const s=[],e=le(this.gw1.cx,this.gw1.cy),l=e.translatePolar(this.angleCenterCenter+this.apr,this.gw1.brr),t=e.translatePolar(this.angleCenterCenter-this.apl,this.gw1.blr);s.push(le(l.cx,l.cy,ke.eBigSquare)),s.push(le(t.cx,t.cy,ke.eBigSquare));const i=this.angleCenterCenter+this.apr-Math.PI/2,c=this.angleCenterCenter-this.apl+Math.PI/2,r=l.translatePolar(i,this.ftdr1),n=t.translatePolar(c,this.ftdl1);s.push(le(r.cx,r.cy,ke.eBigSquare)),s.push(le(n.cx,n.cy,ke.eBigSquare));let g=this.ftdr1;for(;g+this.lasr1<this.lBDr;){g+=this.lasr1;const u=l.translatePolar(i,g);s.push(le(u.cx,u.cy,ke.eBigSquare))}let a=this.ftdl1;for(;a+this.lasl1<this.lBDl;){a+=this.lasl1;const u=t.translatePolar(c,a);s.push(le(u.cx,u.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 l=s/this.gw2.brr,t=e/this.gw2.blr,i=this.angleCenterCenter+Math.PI+this.apr-l+this.gw2.rwp,r=this.angleCenterCenter+Math.PI-this.apl+t+this.gw2.lwp-this.gw2.as*this.gw2.adt;let n=2*Math.PI+Ge(r);for(;Se(n-this.gw2.as-i)>=0;)n=Se(n-this.gw2.as);const g=n-i,a=g*this.gw2.brr/this.gw1.brr,u=g*this.gw2.brr,S=g*this.gw2.blr;this.msg+=`slack angle: 1: ${L(ae(a))} 2: ${L(ae(g))} degree
|
|
20
|
+
`,this.msg+=`slack on action line: right-2: ${L(u)} left-2: ${L(S)} mm
|
|
21
|
+
`;let h=0;if(this.rightLeftCenter2===0)h=i;else if(this.rightLeftCenter2===1)h=r;else if(this.rightLeftCenter2===2)h=i+g/2;else throw`err221: initAngle2 rightLeftCenter2 ${this.rightLeftCenter2} has an unkown value`;return Tt(h)}};function Ut(s,e,l,t,i,c){return new zt(s,e,l,t,i,c)}function qt(s,e,l,t,i,c,r,n,g){let a=P(s,e,l);if(t>0){if(i>2*l)throw`err383: axisTorque ribWidth ${L(i)} larger than 2x axisRadius ${L(l)}`;const u=Math.asin(i/(2*l)),S=2*Math.PI/t;if(S-2.5*u<0)throw`err384: axisTorque ribWidth ${L(i)} or ribNb ${t} are too large`;if(r>i/2)throw`err385: axisTorque ribRound1 ${L(r)} too large compare to ribWidth ${L(i)}`;if(r+n>c)throw`err386: axisTorque ribRound12 ${L(r)} ${L(n)} too large compare to ribHeight ${L(i)}`;const h=S-2*u>Math.PI,d=le(s,e),f=d.translatePolar(g,l+c).translatePolar(g+Math.PI/2,i/2);a=J(f.cx,f.cy);for(let H=0;H<t;H++){const k=g+H*S,M=k+S,D=d.translatePolar(k+u,l),A=d.translatePolar(M-u,l),R=d.translatePolar(k,l+c).translatePolar(k+Math.PI/2,i/2),E=d.translatePolar(M,l+c).translatePolar(M-Math.PI/2,i/2);a.addSegStrokeA(R.cx,R.cy).addCornerRounded(r),a.addSegStrokeA(D.cx,D.cy).addCornerRounded(n),a.addPointA(A.cx,A.cy).addSegArc(l,h,!0).addCornerRounded(n),a.addSegStrokeA(E.cx,E.cy).addCornerRounded(r)}a.closeSegStroke()}return a}function Wt(s,e,l,t,i,c,r,n){const g=2*Math.PI/i,a=Math.asin(c/(2*t)),u=Math.asin(c/(2*l));if(c>2*t)throw`err905: hollowStraight spokeWidth ${L(c)} too large for hollowInt ${L(t)}`;if(l-t<2.1*r)throw`err906: hollowStraight hollowExt ${L(l)}, hollowInt ${L(t)} and spokeRound ${L(r)} do not fit`;if(g-2*u<2.5*Math.asin(r/l))throw`err907: hollowStraight spokeNb ${i}, spokeWidth ${L(c)} or spokeRound ${L(r)} are too large`;const S=c/(2*Math.sin(g/2)),h=g-2*a<2.1*Math.asin(r/t),d=g-2*u>Math.PI,_=le(s,e),f=[];for(let H=0;H<i;H++){const k=n+H*g,M=k+g,D=k+g/2,A=_.translatePolar(k+u,l),N=_.translatePolar(M-u,l),R=_.translatePolar(M-a,t),v=_.translatePolar(k+a,t),E=_.translatePolar(D,S),x=J(A.cx,A.cy);x.addCornerRounded(r),x.addPointA(N.cx,N.cy).addSegArc(l,d,!0).addCornerRounded(r),h?x.addSegStrokeA(E.cx,E.cy).addCornerRounded(r):(x.addSegStrokeA(R.cx,R.cy).addCornerRounded(r),x.addPointA(v.cx,v.cy).addSegArc(t,d,!1).addCornerRounded(r)),x.closeSegStroke(),f.push(x)}return f}function st(s,e,l,t,i,c,r,n,g,a){const u=a?1:-1,S=s/2,h=S+e,d=h+l,_=J(0,-d);return _.addSegStrokeA(u*t,-d).addCornerRounded(r).addSegStrokeA(u*t,-h).addCornerRounded(n).addSegStrokeA(u*i,-h).addSegStrokeA(u*c,-S).addCornerRounded(g).addSegStrokeA(u*c,S).addCornerRounded(g).addSegStrokeA(u*i,h).addSegStrokeA(u*t,h).addCornerRounded(n).addSegStrokeA(u*t,d).addCornerRounded(r).addSegStrokeA(0,d).closeSegStroke(),_}var nt={partName:"gear_wheel",params:[o("module","mm",10,.1,100,.1),o("N1","scalar",23,3,1e3,1),o("N2","scalar",19,3,1e3,1),o("angleCenterCenter","degree",0,-180,180,1),o("addInterAxis","mm",0,0,100,.05),o("c1x","mm",0,-200,200,1),o("c1y","mm",0,-200,200,1),G("Tooth addendum dedendum"),o("ah1","scalar",1,.1,2,.05),o("dh1","scalar",1,.1,2,.05),o("bh1","scalar",.25,.1,2,.05),o("bRound1","mm",2,0,50,.1),o("ah2","scalar",1,.1,2,.05),o("dh2","scalar",1,.1,2,.05),o("bh2","scalar",.25,.1,2,.05),o("bRound2","mm",2,0,50,.1),o("at1","%",50,10,90,.5),o("at2","%",50,10,90,.5),G("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"]),o("brr1","mm",102.9,10,2e3,.05),o("blr1","mm",102.9,10,2e3,.05),o("brr2","mm",85,10,2e3,.05),o("blr2","mm",85,10,2e3,.05),o("rightPressureAngle","degree",26,1,45,.5),o("leftPressureAngle","degree",26,1,45,.5),o("involArcPairs1","scalar",2,1,40,1),o("involArcPairs2","scalar",2,1,40,1),o("skinThickness1","mm",0,-3,3,.01),o("skinThickness2","mm",0,-3,3,.01),o("initAngle1","degree",0,-180,180,1),$e("gw2Position",["right","left","center"]),G("Inner"),xe("centralAxis",!0),o("axisRadius","mm",10,.1,200,.1),o("ribNb","scalar",5,0,32,1),o("ribWidth","mm",8,1,100,.1),o("ribHeight","mm",8,1,100,.1),o("ribRound1","mm",2,0,20,.1),o("ribRound2","mm",2,0,20,.1),xe("hollow",!0),o("materialHeightExt","mm",20,1,200,.5),o("materialHeightInt","mm",15,1,200,.5),o("spokeNb","scalar",5,1,18,1),o("spokeWidth","mm",15,1,200,.1),o("spokeRound","mm",10,0,20,.1),G("Axis"),xe("wheelAxis",!0),o("wheelHeight","mm",40,.1,400,.1),o("wheelMidExtra","mm",6,0,10,.1),o("wheelAxisLength","mm",40,0,400,.1),o("wheelAxisRadius","mm",20,0,200,.1),o("wheelMidRadius","mm",60,0,200,.1),o("wheelRadiusExtra","mm",1,0,20,.1),o("wheelAxisExtRound","mm",4,0,20,.1),o("wheelAxisIntRound","mm",0,0,20,.1),o("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 Yt(s,e,l=""){const t=_e(nt.partName+l),i=y(),c=y();t.logstr+=`${t.partName} simTime: ${s}
|
|
22
|
+
`;try{const r=[],n=ot(),g=ot();n.set1ModuleToothNumber(e.module,e.N1),g.set1ModuleToothNumber(e.module,e.N2),n.set2CenterPosition(e.c1x,e.c1y);const a=ve(e.angleCenterCenter),[u,S,h]=mt(n,g,a,e.addInterAxis);g.set2CenterPosition(u,S),n.set3CircleRadius(e.ah1,e.dh1,e.bh1,e.bRound1),g.set3CircleRadius(e.ah2,e.dh2,e.bh2,e.bRound2);const[d,_,f,H]=Gt(n,g,e.brr1,e.blr1,e.brr2,e.blr2,e.rightPressureAngle,e.leftPressureAngle,e.involSym,e.involROpt,e.involLOpt);t.logstr+=`base-circles: brr1: ${d.toFixed(2)} blr1: ${_.toFixed(2)} brr2: ${f.toFixed(2)} blr2: ${H.toFixed(2)}
|
|
23
|
+
`,n.set4BaseCircles(d,_),g.set4BaseCircles(f,H),n.set5AddendumThickness(e.at1),g.set5AddendumThickness(e.at2);const k=ve(e.initAngle1)+s*3*n.as/100;n.set6Angles(k,a);const M=Ut(n,g,k,a,h,e.gw2Position);M.prepare();for(const x of M.getContours())i.addDynamics(x);i.addPoints(M.getContactPoint()),g.set6Angles(M.getInitAngle2(),a+Math.PI),t.logstr+=M.getMsg(),n.set7InvoluteDetails(e.involArcPairs1,e.skinThickness1),g.set7InvoluteDetails(e.involArcPairs2,e.skinThickness2);for(const x of n.getRefCircles())i.addDynamics(x);for(const x of g.getRefCircles())i.addDynamics(x);i.addDynamics(n.getToothRef()),i.addDynamics(g.getToothRef());const D=n.getProfile();if(t.logstr+=n.getMsg(),t.logstr+=D.check(),r.push(D),e.centralAxis===1){const x=qt(n.cx,n.cy,e.axisRadius,e.ribNb,e.ribWidth,e.ribHeight,e.ribRound1,e.ribRound2,k);t.logstr+=x.check(),r.push(x)}if(e.hollow===1){const x=n.br,O=e.axisRadius+e.ribHeight,I=x-e.materialHeightExt,$=O+e.materialHeightInt;if($>I)throw`err902: hollowMaterialInt ${L($)} bigger than hollowMaterialExt ${L(I)}`;const m=Wt(n.cx,n.cy,I,$,e.spokeNb,e.spokeWidth,e.spokeRound,k);for(const q of m)t.logstr+=q.check(),r.push(q)}i.addMainOI(r);const A=g.getProfile();t.logstr+=A.check(),i.addSecond(A);const N=[],R=n.ar+e.wheelRadiusExtra;if(e.wheelAxis===1){const x=st(e.wheelHeight,e.wheelMidExtra,e.wheelAxisLength,e.wheelAxisRadius,e.wheelMidRadius,R,e.wheelAxisExtRound,e.wheelAxisIntRound,e.wheelExtraRound,!0),O=st(e.wheelHeight,e.wheelMidExtra,e.wheelAxisLength,e.wheelAxisRadius,e.wheelMidRadius,R,e.wheelAxisExtRound,e.wheelAxisIntRound,e.wheelExtraRound,!1);N.push(x),c.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),c.addSecond(O)}c.addMainOI(N),t.fig={teethProfile:i,axisProfile:c};const v=t.partName,E=e.wheelHeight/2+e.wheelMidExtra+e.wheelAxisLength+10;t.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:ce.eIntersection,inList:[`subpax_${v}_teethProfile`,`subpax_${v}_axisProfile`]}]},t.logstr+=`gear_wheel drawn successfully!
|
|
24
|
+
`,t.calcErr=!1}catch(r){t.logstr+=r,console.log(r)}return t}var Xt={pTitle:"Gearwheel",pDescription:"Gear-system with two wheels",pDef:nt,pGeom:Yt},rt={partName:"gear_bar",params:[o("H1","mm",40,1,4e3,1),o("H2","mm",50,1,4e3,1),o("radius","mm",10,1,4e3,1),G("corners"),o("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,l=""){const t=_e(rt.partName+l),i=y();t.logstr+=`${t.partName} simTime: ${s}
|
|
25
|
+
`;try{const c=[],r=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();c.push(r),c.push(P(0,0,e.radius)),i.addMainOI(c),t.fig={faceVoila:i};const n=t.partName;t.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:ce.eIdentity,inList:[`subpax_${n}_top`]}]},t.sub={},t.logstr+=`gear_bar drawn successfully!
|
|
26
|
+
`,t.calcErr=!1}catch(c){t.logstr+=c,console.log(c)}return t}var Zt={pTitle:"Gearbar",pDescription:"Gear-system with a bar and a wheel",pDef:rt,pGeom:jt},ct={partName:"gear_ring",params:[o("H1","mm",40,1,4e3,1),o("H2","mm",50,1,4e3,1),o("radius","mm",10,1,4e3,1),G("corners"),o("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 Kt(s,e,l=""){const t=_e(ct.partName+l),i=y();t.logstr+=`${t.partName} simTime: ${s}
|
|
27
|
+
`;try{const c=[],r=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();c.push(r),c.push(P(0,0,e.radius)),i.addMainOI(c),t.fig={faceVoila:i};const n=t.partName;t.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:ce.eIdentity,inList:[`subpax_${n}_top`]}]},t.sub={},t.logstr+=`gear_ring drawn successfully!
|
|
28
|
+
`,t.calcErr=!1}catch(c){t.logstr+=c,console.log(c)}return t}var Qt={pTitle:"Gearring",pDescription:"Gear-system with a ring and a wheel",pDef:ct,pGeom:Kt},dt={partName:"gear_epicycloid",params:[o("H1","mm",40,1,4e3,1),o("H2","mm",50,1,4e3,1),o("radius","mm",10,1,4e3,1),G("corners"),o("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 eo(s,e,l=""){const t=_e(dt.partName+l),i=y();t.logstr+=`${t.partName} simTime: ${s}
|
|
29
|
+
`;try{const c=[],r=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();c.push(r),c.push(P(0,0,e.radius)),i.addMainOI(c),t.fig={faceVoila:i};const n=t.partName;t.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:ce.eIdentity,inList:[`subpax_${n}_top`]}]},t.sub={},t.logstr+=`gear_epicycloid drawn successfully!
|
|
30
|
+
`,t.calcErr=!1}catch(c){t.logstr+=c,console.log(c)}return t}var to={pTitle:"Gear-epicycloid",pDescription:"The epicycloid gear system",pDef:dt,pGeom:eo};function oo(s){let e="";const l=s.PHD1/2,t=s.PHD5/2,i=2*Math.asin(s.PHR4/l),c=2*Math.asin(s.PHL2/(2*t)),r=2*Math.PI/s.PHN1-c,n=s.PHL2/2,g=Math.sqrt(t**2-n**2)-l,a=Math.sqrt(n**2+g**2),u=Math.acos(g/a),S=Math.acos(s.PHR4/a),h=Math.PI-u-S;if(t<l+s.PHR4)throw`err211: PHD5 ${s.PHD5} too small compare to PHD1 ${s.PHD1} or PHR4 ${s.PHR4}`;if(r<c)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}`;h>Math.PI/2-i&&(e+=`warn345: PHL2 is quiet small ${L(s.PHL2)} mm
|
|
31
|
+
`),e+=`petal angle: ${L(ae(c))} degree
|
|
32
|
+
`,e+=`hollow angle: ${L(ae(r))} degree
|
|
33
|
+
`;const d=le(0,0),f=le(t,0).rotate(d,-c/2),H=le(l,0),k=le(l-s.PHR4,0),M=k.rotate(H,h),D=k.rotate(H,-h),A=J(f.cx,f.cy).addCornerRounded(s.PHR6).addSegStrokeA(M.cx,M.cy).addPointA(l-s.PHR4,0).addPointA(D.cx,D.cy).addSegArc2().addSegStrokeAP(c/2,t).addCornerRounded(s.PHR6).addPointAP(c/2+r/2,t).addPointAP(c/2+r,t).addSegArc2(),N=J(f.cx,f.cy),R=[...Array(s.PHN1).keys()].map(v=>v*(c+r));for(const v of R)N.addPartial(A.rotate(0,0,v));return[e,N,R]}function lt(s){const e="",l=s.D1/2,t=s.D2/2,i=s.D4/2,c=2*Math.PI/s.N1,r=s.L1/2,n=Math.sqrt(t**2-r**2),g=Math.asin(r/t),a=l-n,u=Math.atan2(r,a),S=Math.sqrt(r**2+a**2),h=Math.acos(i/S),d=u+h,_=(c-2*g)/2;if(_<0)throw`err464: N1 ${s.N1} is too large compare to D2 ${s.D2}, L1 ${s.L1}`;if(l<t)throw`err465: D2 ${s.D2} is too large compare to D1 ${s.D1}`;const f=J(n,-r),H=le(0,0),k=le(t,0),M=le(l,0),A=le(l-i,0).rotate(M,d),N=k.rotate(H,g+_),R=k.rotate(H,c-g),v=J(n,-r).addCornerRounded(s.R5).addSegStrokeA(A.cx,A.cy).addPointA(l+i,0).addPointA(A.cx,-A.cy).addSegArc2().addSegStrokeA(n,r).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*c));return[e,f,c]}function Te(s,e){let l="";const t=s.SD2/2,i=t+s.SE1,c=2*i;let r=!1,n=-t,g=-i;if(e&&(r=!0,n=i,g=t),s.SL2<i)throw`err421: SL2 ${s.SL2} is too small compare to SD2 ${s.SD2} and SE1 ${s.SE1}`;l+=`info309: spring height: ${L(s.SL1+c)} length: ${L(s.SN1*2*(s.SD2+s.SE1))}
|
|
34
|
+
`;const a=J(0,0);for(let u=0;u<s.SN1;u++)a.addSegStrokeR(0,-s.SL1).addPointR(2*n,0).addSegArc(Math.abs(n),!1,r),u<s.SN1-1?a.addSegStrokeR(0,s.SL1).addPointR(2*g,0).addSegArc(Math.abs(g),!1,!r):s.Send===1?a.addSegStrokeR(0,s.SL2):a.addSegStrokeR(0,s.SL2-i).addPointR(2*g,0).addSegArc(Math.abs(g),!1,!r);s.Send===1?a.addSegStrokeR(-s.SE1,0):a.addSegStrokeR(s.SE1,0);for(let u=0;u<s.SN1;u++)u>0?a.addPointR(-2*n,0).addSegArc(Math.abs(n),!1,r).addSegStrokeR(0,-s.SL1):s.Send===1?a.addSegStrokeR(0,-s.SL2):a.addPointR(-2*n,0).addSegArc(Math.abs(n),!1,r).addSegStrokeR(0,-s.SL2+i),a.addPointR(-2*g,0).addSegArc(Math.abs(g),!1,!r).addSegStrokeR(0,s.SL1);return[l,a]}function so(s){let e="";const l=s.D6/2,t=2*Math.PI/s.N2,i=s.E2/2,c=2*Math.asin(i/l),r=(t-c)/2,g=(s.N2<3?0:Math.PI/s.N2)+ve(s.SA1),a=Math.PI/2-g,u=-Math.PI/2+g,S=s.SD1/2;if(r<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[h,d]=Te(s,!1),[,_]=Te(s,!0);e+=h;const f=le(0,-l),H=le(0,0),k=f.rotate(H,c),M=f.translate(0,s.L2),D=M.translate(-S,0),A=D.translate(0,S),N=D.translate(0,S+s.SE1),R=N.rotate(D,a),v=M.translate(0,S+s.SE1).translate(s.SE1,0),E=f.rotate(H,-c),x=M.translate(S,0),O=x.translate(0,S),I=O.rotate(x,u),$=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(d.rotate(0,0,-g).translate(R.cx,R.cy)),F.addPointA(A.cx,A.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(I.cx,I.cy).addSegArc2();T.addPartial(_.rotate(0,0,g).translate(I.cx,I.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),C=J(l,0);if(s.orientation===2)for(let K=0;K<s.N2/2;K++){C.addPointAP(-2*K*t-2*r,l).addPointAP(-2*K*t-4*r,l).addSegArc2(),C.addCornerRounded(s.R7);const ie=Math.PI/2-(2*K+2)*t,V=ie+2*c;C.addPartial(T.rotate(0,0,V));const te=F.rotate(0,0,ie),w=te.getFirstPoint();C.addCornerRounded(s.R7),C.addSegStrokeA(w.cx,w.cy),C.addCornerRounded(s.R7),C.addPartial(te),C.addCornerRounded(s.R7)}else for(let K=0;K<s.N2;K++)C.addPointAP(-K*t-r,l).addPointAP(-K*t-2*r,l).addSegArc2().addCornerRounded(s.R7),s.orientation===0?C.addPartial(Y.rotate(0,0,Math.PI/2-(K+1)*t+c)):s.orientation===1&&C.addPartial(q.rotate(0,0,Math.PI/2-(K+1)*t)),C.addCornerRounded(s.R7);return[e,C]}var gt={partName:"vaxis_holder",params:[o("PHD1","mm",700,1,2e3,1),o("PHD2","mm",900,1,4e3,1),o("PHD5","mm",800,1,4e3,1),o("PHN1","holes",6,1,24,1),G("screw holes"),o("PHD3","mm",40,1,100,1),o("PHR4","mm",40,1,100,1),o("PHL2","mm",120,1,400,1),o("PHR6","mm",20,0,400,1),G("section"),o("PHE1","mm",10,1,80,1),o("PHH1","mm",50,1,200,1),o("PHA","degree",5,-45,45,.1),o("PHL1","mm",300,1,500,1),o("PHE2","mm",10,1,80,1),o("PHE3","mm",10,1,80,1),G("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 io(s,e,l=""){const t=_e(gt.partName+l),i=y(),c=y(),r=y(),n=y(),g=y();t.logstr+=`${t.partName} simTime: ${s}
|
|
35
|
+
`;try{const a=ve(e.PHA),u=e.PHD1/2,S=e.PHD2/2,h=e.PHD3/2,d=e.PHD5/2,_=S+e.PHL1/2*Math.sin(a),f=S-e.PHL1/2*Math.sin(a),H=e.PHL1*Math.cos(a),k=S-e.PHE2/Math.cos(a)+e.PHE1/2*Math.tan(a),M=S-e.PHE2/Math.cos(a)-e.PHE1/2*Math.tan(a),D=Math.min(k,M),A=(e.PHL1-e.PHE1/Math.cos(a))/2,N=S-e.PHE2/Math.cos(a);if(D<d)throw`err210: PHD5 ${e.PHD5} too large compare to PHE2 ${e.PHE2} or PHA ${e.PHA}`;t.logstr+=`vaxis_holder's height: ${L(H)} mm
|
|
36
|
+
`,t.logstr+=`vaxis_holder outerD1: ${L(2*_)} mm
|
|
37
|
+
`,t.logstr+=`vaxis_holder outerD2: ${L(2*f)} mm
|
|
38
|
+
`,t.logstr+=`vaxis_holder innerD: ${L(e.PHD1-2*e.PHR4)} mm
|
|
39
|
+
`,t.logstr+=`vaxis_holder D2-next: ${L(2*N)} mm
|
|
40
|
+
`;const R=function(V){const te=d+(k-d)/2;return J(V*te,-e.PHE1/2).addSegStrokeR(V*(k-te),0).addSegStrokeRP(-Math.PI/2+V*a,A).addSegStrokeRP(-Math.PI/2+V*(Math.PI/2+a),e.PHE2).addSegStrokeRP(Math.PI/2+V*a,e.PHL1).addSegStrokeRP(Math.PI/2+V*(Math.PI/2+a),e.PHE2).addSegStrokeRP(-Math.PI/2+V*a,A).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*(u-e.PHR4),e.PHE1/2).addSegStrokeA(V*(u-e.PHR4),-e.PHE1/2).closeSegStroke()},E=function(V){return J(V*(u+h),-e.PHE1/2).addSegStrokeA(V*(u+h),e.PHE1/2).addSegStrokeA(V*(u-h),e.PHE1/2).addSegStrokeA(V*(u-h),-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*(u+e.PHR4),-e.PHE1/2).addSegStrokeA(V*k,-e.PHE1/2).addSegStrokeRP(-Math.PI/2+V*a,A).closeSegStroke()},O=function(V){return J(V*(u+e.PHR4),e.PHE1/2).addSegStrokeA(V*M,e.PHE1/2).addSegStrokeRP(Math.PI/2+V*a,A).addSegStrokeA(V*(u+e.PHR4),e.PHE1/2+e.PHH1).closeSegStroke()},I=function(V){const te=le(V*M,e.PHE1/2).translatePolar(Math.PI/2+V*a,A),w=le(V*k,-e.PHE1/2).translatePolar(-Math.PI/2+V*a,A),W=S-e.PHE2/2;return J(V*W,0).addSegStrokeA(te.cx,te.cy).addSegStrokeA(V*(u+e.PHR4),e.PHE1/2+e.PHH1).addSegStrokeA(V*(u+e.PHR4),e.PHE1/2).addSegStrokeA(V*(u+e.PHR4),-e.PHE1/2).addSegStrokeA(w.cx,w.cy).closeSegStroke()};i.addSecond(x(-1)),i.addSecond(O(-1)),r.mergeFigure(i,!0),n.mergeFigure(i,!0),g.mergeFigure(i,!0),i.addSecond(x(1)),i.addSecond(O(1)),r.addMainO(x(1)),r.addSecond(O(1)),n.addSecond(x(1)),n.addMainO(O(1)),g.addMainO(I(1));const $=[];$.push(P(0,0,D)),c.addSecond(P(0,0,S)),c.addSecond(P(0,0,Math.max(_,f)));const[m,q,F]=oo(e);t.logstr+=m,$.push(q);for(const V of F){const te=le(0,0).translatePolar(V,u);$.push(P(te.cx,te.cy,e.PHD3/2))}const T=J(u+e.PHR4,-e.PHE3).addSegStrokeA(D,-e.PHE3).addSegStrokeA(D,e.PHE3).addSegStrokeA(u+e.PHR4,e.PHE3).closeSegStroke();for(const V of F)c.addSecond(T.rotate(0,0,V));c.addMainOI($),t.fig={facePetal:c,faceOuter:i,faceButtress1:r,faceButtress2:n,faceButtress12:g};const p=t.partName,Y=Qe();Y.addRotation(Math.PI/2,0,0),Y.addTranslation(0,e.PHE3/2,0);const C=F.map((V,te)=>{const w=Qe(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`]:[];t.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]},...C],volumes:[{outName:`pax_${p}`,boolMethod:ce.eUnion,inList:[`subpax_${p}_petal`,...ie,...K]}]},t.sub={},t.logstr+=`vaxis_holder drawn successfully!
|
|
41
|
+
`,t.calcErr=!1}catch(a){t.logstr+=a,console.log(a)}return t}var Ae={pTitle:"Heliostat vaxis_holder",pDescription:"The holders of the guidance mechanism for azimuth motion",pDef:gt,pGeom:io},ht={partName:"pole_static",params:[o("D1","mm",1e3,20,4e3,1),o("D2","mm",700,10,4e3,1),o("D3","mm",800,10,4e3,1),o("H1","mm",3e3,10,4e4,10),o("H2","mm",7e3,50,4e4,10),G("thickness"),o("E1","mm",30,1,80,1),o("E2","mm",5,1,80,1),G("base holes"),o("N1","",32,3,100,1),o("D5","mm",40,1,100,1),o("L1","mm",45,1,300,1),G("door"),o("D4","mm",600,1,1200,1),o("H3","mm",300,5,1200,1),o("H4","mm",1800,10,2500,1),o("L2","mm",30,1,100,1),o("E3","mm",40,1,100,1),G("holders"),xe("holders",!0),o("PHL1A","mm",400,1,1e3,1),o("PHL1B","mm",400,1,1e3,1),o("PHB","mm",5e3,1,2e4,1),o("PHD1A","mm",600,1,4e3,1),o("PHD1B","mm",380,1,4e3,1),o("PHN1AB","petal",6,1,24,1),G("holder-B"),o("PHD5B2","mm",600,1,4e3,1),o("PHD5B1","mm",600,1,4e3,1),o("PHR4B","mm",30,1,400,1),o("PHD3B","mm",40,1,400,1),o("PHL2B","mm",140,1,400,1),o("PHE3B","mm",10,1,50,1),o("PHR6B","mm",20,0,400,1),o("PHE1B","mm",10,1,50,1),o("PHH1B","mm",10,1,50,1),G("holder-A"),o("PHD5A","mm",900,1,4e3,1),o("PHR4A","mm",30,1,400,1),o("PHD3A","mm",40,1,400,1),o("PHL2A","mm",200,1,400,1),o("PHE3A","mm",10,1,50,1),o("PHR6A","mm",20,0,400,1),o("PHE1A","mm",10,1,50,1),o("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 no(s,e,l=""){const t=_e(ht.partName+l),i=y(),c=y(),r=y(),n=y(),g=y(),a=y(),u=y(),S=y(),h=y(),d=y(),_=y();t.logstr+=`${t.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),A=e.E2*Math.tan(D/2),N=e.H1-A,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,I=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}`}t.logstr+=`pole-height: ${L(M)} mm
|
|
43
|
+
`,t.logstr+=`cone-half-angle: ${L(ae(D))} degree
|
|
44
|
+
`,t.logstr+=`holder position: A: ${L(m)} B1: ${L(O)} B2: ${L(E)} mm
|
|
45
|
+
`;const q=function(b){let Z=H-e.E2*Math.cos(D);return Z+=(M-e.E2*Math.sin(D)-b)*Math.tan(D),Z},F=function(b,Z){const j=J(b*f,0).addSegStrokeA(b*f,e.H1).addSegStrokeA(b*H,M).addSegStrokeR(-b*e.E2*Math.cos(D),-e.E2*Math.sin(D));if(Z&&e.holders){const he=e.H1+e.PHL1A/2-e.PHE1A/2,re=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(b*q(ue),ue).addSegStrokeA(b*(e.PHD1B/2-e.PHR4B),ue).addSegStrokeA(b*(e.PHD1B/2-e.PHR4B),oe).addSegStrokeA(b*q(oe),oe).addSegStrokeA(b*q(Q),Q).addSegStrokeA(b*(e.PHD1B/2-e.PHR4B),Q).addSegStrokeA(b*(e.PHD1B/2-e.PHR4B),fe).addSegStrokeA(b*q(fe),fe).addSegStrokeA(b*q(re),re).addSegStrokeA(b*(e.PHD1A/2-e.PHR4A),re).addSegStrokeA(b*(e.PHD1A/2-e.PHR4A),he).addSegStrokeA(b*q(he),he)}return j.addSegStrokeA(b*(f-e.E2),N),Z?j.addSegStrokeA(b*(f-e.E2),e.E1).addSegStrokeA(b*k,e.E1).addSegStrokeA(b*k,0):j.addSegStrokeA(b*(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(b){const Z=T-b;return Bt(0,e.H3+T-Z,2*Z,p+2*Z,Math.PI/2)};c.addMainOI([Y(0),Y(e.L2)]);const C=J(f,0).addSegStrokeA(f,e.H1).addSegStrokeA(H,M).addSegStrokeA(-H,M).addSegStrokeA(-f,e.H1).addSegStrokeA(-f,0).closeSegStroke();c.addSecond(C);const K=J(-f,e.H3).addSegStrokeR(0,e.H4).addSegStrokeR(-e.E3,0).addSegStrokeR(0,-e.H4).closeSegStroke();c.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 b=0;b<e.N1;b++){const Z=V*Math.cos(b*te),j=V*Math.sin(b*te);ie.push(P(Z,j,e.D5/2))}r.addSecond(P(0,0,H)),r.addSecond(P(0,0,f-e.E2)),r.addMainOI(ie),n.addMainOI([P(0,0,f+e.E3),P(0,0,f-e.E2)]),g.addMainO(Y(e.L2));const w=t.partName,W=[],ne=[];let B={};if(e.holders){const Z=Le(Ae.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=Ae.pGeom(0,Z.getParamVal(),Z.getSuffix());He(j),t.logstr+=De(j.logstr,Z.getPartNameSuffix()),a.mergeFigure(j.fig.faceOuter),u.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 re=Le(Ae.pDef,"B1");re.setVal("PHD1",e.PHD1B),re.setVal("PHD2",2*x),re.setVal("PHD5",e.PHD5B1),re.setVal("PHN1",e.PHN1AB),re.setVal("PHD3",e.PHD3B),re.setVal("PHR4",e.PHR4B),re.setVal("PHL2",e.PHL2B),re.setVal("PHR6",e.PHR6B),re.setVal("PHE1",e.PHE1B),re.setVal("PHH1",e.PHH1B),re.setVal("PHA",ae(D)),re.setVal("PHL1",R),re.setVal("PHE2",e.E2),re.setVal("PHE3",e.PHE3B),re.setVal("withOuterCone",1);const ue=Ae.pGeom(0,re.getParamVal(),re.getSuffix());He(ue),t.logstr+=De(ue.logstr,re.getPartNameSuffix()),S.mergeFigure(ue.fig.faceOuter),h.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(Ae.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",I),Q.setVal("PHE2",e.E2),Q.setVal("PHE3",e.PHE3A),Q.setVal("withOuterCone",1);const fe=Ae.pGeom(0,Q.getParamVal(),Q.getSuffix());He(fe),t.logstr+=De(fe.logstr,Q.getPartNameSuffix()),d.mergeFigure(fe.fig.faceOuter),_.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`),B={vaxis_holder_B2:{partName:Z.getPartName(),dparam:Z.getDesignParamList(),orientation:[0,0,0],position:[0,0,E]},vaxis_holder_B1:{partName:re.getPartName(),dparam:re.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]}}}t.fig={poleCut:i,poleFace:c,poleBottom:r,emptyPole:n,emptyDoor:g,holderB2Section:a,holderB2Top:u,holderB1Section:S,holderB1Top:h,holderASection:d,holderATop:_},t.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:ce.eIntersection,inList:[`subpax_${w}_door`,`subpax_${w}_emptyPole`]},{outName:`ipax_${w}_pole`,boolMethod:ce.eSubstraction,inList:[`subpax_${w}_pole`,`subpax_${w}_emptyDoor`]},{outName:`pax_${w}`,boolMethod:ce.eUnion,inList:[`ipax_${w}_pole`,`subpax_${w}_bottom`,`ipax_${w}_door`,...ne]}]},t.sub=B,t.logstr+=`pole_static drawn successfully!
|
|
46
|
+
`,t.calcErr=!1}catch(f){t.logstr+=f,console.log(f)}return t}var Ne={pTitle:"Heliostat pole static",pDescription:"The vertical pole of an heliostat",pDef:ht,pGeom:no},at={partName:"rake",params:[o("D1","mm",600,10,4e3,1),o("D2","mm",400,10,4e3,1),o("D3","mm",400,10,4e3,1),o("H1","mm",800,1,4e3,1),o("H2","mm",3e3,20,6e3,1),o("H3","mm",400,0,4e3,1),o("E1","mm",20,1,80,1),o("E3","mm",30,1,80,1),G("transversal"),o("H4","mm",400,10,1e3,1),o("D4","mm",300,10,1e3,1),o("E4","mm",20,1,80,1),o("H5","mm",1e3,10,2e3,1),o("D5","mm",200,1,1e3,1),o("L4","mm",300,1,1e3,1),o("L5","mm",2e3,10,4e3,1),o("L6","mm",2e3,1,4e3,1),o("D8","mm",400,1,1e3,1),G("diagonal"),o("D6","mm",100,1,600,1),o("E6","mm",10,1,80,1),o("L7","mm",100,1,1e3,1),o("L8","mm",200,1,1e3,1),G("base"),o("N1","",24,3,100,1),o("D7","mm",40,1,100,1),o("L1","mm",30,1,300,1),G("door"),o("H6","mm",100,1,1e3,1),o("H7","mm",600,10,2e3,1),o("L9","mm",300,1,1e3,1),o("R9","mm",50,0,300,1),o("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 ro(s,e,l=""){const t=_e(at.partName+l),i=y(),c=y(),r=y(),n=y(),g=y(),a=y(),u=y(),S=y(),h=y();t.logstr+=`${t.partName} simTime: ${s}
|
|
47
|
+
`;try{const _=Math.PI/2,f=-Math.PI/2,H=e.D1/2,k=e.D2/2,M=e.D3/2,D=e.D4/2,A=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,I=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=A*Math.cos(Math.PI/6),T=A*Math.sin(Math.PI/6),p=v*Math.cos(Math.PI/6),Y=v*Math.sin(Math.PI/6),C=[-I/2,-e.L5/2-e.L4,e.L5/2,I/2-e.L4],K=e.H2-e.L8-e.H4-D,ie=Math.atan2(H-k,e.H2),V=I/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,B=H-e.L8*Math.tan(ie)-W*Math.sin(w),b=e.H1+e.L8-W*Math.cos(w),Z=B-N*Math.cos(w),j=b+N*Math.sin(w),he=N-e.E6,re=B-e.E6*Math.cos(w),ue=b+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}`;t.logstr+=`rake-L4: ${L(e.L4)} mm (compare with swing)
|
|
48
|
+
`,t.logstr+=`rake-L5: ${L(e.L5)} mm (compare with swing)
|
|
49
|
+
`,t.logstr+=`rake-L6: ${L(e.L6)} mm (compare with swing)
|
|
50
|
+
`,t.logstr+=`rake-beamL (4*L4+L5+2*L6): ${L(I)} mm (compare with swing)
|
|
51
|
+
`,t.logstr+=`cone-height: ${L(x)} mm
|
|
52
|
+
`,t.logstr+=`cone-height total: ${L(O)} mm
|
|
53
|
+
`,t.logstr+=`cone-angle: ${L(ae(ie))} degree
|
|
54
|
+
`,t.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),Mt=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()},be=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()},Et=$-D-(e.H1-ee),At=H-e.E1-Math.tan(ie)*Et,bt=J(0,$-D).addSegStrokeA(At,$-D).addSegStrokeA(H-e.E1,e.H1-ee).addSegStrokeA(H-e.E1,e.H1-e.H3).addSegStrokeA(0,e.H1-e.H3).closeSegStroke(),Fe=Ot(-Q,e.H1+e.H6,e.L9,2*fe,e.H7,e.R9);i.addMainO(Mt(1)),i.addSecond(be(1)),i.addSecond(be(-1)),i.addSecond(X(-I/2,$,I,e.D4,0)),i.addSecond(X(-I/2,$,I,E,0));for(const de of C)i.addSecond(ge(de,$+q,e.L4,e.H5-q-T));i.addSecond(Me(B,b,ne,2*N,oe)),i.addSecond(Me(re,ue,ne,2*he,oe)),i.addSecond(Me(-B,b,2*N,ne,w)),i.addSecond(Me(-re,ue,2*he,ne,w)),i.addSecond(Fe),c.mergeFigure(i,!0),c.addMainO(bt);const pe=[],Je=J(m,$+q).addSegStrokeA(p,$+e.H5-Y).addSegStrokeA(F,$+e.H5-T).addPointA(-F,$+e.H5-T).addSegArc(A,!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)),r.addSecond(be(1)),r.addSecond(be(-1)),r.addSecond(Je),r.addSecond(P(0,$+e.H5,A)),r.addSecond(X(0,e.H1+e.L8,K,2*N,_)),r.addSecond(X(0,e.H1+e.L8,K,2*he,_)),r.addSecond(Fe),r.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))}g.addSecond(P(0,0,H-e.E1)),g.addSecond(P(0,0,k)),g.addSecond(X(0,-I/2,I,e.D4,_)),g.addSecond(X(0,-I/2,I,E,_));for(const de of C)g.addSecond(X(0,de,e.L4,2*m,_)),g.addSecond(X(0,de,e.L4,2*F,_)),g.addSecond(X(0,de,e.L4,2*p,_));const ye=H-e.L8*Math.tan(ie);g.addSecond(X(0,ye,V,2*N,_)),g.addSecond(X(0,ye,V,2*he,_)),g.addSecond(X(0,-ye,V,2*N,f)),g.addSecond(X(0,-ye,V,2*he,f)),g.addMainOI(Ve),a.addMainO(Je),a.addSecond(P(0,$,D)),a.addSecond(P(0,$,D-e.E4)),a.addSecond(P(0,$+e.H5,A));const me=[];me.push(P(0,0,N)),me.push(P(0,0,he)),u.addMainOI(me),S.addSecond(P(0,0,N)),S.addMainO(P(0,0,he)),h.addMainO(Fe),h.addSecond(be(1)),h.addSecond(be(-1)),h.addSecond(X(-I/2,$,I,e.D4,0)),h.addSecond(X(-I/2,$,I,E,0));for(const de of C)h.addSecond(ge(de,$+q,e.L4,e.H5-q-T));h.addSecond(Me(B,b,ne,2*N,oe)),h.addSecond(Me(re,ue,ne,2*he,oe)),h.addSecond(Me(-B,b,2*N,ne,w)),h.addSecond(Me(-re,ue,2*he,ne,w)),t.fig={faceCone:i,faceConeHollow:c,faceBeam:r,faceBeamHollow:n,faceDisc:g,faceHand:a,faceWing:u,faceWingHollow:S,faceDoor:h};const se=t.partName,kt=C.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]}));t.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:I,rotate:[Math.PI/2,0,0],translate:[0,I/2,0]},{outName:`subpax_${se}_beamHollow`,face:`${se}_faceBeamHollow`,extrudeMethod:U.eLinearOrtho,length:I,rotate:[Math.PI/2,0,0],translate:[0,I/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]},...kt],volumes:[{outName:`ipax_${se}_plus`,boolMethod:ce.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:ce.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:ce.eSubstraction,inList:[`ipax_${se}_plus`,`ipax_${se}_hollow`]}]},t.sub={},t.logstr+=`heliostat-rake drawn successfully!
|
|
56
|
+
`,t.calcErr=!1}catch(d){t.logstr+=d,console.log(d)}return t}var Ie={pTitle:"Heliostat rake",pDescription:"The rake on top of the V-Axis of the heliostat",pDef:at,pGeom:ro},ze={partName:"spider",params:[o("D1","mm",100,1,400,1),o("L1","mm",400,1,1e3,1),o("L2","mm",400,1,1e3,1),o("L3","mm",100,1,400,1),o("L4","mm",3e3,10,8e3,10),G("longitude"),o("L5","mm",2e3,1,8e3,1),o("N1","",6,1,20,1),o("L6","mm",30,1,100,1),G("thickness"),o("E1","mm",3,1,80,1),o("E2","mm",50,1,200,1),o("E3","mm",3,1,80,1),o("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 co(s,e,l=""){const t=_e(ze.partName+l);let i,c;const r=y(),n=y(),g=y();t.logstr+=`${t.partName} simTime: ${s}
|
|
57
|
+
`;try{const a=e.D1/2;if(e.D1<e.E2)throw`err476: D1 ${e.D1} smaller then E2 ${e.E2}`;const u=e.E2/2,S=Math.sqrt(a**2-u**2),h=e.L1+e.L2*Math.sqrt(2),d=e.L2+e.L1*Math.sqrt(2),_=e.L4-d;if(_<e.R2)throw`err984: L4 ${e.L4} too small compare to R2 ${e.R2}`;const f=_*Math.cos(Math.PI/4),H=_*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(a<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 A=(e.L3-e.E2)/2*Math.cos(Math.PI/4),N=h+f+A,R=-e.L1-H+A,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()},c=function(T,p,Y,C){return J(Y,C).addSegStrokeA(Y+T,C).addSegStrokeA(Y+T,C+p).addSegStrokeA(Y,C+p).closeSegStroke()};const O=Math.sin(2*Math.PI*s/ze.sim.tMax)*Math.PI/2;t.logstr+=`spide leg number: ${e.N1}
|
|
58
|
+
`,t.logstr+=`spide position angle: ${L(ae(O))} degree
|
|
59
|
+
`;const I=[],$=J(u,-S).addCornerRounded(e.R2).addSegStrokeA(u,-e.L1).addCornerRounded(e.R2).addSegStrokeA(h,-e.L1).addCornerRounded(e.R2+e.E2).addSegStrokeA(h+f,-e.L1-H).addSegStrokeA(h+f-k,-e.L1-H-M).addSegStrokeA(h-D,-e.L1-e.E2).addCornerRounded(e.R2).addSegStrokeA(-h+D,-e.L1-e.E2).addCornerRounded(e.R2).addSegStrokeA(-h-f+k,-e.L1-H-M).addSegStrokeA(-h-f,-e.L1-H).addSegStrokeA(-h,-e.L1).addCornerRounded(e.R2+e.E2).addSegStrokeA(-u,-e.L1).addCornerRounded(e.R2).addSegStrokeA(-u,-S).addCornerRounded(e.R2).closeSegArc(a,!0,!1);I.push($),I.push(P(0,0,a-e.E1)),r.addSecond(i(N,R,e.L3)),r.addSecond(i(N,v,e.L3-2*e.E3)),r.addSecond(i(-N,R,e.L3)),r.addSecond(i(-N,v,e.L3-2*e.E3)),r.addMainOI(I),n.addMainOI([P(0,0,a),P(0,0,a-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($),g.addSecond(c(e.L5,e.D1,0,-e.D1/2)),g.addSecond(c(e.L5,e.L3,0,-e.L4-e.L3));for(const T of x)g.addSecond(c(e.L6,e.L4,T,-e.L4));t.fig={faceLegs:r.rotate(0,0,O),faceTube:n.rotate(0,0,O),faceBody:g};const m=t.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}`);t.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:ce.eUnion,inList:[`subpax_${m}_tube`,...F]}]},t.sub={},t.logstr+=`heliostat-spider drawn successfully!
|
|
60
|
+
`,t.calcErr=!1}catch(a){t.logstr+=a,console.log(a)}return t}var Ue={pTitle:"Heliostat spider",pDescription:"The spider part for the control of the inclination of the heliostat",pDef:ze,pGeom:co},ut={partName:"swing",params:[o("L1","mm",12500,100,4e4,1),o("L2","mm",6e3,100,4e4,1),G("radial"),o("D1","mm",400,1,1e3,1),o("E1","mm",5,1,80,1),o("H2","mm",100,1,400,1),o("H4","mm",100,1,400,1),o("E2","mm",3,1,80,1),o("L3","mm",500,1,4e3,1),G("longitudinal"),o("L4","mm",600,1,4e3,1),o("L5","mm",2e3,1,1e4,1),o("L6","mm",2e3,1,1e4,1),o("H1","mm",100,1,400,1),o("H3","mm",100,1,400,1),o("E3","mm",3,1,80,1),G("buttress"),o("S1","mm",300,0,3e3,1),o("S2","mm",10,0,2e3,1),o("R2","mm",100,0,1e3,1),G("rod overlay"),o("rod1","",10,1,40,1),o("rod2","mm",1300,10,4e3,1),o("rod3","mm",400,10,1e3,1),o("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 lo(s,e,l=""){const t=_e(ut.partName+l),i=y(),c=y(),r=y(),n=y(),g=y();t.logstr+=`${t.partName} simTime: ${s}
|
|
61
|
+
`;try{const a=e.D1/2,u=a+e.S2,S=4*e.L4+e.L5+2*e.L6-2*e.H1,h=e.L4-2*e.H1,d=e.L5+2*e.H1,_=e.L6+2*e.H1;t.logstr+=`swing size: L1 ${L(e.L1)} x L2 ${L(e.L2)} mm
|
|
62
|
+
`,t.logstr+=`rake-L4: ${L(h)} mm (compare with rake)
|
|
63
|
+
`,t.logstr+=`rake-L5: ${L(d)} mm (compare with rake)
|
|
64
|
+
`,t.logstr+=`rake-L6: ${L(_)} mm (compare with rake)
|
|
65
|
+
`,t.logstr+=`rake-beamL: (4*L4+L5+2*L6-2*H1) ${L(S)} mm (compare with rake)
|
|
66
|
+
`,i.addMainOI([P(0,0,a),P(0,0,a-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,u-e.H4,e.H2,e.H4),ge(F+e.E2,u-e.H4+e.E2,e.H2-2*e.E2,e.H4-2*e.E2)]);i.addSecond(ge(-e.L2/2,u,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)c.addMainOI([ge(F,u,e.H1,e.H3),ge(F+e.E3,u+e.E3,e.H1-2*e.E3,e.H3-2*e.E3)]);c.addSecond(ge(-e.L1/2,-a,e.L1,e.D1)),c.addSecond(ge(-e.L1/2,u-e.H4,e.L1,e.H4));for(const F of H)r.addSecond(ge(F,-e.L2/2,e.H1,e.L2));for(const F of f)r.addSecond(ge(-e.L1/2,F,e.L1,e.H2));r.addSecond(ge(-e.L1/2,-a,e.L1,e.D1));const k=Math.sqrt(u**2+e.S1**2),M=Math.acos(a/k),D=Math.atan2(e.S1,u),A=le(0,0),R=A.translatePolar(Math.PI/2+D,a).rotate(A,M),v=J(-e.L3,u).addSegStrokeA(-e.S1,u).addCornerRounded(e.R2).addSegStrokeA(R.cx,R.cy).addPointA(0,-a).addPointA(-R.cx,R.cy).addSegArc2().addSegStrokeA(e.S1,u).addCornerRounded(e.R2).addSegStrokeA(e.L3,u).addSegStrokeA(e.L3,u+e.E3).addSegStrokeA(-e.L3,u+e.E3).closeSegStroke();n.addMainOI([v,P(0,0,a-e.E1)]),i.addSecond(v);for(const F of H)g.addMainO(ge(F,-e.L2/2,e.H1,e.L2));for(const F of f)g.addMainO(ge(-e.L1/2,F,e.L1,e.H2));g.addMainO(ge(-e.L1/2,-a,e.L1,e.D1));const E=-((e.rod1-1)*e.rod2+e.rod3)/2,x=(e.rod3-e.rod4)/2,O=e.rod3/2,I=1.2*e.L2,$=(I-O)/3,m=-I/2;for(let F=0;F<e.rod1;F++){const T=E+F*e.rod2;g.addSecond(ge(T+x,m,e.rod4,I));for(let p=0;p<4;p++)g.addSecond(ge(T,m+p*$,e.rod3,O,O/4))}t.fig={faceSide:i,faceFace:c,faceTop:r,faceButtress:n,faceTopWithRods:g};const q=t.partName;t.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:ce.eUnion,inList:[`subpax_${q}_side`,`subpax_${q}_face`,...H.map((F,T)=>`subpax_${q}_buttress_${T}`)]}]},t.sub={},t.logstr+=`heliostat-swing drawn successfully!
|
|
67
|
+
`,t.calcErr=!1}catch(a){t.logstr+=a,console.log(a)}return t}var Ce={pTitle:"Heliostat swing",pDescription:"The swing for the heliostat inclination",pDef:ut,pGeom:lo},qe={partName:"heliostat",params:[o("H1","mm",3e3,10,4e4,1),o("H2","mm",2500,50,4e4,1),o("D1","mm",1e3,20,4e3,1),o("D2","mm",700,20,4e3,1),o("E1","mm",30,1,80,1),G("rake"),o("H3","mm",200,1,500,1),o("H4","mm",800,1,4e3,1),o("H5","mm",3e3,50,6e3,1),o("H6","mm",200,1,4e3,1),o("H7","mm",800,1,4e3,1),o("H8","mm",200,1,4e3,1),o("D3","mm",900,20,4e3,1),o("D4","mm",400,20,4e3,1),o("D5","mm",300,20,1e3,1),o("D6","mm",200,10,1e3,1),o("D7","mm",400,10,1e3,1),G("rake diagonal"),o("D9","mm",100,1,1e3,1),o("L7","mm",100,1,1e3,1),o("L8","mm",200,1,1e3,1),G("spider"),o("D8","mm",100,1,1e3,1),o("S1","mm",250,1,800,1),o("S2","mm",200,1,800,1),o("E2","mm",50,1,80,1),G("swing"),o("L1","mm",12500,100,4e4,1),o("L2","mm",6e3,100,4e4,1),o("L3","mm",100,1,500,1),o("L4","mm",600,1,4e3,1),o("L5","mm",2e3,10,6e3,1),o("L6","mm",2e3,1,6e3,1),o("H9","mm",100,1,400,1),G("motion amplitude"),o("al","degree",80,0,95,1),o("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 go(s,e,l=""){const t=_e(qe.partName+l),i=y(),c=y();t.logstr+=`${t.partName} simTime: ${s}
|
|
68
|
+
`;try{const r=e.H1+e.H2-e.H3+e.H4+e.H5-e.H6+e.H7;t.logstr+=`heliostat-height: ${L(r)}, diameter ${L(e.D1)} m
|
|
69
|
+
`,t.logstr+=`heliostat-swing-length: ${L(e.L1)}, width ${L(e.L2)} m
|
|
70
|
+
`;const g=(e.al-e.ar)/2-Math.sin(2*Math.PI*s/qe.sim.tMax)*(e.al+e.ar)/2,a=ve(g);t.logstr+=`swing position angle: ${L(ae(a))} degree
|
|
71
|
+
`;const u=e.H1+e.H2-e.H3,S=u+e.H4+e.H5-e.H6+e.H7,h=S+e.H8,d=Le(Ne.pDef),_=Le(Ie.pDef),f=Le(Ue.pDef),H=Le(Ce.pDef);d.setVal("H1",e.H1),d.setVal("H2",e.H2),d.setVal("D1",e.D1),d.setVal("D2",e.D2),d.setVal("D3",e.D1-6*e.E1),d.setVal("E1",e.E1),d.setVal("E2",e.E1);const k=32,M=(e.D1-6*e.E1)/(k*4);d.setVal("N1",k),d.setVal("D5",M),d.setVal("L1",e.E1+M/2),d.setVal("H3",e.H1/4),d.setVal("H4",e.H1/2),d.setVal("D4",e.H1/4),d.setVal("L2",e.H1/80),d.setVal("E3",e.H1/80),d.setVal("holders",0),_.setVal("H1",e.H4),_.setVal("H2",e.H5),_.setVal("H3",e.H4-2*e.E1),_.setVal("D1",e.D3),_.setVal("D2",e.D4),_.setVal("L9",e.D3/2),_.setVal("H7",e.D3/2*1.6),_.setVal("H6",e.D3/20),_.setVal("R9",e.D3/20),_.setVal("E1",e.E1),_.setVal("E3",e.E1),_.setVal("E4",e.E1),_.setVal("E6",e.E1);const D=e.D2*.6,A=24,N=D/(A*4);if(_.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(_.setVal("N1",A),_.setVal("D7",N),_.setVal("L1",N),_.setVal("H4",e.H6),_.setVal("D4",e.D5),_.setVal("L7",e.L7),_.setVal("L8",e.L8),_.setVal("D6",e.D9),_.setVal("H5",e.H7+e.H8),_.setVal("D5",e.D6),_.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(_.setVal("L4",R),R<=0)throw`err169: L3 ${e.L3} too large compare to L4 ${e.L4}`;_.setVal("L5",e.L5+2*e.L3),_.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,d.getParamVal(),d.getSuffix());He(x),t.logstr+=De(x.logstr,d.getPartNameSuffix());const O=Ie.pGeom(0,_.getParamVal(),_.getSuffix());He(O),t.logstr+=De(O.logstr,_.getPartNameSuffix());const I=Ue.pGeom(0,f.getParamVal(),f.getSuffix());He(I),t.logstr+=De(I.logstr,f.getPartNameSuffix());const $=Ce.pGeom(0,H.getParamVal(),H.getSuffix());He($),t.logstr+=De($.logstr,H.getPartNameSuffix()),i.mergeFigure(x.fig.poleCut),i.mergeFigure(O.fig.faceBeam.translate(0,u)),i.mergeFigure(I.fig.faceLegs.translate(0,S).rotate(0,S,a/2)),i.mergeFigure($.fig.faceSide.translate(0,h).rotate(0,h,a)),c.mergeFigure(x.fig.poleCut),c.mergeFigure(O.fig.faceCone.translate(0,u)),c.mergeFigure(I.fig.faceBody.translate(-v/2,S)),c.mergeFigure($.fig.faceFace.translate(0,h)),t.fig={faceSide:i,faceFace:c};const m=t.partName;t.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,u]},{outName:`inpax_${m}_swing`,subdesign:"pax_swing",subgeom:$,rotate:[Math.PI/2,0,0],translate:[0,0,h]},{outName:`inpax_${m}_spider`,subdesign:"pax_spider",subgeom:I,rotate:[Math.PI/2,0,0],translate:[0,v/2,S]}],extrudes:[],volumes:[{outName:`pax_${m}`,boolMethod:ce.eUnion,inList:[`inpax_${m}_poleStatic`,`inpax_${m}_rake`,`inpax_${m}_swing`,`inpax_${m}_spider`]}]};const q={partName:d.getPartName(),dparam:d.getDesignParamList(),orientation:[0,0,0],position:[0,0,0]},F={partName:_.getPartName(),dparam:_.getDesignParamList(),orientation:[0,0,0],position:[0,0,u]},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,h]};t.sub={pole_static_1:q,rake_1:F,spider_1:T,swing_1:p},t.logstr+=`heliostat-overview drawn successfully!
|
|
72
|
+
`,t.calcErr=!1}catch(r){t.logstr+=r,console.log(r)}return t}var ho={pTitle:"Heliostat overview",pDescription:"The heliostat inclination mechanism",pDef:qe,pGeom:go},_t={partName:"rake_stopper",params:[o("D1","mm",600,10,4e3,1),o("D2","mm",400,10,4e3,1),o("D3","mm",400,1,4e3,1),o("H1","mm",800,1,4e3,1),o("H2","mm",3e3,20,6e3,1),o("H3","mm",400,0,4e3,1),o("E1","mm",20,1,80,1),o("E3","mm",30,1,80,1),G("transversal"),o("H4","mm",200,1,1e3,1),o("D4","mm",300,1,1e3,1),o("E4","mm",20,1,80,1),o("H5","mm",400,1,2e3,1),o("D5","mm",200,1,1e3,1),o("L4","mm",300,1,1e3,1),o("L5","mm",2e3,1,4e3,1),o("L6","mm",2e3,1,4e3,1),o("D8","mm",400,1,1e3,1),G("diagonal"),o("D6","mm",100,1,600,1),o("E6","mm",10,1,80,1),o("L7","mm",100,1,1e3,1),o("L8","mm",200,1,1e3,1),G("base"),o("N1","",24,3,100,1),o("D7","mm",40,1,100,1),o("L1","mm",30,1,300,1),G("door"),o("H6","mm",100,1,1e3,1),o("H7","mm",600,1,2e3,1),o("L9","mm",300,1,1e3,1),o("R9","mm",50,0,300,1),o("doorOrientation","degree",0,-180,180,1),G("stoppers"),o("S1","mm",100,1,300,1),o("S2","mm",2e3,1,8e3,1),o("S3","mm",100,0,8e3,1),o("E7","mm",5,1,80,1),G("low stopper"),o("JD1","mm",200,1,500,1),o("JE1","mm",5,1,80,1),o("JL1","mm",260,1,2e3,1),o("JH1","mm",20,-500,500,1),o("JS1","mm",100,1,500,1),o("JS2","mm",200,1,500,1),G("high stopper"),o("JD3","mm",200,1,500,1),o("JE3","mm",5,1,80,1),o("JS3","mm",120,1,500,1),o("JD4","mm",200,1,500,1),o("JE4","mm",5,1,80,1),o("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 ao(s,e,l=""){const t=_e(_t.partName+l),i=y(),c=y(),r=y(),n=y(),g=y(),a=y(),u=y(),S=y(),h=y(),d=y(),_=y(),f=y(),H=y(),k=y(),M=y(),D=y(),A=y(),N=y(),R=y();t.logstr+=`${t.partName} simTime: ${s}
|
|
73
|
+
`;try{const E=Math.PI,x=Math.PI/2,O=-Math.PI/2,I=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,C=e.S1/2,K=e.S1-2*e.E7,ie=K/2,V=e.S2-C,te=q-e.JH1,w=e.JD1/2,W=w-e.JE1,ne=I+e.JS2,B=Y-C,b=I+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+C)throw`err148: JH1 ${e.JH1} too large compare to JD1 ${e.JD1} and S1 ${e.S1}`;if(e.JS2<e.JS1-C)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}`;t.logstr+=`cone-height: ${L($)} mm
|
|
74
|
+
`,t.logstr+=`cone-height total: ${L(m)} mm
|
|
75
|
+
`;const re=[],ue=[];D.addSecond(X(-Y,q,e.L5,e.S1,0)),D.addSecond(X(-Y,q,e.L5,K,0)),re.push(P(-e.JL1/2,te,w)),re.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(re),D.addMainOI(ue);const oe=Le(Ie.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=Ie.pGeom(0,oe.getParamVal(),oe.getSuffix());He(Q),t.logstr+=De(Q.logstr,oe.getPartNameSuffix()),i.mergeFigure(Q.fig.faceCone),i.mergeFigure(D,!0),c.mergeFigure(Q.fig.faceBeam),r.mergeFigure(Q.fig.faceBeamHollow),n.mergeFigure(Q.fig.faceDisc),g.mergeFigure(Q.fig.faceHand),a.mergeFigure(Q.fig.faceWing),u.mergeFigure(Q.fig.faceWingHollow),S.mergeFigure(Q.fig.faceDoor),S.mergeFigure(D,!0),h.mergeFigure(Q.fig.faceDisc,!0),h.addMainOI([X(-I-e.JS1,-Y,e.L5,e.S1,x),X(-I-e.JS1,-Y,e.L5,K,x)]),h.addMainOI([X(V,-Y,e.L5,e.S1,x),X(V,-Y,e.L5,K,x)]),h.addMainOI([X(0,-Y+C,V,e.S1,0),X(0,-Y+C,V,K,0)]),h.addMainOI([X(0,Y-C,V,e.S1,0),X(0,Y-C,V,K,0)]),h.addMainOI([X(0,-I-C,V,e.S1,0),X(0,-I-C,V,K,0)]),h.addMainOI([X(0,I+C,V,e.S1,0),X(0,I+C,V,K,0)]),h.addSecond(X(0,-e.JL1/2,ne,2*w,E)),h.addSecond(X(0,-e.JL1/2,ne,2*W,E)),h.addSecond(X(0,e.JL1/2,ne,2*w,E)),h.addSecond(X(0,e.JL1/2,ne,2*W,E)),h.addSecond(X(0,0,b,e.JD3,O)),h.addSecond(X(0,0,b,Z,O)),h.addSecond(X(0,0,b,e.JD3,x)),h.addSecond(X(0,0,b,Z,x)),d.mergeFigure(Q.fig.faceBeam,!0),d.addMainOI([P(-I-e.JS1,q,C),P(-I-e.JS1,q,ie)]),d.addMainOI([P(V,T+C,C),P(V,T+C,ie)]),d.addSecond(X(0,T+C,V,e.S1,0)),d.addSecond(X(0,T+C,V,K,0));const fe=T+C-p,Pe=Math.sqrt(V**2+fe**2),we=Math.atan2(fe,V);t.logstr+=`stopper-rod: L ${L(Pe)} mm, A ${L(ae(we))} degree
|
|
76
|
+
`,d.addSecond(X(0,p,Pe,e.S1,we)),d.addSecond(X(0,p,Pe,K,we)),d.addSecond(X(0,te,ne,2*w,E)),d.addSecond(X(0,te,ne,2*W,E)),d.addSecond(P(0,p,e.JD3/2)),d.addSecond(P(0,p,e.JD3/2-e.JE3)),d.addSecond(X(0,F,j,e.JD4,x)),d.addSecond(X(0,F,j,he,x)),_.mergeFigure(d,!0),_.addMainO(P(-I-e.JS1,q,ie)),_.addMainO(P(e.S2-C,T+C,ie)),f.mergeFigure(Q.fig.faceCone,!0),f.mergeFigure(D,!0),f.addMainOI([P(-e.L5/2+C,T+C,C),P(-e.L5/2+C,T+C,ie)]),f.addMainOI([P(e.L5/2-C,T+C,C),P(e.L5/2-C,T+C,ie)]),H.mergeFigure(Q.fig.faceCone,!0),H.mergeFigure(D,!0),H.addSecond(P(-e.L5/2+C,T+C,C)),H.addMainO(P(-e.L5/2+C,T+C,ie)),H.addSecond(P(e.L5/2-C,T+C,C)),H.addMainO(P(e.L5/2-C,T+C,ie)),k.mergeFigure(Q.fig.faceCone,!0),k.mergeFigure(D,!0),k.addMainOI([P(-I-C,0,C),P(-I-C,0,ie)]),k.addMainOI([P(I+C,0,C),P(I+C,0,ie)]),M.mergeFigure(Q.fig.faceCone,!0),M.mergeFigure(D,!0),M.addSecond(P(-I-C,0,C)),M.addMainO(P(-I-C,0,ie)),M.addSecond(P(I+C,0,C)),M.addMainO(P(I+C,0,ie)),A.mergeFigure(Q.fig.faceCone,!0),A.mergeFigure(D),A.addSecond(X(-B,F,j,e.JD4,x)),A.addSecond(X(-B,F,j,he,x)),A.addSecond(X(B,F,j,e.JD4,x)),A.addSecond(X(B,F,j,he,x)),A.addSecond(X(0,p,b,e.JD3,E)),A.addSecond(X(0,p,b,Z,E)),A.addSecond(X(0,p,b,e.JD3,0)),A.addSecond(X(0,p,b,Z,0)),N.mergeFigure(d,!0),N.addMainOI([P(0,p,e.JD3/2),P(0,p,e.JD3/2-e.JE3)]),R.mergeFigure(h,!0),R.addMainOI([P(0,-B,e.JD4/2),P(0,-B,e.JD4/2-e.JE4)]),R.addMainOI([P(0,B,e.JD4/2),P(0,B,e.JD4/2-e.JE4)]),t.fig={faceCone:i,faceBeam:c,faceBeamHollow:r,faceDisc:n,faceHand:g,faceWing:a,faceWingHollow:u,faceDoor:S,faceStopperTop:h,faceStopperSide:d,faceStopperSideH:_,faceStopperFaceT:f,faceStopperFaceTH:H,faceStopperFaceB:k,faceStopperFaceBH:M,faceLowStopperHolder:A,faceHi1StopperHolder:N,faceHi2StopperHolder:R};const ee=t.partName;t.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:b,rotate:[Math.PI/2,0,0],translate:[0,0,0]},{outName:`subpax_${ee}_Hi1SH2`,face:`${ee}_faceHi1StopperHolder`,extrudeMethod:U.eLinearOrtho,length:b,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:ce.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:ce.eUnion,inList:[`inpax_${ee}_coneHollow`,`inpax_${ee}_beamHollow`,`subpax_${ee}_stpSideH`,`subpax_${ee}_stpFaceTH`,`subpax_${ee}_stpFaceBH`]},{outName:`ipax_${ee}_stopper`,boolMethod:ce.eSubstraction,inList:[`ipax_${ee}_plus`,`ipax_${ee}_hollow`]},{outName:`pax_${ee}`,boolMethod:ce.eUnion,inList:[`inpax_${ee}_rake`,`ipax_${ee}_stopper`]}]},t.sub={},t.logstr+=`heliostat-rake drawn successfully!
|
|
77
|
+
`,t.calcErr=!1}catch(v){t.logstr+=v,console.log(v)}return t}var We={pTitle:"Heliostat rake with stopper",pDescription:"The rake-stopper on top of the V-Axis of the heliostat",pDef:_t,pGeom:ao},Ye={partName:"heliostat_2",params:[o("H1","mm",3e3,10,4e4,1),o("H2","mm",2500,50,4e4,1),o("D1","mm",1e3,20,4e3,1),o("D2","mm",700,20,4e3,1),o("E1","mm",30,1,80,1),G("rake"),o("H3","mm",200,1,500,1),o("H4","mm",800,1,4e3,1),o("H5","mm",3e3,50,6e3,1),o("H6","mm",200,1,4e3,1),o("H7","mm",400,1,4e3,1),o("D3","mm",900,20,4e3,1),o("D4","mm",400,20,4e3,1),o("D5","mm",300,20,1e3,1),o("D6","mm",200,10,1e3,1),o("D7","mm",400,10,1e3,1),G("rake diagonal"),o("D9","mm",100,1,1e3,1),o("L7","mm",100,1,1e3,1),o("L8","mm",200,1,1e3,1),G("rake stopper"),o("S1","mm",100,1,800,1),G("swing"),o("L1","mm",12500,100,4e4,1),o("L2","mm",6e3,100,4e4,1),o("L3","mm",100,1,500,1),o("L4","mm",600,1,4e3,1),o("L5","mm",2e3,10,6e3,1),o("L6","mm",2e3,1,6e3,1),o("H9","mm",100,1,400,1),o("S2","mm",10,0,2e3,1),G("motion amplitude"),o("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 uo(s,e,l=""){const t=_e(Ye.partName+l),i=y(),c=y(),r=y();t.logstr+=`${t.partName} simTime: ${s}
|
|
78
|
+
`;try{const n=e.H1+e.H2-e.H3+e.H4+e.H5-e.H6+e.H7;t.logstr+=`heliostat-height: ${L(n)}, diameter ${L(e.D1)} m
|
|
79
|
+
`,t.logstr+=`heliostat-swing-length: ${L(e.L1)}, width ${L(e.L2)} m
|
|
80
|
+
`;const g=e.al*s/Ye.sim.tMax,a=ve(g);t.logstr+=`swing position angle: ${L(ae(a))} degree
|
|
81
|
+
`;const u=e.H1+e.H2-e.H3,S=u+e.H4+e.H5-e.H6+e.H7,h=Le(Ne.pDef),d=Le(We.pDef),_=Le(Ce.pDef);h.setVal("H1",e.H1),h.setVal("H2",e.H2),h.setVal("D1",e.D1),h.setVal("D2",e.D2),h.setVal("D3",e.D1-6*e.E1),h.setVal("E1",e.E1),h.setVal("E2",e.E1);const f=32,H=(e.D1-6*e.E1)/(f*4);h.setVal("N1",f),h.setVal("D5",H),h.setVal("L1",e.E1+H/2),h.setVal("H3",e.H1/4),h.setVal("H4",e.H1/2),h.setVal("D4",e.H1/4),h.setVal("L2",e.H1/80),h.setVal("E3",e.H1/80),h.setVal("holders",0),d.setVal("H1",e.H4),d.setVal("H2",e.H5),d.setVal("H3",e.H4-2*e.E1),d.setVal("D1",e.D3),d.setVal("D2",e.D4),d.setVal("L9",e.D3/2),d.setVal("H7",e.D3/2*1.6),d.setVal("H6",e.D3/20),d.setVal("R9",e.D3/20),d.setVal("E1",e.E1),d.setVal("E3",e.E1),d.setVal("E4",e.E1),d.setVal("E6",e.E1),d.setVal("E7",e.E1);const k=e.D2*.6,M=24,D=k/(M*4);if(d.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(d.setVal("N1",M),d.setVal("D7",D),d.setVal("L1",D),d.setVal("H4",e.H6),d.setVal("D4",e.D5),d.setVal("L7",e.L7),d.setVal("L8",e.L8),d.setVal("D6",e.D9),d.setVal("H5",e.H7),d.setVal("D5",e.D6),d.setVal("D8",e.D7),e.D6>=e.D7)throw`err164: D6 ${e.D6} too large compare to D7 ${e.D7}`;const A=e.L4-2*e.L3;if(d.setVal("L4",A),A<=0)throw`err169: L3 ${e.L3} too large compare to L4 ${e.L4}`;if(d.setVal("L5",e.L5+2*e.L3),d.setVal("L6",e.L6+2*e.L3),d.setVal("S1",e.S1),d.setVal("S2",e.L2/2),d.setVal("S3",0),d.setVal("S3",0),d.setVal("JD1",e.D3/4),d.setVal("JE1",e.E1),d.setVal("JL1",e.D3/3),d.setVal("JH1",0),d.setVal("JS1",e.S1/2),d.setVal("JS2",e.S1/2),d.setVal("JD3",e.D4/4),d.setVal("JE3",e.E1),d.setVal("JS3",e.D4/4),d.setVal("JD4",e.D4/4),d.setVal("JE4",e.E1),d.setVal("JS4",e.D4/4),_.setVal("L2",e.L2),_.setVal("D1",e.D6),_.setVal("H3",e.H9),_.setVal("H4",e.H9),_.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}`;_.setVal("H1",e.L3),_.setVal("H2",e.L3),_.setVal("L4",e.L4),_.setVal("L5",e.L5),_.setVal("L6",e.L6),_.setVal("L3",e.D7),_.setVal("S1",e.D6/2),_.setVal("S2",e.S2),_.setVal("R2",0);const N=Ne.pGeom(0,h.getParamVal(),h.getSuffix());He(N),t.logstr+=De(N.logstr,h.getPartNameSuffix());const R=We.pGeom(0,d.getParamVal(),d.getSuffix());He(R),t.logstr+=De(R.logstr,d.getPartNameSuffix());const v=Ce.pGeom(0,_.getParamVal(),_.getSuffix());He(v),t.logstr+=De(v.logstr,_.getPartNameSuffix()),i.mergeFigure(N.fig.poleCut),i.mergeFigure(R.fig.faceStopperSide.translate(0,u)),i.mergeFigure(v.fig.faceSide.translate(0,S).rotate(0,S,a)),c.mergeFigure(N.fig.poleCut),c.mergeFigure(R.fig.faceStopperFaceT.translate(0,u)),c.mergeFigure(v.fig.faceFace.translate(0,S)),r.mergeFigure(N.fig.poleBottom.translate(0,0)),r.mergeFigure(R.fig.faceStopperTop.translate(0,0)),r.mergeFigure(v.fig.faceTop.rotate(0,0,Math.PI/2)),t.fig={faceSide:i,faceFace:c,faceTop:r};const E=t.partName;t.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,u]},{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:ce.eUnion,inList:[`inpax_${E}_poleStatic`,`inpax_${E}_rake`,`inpax_${E}_swing`]}]};const x=h.getDesignParamList(),O={partName:h.getPartName(),dparam:x,orientation:[0,0,0],position:[0,0,0]},I={partName:d.getPartName(),dparam:d.getDesignParamList(),orientation:[0,0,0],position:[0,0,u]},$={partName:_.getPartName(),dparam:_.getDesignParamList(),orientation:[0,0,0],position:[0,0,S]};t.sub={pole_static_1:O,rake_1:I,swing_1:$},t.logstr+=`heliostat-2-overview drawn successfully!
|
|
82
|
+
`,t.calcErr=!1}catch(n){t.logstr+=n,console.log(n)}return t}var _o={pTitle:"Heliostat-2 overview",pDescription:"The heliostat-2 inclination mechanism",pDef:Ye,pGeom:uo},St={partName:"base",params:[o("D1","mm",600,10,4e3,10),o("D2","mm",700,10,4e3,10),o("D3","mm",400,10,4e3,10),o("D4","mm",500,10,4e3,10),o("E1","mm",30,1,80,1),o("E2","mm",30,1,80,1),o("E3","mm",30,1,80,1),o("H1","mm",800,10,4e3,10),o("H2","mm",50,1,4e3,1),G("side holes"),o("H3","mm",400,10,4e3,10),o("N2","",12,1,100,1),o("L2","mm",100,1,400,1),G("base holes"),o("N1","",24,3,100,1),o("D5","mm",40,1,100,1),o("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 So(s,e,l=""){const t=_e(St.partName+l);let i,c,r;const n=y(),g=y(),a=y();t.logstr+=`${t.partName} simTime: ${s}
|
|
83
|
+
`;try{const u=e.D1/2,S=e.D2/2,h=e.D3/2,d=e.D4/2,_=e.D5/2,f=e.L2/2;if(S<u)throw`err089: D2 ${e.D2} too small compare to D1 ${e.D1}`;if(d>u-e.E2)throw`err189: D4 ${e.D4} too large compare to D1 ${e.D1} and E2 ${e.E2}`;t.logstr+=`base-height: ${L(e.H1)} mm
|
|
84
|
+
`,t.logstr+=`base-external-diameter: ${L(e.D2)} mm
|
|
85
|
+
`;const H=e.D1*Math.PI/e.N2-e.L2;if(t.logstr+=`inter-hollow: ${L(H)} mm
|
|
86
|
+
`,i=function($){return J($*S,0).addSegStrokeA($*S,e.E3).addSegStrokeA($*u,e.E3).addSegStrokeA($*u,e.H1).addSegStrokeA($*(u-e.E2),e.H1).addSegStrokeA($*(u-e.E2),e.E3).addSegStrokeA($*d,e.E3).addSegStrokeA($*d,0).closeSegStroke()},c=function($){return J($*S,0).addSegStrokeA($*S,e.E3).addSegStrokeA($*u,e.E3).addSegStrokeA($*u,e.H1).addSegStrokeA($*h,e.H1).addSegStrokeA($*h,e.H1-e.E1).addSegStrokeA($*(u-e.E2),e.H1-e.E1).addSegStrokeA($*(u-e.E2),e.E3).addSegStrokeA($*d,e.E3).addSegStrokeA($*d,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/(u-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;r=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(c(1)),n.addSecond(c(-1)),n.addSecond(r(1));const D=[];if(h+e.L1+_>u-e.E2)throw`err127: D3 ${e.D3} too large compare to D1 ${e.D1}, E2 ${e.E2}, L1 ${e.L1}, R5 ${e.D5}`;if(_>e.L1)throw`err130: D5 ${e.D5} too large compare to L1 ${e.L1}`;const A=2*Math.asin(_/(S+e.L1));if(e.N1*A>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,u)),D.push(P(0,0,h));const N=h+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,_))}g.addMainOI(D),g.addSecond(P(0,0,u-e.E1)),g.addSecond(P(0,0,S)),g.addSecond(P(0,0,d)),a.addMainO(r(1)),a.addSecond(c(1)),a.addSecond(c(-1)),t.fig={faceCut:n,faceTop:g,faceHollow:a};const v=t.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]})),I=x.map($=>`subpax_${v}_hollow_${$}`);t.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:ce.eUnion,inList:[...I]},{outName:`ipax_${v}_cylinder`,boolMethod:ce.eSubstraction,inList:[`subpax_${v}_cut`,`ipax_${v}_hollows`]},{outName:`pax_${v}`,boolMethod:ce.eUnion,inList:[`ipax_${v}_cylinder`,`subpax_${v}_top`]}]},t.sub={},t.logstr+=`heliostat-base drawn successfully!
|
|
87
|
+
`,t.calcErr=!1}catch(u){t.logstr+=u,console.log(u)}return t}var fo={pTitle:"Heliostat base",pDescription:"The base for the static-pole of the heliostat",pDef:St,pGeom:So},ft={partName:"vaxis",params:[o("D1","mm",600,1,4e3,1),o("D2","mm",400,1,4e3,1),o("H1","mm",8e3,10,4e4,10),o("E1","mm",5,1,80,1),o("E2","mm",30,1,80,1),G("base holes"),o("N1","",24,3,100,1),o("D3","mm",40,1,100,1),o("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 Lo(s,e,l=""){const t=_e(ft.partName+l);let i;const c=y(),r=y();t.logstr+=`${t.partName} simTime: ${s}
|
|
88
|
+
`;try{const n=e.D1/2,g=e.D2/2,a=e.D3/2;t.logstr+=`vaxis-height: ${L(e.H1)} mm
|
|
89
|
+
`;const u=J(n,0).addSegStrokeA(n,e.H1).addSegStrokeA(n-e.E1,e.H1).addSegStrokeA(n-e.E1,0).closeSegStroke();c.addMainO(u),i=function(f){return J(f*n,0).addSegStrokeA(f*n,e.H1).addSegStrokeA(f*g,e.H1).addSegStrokeA(f*g,e.H1-e.E2).addSegStrokeA(f*(n-e.E1),e.H1-e.E2).addSegStrokeA(f*(n-e.E1),e.E2).addSegStrokeA(f*g,e.E2).addSegStrokeA(f*g,0).closeSegStroke()},c.addSecond(i(1)),c.addSecond(i(-1));const S=[];S.push(P(0,0,n)),S.push(P(0,0,g));const h=g+e.L1,d=2*Math.PI/e.N1;for(let f=0;f<e.N1;f++){const H=h*Math.cos(f*d),k=h*Math.sin(f*d);S.push(P(H,k,a))}r.addSecond(P(0,0,n-e.E1)),r.addMainOI(S),t.fig={faceCut:c,faceBottom:r};const _=t.partName;t.vol={extrudes:[{outName:`subpax_${_}_pole`,face:`${_}_faceCut`,extrudeMethod:U.eRotate,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${_}_bottom`,face:`${_}_faceBottom`,extrudeMethod:U.eLinearOrtho,length:e.E2,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${_}_top`,face:`${_}_faceBottom`,extrudeMethod:U.eLinearOrtho,length:e.E2,rotate:[0,0,0],translate:[0,0,e.H1-e.E2]}],volumes:[{outName:`pax_${_}`,boolMethod:ce.eUnion,inList:[`subpax_${_}_pole`,`subpax_${_}_bottom`,`subpax_${_}_top`]}]},t.sub={},t.logstr+=`V-Axis drawn successfully!
|
|
90
|
+
`,t.calcErr=!1}catch(n){t.logstr+=n,console.log(n)}return t}var Ho={pTitle:"Heliostat V-Axis",pDescription:"The vertical axis inside the pole of an heliostat",pDef:ft,pGeom:Lo},Lt={partName:"ring",params:[o("D1","mm",400,1,2e3,1),o("D3","mm",800,1,4e3,1),o("H1","mm",20,1,100,1),o("H2","mm",100,1,600,1),G("ring holes"),o("N2","",24,3,100,1),o("D2","mm",40,1,100,1),o("L1","mm",45,1,300,1),G("ring fake teeth"),o("N1","",100,3,1e4,1),o("L2","mm",30,1,200,1),o("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 Do(s,e,l=""){const t=_e(Lt.partName+l),i=y(),c=y(),r=y();t.logstr+=`${t.partName} simTime: ${s}
|
|
91
|
+
`;try{const n=e.D1/2,g=e.D2/2,a=e.D3/2,u=e.H1+e.H2;if(e.L1<g)throw`err203: L1 ${e.L1} too small compare to D2 ${e.D2}`;if(n+e.L1+g>a-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(g,n+e.L1)>2*Math.PI/e.N2)throw`err205: D2 ${e.D2} too large compare to N2 ${e.N2}`;t.logstr+=`ring-height: ${L(u)} mm
|
|
92
|
+
`;const S=a-e.L3,h=S-e.L2,d=2*Math.PI/(2*e.N1),_=J(S,0);for(let E=0;E<e.N1;E++){const x=2*E+1,O=2*E+2,I=h*Math.cos(x*d),$=h*Math.sin(x*d),m=S*Math.cos(O*d),q=S*Math.sin(O*d);_.addSegStrokeA(I,$).addSegStrokeA(m,q)}const f=[];f.push(P(0,0,a)),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,g)),c.addSecond(P(x,O,g))}i.addSecond(_),i.addMainOI(f);const M=[];M.push(P(0,0,a)),M.push(_),c.addSecond(P(0,0,n)),c.addMainOI(M);const D=J(n,0).addSegStrokeA(-n,0).addSegStrokeA(-n,-e.H1).addSegStrokeA(n,-e.H1).closeSegStroke(),A=function(E){return J(E*(n+e.L1)+g,0).addSegStrokeR(-2*g,0).addSegStrokeR(0,-e.H1).addSegStrokeR(2*g,0).closeSegStroke()},N=function(E){return J(E*(a-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*a,0).addSegStrokeR(-E*(a-n),0).addSegStrokeR(0,-e.H1).addSegStrokeR(E*(a-e.L2-e.L3-n),0).addSegStrokeR(0,-e.H2).addSegStrokeR(E*(e.L2+e.L3),0).closeSegStroke()};r.addSecond(D),r.addSecond(A(1)),r.addSecond(A(-1)),r.addSecond(N(1)),r.addSecond(N(-1)),r.addMainO(R(1)),r.addSecond(R(-1)),t.fig={faceRingBase:i,faceRingTeeth:c,faceSection:r};const v=t.partName;t.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:u,rotate:[0,0,0],translate:[0,0,0]}],volumes:[{outName:`pax_${v}`,boolMethod:ce.eUnion,inList:[`subpax_${v}_base`,`subpax_${v}_teeth`]}]},t.sub={},t.logstr+=`ring drawn successfully!
|
|
93
|
+
`,t.calcErr=!1}catch(n){t.logstr+=n,console.log(n)}return t}var Po={pTitle:"Heliostat ring",pDescription:"The gear ring for adjusting the azimuth of the heliostat",pDef:Lt,pGeom:Do},Ht={partName:"ring_guidance",params:[o("D1","mm",700,5,2500,1),o("N1","legs",6,1,24,1),o("D2","mm",600,5,2e3,1),G("leg details"),o("D3","mm",30,1,200,1),o("D4","mm",50,1,200,1),o("L1","mm",90,1,900,1),o("R5","mm",20,0,500,1),G("inner"),o("D6","mm",300,1,1e3,1),o("N2","motors",8,1,200,1),o("L2","mm",50,1,200,1),o("D7","mm",80,1,200,1),G("thickness"),o("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 vo(s,e,l=""){const t=_e(Ht.partName+l),i=y(),c=y();t.logstr+=`${t.partName} simTime: ${s}
|
|
94
|
+
`;try{const r=e.D1/2,n=e.D3/2,g=e.D4/2,a=e.D6/2,u=e.D7/2,S=2*Math.PI/e.N2;if(u>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*u)throw`err463: D2 ${e.D2} is too small compare to D6 ${e.D6}, L2 ${e.L2} and D7 ${e.D7}`;t.logstr+=`ring_guidance: Dmax ${L(e.D1+2*g)} mm
|
|
95
|
+
`;const h=[],[d,_,f]=lt(e);t.logstr+=d,h.push(_),h.push(P(0,0,a));for(let A=0;A<e.N2;A++)h.push(P(a+e.L2,0,u).rotate(0,0,A*S));for(let A=0;A<e.N1;A++)h.push(P(r,0,n).rotate(0,0,A*f));i.addMainOI(h);const H=function(A,N,R,v){return J(A,N).addSegStrokeR(R,0).addSegStrokeR(0,v).addSegStrokeR(-R,0).closeSegStroke()},k=r-a+g;c.addMainO(H(a,0,k,e.T1)),c.addMainO(H(-a-k,0,k,e.T1)),c.addSecond(H(r-n,0,2*n,e.T1)),c.addSecond(H(-r-n,0,2*n,e.T1));const M=a+e.L2;c.addSecond(H(M-u,0,2*u,e.T1)),c.addSecond(H(-M-u,0,2*u,e.T1)),t.fig={faceTop:i,faceSection:c};const D=t.partName;t.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:ce.eIdentity,inList:[`subpax_${D}_top`]}]},t.sub={},t.logstr+=`ring_guidance drawn successfully!
|
|
96
|
+
`,t.calcErr=!1}catch(r){t.logstr+=r,console.log(r)}return t}var xo={pTitle:"Ring-guidance",pDescription:"The guidance of the gear-ring for the heliostat azimuth",pDef:Ht,pGeom:vo},Dt={partName:"vaxis_guidance",params:[o("D1","mm",700,5,2500,1),o("N1","legs",6,1,24,1),o("D2","mm",600,5,2e3,1),G("leg details"),o("D3","mm",30,1,200,1),o("D4","mm",50,1,200,1),o("L1","mm",90,1,900,1),o("R5","mm",20,0,500,1),G("inner"),o("D6","mm",540,1,1e3,1),o("N2","springs",6,1,24,1),$e("orientation",["ccw","cw","alt"]),o("R7","mm",10,0,100,1),o("L2","mm",100,1,900,1),o("E2","mm",20,1,200,1),G("spring"),o("SA1","degree",0,-45,45,1),o("SE1","mm",10,.1,200,.1),o("SD1","mm",20,1,200,1),o("SD2","mm",10,1,200,1),o("SN1","loops",2,0,8,1),o("SL1","mm",40,1,900,1),o("SL2","mm",70,0,900,1),$e("Send",["round","pike"]),G("thickness"),o("T1","mm",10,1,200,1),o("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,l=""){const t=_e(Dt.partName+l),i=y(),c=y();t.logstr+=`${t.partName} simTime: ${s}
|
|
97
|
+
`;try{const r=e.D1/2,n=e.D2/2,g=e.D3/2,a=e.D4/2,u=e.D6/2;if(n<u)throw`err466: D6 ${e.D6} is too large compare to D2 ${e.D2}`;t.logstr+=`vaxis_guidance: Dmax ${L(e.D1+2*a)} mm
|
|
98
|
+
`;const S=[],[h,d,_]=lt(e);t.logstr+=h,S.push(d);for(let D=0;D<e.N1;D++)S.push(P(r,0,g).rotate(0,0,D*_));const[f,H]=so(e);t.logstr+=f,S.push(H),i.addSecond(P(0,0,e.Dvaxis/2)),i.addMainOI(S);const k=r-u+a;c.addMainO(ge(u,0,k,e.T1)),c.addMainO(ge(-u-k,0,k,e.T1)),c.addSecond(ge(r-g,0,2*g,e.T1)),c.addSecond(ge(-r-g,0,2*g,e.T1)),t.fig={faceTop:i,faceSection:c};const M=t.partName;t.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:ce.eIdentity,inList:[`subpax_${M}_top`]}]},t.sub={},t.logstr+=`vaxis_guidance drawn successfully!
|
|
99
|
+
`,t.calcErr=!1}catch(r){t.logstr+=r,console.log(r)}return t}var wo={pTitle:"Vaxis-guidance",pDescription:"The guidance of the V-Axis for the heliostat azimuth",pDef:Dt,pGeom:$o},Pt={partName:"haxis_guidance",params:[o("D5","mm",600,1,2e3,1),o("D8","mm",1e3,1,2e3,1),G("outer details"),o("E5","mm",1,0,200,1),o("E8","mm",20,1,200,1),o("L5","mm",20,1,200,1),o("R9","mm",20,0,500,1),G("inner spring"),o("SA1","degree",0,-45,45,1),o("SE1","mm",2,.1,100,.1),o("SD1","mm",20,1,200,1),o("SD2","mm",10,1,200,1),o("SN1","springs",7,1,24,1),o("SL1","mm",60,0,500,1),o("SL2","mm",100,0,500,1),$e("Send",["round","pike"]),G("thickness"),o("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 Mo(s,e,l=""){const t=_e(Pt.partName+l),i=y(),c=y();t.logstr+=`${t.partName} simTime: ${s}
|
|
100
|
+
`;try{const r=e.D5/2,n=e.D8/2,g=e.SD1/2,a=r+e.E5,u=n-e.E8,S=2*Math.asin(e.L5/(2*a)),h=Math.PI/12+ve(e.SA1),d=Math.PI/2+S-h,_=Math.PI-h,f=Math.PI/2-Math.PI/6+h;if(a+g+e.SE1>u)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/u)throw`err412: L5 ${e.L5} is too large compare to R9 ${e.R9}`;t.logstr+=`haxis_guidance: Dinner ${L(2*a)} mm
|
|
101
|
+
`,i.addSecond(P(0,0,r)),i.addSecond(P(0,0,n));const[H,k]=Te(e,!1),[,M]=Te(e,!0);t.logstr+=H;const D=Math.PI/2-S,A=-Math.PI/6+S,N=le(0,0),R=N.translatePolar(D,a+e.SE1+g),v=R.translatePolar(D-Math.PI/2,g),E=v.translatePolar(D+Math.PI,g+e.SE1),x=v.translatePolar(D+Math.PI,g),O=E.rotate(v,d),I=N.translatePolar(A,a+e.SE1+g),$=I.translatePolar(A+Math.PI/2,g),m=$.translatePolar(A+Math.PI,g+e.SE1),q=$.translatePolar(A+Math.PI,g),F=q.rotate($,-d),T=J(0,a).addSegStrokeA(E.cx,E.cy).addPointA(O.cx,O.cy).addSegArc(g+e.SE1,!1,!0);T.addPartial(k.rotate(0,0,_).translate(O.cx,O.cy)),T.addPointA(x.cx,x.cy).addPointA(R.cx,R.cy).addSegArc2().addSegStrokeAP(D,u).addCornerRounded(e.R9).addPointAP(A,u).addSegArc(u,!1,!1).addCornerRounded(e.R9).addSegStrokeA(I.cx,I.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(g+e.SE1,!1,!0).addSegStrokeAP(-Math.PI/6,a).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);c.addMainO(ge(0,-p,e.L4,n+p)),c.addSecond(ge(0,-n,e.L4,2*n)),c.addSecond(ge(0,-r,e.L4,2*r)),t.fig={faceProfile:i,faceSide:c};const Y=t.partName;t.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:ce.eIdentity,inList:[`subpax_${Y}_profile`]}]},t.sub={},t.logstr+=`haxis_guidance drawn successfully!
|
|
102
|
+
`,t.calcErr=!1}catch(r){t.logstr+=r,console.log(r)}return t}var Eo={pTitle:"Haxis-guidance",pDescription:"The guidance of the H-Axis for the heliostat inclination",pDef:Pt,pGeom:Mo},vt={partName:"rod",params:[o("L1","mm",1e4,100,4e4,10),o("L2","mm",100,2,400,1),o("L3","mm",400,10,1e3,1),o("L4","mm",600,10,1e3,1),o("N1","",10,2,50,1),G("section"),o("H1","mm",200,5,4e3,1),o("E1","mm",2,1,80,1),o("E2","mm",10,1,80,1),G("pad"),o("N3","",2,1,20,1),o("N4","",4,1,20,1),o("R3","mm",100,1,500,1),o("D2","mm",10,1,100,1),o("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 Ao(s,e,l=""){const t=_e(vt.partName+l),i=y(),c=y(),r=y();t.logstr+=`${t.partName} simTime: ${s}
|
|
103
|
+
`;try{const n=e.D2/2,g=e.L3/(e.N3+1),a=e.L4/(e.N4+1);t.logstr+=`rod-length: ${L(e.L1)} mm
|
|
104
|
+
`;const u=(e.L1-e.L3)/(e.N1-1);t.logstr+=`space-length: ${L(u)} 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*g,n)),E.push(P(-e.L4/2+e.L7,v+O*g,n));for(let O=1;O<e.N4+1;O++)E.push(P(-e.L4/2+O*a,v+e.L7,n)),E.push(P(-e.L4/2+O*a,v+e.L3-e.L7,n));return E},h=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()},d=[],_=e.L2/2,f=e.L4/2,H=(e.L2-2*e.E1)/2,k=e.H1-e.E1,M=J(_,0).addSegStrokeA(_,e.H1).addSegStrokeA(-_,e.H1).addSegStrokeA(-_,0).closeSegStroke(),D=J(H,e.E1).addSegStrokeA(H,k).addSegStrokeA(-H,k).addSegStrokeA(-H,e.E1).closeSegStroke(),A=J(f,e.H1).addSegStrokeA(f,e.H1+e.E2).addSegStrokeA(-f,e.H1+e.E2).addSegStrokeA(-f,e.H1).closeSegStroke();d.push(M),d.push(D),i.addSecond(A),i.addMainOI(d),c.addMainOI(S(0)),c.addSecond(h(-e.L3/2,2*e.L3));const N=(e.L1-e.L3)/(e.N1-1);for(let v=0;v<e.N1;v++)r.addMainOI(S(v*N));r.addSecond(h(0,e.L1)),t.fig={faceCut:i,facePlate:c,faceTop:r};const R=t.partName;t.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:ce.eUnion,inList:[`subpax_${R}_rod`,`subpax_${R}_plates`]}]},t.sub={},t.logstr+=`heliostat-rod drawn successfully!
|
|
106
|
+
`,t.calcErr=!1}catch(n){t.logstr+=n,console.log(n)}return t}var bo={pTitle:"Heliostat rod",pDescription:"The rod of an heliostat-surface",pDef:vt,pGeom:Ao},xt={partName:"trapeze",params:[o("L1","mm",1600,10,4e3,1),o("L2","mm",1e3,10,4e3,1),o("L3","mm",400,5,800,1),o("L4","mm",300,5,800,1),G("outer frame"),o("N1","",7,1,20,1),o("N2","",4,1,20,1),o("D1","mm",10,1,40,1),o("L5","mm",100,1,400,1),o("L6","mm",20,1,400,1),o("R1","mm",60,1,400,1),o("R2","mm",20,1,400,1),G("inner pad"),o("N3","",2,1,20,1),o("N4","",2,1,20,1),o("D2","mm",10,1,40,1),o("L7","mm",20,1,400,1),o("R3","mm",20,1,400,1),G("diagonal shaft"),o("D3","mm",30,1,100,1),o("D4","mm",26,1,100,1),o("H1","mm",300,.5,800,.5),o("H2","mm",2,.5,800,.5),o("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 ko(s,e,l=""){const t=_e(xt.partName+l);let i,c;const r=y(),n=y(),g=y(),a=y(),u=y();t.logstr+=`${t.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)),h=e.R3*(1-1/Math.sqrt(2)),d=e.L2/2-S-(e.L4/2-h),_=e.L1/2-S-(e.L3/2-h),f=Math.sqrt(d**2+_**2),H=e.H1-e.H2-e.H3,k=Math.sqrt(f**2+H**2),M=Math.atan2(H,f),D=Math.atan2(_,d);t.logstr+=`rod-slope: length: ${L(k)} mm, angle: ${L(ae(M))} degree
|
|
108
|
+
`,t.logstr+=`rod-xy-angle: ${L(ae(D))} degree
|
|
109
|
+
`;const A=e.D3/Math.cos(Math.PI/2-M);t.logstr+=`rod-footprint-length: ${L(A)} mm
|
|
110
|
+
`;const N=Math.sqrt((A/2)**2+(e.D3/2)**2),R=Math.atan2(e.D3,A);i=function(b,Z,j){return J(b,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)},c=function(b,Z,j){const he=b+N*Math.cos(j+Math.PI-R),re=Z+N*Math.sin(j+Math.PI-R);return J(he,re).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),r.addSecond(O);const I=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 b=1;b<e.N1+1;b++)F.push(P(e.L2/2-e.L6,-e.L1/2+b*I,e.D1/2)),F.push(P(-e.L2/2+e.L6,-e.L1/2+b*I,e.D1/2));for(let b=1;b<e.N2+1;b++)F.push(P(-e.L2/2+b*$,e.L1/2-e.L6,e.D1/2)),F.push(P(-e.L2/2+b*$,-e.L1/2+e.L6,e.D1/2));const T=[];for(let b=1;b<e.N3+1;b++)T.push(P(e.L4/2-e.L7,-e.L3/2+b*m,e.D2/2)),T.push(P(-e.L4/2+e.L7,-e.L3/2+b*m,e.D2/2));for(let b=1;b<e.N4+1;b++)T.push(P(-e.L4/2+b*q,e.L3/2-e.L7,e.D2/2)),T.push(P(-e.L4/2+b*q,-e.L3/2+e.L7,e.D2/2));F.forEach(b=>{v.push(b)}),T.forEach(b=>{r.addSecond(b)}),r.addMainOI(v);const p=[];p.push(i(e.L2/2-S,e.L1/2-S,D)),p.push(i(e.L4/2-h,e.L3/2-h,D)),p.push(i(-e.L2/2+S,e.L1/2-S,Math.PI-D)),p.push(i(-e.L4/2+h,e.L3/2-h,Math.PI-D)),p.push(i(-e.L2/2+S,-e.L1/2+S,Math.PI+D)),p.push(i(-e.L4/2+h,-e.L3/2+h,Math.PI+D)),p.push(i(e.L2/2-S,-e.L1/2+S,-D)),p.push(i(e.L4/2-h,-e.L3/2+h,-D));const Y=[];Y.push(c(e.L2/2-S,e.L1/2-S,D)),Y.push(c(-e.L2/2+S,e.L1/2-S,Math.PI-D)),Y.push(c(-e.L2/2+S,-e.L1/2+S,Math.PI+D)),Y.push(c(e.L2/2-S,-e.L1/2+S,-D)),p.forEach(b=>{r.addSecond(b)}),Y.forEach(b=>{r.addSecond(b)});const C=[];if(C.push(O),T.forEach(b=>{C.push(b)}),n.addSecond(E),n.addSecond(x),F.forEach(b=>{n.addSecond(b)}),p.forEach(b=>{n.addSecond(b)}),Y.forEach(b=>{n.addSecond(b)}),n.addMainOI(C),e.D4>=e.D3)throw`err218: D4 ${e.D4} larger than D3 ${e.D3}`;g.addMainO(P(0,0,e.D3/2)),g.addSecond(P(0,0,e.D4/2)),a.addMainO(P(0,0,e.D4/2)),a.addSecond(P(0,0,e.D3/2));const K=e.D3*Math.cos(M),ie=K/Math.tan(M),V=h+(A/2+ie)*Math.cos(D),te=h+(A/2+ie)*Math.sin(D),w=k+2*(A+ie+K),W=w+e.L3+e.L4+K,ne=J(W,W).addSegStrokeA(-W,W).addSegStrokeA(-W,-W).addSegStrokeA(W,-W).closeSegStroke();u.addMainO(ne),t.fig={faceFrame:r,facePlate:n,faceRod:g,faceRodHollow:a,faceCutRod:u};const B=t.partName;t.vol={extrudes:[{outName:`subpax_${B}_frame`,face:`${B}_faceFrame`,extrudeMethod:U.eLinearOrtho,length:e.H2,rotate:[0,0,0],translate:[0,0,e.H1-e.H2]},{outName:`subpax_${B}_plate`,face:`${B}_facePlate`,extrudeMethod:U.eLinearOrtho,length:e.H3,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${B}_rod1`,face:`${B}_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_${B}_rod2`,face:`${B}_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_${B}_rod3`,face:`${B}_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_${B}_rod4`,face:`${B}_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_${B}_rodH1`,face:`${B}_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_${B}_rodH2`,face:`${B}_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_${B}_rodH3`,face:`${B}_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_${B}_rodH4`,face:`${B}_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_${B}_cut1`,face:`${B}_faceCutRod`,extrudeMethod:U.eLinearOrtho,length:W,rotate:[0,0,0],translate:[0,0,-W]},{outName:`subpax_${B}_cut2`,face:`${B}_faceCutRod`,extrudeMethod:U.eLinearOrtho,length:W,rotate:[0,0,0],translate:[0,0,e.H1]}],volumes:[{outName:`ipax_${B}_rawRod`,boolMethod:ce.eUnion,inList:[`subpax_${B}_rod1`,`subpax_${B}_rod2`,`subpax_${B}_rod3`,`subpax_${B}_rod4`]},{outName:`ipax_${B}_rodHollow`,boolMethod:ce.eUnion,inList:[`subpax_${B}_rodH1`,`subpax_${B}_rodH2`,`subpax_${B}_rodH3`,`subpax_${B}_rodH4`]},{outName:`ipax_${B}_halfRods`,boolMethod:ce.eSubstraction,inList:[`ipax_${B}_rawRod`,`subpax_${B}_cut1`]},{outName:`ipax_${B}_rods`,boolMethod:ce.eSubstraction,inList:[`ipax_${B}_halfRods`,`subpax_${B}_cut2`]},{outName:`ipax_${B}_plus`,boolMethod:ce.eUnion,inList:[`subpax_${B}_frame`,`subpax_${B}_plate`,`ipax_${B}_rods`]},{outName:`pax_${B}`,boolMethod:ce.eSubstraction,inList:[`ipax_${B}_plus`,`ipax_${B}_rodHollow`]}]},t.sub={},t.logstr+=`trapeze drawn successfully!
|
|
111
|
+
`,t.calcErr=!1}catch(S){t.logstr+=S,console.log(S)}return t}var Ro={pTitle:"Heliostat trapeze",pDescription:"The support of one solar panel. Made out of aluminium for lightness and cooling",pDef:xt,pGeom:ko},$t={partName:"surface",params:[o("LH","mm",1600,10,4e3,1),o("LV","mm",1e3,10,4e3,1),o("LZ","mm",40,0,100,1),o("nx","",9,1,40,1),o("ny","",9,1,40,1),G("main fantasia"),$e("main_direction",["horizontal","vertical"]),xe("crenel",!1),o("first_row","",9,1,40,1),o("second_row","",9,1,40,1),G("horizontal spacing"),o("EH","mm",10,0,1e3,1),xe("EH_gradient",!1),o("EH_sup","mm",500,0,1e3,1),o("EH_cycle","",1,0,3,.05),o("EH_start","",0,0,1,.05),$e("EH_shape",["sinusoid","triangle","sawUp","sawDown"]),G("vertical spacing"),o("EV","mm",10,0,1e3,1),xe("EV_gradient",!1),o("EV_sup","mm",500,0,1e3,1),o("EV_cycle","",1,0,3,.05),o("EV_start","",0,0,1,.05),$e("EV_shape",["sinusoid","triangle","sawUp","sawDown"]),G("solar power"),o("power_efficiency","%",16,0,100,.1),o("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 No(s,e,l=""){const t=_e($t.partName+l);let i;const c=y(),r=y();t.logstr+=`${t.partName} simTime: ${s}
|
|
112
|
+
`;try{const n=e.LH*e.LV/1e6,g=e.solar_power*n*e.power_efficiency/100;t.logstr+=`panel surface: ${L(n)} m2
|
|
113
|
+
`,t.logstr+=`panel power: ${L(g)} W
|
|
114
|
+
`;const a=e.nx*e.ny;t.logstr+=`max panel number: ${a}
|
|
115
|
+
`,t.logstr+=`max panel surface: ${L(a*n)} m2
|
|
116
|
+
`,t.logstr+=`max panel power: ${L(a*g)} W
|
|
117
|
+
`;const u=e.main_direction===1?e.ny:e.nx,S=e.main_direction===1?e.nx:e.ny,h=e.main_direction===1?e.EV:e.EH,d=e.main_direction===1?e.EV_gradient:e.EH_gradient,_=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,A=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<u;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,u>2&&(x[1]=e.second_row,x[x.length-2]=e.second_row);let O=0;x.forEach(w=>{O+=w}),t.logstr+=`actual panel number: ${O} (${L(100*O/a)} %)
|
|
118
|
+
`,t.logstr+=`actual panel surface: ${L(O*n)} m2
|
|
119
|
+
`,t.logstr+=`actual panel power: ${L(O*g)} W
|
|
120
|
+
`;const I=[];for(let w=0;w<u-1;w++){let W=h;if(d===1){const ne=u>2?u-2:1,B=(H+w*f/ne)%1;switch(k){case 0:W+=_*(1-Math.cos(B*2*Math.PI))/2;break;case 1:W+=_*(1-2*Math.abs(B-.5));break;case 2:W+=_*B;break;case 3:W+=_*(1-B);break;default:W+=_}}I.push(W)}let $=0;const m=[];m.push(0),I.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,B=(R+w*N/ne)%1;switch(v){case 0:W+=A*(1-Math.cos(B*2*Math.PI))/2;break;case 1:W+=A*(1-2*Math.abs(B-.5));break;case 2:W+=A*B;break;case 3:W+=A*(1-B);break;default:W+=A}}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=u*e.LH+$,Y=E*e.LV+F):(p=E*e.LH+F,Y=u*e.LV+$);const C=p*Y/10**6;t.logstr+=`global horizontal width: ${L(p/1e3)} m
|
|
121
|
+
`,t.logstr+=`global vertical height: ${L(Y/1e3)} m
|
|
122
|
+
`,t.logstr+=`global area: ${L(C)} m2
|
|
123
|
+
`,t.logstr+=`area efficiency: ${L(100*O*n/C)} %
|
|
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,B=Math.floor((E-w)/2);for(let b=0;b<w;b++){let Z=0,j=0;e.main_direction===0?(Z=K+W*e.LH+m[W],j=ie+(B+b)*e.LV+T[B+b],ne===1&&(j+=(e.LV+T[B+b+1]-T[B+b])/2)):(j=ie+W*e.LV+m[W],Z=K+(B+b)*e.LH+T[B+b],ne===1&&(Z+=(e.LH+T[B+b+1]-T[B+b])/2)),V.push([Z,j])}});for(const w of V)c.addMainO(i(w[0],w[1]));r.addMainO(i(0,0)),t.fig={faceSurface:c,faceOnePanel:r};const te=t.partName;t.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:ce.eUnion,inList:V.map((w,W)=>`subpax_${te}_panel_${W}`)}]},t.sub={},t.logstr+=`panel-surface drawn successfully!
|
|
125
|
+
`,t.calcErr=!1}catch(n){t.logstr+=n,console.log(n)}return t}var Io={pTitle:"Heliostat panel-surface",pDescription:"The surface collecting the solar power",pDef:$t,pGeom:No};const wt={"gear/gear_wheel":Xt,"gear/gear_bar":Zt,"gear/gear_ring":Qt,"gear/gear_epicycloid":to,"heliostat/heliostat":ho,"heliostat/heliostat_2":_o,"heliostat/base":fo,"heliostat/pole_static":Ne,"heliostat/vaxis":Ho,"heliostat/ring":Po,"heliostat/vaxis_holder":Ae,"heliostat/ring_guidance":xo,"heliostat/vaxis_guidance":wo,"heliostat/rake":Ie,"heliostat/rake_stopper":We,"heliostat/haxis_guidance":Eo,"heliostat/spider":Ue,"heliostat/swing":Ce,"heliostat/rod":bo,"heliostat/trapeze":Ro,"heliostat/surface":Io};function Co(s){const e=/^.*\//g;return s.replace(e,"")}function Vo(s){const e={};for(const l of Object.keys(s)){const t=Co(l);e[t]=`/${l}`}return e}function yo(s){const e=[];for(const l of Object.keys(s))e.push(l);return e}const Go=Vo(wt),zo=yo(wt);export{wt as a,Go as b,Jo as c,zo as d,mo as e,po as r,et as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var s;const e=((s=globalThis.__sveltekit_1v61k9f)==null?void 0:s.base)??"";var a;const t=((a=globalThis.__sveltekit_1v61k9f)==null?void 0:a.assets)??e;export{t as a,e as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var gn=Array.isArray,Dn=Array.from,Rn=Object.defineProperty,it=Object.getOwnPropertyDescriptor,Kt=Object.getOwnPropertyDescriptors,Sn=Object.prototype,On=Array.prototype,$t=Object.getPrototypeOf;const Cn=()=>{};function xn(t){return t()}function pt(t){for(var n=0;n<t.length;n++)t[n]()}const m=2,ht=4,M=8,et=16,y=32,z=64,R=128,U=256,h=512,I=1024,H=2048,N=4096,Y=8192,Zt=16384,dt=32768,Nn=65536,zt=1<<18,Et=1<<19,ft=Symbol("$state"),bn=Symbol("");function yt(t){return t===this.v}function Wt(t,n){return t!=t?n==n:t!==n||t!==null&&typeof t=="object"||typeof t=="function"}function wt(t){return!Wt(t,this.v)}function Xt(t){throw new Error("effect_in_teardown")}function Jt(){throw new Error("effect_in_unowned_derived")}function Qt(t){throw new Error("effect_orphan")}function tn(){throw new Error("effect_update_depth_exceeded")}function qn(){throw new Error("hydration_failed")}function Fn(t){throw new Error("props_invalid_value")}function Pn(){throw new Error("state_descriptors_fixed")}function Ln(){throw new Error("state_prototype_fixed")}function nn(){throw new Error("state_unsafe_local_read")}function rn(){throw new Error("state_unsafe_mutation")}let W=!1;function Mn(){W=!0}function st(t){return{f:0,v:t,reactions:null,equals:yt,version:0}}function Hn(t){return en(st(t))}function Yn(t,n=!1){var e;const r=st(t);return n||(r.equals=wt),W&&f!==null&&f.l!==null&&((e=f.l).s??(e.s=[])).push(r),r}function en(t){return o!==null&&o.f&m&&(E===null?yn([t]):E.push(t)),t}function jn(t,n){return o!==null&&ut()&&o.f&(m|et)&&(E===null||!E.includes(t))&&rn(),sn(t,n)}function sn(t,n){return t.equals(n)||(t.v=n,t.version=Yt(),Tt(t,I),ut()&&u!==null&&u.f&h&&!(u.f&y)&&(c!==null&&c.includes(t)?(w(u,I),J(u)):k===null?wn([t]):k.push(t))),n}function Tt(t,n){var r=t.reactions;if(r!==null)for(var e=ut(),s=r.length,a=0;a<s;a++){var l=r[a],i=l.f;i&I||!e&&l===u||(w(l,n),i&(h|R)&&(i&m?Tt(l,H):J(l)))}}const Bn=1,Un=2,Vn=4,Gn=8,Kn=16,$n=1,Zn=2,zn=4,Wn=8,Xn=16,Jn=1,Qn=2,an="[",ln="[!",un="]",mt={},tr=Symbol();function At(t){console.warn("hydration_mismatch")}let D=!1;function nr(t){D=t}let _;function b(t){if(t===null)throw At(),mt;return _=t}function rr(){return b(S(_))}function er(t){if(D){if(S(_)!==null)throw At(),mt;_=t}}function sr(t=1){if(D){for(var n=t,r=_;n--;)r=S(r);_=r}}function ar(){for(var t=0,n=_;;){if(n.nodeType===8){var r=n.data;if(r===un){if(t===0)return n;t-=1}else(r===an||r===ln)&&(t+=1)}var e=S(n);n.remove(),n=e}}var _t,kt,It;function lr(){if(_t===void 0){_t=window;var t=Element.prototype,n=Node.prototype;kt=it(n,"firstChild").get,It=it(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 V(t=""){return document.createTextNode(t)}function Q(t){return kt.call(t)}function S(t){return It.call(t)}function ur(t,n){if(!D)return Q(t);var r=Q(_);if(r===null)r=_.appendChild(V());else if(n&&r.nodeType!==3){var e=V();return r==null||r.before(e),b(e),e}return b(r),r}function or(t,n){if(!D){var r=Q(t);return r instanceof Comment&&r.data===""?S(r):r}if(n&&(_==null?void 0:_.nodeType)!==3){var e=V();return _==null||_.before(e),b(e),e}return _}function ir(t,n=1,r=!1){let e=D?_:t;for(;n--;)e=S(e);if(!D)return e;var s=e.nodeType;if(r&&s!==3){var a=V();return e==null||e.before(a),b(a),a}return b(e),e}function fr(t){t.textContent=""}function on(t){var n=m|I;u===null?n|=R:u.f|=Et;const r={children:null,ctx:f,deps:null,equals:yt,f:n,fn:t,reactions:null,v:null,version:0,parent:u};if(o!==null&&o.f&m){var e=o;(e.children??(e.children=[])).push(r)}return r}function _r(t){const n=on(t);return n.equals=wt,n}function gt(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&m?at(e):F(e)}}}function Dt(t){var n,r=u;Z(t.parent);try{gt(t),n=jt(t)}finally{Z(r)}return n}function Rt(t){var n=Dt(t),r=(O||t.f&R)&&t.deps!==null?H:h;w(t,r),t.equals(n)||(t.v=n,t.version=Yt())}function at(t){gt(t),L(t,0),w(t,Y),t.v=t.children=t.deps=t.ctx=t.reactions=null}function St(t){u===null&&o===null&&Qt(),o!==null&&o.f&R&&Jt(),lt&&Xt()}function fn(t,n){var r=n.last;r===null?n.last=n.first=t:(r.next=t,t.prev=r,n.last=t)}function q(t,n,r,e=!0){var s=(t&z)!==0,a=u,l={ctx:f,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:t|I,first:null,fn:n,last:null,next:null,parent:s?null:a,prev:null,teardown:null,transitions:null,version:0};if(r){var i=C;try{ct(!0),X(l),l.f|=Zt}catch(v){throw F(l),v}finally{ct(i)}}else n!==null&&J(l);var T=r&&l.deps===null&&l.first===null&&l.nodes_start===null&&l.teardown===null&&(l.f&Et)===0;if(!T&&!s&&e&&(a!==null&&fn(l,a),o!==null&&o.f&m)){var A=o;(A.children??(A.children=[])).push(l)}return l}function cr(t){const n=q(M,null,!1);return w(n,h),n.teardown=t,n}function vr(t){St();var n=u!==null&&(u.f&y)!==0&&f!==null&&!f.m;if(n){var r=f;(r.e??(r.e=[])).push({fn:t,effect:u,reaction:o})}else{var e=Ot(t);return e}}function pr(t){return St(),_n(t)}function hr(t){const n=q(z,t,!0);return()=>{F(n)}}function Ot(t){return q(ht,t,!1)}function _n(t){return q(M,t,!0)}function dr(t){return cn(t)}function cn(t,n=0){return q(M|et|n,t,!0)}function Er(t,n=!0){return q(M|y,t,!0,n)}function Ct(t){var n=t.teardown;if(n!==null){const r=lt,e=o;vt(!0),$(null);try{n.call(null)}finally{vt(r),$(e)}}}function xt(t){var n=t.deriveds;if(n!==null){t.deriveds=null;for(var r=0;r<n.length;r+=1)at(n[r])}}function Nt(t,n=!1){var r=t.first;for(t.first=t.last=null;r!==null;){var e=r.next;F(r,n),r=e}}function vn(t){for(var n=t.first;n!==null;){var r=n.next;n.f&y||F(n),n=r}}function F(t,n=!0){var r=!1;if((n||t.f&zt)&&t.nodes_start!==null){for(var e=t.nodes_start,s=t.nodes_end;e!==null;){var a=e===s?null:S(e);e.remove(),e=a}r=!0}Nt(t,n&&!r),xt(t),L(t,0),w(t,Y);var l=t.transitions;if(l!==null)for(const T of l)T.stop();Ct(t);var i=t.parent;i!==null&&i.first!==null&&bt(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.parent=t.fn=t.nodes_start=t.nodes_end=null}function bt(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 yr(t,n){var r=[];qt(t,r,!0),pn(r,()=>{F(t),n&&n()})}function pn(t,n){var r=t.length;if(r>0){var e=()=>--r||n();for(var s of t)s.out(e)}else n()}function qt(t,n,r){if(!(t.f&N)){if(t.f^=N,t.transitions!==null)for(const l of t.transitions)(l.is_global||r)&&n.push(l);for(var e=t.first;e!==null;){var s=e.next,a=(e.f&dt)!==0||(e.f&y)!==0;qt(e,n,a?r:!1),e=s}}}function wr(t){Ft(t,!0)}function Ft(t,n){if(t.f&N){j(t)&&X(t),t.f^=N;for(var r=t.first;r!==null;){var e=r.next,s=(r.f&dt)!==0||(r.f&y)!==0;Ft(r,s?n:!1),r=e}if(t.transitions!==null)for(const a of t.transitions)(a.is_global||n)&&a.in()}}const hn=typeof requestIdleCallback>"u"?t=>setTimeout(t,1):requestIdleCallback;let G=!1,K=!1,tt=[],nt=[];function Pt(){G=!1;const t=tt.slice();tt=[],pt(t)}function Lt(){K=!1;const t=nt.slice();nt=[],pt(t)}function Tr(t){G||(G=!0,queueMicrotask(Pt)),tt.push(t)}function mr(t){K||(K=!0,hn(Lt)),nt.push(t)}function dn(){G&&Pt(),K&&Lt()}const Mt=0,En=1;let B=Mt,P=!1,C=!1,lt=!1;function ct(t){C=t}function vt(t){lt=t}let g=[],x=0;let o=null;function $(t){o=t}let u=null;function Z(t){u=t}let E=null;function yn(t){E=t}let c=null,d=0,k=null;function wn(t){k=t}let Ht=0,O=!1,f=null;function Yt(){return++Ht}function ut(){return!W||f!==null&&f.l===null}function j(t){var l,i;var n=t.f;if(n&I)return!0;if(n&H){var r=t.deps,e=(n&R)!==0;if(r!==null){var s;if(n&U){for(s=0;s<r.length;s++)((l=r[s]).reactions??(l.reactions=[])).push(t);t.f^=U}for(s=0;s<r.length;s++){var a=r[s];if(j(a)&&Rt(a),e&&u!==null&&!O&&!((i=a==null?void 0:a.reactions)!=null&&i.includes(t))&&(a.reactions??(a.reactions=[])).push(t),a.version>t.version)return!0}}e||w(t,h)}return!1}function Tn(t,n,r){throw t}function jt(t){var ot;var n=c,r=d,e=k,s=o,a=O,l=E,i=f,T=t.f;c=null,d=0,k=null,o=T&(y|z)?null:t,O=!C&&(T&R)!==0,E=null,f=t.ctx;try{var A=(0,t.fn)(),v=t.deps;if(c!==null){var p;if(L(t,d),v!==null&&d>0)for(v.length=d+c.length,p=0;p<c.length;p++)v[d+p]=c[p];else t.deps=v=c;if(!O)for(p=d;p<v.length;p++)((ot=v[p]).reactions??(ot.reactions=[])).push(t)}else v!==null&&d<v.length&&(L(t,d),v.length=d);return A}finally{c=n,d=r,k=e,o=s,O=a,E=l,f=i}}function mn(t,n){let r=n.reactions;if(r!==null){var e=r.indexOf(t);if(e!==-1){var s=r.length-1;s===0?r=n.reactions=null:(r[e]=r[s],r.pop())}}r===null&&n.f&m&&(c===null||!c.includes(n))&&(w(n,H),n.f&(R|U)||(n.f^=U),L(n,0))}function L(t,n){var r=t.deps;if(r!==null)for(var e=n;e<r.length;e++)mn(t,r[e])}function X(t){var n=t.f;if(!(n&Y)){w(t,h);var r=u;u=t;try{n&et?vn(t):Nt(t),xt(t),Ct(t);var e=jt(t);t.teardown=typeof e=="function"?e:null,t.version=Ht}catch(s){Tn(s)}finally{u=r}}}function Bt(){x>1e3&&(x=0,tn()),x++}function Ut(t){var n=t.length;if(n!==0){Bt();var r=C;C=!0;try{for(var e=0;e<n;e++){var s=t[e];s.f&h||(s.f^=h);var a=[];Vt(s,a),An(a)}}finally{C=r}}}function An(t){var n=t.length;if(n!==0)for(var r=0;r<n;r++){var e=t[r];!(e.f&(Y|N))&&j(e)&&(X(e),e.deps===null&&e.first===null&&e.nodes_start===null&&(e.teardown===null?bt(e):e.fn=null))}}function kn(){if(P=!1,x>1001)return;const t=g;g=[],Ut(t),P||(x=0)}function J(t){B===Mt&&(P||(P=!0,queueMicrotask(kn)));for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(r&(z|y)){if(!(r&h))return;n.f^=h}}g.push(n)}function Vt(t,n){var r=t.first,e=[];t:for(;r!==null;){var s=r.f,a=(s&y)!==0,l=a&&(s&h)!==0;if(!l&&!(s&N))if(s&M){a?r.f^=h:j(r)&&X(r);var i=r.first;if(i!==null){r=i;continue}}else s&ht&&e.push(r);var T=r.next;if(T===null){let p=r.parent;for(;p!==null;){if(t===p)break t;var A=p.next;if(A!==null){r=A;continue t}p=p.parent}}r=T}for(var v=0;v<e.length;v++)i=e[v],n.push(i),Vt(i,n)}function Gt(t){var n=B,r=g;try{Bt();const s=[];B=En,g=s,P=!1,Ut(r);var e=t==null?void 0:t();return dn(),(g.length>0||s.length>0)&&Gt(),x=0,e}finally{B=n,g=r}}async function Ar(){await Promise.resolve(),Gt()}function kr(t){var i;var n=t.f,r=(n&m)!==0;if(r&&n&Y){var e=Dt(t);return at(t),e}if(o!==null){E!==null&&E.includes(t)&&nn();var s=o.deps;c===null&&s!==null&&s[d]===t?d++:c===null?c=[t]:c.push(t),k!==null&&u!==null&&u.f&h&&!(u.f&y)&&k.includes(t)&&(w(u,I),J(u))}else if(r&&t.deps===null){var a=t,l=a.parent;l!==null&&!((i=l.deriveds)!=null&&i.includes(a))&&(l.deriveds??(l.deriveds=[])).push(a)}return r&&(a=t,j(a)&&Rt(a)),t.v}function Ir(t){const n=o;try{return o=null,t()}finally{o=n}}const In=~(I|H|h);function w(t,n){t.f=t.f&In|n}function gr(t,n=!1,r){f={p:f,c:null,e:null,m:!1,s:t,x:null,l:null},W&&!n&&(f.l={s:null,u:null,r1:[],r2:st(!1)})}function Dr(t){const n=f;if(n!==null){const l=n.e;if(l!==null){var r=u,e=o;n.e=null;try{for(var s=0;s<l.length;s++){var a=l[s];Z(a.effect),$(a.reaction),Ot(a.fn)}}finally{Z(r),$(e)}}f=n.p,n.m=!0}return{}}function Rr(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(ft in t)rt(t);else if(!Array.isArray(t))for(let n in t){const r=t[n];typeof r=="object"&&r&&ft in r&&rt(r)}}}function rt(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{rt(t[e],n)}catch{}const r=$t(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const e=Kt(r);for(let s in e){const a=e[s].get;if(a)try{a.call(t)}catch{}}}}}export{y as $,sr as A,Sn as B,On as C,st as D,dt as E,Pn as F,it as G,u as H,Ln as I,$t as J,gn as K,wr as L,yr as M,rr as N,ln as O,ar as P,b as Q,nr as R,ft as S,Ot as T,tr as U,_n as V,Tr as W,Fn as X,Nn as Y,zn as Z,wt as _,Dr as a,z as a0,Z as a1,$n as a2,W as a3,Zn as a4,Wn as a5,_r as a6,Xn as a7,Gt as a8,Rn as a9,Kn as aA,bn as aB,Kt as aC,mr as aD,ut as aE,_t as aF,Wt as aG,Ar as aa,Hn as ab,Q as ac,fr as ad,$ as ae,o as af,V as ag,Jn as ah,Qn as ai,lr as aj,an as ak,S as al,mt as am,un as an,At as ao,qn as ap,Dn as aq,hr as ar,Vn as as,N as at,Bn as au,sn as av,Un as aw,qt as ax,pn as ay,Gn as az,cn as b,ur as c,Er as d,F as e,or as f,_ as g,D as h,Mn as i,kr as j,vr as k,Ir as l,pt as m,Cn as n,f as o,gr as p,xn as q,er as r,ir as s,dr as t,pr as u,Rr as v,on as w,cr as x,Yn as y,jn as z};
|
|
1
|
+
var gn=Array.isArray,Dn=Array.from,Rn=Object.defineProperty,it=Object.getOwnPropertyDescriptor,Kt=Object.getOwnPropertyDescriptors,Sn=Object.prototype,On=Array.prototype,$t=Object.getPrototypeOf;const Cn=()=>{};function xn(t){return t()}function pt(t){for(var n=0;n<t.length;n++)t[n]()}const m=2,ht=4,M=8,et=16,y=32,z=64,R=128,U=256,h=512,I=1024,H=2048,N=4096,Y=8192,Zt=16384,dt=32768,Nn=65536,zt=1<<18,Et=1<<19,ft=Symbol("$state"),bn=Symbol("");function yt(t){return t===this.v}function Wt(t,n){return t!=t?n==n:t!==n||t!==null&&typeof t=="object"||typeof t=="function"}function wt(t){return!Wt(t,this.v)}function Xt(t){throw new Error("effect_in_teardown")}function Jt(){throw new Error("effect_in_unowned_derived")}function Qt(t){throw new Error("effect_orphan")}function tn(){throw new Error("effect_update_depth_exceeded")}function qn(){throw new Error("hydration_failed")}function Fn(t){throw new Error("props_invalid_value")}function Pn(){throw new Error("state_descriptors_fixed")}function Ln(){throw new Error("state_prototype_fixed")}function nn(){throw new Error("state_unsafe_local_read")}function rn(){throw new Error("state_unsafe_mutation")}let W=!1;function Mn(){W=!0}function st(t){return{f:0,v:t,reactions:null,equals:yt,version:0}}function Hn(t){return en(st(t))}function Yn(t,n=!1){var e;const r=st(t);return n||(r.equals=wt),W&&f!==null&&f.l!==null&&((e=f.l).s??(e.s=[])).push(r),r}function en(t){return o!==null&&o.f&m&&(E===null?yn([t]):E.push(t)),t}function jn(t,n){return o!==null&&ut()&&o.f&(m|et)&&(E===null||!E.includes(t))&&rn(),sn(t,n)}function sn(t,n){return t.equals(n)||(t.v=n,t.version=Yt(),Tt(t,I),ut()&&u!==null&&u.f&h&&!(u.f&y)&&(c!==null&&c.includes(t)?(w(u,I),J(u)):k===null?wn([t]):k.push(t))),n}function Tt(t,n){var r=t.reactions;if(r!==null)for(var e=ut(),s=r.length,a=0;a<s;a++){var l=r[a],i=l.f;i&I||!e&&l===u||(w(l,n),i&(h|R)&&(i&m?Tt(l,H):J(l)))}}const Bn=1,Un=2,Vn=4,Gn=8,Kn=16,$n=1,Zn=2,zn=4,Wn=8,Xn=16,Jn=1,Qn=2,an="[",ln="[!",un="]",mt={},tr=Symbol();function At(t){console.warn("hydration_mismatch")}let D=!1;function nr(t){D=t}let _;function b(t){if(t===null)throw At(),mt;return _=t}function rr(){return b(S(_))}function er(t){if(D){if(S(_)!==null)throw At(),mt;_=t}}function sr(t=1){if(D){for(var n=t,r=_;n--;)r=S(r);_=r}}function ar(){for(var t=0,n=_;;){if(n.nodeType===8){var r=n.data;if(r===un){if(t===0)return n;t-=1}else(r===an||r===ln)&&(t+=1)}var e=S(n);n.remove(),n=e}}var _t,kt,It;function lr(){if(_t===void 0){_t=window;var t=Element.prototype,n=Node.prototype;kt=it(n,"firstChild").get,It=it(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 V(t=""){return document.createTextNode(t)}function Q(t){return kt.call(t)}function S(t){return It.call(t)}function ur(t,n){if(!D)return Q(t);var r=Q(_);if(r===null)r=_.appendChild(V());else if(n&&r.nodeType!==3){var e=V();return r==null||r.before(e),b(e),e}return b(r),r}function or(t,n){if(!D){var r=Q(t);return r instanceof Comment&&r.data===""?S(r):r}if(n&&(_==null?void 0:_.nodeType)!==3){var e=V();return _==null||_.before(e),b(e),e}return _}function ir(t,n=1,r=!1){let e=D?_:t;for(;n--;)e=S(e);if(!D)return e;var s=e.nodeType;if(r&&s!==3){var a=V();return e==null||e.before(a),b(a),a}return b(e),e}function fr(t){t.textContent=""}function on(t){var n=m|I;u===null?n|=R:u.f|=Et;const r={children:null,ctx:f,deps:null,equals:yt,f:n,fn:t,reactions:null,v:null,version:0,parent:u};if(o!==null&&o.f&m){var e=o;(e.children??(e.children=[])).push(r)}return r}function _r(t){const n=on(t);return n.equals=wt,n}function gt(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&m?at(e):F(e)}}}function Dt(t){var n,r=u;Z(t.parent);try{gt(t),n=jt(t)}finally{Z(r)}return n}function Rt(t){var n=Dt(t),r=(O||t.f&R)&&t.deps!==null?H:h;w(t,r),t.equals(n)||(t.v=n,t.version=Yt())}function at(t){gt(t),L(t,0),w(t,Y),t.v=t.children=t.deps=t.ctx=t.reactions=null}function St(t){u===null&&o===null&&Qt(),o!==null&&o.f&R&&Jt(),lt&&Xt()}function fn(t,n){var r=n.last;r===null?n.last=n.first=t:(r.next=t,t.prev=r,n.last=t)}function q(t,n,r,e=!0){var s=(t&z)!==0,a=u,l={ctx:f,deps:null,deriveds:null,nodes_start:null,nodes_end:null,f:t|I,first:null,fn:n,last:null,next:null,parent:s?null:a,prev:null,teardown:null,transitions:null,version:0};if(r){var i=C;try{ct(!0),X(l),l.f|=Zt}catch(v){throw F(l),v}finally{ct(i)}}else n!==null&&J(l);var T=r&&l.deps===null&&l.first===null&&l.nodes_start===null&&l.teardown===null&&(l.f&Et)===0;if(!T&&!s&&e&&(a!==null&&fn(l,a),o!==null&&o.f&m)){var A=o;(A.children??(A.children=[])).push(l)}return l}function cr(t){const n=q(M,null,!1);return w(n,h),n.teardown=t,n}function vr(t){St();var n=u!==null&&(u.f&y)!==0&&f!==null&&!f.m;if(n){var r=f;(r.e??(r.e=[])).push({fn:t,effect:u,reaction:o})}else{var e=Ot(t);return e}}function pr(t){return St(),_n(t)}function hr(t){const n=q(z,t,!0);return()=>{F(n)}}function Ot(t){return q(ht,t,!1)}function _n(t){return q(M,t,!0)}function dr(t){return cn(t)}function cn(t,n=0){return q(M|et|n,t,!0)}function Er(t,n=!0){return q(M|y,t,!0,n)}function Ct(t){var n=t.teardown;if(n!==null){const r=lt,e=o;vt(!0),$(null);try{n.call(null)}finally{vt(r),$(e)}}}function xt(t){var n=t.deriveds;if(n!==null){t.deriveds=null;for(var r=0;r<n.length;r+=1)at(n[r])}}function Nt(t,n=!1){var r=t.first;for(t.first=t.last=null;r!==null;){var e=r.next;F(r,n),r=e}}function vn(t){for(var n=t.first;n!==null;){var r=n.next;n.f&y||F(n),n=r}}function F(t,n=!0){var r=!1;if((n||t.f&zt)&&t.nodes_start!==null){for(var e=t.nodes_start,s=t.nodes_end;e!==null;){var a=e===s?null:S(e);e.remove(),e=a}r=!0}Nt(t,n&&!r),xt(t),L(t,0),w(t,Y);var l=t.transitions;if(l!==null)for(const T of l)T.stop();Ct(t);var i=t.parent;i!==null&&i.first!==null&&bt(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.parent=t.fn=t.nodes_start=t.nodes_end=null}function bt(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 yr(t,n){var r=[];qt(t,r,!0),pn(r,()=>{F(t),n&&n()})}function pn(t,n){var r=t.length;if(r>0){var e=()=>--r||n();for(var s of t)s.out(e)}else n()}function qt(t,n,r){if(!(t.f&N)){if(t.f^=N,t.transitions!==null)for(const l of t.transitions)(l.is_global||r)&&n.push(l);for(var e=t.first;e!==null;){var s=e.next,a=(e.f&dt)!==0||(e.f&y)!==0;qt(e,n,a?r:!1),e=s}}}function wr(t){Ft(t,!0)}function Ft(t,n){if(t.f&N){j(t)&&X(t),t.f^=N;for(var r=t.first;r!==null;){var e=r.next,s=(r.f&dt)!==0||(r.f&y)!==0;Ft(r,s?n:!1),r=e}if(t.transitions!==null)for(const a of t.transitions)(a.is_global||n)&&a.in()}}const hn=typeof requestIdleCallback>"u"?t=>setTimeout(t,1):requestIdleCallback;let G=!1,K=!1,tt=[],nt=[];function Pt(){G=!1;const t=tt.slice();tt=[],pt(t)}function Lt(){K=!1;const t=nt.slice();nt=[],pt(t)}function Tr(t){G||(G=!0,queueMicrotask(Pt)),tt.push(t)}function mr(t){K||(K=!0,hn(Lt)),nt.push(t)}function dn(){G&&Pt(),K&&Lt()}const Mt=0,En=1;let B=Mt,P=!1,C=!1,lt=!1;function ct(t){C=t}function vt(t){lt=t}let g=[],x=0;let o=null;function $(t){o=t}let u=null;function Z(t){u=t}let E=null;function yn(t){E=t}let c=null,d=0,k=null;function wn(t){k=t}let Ht=0,O=!1,f=null;function Yt(){return++Ht}function ut(){return!W||f!==null&&f.l===null}function j(t){var l,i;var n=t.f;if(n&I)return!0;if(n&H){var r=t.deps,e=(n&R)!==0;if(r!==null){var s;if(n&U){for(s=0;s<r.length;s++)((l=r[s]).reactions??(l.reactions=[])).push(t);t.f^=U}for(s=0;s<r.length;s++){var a=r[s];if(j(a)&&Rt(a),e&&u!==null&&!O&&!((i=a==null?void 0:a.reactions)!=null&&i.includes(t))&&(a.reactions??(a.reactions=[])).push(t),a.version>t.version)return!0}}e||w(t,h)}return!1}function Tn(t,n,r){throw t}function jt(t){var ot;var n=c,r=d,e=k,s=o,a=O,l=E,i=f,T=t.f;c=null,d=0,k=null,o=T&(y|z)?null:t,O=!C&&(T&R)!==0,E=null,f=t.ctx;try{var A=(0,t.fn)(),v=t.deps;if(c!==null){var p;if(L(t,d),v!==null&&d>0)for(v.length=d+c.length,p=0;p<c.length;p++)v[d+p]=c[p];else t.deps=v=c;if(!O)for(p=d;p<v.length;p++)((ot=v[p]).reactions??(ot.reactions=[])).push(t)}else v!==null&&d<v.length&&(L(t,d),v.length=d);return A}finally{c=n,d=r,k=e,o=s,O=a,E=l,f=i}}function mn(t,n){let r=n.reactions;if(r!==null){var e=r.indexOf(t);if(e!==-1){var s=r.length-1;s===0?r=n.reactions=null:(r[e]=r[s],r.pop())}}r===null&&n.f&m&&(c===null||!c.includes(n))&&(w(n,H),n.f&(R|U)||(n.f^=U),L(n,0))}function L(t,n){var r=t.deps;if(r!==null)for(var e=n;e<r.length;e++)mn(t,r[e])}function X(t){var n=t.f;if(!(n&Y)){w(t,h);var r=u;u=t;try{n&et?vn(t):Nt(t),xt(t),Ct(t);var e=jt(t);t.teardown=typeof e=="function"?e:null,t.version=Ht}catch(s){Tn(s)}finally{u=r}}}function Bt(){x>1e3&&(x=0,tn()),x++}function Ut(t){var n=t.length;if(n!==0){Bt();var r=C;C=!0;try{for(var e=0;e<n;e++){var s=t[e];s.f&h||(s.f^=h);var a=[];Vt(s,a),An(a)}}finally{C=r}}}function An(t){var n=t.length;if(n!==0)for(var r=0;r<n;r++){var e=t[r];!(e.f&(Y|N))&&j(e)&&(X(e),e.deps===null&&e.first===null&&e.nodes_start===null&&(e.teardown===null?bt(e):e.fn=null))}}function kn(){if(P=!1,x>1001)return;const t=g;g=[],Ut(t),P||(x=0)}function J(t){B===Mt&&(P||(P=!0,queueMicrotask(kn)));for(var n=t;n.parent!==null;){n=n.parent;var r=n.f;if(r&(z|y)){if(!(r&h))return;n.f^=h}}g.push(n)}function Vt(t,n){var r=t.first,e=[];t:for(;r!==null;){var s=r.f,a=(s&y)!==0,l=a&&(s&h)!==0;if(!l&&!(s&N))if(s&M){a?r.f^=h:j(r)&&X(r);var i=r.first;if(i!==null){r=i;continue}}else s&ht&&e.push(r);var T=r.next;if(T===null){let p=r.parent;for(;p!==null;){if(t===p)break t;var A=p.next;if(A!==null){r=A;continue t}p=p.parent}}r=T}for(var v=0;v<e.length;v++)i=e[v],n.push(i),Vt(i,n)}function Gt(t){var n=B,r=g;try{Bt();const s=[];B=En,g=s,P=!1,Ut(r);var e=t==null?void 0:t();return dn(),(g.length>0||s.length>0)&&Gt(),x=0,e}finally{B=n,g=r}}async function Ar(){await Promise.resolve(),Gt()}function kr(t){var i;var n=t.f,r=(n&m)!==0;if(r&&n&Y){var e=Dt(t);return at(t),e}if(o!==null){E!==null&&E.includes(t)&&nn();var s=o.deps;c===null&&s!==null&&s[d]===t?d++:c===null?c=[t]:c.push(t),k!==null&&u!==null&&u.f&h&&!(u.f&y)&&k.includes(t)&&(w(u,I),J(u))}else if(r&&t.deps===null){var a=t,l=a.parent;l!==null&&!((i=l.deriveds)!=null&&i.includes(a))&&(l.deriveds??(l.deriveds=[])).push(a)}return r&&(a=t,j(a)&&Rt(a)),t.v}function Ir(t){const n=o;try{return o=null,t()}finally{o=n}}const In=~(I|H|h);function w(t,n){t.f=t.f&In|n}function gr(t,n=!1,r){f={p:f,c:null,e:null,m:!1,s:t,x:null,l:null},W&&!n&&(f.l={s:null,u:null,r1:[],r2:st(!1)})}function Dr(t){const n=f;if(n!==null){const l=n.e;if(l!==null){var r=u,e=o;n.e=null;try{for(var s=0;s<l.length;s++){var a=l[s];Z(a.effect),$(a.reaction),Ot(a.fn)}}finally{Z(r),$(e)}}f=n.p,n.m=!0}return{}}function Rr(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(ft in t)rt(t);else if(!Array.isArray(t))for(let n in t){const r=t[n];typeof r=="object"&&r&&ft in r&&rt(r)}}}function rt(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{rt(t[e],n)}catch{}const r=$t(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const e=Kt(r);for(let s in e){const a=e[s].get;if(a)try{a.call(t)}catch{}}}}}export{Nn as $,$t as A,Kt as B,mr as C,sr as D,dt as E,Sn as F,On as G,st as H,Pn as I,it as J,u as K,bn as L,Ln as M,gn as N,wr as O,yr as P,rr as Q,ln as R,ft as S,ar as T,tr as U,b as V,nr as W,Ot as X,_n as Y,Tr as Z,Fn as _,Dr as a,zn as a0,wt as a1,y as a2,z as a3,Z as a4,$n as a5,W as a6,Zn as a7,Wn as a8,_r as a9,qt as aA,pn as aB,Gn as aC,Kn as aD,ut as aE,_t as aF,Wt as aG,Xn as aa,Gt as ab,Rn as ac,Ar as ad,Hn as ae,Q as af,fr as ag,$ as ah,o as ai,V as aj,Jn as ak,Qn as al,lr as am,an,S as ao,mt as ap,un as aq,At as ar,qn as as,Dn as at,hr as au,Vn as av,N as aw,Bn as ax,sn as ay,Un as az,cn as b,ur as c,Er as d,F as e,or as f,_ as g,D as h,Mn as i,kr as j,vr as k,Ir as l,pt as m,Cn as n,f as o,gr as p,xn as q,er as r,ir as s,dr as t,pr as u,Rr as v,on as w,cr as x,Yn as y,jn as z};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as o,E as f,d as i,n as p,e as c,h as d,g as h}from"./runtime.
|
|
1
|
+
import{b as o,E as f,d as i,n as p,e as c,h as d,g as h}from"./runtime.35-nNaov.js";function _(r,s,...t){var n=r,e=p,a;o(()=>{e!==(e=s())&&(a&&(c(a),a=null),a=i(()=>e(n,...t)))},f),d&&(n=h)}export{_ as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as i,l as b,x as f,y as o,j as l,z as a}from"./runtime.
|
|
1
|
+
import{n as i,l as b,x as f,y as o,j as l,z as a}from"./runtime.35-nNaov.js";function d(u,e,n){if(u==null)return e(void 0),i;const s=b(()=>u.subscribe(e,n));return s.unsubscribe?()=>s.unsubscribe():s}let r=!1;function _(u,e,n){const s=n[e]??(n[e]={store:null,source:o(void 0),unsubscribe:i});if(s.store!==u)if(s.unsubscribe(),s.store=u??null,u==null)s.source.v=void 0,s.unsubscribe=i;else{var t=!0;s.unsubscribe=d(u,c=>{t?s.source.v=c:a(s.source,c)}),t=!1}return l(s.source)}function g(){const u={};return f(()=>{for(var e in u)u[e].unsubscribe()}),u}function v(u){var e=r;try{return r=!1,[u(),r]}finally{r=e}}export{_ as a,v as c,g as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as g,k as f,l as d,m as u,j as l,o as m,q as _,v,w as k}from"./runtime.
|
|
1
|
+
import{u as g,k as f,l as d,m as u,j as l,o as m,q as _,v,w as k}from"./runtime.35-nNaov.js";import{s as h}from"./entry.ePISknOx.js";function q(s=!1){const e=m,t=e.l.u;if(!t)return;let a=()=>v(e.s);if(s){let n=0,r={};const b=k(()=>{let c=!1;const i=e.s;for(const o in i)i[o]!==r[o]&&(r[o]=i[o],c=!0);return c&&n++,n});a=()=>l(b)}t.b.length&&g(()=>{p(e,a),u(t.b)}),f(()=>{const n=d(()=>t.m.map(_));return()=>{for(const r of n)typeof r=="function"&&r()}}),t.a.length&&f(()=>{p(e,a),u(t.a)})}function p(s,e){if(s.l.s)for(const t of s.l.s)l(t);e()}const x=()=>{const s=h;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},w={subscribe(s){return x().page.subscribe(s)}};export{q as i,w as p};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_app/immutable/nodes/0.
|
|
2
|
-
var F=n=>{throw TypeError(n)};var
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["_app/immutable/nodes/0.KV9sX62Q.js","_app/immutable/chunks/disclose-version.CTbzJKR1.js","_app/immutable/chunks/runtime.35-nNaov.js","_app/immutable/chunks/index.MrfhoAO-.js","_app/immutable/chunks/snippet.D5M1YHe-.js","_app/immutable/chunks/paths.fUfODpPY.js","_app/immutable/assets/0.D3ep0F2Z.css","_app/immutable/nodes/1.pfXIICvL.js","_app/immutable/chunks/legacy.CkgfcumT.js","_app/immutable/chunks/stores.QaV378ul.js","_app/immutable/chunks/entry.ePISknOx.js","_app/immutable/chunks/store.DP-XV34k.js","_app/immutable/nodes/2.DQHEtYhy.js","_app/immutable/chunks/makeList.Biqvl4Wy.js","_app/immutable/assets/2.BTCojHq8.css","_app/immutable/nodes/3.CXaRiscD.js","_app/immutable/chunks/index-client.DJLnd-Ox.js","_app/immutable/assets/3.Dk97tpeU.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
var F=n=>{throw TypeError(n)};var z=(n,e,r)=>e.has(n)||F("Cannot "+r);var u=(n,e,r)=>(z(n,e,"read from private field"),r?r.call(n):e.get(n)),T=(n,e,r)=>e.has(n)?F("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(n):e.set(n,r),C=(n,e,r,o)=>(z(n,e,"write to private field"),o?o.call(n,r):e.set(n,r),r);import{h as B,Q as J,b as K,E as X,d as Y,g as Z,P as M,j as _,z as A,ab as p,ac as $,y as ee,p as te,u as re,k as se,ad as ne,f as x,s as ae,a as oe,ae as L,c as ce,t as ie,r as ue,w as O}from"../chunks/runtime.35-nNaov.js";import{h as le,m as de,u as fe,c as j,a as b,t as Q,d as he,s as me}from"../chunks/disclose-version.CTbzJKR1.js";import{p as D,o as _e,a as ve,i as I,b as V}from"../chunks/index-client.DJLnd-Ox.js";function U(n,e,r){B&&J();var o=n,a,i;K(()=>{a!==(a=e())&&(i&&(M(i),i=null),a&&(i=Y(()=>r(o,a))))},X),B&&(o=Z)}function ge(n){return class extends ye{constructor(e){super({component:n,...e})}}}var v,l;class ye{constructor(e){T(this,v);T(this,l);var i;var r=new Map,o=(t,s)=>{var c=ee(s);return r.set(t,c),c};const a=new Proxy({...e.props||{},$$events:{}},{get(t,s){return _(r.get(s)??o(s,Reflect.get(t,s)))},has(t,s){return _(r.get(s)??o(s,Reflect.get(t,s))),Reflect.has(t,s)},set(t,s,c){return A(r.get(s)??o(s,c),c),Reflect.set(t,s,c)}});C(this,l,(e.hydrate?le:de)(e.component,{target:e.target,anchor:e.anchor,props:a,context:e.context,intro:e.intro??!1,recover:e.recover})),(!((i=e==null?void 0:e.props)!=null&&i.$$host)||e.sync===!1)&&p(),C(this,v,a.$$events);for(const t of Object.keys(u(this,l)))t==="$set"||t==="$destroy"||t==="$on"||$(this,t,{get(){return u(this,l)[t]},set(s){u(this,l)[t]=s},enumerable:!0});u(this,l).$set=t=>{Object.assign(a,t)},u(this,l).$destroy=()=>{fe(u(this,l))}}$set(e){u(this,l).$set(e)}$on(e,r){u(this,v)[e]=u(this,v)[e]||[];const o=(...a)=>r.call(this,...a);return u(this,v)[e].push(o),()=>{u(this,v)[e]=u(this,v)[e].filter(a=>a!==o)}}$destroy(){u(this,l).$destroy()}}v=new WeakMap,l=new WeakMap;const be="modulepreload",Ee=function(n){return"/"+n},N={},k=function(e,r,o){let a=Promise.resolve();if(r&&r.length>0){document.getElementsByTagName("link");const t=document.querySelector("meta[property=csp-nonce]"),s=(t==null?void 0:t.nonce)||(t==null?void 0:t.getAttribute("nonce"));a=Promise.allSettled(r.map(c=>{if(c=Ee(c),c in N)return;N[c]=!0;const g=c.endsWith(".css"),w=g?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${w}`))return;const h=document.createElement("link");if(h.rel=g?"stylesheet":be,g||(h.as="script"),h.crossOrigin="",h.href=c,s&&h.setAttribute("nonce",s),document.head.appendChild(h),g)return new Promise((m,d)=>{h.addEventListener("load",m),h.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(t){const s=new Event("vite:preloadError",{cancelable:!0});if(s.payload=t,window.dispatchEvent(s),!s.defaultPrevented)throw t}return a.then(t=>{for(const s of t||[])s.status==="rejected"&&i(s.reason);return e().catch(i)})},Ce={};var Pe=Q('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),we=Q("<!> <!>",1);function Re(n,e){te(e,!0);let r=D(e,"components",23,()=>[]),o=D(e,"data_0",3,null),a=D(e,"data_1",3,null);re(()=>e.stores.page.set(e.page)),se(()=>{e.stores,e.page,e.constructors,r(),e.form,o(),a(),e.stores.page.notify()});let i=L(!1),t=L(!1),s=L(null);_e(()=>{const m=e.stores.page.subscribe(()=>{_(i)&&(A(t,!0),ne().then(()=>{A(s,ve(document.title||"untitled page"))}))});return A(i,!0),m});const c=O(()=>e.constructors[1]);var g=we(),w=x(g);I(w,()=>e.constructors[1],m=>{var d=j();const E=O(()=>e.constructors[0]);var P=x(d);U(P,()=>_(E),(y,S)=>{V(S(y,{get data(){return o()},get form(){return e.form},children:(f,xe)=>{var q=j(),W=x(q);U(W,()=>_(c),(G,H)=>{V(H(G,{get data(){return a()},get form(){return e.form}}),R=>r()[1]=R,()=>{var R;return(R=r())==null?void 0:R[1]})}),b(f,q)},$$slots:{default:!0}}),f=>r()[0]=f,()=>{var f;return(f=r())==null?void 0:f[0]})}),b(m,d)},m=>{var d=j();const E=O(()=>e.constructors[0]);var P=x(d);U(P,()=>_(E),(y,S)=>{V(S(y,{get data(){return o()},get form(){return e.form}}),f=>r()[0]=f,()=>{var f;return(f=r())==null?void 0:f[0]})}),b(m,d)});var h=ae(w,2);I(h,()=>_(i),m=>{var d=Pe(),E=ce(d);I(E,()=>_(t),P=>{var y=he();ie(()=>me(y,_(s))),b(P,y)}),ue(d),b(m,d)}),b(n,g),oe()}const Le=ge(Re),Oe=[()=>k(()=>import("../nodes/0.KV9sX62Q.js"),__vite__mapDeps([0,1,2,3,4,5,6])),()=>k(()=>import("../nodes/1.pfXIICvL.js"),__vite__mapDeps([7,1,2,8,9,10,5,11])),()=>k(()=>import("../nodes/2.DQHEtYhy.js"),__vite__mapDeps([12,1,2,8,3,13,5,14])),()=>k(()=>import("../nodes/3.CXaRiscD.js"),__vite__mapDeps([15,13,2,1,3,10,5,16,11,4,9,8,17]))],je=[],De={"/":[2],"/[...design]":[3]},Ie={handleError:({error:n})=>{console.error(n)},reroute:()=>{}};export{De as dictionary,Ie as hooks,Ce as matchers,Oe as nodes,Le as root,je as server_loads};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t}from"../chunks/entry.ePISknOx.js";export{t as start};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t as f,a as d,s as _}from"../chunks/disclose-version.CTbzJKR1.js";import{p as w,s as c,f as u,a as k,n as j,c as p,r as l,D as m,t as D,j as S}from"../chunks/runtime.35-nNaov.js";import{D as T,e as $,i as I}from"../chunks/index.MrfhoAO-.js";import{s as z}from"../chunks/snippet.D5M1YHe-.js";import{b as C}from"../chunks/paths.fUfODpPY.js";const E=/[&"<]/g;function M(s,e){const t=String(s??""),i=E;i.lastIndex=0;let r="",a=0;for(;i.test(t);){const n=i.lastIndex-1,o=t[n];r+=t.substring(a,n)+(o==="&"?"&":o==='"'?""":"<"),a=n+1}return r+t.substring(a)}const h={translate:new Map([[!0,"yes"],[!1,"no"]])};function O(s,e,t=!1){if(e==null||!e&&t||e===""&&s==="class")return"";const i=s in h&&h[s].get(e)||e,r=t?"":`="${M(i)}"`;return` ${s}${r}`}const P=!0,ie=Object.freeze(Object.defineProperty({__proto__:null,prerender:P},Symbol.toStringTag,{value:"Module"})),R="designix-ui",W="0.5.5",q="The svelte-kit app built on top of designix",A={type:"git",url:"git+https://github.com/charlyoleg2/parametrix.git"},G="https://charlyoleg2.github.io/parametrix/",Q="charlyoleg2",X="ISC",B=["cad","programmatic","2D","circle","stroke","arc","gear"],F="module",H={useTabs:!0,singleQuote:!0,trailingComma:"none",printWidth:100,plugins:["prettier-plugin-svelte"],overrides:[{files:"*.svelte",options:{parser:"svelte"}}]},J={cp_pgdsvg:"fse copy ../../node_modules/designix/dist/pgdsvg static/pgdsvg",dev:"vite dev",build:"vite build",preview:"vite preview",check:"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json","check:watch":"svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch","test:unit":"vitest","test:unit:once":"vitest --run",lint:"prettier --check . && eslint .",ci:"run-s cp_pgdsvg build lint check test:unit:once",format:"prettier --write .",clean:"rimraf .svelte-kit build node_modules static/pgdsvg"},K={designix:"^0.5.56",geometrix:"^0.5.55",geomui:"^0.5.57"},L={"@atao60/fse-cli":"^0.1.9","@sveltejs/adapter-auto":"^3.3.1","@sveltejs/adapter-static":"^3.0.6","@sveltejs/kit":"^2.8.1","@sveltejs/vite-plugin-svelte":"^4.0.0","@types/eslint":"^9.6.1",eslint:"^9.14.0","eslint-config-prettier":"^9.1.0","eslint-plugin-svelte":"^2.46.0",globals:"^15.12.0","npm-run-all2":"^7.0.1",prettier:"^3.3.3","prettier-plugin-svelte":"^3.2.8",rimraf:"^6.0.1",sass:"^1.80.7",svelte:"^5.2.0","svelte-check":"^4.0.7",typescript:"^5.6.3","typescript-eslint":"^8.14.0",vite:"^5.4.11",vitest:"^2.1.5"},N={name:R,version:W,description:q,private:!0,repository:A,homepage:G,author:Q,license:X,keywords:B,type:F,prettier:H,scripts:J,dependencies:K,devDependencies:L};var U=f(" <br>",1),V=f(`<h1 class="svelte-im9xuh">Welcome to designix-ui</h1> <h6 class="svelte-im9xuh">Showcasing the usage of the <a href="https://svelte.dev/">svelte</a> library <a href="https://www.npmjs.com/">geomui</a>.</h6> <nav class="svelte-im9xuh"><a${O("href",`${C}/`)} class="svelte-im9xuh">index: list of designs</a></nav> <main class="svelte-im9xuh"><!></main> <footer class="svelte-im9xuh"><article><a href="https://github.com/charlyoleg2/parametrix">designix-ui</a>, a minimalist showcase
|
|
2
|
+
of <a href="https://www.npmjs.com/">geomui</a>.</article> <article><h3>Designix-ui version</h3> <code></code></article></footer>`,1);function re(s,e){w(e,!0);const t=T(N);var i=V(),r=c(u(i),6),a=p(r);z(a,()=>e.children??j),l(r);var n=c(r,2),o=c(p(n),2),g=c(p(o),2);$(g,21,()=>t,I,(x,y)=>{m();var v=U(),b=u(v,!0);m(),D(()=>_(b,S(y))),d(x,v)}),l(g),l(o),l(n),d(s,i),k()}export{re as component,ie as universal};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as h,t as l,s as o}from"../chunks/disclose-version.CTbzJKR1.js";import"../chunks/legacy.CkgfcumT.js";import{p as u,f as v,t as _,a as x,s as $,c as p,r as i}from"../chunks/runtime.35-nNaov.js";import{i as d,p as b}from"../chunks/stores.QaV378ul.js";import{s as E,a as j}from"../chunks/store.DP-XV34k.js";var k=l("<h1> </h1> <p> </p>",1);function B(m,f){u(f,!1);const n=E(),s=()=>j(b,"$page",n);d();var a=k(),t=v(a),c=p(t,!0);i(t);var r=$(t,2),g=p(r,!0);i(r),_(()=>{var e;o(c,s().status),o(g,(e=s().error)==null?void 0:e.message)}),h(m,a),x()}export{B as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as i,t as l,s as v}from"../chunks/disclose-version.CTbzJKR1.js";import"../chunks/legacy.CkgfcumT.js";import{s as d,f as h,c as m,r as s,t as _,j as f}from"../chunks/runtime.35-nNaov.js";import{e as g,i as b}from"../chunks/index.MrfhoAO-.js";import{d as x,s as u}from"../chunks/makeList.Biqvl4Wy.js";import{b as L}from"../chunks/paths.fUfODpPY.js";var $=l("<li><a> </a></li>"),j=l('<h2 class="svelte-1r3d1r">List of designs:</h2> <ol></ol>',1);function A(p){var r=j(),e=d(h(r),2);g(e,5,()=>x,b,(c,o)=>{var a=$(),t=m(a),n=m(t,!0);s(t),s(a),_(()=>{u(t,"href",`${L}/${f(o)}`),v(n,f(o))}),i(c,a)}),s(e),i(p,r)}export{A as component};
|