var __awaiter=this&&this.__awaiter||function(t,n,r,e){return new(r||(r=Promise))(function(i,o){function a(t){try{d(e.next(t))}catch(t){o(t)}}function c(t){try{d(e.throw(t))}catch(t){o(t)}}function d(t){var n;t.done?i(t.value):(n=t.value,n instanceof r?n:new r(function(t){t(n)})).then(a,c)}d((e=e.apply(t,n||[])).next())})};import MxDbEllipseArc from".";import McEdGetPointWorldDrawObject from"../McEdGetPointWorldDrawObject";import MrxDbgUiPrPoint from"../MrxDbgUiPrPoint";import MxFun from"../MxFun";export default function drawMxDbEllipseArc(){const t=new MrxDbgUiPrPoint,n=MxFun.getCurrentDraw(),r=new McEdGetPointWorldDrawObject;let e=new MxDbEllipseArc;t.setUserDraw(r),t.go(()=>__awaiter(this,void 0,void 0,function*(){e.center=t.value(),r.setDraw((t,n)=>{e.startPoint=t,e.yRadius=e.center.distanceTo(t),n.drawCustomEntity(e)}),e.startPoint=(yield t.go())||new THREE.Vector3,r.setDraw((t,n)=>{e.endPoint=t,n.drawCustomEntity(e)}),e.endPoint=(yield t.go())||new THREE.Vector3,n.addMxEntity(e)}))};