designix-uis 0.5.2 → 0.5.4
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/README.md +8 -0
- package/dist/designix-uis.js +6 -8
- package/dist/public/_app/immutable/chunks/entry.C3zjkdvH.js +3 -0
- package/dist/public/_app/immutable/chunks/{index.sDAnq9IB.js → index.BROvJSft.js} +2 -2
- package/dist/public/_app/immutable/chunks/makeList.BtRSVN7R.js +88 -0
- package/dist/public/_app/immutable/chunks/paths.CQQiRxnm.js +1 -0
- package/dist/public/_app/immutable/chunks/{stores.CrRc8kgy.js → stores.Huum2hKK.js} +1 -1
- package/dist/public/_app/immutable/entry/{app.DIAOOpnh.js → app.BpxPkBw3.js} +2 -2
- package/dist/public/_app/immutable/entry/start.Bz7pahS0.js +1 -0
- package/dist/public/_app/immutable/nodes/0.nCmV09r4.js +4 -0
- package/dist/public/_app/immutable/nodes/{1.BUtUgElu.js → 1.Cl2Wb2Sv.js} +1 -1
- package/dist/public/_app/immutable/nodes/{2.J9gWTjUj.js → 2.D3m9DKE0.js} +1 -1
- package/dist/public/_app/immutable/nodes/{3.BDgnse_d.js → 3.DPcZI3eM.js} +1 -1
- package/dist/public/_app/version.json +1 -1
- package/dist/public/gear/gear_wheel_wheel.html +14 -14
- package/dist/public/gear/simplified_gear_wheel.html +14 -14
- package/dist/public/heliostat/base.html +15 -14
- package/dist/public/heliostat/heliostat.html +20 -20
- package/dist/public/heliostat/heliostat_2.html +18 -18
- package/dist/public/heliostat/pole_rotor.html +14 -14
- package/dist/public/heliostat/pole_static.html +14 -14
- package/dist/public/heliostat/rake.html +14 -14
- package/dist/public/heliostat/rake_stopper.html +14 -14
- package/dist/public/heliostat/rod.html +14 -14
- package/dist/public/heliostat/spider.html +14 -14
- package/dist/public/heliostat/surface.html +14 -14
- package/dist/public/heliostat/swing.html +14 -14
- package/dist/public/heliostat/trapeze.html +14 -14
- package/dist/public/index.html +12 -12
- package/package.json +6 -6
- package/dist/public/_app/immutable/chunks/entry.Um3CRfq-.js +0 -3
- package/dist/public/_app/immutable/chunks/makeList.DvYg7pia.js +0 -87
- package/dist/public/_app/immutable/chunks/paths.DoNOjTtI.js +0 -1
- package/dist/public/_app/immutable/entry/start.BbL7sQ1i.js +0 -1
- package/dist/public/_app/immutable/nodes/0.CS33377U.js +0 -4
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
var lt=Object.defineProperty;var rt=(l,e,s)=>e in l?lt(l,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):l[e]=s;var N=(l,e,s)=>(rt(l,typeof e!="symbol"?e+"":e,s),s);import{p as t,a as re,b as we,i as ie,d as Ee,f,c as z,E as T,g as Z,h as de,j as ce,k as he,r as oe,l as $,m,n as se,o as ee,q as xe,s as ke,w as Ne,S as Se,t as dt}from"./index.sDAnq9IB.js";var ct=class{constructor(l,e,s,n,o){N(this,"base_center_x");N(this,"base_center_y");N(this,"base_radius");N(this,"initial_angle");N(this,"right_nleft");this.base_center_x=l,this.base_center_y=e,this.base_radius=s,this.initial_angle=n,this.right_nleft=o}angleSign(){return this.right_nleft?1:-1}lFromU(l){return this.base_radius*Math.sqrt(1+l**2)}wFromU(l){if(l<0)throw`err729: involute parameter au ${l} is negative`;if(Math.abs(l)>Math.PI/2)throw`err730: involute parameter au ${l} is larger than PI/2`;return this.angleSign()*(l-Math.atan(l))}w2FromU(l){return this.initial_angle+this.wFromU(l)}ptc(l){const e=this.lFromU(l),s=this.w2FromU(l),n=this.base_center_x+Math.cos(s)*e,o=this.base_center_y+Math.sin(s)*e;return[n,o]}ptcta(l){return this.initial_angle+this.angleSign()*l}uFromL(l){return Math.sqrt(l**2/this.base_radius**2-1)}uFromWslow(l){let s=Math.PI/3,n=s/2,o=this.wFromU(s),i=0;for(;Math.abs(o-l)>1e-4;)o<l?s+=n:s-=n,o=this.wFromU(s),n=n/2,i+=1;return console.log(`dbg072: uFromWslow itcnt ${i}`),s}laptc(l,e,s,n){if(Math.sign(e)*this.angleSign()<0)throw`err904: Invole.laptc angle-of-pressure ${e} not compatible with right_nleft ${this.right_nleft}`;const o=l+e,i=this.base_center_x+Math.cos(o)*this.base_radius,r=this.base_center_y+Math.sin(o)*this.base_radius,S=o-this.angleSign()*Math.PI/2,_=s*this.base_radius,g=i+Math.cos(S)*_,d=r+Math.sin(S)*_,a=this.lFromU(s)*n,c=s,w=Math.cos(c)*a,P=Math.sin(c)*a;return[g,d,w,P]}};function ge(l,e,s,n,o){return new ct(l,e,s,n,o)}var ht=class{constructor(){N(this,"mod",1);N(this,"TN",23);N(this,"as",1);N(this,"cx",0);N(this,"cy",0);N(this,"brr",50);N(this,"blr",50);N(this,"ar",54);N(this,"pr",53);N(this,"dr",52);N(this,"br",51);N(this,"bRound",1);N(this,"adt",.5);N(this,"initAngle",0);N(this,"axisAngle",0);N(this,"involArcPairs",1);N(this,"skinThickness",0);N(this,"involuteR",ge(0,0,50,0,!0));N(this,"involuteL",ge(0,0,50,0,!1));N(this,"rud",0);N(this,"rup",0);N(this,"rua",0);N(this,"rwd",0);N(this,"rwp",0);N(this,"rwa",0);N(this,"lud",0);N(this,"lup",0);N(this,"lua",0);N(this,"lwd",0);N(this,"lwp",0);N(this,"lwa",0);N(this,"msg");N(this,"initStep",0);this.mod=1,this.msg="",this.initStep=0}incInitStep(l){if(this.initStep+1!==l)throw`err834: incInitStep initStep ${this.initStep} and target ${l} are not compatible`;this.initStep=l}checkInitStep(l,e){if(this.initStep<l)throw`err835: checkInitStep for ${e} initStep ${this.initStep} is too small compare to targetMin ${l}`}set1ModuleToothNumber(l,e){this.incInitStep(1),this.mod=l,this.TN=e,this.pr=this.mod*this.TN/2,this.as=2*Math.PI/this.TN}set2CenterPosition(l,e){this.incInitStep(2),this.cx=l,this.cy=e}set3CircleRadius(l,e,s,n){this.incInitStep(3),this.ar=this.pr+this.mod*l,this.dr=this.pr-this.mod*e,this.br=this.dr-this.mod*s,this.bRound=n}set4BaseCircles(l,e){this.incInitStep(4),this.brr=l,this.blr=e}set5AddendumThickness(l){this.incInitStep(5),this.adt=l/100}set6Angles(l,e){this.incInitStep(6),this.initAngle=l,this.axisAngle=e}set7InvoluteDetails(l,e){this.incInitStep(7),this.involArcPairs=l,this.skinThickness=e}getRefCircles(){return this.checkInitStep(4,"getRefCircles"),[$(this.cx,this.cy,this.ar,"Azure"),$(this.cx,this.cy,this.pr,"Azure"),$(this.cx,this.cy,this.dr,"Azure"),$(this.cx,this.cy,this.br,"Azure"),$(this.cx,this.cy,this.brr,"CornFlowerBlue"),$(this.cx,this.cy,this.blr,"Crimson")]}calcInvoluteAngles(){this.checkInitStep(4,"calcInvoluteAngles"),this.involuteR=ge(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=ge(this.cx,this.cy,this.blr,0,!1),this.dr>this.blr?this.lud=this.involuteL.uFromL(this.dr):this.rud=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 l=this.as*this.adt,e=this.rwa-this.rwp,s=Math.abs(this.lwa-this.lwp),n=l-e-s;if(n<0)throw`err554: No remaining Addendum reserve ${f(n)}
|
|
2
|
-
`;const o=this.as*(1-this.adt),i=this.rwp-this.rwd,r=Math.abs(this.lwp-this.lwd),S=o-i-r;if(S<2*Math.atan2(this.bRound,this.br))throw`err555: No remaining Dedendum reserve ${f(S)} compare to bRound ${f(this.bRound)}
|
|
3
|
-
`}getToothRef(){const l=6*this.involArcPairs,e=0;this.checkInitStep(7,"getProfile"),this.calcInvoluteAngles();const s=(this.rua-this.rud)/l,n=(this.lua-this.lud)/l,o=this.initAngle+e*this.as,i=ge(this.cx,this.cy,this.brr,o-this.rwp,!0),[r,S]=i.ptc(this.rud+0*s),_=z(r,S,"Gold");for(let L=0;L<l;L++){const[a,c]=i.ptc(this.rud+(L+1)*s);_.addSegStrokeA(a,c)}const g=o+this.as*this.adt,d=ge(this.cx,this.cy,this.blr,g-this.lwp,!1);for(let L=0;L<l+1;L++){const[a,c]=d.ptc(this.lud+(l-L)*n);_.addSegStrokeA(a,c)}return _.closeSegStroke(),_}getProfile(){this.checkInitStep(7,"getProfile"),this.calcInvoluteAngles(),this.checkProfileConditions();const l=this.rwd-this.rwp,e=this.lwd-this.lwp,s=this.dr>this.brr?this.dr:this.brr,n=this.dr>this.blr?this.dr:this.blr;if(this.bRound>s-this.br)throw`err409: getProfile bRound ${f(this.bRound)} too large for erdr ${f(s)} and br ${f(this.br)}`;if(this.bRound>n-this.br)throw`err408: getProfile bRound ${f(this.bRound)} too large for eldr ${f(n)} and br ${f(this.br)}`;const o=(this.rua-this.rud)/this.involArcPairs,i=(this.lua-this.lud)/this.involArcPairs,r=se(this.cx,this.cy),S=r.translatePolar(this.initAngle+l,this.br),_=z(S.cx,S.cy);for(let g=0;g<this.TN;g++){const d=this.initAngle+g*this.as,L=r.translatePolar(d+l,this.br);_.addSegStrokeA(L.cx,L.cy).addCornerRounded(this.bRound);const a=ge(this.cx,this.cy,this.brr,d-this.rwp,!0),[c,w]=a.ptc(this.rud),P=a.ptcta(this.rud),I=se(c,w).translatePolar(P-Math.PI/2,this.skinThickness);_.addSegStrokeA(I.cx,I.cy);for(let h=0;h<this.involArcPairs;h++){const C=this.rud+h*o,[p,A]=a.ptc(C+o),B=a.ptcta(C),V=a.ptcta(C+o)+Math.PI,F=se(p,A).translatePolar(B-Math.PI/2,this.skinThickness);_.addPointA(F.cx,F.cy).addSeg2Arcs(B,V)}const v=d+this.as*this.adt,D=ge(this.cx,this.cy,this.blr,v-this.lwp,!1),u=this.lud+this.involArcPairs*i,[b,E]=D.ptc(u),M=D.ptcta(u)+Math.PI,k=se(b,E).translatePolar(M-Math.PI/2,this.skinThickness);_.addSegStrokeA(k.cx,k.cy);for(let h=0;h<this.involArcPairs;h++){const C=this.lud+(this.involArcPairs-h)*i,[p,A]=D.ptc(C-i),B=D.ptcta(C)+Math.PI,V=D.ptcta(C-i),F=se(p,A).translatePolar(B-Math.PI/2,this.skinThickness);_.addPointA(F.cx,F.cy).addSeg2Arcs(B,V)}const x=r.translatePolar(v+e,this.br);_.addSegStrokeA(x.cx,x.cy).addCornerRounded(this.bRound)}return _.closeSegStroke(),_}getMsg(){return this.msg}};function We(){return new ht}function at(l,e,s,n){l.checkInitStep(1,"helper.gw2center-1"),e.checkInitStep(1,"helper.gw2center-2");const o=l.pr+e.pr+n,i=l.cx+o*Math.cos(s),r=l.cy+o*Math.sin(s);return[i,r,o]}function gt(l,e,s,n,o,i,r,S,_){l.checkInitStep(3,"helper.baseCircles-1"),e.checkInitStep(3,"helper.baseCircles-2");let g=s,d=o,L=n,a=i;const c=S,w=_;return c===0&&(e.TN>l.TN?(g=l.dr,d=g*e.TN/l.TN):(d=e.dr,g=d*l.TN/e.TN)),w===0&&(e.TN>l.TN?(L=l.dr,a=L*e.TN/l.TN):(a=e.dr,L=a*l.TN/e.TN)),r===1&&(L=g,a=d),[g,L,d,a]}var ut=class{constructor(l,e,s,n,o,i){N(this,"gw1");N(this,"gw2");N(this,"initAngle1");N(this,"angleCenterCenter");N(this,"interAxis");N(this,"rightLeftCenter2");N(this,"msg");N(this,"apr");N(this,"apl");N(this,"lBDr",0);N(this,"lBDl",0);N(this,"laStartRr1",0);N(this,"laStartRr2",0);N(this,"laStartRl1",0);N(this,"laStartRl2",0);N(this,"aFODr1",0);N(this,"aFODr2",0);N(this,"aFODl1",0);N(this,"aFODl2",0);N(this,"lasr1",0);N(this,"lasr2",0);N(this,"lasl1",0);N(this,"lasl2",0);N(this,"firstToothUr1",0);N(this,"firstToothUl1",0);N(this,"ftdr1",0);N(this,"ftdl1",0);this.gw1=l,this.gw2=e,this.initAngle1=s,this.angleCenterCenter=n,this.interAxis=o,this.rightLeftCenter2=i,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 ${f(this.interAxis)} is too large compare to gw1.ar ${f(this.gw1.ar)} and gw2.ar ${f(this.gw2.ar)}
|
|
4
|
-
`),ee(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} = ${f(this.gw1.TN/this.gw2.TN)} and brr1/brr2 = ${f(this.gw1.brr)}/${f(this.gw2.brr)} = ${f(this.gw1.brr/this.gw2.brr)}
|
|
5
|
-
`),ee(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} = ${f(this.gw1.TN/this.gw2.TN)} and blr1/blr2 = ${f(this.gw1.blr)}/${f(this.gw2.blr)} = ${f(this.gw1.blr/this.gw2.blr)}
|
|
6
|
-
`)}check2(){this.gw1.checkInitStep(5,"ActionLine.check2-1"),this.gw2.checkInitStep(5,"ActionLine.check2-2"),ee(this.gw1.adt+this.gw2.adt-1)>0&&(this.msg+=`warn281: addendum thickness too large: adt1 ${f(this.gw1.adt)} adt2 ${f(this.gw2.adt)}
|
|
7
|
-
`);const l=this.gw1.ar-this.gw1.pr,e=this.gw1.pr-this.gw1.dr,s=this.gw2.ar-this.gw2.pr,n=this.gw2.pr-this.gw2.dr;ee(n-l)<0&&(this.msg+=`warn282: addendum-1 ${f(l)} larger than dedendum-2 ${f(n)}
|
|
8
|
-
`),ee(e-s)<0&&(this.msg+=`warn283: addendum-2 ${f(s)} larger than dedendum-1 ${f(e)}
|
|
9
|
-
`)}calcActionLine(){this.gw1.checkInitStep(4,"ActionLine.calcActionLine-1"),this.gw2.checkInitStep(4,"ActionLine.calcActionLine-2"),this.gw1.calcInvoluteAngles(),this.gw2.calcInvoluteAngles();const l=this.interAxis*this.gw1.brr/(this.gw1.brr+this.gw2.brr),e=this.interAxis*this.gw1.blr/(this.gw1.blr+this.gw2.blr),s=this.interAxis-l,n=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: ${f(oe(this.apr))} left: ${f(oe(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: ${f(this.lBDr)} left: ${f(this.lBDl)} mm
|
|
11
|
-
`;const o=Math.PI/2+this.apr,i=xe(this.gw1.ar,l,o);this.aFODr1=Math.PI-o-i;const r=this.gw1.rua-this.apr-this.gw1.rwa;if(ee(this.aFODr1-r)!==0)throw`dbg378: aFODr1 ${this.aFODr1} and aFODr1Alt ${r} differ`;const S=ke(l,this.gw1.ar,this.aFODr1),_=o,g=xe(this.gw2.ar,s,_);this.aFODr2=Math.PI-_-g;const d=this.gw2.rua-this.apr-this.gw2.rwa;if(ee(this.aFODr2-d)!==0)throw`dbg379: aFODr2 ${this.aFODr2} and aFODr2Alt ${d} differ`;const L=ke(s,this.gw2.ar,this.aFODr2),a=S+L,c=a/this.gw1.brr,w=a/this.gw2.brr,P=this.gw1.rua-c,I=this.gw2.rua-w;this.laStartRr1=this.gw1.involuteR.lFromU(P),this.laStartRr2=this.gw2.involuteR.lFromU(I);const v=Math.PI/2+this.apl,D=xe(this.gw1.ar,e,v);this.aFODl1=Math.PI-v-D;const u=this.gw1.lua-this.apl+this.gw1.lwa;if(ee(this.aFODl1-u)!==0)throw`dbg388: aFODl1 ${this.aFODl1} and aFODl1Alt ${u} differ`;const b=ke(e,this.gw1.ar,this.aFODl1),E=o,M=xe(this.gw2.ar,n,E);this.aFODl2=Math.PI-E-M;const k=this.gw2.lua-this.apl+this.gw2.lwa;if(ee(this.aFODl2-k)!==0)throw`dbg389: aFODl2 ${this.aFODl2} and aFODl2Alt ${k} differ`;const x=ke(n,this.gw2.ar,this.aFODl2),h=b+x,C=h/this.gw1.blr,p=h/this.gw2.blr,A=this.gw1.lua-C,B=this.gw2.lua-p;this.laStartRl1=this.gw1.involuteL.lFromU(A),this.laStartRl2=this.gw2.involuteL.lFromU(B),this.msg+=`Line of Action Effective length: right: ${f(a)} left: ${f(h)} mm
|
|
12
|
-
`,this.msg+=`Line of Action Effective rotation angle: right-1: ${f(oe(c))} right-2: ${f(oe(w))} left-1: ${f(oe(C))} left-2: ${f(oe(p))} degree
|
|
13
|
-
`,this.msg+=`Line of Action Effective height: right-1: ${f(this.gw1.ar-this.laStartRr1)} right-2: ${f(this.gw2.ar-this.laStartRr2)} left-1: ${f(this.gw1.ar-this.laStartRl1)} left-2: ${f(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: ${f(this.lasr1)} 2: ${f(this.lasr2)} mm
|
|
15
|
-
`,this.msg+=`Line of Action right: nb of contact point: 1: ${f(a/this.lasr1)} 2: ${f(a/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: ${f(this.lasl1)} 2: ${f(this.lasl2)} mm
|
|
17
|
-
`,this.msg+=`Line of Action left: nb of contact point: 1: ${f(h/this.lasl1)} 2: ${f(h/this.lasl2)}
|
|
18
|
-
`}calcContactPoint1(){for(this.gw1.checkInitStep(5,"ActionLine.calcContactPoint1"),this.firstToothUr1=Ne(this.apr-(this.initAngle1-this.angleCenterCenter)+this.gw1.rwp);ee(this.firstToothUr1-this.gw1.as)>=0;)this.firstToothUr1=ee(this.firstToothUr1-this.gw1.as);for(this.firstToothUl1=Ne(this.apl+(this.initAngle1-this.angleCenterCenter)+this.gw1.as*this.gw1.adt-this.gw1.lwp);ee(this.firstToothUl1-this.gw1.as)>=0;)this.firstToothUl1=ee(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(l,e,s,n,o,i,r,S,_,g){const L=Math.floor(e/(2*s)),a=(n+L*s)/o,c=l?1:-1,[w,P,I,v]=i.laptc(r,c*S,a,.4);this.msg+=`speed ${_}: vx ${f(I)} vy: ${f(v)} m/s
|
|
19
|
-
`;const D=se(w,P),u=r+c*S,b=z(w,P,g),E=D.translatePolar(u,-v);b.addSegStrokeA(E.cx,E.cy);const M=E.translatePolar(u-c*Math.PI/2,I);return b.addSegStrokeA(M.cx,M.cy),b.closeSegStroke(),b}getContactSpeed(){const l=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"),s=[];return s.push(l),s.push(e),s}getContours(){const l=[];l.push($(this.gw1.cx,this.gw1.cy,this.laStartRr1,"SkyBlue")),l.push($(this.gw1.cx,this.gw1.cy,this.laStartRl1,"SlateBlue")),l.push($(this.gw2.cx,this.gw2.cy,this.laStartRr2,"SkyBlue")),l.push($(this.gw2.cx,this.gw2.cy,this.laStartRl2,"SlateBlue"));const e=se(this.gw1.cx,this.gw1.cy),s=se(this.gw2.cx,this.gw2.cy),n=e.translatePolar(this.angleCenterCenter+this.apr,this.gw1.brr),o=s.translatePolar(this.angleCenterCenter+Math.PI+this.apr,this.gw2.brr),i=z(n.cx,n.cy,"YellowGreen");i.addSegStrokeA(o.cx,o.cy),i.closeSegStroke(),l.push(i);const r=e.translatePolar(this.angleCenterCenter-this.aFODr1,this.gw1.ar),S=s.translatePolar(this.angleCenterCenter+Math.PI-this.aFODr2,this.gw2.ar),_=z(r.cx,r.cy,"Yellow");_.addSegStrokeA(S.cx,S.cy),_.closeSegStroke(),l.push(_);const g=e.translatePolar(this.angleCenterCenter-this.apl,this.gw1.blr),d=s.translatePolar(this.angleCenterCenter+Math.PI-this.apl,this.gw2.blr),L=z(g.cx,g.cy,"YellowGreen");L.addSegStrokeA(d.cx,d.cy),L.closeSegStroke(),l.push(L);const a=e.translatePolar(this.angleCenterCenter+this.aFODl1,this.gw1.ar),c=s.translatePolar(this.angleCenterCenter+Math.PI+this.aFODl2,this.gw2.ar),w=z(a.cx,a.cy,"Yellow");return w.addSegStrokeA(c.cx,c.cy),w.closeSegStroke(),l.push(w),l.push(...this.getContactSpeed()),l}getContactPoint(){const l=[],e=se(this.gw1.cx,this.gw1.cy),s=e.translatePolar(this.angleCenterCenter+this.apr,this.gw1.brr),n=e.translatePolar(this.angleCenterCenter-this.apl,this.gw1.blr);l.push(se(s.cx,s.cy,Se.eBigSquare)),l.push(se(n.cx,n.cy,Se.eBigSquare));const o=this.angleCenterCenter+this.apr-Math.PI/2,i=this.angleCenterCenter-this.apl+Math.PI/2,r=s.translatePolar(o,this.ftdr1),S=n.translatePolar(i,this.ftdl1);l.push(se(r.cx,r.cy,Se.eBigSquare)),l.push(se(S.cx,S.cy,Se.eBigSquare));let _=this.ftdr1;for(;_+this.lasr1<this.lBDr;){_+=this.lasr1;const d=s.translatePolar(o,_);l.push(se(d.cx,d.cy,Se.eBigSquare))}let g=this.ftdl1;for(;g+this.lasl1<this.lBDl;){g+=this.lasl1;const d=n.translatePolar(i,g);l.push(se(d.cx,d.cy,Se.eBigSquare))}return l}getMsg(){return this.msg}getInitAngle2(){let l=this.lBDr-this.ftdr1;for(;ee(l-this.lasr2)>=0;)l=ee(l-this.lasr2);let e=this.lBDl-this.ftdl1;for(;ee(e-this.lasl2)>=0;)e=ee(e-this.lasl2);const s=l/this.gw2.brr,n=e/this.gw2.blr,o=this.angleCenterCenter+Math.PI+this.apr-s+this.gw2.rwp,r=this.angleCenterCenter+Math.PI-this.apl+n+this.gw2.lwp-this.gw2.as*this.gw2.adt;let S=2*Math.PI+Ne(r);for(;ee(S-this.gw2.as-o)>=0;)S=ee(S-this.gw2.as);const _=S-o,g=_*this.gw2.brr/this.gw1.brr,d=_*this.gw2.brr,L=_*this.gw2.blr;this.msg+=`slack angle: 1: ${f(oe(g))} 2: ${f(oe(_))} degree
|
|
20
|
-
`,this.msg+=`slack on action line: right-2: ${f(d)} left-2: ${f(L)} mm
|
|
21
|
-
`;let a=0;if(this.rightLeftCenter2===0)a=o;else if(this.rightLeftCenter2===1)a=r;else if(this.rightLeftCenter2===2)a=o+_/2;else throw`err221: initAngle2 rightLeftCenter2 ${this.rightLeftCenter2} has an unkown value`;return dt(a)}};function _t(l,e,s,n,o,i){return new ut(l,e,s,n,o,i)}function ft(l,e,s,n,o,i,r,S,_){let g=$(l,e,s);if(n>0){if(o>2*s)throw`err383: axisTorque ribWidth ${f(o)} larger than 2x axisRadius ${f(s)}`;const d=Math.asin(o/(2*s)),L=2*Math.PI/n;if(L-2.5*d<0)throw`err384: axisTorque ribWidth ${f(o)} or ribNb ${n} are too large`;if(r>o/2)throw`err385: axisTorque ribRound1 ${f(r)} too large compare to ribWidth ${f(o)}`;if(r+S>i)throw`err386: axisTorque ribRound12 ${f(r)} ${f(S)} too large compare to ribHeight ${f(o)}`;const a=L-2*d>Math.PI,c=se(l,e),P=c.translatePolar(_,s+i).translatePolar(_+Math.PI/2,o/2);g=z(P.cx,P.cy);for(let I=0;I<n;I++){const v=_+I*L,D=v+L,u=c.translatePolar(v+d,s),b=c.translatePolar(D-d,s),M=c.translatePolar(v,s+i).translatePolar(v+Math.PI/2,o/2),x=c.translatePolar(D,s+i).translatePolar(D-Math.PI/2,o/2);g.addSegStrokeA(M.cx,M.cy).addCornerRounded(r),g.addSegStrokeA(u.cx,u.cy).addCornerRounded(S),g.addPointA(b.cx,b.cy).addSegArc(s,a,!0).addCornerRounded(S),g.addSegStrokeA(x.cx,x.cy).addCornerRounded(r)}g.closeSegStroke()}return g}function Lt(l,e,s,n,o,i,r,S){const _=2*Math.PI/o,g=Math.asin(i/(2*n)),d=Math.asin(i/(2*s));if(i>2*n)throw`err905: hollowStraight spokeWidth ${f(i)} too large for hollowInt ${f(n)}`;if(s-n<2.1*r)throw`err906: hollowStraight hollowExt ${f(s)}, hollowInt ${f(n)} and spokeRound ${f(r)} do not fit`;if(_-2*d<2.5*Math.asin(r/s))throw`err907: hollowStraight spokeNb ${o}, spokeWidth ${f(i)} or spokeRound ${f(r)} are too large`;const L=i/(2*Math.sin(_/2)),a=_-2*g<2.1*Math.asin(r/n),c=_-2*d>Math.PI,w=se(l,e),P=[];for(let I=0;I<o;I++){const v=S+I*_,D=v+_,u=v+_/2,b=w.translatePolar(v+d,s),E=w.translatePolar(D-d,s),M=w.translatePolar(D-g,n),k=w.translatePolar(v+g,n),x=w.translatePolar(u,L),h=z(b.cx,b.cy);h.addCornerRounded(r),h.addPointA(E.cx,E.cy).addSegArc(s,c,!0).addCornerRounded(r),a?h.addSegStrokeA(x.cx,x.cy).addCornerRounded(r):(h.addSegStrokeA(M.cx,M.cy).addCornerRounded(r),h.addPointA(k.cx,k.cy).addSegArc(n,c,!1).addCornerRounded(r)),h.closeSegStroke(),P.push(h)}return P}function qe(l,e,s,n,o,i,r,S,_,g){const d=g?1:-1,L=l/2,a=L+e,c=a+s,w=z(0,-c);return w.addSegStrokeA(d*n,-c).addCornerRounded(r).addSegStrokeA(d*n,-a).addCornerRounded(S).addSegStrokeA(d*o,-a).addSegStrokeA(d*i,-L).addCornerRounded(_).addSegStrokeA(d*i,L).addCornerRounded(_).addSegStrokeA(d*o,a).addSegStrokeA(d*n,a).addCornerRounded(S).addSegStrokeA(d*n,c).addCornerRounded(r).addSegStrokeA(0,c).closeSegStroke(),w}var Ye={partName:"gear_wheel_wheel",params:[t("module","mm",10,.1,100,.1),t("N1","scalar",23,3,1e3,1),t("N2","scalar",19,3,1e3,1),t("angleCenterCenter","degree",0,-180,180,1),t("addInterAxis","mm",0,0,100,.05),t("c1x","mm",0,-200,200,1),t("c1y","mm",0,-200,200,1),t("ah1","scalar",1,.1,2,.05),t("dh1","scalar",1,.1,2,.05),t("bh1","scalar",.25,.1,2,.05),t("bRound1","mm",2,0,50,.1),t("ah2","scalar",1,.1,2,.05),t("dh2","scalar",1,.1,2,.05),t("bh2","scalar",.25,.1,2,.05),t("bRound2","mm",2,0,50,.1),t("at1","%",50,10,90,.5),t("at2","%",50,10,90,.5),re("involSym",!0),we("involROpt",["Optimum","Base-1","Base-2","PressureAngle","FreeBase-12"]),we("involLOpt",["Optimum","Base-1","Base-2","PressureAngle","FreeBase-12"]),t("brr1","mm",50,10,2e3,.05),t("brr2","mm",50,10,2e3,.05),t("blr1","mm",50,10,2e3,.05),t("blr2","mm",50,10,2e3,.05),t("involArcPairs1","scalar",2,1,40,1),t("involArcPairs2","scalar",2,1,40,1),t("skinThickness1","mm",0,-3,3,.01),t("skinThickness2","mm",0,-3,3,.01),t("initAngle1","degree",0,-180,180,1),we("gw2Position",["right","left","center"]),re("centralAxis",!0),t("axisRadius","mm",10,.1,200,.1),t("ribNb","scalar",5,0,32,1),t("ribWidth","mm",8,1,100,.1),t("ribHeight","mm",8,1,100,.1),t("ribRound1","mm",2,0,20,.1),t("ribRound2","mm",2,0,20,.1),re("hollow",!0),t("materialHeightExt","mm",20,1,200,.5),t("materialHeightInt","mm",15,1,200,.5),t("spokeNb","scalar",5,1,18,1),t("spokeWidth","mm",15,1,200,.1),t("spokeRound","mm",10,0,20,.1),re("wheelAxis",!0),t("wheelHeight","mm",40,.1,400,.1),t("wheelMidExtra","mm",6,0,10,.1),t("wheelAxisLength","mm",40,0,400,.1),t("wheelAxisRadius","mm",20,0,200,.1),t("wheelMidRadius","mm",60,0,200,.1),t("wheelRadiusExtra","mm",1,0,20,.1),t("wheelAxisExtRound","mm",4,0,20,.1),t("wheelAxisIntRound","mm",0,0,20,.1),t("wheelExtraRound","mm",4,0,20,.1)],paramSvg:{module:"default_param_blank.svg",N1:"default_param_blank.svg",N2:"default_param_blank.svg",angleCenterCenter:"default_param_blank.svg",addInterAxis:"default_param_blank.svg",c1x:"default_param_blank.svg",c1y:"default_param_blank.svg",ah1:"default_param_blank.svg",dh1:"default_param_blank.svg",bh1:"default_param_blank.svg",bRound1:"default_param_blank.svg",ah2:"default_param_blank.svg",dh2:"default_param_blank.svg",bh2:"default_param_blank.svg",bRound2:"default_param_blank.svg",at1:"default_param_blank.svg",at2:"default_param_blank.svg",involSym:"default_param_blank.svg",involROpt:"default_param_blank.svg",involLOpt:"default_param_blank.svg",brr1:"default_param_blank.svg",brr2:"default_param_blank.svg",blr1:"default_param_blank.svg",blr2:"default_param_blank.svg",involArcPairs1:"default_param_blank.svg",skinThickness1:"default_param_blank.svg",involArcPairs2:"default_param_blank.svg",skinThickness2:"default_param_blank.svg",initAngle1:"default_param_blank.svg",gw2Position:"default_param_blank.svg",centralAxis:"default_param_blank.svg",axisRadius:"default_param_blank.svg",ribNb:"default_param_blank.svg",ribWidth:"default_param_blank.svg",ribHeight:"default_param_blank.svg",ribRound1:"default_param_blank.svg",ribRound2:"default_param_blank.svg",hollow:"default_param_blank.svg",materialHeightExt:"default_param_blank.svg",materialHeightInt:"default_param_blank.svg",spokeNb:"default_param_blank.svg",spokeWidth:"default_param_blank.svg",spokeRound:"default_param_blank.svg",wheelAxis:"default_param_blank.svg",wheelHeight:"default_param_blank.svg",wheelMidExtra:"default_param_blank.svg",wheelAxisLength:"default_param_blank.svg",wheelAxisRadius:"default_param_blank.svg",wheelMidRadius:"default_param_blank.svg",wheelRadiusExtra:"default_param_blank.svg",wheelAxisExtRound:"default_param_blank.svg",wheelAxisIntRound:"default_param_blank.svg",wheelExtraRound:"default_param_blank.svg"},sim:{tMax:100,tStep:.5,tUpdate:500}};function St(l,e){const s=ie(Ye.partName),n=m(),o=m();s.logstr+=`${s.partName} simTime: ${l}
|
|
22
|
-
`;try{const i=We(),r=We();i.set1ModuleToothNumber(e.module,e.N1),r.set1ModuleToothNumber(e.module,e.N2),i.set2CenterPosition(e.c1x,e.c1y);const S=Ee(e.angleCenterCenter),[_,g,d]=at(i,r,S,e.addInterAxis);r.set2CenterPosition(_,g),i.set3CircleRadius(e.ah1,e.dh1,e.bh1,e.bRound1),r.set3CircleRadius(e.ah2,e.dh2,e.bh2,e.bRound2);const[L,a,c,w]=gt(i,r,e.brr1,e.blr1,e.brr2,e.blr2,e.involSym,e.involROpt,e.involROpt);i.set4BaseCircles(L,a),r.set4BaseCircles(c,w),i.set5AddendumThickness(e.at1),r.set5AddendumThickness(e.at2);const P=Ee(e.initAngle1)+l*3*i.as/100;i.set6Angles(P,S);const I=_t(i,r,P,S,d,e.gw2Position);I.prepare();for(const M of I.getContours())n.addDynamics(M);n.addPoints(I.getContactPoint()),r.set6Angles(I.getInitAngle2(),S+Math.PI),s.logstr+=I.getMsg(),i.set7InvoluteDetails(e.involArcPairs1,e.skinThickness1),r.set7InvoluteDetails(e.involArcPairs2,e.skinThickness2);for(const M of i.getRefCircles())n.addDynamics(M);for(const M of r.getRefCircles())n.addDynamics(M);n.addDynamics(i.getToothRef()),n.addDynamics(r.getToothRef());const v=i.getProfile();if(s.logstr+=i.getMsg(),s.logstr+=v.check(),n.addMain(v),e.centralAxis===1){const M=ft(i.cx,i.cy,e.axisRadius,e.ribNb,e.ribWidth,e.ribHeight,e.ribRound1,e.ribRound2,P);s.logstr+=M.check(),n.addMain(M)}if(e.hollow===1){const M=i.br,k=e.axisRadius+e.ribHeight,x=M-e.materialHeightExt,h=k+e.materialHeightInt;if(h>x)throw`err902: hollowMaterialInt ${f(h)} bigger than hollowMaterialExt ${f(x)}`;const C=Lt(i.cx,i.cy,x,h,e.spokeNb,e.spokeWidth,e.spokeRound,P);for(const p of C)s.logstr+=p.check(),n.addMain(p)}const D=r.getProfile();s.logstr+=D.check(),n.addSecond(D);const u=i.ar+e.wheelRadiusExtra;if(e.wheelAxis===1){const M=qe(e.wheelHeight,e.wheelMidExtra,e.wheelAxisLength,e.wheelAxisRadius,e.wheelMidRadius,u,e.wheelAxisExtRound,e.wheelAxisIntRound,e.wheelExtraRound,!0),k=qe(e.wheelHeight,e.wheelMidExtra,e.wheelAxisLength,e.wheelAxisRadius,e.wheelMidRadius,u,e.wheelAxisExtRound,e.wheelAxisIntRound,e.wheelExtraRound,!1);o.addMain(M),o.addSecond(k)}else{const M=z(0,-e.wheelHeight/2).addSegStrokeR(0,e.wheelHeight).addSegStrokeR(u,0).addSegStrokeR(0,-e.wheelHeight).closeSegStroke(),k=z(0,-e.wheelHeight/2).addSegStrokeR(0,e.wheelHeight).addSegStrokeR(-u,0).addSegStrokeR(0,-e.wheelHeight).closeSegStroke();o.addMain(M),o.addSecond(k)}s.fig={teethProfile:n,axisProfile:o};const b=s.partName,E=e.wheelHeight/2+e.wheelMidExtra+e.wheelAxisLength+10;s.vol={extrudes:[{outName:`subpax_${b}_teethProfile`,face:`${b}_teethProfile`,extrudeMethod:T.eLinearOrtho,length:2*E,rotate:[0,0,0],translate:[0,0,-E]},{outName:`subpax_${b}_axisProfile`,face:`${b}_axisProfile`,extrudeMethod:T.eRotate,rotate:[0,0,0],translate:[0,0,0]}],volumes:[{outName:`pax_${b}`,boolMethod:Z.eIntersection,inList:[`subpax_${b}_teethProfile`,`subpax_${b}_axisProfile`]}]},s.logstr+=`gear_wheel_wheel drawn successfully!
|
|
23
|
-
`,s.calcErr=!1}catch(i){s.logstr+=i,console.log(i)}return s}var Ce={pTitle:"Gearwheel-gearwheel",pDescription:"Gear-system with two wheels",pDef:Ye,pGeom:St},Xe={partName:"simplified_gear_wheel",params:[t("module","mm",10,.1,100,.1),t("N1","scalar",23,3,1e3,1),t("c1x","mm",0,-200,200,1),t("c1y","mm",0,-200,200,1),re("centralAxis",!0),t("axisRadius","mm",10,.1,200,.1),t("ribNb","scalar",5,0,32,1),t("ribWidth","mm",8,1,100,.1),t("ribHeight","mm",8,1,100,.1),t("ribRound1","mm",2,0,20,.1),t("ribRound2","mm",2,0,20,.1),re("hollow",!0),t("materialHeightExt","mm",20,1,200,.5),t("materialHeightInt","mm",15,1,200,.5),t("spokeNb","scalar",5,1,18,1),t("spokeWidth","mm",15,1,200,.1),t("spokeRound","mm",10,0,20,.1),re("wheelAxis",!0),t("wheelHeight","mm",40,.1,400,.1),t("wheelMidExtra","mm",6,0,10,.1),t("wheelAxisLength","mm",40,0,400,.1),t("wheelAxisRadius","mm",20,0,200,.1),t("wheelMidRadius","mm",60,0,200,.1),t("wheelRadiusExtra","mm",1,0,20,.1),t("wheelAxisExtRound","mm",4,0,20,.1),t("wheelAxisIntRound","mm",0,0,20,.1),t("wheelExtraRound","mm",4,0,20,.1)],paramSvg:{module:"default_param_blank.svg",N1:"default_param_blank.svg",c1x:"default_param_blank.svg",c1y:"default_param_blank.svg",centralAxis:"default_param_blank.svg",axisRadius:"default_param_blank.svg",ribNb:"default_param_blank.svg",ribWidth:"default_param_blank.svg",ribHeight:"default_param_blank.svg",ribRound1:"default_param_blank.svg",ribRound2:"default_param_blank.svg",hollow:"default_param_blank.svg",materialHeightExt:"default_param_blank.svg",materialHeightInt:"default_param_blank.svg",spokeNb:"default_param_blank.svg",spokeWidth:"default_param_blank.svg",spokeRound:"default_param_blank.svg",wheelAxis:"default_param_blank.svg",wheelHeight:"default_param_blank.svg",wheelMidExtra:"default_param_blank.svg",wheelAxisLength:"default_param_blank.svg",wheelAxisRadius:"default_param_blank.svg",wheelMidRadius:"default_param_blank.svg",wheelRadiusExtra:"default_param_blank.svg",wheelAxisExtRound:"default_param_blank.svg",wheelAxisIntRound:"default_param_blank.svg",wheelExtraRound:"default_param_blank.svg"},sim:{tMax:100,tStep:.5,tUpdate:500}};function wt(l,e){const s=ie(Xe.partName),n=m(),o=m();s.logstr+=`${s.partName} simTime: ${l}
|
|
24
|
-
`;try{const i=de(Ce.pDef);i.setVal("module",e.module),i.setVal("N1",e.N1),i.setVal("c1x",e.c1x),i.setVal("c1y",e.c1y),i.setVal("centralAxis",e.centralAxis),i.setVal("axisRadius",e.axisRadius),i.setVal("ribNb",e.ribNb),i.setVal("ribWidth",e.ribWidth),i.setVal("ribHeight",e.ribHeight),i.setVal("ribRound1",e.ribRound1),i.setVal("ribRound2",e.ribRound2),i.setVal("hollow",e.hollow),i.setVal("materialHeightExt",e.materialHeightExt),i.setVal("materialHeightInt",e.materialHeightInt),i.setVal("spokeNb",e.spokeNb),i.setVal("spokeWidth",e.spokeWidth),i.setVal("spokeRound",e.spokeRound),i.setVal("wheelAxis",e.wheelAxis),i.setVal("wheelHeight",e.wheelHeight),i.setVal("wheelMidExtra",e.wheelMidExtra),i.setVal("wheelAxisLength",e.wheelAxisLength),i.setVal("wheelAxisRadius",e.wheelAxisRadius),i.setVal("wheelMidRadius",e.wheelMidRadius),i.setVal("wheelRadiusExtra",e.wheelRadiusExtra),i.setVal("wheelAxisExtRound",e.wheelAxisExtRound),i.setVal("wheelAxisIntRound",e.wheelAxisIntRound),i.setVal("wheelExtraRound",e.wheelExtraRound);const r=Ce.pGeom(l,i.getParamVal());ce(r),s.logstr+=he(r.logstr,i.partName),n.mergeFigure(r.fig.teethProfile),o.mergeFigure(r.fig.axisProfile),s.fig={teethProfile:n,axisProfile:o};const S=s.partName;s.vol={inherits:[{outName:`inpax_${S}_gearWW`,subdesign:"pax_gear_wheel_wheel",subgeom:r,rotate:[0,0,0],translate:[0,0,0]}],extrudes:[],volumes:[{outName:`pax_${S}`,boolMethod:Z.eIdentity,inList:[`inpax_${S}_gearWW`]}]};const _={partName:i.getPartName(),dparam:i.getDesignParamList(),orientation:[0,0,0],position:[0,0,0]};s.sub={gear_wheel_wheel_1:_},s.logstr+=`simplified_gear_wheel drawn successfully!
|
|
25
|
-
`,s.calcErr=!1}catch(i){s.logstr+=i,console.log(i)}return s}var bt={pTitle:"Simplified gearwheel",pDescription:"One simplified gearwheel without details on teeth-profile",pDef:Xe,pGeom:wt},je={partName:"pole_static",params:[t("D1","mm",1e3,100,4e3,10),t("D2","mm",700,100,4e3,10),t("D3","mm",800,100,4e3,10),t("H1","mm",3e3,100,4e4,10),t("H2","mm",7e3,100,4e4,10),t("E1","mm",30,1,80,1),t("E2","mm",5,1,80,1),t("N1","",32,3,100,1),t("D5","mm",40,1,100,1),t("L1","mm",45,1,300,1),t("D4","mm",600,200,1200,1),t("H3","mm",300,50,1200,1),t("H4","mm",1800,200,2500,1),t("L2","mm",30,1,100,1),t("E3","mm",40,1,100,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"},sim:{tMax:180,tStep:.5,tUpdate:500}};function Ht(l,e){let s,n;const o=ie(je.partName),i=m(),r=m(),S=m(),_=m(),g=m();o.logstr+=`${o.partName} simTime: ${l}
|
|
26
|
-
`;try{const d=e.D1/2,L=e.D2/2,a=e.D3/2;if(L>d)throw`err091: D2 ${e.D2} is larger than D1 ${e.D1}`;if(a+e.E2>d)throw`err095: D3 ${e.D3} and E2 ${e.E2} are too large compare to D1 ${e.D1}`;const c=e.H1+e.H2;o.logstr+=`pole-height: ${f(c)} mm
|
|
27
|
-
`;const w=Math.atan2(d-L,e.H2);o.logstr+=`cone-half-angle: ${f(oe(w))} degree
|
|
28
|
-
`;const P=e.E2*Math.tan(w/2),I=e.H1-P;s=function(x,h){const C=z(x*d,0).addSegStrokeA(x*d,e.H1).addSegStrokeA(x*L,c).addSegStrokeR(-x*e.E2*Math.cos(w),-e.E2*Math.sin(w)).addSegStrokeA(x*(d-e.E2),I);return h?C.addSegStrokeA(x*(d-e.E2),e.E1).addSegStrokeA(x*a,e.E1).addSegStrokeA(x*a,0):C.addSegStrokeA(x*(d-e.E2),0),C.closeSegStroke(),C},i.addMain(s(1,!1)),i.addSecond(s(1,!0)),i.addSecond(s(-1,!0));const v=e.D4/2,D=e.H4-2*v;if(D<0)throw`err121: H4 ${e.H4} is too small compare to D4 ${e.D4}`;if(v-e.L2<0)throw`err121: D4 ${e.D4} is too small compare to L2 ${e.L2}`;n=function(x){const h=v-x,C=e.H3+v;return z(h,C+D).addPointR(-h,h).addSegArc(h,!1,!0).addPointR(-h,-h).addSegArc(h,!1,!0).addSegStrokeR(0,-D).addPointR(h,-h).addSegArc(h,!1,!0).addPointR(h,h).addSegArc(h,!1,!0).closeSegStroke()},r.addMain(n(0)),r.addMain(n(e.L2));const u=z(d,0).addSegStrokeA(d,e.H1).addSegStrokeA(L,c).addSegStrokeA(-L,c).addSegStrokeA(-d,e.H1).addSegStrokeA(-d,0).closeSegStroke();r.addSecond(u);const b=z(-d,e.H3).addSegStrokeR(0,e.H4).addSegStrokeR(-e.E3,0).addSegStrokeR(0,-e.H4).closeSegStroke();r.addSecond(b),S.addMain($(0,0,d)),S.addMain($(0,0,a));const E=a+e.L1,M=2*Math.PI/e.N1;for(let x=0;x<e.N1;x++){const h=E*Math.cos(x*M),C=E*Math.sin(x*M);S.addMain($(h,C,e.D5/2))}S.addSecond($(0,0,L)),S.addSecond($(0,0,d-e.E2)),_.addMain($(0,0,d+e.E3)),_.addMain($(0,0,d-e.E2)),g.addMain(n(e.L2)),o.fig={poleCut:i,poleFace:r,poleBottom:S,emptyPole:_,emptyDoor:g};const k=o.partName;o.vol={extrudes:[{outName:`subpax_${k}_pole`,face:`${k}_poleCut`,extrudeMethod:T.eRotate,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${k}_bottom`,face:`${k}_poleBottom`,extrudeMethod:T.eLinearOrtho,length:e.E1,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${k}_door`,face:`${k}_poleFace`,extrudeMethod:T.eLinearOrtho,length:d+e.E3,rotate:[Math.PI/2,0,0],translate:[0,0,0]},{outName:`subpax_${k}_emptyPole`,face:`${k}_emptyPole`,extrudeMethod:T.eLinearOrtho,length:e.H1,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${k}_emptyDoor`,face:`${k}_emptyDoor`,extrudeMethod:T.eLinearOrtho,length:d+e.E3+10,rotate:[Math.PI/2,0,0],translate:[0,0,0]}],volumes:[{outName:`ipax_${k}_door`,boolMethod:Z.eIntersection,inList:[`subpax_${k}_door`,`subpax_${k}_emptyPole`]},{outName:`ipax_${k}_pole`,boolMethod:Z.eSubstraction,inList:[`subpax_${k}_pole`,`subpax_${k}_emptyDoor`]},{outName:`pax_${k}`,boolMethod:Z.eUnion,inList:[`ipax_${k}_pole`,`subpax_${k}_bottom`,`ipax_${k}_door`]}]},o.sub={},o.logstr+=`pole_static drawn successfully!
|
|
29
|
-
`,o.calcErr=!1}catch(d){o.logstr+=d,console.log(d)}return o}var He={pTitle:"Heliostat pole static",pDescription:"The vertical pole of an heliostat",pDef:je,pGeom:Ht},Ze={partName:"rake",params:[t("D1","mm",600,100,4e3,10),t("D2","mm",400,100,4e3,10),t("D3","mm",400,100,4e3,10),t("H1","mm",800,100,4e3,10),t("H2","mm",3e3,100,6e3,10),t("H3","mm",400,0,4e3,10),t("E1","mm",20,1,80,1),t("E3","mm",30,1,80,1),t("H4","mm",400,100,1e3,10),t("D4","mm",300,100,1e3,10),t("E4","mm",20,1,80,1),t("H5","mm",1e3,100,2e3,10),t("D5","mm",200,10,1e3,10),t("L4","mm",300,10,1e3,10),t("L5","mm",2e3,100,4e3,10),t("L6","mm",2e3,100,4e3,10),t("D6","mm",100,10,600,10),t("E6","mm",10,1,80,1),t("L7","mm",100,10,1e3,1),t("L8","mm",200,10,1e3,1),t("N1","",24,3,100,1),t("D7","mm",40,1,100,1),t("L1","mm",30,1,300,1),t("D8","mm",400,100,1e3,10),t("H6","mm",100,50,1e3,10),t("H7","mm",600,100,2e3,10),t("L9","mm",300,100,1e3,10),t("R9","mm",50,0,300,1)],paramSvg:{D1:"rake_face.svg",D2:"rake_face.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"},sim:{tMax:180,tStep:.5,tUpdate:500}};function Dt(l,e){let s,n,o;const i=ie(Ze.partName),r=m(),S=m(),_=m(),g=m(),d=m(),L=m(),a=m(),c=m();i.logstr+=`${i.partName} simTime: ${l}
|
|
30
|
-
`;try{const w=e.D1/2,P=e.D2/2,I=e.D3/2,v=e.D4/2,D=e.D5/2,u=e.D6/2,b=e.D7/2,E=e.D8/2,M=e.H1+e.H2,k=M-e.H4+e.H5;if(i.logstr+=`cone-height: ${f(M)} mm
|
|
31
|
-
`,i.logstr+=`cone-height total: ${f(k)} mm
|
|
32
|
-
`,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+v>e.H2)throw`err119: H4 ${e.H4} is too large compare to H2 ${e.H2} and D4 ${e.D4}`;if(e.E4>v)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}`;const x=4*e.L4+e.L5+2*e.L6,h=e.H1+e.H2-e.H4,C=v*Math.cos(Math.PI/6),p=v*Math.sin(Math.PI/6),A=D*Math.cos(Math.PI/6),B=D*Math.sin(Math.PI/6),V=E*Math.cos(Math.PI/6),F=E*Math.sin(Math.PI/6),q=[-x/2,-e.L5/2-e.L4,e.L5/2,x/2-e.L4],Y=e.H2-e.L8-e.H4-v;if(Y<0)throw`err140: H2 ${e.H2} too small compare to L8 ${e.L8}, H4 ${e.H4} and D4 ${e.D4}`;const j=Math.atan2(w-P,e.H2);i.logstr+=`cone-angle: ${f(oe(j))} degree
|
|
33
|
-
`;const K=x/2-e.L7-w+e.L8*Math.tan(j),te=Math.sqrt(K**2+Y**2),G=Math.atan2(K,Y);i.logstr+=`wing-angle: ${f(oe(G))} degree
|
|
34
|
-
`;const y=e.E1/Math.sin(G+j),O=te+e.E4/Math.cos(G)+y,R=w-e.L8*Math.tan(j)-y*Math.sin(G),H=e.H1+e.L8-y*Math.cos(G),Q=R-u*Math.cos(G),X=H+u*Math.sin(G),J=u-e.E6,ne=R-e.E6*Math.cos(G),le=H+e.E6*Math.sin(G),ue=Math.PI/2-G,fe=e.L9/2,Le=fe-e.H7*Math.tan(j);if(Le<e.R9)throw`err177: R9 ${e.R9} too large compare to coneAngle and L9 ${e.L9}`;if(e.L9>e.D1)throw`err180: L9 ${e.L9} too large compare to D1 ${e.D1}`;const be=e.E1*Math.cos(j),Pe=e.E1*Math.sin(j),Te=e.E1*Math.tan(j/2);s=function(W){return z(W*w,0).addSegStrokeA(W*w,e.H1).addSegStrokeA(W*P,M).addSegStrokeA(W*(P-be),M-Pe).addSegStrokeA(W*(w-e.E1),e.H1-Te).addSegStrokeA(W*(w-e.E1),0).closeSegStroke()},n=function(W){return z(W*w,0).addSegStrokeA(W*w,e.H1).addSegStrokeA(W*P,M).addSegStrokeA(W*(P-be),M-Pe).addSegStrokeA(W*(w-e.E1),e.H1-Te).addSegStrokeA(W*(w-e.E1),e.H1-e.H3).addSegStrokeA(W*I,e.H1-e.H3).addSegStrokeA(W*I,e.H1-e.H3-e.E3).addSegStrokeA(W*(w-e.E1),e.H1-e.H3-e.E3).addSegStrokeA(W*(w-e.E1),0).closeSegStroke()},o=function(W,ae,_e,ve,Me){const ze=W*Math.cos(Me),Be=W*Math.sin(Me),Ue=-ae*Math.sin(Me),Ge=ae*Math.cos(Me);return z(_e,ve).addSegStrokeA(_e+ze,ve+Be).addSegStrokeA(_e+ze+Ue,ve+Be+Ge).addSegStrokeA(_e+Ue,ve+Ge).closeSegStroke()};const Ae=z(fe,e.H1+e.H6).addCornerRounded(e.R9).addSegStrokeA(Le,e.H1+e.H6+e.H7).addCornerRounded(e.R9).addSegStrokeA(-Le,e.H1+e.H6+e.H7).addCornerRounded(e.R9).addSegStrokeA(-fe,e.H1+e.H6).addCornerRounded(e.R9).closeSegStroke();r.addMain(s(1)),r.addSecond(n(1)),r.addSecond(n(-1)),r.addSecond(o(x,e.D4,-x/2,h-v,0)),r.addSecond(o(x,e.D4-2*e.E4,-x/2,h-v+e.E4,0));for(const W of q)r.addSecond(o(e.L4,e.H5-p-B,W,h+p,0));r.addSecond(o(O,2*u,R,H,ue)),r.addSecond(o(O,2*J,ne,le,ue)),r.addSecond(o(2*u,O,-R,H,G)),r.addSecond(o(2*J,O,-ne,le,G)),r.addSecond(Ae);const Re=z(C,h+p).addSegStrokeA(V,h+e.H5-F).addSegStrokeA(A,h+e.H5-B).addPointA(-A,h+e.H5-B).addSegArc(D,!1,!1).addSegStrokeA(-V,h+e.H5-F).addSegStrokeA(-C,h+p).closeSegArc(v,!1,!1);S.addMain($(0,h,v)),S.addMain($(0,h,v-e.E4)),S.addSecond(n(1)),S.addSecond(n(-1)),S.addSecond(Re),S.addSecond($(0,h+e.H5,D)),S.addSecond(o(2*u,Y,-u,e.H1+e.L8,0)),S.addSecond(o(2*J,Y,-J,e.H1+e.L8,0)),S.addSecond(Ae),_.addMain($(0,h,v-e.E4)),_.addSecond($(0,h,v)),_.addSecond(Re),g.addMain($(0,0,w)),g.addMain($(0,0,I));const Oe=I+e.L1,pe=2*Math.PI/e.N1;for(let W=0;W<e.N1;W++){const ae=Oe*Math.cos(W*pe),_e=Oe*Math.sin(W*pe);g.addMain($(ae,_e,b))}g.addSecond($(0,0,w-e.E1)),g.addSecond($(0,0,P)),g.addSecond(o(e.D4,x,-v,-x/2,0)),g.addSecond(o(e.D4-2*e.E4,x,-v+e.E4,-x/2,0));for(const W of q)g.addSecond(o(2*C,e.L4,-C,W,0)),g.addSecond(o(2*A,e.L4,-A,W,0)),g.addSecond(o(2*V,e.L4,-V,W,0));g.addSecond(o(2*u,K,-u,w-e.L8*Math.tan(j),0)),g.addSecond(o(2*J,K,-J,w-e.L8*Math.tan(j),0)),g.addSecond(o(2*u,K,-u,-w+e.L8*Math.tan(j)-K,0)),g.addSecond(o(2*J,K,-J,-w+e.L8*Math.tan(j)-K,0)),d.addMain(Re),d.addSecond($(0,h,v)),d.addSecond($(0,h,v-e.E4)),d.addSecond($(0,h+e.H5,D)),L.addMain($(0,0,u)),L.addMain($(0,0,J)),a.addSecond($(0,0,u)),a.addMain($(0,0,J)),c.addMain(Ae),c.addSecond(n(1)),c.addSecond(n(-1)),c.addSecond(o(x,e.D4,-x/2,h-v,0)),c.addSecond(o(x,e.D4-2*e.E4,-x/2,h-v+e.E4,0));for(const W of q)c.addSecond(o(e.L4,e.H5-p-B,W,h+p,0));c.addSecond(o(O,2*u,R,H,ue)),c.addSecond(o(O,2*J,ne,le,ue)),c.addSecond(o(2*u,O,-R,H,G)),c.addSecond(o(2*J,O,-ne,le,G)),i.fig={faceCone:r,faceBeam:S,faceBeamHollow:_,faceDisc:g,faceHand:d,faceWing:L,faceWingHollow:a,faceDoor:c};const U=i.partName,nt=q.map((W,ae)=>({outName:`subpax_${U}_hand_${ae}`,face:`${U}_faceHand`,extrudeMethod:T.eLinearOrtho,length:e.L4,rotate:[Math.PI/2,0,0],translate:[0,-W,0]}));i.vol={extrudes:[{outName:`subpax_${U}_cone`,face:`${U}_faceCone`,extrudeMethod:T.eRotate,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${U}_beam`,face:`${U}_faceBeam`,extrudeMethod:T.eLinearOrtho,length:x,rotate:[Math.PI/2,0,0],translate:[0,x/2,0]},{outName:`subpax_${U}_beamHollow`,face:`${U}_faceBeamHollow`,extrudeMethod:T.eLinearOrtho,length:x,rotate:[Math.PI/2,0,0],translate:[0,x/2,0]},{outName:`subpax_${U}_disc`,face:`${U}_faceDisc`,extrudeMethod:T.eLinearOrtho,length:e.E3,rotate:[0,0,0],translate:[0,0,e.H1-e.H3-e.E3]},{outName:`subpax_${U}_wing_right`,face:`${U}_faceWing`,extrudeMethod:T.eLinearOrtho,length:O,rotate:[-G,0,0],translate:[0,Q,X]},{outName:`subpax_${U}_wing_left`,face:`${U}_faceWing`,extrudeMethod:T.eLinearOrtho,length:O,rotate:[G,0,0],translate:[0,-Q,X]},{outName:`subpax_${U}_wing_hollow_right`,face:`${U}_faceWingHollow`,extrudeMethod:T.eLinearOrtho,length:O,rotate:[-G,0,0],translate:[0,Q,X]},{outName:`subpax_${U}_wing_hollow_left`,face:`${U}_faceWingHollow`,extrudeMethod:T.eLinearOrtho,length:O,rotate:[G,0,0],translate:[0,-Q,X]},{outName:`subpax_${U}_door`,face:`${U}_faceDoor`,extrudeMethod:T.eLinearOrtho,length:e.D1,rotate:[Math.PI/2,0,Math.PI/2],translate:[0,0,0]},...nt],volumes:[{outName:`ipax_${U}_plus`,boolMethod:Z.eUnion,inList:[`subpax_${U}_cone`,`subpax_${U}_beam`,`subpax_${U}_disc`,`subpax_${U}_hand_0`,`subpax_${U}_hand_1`,`subpax_${U}_hand_2`,`subpax_${U}_hand_3`,`subpax_${U}_wing_right`,`subpax_${U}_wing_left`]},{outName:`ipax_${U}_hollow`,boolMethod:Z.eUnion,inList:[`subpax_${U}_beamHollow`,`subpax_${U}_wing_hollow_right`,`subpax_${U}_wing_hollow_left`,`subpax_${U}_door`]},{outName:`pax_${U}`,boolMethod:Z.eSubstraction,inList:[`ipax_${U}_plus`,`ipax_${U}_hollow`]}]},i.sub={},i.logstr+=`heliostat-rake drawn successfully!
|
|
35
|
-
`,i.calcErr=!1}catch(w){i.logstr+=w,console.log(w)}return i}var De={pTitle:"Heliostat rake",pDescription:"The rake on top of the pole-rotor of the heliostat",pDef:Ze,pGeom:Dt},Ie={partName:"spider",params:[t("D1","mm",100,10,400,1),t("L1","mm",400,100,1e3,10),t("L2","mm",400,100,1e3,10),t("L3","mm",100,10,400,1),t("L4","mm",3e3,500,8e3,10),t("L5","mm",2e3,100,8e3,10),t("L6","mm",30,1,100,1),t("E1","mm",3,1,80,1),t("E2","mm",50,1,200,1),t("E3","mm",3,1,80,1),t("R2","mm",100,0,400,10),t("N1","",6,1,20,1)],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 $t(l,e){let s,n;const o=ie(Ie.partName),i=m(),r=m(),S=m();o.logstr+=`${o.partName} simTime: ${l}
|
|
36
|
-
`;try{const _=e.D1/2;if(e.D1<e.E2)throw`err476: D1 ${e.D1} smaller then E2 ${e.E2}`;const g=e.E2/2,d=Math.sqrt(_**2-g**2),L=e.L1+e.L2*Math.sqrt(2),a=e.L2+e.L1*Math.sqrt(2),c=e.L4-a;if(c<e.R2)throw`err984: L4 ${e.L4} too small compare to R2 ${e.R2}`;const w=c*Math.cos(Math.PI/4),P=c*Math.sin(Math.PI/4),I=e.E2*Math.cos(Math.PI/4),v=e.E2*Math.sin(Math.PI/4),D=e.E2*Math.tan(Math.PI/8);if(_<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 u=(e.L3-e.E2)/2*Math.cos(Math.PI/4),b=L+w+u,E=-e.L1-P+u,M=E-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 k=1;e.N1>1&&(k=(e.L5-e.L6)/(e.N1-1));const x=[...Array(e.N1).keys()].map(V=>V*k);s=function(V,F,q){return z(V,F).addSegStrokeA(V+q*Math.cos(Math.PI/4),F-q*Math.sin(Math.PI/4)).addSegStrokeA(V,F-2*q*Math.sin(Math.PI/4)).addSegStrokeA(V-q*Math.cos(Math.PI/4),F-q*Math.sin(Math.PI/4)).closeSegStroke()},n=function(V,F,q,Y){return z(q,Y).addSegStrokeA(q+V,Y).addSegStrokeA(q+V,Y+F).addSegStrokeA(q,Y+F).closeSegStroke()};const h=Math.sin(2*Math.PI*l/Ie.sim.tMax)*Math.PI/2;o.logstr+=`spide leg number: ${e.N1}
|
|
37
|
-
`,o.logstr+=`spide position angle: ${f(oe(h))} degree
|
|
38
|
-
`;const C=z(g,-d).addCornerRounded(e.R2).addSegStrokeA(g,-e.L1).addCornerRounded(e.R2).addSegStrokeA(L,-e.L1).addCornerRounded(e.R2+e.E2).addSegStrokeA(L+w,-e.L1-P).addSegStrokeA(L+w-I,-e.L1-P-v).addSegStrokeA(L-D,-e.L1-e.E2).addCornerRounded(e.R2).addSegStrokeA(-L+D,-e.L1-e.E2).addCornerRounded(e.R2).addSegStrokeA(-L-w+I,-e.L1-P-v).addSegStrokeA(-L-w,-e.L1-P).addSegStrokeA(-L,-e.L1).addCornerRounded(e.R2+e.E2).addSegStrokeA(-g,-e.L1).addCornerRounded(e.R2).addSegStrokeA(-g,-d).addCornerRounded(e.R2).closeSegArc(_,!0,!1);i.addMain(C),i.addMain($(0,0,_-e.E1)),i.addSecond(s(b,E,e.L3)),i.addSecond(s(b,M,e.L3-2*e.E3)),i.addSecond(s(-b,E,e.L3)),i.addSecond(s(-b,M,e.L3-2*e.E3)),r.addMain($(0,0,_)),r.addMain($(0,0,_-e.E1)),r.addMain(s(b,E,e.L3)),r.addMain(s(b,M,e.L3-2*e.E3)),r.addMain(s(-b,E,e.L3)),r.addMain(s(-b,M,e.L3-2*e.E3)),r.addSecond(C),S.addSecond(n(e.L5,e.D1,0,-e.D1/2)),S.addSecond(n(e.L5,e.L3,0,-e.L4-e.L3));for(const V of x)S.addSecond(n(e.L6,e.L4,V,-e.L4));o.fig={faceLegs:i.rotate(0,0,h),faceTube:r.rotate(0,0,h),faceBody:S};const p=o.partName,A=x.map((V,F)=>({outName:`subpax_${p}_leg_${F}`,face:`${p}_faceLegs`,extrudeMethod:T.eLinearOrtho,length:e.L6,rotate:[0,0,0],translate:[0,0,V]})),B=x.map((V,F)=>`subpax_${p}_leg_${F}`);o.vol={extrudes:[{outName:`subpax_${p}_tube`,face:`${p}_faceTube`,extrudeMethod:T.eLinearOrtho,length:e.L5,rotate:[0,0,0],translate:[0,0,0]},...A],volumes:[{outName:`pax_${p}`,boolMethod:Z.eUnion,inList:[`subpax_${p}_tube`,...B]}]},o.sub={},o.logstr+=`heliostat-spider drawn successfully!
|
|
39
|
-
`,o.calcErr=!1}catch(_){o.logstr+=_,console.log(_)}return o}var me={pTitle:"Heliostat spider",pDescription:"The spider part for the control of the inclination of the heliostat",pDef:Ie,pGeom:$t},Je={partName:"swing",params:[t("L1","mm",12500,1e3,4e4,10),t("L2","mm",6e3,1e3,4e4,10),t("L3","mm",500,100,4e3,10),t("L4","mm",600,100,4e3,10),t("L5","mm",2e3,100,1e4,10),t("L6","mm",2e3,100,1e4,10),t("D1","mm",400,50,1e3,1),t("H1","mm",100,10,400,1),t("H2","mm",100,10,400,1),t("H3","mm",100,10,400,1),t("H4","mm",100,10,400,1),t("E1","mm",5,1,80,1),t("E2","mm",3,1,80,1),t("E3","mm",3,1,80,1),t("rod1","",10,1,40,1),t("rod2","mm",1300,100,4e3,10),t("rod3","mm",400,50,1e3,10),t("rod4","mm",100,50,400,10)],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",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 vt(l,e){let s,n;const o=ie(Je.partName),i=m(),r=m(),S=m(),_=m();o.logstr+=`${o.partName} simTime: ${l}
|
|
40
|
-
`;try{const g=e.D1/2;o.logstr+=`swing size: L1 ${f(e.L1)} x L2 ${f(e.L2)} mm
|
|
41
|
-
`,s=function(u,b,E,M){return z(u,b).addSegStrokeA(u+E,b).addSegStrokeA(u+E,b+M).addSegStrokeA(u,b+M).closeSegStroke()},n=function(u,b,E,M,k){return z(u,b).addCornerRounded(k).addSegStrokeA(u+E,b).addCornerRounded(k).addSegStrokeA(u+E,b+M).addCornerRounded(k).addSegStrokeA(u,b+M).addCornerRounded(k).closeSegStroke()},i.addMain($(0,0,g)),i.addMain($(0,0,g-e.E1));const d=[-e.L2/2,-e.L3-e.H2,e.L3,e.L2/2-e.H2];for(const u of d)i.addMain(s(u,g-e.H4,e.H2,e.H4)),i.addMain(s(u+e.E2,g-e.H4+e.E2,e.H2-2*e.E2,e.H4-2*e.E2));i.addSecond(s(-e.L2/2,g,e.L2,e.H3));const L=[];L.push(-e.L1/2),L.push(e.L1/2-e.H1);for(const u 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 b of[0,e.L4-e.H1])L.push(u+b);for(const u of L)r.addMain(s(u,g,e.H1,e.H3)),r.addMain(s(u+e.E3,g+e.E3,e.H1-2*e.E3,e.H3-2*e.E3));r.addSecond(s(-e.L1/2,-g,e.L1,e.D1)),r.addSecond(s(-e.L1/2,g-e.H4,e.L1,e.H4));for(const u of L)S.addSecond(s(u,-e.L2/2,e.H1,e.L2));for(const u of d)S.addSecond(s(-e.L1/2,u,e.L1,e.H2));S.addSecond(s(-e.L1/2,-g,e.L1,e.D1));for(const u of L)_.addMain(s(u,-e.L2/2,e.H1,e.L2));for(const u of d)_.addMain(s(-e.L1/2,u,e.L1,e.H2));_.addMain(s(-e.L1/2,-g,e.L1,e.D1));const a=-((e.rod1-1)*e.rod2+e.rod3)/2,c=(e.rod3-e.rod4)/2,w=e.rod3/2,P=1.2*e.L2,I=(P-w)/3,v=-P/2;for(let u=0;u<e.rod1;u++){const b=a+u*e.rod2;_.addSecond(s(b+c,v,e.rod4,P));for(let E=0;E<4;E++)_.addSecond(n(b,v+E*I,e.rod3,w,w/4))}o.fig={faceSide:i,faceFace:r,faceTop:S,faceTopWithRods:_};const D=o.partName;o.vol={extrudes:[{outName:`subpax_${D}_side`,face:`${D}_faceSide`,extrudeMethod:T.eLinearOrtho,length:e.L1,rotate:[0,0,0],translate:[0,0,-e.L1/2]},{outName:`subpax_${D}_face`,face:`${D}_faceFace`,extrudeMethod:T.eLinearOrtho,length:e.L2,rotate:[0,Math.PI/2,0],translate:[-e.L2/2,0,0]}],volumes:[{outName:`pax_${D}`,boolMethod:Z.eUnion,inList:[`subpax_${D}_side`,`subpax_${D}_face`]}]},o.sub={},o.logstr+=`heliostat-swing drawn successfully!
|
|
42
|
-
`,o.calcErr=!1}catch(g){o.logstr+=g,console.log(g)}return o}var $e={pTitle:"Heliostat swing",pDescription:"The swing for the heliostat inclination",pDef:Je,pGeom:vt},Ve={partName:"heliostat",params:[t("H1","mm",3e3,100,4e4,10),t("H2","mm",2500,100,4e4,10),t("H3","mm",200,10,500,10),t("H4","mm",800,100,4e3,10),t("H5","mm",3e3,100,6e3,10),t("H6","mm",200,100,4e3,10),t("H7","mm",800,100,4e3,10),t("H8","mm",200,100,4e3,10),t("H9","mm",100,10,400,10),t("D1","mm",1e3,100,4e3,10),t("D2","mm",700,100,4e3,10),t("D3","mm",900,100,4e3,10),t("D4","mm",400,100,4e3,10),t("D5","mm",300,100,1e3,10),t("D6","mm",200,100,1e3,10),t("D7","mm",400,100,1e3,10),t("D8","mm",100,10,1e3,10),t("D9","mm",100,10,1e3,10),t("S1","mm",250,10,800,10),t("S2","mm",200,10,800,10),t("E1","mm",30,1,80,1),t("E2","mm",50,1,80,1),t("L1","mm",12500,1e3,4e4,10),t("L2","mm",6e3,1e3,4e4,10),t("L3","mm",100,10,500,10),t("L4","mm",600,100,4e3,10),t("L5","mm",2e3,100,6e3,10),t("L6","mm",2e3,100,6e3,10),t("L7","mm",100,10,1e3,10),t("L8","mm",200,10,1e3,10),t("al","degree",80,0,95,1),t("ar","degree",80,0,95,1)],paramSvg:{H1:"heliostat_overview.svg",H2:"heliostat_side.svg",H3:"heliostat_side_sizing.svg",H4:"heliostat_side_sizing.svg",H5:"heliostat_side_sizing.svg",H6:"heliostat_side_sizing.svg",H7:"heliostat_side_sizing.svg",H8:"heliostat_side_sizing.svg",H9:"heliostat_side_sizing.svg",D1:"heliostat_side_sizing.svg",D2:"heliostat_side_sizing.svg",D3:"heliostat_side_sizing.svg",D4:"heliostat_side_sizing.svg",D5:"heliostat_side_sizing.svg",D6:"heliostat_side_sizing.svg",D7:"heliostat_side_sizing.svg",D8:"heliostat_side_sizing.svg",D9:"heliostat_face_sizing.svg",S1:"heliostat_side_sizing.svg",S2:"heliostat_side_sizing.svg",E1:"heliostat_side_sizing.svg",E2:"heliostat_side_sizing.svg",L1:"heliostat_face_sizing.svg",L2:"heliostat_side_sizing.svg",L3:"heliostat_face_sizing.svg",L4:"heliostat_face_sizing.svg",L5:"heliostat_face_sizing.svg",L6:"heliostat_face_sizing.svg",L7:"heliostat_face_sizing.svg",L8:"heliostat_face_sizing.svg",al:"heliostat_side_sizing.svg",ar:"heliostat_side_sizing.svg"},sim:{tMax:180,tStep:.5,tUpdate:500}};function Mt(l,e){const s=ie(Ve.partName),n=m(),o=m();s.logstr+=`${s.partName} simTime: ${l}
|
|
43
|
-
`;try{const i=e.H1+e.H2-e.H3+e.H4+e.H5-e.H6+e.H7;s.logstr+=`heliostat-height: ${f(i)}, diameter ${f(e.D1)} m
|
|
44
|
-
`,s.logstr+=`heliostat-swing-length: ${f(e.L1)}, width ${f(e.L2)} m
|
|
45
|
-
`;const S=(e.al-e.ar)/2-Math.sin(2*Math.PI*l/Ve.sim.tMax)*(e.al+e.ar)/2,_=Ee(S);s.logstr+=`swing position angle: ${f(oe(_))} degree
|
|
46
|
-
`;const g=e.H1+e.H2-e.H3,d=g+e.H4+e.H5-e.H6+e.H7,L=d+e.H8,a=de(He.pDef),c=de(De.pDef),w=de(me.pDef),P=de($e.pDef);if(a.setVal("H1",e.H1),a.setVal("H2",e.H2),a.setVal("D1",e.D1),a.setVal("D2",e.D2),a.setVal("E1",e.E1),a.setVal("E2",e.E1),c.setVal("H1",e.H4),c.setVal("H2",e.H5),c.setVal("D1",e.D3),c.setVal("D2",e.D4),c.setVal("L9",e.D3/2),c.setVal("E1",e.E1),c.setVal("E3",e.E1),c.setVal("D3",e.D2*.6),e.D2>e.D3-2*e.E1)throw`err153: D2 ${e.D2} too large compare to D3 ${e.D3} and E1 ${e.E1}`;if(c.setVal("H4",e.H6),c.setVal("D4",e.D5),c.setVal("L7",e.L7),c.setVal("L8",e.L8),c.setVal("D6",e.D9),c.setVal("H5",e.H7+e.H8),c.setVal("D5",e.D6),c.setVal("D8",e.D7),e.D6>=e.D7)throw`err164: D6 ${e.D6} too large compare to D7 ${e.D7}`;const I=e.L4-2*e.L3;if(c.setVal("L4",I),I<=0)throw`err169: L3 ${e.L3} too large compare to L4 ${e.L4}`;c.setVal("L5",e.L5+2*e.L3),c.setVal("L6",e.L6+2*e.L3);const v=e.L5*.96;if(w.setVal("L5",v),w.setVal("D1",e.D8),w.setVal("L1",e.S1),w.setVal("L2",e.S2),w.setVal("E2",e.E2),w.setVal("L4",e.L2/2-e.H8),P.setVal("L2",e.L2),P.setVal("D1",e.D6),P.setVal("H4",e.H9),P.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}`;P.setVal("H1",e.L3),P.setVal("H2",e.L3),P.setVal("L4",e.L4),P.setVal("L5",e.L5),P.setVal("L6",e.L6),P.setVal("L3",e.D7);const D=He.pGeom(0,a.getParamVal());ce(D),s.logstr+=he(D.logstr,a.partName);const u=De.pGeom(0,c.getParamVal());ce(u),s.logstr+=he(u.logstr,c.partName);const b=me.pGeom(0,w.getParamVal());ce(b),s.logstr+=he(b.logstr,w.partName);const E=$e.pGeom(0,P.getParamVal());ce(E),s.logstr+=he(E.logstr,P.partName),n.mergeFigure(D.fig.poleCut),n.mergeFigure(u.fig.faceBeam.translate(0,g)),n.mergeFigure(b.fig.faceLegs.translate(0,d).rotate(0,d,_/2)),n.mergeFigure(E.fig.faceSide.translate(0,L).rotate(0,L,_)),o.mergeFigure(D.fig.poleCut),o.mergeFigure(u.fig.faceCone.translate(0,g)),o.mergeFigure(b.fig.faceBody.translate(-v/2,d)),o.mergeFigure(E.fig.faceFace.translate(0,L)),s.fig={faceSide:n,faceFace:o};const M=s.partName;s.vol={inherits:[{outName:`inpax_${M}_poleStatic`,subdesign:"pax_pole_static",subgeom:D,rotate:[0,0,0],translate:[0,0,0]},{outName:`inpax_${M}_rake`,subdesign:"pax_rake",subgeom:u,rotate:[0,0,0],translate:[0,0,g]},{outName:`inpax_${M}_swing`,subdesign:"pax_swing",subgeom:E,rotate:[Math.PI/2,0,0],translate:[0,0,L]},{outName:`inpax_${M}_spider`,subdesign:"pax_spider",subgeom:b,rotate:[Math.PI/2,0,0],translate:[0,v/2,d]}],extrudes:[],volumes:[{outName:`pax_${M}`,boolMethod:Z.eUnion,inList:[`inpax_${M}_poleStatic`,`inpax_${M}_rake`,`inpax_${M}_swing`,`inpax_${M}_spider`]}]};const k={partName:a.getPartName(),dparam:a.getDesignParamList(),orientation:[0,0,0],position:[0,0,0]},x={partName:c.getPartName(),dparam:c.getDesignParamList(),orientation:[0,0,0],position:[0,0,g]},h={partName:c.getPartName(),dparam:c.getDesignParamList(),orientation:[Math.PI/2,0,0],position:[0,v/2,d]},C={partName:P.getPartName(),dparam:P.getDesignParamList(),orientation:[Math.PI/2,0,0],position:[0,0,L]};s.sub={pole_static_1:k,rake_1:x,spider_1:h,swing_1:C},s.logstr+=`heliostat-overview drawn successfully!
|
|
47
|
-
`,s.calcErr=!1}catch(i){s.logstr+=i,console.log(i)}return s}var xt={pTitle:"Heliostat overview",pDescription:"The heliostat inclination mechanism",pDef:Ve,pGeom:Mt},Ke={partName:"rake_stopper",params:[t("D1","mm",600,100,4e3,10),t("D2","mm",400,100,4e3,10),t("D3","mm",400,100,4e3,10),t("H1","mm",800,100,4e3,10),t("H2","mm",3e3,100,6e3,10),t("H3","mm",400,0,4e3,10),t("E1","mm",20,1,80,1),t("E3","mm",30,1,80,1),t("H4","mm",200,100,1e3,10),t("D4","mm",300,100,1e3,10),t("E4","mm",20,1,80,1),t("H5","mm",400,100,2e3,10),t("D5","mm",200,10,1e3,10),t("L4","mm",300,10,1e3,10),t("L5","mm",2e3,100,4e3,10),t("L6","mm",2e3,100,4e3,10),t("D6","mm",100,10,600,10),t("E6","mm",10,1,80,1),t("L7","mm",100,10,1e3,1),t("L8","mm",200,10,1e3,1),t("N1","",24,3,100,1),t("D7","mm",40,1,100,1),t("L1","mm",30,1,300,1),t("D8","mm",400,100,1e3,10),t("H6","mm",100,50,1e3,10),t("H7","mm",600,100,2e3,10),t("L9","mm",300,100,1e3,10),t("R9","mm",50,0,300,1),t("S1","mm",100,10,300,1),t("S2","mm",2e3,100,8e3,10),t("E7","mm",5,1,80,1)],paramSvg:{D1:"rake_face.svg",D2:"rake_face.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",S1:"rake_side_stopper.svg",S2:"rake_top_stopper.svg",E7:"rake_side_stopper.svg"},sim:{tMax:180,tStep:.5,tUpdate:500}};function kt(l,e){let s;const n=ie(Ke.partName),o=m(),i=m(),r=m(),S=m(),_=m(),g=m(),d=m(),L=m(),a=m(),c=m(),w=m(),P=m(),I=m(),v=m(),D=m();n.logstr+=`${n.partName} simTime: ${l}
|
|
48
|
-
`;try{const u=e.D1/2,b=e.H1+e.H2,E=b-e.H4+e.H5;if(n.logstr+=`cone-height: ${f(b)} mm
|
|
49
|
-
`,n.logstr+=`cone-height total: ${f(E)} mm
|
|
50
|
-
`,2*e.E7>=e.S1)throw`err135: E7 ${e.E7} too large compare to S1 ${e.S1}`;if(e.L5<e.D1+4*e.S1)throw`err138: L5 ${e.L5} too small compare to D1 ${e.D1} and S1 ${e.S1}`;const M=E-e.S2;if(M<0)throw`err143: S2 ${e.S2} too large compare to H1H5 ${f(E)}`;const k=e.H1+e.H2-e.H4+e.D4/2,x=e.H1+e.L8-e.S1;s=function(Q,X,J,ne,le){const ue=Q*Math.cos(le),fe=Q*Math.sin(le),Le=-X*Math.sin(le),be=X*Math.cos(le);return z(J,ne).addSegStrokeA(J+ue,ne+fe).addSegStrokeA(J+ue+Le,ne+fe+be).addSegStrokeA(J+Le,ne+be).closeSegStroke()};const h=de(De.pDef);h.setVal("D1",e.D1),h.setVal("D2",e.D2),h.setVal("D3",e.D3),h.setVal("H1",e.H1),h.setVal("H2",e.H2),h.setVal("H3",e.H3),h.setVal("E1",e.E1),h.setVal("E3",e.E3),h.setVal("H4",e.H4),h.setVal("D4",e.D4),h.setVal("E4",e.E4),h.setVal("H5",e.H5),h.setVal("D5",e.D5),h.setVal("L4",e.L4),h.setVal("L5",e.L5),h.setVal("L6",e.L6),h.setVal("D6",e.D6),h.setVal("E6",e.E6),h.setVal("L7",e.L7),h.setVal("L8",e.L8),h.setVal("N1",e.N1),h.setVal("D7",e.D7),h.setVal("L1",e.L1),h.setVal("D8",e.D8),h.setVal("H6",e.H6),h.setVal("H7",e.H7),h.setVal("L9",e.L9),h.setVal("R9",e.R9);const C=De.pGeom(0,h.getParamVal());ce(C),n.logstr+=he(C.logstr,h.partName),o.mergeFigure(C.fig.faceCone),i.mergeFigure(C.fig.faceBeam),r.mergeFigure(C.fig.faceBeamHollow),S.mergeFigure(C.fig.faceDisc),_.mergeFigure(C.fig.faceHand),g.mergeFigure(C.fig.faceWing),d.mergeFigure(C.fig.faceWingHollow),L.mergeFigure(C.fig.faceDoor),a.mergeFigure(C.fig.faceDisc,!0);const p=e.L5/2,A=e.S1/2,B=e.S1-2*e.E7,V=B/2;a.addMain(s(e.S1,e.L5,-u-e.S1,-p,0)),a.addMain(s(B,e.L5,-u-e.E7-B,-p,0)),a.addMain(s(e.S1,e.L5,e.S2-e.S1,-p,0)),a.addMain(s(B,e.L5,e.S2-e.E7-B,-p,0));const F=e.S2-e.S1/2;a.addMain(s(F,e.S1,0,-p,0)),a.addMain(s(F,B,0,-p+e.E7,0)),a.addMain(s(F,e.S1,0,p-e.S1,0)),a.addMain(s(F,B,0,p-e.S1+e.E7,0)),a.addMain(s(F,e.S1,0,-u-e.S1,0)),a.addMain(s(F,B,0,-u-e.S1+e.E7,0)),a.addMain(s(F,e.S1,0,u,0)),a.addMain(s(F,B,0,u+e.E7,0)),c.mergeFigure(C.fig.faceBeam,!0),c.addMain($(-u-A,M+A,A)),c.addMain($(-u-A,M+A,V)),c.addMain($(e.S2-A,k+A,A)),c.addMain($(e.S2-A,k+A,V)),c.addSecond(s(F,e.S1,0,k,0)),c.addSecond(s(F,B,0,k+e.E7,0));const q=k+e.S1/2-x,Y=Math.sqrt(F**2+q**2),j=Math.atan2(q,F);n.logstr+=`stopper-rod: L ${f(Y)} mm, A ${f(oe(j))} degree
|
|
51
|
-
`;const K=A*Math.sin(j),te=A*Math.cos(j),G=x-te;c.addSecond(s(Y,e.S1,K,G,j));const y=V*Math.sin(j),O=V*Math.cos(j),R=x-O;c.addSecond(s(Y,B,y,R,j)),w.mergeFigure(C.fig.faceBeam,!0),w.addSecond($(-u-A,M+A,A)),w.addMain($(-u-A,M+A,V)),w.addSecond($(e.S2-A,k+A,A)),w.addMain($(e.S2-A,k+A,V)),P.mergeFigure(C.fig.faceCone,!0),P.addMain($(-e.L5/2+A,k+A,A)),P.addMain($(-e.L5/2+A,k+A,V)),P.addMain($(e.L5/2-A,k+A,A)),P.addMain($(e.L5/2-A,k+A,V)),I.mergeFigure(C.fig.faceCone,!0),I.addSecond($(-e.L5/2+A,k+A,A)),I.addMain($(-e.L5/2+A,k+A,V)),I.addSecond($(e.L5/2-A,k+A,A)),I.addMain($(e.L5/2-A,k+A,V)),v.mergeFigure(C.fig.faceCone,!0),v.addMain($(-u-A,0,A)),v.addMain($(-u-A,0,V)),v.addMain($(u+A,0,A)),v.addMain($(u+A,0,V)),D.mergeFigure(C.fig.faceCone,!0),D.addSecond($(-u-A,0,A)),D.addMain($(-u-A,0,V)),D.addSecond($(u+A,0,A)),D.addMain($(u+A,0,V)),n.fig={faceCone:o,faceBeam:i,faceBeamHollow:r,faceDisc:S,faceHand:_,faceWing:g,faceWingHollow:d,faceDoor:L,faceStopperTop:a,faceStopperSide:c,faceStopperSideH:w,faceStopperFaceT:P,faceStopperFaceTH:I,faceStopperFaceB:v,faceStopperFaceBH:D};const H=n.partName;n.vol={inherits:[{outName:`inpax_${H}_rake`,subdesign:"pax_rake",subgeom:C,rotate:[0,0,0],translate:[0,0,0]}],extrudes:[{outName:`subpax_${H}_stpSide`,face:`${H}_faceStopperSide`,extrudeMethod:T.eLinearOrtho,length:e.L5,rotate:[Math.PI/2,0,0],translate:[0,e.L5/2,0]},{outName:`subpax_${H}_stpSideH`,face:`${H}_faceStopperSideH`,extrudeMethod:T.eLinearOrtho,length:e.L5,rotate:[Math.PI/2,0,0],translate:[0,e.L5/2,0]},{outName:`subpax_${H}_stpFaceT`,face:`${H}_faceStopperFaceT`,extrudeMethod:T.eLinearOrtho,length:F,rotate:[Math.PI/2,0,Math.PI/2],translate:[0,0,0]},{outName:`subpax_${H}_stpFaceTH`,face:`${H}_faceStopperFaceTH`,extrudeMethod:T.eLinearOrtho,length:F,rotate:[Math.PI/2,0,Math.PI/2],translate:[0,0,0]},{outName:`subpax_${H}_stpFaceB`,face:`${H}_faceStopperFaceB`,extrudeMethod:T.eLinearOrtho,length:Y,rotate:[Math.PI/2-j,0,Math.PI/2],translate:[0,0,x]},{outName:`subpax_${H}_stpFaceBH`,face:`${H}_faceStopperFaceBH`,extrudeMethod:T.eLinearOrtho,length:Y,rotate:[Math.PI/2-j,0,Math.PI/2],translate:[0,0,x]}],volumes:[{outName:`ipax_${H}_plus`,boolMethod:Z.eUnion,inList:[`subpax_${H}_stpSide`,`subpax_${H}_stpFaceT`,`subpax_${H}_stpFaceB`]},{outName:`ipax_${H}_hollow`,boolMethod:Z.eUnion,inList:[`subpax_${H}_stpSideH`,`subpax_${H}_stpFaceTH`,`subpax_${H}_stpFaceBH`]},{outName:`ipax_${H}_stopper`,boolMethod:Z.eSubstraction,inList:[`ipax_${H}_plus`,`ipax_${H}_hollow`]},{outName:`pax_${H}`,boolMethod:Z.eUnion,inList:[`inpax_${H}_rake`,`ipax_${H}_stopper`]}]},n.sub={},n.logstr+=`heliostat-rake drawn successfully!
|
|
52
|
-
`,n.calcErr=!1}catch(u){n.logstr+=u,console.log(u)}return n}var Fe={pTitle:"Heliostat rake with stopper",pDescription:"The rake-stopper on top of the pole-rotor of the heliostat",pDef:Ke,pGeom:kt},ye={partName:"heliostat_2",params:[t("H1","mm",3e3,100,4e4,10),t("H2","mm",2500,100,4e4,10),t("H3","mm",200,10,500,10),t("H4","mm",800,100,4e3,10),t("H5","mm",3e3,100,6e3,10),t("H6","mm",200,100,4e3,10),t("H7","mm",400,100,4e3,10),t("H9","mm",100,10,400,10),t("D1","mm",1e3,100,4e3,10),t("D2","mm",700,100,4e3,10),t("D3","mm",900,100,4e3,10),t("D4","mm",400,100,4e3,10),t("D5","mm",300,100,1e3,10),t("D6","mm",200,100,1e3,10),t("D7","mm",400,100,1e3,10),t("D9","mm",100,10,1e3,10),t("E1","mm",30,1,80,1),t("L1","mm",12500,1e3,4e4,10),t("L2","mm",6e3,1e3,4e4,10),t("L3","mm",100,10,500,10),t("L4","mm",600,100,4e3,10),t("L5","mm",2e3,100,6e3,10),t("L6","mm",2e3,100,6e3,10),t("L7","mm",100,10,1e3,10),t("L8","mm",200,10,1e3,10),t("al","degree",80,0,95,1),t("S1","mm",100,10,800,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",al:"heliostat2_side_sizing.svg",S1:"heliostat2_side_sizing.svg"},sim:{tMax:180,tStep:.5,tUpdate:500}};function Et(l,e){const s=ie(ye.partName),n=m(),o=m(),i=m();s.logstr+=`${s.partName} simTime: ${l}
|
|
53
|
-
`;try{const r=e.H1+e.H2-e.H3+e.H4+e.H5-e.H6+e.H7;s.logstr+=`heliostat-height: ${f(r)}, diameter ${f(e.D1)} m
|
|
54
|
-
`,s.logstr+=`heliostat-swing-length: ${f(e.L1)}, width ${f(e.L2)} m
|
|
55
|
-
`;const S=e.al*l/ye.sim.tMax,_=Ee(S);s.logstr+=`swing position angle: ${f(oe(_))} degree
|
|
56
|
-
`;const g=e.H1+e.H2-e.H3,d=g+e.H4+e.H5-e.H6+e.H7,L=de(He.pDef),a=de(Fe.pDef),c=de($e.pDef);if(L.setVal("H1",e.H1),L.setVal("H2",e.H2),L.setVal("D1",e.D1),L.setVal("D2",e.D2),L.setVal("E1",e.E1),L.setVal("E2",e.E1),a.setVal("H1",e.H4),a.setVal("H2",e.H5),a.setVal("D1",e.D3),a.setVal("D2",e.D4),a.setVal("L9",e.D3/2),a.setVal("E1",e.E1),a.setVal("E3",e.E1),a.setVal("D3",e.D2*.6),e.D2>e.D3-2*e.E1)throw`err153: D2 ${e.D2} too large compare to D3 ${e.D3} and E1 ${e.E1}`;if(a.setVal("H4",e.H6),a.setVal("D4",e.D5),a.setVal("L7",e.L7),a.setVal("L8",e.L8),a.setVal("D6",e.D9),a.setVal("H5",e.H7),a.setVal("D5",e.D6),a.setVal("D8",e.D7),e.D6>=e.D7)throw`err164: D6 ${e.D6} too large compare to D7 ${e.D7}`;const w=e.L4-2*e.L3;if(a.setVal("L4",w),w<=0)throw`err169: L3 ${e.L3} too large compare to L4 ${e.L4}`;if(a.setVal("L5",e.L5+2*e.L3),a.setVal("L6",e.L6+2*e.L3),a.setVal("S1",e.S1),a.setVal("S2",e.L2/2),c.setVal("L2",e.L2),c.setVal("D1",e.D6),c.setVal("H4",e.H9),c.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}`;c.setVal("H1",e.L3),c.setVal("H2",e.L3),c.setVal("L4",e.L4),c.setVal("L5",e.L5),c.setVal("L6",e.L6),c.setVal("L3",e.D7);const P=He.pGeom(0,L.getParamVal());ce(P),s.logstr+=he(P.logstr,L.partName);const I=Fe.pGeom(0,a.getParamVal());ce(I),s.logstr+=he(I.logstr,a.partName);const v=$e.pGeom(0,c.getParamVal());ce(v),s.logstr+=he(v.logstr,c.partName),n.mergeFigure(P.fig.poleCut),n.mergeFigure(I.fig.faceStopperSide.translate(0,g)),n.mergeFigure(v.fig.faceSide.translate(0,d).rotate(0,d,_)),o.mergeFigure(P.fig.poleCut),o.mergeFigure(I.fig.faceStopperFaceT.translate(0,g)),o.mergeFigure(v.fig.faceFace.translate(0,d)),i.mergeFigure(P.fig.poleBottom.translate(0,0)),i.mergeFigure(I.fig.faceStopperTop.translate(0,0)),i.mergeFigure(v.fig.faceTop.rotate(0,0,Math.PI/2)),s.fig={faceSide:n,faceFace:o,faceTop:i};const D=s.partName;s.vol={inherits:[{outName:`inpax_${D}_poleStatic`,subdesign:"pax_pole_static",subgeom:P,rotate:[0,0,0],translate:[0,0,0]},{outName:`inpax_${D}_rake`,subdesign:"pax_rake_stopper",subgeom:I,rotate:[0,0,0],translate:[0,0,g]},{outName:`inpax_${D}_swing`,subdesign:"pax_swing",subgeom:v,rotate:[Math.PI/2,0,0],translate:[0,0,d]}],extrudes:[],volumes:[{outName:`pax_${D}`,boolMethod:Z.eUnion,inList:[`inpax_${D}_poleStatic`,`inpax_${D}_rake`,`inpax_${D}_swing`]}]};const u=L.getDesignParamList(),b={partName:L.getPartName(),dparam:u,orientation:[0,0,0],position:[0,0,0]},E={partName:a.getPartName(),dparam:a.getDesignParamList(),orientation:[0,0,0],position:[0,0,g]},M={partName:c.getPartName(),dparam:c.getDesignParamList(),orientation:[0,0,0],position:[0,0,d]};s.sub={pole_static_1:b,rake_1:E,swing_1:M},s.logstr+=`heliostat-2-overview drawn successfully!
|
|
57
|
-
`,s.calcErr=!1}catch(r){s.logstr+=r,console.log(r)}return s}var Pt={pTitle:"Heliostat-2 overview",pDescription:"The heliostat-2 inclination mechanism",pDef:ye,pGeom:Et},Qe={partName:"base",params:[t("D1","mm",600,100,4e3,10),t("D2","mm",700,100,4e3,10),t("D3","mm",400,100,4e3,10),t("D4","mm",500,100,4e3,10),t("E1","mm",30,1,80,1),t("E2","mm",30,1,80,1),t("E3","mm",30,1,80,1),t("H1","mm",800,10,4e3,10),t("H2","mm",50,10,4e3,10),t("H3","mm",400,10,4e3,10),t("N2","",12,1,100,1),t("L2","mm",100,1,400,1),t("N1","",24,3,100,1),t("D5","mm",40,1,100,1),t("L1","mm",34,1,300,1)],paramSvg:{D1:"base_cut.svg",D2:"base_cut.svg",D3:"base_cut.svg",D4:"base_cut.svg",E1:"base_cut.svg",E2:"base_cut.svg",E3:"base_cut.svg",H1:"base_cut.svg",H2:"base_hollow.svg",H3:"base_hollow.svg",N2:"base_hollow.svg",L2:"base_hollow.svg",N1:"base_top.svg",D5:"base_top.svg",L1:"base_top.svg"},sim:{tMax:180,tStep:.5,tUpdate:500}};function At(l,e){let s,n,o;const i=ie(Qe.partName),r=m(),S=m(),_=m();i.logstr+=`${i.partName} simTime: ${l}
|
|
58
|
-
`;try{const g=e.D1/2,d=e.D2/2,L=e.D3/2,a=e.D4/2,c=e.D5/2,w=e.L2/2;if(d<g)throw`err089: D2 ${e.D2} too small compare to D1 ${e.D1}`;if(a>g-e.E2)throw`err189: D4 ${e.D4} too large compare to D1 ${e.D1} and E2 ${e.E2}`;if(i.logstr+=`base-height: ${f(e.H1)} mm
|
|
59
|
-
`,i.logstr+=`base-external-diameter: ${f(e.D2)} mm
|
|
60
|
-
`,s=function(h){return z(h*d,0).addSegStrokeA(h*d,e.E3).addSegStrokeA(h*g,e.E3).addSegStrokeA(h*g,e.H1).addSegStrokeA(h*(g-e.E2),e.H1).addSegStrokeA(h*(g-e.E2),e.E3).addSegStrokeA(h*a,e.E3).addSegStrokeA(h*a,0).closeSegStroke()},n=function(h){return z(h*d,0).addSegStrokeA(h*d,e.E3).addSegStrokeA(h*g,e.E3).addSegStrokeA(h*g,e.H1).addSegStrokeA(h*L,e.H1).addSegStrokeA(h*L,e.H1-e.E1).addSegStrokeA(h*(g-e.E2),e.H1-e.E1).addSegStrokeA(h*(g-e.E2),e.E3).addSegStrokeA(h*a,e.E3).addSegStrokeA(h*a,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 P=2*Math.asin(w/(g-e.E2));if(e.N2*P>2*Math.PI)throw`err132: N2 ${e.N2} too large compare to L2 ${e.L2}, D1 ${e.D1}, E2 ${e.E2}`;const I=e.E3+e.H2+w;if(o=function(h){return z(h*w,I).addSegStrokeA(h*w,I+e.H3-e.L2).addPointA(-h*w,I+e.H3-e.L2).addSegArc(w,!1,!0).addSegStrokeA(-h*w,I).closeSegArc(w,!1,!0)},r.addMain(s(1)),r.addSecond(n(1)),r.addSecond(n(-1)),r.addSecond(o(1)),L+e.L1+c>g-e.E2)throw`err127: D3 ${e.D3} too large compare to D1 ${e.D1}, E2 ${e.E2}, L1 ${e.L1}, R5 ${e.D5}`;if(c>e.L1)throw`err130: D5 ${e.D5} too large compare to L1 ${e.L1}`;const v=2*Math.asin(c/(d+e.L1));if(e.N1*v>2*Math.PI)throw`err134: N1 ${e.N1} too large compare to D5 ${e.D5}, L1 ${e.L1}, D2 ${e.D2}`;S.addMain($(0,0,g)),S.addMain($(0,0,L));const D=L+e.L1,u=2*Math.PI/e.N1;for(let h=0;h<e.N1;h++){const C=D*Math.cos(h*u),p=D*Math.sin(h*u);S.addMain($(C,p,c))}S.addSecond($(0,0,g-e.E1)),S.addSecond($(0,0,d)),S.addSecond($(0,0,a)),_.addMain(o(1)),_.addSecond(n(1)),_.addSecond(n(-1)),i.fig={faceCut:r,faceTop:S,faceHollow:_};const b=i.partName,E=2*Math.PI/e.N2,M=[...Array(e.N2).keys()],k=M.map(h=>({outName:`subpax_${b}_hollow_${h}`,face:`${b}_faceHollow`,extrudeMethod:T.eLinearOrtho,length:d+e.E2,rotate:[Math.PI/2,0,h*E],translate:[0,0,0]})),x=M.map(h=>`subpax_${b}_hollow_${h}`);i.vol={extrudes:[{outName:`subpax_${b}_cut`,face:`${b}_faceCut`,extrudeMethod:T.eRotate,rotate:[0,0,0],translate:[Math.PI/2,0,0]},{outName:`subpax_${b}_top`,face:`${b}_faceTop`,extrudeMethod:T.eLinearOrtho,length:e.E1,rotate:[0,0,0],translate:[0,0,e.H1-e.E1]},...k],volumes:[{outName:`ipax_${b}_hollows`,boolMethod:Z.eUnion,inList:[...x]},{outName:`ipax_${b}_cylinder`,boolMethod:Z.eSubstraction,inList:[`subpax_${b}_cut`,`ipax_${b}_hollows`]},{outName:`pax_${b}`,boolMethod:Z.eUnion,inList:[`ipax_${b}_cylinder`,`subpax_${b}_top`]}]},i.sub={},i.logstr+=`heliostat-base drawn successfully!
|
|
61
|
-
`,i.calcErr=!1}catch(g){i.logstr+=g,console.log(g)}return i}var Rt={pTitle:"Heliostat base",pDescription:"The base for the static-pole of the heliostat",pDef:Qe,pGeom:At},et={partName:"pole_rotor",params:[t("D1","mm",600,100,4e3,10),t("D2","mm",400,100,4e3,10),t("H1","mm",8e3,100,4e4,10),t("E1","mm",5,1,80,1),t("E2","mm",30,1,80,1),t("N1","",24,3,100,1),t("D3","mm",40,1,100,1),t("L1","mm",45,1,300,1)],paramSvg:{D1:"pole_rotor_cut.svg",D2:"pole_rotor_cut.svg",H1:"pole_rotor_cut.svg",E1:"pole_rotor_cut.svg",E2:"pole_rotor_cut.svg",N1:"pole_rotor_ends.svg",D3:"pole_rotor_ends.svg",L1:"pole_rotor_ends.svg"},sim:{tMax:180,tStep:.5,tUpdate:500}};function Nt(l,e){let s;const n=ie(et.partName),o=m(),i=m();n.logstr+=`${n.partName} simTime: ${l}
|
|
62
|
-
`;try{const r=e.D1/2,S=e.D2/2,_=e.D3/2;n.logstr+=`pole-height: ${f(e.H1)} mm
|
|
63
|
-
`;const g=z(r,0).addSegStrokeA(r,e.H1).addSegStrokeA(r-e.E1,e.H1).addSegStrokeA(r-e.E1,0).closeSegStroke();o.addMain(g),s=function(c){return z(c*r,0).addSegStrokeA(c*r,e.H1).addSegStrokeA(c*S,e.H1).addSegStrokeA(c*S,e.H1-e.E2).addSegStrokeA(c*(r-e.E1),e.H1-e.E2).addSegStrokeA(c*(r-e.E1),e.E2).addSegStrokeA(c*S,e.E2).addSegStrokeA(c*S,0).closeSegStroke()},o.addSecond(s(1)),o.addSecond(s(-1)),i.addMain($(0,0,r)),i.addMain($(0,0,S));const d=S+e.L1,L=2*Math.PI/e.N1;for(let c=0;c<e.N1;c++){const w=d*Math.cos(c*L),P=d*Math.sin(c*L);i.addMain($(w,P,_))}i.addSecond($(0,0,r-e.E1)),n.fig={faceCut:o,faceBottom:i};const a=n.partName;n.vol={extrudes:[{outName:`subpax_${a}_pole`,face:`${a}_faceCut`,extrudeMethod:T.eRotate,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${a}_bottom`,face:`${a}_faceBottom`,extrudeMethod:T.eLinearOrtho,length:e.E2,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${a}_top`,face:`${a}_faceBottom`,extrudeMethod:T.eLinearOrtho,length:e.E2,rotate:[0,0,0],translate:[0,0,e.H1-e.E2]}],volumes:[{outName:`pax_${a}`,boolMethod:Z.eUnion,inList:[`subpax_${a}_pole`,`subpax_${a}_bottom`,`subpax_${a}_top`]}]},n.sub={},n.logstr+=`pole_rotor drawn successfully!
|
|
64
|
-
`,n.calcErr=!1}catch(r){n.logstr+=r,console.log(r)}return n}var Ct={pTitle:"Heliostat pole rotor",pDescription:"The vertical axis inside the pole of an heliostat",pDef:et,pGeom:Nt},tt={partName:"rod",params:[t("L1","mm",1e4,100,4e4,10),t("L2","mm",100,2,400,1),t("L3","mm",400,10,1e3,1),t("L4","mm",600,10,1e3,1),t("H1","mm",200,5,4e3,1),t("E1","mm",2,1,80,1),t("E2","mm",10,1,80,1),t("N1","",10,2,50,1),t("N3","",2,1,20,1),t("N4","",4,1,20,1),t("R3","mm",100,1,500,1),t("D2","mm",10,1,100,1),t("L7","mm",10,1,300,1)],paramSvg:{L1:"rod_top.svg",L2:"rod_top.svg",L3:"rod_top.svg",L4:"rod_top.svg",H1:"rod_cut.svg",E1:"rod_cut.svg",E2:"rod_cut.svg",N1:"rod_top.svg",N3:"rod_top.svg",N4:"rod_top.svg",R3:"rod_top.svg",D2:"rod_plate.svg",L7:"rod_plate.svg"},sim:{tMax:180,tStep:.5,tUpdate:500}};function It(l,e){let s,n;const o=ie(tt.partName),i=m(),r=m(),S=m();o.logstr+=`${o.partName} simTime: ${l}
|
|
65
|
-
`;try{const _=e.D2/2,g=e.L3/(e.N3+1),d=e.L4/(e.N4+1);o.logstr+=`rod-length: ${f(e.L1)} mm
|
|
66
|
-
`;const L=(e.L1-e.L3)/(e.N1-1);o.logstr+=`space-length: ${f(L)} mm
|
|
67
|
-
`,s=function(E){const M=[],k=z(e.L4/2,E).addCornerRounded(e.R3).addSegStrokeA(e.L4/2,E+e.L3).addCornerRounded(e.R3).addSegStrokeA(-e.L4/2,E+e.L3).addCornerRounded(e.R3).addSegStrokeA(-e.L4/2,E).addCornerRounded(e.R3).closeSegStroke();M.push(k);for(let x=1;x<e.N3+1;x++)M.push($(e.L4/2-e.L7,E+x*g,_)),M.push($(-e.L4/2+e.L7,E+x*g,_));for(let x=1;x<e.N4+1;x++)M.push($(-e.L4/2+x*d,E+e.L7,_)),M.push($(-e.L4/2+x*d,E+e.L3-e.L7,_));return M},n=function(E,M){return z(e.L2/2,E).addSegStrokeA(e.L2/2,E+M).addSegStrokeA(-e.L2/2,E+M).addSegStrokeA(-e.L2/2,E).closeSegStroke()};const a=e.L2/2,c=e.L4/2,w=(e.L2-2*e.E1)/2,P=e.H1-e.E1,I=z(a,0).addSegStrokeA(a,e.H1).addSegStrokeA(-a,e.H1).addSegStrokeA(-a,0).closeSegStroke(),v=z(w,e.E1).addSegStrokeA(w,P).addSegStrokeA(-w,P).addSegStrokeA(-w,e.E1).closeSegStroke(),D=z(c,e.H1).addSegStrokeA(c,e.H1+e.E2).addSegStrokeA(-c,e.H1+e.E2).addSegStrokeA(-c,e.H1).closeSegStroke();i.addMain(I),i.addMain(v),i.addSecond(D),s(0).forEach(E=>r.addMain(E)),r.addSecond(n(-e.L3/2,2*e.L3));const u=(e.L1-e.L3)/(e.N1-1);for(let E=0;E<e.N1;E++)s(E*u).forEach(M=>S.addMain(M));S.addSecond(n(0,e.L1)),o.fig={faceCut:i,facePlate:r,faceTop:S};const b=o.partName;o.vol={extrudes:[{outName:`subpax_${b}_rod`,face:`${b}_faceCut`,extrudeMethod:T.eLinearOrtho,length:e.L1,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${b}_plates`,face:`${b}_faceTop`,extrudeMethod:T.eLinearOrtho,length:e.E2,rotate:[Math.PI/2,0,0],translate:[0,e.E2+e.H1,0]}],volumes:[{outName:`pax_${b}`,boolMethod:Z.eUnion,inList:[`subpax_${b}_rod`,`subpax_${b}_plates`]}]},o.sub={},o.logstr+=`heliostat-rod drawn successfully!
|
|
68
|
-
`,o.calcErr=!1}catch(_){o.logstr+=_,console.log(_)}return o}var mt={pTitle:"Heliostat rod",pDescription:"The rod of an heliostat-surface",pDef:tt,pGeom:It},st={partName:"trapeze",params:[t("L1","mm",1600,100,4e3,10),t("L2","mm",1e3,100,4e3,10),t("L3","mm",400,5,800,5),t("L4","mm",300,5,800,5),t("N1","",7,1,20,1),t("N2","",4,1,20,1),t("N3","",2,1,20,1),t("N4","",2,1,20,1),t("L5","mm",100,1,400,1),t("L6","mm",20,1,400,1),t("L7","mm",20,1,400,1),t("D1","mm",10,1,40,10),t("D2","mm",10,1,40,10),t("D3","mm",30,1,100,10),t("D4","mm",26,1,100,10),t("R1","mm",60,1,400,1),t("R2","mm",20,1,400,1),t("R3","mm",20,1,400,1),t("H1","mm",300,.5,800,.5),t("H2","mm",2,.5,800,.5),t("H3","mm",5,.5,800,.5)],paramSvg:{L1:"trapeze_top.svg",L2:"trapeze_top.svg",L3:"trapeze_top.svg",L4:"trapeze_top.svg",N1:"trapeze_top.svg",N2:"trapeze_top.svg",N3:"trapeze_top.svg",N4:"trapeze_top.svg",L5:"trapeze_top.svg",L6:"trapeze_top.svg",L7:"trapeze_top.svg",D1:"trapeze_top.svg",D2:"trapeze_top.svg",D3:"trapeze_rod.svg",D4:"trapeze_rod.svg",R1:"trapeze_top.svg",R2:"trapeze_top.svg",R3:"trapeze_top.svg",H1:"trapeze_side.svg",H2:"trapeze_side.svg",H3:"trapeze_side.svg"},sim:{tMax:180,tStep:.5,tUpdate:500}};function Vt(l,e){let s,n;const o=ie(st.partName),i=m(),r=m(),S=m(),_=m(),g=m();o.logstr+=`${o.partName} simTime: ${l}
|
|
69
|
-
`;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 d=e.R1*(1-1/Math.sqrt(2)),L=e.R3*(1-1/Math.sqrt(2)),a=e.L2/2-d-(e.L4/2-L),c=e.L1/2-d-(e.L3/2-L),w=Math.sqrt(a**2+c**2),P=e.H1-e.H2-e.H3,I=Math.sqrt(w**2+P**2),v=Math.atan2(P,w),D=Math.atan2(c,a);o.logstr+=`rod-slope: length: ${f(I)} mm, angle: ${f(oe(v))} degree
|
|
70
|
-
`,o.logstr+=`rod-xy-angle: ${f(oe(D))} degree
|
|
71
|
-
`;const u=e.D3/Math.cos(Math.PI/2-v);o.logstr+=`rod-footprint-length: ${f(u)} mm
|
|
72
|
-
`;const b=Math.sqrt((u/2)**2+(e.D3/2)**2),E=Math.atan2(e.D3,u);if(s=function(H,Q,X){return z(H,Q).addPointRP(X+Math.PI-E,b).addSeg2Arcs(X+Math.PI/2,X).addPointRP(X+Math.PI+E,b).addSeg2Arcs(X+Math.PI,X+Math.PI/2).addPointRP(X-E,b).addSeg2Arcs(X+3*Math.PI/2,X+Math.PI).addPointRP(X+E,b).addSeg2Arcs(X,X-Math.PI/2)},n=function(H,Q,X){const J=H+b*Math.cos(X+Math.PI-E),ne=Q+b*Math.sin(X+Math.PI-E);return z(J,ne).addSegStrokeRP(X+Math.PI,w).addSegStrokeRP(X-Math.PI/2,e.D3).addSegStrokeRP(X,w).closeSegStroke()},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 M=z(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 k=z(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 x=z(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);i.addMain(M),i.addMain(k),i.addSecond(x);const h=e.L1/(e.N1+1),C=e.L2/(e.N2+1),p=e.L3/(e.N3+1),A=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(p<e.D2/2+e.L7)throw`err661: D2 ${e.D2} or L7 ${e.L7} too large compare to L3 ${e.l3}`;if(A<e.D2/2+e.L7)throw`err664: D2 ${e.D2} or L7 ${e.L7} too large compare to L4 ${e.l4}`;const B=[];for(let H=1;H<e.N1+1;H++)B.push($(e.L2/2-e.L6,-e.L1/2+H*h,e.D1/2)),B.push($(-e.L2/2+e.L6,-e.L1/2+H*h,e.D1/2));for(let H=1;H<e.N2+1;H++)B.push($(-e.L2/2+H*C,e.L1/2-e.L6,e.D1/2)),B.push($(-e.L2/2+H*C,-e.L1/2+e.L6,e.D1/2));const V=[];for(let H=1;H<e.N3+1;H++)V.push($(e.L4/2-e.L7,-e.L3/2+H*p,e.D2/2)),V.push($(-e.L4/2+e.L7,-e.L3/2+H*p,e.D2/2));for(let H=1;H<e.N4+1;H++)V.push($(-e.L4/2+H*A,e.L3/2-e.L7,e.D2/2)),V.push($(-e.L4/2+H*A,-e.L3/2+e.L7,e.D2/2));B.forEach(H=>{i.addMain(H)}),V.forEach(H=>{i.addSecond(H)});const F=[];F.push(s(e.L2/2-d,e.L1/2-d,D)),F.push(s(e.L4/2-L,e.L3/2-L,D)),F.push(s(-e.L2/2+d,e.L1/2-d,Math.PI-D)),F.push(s(-e.L4/2+L,e.L3/2-L,Math.PI-D)),F.push(s(-e.L2/2+d,-e.L1/2+d,Math.PI+D)),F.push(s(-e.L4/2+L,-e.L3/2+L,Math.PI+D)),F.push(s(e.L2/2-d,-e.L1/2+d,-D)),F.push(s(e.L4/2-L,-e.L3/2+L,-D));const q=[];if(q.push(n(e.L2/2-d,e.L1/2-d,D)),q.push(n(-e.L2/2+d,e.L1/2-d,Math.PI-D)),q.push(n(-e.L2/2+d,-e.L1/2+d,Math.PI+D)),q.push(n(e.L2/2-d,-e.L1/2+d,-D)),F.forEach(H=>{i.addSecond(H)}),q.forEach(H=>{i.addSecond(H)}),r.addMain(x),V.forEach(H=>{r.addMain(H)}),r.addSecond(M),r.addSecond(k),B.forEach(H=>{r.addSecond(H)}),F.forEach(H=>{r.addSecond(H)}),q.forEach(H=>{r.addSecond(H)}),e.D4>=e.D3)throw`err218: D4 ${e.D4} larger than D3 ${e.D3}`;S.addMain($(0,0,e.D3/2)),S.addSecond($(0,0,e.D4/2)),_.addMain($(0,0,e.D4/2)),_.addSecond($(0,0,e.D3/2));const Y=e.D3*Math.cos(v),j=Y/Math.tan(v),K=L+(u/2+j)*Math.cos(D),te=L+(u/2+j)*Math.sin(D),G=I+2*(u+j+Y),y=G+e.L3+e.L4+Y,O=z(y,y).addSegStrokeA(-y,y).addSegStrokeA(-y,-y).addSegStrokeA(y,-y).closeSegStroke();g.addMain(O),o.fig={faceFrame:i,facePlate:r,faceRod:S,faceRodHollow:_,faceCutRod:g};const R=o.partName;o.vol={extrudes:[{outName:`subpax_${R}_frame`,face:`${R}_faceFrame`,extrudeMethod:T.eLinearOrtho,length:e.H2,rotate:[0,0,0],translate:[0,0,e.H1-e.H2]},{outName:`subpax_${R}_plate`,face:`${R}_facePlate`,extrudeMethod:T.eLinearOrtho,length:e.H3,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${R}_rod1`,face:`${R}_faceRod`,extrudeMethod:T.eLinearOrtho,length:G,rotate:[0,Math.PI/2-v,D],translate:[e.L4/2-K,e.L3/2-te,e.H3-Y]},{outName:`subpax_${R}_rod2`,face:`${R}_faceRod`,extrudeMethod:T.eLinearOrtho,length:G,rotate:[0,Math.PI/2-v,Math.PI-D],translate:[-e.L4/2+K,e.L3/2-te,e.H3-Y]},{outName:`subpax_${R}_rod3`,face:`${R}_faceRod`,extrudeMethod:T.eLinearOrtho,length:G,rotate:[0,Math.PI/2-v,Math.PI+D],translate:[-e.L4/2+K,-e.L3/2+te,e.H3-Y]},{outName:`subpax_${R}_rod4`,face:`${R}_faceRod`,extrudeMethod:T.eLinearOrtho,length:G,rotate:[0,Math.PI/2-v,-D],translate:[e.L4/2-K,-e.L3/2+te,e.H3-Y]},{outName:`subpax_${R}_rodH1`,face:`${R}_faceRodHollow`,extrudeMethod:T.eLinearOrtho,length:G,rotate:[0,Math.PI/2-v,D],translate:[e.L4/2-K,e.L3/2-te,e.H3-Y]},{outName:`subpax_${R}_rodH2`,face:`${R}_faceRodHollow`,extrudeMethod:T.eLinearOrtho,length:G,rotate:[0,Math.PI/2-v,Math.PI-D],translate:[-e.L4/2+K,e.L3/2-te,e.H3-Y]},{outName:`subpax_${R}_rodH3`,face:`${R}_faceRodHollow`,extrudeMethod:T.eLinearOrtho,length:G,rotate:[0,Math.PI/2-v,Math.PI+D],translate:[-e.L4/2+K,-e.L3/2+te,e.H3-Y]},{outName:`subpax_${R}_rodH4`,face:`${R}_faceRodHollow`,extrudeMethod:T.eLinearOrtho,length:G,rotate:[0,Math.PI/2-v,-D],translate:[e.L4/2-K,-e.L3/2+te,e.H3-Y]},{outName:`subpax_${R}_cut1`,face:`${R}_faceCutRod`,extrudeMethod:T.eLinearOrtho,length:y,rotate:[0,0,0],translate:[0,0,-y]},{outName:`subpax_${R}_cut2`,face:`${R}_faceCutRod`,extrudeMethod:T.eLinearOrtho,length:y,rotate:[0,0,0],translate:[0,0,e.H1]}],volumes:[{outName:`ipax_${R}_rawRod`,boolMethod:Z.eUnion,inList:[`subpax_${R}_rod1`,`subpax_${R}_rod2`,`subpax_${R}_rod3`,`subpax_${R}_rod4`]},{outName:`ipax_${R}_rodHollow`,boolMethod:Z.eUnion,inList:[`subpax_${R}_rodH1`,`subpax_${R}_rodH2`,`subpax_${R}_rodH3`,`subpax_${R}_rodH4`]},{outName:`ipax_${R}_halfRods`,boolMethod:Z.eSubstraction,inList:[`ipax_${R}_rawRod`,`subpax_${R}_cut1`]},{outName:`ipax_${R}_rods`,boolMethod:Z.eSubstraction,inList:[`ipax_${R}_halfRods`,`subpax_${R}_cut2`]},{outName:`ipax_${R}_plus`,boolMethod:Z.eUnion,inList:[`subpax_${R}_frame`,`subpax_${R}_plate`,`ipax_${R}_rods`]},{outName:`pax_${R}`,boolMethod:Z.eSubstraction,inList:[`ipax_${R}_plus`,`ipax_${R}_rodHollow`]}]},o.sub={},o.logstr+=`trapeze drawn successfully!
|
|
73
|
-
`,o.calcErr=!1}catch(d){o.logstr+=d,console.log(d)}return o}var Ft={pTitle:"Heliostat trapeze",pDescription:"The support of one solar panel. Made out of aluminium for lightness and cooling",pDef:st,pGeom:Vt},ot={partName:"surface",params:[t("LH","mm",1600,100,4e3,1),t("LV","mm",1e3,100,4e3,1),t("LZ","mm",40,0,100,1),t("nx","",9,1,40,1),t("ny","",9,1,40,1),we("main_direction",["horizontal","vertical"]),re("crenel",!1),t("first_row","",9,1,40,1),t("second_row","",9,1,40,1),t("EH","mm",10,0,1e3,1),re("EH_gradient",!1),t("EH_sup","mm",500,0,1e3,1),t("EH_cycle","",1,0,3,.05),t("EH_start","",0,0,1,.05),we("EH_shape",["sinusoid","triangle","sawUp","sawDown"]),t("EV","mm",10,0,1e3,1),re("EV_gradient",!1),t("EV_sup","mm",500,0,1e3,1),t("EV_cycle","",1,0,3,.05),t("EV_start","",0,0,1,.05),we("EV_shape",["sinusoid","triangle","sawUp","sawDown"]),t("power_efficiency","%",16,0,100,.1),t("solar_power","W/m2",816,100,2e3,1)],paramSvg:{LH:"surface_main.svg",LV:"surface_main.svg",LZ:"surface_lz.svg",nx:"surface_main.svg",ny:"surface_main.svg",main_direction:"surface_crenel.svg",crenel:"surface_crenel.svg",first_row:"surface_extremities.svg",second_row:"surface_extremities.svg",EH:"surface_main.svg",EH_gradient:"surface_space_evolution.svg",EH_sup:"surface_space_evolution.svg",EH_cycle:"surface_space_evolution.svg",EH_start:"surface_space_evolution.svg",EH_shape:"surface_space_shape.svg",EV:"surface_main.svg",EV_gradient:"surface_space_evolution.svg",EV_sup:"surface_space_evolution.svg",EV_cycle:"surface_space_evolution.svg",EV_start:"surface_space_evolution.svg",EV_shape:"surface_space_shape.svg",power_efficiency:"surface_power.svg",solar_power:"surface_power.svg"},sim:{tMax:180,tStep:.5,tUpdate:500}};function yt(l,e){let s;const n=ie(ot.partName),o=m(),i=m();n.logstr+=`${n.partName} simTime: ${l}
|
|
74
|
-
`;try{const r=e.LH*e.LV/1e6,S=e.solar_power*r*e.power_efficiency/100;n.logstr+=`panel surface: ${f(r)} m2
|
|
75
|
-
`,n.logstr+=`panel power: ${f(S)} W
|
|
76
|
-
`;const _=e.nx*e.ny;n.logstr+=`max panel number: ${_}
|
|
77
|
-
`,n.logstr+=`max panel surface: ${f(_*r)} m2
|
|
78
|
-
`,n.logstr+=`max panel power: ${f(_*S)} W
|
|
79
|
-
`;const g=e.main_direction===1?e.ny:e.nx,d=e.main_direction===1?e.nx:e.ny,L=e.main_direction===1?e.EV:e.EH,a=e.main_direction===1?e.EV_gradient:e.EH_gradient,c=e.main_direction===1?e.EV_sup:e.EH_sup,w=e.main_direction===1?e.EV_cycle:e.EH_cycle,P=e.main_direction===1?e.EV_start:e.EH_start,I=e.main_direction===1?e.EV_shape:e.EH_shape,v=e.main_direction===0?e.EV:e.EH,D=e.main_direction===0?e.EV_gradient:e.EH_gradient,u=e.main_direction===0?e.EV_sup:e.EH_sup,b=e.main_direction===0?e.EV_cycle:e.EH_cycle,E=e.main_direction===0?e.EV_start:e.EH_start,M=e.main_direction===0?e.EV_shape:e.EH_shape,k=[];for(let y=0;y<g;y++){const O=(y+1)%2,R=e.crenel?d-O:d;k.push(R)}k[0]=e.first_row,k[k.length-1]=e.first_row,g>2&&(k[1]=e.second_row,k[k.length-2]=e.second_row);let x=0;k.forEach(y=>{x+=y}),n.logstr+=`actual panel number: ${x} (${f(100*x/_)} %)
|
|
80
|
-
`,n.logstr+=`actual panel surface: ${f(x*r)} m2
|
|
81
|
-
`,n.logstr+=`actual panel power: ${f(x*S)} W
|
|
82
|
-
`;const h=[];for(let y=0;y<g-1;y++){let O=L;if(a===1){const R=g>2?g-2:1,H=(P+y*w/R)%1;switch(I){case 0:O+=c*(1-Math.cos(H*2*Math.PI))/2;break;case 1:O+=c*(1-2*Math.abs(H-.5));break;case 2:O+=c*H;break;case 3:O+=c*(1-H);break;default:O+=c}}h.push(O)}let C=0;const p=[];p.push(0),h.forEach(y=>{C+=y,p.push(C)});const A=[];for(let y=0;y<d-1;y++){let O=v;if(D===1){const R=d>2?d-2:1,H=(E+y*b/R)%1;switch(M){case 0:O+=u*(1-Math.cos(H*2*Math.PI))/2;break;case 1:O+=u*(1-2*Math.abs(H-.5));break;case 2:O+=u*H;break;case 3:O+=u*(1-H);break;default:O+=u}}A.push(O)}let B=0;const V=[];V.push(0),A.forEach(y=>{B+=y,V.push(B)});let F=0,q=0;e.main_direction===0?(F=g*e.LH+C,q=d*e.LV+B):(F=d*e.LH+B,q=g*e.LV+C);const Y=F*q/10**6;n.logstr+=`global horizontal width: ${f(F/1e3)} m
|
|
83
|
-
`,n.logstr+=`global vertical height: ${f(q/1e3)} m
|
|
84
|
-
`,n.logstr+=`global area: ${f(Y)} m2
|
|
85
|
-
`,n.logstr+=`area efficiency: ${f(100*x*r/Y)} %
|
|
86
|
-
`;const j=-F/2,K=-q/2;s=function(y,O){return z(y,O).addSegStrokeA(y+e.LH,O).addSegStrokeA(y+e.LH,O+e.LV).addSegStrokeA(y,O+e.LV).closeSegStroke()};const te=[];k.forEach((y,O)=>{const R=(d-y)%2,H=Math.floor((d-y)/2);for(let Q=0;Q<y;Q++){let X=0,J=0;e.main_direction===0?(X=j+O*e.LH+p[O],J=K+(H+Q)*e.LV+V[H+Q],R===1&&(J+=(e.LV+V[H+Q+1]-V[H+Q])/2)):(J=K+O*e.LV+p[O],X=j+(H+Q)*e.LH+V[H+Q],R===1&&(X+=(e.LH+V[H+Q+1]-V[H+Q])/2)),te.push([X,J])}});for(const y of te)o.addMain(s(y[0],y[1]));i.addMain(s(0,0)),n.fig={faceSurface:o,faceOnePanel:i};const G=n.partName;n.vol={extrudes:te.map((y,O)=>({outName:`subpax_${G}_panel_${O}`,face:`${G}_faceOnePanel`,extrudeMethod:T.eLinearOrtho,length:e.LZ,rotate:[0,0,0],translate:[y[0],y[1],0]})),volumes:[{outName:`pax_${G}`,boolMethod:Z.eUnion,inList:te.map((y,O)=>`subpax_${G}_panel_${O}`)}]},n.sub={},n.logstr+=`panel-surface drawn successfully!
|
|
87
|
-
`,n.calcErr=!1}catch(r){n.logstr+=r,console.log(r)}return n}var Tt={pTitle:"Heliostat panel-surface",pDescription:"The surface collecting the solar power",pDef:ot,pGeom:yt};const it={"gear/gear_wheel_wheel":Ce,"gear/simplified_gear_wheel":bt,"heliostat/heliostat":xt,"heliostat/heliostat_2":Pt,"heliostat/base":Rt,"heliostat/pole_static":He,"heliostat/pole_rotor":Ct,"heliostat/rake":De,"heliostat/rake_stopper":Fe,"heliostat/spider":me,"heliostat/swing":$e,"heliostat/rod":mt,"heliostat/trapeze":Ft,"heliostat/surface":Tt};function Ot(l){const e=/^.*\//g;return l.replace(e,"")}function pt(l){const e={};for(const s of Object.keys(l)){const n=Ot(s);e[n]=`/${s}`}return e}function zt(l){const e=[];for(const s of Object.keys(l))e.push(s);return e}const Wt=pt(it),qt=zt(it);export{it as a,Wt as b,qt as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var s;const a=((s=globalThis.__sveltekit_137rst3)==null?void 0:s.base)??"";var t;const e=((t=globalThis.__sveltekit_137rst3)==null?void 0:t.assets)??a;export{e as a,a as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as t}from"../chunks/entry.Um3CRfq-.js";export{t as start};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{s as W,y as G,e as p,a as T,c as h,l as L,g as $,b as O,f as a,m as E,i as u,h as H,z as J,A as K,B as Q,o as U,t as X,d as Y,n as Z}from"../chunks/scheduler.pWaib8rK.js";import{S as ee,i as te,a as se,t as le}from"../chunks/index.DzDRugVt.js";import{e as q,v as ie}from"../chunks/index.sDAnq9IB.js";import{b as ne}from"../chunks/paths.DoNOjTtI.js";const ae=!0,xe=Object.freeze(Object.defineProperty({__proto__:null,prerender:ae},Symbol.toStringTag,{value:"Module"})),re="designix-ui",oe="0.5.5",ce={cp_pgdsvg:"shx cp -r ../../node_modules/designix/dist/pgdsvg static/",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:"shx rm -fr .svelte-kit build node_modules static/pgdsvg"},ve={designix:"^0.5.17",geometrix:"^0.5.16",geomui:"^0.5.18"},ue={"@sveltejs/adapter-auto":"^3.1.1","@sveltejs/adapter-static":"^3.0.1","@sveltejs/kit":"^2.5.0","@sveltejs/vite-plugin-svelte":"^3.0.2","@typescript-eslint/eslint-plugin":"^7.0.1","@typescript-eslint/parser":"^7.0.1",eslint:"^8.56.0","eslint-config-prettier":"^9.1.0","eslint-plugin-svelte":"^2.35.1","npm-run-all":"^4.1.5",prettier:"^3.2.5","prettier-plugin-svelte":"^3.2.1",sass:"^1.71.0",shx:"^0.3.4",svelte:"^4.2.11","svelte-check":"^3.6.4",tslib:"^2.6.2",typescript:"^5.3.3",vite:"^5.1.3",vitest:"^1.3.0"},pe="module",he={name:re,version:oe,private:!0,scripts:ce,dependencies:ve,devDependencies:ue,type:pe};function F(c,l,v){const r=c.slice();return r[3]=l[v],r}function V(c){let l=c[3]+"",v,r;return{c(){v=X(l),r=p("br")},l(s){v=Y(s,l),r=h(s,"BR",{})},m(s,_){u(s,v,_),u(s,r,_)},p:Z,d(s){s&&(a(v),a(r))}}}function fe(c){let l,v="Welcome to designix-ui",r,s,_=`Showcasing the usage of the <a href="https://svelte.dev/">svelte</a> library
|
|
2
|
-
<a href="https://www.npmjs.com/">geomui</a>.`,m,d,I=`<a href="${`${ne}/`}" class="svelte-1v6hyjg">index: list of designs</a>`,M,g,A,f,b,B=`<a href="https://github.com/charlyoleg2/parametrix">designix-ui</a>, a minimalist showcase
|
|
3
|
-
of
|
|
4
|
-
<a href="https://www.npmjs.com/">geomui</a>.`,S,y,w,N="Designix-ui version",z,j,k;const D=c[2].default,o=G(D,c,c[1],null);let C=q(c[0]),i=[];for(let e=0;e<C.length;e+=1)i[e]=V(F(c,C,e));return{c(){l=p("h1"),l.textContent=v,r=T(),s=p("h6"),s.innerHTML=_,m=T(),d=p("nav"),d.innerHTML=I,M=T(),g=p("main"),o&&o.c(),A=T(),f=p("footer"),b=p("article"),b.innerHTML=B,S=T(),y=p("article"),w=p("h3"),w.textContent=N,z=T(),j=p("code");for(let e=0;e<i.length;e+=1)i[e].c();this.h()},l(e){l=h(e,"H1",{class:!0,"data-svelte-h":!0}),L(l)!=="svelte-1ow6r3d"&&(l.textContent=v),r=$(e),s=h(e,"H6",{class:!0,"data-svelte-h":!0}),L(s)!=="svelte-7mn22s"&&(s.innerHTML=_),m=$(e),d=h(e,"NAV",{class:!0,"data-svelte-h":!0}),L(d)!=="svelte-ww4mf0"&&(d.innerHTML=I),M=$(e),g=h(e,"MAIN",{class:!0});var n=O(g);o&&o.l(n),n.forEach(a),A=$(e),f=h(e,"FOOTER",{class:!0});var t=O(f);b=h(t,"ARTICLE",{"data-svelte-h":!0}),L(b)!=="svelte-1pwhz7h"&&(b.innerHTML=B),S=$(t),y=h(t,"ARTICLE",{});var x=O(y);w=h(x,"H3",{"data-svelte-h":!0}),L(w)!=="svelte-18yz28i"&&(w.textContent=N),z=$(x),j=h(x,"CODE",{});var P=O(j);for(let R=0;R<i.length;R+=1)i[R].l(P);P.forEach(a),x.forEach(a),t.forEach(a),this.h()},h(){E(l,"class","svelte-1v6hyjg"),E(s,"class","svelte-1v6hyjg"),E(d,"class","svelte-1v6hyjg"),E(g,"class","svelte-1v6hyjg"),E(f,"class","svelte-1v6hyjg")},m(e,n){u(e,l,n),u(e,r,n),u(e,s,n),u(e,m,n),u(e,d,n),u(e,M,n),u(e,g,n),o&&o.m(g,null),u(e,A,n),u(e,f,n),H(f,b),H(f,S),H(f,y),H(y,w),H(y,z),H(y,j);for(let t=0;t<i.length;t+=1)i[t]&&i[t].m(j,null);k=!0},p(e,[n]){if(o&&o.p&&(!k||n&2)&&J(o,D,e,e[1],k?Q(D,e[1],n,null):K(e[1]),null),n&1){C=q(e[0]);let t;for(t=0;t<C.length;t+=1){const x=F(e,C,t);i[t]?i[t].p(x,n):(i[t]=V(x),i[t].c(),i[t].m(j,null))}for(;t<i.length;t+=1)i[t].d(1);i.length=C.length}},i(e){k||(se(o,e),k=!0)},o(e){le(o,e),k=!1},d(e){e&&(a(l),a(r),a(s),a(m),a(d),a(M),a(g),a(A),a(f)),o&&o.d(e),U(i,e)}}}function de(c,l,v){let{$$slots:r={},$$scope:s}=l;const _=ie(he);return c.$$set=m=>{"$$scope"in m&&v(1,s=m.$$scope)},[_,s,r]}class be extends ee{constructor(l){super(),te(this,l,de,fe,W,{})}}export{be as component,xe as universal};
|