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