Is there a way to get co-ordinates of the elements

2019-08-10 02:38发布

问题:

For the purpose of comparing two models, is there a method or a function that i can use to get the co-ordinates out of elements of a model.

回答1:

Unfortunately, Forge viewer doesn't play well with GIS information currently as I know. Apologizing for any inconvenience caused. However, you can use the following codes to disable the centralize behavior of the Forge Viewer (after v.3.1), if your Revit models are configurated with Revit shared coordinates system. Afterward, you models will be loaded in shared coordinates of the Revit by the Viewer, and you could do some coordinate conversions to map model points from Viewer coordinate system to the GIS's.

var loadOptions = {
  applyRefPoint: true,
  globalOffset: { x:0, y:0, z:0 }
};

viewer.loadModel(
            svfUrl, 
            loadOptions,
            onLoadModelSuccess,
            onLoadModelError
);

Here are some references for setting up Revit shared coordinate:

  • https://knowledge.autodesk.com/support/revit-products/troubleshooting/caas/sfdcarticles/sfdcarticles/Suggested-workflow-with-shared-coordinates-in-Revit.html
  • https://knowledge.autodesk.com/support/revit-products/troubleshooting/caas/sfdcarticles/sfdcarticles/Revit-shared-coordinate-from-geolocation-GPS-to-UTM-coordinate.html

In addition, our InfraWorks team is looking for companies and developers who can help us narrow down the use cases, please see here for the detail: https://forge.autodesk.com/blog/call-input-infraworks-api



回答2:

with THREE.JS native methods u can easily achieve any geometries in the scene or in the model