Point cloud feature extration

Point cloud feature extration

Anonymous
Not applicable
937 Views
1 Reply
Message 1 of 2

Point cloud feature extration

Anonymous
Not applicable

Hi there,

 

I am new to the Revit API and i want to perform automated feature extraction on point clouds within Revit.

I have been reading up on the subject, but came accross multiple problems.

 

1. Is it possible in the current API to access point clouds in Revit and perform mutations on them like fit walls on the data, evaluate the normals, ..?

 

2. my plan is to implement a gaussian sphere to evaluate the normals and thus cluster the point clouds in their respective planes. Then i would use ransac or Least squares to fit walls, floors, etc onto the data. Furthermore, i want to do this for sections in the cloud, so in the end i need a clash detection and evaluation tool to complete the model in Revit. Is this possible ?

 

3. Is it possible to access imigary in this API?

 

4. I am struggeling to access the point cloud right now.

Following code allows me to select the Element

       Selection sel = uidoc.Selection; // first i select a point cloud

              foreach (ElementId eleId in sel.GetElementIds())
              {
                      Element ele = doc.GetElement(eleId);

                      // next im trying to use this eleId to access the point cloud

                      PointCloudInstance pcd = doc.GetElement(eleId); // but there is an implicit/explicit conversion error

 

Does anyone have ideas on how to access the point cloud, the data and its normals?

 

Thank you

0 Likes
938 Views
1 Reply
Reply (1)
Message 2 of 2

jeremytammik
Autodesk
Autodesk

Dear Maarten,

 

Thank you for posting your query here in the public discussion forum and sorry it has taken so so long to address.

 

I was hoping someone more knowledgeable than I would chip in and help.

 

I cannot say much, really, though, beyond point you in some direction to research for ylourself what you can access and how.

 

Still, let's see what I can say about your questions, one by one:

 

1a. Is it possible in the current API to access point clouds in Revit.

 

Yes, I believe so. The best way to find out is to create one yourself and try it out. Here is a very brief description and some pointers on how you can effectively research issues like this from scratch:

 

http://forums.autodesk.com/t5/revit-api/family-constraints/m-p/5769328

 

1b. Can I perform mutations on them like fit walls on the data, evaluate the normals, ..?

 

I am not aware of any explicit Revit API access for these kind of operations. What can you do in the user interface? In general, if you cannot do something manually in the UI, then you will not be able to achieve it programmatically either. If you can achieve it in the UI, you can mostly drive that UI command programmatically using PostCommand:

 

http://thebuildingcoder.typepad.com/blog/about-the-author.html#5.3

 

I don't see what you might mean by normals, though. A point cloud consists of points, and points have no mormals. Maybe you mean the normals of the approximating planes, if any can be determined?

 

2. my plan is to implement a gaussian sphere to evaluate the normals and thus cluster the point clouds in their respective planes. Then i would use ransac or Least squares to fit walls, floors, etc onto the data. Furthermore, i want to do this for sections in the cloud, so in the end i need a clash detection and evaluation tool to complete the model in Revit. Is this possible ?

 

Sounds cool. I should think so. You should definitely get to know the Revit functionality provided by the user interface in depth before thinking about programming, anything, though, and consult with some expert users on best practices.

 

3. Is it possible to access imigary in this API?

 

Yes.

 

4. I am struggling to access the point cloud right now. Following code allows me to select the Element...

 

Your code is perfectly correct... almost. All you lack is the cast:

 

  PointCloudInstance pcd = doc.GetElement(eleId) as PointCloudInstance;

 

Here are some other previous discussions on related topics that might provide some additional insight, or at least show you some things that other people are up to:

 

 

I hope this helps.

 

Best regards,

 

Jeremy



Jeremy Tammik
Developer Technical Services
Autodesk Developer Network, ADN Open
The Building Coder

0 Likes