designix-uis 0.5.11 → 0.5.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/designix-uis.js +1 -1
- package/dist/public/_app/immutable/chunks/{entry.Mk9zao6D.js → entry.C4951nZh.js} +1 -1
- package/dist/public/_app/immutable/chunks/{index.BhqJUW2k.js → index.BLMsg5xO.js} +10 -10
- package/dist/public/_app/immutable/chunks/makeList.DKwXmwFM.js +120 -0
- package/dist/public/_app/immutable/chunks/paths.QvzrzhsY.js +1 -0
- package/dist/public/_app/immutable/chunks/{stores.DmnzQxN5.js → stores.uTVXrRrW.js} +1 -1
- package/dist/public/_app/immutable/entry/{app.DLhmdrki.js → app.CQ6AfplY.js} +2 -2
- package/dist/public/_app/immutable/entry/start.DeagCbWK.js +1 -0
- package/dist/public/_app/immutable/nodes/{0.CtrJRj8W.js → 0.C3doLACb.js} +3 -3
- package/dist/public/_app/immutable/nodes/{1.yKwlJxSD.js → 1.DYIDxyJ3.js} +1 -1
- package/dist/public/_app/immutable/nodes/{2.Bu71v6v2.js → 2.CAXp-Gzo.js} +1 -1
- package/dist/public/_app/immutable/nodes/{3.9UMbdbPU.js → 3.DfRoywN1.js} +11 -11
- package/dist/public/_app/version.json +1 -1
- package/dist/public/gear/gear_wheel_wheel.html +13 -13
- package/dist/public/gear/simplified_gear_wheel.html +13 -13
- package/dist/public/heliostat/base.html +13 -13
- package/dist/public/heliostat/haxis_guidance.html +13 -13
- package/dist/public/heliostat/heliostat.html +24 -16
- package/dist/public/heliostat/heliostat_2.html +24 -16
- package/dist/public/heliostat/pole_static.html +13 -13
- package/dist/public/heliostat/rake.html +17 -13
- package/dist/public/heliostat/rake_stopper.html +17 -13
- package/dist/public/heliostat/ring.html +13 -13
- package/dist/public/heliostat/ring_guidance.html +13 -13
- package/dist/public/heliostat/rod.html +13 -13
- package/dist/public/heliostat/spider.html +13 -13
- package/dist/public/heliostat/surface.html +13 -13
- package/dist/public/heliostat/swing.html +17 -13
- package/dist/public/heliostat/trapeze.html +13 -13
- package/dist/public/heliostat/vaxis.html +13 -13
- package/dist/public/heliostat/vaxis_guidance.html +13 -13
- package/dist/public/heliostat/vaxis_holder.html +13 -13
- package/dist/public/index.html +11 -11
- package/package.json +1 -1
- package/dist/public/_app/immutable/chunks/makeList.CUvxGnF_.js +0 -112
- package/dist/public/_app/immutable/chunks/paths.Bt5V8XwN.js +0 -1
- package/dist/public/_app/immutable/entry/start.C4Stv86S.js +0 -1
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
var St=Object.defineProperty;var Lt=(s,e,u)=>e in s?St(s,e,{enumerable:!0,configurable:!0,writable:!0,value:u}):s[e]=u;var z=(s,e,u)=>(Lt(s,typeof e!="symbol"?e+"":e,u),u);import{p as t,a as q,b as fe,c as ve,i as he,d as Me,f as H,g as G,E as W,h as ne,j as Se,k as Le,l as He,m as $,n as le,t as Je,r as re,o as F,q as xe,s as B,u as ae,v as Ie,w as Be,x as ze,S as ke,y as Ht}from"./index.BhqJUW2k.js";var Dt=class{constructor(s,e,u,o,i){z(this,"base_center_x");z(this,"base_center_y");z(this,"base_radius");z(this,"initial_angle");z(this,"right_nleft");this.base_center_x=s,this.base_center_y=e,this.base_radius=u,this.initial_angle=o,this.right_nleft=i}angleSign(){return this.right_nleft?1:-1}lFromU(s){return this.base_radius*Math.sqrt(1+s**2)}wFromU(s){if(s<0)throw`err729: involute parameter au ${s} is negative`;if(Math.abs(s)>Math.PI/2)throw`err730: involute parameter au ${s} is larger than PI/2`;return this.angleSign()*(s-Math.atan(s))}w2FromU(s){return this.initial_angle+this.wFromU(s)}ptc(s){const e=this.lFromU(s),u=this.w2FromU(s),o=this.base_center_x+Math.cos(u)*e,i=this.base_center_y+Math.sin(u)*e;return[o,i]}ptcta(s){return this.initial_angle+this.angleSign()*s}uFromL(s){return Math.sqrt(s**2/this.base_radius**2-1)}uFromWslow(s){let u=Math.PI/3,o=u/2,i=this.wFromU(u),a=0;for(;Math.abs(i-s)>1e-4;)i<s?u+=o:u-=o,i=this.wFromU(u),o=o/2,a+=1;return console.log(`dbg072: uFromWslow itcnt ${a}`),u}laptc(s,e,u,o){if(Math.sign(e)*this.angleSign()<0)throw`err904: Invole.laptc angle-of-pressure ${e} not compatible with right_nleft ${this.right_nleft}`;const i=s+e,a=this.base_center_x+Math.cos(i)*this.base_radius,n=this.base_center_y+Math.sin(i)*this.base_radius,c=i-this.angleSign()*Math.PI/2,d=u*this.base_radius,r=a+Math.cos(c)*d,h=n+Math.sin(c)*d,g=this.lFromU(u)*o,l=u,f=Math.cos(l)*g,S=Math.sin(l)*g;return[r,h,f,S]}};function we(s,e,u,o,i){return new Dt(s,e,u,o,i)}var Pt=class{constructor(){z(this,"mod",1);z(this,"TN",23);z(this,"as",1);z(this,"cx",0);z(this,"cy",0);z(this,"brr",50);z(this,"blr",50);z(this,"ar",54);z(this,"pr",53);z(this,"dr",52);z(this,"br",51);z(this,"bRound",1);z(this,"adt",.5);z(this,"initAngle",0);z(this,"axisAngle",0);z(this,"involArcPairs",1);z(this,"skinThickness",0);z(this,"involuteR",we(0,0,50,0,!0));z(this,"involuteL",we(0,0,50,0,!1));z(this,"rud",0);z(this,"rup",0);z(this,"rua",0);z(this,"rwd",0);z(this,"rwp",0);z(this,"rwa",0);z(this,"lud",0);z(this,"lup",0);z(this,"lua",0);z(this,"lwd",0);z(this,"lwp",0);z(this,"lwa",0);z(this,"msg");z(this,"initStep",0);this.mod=1,this.msg="",this.initStep=0}incInitStep(s){if(this.initStep+1!==s)throw`err834: incInitStep initStep ${this.initStep} and target ${s} are not compatible`;this.initStep=s}checkInitStep(s,e){if(this.initStep<s)throw`err835: checkInitStep for ${e} initStep ${this.initStep} is too small compare to targetMin ${s}`}set1ModuleToothNumber(s,e){this.incInitStep(1),this.mod=s,this.TN=e,this.pr=this.mod*this.TN/2,this.as=2*Math.PI/this.TN}set2CenterPosition(s,e){this.incInitStep(2),this.cx=s,this.cy=e}set3CircleRadius(s,e,u,o){this.incInitStep(3),this.ar=this.pr+this.mod*s,this.dr=this.pr-this.mod*e,this.br=this.dr-this.mod*u,this.bRound=o}set4BaseCircles(s,e){this.incInitStep(4),this.brr=s,this.blr=e}set5AddendumThickness(s){this.incInitStep(5),this.adt=s/100}set6Angles(s,e){this.incInitStep(6),this.initAngle=s,this.axisAngle=e}set7InvoluteDetails(s,e){this.incInitStep(7),this.involArcPairs=s,this.skinThickness=e}getRefCircles(){return this.checkInitStep(4,"getRefCircles"),[$(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=we(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=we(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 s=this.as*this.adt,e=this.rwa-this.rwp,u=Math.abs(this.lwa-this.lwp),o=s-e-u;if(o<0)throw`err554: No remaining Addendum reserve ${H(o)}
|
|
2
|
-
`;const i=this.as*(1-this.adt),a=this.rwp-this.rwd,n=Math.abs(this.lwp-this.lwd),c=i-a-n;if(c<2*Math.atan2(this.bRound,this.br))throw`err555: No remaining Dedendum reserve ${H(c)} compare to bRound ${H(this.bRound)}
|
|
3
|
-
`}getToothRef(){const s=6*this.involArcPairs,e=0;this.checkInitStep(7,"getProfile"),this.calcInvoluteAngles();const u=(this.rua-this.rud)/s,o=(this.lua-this.lud)/s,i=this.initAngle+e*this.as,a=we(this.cx,this.cy,this.brr,i-this.rwp,!0),[n,c]=a.ptc(this.rud+0*u),d=G(n,c,"Gold");for(let _=0;_<s;_++){const[g,l]=a.ptc(this.rud+(_+1)*u);d.addSegStrokeA(g,l)}const r=i+this.as*this.adt,h=we(this.cx,this.cy,this.blr,r-this.lwp,!1);for(let _=0;_<s+1;_++){const[g,l]=h.ptc(this.lud+(s-_)*o);d.addSegStrokeA(g,l)}return d.closeSegStroke(),d}getProfile(){this.checkInitStep(7,"getProfile"),this.calcInvoluteAngles(),this.checkProfileConditions();const s=this.rwd-this.rwp,e=this.lwd-this.lwp,u=this.dr>this.brr?this.dr:this.brr,o=this.dr>this.blr?this.dr:this.blr;if(this.bRound>u-this.br)throw`err409: getProfile bRound ${H(this.bRound)} too large for erdr ${H(u)} and br ${H(this.br)}`;if(this.bRound>o-this.br)throw`err408: getProfile bRound ${H(this.bRound)} too large for eldr ${H(o)} and br ${H(this.br)}`;const i=(this.rua-this.rud)/this.involArcPairs,a=(this.lua-this.lud)/this.involArcPairs,n=le(this.cx,this.cy),c=n.translatePolar(this.initAngle+s,this.br),d=G(c.cx,c.cy);for(let r=0;r<this.TN;r++){const h=this.initAngle+r*this.as,_=n.translatePolar(h+s,this.br);d.addSegStrokeA(_.cx,_.cy).addCornerRounded(this.bRound);const g=we(this.cx,this.cy,this.brr,h-this.rwp,!0),[l,f]=g.ptc(this.rud),S=g.ptcta(this.rud),P=le(l,f).translatePolar(S-Math.PI/2,this.skinThickness);d.addSegStrokeA(P.cx,P.cy);for(let M=0;M<this.involArcPairs;M++){const T=this.rud+M*i,[E,y]=g.ptc(T+i),Y=g.ptcta(T),X=g.ptcta(T+i)+Math.PI,k=le(E,y).translatePolar(Y-Math.PI/2,this.skinThickness);d.addPointA(k.cx,k.cy).addSeg2Arcs(Y,X)}const C=h+this.as*this.adt,v=we(this.cx,this.cy,this.blr,C-this.lwp,!1),x=this.lud+this.involArcPairs*a,[N,b]=v.ptc(x),D=v.ptcta(x)+Math.PI,L=le(N,b).translatePolar(D-Math.PI/2,this.skinThickness);d.addSegStrokeA(L.cx,L.cy);for(let M=0;M<this.involArcPairs;M++){const T=this.lud+(this.involArcPairs-M)*a,[E,y]=v.ptc(T-a),Y=v.ptcta(T)+Math.PI,X=v.ptcta(T-a),k=le(E,y).translatePolar(Y-Math.PI/2,this.skinThickness);d.addPointA(k.cx,k.cy).addSeg2Arcs(Y,X)}const w=n.translatePolar(C+e,this.br);d.addSegStrokeA(w.cx,w.cy).addCornerRounded(this.bRound)}return d.closeSegStroke(),d}getMsg(){return this.msg}};function je(){return new Pt}function xt(s,e,u,o){s.checkInitStep(1,"helper.gw2center-1"),e.checkInitStep(1,"helper.gw2center-2");const i=s.pr+e.pr+o,a=s.cx+i*Math.cos(u),n=s.cy+i*Math.sin(u);return[a,n,i]}function vt(s,e,u,o,i,a,n,c,d){s.checkInitStep(3,"helper.baseCircles-1"),e.checkInitStep(3,"helper.baseCircles-2");let r=u,h=i,_=o,g=a;const l=c,f=d;return l===0&&(e.TN>s.TN?(r=s.dr,h=r*e.TN/s.TN):(h=e.dr,r=h*s.TN/e.TN)),f===0&&(e.TN>s.TN?(_=s.dr,g=_*e.TN/s.TN):(g=e.dr,_=g*s.TN/e.TN)),n===1&&(_=r,g=h),[r,_,h,g]}var $t=class{constructor(s,e,u,o,i,a){z(this,"gw1");z(this,"gw2");z(this,"initAngle1");z(this,"angleCenterCenter");z(this,"interAxis");z(this,"rightLeftCenter2");z(this,"msg");z(this,"apr");z(this,"apl");z(this,"lBDr",0);z(this,"lBDl",0);z(this,"laStartRr1",0);z(this,"laStartRr2",0);z(this,"laStartRl1",0);z(this,"laStartRl2",0);z(this,"aFODr1",0);z(this,"aFODr2",0);z(this,"aFODl1",0);z(this,"aFODl2",0);z(this,"lasr1",0);z(this,"lasr2",0);z(this,"lasl1",0);z(this,"lasl2",0);z(this,"firstToothUr1",0);z(this,"firstToothUl1",0);z(this,"ftdr1",0);z(this,"ftdl1",0);this.gw1=s,this.gw2=e,this.initAngle1=u,this.angleCenterCenter=o,this.interAxis=i,this.rightLeftCenter2=a,this.msg="",this.apr=0,this.apl=0}check1(){this.gw1.checkInitStep(4,"ActionLine.check1-1"),this.gw2.checkInitStep(4,"ActionLine.check1-2"),this.interAxis>this.gw1.ar+this.gw2.ar&&(this.msg+=`warn333: initAngle2 interAxis ${H(this.interAxis)} is too large compare to gw1.ar ${H(this.gw1.ar)} and gw2.ar ${H(this.gw2.ar)}
|
|
4
|
-
`),ae(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} = ${H(this.gw1.TN/this.gw2.TN)} and brr1/brr2 = ${H(this.gw1.brr)}/${H(this.gw2.brr)} = ${H(this.gw1.brr/this.gw2.brr)}
|
|
5
|
-
`),ae(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} = ${H(this.gw1.TN/this.gw2.TN)} and blr1/blr2 = ${H(this.gw1.blr)}/${H(this.gw2.blr)} = ${H(this.gw1.blr/this.gw2.blr)}
|
|
6
|
-
`)}check2(){this.gw1.checkInitStep(5,"ActionLine.check2-1"),this.gw2.checkInitStep(5,"ActionLine.check2-2"),ae(this.gw1.adt+this.gw2.adt-1)>0&&(this.msg+=`warn281: addendum thickness too large: adt1 ${H(this.gw1.adt)} adt2 ${H(this.gw2.adt)}
|
|
7
|
-
`);const s=this.gw1.ar-this.gw1.pr,e=this.gw1.pr-this.gw1.dr,u=this.gw2.ar-this.gw2.pr,o=this.gw2.pr-this.gw2.dr;ae(o-s)<0&&(this.msg+=`warn282: addendum-1 ${H(s)} larger than dedendum-2 ${H(o)}
|
|
8
|
-
`),ae(e-u)<0&&(this.msg+=`warn283: addendum-2 ${H(u)} larger than dedendum-1 ${H(e)}
|
|
9
|
-
`)}calcActionLine(){this.gw1.checkInitStep(4,"ActionLine.calcActionLine-1"),this.gw2.checkInitStep(4,"ActionLine.calcActionLine-2"),this.gw1.calcInvoluteAngles(),this.gw2.calcInvoluteAngles();const s=this.interAxis*this.gw1.brr/(this.gw1.brr+this.gw2.brr),e=this.interAxis*this.gw1.blr/(this.gw1.blr+this.gw2.blr),u=this.interAxis-s,o=this.interAxis-e;this.apr=Math.acos((this.gw1.brr+this.gw2.brr)/this.interAxis),this.apl=Math.acos((this.gw1.blr+this.gw2.blr)/this.interAxis),this.msg+=`Pressure angular: right: ${H(re(this.apr))} left: ${H(re(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: ${H(this.lBDr)} left: ${H(this.lBDl)} mm
|
|
11
|
-
`;const i=Math.PI/2+this.apr,a=Ie(this.gw1.ar,s,i);this.aFODr1=Math.PI-i-a;const n=this.gw1.rua-this.apr-this.gw1.rwa;if(ae(this.aFODr1-n)!==0)throw`dbg378: aFODr1 ${this.aFODr1} and aFODr1Alt ${n} differ`;const c=Be(s,this.gw1.ar,this.aFODr1),d=i,r=Ie(this.gw2.ar,u,d);this.aFODr2=Math.PI-d-r;const h=this.gw2.rua-this.apr-this.gw2.rwa;if(ae(this.aFODr2-h)!==0)throw`dbg379: aFODr2 ${this.aFODr2} and aFODr2Alt ${h} differ`;const _=Be(u,this.gw2.ar,this.aFODr2),g=c+_,l=g/this.gw1.brr,f=g/this.gw2.brr,S=this.gw1.rua-l,P=this.gw2.rua-f;this.laStartRr1=this.gw1.involuteR.lFromU(S),this.laStartRr2=this.gw2.involuteR.lFromU(P);const C=Math.PI/2+this.apl,v=Ie(this.gw1.ar,e,C);this.aFODl1=Math.PI-C-v;const x=this.gw1.lua-this.apl+this.gw1.lwa;if(ae(this.aFODl1-x)!==0)throw`dbg388: aFODl1 ${this.aFODl1} and aFODl1Alt ${x} differ`;const N=Be(e,this.gw1.ar,this.aFODl1),b=i,D=Ie(this.gw2.ar,o,b);this.aFODl2=Math.PI-b-D;const L=this.gw2.lua-this.apl+this.gw2.lwa;if(ae(this.aFODl2-L)!==0)throw`dbg389: aFODl2 ${this.aFODl2} and aFODl2Alt ${L} differ`;const w=Be(o,this.gw2.ar,this.aFODl2),M=N+w,T=M/this.gw1.blr,E=M/this.gw2.blr,y=this.gw1.lua-T,Y=this.gw2.lua-E;this.laStartRl1=this.gw1.involuteL.lFromU(y),this.laStartRl2=this.gw2.involuteL.lFromU(Y),this.msg+=`Line of Action Effective length: right: ${H(g)} left: ${H(M)} mm
|
|
12
|
-
`,this.msg+=`Line of Action Effective rotation angle: right-1: ${H(re(l))} right-2: ${H(re(f))} left-1: ${H(re(T))} left-2: ${H(re(E))} degree
|
|
13
|
-
`,this.msg+=`Line of Action Effective height: right-1: ${H(this.gw1.ar-this.laStartRr1)} right-2: ${H(this.gw2.ar-this.laStartRr2)} left-1: ${H(this.gw1.ar-this.laStartRl1)} left-2: ${H(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: ${H(this.lasr1)} 2: ${H(this.lasr2)} mm
|
|
15
|
-
`,this.msg+=`Line of Action right: nb of contact point: 1: ${H(g/this.lasr1)} 2: ${H(g/this.lasr2)}
|
|
16
|
-
`,this.lasl1=2*Math.PI/this.gw1.TN*this.gw1.blr,this.lasl2=2*Math.PI/this.gw2.TN*this.gw2.blr,this.msg+=`Line of Action left: step length: 1: ${H(this.lasl1)} 2: ${H(this.lasl2)} mm
|
|
17
|
-
`,this.msg+=`Line of Action left: nb of contact point: 1: ${H(M/this.lasl1)} 2: ${H(M/this.lasl2)}
|
|
18
|
-
`}calcContactPoint1(){for(this.gw1.checkInitStep(5,"ActionLine.calcContactPoint1"),this.firstToothUr1=ze(this.apr-(this.initAngle1-this.angleCenterCenter)+this.gw1.rwp);ae(this.firstToothUr1-this.gw1.as)>=0;)this.firstToothUr1=ae(this.firstToothUr1-this.gw1.as);for(this.firstToothUl1=ze(this.apl+(this.initAngle1-this.angleCenterCenter)+this.gw1.as*this.gw1.adt-this.gw1.lwp);ae(this.firstToothUl1-this.gw1.as)>=0;)this.firstToothUl1=ae(this.firstToothUl1-this.gw1.as);this.ftdr1=this.gw1.brr*this.firstToothUr1,this.ftdl1=this.gw1.blr*this.firstToothUl1}prepare(){this.check1(),this.check2(),this.calcActionLine(),this.calcContactPoint1()}oneContactSpeed(s,e,u,o,i,a,n,c,d,r){const _=Math.floor(e/(2*u)),g=(o+_*u)/i,l=s?1:-1,[f,S,P,C]=a.laptc(n,l*c,g,.4);this.msg+=`speed ${d}: vx ${H(P)} vy: ${H(C)} m/s
|
|
19
|
-
`;const v=le(f,S),x=n+l*c,N=G(f,S,r),b=v.translatePolar(x,-C);N.addSegStrokeA(b.cx,b.cy);const D=b.translatePolar(x-l*Math.PI/2,P);return N.addSegStrokeA(D.cx,D.cy),N.closeSegStroke(),N}getContactSpeed(){const s=this.oneContactSpeed(!0,this.lBDr,this.lasr1,this.ftdr1,this.gw1.brr,this.gw1.involuteR,this.angleCenterCenter,this.apr,"R1","Black"),e=this.oneContactSpeed(!1,this.lBDl,this.lasl1,this.ftdl1,this.gw1.blr,this.gw1.involuteL,this.angleCenterCenter,this.apl,"L1","Black"),u=[];return u.push(s),u.push(e),u}getContours(){const s=[];s.push($(this.gw1.cx,this.gw1.cy,this.laStartRr1,"SkyBlue")),s.push($(this.gw1.cx,this.gw1.cy,this.laStartRl1,"SlateBlue")),s.push($(this.gw2.cx,this.gw2.cy,this.laStartRr2,"SkyBlue")),s.push($(this.gw2.cx,this.gw2.cy,this.laStartRl2,"SlateBlue"));const e=le(this.gw1.cx,this.gw1.cy),u=le(this.gw2.cx,this.gw2.cy),o=e.translatePolar(this.angleCenterCenter+this.apr,this.gw1.brr),i=u.translatePolar(this.angleCenterCenter+Math.PI+this.apr,this.gw2.brr),a=G(o.cx,o.cy,"YellowGreen");a.addSegStrokeA(i.cx,i.cy),a.closeSegStroke(),s.push(a);const n=e.translatePolar(this.angleCenterCenter-this.aFODr1,this.gw1.ar),c=u.translatePolar(this.angleCenterCenter+Math.PI-this.aFODr2,this.gw2.ar),d=G(n.cx,n.cy,"Yellow");d.addSegStrokeA(c.cx,c.cy),d.closeSegStroke(),s.push(d);const r=e.translatePolar(this.angleCenterCenter-this.apl,this.gw1.blr),h=u.translatePolar(this.angleCenterCenter+Math.PI-this.apl,this.gw2.blr),_=G(r.cx,r.cy,"YellowGreen");_.addSegStrokeA(h.cx,h.cy),_.closeSegStroke(),s.push(_);const g=e.translatePolar(this.angleCenterCenter+this.aFODl1,this.gw1.ar),l=u.translatePolar(this.angleCenterCenter+Math.PI+this.aFODl2,this.gw2.ar),f=G(g.cx,g.cy,"Yellow");return f.addSegStrokeA(l.cx,l.cy),f.closeSegStroke(),s.push(f),s.push(...this.getContactSpeed()),s}getContactPoint(){const s=[],e=le(this.gw1.cx,this.gw1.cy),u=e.translatePolar(this.angleCenterCenter+this.apr,this.gw1.brr),o=e.translatePolar(this.angleCenterCenter-this.apl,this.gw1.blr);s.push(le(u.cx,u.cy,ke.eBigSquare)),s.push(le(o.cx,o.cy,ke.eBigSquare));const i=this.angleCenterCenter+this.apr-Math.PI/2,a=this.angleCenterCenter-this.apl+Math.PI/2,n=u.translatePolar(i,this.ftdr1),c=o.translatePolar(a,this.ftdl1);s.push(le(n.cx,n.cy,ke.eBigSquare)),s.push(le(c.cx,c.cy,ke.eBigSquare));let d=this.ftdr1;for(;d+this.lasr1<this.lBDr;){d+=this.lasr1;const h=u.translatePolar(i,d);s.push(le(h.cx,h.cy,ke.eBigSquare))}let r=this.ftdl1;for(;r+this.lasl1<this.lBDl;){r+=this.lasl1;const h=o.translatePolar(a,r);s.push(le(h.cx,h.cy,ke.eBigSquare))}return s}getMsg(){return this.msg}getInitAngle2(){let s=this.lBDr-this.ftdr1;for(;ae(s-this.lasr2)>=0;)s=ae(s-this.lasr2);let e=this.lBDl-this.ftdl1;for(;ae(e-this.lasl2)>=0;)e=ae(e-this.lasl2);const u=s/this.gw2.brr,o=e/this.gw2.blr,i=this.angleCenterCenter+Math.PI+this.apr-u+this.gw2.rwp,n=this.angleCenterCenter+Math.PI-this.apl+o+this.gw2.lwp-this.gw2.as*this.gw2.adt;let c=2*Math.PI+ze(n);for(;ae(c-this.gw2.as-i)>=0;)c=ae(c-this.gw2.as);const d=c-i,r=d*this.gw2.brr/this.gw1.brr,h=d*this.gw2.brr,_=d*this.gw2.blr;this.msg+=`slack angle: 1: ${H(re(r))} 2: ${H(re(d))} degree
|
|
20
|
-
`,this.msg+=`slack on action line: right-2: ${H(h)} left-2: ${H(_)} mm
|
|
21
|
-
`;let g=0;if(this.rightLeftCenter2===0)g=i;else if(this.rightLeftCenter2===1)g=n;else if(this.rightLeftCenter2===2)g=i+d/2;else throw`err221: initAngle2 rightLeftCenter2 ${this.rightLeftCenter2} has an unkown value`;return Ht(g)}};function wt(s,e,u,o,i,a){return new $t(s,e,u,o,i,a)}function Mt(s,e,u,o,i,a,n,c,d){let r=$(s,e,u);if(o>0){if(i>2*u)throw`err383: axisTorque ribWidth ${H(i)} larger than 2x axisRadius ${H(u)}`;const h=Math.asin(i/(2*u)),_=2*Math.PI/o;if(_-2.5*h<0)throw`err384: axisTorque ribWidth ${H(i)} or ribNb ${o} are too large`;if(n>i/2)throw`err385: axisTorque ribRound1 ${H(n)} too large compare to ribWidth ${H(i)}`;if(n+c>a)throw`err386: axisTorque ribRound12 ${H(n)} ${H(c)} too large compare to ribHeight ${H(i)}`;const g=_-2*h>Math.PI,l=le(s,e),S=l.translatePolar(d,u+a).translatePolar(d+Math.PI/2,i/2);r=G(S.cx,S.cy);for(let P=0;P<o;P++){const C=d+P*_,v=C+_,x=l.translatePolar(C+h,u),N=l.translatePolar(v-h,u),D=l.translatePolar(C,u+a).translatePolar(C+Math.PI/2,i/2),w=l.translatePolar(v,u+a).translatePolar(v-Math.PI/2,i/2);r.addSegStrokeA(D.cx,D.cy).addCornerRounded(n),r.addSegStrokeA(x.cx,x.cy).addCornerRounded(c),r.addPointA(N.cx,N.cy).addSegArc(u,g,!0).addCornerRounded(c),r.addSegStrokeA(w.cx,w.cy).addCornerRounded(n)}r.closeSegStroke()}return r}function bt(s,e,u,o,i,a,n,c){const d=2*Math.PI/i,r=Math.asin(a/(2*o)),h=Math.asin(a/(2*u));if(a>2*o)throw`err905: hollowStraight spokeWidth ${H(a)} too large for hollowInt ${H(o)}`;if(u-o<2.1*n)throw`err906: hollowStraight hollowExt ${H(u)}, hollowInt ${H(o)} and spokeRound ${H(n)} do not fit`;if(d-2*h<2.5*Math.asin(n/u))throw`err907: hollowStraight spokeNb ${i}, spokeWidth ${H(a)} or spokeRound ${H(n)} are too large`;const _=a/(2*Math.sin(d/2)),g=d-2*r<2.1*Math.asin(n/o),l=d-2*h>Math.PI,f=le(s,e),S=[];for(let P=0;P<i;P++){const C=c+P*d,v=C+d,x=C+d/2,N=f.translatePolar(C+h,u),b=f.translatePolar(v-h,u),D=f.translatePolar(v-r,o),L=f.translatePolar(C+r,o),w=f.translatePolar(x,_),M=G(N.cx,N.cy);M.addCornerRounded(n),M.addPointA(b.cx,b.cy).addSegArc(u,l,!0).addCornerRounded(n),g?M.addSegStrokeA(w.cx,w.cy).addCornerRounded(n):(M.addSegStrokeA(D.cx,D.cy).addCornerRounded(n),M.addPointA(L.cx,L.cy).addSegArc(o,l,!1).addCornerRounded(n)),M.closeSegStroke(),S.push(M)}return S}function Ze(s,e,u,o,i,a,n,c,d,r){const h=r?1:-1,_=s/2,g=_+e,l=g+u,f=G(0,-l);return f.addSegStrokeA(h*o,-l).addCornerRounded(n).addSegStrokeA(h*o,-g).addCornerRounded(c).addSegStrokeA(h*i,-g).addSegStrokeA(h*a,-_).addCornerRounded(d).addSegStrokeA(h*a,_).addCornerRounded(d).addSegStrokeA(h*i,g).addSegStrokeA(h*o,g).addCornerRounded(c).addSegStrokeA(h*o,l).addCornerRounded(n).addSegStrokeA(0,l).closeSegStroke(),f}var Ke={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),q("Tooth Profile"),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),fe("involSym",!0),ve("involROpt",["Optimum","Base-1","Base-2","PressureAngle","FreeBase-12"]),ve("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),ve("gw2Position",["right","left","center"]),q("Inner"),fe("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),fe("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),q("Axis"),fe("centralAxis",!0),fe("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 kt(s,e,u=""){const o=he(Ke.partName+u),i=B(),a=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
22
|
-
`;try{const n=je(),c=je();n.set1ModuleToothNumber(e.module,e.N1),c.set1ModuleToothNumber(e.module,e.N2),n.set2CenterPosition(e.c1x,e.c1y);const d=Me(e.angleCenterCenter),[r,h,_]=xt(n,c,d,e.addInterAxis);c.set2CenterPosition(r,h),n.set3CircleRadius(e.ah1,e.dh1,e.bh1,e.bRound1),c.set3CircleRadius(e.ah2,e.dh2,e.bh2,e.bRound2);const[g,l,f,S]=vt(n,c,e.brr1,e.blr1,e.brr2,e.blr2,e.involSym,e.involROpt,e.involROpt);n.set4BaseCircles(g,l),c.set4BaseCircles(f,S),n.set5AddendumThickness(e.at1),c.set5AddendumThickness(e.at2);const P=Me(e.initAngle1)+s*3*n.as/100;n.set6Angles(P,d);const C=wt(n,c,P,d,_,e.gw2Position);C.prepare();for(const L of C.getContours())i.addDynamics(L);i.addPoints(C.getContactPoint()),c.set6Angles(C.getInitAngle2(),d+Math.PI),o.logstr+=C.getMsg(),n.set7InvoluteDetails(e.involArcPairs1,e.skinThickness1),c.set7InvoluteDetails(e.involArcPairs2,e.skinThickness2);for(const L of n.getRefCircles())i.addDynamics(L);for(const L of c.getRefCircles())i.addDynamics(L);i.addDynamics(n.getToothRef()),i.addDynamics(c.getToothRef());const v=n.getProfile();if(o.logstr+=n.getMsg(),o.logstr+=v.check(),i.addMain(v),e.centralAxis===1){const L=Mt(n.cx,n.cy,e.axisRadius,e.ribNb,e.ribWidth,e.ribHeight,e.ribRound1,e.ribRound2,P);o.logstr+=L.check(),i.addMain(L)}if(e.hollow===1){const L=n.br,w=e.axisRadius+e.ribHeight,M=L-e.materialHeightExt,T=w+e.materialHeightInt;if(T>M)throw`err902: hollowMaterialInt ${H(T)} bigger than hollowMaterialExt ${H(M)}`;const E=bt(n.cx,n.cy,M,T,e.spokeNb,e.spokeWidth,e.spokeRound,P);for(const y of E)o.logstr+=y.check(),i.addMain(y)}const x=c.getProfile();o.logstr+=x.check(),i.addSecond(x);const N=n.ar+e.wheelRadiusExtra;if(e.wheelAxis===1){const L=Ze(e.wheelHeight,e.wheelMidExtra,e.wheelAxisLength,e.wheelAxisRadius,e.wheelMidRadius,N,e.wheelAxisExtRound,e.wheelAxisIntRound,e.wheelExtraRound,!0),w=Ze(e.wheelHeight,e.wheelMidExtra,e.wheelAxisLength,e.wheelAxisRadius,e.wheelMidRadius,N,e.wheelAxisExtRound,e.wheelAxisIntRound,e.wheelExtraRound,!1);a.addMain(L),a.addSecond(w)}else{const L=G(0,-e.wheelHeight/2).addSegStrokeR(0,e.wheelHeight).addSegStrokeR(N,0).addSegStrokeR(0,-e.wheelHeight).closeSegStroke(),w=G(0,-e.wheelHeight/2).addSegStrokeR(0,e.wheelHeight).addSegStrokeR(-N,0).addSegStrokeR(0,-e.wheelHeight).closeSegStroke();a.addMain(L),a.addSecond(w)}o.fig={teethProfile:i,axisProfile:a};const b=o.partName,D=e.wheelHeight/2+e.wheelMidExtra+e.wheelAxisLength+10;o.vol={extrudes:[{outName:`subpax_${b}_teethProfile`,face:`${b}_teethProfile`,extrudeMethod:W.eLinearOrtho,length:2*D,rotate:[0,0,0],translate:[0,0,-D]},{outName:`subpax_${b}_axisProfile`,face:`${b}_axisProfile`,extrudeMethod:W.eRotate,rotate:[0,0,0],translate:[0,0,0]}],volumes:[{outName:`pax_${b}`,boolMethod:ne.eIntersection,inList:[`subpax_${b}_teethProfile`,`subpax_${b}_axisProfile`]}]},o.logstr+=`gear_wheel_wheel drawn successfully!
|
|
23
|
-
`,o.calcErr=!1}catch(n){o.logstr+=n,console.log(n)}return o}var Ge={pTitle:"Gearwheel-gearwheel",pDescription:"Gear-system with two wheels",pDef:Ke,pGeom:kt},Qe={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),fe("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),fe("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),fe("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 Et(s,e,u=""){const o=he(Qe.partName+u),i=B(),a=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
24
|
-
`;try{const n=Se(Ge.pDef,"_ref1");n.setVal("module",e.module),n.setVal("N1",e.N1),n.setVal("c1x",e.c1x),n.setVal("c1y",e.c1y),n.setVal("centralAxis",e.centralAxis),n.setVal("axisRadius",e.axisRadius),n.setVal("ribNb",e.ribNb),n.setVal("ribWidth",e.ribWidth),n.setVal("ribHeight",e.ribHeight),n.setVal("ribRound1",e.ribRound1),n.setVal("ribRound2",e.ribRound2),n.setVal("hollow",e.hollow),n.setVal("materialHeightExt",e.materialHeightExt),n.setVal("materialHeightInt",e.materialHeightInt),n.setVal("spokeNb",e.spokeNb),n.setVal("spokeWidth",e.spokeWidth),n.setVal("spokeRound",e.spokeRound),n.setVal("wheelAxis",e.wheelAxis),n.setVal("wheelHeight",e.wheelHeight),n.setVal("wheelMidExtra",e.wheelMidExtra),n.setVal("wheelAxisLength",e.wheelAxisLength),n.setVal("wheelAxisRadius",e.wheelAxisRadius),n.setVal("wheelMidRadius",e.wheelMidRadius),n.setVal("wheelRadiusExtra",e.wheelRadiusExtra),n.setVal("wheelAxisExtRound",e.wheelAxisExtRound),n.setVal("wheelAxisIntRound",e.wheelAxisIntRound),n.setVal("wheelExtraRound",e.wheelExtraRound);const c=Ge.pGeom(s,n.getParamVal(),n.getSuffix());Le(c),o.logstr+=He(c.logstr,n.getPartNameSuffix()),i.mergeFigure(c.fig.teethProfile),a.mergeFigure(c.fig.axisProfile),o.fig={teethProfile:i,axisProfile:a};const d=o.partName;o.vol={inherits:[{outName:`inpax_${d}_gearWW`,subdesign:"pax_gear_wheel_wheel_ref1",subgeom:c,rotate:[0,0,0],translate:[0,0,0]}],extrudes:[],volumes:[{outName:`pax_${d}`,boolMethod:ne.eIdentity,inList:[`inpax_${d}_gearWW`]}]};const r={partName:n.getPartName(),dparam:n.getDesignParamList(),orientation:[0,0,0],position:[0,0,0]};o.sub={gear_wheel_wheel_1:r},o.logstr+=`simplified_gear_wheel drawn successfully!
|
|
25
|
-
`,o.calcErr=!1}catch(n){o.logstr+=n,console.log(n)}return o}var At={pTitle:"Simplified gearwheel",pDescription:"One simplified gearwheel without details on teeth-profile",pDef:Qe,pGeom:Et};function Rt(s){let e="";const u=s.PHD1/2,o=s.PHD5/2,i=2*Math.asin(s.PHR4/u),a=2*Math.asin(s.PHL2/(2*o)),n=2*Math.PI/s.PHN1-a,c=s.PHL2/2,d=Math.sqrt(o**2-c**2)-u,r=Math.sqrt(c**2+d**2),h=Math.acos(d/r),_=Math.acos(s.PHR4/r),g=Math.PI-h-_;if(o<u+s.PHR4)throw`err211: PHD5 ${s.PHD5} too small compare to PHD1 ${s.PHD1} or PHR4 ${s.PHR4}`;if(n<a)throw`err212: PHL2 ${s.PHL2} too large compare to PHN1 ${s.PHN1}`;if(s.PHD3>2*s.PHR4)throw`err213: PHD3 ${s.PHD3} too large compare to PHR4 ${s.PHR4}`;g>Math.PI/2-i&&(e+=`warn345: PHL2 is quiet small ${H(s.PHL2)} mm
|
|
26
|
-
`),e+=`petal angle: ${H(re(a))} degree
|
|
27
|
-
`,e+=`hollow angle: ${H(re(n))} degree
|
|
28
|
-
`;const l=le(0,0),S=le(o,0).rotate(l,-a/2),P=le(u,0),C=le(u-s.PHR4,0),v=C.rotate(P,g),x=C.rotate(P,-g),N=G(S.cx,S.cy).addCornerRounded(s.PHR6).addSegStrokeA(v.cx,v.cy).addPointA(u-s.PHR4,0).addPointA(x.cx,x.cy).addSegArc2().addSegStrokeAP(a/2,o).addCornerRounded(s.PHR6).addPointAP(a/2+n/2,o).addPointAP(a/2+n,o).addSegArc2(),b=G(S.cx,S.cy),D=[...Array(s.PHN1).keys()].map(L=>L*(a+n));for(const L of D)b.addPartial(N.rotate(0,0,L));return[e,b,D]}function et(s){const e="",u=s.D1/2,o=s.D2/2,i=s.D4/2,a=2*Math.PI/s.N1,n=s.L1/2,c=Math.sqrt(o**2-n**2),d=Math.asin(n/o),r=u-c,h=Math.atan2(n,r),_=Math.sqrt(n**2+r**2),g=Math.acos(i/_),l=h+g,f=(a-2*d)/2;if(f<0)throw`err464: N1 ${s.N1} is too large compare to D2 ${s.D2}, L1 ${s.L1}`;if(u<o)throw`err465: D2 ${s.D2} is too large compare to D1 ${s.D1}`;const S=G(c,-n),P=le(0,0),C=le(o,0),v=le(u,0),N=le(u-i,0).rotate(v,l),b=C.rotate(P,d+f),D=C.rotate(P,a-d),L=G(c,-n).addCornerRounded(s.R5).addSegStrokeA(N.cx,N.cy).addPointA(u+i,0).addPointA(N.cx,-N.cy).addSegArc2().addSegStrokeA(c,n).addCornerRounded(s.R5).addPointA(b.cx,b.cy).addPointA(D.cx,D.cy).addSegArc2();for(let w=0;w<s.N1;w++)S.addPartial(L.rotate(0,0,w*a));return[e,S,a]}function ye(s,e){let u="";const o=s.SD2/2,i=o+s.SE1,a=2*i;let n=!1,c=-o,d=-i;if(e&&(n=!0,c=i,d=o),s.SL2<i)throw`err421: SL2 ${s.SL2} is too small compare to SD2 ${s.SD2} and SE1 ${s.SE1}`;u+=`info309: spring height: ${H(s.SL1+a)} length: ${H(s.SN1*2*(s.SD2+s.SE1))}
|
|
29
|
-
`;const r=G(0,0);for(let h=0;h<s.SN1;h++)r.addSegStrokeR(0,-s.SL1).addPointR(2*c,0).addSegArc(Math.abs(c),!1,n),h<s.SN1-1?r.addSegStrokeR(0,s.SL1).addPointR(2*d,0).addSegArc(Math.abs(d),!1,!n):s.Send===1?r.addSegStrokeR(0,s.SL2):r.addSegStrokeR(0,s.SL2-i).addPointR(2*d,0).addSegArc(Math.abs(d),!1,!n);s.Send===1?r.addSegStrokeR(-s.SE1,0):r.addSegStrokeR(s.SE1,0);for(let h=0;h<s.SN1;h++)h>0?r.addPointR(-2*c,0).addSegArc(Math.abs(c),!1,n).addSegStrokeR(0,-s.SL1):s.Send===1?r.addSegStrokeR(0,-s.SL2):r.addPointR(-2*c,0).addSegArc(Math.abs(c),!1,n).addSegStrokeR(0,-s.SL2+i),r.addPointR(-2*d,0).addSegArc(Math.abs(d),!1,!n).addSegStrokeR(0,s.SL1);return[u,r]}function Nt(s){let e="";const u=s.D6/2,o=2*Math.PI/s.N2,i=s.E2/2,a=2*Math.asin(i/u),n=(o-a)/2,d=(s.N2<3?0:Math.PI/s.N2)+Me(s.SA1),r=Math.PI/2-d,h=-Math.PI/2+d,_=s.SD1/2;if(n<0)throw`err564: N2 ${s.N2} is too large compare to D6 ${s.D6}, E2 ${s.E2}`;if(s.orientation===2&&s.N2%2===1)throw`err565: N2 ${s.N2} is odd and orientation is alt`;const[g,l]=ye(s,!1),[,f]=ye(s,!0);e+=g;const S=le(0,-u),P=le(0,0),C=S.rotate(P,a),v=S.translate(0,s.L2),x=v.translate(-_,0),N=x.translate(0,_),b=x.translate(0,_+s.SE1),D=b.rotate(x,r),L=v.translate(0,_+s.SE1).translate(s.SE1,0),w=S.rotate(P,-a),M=v.translate(_,0),T=M.translate(0,_),E=T.rotate(M,h),y=M.translate(0,_+s.SE1),Y=v.translate(0,_+s.SE1).translate(-s.SE1,0),X=G(C.cx,C.cy).addSegStrokeA(L.cx,L.cy).addSegStrokeA(b.cx,b.cy),k=G(b.cx,b.cy).addPointA(D.cx,D.cy).addSegArc(_+s.SE1,!1,!0);k.addPartial(l.rotate(0,0,-d).translate(D.cx,D.cy)),k.addPointA(N.cx,N.cy).addPointA(v.cx,v.cy).addSegArc2().addSegStrokeA(S.cx,S.cy),X.addPartial(k);const O=G(S.cx,S.cy).addSegStrokeA(v.cx,v.cy).addPointA(T.cx,T.cy).addPointA(E.cx,E.cy).addSegArc2();O.addPartial(f.rotate(0,0,d).translate(E.cx,E.cy)),O.addPointA(y.cx,y.cy).addSegArc(_+s.SE1,!1,!0);const m=G(y.cx,y.cy).addSegStrokeA(Y.cx,Y.cy).addSegStrokeA(w.cx,w.cy),K=G(S.cx,S.cy).addPartial(O).addPartial(m),te=G(u,0);if(s.orientation===2)for(let I=0;I<s.N2/2;I++){te.addPointAP(-2*I*o-2*n,u).addPointAP(-2*I*o-4*n,u).addSegArc2(),te.addCornerRounded(s.R7);const oe=Math.PI/2-(2*I+2)*o,j=oe+2*a;te.addPartial(O.rotate(0,0,j));const U=k.rotate(0,0,oe),p=U.getFirstPoint();te.addCornerRounded(s.R7),te.addSegStrokeA(p.cx,p.cy),te.addCornerRounded(s.R7),te.addPartial(U),te.addCornerRounded(s.R7)}else for(let I=0;I<s.N2;I++)te.addPointAP(-I*o-n,u).addPointAP(-I*o-2*n,u).addSegArc2().addCornerRounded(s.R7),s.orientation===0?te.addPartial(K.rotate(0,0,Math.PI/2-(I+1)*o+a)):s.orientation===1&&te.addPartial(X.rotate(0,0,Math.PI/2-(I+1)*o)),te.addCornerRounded(s.R7);return[e,te]}var tt={partName:"vaxis_holder",params:[t("PHD1","mm",700,1,2e3,1),t("PHD2","mm",900,1,4e3,1),t("PHD5","mm",800,1,4e3,1),t("PHN1","holes",6,1,24,1),q("screw holes"),t("PHD3","mm",40,2,100,1),t("PHR4","mm",40,2,100,1),t("PHL2","mm",120,5,400,1),t("PHR6","mm",20,0,400,1),q("section"),t("PHE1","mm",10,1,80,1),t("PHH1","mm",50,1,200,1),t("PHA","degree",5,-45,45,.1),t("PHL1","mm",300,1,500,1),t("PHE2","mm",10,1,80,1),t("PHE3","mm",10,1,80,1)],paramSvg:{PHD1:"vaxis_holder_top.svg",PHD2:"vaxis_holder_top.svg",PHD5:"vaxis_holder_top.svg",PHD3:"vaxis_holder_top.svg",PHR4:"vaxis_holder_top.svg",PHN1:"vaxis_holder_top.svg",PHL2:"vaxis_holder_top.svg",PHR6:"vaxis_holder_top.svg",PHE1:"vaxis_holder_section.svg",PHH1:"vaxis_holder_section.svg",PHA:"vaxis_holder_section.svg",PHL1:"vaxis_holder_section.svg",PHE2:"vaxis_holder_section.svg",PHE3:"vaxis_holder_top.svg"},sim:{tMax:180,tStep:.5,tUpdate:500}};function Vt(s,e,u=""){const o=he(tt.partName+u),i=B(),a=B(),n=B(),c=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
30
|
-
`;try{const d=Me(e.PHA),r=e.PHD1/2,h=e.PHD2/2,_=e.PHD3/2,g=e.PHD5/2,l=h+e.PHL1/2*Math.sin(d),f=h-e.PHL1/2*Math.sin(d),S=e.PHL1*Math.cos(d),P=h-e.PHE2/Math.cos(d)+e.PHE1/2*Math.tan(d),C=h-e.PHE2/Math.cos(d)-e.PHE1/2*Math.tan(d),v=Math.min(P,C),x=(e.PHL1-e.PHE1/Math.cos(d))/2,N=h-e.PHE2/Math.cos(d);if(v<g)throw`err210: PHD5 ${e.PHD5} too large compare to PHE2 ${e.PHE2} or PHA ${e.PHA}`;o.logstr+=`vaxis_holder's height: ${H(S)} mm
|
|
31
|
-
`,o.logstr+=`vaxis_holder outerD1: ${H(2*l)} mm
|
|
32
|
-
`,o.logstr+=`vaxis_holder outerD2: ${H(2*f)} mm
|
|
33
|
-
`,o.logstr+=`vaxis_holder innerD: ${H(e.PHD1-2*e.PHR4)} mm
|
|
34
|
-
`,o.logstr+=`vaxis_holder D2-next: ${H(2*N)} mm
|
|
35
|
-
`;const b=function(I){return G(I*g,-e.PHE1/2).addSegStrokeR(I*(P-g),0).addSegStrokeRP(-Math.PI/2+I*d,x).addSegStrokeRP(-Math.PI/2+I*(Math.PI/2+d),e.PHE2).addSegStrokeRP(Math.PI/2+I*d,e.PHL1).addSegStrokeRP(Math.PI/2+I*(Math.PI/2+d),e.PHE2).addSegStrokeRP(-Math.PI/2+I*d,x).addSegStrokeA(I*g,e.PHE1/2).closeSegStroke()},D=function(I){return G(I*v,-e.PHE1/2).addSegStrokeA(I*v,e.PHE1/2).addSegStrokeA(I*(r-e.PHR4),e.PHE1/2).addSegStrokeA(I*(r-e.PHR4),-e.PHE1/2).closeSegStroke()},L=function(I){return G(I*(r+_),-e.PHE1/2).addSegStrokeA(I*(r+_),e.PHE1/2).addSegStrokeA(I*(r-_),e.PHE1/2).addSegStrokeA(I*(r-_),-e.PHE1/2).closeSegStroke()};i.addMain(b(1)),i.addSecond(b(-1)),i.addSecond(D(1)),i.addSecond(L(1)),i.addSecond(D(-1)),i.addSecond(L(-1));const w=function(I){return G(I*(r+e.PHR4),-e.PHE1/2).addSegStrokeA(I*P,-e.PHE1/2).addSegStrokeRP(-Math.PI/2+I*d,x).closeSegStroke()},M=function(I){return G(I*(r+e.PHR4),e.PHE1/2).addSegStrokeA(I*C,e.PHE1/2).addSegStrokeRP(Math.PI/2+I*d,x).addSegStrokeA(I*(r+e.PHR4),e.PHE1+e.PHH1).closeSegStroke()};i.addSecond(w(-1)),i.addSecond(M(-1)),n.mergeFigure(i,!0),c.mergeFigure(i,!0),i.addSecond(w(1)),i.addSecond(M(1)),n.addMain(w(1)),n.addSecond(M(1)),c.addSecond(w(1)),c.addMain(M(1)),a.addMain($(0,0,v)),a.addSecond($(0,0,h)),a.addSecond($(0,0,Math.max(l,f)));const[T,E,y]=Rt(e);o.logstr+=T,a.addMain(E);for(const I of y){const oe=le(0,0).translatePolar(I,r);a.addMain($(oe.cx,oe.cy,e.PHD3/2))}const Y=G(r+e.PHR4,-e.PHE3).addSegStrokeA(v,-e.PHE3).addSegStrokeA(v,e.PHE3).addSegStrokeA(r+e.PHR4,e.PHE3).closeSegStroke();for(const I of y)a.addSecond(Y.rotate(0,0,I));o.fig={facePetal:a,faceOuter:i,faceButtress1:n,faceButtress2:c};const X=o.partName,k=Je();k.addRotation(Math.PI/2,0,0),k.addTranslation(0,e.PHE3/2,0);const O=y.map((I,oe)=>{const j=Je(k.getMatrix());return j.addRotation(0,0,I),{outName:`subpax_${X}_b1_${oe}`,face:`${X}_faceButtress1`,extrudeMethod:W.eLinearOrtho,length:e.PHE3,rotate:j.getRotation(),translate:j.getTranslation()}}),m=y.map((I,oe)=>{const j=Je(k.getMatrix());return j.addRotation(0,0,I),{outName:`subpax_${X}_b2_${oe}`,face:`${X}_faceButtress2`,extrudeMethod:W.eLinearOrtho,length:e.PHE3,rotate:j.getRotation(),translate:j.getTranslation()}}),K=y.map((I,oe)=>`subpax_${X}_b1_${oe}`),te=y.map((I,oe)=>`subpax_${X}_b2_${oe}`);o.vol={extrudes:[{outName:`subpax_${X}_outer`,face:`${X}_faceOuter`,extrudeMethod:W.eRotate,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${X}_petal`,face:`${X}_facePetal`,extrudeMethod:W.eLinearOrtho,length:e.PHE1,rotate:[0,0,0],translate:[0,0,-e.PHE1/2]},...O,...m],volumes:[{outName:`pax_${X}`,boolMethod:ne.eUnion,inList:[`subpax_${X}_petal`,`subpax_${X}_outer`,...K,...te]}]},o.sub={},o.logstr+=`vaxis_holder drawn successfully!
|
|
36
|
-
`,o.calcErr=!1}catch(d){o.logstr+=d,console.log(d)}return o}var be={pTitle:"Heliostat vaxis_holder",pDescription:"The holders of the guidance mechanism for azimuth motion",pDef:tt,pGeom:Vt},ot={partName:"pole_static",params:[t("D1","mm",1e3,20,4e3,1),t("D2","mm",700,10,4e3,1),t("D3","mm",800,10,4e3,1),t("H1","mm",3e3,10,4e4,10),t("H2","mm",7e3,50,4e4,10),q("thickness"),t("E1","mm",30,1,80,1),t("E2","mm",5,1,80,1),q("base holes"),t("N1","",32,3,100,1),t("D5","mm",40,1,100,1),t("L1","mm",45,1,300,1),q("door"),t("D4","mm",600,1,1200,1),t("H3","mm",300,5,1200,1),t("H4","mm",1800,10,2500,1),t("L2","mm",30,1,100,1),t("E3","mm",40,1,100,1),q("holders"),fe("holders",!0),t("PHL1A","mm",400,10,1e3,1),t("PHL1B","mm",400,10,1e3,1),t("PHB","mm",5e3,10,2e4,1),t("PHD1A","mm",600,10,4e3,1),t("PHD1B","mm",380,10,4e3,1),t("PHN1AB","petal",6,1,24,1),q("holder-B"),t("PHD5B","mm",600,10,4e3,1),t("PHR4B","mm",30,3,400,1),t("PHD3B","mm",40,3,400,1),t("PHL2B","mm",140,3,400,1),t("PHE3B","mm",10,1,50,1),t("PHR6B","mm",20,0,400,1),t("PHE1B","mm",10,1,50,1),t("PHH1B","mm",10,1,50,1),q("holder-A"),t("PHD5A","mm",900,10,4e3,1),t("PHR4A","mm",30,3,400,1),t("PHD3A","mm",40,3,400,1),t("PHL2A","mm",200,3,400,1),t("PHE3A","mm",10,1,50,1),t("PHR6A","mm",20,0,400,1),t("PHE1A","mm",10,1,50,1),t("PHH1A","mm",10,1,50,1)],paramSvg:{D1:"pole_stator_cut.svg",D2:"pole_stator_cut.svg",D3:"pole_stator_cut.svg",H1:"pole_stator_cut.svg",H2:"pole_stator_cut.svg",E1:"pole_stator_cut.svg",E2:"pole_stator_E2.svg",N1:"pole_stator_bottom.svg",D5:"pole_stator_bottom.svg",L1:"pole_stator_bottom.svg",D4:"pole_stator_face.svg",H3:"pole_stator_face.svg",H4:"pole_stator_face.svg",L2:"pole_stator_face.svg",E3:"pole_stator_right.svg",holders:"pole_stator_holders.svg",PHL1A:"pole_stator_holders.svg",PHL1B:"pole_stator_holders.svg",PHB:"pole_stator_holders.svg",PHD1A:"pole_stator_holders.svg",PHD1B:"pole_stator_holders.svg",PHN1AB:"pole_stator_holders.svg",PHD5A:"pole_stator_holderB_top.svg",PHR4A:"pole_stator_holderB_top.svg",PHD3A:"pole_stator_holderB_top.svg",PHL2A:"pole_stator_holderB_top.svg",PHE3A:"pole_stator_holderB_top.svg",PHR6A:"pole_stator_holderB_top.svg",PHE1A:"pole_stator_holderB_section.svg",PHH1A:"pole_stator_holderB_section.svg",PHD5B:"pole_stator_holderB_top.svg",PHR4B:"pole_stator_holderB_top.svg",PHD3B:"pole_stator_holderB_top.svg",PHL2B:"pole_stator_holderB_top.svg",PHE3B:"pole_stator_holderB_top.svg",PHR6B:"pole_stator_holderB_top.svg",PHE1B:"pole_stator_holderB_section.svg",PHH1B:"pole_stator_holderB_section.svg"},sim:{tMax:180,tStep:.5,tUpdate:500}};function Ct(s,e,u=""){const o=he(ot.partName+u),i=B(),a=B(),n=B(),c=B(),d=B(),r=B(),h=B(),_=B(),g=B(),l=B(),f=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
37
|
-
`;try{const S=e.D1/2,P=e.D2/2,C=e.D3/2,v=e.H1+e.H2,x=Math.atan2(S-P,e.H2),N=e.E2*Math.tan(x/2),b=e.H1-N,D=e.PHL1B/Math.cos(x),L=P+e.PHL1B/2*Math.tan(x),w=e.H1+e.H2-e.PHL1B/2,M=P+(e.PHL1B/2+e.PHB)*Math.tan(x),T=e.H1+e.H2-e.PHL1B/2-e.PHB,E=e.PHL1A/Math.cos(x),y=S-e.PHL1A/2*Math.tan(x),Y=e.H1+e.PHL1A/2;if(P>S)throw`err091: D2 ${e.D2} is larger than D1 ${e.D1}`;if(C+e.E2>S)throw`err095: D3 ${e.D3} and E2 ${e.E2} are too large compare to D1 ${e.D1}`;if(e.holders){if(e.PHB<e.PHL1B)throw`err131: PHB ${e.PHB} is too small compare to PHL1B ${e.PHL1B}`;if(e.PHB>e.H2-e.PHL1B-e.PHL1A)throw`err132: PHB ${e.PHB} is too large compare to H2 ${e.H2}, PHL1B ${e.PHL1B} and PHL1A ${e.PHL1A}`}o.logstr+=`pole-height: ${H(v)} mm
|
|
38
|
-
`,o.logstr+=`cone-half-angle: ${H(re(x))} degree
|
|
39
|
-
`,o.logstr+=`holder position: A: ${H(Y)} B1: ${H(T)} B2: ${H(w)} mm
|
|
40
|
-
`;const X=function(A){let R=P-e.E2*Math.cos(x);return R+=(v-e.E2*Math.sin(x)-A)*Math.tan(x),R},k=function(A,R){const Q=G(A*S,0).addSegStrokeA(A*S,e.H1).addSegStrokeA(A*P,v).addSegStrokeR(-A*e.E2*Math.cos(x),-e.E2*Math.sin(x));if(R&&e.holders){const Z=e.H1+e.PHL1A/2-e.PHE1A/2,ge=Z+e.PHE1A,ue=v-e.PHL1B/2+e.PHE1B/2,ie=ue-e.PHE1B,ce=ue-e.PHB,_e=ce-e.PHE1B;Q.addSegStrokeA(A*X(ue),ue).addSegStrokeA(A*(e.PHD1B/2-e.PHR4B),ue).addSegStrokeA(A*(e.PHD1B/2-e.PHR4B),ie).addSegStrokeA(A*X(ie),ie).addSegStrokeA(A*X(ce),ce).addSegStrokeA(A*(e.PHD1B/2-e.PHR4B),ce).addSegStrokeA(A*(e.PHD1B/2-e.PHR4B),_e).addSegStrokeA(A*X(_e),_e).addSegStrokeA(A*X(ge),ge).addSegStrokeA(A*(e.PHD1A/2-e.PHR4A),ge).addSegStrokeA(A*(e.PHD1A/2-e.PHR4A),Z).addSegStrokeA(A*X(Z),Z)}return Q.addSegStrokeA(A*(S-e.E2),b),R?Q.addSegStrokeA(A*(S-e.E2),e.E1).addSegStrokeA(A*C,e.E1).addSegStrokeA(A*C,0):Q.addSegStrokeA(A*(S-e.E2),0),Q.closeSegStroke(),Q};i.addMain(k(1,!1)),i.addSecond(k(1,!0)),i.addSecond(k(-1,!0));const O=e.D4/2,m=e.H4-2*O;if(m<0)throw`err121: H4 ${e.H4} is too small compare to D4 ${e.D4}`;if(O-e.L2<0)throw`err121: D4 ${e.D4} is too small compare to L2 ${e.L2}`;const K=function(A){const R=O-A,Q=e.H3+O;return G(R,Q+m).addPointR(-R,R).addSegArc(R,!1,!0).addPointR(-R,-R).addSegArc(R,!1,!0).addSegStrokeR(0,-m).addPointR(R,-R).addSegArc(R,!1,!0).addPointR(R,R).addSegArc(R,!1,!0).closeSegStroke()};a.addMain(K(0)),a.addMain(K(e.L2));const te=G(S,0).addSegStrokeA(S,e.H1).addSegStrokeA(P,v).addSegStrokeA(-P,v).addSegStrokeA(-S,e.H1).addSegStrokeA(-S,0).closeSegStroke();a.addSecond(te);const I=G(-S,e.H3).addSegStrokeR(0,e.H4).addSegStrokeR(-e.E3,0).addSegStrokeR(0,-e.H4).closeSegStroke();a.addSecond(I),n.addMain($(0,0,S)),n.addMain($(0,0,C));const oe=C+e.L1,j=2*Math.PI/e.N1;for(let A=0;A<e.N1;A++){const R=oe*Math.cos(A*j),Q=oe*Math.sin(A*j);n.addMain($(R,Q,e.D5/2))}n.addSecond($(0,0,P)),n.addSecond($(0,0,S-e.E2)),c.addMain($(0,0,S+e.E3)),c.addMain($(0,0,S-e.E2)),d.addMain(K(e.L2));const U=o.partName,p=[],V=[];let J={};if(e.holders){const A=Se(be.pDef,"B2");A.setVal("PHD1",e.PHD1B),A.setVal("PHD2",2*L),A.setVal("PHD5",e.PHD5B),A.setVal("PHN1",e.PHN1AB),A.setVal("PHD3",e.PHD3B),A.setVal("PHR4",e.PHR4B),A.setVal("PHL2",e.PHL2B),A.setVal("PHR6",e.PHR6B),A.setVal("PHE1",e.PHE1B),A.setVal("PHH1",e.PHH1B),A.setVal("PHA",re(x)),A.setVal("PHL1",D),A.setVal("PHE2",e.E2),A.setVal("PHE3",e.PHE3B);const R=be.pGeom(0,A.getParamVal(),A.getSuffix());Le(R),o.logstr+=He(R.logstr,A.getPartNameSuffix()),r.mergeFigure(R.fig.faceOuter),h.mergeFigure(R.fig.facePetal);const Q={outName:`inpax_${U}_hB2`,subdesign:"pax_vaxis_holderB2",subgeom:R,rotate:[0,0,0],translate:[0,0,w]};p.push(Q),V.push(`inpax_${U}_hB2`);const Z=Se(be.pDef,"B1");Z.setVal("PHD1",e.PHD1B),Z.setVal("PHD2",2*M),Z.setVal("PHD5",e.PHD5B),Z.setVal("PHN1",e.PHN1AB),Z.setVal("PHD3",e.PHD3B),Z.setVal("PHR4",e.PHR4B),Z.setVal("PHL2",e.PHL2B),Z.setVal("PHR6",e.PHR6B),Z.setVal("PHE1",e.PHE1B),Z.setVal("PHH1",e.PHH1B),Z.setVal("PHA",re(x)),Z.setVal("PHL1",D),Z.setVal("PHE2",e.E2),Z.setVal("PHE3",e.PHE3B);const ge=be.pGeom(0,Z.getParamVal(),Z.getSuffix());Le(ge),o.logstr+=He(ge.logstr,Z.getPartNameSuffix()),_.mergeFigure(ge.fig.faceOuter),g.mergeFigure(ge.fig.facePetal);const ue={outName:`inpax_${U}_hB1`,subdesign:"pax_vaxis_holderB1",subgeom:ge,rotate:[0,0,0],translate:[0,0,T]};p.push(ue),V.push(`inpax_${U}_hB1`);const ie=Se(be.pDef,"A");ie.setVal("PHD1",e.PHD1A),ie.setVal("PHD2",2*y),ie.setVal("PHD5",e.PHD5A),ie.setVal("PHN1",e.PHN1AB),ie.setVal("PHD3",e.PHD3A),ie.setVal("PHR4",e.PHR4A),ie.setVal("PHL2",e.PHL2A),ie.setVal("PHR6",e.PHR6A),ie.setVal("PHE1",e.PHE1A),ie.setVal("PHH1",e.PHH1A),ie.setVal("PHA",re(x)),ie.setVal("PHL1",E),ie.setVal("PHE2",e.E2),ie.setVal("PHE3",e.PHE3A);const ce=be.pGeom(0,ie.getParamVal(),ie.getSuffix());Le(ce),o.logstr+=He(ce.logstr,ie.getPartNameSuffix()),l.mergeFigure(ce.fig.faceOuter),f.mergeFigure(ce.fig.facePetal);const _e={outName:`inpax_${U}_hA`,subdesign:"pax_vaxis_holderA",subgeom:ce,rotate:[0,0,0],translate:[0,0,Y]};p.push(_e),V.push(`inpax_${U}_hA`),J={vaxis_holder_B2:{partName:A.getPartName(),dparam:A.getDesignParamList(),orientation:[0,0,0],position:[0,0,w]},vaxis_holder_B1:{partName:Z.getPartName(),dparam:Z.getDesignParamList(),orientation:[0,0,0],position:[0,0,T]},vaxis_holder_A:{partName:ie.getPartName(),dparam:ie.getDesignParamList(),orientation:[0,0,0],position:[0,0,Y]}}}o.fig={poleCut:i,poleFace:a,poleBottom:n,emptyPole:c,emptyDoor:d,holderB2Section:r,holderB2Top:h,holderB1Section:_,holderB1Top:g,holderASection:l,holderATop:f},o.vol={inherits:p,extrudes:[{outName:`subpax_${U}_pole`,face:`${U}_poleCut`,extrudeMethod:W.eRotate,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${U}_bottom`,face:`${U}_poleBottom`,extrudeMethod:W.eLinearOrtho,length:e.E1,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${U}_door`,face:`${U}_poleFace`,extrudeMethod:W.eLinearOrtho,length:S+e.E3,rotate:[Math.PI/2,0,0],translate:[0,0,0]},{outName:`subpax_${U}_emptyPole`,face:`${U}_emptyPole`,extrudeMethod:W.eLinearOrtho,length:e.H1,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${U}_emptyDoor`,face:`${U}_emptyDoor`,extrudeMethod:W.eLinearOrtho,length:S+e.E3+10,rotate:[Math.PI/2,0,0],translate:[0,0,0]}],volumes:[{outName:`ipax_${U}_door`,boolMethod:ne.eIntersection,inList:[`subpax_${U}_door`,`subpax_${U}_emptyPole`]},{outName:`ipax_${U}_pole`,boolMethod:ne.eSubstraction,inList:[`subpax_${U}_pole`,`subpax_${U}_emptyDoor`]},{outName:`pax_${U}`,boolMethod:ne.eUnion,inList:[`ipax_${U}_pole`,`subpax_${U}_bottom`,`ipax_${U}_door`,...V]}]},o.sub=J,o.logstr+=`pole_static drawn successfully!
|
|
41
|
-
`,o.calcErr=!1}catch(S){o.logstr+=S,console.log(S)}return o}var Ae={pTitle:"Heliostat pole static",pDescription:"The vertical pole of an heliostat",pDef:ot,pGeom:Ct},st={partName:"rake",params:[t("D1","mm",600,10,4e3,10),t("D2","mm",400,10,4e3,10),t("D3","mm",400,10,4e3,10),t("H1","mm",800,1,4e3,10),t("H2","mm",3e3,20,6e3,10),t("H3","mm",400,0,4e3,10),t("E1","mm",20,1,80,1),t("E3","mm",30,1,80,1),q("transversal"),t("H4","mm",400,10,1e3,10),t("D4","mm",300,10,1e3,10),t("E4","mm",20,1,80,1),t("H5","mm",1e3,10,2e3,10),t("D5","mm",200,1,1e3,10),t("L4","mm",300,1,1e3,10),t("L5","mm",2e3,10,4e3,10),t("L6","mm",2e3,1,4e3,10),t("D8","mm",400,1,1e3,10),q("diagonal"),t("D6","mm",100,1,600,10),t("E6","mm",10,1,80,1),t("L7","mm",100,1,1e3,1),t("L8","mm",200,1,1e3,1),q("base"),t("N1","",24,3,100,1),t("D7","mm",40,1,100,1),t("L1","mm",30,1,300,1),q("door"),t("H6","mm",100,1,1e3,10),t("H7","mm",600,10,2e3,10),t("L9","mm",300,1,1e3,10),t("R9","mm",50,0,300,1),t("doorOrientation","degree",0,-180,180,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",doorOrientation:"rake_door.svg"},sim:{tMax:180,tStep:.5,tUpdate:500}};function It(s,e,u=""){const o=he(st.partName+u),i=B(),a=B(),n=B(),c=B(),d=B(),r=B(),h=B(),_=B(),g=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
42
|
-
`;try{const l=e.D1/2,f=e.D2/2,S=e.D3/2,P=e.D4/2,C=e.D5/2,v=e.D6/2,x=e.D7/2,N=e.D8/2,b=e.H1+e.H2,D=b-e.H4+e.H5,L=4*e.L4+e.L5+2*e.L6,w=e.H1+e.H2-e.H4,M=P*Math.cos(Math.PI/6),T=P*Math.sin(Math.PI/6),E=C*Math.cos(Math.PI/6),y=C*Math.sin(Math.PI/6),Y=N*Math.cos(Math.PI/6),X=N*Math.sin(Math.PI/6),k=[-L/2,-e.L5/2-e.L4,e.L5/2,L/2-e.L4],O=e.H2-e.L8-e.H4-P,m=Math.atan2(l-f,e.H2),K=L/2-e.L7-l+e.L8*Math.tan(m),te=Math.sqrt(K**2+O**2),I=Math.atan2(K,O),oe=e.E1/Math.sin(I+m),j=te+e.E4/Math.cos(I)+oe,U=l-e.L8*Math.tan(m)-oe*Math.sin(I),p=e.H1+e.L8-oe*Math.cos(I),V=U-v*Math.cos(I),J=p+v*Math.sin(I),A=v-e.E6,R=U-e.E6*Math.cos(I),Q=p+e.E6*Math.sin(I),Z=Math.PI/2-I,ge=e.L9/2,ue=ge-e.H7*Math.tan(m);if(e.D2>e.D1)throw`err110: D2 ${e.D2} is larger than D1 ${e.D1}`;if(e.D3+e.E1>e.D1)throw`err113: D3 ${e.D3} is too large compare to D1 ${e.D1} and E1 ${e.E1}`;if(e.H3+e.E3>e.H1)throw`err116: H3 ${e.H3} is too large compare to H1 ${e.H1} and E3 ${e.E3}`;if(e.H4+P>e.H2)throw`err119: H4 ${e.H4} is too large compare to H2 ${e.H2} and D4 ${e.D4}`;if(e.E4>P)throw`err122: E4 ${e.E4} is too large compare to D4 ${e.D4}`;if(e.D8<=e.D5)throw`err146: D8 ${e.D8} is too small compare to D5 ${e.D5}`;if(O<0)throw`err140: H2 ${e.H2} too small compare to L8 ${e.L8}, H4 ${e.H4} and D4 ${e.D4}`;if(ue<e.R9)throw`err177: R9 ${e.R9} too large compare to doorHighX ${ue} and L9 ${e.L9}`;if(e.L9>e.D1)throw`err180: L9 ${e.L9} too large compare to D1 ${e.D1}`;o.logstr+=`cone-height: ${H(b)} mm
|
|
43
|
-
`,o.logstr+=`cone-height total: ${H(D)} mm
|
|
44
|
-
`,o.logstr+=`cone-angle: ${H(re(m))} degree
|
|
45
|
-
`,o.logstr+=`wing-angle: ${H(re(I))} degree
|
|
46
|
-
`;const ie=e.E1*Math.cos(m),ce=e.E1*Math.sin(m),_e=e.E1*Math.tan(m/2),Te=function(de){return G(de*l,0).addSegStrokeA(de*l,e.H1).addSegStrokeA(de*f,b).addSegStrokeA(de*(f-ie),b-ce).addSegStrokeA(de*(l-e.E1),e.H1-_e).addSegStrokeA(de*(l-e.E1),0).closeSegStroke()},$e=function(de){return G(de*l,0).addSegStrokeA(de*l,e.H1).addSegStrokeA(de*f,b).addSegStrokeA(de*(f-ie),b-ce).addSegStrokeA(de*(l-e.E1),e.H1-_e).addSegStrokeA(de*(l-e.E1),e.H1-e.H3).addSegStrokeA(de*S,e.H1-e.H3).addSegStrokeA(de*S,e.H1-e.H3-e.E3).addSegStrokeA(de*(l-e.E1),e.H1-e.H3-e.E3).addSegStrokeA(de*(l-e.E1),0).closeSegStroke()},Fe=w-P-(e.H1-_e),Oe=l-e.E1-Math.tan(m)*Fe,me=G(0,w-P).addSegStrokeA(Oe,w-P).addSegStrokeA(l-e.E1,e.H1-_e).addSegStrokeA(l-e.E1,e.H1-e.H3).addSegStrokeA(0,e.H1-e.H3).closeSegStroke(),De=G(ge,e.H1+e.H6).addCornerRounded(e.R9).addSegStrokeA(ue,e.H1+e.H6+e.H7).addCornerRounded(e.R9).addSegStrokeA(-ue,e.H1+e.H6+e.H7).addCornerRounded(e.R9).addSegStrokeA(-ge,e.H1+e.H6).addCornerRounded(e.R9).closeSegStroke();i.addMain(Te(1)),i.addSecond($e(1)),i.addSecond($e(-1)),i.addSecond(F(-L/2,w-P,L,e.D4)),i.addSecond(F(-L/2,w-P+e.E4,L,e.D4-2*e.E4));for(const de of k)i.addSecond(F(de,w+T,e.L4,e.H5-T-y));i.addSecond(xe(U,p,j,2*v,Z)),i.addSecond(xe(R,Q,j,2*A,Z)),i.addSecond(xe(-U,p,2*v,j,I)),i.addSecond(xe(-R,Q,2*A,j,I)),i.addSecond(De),a.mergeFigure(i,!0),a.addMain(me);const Pe=G(M,w+T).addSegStrokeA(Y,w+e.H5-X).addSegStrokeA(E,w+e.H5-y).addPointA(-E,w+e.H5-y).addSegArc(C,!1,!1).addSegStrokeA(-Y,w+e.H5-X).addSegStrokeA(-M,w+T).closeSegArc(P,!1,!1);n.addMain($(0,w,P)),n.addMain($(0,w,P-e.E4)),n.addSecond($e(1)),n.addSecond($e(-1)),n.addSecond(Pe),n.addSecond($(0,w+e.H5,C)),n.addSecond(F(-v,e.H1+e.L8,2*v,O)),n.addSecond(F(-A,e.H1+e.L8,2*A,O)),n.addSecond(De),c.addMain($(0,w,P-e.E4)),c.addSecond($(0,w,P)),c.addSecond(Pe),d.addMain($(0,0,l)),d.addMain($(0,0,S));const Ve=S+e.L1,Ce=2*Math.PI/e.N1;for(let de=0;de<e.N1;de++){const Ee=Ve*Math.cos(de*Ce),Xe=Ve*Math.sin(de*Ce);d.addMain($(Ee,Xe,x))}d.addSecond($(0,0,l-e.E1)),d.addSecond($(0,0,f)),d.addSecond(F(-P,-L/2,e.D4,L)),d.addSecond(F(-P+e.E4,-L/2,e.D4-2*e.E4,L));for(const de of k)d.addSecond(F(-M,de,2*M,e.L4)),d.addSecond(F(-E,de,2*E,e.L4)),d.addSecond(F(-Y,de,2*Y,e.L4));d.addSecond(F(-v,l-e.L8*Math.tan(m),2*v,K)),d.addSecond(F(-A,l-e.L8*Math.tan(m),2*A,K)),d.addSecond(F(-v,-l+e.L8*Math.tan(m)-K,2*v,K)),d.addSecond(F(-A,-l+e.L8*Math.tan(m)-K,2*A,K)),r.addMain(Pe),r.addSecond($(0,w,P)),r.addSecond($(0,w,P-e.E4)),r.addSecond($(0,w+e.H5,C)),h.addMain($(0,0,v)),h.addMain($(0,0,A)),_.addSecond($(0,0,v)),_.addMain($(0,0,A)),g.addMain(De),g.addSecond($e(1)),g.addSecond($e(-1)),g.addSecond(F(-L/2,w-P,L,e.D4)),g.addSecond(F(-L/2,w-P+e.E4,L,e.D4-2*e.E4));for(const de of k)g.addSecond(F(de,w+T,e.L4,e.H5-T-y));g.addSecond(xe(U,p,j,2*v,Z)),g.addSecond(xe(R,Q,j,2*A,Z)),g.addSecond(xe(-U,p,2*v,j,I)),g.addSecond(xe(-R,Q,2*A,j,I)),o.fig={faceCone:i,faceConeHollow:a,faceBeam:n,faceBeamHollow:c,faceDisc:d,faceHand:r,faceWing:h,faceWingHollow:_,faceDoor:g};const se=o.partName,ee=k.map((de,Ee)=>({outName:`subpax_${se}_hand_${Ee}`,face:`${se}_faceHand`,extrudeMethod:W.eLinearOrtho,length:e.L4,rotate:[Math.PI/2,0,0],translate:[0,-de,0]}));o.vol={extrudes:[{outName:`subpax_${se}_cone`,face:`${se}_faceCone`,extrudeMethod:W.eRotate,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${se}_coneHollow`,face:`${se}_faceConeHollow`,extrudeMethod:W.eRotate,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${se}_beam`,face:`${se}_faceBeam`,extrudeMethod:W.eLinearOrtho,length:L,rotate:[Math.PI/2,0,0],translate:[0,L/2,0]},{outName:`subpax_${se}_beamHollow`,face:`${se}_faceBeamHollow`,extrudeMethod:W.eLinearOrtho,length:L,rotate:[Math.PI/2,0,0],translate:[0,L/2,0]},{outName:`subpax_${se}_disc`,face:`${se}_faceDisc`,extrudeMethod:W.eLinearOrtho,length:e.E3,rotate:[0,0,0],translate:[0,0,e.H1-e.H3-e.E3]},{outName:`subpax_${se}_wing_right`,face:`${se}_faceWing`,extrudeMethod:W.eLinearOrtho,length:j,rotate:[-I,0,0],translate:[0,V,J]},{outName:`subpax_${se}_wing_left`,face:`${se}_faceWing`,extrudeMethod:W.eLinearOrtho,length:j,rotate:[I,0,0],translate:[0,-V,J]},{outName:`subpax_${se}_wing_hollow_right`,face:`${se}_faceWingHollow`,extrudeMethod:W.eLinearOrtho,length:j,rotate:[-I,0,0],translate:[0,V,J]},{outName:`subpax_${se}_wing_hollow_left`,face:`${se}_faceWingHollow`,extrudeMethod:W.eLinearOrtho,length:j,rotate:[I,0,0],translate:[0,-V,J]},{outName:`subpax_${se}_door`,face:`${se}_faceDoor`,extrudeMethod:W.eLinearOrtho,length:e.D1,rotate:[Math.PI/2,0,-Math.PI/2+Me(e.doorOrientation)],translate:[0,0,0]},...ee],volumes:[{outName:`ipax_${se}_plus`,boolMethod:ne.eUnion,inList:[`subpax_${se}_cone`,`subpax_${se}_beam`,`subpax_${se}_disc`,`subpax_${se}_hand_0`,`subpax_${se}_hand_1`,`subpax_${se}_hand_2`,`subpax_${se}_hand_3`,`subpax_${se}_wing_right`,`subpax_${se}_wing_left`]},{outName:`ipax_${se}_hollow`,boolMethod:ne.eUnion,inList:[`subpax_${se}_coneHollow`,`subpax_${se}_beamHollow`,`subpax_${se}_wing_hollow_right`,`subpax_${se}_wing_hollow_left`,`subpax_${se}_door`]},{outName:`pax_${se}`,boolMethod:ne.eSubstraction,inList:[`ipax_${se}_plus`,`ipax_${se}_hollow`]}]},o.sub={},o.logstr+=`heliostat-rake drawn successfully!
|
|
47
|
-
`,o.calcErr=!1}catch(l){o.logstr+=l,console.log(l)}return o}var Re={pTitle:"Heliostat rake",pDescription:"The rake on top of the V-Axis of the heliostat",pDef:st,pGeom:It},Ue={partName:"spider",params:[t("D1","mm",100,1,400,1),t("L1","mm",400,1,1e3,1),t("L2","mm",400,1,1e3,1),t("L3","mm",100,1,400,1),t("L4","mm",3e3,10,8e3,10),q("longitude"),t("L5","mm",2e3,1,8e3,1),t("N1","",6,1,20,1),t("L6","mm",30,1,100,1),q("thickness"),t("E1","mm",3,1,80,1),t("E2","mm",50,1,200,1),t("E3","mm",3,1,80,1),t("R2","mm",100,0,400,10)],paramSvg:{D1:"spider_profile.svg",L1:"spider_profile.svg",L2:"spider_profile.svg",L3:"spider_profile.svg",L4:"spider_profile.svg",L5:"spider_lateral.svg",L6:"spider_lateral.svg",E1:"spider_profile.svg",E2:"spider_profile.svg",E3:"spider_profile.svg",R2:"spider_profile.svg",N1:"spider_lateral.svg"},sim:{tMax:360,tStep:.5,tUpdate:500}};function Bt(s,e,u=""){const o=he(Ue.partName+u);let i,a;const n=B(),c=B(),d=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
48
|
-
`;try{const r=e.D1/2;if(e.D1<e.E2)throw`err476: D1 ${e.D1} smaller then E2 ${e.E2}`;const h=e.E2/2,_=Math.sqrt(r**2-h**2),g=e.L1+e.L2*Math.sqrt(2),l=e.L2+e.L1*Math.sqrt(2),f=e.L4-l;if(f<e.R2)throw`err984: L4 ${e.L4} too small compare to R2 ${e.R2}`;const S=f*Math.cos(Math.PI/4),P=f*Math.sin(Math.PI/4),C=e.E2*Math.cos(Math.PI/4),v=e.E2*Math.sin(Math.PI/4),x=e.E2*Math.tan(Math.PI/8);if(r<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 N=(e.L3-e.E2)/2*Math.cos(Math.PI/4),b=g+S+N,D=-e.L1-P+N,L=D-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 w=1;e.N1>1&&(w=(e.L5-e.L6)/(e.N1-1));const M=[...Array(e.N1).keys()].map(k=>k*w);i=function(k,O,m){return G(k,O).addSegStrokeA(k+m*Math.cos(Math.PI/4),O-m*Math.sin(Math.PI/4)).addSegStrokeA(k,O-2*m*Math.sin(Math.PI/4)).addSegStrokeA(k-m*Math.cos(Math.PI/4),O-m*Math.sin(Math.PI/4)).closeSegStroke()},a=function(k,O,m,K){return G(m,K).addSegStrokeA(m+k,K).addSegStrokeA(m+k,K+O).addSegStrokeA(m,K+O).closeSegStroke()};const T=Math.sin(2*Math.PI*s/Ue.sim.tMax)*Math.PI/2;o.logstr+=`spide leg number: ${e.N1}
|
|
49
|
-
`,o.logstr+=`spide position angle: ${H(re(T))} degree
|
|
50
|
-
`;const E=G(h,-_).addCornerRounded(e.R2).addSegStrokeA(h,-e.L1).addCornerRounded(e.R2).addSegStrokeA(g,-e.L1).addCornerRounded(e.R2+e.E2).addSegStrokeA(g+S,-e.L1-P).addSegStrokeA(g+S-C,-e.L1-P-v).addSegStrokeA(g-x,-e.L1-e.E2).addCornerRounded(e.R2).addSegStrokeA(-g+x,-e.L1-e.E2).addCornerRounded(e.R2).addSegStrokeA(-g-S+C,-e.L1-P-v).addSegStrokeA(-g-S,-e.L1-P).addSegStrokeA(-g,-e.L1).addCornerRounded(e.R2+e.E2).addSegStrokeA(-h,-e.L1).addCornerRounded(e.R2).addSegStrokeA(-h,-_).addCornerRounded(e.R2).closeSegArc(r,!0,!1);n.addMain(E),n.addMain($(0,0,r-e.E1)),n.addSecond(i(b,D,e.L3)),n.addSecond(i(b,L,e.L3-2*e.E3)),n.addSecond(i(-b,D,e.L3)),n.addSecond(i(-b,L,e.L3-2*e.E3)),c.addMain($(0,0,r)),c.addMain($(0,0,r-e.E1)),c.addMain(i(b,D,e.L3)),c.addMain(i(b,L,e.L3-2*e.E3)),c.addMain(i(-b,D,e.L3)),c.addMain(i(-b,L,e.L3-2*e.E3)),c.addSecond(E),d.addSecond(a(e.L5,e.D1,0,-e.D1/2)),d.addSecond(a(e.L5,e.L3,0,-e.L4-e.L3));for(const k of M)d.addSecond(a(e.L6,e.L4,k,-e.L4));o.fig={faceLegs:n.rotate(0,0,T),faceTube:c.rotate(0,0,T),faceBody:d};const y=o.partName,Y=M.map((k,O)=>({outName:`subpax_${y}_leg_${O}`,face:`${y}_faceLegs`,extrudeMethod:W.eLinearOrtho,length:e.L6,rotate:[0,0,0],translate:[0,0,k]})),X=M.map((k,O)=>`subpax_${y}_leg_${O}`);o.vol={extrudes:[{outName:`subpax_${y}_tube`,face:`${y}_faceTube`,extrudeMethod:W.eLinearOrtho,length:e.L5,rotate:[0,0,0],translate:[0,0,0]},...Y],volumes:[{outName:`pax_${y}`,boolMethod:ne.eUnion,inList:[`subpax_${y}_tube`,...X]}]},o.sub={},o.logstr+=`heliostat-spider drawn successfully!
|
|
51
|
-
`,o.calcErr=!1}catch(r){o.logstr+=r,console.log(r)}return o}var pe={pTitle:"Heliostat spider",pDescription:"The spider part for the control of the inclination of the heliostat",pDef:Ue,pGeom:Bt},nt={partName:"swing",params:[t("L1","mm",12500,100,4e4,10),t("L2","mm",6e3,100,4e4,10),q("radial"),t("D1","mm",400,1,1e3,1),t("E1","mm",5,1,80,1),t("H2","mm",100,1,400,1),t("H4","mm",100,1,400,1),t("E2","mm",3,1,80,1),t("L3","mm",500,1,4e3,1),q("radial"),t("L4","mm",600,1,4e3,1),t("L5","mm",2e3,1,1e4,1),t("L6","mm",2e3,1,1e4,1),t("H1","mm",100,1,400,1),t("H3","mm",100,1,400,1),t("E3","mm",3,1,80,1),q("buttress"),t("S1","mm",300,0,1e3,1),t("R2","mm",100,0,1e3,1),q("rod overlay"),t("rod1","",10,1,40,1),t("rod2","mm",1300,10,4e3,10),t("rod3","mm",400,10,1e3,10),t("rod4","mm",100,1,400,1)],paramSvg:{L1:"swing_top.svg",L2:"swing_top.svg",L3:"swing_top.svg",L4:"swing_top.svg",L5:"swing_top.svg",L6:"swing_top.svg",D1:"swing_top.svg",H1:"swing_top.svg",H2:"swing_top.svg",H3:"swing_side.svg",H4:"swing_side.svg",E1:"swing_side.svg",E2:"swing_side.svg",E3:"swing_face.svg",S1:"swing_buttress.svg",R2:"swing_buttress.svg",rod1:"swing_with_rod.svg",rod2:"swing_with_rod.svg",rod3:"swing_with_rod.svg",rod4:"swing_with_rod.svg"},sim:{tMax:180,tStep:.5,tUpdate:500}};function yt(s,e,u=""){const o=he(nt.partName+u),i=B(),a=B(),n=B(),c=B(),d=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
52
|
-
`;try{const r=e.D1/2;o.logstr+=`swing size: L1 ${H(e.L1)} x L2 ${H(e.L2)} mm
|
|
53
|
-
`,i.addMain($(0,0,r)),i.addMain($(0,0,r-e.E1));const h=[-e.L2/2,-e.L3-e.H2,e.L3,e.L2/2-e.H2];for(const M of h)i.addMain(F(M,r-e.H4,e.H2,e.H4)),i.addMain(F(M+e.E2,r-e.H4+e.E2,e.H2-2*e.E2,e.H4-2*e.E2));i.addSecond(F(-e.L2/2,r,e.L2,e.H3));const _=[];_.push(-e.L1/2),_.push(e.L1/2-e.H1);for(const M of[-e.L5/2-2*e.L4-e.L6,-e.L5/2-e.L4,e.L5/2,e.L5/2+e.L4+e.L6])for(const T of[0,e.L4-e.H1])_.push(M+T);for(const M of _)a.addMain(F(M,r,e.H1,e.H3)),a.addMain(F(M+e.E3,r+e.E3,e.H1-2*e.E3,e.H3-2*e.E3));a.addSecond(F(-e.L1/2,-r,e.L1,e.D1)),a.addSecond(F(-e.L1/2,r-e.H4,e.L1,e.H4));for(const M of _)n.addSecond(F(M,-e.L2/2,e.H1,e.L2));for(const M of h)n.addSecond(F(-e.L1/2,M,e.L1,e.H2));n.addSecond(F(-e.L1/2,-r,e.L1,e.D1));const l=2*Math.atan2(e.S1,r),f=le(0,0),P=le(0,r).rotate(f,l),C=G(-e.L3,r).addSegStrokeA(-e.S1,r).addCornerRounded(e.R2).addSegStrokeA(P.cx,P.cy).addPointA(0,-r).addPointA(-P.cx,P.cy).addSegArc2().addSegStrokeA(e.S1,r).addCornerRounded(e.R2).addSegStrokeA(e.L3,r).addSegStrokeA(e.L3,r+e.E3).addSegStrokeA(-e.L3,r+e.E3).closeSegStroke();c.addMain(C),c.addMain($(0,0,r-e.E1)),i.addSecond(C);for(const M of _)d.addMain(F(M,-e.L2/2,e.H1,e.L2));for(const M of h)d.addMain(F(-e.L1/2,M,e.L1,e.H2));d.addMain(F(-e.L1/2,-r,e.L1,e.D1));const v=-((e.rod1-1)*e.rod2+e.rod3)/2,x=(e.rod3-e.rod4)/2,N=e.rod3/2,b=1.2*e.L2,D=(b-N)/3,L=-b/2;for(let M=0;M<e.rod1;M++){const T=v+M*e.rod2;d.addSecond(F(T+x,L,e.rod4,b));for(let E=0;E<4;E++)d.addSecond(F(T,L+E*D,e.rod3,N,N/4))}o.fig={faceSide:i,faceFace:a,faceTop:n,faceButtress:c,faceTopWithRods:d};const w=o.partName;o.vol={extrudes:[{outName:`subpax_${w}_side`,face:`${w}_faceSide`,extrudeMethod:W.eLinearOrtho,length:e.L1,rotate:[0,0,0],translate:[0,0,-e.L1/2]},{outName:`subpax_${w}_face`,face:`${w}_faceFace`,extrudeMethod:W.eLinearOrtho,length:e.L2,rotate:[0,Math.PI/2,0],translate:[-e.L2/2,0,0]},..._.map((M,T)=>({outName:`subpax_${w}_buttress_${T}`,face:`${w}_faceButtress`,extrudeMethod:W.eLinearOrtho,length:e.H1,rotate:[0,0,0],translate:[0,0,M]}))],volumes:[{outName:`pax_${w}`,boolMethod:ne.eUnion,inList:[`subpax_${w}_side`,`subpax_${w}_face`,..._.map((M,T)=>`subpax_${w}_buttress_${T}`)]}]},o.sub={},o.logstr+=`heliostat-swing drawn successfully!
|
|
54
|
-
`,o.calcErr=!1}catch(r){o.logstr+=r,console.log(r)}return o}var Ne={pTitle:"Heliostat swing",pDescription:"The swing for the heliostat inclination",pDef:nt,pGeom:yt},We={partName:"heliostat",params:[t("H1","mm",3e3,10,4e4,10),t("H2","mm",2500,50,4e4,10),t("D1","mm",1e3,20,4e3,10),t("D2","mm",700,20,4e3,10),t("E1","mm",30,1,80,1),q("rake"),t("H3","mm",200,1,500,1),t("H4","mm",800,1,4e3,1),t("H5","mm",3e3,50,6e3,10),t("H6","mm",200,1,4e3,1),t("H7","mm",800,1,4e3,1),t("H8","mm",200,1,4e3,1),t("D3","mm",900,20,4e3,10),t("D4","mm",400,20,4e3,10),t("D5","mm",300,20,1e3,10),t("D6","mm",200,10,1e3,10),t("D7","mm",400,10,1e3,10),q("rake diagonal"),t("D9","mm",100,1,1e3,1),t("L7","mm",100,1,1e3,1),t("L8","mm",200,1,1e3,1),q("spider"),t("D8","mm",100,1,1e3,1),t("S1","mm",250,1,800,1),t("S2","mm",200,1,800,1),t("E2","mm",50,1,80,1),q("swing"),t("L1","mm",12500,100,4e4,10),t("L2","mm",6e3,100,4e4,10),t("L3","mm",100,1,500,1),t("L4","mm",600,1,4e3,1),t("L5","mm",2e3,10,6e3,1),t("L6","mm",2e3,1,6e3,1),t("H9","mm",100,1,400,1),q("motion amplitude"),t("al","degree",80,0,95,1),t("ar","degree",80,0,95,1)],paramSvg:{H1:"heliostat_overview.svg",H2:"heliostat_side.svg",H3:"heliostat_side_sizing.svg",H4:"heliostat_side_sizing.svg",H5:"heliostat_side_sizing.svg",H6:"heliostat_side_sizing.svg",H7:"heliostat_side_sizing.svg",H8:"heliostat_side_sizing.svg",H9:"heliostat_side_sizing.svg",D1:"heliostat_side_sizing.svg",D2:"heliostat_side_sizing.svg",D3:"heliostat_side_sizing.svg",D4:"heliostat_side_sizing.svg",D5:"heliostat_side_sizing.svg",D6:"heliostat_side_sizing.svg",D7:"heliostat_side_sizing.svg",D8:"heliostat_side_sizing.svg",D9:"heliostat_face_sizing.svg",S1:"heliostat_side_sizing.svg",S2:"heliostat_side_sizing.svg",E1:"heliostat_side_sizing.svg",E2:"heliostat_side_sizing.svg",L1:"heliostat_face_sizing.svg",L2:"heliostat_side_sizing.svg",L3:"heliostat_face_sizing.svg",L4:"heliostat_face_sizing.svg",L5:"heliostat_face_sizing.svg",L6:"heliostat_face_sizing.svg",L7:"heliostat_face_sizing.svg",L8:"heliostat_face_sizing.svg",al:"heliostat_side_sizing.svg",ar:"heliostat_side_sizing.svg"},sim:{tMax:100,tStep:.5,tUpdate:500}};function Tt(s,e,u=""){const o=he(We.partName+u),i=B(),a=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
55
|
-
`;try{const n=e.H1+e.H2-e.H3+e.H4+e.H5-e.H6+e.H7;o.logstr+=`heliostat-height: ${H(n)}, diameter ${H(e.D1)} m
|
|
56
|
-
`,o.logstr+=`heliostat-swing-length: ${H(e.L1)}, width ${H(e.L2)} m
|
|
57
|
-
`;const d=(e.al-e.ar)/2-Math.sin(2*Math.PI*s/We.sim.tMax)*(e.al+e.ar)/2,r=Me(d);o.logstr+=`swing position angle: ${H(re(r))} degree
|
|
58
|
-
`;const h=e.H1+e.H2-e.H3,_=h+e.H4+e.H5-e.H6+e.H7,g=_+e.H8,l=Se(Ae.pDef),f=Se(Re.pDef),S=Se(pe.pDef),P=Se(Ne.pDef);l.setVal("H1",e.H1),l.setVal("H2",e.H2),l.setVal("D1",e.D1),l.setVal("D2",e.D2),l.setVal("D3",e.D1-6*e.E1),l.setVal("E1",e.E1),l.setVal("E2",e.E1);const C=32,v=(e.D1-6*e.E1)/(C*4);l.setVal("N1",C),l.setVal("D5",v),l.setVal("L1",e.E1+v/2),l.setVal("H3",e.H1/4),l.setVal("H4",e.H1/2),l.setVal("D4",e.H1/4),l.setVal("L2",e.H1/80),l.setVal("E3",e.H1/80),l.setVal("holders",0),f.setVal("H1",e.H4),f.setVal("H2",e.H5),f.setVal("H3",e.H4-2*e.E1),f.setVal("D1",e.D3),f.setVal("D2",e.D4),f.setVal("L9",e.D3/2),f.setVal("H7",e.D3/2*1.6),f.setVal("H6",e.D3/20),f.setVal("R9",e.D3/20),f.setVal("E1",e.E1),f.setVal("E3",e.E1),f.setVal("E4",e.E1);const x=e.D2*.6,N=24,b=x/(N*4);if(f.setVal("D3",x),e.D2>e.D3-2*e.E1)throw`err153: D2 ${e.D2} too large compare to D3 ${e.D3} and E1 ${e.E1}`;if(f.setVal("N1",N),f.setVal("D7",b),f.setVal("L1",b),f.setVal("H4",e.H6),f.setVal("D4",e.D5),f.setVal("L7",e.L7),f.setVal("L8",e.L8),f.setVal("D6",e.D9),f.setVal("H5",e.H7+e.H8),f.setVal("D5",e.D6),f.setVal("D8",e.D7),e.D6>=e.D7)throw`err164: D6 ${e.D6} too large compare to D7 ${e.D7}`;const D=e.L4-2*e.L3;if(f.setVal("L4",D),D<=0)throw`err169: L3 ${e.L3} too large compare to L4 ${e.L4}`;f.setVal("L5",e.L5+2*e.L3),f.setVal("L6",e.L6+2*e.L3);const L=e.L5*.96,w=6;if(S.setVal("L5",L),S.setVal("D1",e.D8),S.setVal("L1",e.S1),S.setVal("L2",e.S2),S.setVal("L3",e.E2*2),S.setVal("E1",e.E1),S.setVal("E2",e.E2),S.setVal("E3",e.E1),S.setVal("L4",e.L2/2-e.H8),S.setVal("R2",0),S.setVal("N1",w),S.setVal("L6",L/(w*10)),P.setVal("L2",e.L2),P.setVal("D1",e.D6),P.setVal("H3",e.H9),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 M=Ae.pGeom(0,l.getParamVal(),l.getSuffix());Le(M),o.logstr+=He(M.logstr,l.getPartNameSuffix());const T=Re.pGeom(0,f.getParamVal(),f.getSuffix());Le(T),o.logstr+=He(T.logstr,f.getPartNameSuffix());const E=pe.pGeom(0,S.getParamVal(),S.getSuffix());Le(E),o.logstr+=He(E.logstr,S.getPartNameSuffix());const y=Ne.pGeom(0,P.getParamVal(),P.getSuffix());Le(y),o.logstr+=He(y.logstr,P.getPartNameSuffix()),i.mergeFigure(M.fig.poleCut),i.mergeFigure(T.fig.faceBeam.translate(0,h)),i.mergeFigure(E.fig.faceLegs.translate(0,_).rotate(0,_,r/2)),i.mergeFigure(y.fig.faceSide.translate(0,g).rotate(0,g,r)),a.mergeFigure(M.fig.poleCut),a.mergeFigure(T.fig.faceCone.translate(0,h)),a.mergeFigure(E.fig.faceBody.translate(-L/2,_)),a.mergeFigure(y.fig.faceFace.translate(0,g)),o.fig={faceSide:i,faceFace:a};const Y=o.partName;o.vol={inherits:[{outName:`inpax_${Y}_poleStatic`,subdesign:"pax_pole_static",subgeom:M,rotate:[0,0,0],translate:[0,0,0]},{outName:`inpax_${Y}_rake`,subdesign:"pax_rake",subgeom:T,rotate:[0,0,0],translate:[0,0,h]},{outName:`inpax_${Y}_swing`,subdesign:"pax_swing",subgeom:y,rotate:[Math.PI/2,0,0],translate:[0,0,g]},{outName:`inpax_${Y}_spider`,subdesign:"pax_spider",subgeom:E,rotate:[Math.PI/2,0,0],translate:[0,L/2,_]}],extrudes:[],volumes:[{outName:`pax_${Y}`,boolMethod:ne.eUnion,inList:[`inpax_${Y}_poleStatic`,`inpax_${Y}_rake`,`inpax_${Y}_swing`,`inpax_${Y}_spider`]}]};const X={partName:l.getPartName(),dparam:l.getDesignParamList(),orientation:[0,0,0],position:[0,0,0]},k={partName:f.getPartName(),dparam:f.getDesignParamList(),orientation:[0,0,0],position:[0,0,h]},O={partName:S.getPartName(),dparam:S.getDesignParamList(),orientation:[Math.PI/2,0,0],position:[0,L/2,_]},m={partName:P.getPartName(),dparam:P.getDesignParamList(),orientation:[Math.PI/2,0,0],position:[0,0,g]};o.sub={pole_static_1:X,rake_1:k,spider_1:O,swing_1:m},o.logstr+=`heliostat-overview drawn successfully!
|
|
59
|
-
`,o.calcErr=!1}catch(n){o.logstr+=n,console.log(n)}return o}var Ft={pTitle:"Heliostat overview",pDescription:"The heliostat inclination mechanism",pDef:We,pGeom:Tt},it={partName:"rake_stopper",params:[t("D1","mm",600,10,4e3,10),t("D2","mm",400,10,4e3,10),t("D3","mm",400,1,4e3,1),t("H1","mm",800,1,4e3,1),t("H2","mm",3e3,20,6e3,10),t("H3","mm",400,0,4e3,1),t("E1","mm",20,1,80,1),t("E3","mm",30,1,80,1),q("transversal"),t("H4","mm",200,1,1e3,1),t("D4","mm",300,1,1e3,1),t("E4","mm",20,1,80,1),t("H5","mm",400,1,2e3,1),t("D5","mm",200,1,1e3,1),t("L4","mm",300,1,1e3,1),t("L5","mm",2e3,1,4e3,1),t("L6","mm",2e3,1,4e3,1),t("D8","mm",400,1,1e3,1),q("diagonal"),t("D6","mm",100,1,600,1),t("E6","mm",10,1,80,1),t("L7","mm",100,1,1e3,1),t("L8","mm",200,1,1e3,1),q("base"),t("N1","",24,3,100,1),t("D7","mm",40,1,100,1),t("L1","mm",30,1,300,1),q("door"),t("H6","mm",100,1,1e3,1),t("H7","mm",600,1,2e3,1),t("L9","mm",300,1,1e3,1),t("R9","mm",50,0,300,1),t("doorOrientation","degree",0,-180,180,1),q("stoppers"),t("S1","mm",100,1,300,1),t("S2","mm",2e3,1,8e3,1),t("S3","mm",100,0,8e3,1),t("E7","mm",5,1,80,1),q("low stopper"),t("JD1","mm",200,1,500,1),t("JE1","mm",5,1,80,1),t("JL1","mm",260,1,2e3,1),t("JH1","mm",20,-500,500,1),t("JS1","mm",100,1,500,1),t("JS2","mm",200,1,500,1),q("high stopper"),t("JD3","mm",200,1,500,1),t("JE3","mm",5,1,80,1),t("JS3","mm",120,1,500,1),t("JD4","mm",200,1,500,1),t("JE4","mm",5,1,80,1),t("JS4","mm",120,1,500,1)],paramSvg:{D1:"rake_face.svg",D2:"rake_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",doorOrientation:"rake_door.svg",S1:"rake_side_stopper.svg",S2:"rake_top_stopper.svg",S3:"rake_side_stopper.svg",E7:"rake_side_stopper.svg",JD1:"rake_low_stopper_holder.svg",JE1:"rake_low_stopper_holder.svg",JL1:"rake_low_stopper_holder.svg",JH1:"rake_low_stopper_holder.svg",JS1:"rake_side_stopper.svg",JS2:"rake_top_stopper.svg",JD3:"rake_side_stopper.svg",JE3:"rake_side_stopper.svg",JS3:"rake_top_stopper.svg",JD4:"rake_top_stopper.svg",JE4:"rake_top_stopper.svg",JS4:"rake_side_stopper.svg"},sim:{tMax:180,tStep:.5,tUpdate:500}};function Ot(s,e,u=""){const o=he(it.partName+u),i=B(),a=B(),n=B(),c=B(),d=B(),r=B(),h=B(),_=B(),g=B(),l=B(),f=B(),S=B(),P=B(),C=B(),v=B(),x=B(),N=B(),b=B(),D=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
60
|
-
`;try{const L=e.D1/2,w=e.H1+e.H2,M=w-e.H4+e.H5,T=M-e.S2,E=e.H1+e.H2-e.H4,y=E+e.D4/2,Y=e.H1+e.S3,X=e.L5/2,k=e.S1/2,O=e.S1-2*e.E7,m=O/2,K=-L-e.S1/2-e.JS1,te=e.S2-k,I=T-k,oe=T-e.JH1,j=e.JD1/2,U=j-e.JE1,p=L+e.JS2,V=e.JD3/2,J=e.JD4/2,A=X-k;if(2*e.E7>=e.S1)throw`err135: E7 ${e.E7} too large compare to S1 ${e.S1}`;if(e.L5<e.D2)throw`err138: L5 ${e.L5} too small compare to D2 ${e.D2}`;if(T-e.JH1-e.JD1/2<0)throw`err143: S2 ${e.S2} too large compare to H1H5 ${H(M)}`;if(e.JS1<e.S1/2)throw`err144: JS1 ${e.JS1} too small compare to S1 ${e.S1}`;if(e.JE1>e.JD1/2)throw`err145: JE1 ${e.JE1} too large compare to JD1 ${e.JD1}`;if(e.JL1>e.D1)throw`err146: JL1 ${e.JL1} too large compare to D1 ${e.D1}`;if(e.JL1<e.JD1)throw`err147: JL1 ${e.JL1} too small compare to JD1 ${e.JD1}`;if(Math.abs(e.JH1)>e.JD1/2+k)throw`err148: JH1 ${e.JH1} too large compare to JD1 ${e.JD1} and S1 ${e.S1}`;if(e.JS2<e.JS1-k)throw`err149: JS2 ${e.JS2} too small compare to JS1 ${e.JS1} and S1 ${e.S1}`;if(e.S3>e.H2-e.H4)throw`err150: S3 ${e.S3} too large compare to H2 ${e.H2} and H4 ${e.H4}`;if(e.JE3>e.JD3/2)throw`err151: JE3 ${e.JE3} too large compare to JD3 ${e.JD3}`;if(e.JE4>e.JD4/2)throw`err152: JE4 ${e.JE4} too large compare to JD4 ${e.JD4}`;o.logstr+=`cone-height: ${H(w)} mm
|
|
61
|
-
`,o.logstr+=`cone-height total: ${H(M)} mm
|
|
62
|
-
`,x.addSecond(F(-X,I,e.L5,e.S1)),x.addSecond(F(-X,I+e.E7,e.L5,O)),x.addMain($(-e.JL1/2,oe,j)),x.addMain($(-e.JL1/2,oe,U)),x.addMain($(e.JL1/2,oe,j)),x.addMain($(e.JL1/2,oe,U));const R=Se(Re.pDef);R.setVal("D1",e.D1),R.setVal("D2",e.D2),R.setVal("D3",e.D3),R.setVal("H1",e.H1),R.setVal("H2",e.H2),R.setVal("H3",e.H3),R.setVal("E1",e.E1),R.setVal("E3",e.E3),R.setVal("H4",e.H4),R.setVal("D4",e.D4),R.setVal("E4",e.E4),R.setVal("H5",e.H5),R.setVal("D5",e.D5),R.setVal("L4",e.L4),R.setVal("L5",e.L5),R.setVal("L6",e.L6),R.setVal("D6",e.D6),R.setVal("E6",e.E6),R.setVal("L7",e.L7),R.setVal("L8",e.L8),R.setVal("N1",e.N1),R.setVal("D7",e.D7),R.setVal("L1",e.L1),R.setVal("D8",e.D8),R.setVal("H6",e.H6),R.setVal("H7",e.H7),R.setVal("L9",e.L9),R.setVal("R9",e.R9),R.setVal("doorOrientation",e.doorOrientation);const Q=Re.pGeom(0,R.getParamVal(),R.getSuffix());Le(Q),o.logstr+=He(Q.logstr,R.getPartNameSuffix()),i.mergeFigure(Q.fig.faceCone),i.mergeFigure(x,!0),a.mergeFigure(Q.fig.faceBeam),n.mergeFigure(Q.fig.faceBeamHollow),c.mergeFigure(Q.fig.faceDisc),d.mergeFigure(Q.fig.faceHand),r.mergeFigure(Q.fig.faceWing),h.mergeFigure(Q.fig.faceWingHollow),_.mergeFigure(Q.fig.faceDoor),_.mergeFigure(x,!0),g.mergeFigure(Q.fig.faceDisc,!0),g.addMain(F(K,-X,e.S1,e.L5)),g.addMain(F(K+e.E7,-X,O,e.L5)),g.addMain(F(e.S2-e.S1,-X,e.S1,e.L5)),g.addMain(F(e.S2-e.E7-O,-X,O,e.L5)),g.addMain(F(0,-X,te,e.S1)),g.addMain(F(0,-X+e.E7,te,O)),g.addMain(F(0,X-e.S1,te,e.S1)),g.addMain(F(0,X-e.S1+e.E7,te,O)),g.addMain(F(0,-L-e.S1,te,e.S1)),g.addMain(F(0,-L-e.S1+e.E7,te,O)),g.addMain(F(0,L,te,e.S1)),g.addMain(F(0,L+e.E7,te,O)),g.addSecond(F(-p,-e.JL1/2-j,p,2*j)),g.addSecond(F(-p,-e.JL1/2-U,p,2*U)),g.addSecond(F(-p,e.JL1/2-j,p,2*j)),g.addSecond(F(-p,e.JL1/2-U,p,2*U));const Z=L+e.JS3,ge=e.JD3-2*e.JE3;g.addSecond(F(-e.JD3/2,-Z,e.JD3,Z)),g.addSecond(F(-e.JD3/2+e.JE3,-Z,ge,Z)),g.addSecond(F(-e.JD3/2,0,e.JD3,Z)),g.addSecond(F(-e.JD3/2+e.JE3,0,ge,Z)),l.mergeFigure(Q.fig.faceBeam,!0),l.addMain($(-L-e.JS1,T,k)),l.addMain($(-L-e.JS1,T,m)),l.addMain($(te,y+k,k)),l.addMain($(te,y+k,m)),l.addSecond(F(0,y,te,e.S1)),l.addSecond(F(0,y+e.E7,te,O));const ue=y+k-Y,ie=Math.sqrt(te**2+ue**2),ce=Math.atan2(ue,te);o.logstr+=`stopper-rod: L ${H(ie)} mm, A ${H(re(ce))} degree
|
|
63
|
-
`;const _e=k*Math.sin(ce),Te=k*Math.cos(ce),$e=Y-Te;l.addSecond(xe(_e,$e,ie,e.S1,ce));const Fe=m*Math.sin(ce),Oe=m*Math.cos(ce),me=Y-Oe;l.addSecond(xe(Fe,me,ie,O,ce)),l.addSecond(F(-p,oe-j,p,2*j)),l.addSecond(F(-p,oe-U,p,2*U)),l.addSecond($(0,Y,e.JD3/2)),l.addSecond($(0,Y,e.JD3/2-e.JE3));const De=e.D4/2+e.JS4,Pe=e.JD4/2-e.JE4;l.addSecond(F(-e.JD4/2,E,e.JD4,De)),l.addSecond(F(-Pe,E,2*Pe,De)),f.mergeFigure(l,!0),f.addMain($(-L-e.JS1,T,m)),f.addMain($(e.S2-k,y+k,m)),S.mergeFigure(Q.fig.faceCone,!0),S.mergeFigure(x,!0),S.addMain($(-e.L5/2+k,y+k,k)),S.addMain($(-e.L5/2+k,y+k,m)),S.addMain($(e.L5/2-k,y+k,k)),S.addMain($(e.L5/2-k,y+k,m)),P.mergeFigure(Q.fig.faceCone,!0),P.mergeFigure(x,!0),P.addSecond($(-e.L5/2+k,y+k,k)),P.addMain($(-e.L5/2+k,y+k,m)),P.addSecond($(e.L5/2-k,y+k,k)),P.addMain($(e.L5/2-k,y+k,m)),C.mergeFigure(Q.fig.faceCone,!0),C.mergeFigure(x,!0),C.addMain($(-L-k,0,k)),C.addMain($(-L-k,0,m)),C.addMain($(L+k,0,k)),C.addMain($(L+k,0,m)),v.mergeFigure(Q.fig.faceCone,!0),v.mergeFigure(x,!0),v.addSecond($(-L-k,0,k)),v.addMain($(-L-k,0,m)),v.addSecond($(L+k,0,k)),v.addMain($(L+k,0,m)),N.mergeFigure(Q.fig.faceCone,!0),N.mergeFigure(x);const Ve=-A-Pe,Ce=A-Pe,se=Y-ge/2;N.addSecond(F(-A-J,E,e.JD4,De)),N.addSecond(F(Ve,E,2*Pe,De)),N.addSecond(F(A-J,E,e.JD4,De)),N.addSecond(F(Ce,E,2*Pe,De)),N.addSecond(F(-Z,Y-V,Z,e.JD3)),N.addSecond(F(-Z,se,Z,ge)),N.addSecond(F(0,Y-V,Z,e.JD3)),N.addSecond(F(0,Y-ge/2,Z,ge)),b.mergeFigure(l,!0),b.addMain($(0,Y,e.JD3/2)),b.addMain($(0,Y,e.JD3/2-e.JE3)),D.mergeFigure(g,!0),D.addMain($(0,-A,J)),D.addMain($(0,-A,J-e.JE4)),D.addMain($(0,A,J)),D.addMain($(0,A,J-e.JE4)),o.fig={faceCone:i,faceBeam:a,faceBeamHollow:n,faceDisc:c,faceHand:d,faceWing:r,faceWingHollow:h,faceDoor:_,faceStopperTop:g,faceStopperSide:l,faceStopperSideH:f,faceStopperFaceT:S,faceStopperFaceTH:P,faceStopperFaceB:C,faceStopperFaceBH:v,faceLowStopperHolder:N,faceHi1StopperHolder:b,faceHi2StopperHolder:D};const ee=o.partName;o.vol={inherits:[{outName:`inpax_${ee}_rake`,subdesign:"pax_rake",subgeom:Q,rotate:[0,0,0],translate:[0,0,0]},{outName:`inpax_${ee}_coneHollow`,subdesign:"subpax_rake_coneHollow",subgeom:Q,rotate:[0,0,0],translate:[0,0,0]},{outName:`inpax_${ee}_beamHollow`,subdesign:"subpax_rake_beamHollow",subgeom:Q,rotate:[0,0,0],translate:[0,0,0]}],extrudes:[{outName:`subpax_${ee}_stpSide`,face:`${ee}_faceStopperSide`,extrudeMethod:W.eLinearOrtho,length:e.L5,rotate:[Math.PI/2,0,0],translate:[0,e.L5/2,0]},{outName:`subpax_${ee}_stpSideH`,face:`${ee}_faceStopperSideH`,extrudeMethod:W.eLinearOrtho,length:e.L5,rotate:[Math.PI/2,0,0],translate:[0,e.L5/2,0]},{outName:`subpax_${ee}_stpFaceT`,face:`${ee}_faceStopperFaceT`,extrudeMethod:W.eLinearOrtho,length:te,rotate:[Math.PI/2,0,Math.PI/2],translate:[0,0,0]},{outName:`subpax_${ee}_stpFaceTH`,face:`${ee}_faceStopperFaceTH`,extrudeMethod:W.eLinearOrtho,length:te,rotate:[Math.PI/2,0,Math.PI/2],translate:[0,0,0]},{outName:`subpax_${ee}_stpFaceB`,face:`${ee}_faceStopperFaceB`,extrudeMethod:W.eLinearOrtho,length:ie,rotate:[Math.PI/2-ce,0,Math.PI/2],translate:[0,0,Y]},{outName:`subpax_${ee}_stpFaceBH`,face:`${ee}_faceStopperFaceBH`,extrudeMethod:W.eLinearOrtho,length:ie,rotate:[Math.PI/2-ce,0,Math.PI/2],translate:[0,0,Y]},{outName:`subpax_${ee}_lowSH`,face:`${ee}_faceLowStopperHolder`,extrudeMethod:W.eLinearOrtho,length:p,rotate:[Math.PI/2,0,-Math.PI/2],translate:[0,0,0]},{outName:`subpax_${ee}_Hi1SH1`,face:`${ee}_faceHi1StopperHolder`,extrudeMethod:W.eLinearOrtho,length:Z,rotate:[Math.PI/2,0,0],translate:[0,0,0]},{outName:`subpax_${ee}_Hi1SH2`,face:`${ee}_faceHi1StopperHolder`,extrudeMethod:W.eLinearOrtho,length:Z,rotate:[Math.PI/2,0,Math.PI],translate:[0,0,0]},{outName:`subpax_${ee}_Hi2SH`,face:`${ee}_faceHi2StopperHolder`,extrudeMethod:W.eLinearOrtho,length:De,rotate:[0,0,0],translate:[0,0,E]}],volumes:[{outName:`ipax_${ee}_plus`,boolMethod:ne.eUnion,inList:[`subpax_${ee}_stpSide`,`subpax_${ee}_stpFaceT`,`subpax_${ee}_stpFaceB`,`subpax_${ee}_lowSH`,`subpax_${ee}_Hi1SH1`,`subpax_${ee}_Hi1SH2`,`subpax_${ee}_Hi2SH`]},{outName:`ipax_${ee}_hollow`,boolMethod:ne.eUnion,inList:[`inpax_${ee}_coneHollow`,`inpax_${ee}_beamHollow`,`subpax_${ee}_stpSideH`,`subpax_${ee}_stpFaceTH`,`subpax_${ee}_stpFaceBH`]},{outName:`ipax_${ee}_stopper`,boolMethod:ne.eSubstraction,inList:[`ipax_${ee}_plus`,`ipax_${ee}_hollow`]},{outName:`pax_${ee}`,boolMethod:ne.eUnion,inList:[`inpax_${ee}_rake`,`ipax_${ee}_stopper`]}]},o.sub={},o.logstr+=`heliostat-rake drawn successfully!
|
|
64
|
-
`,o.calcErr=!1}catch(L){o.logstr+=L,console.log(L)}return o}var qe={pTitle:"Heliostat rake with stopper",pDescription:"The rake-stopper on top of the V-Axis of the heliostat",pDef:it,pGeom:Ot},Ye={partName:"heliostat_2",params:[t("H1","mm",3e3,10,4e4,10),t("H2","mm",2500,50,4e4,10),t("D1","mm",1e3,20,4e3,10),t("D2","mm",700,20,4e3,10),t("E1","mm",30,1,80,1),q("rake"),t("H3","mm",200,1,500,1),t("H4","mm",800,1,4e3,1),t("H5","mm",3e3,50,6e3,10),t("H6","mm",200,1,4e3,1),t("H7","mm",400,1,4e3,1),t("D3","mm",900,20,4e3,10),t("D4","mm",400,20,4e3,10),t("D5","mm",300,20,1e3,10),t("D6","mm",200,10,1e3,10),t("D7","mm",400,10,1e3,10),q("rake diagonal"),t("D9","mm",100,1,1e3,1),t("L7","mm",100,1,1e3,1),t("L8","mm",200,1,1e3,1),q("rake stopper"),t("S1","mm",100,1,800,1),q("swing"),t("L1","mm",12500,100,4e4,10),t("L2","mm",6e3,100,4e4,10),t("L3","mm",100,1,500,1),t("L4","mm",600,1,4e3,1),t("L5","mm",2e3,10,6e3,10),t("L6","mm",2e3,1,6e3,1),t("H9","mm",100,1,400,1),q("motion amplitude"),t("al","degree",80,0,95,1)],paramSvg:{H1:"heliostat_overview.svg",H2:"heliostat_side.svg",H3:"heliostat2_side_sizing.svg",H4:"heliostat2_side_sizing.svg",H5:"heliostat2_side_sizing.svg",H6:"heliostat2_side_sizing.svg",H7:"heliostat2_side_sizing.svg",H9:"heliostat2_side_sizing.svg",D1:"heliostat2_side_sizing.svg",D2:"heliostat2_side_sizing.svg",D3:"heliostat2_side_sizing.svg",D4:"heliostat2_side_sizing.svg",D5:"heliostat2_side_sizing.svg",D6:"heliostat2_side_sizing.svg",D7:"heliostat2_side_sizing.svg",D9:"heliostat2_face_sizing.svg",E1:"heliostat2_side_sizing.svg",L1:"heliostat2_face_sizing.svg",L2:"heliostat2_side_sizing.svg",L3:"heliostat2_face_sizing.svg",L4:"heliostat2_face_sizing.svg",L5:"heliostat2_face_sizing.svg",L6:"heliostat2_face_sizing.svg",L7:"heliostat2_face_sizing.svg",L8:"heliostat2_face_sizing.svg",al:"heliostat2_side_sizing.svg",S1:"heliostat2_side_sizing.svg"},sim:{tMax:100,tStep:.5,tUpdate:500}};function mt(s,e,u=""){const o=he(Ye.partName+u),i=B(),a=B(),n=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
65
|
-
`;try{const c=e.H1+e.H2-e.H3+e.H4+e.H5-e.H6+e.H7;o.logstr+=`heliostat-height: ${H(c)}, diameter ${H(e.D1)} m
|
|
66
|
-
`,o.logstr+=`heliostat-swing-length: ${H(e.L1)}, width ${H(e.L2)} m
|
|
67
|
-
`;const d=e.al*s/Ye.sim.tMax,r=Me(d);o.logstr+=`swing position angle: ${H(re(r))} degree
|
|
68
|
-
`;const h=e.H1+e.H2-e.H3,_=h+e.H4+e.H5-e.H6+e.H7,g=Se(Ae.pDef),l=Se(qe.pDef),f=Se(Ne.pDef);g.setVal("H1",e.H1),g.setVal("H2",e.H2),g.setVal("D1",e.D1),g.setVal("D2",e.D2),g.setVal("D3",e.D1-6*e.E1),g.setVal("E1",e.E1),g.setVal("E2",e.E1);const S=32,P=(e.D1-6*e.E1)/(S*4);g.setVal("N1",S),g.setVal("D5",P),g.setVal("L1",e.E1+P/2),g.setVal("H3",e.H1/4),g.setVal("H4",e.H1/2),g.setVal("D4",e.H1/4),g.setVal("L2",e.H1/80),g.setVal("E3",e.H1/80),g.setVal("holders",0),l.setVal("H1",e.H4),l.setVal("H2",e.H5),l.setVal("H3",e.H4-2*e.E1),l.setVal("D1",e.D3),l.setVal("D2",e.D4),l.setVal("L9",e.D3/2),l.setVal("H7",e.D3/2*1.6),l.setVal("H6",e.D3/20),l.setVal("R9",e.D3/20),l.setVal("E1",e.E1),l.setVal("E3",e.E1),l.setVal("E4",e.E1),l.setVal("E6",e.E1),l.setVal("E7",e.E1);const C=e.D2*.6,v=24,x=C/(v*4);if(l.setVal("D3",C),e.D2>e.D3-2*e.E1)throw`err153: D2 ${e.D2} too large compare to D3 ${e.D3} and E1 ${e.E1}`;if(l.setVal("N1",v),l.setVal("D7",x),l.setVal("L1",x),l.setVal("H4",e.H6),l.setVal("D4",e.D5),l.setVal("L7",e.L7),l.setVal("L8",e.L8),l.setVal("D6",e.D9),l.setVal("H5",e.H7),l.setVal("D5",e.D6),l.setVal("D8",e.D7),e.D6>=e.D7)throw`err164: D6 ${e.D6} too large compare to D7 ${e.D7}`;const N=e.L4-2*e.L3;if(l.setVal("L4",N),N<=0)throw`err169: L3 ${e.L3} too large compare to L4 ${e.L4}`;if(l.setVal("L5",e.L5+2*e.L3),l.setVal("L6",e.L6+2*e.L3),l.setVal("S1",e.S1),l.setVal("S2",e.L2/2),f.setVal("L2",e.L2),f.setVal("D1",e.D6),f.setVal("H3",e.H9),f.setVal("H4",e.H9),f.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}`;f.setVal("H1",e.L3),f.setVal("H2",e.L3),f.setVal("L4",e.L4),f.setVal("L5",e.L5),f.setVal("L6",e.L6),f.setVal("L3",e.D7);const b=Ae.pGeom(0,g.getParamVal(),g.getSuffix());Le(b),o.logstr+=He(b.logstr,g.getPartNameSuffix());const D=qe.pGeom(0,l.getParamVal(),l.getSuffix());Le(D),o.logstr+=He(D.logstr,l.getPartNameSuffix());const L=Ne.pGeom(0,f.getParamVal(),f.getSuffix());Le(L),o.logstr+=He(L.logstr,f.getPartNameSuffix()),i.mergeFigure(b.fig.poleCut),i.mergeFigure(D.fig.faceStopperSide.translate(0,h)),i.mergeFigure(L.fig.faceSide.translate(0,_).rotate(0,_,r)),a.mergeFigure(b.fig.poleCut),a.mergeFigure(D.fig.faceStopperFaceT.translate(0,h)),a.mergeFigure(L.fig.faceFace.translate(0,_)),n.mergeFigure(b.fig.poleBottom.translate(0,0)),n.mergeFigure(D.fig.faceStopperTop.translate(0,0)),n.mergeFigure(L.fig.faceTop.rotate(0,0,Math.PI/2)),o.fig={faceSide:i,faceFace:a,faceTop:n};const w=o.partName;o.vol={inherits:[{outName:`inpax_${w}_poleStatic`,subdesign:"pax_pole_static",subgeom:b,rotate:[0,0,0],translate:[0,0,0]},{outName:`inpax_${w}_rake`,subdesign:"pax_rake_stopper",subgeom:D,rotate:[0,0,0],translate:[0,0,h]},{outName:`inpax_${w}_swing`,subdesign:"pax_swing",subgeom:L,rotate:[Math.PI/2,0,0],translate:[0,0,_]}],extrudes:[],volumes:[{outName:`pax_${w}`,boolMethod:ne.eUnion,inList:[`inpax_${w}_poleStatic`,`inpax_${w}_rake`,`inpax_${w}_swing`]}]};const M=g.getDesignParamList(),T={partName:g.getPartName(),dparam:M,orientation:[0,0,0],position:[0,0,0]},E={partName:l.getPartName(),dparam:l.getDesignParamList(),orientation:[0,0,0],position:[0,0,h]},y={partName:f.getPartName(),dparam:f.getDesignParamList(),orientation:[0,0,0],position:[0,0,_]};o.sub={pole_static_1:T,rake_1:E,swing_1:y},o.logstr+=`heliostat-2-overview drawn successfully!
|
|
69
|
-
`,o.calcErr=!1}catch(c){o.logstr+=c,console.log(c)}return o}var Jt={pTitle:"Heliostat-2 overview",pDescription:"The heliostat-2 inclination mechanism",pDef:Ye,pGeom:mt},dt={partName:"base",params:[t("D1","mm",600,10,4e3,10),t("D2","mm",700,10,4e3,10),t("D3","mm",400,10,4e3,10),t("D4","mm",500,10,4e3,10),t("E1","mm",30,1,80,1),t("E2","mm",30,1,80,1),t("E3","mm",30,1,80,1),t("H1","mm",800,10,4e3,10),t("H2","mm",50,1,4e3,1),q("side holes"),t("H3","mm",400,10,4e3,10),t("N2","",12,1,100,1),t("L2","mm",100,1,400,1),q("base holes"),t("N1","",24,3,100,1),t("D5","mm",40,1,100,1),t("L1","mm",34,1,300,1)],paramSvg:{D1:"base_cut.svg",D2:"base_cut.svg",D3:"base_cut.svg",D4:"base_cut.svg",E1:"base_cut.svg",E2:"base_cut.svg",E3:"base_cut.svg",H1:"base_cut.svg",H2:"base_hollow.svg",H3:"base_hollow.svg",N2:"base_hollow.svg",L2:"base_hollow.svg",N1:"base_top.svg",D5:"base_top.svg",L1:"base_top.svg"},sim:{tMax:180,tStep:.5,tUpdate:500}};function zt(s,e,u=""){const o=he(dt.partName+u);let i,a,n;const c=B(),d=B(),r=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
70
|
-
`;try{const h=e.D1/2,_=e.D2/2,g=e.D3/2,l=e.D4/2,f=e.D5/2,S=e.L2/2;if(_<h)throw`err089: D2 ${e.D2} too small compare to D1 ${e.D1}`;if(l>h-e.E2)throw`err189: D4 ${e.D4} too large compare to D1 ${e.D1} and E2 ${e.E2}`;o.logstr+=`base-height: ${H(e.H1)} mm
|
|
71
|
-
`,o.logstr+=`base-external-diameter: ${H(e.D2)} mm
|
|
72
|
-
`;const P=e.D1*Math.PI/e.N2-e.L2;if(o.logstr+=`inter-hollow: ${H(P)} mm
|
|
73
|
-
`,i=function(E){return G(E*_,0).addSegStrokeA(E*_,e.E3).addSegStrokeA(E*h,e.E3).addSegStrokeA(E*h,e.H1).addSegStrokeA(E*(h-e.E2),e.H1).addSegStrokeA(E*(h-e.E2),e.E3).addSegStrokeA(E*l,e.E3).addSegStrokeA(E*l,0).closeSegStroke()},a=function(E){return G(E*_,0).addSegStrokeA(E*_,e.E3).addSegStrokeA(E*h,e.E3).addSegStrokeA(E*h,e.H1).addSegStrokeA(E*g,e.H1).addSegStrokeA(E*g,e.H1-e.E1).addSegStrokeA(E*(h-e.E2),e.H1-e.E1).addSegStrokeA(E*(h-e.E2),e.E3).addSegStrokeA(E*l,e.E3).addSegStrokeA(E*l,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 C=2*Math.asin(S/(h-e.E2));if(e.N2*C>2*Math.PI)throw`err132: N2 ${e.N2} too large compare to L2 ${e.L2}, D1 ${e.D1}, E2 ${e.E2}`;const v=e.E3+e.H2+S;if(n=function(E){return G(E*S,v).addSegStrokeA(E*S,v+e.H3-e.L2).addPointA(-E*S,v+e.H3-e.L2).addSegArc(S,!1,!0).addSegStrokeA(-E*S,v).closeSegArc(S,!1,!0)},c.addMain(i(1)),c.addSecond(a(1)),c.addSecond(a(-1)),c.addSecond(n(1)),g+e.L1+f>h-e.E2)throw`err127: D3 ${e.D3} too large compare to D1 ${e.D1}, E2 ${e.E2}, L1 ${e.L1}, R5 ${e.D5}`;if(f>e.L1)throw`err130: D5 ${e.D5} too large compare to L1 ${e.L1}`;const x=2*Math.asin(f/(_+e.L1));if(e.N1*x>2*Math.PI)throw`err134: N1 ${e.N1} too large compare to D5 ${e.D5}, L1 ${e.L1}, D2 ${e.D2}`;d.addMain($(0,0,h)),d.addMain($(0,0,g));const N=g+e.L1,b=2*Math.PI/e.N1;for(let E=0;E<e.N1;E++){const y=N*Math.cos(E*b),Y=N*Math.sin(E*b);d.addMain($(y,Y,f))}d.addSecond($(0,0,h-e.E1)),d.addSecond($(0,0,_)),d.addSecond($(0,0,l)),r.addMain(n(1)),r.addSecond(a(1)),r.addSecond(a(-1)),o.fig={faceCut:c,faceTop:d,faceHollow:r};const D=o.partName,L=2*Math.PI/e.N2,w=[...Array(e.N2).keys()],M=w.map(E=>({outName:`subpax_${D}_hollow_${E}`,face:`${D}_faceHollow`,extrudeMethod:W.eLinearOrtho,length:_+e.E2,rotate:[Math.PI/2,0,E*L],translate:[0,0,0]})),T=w.map(E=>`subpax_${D}_hollow_${E}`);o.vol={extrudes:[{outName:`subpax_${D}_cut`,face:`${D}_faceCut`,extrudeMethod:W.eRotate,rotate:[0,0,0],translate:[Math.PI/2,0,0]},{outName:`subpax_${D}_top`,face:`${D}_faceTop`,extrudeMethod:W.eLinearOrtho,length:e.E1,rotate:[0,0,0],translate:[0,0,e.H1-e.E1]},...M],volumes:[{outName:`ipax_${D}_hollows`,boolMethod:ne.eUnion,inList:[...T]},{outName:`ipax_${D}_cylinder`,boolMethod:ne.eSubstraction,inList:[`subpax_${D}_cut`,`ipax_${D}_hollows`]},{outName:`pax_${D}`,boolMethod:ne.eUnion,inList:[`ipax_${D}_cylinder`,`subpax_${D}_top`]}]},o.sub={},o.logstr+=`heliostat-base drawn successfully!
|
|
74
|
-
`,o.calcErr=!1}catch(h){o.logstr+=h,console.log(h)}return o}var Gt={pTitle:"Heliostat base",pDescription:"The base for the static-pole of the heliostat",pDef:dt,pGeom:zt},lt={partName:"vaxis",params:[t("D1","mm",600,1,4e3,1),t("D2","mm",400,1,4e3,1),t("H1","mm",8e3,10,4e4,10),t("E1","mm",5,1,80,1),t("E2","mm",30,1,80,1),q("base holes"),t("N1","",24,3,100,1),t("D3","mm",40,1,100,1),t("L1","mm",45,1,300,1)],paramSvg:{D1:"vaxis_cut.svg",D2:"vaxis_cut.svg",H1:"vaxis_cut.svg",E1:"vaxis_cut.svg",E2:"vaxis_cut.svg",N1:"vaxis_ends.svg",D3:"vaxis_ends.svg",L1:"vaxis_ends.svg"},sim:{tMax:180,tStep:.5,tUpdate:500}};function Ut(s,e,u=""){const o=he(lt.partName+u);let i;const a=B(),n=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
75
|
-
`;try{const c=e.D1/2,d=e.D2/2,r=e.D3/2;o.logstr+=`vaxis-height: ${H(e.H1)} mm
|
|
76
|
-
`;const h=G(c,0).addSegStrokeA(c,e.H1).addSegStrokeA(c-e.E1,e.H1).addSegStrokeA(c-e.E1,0).closeSegStroke();a.addMain(h),i=function(f){return G(f*c,0).addSegStrokeA(f*c,e.H1).addSegStrokeA(f*d,e.H1).addSegStrokeA(f*d,e.H1-e.E2).addSegStrokeA(f*(c-e.E1),e.H1-e.E2).addSegStrokeA(f*(c-e.E1),e.E2).addSegStrokeA(f*d,e.E2).addSegStrokeA(f*d,0).closeSegStroke()},a.addSecond(i(1)),a.addSecond(i(-1)),n.addMain($(0,0,c)),n.addMain($(0,0,d));const _=d+e.L1,g=2*Math.PI/e.N1;for(let f=0;f<e.N1;f++){const S=_*Math.cos(f*g),P=_*Math.sin(f*g);n.addMain($(S,P,r))}n.addSecond($(0,0,c-e.E1)),o.fig={faceCut:a,faceBottom:n};const l=o.partName;o.vol={extrudes:[{outName:`subpax_${l}_pole`,face:`${l}_faceCut`,extrudeMethod:W.eRotate,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${l}_bottom`,face:`${l}_faceBottom`,extrudeMethod:W.eLinearOrtho,length:e.E2,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${l}_top`,face:`${l}_faceBottom`,extrudeMethod:W.eLinearOrtho,length:e.E2,rotate:[0,0,0],translate:[0,0,e.H1-e.E2]}],volumes:[{outName:`pax_${l}`,boolMethod:ne.eUnion,inList:[`subpax_${l}_pole`,`subpax_${l}_bottom`,`subpax_${l}_top`]}]},o.sub={},o.logstr+=`V-Axis drawn successfully!
|
|
77
|
-
`,o.calcErr=!1}catch(c){o.logstr+=c,console.log(c)}return o}var pt={pTitle:"Heliostat V-Axis",pDescription:"The vertical axis inside the pole of an heliostat",pDef:lt,pGeom:Ut},ct={partName:"ring",params:[t("D1","mm",400,1,2e3,1),t("D3","mm",800,1,4e3,1),t("H1","mm",20,1,100,1),t("H2","mm",100,1,600,1),q("ring holes"),t("N2","",24,3,100,1),t("D2","mm",40,1,100,1),t("L1","mm",45,1,300,1),q("ring fake teeth"),t("N1","",100,3,1e4,1),t("L2","mm",30,1,200,1),t("L3","mm",30,1,200,1)],paramSvg:{D1:"ring_top.svg",D3:"ring_top.svg",H1:"ring_section.svg",H2:"ring_section.svg",N2:"ring_top.svg",D2:"ring_top.svg",L1:"ring_top.svg",N1:"ring_top.svg",L2:"ring_top.svg",L3:"ring_top.svg"},sim:{tMax:180,tStep:.5,tUpdate:500}};function Wt(s,e,u=""){const o=he(ct.partName+u),i=B(),a=B(),n=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
78
|
-
`;try{const c=e.D1/2,d=e.D2/2,r=e.D3/2,h=e.H1+e.H2;if(e.L1<d)throw`err203: L1 ${e.L1} too small compare to D2 ${e.D2}`;if(c+e.L1+d>r-e.L2-e.L3)throw`err204: D3 ${e.D3} too small compare to D1 ${e.D1}, L1 ${e.L1}, L2 ${e.L2}, L3 ${e.L3}`;if(2*Math.atan2(d,c+e.L1)>2*Math.PI/e.N2)throw`err205: D2 ${e.D2} too large compare to N2 ${e.N2}`;o.logstr+=`ring-height: ${H(h)} mm
|
|
79
|
-
`;const _=r-e.L2,g=_-e.L3,l=2*Math.PI/(2*e.N1),f=G(_,0);for(let D=0;D<e.N1;D++){const L=2*D+1,w=2*D+2,M=g*Math.cos(L*l),T=g*Math.sin(L*l),E=_*Math.cos(w*l),y=_*Math.sin(w*l);f.addSegStrokeA(M,T).addSegStrokeA(E,y)}i.addMain($(0,0,r)),i.addMain($(0,0,c));const S=c+e.L1,P=2*Math.PI/e.N2;for(let D=0;D<e.N2;D++){const L=S*Math.cos(D*P),w=S*Math.sin(D*P);i.addMain($(L,w,d)),a.addSecond($(L,w,d))}i.addSecond(f),a.addMain($(0,0,r)),a.addMain(f),a.addSecond($(0,0,c));const C=G(c,0).addSegStrokeA(-c,0).addSegStrokeA(-c,-e.H1).addSegStrokeA(c,-e.H1).closeSegStroke(),v=function(D){return G(D*(c+e.L1)+d,0).addSegStrokeR(-2*d,0).addSegStrokeR(0,-e.H1).addSegStrokeR(2*d,0).closeSegStroke()},x=function(D){return G(D*(r-e.L2),-e.H1).addSegStrokeR(-D*e.L3,0).addSegStrokeR(0,-e.H2).addSegStrokeR(D*e.L3,0).closeSegStroke()},N=function(D){return G(D*r,0).addSegStrokeR(-D*(r-c),0).addSegStrokeR(0,-e.H1).addSegStrokeR(D*(r-e.L2-e.L3-c),0).addSegStrokeR(0,-e.H2).addSegStrokeR(D*(e.L2+e.L3),0).closeSegStroke()};n.addSecond(C),n.addSecond(v(1)),n.addSecond(v(-1)),n.addSecond(x(1)),n.addSecond(x(-1)),n.addMain(N(1)),n.addSecond(N(-1)),o.fig={faceRingBase:i,faceRingTeeth:a,faceSection:n};const b=o.partName;o.vol={extrudes:[{outName:`subpax_${b}_base`,face:`${b}_faceRingBase`,extrudeMethod:W.eLinearOrtho,length:e.H1,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${b}_teeth`,face:`${b}_faceRingTeeth`,extrudeMethod:W.eLinearOrtho,length:h,rotate:[0,0,0],translate:[0,0,0]}],volumes:[{outName:`pax_${b}`,boolMethod:ne.eUnion,inList:[`subpax_${b}_base`,`subpax_${b}_teeth`]}]},o.sub={},o.logstr+=`ring drawn successfully!
|
|
80
|
-
`,o.calcErr=!1}catch(c){o.logstr+=c,console.log(c)}return o}var qt={pTitle:"Heliostat ring",pDescription:"The gear ring for adjusting the azimuth of the heliostat",pDef:ct,pGeom:Wt},rt={partName:"ring_guidance",params:[t("D1","mm",700,100,2500,1),t("N1","legs",6,1,24,1),t("D2","mm",600,100,2e3,1),q("leg details"),t("D3","mm",30,1,200,1),t("D4","mm",50,1,200,1),t("L1","mm",90,1,900,1),t("R5","mm",20,0,500,1),q("inner"),t("D6","mm",300,1,1e3,1),t("N2","motors",8,1,200,1),t("L2","mm",50,1,200,1),t("D7","mm",80,1,200,1),q("thickness"),t("T1","mm",10,1,200,1)],paramSvg:{D1:"ring_guidance_top.svg",D2:"ring_guidance_top.svg",D3:"ring_guidance_top.svg",D4:"ring_guidance_top.svg",R5:"ring_guidance_top.svg",D6:"ring_guidance_top.svg",D7:"ring_guidance_top.svg",N1:"ring_guidance_top.svg",N2:"ring_guidance_top.svg",L1:"ring_guidance_top.svg",L2:"ring_guidance_top.svg",T1:"ring_guidance_top.svg"},sim:{tMax:100,tStep:.5,tUpdate:500}};function Yt(s,e,u=""){const o=he(rt.partName+u),i=B(),a=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
81
|
-
`;try{const n=e.D1/2,c=e.D3/2,d=e.D4/2,r=e.D6/2,h=e.D7/2,_=2*Math.PI/e.N2;if(h>e.L2)throw`err461: D7 ${e.D7} is too large compare to L2 ${e.L2}`;if(e.N2*e.D7>(e.D6+2*e.L2)*Math.PI)throw`err462: N2 ${e.N2} is too large compare to D6 ${e.D6}, D7 ${e.D7} and L2 ${e.L2}`;if(e.D2<e.D6+2*e.L2+2*h)throw`err463: D2 ${e.D2} is too small compare to D6 ${e.D6}, L2 ${e.L2} and D7 ${e.D7}`;o.logstr+=`ring_guidance: Dmax ${H(e.D1+2*d)} mm
|
|
82
|
-
`;const[g,l,f]=et(e);o.logstr+=g,i.addMain(l),i.addMain($(0,0,r));for(let x=0;x<e.N2;x++)i.addMain($(r+e.L2,0,h).rotate(0,0,x*_));for(let x=0;x<e.N1;x++)i.addMain($(n,0,c).rotate(0,0,x*f));const S=function(x,N,b,D){return G(x,N).addSegStrokeR(b,0).addSegStrokeR(0,D).addSegStrokeR(-b,0).closeSegStroke()},P=n-r+d;a.addMain(S(r,0,P,e.T1)),a.addMain(S(-r-P,0,P,e.T1)),a.addSecond(S(n-c,0,2*c,e.T1)),a.addSecond(S(-n-c,0,2*c,e.T1));const C=r+e.L2;a.addSecond(S(C-h,0,2*h,e.T1)),a.addSecond(S(-C-h,0,2*h,e.T1)),o.fig={faceTop:i,faceSection:a};const v=o.partName;o.vol={extrudes:[{outName:`subpax_${v}_top`,face:`${v}_faceTop`,extrudeMethod:W.eLinearOrtho,length:e.T1,rotate:[0,0,0],translate:[0,0,0]}],volumes:[{outName:`pax_${v}`,boolMethod:ne.eIdentity,inList:[`subpax_${v}_top`]}]},o.sub={},o.logstr+=`ring_guidance drawn successfully!
|
|
83
|
-
`,o.calcErr=!1}catch(n){o.logstr+=n,console.log(n)}return o}var Xt={pTitle:"Ring-guidance",pDescription:"The guidance of the gear-ring for the heliostat azimuth",pDef:rt,pGeom:Yt},gt={partName:"vaxis_guidance",params:[t("D1","mm",700,100,2500,1),t("N1","legs",6,1,24,1),t("D2","mm",600,100,2e3,1),q("leg details"),t("D3","mm",30,1,200,1),t("D4","mm",50,1,200,1),t("L1","mm",90,1,900,1),t("R5","mm",20,0,500,1),q("inner"),t("D6","mm",540,1,1e3,1),t("N2","springs",6,1,24,1),ve("orientation",["ccw","cw","alt"]),t("R7","mm",10,0,100,1),t("L2","mm",100,1,900,1),t("E2","mm",20,1,200,1),q("spring"),t("SA1","degree",0,-45,45,1),t("SE1","mm",10,1,200,1),t("SD1","mm",20,1,200,1),t("SD2","mm",10,1,200,1),t("SN1","loops",2,0,8,1),t("SL1","mm",40,1,900,1),t("SL2","mm",70,0,900,1),ve("Send",["round","pike"]),q("thickness"),t("T1","mm",10,1,200,1),t("Dvaxis","mm",260,5,1e3,1)],paramSvg:{D1:"vaxis_guidance_top.svg",N1:"vaxis_guidance_top.svg",D2:"vaxis_guidance_top.svg",D3:"vaxis_guidance_top.svg",D4:"vaxis_guidance_top.svg",L1:"vaxis_guidance_top.svg",R5:"vaxis_guidance_top.svg",D6:"vaxis_guidance_top.svg",N2:"vaxis_guidance_top.svg",orientation:"vaxis_guidance_top.svg",R7:"vaxis_guidance_top.svg",L2:"vaxis_guidance_spring.svg",E2:"vaxis_guidance_spring.svg",SA1:"vaxis_guidance_spring.svg",SE1:"vaxis_guidance_spring.svg",SD1:"vaxis_guidance_spring.svg",SD2:"vaxis_guidance_spring.svg",SN1:"vaxis_guidance_spring.svg",SL1:"vaxis_guidance_spring.svg",SL2:"vaxis_guidance_spring.svg",Send:"vaxis_guidance_spring.svg",T1:"vaxis_guidance_top.svg",Dvaxis:"vaxis_guidance_top.svg"},sim:{tMax:100,tStep:.5,tUpdate:500}};function jt(s,e,u=""){const o=he(gt.partName+u),i=B(),a=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
84
|
-
`;try{const n=e.D1/2,c=e.D2/2,d=e.D3/2,r=e.D4/2,h=e.D6/2;if(c<h)throw`err466: D6 ${e.D6} is too large compare to D2 ${e.D2}`;o.logstr+=`vaxis_guidance: Dmax ${H(e.D1+2*r)} mm
|
|
85
|
-
`;const[_,g,l]=et(e);o.logstr+=_,i.addMain(g);for(let v=0;v<e.N1;v++)i.addMain($(n,0,d).rotate(0,0,v*l));const[f,S]=Nt(e);o.logstr+=f,i.addMain(S),i.addSecond($(0,0,e.Dvaxis/2));const P=n-h+r;a.addMain(F(h,0,P,e.T1)),a.addMain(F(-h-P,0,P,e.T1)),a.addSecond(F(n-d,0,2*d,e.T1)),a.addSecond(F(-n-d,0,2*d,e.T1)),o.fig={faceTop:i,faceSection:a};const C=o.partName;o.vol={extrudes:[{outName:`subpax_${C}_top`,face:`${C}_faceTop`,extrudeMethod:W.eLinearOrtho,length:e.T1,rotate:[0,0,0],translate:[0,0,0]}],volumes:[{outName:`pax_${C}`,boolMethod:ne.eIdentity,inList:[`subpax_${C}_top`]}]},o.sub={},o.logstr+=`vaxis_guidance drawn successfully!
|
|
86
|
-
`,o.calcErr=!1}catch(n){o.logstr+=n,console.log(n)}return o}var Zt={pTitle:"Vaxis-guidance",pDescription:"The guidance of the V-Axis for the heliostat azimuth",pDef:gt,pGeom:jt},at={partName:"haxis_guidance",params:[t("D5","mm",600,1,2e3,1),t("D8","mm",1e3,1,2e3,1),q("outer details"),t("E5","mm",1,0,200,1),t("E8","mm",20,1,200,1),t("L5","mm",20,1,200,1),t("R9","mm",20,0,500,1),q("inner spring"),t("SA1","degree",0,-45,45,1),t("SE1","mm",2,.1,100,.1),t("SD1","mm",20,1,200,1),t("SD2","mm",10,1,200,1),t("SN1","springs",7,1,24,1),t("SL1","mm",60,0,500,1),t("SL2","mm",100,0,500,1),ve("Send",["round","pike"]),q("thickness"),t("L4","mm",400,1,2e3,1)],paramSvg:{D5:"haxis_guidance_outer.svg",D8:"haxis_guidance_outer.svg",E5:"haxis_guidance_outer.svg",E8:"haxis_guidance_outer.svg",L5:"haxis_guidance_outer.svg",R9:"haxis_guidance_outer.svg",SA1:"haxis_guidance_spring.svg",SE1:"haxis_guidance_spring.svg",SD1:"haxis_guidance_spring.svg",SD2:"haxis_guidance_spring.svg",SN1:"haxis_guidance_spring.svg",SL1:"haxis_guidance_spring.svg",SL2:"haxis_guidance_spring.svg",Send:"haxis_guidance_spring.svg",L4:"haxis_guidance_outer.svg"},sim:{tMax:100,tStep:.5,tUpdate:500}};function Kt(s,e,u=""){const o=he(at.partName+u),i=B(),a=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
87
|
-
`;try{const n=e.D5/2,c=e.D8/2,d=e.SD1/2,r=n+e.E5,h=c-e.E8,_=2*Math.asin(e.L5/(2*r)),g=Math.PI/12+Me(e.SA1),l=Math.PI/2+_-g,f=Math.PI-g,S=Math.PI/2-Math.PI/6+g;if(r+d+e.SE1>h)throw`err411: D8 ${e.D8} is too small compare to D5 ${e.D5}, E5 ${e.D5}, E8 ${e.E8}`;if(2*Math.PI/3-2*_<e.R9/h)throw`err412: L5 ${e.L5} is too large compare to R9 ${e.R9}`;o.logstr+=`haxis_guidance: Dinner ${H(2*r)} mm
|
|
88
|
-
`,i.addSecond($(0,0,n)),i.addSecond($(0,0,c));const[P,C]=ye(e,!1),[,v]=ye(e,!0);o.logstr+=P;const x=Math.PI/2-_,N=-Math.PI/6+_,b=le(0,0),D=b.translatePolar(x,r+e.SE1+d),L=D.translatePolar(x-Math.PI/2,d),w=L.translatePolar(x+Math.PI,d+e.SE1),M=L.translatePolar(x+Math.PI,d),T=w.rotate(L,l),E=b.translatePolar(N,r+e.SE1+d),y=E.translatePolar(N+Math.PI/2,d),Y=y.translatePolar(N+Math.PI,d+e.SE1),X=y.translatePolar(N+Math.PI,d),k=X.rotate(y,-l),O=G(0,r).addSegStrokeA(w.cx,w.cy).addPointA(T.cx,T.cy).addSegArc(d+e.SE1,!1,!0);O.addPartial(C.rotate(0,0,f).translate(T.cx,T.cy)),O.addPointA(M.cx,M.cy).addPointA(D.cx,D.cy).addSegArc2().addSegStrokeAP(x,h).addCornerRounded(e.R9).addPointAP(N,h).addSegArc(h,!1,!1).addCornerRounded(e.R9).addSegStrokeA(E.cx,E.cy).addPointA(X.cx,X.cy).addPointA(k.cx,k.cy).addSegArc2(),O.addPartial(v.rotate(0,0,S).translate(k.cx,k.cy)),O.addPointA(Y.cx,Y.cy).addSegArc(d+e.SE1,!1,!0).addSegStrokeAP(-Math.PI/6,r).addSegStrokeAP(-Math.PI/6,c).addPointAP(Math.PI/2,c).addSegArc(c,!1,!0).closeSegStroke(),i.addMain(O);const m=c*Math.sin(Math.PI/6);a.addMain(F(0,-m,e.L4,c+m)),a.addSecond(F(0,-c,e.L4,2*c)),a.addSecond(F(0,-n,e.L4,2*n)),o.fig={faceProfile:i,faceSide:a};const K=o.partName;o.vol={extrudes:[{outName:`subpax_${K}_profile`,face:`${K}_faceProfile`,extrudeMethod:W.eLinearOrtho,length:e.L4,rotate:[0,0,0],translate:[0,0,0]}],volumes:[{outName:`pax_${K}`,boolMethod:ne.eIdentity,inList:[`subpax_${K}_profile`]}]},o.sub={},o.logstr+=`haxis_guidance drawn successfully!
|
|
89
|
-
`,o.calcErr=!1}catch(n){o.logstr+=n,console.log(n)}return o}var Qt={pTitle:"Haxis-guidance",pDescription:"The guidance of the H-Axis for the heliostat inclination",pDef:at,pGeom:Kt},ht={partName:"rod",params:[t("L1","mm",1e4,100,4e4,10),t("L2","mm",100,2,400,1),t("L3","mm",400,10,1e3,1),t("L4","mm",600,10,1e3,1),t("N1","",10,2,50,1),q("section"),t("H1","mm",200,5,4e3,1),t("E1","mm",2,1,80,1),t("E2","mm",10,1,80,1),q("pad"),t("N3","",2,1,20,1),t("N4","",4,1,20,1),t("R3","mm",100,1,500,1),t("D2","mm",10,1,100,1),t("L7","mm",10,1,300,1)],paramSvg:{L1:"rod_top.svg",L2:"rod_top.svg",L3:"rod_top.svg",L4:"rod_top.svg",H1:"rod_cut.svg",E1:"rod_cut.svg",E2:"rod_cut.svg",N1:"rod_top.svg",N3:"rod_top.svg",N4:"rod_top.svg",R3:"rod_top.svg",D2:"rod_plate.svg",L7:"rod_plate.svg"},sim:{tMax:180,tStep:.5,tUpdate:500}};function eo(s,e,u=""){const o=he(ht.partName+u);let i,a;const n=B(),c=B(),d=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
90
|
-
`;try{const r=e.D2/2,h=e.L3/(e.N3+1),_=e.L4/(e.N4+1);o.logstr+=`rod-length: ${H(e.L1)} mm
|
|
91
|
-
`;const g=(e.L1-e.L3)/(e.N1-1);o.logstr+=`space-length: ${H(g)} mm
|
|
92
|
-
`,i=function(D){const L=[],w=G(e.L4/2,D).addCornerRounded(e.R3).addSegStrokeA(e.L4/2,D+e.L3).addCornerRounded(e.R3).addSegStrokeA(-e.L4/2,D+e.L3).addCornerRounded(e.R3).addSegStrokeA(-e.L4/2,D).addCornerRounded(e.R3).closeSegStroke();L.push(w);for(let M=1;M<e.N3+1;M++)L.push($(e.L4/2-e.L7,D+M*h,r)),L.push($(-e.L4/2+e.L7,D+M*h,r));for(let M=1;M<e.N4+1;M++)L.push($(-e.L4/2+M*_,D+e.L7,r)),L.push($(-e.L4/2+M*_,D+e.L3-e.L7,r));return L},a=function(D,L){return G(e.L2/2,D).addSegStrokeA(e.L2/2,D+L).addSegStrokeA(-e.L2/2,D+L).addSegStrokeA(-e.L2/2,D).closeSegStroke()};const l=e.L2/2,f=e.L4/2,S=(e.L2-2*e.E1)/2,P=e.H1-e.E1,C=G(l,0).addSegStrokeA(l,e.H1).addSegStrokeA(-l,e.H1).addSegStrokeA(-l,0).closeSegStroke(),v=G(S,e.E1).addSegStrokeA(S,P).addSegStrokeA(-S,P).addSegStrokeA(-S,e.E1).closeSegStroke(),x=G(f,e.H1).addSegStrokeA(f,e.H1+e.E2).addSegStrokeA(-f,e.H1+e.E2).addSegStrokeA(-f,e.H1).closeSegStroke();n.addMain(C),n.addMain(v),n.addSecond(x),i(0).forEach(D=>c.addMain(D)),c.addSecond(a(-e.L3/2,2*e.L3));const N=(e.L1-e.L3)/(e.N1-1);for(let D=0;D<e.N1;D++)i(D*N).forEach(L=>d.addMain(L));d.addSecond(a(0,e.L1)),o.fig={faceCut:n,facePlate:c,faceTop:d};const b=o.partName;o.vol={extrudes:[{outName:`subpax_${b}_rod`,face:`${b}_faceCut`,extrudeMethod:W.eLinearOrtho,length:e.L1,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${b}_plates`,face:`${b}_faceTop`,extrudeMethod:W.eLinearOrtho,length:e.E2,rotate:[Math.PI/2,0,0],translate:[0,e.E2+e.H1,0]}],volumes:[{outName:`pax_${b}`,boolMethod:ne.eUnion,inList:[`subpax_${b}_rod`,`subpax_${b}_plates`]}]},o.sub={},o.logstr+=`heliostat-rod drawn successfully!
|
|
93
|
-
`,o.calcErr=!1}catch(r){o.logstr+=r,console.log(r)}return o}var to={pTitle:"Heliostat rod",pDescription:"The rod of an heliostat-surface",pDef:ht,pGeom:eo},ut={partName:"trapeze",params:[t("L1","mm",1600,10,4e3,1),t("L2","mm",1e3,10,4e3,1),t("L3","mm",400,5,800,1),t("L4","mm",300,5,800,1),q("outer frame"),t("N1","",7,1,20,1),t("N2","",4,1,20,1),t("D1","mm",10,1,40,1),t("L5","mm",100,1,400,1),t("L6","mm",20,1,400,1),t("R1","mm",60,1,400,1),t("R2","mm",20,1,400,1),q("inner pad"),t("N3","",2,1,20,1),t("N4","",2,1,20,1),t("D2","mm",10,1,40,1),t("L7","mm",20,1,400,1),t("R3","mm",20,1,400,1),q("diagonal shaft"),t("D3","mm",30,1,100,1),t("D4","mm",26,1,100,1),t("H1","mm",300,.5,800,.5),t("H2","mm",2,.5,800,.5),t("H3","mm",5,.5,800,.5)],paramSvg:{L1:"trapeze_top.svg",L2:"trapeze_top.svg",L3:"trapeze_top.svg",L4:"trapeze_top.svg",N1:"trapeze_top.svg",N2:"trapeze_top.svg",N3:"trapeze_top.svg",N4:"trapeze_top.svg",L5:"trapeze_top.svg",L6:"trapeze_top.svg",L7:"trapeze_top.svg",D1:"trapeze_top.svg",D2:"trapeze_top.svg",D3:"trapeze_rod.svg",D4:"trapeze_rod.svg",R1:"trapeze_top.svg",R2:"trapeze_top.svg",R3:"trapeze_top.svg",H1:"trapeze_side.svg",H2:"trapeze_side.svg",H3:"trapeze_side.svg"},sim:{tMax:180,tStep:.5,tUpdate:500}};function oo(s,e,u=""){const o=he(ut.partName+u);let i,a;const n=B(),c=B(),d=B(),r=B(),h=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
94
|
-
`;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 _=e.R1*(1-1/Math.sqrt(2)),g=e.R3*(1-1/Math.sqrt(2)),l=e.L2/2-_-(e.L4/2-g),f=e.L1/2-_-(e.L3/2-g),S=Math.sqrt(l**2+f**2),P=e.H1-e.H2-e.H3,C=Math.sqrt(S**2+P**2),v=Math.atan2(P,S),x=Math.atan2(f,l);o.logstr+=`rod-slope: length: ${H(C)} mm, angle: ${H(re(v))} degree
|
|
95
|
-
`,o.logstr+=`rod-xy-angle: ${H(re(x))} degree
|
|
96
|
-
`;const N=e.D3/Math.cos(Math.PI/2-v);o.logstr+=`rod-footprint-length: ${H(N)} mm
|
|
97
|
-
`;const b=Math.sqrt((N/2)**2+(e.D3/2)**2),D=Math.atan2(e.D3,N);if(i=function(J,A,R){return G(J,A).addPointRP(R+Math.PI-D,b).addSeg2Arcs(R+Math.PI/2,R).addPointRP(R+Math.PI+D,b).addSeg2Arcs(R+Math.PI,R+Math.PI/2).addPointRP(R-D,b).addSeg2Arcs(R+3*Math.PI/2,R+Math.PI).addPointRP(R+D,b).addSeg2Arcs(R,R-Math.PI/2)},a=function(J,A,R){const Q=J+b*Math.cos(R+Math.PI-D),Z=A+b*Math.sin(R+Math.PI-D);return G(Q,Z).addSegStrokeRP(R+Math.PI,S).addSegStrokeRP(R-Math.PI/2,e.D3).addSegStrokeRP(R,S).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 L=G(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 w=G(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 M=G(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);n.addMain(L),n.addMain(w),n.addSecond(M);const T=e.L1/(e.N1+1),E=e.L2/(e.N2+1),y=e.L3/(e.N3+1),Y=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(y<e.D2/2+e.L7)throw`err661: D2 ${e.D2} or L7 ${e.L7} too large compare to L3 ${e.l3}`;if(Y<e.D2/2+e.L7)throw`err664: D2 ${e.D2} or L7 ${e.L7} too large compare to L4 ${e.l4}`;const X=[];for(let J=1;J<e.N1+1;J++)X.push($(e.L2/2-e.L6,-e.L1/2+J*T,e.D1/2)),X.push($(-e.L2/2+e.L6,-e.L1/2+J*T,e.D1/2));for(let J=1;J<e.N2+1;J++)X.push($(-e.L2/2+J*E,e.L1/2-e.L6,e.D1/2)),X.push($(-e.L2/2+J*E,-e.L1/2+e.L6,e.D1/2));const k=[];for(let J=1;J<e.N3+1;J++)k.push($(e.L4/2-e.L7,-e.L3/2+J*y,e.D2/2)),k.push($(-e.L4/2+e.L7,-e.L3/2+J*y,e.D2/2));for(let J=1;J<e.N4+1;J++)k.push($(-e.L4/2+J*Y,e.L3/2-e.L7,e.D2/2)),k.push($(-e.L4/2+J*Y,-e.L3/2+e.L7,e.D2/2));X.forEach(J=>{n.addMain(J)}),k.forEach(J=>{n.addSecond(J)});const O=[];O.push(i(e.L2/2-_,e.L1/2-_,x)),O.push(i(e.L4/2-g,e.L3/2-g,x)),O.push(i(-e.L2/2+_,e.L1/2-_,Math.PI-x)),O.push(i(-e.L4/2+g,e.L3/2-g,Math.PI-x)),O.push(i(-e.L2/2+_,-e.L1/2+_,Math.PI+x)),O.push(i(-e.L4/2+g,-e.L3/2+g,Math.PI+x)),O.push(i(e.L2/2-_,-e.L1/2+_,-x)),O.push(i(e.L4/2-g,-e.L3/2+g,-x));const m=[];if(m.push(a(e.L2/2-_,e.L1/2-_,x)),m.push(a(-e.L2/2+_,e.L1/2-_,Math.PI-x)),m.push(a(-e.L2/2+_,-e.L1/2+_,Math.PI+x)),m.push(a(e.L2/2-_,-e.L1/2+_,-x)),O.forEach(J=>{n.addSecond(J)}),m.forEach(J=>{n.addSecond(J)}),c.addMain(M),k.forEach(J=>{c.addMain(J)}),c.addSecond(L),c.addSecond(w),X.forEach(J=>{c.addSecond(J)}),O.forEach(J=>{c.addSecond(J)}),m.forEach(J=>{c.addSecond(J)}),e.D4>=e.D3)throw`err218: D4 ${e.D4} larger than D3 ${e.D3}`;d.addMain($(0,0,e.D3/2)),d.addSecond($(0,0,e.D4/2)),r.addMain($(0,0,e.D4/2)),r.addSecond($(0,0,e.D3/2));const K=e.D3*Math.cos(v),te=K/Math.tan(v),I=g+(N/2+te)*Math.cos(x),oe=g+(N/2+te)*Math.sin(x),j=C+2*(N+te+K),U=j+e.L3+e.L4+K,p=G(U,U).addSegStrokeA(-U,U).addSegStrokeA(-U,-U).addSegStrokeA(U,-U).closeSegStroke();h.addMain(p),o.fig={faceFrame:n,facePlate:c,faceRod:d,faceRodHollow:r,faceCutRod:h};const V=o.partName;o.vol={extrudes:[{outName:`subpax_${V}_frame`,face:`${V}_faceFrame`,extrudeMethod:W.eLinearOrtho,length:e.H2,rotate:[0,0,0],translate:[0,0,e.H1-e.H2]},{outName:`subpax_${V}_plate`,face:`${V}_facePlate`,extrudeMethod:W.eLinearOrtho,length:e.H3,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${V}_rod1`,face:`${V}_faceRod`,extrudeMethod:W.eLinearOrtho,length:j,rotate:[0,Math.PI/2-v,x],translate:[e.L4/2-I,e.L3/2-oe,e.H3-K]},{outName:`subpax_${V}_rod2`,face:`${V}_faceRod`,extrudeMethod:W.eLinearOrtho,length:j,rotate:[0,Math.PI/2-v,Math.PI-x],translate:[-e.L4/2+I,e.L3/2-oe,e.H3-K]},{outName:`subpax_${V}_rod3`,face:`${V}_faceRod`,extrudeMethod:W.eLinearOrtho,length:j,rotate:[0,Math.PI/2-v,Math.PI+x],translate:[-e.L4/2+I,-e.L3/2+oe,e.H3-K]},{outName:`subpax_${V}_rod4`,face:`${V}_faceRod`,extrudeMethod:W.eLinearOrtho,length:j,rotate:[0,Math.PI/2-v,-x],translate:[e.L4/2-I,-e.L3/2+oe,e.H3-K]},{outName:`subpax_${V}_rodH1`,face:`${V}_faceRodHollow`,extrudeMethod:W.eLinearOrtho,length:j,rotate:[0,Math.PI/2-v,x],translate:[e.L4/2-I,e.L3/2-oe,e.H3-K]},{outName:`subpax_${V}_rodH2`,face:`${V}_faceRodHollow`,extrudeMethod:W.eLinearOrtho,length:j,rotate:[0,Math.PI/2-v,Math.PI-x],translate:[-e.L4/2+I,e.L3/2-oe,e.H3-K]},{outName:`subpax_${V}_rodH3`,face:`${V}_faceRodHollow`,extrudeMethod:W.eLinearOrtho,length:j,rotate:[0,Math.PI/2-v,Math.PI+x],translate:[-e.L4/2+I,-e.L3/2+oe,e.H3-K]},{outName:`subpax_${V}_rodH4`,face:`${V}_faceRodHollow`,extrudeMethod:W.eLinearOrtho,length:j,rotate:[0,Math.PI/2-v,-x],translate:[e.L4/2-I,-e.L3/2+oe,e.H3-K]},{outName:`subpax_${V}_cut1`,face:`${V}_faceCutRod`,extrudeMethod:W.eLinearOrtho,length:U,rotate:[0,0,0],translate:[0,0,-U]},{outName:`subpax_${V}_cut2`,face:`${V}_faceCutRod`,extrudeMethod:W.eLinearOrtho,length:U,rotate:[0,0,0],translate:[0,0,e.H1]}],volumes:[{outName:`ipax_${V}_rawRod`,boolMethod:ne.eUnion,inList:[`subpax_${V}_rod1`,`subpax_${V}_rod2`,`subpax_${V}_rod3`,`subpax_${V}_rod4`]},{outName:`ipax_${V}_rodHollow`,boolMethod:ne.eUnion,inList:[`subpax_${V}_rodH1`,`subpax_${V}_rodH2`,`subpax_${V}_rodH3`,`subpax_${V}_rodH4`]},{outName:`ipax_${V}_halfRods`,boolMethod:ne.eSubstraction,inList:[`ipax_${V}_rawRod`,`subpax_${V}_cut1`]},{outName:`ipax_${V}_rods`,boolMethod:ne.eSubstraction,inList:[`ipax_${V}_halfRods`,`subpax_${V}_cut2`]},{outName:`ipax_${V}_plus`,boolMethod:ne.eUnion,inList:[`subpax_${V}_frame`,`subpax_${V}_plate`,`ipax_${V}_rods`]},{outName:`pax_${V}`,boolMethod:ne.eSubstraction,inList:[`ipax_${V}_plus`,`ipax_${V}_rodHollow`]}]},o.sub={},o.logstr+=`trapeze drawn successfully!
|
|
98
|
-
`,o.calcErr=!1}catch(_){o.logstr+=_,console.log(_)}return o}var so={pTitle:"Heliostat trapeze",pDescription:"The support of one solar panel. Made out of aluminium for lightness and cooling",pDef:ut,pGeom:oo},_t={partName:"surface",params:[t("LH","mm",1600,10,4e3,1),t("LV","mm",1e3,10,4e3,1),t("LZ","mm",40,0,100,1),t("nx","",9,1,40,1),t("ny","",9,1,40,1),q("main fantasia"),ve("main_direction",["horizontal","vertical"]),fe("crenel",!1),t("first_row","",9,1,40,1),t("second_row","",9,1,40,1),q("horizontal spacing"),t("EH","mm",10,0,1e3,1),fe("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),ve("EH_shape",["sinusoid","triangle","sawUp","sawDown"]),q("vertical spacing"),t("EV","mm",10,0,1e3,1),fe("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),ve("EV_shape",["sinusoid","triangle","sawUp","sawDown"]),q("solar power"),t("power_efficiency","%",16,0,100,.1),t("solar_power","W/m2",816,100,2e3,1)],paramSvg:{LH:"surface_main.svg",LV:"surface_main.svg",LZ:"surface_lz.svg",nx:"surface_main.svg",ny:"surface_main.svg",main_direction:"surface_crenel.svg",crenel:"surface_crenel.svg",first_row:"surface_extremities.svg",second_row:"surface_extremities.svg",EH:"surface_main.svg",EH_gradient:"surface_space_evolution.svg",EH_sup:"surface_space_evolution.svg",EH_cycle:"surface_space_evolution.svg",EH_start:"surface_space_evolution.svg",EH_shape:"surface_space_shape.svg",EV:"surface_main.svg",EV_gradient:"surface_space_evolution.svg",EV_sup:"surface_space_evolution.svg",EV_cycle:"surface_space_evolution.svg",EV_start:"surface_space_evolution.svg",EV_shape:"surface_space_shape.svg",power_efficiency:"surface_power.svg",solar_power:"surface_power.svg"},sim:{tMax:180,tStep:.5,tUpdate:500}};function no(s,e,u=""){const o=he(_t.partName+u);let i;const a=B(),n=B();o.logstr+=`${o.partName} simTime: ${s}
|
|
99
|
-
`;try{const c=e.LH*e.LV/1e6,d=e.solar_power*c*e.power_efficiency/100;o.logstr+=`panel surface: ${H(c)} m2
|
|
100
|
-
`,o.logstr+=`panel power: ${H(d)} W
|
|
101
|
-
`;const r=e.nx*e.ny;o.logstr+=`max panel number: ${r}
|
|
102
|
-
`,o.logstr+=`max panel surface: ${H(r*c)} m2
|
|
103
|
-
`,o.logstr+=`max panel power: ${H(r*d)} W
|
|
104
|
-
`;const h=e.main_direction===1?e.ny:e.nx,_=e.main_direction===1?e.nx:e.ny,g=e.main_direction===1?e.EV:e.EH,l=e.main_direction===1?e.EV_gradient:e.EH_gradient,f=e.main_direction===1?e.EV_sup:e.EH_sup,S=e.main_direction===1?e.EV_cycle:e.EH_cycle,P=e.main_direction===1?e.EV_start:e.EH_start,C=e.main_direction===1?e.EV_shape:e.EH_shape,v=e.main_direction===0?e.EV:e.EH,x=e.main_direction===0?e.EV_gradient:e.EH_gradient,N=e.main_direction===0?e.EV_sup:e.EH_sup,b=e.main_direction===0?e.EV_cycle:e.EH_cycle,D=e.main_direction===0?e.EV_start:e.EH_start,L=e.main_direction===0?e.EV_shape:e.EH_shape,w=Math.max(_,e.first_row,e.second_row),M=[];for(let p=0;p<h;p++){const V=(p+1)%2,J=e.crenel?_-V:_;M.push(J)}M[0]=e.first_row,M[M.length-1]=e.first_row,h>2&&(M[1]=e.second_row,M[M.length-2]=e.second_row);let T=0;M.forEach(p=>{T+=p}),o.logstr+=`actual panel number: ${T} (${H(100*T/r)} %)
|
|
105
|
-
`,o.logstr+=`actual panel surface: ${H(T*c)} m2
|
|
106
|
-
`,o.logstr+=`actual panel power: ${H(T*d)} W
|
|
107
|
-
`;const E=[];for(let p=0;p<h-1;p++){let V=g;if(l===1){const J=h>2?h-2:1,A=(P+p*S/J)%1;switch(C){case 0:V+=f*(1-Math.cos(A*2*Math.PI))/2;break;case 1:V+=f*(1-2*Math.abs(A-.5));break;case 2:V+=f*A;break;case 3:V+=f*(1-A);break;default:V+=f}}E.push(V)}let y=0;const Y=[];Y.push(0),E.forEach(p=>{y+=p,Y.push(y)});const X=[];for(let p=0;p<w-1;p++){let V=v;if(x===1){const J=w>2?w-2:1,A=(D+p*b/J)%1;switch(L){case 0:V+=N*(1-Math.cos(A*2*Math.PI))/2;break;case 1:V+=N*(1-2*Math.abs(A-.5));break;case 2:V+=N*A;break;case 3:V+=N*(1-A);break;default:V+=N}}X.push(V)}let k=0;const O=[];O.push(0),X.forEach(p=>{k+=p,O.push(k)});let m=0,K=0;e.main_direction===0?(m=h*e.LH+y,K=w*e.LV+k):(m=w*e.LH+k,K=h*e.LV+y);const te=m*K/10**6;o.logstr+=`global horizontal width: ${H(m/1e3)} m
|
|
108
|
-
`,o.logstr+=`global vertical height: ${H(K/1e3)} m
|
|
109
|
-
`,o.logstr+=`global area: ${H(te)} m2
|
|
110
|
-
`,o.logstr+=`area efficiency: ${H(100*T*c/te)} %
|
|
111
|
-
`;const I=-m/2,oe=-K/2;i=function(p,V){return G(p,V).addSegStrokeA(p+e.LH,V).addSegStrokeA(p+e.LH,V+e.LV).addSegStrokeA(p,V+e.LV).closeSegStroke()};const j=[];M.forEach((p,V)=>{const J=(w-p)%2,A=Math.floor((w-p)/2);for(let R=0;R<p;R++){let Q=0,Z=0;e.main_direction===0?(Q=I+V*e.LH+Y[V],Z=oe+(A+R)*e.LV+O[A+R],J===1&&(Z+=(e.LV+O[A+R+1]-O[A+R])/2)):(Z=oe+V*e.LV+Y[V],Q=I+(A+R)*e.LH+O[A+R],J===1&&(Q+=(e.LH+O[A+R+1]-O[A+R])/2)),j.push([Q,Z])}});for(const p of j)a.addMain(i(p[0],p[1]));n.addMain(i(0,0)),o.fig={faceSurface:a,faceOnePanel:n};const U=o.partName;o.vol={extrudes:j.map((p,V)=>({outName:`subpax_${U}_panel_${V}`,face:`${U}_faceOnePanel`,extrudeMethod:W.eLinearOrtho,length:e.LZ,rotate:[0,0,0],translate:[p[0],p[1],0]})),volumes:[{outName:`pax_${U}`,boolMethod:ne.eUnion,inList:j.map((p,V)=>`subpax_${U}_panel_${V}`)}]},o.sub={},o.logstr+=`panel-surface drawn successfully!
|
|
112
|
-
`,o.calcErr=!1}catch(c){o.logstr+=c,console.log(c)}return o}var io={pTitle:"Heliostat panel-surface",pDescription:"The surface collecting the solar power",pDef:_t,pGeom:no};const ft={"gear/gear_wheel_wheel":Ge,"gear/simplified_gear_wheel":At,"heliostat/heliostat":Ft,"heliostat/heliostat_2":Jt,"heliostat/base":Gt,"heliostat/pole_static":Ae,"heliostat/vaxis":pt,"heliostat/ring":qt,"heliostat/vaxis_holder":be,"heliostat/ring_guidance":Xt,"heliostat/vaxis_guidance":Zt,"heliostat/rake":Re,"heliostat/rake_stopper":qe,"heliostat/haxis_guidance":Qt,"heliostat/spider":pe,"heliostat/swing":Ne,"heliostat/rod":to,"heliostat/trapeze":so,"heliostat/surface":io};function lo(s){const e=/^.*\//g;return s.replace(e,"")}function co(s){const e={};for(const u of Object.keys(s)){const o=lo(u);e[o]=`/${u}`}return e}function ro(s){const e=[];for(const u of Object.keys(s))e.push(u);return e}const ho=co(ft),uo=ro(ft);export{ft as a,ho as b,uo as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var s;const e=((s=globalThis.__sveltekit_1swlbm)==null?void 0:s.base)??"";var a;const t=((a=globalThis.__sveltekit_1swlbm)==null?void 0:a.assets)??e;export{t as a,e as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as t}from"../chunks/entry.Mk9zao6D.js";export{t as start};
|