“../modelderivative/v2/viewers/viewer3D.min.js”和“.../viewingservice/v1/viewers/viewer3D.min.js”有什么区别?

What's difference between "../modelderivative/v2/viewers/viewer3D.min.js" and ".../viewingservice/v1/viewers/viewer3D.min.js"?

在使用“https://forge.autodesk.com/blog/using-autodeskviewingmarkupscore-extension”时, 我未能实现 EditModePolycloud 和 EditModePolyline。

在使用“...modelderivative/v2/viewers/viewer3D.min.js”实现折线和多云时,显示错误 "Uncaught TypeError: Autodesk.Viewing.Extensions.Markups.Core.EditModePolyline is not a constructor"

它与 "viewingservice/v1/viewers/viewer3D.min.js"

一起正常工作

为什么 EditModePolyline 和 EditModePolycloud 在“https://developer.api.autodesk.com/modelderivative/v2/viewers/viewer3D.min.js" but in "https://developer.api.autodesk.com/viewingservice/v1/viewers/viewer3D.min.js

中不可用
<script src="https://developer.api.autodesk.com/modelderivative/v2/viewers/viewer3D.min.js?v=v6.0"></script>

    viewer.loadExtension('Autodesk.Viewing.MarkupsCore').then(function(markupsExt){
          markup = markupsExt;
        });
markup.enterEditMode();
var polyline= new Autodesk.Viewing.Extensions.Markups.Core.EditModePolyline(markup)
markup.changeEditMode(polyline);

能否在衍生服务中使用viewingservice的polyline和polycloud的consturtor?

始终使用“https://developer.api.autodesk.com/modelderivative/v2/viewers/viewer3D.min.js”,因为此 CDN 端点已正式记录并积极维护,而另一个仅出于遗留原因保留。

已使用您的代码进行测试并且有效 - 查看实时示例 here:

viewer.loadExtension('Autodesk.Viewing.MarkupsCore').then(markup => {
  markup.enterEditMode();
  let polyline = new 
  Autodesk.Viewing.Extensions.Markups.Core.EditModePolyline(markup)
  markup.changeEditMode(polyline)
})