Quantcast
Channel: All Revit API Forum posts
Viewing all articles
Browse latest Browse all 66664

PointCloudInstance Coordinate System

$
0
0

I have a question about what coordinate system the cloud point and scan origin positions are in when they are retrieved from the native Revit point cloud engine. I ran the following code in Visual Studio 2015 with Revit 2016.

 

The point clouds which were loaded have the scanner location/ scan origin in the middle of its point cloud. Here I assume the scan origin is the position of the scanner head in the scene. This is the code I used to retrieve the point cloud info.

 

FilteredElementCollector collector = new FilteredElementCollector(Application.ActiveUIDocument.Document).OfClass(typeof(PointCloudInstance));
foreach (Element e in collector){

      PointCloudInstance pointCloudInstance = e as PointCloudInstance;

      BoundingBoxXYZ boundingBox = pointCloudInstance.get_BoundingBox(null);

      IList<string> scans = pointCloudInstance.GetScans();

      foreach (string scan in scans)
        {
                XYZ scanLocationHost = pointCloudInstance.GetScanOrigin(scan);

/// scanLocationHost is not inside of bounding box

        }

}

 

The problem comes when I compare the scan origin to the point cloud bounding box.

 

In one project, the scanner origin is returned in what seems to be the same coordinate system as the bounding box.

 

In another project, the scanner origin seems to be in a coordinate system that involves the project base point, but the bounding box does not.

 

Both projects have a project base point and survey point far away from origin and at the same place. Both projects have point clouds with their scanner location / scan origin within the point cloud as visible in the scene.

 

Could someone help me to understand the steps I need to follow to get the scan origin, point cloud points, and point cloud bounding box all in the same coordinate system in any project state?


Viewing all articles
Browse latest Browse all 66664

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>