/*! * LMV v7.99.1 * * Copyright 2024 Autodesk, Inc. * All rights reserved. * * This computer source code and related instructions and comments are the * unpublished confidential and proprietary information of Autodesk, Inc. * and are protected under Federal copyright and state trade secret law. * They may not be disclosed to, copied or used by any third party without * the prior written consent of Autodesk, Inc. * * Autodesk Viewer SDK Usage Limitations: * * The Autodesk Viewer SDK JavaScript must be delivered from an * Autodesk-hosted URL. */(()=>{var e={5439:(e,t,i)=>{"use strict";i.r(t),i.d(t,{intersectLines:()=>n,nearestPointOnCircularArc:()=>r});const r=(e,t,i,r,n,s)=>{const o=(s=s||new THREE.Vector2).copy(e).sub(t).normalize(),a=Math.atan2(o.y,o.x);if(Autodesk.Extensions.CompGeom.angleInsideArc(a,r,n))return o.multiplyScalar(i).add(t);const c=Autodesk.Extensions.CompGeom.getEllipsePoint(r,t.x,t.y,i,i),l=Autodesk.Extensions.CompGeom.getEllipsePoint(n,t.x,t.y,i,i),d=c.distanceToSquared(e)<=l.distanceToSquared(e);return s.copy(d?c:l),s},n=function(e,t,i,r,n,s){let o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1e-5;const a=(r.y-i.y)*(t.x-e.x)-(r.x-i.x)*(t.y-e.y);if(Math.abs(a)1||r<0||r>1)return null}return(s=s||new THREE.Vector2).x=e.x+c*(t.x-e.x),s.y=e.y+c*(t.y-e.y),s}},6450:(e,t,i)=>{"use strict";i.r(t),i.d(t,{Snapper:()=>y});var r=i(4981),n=i(5439);const s=Autodesk.Viewing.MeasureCommon,o=s.EPSILON,a=s.SnapType,c=s.SnapResult;var l=.001;const d=Autodesk.Viewing,u=d.Private.VertexBufferReader;function h(e,t){return Math.abs(e-t)<=l}function p(e,t){return Math.abs(e.x-t.x)<=l&&Math.abs(e.y-t.y)<=l&&Math.abs(e.z-t.z)<=l}function g(e,t,i){if(t.equals(i))return e.distanceTo(t);var r,n,s=new THREE.Vector3,o=new THREE.Vector3;return s.subVectors(t,e),o.subVectors(i,t),n=s.dot(o),s.subVectors(i,t),(n=-n/s.dot(s))<0?r=e.distanceTo(t):n>1?r=e.distanceTo(i):(s.subVectors(e,t),o.subVectors(e,i),s.cross(o),o.subVectors(i,t),r=Math.sqrt(s.dot(s))/Math.sqrt(o.dot(o))),r}const E={Unknown:0,Line:1,CircularArc:2,EllipticalArc:3};class m{constructor(e){this.type=E.Unknown,this.viewportId=e,this.distance=0,this.lineStart=null,this.lineEnd=null,this.radius=0,this.radiusX=0,this.radiusY=0,this.center=null,this.startAngle=0,this.endAngle=0}fromLine(e,t){return this.type=E.Line,this.lineStart=e.clone(),this.lineEnd=t.clone(),this}fromCircularArc(e,t,i,r){return this.type=E.CircularArc,this.center=e.clone(),this.radius=t,this.start=i,this.end=r,this}fromEllipticalArc(e,t,i,r,n){return this.type=E.EllipticalArc,this.center=e.clone(),this.radiusX=t,this.radiusY=i,this.start=r,this.end=n,this}isLine(){return this.type===E.Line}isCircularArc(){return this.type===E.CirularArc}isEllipticalArc(){return this.type===E.EllipticalArc}getIntersection(e,t){if(this.isLine()&&e.isLine())return(0,n.intersectLines)(this.lineStart,this.lineEnd,e.lineStart,e.lineEnd,!1,t)}}const v=(e,t,i)=>{if(e.sort(((e,t)=>e.distance-t.distance)),e.length<2)return null;const r={viewportId:e[0].viewportId,snapPoint:new THREE.Vector3(0,0,t.z)},n=e[0];for(let s=1;s0?(c.faceId=h,c.applyMatrix4(n),c):null},this.faceSnapping=function(e,t){var i=new THREE.Vector3,r=new THREE.Vector3,n=new THREE.Vector3;const s=new THREE.Geometry;let o;o=t.index&&(t.index.array||t.ib);var a=t.groups;if(!a||0===a.length){let e;e=t.vb??t.attributes.position.array,a=[{start:0,count:o?o.length:e.length,index:0}]}const c=this.makeReadVertexFunc(t),l=c(e.a);for(var d=0;d0?this.getTrianglesOnSameFace(s,e,c):null},this.getTrianglesOnSameFace=function(e,t,i){const r=e.vertices,n=i(t.a),s=i(t.b),o=i(t.c),a=new THREE.Geometry,c=Math.pow(10,5),l=[],d={};let u=-1;for(let e=0;e0;){const e=h.shift();if(p.has(e))continue;p.add(e),g.push(e);const t=l[e];for(const i of t.edges)i.triangles.forEach((t=>t!==e&&h.push(t)))}const E=[];let m=0;return g.forEach((e=>{a.faces.push(new THREE.Face3(m++,m++,m++)),E.push(r[3*e]),E.push(r[3*e+1]),E.push(r[3*e+2])})),a.vertices=E,a},this.edgeSnappingWithTopology=function(e,t,r,n){let{matrixWorld:s}=n;const o=new THREE.Geometry;var a,c=Number.MAX_VALUE,l=new THREE.Vector3,d=new THREE.Vector3;if(void 0!==t.index&&null!=r){const i=this.makeReadVertexFunc(t);for(var u=0;u=c&&o.vertices.length>0&&(w=c,o.applyMatrix4(s),i.geomEdge=o)},this.extractLineGeometry=function(e,t){const i=this.makeReadVertexFunc(t),r=i(e.a),n=i(e.b),s=new THREE.Geometry;return s.vertices.push(r,n),s},this.edgeSnapping=function(e,t){const i=[],r=e.vertices.length;for(var n=!0,s=!0,o=!0,a=0;a=0;--g)t.push(i[a[g]]),t.push(i[a[g]+1]),i.splice(a[g],2)}while(a.length>0);return t},this.vertexSnappingWithTopology=function(e,t){var i=Number.MAX_VALUE,r=new THREE.Vector3;if(!e)return r;if(e.vertices.length>1){const o=e.vertices[0],a=e.vertices[e.vertices.length-1];var n=t.distanceTo(o),s=t.distanceTo(a);n<=s?(i=n,r=o.clone()):(i=s,r=a.clone())}return V=i,r},this.vertexSnapping=function(e,t){var i=Number.MAX_VALUE,r=new THREE.Vector3;const n=e.vertices.length;for(let s=0;s0&&e.y>=0?Math.atan(e.y/e.x):e.x>=0&&e.y<0?Math.atan(e.y/e.x)+2*Math.PI:e.x<0&&e.y<=0||e.x<=0&&e.y>0?Math.atan(e.y/e.x)+Math.PI:null};function b(e,t,i){this.viewer=e,this.snapper=t,this.lineGeom=new THREE.Geometry,this.circularArc=null,this.circularArcCenter,this.circularArcRadius,this.ellipticalArc=null,this.ellipticalArcCenter,this.minDist=Number.MAX_VALUE,this.matrix=new THREE.Matrix4,this.vpIdLine=null,this.vpIdCircular=null,this.vpIdElliptical=null,this.detectRadius=i,this.snapCandidates=[]}b.prototype.onLineSegment=function(e,t,i,r,n){var s=this.snapper.getIntersectPoint(),o=new THREE.Vector3(e,t,s.z),a=new THREE.Vector3(i,r,s.z);this.matrix&&(o.applyMatrix4(this.matrix),a.applyMatrix4(this.matrix));var c=g(s,o,a);c>this.detectRadius||(this.snapCandidates.push(new m(n,c).fromLine(o,a)),cthis.detectRadius)return;var h=this.snapper.angleVector2(c);let p;if(r>i&&h>=i&&h<=r)p=new THREE.CircleGeometry(s,100,i,r-i);else{if(!(r=i||h<=r)))return;p=new THREE.CircleGeometry(s,100,i,2*Math.PI-i+r)}p.vertices.splice(0,1),p.applyMatrix4((new THREE.Matrix4).makeTranslation(e,t,a.z)),this.circularArc=p,this.circularArcCenter=new THREE.Vector3(e,t,a.z),this.circularArcRadius=s,this.snapPoint=new THREE.Vector3(d.x,d.y,a.z),this.vpIdCircular=o},b.prototype.onEllipticalArc=function(e,t,i,r,n,o,a,c){var l=this.snapper.getIntersectPoint(),d=new THREE.Vector2(l.x,l.y),u=n-this.detectRadius,p=o-this.detectRadius,g=n+this.detectRadius,E=o+this.detectRadius,v=(d.x-e)*(d.x-e)/(u*u)+(d.y-t)*(d.y-t)/(p*p),y=(d.x-e)*(d.x-e)/(g*g)+(d.y-t)*(d.y-t)/(E*E),f=new THREE.Vector2(e,t);d.sub(f),d.x*=o,d.y*=n;var T=this.snapper.angleVector2(d);if(r>2*Math.PI&&(r=2*Math.PI),v>=1&&y<=1&&(r>i&&T>=i&&T<=r||r=i||T<=r))){var w=((e,t,i,r,n,s,o)=>{let a=new THREE.Geometry;for(let c=0;c1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return;let{dbId:r,fragId:n,intersectPoint:s,model:o=E.model}=e;if(o.is3d())return;i.modelId=e.model?e.model.id:null,i.hasTopology=!1,i.intersectPoint=s;let c,l=1;if(E.impl.is2d||(c=o.getModelToViewerTransform(),c&&(l=c.getMaxScaleOnAxis(),i.intersectPoint=s.clone(),i.intersectPoint.applyMatrix4(o.getInverseModelToViewerTransform()))),i.radius=this.setDetectRadius(s)/l,!(null!=o.getFragmentList()))return S=!0,i.geomType=a.SNAP_VERTEX,i.geomVertex=s,void(c&&i.intersectPoint.applyMatrix4(c));var d=new b(E,this,i.radius);if(t.enumSegments){const e=i.intersectPoint.x-i.radius,r=i.intersectPoint.y-i.radius,n=i.intersectPoint.x+i.radius,s=i.intersectPoint.y+i.radius;t.enumSegments(e,r,n,s,d)}else{var h=n;if(void 0===h){if(!A)return;h=[]}else Array.isArray(h)||(h=[h]);for(var p=0;pe)))],r.forEach((e=>e.applyMatrix4(c))),i.circularArcRadius&&(i.circularArcRadius*=l),i.radius*=l}},this.snapping2DOverlay=function(e,t,r,n){i.hasTopology=!1,i.intersectPoint=e,i.radius=n||this.setDetectRadius(e);for(var s=new b(E,this,i.radius),o=0;oe.viewportId===P;e.snapCandidates=e.snapCandidates.filter(t)}const r=v(e.snapCandidates,t,e.detectRadius);if(r)return i.viewportIndex2d=r.viewportId,i.snapPoint=r.snapPoint,i.geomType=a.SNAP_INTERSECTION,i.geomVertex=r.snapPoint,void(S=!0);if(e.circularArc){if(i.viewportIndex2d=e.vpIdCircular,i.snapPoint=e.snapPoint,null!==P&&P!==i.viewportIndex2d)return;const r=e.circularArc.vertices[0],n=e.circularArc.vertices[e.circularArc.vertices.length-1];t.distanceTo(r)1e-5)return}i.intersectPoint.distanceTo(e)<2*i.radius&&(i.geomVertex=e,i.geomType=a.SNAP_MIDPOINT)}},this.setPerpendicular=function(e){i.isPerpendicular=e},this.lineStripToPieces=function(e){const t=e.vertices;for(var i=t.length-2;i>0;i--)t.splice(i,0,t[i])},this.setDetectRadius=function(e){var t=E.navigation,i=t.getCamera(),r=t.getPosition(),n=e.clone(),s=i.isPerspective?n.sub(r).length():t.getEyeVector().length(),o=t.getVerticalFov(),a=2*s*Math.tan(THREE.Math.degToRad(.5*o)),c=t.getScreenViewport(),l=this.getWindow().devicePixelRatio||1;return this.detectRadiusInPixels*a/(c.height*l)},this.handleButtonDown=function(){return R=!0,!1},this.handleButtonUp=function(){return R=!1,!1},this.handleMouseMove=function(e){return R||this.onMouseMove({x:e.canvasX,y:e.canvasY}),!1},this.handleSingleTap=function(e){return this.handleMouseMove(e)},this.handlePressHold=function(e){if(d.isMobileDevice())switch(e.type){case"press":x=!0,this.onMouseMove({x:e.canvasX,y:e.canvasY});break;case"pressup":this.onMouseMove({x:e.canvasX,y:e.canvasY}),x=!1}return!1},this.handleGesture=function(e){if(d.isMobileDevice()&&x)switch(e.type){case"dragstart":case"dragmove":this.onMouseMove({x:e.canvasX,y:e.canvasY});break;case"dragend":this.onMouseMove({x:e.canvasX,y:e.canvasY}),x=!1}return!1},this.onMouseDown=function(e){return this.onMouseMove(e)},this.onMouseMove=function(e){var t,r;this.clearSnapped();var n=E.impl.snappingHitTest(e.x,e.y,!1);if(!n&&A){var s=E.impl.clientToViewport(e.x,e.y);n={intersectPoint:E.impl.intersectGroundViewport(s)}}if(!n||!n.intersectPoint)return!1;const o=(null===(t=n.model)||void 0===t?void 0:t.isLeaflet())||E.impl.is2d&&(null===(r=E.model)||void 0===r?void 0:r.isLeaflet());if(n.face)this.snapping3D(n);else if(!n.dbId&&0!==n.dbId||o){(A||o)&&this.snappingRasterPixel(n)}else this.snapping2D(n);return this.snapMidpoint(),!(M&&!M(i))||(this.clearSnapped(),!1)}}d.GlobalManagerMixin.call(y.prototype)},4981:(e,t,i)=>{"use strict";i.r(t),i.d(t,{NullSnapperIndicator:()=>g,SnapperIndicator:()=>E,getXYZFromPos:()=>p});const r=Autodesk.Viewing.MeasureCommon,n=r.isEqualVectors,s=r.EPSILON,o=r.SnapType,a="MeasureTool-snapper-geometries",c="MeasureTool-snapper-indicator",l=.2,d=1.2;let u=null;const h=new THREE.Vector3;function p(e,t){return h.x=e.getX(t),h.y=e.getY(t),h.z=e.getZ(t),h}class g{isNull(){return!0}render(){}removeOverlay(e){}clearOverlay(e){}clearOverlays(){}addOverlay(e,t){}drawFace(e,t,i){}cylinderMesh(e,t,i,r){return new THREE.Mesh}renderGeometry(e){}renderVertexIndicator(e){}renderMidpointIndicator(e){}renderEdgeIndicator(e){}renderCircleIndicator(e){}renderPerpendicular(e){}renderPixelIndicator(e){}renderIndicator(e){}drawLine(e,t,i,r){}drawPoint(e,t,i){}drawCircle(e,t,i){}setScale(e){return 1}setPointScale(e){}setCircleScale(e){}setEdgeScale(e){}updatePointScale(e){}updateEdgeScale(e){}onCameraChange(){}destroy(){}}class E extends g{constructor(e,t){super(),this.viewer=e,this.snapper=t,this.overlayType=0,this.previewsIntersectPoint=null,this.viewer.impl.createOverlayScene(a),this.viewer.impl.createOverlayScene(c),this.geometryMaterial=new THREE.MeshPhongMaterial({color:52224,opacity:.5,transparent:!0,depthTest:!1,depthWrite:!1,side:THREE.DoubleSide}),this.indicatorMaterial=new THREE.MeshBasicMaterial({color:16742144,opacity:1,transparent:!1,depthTest:!1,depthWrite:!1,side:THREE.DoubleSide})}isNull(){return!1}render(){const e=this.snapper.getSnapResult();n(this.previewsIntersectPoint,e.intersectPoint,s)||this.clearOverlay(a),this.clearOverlay(c),e.isEmpty()||((this.snapper.renderSnappedGeometry||e.hasTopology&&this.snapper.renderSnappedTopology)&&this.renderGeometry(e),this.renderIndicator(e),this.previewsIntersectPoint=e.intersectPoint.clone())}removeOverlay(e){this.viewer.impl.clearOverlay(e,!0),this.viewer.impl.removeOverlayScene(e)}clearOverlay(e){this.removeOverlay(e),this.viewer.impl.createOverlayScene(e)}clearOverlays(){this.removeOverlay(a),this.viewer.impl.createOverlayScene(a),this.removeOverlay(c),this.viewer.impl.createOverlayScene(c),this.previewsIntersectPoint=null}addOverlay(e,t){this.viewer.impl.addOverlay(e,t)}drawFace(e,t,i){const r=new THREE.Mesh(e,t,!0);i===a&&(this.overlayType=1),this.addOverlay(i,r)}cylinderMesh(e,t,i,r){const n=(new THREE.Vector3).subVectors(t,e),s=new THREE.Matrix4;s.lookAt(e,t,(new THREE.Object3D).up),s.multiply((new THREE.Matrix4).set(1,0,0,0,0,0,1,0,0,-n.length(),0,0,0,0,0,1)),r=r||.5;let o=new THREE.CylinderGeometry(r,r,1,8,1,!0);const a=new THREE.Mesh(o,i);return o=null,a.applyMatrix4(s),a.position.x=(t.x+e.x)/2,a.position.y=(t.y+e.y)/2,a.position.z=(t.z+e.z)/2,a}renderGeometry(e){if(!n(this.previewsIntersectPoint,e.intersectPoint,s))switch(e.geomType){case o.SNAP_VERTEX:o.RASTER_PIXEL,this.drawPoint(e.geomVertex,this.geometryMaterial,a);break;case o.SNAP_EDGE:case o.SNAP_CURVEDEDGE:case o.SNAP_CIRCULARARC:case o.SNAP_MIDPOINT:this.drawLine(e.geomEdge,this.geometryMaterial,.3,a);break;case o.SNAP_FACE:case o.SNAP_CURVEDFACE:this.drawFace(e.geomFace,this.geometryMaterial,a)}}renderVertexIndicator(e){const t=r.getSnapResultPosition(e,this.viewer),i=this.setScale(t),n=d*i,s=this.viewer.navigation.getCameraRightVector().multiplyScalar(n),o=this.viewer.navigation.getCameraUpVector().multiplyScalar(n),a=new THREE.BufferGeometry,u=[],h=new THREE.Vector3;h.addVectors(t,s),h.addVectors(h,o),u[0]=h.clone(),h.subVectors(t,s),h.addVectors(h,o),u[1]=h.clone(),a.setFromPoints(u),this.drawLine(a,this.indicatorMaterial,l,c),h.addVectors(t,s),h.subVectors(h,o),u[0]=h.clone(),h.subVectors(t,s),h.subVectors(h,o),u[1]=h.clone(),a.setFromPoints(u),this.drawLine(a,this.indicatorMaterial,l,c),h.subVectors(t,s),h.subVectors(h,o),u[0]=h.clone(),h.subVectors(t,s),h.addVectors(h,o),u[1]=h.clone(),a.setFromPoints(u),this.drawLine(a,this.indicatorMaterial,l,c),h.addVectors(t,s),h.subVectors(h,o),u[0]=h.clone(),h.addVectors(t,s),h.addVectors(h,o),u[1]=h.clone(),a.setFromPoints(u),this.drawLine(a,this.indicatorMaterial,l,c)}renderMidpointIndicator(e){const t=e.geomVertex,i=this.setScale(t),r=d*i,n=this.viewer.navigation.getCameraRightVector().multiplyScalar(r),s=this.viewer.navigation.getCameraUpVector().multiplyScalar(r),o=new THREE.BufferGeometry,a=[],u=new THREE.Vector3;u.addVectors(t,n),u.subVectors(u,s),a[0]=u.clone(),u.subVectors(t,n),u.subVectors(u,s),a[1]=u.clone(),o.setFromPoints(a),this.drawLine(o,this.indicatorMaterial,l,c),u.subVectors(t,n),u.subVectors(u,s),a[0]=u.clone(),u.addVectors(t,s),a[1]=u.clone(),o.setFromPoints(a),this.drawLine(o,this.indicatorMaterial,l,c),u.addVectors(t,n),u.subVectors(u,s),a[0]=u.clone(),u.addVectors(t,s),a[1]=u.clone(),o.setFromPoints(a),this.drawLine(o,this.indicatorMaterial,l,c)}renderEdgeIndicator(e){const t=r.getSnapResultPosition(e,this.viewer),i=this.setScale(t),n=d*i,s=this.viewer.navigation.getCameraRightVector().multiplyScalar(n),o=this.viewer.navigation.getCameraUpVector().multiplyScalar(n),a=new THREE.BufferGeometry,u=[],h=new THREE.Vector3;h.addVectors(t,s),h.subVectors(h,o),u[0]=h.clone(),u[1]=t.clone(),a.setFromPoints(u),this.drawLine(a,this.indicatorMaterial,l,c),h.subVectors(t,s),h.subVectors(h,o),u[0]=h.clone(),u[1]=t.clone(),a.setFromPoints(u),this.drawLine(a,this.indicatorMaterial,l,c),h.addVectors(t,o),u[0]=h.clone(),u[1]=t.clone(),a.setFromPoints(u),this.drawLine(a,this.indicatorMaterial,l,c)}renderCircleIndicator(e){const t=r.getSnapResultPosition(e,this.viewer);this.drawCircle(t,this.indicatorMaterial,c)}renderPerpendicular(e){const t=r.getSnapResultPosition(e,this.viewer),i=this.setScale(t),n=d*i,s=this.viewer.navigation.getCameraRightVector().multiplyScalar(n),o=this.viewer.navigation.getCameraUpVector().multiplyScalar(n),a=new THREE.BufferGeometry,u=[],h=new THREE.Vector3;u[0]=t.clone(),h.subVectors(t,s),u[1]=h.clone(),a.setFromPoints(u),this.drawLine(a,this.indicatorMaterial,l,c),h.addVectors(t,s),h.subVectors(h,o),u[0]=h.clone(),h.subVectors(t,s),h.subVectors(h,o),u[1]=h.clone(),a.setFromPoints(u),this.drawLine(a,this.indicatorMaterial,l,c),h.subVectors(t,s),h.subVectors(h,o),u[0]=h.clone(),h.subVectors(t,s),h.addVectors(h,o),u[1]=h.clone(),a.setFromPoints(u),this.drawLine(a,this.indicatorMaterial,l,c),u[0]=t.clone(),h.subVectors(t,o),u[1]=h.clone(),a.setFromPoints(u),this.drawLine(a,this.indicatorMaterial,l,c)}renderPixelIndicator(e){const t=r.getSnapResultPosition(e,this.viewer),i=this.setScale(t),n=d*i,s=this.viewer.navigation.getCameraRightVector().multiplyScalar(n),o=this.viewer.navigation.getCameraUpVector().multiplyScalar(n),a=new THREE.BufferGeometry,u=[],h=new THREE.Vector3;h.subVectors(t,s),h.addVectors(h,o),u[0]=h.clone(),u[1]=t.clone(),a.setFromPoints(u),this.drawLine(a,this.indicatorMaterial,l,c),h.addVectors(t,s),h.addVectors(h,o),u[0]=h.clone(),u[1]=t.clone(),a.setFromPoints(u),this.drawLine(a,this.indicatorMaterial,l,c),h.addVectors(t,s),h.subVectors(h,o),u[0]=h.clone(),u[1]=t.clone(),a.setFromPoints(u),this.drawLine(a,this.indicatorMaterial,l,c),h.subVectors(t,s),h.subVectors(h,o),u[0]=h.clone(),u[1]=t.clone(),a.setFromPoints(u),this.drawLine(a,this.indicatorMaterial,l,c)}renderIndicator(e){if(e.isPerpendicular)this.renderPerpendicular(e);else if(e.snapToArc)e.isArc&&e.geomType===o.SNAP_CIRCULARARC&&this.viewer.model.is2d()&&!this.viewer.model.isPdf()&&this.renderVertexIndicator(e);else switch(e.geomType){case o.SNAP_VERTEX:case o.SNAP_INTERSECTION:this.renderVertexIndicator(e);break;case o.SNAP_MIDPOINT:this.renderMidpointIndicator(e);break;case o.SNAP_CIRCLE_CENTER:this.renderCircleIndicator(e);break;case o.SNAP_EDGE:case o.SNAP_CURVEDEDGE:this.renderEdgeIndicator(e);break;case o.SNAP_CIRCULARARC:this.viewer.model.is2d()?this.renderVertexIndicator(e):this.renderCircleIndicator(e);break;case o.SNAP_FACE:case o.SNAP_CURVEDFACE:this.renderVertexIndicator(e);break;case o.RASTER_PIXEL:this.renderPixelIndicator(e)}}drawLine(e,t,i,r){let n,s;r===a&&(this.overlayType=2),e instanceof THREE.Geometry?(console.warn("SnapperIndicator.drawLine(geom, material, width, overlayName): THREE.Geometry has been depecrated and the geom argument should use a THREE.BufferGeometry instead"),n=e.vertices.length):(s=e.getAttribute("position"),n=s.count);for(let o=0;o{var r=Autodesk.Viewing,n=AutodeskNamespace("Autodesk.Viewing.Extensions.Snapping");function s(t,i){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e.exports[r]=t[r],i[r]=t[r])}s(i(5439),n),s(i(6450),n),s(i(4981),n);class o extends r.Extension{constructor(e,t){super(e,t)}load(){return this.viewer.loadExtension("Autodesk.CompGeom")}unload(){return!0}activate(){return!0}deactivate(){return!1}}r.theExtensionManager.registerExtension("Autodesk.Snapping",o)}},t={};function i(r){var n=t[r];if(void 0!==n)return n.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,i),s.exports}i.d=(e,t)=>{for(var r in t)i.o(t,r)&&!i.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r=i(2573);Autodesk.Extensions.Snapping=r})(); //# sourceMappingURL=Snapping.min.js.map