autodesk-forge

How do I download SVG/SVF for offline viewing with Autodesk Model Forge APIs

怎甘沉沦 提交于 2019-12-08 05:57:25
问题 I am able to accomplish all steps to upload Revit files and translate and load in viewer. I am now trying to download the translated SVG/SVF for offline viewing. I found reference to the following endpoint and tested it out with this: function download(){ var uri = 'https://developer.api.autodesk.com/derivativeservice/v2/derivatives/<<urn>>' ; var authorizationHeader = 'Bearer <<token>>' request.get( { url: uri, headers: { 'Authorization': authorizationHeader, 'Accept-Encoding': 'gzip,

How to resize on object - Autodesk Forge Viewer

情到浓时终转凉″ 提交于 2019-12-06 18:48:30
How can i change size of on object ?? i need to change height of on object For example, we need to change the height of a door or curtain on this code my object disappears let change = function () { const viewer = oViewer; const model = viewer.model; const frags = [ 123, 361, ]; for(let i in frags){ let fragId = frags[i]; // Get mesh with frag id let mesh = viewer.impl.getRenderProxy(model, fragId); // Selection ID let dbId = 1280; // viewer.getSelection()[0] model.getData().instanceTree.enumNodeFragments(dbId, fragId => { mesh.scale.x += 0.5; // mesh.scale.y = 5; // mesh.scale.z = 5; model

How do I get metadata from a 2d .dwg file using Forge AutoDesk APIs?

时间秒杀一切 提交于 2019-12-06 16:45:33
I was using the Forge AutoDesk Data management, design management and model viewer APIs to upload my .dmg, convert it to svf and then using the metadata. It works well for 3D designs but there seems to no guid inside the metadata when I use 2D designs. Is there something I am doing wrong? EDIT: I can get the manifest alright, but when I fetch the metadata for the same, it gives an empty array. { "type": "manifest", "hasThumbnail": "true", "status": "success", "progress": "complete", "region": "US", "urn": "dXJuOmFkc2sub2JqZWN0czpvcy5vYmplY3Q6ZGFkYXNkc2FkYS8xMTI2LmR3Zw", "version": "1.0",

Model Derivative API responses not mapping through Jackson

随声附和 提交于 2019-12-04 05:22:29
问题 Have there been updates made to the response objects from the Model Derivative API as we are having issues mapping the responses from requests for 3D models back into the Manifest and Metadata objects. Both are throwing Jackson errors. GetManifest is returning an unhandled role enum GetMetadataForGuid is throwing - Illegal character ((CTRL-CHAR, code 31)) Thanks 回答1: I got what's wrong with the issue. The response of Get Manifest endpoint did changed a bit recently. There will a property

setThemingColor only working for leaf node dbIds

非 Y 不嫁゛ 提交于 2019-12-04 05:21:56
问题 From the documentation it looks like you should be able to call setThemingColor with any dbId, but it seems to only work if the id that you pass is a leafnode? Is this correct? Also is there any way to bulk call this method, or is it only one single leaf node at a time? I would like to pass an array of dbId's into the method. 回答1: Yes, it's only working with the leaf nodes in my experience. However, leaf nodes of a parent node can be retrieved in this way: getLeafNodes( model, dbIds ) {

Autodesk Viewer: Suggestions for 2D view of floor view

大憨熊 提交于 2019-12-02 20:19:24
问题 I have a revit file and am able to convert it via the cloud to a svf and view it in the 3D viewer. It works both as conversion of the .rvt file directly and as an export from the navisworks addin exporter. My question: I want the user of my app to also be able to see the floor 2D view as you can in revit. I have looked through all the manifest files and do not see a f2d for the floor view. What do you suggest I use for the 2D view? Note that I will have many drawings to process/view so I

PUT file data to a Autodesk API with Python Requests

蓝咒 提交于 2019-12-02 16:35:08
问题 I am following the process described here but getting stopped by a 403 at Step 4. I have a token with data:write and data:create scopes as specified in the docs (and other API methods needing those scopes work) but I can't get a successful response and I think it's down to how I am sending the file data. My code looks like this: url = '{}oss/v2/buckets/{}/objects/{}'.format(self.DOMAIN, bucket_id, object_name) with open(file_path, 'rb') as f: file_content = f.read() response = self.session

How to upload obj with mtl and textures to bucket?

别来无恙 提交于 2019-12-02 16:32:53
问题 As the title suggests, how do I upload the obj model's material file and textures, as they are hard coded in the obj file. Can I upload zipped dir structure or multiple files that are in correct relation (because of the hard coded nature of obj)? 回答1: Here is an OBJ model with material and texture on the dotty trial site: http://trial.dotdotty.com/share/?shareId=cdc9-523f-305f-7ddb-5cc4 That was uploaded as a single zip file containing OBJ, MTL and PNG. Here is the same model on A360: http:/

Autodesk Viewer: Suggestions for 2D view of floor view

人走茶凉 提交于 2019-12-02 13:44:28
I have a revit file and am able to convert it via the cloud to a svf and view it in the 3D viewer. It works both as conversion of the .rvt file directly and as an export from the navisworks addin exporter. My question: I want the user of my app to also be able to see the floor 2D view as you can in revit. I have looked through all the manifest files and do not see a f2d for the floor view. What do you suggest I use for the 2D view? Note that I will have many drawings to process/view so I would prefer not to have to export a dwg for each view then convert those. I am hoping there is a special

Forge Viewer THREE.MeshLambertMaterial

老子叫甜甜 提交于 2019-12-02 13:38:13
One of the properties available on the var material = NEW THREE.MeshLambertMaterial is texture maps: {( map: new THREE.TextureLoader().load('wool.jpg') )} We're very curious whether it would be possible to load in a texture this way and apply it to a specific object in the model? Yes, but the way you modify materials in the Forge Viewer is a little bit different than what you would do in Three.js. I have an extensive sample that illustrates how to modify materials, including custom textures here: Viewing.Extension.Material The live demo is there . To use it, load a model first with "Model