autodesk-forge

Autodesk Forge viewer renders only single page for PDF files

风格不统一 提交于 2019-12-31 03:51:08
问题 In our application we're using Autodesk Forge Viewer to render 3D and 2D design files. Files with other formats get rendered pretty well. But in case of the pdf files, only the first page gets rendered even if the file actually has multiple pages. But we need to display all the pages . Here's the part of code I'm using to initialize the viewer: function doInitializeTheViewer(urn, token, element) { const options = { 'env': 'AutodeskProduction', 'accessToken': token }; let documentId = 'urn:' +

How to set up skybox in Autodesk Forge

大憨熊 提交于 2019-12-28 07:08:10
问题 I want to add a skybox to my Forge scene, but Forge is different from three.js. I want to know what I can do for it. I have tried new THREE.CubeTextureLoader , but the three.js in Forge doesn't have this function. Then I tried to build a CubeGeometry , but it did't work well. This is my code: var materialArr=[]; var directions = ["aa_RT","aa_LF","aa_UP","aa_DN","aa_FR","aa_BK"] ; for (var i = 0; i < 6; i++){ materialArray.push( new THREE.MeshBasicMaterial({ map: THREE.ImageUtils.loadTexture(

Download all the derivatives for the purpose of the using Forge Viewer offline/C#

最后都变了- 提交于 2019-12-25 18:42:18
问题 refering to this post ,I know there is a way to download the tranlated files with node.js" How do I download SVG/SVF for offline viewing with Autodesk Model Forge APIs",and using the Model Derivative api "GET :urn/manifest/:derivativeurn", I can download all the files record in manifest, download files pic: http://imgur.com/iPFn3Cx my question is :are these files I download from manifest with "GET :urn/manifest/:derivativeurn" enough for offline viewing? If not,did anyone implement this

Download all the derivatives for the purpose of the using Forge Viewer offline/C#

空扰寡人 提交于 2019-12-25 18:42:14
问题 refering to this post ,I know there is a way to download the tranlated files with node.js" How do I download SVG/SVF for offline viewing with Autodesk Model Forge APIs",and using the Model Derivative api "GET :urn/manifest/:derivativeurn", I can download all the files record in manifest, download files pic: http://imgur.com/iPFn3Cx my question is :are these files I download from manifest with "GET :urn/manifest/:derivativeurn" enough for offline viewing? If not,did anyone implement this

How to get a list of dbids contained in a layer?

喜欢而已 提交于 2019-12-25 18:20:41
问题 I am trying to access the list of objects or dbids contained with a layer of a 2d model. Ideas? Thank you. 回答1: After checking with our dev team, it might be not possible to get a list of dbIds for a layer currently unfortunately. The implementation of the 2D model is not the same as the 3D model. 来源: https://stackoverflow.com/questions/46517341/how-to-get-a-list-of-dbids-contained-in-a-layer

Change material of hidden elements of Autodesk Forge viewer

ⅰ亾dé卋堺 提交于 2019-12-25 16:47:24
问题 I would like to change material (THREE.MeshPhongMaterial) of elements which were hidden by the viewer. The default hidden elements are still visible, but I want to change their transparency and color. Here is the example code. I tried to change both theming color and material but no success: viewer.hideById(dbId); var color = 0x0000ff; // blue color viewer.setThemingColor(dbId, color, viewer.model); var instanceTree = viewer.model.getData().instanceTree; var fragmentList = viewer.model

Trying to Create a bucket getting object is missing response

我的梦境 提交于 2019-12-25 09:19:22
问题 Tried to talk to the api with the following Request: POST /oss/v2/buckets/ HTTP/1.1 Host: developer.api.autodesk.com Authorization: "Bearer sOla4eICLR6IBcx0892MvPjJ***" Content-Type: application/json Cache-Control: no-cache Postman-Token: 1018dee7-22f1-d20b-4d11-32c4fd41d525 { "bucketKey":"energymetrics.bucket1", "policyKey":"transient" } Response: {{ "developerMessage": "Object is missing", "userMessage": "", "errorCode": "", "more info": "http://developer.api.autodesk.com/documentation/v1

Update File Version with Autodesk API

孤者浪人 提交于 2019-12-25 08:58:19
问题 I am now able to upload a file and create an initial version for the file but am unable to update the version. Using the code in Step 6 of this tutorial does not work even after replacing versions:autodesk.core:File with versions:autodesk.bim360:File . From the error message, Request contains 0 includes instead of 1 , it seems I need part of the included block from the example in Step 5 but I am not sure what it should look like; given the outer relationships blocks do not match in format

Controlling camera in Forge viewer

时光毁灭记忆、已成空白 提交于 2019-12-25 08:49:24
问题 I'm trying to control the camera in the Autodesk Forge Viewer. Setting target and position seems to work fine, but if I try to set rotation or quaternion it do not have any effect. To get the camera I use the getCamera function and then applyCamera after I have tried to set the parameters. What I'm trying to achieve is to use the device orientation on a handheld device to rotate the model. Just using alpha and beta to set target is not a smooth experience. // get camera var cam = _viewer

Are any of the Forge APIs able to tell me the version of the software that created that created file

时光毁灭记忆、已成空白 提交于 2019-12-25 01:45:58
问题 If I upload a Revit file can any API tell me what version it was created with? Same for dwg, 3ds and any other file. Thanks 回答1: Forge Design Automation APIs might help this case, you can use cloud engines of Autodesk product (such as AutoCAD, Revit, Inventor, etc.) to read file details. What you have to do is writing some tiny add-ins to read software version stored in the file. Besides, you can use some third-party tools to archive the same goal as well: RVT file is actually an OLE document