Get all points from PointCloudInstance near a solid with tolerance

SONA-ARCHITECTURE
Advocate

Get all points from PointCloudInstance near a solid with tolerance

SONA-ARCHITECTURE
Advocate
Advocate

Hello

I'd like to know if it's possible to obtain a collection of points (from a PointCloudInstance) close to the whole of a solid?
I used CreateMultiPlaneFilter to create a set of planes from the BoundingBox of my occurrence but if my tube makes a bend or if my occurrence is a more complex geometry, I get back way too many points...

 

Thank you for your answers.

 

2025-03-24_16h46_40.png

Pierre NAVARRA
SONA-Architecture.
http://www.sona-architecture.com
https://fr.linkedin.com/in/pierre-navarra-62032a107
0 Likes
Reply
257 Views
6 Replies
Replies (6)

jeremy_tammik
Autodesk
Autodesk

Yes, absolutely. I am afraid the Revit API will probably not be able to help you much in filtering individual points. The Revit API filters deal with higher-level BIM elements. For such fine-grained filtering, you will have to use other, more specialised tools. Maybe some of the point cloud libraries on GitHub will be able to help:

  

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes

kubitTilo
Advocate
Advocate

You could try to get a mesh of the solid's faces using Face.Triangulate(), and then refine the points which are in the bounding box by calculating the distance of each point to the mesh. To handle computational complexity you might need to use suitable data structures for the mesh and points. So, lots of work, I guess...




Tilo Pfliegner
0 Likes

SONA-ARCHITECTURE
Advocate
Advocate

Hy @jeremy_tammik 

Nice to read you 😊

Thanks for your answer and your links. Do you think it is possible to use those point cloud libraries in a plug-in project wich is using RevitAPI ? 
I guess it's not possible to access RevitAPI objects like PointCloudInstance? I don't know if my question is very clear...

Pierre NAVARRA
SONA-Architecture.
http://www.sona-architecture.com
https://fr.linkedin.com/in/pierre-navarra-62032a107
0 Likes

jeremy_tammik
Autodesk
Autodesk

Sure it is possible. If you can find a library in .NET, it is very easy indeed. Of course none of those generic libraries will know anything whatsoever about the Revit API. So, you will have to implement code to extract the Revit data you wish to process and convert that to a format that the library understands.

   

The potree library has been mentioned here in the forum in the past:

   

   

Maybe you can find some useful hints searching this forum for potree:

   

   

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes

SONA-ARCHITECTURE
Advocate
Advocate

Hi @jeremy_tammik 

If I understand correctly, I retrieve the information from my clouds via PointCloudInstance Class and then, for example, I use potree to perform more manipulation on my points, right? (Like, for example, having the list of points all around a solid) We agree that potree won't allow me to modify the appearance of my clouds in Revit, for example?

 

By the way, thx also to @kubitTilo 

Pierre NAVARRA
SONA-Architecture.
http://www.sona-architecture.com
https://fr.linkedin.com/in/pierre-navarra-62032a107
0 Likes

jeremy_tammik
Autodesk
Autodesk

Yes, exactly.

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes

Type a product name