designix-uis 0.5.14 → 0.5.15
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.1GK_9P7G.js → entry.Bg9yHmlo.js} +1 -1
- package/dist/public/_app/immutable/chunks/{makeList.DKwXmwFM.js → makeList.CKvlspzX.js} +31 -31
- package/dist/public/_app/immutable/chunks/paths.ZRM143hx.js +1 -0
- package/dist/public/_app/immutable/chunks/{stores.DdOwhdnn.js → stores.DvwYasMc.js} +1 -1
- package/dist/public/_app/immutable/entry/{app.C7DIE9mT.js → app.Dy2SZ7Tt.js} +2 -2
- package/dist/public/_app/immutable/entry/start.-baw-mET.js +1 -0
- package/dist/public/_app/immutable/nodes/{0.yoA7bHZu.js → 0.D8SenX5S.js} +1 -1
- package/dist/public/_app/immutable/nodes/{1.BKXWK5Bn.js → 1.DzCMV2Ix.js} +1 -1
- package/dist/public/_app/immutable/nodes/{2.DwSyL7gr.js → 2.DL3ZkOfz.js} +1 -1
- package/dist/public/_app/immutable/nodes/{3.BXbzTzc-.js → 3.B5IcEDJ0.js} +7 -7
- package/dist/public/_app/version.json +1 -1
- package/dist/public/gear/gear_wheel_wheel.html +12 -12
- package/dist/public/gear/simplified_gear_wheel.html +12 -12
- package/dist/public/heliostat/base.html +12 -12
- package/dist/public/heliostat/haxis_guidance.html +12 -12
- package/dist/public/heliostat/heliostat.html +14 -14
- package/dist/public/heliostat/heliostat_2.html +14 -14
- package/dist/public/heliostat/pole_static.html +12 -12
- package/dist/public/heliostat/rake.html +12 -12
- package/dist/public/heliostat/rake_stopper.html +12 -12
- package/dist/public/heliostat/ring.html +12 -12
- package/dist/public/heliostat/ring_guidance.html +12 -12
- package/dist/public/heliostat/rod.html +12 -12
- package/dist/public/heliostat/spider.html +12 -12
- package/dist/public/heliostat/surface.html +12 -12
- package/dist/public/heliostat/swing.html +12 -12
- package/dist/public/heliostat/trapeze.html +12 -12
- package/dist/public/heliostat/vaxis.html +12 -12
- package/dist/public/heliostat/vaxis_guidance.html +12 -12
- package/dist/public/heliostat/vaxis_holder.html +12 -12
- package/dist/public/index.html +10 -10
- package/dist/public/pgdsvg/heliostat.svg +1 -1
- package/dist/public/pgdsvg/heliostat_face_sizing.svg +1 -1
- package/dist/public/pgdsvg/pole_stator.svg +2 -2
- package/dist/public/pgdsvg/pole_stator_holderB_top.svg +1 -1
- package/package.json +1 -1
- package/dist/public/_app/immutable/chunks/paths.CqCwbvxs.js +0 -1
- package/dist/public/_app/immutable/entry/start.46Gu95PN.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var ve=Object.defineProperty;var $e=(s,t,u)=>t in s?ve(s,t,{enumerable:!0,configurable:!0,writable:!0,value:u}):s[t]=u;var z=(s,t,u)=>($e(s,typeof t!="symbol"?t+"":t,u),u);import{p as e,a as q,b as St,c as xt,i as ut,d as wt,f as L,g as
|
|
1
|
+
var ve=Object.defineProperty;var $e=(s,t,u)=>t in s?ve(s,t,{enumerable:!0,configurable:!0,writable:!0,value:u}):s[t]=u;var z=(s,t,u)=>($e(s,typeof t!="symbol"?t+"":t,u),u);import{p as e,a as q,b as St,c as xt,i as ut,d as wt,f as L,g as p,E as U,h as nt,j as Lt,k as Ht,l as Dt,m as v,n as lt,t as mt,r as at,o as we,q as be,s as K,u as gt,v as vt,w as I,x as ht,y as It,z as Bt,A as Ot,S as kt,B as Me}from"./index.BLMsg5xO.js";var ke=class{constructor(s,t,u,o,n){z(this,"base_center_x");z(this,"base_center_y");z(this,"base_radius");z(this,"initial_angle");z(this,"right_nleft");this.base_center_x=s,this.base_center_y=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,c=n-this.angleSign()*Math.PI/2,d=u*this.base_radius,r=a+Math.cos(c)*d,_=i+Math.sin(c)*d,g=this.lFromU(u)*o,l=u,h=Math.cos(l)*g,f=Math.sin(l)*g;return[r,_,h,f]}};function $t(s,t,u,o,n){return new ke(s,t,u,o,n)}var Ee=class{constructor(){z(this,"mod",1);z(this,"TN",23);z(this,"as",1);z(this,"cx",0);z(this,"cy",0);z(this,"brr",50);z(this,"blr",50);z(this,"ar",54);z(this,"pr",53);z(this,"dr",52);z(this,"br",51);z(this,"bRound",1);z(this,"adt",.5);z(this,"initAngle",0);z(this,"axisAngle",0);z(this,"involArcPairs",1);z(this,"skinThickness",0);z(this,"involuteR",$t(0,0,50,0,!0));z(this,"involuteL",$t(0,0,50,0,!1));z(this,"rud",0);z(this,"rup",0);z(this,"rua",0);z(this,"rwd",0);z(this,"rwp",0);z(this,"rwa",0);z(this,"lud",0);z(this,"lup",0);z(this,"lua",0);z(this,"lwd",0);z(this,"lwp",0);z(this,"lwa",0);z(this,"msg");z(this,"initStep",0);this.mod=1,this.msg="",this.initStep=0}incInitStep(s){if(this.initStep+1!==s)throw`err834: incInitStep initStep ${this.initStep} and target ${s} are not compatible`;this.initStep=s}checkInitStep(s,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"),[v(this.cx,this.cy,this.ar,"Azure"),v(this.cx,this.cy,this.pr,"Azure"),v(this.cx,this.cy,this.dr,"Azure"),v(this.cx,this.cy,this.br,"Azure"),v(this.cx,this.cy,this.brr,"CornFlowerBlue"),v(this.cx,this.cy,this.blr,"Crimson")]}calcInvoluteAngles(){this.checkInitStep(4,"calcInvoluteAngles"),this.involuteR=$t(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=$t(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
2
|
`;const n=this.as*(1-this.adt),a=this.rwp-this.rwd,i=Math.abs(this.lwp-this.lwd),c=n-a-i;if(c<2*Math.atan2(this.bRound,this.br))throw`err555: No remaining Dedendum reserve ${L(c)} 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=$t(this.cx,this.cy,this.brr,n-this.rwp,!0),[i,c]=a.ptc(this.rud+0*u),d=
|
|
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=$t(this.cx,this.cy,this.brr,n-this.rwp,!0),[i,c]=a.ptc(this.rud+0*u),d=p(i,c,"Gold");for(let S=0;S<s;S++){const[g,l]=a.ptc(this.rud+(S+1)*u);d.addSegStrokeA(g,l)}const r=n+this.as*this.adt,_=$t(this.cx,this.cy,this.blr,r-this.lwp,!1);for(let S=0;S<s+1;S++){const[g,l]=_.ptc(this.lud+(s-S)*o);d.addSegStrokeA(g,l)}return d.closeSegStroke(),d}getProfile(){this.checkInitStep(7,"getProfile"),this.calcInvoluteAngles(),this.checkProfileConditions();const s=this.rwd-this.rwp,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=lt(this.cx,this.cy),c=i.translatePolar(this.initAngle+s,this.br),d=p(c.cx,c.cy);for(let r=0;r<this.TN;r++){const _=this.initAngle+r*this.as,S=i.translatePolar(_+s,this.br);d.addSegStrokeA(S.cx,S.cy).addCornerRounded(this.bRound);const g=$t(this.cx,this.cy,this.brr,_-this.rwp,!0),[l,h]=g.ptc(this.rud),f=g.ptcta(this.rud),P=lt(l,h).translatePolar(f-Math.PI/2,this.skinThickness);d.addSegStrokeA(P.cx,P.cy);for(let b=0;b<this.involArcPairs;b++){const W=this.rud+b*n,[x,k]=g.ptc(W+n),T=g.ptcta(W),O=g.ptcta(W+n)+Math.PI,F=lt(x,k).translatePolar(T-Math.PI/2,this.skinThickness);d.addPointA(F.cx,F.cy).addSeg2Arcs(T,O)}const N=_+this.as*this.adt,w=$t(this.cx,this.cy,this.blr,N-this.lwp,!1),H=this.lud+this.involArcPairs*a,[E,$]=w.ptc(H),D=w.ptcta(H)+Math.PI,M=lt(E,$).translatePolar(D-Math.PI/2,this.skinThickness);d.addSegStrokeA(M.cx,M.cy);for(let b=0;b<this.involArcPairs;b++){const W=this.lud+(this.involArcPairs-b)*a,[x,k]=w.ptc(W-a),T=w.ptcta(W)+Math.PI,O=w.ptcta(W-a),F=lt(x,k).translatePolar(T-Math.PI/2,this.skinThickness);d.addPointA(F.cx,F.cy).addSeg2Arcs(T,O)}const R=i.translatePolar(N+t,this.br);d.addSegStrokeA(R.cx,R.cy).addCornerRounded(this.bRound)}return d.closeSegStroke(),d}getMsg(){return this.msg}};function Zt(){return new Ee}function Ae(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 Re(s,t,u,o,n,a,i,c,d){s.checkInitStep(3,"helper.baseCircles-1"),t.checkInitStep(3,"helper.baseCircles-2");let r=u,_=n,S=o,g=a;const l=c,h=d;return l===0&&(t.TN>s.TN?(r=s.dr,_=r*t.TN/s.TN):(_=t.dr,r=_*s.TN/t.TN)),h===0&&(t.TN>s.TN?(S=s.dr,g=S*t.TN/s.TN):(g=t.dr,S=g*s.TN/t.TN)),i===1&&(S=r,g=_),[r,S,_,g]}var Ne=class{constructor(s,t,u,o,n,a){z(this,"gw1");z(this,"gw2");z(this,"initAngle1");z(this,"angleCenterCenter");z(this,"interAxis");z(this,"rightLeftCenter2");z(this,"msg");z(this,"apr");z(this,"apl");z(this,"lBDr",0);z(this,"lBDl",0);z(this,"laStartRr1",0);z(this,"laStartRr2",0);z(this,"laStartRl1",0);z(this,"laStartRl2",0);z(this,"aFODr1",0);z(this,"aFODr2",0);z(this,"aFODl1",0);z(this,"aFODl2",0);z(this,"lasr1",0);z(this,"lasr2",0);z(this,"lasl1",0);z(this,"lasl2",0);z(this,"firstToothUr1",0);z(this,"firstToothUl1",0);z(this,"ftdr1",0);z(this,"ftdl1",0);this.gw1=s,this.gw2=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
|
`),ht(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
|
`),ht(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"),ht(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)}
|
|
@@ -16,28 +16,28 @@ var ve=Object.defineProperty;var $e=(s,t,u)=>t in s?ve(s,t,{enumerable:!0,config
|
|
|
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(b/this.lasl1)} 2: ${L(b/this.lasl2)}
|
|
18
18
|
`}calcContactPoint1(){for(this.gw1.checkInitStep(5,"ActionLine.calcContactPoint1"),this.firstToothUr1=Ot(this.apr-(this.initAngle1-this.angleCenterCenter)+this.gw1.rwp);ht(this.firstToothUr1-this.gw1.as)>=0;)this.firstToothUr1=ht(this.firstToothUr1-this.gw1.as);for(this.firstToothUl1=Ot(this.apl+(this.initAngle1-this.angleCenterCenter)+this.gw1.as*this.gw1.adt-this.gw1.lwp);ht(this.firstToothUl1-this.gw1.as)>=0;)this.firstToothUl1=ht(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,c,d,r){const S=Math.floor(t/(2*u)),g=(o+S*u)/n,l=s?1:-1,[h,f,P,N]=a.laptc(i,l*c,g,.4);this.msg+=`speed ${d}: vx ${L(P)} vy: ${L(N)} m/s
|
|
19
|
-
`;const w=lt(h,f),H=i+l*c,E=
|
|
19
|
+
`;const w=lt(h,f),H=i+l*c,E=p(h,f,r),$=w.translatePolar(H,-N);E.addSegStrokeA($.cx,$.cy);const D=$.translatePolar(H-l*Math.PI/2,P);return E.addSegStrokeA(D.cx,D.cy),E.closeSegStroke(),E}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(v(this.gw1.cx,this.gw1.cy,this.laStartRr1,"SkyBlue")),s.push(v(this.gw1.cx,this.gw1.cy,this.laStartRl1,"SlateBlue")),s.push(v(this.gw2.cx,this.gw2.cy,this.laStartRr2,"SkyBlue")),s.push(v(this.gw2.cx,this.gw2.cy,this.laStartRl2,"SlateBlue"));const t=lt(this.gw1.cx,this.gw1.cy),u=lt(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=p(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),c=u.translatePolar(this.angleCenterCenter+Math.PI-this.aFODr2,this.gw2.ar),d=p(i.cx,i.cy,"Yellow");d.addSegStrokeA(c.cx,c.cy),d.closeSegStroke(),s.push(d);const r=t.translatePolar(this.angleCenterCenter-this.apl,this.gw1.blr),_=u.translatePolar(this.angleCenterCenter+Math.PI-this.apl,this.gw2.blr),S=p(r.cx,r.cy,"YellowGreen");S.addSegStrokeA(_.cx,_.cy),S.closeSegStroke(),s.push(S);const g=t.translatePolar(this.angleCenterCenter+this.aFODl1,this.gw1.ar),l=u.translatePolar(this.angleCenterCenter+Math.PI+this.aFODl2,this.gw2.ar),h=p(g.cx,g.cy,"Yellow");return h.addSegStrokeA(l.cx,l.cy),h.closeSegStroke(),s.push(h),s.push(...this.getContactSpeed()),s}getContactPoint(){const s=[],t=lt(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(lt(u.cx,u.cy,kt.eBigSquare)),s.push(lt(o.cx,o.cy,kt.eBigSquare));const n=this.angleCenterCenter+this.apr-Math.PI/2,a=this.angleCenterCenter-this.apl+Math.PI/2,i=u.translatePolar(n,this.ftdr1),c=o.translatePolar(a,this.ftdl1);s.push(lt(i.cx,i.cy,kt.eBigSquare)),s.push(lt(c.cx,c.cy,kt.eBigSquare));let d=this.ftdr1;for(;d+this.lasr1<this.lBDr;){d+=this.lasr1;const _=u.translatePolar(n,d);s.push(lt(_.cx,_.cy,kt.eBigSquare))}let r=this.ftdl1;for(;r+this.lasl1<this.lBDl;){r+=this.lasl1;const _=o.translatePolar(a,r);s.push(lt(_.cx,_.cy,kt.eBigSquare))}return s}getMsg(){return this.msg}getInitAngle2(){let s=this.lBDr-this.ftdr1;for(;ht(s-this.lasr2)>=0;)s=ht(s-this.lasr2);let t=this.lBDl-this.ftdl1;for(;ht(t-this.lasl2)>=0;)t=ht(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 c=2*Math.PI+Ot(i);for(;ht(c-this.gw2.as-n)>=0;)c=ht(c-this.gw2.as);const d=c-n,r=d*this.gw2.brr/this.gw1.brr,_=d*this.gw2.brr,S=d*this.gw2.blr;this.msg+=`slack angle: 1: ${L(at(r))} 2: ${L(at(d))} degree
|
|
20
20
|
`,this.msg+=`slack on action line: right-2: ${L(_)} left-2: ${L(S)} mm
|
|
21
|
-
`;let g=0;if(this.rightLeftCenter2===0)g=n;else if(this.rightLeftCenter2===1)g=i;else if(this.rightLeftCenter2===2)g=n+d/2;else throw`err221: initAngle2 rightLeftCenter2 ${this.rightLeftCenter2} has an unkown value`;return Me(g)}};function Ve(s,t,u,o,n,a){return new Ne(s,t,u,o,n,a)}function Ce(s,t,u,o,n,a,i,c,d){let r=v(s,t,u);if(o>0){if(n>2*u)throw`err383: axisTorque ribWidth ${L(n)} larger than 2x axisRadius ${L(u)}`;const _=Math.asin(n/(2*u)),S=2*Math.PI/o;if(S-2.5*_<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+c>a)throw`err386: axisTorque ribRound12 ${L(i)} ${L(c)} too large compare to ribHeight ${L(n)}`;const g=S-2*_>Math.PI,l=lt(s,t),f=l.translatePolar(d,u+a).translatePolar(d+Math.PI/2,n/2);r=
|
|
22
|
-
`;try{const i=Zt(),c=Zt();i.set1ModuleToothNumber(t.module,t.N1),c.set1ModuleToothNumber(t.module,t.N2),i.set2CenterPosition(t.c1x,t.c1y);const d=wt(t.angleCenterCenter),[r,_,S]=Ae(i,c,d,t.addInterAxis);c.set2CenterPosition(r,_),i.set3CircleRadius(t.ah1,t.dh1,t.bh1,t.bRound1),c.set3CircleRadius(t.ah2,t.dh2,t.bh2,t.bRound2);const[g,l,h,f]=Re(i,c,t.brr1,t.blr1,t.brr2,t.blr2,t.involSym,t.involROpt,t.involROpt);i.set4BaseCircles(g,l),c.set4BaseCircles(h,f),i.set5AddendumThickness(t.at1),c.set5AddendumThickness(t.at2);const P=wt(t.initAngle1)+s*3*i.as/100;i.set6Angles(P,d);const N=Ve(i,c,P,d,S,t.gw2Position);N.prepare();for(const M of N.getContours())n.addDynamics(M);n.addPoints(N.getContactPoint()),c.set6Angles(N.getInitAngle2(),d+Math.PI),o.logstr+=N.getMsg(),i.set7InvoluteDetails(t.involArcPairs1,t.skinThickness1),c.set7InvoluteDetails(t.involArcPairs2,t.skinThickness2);for(const M of i.getRefCircles())n.addDynamics(M);for(const M of c.getRefCircles())n.addDynamics(M);n.addDynamics(i.getToothRef()),n.addDynamics(c.getToothRef());const w=i.getProfile();if(o.logstr+=i.getMsg(),o.logstr+=w.check(),n.addMain(w),t.centralAxis===1){const M=Ce(i.cx,i.cy,t.axisRadius,t.ribNb,t.ribWidth,t.ribHeight,t.ribRound1,t.ribRound2,P);o.logstr+=M.check(),n.addMain(M)}if(t.hollow===1){const M=i.br,R=t.axisRadius+t.ribHeight,b=M-t.materialHeightExt,W=R+t.materialHeightInt;if(W>b)throw`err902: hollowMaterialInt ${L(W)} bigger than hollowMaterialExt ${L(b)}`;const x=Ie(i.cx,i.cy,b,W,t.spokeNb,t.spokeWidth,t.spokeRound,P);for(const k of x)o.logstr+=k.check(),n.addMain(k)}const H=c.getProfile();o.logstr+=H.check(),n.addSecond(H);const E=i.ar+t.wheelRadiusExtra;if(t.wheelAxis===1){const M=Kt(t.wheelHeight,t.wheelMidExtra,t.wheelAxisLength,t.wheelAxisRadius,t.wheelMidRadius,E,t.wheelAxisExtRound,t.wheelAxisIntRound,t.wheelExtraRound,!0),R=Kt(t.wheelHeight,t.wheelMidExtra,t.wheelAxisLength,t.wheelAxisRadius,t.wheelMidRadius,E,t.wheelAxisExtRound,t.wheelAxisIntRound,t.wheelExtraRound,!1);a.addMain(M),a.addSecond(R)}else{const M=
|
|
21
|
+
`;let g=0;if(this.rightLeftCenter2===0)g=n;else if(this.rightLeftCenter2===1)g=i;else if(this.rightLeftCenter2===2)g=n+d/2;else throw`err221: initAngle2 rightLeftCenter2 ${this.rightLeftCenter2} has an unkown value`;return Me(g)}};function Ve(s,t,u,o,n,a){return new Ne(s,t,u,o,n,a)}function Ce(s,t,u,o,n,a,i,c,d){let r=v(s,t,u);if(o>0){if(n>2*u)throw`err383: axisTorque ribWidth ${L(n)} larger than 2x axisRadius ${L(u)}`;const _=Math.asin(n/(2*u)),S=2*Math.PI/o;if(S-2.5*_<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+c>a)throw`err386: axisTorque ribRound12 ${L(i)} ${L(c)} too large compare to ribHeight ${L(n)}`;const g=S-2*_>Math.PI,l=lt(s,t),f=l.translatePolar(d,u+a).translatePolar(d+Math.PI/2,n/2);r=p(f.cx,f.cy);for(let P=0;P<o;P++){const N=d+P*S,w=N+S,H=l.translatePolar(N+_,u),E=l.translatePolar(w-_,u),D=l.translatePolar(N,u+a).translatePolar(N+Math.PI/2,n/2),R=l.translatePolar(w,u+a).translatePolar(w-Math.PI/2,n/2);r.addSegStrokeA(D.cx,D.cy).addCornerRounded(i),r.addSegStrokeA(H.cx,H.cy).addCornerRounded(c),r.addPointA(E.cx,E.cy).addSegArc(u,g,!0).addCornerRounded(c),r.addSegStrokeA(R.cx,R.cy).addCornerRounded(i)}r.closeSegStroke()}return r}function Ie(s,t,u,o,n,a,i,c){const d=2*Math.PI/n,r=Math.asin(a/(2*o)),_=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*_<2.5*Math.asin(i/u))throw`err907: hollowStraight spokeNb ${n}, spokeWidth ${L(a)} or spokeRound ${L(i)} are too large`;const S=a/(2*Math.sin(d/2)),g=d-2*r<2.1*Math.asin(i/o),l=d-2*_>Math.PI,h=lt(s,t),f=[];for(let P=0;P<n;P++){const N=c+P*d,w=N+d,H=N+d/2,E=h.translatePolar(N+_,u),$=h.translatePolar(w-_,u),D=h.translatePolar(w-r,o),M=h.translatePolar(N+r,o),R=h.translatePolar(H,S),b=p(E.cx,E.cy);b.addCornerRounded(i),b.addPointA($.cx,$.cy).addSegArc(u,l,!0).addCornerRounded(i),g?b.addSegStrokeA(R.cx,R.cy).addCornerRounded(i):(b.addSegStrokeA(D.cx,D.cy).addCornerRounded(i),b.addPointA(M.cx,M.cy).addSegArc(o,l,!1).addCornerRounded(i)),b.closeSegStroke(),f.push(b)}return f}function Kt(s,t,u,o,n,a,i,c,d,r){const _=r?1:-1,S=s/2,g=S+t,l=g+u,h=p(0,-l);return h.addSegStrokeA(_*o,-l).addCornerRounded(i).addSegStrokeA(_*o,-g).addCornerRounded(c).addSegStrokeA(_*n,-g).addSegStrokeA(_*a,-S).addCornerRounded(d).addSegStrokeA(_*a,S).addCornerRounded(d).addSegStrokeA(_*n,g).addSegStrokeA(_*o,g).addCornerRounded(c).addSegStrokeA(_*o,l).addCornerRounded(i).addSegStrokeA(0,l).closeSegStroke(),h}var Qt={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),St("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"),St("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),St("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"),St("centralAxis",!0),St("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 Be(s,t,u=""){const o=ut(Qt.partName+u),n=I(),a=I();o.logstr+=`${o.partName} simTime: ${s}
|
|
22
|
+
`;try{const i=Zt(),c=Zt();i.set1ModuleToothNumber(t.module,t.N1),c.set1ModuleToothNumber(t.module,t.N2),i.set2CenterPosition(t.c1x,t.c1y);const d=wt(t.angleCenterCenter),[r,_,S]=Ae(i,c,d,t.addInterAxis);c.set2CenterPosition(r,_),i.set3CircleRadius(t.ah1,t.dh1,t.bh1,t.bRound1),c.set3CircleRadius(t.ah2,t.dh2,t.bh2,t.bRound2);const[g,l,h,f]=Re(i,c,t.brr1,t.blr1,t.brr2,t.blr2,t.involSym,t.involROpt,t.involROpt);i.set4BaseCircles(g,l),c.set4BaseCircles(h,f),i.set5AddendumThickness(t.at1),c.set5AddendumThickness(t.at2);const P=wt(t.initAngle1)+s*3*i.as/100;i.set6Angles(P,d);const N=Ve(i,c,P,d,S,t.gw2Position);N.prepare();for(const M of N.getContours())n.addDynamics(M);n.addPoints(N.getContactPoint()),c.set6Angles(N.getInitAngle2(),d+Math.PI),o.logstr+=N.getMsg(),i.set7InvoluteDetails(t.involArcPairs1,t.skinThickness1),c.set7InvoluteDetails(t.involArcPairs2,t.skinThickness2);for(const M of i.getRefCircles())n.addDynamics(M);for(const M of c.getRefCircles())n.addDynamics(M);n.addDynamics(i.getToothRef()),n.addDynamics(c.getToothRef());const w=i.getProfile();if(o.logstr+=i.getMsg(),o.logstr+=w.check(),n.addMain(w),t.centralAxis===1){const M=Ce(i.cx,i.cy,t.axisRadius,t.ribNb,t.ribWidth,t.ribHeight,t.ribRound1,t.ribRound2,P);o.logstr+=M.check(),n.addMain(M)}if(t.hollow===1){const M=i.br,R=t.axisRadius+t.ribHeight,b=M-t.materialHeightExt,W=R+t.materialHeightInt;if(W>b)throw`err902: hollowMaterialInt ${L(W)} bigger than hollowMaterialExt ${L(b)}`;const x=Ie(i.cx,i.cy,b,W,t.spokeNb,t.spokeWidth,t.spokeRound,P);for(const k of x)o.logstr+=k.check(),n.addMain(k)}const H=c.getProfile();o.logstr+=H.check(),n.addSecond(H);const E=i.ar+t.wheelRadiusExtra;if(t.wheelAxis===1){const M=Kt(t.wheelHeight,t.wheelMidExtra,t.wheelAxisLength,t.wheelAxisRadius,t.wheelMidRadius,E,t.wheelAxisExtRound,t.wheelAxisIntRound,t.wheelExtraRound,!0),R=Kt(t.wheelHeight,t.wheelMidExtra,t.wheelAxisLength,t.wheelAxisRadius,t.wheelMidRadius,E,t.wheelAxisExtRound,t.wheelAxisIntRound,t.wheelExtraRound,!1);a.addMain(M),a.addSecond(R)}else{const M=p(0,-t.wheelHeight/2).addSegStrokeR(0,t.wheelHeight).addSegStrokeR(E,0).addSegStrokeR(0,-t.wheelHeight).closeSegStroke(),R=p(0,-t.wheelHeight/2).addSegStrokeR(0,t.wheelHeight).addSegStrokeR(-E,0).addSegStrokeR(0,-t.wheelHeight).closeSegStroke();a.addMain(M),a.addSecond(R)}o.fig={teethProfile:n,axisProfile:a};const $=o.partName,D=t.wheelHeight/2+t.wheelMidExtra+t.wheelAxisLength+10;o.vol={extrudes:[{outName:`subpax_${$}_teethProfile`,face:`${$}_teethProfile`,extrudeMethod:U.eLinearOrtho,length:2*D,rotate:[0,0,0],translate:[0,0,-D]},{outName:`subpax_${$}_axisProfile`,face:`${$}_axisProfile`,extrudeMethod:U.eRotate,rotate:[0,0,0],translate:[0,0,0]}],volumes:[{outName:`pax_${$}`,boolMethod:nt.eIntersection,inList:[`subpax_${$}_teethProfile`,`subpax_${$}_axisProfile`]}]},o.logstr+=`gear_wheel_wheel drawn successfully!
|
|
23
23
|
`,o.calcErr=!1}catch(i){o.logstr+=i,console.log(i)}return o}var Jt={pTitle:"Gearwheel-gearwheel",pDescription:"Gear-system with two wheels",pDef:Qt,pGeom:Be},te={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),St("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),St("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),St("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 ye(s,t,u=""){const o=ut(te.partName+u),n=I(),a=I();o.logstr+=`${o.partName} simTime: ${s}
|
|
24
24
|
`;try{const i=Lt(Jt.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 c=Jt.pGeom(s,i.getParamVal(),i.getSuffix());Ht(c),o.logstr+=Dt(c.logstr,i.getPartNameSuffix()),n.mergeFigure(c.fig.teethProfile),a.mergeFigure(c.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:c,rotate:[0,0,0],translate:[0,0,0]}],extrudes:[],volumes:[{outName:`pax_${d}`,boolMethod:nt.eIdentity,inList:[`inpax_${d}_gearWW`]}]};const r={partName:i.getPartName(),dparam:i.getDesignParamList(),orientation:[0,0,0],position:[0,0,0]};o.sub={gear_wheel_wheel_1:r},o.logstr+=`simplified_gear_wheel drawn successfully!
|
|
25
25
|
`,o.calcErr=!1}catch(i){o.logstr+=i,console.log(i)}return o}var Te={pTitle:"Simplified gearwheel",pDescription:"One simplified gearwheel without details on teeth-profile",pDef:te,pGeom:ye};function Fe(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,c=s.PHL2/2,d=Math.sqrt(o**2-c**2)-u,r=Math.sqrt(c**2+d**2),_=Math.acos(d/r),S=Math.acos(s.PHR4/r),g=Math.PI-_-S;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}`;g>Math.PI/2-n&&(t+=`warn345: PHL2 is quiet small ${L(s.PHL2)} mm
|
|
26
26
|
`),t+=`petal angle: ${L(at(a))} degree
|
|
27
27
|
`,t+=`hollow angle: ${L(at(i))} degree
|
|
28
|
-
`;const l=lt(0,0),f=lt(o,0).rotate(l,-a/2),P=lt(u,0),N=lt(u-s.PHR4,0),w=N.rotate(P,g),H=N.rotate(P,-g),E=
|
|
29
|
-
`;const r=
|
|
28
|
+
`;const l=lt(0,0),f=lt(o,0).rotate(l,-a/2),P=lt(u,0),N=lt(u-s.PHR4,0),w=N.rotate(P,g),H=N.rotate(P,-g),E=p(f.cx,f.cy).addCornerRounded(s.PHR6).addSegStrokeA(w.cx,w.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(),$=p(f.cx,f.cy),D=[...Array(s.PHN1).keys()].map(M=>M*(a+i));for(const M of D)$.addPartial(E.rotate(0,0,M));return[t,$,D]}function ee(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,c=Math.sqrt(o**2-i**2),d=Math.asin(i/o),r=u-c,_=Math.atan2(i,r),S=Math.sqrt(i**2+r**2),g=Math.acos(n/S),l=_+g,h=(a-2*d)/2;if(h<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 f=p(c,-i),P=lt(0,0),N=lt(o,0),w=lt(u,0),E=lt(u-n,0).rotate(w,l),$=N.rotate(P,d+h),D=N.rotate(P,a-d),M=p(c,-i).addCornerRounded(s.R5).addSegStrokeA(E.cx,E.cy).addPointA(u+n,0).addPointA(E.cx,-E.cy).addSegArc2().addSegStrokeA(c,i).addCornerRounded(s.R5).addPointA($.cx,$.cy).addPointA(D.cx,D.cy).addSegArc2();for(let R=0;R<s.N1;R++)f.addPartial(M.rotate(0,0,R*a));return[t,f,a]}function yt(s,t){let u="";const o=s.SD2/2,n=o+s.SE1,a=2*n;let i=!1,c=-o,d=-n;if(t&&(i=!0,c=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 r=p(0,0);for(let _=0;_<s.SN1;_++)r.addSegStrokeR(0,-s.SL1).addPointR(2*c,0).addSegArc(Math.abs(c),!1,i),_<s.SN1-1?r.addSegStrokeR(0,s.SL1).addPointR(2*d,0).addSegArc(Math.abs(d),!1,!i):s.Send===1?r.addSegStrokeR(0,s.SL2):r.addSegStrokeR(0,s.SL2-n).addPointR(2*d,0).addSegArc(Math.abs(d),!1,!i);s.Send===1?r.addSegStrokeR(-s.SE1,0):r.addSegStrokeR(s.SE1,0);for(let _=0;_<s.SN1;_++)_>0?r.addPointR(-2*c,0).addSegArc(Math.abs(c),!1,i).addSegStrokeR(0,-s.SL1):s.Send===1?r.addSegStrokeR(0,-s.SL2):r.addPointR(-2*c,0).addSegArc(Math.abs(c),!1,i).addSegStrokeR(0,-s.SL2+n),r.addPointR(-2*d,0).addSegArc(Math.abs(d),!1,!i).addSegStrokeR(0,s.SL1);return[u,r]}function me(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)+wt(s.SA1),r=Math.PI/2-d,_=-Math.PI/2+d,S=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[g,l]=yt(s,!1),[,h]=yt(s,!0);t+=g;const f=lt(0,-u),P=lt(0,0),N=f.rotate(P,a),w=f.translate(0,s.L2),H=w.translate(-S,0),E=H.translate(0,S),$=H.translate(0,S+s.SE1),D=$.rotate(H,r),M=w.translate(0,S+s.SE1).translate(s.SE1,0),R=f.rotate(P,-a),b=w.translate(S,0),W=b.translate(0,S),x=W.rotate(b,_),k=b.translate(0,S+s.SE1),T=w.translate(0,S+s.SE1).translate(-s.SE1,0),O=p(N.cx,N.cy).addSegStrokeA(M.cx,M.cy).addSegStrokeA($.cx,$.cy),F=p($.cx,$.cy).addPointA(D.cx,D.cy).addSegArc(S+s.SE1,!1,!0);F.addPartial(l.rotate(0,0,-d).translate(D.cx,D.cy)),F.addPointA(E.cx,E.cy).addPointA(w.cx,w.cy).addSegArc2().addSegStrokeA(f.cx,f.cy),O.addPartial(F);const m=p(f.cx,f.cy).addSegStrokeA(w.cx,w.cy).addPointA(W.cx,W.cy).addPointA(x.cx,x.cy).addSegArc2();m.addPartial(h.rotate(0,0,d).translate(x.cx,x.cy)),m.addPointA(k.cx,k.cy).addSegArc(S+s.SE1,!1,!0);const j=p(k.cx,k.cy).addSegStrokeA(T.cx,T.cy).addSegStrokeA(R.cx,R.cy),Q=p(f.cx,f.cy).addPartial(m).addPartial(j),C=p(u,0);if(s.orientation===2)for(let B=0;B<s.N2/2;B++){C.addPointAP(-2*B*o-2*i,u).addPointAP(-2*B*o-4*i,u).addSegArc2(),C.addCornerRounded(s.R7);const Y=Math.PI/2-(2*B+2)*o,Z=Y+2*a;C.addPartial(m.rotate(0,0,Z));const X=F.rotate(0,0,Y),J=X.getFirstPoint();C.addCornerRounded(s.R7),C.addSegStrokeA(J.cx,J.cy),C.addCornerRounded(s.R7),C.addPartial(X),C.addCornerRounded(s.R7)}else for(let B=0;B<s.N2;B++)C.addPointAP(-B*o-i,u).addPointAP(-B*o-2*i,u).addSegArc2().addCornerRounded(s.R7),s.orientation===0?C.addPartial(Q.rotate(0,0,Math.PI/2-(B+1)*o+a)):s.orientation===1&&C.addPartial(O.rotate(0,0,Math.PI/2-(B+1)*o)),C.addCornerRounded(s.R7);return[t,C]}var oe={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 Oe(s,t,u=""){const o=ut(oe.partName+u),n=I(),a=I(),i=I(),c=I();o.logstr+=`${o.partName} simTime: ${s}
|
|
30
30
|
`;try{const d=wt(t.PHA),r=t.PHD1/2,_=t.PHD2/2,S=t.PHD3/2,g=t.PHD5/2,l=_+t.PHL1/2*Math.sin(d),h=_-t.PHL1/2*Math.sin(d),f=t.PHL1*Math.cos(d),P=_-t.PHE2/Math.cos(d)+t.PHE1/2*Math.tan(d),N=_-t.PHE2/Math.cos(d)-t.PHE1/2*Math.tan(d),w=Math.min(P,N),H=(t.PHL1-t.PHE1/Math.cos(d))/2,E=_-t.PHE2/Math.cos(d);if(w<g)throw`err210: PHD5 ${t.PHD5} too large compare to PHE2 ${t.PHE2} or PHA ${t.PHA}`;o.logstr+=`vaxis_holder's height: ${L(f)} mm
|
|
31
31
|
`,o.logstr+=`vaxis_holder outerD1: ${L(2*l)} mm
|
|
32
32
|
`,o.logstr+=`vaxis_holder outerD2: ${L(2*h)} mm
|
|
33
33
|
`,o.logstr+=`vaxis_holder innerD: ${L(t.PHD1-2*t.PHR4)} mm
|
|
34
34
|
`,o.logstr+=`vaxis_holder D2-next: ${L(2*E)} mm
|
|
35
|
-
`;const $=function(B){return
|
|
36
|
-
`,o.calcErr=!1}catch(d){o.logstr+=d,console.log(d)}return o}var bt={pTitle:"Heliostat vaxis_holder",pDescription:"The holders of the guidance mechanism for azimuth motion",pDef:oe,pGeom:Oe},se={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"),St("holders",!0),e("PHL1A","mm",400,
|
|
35
|
+
`;const $=function(B){return p(B*g,-t.PHE1/2).addSegStrokeR(B*(P-g),0).addSegStrokeRP(-Math.PI/2+B*d,H).addSegStrokeRP(-Math.PI/2+B*(Math.PI/2+d),t.PHE2).addSegStrokeRP(Math.PI/2+B*d,t.PHL1).addSegStrokeRP(Math.PI/2+B*(Math.PI/2+d),t.PHE2).addSegStrokeRP(-Math.PI/2+B*d,H).addSegStrokeA(B*g,t.PHE1/2).closeSegStroke()},D=function(B){return p(B*w,-t.PHE1/2).addSegStrokeA(B*w,t.PHE1/2).addSegStrokeA(B*(r-t.PHR4),t.PHE1/2).addSegStrokeA(B*(r-t.PHR4),-t.PHE1/2).closeSegStroke()},M=function(B){return p(B*(r+S),-t.PHE1/2).addSegStrokeA(B*(r+S),t.PHE1/2).addSegStrokeA(B*(r-S),t.PHE1/2).addSegStrokeA(B*(r-S),-t.PHE1/2).closeSegStroke()};n.addMain($(1)),n.addSecond($(-1)),n.addSecond(D(1)),n.addSecond(M(1)),n.addSecond(D(-1)),n.addSecond(M(-1));const R=function(B){return p(B*(r+t.PHR4),-t.PHE1/2).addSegStrokeA(B*P,-t.PHE1/2).addSegStrokeRP(-Math.PI/2+B*d,H).closeSegStroke()},b=function(B){return p(B*(r+t.PHR4),t.PHE1/2).addSegStrokeA(B*N,t.PHE1/2).addSegStrokeRP(Math.PI/2+B*d,H).addSegStrokeA(B*(r+t.PHR4),t.PHE1+t.PHH1).closeSegStroke()};n.addSecond(R(-1)),n.addSecond(b(-1)),i.mergeFigure(n,!0),c.mergeFigure(n,!0),n.addSecond(R(1)),n.addSecond(b(1)),i.addMain(R(1)),i.addSecond(b(1)),c.addSecond(R(1)),c.addMain(b(1)),a.addMain(v(0,0,w)),a.addSecond(v(0,0,_)),a.addSecond(v(0,0,Math.max(l,h)));const[W,x,k]=Fe(t);o.logstr+=W,a.addMain(x);for(const B of k){const Y=lt(0,0).translatePolar(B,r);a.addMain(v(Y.cx,Y.cy,t.PHD3/2))}const T=p(r+t.PHR4,-t.PHE3).addSegStrokeA(w,-t.PHE3).addSegStrokeA(w,t.PHE3).addSegStrokeA(r+t.PHR4,t.PHE3).closeSegStroke();for(const B of k)a.addSecond(T.rotate(0,0,B));o.fig={facePetal:a,faceOuter:n,faceButtress1:i,faceButtress2:c};const O=o.partName,F=mt();F.addRotation(Math.PI/2,0,0),F.addTranslation(0,t.PHE3/2,0);const m=k.map((B,Y)=>{const Z=mt(F.getMatrix());return Z.addRotation(0,0,B),{outName:`subpax_${O}_b1_${Y}`,face:`${O}_faceButtress1`,extrudeMethod:U.eLinearOrtho,length:t.PHE3,rotate:Z.getRotation(),translate:Z.getTranslation()}}),j=k.map((B,Y)=>{const Z=mt(F.getMatrix());return Z.addRotation(0,0,B),{outName:`subpax_${O}_b2_${Y}`,face:`${O}_faceButtress2`,extrudeMethod:U.eLinearOrtho,length:t.PHE3,rotate:Z.getRotation(),translate:Z.getTranslation()}}),Q=k.map((B,Y)=>`subpax_${O}_b1_${Y}`),C=k.map((B,Y)=>`subpax_${O}_b2_${Y}`);o.vol={extrudes:[{outName:`subpax_${O}_outer`,face:`${O}_faceOuter`,extrudeMethod:U.eRotate,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${O}_petal`,face:`${O}_facePetal`,extrudeMethod:U.eLinearOrtho,length:t.PHE1,rotate:[0,0,0],translate:[0,0,-t.PHE1/2]},...m,...j],volumes:[{outName:`pax_${O}`,boolMethod:nt.eUnion,inList:[`subpax_${O}_petal`,`subpax_${O}_outer`,...Q,...C]}]},o.sub={},o.logstr+=`vaxis_holder drawn successfully!
|
|
36
|
+
`,o.calcErr=!1}catch(d){o.logstr+=d,console.log(d)}return o}var bt={pTitle:"Heliostat vaxis_holder",pDescription:"The holders of the guidance mechanism for azimuth motion",pDef:oe,pGeom:Oe},se={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"),St("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 Je(s,t,u=""){const o=ut(se.partName+u),n=I(),a=I(),i=I(),c=I(),d=I(),r=I(),_=I(),S=I(),g=I(),l=I(),h=I();o.logstr+=`${o.partName} simTime: ${s}
|
|
37
37
|
`;try{const f=t.D1/2,P=t.D2/2,N=t.D3/2,w=t.H1+t.H2,H=Math.atan2(f-P,t.H2),E=t.E2*Math.tan(H/2),$=t.H1-E,D=t.PHL1B/Math.cos(H),M=P+t.PHL1B/2*Math.tan(H),R=t.H1+t.H2-t.PHL1B/2,b=P+(t.PHL1B/2+t.PHB)*Math.tan(H),W=t.H1+t.H2-t.PHL1B/2-t.PHB,x=t.PHL1A/Math.cos(H),k=f-t.PHL1A/2*Math.tan(H),T=t.H1+t.PHL1A/2;if(P>f)throw`err091: D2 ${t.D2} is larger than D1 ${t.D1}`;if(N+t.E2>f)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(w)} mm
|
|
38
38
|
`,o.logstr+=`cone-half-angle: ${L(at(H))} degree
|
|
39
39
|
`,o.logstr+=`holder position: A: ${L(T)} B1: ${L(W)} B2: ${L(R)} mm
|
|
40
|
-
`;const O=function(V){let G=P-t.E2*Math.cos(H);return G+=(w-t.E2*Math.sin(H)-V)*Math.tan(H),G},F=function(V,G){const ct=
|
|
40
|
+
`;const O=function(V){let G=P-t.E2*Math.cos(H);return G+=(w-t.E2*Math.sin(H)-V)*Math.tan(H),G},F=function(V,G){const ct=p(V*f,0).addSegStrokeA(V*f,t.H1).addSegStrokeA(V*P,w).addSegStrokeR(-V*t.E2*Math.cos(H),-t.E2*Math.sin(H));if(G&&t.holders){const st=t.H1+t.PHL1A/2-t.PHE1A/2,rt=st+t.PHE1A,ot=w-t.PHL1B/2+t.PHE1B/2,tt=ot-t.PHE1B,_t=ot-t.PHB,ft=_t-t.PHE1B;ct.addSegStrokeA(V*O(ot),ot).addSegStrokeA(V*(t.PHD1B/2-t.PHR4B),ot).addSegStrokeA(V*(t.PHD1B/2-t.PHR4B),tt).addSegStrokeA(V*O(tt),tt).addSegStrokeA(V*O(_t),_t).addSegStrokeA(V*(t.PHD1B/2-t.PHR4B),_t).addSegStrokeA(V*(t.PHD1B/2-t.PHR4B),ft).addSegStrokeA(V*O(ft),ft).addSegStrokeA(V*O(rt),rt).addSegStrokeA(V*(t.PHD1A/2-t.PHR4A),rt).addSegStrokeA(V*(t.PHD1A/2-t.PHR4A),st).addSegStrokeA(V*O(st),st)}return ct.addSegStrokeA(V*(f-t.E2),$),G?ct.addSegStrokeA(V*(f-t.E2),t.E1).addSegStrokeA(V*N,t.E1).addSegStrokeA(V*N,0):ct.addSegStrokeA(V*(f-t.E2),0),ct.closeSegStroke(),ct};n.addMain(F(1,!1)),n.addSecond(F(1,!0)),n.addSecond(F(-1,!0));const m=t.D4/2,j=t.H4-2*m;if(j<0)throw`err121: H4 ${t.H4} is too small compare to D4 ${t.D4}`;if(m-t.L2<0)throw`err121: D4 ${t.D4} is too small compare to L2 ${t.L2}`;const Q=function(V){const G=m-V;return we(0,t.H3+m-G,2*G,j+2*G,Math.PI/2)};a.addMain(Q(0)),a.addMain(Q(t.L2));const C=p(f,0).addSegStrokeA(f,t.H1).addSegStrokeA(P,w).addSegStrokeA(-P,w).addSegStrokeA(-f,t.H1).addSegStrokeA(-f,0).closeSegStroke();a.addSecond(C);const B=p(-f,t.H3).addSegStrokeR(0,t.H4).addSegStrokeR(-t.E3,0).addSegStrokeR(0,-t.H4).closeSegStroke();a.addSecond(B),i.addMain(v(0,0,f)),i.addMain(v(0,0,N));const Y=N+t.L1,Z=2*Math.PI/t.N1;for(let V=0;V<t.N1;V++){const G=Y*Math.cos(V*Z),ct=Y*Math.sin(V*Z);i.addMain(v(G,ct,t.D5/2))}i.addSecond(v(0,0,P)),i.addSecond(v(0,0,f-t.E2)),c.addMain(v(0,0,f+t.E3)),c.addMain(v(0,0,f-t.E2)),d.addMain(Q(t.L2));const X=o.partName,J=[],A=[];let y={};if(t.holders){const V=Lt(bt.pDef,"B2");V.setVal("PHD1",t.PHD1B),V.setVal("PHD2",2*M),V.setVal("PHD5",t.PHD5B2),V.setVal("PHN1",t.PHN1AB),V.setVal("PHD3",t.PHD3B),V.setVal("PHR4",t.PHR4B),V.setVal("PHL2",t.PHL2B),V.setVal("PHR6",t.PHR6B),V.setVal("PHE1",t.PHE1B),V.setVal("PHH1",t.PHH1B),V.setVal("PHA",at(H)),V.setVal("PHL1",D),V.setVal("PHE2",t.E2),V.setVal("PHE3",t.PHE3B);const G=bt.pGeom(0,V.getParamVal(),V.getSuffix());Ht(G),o.logstr+=Dt(G.logstr,V.getPartNameSuffix()),r.mergeFigure(G.fig.faceOuter),_.mergeFigure(G.fig.facePetal);const ct={outName:`inpax_${X}_hB2`,subdesign:"pax_vaxis_holderB2",subgeom:G,rotate:[0,0,0],translate:[0,0,R]};J.push(ct),A.push(`inpax_${X}_hB2`);const st=Lt(bt.pDef,"B1");st.setVal("PHD1",t.PHD1B),st.setVal("PHD2",2*b),st.setVal("PHD5",t.PHD5B1),st.setVal("PHN1",t.PHN1AB),st.setVal("PHD3",t.PHD3B),st.setVal("PHR4",t.PHR4B),st.setVal("PHL2",t.PHL2B),st.setVal("PHR6",t.PHR6B),st.setVal("PHE1",t.PHE1B),st.setVal("PHH1",t.PHH1B),st.setVal("PHA",at(H)),st.setVal("PHL1",D),st.setVal("PHE2",t.E2),st.setVal("PHE3",t.PHE3B);const rt=bt.pGeom(0,st.getParamVal(),st.getSuffix());Ht(rt),o.logstr+=Dt(rt.logstr,st.getPartNameSuffix()),S.mergeFigure(rt.fig.faceOuter),g.mergeFigure(rt.fig.facePetal);const ot={outName:`inpax_${X}_hB1`,subdesign:"pax_vaxis_holderB1",subgeom:rt,rotate:[0,0,0],translate:[0,0,W]};J.push(ot),A.push(`inpax_${X}_hB1`);const tt=Lt(bt.pDef,"A");tt.setVal("PHD1",t.PHD1A),tt.setVal("PHD2",2*k),tt.setVal("PHD5",t.PHD5A),tt.setVal("PHN1",t.PHN1AB),tt.setVal("PHD3",t.PHD3A),tt.setVal("PHR4",t.PHR4A),tt.setVal("PHL2",t.PHL2A),tt.setVal("PHR6",t.PHR6A),tt.setVal("PHE1",t.PHE1A),tt.setVal("PHH1",t.PHH1A),tt.setVal("PHA",at(H)),tt.setVal("PHL1",x),tt.setVal("PHE2",t.E2),tt.setVal("PHE3",t.PHE3A);const _t=bt.pGeom(0,tt.getParamVal(),tt.getSuffix());Ht(_t),o.logstr+=Dt(_t.logstr,tt.getPartNameSuffix()),l.mergeFigure(_t.fig.faceOuter),h.mergeFigure(_t.fig.facePetal);const ft={outName:`inpax_${X}_hA`,subdesign:"pax_vaxis_holderA",subgeom:_t,rotate:[0,0,0],translate:[0,0,T]};J.push(ft),A.push(`inpax_${X}_hA`),y={vaxis_holder_B2:{partName:V.getPartName(),dparam:V.getDesignParamList(),orientation:[0,0,0],position:[0,0,R]},vaxis_holder_B1:{partName:st.getPartName(),dparam:st.getDesignParamList(),orientation:[0,0,0],position:[0,0,W]},vaxis_holder_A:{partName:tt.getPartName(),dparam:tt.getDesignParamList(),orientation:[0,0,0],position:[0,0,T]}}}o.fig={poleCut:n,poleFace:a,poleBottom:i,emptyPole:c,emptyDoor:d,holderB2Section:r,holderB2Top:_,holderB1Section:S,holderB1Top:g,holderASection:l,holderATop:h},o.vol={inherits:J,extrudes:[{outName:`subpax_${X}_pole`,face:`${X}_poleCut`,extrudeMethod:U.eRotate,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${X}_bottom`,face:`${X}_poleBottom`,extrudeMethod:U.eLinearOrtho,length:t.E1,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${X}_door`,face:`${X}_poleFace`,extrudeMethod:U.eLinearOrtho,length:f+t.E3,rotate:[Math.PI/2,0,0],translate:[0,0,0]},{outName:`subpax_${X}_emptyPole`,face:`${X}_emptyPole`,extrudeMethod:U.eLinearOrtho,length:t.H1,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${X}_emptyDoor`,face:`${X}_emptyDoor`,extrudeMethod:U.eLinearOrtho,length:f+t.E3+10,rotate:[Math.PI/2,0,0],translate:[0,0,0]}],volumes:[{outName:`ipax_${X}_door`,boolMethod:nt.eIntersection,inList:[`subpax_${X}_door`,`subpax_${X}_emptyPole`]},{outName:`ipax_${X}_pole`,boolMethod:nt.eSubstraction,inList:[`subpax_${X}_pole`,`subpax_${X}_emptyDoor`]},{outName:`pax_${X}`,boolMethod:nt.eUnion,inList:[`ipax_${X}_pole`,`subpax_${X}_bottom`,`ipax_${X}_door`,...A]}]},o.sub=y,o.logstr+=`pole_static drawn successfully!
|
|
41
41
|
`,o.calcErr=!1}catch(f){o.logstr+=f,console.log(f)}return o}var At={pTitle:"Heliostat pole static",pDescription:"The vertical pole of an heliostat",pDef:se,pGeom:Je},ie={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 ze(s,t,u=""){const o=ut(ie.partName+u),n=I(),a=I(),i=I(),c=I(),d=I(),r=I(),_=I(),S=I(),g=I();o.logstr+=`${o.partName} simTime: ${s}
|
|
42
42
|
`;try{const h=Math.PI/2,f=-Math.PI/2,P=t.D1/2,N=t.D2/2,w=t.D3/2,H=t.D4/2,E=t.D5/2,$=t.D6/2,D=t.D7/2,M=t.D8/2,R=t.D4-2*t.E4,b=t.H1+t.H2,W=b-t.H4+t.H5,x=4*t.L4+t.L5+2*t.L6,k=t.H1+t.H2-t.H4,T=H*Math.cos(Math.PI/6),O=H*Math.sin(Math.PI/6),F=E*Math.cos(Math.PI/6),m=E*Math.sin(Math.PI/6),j=M*Math.cos(Math.PI/6),Q=M*Math.sin(Math.PI/6),C=[-x/2,-t.L5/2-t.L4,t.L5/2,x/2-t.L4],B=t.H2-t.L8-t.H4-H,Y=Math.atan2(P-N,t.H2),Z=x/2-t.L7-P+t.L8*Math.tan(Y),X=Math.sqrt(Z**2+B**2),J=Math.atan2(Z,B),A=t.E1/Math.sin(J+Y),y=X+t.E4/Math.cos(J)+A,V=P-t.L8*Math.tan(Y)-A*Math.sin(J),G=t.H1+t.L8-A*Math.cos(J),ct=V-$*Math.cos(J),st=G+$*Math.sin(J),rt=$-t.E6,ot=V-t.E6*Math.cos(J),tt=G+t.E6*Math.sin(J),_t=Math.PI/2-J,ft=t.L9/2,Pt=ft-t.H7*Math.tan(Y);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(B<0)throw`err140: H2 ${t.H2} too small compare to L8 ${t.L8}, H4 ${t.H4} and D4 ${t.D4}`;if(Pt<t.R9)throw`err177: R9 ${t.R9} too large compare to doorHighX ${Pt} 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)
|
|
@@ -47,62 +47,62 @@ var ve=Object.defineProperty;var $e=(s,t,u)=>t in s?ve(s,t,{enumerable:!0,config
|
|
|
47
47
|
`,o.logstr+=`cone-height total: ${L(W)} mm
|
|
48
48
|
`,o.logstr+=`cone-angle: ${L(at(Y))} degree
|
|
49
49
|
`,o.logstr+=`wing-angle: ${L(at(J))} degree
|
|
50
|
-
`;const et=t.E1*Math.cos(Y),qt=t.E1*Math.sin(Y),Vt=t.E1*Math.tan(Y/2),Le=function(dt){return
|
|
50
|
+
`;const et=t.E1*Math.cos(Y),qt=t.E1*Math.sin(Y),Vt=t.E1*Math.tan(Y/2),Le=function(dt){return p(dt*P,0).addSegStrokeA(dt*P,t.H1).addSegStrokeA(dt*N,b).addSegStrokeA(dt*(N-et),b-qt).addSegStrokeA(dt*(P-t.E1),t.H1-Vt).addSegStrokeA(dt*(P-t.E1),0).closeSegStroke()},Mt=function(dt){return p(dt*P,0).addSegStrokeA(dt*P,t.H1).addSegStrokeA(dt*N,b).addSegStrokeA(dt*(N-et),b-qt).addSegStrokeA(dt*(P-t.E1),t.H1-Vt).addSegStrokeA(dt*(P-t.E1),t.H1-t.H3).addSegStrokeA(dt*w,t.H1-t.H3).addSegStrokeA(dt*w,t.H1-t.H3-t.E3).addSegStrokeA(dt*(P-t.E1),t.H1-t.H3-t.E3).addSegStrokeA(dt*(P-t.E1),0).closeSegStroke()},He=k-H-(t.H1-Vt),De=P-t.E1-Math.tan(Y)*He,Pe=p(0,k-H).addSegStrokeA(De,k-H).addSegStrokeA(P-t.E1,t.H1-Vt).addSegStrokeA(P-t.E1,t.H1-t.H3).addSegStrokeA(0,t.H1-t.H3).closeSegStroke(),Tt=be(-ft,t.H1+t.H6,t.L9,2*Pt,t.H7,t.R9);n.addMain(Le(1)),n.addSecond(Mt(1)),n.addSecond(Mt(-1)),n.addSecond(K(-x/2,k,x,t.D4,0)),n.addSecond(K(-x/2,k,x,R,0));for(const dt of C)n.addSecond(gt(dt,k+O,t.L4,t.H5-O-m));n.addSecond(vt(V,G,y,2*$,_t)),n.addSecond(vt(ot,tt,y,2*rt,_t)),n.addSecond(vt(-V,G,2*$,y,J)),n.addSecond(vt(-ot,tt,2*rt,y,J)),n.addSecond(Tt),a.mergeFigure(n,!0),a.addMain(Pe);const Ft=p(T,k+O).addSegStrokeA(j,k+t.H5-Q).addSegStrokeA(F,k+t.H5-m).addPointA(-F,k+t.H5-m).addSegArc(E,!1,!1).addSegStrokeA(-j,k+t.H5-Q).addSegStrokeA(-T,k+O).closeSegArc(H,!1,!1);i.addMain(v(0,k,H)),i.addMain(v(0,k,H-t.E4)),i.addSecond(Mt(1)),i.addSecond(Mt(-1)),i.addSecond(Ft),i.addSecond(v(0,k+t.H5,E)),i.addSecond(K(0,t.H1+t.L8,B,2*$,h)),i.addSecond(K(0,t.H1+t.L8,B,2*rt,h)),i.addSecond(Tt),c.addMain(v(0,k,H-t.E4)),c.addSecond(v(0,k,H)),c.addSecond(Ft),d.addMain(v(0,0,P)),d.addMain(v(0,0,w));const Yt=w+t.L1,Xt=2*Math.PI/t.N1;for(let dt=0;dt<t.N1;dt++){const Et=Yt*Math.cos(dt*Xt),jt=Yt*Math.sin(dt*Xt);d.addMain(v(Et,jt,D))}d.addSecond(v(0,0,P-t.E1)),d.addSecond(v(0,0,N)),d.addSecond(K(0,-x/2,x,t.D4,h)),d.addSecond(K(0,-x/2,x,R,h));for(const dt of C)d.addSecond(K(0,dt,t.L4,2*T,h)),d.addSecond(K(0,dt,t.L4,2*F,h)),d.addSecond(K(0,dt,t.L4,2*j,h));const Ct=P-t.L8*Math.tan(Y);d.addSecond(K(0,Ct,Z,2*$,h)),d.addSecond(K(0,Ct,Z,2*rt,h)),d.addSecond(K(0,-Ct,Z,2*$,f)),d.addSecond(K(0,-Ct,Z,2*rt,f)),r.addMain(Ft),r.addSecond(v(0,k,H)),r.addSecond(v(0,k,H-t.E4)),r.addSecond(v(0,k+t.H5,E)),_.addMain(v(0,0,$)),_.addMain(v(0,0,rt)),S.addSecond(v(0,0,$)),S.addMain(v(0,0,rt)),g.addMain(Tt),g.addSecond(Mt(1)),g.addSecond(Mt(-1)),g.addSecond(K(-x/2,k,x,t.D4,0)),g.addSecond(K(-x/2,k,x,R,0));for(const dt of C)g.addSecond(gt(dt,k+O,t.L4,t.H5-O-m));g.addSecond(vt(V,G,y,2*$,_t)),g.addSecond(vt(ot,tt,y,2*rt,_t)),g.addSecond(vt(-V,G,2*$,y,J)),g.addSecond(vt(-ot,tt,2*rt,y,J)),o.fig={faceCone:n,faceConeHollow:a,faceBeam:i,faceBeamHollow:c,faceDisc:d,faceHand:r,faceWing:_,faceWingHollow:S,faceDoor:g};const it=o.partName,xe=C.map((dt,Et)=>({outName:`subpax_${it}_hand_${Et}`,face:`${it}_faceHand`,extrudeMethod:U.eLinearOrtho,length:t.L4,rotate:[Math.PI/2,0,0],translate:[0,-dt,0]}));o.vol={extrudes:[{outName:`subpax_${it}_cone`,face:`${it}_faceCone`,extrudeMethod:U.eRotate,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${it}_coneHollow`,face:`${it}_faceConeHollow`,extrudeMethod:U.eRotate,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${it}_beam`,face:`${it}_faceBeam`,extrudeMethod:U.eLinearOrtho,length:x,rotate:[Math.PI/2,0,0],translate:[0,x/2,0]},{outName:`subpax_${it}_beamHollow`,face:`${it}_faceBeamHollow`,extrudeMethod:U.eLinearOrtho,length:x,rotate:[Math.PI/2,0,0],translate:[0,x/2,0]},{outName:`subpax_${it}_disc`,face:`${it}_faceDisc`,extrudeMethod:U.eLinearOrtho,length:t.E3,rotate:[0,0,0],translate:[0,0,t.H1-t.H3-t.E3]},{outName:`subpax_${it}_wing_right`,face:`${it}_faceWing`,extrudeMethod:U.eLinearOrtho,length:y,rotate:[-J,0,0],translate:[0,ct,st]},{outName:`subpax_${it}_wing_left`,face:`${it}_faceWing`,extrudeMethod:U.eLinearOrtho,length:y,rotate:[J,0,0],translate:[0,-ct,st]},{outName:`subpax_${it}_wing_hollow_right`,face:`${it}_faceWingHollow`,extrudeMethod:U.eLinearOrtho,length:y,rotate:[-J,0,0],translate:[0,ct,st]},{outName:`subpax_${it}_wing_hollow_left`,face:`${it}_faceWingHollow`,extrudeMethod:U.eLinearOrtho,length:y,rotate:[J,0,0],translate:[0,-ct,st]},{outName:`subpax_${it}_door`,face:`${it}_faceDoor`,extrudeMethod:U.eLinearOrtho,length:t.D1,rotate:[Math.PI/2,0,-Math.PI/2+wt(t.doorOrientation)],translate:[0,0,0]},...xe],volumes:[{outName:`ipax_${it}_plus`,boolMethod:nt.eUnion,inList:[`subpax_${it}_cone`,`subpax_${it}_beam`,`subpax_${it}_disc`,`subpax_${it}_hand_0`,`subpax_${it}_hand_1`,`subpax_${it}_hand_2`,`subpax_${it}_hand_3`,`subpax_${it}_wing_right`,`subpax_${it}_wing_left`]},{outName:`ipax_${it}_hollow`,boolMethod:nt.eUnion,inList:[`subpax_${it}_coneHollow`,`subpax_${it}_beamHollow`,`subpax_${it}_wing_hollow_right`,`subpax_${it}_wing_hollow_left`,`subpax_${it}_door`]},{outName:`pax_${it}`,boolMethod:nt.eSubstraction,inList:[`ipax_${it}_plus`,`ipax_${it}_hollow`]}]},o.sub={},o.logstr+=`heliostat-rake drawn successfully!
|
|
51
51
|
`,o.calcErr=!1}catch(l){o.logstr+=l,console.log(l)}return o}var Rt={pTitle:"Heliostat rake",pDescription:"The rake on top of the V-Axis of the heliostat",pDef:ie,pGeom:ze},zt={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 Ge(s,t,u=""){const o=ut(zt.partName+u);let n,a;const i=I(),c=I(),d=I();o.logstr+=`${o.partName} simTime: ${s}
|
|
52
|
-
`;try{const r=t.D1/2;if(t.D1<t.E2)throw`err476: D1 ${t.D1} smaller then E2 ${t.E2}`;const _=t.E2/2,S=Math.sqrt(r**2-_**2),g=t.L1+t.L2*Math.sqrt(2),l=t.L2+t.L1*Math.sqrt(2),h=t.L4-l;if(h<t.R2)throw`err984: L4 ${t.L4} too small compare to R2 ${t.R2}`;const f=h*Math.cos(Math.PI/4),P=h*Math.sin(Math.PI/4),N=t.E2*Math.cos(Math.PI/4),w=t.E2*Math.sin(Math.PI/4),H=t.E2*Math.tan(Math.PI/8);if(r<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 E=(t.L3-t.E2)/2*Math.cos(Math.PI/4),$=g+f+E,D=-t.L1-P+E,M=D-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 R=1;t.N1>1&&(R=(t.L5-t.L6)/(t.N1-1));const b=[...Array(t.N1).keys()].map(F=>F*R);n=function(F,m,j){return
|
|
52
|
+
`;try{const r=t.D1/2;if(t.D1<t.E2)throw`err476: D1 ${t.D1} smaller then E2 ${t.E2}`;const _=t.E2/2,S=Math.sqrt(r**2-_**2),g=t.L1+t.L2*Math.sqrt(2),l=t.L2+t.L1*Math.sqrt(2),h=t.L4-l;if(h<t.R2)throw`err984: L4 ${t.L4} too small compare to R2 ${t.R2}`;const f=h*Math.cos(Math.PI/4),P=h*Math.sin(Math.PI/4),N=t.E2*Math.cos(Math.PI/4),w=t.E2*Math.sin(Math.PI/4),H=t.E2*Math.tan(Math.PI/8);if(r<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 E=(t.L3-t.E2)/2*Math.cos(Math.PI/4),$=g+f+E,D=-t.L1-P+E,M=D-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 R=1;t.N1>1&&(R=(t.L5-t.L6)/(t.N1-1));const b=[...Array(t.N1).keys()].map(F=>F*R);n=function(F,m,j){return p(F,m).addSegStrokeA(F+j*Math.cos(Math.PI/4),m-j*Math.sin(Math.PI/4)).addSegStrokeA(F,m-2*j*Math.sin(Math.PI/4)).addSegStrokeA(F-j*Math.cos(Math.PI/4),m-j*Math.sin(Math.PI/4)).closeSegStroke()},a=function(F,m,j,Q){return p(j,Q).addSegStrokeA(j+F,Q).addSegStrokeA(j+F,Q+m).addSegStrokeA(j,Q+m).closeSegStroke()};const W=Math.sin(2*Math.PI*s/zt.sim.tMax)*Math.PI/2;o.logstr+=`spide leg number: ${t.N1}
|
|
53
53
|
`,o.logstr+=`spide position angle: ${L(at(W))} degree
|
|
54
|
-
`;const x=
|
|
55
|
-
`,o.calcErr=!1}catch(r){o.logstr+=r,console.log(r)}return o}var Gt={pTitle:"Heliostat spider",pDescription:"The spider part for the control of the inclination of the heliostat",pDef:zt,pGeom:Ge},ne={partName:"swing",params:[e("L1","mm",12500,100,4e4,10),e("L2","mm",6e3,100,4e4,10),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,1e3,1),e("R2","mm",100,0,1e3,1),q("rod overlay"),e("rod1","",10,1,40,1),e("rod2","mm",1300,10,4e3,10),e("rod3","mm",400,10,1e3,10),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",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
|
|
54
|
+
`;const x=p(_,-S).addCornerRounded(t.R2).addSegStrokeA(_,-t.L1).addCornerRounded(t.R2).addSegStrokeA(g,-t.L1).addCornerRounded(t.R2+t.E2).addSegStrokeA(g+f,-t.L1-P).addSegStrokeA(g+f-N,-t.L1-P-w).addSegStrokeA(g-H,-t.L1-t.E2).addCornerRounded(t.R2).addSegStrokeA(-g+H,-t.L1-t.E2).addCornerRounded(t.R2).addSegStrokeA(-g-f+N,-t.L1-P-w).addSegStrokeA(-g-f,-t.L1-P).addSegStrokeA(-g,-t.L1).addCornerRounded(t.R2+t.E2).addSegStrokeA(-_,-t.L1).addCornerRounded(t.R2).addSegStrokeA(-_,-S).addCornerRounded(t.R2).closeSegArc(r,!0,!1);i.addMain(x),i.addMain(v(0,0,r-t.E1)),i.addSecond(n($,D,t.L3)),i.addSecond(n($,M,t.L3-2*t.E3)),i.addSecond(n(-$,D,t.L3)),i.addSecond(n(-$,M,t.L3-2*t.E3)),c.addMain(v(0,0,r)),c.addMain(v(0,0,r-t.E1)),c.addMain(n($,D,t.L3)),c.addMain(n($,M,t.L3-2*t.E3)),c.addMain(n(-$,D,t.L3)),c.addMain(n(-$,M,t.L3-2*t.E3)),c.addSecond(x),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 F of b)d.addSecond(a(t.L6,t.L4,F,-t.L4));o.fig={faceLegs:i.rotate(0,0,W),faceTube:c.rotate(0,0,W),faceBody:d};const k=o.partName,T=b.map((F,m)=>({outName:`subpax_${k}_leg_${m}`,face:`${k}_faceLegs`,extrudeMethod:U.eLinearOrtho,length:t.L6,rotate:[0,0,0],translate:[0,0,F]})),O=b.map((F,m)=>`subpax_${k}_leg_${m}`);o.vol={extrudes:[{outName:`subpax_${k}_tube`,face:`${k}_faceTube`,extrudeMethod:U.eLinearOrtho,length:t.L5,rotate:[0,0,0],translate:[0,0,0]},...T],volumes:[{outName:`pax_${k}`,boolMethod:nt.eUnion,inList:[`subpax_${k}_tube`,...O]}]},o.sub={},o.logstr+=`heliostat-spider drawn successfully!
|
|
55
|
+
`,o.calcErr=!1}catch(r){o.logstr+=r,console.log(r)}return o}var Gt={pTitle:"Heliostat spider",pDescription:"The spider part for the control of the inclination of the heliostat",pDef:zt,pGeom:Ge},ne={partName:"swing",params:[e("L1","mm",12500,100,4e4,10),e("L2","mm",6e3,100,4e4,10),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,1e3,1),e("R2","mm",100,0,1e3,1),q("rod overlay"),e("rod1","",10,1,40,1),e("rod2","mm",1300,10,4e3,10),e("rod3","mm",400,10,1e3,10),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",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 pe(s,t,u=""){const o=ut(ne.partName+u),n=I(),a=I(),i=I(),c=I(),d=I();o.logstr+=`${o.partName} simTime: ${s}
|
|
56
56
|
`;try{const r=t.D1/2,_=4*t.L4+t.L5+2*t.L6-2*t.H1,S=t.L4-2*t.H1,g=t.L5+2*t.H1,l=t.L6+2*t.H1;o.logstr+=`swing size: L1 ${L(t.L1)} x L2 ${L(t.L2)} mm
|
|
57
57
|
`,o.logstr+=`rake-L4: ${L(S)} mm (compare with rake)
|
|
58
58
|
`,o.logstr+=`rake-L5: ${L(g)} mm (compare with rake)
|
|
59
59
|
`,o.logstr+=`rake-L6: ${L(l)} mm (compare with rake)
|
|
60
60
|
`,o.logstr+=`rake-beamL: (4*L4+L5+2*L6-2*H1) ${L(_)} mm (compare with rake)
|
|
61
|
-
`,n.addMain(v(0,0,r)),n.addMain(v(0,0,r-t.E1));const h=[-t.L2/2,-t.L3-t.H2,t.L3,t.L2/2-t.H2];for(const T of h)n.addMain(gt(T,r-t.H4,t.H2,t.H4)),n.addMain(gt(T+t.E2,r-t.H4+t.E2,t.H2-2*t.E2,t.H4-2*t.E2));n.addSecond(gt(-t.L2/2,r,t.L2,t.H3));const f=[];f.push(-t.L1/2),f.push(t.L1/2-t.H1);for(const T 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 O of[0,t.L4-t.H1])f.push(T+O);for(const T of f)a.addMain(gt(T,r,t.H1,t.H3)),a.addMain(gt(T+t.E3,r+t.E3,t.H1-2*t.E3,t.H3-2*t.E3));a.addSecond(gt(-t.L1/2,-r,t.L1,t.D1)),a.addSecond(gt(-t.L1/2,r-t.H4,t.L1,t.H4));for(const T of f)i.addSecond(gt(T,-t.L2/2,t.H1,t.L2));for(const T of h)i.addSecond(gt(-t.L1/2,T,t.L1,t.H2));i.addSecond(gt(-t.L1/2,-r,t.L1,t.D1));const N=2*Math.atan2(t.S1,r),w=lt(0,0),E=lt(0,r).rotate(w,N),$=
|
|
62
|
-
`,o.calcErr=!1}catch(r){o.logstr+=r,console.log(r)}return o}var Nt={pTitle:"Heliostat swing",pDescription:"The swing for the heliostat inclination",pDef:ne,pGeom:
|
|
61
|
+
`,n.addMain(v(0,0,r)),n.addMain(v(0,0,r-t.E1));const h=[-t.L2/2,-t.L3-t.H2,t.L3,t.L2/2-t.H2];for(const T of h)n.addMain(gt(T,r-t.H4,t.H2,t.H4)),n.addMain(gt(T+t.E2,r-t.H4+t.E2,t.H2-2*t.E2,t.H4-2*t.E2));n.addSecond(gt(-t.L2/2,r,t.L2,t.H3));const f=[];f.push(-t.L1/2),f.push(t.L1/2-t.H1);for(const T 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 O of[0,t.L4-t.H1])f.push(T+O);for(const T of f)a.addMain(gt(T,r,t.H1,t.H3)),a.addMain(gt(T+t.E3,r+t.E3,t.H1-2*t.E3,t.H3-2*t.E3));a.addSecond(gt(-t.L1/2,-r,t.L1,t.D1)),a.addSecond(gt(-t.L1/2,r-t.H4,t.L1,t.H4));for(const T of f)i.addSecond(gt(T,-t.L2/2,t.H1,t.L2));for(const T of h)i.addSecond(gt(-t.L1/2,T,t.L1,t.H2));i.addSecond(gt(-t.L1/2,-r,t.L1,t.D1));const N=2*Math.atan2(t.S1,r),w=lt(0,0),E=lt(0,r).rotate(w,N),$=p(-t.L3,r).addSegStrokeA(-t.S1,r).addCornerRounded(t.R2).addSegStrokeA(E.cx,E.cy).addPointA(0,-r).addPointA(-E.cx,E.cy).addSegArc2().addSegStrokeA(t.S1,r).addCornerRounded(t.R2).addSegStrokeA(t.L3,r).addSegStrokeA(t.L3,r+t.E3).addSegStrokeA(-t.L3,r+t.E3).closeSegStroke();c.addMain($),c.addMain(v(0,0,r-t.E1)),n.addSecond($);for(const T of f)d.addMain(gt(T,-t.L2/2,t.H1,t.L2));for(const T of h)d.addMain(gt(-t.L1/2,T,t.L1,t.H2));d.addMain(gt(-t.L1/2,-r,t.L1,t.D1));const D=-((t.rod1-1)*t.rod2+t.rod3)/2,M=(t.rod3-t.rod4)/2,R=t.rod3/2,b=1.2*t.L2,W=(b-R)/3,x=-b/2;for(let T=0;T<t.rod1;T++){const O=D+T*t.rod2;d.addSecond(gt(O+M,x,t.rod4,b));for(let F=0;F<4;F++)d.addSecond(gt(O,x+F*W,t.rod3,R,R/4))}o.fig={faceSide:n,faceFace:a,faceTop:i,faceButtress:c,faceTopWithRods:d};const k=o.partName;o.vol={extrudes:[{outName:`subpax_${k}_side`,face:`${k}_faceSide`,extrudeMethod:U.eLinearOrtho,length:t.L1,rotate:[0,0,0],translate:[0,0,-t.L1/2]},{outName:`subpax_${k}_face`,face:`${k}_faceFace`,extrudeMethod:U.eLinearOrtho,length:t.L2,rotate:[0,Math.PI/2,0],translate:[-t.L2/2,0,0]},...f.map((T,O)=>({outName:`subpax_${k}_buttress_${O}`,face:`${k}_faceButtress`,extrudeMethod:U.eLinearOrtho,length:t.H1,rotate:[0,0,0],translate:[0,0,T]}))],volumes:[{outName:`pax_${k}`,boolMethod:nt.eUnion,inList:[`subpax_${k}_side`,`subpax_${k}_face`,...f.map((T,O)=>`subpax_${k}_buttress_${O}`)]}]},o.sub={},o.logstr+=`heliostat-swing drawn successfully!
|
|
62
|
+
`,o.calcErr=!1}catch(r){o.logstr+=r,console.log(r)}return o}var Nt={pTitle:"Heliostat swing",pDescription:"The swing for the heliostat inclination",pDef:ne,pGeom:pe},pt={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 Ue(s,t,u=""){const o=ut(pt.partName+u),n=I(),a=I();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 d=(t.al-t.ar)/2-Math.sin(2*Math.PI*s/
|
|
65
|
+
`;const d=(t.al-t.ar)/2-Math.sin(2*Math.PI*s/pt.sim.tMax)*(t.al+t.ar)/2,r=wt(d);o.logstr+=`swing position angle: ${L(at(r))} degree
|
|
66
66
|
`;const _=t.H1+t.H2-t.H3,S=_+t.H4+t.H5-t.H6+t.H7,g=S+t.H8,l=Lt(At.pDef),h=Lt(Rt.pDef),f=Lt(Gt.pDef),P=Lt(Nt.pDef);l.setVal("H1",t.H1),l.setVal("H2",t.H2),l.setVal("D1",t.D1),l.setVal("D2",t.D2),l.setVal("D3",t.D1-6*t.E1),l.setVal("E1",t.E1),l.setVal("E2",t.E1);const N=32,w=(t.D1-6*t.E1)/(N*4);l.setVal("N1",N),l.setVal("D5",w),l.setVal("L1",t.E1+w/2),l.setVal("H3",t.H1/4),l.setVal("H4",t.H1/2),l.setVal("D4",t.H1/4),l.setVal("L2",t.H1/80),l.setVal("E3",t.H1/80),l.setVal("holders",0),h.setVal("H1",t.H4),h.setVal("H2",t.H5),h.setVal("H3",t.H4-2*t.E1),h.setVal("D1",t.D3),h.setVal("D2",t.D4),h.setVal("L9",t.D3/2),h.setVal("H7",t.D3/2*1.6),h.setVal("H6",t.D3/20),h.setVal("R9",t.D3/20),h.setVal("E1",t.E1),h.setVal("E3",t.E1),h.setVal("E4",t.E1),h.setVal("E6",t.E1);const H=t.D2*.6,E=24,$=H/(E*4);if(h.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(h.setVal("N1",E),h.setVal("D7",$),h.setVal("L1",$),h.setVal("H4",t.H6),h.setVal("D4",t.D5),h.setVal("L7",t.L7),h.setVal("L8",t.L8),h.setVal("D6",t.D9),h.setVal("H5",t.H7+t.H8),h.setVal("D5",t.D6),h.setVal("D8",t.D7),t.D6>=t.D7)throw`err164: D6 ${t.D6} too large compare to D7 ${t.D7}`;const D=t.L4-2*t.L3;if(h.setVal("L4",D),D<=0)throw`err169: L3 ${t.L3} too large compare to L4 ${t.L4}`;h.setVal("L5",t.L5+2*t.L3),h.setVal("L6",t.L6+2*t.L3);const M=t.L5*.96,R=6;if(f.setVal("L5",M),f.setVal("D1",t.D8),f.setVal("L1",t.S1),f.setVal("L2",t.S2),f.setVal("L3",t.E2*2),f.setVal("E1",t.E1),f.setVal("E2",t.E2),f.setVal("E3",t.E1),f.setVal("L4",t.L2/2-t.H8),f.setVal("R2",0),f.setVal("N1",R),f.setVal("L6",M/(R*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 b=At.pGeom(0,l.getParamVal(),l.getSuffix());Ht(b),o.logstr+=Dt(b.logstr,l.getPartNameSuffix());const W=Rt.pGeom(0,h.getParamVal(),h.getSuffix());Ht(W),o.logstr+=Dt(W.logstr,h.getPartNameSuffix());const x=Gt.pGeom(0,f.getParamVal(),f.getSuffix());Ht(x),o.logstr+=Dt(x.logstr,f.getPartNameSuffix());const k=Nt.pGeom(0,P.getParamVal(),P.getSuffix());Ht(k),o.logstr+=Dt(k.logstr,P.getPartNameSuffix()),n.mergeFigure(b.fig.poleCut),n.mergeFigure(W.fig.faceBeam.translate(0,_)),n.mergeFigure(x.fig.faceLegs.translate(0,S).rotate(0,S,r/2)),n.mergeFigure(k.fig.faceSide.translate(0,g).rotate(0,g,r)),a.mergeFigure(b.fig.poleCut),a.mergeFigure(W.fig.faceCone.translate(0,_)),a.mergeFigure(x.fig.faceBody.translate(-M/2,S)),a.mergeFigure(k.fig.faceFace.translate(0,g)),o.fig={faceSide:n,faceFace:a};const T=o.partName;o.vol={inherits:[{outName:`inpax_${T}_poleStatic`,subdesign:"pax_pole_static",subgeom:b,rotate:[0,0,0],translate:[0,0,0]},{outName:`inpax_${T}_rake`,subdesign:"pax_rake",subgeom:W,rotate:[0,0,0],translate:[0,0,_]},{outName:`inpax_${T}_swing`,subdesign:"pax_swing",subgeom:k,rotate:[Math.PI/2,0,0],translate:[0,0,g]},{outName:`inpax_${T}_spider`,subdesign:"pax_spider",subgeom:x,rotate:[Math.PI/2,0,0],translate:[0,M/2,S]}],extrudes:[],volumes:[{outName:`pax_${T}`,boolMethod:nt.eUnion,inList:[`inpax_${T}_poleStatic`,`inpax_${T}_rake`,`inpax_${T}_swing`,`inpax_${T}_spider`]}]};const O={partName:l.getPartName(),dparam:l.getDesignParamList(),orientation:[0,0,0],position:[0,0,0]},F={partName:h.getPartName(),dparam:h.getDesignParamList(),orientation:[0,0,0],position:[0,0,_]},m={partName:f.getPartName(),dparam:f.getDesignParamList(),orientation:[Math.PI/2,0,0],position:[0,M/2,S]},j={partName:P.getPartName(),dparam:P.getDesignParamList(),orientation:[Math.PI/2,0,0],position:[0,0,g]};o.sub={pole_static_1:O,rake_1:F,spider_1:m,swing_1:j},o.logstr+=`heliostat-overview drawn successfully!
|
|
67
|
-
`,o.calcErr=!1}catch(i){o.logstr+=i,console.log(i)}return o}var We={pTitle:"Heliostat overview",pDescription:"The heliostat inclination mechanism",pDef:
|
|
67
|
+
`,o.calcErr=!1}catch(i){o.logstr+=i,console.log(i)}return o}var We={pTitle:"Heliostat overview",pDescription:"The heliostat inclination mechanism",pDef:pt,pGeom:Ue},de={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 qe(s,t,u=""){const o=ut(de.partName+u),n=I(),a=I(),i=I(),c=I(),d=I(),r=I(),_=I(),S=I(),g=I(),l=I(),h=I(),f=I(),P=I(),N=I(),w=I(),H=I(),E=I(),$=I(),D=I();o.logstr+=`${o.partName} simTime: ${s}
|
|
68
68
|
`;try{const R=Math.PI,b=Math.PI/2,W=-Math.PI/2,x=t.D1/2,k=t.H1+t.H2,T=k-t.H4+t.H5,O=T-t.S2,F=t.H1+t.H2-t.H4,m=F+t.D4/2,j=t.H1+t.S3,Q=t.L5/2,C=t.S1/2,B=t.S1-2*t.E7,Y=B/2,Z=t.S2-C,X=O-t.JH1,J=t.JD1/2,A=J-t.JE1,y=x+t.JS2,V=Q-C,G=x+t.JS3,ct=t.JD3-2*t.JE3,st=t.D4/2+t.JS4,rt=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(O-t.JH1-t.JD1/2<0)throw`err143: S2 ${t.S2} too large compare to H1H5 ${L(T)}`;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+C)throw`err148: JH1 ${t.JH1} too large compare to JD1 ${t.JD1} and S1 ${t.S1}`;if(t.JS2<t.JS1-C)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(k)} mm
|
|
69
69
|
`,o.logstr+=`cone-height total: ${L(T)} mm
|
|
70
70
|
`,H.addSecond(K(-Q,O,t.L5,t.S1,0)),H.addSecond(K(-Q,O,t.L5,B,0)),H.addMain(v(-t.JL1/2,X,J)),H.addMain(v(-t.JL1/2,X,A)),H.addMain(v(t.JL1/2,X,J)),H.addMain(v(t.JL1/2,X,A));const ot=Lt(Rt.pDef);ot.setVal("D1",t.D1),ot.setVal("D2",t.D2),ot.setVal("D3",t.D3),ot.setVal("H1",t.H1),ot.setVal("H2",t.H2),ot.setVal("H3",t.H3),ot.setVal("E1",t.E1),ot.setVal("E3",t.E3),ot.setVal("H4",t.H4),ot.setVal("D4",t.D4),ot.setVal("E4",t.E4),ot.setVal("H5",t.H5),ot.setVal("D5",t.D5),ot.setVal("L4",t.L4),ot.setVal("L5",t.L5),ot.setVal("L6",t.L6),ot.setVal("D6",t.D6),ot.setVal("E6",t.E6),ot.setVal("L7",t.L7),ot.setVal("L8",t.L8),ot.setVal("N1",t.N1),ot.setVal("D7",t.D7),ot.setVal("L1",t.L1),ot.setVal("D8",t.D8),ot.setVal("H6",t.H6),ot.setVal("H7",t.H7),ot.setVal("L9",t.L9),ot.setVal("R9",t.R9),ot.setVal("doorOrientation",t.doorOrientation);const tt=Rt.pGeom(0,ot.getParamVal(),ot.getSuffix());Ht(tt),o.logstr+=Dt(tt.logstr,ot.getPartNameSuffix()),n.mergeFigure(tt.fig.faceCone),n.mergeFigure(H,!0),a.mergeFigure(tt.fig.faceBeam),i.mergeFigure(tt.fig.faceBeamHollow),c.mergeFigure(tt.fig.faceDisc),d.mergeFigure(tt.fig.faceHand),r.mergeFigure(tt.fig.faceWing),_.mergeFigure(tt.fig.faceWingHollow),S.mergeFigure(tt.fig.faceDoor),S.mergeFigure(H,!0),g.mergeFigure(tt.fig.faceDisc,!0),g.addMain(K(-x-t.JS1,-Q,t.L5,t.S1,b)),g.addMain(K(-x-t.JS1,-Q,t.L5,B,b)),g.addMain(K(Z,-Q,t.L5,t.S1,b)),g.addMain(K(Z,-Q,t.L5,B,b)),g.addMain(K(0,-Q+C,Z,t.S1,0)),g.addMain(K(0,-Q+C,Z,B,0)),g.addMain(K(0,Q-C,Z,t.S1,0)),g.addMain(K(0,Q-C,Z,B,0)),g.addMain(K(0,-x-C,Z,t.S1,0)),g.addMain(K(0,-x-C,Z,B,0)),g.addMain(K(0,x+C,Z,t.S1,0)),g.addMain(K(0,x+C,Z,B,0)),g.addSecond(K(0,-t.JL1/2,y,2*J,R)),g.addSecond(K(0,-t.JL1/2,y,2*A,R)),g.addSecond(K(0,t.JL1/2,y,2*J,R)),g.addSecond(K(0,t.JL1/2,y,2*A,R)),g.addSecond(K(0,0,G,t.JD3,W)),g.addSecond(K(0,0,G,ct,W)),g.addSecond(K(0,0,G,t.JD3,b)),g.addSecond(K(0,0,G,ct,b)),l.mergeFigure(tt.fig.faceBeam,!0),l.addMain(v(-x-t.JS1,O,C)),l.addMain(v(-x-t.JS1,O,Y)),l.addMain(v(Z,m+C,C)),l.addMain(v(Z,m+C,Y)),l.addSecond(K(0,m+C,Z,t.S1,0)),l.addSecond(K(0,m+C,Z,B,0));const _t=m+C-j,ft=Math.sqrt(Z**2+_t**2),Pt=Math.atan2(_t,Z);o.logstr+=`stopper-rod: L ${L(ft)} mm, A ${L(at(Pt))} degree
|
|
71
|
-
`,l.addSecond(K(0,j,ft,t.S1,Pt)),l.addSecond(K(0,j,ft,B,Pt)),l.addSecond(K(0,X,y,2*J,R)),l.addSecond(K(0,X,y,2*A,R)),l.addSecond(v(0,j,t.JD3/2)),l.addSecond(v(0,j,t.JD3/2-t.JE3)),l.addSecond(K(0,F,st,t.JD4,b)),l.addSecond(K(0,F,st,rt,b)),h.mergeFigure(l,!0),h.addMain(v(-x-t.JS1,O,Y)),h.addMain(v(t.S2-C,m+C,Y)),f.mergeFigure(tt.fig.faceCone,!0),f.mergeFigure(H,!0),f.addMain(v(-t.L5/2+C,m+C,C)),f.addMain(v(-t.L5/2+C,m+C,Y)),f.addMain(v(t.L5/2-C,m+C,C)),f.addMain(v(t.L5/2-C,m+C,Y)),P.mergeFigure(tt.fig.faceCone,!0),P.mergeFigure(H,!0),P.addSecond(v(-t.L5/2+C,m+C,C)),P.addMain(v(-t.L5/2+C,m+C,Y)),P.addSecond(v(t.L5/2-C,m+C,C)),P.addMain(v(t.L5/2-C,m+C,Y)),N.mergeFigure(tt.fig.faceCone,!0),N.mergeFigure(H,!0),N.addMain(v(-x-C,0,C)),N.addMain(v(-x-C,0,Y)),N.addMain(v(x+C,0,C)),N.addMain(v(x+C,0,Y)),w.mergeFigure(tt.fig.faceCone,!0),w.mergeFigure(H,!0),w.addSecond(v(-x-C,0,C)),w.addMain(v(-x-C,0,Y)),w.addSecond(v(x+C,0,C)),w.addMain(v(x+C,0,Y)),E.mergeFigure(tt.fig.faceCone,!0),E.mergeFigure(H),E.addSecond(K(-V,F,st,t.JD4,b)),E.addSecond(K(-V,F,st,rt,b)),E.addSecond(K(V,F,st,t.JD4,b)),E.addSecond(K(V,F,st,rt,b)),E.addSecond(K(0,j,G,t.JD3,R)),E.addSecond(K(0,j,G,ct,R)),E.addSecond(K(0,j,G,t.JD3,0)),E.addSecond(K(0,j,G,ct,0)),$.mergeFigure(l,!0),$.addMain(v(0,j,t.JD3/2)),$.addMain(v(0,j,t.JD3/2-t.JE3)),D.mergeFigure(g,!0),D.addMain(v(0,-V,t.JD4/2)),D.addMain(v(0,-V,t.JD4/2-t.JE4)),D.addMain(v(0,V,t.JD4/2)),D.addMain(v(0,V,t.JD4/2-t.JE4)),o.fig={faceCone:n,faceBeam:a,faceBeamHollow:i,faceDisc:c,faceHand:d,faceWing:r,faceWingHollow:_,faceDoor:S,faceStopperTop:g,faceStopperSide:l,faceStopperSideH:h,faceStopperFaceT:f,faceStopperFaceTH:P,faceStopperFaceB:N,faceStopperFaceBH:w,faceLowStopperHolder:E,faceHi1StopperHolder:$,faceHi2StopperHolder:D};const et=o.partName;o.vol={inherits:[{outName:`inpax_${et}_rake`,subdesign:"pax_rake",subgeom:tt,rotate:[0,0,0],translate:[0,0,0]},{outName:`inpax_${et}_coneHollow`,subdesign:"subpax_rake_coneHollow",subgeom:tt,rotate:[0,0,0],translate:[0,0,0]},{outName:`inpax_${et}_beamHollow`,subdesign:"subpax_rake_beamHollow",subgeom:tt,rotate:[0,0,0],translate:[0,0,0]}],extrudes:[{outName:`subpax_${et}_stpSide`,face:`${et}_faceStopperSide`,extrudeMethod:
|
|
72
|
-
`,o.calcErr=!1}catch(M){o.logstr+=M,console.log(M)}return o}var
|
|
71
|
+
`,l.addSecond(K(0,j,ft,t.S1,Pt)),l.addSecond(K(0,j,ft,B,Pt)),l.addSecond(K(0,X,y,2*J,R)),l.addSecond(K(0,X,y,2*A,R)),l.addSecond(v(0,j,t.JD3/2)),l.addSecond(v(0,j,t.JD3/2-t.JE3)),l.addSecond(K(0,F,st,t.JD4,b)),l.addSecond(K(0,F,st,rt,b)),h.mergeFigure(l,!0),h.addMain(v(-x-t.JS1,O,Y)),h.addMain(v(t.S2-C,m+C,Y)),f.mergeFigure(tt.fig.faceCone,!0),f.mergeFigure(H,!0),f.addMain(v(-t.L5/2+C,m+C,C)),f.addMain(v(-t.L5/2+C,m+C,Y)),f.addMain(v(t.L5/2-C,m+C,C)),f.addMain(v(t.L5/2-C,m+C,Y)),P.mergeFigure(tt.fig.faceCone,!0),P.mergeFigure(H,!0),P.addSecond(v(-t.L5/2+C,m+C,C)),P.addMain(v(-t.L5/2+C,m+C,Y)),P.addSecond(v(t.L5/2-C,m+C,C)),P.addMain(v(t.L5/2-C,m+C,Y)),N.mergeFigure(tt.fig.faceCone,!0),N.mergeFigure(H,!0),N.addMain(v(-x-C,0,C)),N.addMain(v(-x-C,0,Y)),N.addMain(v(x+C,0,C)),N.addMain(v(x+C,0,Y)),w.mergeFigure(tt.fig.faceCone,!0),w.mergeFigure(H,!0),w.addSecond(v(-x-C,0,C)),w.addMain(v(-x-C,0,Y)),w.addSecond(v(x+C,0,C)),w.addMain(v(x+C,0,Y)),E.mergeFigure(tt.fig.faceCone,!0),E.mergeFigure(H),E.addSecond(K(-V,F,st,t.JD4,b)),E.addSecond(K(-V,F,st,rt,b)),E.addSecond(K(V,F,st,t.JD4,b)),E.addSecond(K(V,F,st,rt,b)),E.addSecond(K(0,j,G,t.JD3,R)),E.addSecond(K(0,j,G,ct,R)),E.addSecond(K(0,j,G,t.JD3,0)),E.addSecond(K(0,j,G,ct,0)),$.mergeFigure(l,!0),$.addMain(v(0,j,t.JD3/2)),$.addMain(v(0,j,t.JD3/2-t.JE3)),D.mergeFigure(g,!0),D.addMain(v(0,-V,t.JD4/2)),D.addMain(v(0,-V,t.JD4/2-t.JE4)),D.addMain(v(0,V,t.JD4/2)),D.addMain(v(0,V,t.JD4/2-t.JE4)),o.fig={faceCone:n,faceBeam:a,faceBeamHollow:i,faceDisc:c,faceHand:d,faceWing:r,faceWingHollow:_,faceDoor:S,faceStopperTop:g,faceStopperSide:l,faceStopperSideH:h,faceStopperFaceT:f,faceStopperFaceTH:P,faceStopperFaceB:N,faceStopperFaceBH:w,faceLowStopperHolder:E,faceHi1StopperHolder:$,faceHi2StopperHolder:D};const et=o.partName;o.vol={inherits:[{outName:`inpax_${et}_rake`,subdesign:"pax_rake",subgeom:tt,rotate:[0,0,0],translate:[0,0,0]},{outName:`inpax_${et}_coneHollow`,subdesign:"subpax_rake_coneHollow",subgeom:tt,rotate:[0,0,0],translate:[0,0,0]},{outName:`inpax_${et}_beamHollow`,subdesign:"subpax_rake_beamHollow",subgeom:tt,rotate:[0,0,0],translate:[0,0,0]}],extrudes:[{outName:`subpax_${et}_stpSide`,face:`${et}_faceStopperSide`,extrudeMethod:U.eLinearOrtho,length:t.L5,rotate:[Math.PI/2,0,0],translate:[0,t.L5/2,0]},{outName:`subpax_${et}_stpSideH`,face:`${et}_faceStopperSideH`,extrudeMethod:U.eLinearOrtho,length:t.L5,rotate:[Math.PI/2,0,0],translate:[0,t.L5/2,0]},{outName:`subpax_${et}_stpFaceT`,face:`${et}_faceStopperFaceT`,extrudeMethod:U.eLinearOrtho,length:Z,rotate:[Math.PI/2,0,Math.PI/2],translate:[0,0,0]},{outName:`subpax_${et}_stpFaceTH`,face:`${et}_faceStopperFaceTH`,extrudeMethod:U.eLinearOrtho,length:Z,rotate:[Math.PI/2,0,Math.PI/2],translate:[0,0,0]},{outName:`subpax_${et}_stpFaceB`,face:`${et}_faceStopperFaceB`,extrudeMethod:U.eLinearOrtho,length:ft,rotate:[Math.PI/2-Pt,0,Math.PI/2],translate:[0,0,j]},{outName:`subpax_${et}_stpFaceBH`,face:`${et}_faceStopperFaceBH`,extrudeMethod:U.eLinearOrtho,length:ft,rotate:[Math.PI/2-Pt,0,Math.PI/2],translate:[0,0,j]},{outName:`subpax_${et}_lowSH`,face:`${et}_faceLowStopperHolder`,extrudeMethod:U.eLinearOrtho,length:y,rotate:[Math.PI/2,0,-Math.PI/2],translate:[0,0,0]},{outName:`subpax_${et}_Hi1SH1`,face:`${et}_faceHi1StopperHolder`,extrudeMethod:U.eLinearOrtho,length:G,rotate:[Math.PI/2,0,0],translate:[0,0,0]},{outName:`subpax_${et}_Hi1SH2`,face:`${et}_faceHi1StopperHolder`,extrudeMethod:U.eLinearOrtho,length:G,rotate:[Math.PI/2,0,Math.PI],translate:[0,0,0]},{outName:`subpax_${et}_Hi2SH`,face:`${et}_faceHi2StopperHolder`,extrudeMethod:U.eLinearOrtho,length:st,rotate:[0,0,0],translate:[0,0,F]}],volumes:[{outName:`ipax_${et}_plus`,boolMethod:nt.eUnion,inList:[`subpax_${et}_stpSide`,`subpax_${et}_stpFaceT`,`subpax_${et}_stpFaceB`,`subpax_${et}_lowSH`,`subpax_${et}_Hi1SH1`,`subpax_${et}_Hi1SH2`,`subpax_${et}_Hi2SH`]},{outName:`ipax_${et}_hollow`,boolMethod:nt.eUnion,inList:[`inpax_${et}_coneHollow`,`inpax_${et}_beamHollow`,`subpax_${et}_stpSideH`,`subpax_${et}_stpFaceTH`,`subpax_${et}_stpFaceBH`]},{outName:`ipax_${et}_stopper`,boolMethod:nt.eSubstraction,inList:[`ipax_${et}_plus`,`ipax_${et}_hollow`]},{outName:`pax_${et}`,boolMethod:nt.eUnion,inList:[`inpax_${et}_rake`,`ipax_${et}_stopper`]}]},o.sub={},o.logstr+=`heliostat-rake drawn successfully!
|
|
72
|
+
`,o.calcErr=!1}catch(M){o.logstr+=M,console.log(M)}return o}var Ut={pTitle:"Heliostat rake with stopper",pDescription:"The rake-stopper on top of the V-Axis of the heliostat",pDef:de,pGeom:qe},Wt={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),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",al:"heliostat2_side_sizing.svg",S1:"heliostat2_side_sizing.svg"},sim:{tMax:100,tStep:.5,tUpdate:500}};function Ye(s,t,u=""){const o=ut(Wt.partName+u),n=I(),a=I(),i=I();o.logstr+=`${o.partName} simTime: ${s}
|
|
73
73
|
`;try{const c=t.H1+t.H2-t.H3+t.H4+t.H5-t.H6+t.H7;o.logstr+=`heliostat-height: ${L(c)}, diameter ${L(t.D1)} m
|
|
74
74
|
`,o.logstr+=`heliostat-swing-length: ${L(t.L1)}, width ${L(t.L2)} m
|
|
75
75
|
`;const d=t.al*s/Wt.sim.tMax,r=wt(d);o.logstr+=`swing position angle: ${L(at(r))} degree
|
|
76
|
-
`;const _=t.H1+t.H2-t.H3,S=_+t.H4+t.H5-t.H6+t.H7,g=Lt(At.pDef),l=Lt(
|
|
76
|
+
`;const _=t.H1+t.H2-t.H3,S=_+t.H4+t.H5-t.H6+t.H7,g=Lt(At.pDef),l=Lt(Ut.pDef),h=Lt(Nt.pDef);g.setVal("H1",t.H1),g.setVal("H2",t.H2),g.setVal("D1",t.D1),g.setVal("D2",t.D2),g.setVal("D3",t.D1-6*t.E1),g.setVal("E1",t.E1),g.setVal("E2",t.E1);const f=32,P=(t.D1-6*t.E1)/(f*4);g.setVal("N1",f),g.setVal("D5",P),g.setVal("L1",t.E1+P/2),g.setVal("H3",t.H1/4),g.setVal("H4",t.H1/2),g.setVal("D4",t.H1/4),g.setVal("L2",t.H1/80),g.setVal("E3",t.H1/80),g.setVal("holders",0),l.setVal("H1",t.H4),l.setVal("H2",t.H5),l.setVal("H3",t.H4-2*t.E1),l.setVal("D1",t.D3),l.setVal("D2",t.D4),l.setVal("L9",t.D3/2),l.setVal("H7",t.D3/2*1.6),l.setVal("H6",t.D3/20),l.setVal("R9",t.D3/20),l.setVal("E1",t.E1),l.setVal("E3",t.E1),l.setVal("E4",t.E1),l.setVal("E6",t.E1),l.setVal("E7",t.E1);const N=t.D2*.6,w=24,H=N/(w*4);if(l.setVal("D3",N),t.D2>t.D3-2*t.E1)throw`err153: D2 ${t.D2} too large compare to D3 ${t.D3} and E1 ${t.E1}`;if(l.setVal("N1",w),l.setVal("D7",H),l.setVal("L1",H),l.setVal("H4",t.H6),l.setVal("D4",t.D5),l.setVal("L7",t.L7),l.setVal("L8",t.L8),l.setVal("D6",t.D9),l.setVal("H5",t.H7),l.setVal("D5",t.D6),l.setVal("D8",t.D7),t.D6>=t.D7)throw`err164: D6 ${t.D6} too large compare to D7 ${t.D7}`;const E=t.L4-2*t.L3;if(l.setVal("L4",E),E<=0)throw`err169: L3 ${t.L3} too large compare to L4 ${t.L4}`;if(l.setVal("L5",t.L5+2*t.L3),l.setVal("L6",t.L6+2*t.L3),l.setVal("S1",t.S1),l.setVal("S2",t.L2/2),l.setVal("S3",0),l.setVal("S3",0),l.setVal("JD1",t.D3/4),l.setVal("JE1",t.E1),l.setVal("JL1",t.D3/3),l.setVal("JH1",0),l.setVal("JS1",t.S1/2),l.setVal("JS2",t.S1/2),l.setVal("JD3",t.D4/4),l.setVal("JE3",t.E1),l.setVal("JS3",t.D4/4),l.setVal("JD4",t.D4/4),l.setVal("JE4",t.E1),l.setVal("JS4",t.D4/4),h.setVal("L2",t.L2),h.setVal("D1",t.D6),h.setVal("H3",t.H9),h.setVal("H4",t.H9),h.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}`;h.setVal("H1",t.L3),h.setVal("H2",t.L3),h.setVal("L4",t.L4),h.setVal("L5",t.L5),h.setVal("L6",t.L6),h.setVal("L3",t.D7),h.setVal("S1",t.D6/2),h.setVal("R2",0);const $=At.pGeom(0,g.getParamVal(),g.getSuffix());Ht($),o.logstr+=Dt($.logstr,g.getPartNameSuffix());const D=Ut.pGeom(0,l.getParamVal(),l.getSuffix());Ht(D),o.logstr+=Dt(D.logstr,l.getPartNameSuffix());const M=Nt.pGeom(0,h.getParamVal(),h.getSuffix());Ht(M),o.logstr+=Dt(M.logstr,h.getPartNameSuffix()),n.mergeFigure($.fig.poleCut),n.mergeFigure(D.fig.faceStopperSide.translate(0,_)),n.mergeFigure(M.fig.faceSide.translate(0,S).rotate(0,S,r)),a.mergeFigure($.fig.poleCut),a.mergeFigure(D.fig.faceStopperFaceT.translate(0,_)),a.mergeFigure(M.fig.faceFace.translate(0,S)),i.mergeFigure($.fig.poleBottom.translate(0,0)),i.mergeFigure(D.fig.faceStopperTop.translate(0,0)),i.mergeFigure(M.fig.faceTop.rotate(0,0,Math.PI/2)),o.fig={faceSide:n,faceFace:a,faceTop:i};const R=o.partName;o.vol={inherits:[{outName:`inpax_${R}_poleStatic`,subdesign:"pax_pole_static",subgeom:$,rotate:[0,0,0],translate:[0,0,0]},{outName:`inpax_${R}_rake`,subdesign:"pax_rake_stopper",subgeom:D,rotate:[0,0,0],translate:[0,0,_]},{outName:`inpax_${R}_swing`,subdesign:"pax_swing",subgeom:M,rotate:[Math.PI/2,0,0],translate:[0,0,S]}],extrudes:[],volumes:[{outName:`pax_${R}`,boolMethod:nt.eUnion,inList:[`inpax_${R}_poleStatic`,`inpax_${R}_rake`,`inpax_${R}_swing`]}]};const b=g.getDesignParamList(),W={partName:g.getPartName(),dparam:b,orientation:[0,0,0],position:[0,0,0]},x={partName:l.getPartName(),dparam:l.getDesignParamList(),orientation:[0,0,0],position:[0,0,_]},k={partName:h.getPartName(),dparam:h.getDesignParamList(),orientation:[0,0,0],position:[0,0,S]};o.sub={pole_static_1:W,rake_1:x,swing_1:k},o.logstr+=`heliostat-2-overview drawn successfully!
|
|
77
77
|
`,o.calcErr=!1}catch(c){o.logstr+=c,console.log(c)}return o}var Xe={pTitle:"Heliostat-2 overview",pDescription:"The heliostat-2 inclination mechanism",pDef:Wt,pGeom:Ye},le={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 je(s,t,u=""){const o=ut(le.partName+u);let n,a,i;const c=I(),d=I(),r=I();o.logstr+=`${o.partName} simTime: ${s}
|
|
78
78
|
`;try{const _=t.D1/2,S=t.D2/2,g=t.D3/2,l=t.D4/2,h=t.D5/2,f=t.L2/2;if(S<_)throw`err089: D2 ${t.D2} too small compare to D1 ${t.D1}`;if(l>_-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
80
|
`;const P=t.D1*Math.PI/t.N2-t.L2;if(o.logstr+=`inter-hollow: ${L(P)} mm
|
|
81
|
-
`,n=function(x){return
|
|
81
|
+
`,n=function(x){return p(x*S,0).addSegStrokeA(x*S,t.E3).addSegStrokeA(x*_,t.E3).addSegStrokeA(x*_,t.H1).addSegStrokeA(x*(_-t.E2),t.H1).addSegStrokeA(x*(_-t.E2),t.E3).addSegStrokeA(x*l,t.E3).addSegStrokeA(x*l,0).closeSegStroke()},a=function(x){return p(x*S,0).addSegStrokeA(x*S,t.E3).addSegStrokeA(x*_,t.E3).addSegStrokeA(x*_,t.H1).addSegStrokeA(x*g,t.H1).addSegStrokeA(x*g,t.H1-t.E1).addSegStrokeA(x*(_-t.E2),t.H1-t.E1).addSegStrokeA(x*(_-t.E2),t.E3).addSegStrokeA(x*l,t.E3).addSegStrokeA(x*l,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 N=2*Math.asin(f/(_-t.E2));if(t.N2*N>2*Math.PI)throw`err132: N2 ${t.N2} too large compare to L2 ${t.L2}, D1 ${t.D1}, E2 ${t.E2}`;const w=t.E3+t.H2+f;if(i=function(x){return p(x*f,w).addSegStrokeA(x*f,w+t.H3-t.L2).addPointA(-x*f,w+t.H3-t.L2).addSegArc(f,!1,!0).addSegStrokeA(-x*f,w).closeSegArc(f,!1,!0)},c.addMain(n(1)),c.addSecond(a(1)),c.addSecond(a(-1)),c.addSecond(i(1)),g+t.L1+h>_-t.E2)throw`err127: D3 ${t.D3} too large compare to D1 ${t.D1}, E2 ${t.E2}, L1 ${t.L1}, R5 ${t.D5}`;if(h>t.L1)throw`err130: D5 ${t.D5} too large compare to L1 ${t.L1}`;const H=2*Math.asin(h/(S+t.L1));if(t.N1*H>2*Math.PI)throw`err134: N1 ${t.N1} too large compare to D5 ${t.D5}, L1 ${t.L1}, D2 ${t.D2}`;d.addMain(v(0,0,_)),d.addMain(v(0,0,g));const E=g+t.L1,$=2*Math.PI/t.N1;for(let x=0;x<t.N1;x++){const k=E*Math.cos(x*$),T=E*Math.sin(x*$);d.addMain(v(k,T,h))}d.addSecond(v(0,0,_-t.E1)),d.addSecond(v(0,0,S)),d.addSecond(v(0,0,l)),r.addMain(i(1)),r.addSecond(a(1)),r.addSecond(a(-1)),o.fig={faceCut:c,faceTop:d,faceHollow:r};const D=o.partName,M=2*Math.PI/t.N2,R=[...Array(t.N2).keys()],b=R.map(x=>({outName:`subpax_${D}_hollow_${x}`,face:`${D}_faceHollow`,extrudeMethod:U.eLinearOrtho,length:S+t.E2,rotate:[Math.PI/2,0,x*M],translate:[0,0,0]})),W=R.map(x=>`subpax_${D}_hollow_${x}`);o.vol={extrudes:[{outName:`subpax_${D}_cut`,face:`${D}_faceCut`,extrudeMethod:U.eRotate,rotate:[0,0,0],translate:[Math.PI/2,0,0]},{outName:`subpax_${D}_top`,face:`${D}_faceTop`,extrudeMethod:U.eLinearOrtho,length:t.E1,rotate:[0,0,0],translate:[0,0,t.H1-t.E1]},...b],volumes:[{outName:`ipax_${D}_hollows`,boolMethod:nt.eUnion,inList:[...W]},{outName:`ipax_${D}_cylinder`,boolMethod:nt.eSubstraction,inList:[`subpax_${D}_cut`,`ipax_${D}_hollows`]},{outName:`pax_${D}`,boolMethod:nt.eUnion,inList:[`ipax_${D}_cylinder`,`subpax_${D}_top`]}]},o.sub={},o.logstr+=`heliostat-base drawn successfully!
|
|
82
82
|
`,o.calcErr=!1}catch(_){o.logstr+=_,console.log(_)}return o}var Ze={pTitle:"Heliostat base",pDescription:"The base for the static-pole of the heliostat",pDef:le,pGeom:je},ce={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 Ke(s,t,u=""){const o=ut(ce.partName+u);let n;const a=I(),i=I();o.logstr+=`${o.partName} simTime: ${s}
|
|
83
83
|
`;try{const c=t.D1/2,d=t.D2/2,r=t.D3/2;o.logstr+=`vaxis-height: ${L(t.H1)} mm
|
|
84
|
-
`;const _=
|
|
84
|
+
`;const _=p(c,0).addSegStrokeA(c,t.H1).addSegStrokeA(c-t.E1,t.H1).addSegStrokeA(c-t.E1,0).closeSegStroke();a.addMain(_),n=function(h){return p(h*c,0).addSegStrokeA(h*c,t.H1).addSegStrokeA(h*d,t.H1).addSegStrokeA(h*d,t.H1-t.E2).addSegStrokeA(h*(c-t.E1),t.H1-t.E2).addSegStrokeA(h*(c-t.E1),t.E2).addSegStrokeA(h*d,t.E2).addSegStrokeA(h*d,0).closeSegStroke()},a.addSecond(n(1)),a.addSecond(n(-1)),i.addMain(v(0,0,c)),i.addMain(v(0,0,d));const S=d+t.L1,g=2*Math.PI/t.N1;for(let h=0;h<t.N1;h++){const f=S*Math.cos(h*g),P=S*Math.sin(h*g);i.addMain(v(f,P,r))}i.addSecond(v(0,0,c-t.E1)),o.fig={faceCut:a,faceBottom:i};const l=o.partName;o.vol={extrudes:[{outName:`subpax_${l}_pole`,face:`${l}_faceCut`,extrudeMethod:U.eRotate,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${l}_bottom`,face:`${l}_faceBottom`,extrudeMethod:U.eLinearOrtho,length:t.E2,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${l}_top`,face:`${l}_faceBottom`,extrudeMethod:U.eLinearOrtho,length:t.E2,rotate:[0,0,0],translate:[0,0,t.H1-t.E2]}],volumes:[{outName:`pax_${l}`,boolMethod:nt.eUnion,inList:[`subpax_${l}_pole`,`subpax_${l}_bottom`,`subpax_${l}_top`]}]},o.sub={},o.logstr+=`V-Axis drawn successfully!
|
|
85
85
|
`,o.calcErr=!1}catch(c){o.logstr+=c,console.log(c)}return o}var Qe={pTitle:"Heliostat V-Axis",pDescription:"The vertical axis inside the pole of an heliostat",pDef:ce,pGeom:Ke},re={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 to(s,t,u=""){const o=ut(re.partName+u),n=I(),a=I(),i=I();o.logstr+=`${o.partName} simTime: ${s}
|
|
86
86
|
`;try{const c=t.D1/2,d=t.D2/2,r=t.D3/2,_=t.H1+t.H2;if(t.L1<d)throw`err203: L1 ${t.L1} too small compare to D2 ${t.D2}`;if(c+t.L1+d>r-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,c+t.L1)>2*Math.PI/t.N2)throw`err205: D2 ${t.D2} too large compare to N2 ${t.N2}`;o.logstr+=`ring-height: ${L(_)} mm
|
|
87
|
-
`;const S=r-t.L3,g=S-t.L2,l=2*Math.PI/(2*t.N1),h=
|
|
87
|
+
`;const S=r-t.L3,g=S-t.L2,l=2*Math.PI/(2*t.N1),h=p(S,0);for(let D=0;D<t.N1;D++){const M=2*D+1,R=2*D+2,b=g*Math.cos(M*l),W=g*Math.sin(M*l),x=S*Math.cos(R*l),k=S*Math.sin(R*l);h.addSegStrokeA(b,W).addSegStrokeA(x,k)}n.addMain(v(0,0,r)),n.addMain(v(0,0,c));const f=c+t.L1,P=2*Math.PI/t.N2;for(let D=0;D<t.N2;D++){const M=f*Math.cos(D*P),R=f*Math.sin(D*P);n.addMain(v(M,R,d)),a.addSecond(v(M,R,d))}n.addSecond(h),a.addMain(v(0,0,r)),a.addMain(h),a.addSecond(v(0,0,c));const N=p(c,0).addSegStrokeA(-c,0).addSegStrokeA(-c,-t.H1).addSegStrokeA(c,-t.H1).closeSegStroke(),w=function(D){return p(D*(c+t.L1)+d,0).addSegStrokeR(-2*d,0).addSegStrokeR(0,-t.H1).addSegStrokeR(2*d,0).closeSegStroke()},H=function(D){return p(D*(r-t.L3),-t.H1).addSegStrokeR(-D*t.L2,0).addSegStrokeR(0,-t.H2).addSegStrokeR(D*t.L2,0).closeSegStroke()},E=function(D){return p(D*r,0).addSegStrokeR(-D*(r-c),0).addSegStrokeR(0,-t.H1).addSegStrokeR(D*(r-t.L2-t.L3-c),0).addSegStrokeR(0,-t.H2).addSegStrokeR(D*(t.L2+t.L3),0).closeSegStroke()};i.addSecond(N),i.addSecond(w(1)),i.addSecond(w(-1)),i.addSecond(H(1)),i.addSecond(H(-1)),i.addMain(E(1)),i.addSecond(E(-1)),o.fig={faceRingBase:n,faceRingTeeth:a,faceSection:i};const $=o.partName;o.vol={extrudes:[{outName:`subpax_${$}_base`,face:`${$}_faceRingBase`,extrudeMethod:U.eLinearOrtho,length:t.H1,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${$}_teeth`,face:`${$}_faceRingTeeth`,extrudeMethod:U.eLinearOrtho,length:_,rotate:[0,0,0],translate:[0,0,0]}],volumes:[{outName:`pax_${$}`,boolMethod:nt.eUnion,inList:[`subpax_${$}_base`,`subpax_${$}_teeth`]}]},o.sub={},o.logstr+=`ring drawn successfully!
|
|
88
88
|
`,o.calcErr=!1}catch(c){o.logstr+=c,console.log(c)}return o}var eo={pTitle:"Heliostat ring",pDescription:"The gear ring for adjusting the azimuth of the heliostat",pDef:re,pGeom:to},ge={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 oo(s,t,u=""){const o=ut(ge.partName+u),n=I(),a=I();o.logstr+=`${o.partName} simTime: ${s}
|
|
89
89
|
`;try{const i=t.D1/2,c=t.D3/2,d=t.D4/2,r=t.D6/2,_=t.D7/2,S=2*Math.PI/t.N2;if(_>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*_)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[g,l,h]=ee(t);o.logstr+=g,n.addMain(l),n.addMain(v(0,0,r));for(let H=0;H<t.N2;H++)n.addMain(v(r+t.L2,0,_).rotate(0,0,H*S));for(let H=0;H<t.N1;H++)n.addMain(v(i,0,c).rotate(0,0,H*h));const f=function(H,E,$,D){return
|
|
90
|
+
`;const[g,l,h]=ee(t);o.logstr+=g,n.addMain(l),n.addMain(v(0,0,r));for(let H=0;H<t.N2;H++)n.addMain(v(r+t.L2,0,_).rotate(0,0,H*S));for(let H=0;H<t.N1;H++)n.addMain(v(i,0,c).rotate(0,0,H*h));const f=function(H,E,$,D){return p(H,E).addSegStrokeR($,0).addSegStrokeR(0,D).addSegStrokeR(-$,0).closeSegStroke()},P=i-r+d;a.addMain(f(r,0,P,t.T1)),a.addMain(f(-r-P,0,P,t.T1)),a.addSecond(f(i-c,0,2*c,t.T1)),a.addSecond(f(-i-c,0,2*c,t.T1));const N=r+t.L2;a.addSecond(f(N-_,0,2*_,t.T1)),a.addSecond(f(-N-_,0,2*_,t.T1)),o.fig={faceTop:n,faceSection:a};const w=o.partName;o.vol={extrudes:[{outName:`subpax_${w}_top`,face:`${w}_faceTop`,extrudeMethod:U.eLinearOrtho,length:t.T1,rotate:[0,0,0],translate:[0,0,0]}],volumes:[{outName:`pax_${w}`,boolMethod:nt.eIdentity,inList:[`subpax_${w}_top`]}]},o.sub={},o.logstr+=`ring_guidance drawn successfully!
|
|
91
91
|
`,o.calcErr=!1}catch(i){o.logstr+=i,console.log(i)}return o}var so={pTitle:"Ring-guidance",pDescription:"The guidance of the gear-ring for the heliostat azimuth",pDef:ge,pGeom:oo},ae={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 io(s,t,u=""){const o=ut(ae.partName+u),n=I(),a=I();o.logstr+=`${o.partName} simTime: ${s}
|
|
92
92
|
`;try{const i=t.D1/2,c=t.D2/2,d=t.D3/2,r=t.D4/2,_=t.D6/2;if(c<_)throw`err466: D6 ${t.D6} is too large compare to D2 ${t.D2}`;o.logstr+=`vaxis_guidance: Dmax ${L(t.D1+2*r)} mm
|
|
93
|
-
`;const[S,g,l]=ee(t);o.logstr+=S,n.addMain(g);for(let w=0;w<t.N1;w++)n.addMain(v(i,0,d).rotate(0,0,w*l));const[h,f]=me(t);o.logstr+=h,n.addMain(f),n.addSecond(v(0,0,t.Dvaxis/2));const P=i-_+r;a.addMain(gt(_,0,P,t.T1)),a.addMain(gt(-_-P,0,P,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 N=o.partName;o.vol={extrudes:[{outName:`subpax_${N}_top`,face:`${N}_faceTop`,extrudeMethod:
|
|
93
|
+
`;const[S,g,l]=ee(t);o.logstr+=S,n.addMain(g);for(let w=0;w<t.N1;w++)n.addMain(v(i,0,d).rotate(0,0,w*l));const[h,f]=me(t);o.logstr+=h,n.addMain(f),n.addSecond(v(0,0,t.Dvaxis/2));const P=i-_+r;a.addMain(gt(_,0,P,t.T1)),a.addMain(gt(-_-P,0,P,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 N=o.partName;o.vol={extrudes:[{outName:`subpax_${N}_top`,face:`${N}_faceTop`,extrudeMethod:U.eLinearOrtho,length:t.T1,rotate:[0,0,0],translate:[0,0,0]}],volumes:[{outName:`pax_${N}`,boolMethod:nt.eIdentity,inList:[`subpax_${N}_top`]}]},o.sub={},o.logstr+=`vaxis_guidance drawn successfully!
|
|
94
94
|
`,o.calcErr=!1}catch(i){o.logstr+=i,console.log(i)}return o}var no={pTitle:"Vaxis-guidance",pDescription:"The guidance of the V-Axis for the heliostat azimuth",pDef:ae,pGeom:io},he={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 lo(s,t,u=""){const o=ut(he.partName+u),n=I(),a=I();o.logstr+=`${o.partName} simTime: ${s}
|
|
95
95
|
`;try{const i=t.D5/2,c=t.D8/2,d=t.SD1/2,r=i+t.E5,_=c-t.E8,S=2*Math.asin(t.L5/(2*r)),g=Math.PI/12+wt(t.SA1),l=Math.PI/2+S-g,h=Math.PI-g,f=Math.PI/2-Math.PI/6+g;if(r+d+t.SE1>_)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*S<t.R9/_)throw`err412: L5 ${t.L5} is too large compare to R9 ${t.R9}`;o.logstr+=`haxis_guidance: Dinner ${L(2*r)} mm
|
|
96
|
-
`,n.addSecond(v(0,0,i)),n.addSecond(v(0,0,c));const[P,N]=yt(t,!1),[,w]=yt(t,!0);o.logstr+=P;const H=Math.PI/2-S,E=-Math.PI/6+S,$=lt(0,0),D=$.translatePolar(H,r+t.SE1+d),M=D.translatePolar(H-Math.PI/2,d),R=M.translatePolar(H+Math.PI,d+t.SE1),b=M.translatePolar(H+Math.PI,d),W=R.rotate(M,l),x=$.translatePolar(E,r+t.SE1+d),k=x.translatePolar(E+Math.PI/2,d),T=k.translatePolar(E+Math.PI,d+t.SE1),O=k.translatePolar(E+Math.PI,d),F=O.rotate(k,-l),m=
|
|
96
|
+
`,n.addSecond(v(0,0,i)),n.addSecond(v(0,0,c));const[P,N]=yt(t,!1),[,w]=yt(t,!0);o.logstr+=P;const H=Math.PI/2-S,E=-Math.PI/6+S,$=lt(0,0),D=$.translatePolar(H,r+t.SE1+d),M=D.translatePolar(H-Math.PI/2,d),R=M.translatePolar(H+Math.PI,d+t.SE1),b=M.translatePolar(H+Math.PI,d),W=R.rotate(M,l),x=$.translatePolar(E,r+t.SE1+d),k=x.translatePolar(E+Math.PI/2,d),T=k.translatePolar(E+Math.PI,d+t.SE1),O=k.translatePolar(E+Math.PI,d),F=O.rotate(k,-l),m=p(0,r).addSegStrokeA(R.cx,R.cy).addPointA(W.cx,W.cy).addSegArc(d+t.SE1,!1,!0);m.addPartial(N.rotate(0,0,h).translate(W.cx,W.cy)),m.addPointA(b.cx,b.cy).addPointA(D.cx,D.cy).addSegArc2().addSegStrokeAP(H,_).addCornerRounded(t.R9).addPointAP(E,_).addSegArc(_,!1,!1).addCornerRounded(t.R9).addSegStrokeA(x.cx,x.cy).addPointA(O.cx,O.cy).addPointA(F.cx,F.cy).addSegArc2(),m.addPartial(w.rotate(0,0,f).translate(F.cx,F.cy)),m.addPointA(T.cx,T.cy).addSegArc(d+t.SE1,!1,!0).addSegStrokeAP(-Math.PI/6,r).addSegStrokeAP(-Math.PI/6,c).addPointAP(Math.PI/2,c).addSegArc(c,!1,!0).closeSegStroke(),n.addMain(m);const j=c*Math.sin(Math.PI/6);a.addMain(gt(0,-j,t.L4,c+j)),a.addSecond(gt(0,-c,t.L4,2*c)),a.addSecond(gt(0,-i,t.L4,2*i)),o.fig={faceProfile:n,faceSide:a};const Q=o.partName;o.vol={extrudes:[{outName:`subpax_${Q}_profile`,face:`${Q}_faceProfile`,extrudeMethod:U.eLinearOrtho,length:t.L4,rotate:[0,0,0],translate:[0,0,0]}],volumes:[{outName:`pax_${Q}`,boolMethod:nt.eIdentity,inList:[`subpax_${Q}_profile`]}]},o.sub={},o.logstr+=`haxis_guidance drawn successfully!
|
|
97
97
|
`,o.calcErr=!1}catch(i){o.logstr+=i,console.log(i)}return o}var co={pTitle:"Haxis-guidance",pDescription:"The guidance of the H-Axis for the heliostat inclination",pDef:he,pGeom:lo},ue={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 ro(s,t,u=""){const o=ut(ue.partName+u);let n,a;const i=I(),c=I(),d=I();o.logstr+=`${o.partName} simTime: ${s}
|
|
98
98
|
`;try{const r=t.D2/2,_=t.L3/(t.N3+1),S=t.L4/(t.N4+1);o.logstr+=`rod-length: ${L(t.L1)} mm
|
|
99
99
|
`;const g=(t.L1-t.L3)/(t.N1-1);o.logstr+=`space-length: ${L(g)} mm
|
|
100
|
-
`,n=function(D){const M=[],R=
|
|
100
|
+
`,n=function(D){const M=[],R=p(t.L4/2,D).addCornerRounded(t.R3).addSegStrokeA(t.L4/2,D+t.L3).addCornerRounded(t.R3).addSegStrokeA(-t.L4/2,D+t.L3).addCornerRounded(t.R3).addSegStrokeA(-t.L4/2,D).addCornerRounded(t.R3).closeSegStroke();M.push(R);for(let b=1;b<t.N3+1;b++)M.push(v(t.L4/2-t.L7,D+b*_,r)),M.push(v(-t.L4/2+t.L7,D+b*_,r));for(let b=1;b<t.N4+1;b++)M.push(v(-t.L4/2+b*S,D+t.L7,r)),M.push(v(-t.L4/2+b*S,D+t.L3-t.L7,r));return M},a=function(D,M){return p(t.L2/2,D).addSegStrokeA(t.L2/2,D+M).addSegStrokeA(-t.L2/2,D+M).addSegStrokeA(-t.L2/2,D).closeSegStroke()};const l=t.L2/2,h=t.L4/2,f=(t.L2-2*t.E1)/2,P=t.H1-t.E1,N=p(l,0).addSegStrokeA(l,t.H1).addSegStrokeA(-l,t.H1).addSegStrokeA(-l,0).closeSegStroke(),w=p(f,t.E1).addSegStrokeA(f,P).addSegStrokeA(-f,P).addSegStrokeA(-f,t.E1).closeSegStroke(),H=p(h,t.H1).addSegStrokeA(h,t.H1+t.E2).addSegStrokeA(-h,t.H1+t.E2).addSegStrokeA(-h,t.H1).closeSegStroke();i.addMain(N),i.addMain(w),i.addSecond(H),n(0).forEach(D=>c.addMain(D)),c.addSecond(a(-t.L3/2,2*t.L3));const E=(t.L1-t.L3)/(t.N1-1);for(let D=0;D<t.N1;D++)n(D*E).forEach(M=>d.addMain(M));d.addSecond(a(0,t.L1)),o.fig={faceCut:i,facePlate:c,faceTop:d};const $=o.partName;o.vol={extrudes:[{outName:`subpax_${$}_rod`,face:`${$}_faceCut`,extrudeMethod:U.eLinearOrtho,length:t.L1,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${$}_plates`,face:`${$}_faceTop`,extrudeMethod:U.eLinearOrtho,length:t.E2,rotate:[Math.PI/2,0,0],translate:[0,t.E2+t.H1,0]}],volumes:[{outName:`pax_${$}`,boolMethod:nt.eUnion,inList:[`subpax_${$}_rod`,`subpax_${$}_plates`]}]},o.sub={},o.logstr+=`heliostat-rod drawn successfully!
|
|
101
101
|
`,o.calcErr=!1}catch(r){o.logstr+=r,console.log(r)}return o}var go={pTitle:"Heliostat rod",pDescription:"The rod of an heliostat-surface",pDef:ue,pGeom:ro},_e={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 ao(s,t,u=""){const o=ut(_e.partName+u);let n,a;const i=I(),c=I(),d=I(),r=I(),_=I();o.logstr+=`${o.partName} simTime: ${s}
|
|
102
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 S=t.R1*(1-1/Math.sqrt(2)),g=t.R3*(1-1/Math.sqrt(2)),l=t.L2/2-S-(t.L4/2-g),h=t.L1/2-S-(t.L3/2-g),f=Math.sqrt(l**2+h**2),P=t.H1-t.H2-t.H3,N=Math.sqrt(f**2+P**2),w=Math.atan2(P,f),H=Math.atan2(h,l);o.logstr+=`rod-slope: length: ${L(N)} mm, angle: ${L(at(w))} degree
|
|
103
103
|
`,o.logstr+=`rod-xy-angle: ${L(at(H))} degree
|
|
104
104
|
`;const E=t.D3/Math.cos(Math.PI/2-w);o.logstr+=`rod-footprint-length: ${L(E)} mm
|
|
105
|
-
`;const $=Math.sqrt((E/2)**2+(t.D3/2)**2),D=Math.atan2(t.D3,E);if(n=function(y,V,G){return
|
|
105
|
+
`;const $=Math.sqrt((E/2)**2+(t.D3/2)**2),D=Math.atan2(t.D3,E);if(n=function(y,V,G){return p(y,V).addPointRP(G+Math.PI-D,$).addSeg2Arcs(G+Math.PI/2,G).addPointRP(G+Math.PI+D,$).addSeg2Arcs(G+Math.PI,G+Math.PI/2).addPointRP(G-D,$).addSeg2Arcs(G+3*Math.PI/2,G+Math.PI).addPointRP(G+D,$).addSeg2Arcs(G,G-Math.PI/2)},a=function(y,V,G){const ct=y+$*Math.cos(G+Math.PI-D),st=V+$*Math.sin(G+Math.PI-D);return p(ct,st).addSegStrokeRP(G+Math.PI,f).addSegStrokeRP(G-Math.PI/2,t.D3).addSegStrokeRP(G,f).closeSegStroke()},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 M=p(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 R=p(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 b=p(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);i.addMain(M),i.addMain(R),i.addSecond(b);const W=t.L1/(t.N1+1),x=t.L2/(t.N2+1),k=t.L3/(t.N3+1),T=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(k<t.D2/2+t.L7)throw`err661: D2 ${t.D2} or L7 ${t.L7} too large compare to L3 ${t.l3}`;if(T<t.D2/2+t.L7)throw`err664: D2 ${t.D2} or L7 ${t.L7} too large compare to L4 ${t.l4}`;const O=[];for(let y=1;y<t.N1+1;y++)O.push(v(t.L2/2-t.L6,-t.L1/2+y*W,t.D1/2)),O.push(v(-t.L2/2+t.L6,-t.L1/2+y*W,t.D1/2));for(let y=1;y<t.N2+1;y++)O.push(v(-t.L2/2+y*x,t.L1/2-t.L6,t.D1/2)),O.push(v(-t.L2/2+y*x,-t.L1/2+t.L6,t.D1/2));const F=[];for(let y=1;y<t.N3+1;y++)F.push(v(t.L4/2-t.L7,-t.L3/2+y*k,t.D2/2)),F.push(v(-t.L4/2+t.L7,-t.L3/2+y*k,t.D2/2));for(let y=1;y<t.N4+1;y++)F.push(v(-t.L4/2+y*T,t.L3/2-t.L7,t.D2/2)),F.push(v(-t.L4/2+y*T,-t.L3/2+t.L7,t.D2/2));O.forEach(y=>{i.addMain(y)}),F.forEach(y=>{i.addSecond(y)});const m=[];m.push(n(t.L2/2-S,t.L1/2-S,H)),m.push(n(t.L4/2-g,t.L3/2-g,H)),m.push(n(-t.L2/2+S,t.L1/2-S,Math.PI-H)),m.push(n(-t.L4/2+g,t.L3/2-g,Math.PI-H)),m.push(n(-t.L2/2+S,-t.L1/2+S,Math.PI+H)),m.push(n(-t.L4/2+g,-t.L3/2+g,Math.PI+H)),m.push(n(t.L2/2-S,-t.L1/2+S,-H)),m.push(n(t.L4/2-g,-t.L3/2+g,-H));const j=[];if(j.push(a(t.L2/2-S,t.L1/2-S,H)),j.push(a(-t.L2/2+S,t.L1/2-S,Math.PI-H)),j.push(a(-t.L2/2+S,-t.L1/2+S,Math.PI+H)),j.push(a(t.L2/2-S,-t.L1/2+S,-H)),m.forEach(y=>{i.addSecond(y)}),j.forEach(y=>{i.addSecond(y)}),c.addMain(b),F.forEach(y=>{c.addMain(y)}),c.addSecond(M),c.addSecond(R),O.forEach(y=>{c.addSecond(y)}),m.forEach(y=>{c.addSecond(y)}),j.forEach(y=>{c.addSecond(y)}),t.D4>=t.D3)throw`err218: D4 ${t.D4} larger than D3 ${t.D3}`;d.addMain(v(0,0,t.D3/2)),d.addSecond(v(0,0,t.D4/2)),r.addMain(v(0,0,t.D4/2)),r.addSecond(v(0,0,t.D3/2));const Q=t.D3*Math.cos(w),C=Q/Math.tan(w),B=g+(E/2+C)*Math.cos(H),Y=g+(E/2+C)*Math.sin(H),Z=N+2*(E+C+Q),X=Z+t.L3+t.L4+Q,J=p(X,X).addSegStrokeA(-X,X).addSegStrokeA(-X,-X).addSegStrokeA(X,-X).closeSegStroke();_.addMain(J),o.fig={faceFrame:i,facePlate:c,faceRod:d,faceRodHollow:r,faceCutRod:_};const A=o.partName;o.vol={extrudes:[{outName:`subpax_${A}_frame`,face:`${A}_faceFrame`,extrudeMethod:U.eLinearOrtho,length:t.H2,rotate:[0,0,0],translate:[0,0,t.H1-t.H2]},{outName:`subpax_${A}_plate`,face:`${A}_facePlate`,extrudeMethod:U.eLinearOrtho,length:t.H3,rotate:[0,0,0],translate:[0,0,0]},{outName:`subpax_${A}_rod1`,face:`${A}_faceRod`,extrudeMethod:U.eLinearOrtho,length:Z,rotate:[0,Math.PI/2-w,H],translate:[t.L4/2-B,t.L3/2-Y,t.H3-Q]},{outName:`subpax_${A}_rod2`,face:`${A}_faceRod`,extrudeMethod:U.eLinearOrtho,length:Z,rotate:[0,Math.PI/2-w,Math.PI-H],translate:[-t.L4/2+B,t.L3/2-Y,t.H3-Q]},{outName:`subpax_${A}_rod3`,face:`${A}_faceRod`,extrudeMethod:U.eLinearOrtho,length:Z,rotate:[0,Math.PI/2-w,Math.PI+H],translate:[-t.L4/2+B,-t.L3/2+Y,t.H3-Q]},{outName:`subpax_${A}_rod4`,face:`${A}_faceRod`,extrudeMethod:U.eLinearOrtho,length:Z,rotate:[0,Math.PI/2-w,-H],translate:[t.L4/2-B,-t.L3/2+Y,t.H3-Q]},{outName:`subpax_${A}_rodH1`,face:`${A}_faceRodHollow`,extrudeMethod:U.eLinearOrtho,length:Z,rotate:[0,Math.PI/2-w,H],translate:[t.L4/2-B,t.L3/2-Y,t.H3-Q]},{outName:`subpax_${A}_rodH2`,face:`${A}_faceRodHollow`,extrudeMethod:U.eLinearOrtho,length:Z,rotate:[0,Math.PI/2-w,Math.PI-H],translate:[-t.L4/2+B,t.L3/2-Y,t.H3-Q]},{outName:`subpax_${A}_rodH3`,face:`${A}_faceRodHollow`,extrudeMethod:U.eLinearOrtho,length:Z,rotate:[0,Math.PI/2-w,Math.PI+H],translate:[-t.L4/2+B,-t.L3/2+Y,t.H3-Q]},{outName:`subpax_${A}_rodH4`,face:`${A}_faceRodHollow`,extrudeMethod:U.eLinearOrtho,length:Z,rotate:[0,Math.PI/2-w,-H],translate:[t.L4/2-B,-t.L3/2+Y,t.H3-Q]},{outName:`subpax_${A}_cut1`,face:`${A}_faceCutRod`,extrudeMethod:U.eLinearOrtho,length:X,rotate:[0,0,0],translate:[0,0,-X]},{outName:`subpax_${A}_cut2`,face:`${A}_faceCutRod`,extrudeMethod:U.eLinearOrtho,length:X,rotate:[0,0,0],translate:[0,0,t.H1]}],volumes:[{outName:`ipax_${A}_rawRod`,boolMethod:nt.eUnion,inList:[`subpax_${A}_rod1`,`subpax_${A}_rod2`,`subpax_${A}_rod3`,`subpax_${A}_rod4`]},{outName:`ipax_${A}_rodHollow`,boolMethod:nt.eUnion,inList:[`subpax_${A}_rodH1`,`subpax_${A}_rodH2`,`subpax_${A}_rodH3`,`subpax_${A}_rodH4`]},{outName:`ipax_${A}_halfRods`,boolMethod:nt.eSubstraction,inList:[`ipax_${A}_rawRod`,`subpax_${A}_cut1`]},{outName:`ipax_${A}_rods`,boolMethod:nt.eSubstraction,inList:[`ipax_${A}_halfRods`,`subpax_${A}_cut2`]},{outName:`ipax_${A}_plus`,boolMethod:nt.eUnion,inList:[`subpax_${A}_frame`,`subpax_${A}_plate`,`ipax_${A}_rods`]},{outName:`pax_${A}`,boolMethod:nt.eSubstraction,inList:[`ipax_${A}_plus`,`ipax_${A}_rodHollow`]}]},o.sub={},o.logstr+=`trapeze drawn successfully!
|
|
106
106
|
`,o.calcErr=!1}catch(S){o.logstr+=S,console.log(S)}return o}var ho={pTitle:"Heliostat trapeze",pDescription:"The support of one solar panel. Made out of aluminium for lightness and cooling",pDef:_e,pGeom:ao},fe={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"]),St("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),St("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),St("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 uo(s,t,u=""){const o=ut(fe.partName+u);let n;const a=I(),i=I();o.logstr+=`${o.partName} simTime: ${s}
|
|
107
107
|
`;try{const c=t.LH*t.LV/1e6,d=t.solar_power*c*t.power_efficiency/100;o.logstr+=`panel surface: ${L(c)} m2
|
|
108
108
|
`,o.logstr+=`panel power: ${L(d)} W
|
|
@@ -116,5 +116,5 @@ var ve=Object.defineProperty;var $e=(s,t,u)=>t in s?ve(s,t,{enumerable:!0,config
|
|
|
116
116
|
`,o.logstr+=`global vertical height: ${L(Q/1e3)} m
|
|
117
117
|
`,o.logstr+=`global area: ${L(C)} m2
|
|
118
118
|
`,o.logstr+=`area efficiency: ${L(100*W*c/C)} %
|
|
119
|
-
`;const B=-j/2,Y=-Q/2;n=function(J,A){return
|
|
120
|
-
`,o.calcErr=!1}catch(c){o.logstr+=c,console.log(c)}return o}var _o={pTitle:"Heliostat panel-surface",pDescription:"The surface collecting the solar power",pDef:fe,pGeom:uo};const Se={"gear/gear_wheel_wheel":Jt,"gear/simplified_gear_wheel":Te,"heliostat/heliostat":We,"heliostat/heliostat_2":Xe,"heliostat/base":Ze,"heliostat/pole_static":At,"heliostat/vaxis":Qe,"heliostat/ring":eo,"heliostat/vaxis_holder":bt,"heliostat/ring_guidance":so,"heliostat/vaxis_guidance":no,"heliostat/rake":Rt,"heliostat/rake_stopper":
|
|
119
|
+
`;const B=-j/2,Y=-Q/2;n=function(J,A){return p(J,A).addSegStrokeA(J+t.LH,A).addSegStrokeA(J+t.LH,A+t.LV).addSegStrokeA(J,A+t.LV).closeSegStroke()};const Z=[];b.forEach((J,A)=>{const y=(R-J)%2,V=Math.floor((R-J)/2);for(let G=0;G<J;G++){let ct=0,st=0;t.main_direction===0?(ct=B+A*t.LH+T[A],st=Y+(V+G)*t.LV+m[V+G],y===1&&(st+=(t.LV+m[V+G+1]-m[V+G])/2)):(st=Y+A*t.LV+T[A],ct=B+(V+G)*t.LH+m[V+G],y===1&&(ct+=(t.LH+m[V+G+1]-m[V+G])/2)),Z.push([ct,st])}});for(const J of Z)a.addMain(n(J[0],J[1]));i.addMain(n(0,0)),o.fig={faceSurface:a,faceOnePanel:i};const X=o.partName;o.vol={extrudes:Z.map((J,A)=>({outName:`subpax_${X}_panel_${A}`,face:`${X}_faceOnePanel`,extrudeMethod:U.eLinearOrtho,length:t.LZ,rotate:[0,0,0],translate:[J[0],J[1],0]})),volumes:[{outName:`pax_${X}`,boolMethod:nt.eUnion,inList:Z.map((J,A)=>`subpax_${X}_panel_${A}`)}]},o.sub={},o.logstr+=`panel-surface drawn successfully!
|
|
120
|
+
`,o.calcErr=!1}catch(c){o.logstr+=c,console.log(c)}return o}var _o={pTitle:"Heliostat panel-surface",pDescription:"The surface collecting the solar power",pDef:fe,pGeom:uo};const Se={"gear/gear_wheel_wheel":Jt,"gear/simplified_gear_wheel":Te,"heliostat/heliostat":We,"heliostat/heliostat_2":Xe,"heliostat/base":Ze,"heliostat/pole_static":At,"heliostat/vaxis":Qe,"heliostat/ring":eo,"heliostat/vaxis_holder":bt,"heliostat/ring_guidance":so,"heliostat/vaxis_guidance":no,"heliostat/rake":Rt,"heliostat/rake_stopper":Ut,"heliostat/haxis_guidance":co,"heliostat/spider":Gt,"heliostat/swing":Nt,"heliostat/rod":go,"heliostat/trapeze":ho,"heliostat/surface":_o};function fo(s){const t=/^.*\//g;return s.replace(t,"")}function So(s){const t={};for(const u of Object.keys(s)){const o=fo(u);t[o]=`/${u}`}return t}function Lo(s){const t=[];for(const u of Object.keys(s))t.push(u);return t}const Po=So(Se),xo=Lo(Se);export{Se as a,Po as b,xo as d};
|