1

I am using forge-apis package on Node.js and I want to translate a .fbx file in SVF2. When I do so and load the model, size and GPU memory used is the same as normal translate to SVF and when I check viewer.model.isSVF2() it return false.

const {
DerivativesApi,
JobPayload,
JobPayloadInput,
JobPayloadOutput,
JobSvfOutputPayload} = require('forge-apis');

and

router.post('/jobs', async (req, res, next) => {
const xAdsForce = (req.body.xAdsForce === true);
let job = new JobPayload();
job.input = new JobPayloadInput();
job.input.urn = req.body.objectName;
if(req.body.rootFilename && req.body.compressedUrn) {
    job.input.rootFilename = req.body.rootFilename;
    job.input.compressedUrn = req.body.compressedUrn;
}

job.output = new JobPayloadOutput([
    new JobSvfOutputPayload()
]);
job.output.formats[0].type = 'svf2' ;
job.output.formats[0].views = ['2d', '3d'];
try {
    // Submit a translation job using [DerivativesApi](https://github.com/Autodesk-Forge/forge-api-nodejs-client/blob/master/docs/DerivativesApi.md#translate).
    const result = await new DerivativesApi().translate(job, { xAdsForce: xAdsForce }, req.oauth_client, req.oauth_token);
    res.status(200).end();
} catch(err) {
    next(err);
}});

How can I handle this problem? Thanks a lot.

  • Did you end up with an answer to this ever? I'm having the same issue from .DWG's to SVF2. Same model, size, gpu memory, and isSVF2() returns false. – Matt H Apr 13 '22 at 15:12
  • @MattH in my case the file contained only one surface, so there were basically no difference between SVF and SVF2. But still I believe the translation to SVF2 should have happened. – mahshid motie Apr 27 '22 at 11:19

0 Answers0