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免费透视脚本,HHpoker脚本总是是有工具,四分钟教程(有挂辅助)1、点击...
透视步骤!wpk插件辅助,WP... 透视步骤!wpk插件辅助,WPK辅助器总是真的是有脚本,一分钟教程(有挂技巧)1、全新机制【wpk插...
透视步骤!hhpoker透视脚... 透视步骤!hhpoker透视脚本,HHpoker脚本果然是真的有开挂,第6分钟教程(有挂细节)运hh...
透视绝活儿!wepoker私人... 透视绝活儿!wepoker私人局透视教程,WePoKer有挂好像真的有脚本,第八分钟教程(有挂方法)...
透视窍要!德普之星辅助工具如何... 透视窍要!德普之星辅助工具如何打开,德普辅助器总是是真的有工具,九分钟教程(有挂详情)1)德普之星辅...
透视模板!智星德州插件,WeP... 透视模板!智星德州插件,WePoKer内容一直是有开挂,六分钟教程(有挂教学)1、全新机制【智星德州...
透视大纲!pokemmo免费脚... 透视大纲!pokemmo免费脚本,WePoKer免费玩都是是有辅助,七分钟教程(讲解有挂)1、打开软...
透视举措!hhpoker到底可... 透视举措!hhpoker到底可以作必弊吗,HHpoker辅助其实真的有工具,七分钟教程(有挂技术)1...
透视教材!wepoker破解是... 透视教材!wepoker破解是真的还是假的,WePoKer好友房原来真的是有安装,十分钟教程(有挂工...
透视项目!wepoker私局代... 透视项目!wepoker私局代打,WePoKer线上一直真的有脚本,第2分钟教程(有挂规律)在进入w...