yanchengPowerSupply/node_modules/mxdraw/dist/lib/MxModule/MxDbRingShape/draw.js

1 line
1.1 KiB
JavaScript

var __awaiter=this&&this.__awaiter||function(t,e,n,r){return new(n||(n=Promise))(function(o,i){function a(t){try{w(r.next(t))}catch(t){i(t)}}function c(t){try{w(r.throw(t))}catch(t){i(t)}}function w(t){var e;t.done?o(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(a,c)}w((r=r.apply(t,e||[])).next())})};import{MxDbRingShapeDraw}from".";import McEdGetPointWorldDrawObject from"../McEdGetPointWorldDrawObject";import MrxDbgUiPrPoint from"../MrxDbgUiPrPoint";import MxFun from"../MxFun";export default function drawMxDbRingShape(){const t=new MrxDbgUiPrPoint,e=MxFun.getCurrentDraw(),n=new McEdGetPointWorldDrawObject;t.setUserDraw(n);const r=new McEdGetPointWorldDrawObject,o=new MxDbRingShapeDraw;t.setUserDraw(r),t.setMessage("\n确定圆弧开始点:"),t.go(n=>__awaiter(this,void 0,void 0,function*(){console.log(123),o.center=t.value(),r.setDraw(t=>{r.drawCircle(o.center,o.center.distanceTo(t))}),o.innerPoint=(yield t.go())||new THREE.Vector3,r.setDraw(t=>{o.outerPoint=t,r.drawCustomEntity(o)}),o.outerPoint=(yield t.go())||new THREE.Vector3,e.addMxEntity(o)}))};