eDrawings
Components
Sheets
Layers
Tables
Configuration
Hide/Show
Transparent/Solid
Hide Others
Show All
Remove
Clear
Model viewing failed. Please reload to try again. If the failure persists, please report the information below to customer support.
Server:
Model ID:
Drop your content here
Or

Connection timed-out. Reload the page to continue.

tribs){for(var _i=0,iHierNodesAndAttribs_4=iHierNodesAndAttribs;_i-1){var hierNode=iViewer.getModel().getHierarchyNode(iID);if(hierNode){return{node:$("span[data-hoopsid='"+hierNode.HOOPSID+"']"),ownerDiv:$("div[data-hoopsid='"+hierNode.HOOPSID+"']")}}}return null}exports.getListElements=getListElements;function createUIGenerators(iViewer){var panelID="#edrawings-component-tree-menu";l_generators[panelID]=new eDwUICompTreeHTMLGenerator(iViewer,panelID);panelID="#edrawings-sheet-tree-menu";l_generators[panelID]=new eDwUISheetTreeHTMLGenerator(iViewer,panelID);panelID="#edrawings-layer-control-menu";l_generators[panelID]=new eDwUILayerHTMLGenerator(iViewer,panelID);panelID="#edrawings-tables-menu";l_generators[panelID]=new eDwUITableHTMLGenerator(iViewer,panelID);panelID="#edrawings-config-navigation";l_generators[panelID]=new eDwUIModelViewHTMLGenerator(iViewer,panelID);panelID="#edrawings-configurations-menu";l_generators[panelID]=new eDwUIModelViewHTMLGenerator(iViewer,panelID);panelID="#edrawings-config-tab-list";l_generators[panelID]=new eDwUIModelViewTabHTMLGenerator(iViewer,panelID);panelID="#edrawings-debug-menu";l_generators[panelID]=new eDwUIDebugHTMLGenerator(iViewer,panelID);panelID="#edrawings-annot-control-menu";l_generators[panelID]=new eDwUIAnnotHTMLGenerator(iViewer,panelID);panelID="#edrawings-markup-menu";l_generators[panelID]=new eDwUIMarkupHTMLGenerator(iViewer,panelID);panelID="#edrawings-measure-menu";l_generators[panelID]=new eDwUIMeasureHTMLGenerator(iViewer,panelID)}exports.createUIGenerators=createUIGenerators;function getUIGenerator(iName){return l_generators[iName]}exports.getUIGenerator=getUIGenerator;function getUIPanelID(iTarget){var panelJQ=iTarget.closest(".edrawings-submenu");return panelJQ?"#"+panelJQ[0].id:""}exports.getUIPanelID=getUIPanelID;function updateUI(iViewer,iModelView){return __awaiter(this,void 0,void 0,function(){function regenList(iList,iHTML){iList.empty();iList.append(iHTML)}var list,gen,listHTML,list,gen,modelViews,_i,modelViews_9,modelView;return __generator(this,function(_a){switch(_a.label){case 0:if(!iViewer)return[3,7];return[4,l_populateLayerPanel(iViewer)];case 1:_a.sent();return[4,populateModelViewPanel(iViewer,"#edrawings-configurations-menu","config-tree-text")];case 2:_a.sent();if(iViewer.ViewerFeatureOpts.Debug)l_populateDebugPanel(iViewer);if(!iViewer.ViewerFeatureOpts.Annot)return[3,4];return[4,l_populateAnnotPanel(iViewer)];case 3:_a.sent();_a.label=4;case 4:if(!iViewer.TableMgr.numTables())return[3,6];return[4,l_populateTablesPanel(iViewer)];case 5:_a.sent();_a.label=6;case 6:if(iModelView){if(iModelView.Category==="config"){list=$("#edrawings-component-tree-menu .edrawings-submenu-list");gen=getUIGenerator("#edrawings-component-tree-menu");regenList(list,gen.generateHTMLForChildNodes(iModelView.Hierarchy,false))}else{listHTML="";list=$("#edrawings-sheet-tree-menu .edrawings-submenu-list");gen=getUIGenerator("#edrawings-sheet-tree-menu");modelViews=iViewer.getModel().getModelViews();for(_i=0,modelViews_9=modelViews;_i0){var viewTab=targetSpans.filter(iFilter);if(viewTab.length>0){viewTab.parent().addClass(iTargetClass)}}}exports.updateModelViewTargets=updateModelViewTargets;function activatePanelResizeInput(iPanelID,iInputEventIDSuffix,iHandlers){var mouseDown="mousedown"+iInputEventIDSuffix;var mouseMove="mousemove"+iInputEventIDSuffix;var mouseUp="mouseup"+iInputEventIDSuffix;$(document).on(mouseDown,".edrawings-menu-resizer",function(iEvent){var msg="Panel resize: "+mouseDown;console.debugLog("UIPanelResize",msg);iEvent.preventDefault();var origMouseX=iEvent.clientX;var origMenuWidth=$(iPanelID).width();$(document).on(mouseMove,function(iEvent){var pressedLMB=eDwKeyMgr.get().isLMBPressed(iEvent);var msg="Panel resize LMB "+mouseMove+": ";msg+=pressedLMB?"true":"false";console.debugLog("UIPanelResize",msg);if(!pressedLMB)return;iEvent.preventDefault();iHandlers.onResizePanel(iEvent,iPanelID,origMouseX,origMenuWidth);iEvent.stopImmediatePropagation()});iEvent.stopImmediatePropagation()});$(document).on(mouseUp,function(iEvent){var msg="Panel resize: "+mouseUp;console.debugLog("UIPanelResize",msg);iEvent.preventDefault();$(document).off(mouseMove)})}exports.activatePanelResizeInput=activatePanelResizeInput;function deactivateMoveInput(iInputEventIDSuffix){$(document).off("mousemove"+iInputEventIDSuffix);$(document).off("mousedown"+iInputEventIDSuffix);$(document).off("mouseup"+iInputEventIDSuffix)}exports.deactivateMoveInput=deactivateMoveInput;function loadComponentHTML(iViewerOpts){l_loadContextMenu();l_loadSheetTreePanel();l_loadLayerPanel();l_loadAnnotPanel();l_loadTablesPanel();l_loadDebugPanel();if(iViewerOpts.Tree){l_loadComponentTreePanel()}l_loadConfigPanel();if(iViewerOpts.Measure){l_loadMeasurePanel()}l_loadMarkupPanel();eDwEventMgr.get().fireEvents("LoadUIPanel")}exports.loadComponentHTML=loadComponentHTML;function inhibitEventBehavior(iEvent){iEvent.preventDefault();iEvent.stopPropagation()}exports.inhibitEventBehavior=inhibitEventBehavior;function getCurrentMeasureMode(){var vertexEnabled=l_isActive("#edrawings-measure-vertex-button")?eDwTypes_24.MeasureMode.VERTEX:0;var edgeEnabled=l_isActive("#edrawings-measure-edge-button")?eDwTypes_24.MeasureMode.EDGE:0;var faceEnabled=l_isActive("#edrawings-measure-face-button")?eDwTypes_24.MeasureMode.FACE:0;var holeEnabled=l_isActive("#edrawings-measure-hole-button")?eDwTypes_24.MeasureMode.HOLE:0;return vertexEnabled|edgeEnabled|faceEnabled|holeEnabled}exports.getCurrentMeasureMode=getCurrentMeasureMode;function syncMeasureModeUI(iMeasureMgr){function setMeasureButton(iID,iMeasureModes,iTargetModes){var method=iMeasureModes&iTargetModes?"addClass":"removeClass";$(iID)[method]("active-button")}$("#edrawings-measure-distant-unit").val(iMeasureMgr.getDistanceUnit());$("#edrawings-measure-angle-unit").val(iMeasureMgr.getAngleUnit());var measureMode=iMeasureMgr.getMeasureMode();setMeasureButton("#edrawings-measure-vertex-button",measureMode,eDwTypes_24.MeasureMode.VERTEX);setMeasureButton("#edrawings-measure-edge-button",measureMode,eDwTypes_24.MeasureMode.EDGE);setMeasureButton("#edrawings-measure-face-button",measureMode,eDwTypes_24.MeasureMode.FACE)}exports.syncMeasureModeUI=syncMeasureModeUI;function getCurrentMarkupMode(){if(l_isActive("#edrawings-markup-text-button"))return eDwTypes_24.MarkupMode.Text;if(l_isActive("#edrawings-markup-circle-button"))return eDwTypes_24.MarkupMode.Circle;if(l_isActive("#edrawings-markup-rectangle-button")){return eDwTypes_24.MarkupMode.Rectangle}if(l_isActive("#edrawings-markup-polyline-button")){return eDwTypes_24.MarkupMode.Polyline}if(l_isActive("#edrawings-markup-bezier-button"))return eDwTypes_24.MarkupMode.Bezier;if(l_isActive("#edrawings-markup-image-button"))return eDwTypes_24.MarkupMode.Image;return eDwTypes_24.MarkupMode.None}exports.getCurrentMarkupMode=getCurrentMarkupMode;function syncMarkupModeUI(iMarkupMgr){function setMarkupButton(iID,iMeasureModes,iTargetModes){var method=iMeasureModes===iTargetModes?"addClass":"removeClass";$(iID)[method]("active-button")}var markupmode=iMarkupMgr.getMarkupMode();setMarkupButton("#edrawings-markup-text-button",markupmode,eDwTypes_24.MarkupMode.Text);setMarkupButton("#edrawings-markup-rectangle-button",markupmode,eDwTypes_24.MarkupMode.Rectangle);setMarkupButton("#edrawings-markup-circle-button",markupmode,eDwTypes_24.MarkupMode.Circle);setMarkupButton("#edrawings-markup-polyline-button",markupmode,eDwTypes_24.MarkupMode.Polyline)}exports.syncMarkupModeUI=syncMarkupModeUI;function populateModelViewPanel(iViewer,iPanelUIID,iTextClass){return __awaiter(this,void 0,void 0,function(){var listModelViewMenu,gen,_a,_b;return __generator(this,function(_c){switch(_c.label){case 0:listModelViewMenu=$(iPanelUIID+" .edrawings-submenu-list");listModelViewMenu.empty();gen=getUIGenerator(iPanelUIID);_b=(_a=listModelViewMenu).append;return[4,gen.generateHTML(iTextClass)];case 1:_b.apply(_a,[_c.sent()]);return[2]}})})}exports.populateModelViewPanel=populateModelViewPanel;function populateModelViewTabs(iViewer){var panelUIID="#edrawings-config-tab-list";var modelViewTabs=$(panelUIID);modelViewTabs.empty();var gen=getUIGenerator(panelUIID);modelViewTabs.append(gen.generateHTML(""))}exports.populateModelViewTabs=populateModelViewTabs;function getText(iElement){return $(iElement).text().trim()}exports.getText=getText;function getTarget(iTarget){return iTarget.hasClass("config-tab-text")?iTarget.parent():iTarget}exports.getTarget=getTarget;function getSpanText(iTarget){var target=getTarget(iTarget);if(!target.is("span")){target=target.find("span")}if(!target||!target.length)return"";return target[0].innerText}exports.getSpanText=getSpanText;function loadPanel(iElemOrClassID,iPanelHTML){return __awaiter(this,void 0,void 0,function(){var iExcp_14;return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,2,,3]);return[4,eDwServiceMgr.get().load(iElemOrClassID,iPanelHTML)];case 1:_a.sent();return[3,3];case 2:iExcp_14=_a.sent();console.debugLog("PanelLoad","Failed to load "+iPanelHTML+": "+iExcp_14.message);return[3,3];case 3:return[2]}})})}exports.loadPanel=loadPanel;function hide(iSelector,iOff){var selJQ=$(iSelector);selJQ[iOff?"addClass":"removeClass"]("edrawings-ui-hide");return selJQ}exports.hide=hide;function getCSSContent(iJQElem){if(iJQElem){return iJQElem.css("content").replace(/^['"]+|\s+|\\|(;\s?})+|['"]$/g,"")}return""}exports.getCSSContent=getCSSContent;function getRequestedQueryStringParams(iURL,ioViewerFeatOpts,iWarnOfOtherParams){if(iWarnOfOtherParams===void 0){iWarnOfOtherParams=true}var hashes=iURL.slice(iURL.indexOf("?")+1).split("&");for(var i=0;i1){var strVal=hash[1];var val=strVal==="true"?true:strVal==="false"?false:strVal;if(ioViewerFeatOpts.hasOwnProperty(hash[0])){ioViewerFeatOpts[hash[0]]=val}else if(iWarnOfOtherParams){console.warn(hash[0]+" is not a valid query parameter.")}}}}exports.getRequestedQueryStringParams=getRequestedQueryStringParams;function getScrollParent(iTargetJQ){return iTargetJQ&&iTargetJQ.scrollParent?iTargetJQ.scrollParent():null}exports.getScrollParent=getScrollParent;function getPosition(iTargetJQ){var ret={top:0,left:0};if(iTargetJQ)ret=iTargetJQ.position();return ret}exports.getPosition=getPosition;function scrollToTarget(iTargetJQ,iPos,iAnimationSpeed,iStartPos){if(iAnimationSpeed===void 0){iAnimationSpeed="slow"}if(iStartPos===void 0){iStartPos="scrollTop"}if(!iTargetJQ)return;if(iAnimationSpeed==="none"){iTargetJQ[iStartPos](iPos)}else{iTargetJQ.animate((_a={},_a[iStartPos]=iPos,_a),iAnimationSpeed)}var _a}exports.scrollToTarget=scrollToTarget;var l_generators={};function l_loadContextMenu(){var _this=this;(function(){return __awaiter(_this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return[4,loadPanel("#edrawings-context-menu","contextmenu.html")];case 1:_a.sent();return[2]}})})})()}function l_loadSheetTreePanel(){var _this=this;(function(){return __awaiter(_this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return[4,loadPanel("#edrawings-sheet-tree-menu","sheetspanel.html")];case 1:_a.sent();return[2]}})})})()}function l_loadLayerPanel(){var _this=this;(function(){return __awaiter(_this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return[4,loadPanel("#edrawings-layer-control-menu","layerspanel.html")];case 1:_a.sent();return[2]}})})})()}function l_loadAnnotPanel(){var _this=this;(function(){return __awaiter(_this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return[4,loadPanel("#edrawings-annot-control-menu","annotpanel.html")];case 1:_a.sent();return[2]}})})})()}function l_loadTablesPanel(){var _this=this;(function(){return __awaiter(_this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return[4,loadPanel("#edrawings-tables-menu","tablespanel.html")];case 1:_a.sent();return[2]}})})})()}function l_loadDebugPanel(){var _this=this;(function(){return __awaiter(_this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return[4,loadPanel("#edrawings-debug-menu","debugpanel.html")];case 1:_a.sent();return[2]}})})})()}function l_loadComponentTreePanel(){var _this=this;(function(){return __awaiter(_this,void 0,void 0,function(){var viewerFeatOpts;return __generator(this,function(_a){switch(_a.label){case 0:return[4,loadPanel("#edrawings-component-tree-menu","componentpanel.html")];case 1:_a.sent();viewerFeatOpts={Exp:false};getRequestedQueryStringParams(location.href,viewerFeatOpts,false);if(viewerFeatOpts.Exp){hide("#edrawings-component-tree-menu .edrawings-menu-info",false)}return[2]}})})})()}function l_loadConfigPanel(){var _this=this;(function(){return __awaiter(_this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return[4,loadPanel("#edrawings-configurations-menu","configpanel.html")];case 1:_a.sent();return[2]}})})})()}function l_loadMeasurePanel(){var _this=this;(function(){return __awaiter(_this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return[4,loadPanel("#edrawings-measure-menu","measurepanel.html")];case 1:_a.sent();return[2]}})})})()}function l_loadMarkupPanel(){var _this=this;(function(){return __awaiter(_this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return[4,loadPanel("#edrawings-markup-menu","markuppanel.html")];case 1:_a.sent();return[2]}})})})()}function m_makePair(iFirst,iSecond){return{First:iFirst,Second:iSecond}}function l_isActive(iID){return $(iID).hasClass("active-button")}function l_getAllDisplayStateCSSClasses(iHierNode){var classes="";for(var displayState in eDwNodeAttributes_2.NodeDisplayState){classes+="edrawings-"+iHierNode.Category+"-"+displayState.toLowerCase()+" "}return classes}function l_populatePanel(iViewer,iCategoryName,iListID,iPanelUIID,iAdditionalClasses){if(iAdditionalClasses===void 0){iAdditionalClasses=""}return __awaiter(this,void 0,void 0,function(){var activeModelView,nodes,list,gen,_a,_b;return __generator(this,function(_c){switch(_c.label){case 0:activeModelView=iViewer.getModel().getActiveModelView();if(!activeModelView||!activeModelView.Hierarchy)return[2];nodes=activeModelView.Hierarchy.findNodes("Category",iCategoryName);list=$(iListID);list.empty();gen=getUIGenerator(iPanelUIID);_b=(_a=list).append;return[4,gen.generateHTML(iAdditionalClasses)];case 1:_b.apply(_a,[_c.sent()]);return[2]}})})}function l_populateAnnotPanel(iViewer){return __awaiter(this,void 0,void 0,function(){var activeModelView,list,gen,_a,_b;return __generator(this,function(_c){switch(_c.label){case 0:activeModelView=iViewer.getModel().getActiveModelView();if(!activeModelView||!activeModelView.Hierarchy)return[2];list=$("#edrawings-annot-control-list");list.empty();gen=getUIGenerator("#edrawings-annot-control-menu");_b=(_a=list).append;return[4,gen.generateHTML("")];case 1:_b.apply(_a,[_c.sent()]);return[2]}})})}function l_populateLayerPanel(iViewer){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return[4,l_populatePanel(iViewer,"layer","#edrawings-layer-control-list","#edrawings-layer-control-menu")];case 1:_a.sent();return[2]}})})}function l_populateTablesPanel(iViewer){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return[4,l_populatePanel(iViewer,"table","#edrawings-tables-control-list","#edrawings-tables-menu")];case 1:_a.sent();return[2]}})})}function l_populateDebugPanel(iViewer){var list=$("#edrawings-debug-menu .edrawings-submenu-list");list.empty();var gen=getUIGenerator("#edrawings-debug-menu");var modelView=iViewer.getModel().getActiveModelView();list.append(gen.generateHTMLForChildNodes(modelView.Hierarchy.HOOPSID,false))}});define("eDwView",["require","exports","eDwSelMgr","eDwMeasureMgr","eDwMarkupMgr","eDwXSectionMgr","eDwViewMgr","eDwTimer","eDwOperatorMgr","eDwCompXformMgr","eDwEventMgr","eDwHistoryMgr","eDwModel","eDwTypes","eDwMBDNoteMgr","eDwTouchOpsMgr","eDwTableMgr","eDrawingsBase"],function(require,exports,eDwSelMgr,eDwMeasureMgr,eDwMarkupMgr,eDwXSectionMgr,eDwViewMgr,eDwTimer,eDwOperatorMgr,eDwCompXformMgr,eDwEventMgr,eDwHistoryMgr,eDwModel,eDwTypes_25,eDwMBDNoteMgr,eDwTouchOpsMgr,eDwTableMgr){"use strict";var eDwView=function(){function eDwView(iViewerInfo,iFeatureOptions){this.mElemID=iViewerInfo.containerId;this.HCViewer=new eDwTypes_25.HC.WebViewer(iViewerInfo);this.mTimer=new eDwTimer;this.ViewerFeatureOpts=iFeatureOptions;this.mDrawMode=iFeatureOptions.RenderType;this.OperatorMgr=new eDwOperatorMgr(this);this.TableMgr=new eDwTableMgr(this);var streamAll=this.HCViewer.getStreamingMode()===eDwTypes_25.HC.StreamingMode.All;var timeBeforeTimeout=streamAll?14400:120;var timeBeforeWarnTimeout=timeBeforeTimeout-10;this.HCViewer.setClientTimeout(timeBeforeTimeout,timeBeforeWarnTimeout);this.mFitCamera=null;this.mModelKey=iViewerInfo.model;this.setupWebViewer()}eDwView.prototype.getHCView=function(){return this.HCViewer.getView()};eDwView.prototype.getModel=function(){if(!this.mModel){this.mModel=new eDwModel(this)}return this.mModel};eDwView.prototype.processProductStructure=function(){this.MBDNoteMgr=new eDwMBDNoteMgr(this);this.mFitCamera=this.getHCView().getCamera();var bbox=this.mModel.getBoundingBox();if(bbox.extents().equals(eDwTypes_25.HC.Point3.zero())){this.mModel.calculateBoundingBox()}$("#"+this.mElemID).trigger("edw:AddViewerEvents",this);this.finishInit()};eDwView.prototype.setupWebViewer=function(){var _this=this;var processingSelection=false;var eventMgr=eDwEventMgr.get();this.mHCCallbacksObj={sceneReady:function(){console.debugLog("ViewerLoad","Scene ready");_this.HCViewer.resizeCanvas()},streamingActivated:function(){console.debugLog("Viewer","Streaming activated")},streamingDeactivated:function(){var streamMode=_this.HCViewer.getStreamingMode();if(streamMode===eDwTypes_25.HC.StreamingMode.All){setTimeout(function(){console.debugLog("Viewer","Streaming finished. Closing connection...");_this.HCViewer.closeConnection()},5e3)}console.debugLog("Viewer","Streaming deactivated")},selection:function(iSelEvent){if(!processingSelection){processingSelection=true;try{_this.SelectionMgr.onSelection(iSelEvent)}catch(iException){}processingSelection=false}},timeoutWarning:function(iRemainingMinutes){console.debugLog("Viewer","Inactivity timeout pending in "+iRemainingMinutes+" minutes.");_this.mTimer.ellapsed();_this.mTimer.dumpToConsole()},timeout:function(){console.debugLog("Viewer","Inactivity timeout");_this.mTimer.ellapsed();_this.mTimer.dumpToConsole();eventMgr.fireEvents("Timeout",_this)},modelLoadFailure:function(iModelName,iReason){console.warn("Model "+iModelName+" load failed: "+iReason);eventMgr.fireEvents("ModelLoadFailure",_this,iModelName,iReason)},deprecated:function(iDeprecatedFuncName){console.debugLog("Debug",iDeprecatedFuncName)},info:function(iInfoType,iMsg){console.debugLog("Debug",iInfoType.toString()+" "+iMsg)},missingModel:function(iModelPath){console.debugLog("Debug","Missing model: "+iModelPath)},webGlContextLost:function(){console.debugLog("Debug","Browser lost GL context! Render incomplete!!")},click:function(iMousePos,iEvent){console.debugLog("Debug","Mouse clicked")},modelStructureReady:function(){console.debugLog("ViewerLoad","Model structure ready.");$("#"+_this.mElemID).trigger("edw:ModelLoaded",_this)},modelSwitched:function(){console.debugLog("ViewerLoad","Model switch done.");$("#"+_this.mElemID).trigger("edw:ModelLoaded",_this)},viewCreated:function(iView){eventMgr.fireEvents("ViewCreated",iView)},viewLoaded:function(iView){eventMgr.fireEvents("ViewLoaded",iView)},viewDeleted:function(iView){eventMgr.fireEvents("ViewDeleted",iView)},camera:function(iCamera){eventMgr.fireEvents("CameraChange",iCamera)}};this.HCViewer.setCallbacks(this.mHCCallbacksObj);this.HCViewer.start()};eDwView.prototype.getInitCamera=function(){return this.mFitCamera};eDwView.prototype.getCurrModelKey=function(){return this.mModelKey};eDwView.prototype.unregister=function(){if(this.HCViewer)this.HCViewer.unsetCallbacks(this.mHCCallbacksObj);this.OperatorMgr.unregisterAll();eDwEventMgr.get().fireEvents("Done",this)};eDwView.prototype.destroy=function(){this.HCViewer.shutdown()};eDwView.prototype.setExplosionLevel=function(iLevel){this.HCViewer.getExplodeManager().setMagnitude(iLevel);eDwEventMgr.get().fireEvents("ExplodeLevelChange",this,iLevel)};eDwView.prototype.getExplosionLevel=function(){return this.HCViewer.getExplodeManager().getMagnitude()};eDwView.prototype.getDrawMode=function(){return this.mDrawMode};eDwView.prototype.setDrawMode=function(iValue){var view=this.getHCView();var settings=view.getHiddenLineSettings();switch(iValue){case"ShadedWithEdges":view.setDrawMode(eDwTypes_25.HC.DrawMode.WireframeOnShaded);this.SelectionMgr.setColorForViewMode(eDwTypes_25.HC.DrawMode.WireframeOnShaded);break;case"Shaded":view.setDrawMode(eDwTypes_25.HC.DrawMode.Shaded);this.SelectionMgr.setColorForViewMode(eDwTypes_25.HC.DrawMode.Shaded);break;case"HiddenLinesRemoved":settings.setObscuredLineTransparency(0);view.setDrawMode(eDwTypes_25.HC.DrawMode.HiddenLine);this.SelectionMgr.setColorForViewMode(eDwTypes_25.HC.DrawMode.HiddenLine);break;case"HiddenLinesVisible":settings.setObscuredLineTransparency(.5);view.setDrawMode(eDwTypes_25.HC.DrawMode.HiddenLine);this.SelectionMgr.setColorForViewMode(eDwTypes_25.HC.DrawMode.HiddenLine);break;case"Wireframe":settings.setObscuredLineTransparency(1);view.setDrawMode(eDwTypes_25.HC.DrawMode.HiddenLine);this.SelectionMgr.setColorForViewMode(eDwTypes_25.HC.DrawMode.HiddenLine);break;default:throw new Error("Unknown draw mode: "+iValue)}this.mDrawMode=iValue;eDwEventMgr.get().fireEvents("DrawModeChange",this,iValue)};eDwView.prototype.getPerspectiveMode=function(){return this.getHCView().getProjectionMode()===eDwTypes_25.HC.Projection.Perspective};eDwView.prototype.setPerspectiveMode=function(iValue){if(!iValue){this.getHCView().setProjectionMode(eDwTypes_25.HC.Projection.Orthographic)}else{this.getHCView().setProjectionMode(eDwTypes_25.HC.Projection.Perspective)}eDwEventMgr.get().fireEvents("ProjModeChange",this,iValue);return iValue};eDwView.prototype.resetDrawMode=function(){this.setDrawMode(this.ViewerFeatureOpts.RenderType)};eDwView.prototype.initializeManagers=function(){new eDwSelMgr(this);new eDwMeasureMgr(this);new eDwMarkupMgr(this);new eDwXSectionMgr(this);new eDwViewMgr(this);new eDwCompXformMgr(this);if(eDwTouchOpsMgr.isTouchEnabled()&&this.ViewerFeatureOpts.Exp){new eDwTouchOpsMgr(this)}};eDwView.prototype.drawDebugBoundingBox=function(bbox){return __awaiter(this,void 0,void 0,function(){var modelHC,beautifulGreen,width,height,length,vmin,vmax,p0,p1,p2,p3,p4,p5,p6,p7,polylineData0,polylineData1,polylineData2,polylineData3,rgba,i,tmp,boxMesh,key,meshInstance;return __generator(this,function(_a){switch(_a.label){case 0:modelHC=this.getModel().getHCModel();beautifulGreen=new Communicator.Color(0,255,0);width=bbox.max.x-bbox.min.x;height=bbox.max.y-bbox.min.y;length=Math.max(width,height);vmin=bbox.min;vmax=bbox.max;p0=new Communicator.Point3(vmin.x,vmin.y,vmax.z);p1=new Communicator.Point3(vmin.x,vmax.y,vmax.z);p2=new Communicator.Point3(vmax.x,vmax.y,vmax.z);p3=new Communicator.Point3(vmax.x,vmin.y,vmax.z);p4=new Communicator.Point3(vmin.x,vmin.y,vmin.z);p5=new Communicator.Point3(vmin.x,vmax.y,vmin.z);p6=new Communicator.Point3(vmax.x,vmax.y,vmin.z);p7=new Communicator.Point3(vmax.x,vmin.y,vmin.z);polylineData0=[p0.x,p0.y,p0.z,p1.x,p1.y,p1.z,p2.x,p2.y,p2.z,p3.x,p3.y,p3.z,p0.x,p0.y,p0.z];polylineData1=[p4.x,p4.y,p4.z,p5.x,p5.y,p5.z,p6.x,p6.y,p6.z,p7.x,p7.y,p7.z,p4.x,p4.y,p4.z];polylineData2=[p4.x,p4.y,p4.z,p0.x,p0.y,p0.z,p1.x,p1.y,p1.z,p5.x,p5.y,p5.z,p4.x,p4.y,p4.z];polylineData3=[p7.x,p7.y,p7.z,p3.x,p3.y,p3.z,p2.x,p2.y,p2.z,p6.x,p6.y,p6.z,p7.x,p7.y,p7.z];rgba=[];for(i=0;i<5;i++){tmp=[beautifulGreen.r,beautifulGreen.g,beautifulGreen.b,255];rgba=rgba.concat(tmp)}boxMesh=new Communicator.MeshData;boxMesh.addPolyline(polylineData0,rgba);boxMesh.addPolyline(polylineData1,rgba);boxMesh.addPolyline(polylineData2,rgba);boxMesh.addPolyline(polylineData3,rgba);return[4,modelHC.createMesh(boxMesh)];case 1:key=_a.sent();meshInstance=new Communicator.MeshInstanceData(key);return[2,modelHC.createMeshInstance(meshInstance)]}})})};eDwView.prototype.finishInit=function(){eDwEventMgr.get().fireEvents("Init",this);this.mModel.notifyDataChange(this.mModel.getActiveModelView());this.HCViewer.enableBackgroundSheet(false);eDwHistoryMgr.get().clear()};return eDwView}();return eDwView});define("eDwViewMgr",["require","exports","eDwEventMgr","eDwTypes","eDrawingsBase"],function(require,exports,eDwEventMgr,eDwTypes_26){"use strict";var eDwViewMgr=function(){function eDwViewMgr(iViewer){if(!iViewer)throw new Error("Must have viewer object");iViewer.ViewMgr=this;this.mViewAnimationIndex=0;this.mViewAnimationActive=false;this.mAnimationTimeOutID=-1;this.mViewer=iViewer}eDwViewMgr.prototype.start=function(){if(this.mViewer.getModel().isDrawing())return;eDwEventMgr.get().fireEvents("StartAnimation",this.mViewer);this.mViewAnimationActive=true;this.animateNextView()};eDwViewMgr.prototype.stop=function(){this.mViewAnimationActive=false;if(this.mAnimationTimeOutID>-1){window.clearTimeout(this.mAnimationTimeOutID);this.mAnimationTimeOutID=-1}eDwEventMgr.get().fireEvents("StopAnimation",this.mViewer)};eDwViewMgr.prototype.isActive=function(){return this.mViewAnimationActive};eDwViewMgr.prototype.setViewOrientation=function(iEyeDir,iDuration){if(iDuration===void 0){iDuration=400}var center=this.mViewer.getModel().getBoundingBox().center();var viewHC=this.mViewer.getHCView();var camera=viewHC.getCamera().copy();var pos=camera.getPosition().copy();var target=camera.getTarget();var up=camera.getUp();pos=pos.subtract(target);var dist=pos.length();switch(iEyeDir){case Communicator.ViewOrientation.Front:pos.set(0,0,1).scale(dist).add(center);up.set(0,1,0);break;case Communicator.ViewOrientation.Back:pos.set(0,0,-1).scale(dist).add(center);up.set(0,1,0);break;case Communicator.ViewOrientation.Left:pos.set(-1,0,0).scale(dist).add(center);up.set(0,1,0);break;case Communicator.ViewOrientation.Right:pos.set(1,0,0).scale(dist).add(center);up.set(0,1,0);break;case Communicator.ViewOrientation.Top:pos.set(0,1,0).scale(dist).add(center);up.set(0,0,-1);break;case Communicator.ViewOrientation.Bottom:pos.set(0,-1,0).scale(dist).add(center);up.set(0,0,1);break;case Communicator.ViewOrientation.Iso:pos.set(1,1,1).normalize().scale(dist).add(center);up.set(-.408204,.816541,-.408204);break;default:throw new Error("Unsupported orientation: "+iEyeDir)}camera.setPosition(pos);camera.setTarget(center);camera.setUp(up);viewHC.fitWorld(iDuration,camera);return camera};eDwViewMgr.prototype.setViewOrientationToDirection=function(normal){var camera=this.mViewer.getHCView().getCamera();var position=camera.getPosition();var target=camera.getTarget();var up=camera.getUp();var delta=target.subtract(position);var distance=delta.length();var bbox=this.mViewer.getModel().getBoundingBox();var bbox_min=bbox.min;var bbox_max=bbox.max;target=Communicator.Point3.add(bbox_max,bbox_min).scale(.5);var eyeVec=Communicator.Point3.scale(normal,distance);position=Communicator.Point3.add(target,eyeVec);var vTest=new Communicator.Point3(1,0,0);var isParallel=Communicator.Point3.dot(vTest,normal);if(Math.abs(Math.abs(isParallel)-1)<.001){vTest.set(0,1,0);var vec=Communicator.Point3.cross(normal,vTest);vec=vec.normalize();up=Communicator.Point3.cross(vec,normal);up=up.normalize()}else{up=Communicator.Point3.cross(normal,vTest);up=up.normalize()}var dotProd=Communicator.Point3.dot(up,new Communicator.Point3(1,0,0));if(Math.abs(Math.abs(dotProd)-1)<.001&&dotProd<0){up=up.negate()}dotProd=Communicator.Point3.dot(up,new Communicator.Point3(0,1,0));if(Math.abs(Math.abs(dotProd)-1)<.001&&dotProd<0){up=up.negate()}dotProd=Communicator.Point3.dot(up,new Communicator.Point3(0,0,1));if(Math.abs(Math.abs(dotProd)-1)<.001&&dotProd<0){up=up.negate()}camera.setPosition(position);camera.setTarget(target);camera.setUp(up);this.setCamera(camera,500);return camera};eDwViewMgr.prototype.setCamera=function(iCamera,iTimeInMS){if(iTimeInMS===void 0){iTimeInMS=400}this.mViewer.getHCView().setCamera(iCamera,iTimeInMS)};eDwViewMgr.prototype.enableAmbientOcclusion=function(iEnable){this.mViewer.getHCView().setAmbientOcclusionEnabled(iEnable);eDwEventMgr.get().fireEvents("AmbientOcclChange",this,iEnable)};eDwViewMgr.prototype.fitScreenToNodes=function(iNodeHCIDs,ioCamera){return __awaiter(this,void 0,void 0,function(){var modelHC,bbox,subtract,viewVec,center,add,ratio,boxMaxLen;return __generator(this,function(_a){switch(_a.label){case 0:if(!ioCamera)return[2];modelHC=this.mViewer.getModel().getHCModel();return[4,modelHC.getNodesBounding(iNodeHCIDs)];case 1:bbox=_a.sent();subtract=eDwTypes_26.HC.Point3.subtract;viewVec=subtract(ioCamera.getPosition(),ioCamera.getTarget());center=bbox.center().copy();ioCamera.setTarget(center);add=eDwTypes_26.HC.Point3.add;ioCamera.setPosition(add(center,viewVec));ratio=ioCamera.getWidth()/ioCamera.getHeight();if(this.mViewer.getModel().isDrawing()){bbox.min.z=bbox.max.z=0}boxMaxLen=bbox.extents().length();ioCamera.setHeight(boxMaxLen);ioCamera.setWidth(boxMaxLen*ratio);this.setCamera(ioCamera,400);return[2]}})})};eDwViewMgr.prototype.onCameraUpdate=function(){this.mViewAnimationIndex+=1;if(this.mViewAnimationIndex>=eDwViewMgr.viewAnimations.length){this.mViewAnimationIndex=0;this.mViewAnimationActive=false;this.stop()}if(this.mViewAnimationActive){this.animateNextView()}};eDwViewMgr.prototype.animateNextView=function(){var _this=this;if(this.mViewAnimationActive){this.setViewOrientation(eDwViewMgr.viewAnimations[this.mViewAnimationIndex],2e3);var self_1=this;this.mAnimationTimeOutID=window.setTimeout(function(){_this.onCameraUpdate()},2e3)}};eDwViewMgr.viewAnimations=[Communicator.ViewOrientation.Front,Communicator.ViewOrientation.Back,Communicator.ViewOrientation.Left,Communicator.ViewOrientation.Right,Communicator.ViewOrientation.Bottom,Communicator.ViewOrientation.Top,Communicator.ViewOrientation.Iso];return eDwViewMgr}();return eDwViewMgr});define("eDwXSectionMgr",["require","exports","eDwXSectionOperator","eDwGeomUtils","eDwTypes","eDwTypes","eDrawingsBase"],function(require,exports,eDwXSectionOperator,eDwGeomUtils,eDwTypes_27,eDwTypes_28){"use strict";var cSectionCapFaceColor=new eDwTypes_28.HC.Color(128,128,128);var cSectionCapOutlineColor=new eDwTypes_28.HC.Color(255,0,0);var eDwXSectionMgr=function(){function eDwXSectionMgr(iViewer){iViewer.XSectionMgr=this;this.mViewer=iViewer;var xSectionOp=new eDwXSectionOperator(iViewer);this.mXSectionOpID=iViewer.OperatorMgr.registerCustomOperator(xSectionOp);this.HCXSectionMgr=iViewer.HCViewer.getCuttingManager();this.SectionCapVisibility=false;this.mXSectionIndex=eDwTypes_27.SectionPlaneOrientation.XY.Index}eDwXSectionMgr.prototype.unregister=function(){this.mViewer.OperatorMgr.unregisterCustomOperatorByID(this.mXSectionOpID);this.mViewer.XSectionMgr=null};eDwXSectionMgr.prototype.turnOnSectionPlane=function(iOn){if(this.getHCXSection()){if(iOn){var ret=this.mViewer.OperatorMgr.push(this.mXSectionOpID);console.debugLog("Section","Section plane operator push ret = "+ret);this.HCXSectionMgr.setCappingGeometryVisibility(true)}else{var opID=this.mViewer.OperatorMgr.pop();console.debugLog("Section","Popped op ID = "+opID+" xSection op ID = "+this.mXSectionOpID)}}};eDwXSectionMgr.prototype.activateCurrent=function(){this.getHCXSection().activate()};eDwXSectionMgr.prototype.deactivateCurrent=function(){this.getHCXSection().deactivate()};eDwXSectionMgr.prototype.isCurrentActive=function(){return this.getHCXSection().isActive()};Object.defineProperty(eDwXSectionMgr.prototype,"SectionIndex",{get:function(){return this.mXSectionIndex},enumerable:true,configurable:true});eDwXSectionMgr.prototype.setSectionPlane=function(ioSection,iAllowActivation){if(iAllowActivation===void 0){iAllowActivation=true}return __awaiter(this,void 0,void 0,function(){var bbox,bboxExtents,needsActivation,sectionHC,numActive,boxCenter,sectionPlane,minPlanePt,maxPlanePt,vec,centerPt,dir,mirrorPlaneNormal,mirrorPlane,maxOnPlnPt,minOnPlnPt,mirrorPlaneDist,distDir,revDistDir,pts;return __generator(this,function(_a){switch(_a.label){case 0:return[4,this.mViewer.getModel().calculateBoundingBox()];case 1:bbox=_a.sent();bboxExtents=bbox.extents();if(!ioSection||bboxExtents.equals(eDwTypes_28.HC.Point3.zero()))return[2];needsActivation=false;sectionHC=this.getHCXSection();if(ioSection.Index!==this.mXSectionIndex){if(sectionHC){needsActivation=sectionHC.isActive();sectionHC.deactivate();this.HCXSectionMgr.refreshPlaneGeometry()}this.mXSectionIndex=ioSection.Index;sectionHC=this.getHCXSection()}numActive=this.HCXSectionMgr.getActiveCuttingSectionCount();boxCenter=bbox.center();if(sectionHC.getCount()<1){sectionPlane=ioSection.Plane.copy();sectionPlane.d=-sectionPlane.distanceToPoint(boxCenter);minPlanePt=eDwGeomUtils.dropPointOnPlane(bbox.min,sectionPlane);maxPlanePt=eDwGeomUtils.dropPointOnPlane(bbox.max,sectionPlane);vec=maxPlanePt.copy().subtract(minPlanePt);vec=vec.scale(.55);centerPt=eDwGeomUtils.dropPointOnPlane(boxCenter,sectionPlane);dir=sectionPlane.normal.copy();centerPt=centerPt.add(dir.scale(sectionPlane.d));mirrorPlaneNormal=eDwTypes_28.HC.Point3.zero();eDwTypes_28.HC.MeasureUtils.oneVectorCross(sectionPlane.normal.copy(),mirrorPlaneNormal);mirrorPlane=eDwTypes_28.HC.Plane.createFromPointAndNormal(centerPt,mirrorPlaneNormal);maxOnPlnPt=eDwTypes_28.HC.Point3.add(centerPt,vec);minOnPlnPt=eDwTypes_28.HC.Point3.add(centerPt,vec.scale(-1));mirrorPlaneDist=mirrorPlane.distanceToPoint(maxOnPlnPt);distDir=mirrorPlaneNormal.copy().scale(2*mirrorPlaneDist);revDistDir=distDir.copy().scale(-1);pts=[];pts.push(minOnPlnPt);pts.push(eDwTypes_28.HC.Point3.add(maxOnPlnPt,revDistDir));pts.push(maxOnPlnPt);pts.push(eDwTypes_28.HC.Point3.add(minOnPlnPt,distDir));sectionHC=this.getHCXSection();sectionHC.addPlane(sectionPlane,pts);sectionHC.setColor(eDwTypes_28.HC.Color.createFromFloat(0,1,0));sectionHC.setTransparency(.3);needsActivation=true}if(sectionHC&&needsActivation&&iAllowActivation){sectionHC.activate()}this.HCXSectionMgr.setStandinGeometryPickable(true);return[2]}})})};eDwXSectionMgr.prototype.flipSectionPlane=function(){var sectionHC=this.getHCXSection();if(!sectionHC)return;var sectionPlane=sectionHC.getPlane(0);if(!sectionPlane)return;sectionPlane.normal.negate();sectionPlane.d=-sectionPlane.d;sectionHC.updatePlane(0,sectionPlane)};eDwXSectionMgr.prototype.setViewToSectionPlane=function(){var sectionHC=this.getHCXSection();if(!sectionHC)return null;var sectionPlane=sectionHC.getPlane(0);if(!sectionPlane)return null;return this.mViewer.ViewMgr.setViewOrientationToDirection(sectionPlane.normal.copy())};eDwXSectionMgr.prototype.moveCurrentAlongNormal=function(iDistVec){var camera=this.mViewer.getHCView().getCamera();var camPosition=camera.getPosition();var camTarget=camera.getTarget();var camUp=camera.getUp();var camZ=camTarget.subtract(camPosition);camZ=camZ.normalize();var camY=camUp.normalize();var camX=eDwTypes_28.HC.Point3.cross(camZ,camY);var realVec=camX.scale(iDistVec.x).add(camY.scale(iDistVec.y)).add(camZ.scale(iDistVec.z));var sectionHC=this.getHCXSection();var sectionPlane=sectionHC.getPlane(0);var normal=sectionPlane.normal.copy();normal=normal.normalize();var distance=eDwTypes_28.HC.Point3.dot(realVec,normal);if(Math.abs(distance)<1e-6)return;sectionPlane.d-=distance;sectionHC.updatePlane(0,sectionPlane)};Object.defineProperty(eDwXSectionMgr.prototype,"SectionCapVisibility",{get:function(){return this.mEnableSectionCaps},set:function(iEnable){this.mEnableSectionCaps=iEnable;this.setSectionCapVisibility(iEnable)},enumerable:true,configurable:true});eDwXSectionMgr.prototype.disableSectionCapVisibility=function(iDisable){this.setSectionCapVisibility(iDisable?false:this.mEnableSectionCaps)};eDwXSectionMgr.prototype.projectPoint=function(iPnt){var sectionHC=this.getHCXSection();var sectionPlane=sectionHC.getPlane(0);return eDwGeomUtils.dropPointOnPlane(iPnt,sectionPlane)};eDwXSectionMgr.prototype.getHCXSection=function(){return this.HCXSectionMgr.getCuttingSection(this.mXSectionIndex)};eDwXSectionMgr.prototype.setSectionCapVisibility=function(iEnable){var enable=iEnable;var drawMode=this.mViewer.getDrawMode();if(drawMode!=="Shaded"&&drawMode!=="ShadedWithEdges"){enable=false}this.HCXSectionMgr.setCappingFaceColor(enable?cSectionCapFaceColor:null);this.HCXSectionMgr.setCappingLineColor(enable?null:cSectionCapOutlineColor)};return eDwXSectionMgr}();return eDwXSectionMgr});define("eDwXSectionOperator",["require","exports","eDwTypes","eDwBaseOperator","eDwCommandMgr","eDwMoveSectionPlaneCmd","eDrawingsBase"],function(require,exports,eDwTypes_29,eDwBaseOperator,eDwCommandMgr,eDwMoveSectionPlaneCmd){"use strict";var eDwXSectionOperator=function(_super){__extends(eDwXSectionOperator,_super);function eDwXSectionOperator(iViewer){return _super.call(this,iViewer)||this}eDwXSectionOperator.prototype.onActivate=function(){_super.prototype.onActivate.call(this);this.mViewer.XSectionMgr.activateCurrent()};eDwXSectionOperator.prototype.onDeactivate=function(){this.mViewer.XSectionMgr.deactivateCurrent();_super.prototype.onDeactivate.call(this)};eDwXSectionOperator.prototype.onMouseDown=function(ioMouseEvent){if(!ioMouseEvent||!this.mViewer.XSectionMgr.isCurrentActive()){ioMouseEvent.setHandled(true);return}var selObj=eDwBaseOperator.getPickResult(ioMouseEvent);var selID=selObj.getNodeId();if(!selObj||selObj.getNodeId()>=0){ioMouseEvent.setHandled(false);return}_super.prototype.onMouseDown.call(this,ioMouseEvent);var sectionMgr=this.mViewer.XSectionMgr;sectionMgr.disableSectionCapVisibility(true);if(selObj){var typeOfSel=selObj.getSelectionType();selObj=typeOfSel===eDwTypes_29.HC.SelectionType.None?null:selObj}ioMouseEvent.setHandled(true);var selNodeID=selObj.getNodeId();if(selNodeID){console.debugLog("Section","sel obj = "+JSON.stringify(selObj));var sectionMgrHC=this.mViewer.XSectionMgr.HCXSectionMgr;if(sectionMgrHC.getCuttingSectionFromNodeId(selNodeID)){this.mSectionDragPt=this.screenToWorld(ioMouseEvent.getPosition())}}if(this.mMoveSectionCmd)this.mMoveSectionCmd.cancel();this.mMoveSectionCmd=new eDwMoveSectionPlaneCmd(this.mViewer)};eDwXSectionOperator.prototype.onMouseMove=function(ioMouseEvent){ioMouseEvent.setHandled(false);var crossSectionMgr=this.mViewer.XSectionMgr;if(!crossSectionMgr.isCurrentActive()){return}if(this.mCurMouse&&this.mSectionDragPt){var coords=ioMouseEvent.getPosition();var current=this.screenToWorld(coords);var delta=eDwTypes_29.HC.Point3.subtract(current,this.mSectionDragPt);this.mViewer.XSectionMgr.moveCurrentAlongNormal(delta);this.mSectionDragPt=current;ioMouseEvent.setHandled(true)}};eDwXSectionOperator.prototype.onMouseUp=function(ioMouseEvent){_super.prototype.onMouseUp.call(this,ioMouseEvent);this.mViewer.XSectionMgr.disableSectionCapVisibility(false);ioMouseEvent.setHandled(false);this.mSectionDragPt=null;var cmdMgr=eDwCommandMgr.get();cmdMgr.add(this.mMoveSectionCmd);cmdMgr.remove(this.mMoveSectionCmd,"commit");this.mMoveSectionCmd=null};eDwXSectionOperator.prototype.onTouchStart=function(ioTouchEvent){var _this=this;this.wrapAndCallAsMouseEvent(ioTouchEvent,eDwTypes_29.HC.MouseInputType.Down,function(ioMouseEvent){_this.onMouseDown(ioMouseEvent)})};eDwXSectionOperator.prototype.onTouchMove=function(ioTouchEvent){var _this=this;this.wrapAndCallAsMouseEvent(ioTouchEvent,eDwTypes_29.HC.MouseInputType.Move,function(ioMouseEvent){_this.onMouseMove(ioMouseEvent)})};eDwXSectionOperator.prototype.onTouchEnd=function(ioTouchEvent){var _this=this;this.wrapAndCallAsMouseEvent(ioTouchEvent,eDwTypes_29.HC.MouseInputType.Up,function(ioMouseEvent){_this.onMouseUp(ioMouseEvent)})};eDwXSectionOperator.prototype.needsSelection=function(iEventType){return iEventType===eDwTypes_29.HC.EventType.MouseDown||iEventType===eDwTypes_29.HC.EventType.TouchStart};eDwXSectionOperator.prototype.screenToWorld=function(iScrPt){var view=this.mViewer.getHCView();var normScrPt=view.pointToWindowPosition(iScrPt);var input=new Communicator.Point3(normScrPt.x,normScrPt.y,0);var projMatrix=view.getProjectionMatrix();projMatrix.m[15]=1;var invMat=Communicator.Matrix.inverse(projMatrix).transpose();var worldPt=new Communicator.Point3(0,0,0);var div=input.x*invMat.m[3]+input.y*invMat.m[7]+input.z*invMat.m[11]+invMat.m[15];worldPt.x=(input.x*invMat.m[0]+input.y*invMat.m[1]+input.z*invMat.m[2]+invMat.m[3])/div;worldPt.y=(input.x*invMat.m[4]+input.y*invMat.m[5]+input.z*invMat.m[6]+invMat.m[7])/div;worldPt.z=(input.x*invMat.m[8]+input.y*invMat.m[9]+input.z*invMat.m[10]+invMat.m[11])/div;return worldPt};return eDwXSectionOperator}(eDwBaseOperator);return eDwXSectionOperator});define("eDwZoomToFitCmd",["require","exports","eDwSupportsHistoryCmd"],function(require,exports,eDwSupportsHistoryCmd){"use strict";var eDwZoomToFitCmd=function(_super){__extends(eDwZoomToFitCmd,_super);function eDwZoomToFitCmd(iViewer,iNodeID,iCamera){var _this=_super.call(this,iViewer)||this;_this.mInitialCamera=iCamera.copy();_this.mFinalCamera=iCamera.copy();_this.mNodeHCID=iNodeID;return _this}eDwZoomToFitCmd.prototype.undo=function(){if(!_super.prototype.undo.call(this))return false;this.mViewer.ViewMgr.setCamera(this.mInitialCamera);return true};eDwZoomToFitCmd.prototype.redo=function(){if(!_super.prototype.redo.call(this))return false;this.mViewer.ViewMgr.setCamera(this.mFinalCamera);return true};eDwZoomToFitCmd.prototype.commit=function(){_super.prototype.commit.call(this);this.mViewer.ViewMgr.fitScreenToNodes([this.mNodeHCID],this.mFinalCamera)};Object.defineProperty(eDwZoomToFitCmd.prototype,"Aggregable",{get:function(){return true},enumerable:true,configurable:true});return eDwZoomToFitCmd}(eDwSupportsHistoryCmd);return eDwZoomToFitCmd});requirejs.config({baseUrl:"./js/3rdParty",paths:{eDrawingsBase:"eDrawingsBase.min",jquery:"jquery-2.1.4.min","jquery-ui":"jquery-ui-1.11.4.min","jquery.fullscreen":"jquery.fullscreen.min","jquery.iframe-transport":"jquery.iframe-transport","jquery.fileupload":"jquery.fileupload","solidworks.web":"solidworks.web"},map:{"jquery.fileupload":{"jquery-ui/ui/widget":"jquery-ui"}},shim:{eDrawingsBase:{deps:["jquery"]},"jquery-ui":{deps:["jquery"]},"jquery.fullscreen":{deps:["jquery"]}}});requirejs(["eDrawingsWebViewer"],function(eDwWebViewer){console.excludeDebugLogCategories=["UIEvents","BaseSelOp","Operator"];eDwWebViewer.start()});define("utils",["require","exports"],function(require,exports){"use strict";Object.defineProperty(exports,"__esModule",{value:true});function forAll(iFunc,iDictionary){if(!iDictionary)return;Object.keys(iDictionary).forEach(function(iKeyString){var key=parseInt(iKeyString,10);iFunc(key,iDictionary[key])})}exports.forAll=forAll;function getUint8Array(iBase64EncodedString){var binString=window.atob(iBase64EncodedString);var len=binString.length;var bytes=new Uint8Array(len);for(var i=0;i