Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Issue with GLTF translation (on assembly)

Hi,
  We have an issue with the translation API using the GLTF format. We are getting the error below from the API explorer. Note that all other format successfully completes using the same parameters.

 : {
 “requestState” : “FAILED”,
 “requestElementId” : “a33dd01ffe6a3cdb17fc581d”,
 “resultExternalDataIds” : null,
 “versionId” : null,
 “documentId” : “d0b49c63fd0bc7220a9a9de8",
 “workspaceId” : “0ef27cd69489fcbdcfea6d7a”,
 “resultElementIds” : null,
 “resultDocumentId” : “d0b49c63fd0bc7220a9a9de8”,
 “failureReason” : “<a class=os-import-filename href=‘Assembly 1’>{1}</a> was not exported. Invalid GLTF detail parameters were specified.“,
 “resultWorkspaceId” : “0ef27cd69489fcbdcfea6d7a”,
 “href” : “https://opal.onshape.com/api/translations/5dd463902eb254149e3ff1a8“,
 “id” : “5dd463902eb254149e3ff1a8",
 “name” : “Assembly 1"
}

Comments

  • Ethan_KEthan_K Member, Onshape Employees Posts: 57
    Hi Andre,

    This looks like a bug on our end. I'm investigating it and I'll let you know what I find.

    Cheers,
    -Ethan
  • michał_wójcik493michał_wójcik493 Member Posts: 2
    I have also experienced this problem. Export through GUI works just fine, other formats have no issues translating. It's just GLTF that fails to translate.
  • remi_begesremi_beges Member Posts: 6
    I'm getting the same issue with the Assemblies translation API.
    The interface is apparently using the Document translation API instead (don't know if it's documented), export works fine if you pass the correct parameters:

    This is the parameter list I pass to this endpoint:

    /api/documents/d/{doc_id}/v/{version_id}/translate

    {
                    "elementId": {assembly_id},
                    "formatName": 'GLTF',
                    "flattenAssemblies": False,
                    "yAxisIsUp": False,
                    "triggerAutoDownload": False,
                    "storeInDocument": False,
                    "grouping": True,
                    "configuration": {encoded_config},
                    "resolution": "coarse",
                    "distanceTolerance": 0.00024,
                    "angularTolerance": 0.2181661564992912,
                    "maximumChordLength": 10,
    }

    With a POST on this endpoint and body, the script can correctly download the GLTF 3D model
  • alan_kalbfleischalan_kalbfleisch Member Posts: 6
    I'm getting the same issue with the Assemblies translation API.
    The interface is apparently using the Document translation API instead (don't know if it's documented), export works fine if you pass the correct parameters:

    This is the parameter list I pass to this endpoint:

    /api/documents/d/{doc_id}/v/{version_id}/translate

    {
                    "elementId": {assembly_id},
                    "formatName": 'GLTF',
                    "flattenAssemblies": False,
                    "yAxisIsUp": False,
                    "triggerAutoDownload": False,
                    "storeInDocument": False,
                    "grouping": True,
                    "configuration": {encoded_config},
                    "resolution": "coarse",
                    "distanceTolerance": 0.00024,
                    "angularTolerance": 0.2181661564992912,
                    "maximumChordLength": 10,
    }

    With a POST on this endpoint and body, the script can correctly download the GLTF 3D model
    @remi_beges
    Where did you find those parameters to pass to the API?

Sign In or Register to comment.