胶州空管前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3 lines
1.4 MiB

!function(){"use strict";var e=window.Glodon=window.Glodon||{};e.Version="2024-10-16-16-6",function(){function t(e,t){let i=t.split("."),n=e,o=i.length;for(let e=0;e<o;e++)void 0===n[i[e]]&&(n[i[e]]={}),n=n[i[e]];return n}t(e,"Web.Lang.Utility.Namespace").ensureNamespace=t}(),function(){let t=e.Web.Lang.Utility.Namespace.ensureNamespace(e,"Web.Common"),i=function(e){"string"==typeof e&&(e=JSON.parse(res)),this.code=e.code,this.message=e.message};i.prototype={getErrorCode:function(){return this.code},getErrorMessage:function(){return this.message}},t.Error=i}(),function(t){const i=e.Web.Lang.Utility.Namespace.ensureNamespace(e,"Web.Common.Flexible");let n=!1,o=!1,s="37.5px";var r,a=t.document,l=a.documentElement,h=a.querySelector('meta[name="viewport"]');if(t.addEventListener("resize",(function(){clearTimeout(r),r=setTimeout(d,300)}),!1),t.addEventListener("pageshow",(function(e){e.persisted&&(clearTimeout(r),r=setTimeout(d,300))}),!1),!h)if((h=a.createElement("meta")).setAttribute("name","viewport"),h.setAttribute("content","initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"),l.firstElementChild)l.firstElementChild.appendChild(h);else{var c=a.createElement("div");c.appendChild(h),a.write(c.innerHTML)}function d(){let e=t.screen.availWidth||375,i=t.screen.availHeight||667;n=e>i;var r=navigator.userAgent,a=/(?:Android)/.test(r),l=/(?:Firefox)/.test(r),h=/Macintosh/i.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>1;o=/(?:iPad|PlayBook)/.test(r)||a&&!/(?:Mobile)/.test(r)||l&&/(?:Tablet)/.test(r)||h;var c=Math.min(e,i);e=c<=320?320:c>320&&c<=414?c:c>414&&c<1024?420:450,s=e/10+"px"}d();i.getIsHorizontal=()=>n,i.getIsTablet=()=>o,i.getFontSize=()=>s}(window);class t{constructor(e,t,i){this.x=e||0,this.y=t||0,this.z=i||0}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}clone(){return new this.constructor(this.x,this.y,this.z)}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}distanceToSquared(e){var t=this.x-e.x,i=this.y-e.y,n=this.z-e.z;return t*t+i*i+n*n}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}}class i{constructor(e,i){this.min=e||new t(1/0,1/0,1/0),this.max=i||new t(-1/0,-1/0,-1/0)}getSize(){return new t(this.max.x-this.min.x,this.max.y-this.min.y,this.max.z-this.min.z)}setFromCenterAndSize(e,i){let n=new t(i.x,i.y).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}getCenter(){return new t(this.min.x+this.max.x,this.min.y+this.max.y,this.min.z+this.max.z).multiplyScalar(.5)}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)}union(e){return this.min.min(e.min),this.max.max(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}expandByPoint(e){return this.min.min(e),this.max.max(e),this}setFromPoints(e){this.makeEmpty();for(var t=0,i=e.length;t<i;t++)this.expandByPoint(e[t]);return this}}!function(){let n=e.Web.Lang.Utility.Namespace.ensureNamespace(e,"Web.Algorithm");n.MeanShift=class{constructor(e,t){this.points=e,this.searchRangeSquared=t**2,this.EPSILON_SQR=.1,this.clusters=[]}setSearchRange(e){this.searchRangeSquared=e**2}setPoints(e){this.points=e}meanShift(e){let t=e.clone(),i=[];for(;;){let e=this.rangeSearch(t);i=this.connect(i,e);let n=this.mean(e);if(t.distanceToSquared(n)<=this.EPSILON_SQR)break;t=n}return i}mean(e){let i=new t;for(const t of e)i.add(t);return i.multiplyScalar(1/e.length),i}rangeSea
//!!
this.opacity[t]=e,this.viewer.SetGlobalOpacity(e,t)}},{key:"getGlobalOpacity",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.opacity[e]||1}},{key:"restoreGlobalColor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.dc.printMode[e]==this.dc.Custom?this.setGlobalColor({red:128,green:128,blue:128,alpha:1},e):this.dc.printMode[e]==this.dc.Black?this.setGlobalColor({red:0,green:0,blue:0,alpha:1},e):this.viewer.RestoreGlobalColor(e)}},{key:"getGlobalColor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.dc.globalColor[e]||{red:128,green:128,blue:128,alpha:1}}},{key:"setPrintMode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.dc.setPrintMode(e,t),"Black"==e?(this.setGlobalColor({red:0,green:0,blue:0,alpha:1},t),this.viewer.RestoreOverrideElementsColor(t)):"Custom"==e?(this.setGlobalColor(this.dc.customColor[t]||this.dc.customColor[0],t),this.viewer.RestoreOverrideElementsColor(t)):(this.viewer.RestoreGlobalColor(t),this.viewer.RestoreOverrideElementsColor(t))}},{key:"overrideElementsColorById",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=.0039*t.red,o=.0039*t.green,s=.0039*t.blue,r=new this.butterfly.ObjectIDList;r.clear();for(var a=0,l=e.length;a<l;a++)r.push_back(e[a]);this.viewer.OverrideElementsColorById(r,n,o,s,t.alpha,i),this.update()}},{key:"restoreElementsColorById",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=new this.butterfly.ObjectIDList;i.clear();for(var n=0,o=e.length;n<o;n++)i.push_back(e[n]);this.viewer.RestoreElementsColorById(i,t),this.update()}},{key:"setClearColor",value:function(e,t,i,n){var o=.0039*e,s=.0039*t,r=.0039*i;this.viewer.SetClearColor(o,s,r,n)}},{key:"setElementColor",value:function(e,t,i,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=.0039*e,r=.0039*t,a=.0039*i;this.viewer.SetGlobalColor(s,r,a,n,o)}},{key:"alignDrawing",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.viewer.AlignDrawing(e[0],e[1],t[0],t[1],i)}},{key:"getAlignTranslate",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.viewer.GetAlignTranslate(e);return[t.x,t.y]}},{key:"scaleDrawing",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.viewer.AlignDrawingWithScale(null==e.x?e[0]:e.x,null==e.y?e[1]:e.y,t,i),this.update()}},{key:"getAlignScale",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.viewer.GetAlignScale(e)}},{key:"getAlignState",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.viewer.GetAlignMatrixCol(0,e),i={x:t.x,y:t.y,z:t.z,w:t.w},n=this.viewer.GetAlignMatrixCol(1,e),o={x:n.x,y:n.y,z:n.z,w:n.w},s=this.viewer.GetAlignMatrixCol(2,e),r={x:s.x,y:s.y,z:s.z,w:s.w},a=this.viewer.GetAlignMatrixCol(3,e),l={x:a.x,y:a.y,z:a.z,w:a.w},h={ver:1,AlignMatrixCol1:[i.x,i.y,i.z,i.w],AlignMatrixCol2:[o.x,o.y,o.z,o.w],AlignMatrixCol3:[r.x,r.y,r.z,r.w],AlignMatrixCol4:[l.x,l.y,l.z,l.w]};return JSON.stringify(h)}},{key:"setAlignState",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=JSON.parse(e);return 1===i.ver&&(null!=i.AlignMatrixCol1&&null!=i.AlignMatrixCol1&&(this.viewer.SetAlignMatrixCol(0,i.AlignMatrixCol1[0],i.AlignMatrixCol1[1],i.AlignMatrixCol1[2],i.AlignMatrixCol1[3],t),this.viewer.SetAlignMatrixCol(1,i.AlignMatrixCol2[0],i.AlignMatrixCol2[1],i.AlignMatrixCol2[2],i.AlignMatrixCol2[3],t),this.viewer.SetAlignMatrixCol(2,i.AlignMatrixCol3[0],i.AlignMatrixCol3[1],i.AlignMatrixCol3[2],i.AlignMatrixCol3[3],t),this.viewer.SetAlignMatrixCol(3,i.AlignMatrixCol4[0],i.AlignMatrixCol4[1],i.AlignMatrixCol4[2],i.AlignMatrixCol4[3],t)),this.viewer.UpdateViewMatrix(),!0)}},{key:"setModelTransformation",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.viewer.SetAlignMatrixCol(0,e[0],e[1],0,0,t),this.viewer.SetAlignMatrixCol(1