AutodeskForge数据可视化组件可以使用SVF模型,但不能使用SVF2模型。
创始人
2024-11-12 10:30:28
0

要在使用Autodesk Forge数据可视化组件时使用SVF2模型,需要将SVF2模型转换为SVF模型。这可以通过使用Model Derivative API中的SVF转换作业来完成。以下是一个示例代码,说明如何将SVF2模型转换为SVF模型:

var JobSvfOutputPayload = 
{
    output: {"formats": [{ "type": "svf", "views": ["2d", "3d"] }]}
};

function startTranslation(base64URN)
{
    var manifestUrl = 'https://developer.api.autodesk.com/modelderivative/v2/designdata/'+base64URN+'/manifest';
    jQuery.ajax(
        {
            url: manifestUrl,
            headers:{'Authorization': 'Bearer ' + getForgeToken()},
            success: function (data) 
            {
                JobSvfOutputPayload.input = { urn: base64URN };
                JobSvfOutputPayload.output.formats[0].meta = data;
    
                jQuery.ajax(
                    {
                        url: 'https://developer.api.autodesk.com/modelderivative/v2/designdata/job',
                        type: 'POST',
                        contentType: 'application/json',
                        data: JSON.stringify(JobSvfOutputPayload),
                        headers:{'Authorization': 'Bearer ' + getForgeToken()},
                        success: function (theJob) 
                        {
                            //theJob = JSON.parse(theJob);
                            console.log(theJob);
                        },
                        error: function (err) 
                        {
                            console.log(err);
                        }
                    }
                );
            }
        }
    );
}

在此示例中,JobSvfOutputPayload指定输出格式,即SVF格式和2D / 3D视图。startTranslation函数根据输入的base64URN开始翻译,并使用Model Derivative API执行SVF转换作业。结果通过控制台输出。请注意,您需要在getForgeToken函数中返回有效的OAuth令牌。

相关内容

热门资讯

透视辅助!wpk软件是正规的吗... 透视辅助!wpk软件是正规的吗,在哪里下载微乐自建房辅助软件,分享脚本(发现有挂)-哔哩哔哩一、wp...
透视揭露!hhpoker万能辅... 透视揭露!hhpoker万能辅助器,hhpoker作必弊码怎么用(透视)竟然有app(哔哩哔哩)1、...
出现新变化!wepoker有没... 出现新变化!wepoker有没有透视方法,提高微乐运气的方法,教你脚本(真实有挂)-哔哩哔哩1、全新...
透视解密!wpk俱乐部怎么作必... 透视解密!wpk俱乐部怎么作必弊,wpk插件(透视)其实真的是有方法(哔哩哔哩)运辅助工具,进入游戏...
无独有偶!hh poker辅助... 无独有偶!hh poker辅助器先试用,微信微乐自建房脚本免费下载,推荐透视(有挂头条)-哔哩哔哩1...
脚本推荐!aapoker免费透... 脚本推荐!aapoker免费透视脚本,aapoker真的假的(透视)都是是真的脚本(哔哩哔哩)1、下...
反观!wepokerplus万... 反观!wepokerplus万能挂,微乐小程序自建房透视,辅助透视(有挂教程)-哔哩哔哩1、实时we...
脚本总结!hhpoker辅助挂... 脚本总结!hhpoker辅助挂下载,hhpoker有没有辅助(透视)确实真的是有软件(哔哩哔哩)1、...
今年以来!wepoker黑侠辅... 今年以来!wepoker黑侠辅助器正版下载,微乐辅助脚本,解迷透视(有挂教学)-哔哩哔哩1、wepo...
围绕透视问题!aa poker... 围绕透视问题!aa poker透视软件,微乐智能辅助真的假的,专业脚本(有挂总结)-哔哩哔哩1、每一...