AutodeskForgeViewer-ErrorwhileprocessingSVF
创始人
2024-11-12 10:30:33
0

在处理SVF格式时出现错误,解决方法是对模型进行3D格式转换,例如转换为OBJ格式,然后再使用Forge API将其转换为SVF格式。参考代码如下:

const express = require('express');
const bodyParser = require('body-parser');

const app = express();
app.use(bodyParser.urlencoded({ extended: false }));
app.use(bodyParser.json());

const { DerivativeApi } = require('forge-apis');

const CLIENT_ID = 'your_client_id';
const CLIENT_SECRET = 'your_client_secret';
const BUCKET_KEY = 'your_bucket_key';
const OBJECT_NAME = 'your_object_name';
const FILE_URN = 'your_file_urn';

const apiInstance = new DerivativeApi();
apiInstance.authManager.authenticate();

const job = {
  input: {
    urn: FILE_URN,
  },
  output: {
    formats: [
      {
        type: 'obj',
        advanced: {
          modelGuid: '',
        },
      },
    ],
  },
};

apiInstance.translate(job, {}, (err, data) => {
  if (err) { console.log(err); return; }
  console.log(data);
});

此代码将输入模型转换为OBJ格式,然后再使用Forge API将其转换为SVF格式,以避免在处理SVF格式时出现错误。

相关内容

热门资讯

透视真的!德州局hhpoker... 透视真的!德州局hhpoker(透视)丽水茶苑辅助下载app(原来是有辅助下载)-哔哩哔哩1、游戏颠...
透视苹果版!hhpoker是真... 透视苹果版!hhpoker是真的假的(透视)微信小程序多乐游戏辅助脚本(本来存在有辅助平台)-哔哩哔...
透视软件!aapoker透视脚... 透视软件!aapoker透视脚本入口(透视)超级三加一辅助(一直是真的辅助工具)-哔哩哔哩进入游戏-...
透视辅助!hhpoker德州有... 透视辅助!hhpoker德州有挂吗(透视)免费随意玩辅助器(切实存在有辅助插件)-哔哩哔哩1、操作简...
透视免费!aapoker俱乐部... 透视免费!aapoker俱乐部靠谱吗(透视)全民比鸡脚本(其实有辅助安装)-哔哩哔哩一、全民比鸡脚本...
来临!hhpoker有透视功能... 来临!hhpoker有透视功能吗(透视)新金龙辅助(本来存在有辅助工具)-哔哩哔哩1、很好的工具软件...
透视代打!红龙poker辅助平... 透视代打!红龙poker辅助平台(透视)四海茶馆游戏辅助(都是是有辅助下载)-哔哩哔哩1.四海茶馆游...
透视玄学!pokemomo辅助... 透视玄学!pokemomo辅助软件(透视)开心十三张透视(总是有辅助平台)-哔哩哔哩;1、开心十三张...
透视app!wepoker俱乐... 您好,透视辅助器免费欢聚水鱼这款游戏可以开挂的,确实是有挂的,需要了解加去威信【136704302】...
此事备受玩家关注!wpk私人局... 此事备受玩家关注!wpk私人局辅助是真的吗(透视)来来拼十辅助(好像是真的辅助插件)-哔哩哔哩1、点...