index-DygTP69T.js 1.4 KB

12
  1. import{aH as O,d as n,aI as A,z as M,n as p,aJ as c,t as m,b as D,v as z,aK as U}from"./index-D68iA7pN.js";async function v(){let a=new O;a.setMessage(n("396")+n("120")+":"),a.setUserInputControls(A.kNoZeroResponseAccepted|A.kNoNegativeResponseAccepted);let l=await a.go();if(l==null)return;a.setMessage(n("396")+n("121")+":");let f=await a.go();if(f==null)return;let s=await M.getCorner(n("396")+n("448"));if(!s)return;let i=s.pt2.x-s.pt1.x,o=s.pt2.y-s.pt1.y,x=await M.userSelect(n("167")+n("449")),e=M.getMcDbEntitysBoundingBox(x);if(!e)return;let t=new p;i>0?t.x=e.minPt.x:t.x=e.maxPt.x,o>0?t.y=e.minPt.y:t.y=e.maxPt.y,b({iColNum:f,iRowNum:l,dColOffset:i,dRowOffset:o,aryId:x,dAng:0})}const b=a=>{const{iRowNum:l=0,iColNum:f=0,dColOffset:s=0,dRowOffset:i=0,aryId:o=[],dAng:x=0}=a;let e=M.getMcDbEntitysBoundingBox(o);if(!e)return;let t=new p;s>0?t.x=e.minPt.x:t.x=e.maxPt.x,i>0?t.y=e.minPt.y:t.y=e.maxPt.y;let g=new c().setToRotation(x*Math.PI/180,m.kZAxis,t),P=5e4,C=0;for(let y=0;y<l;y++){let B=new m(0,i*y,0),I=new c().setToTranslation(B);for(let u=0;u<f;u++){if(y==0&&u==0)continue;let N=new m(s*u,0,0),R=new c().setToTranslation(N),r=new p(t.x,t.y,t.z);r.transformBy(I),r.transformBy(R),r.transformBy(g);let T=new c().setToTranslation(new m(r.x-t.x,r.y-t.y,r.z-t.z));for(let d=0;d<o.length;d++){let w=o[d].clone();if(w&&(w.transformBy(T),D.getCurrentMxCAD().drawEntity(w),C++,C>P)){z.acutPrintf(n("450")+P+n("451")+`
  2. `);return}}U()}}};export{v as M,b as r};