Autodesk Forge Autodesk.DiffTool在“sidebyside”模式下出现问题。

huangapple go评论64阅读模式
英文:

Autodesk forge Autodesk.DiffTool problem in "sidebyside" mode

问题

I can provide a translation of the code part you've shared:

viewer.loadDocumentNode(doc2, doc2.getRoot()
    .search({ name: oldVersionName })[0]
    .getDefaultGeometry(),
    { keepCurrentModels: true }).then(m2 => {
        model2 = m2;
        var extensionConfig = {};
        extensionConfig.mimeType = 'application/vnd.autodesk.revit';
        extensionConfig.primaryModels = [m1];
        extensionConfig.diffModels = [m2];
        extensionConfig.diffMode = 'sidebyside';
        extensionConfig.versionA = newVersionName || 'New Version';
        extensionConfig.versionB = oldVersionName || 'Old Version';

        viewer.loadExtension('Autodesk.DiffTool', extensionConfig)
            .then(function (res) {
                window.DIFF_EXT = viewer.getExtension('Autodesk.DiffTool');
                console.log("DiffTool has been loaded.")
            })
            .catch(function (err) {
                console.log(err);
            });
    })

Please note that code translations may vary in their accuracy, and it's important to verify the translated code to ensure it functions correctly in your context.

英文:

I'm trying to compare two 3d models with Autodesk.DiffTool.
But there are some problem in "viewer.getExtension('Autodesk.DiffTool').setDiffMode('sidebyside')"
Below is the execute result.
enter image description here
Left side's model didn't show up.

I operate visible button in model browser ,but it can't work.
enter image description here

After loading the first document then execute the below code.
There is no error,but left side model still doesn't show up

viewer.loadDocumentNode(doc2, doc2.getRoot()
    .search({ name: oldVersionName })[0]
    .getDefaultGeometry(),
    { keepCurrentModels: true }).then(m2 => {
        model2 = m2;
        var extensionConfig = {};
        extensionConfig.mimeType = 'application/vnd.autodesk.revit';
        extensionConfig.primaryModels = [m1];
        extensionConfig.diffModels = [m2];
        extensionConfig.diffMode = 'sidebyside';
        extensionConfig.versionA = newVersionName || 'New Version';
        extensionConfig.versionB = oldVersionName || 'Old Version';

        viewer.loadExtension('Autodesk.DiffTool', extensionConfig)
            .then(function (res) {
                window.DIFF_EXT = viewer.getExtension('Autodesk.DiffTool');
                console.log("DiffTool has been loaded.")
            })
            .catch(function (err) {
                console.log(err);
            });


    })

答案1

得分: 1

我已经能够复现这个问题。overlay 模式似乎运行正常,但在切换到 sidebyside 模式后,我在控制台中看到了许多 WebGL 错误。

Autodesk Forge Autodesk.DiffTool在“sidebyside”模式下出现问题。

我会向查看器团队报告此问题。一旦问题解决,我们将在 changelog 中报告,所以请保持关注。

编辑:

在处理此问题时,请考虑在 DiffTool 扩展的选项中添加 useSplitScreenExtension: true。启用此标志后,该功能将正常工作。

英文:

I've been able to reproduce the issue as well. The overlay mode seems to be working well, but after switching to the sidebyside mode, I see many WebGL errors in the console.

Autodesk Forge Autodesk.DiffTool在“sidebyside”模式下出现问题。

I will report this issue to the viewer team. As soon as it is resolved, we will report it in the changelog, so please stay tuned.

EDIT:

While the issue is being addressed, please consider adding useSplitScreenExtension: true to the options of the DiffTool extension. With this flag enabled, the feature works as expected.

huangapple
  • 本文由 发表于 2023年5月22日 14:34:41
  • 转载请务必保留本文链接:https://go.coder-hub.com/76303542.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定