Point Cloud non-file-based custom engine for plotting 3d points

Point Cloud non-file-based custom engine for plotting 3d points

Anonymous
Not applicable
827 Views
3 Replies
Message 1 of 4

Point Cloud non-file-based custom engine for plotting 3d points

Anonymous
Not applicable

Hi

 

I have been trying to get the PointCloudEngine sample provided with the SDK to work with the Revit 2014 API without any success.

 

I am interested in developing a custom engine that can generate and visualize large quantities of script-based points within the Revit model with varying display size and colour. Therefore I have been looking at the Predefined variant of the PointCloud engine within the SDK sample. The problem seems to be with the PointCloudType.Create() method and particularly with the typeIdentifier String argument which causes an exception to be thrown. I noticed that an empty String is fed to the typeIdentifier in the SDK sample, and tried to change it, but that didn't seem to work.

 

Not having found any other documentation on this issue, I would like to confirm if custom, non-file-based PointCloud engines are still supported by the 2014 API and if so, I would appreciate any guidance in getting the SDK sample project to work. It is my impression that the PointCloud API has changed in the 2014 version and am wondering if such support has been deprecated (the sample project seems to be written for the 2012 API).

 

If custom non-file-based PointCloud engines are not supported, I was examining some other options for generating and visualizing some points and would appreciate any advice on these as well.

 

The first alternative would be to use ReferencePoints. However, this poses a problem since according to my understanding these can only be generated within Family files and not within normal Revit project files. Additionally, it seems that size and color of ReferencePoints can only be set globally using Visibility/Graphics overrides, whereas I would like to be able to specify them individually. Also, it seems that the option to use ReferencePoints might not be suitable for large multitudes of points, as they are not so lightweight and include redundant member properties, such as the coordinate system, reference planes, etc.

 

Another more complicated option would be to use some form of billboarding technique, based on textured quads that always face the view camera. However, this would require some method for getting the view projection matrix dynamically, so as to ensure that the quads always face the camera when orbiting the 3d model. I have not been able to find any leads on this (view projection matrix) and any help would be greatly appreciated.

I also looked at the Analysis Visualization framework and relevant classes (SpatialFieldManager etc) in conjunction with a marker-based display style, but using this option does not seem to be flexible enough (can't have points varying in size) and it also looks like it is not very efficient in terms of viewport graphics performance in cases of large sets of points.

 

Finally, I don’t think that this is possible, but I’d like to ask if direct OpenGL calls are somehow supported within the Revit environment – if so, I could try to use native OpenGL sprite rendering.

 

Any help with the above would be most welcome. Please let me know if you find that I have made any misassumptions. Of course, I would appreciate any other hints or suggestions for plotting lightweight 3D points. Please note that I’d generally like to avoid using any heavier Revit geometry elements. As a last resort, I considered zero-length lines, but I think that even that would bring a redundant overhead.


Many thanks in advance!

0 Likes
828 Views
3 Replies
Replies (3)
Message 2 of 4

Anonymous
Not applicable

just bumping my own thread...

 

FYI, I tried the sample PointCloudEngine file with the 2012 API and it seems to work fine there!

 

Is there something broken with the 2014 API? Has the way that the interfaces for custom engines are implemented changed?

 

I'm trying to bend my head around this but there has been no progress so far.

 

I tried to clean up what seemed to be unnecessary in the sample project, in an attempt to isolate the problem, but it always seems to boil down to the PointCloudType.Create(Document document, string engineIdentifier, string typeIdentifier) method.  I tried playing around with different strings for the  typeIdentifier and engineIdentifier arguments, but I always get the exception: "The method or operation is not implemented".

 

 

Can anyone else please confirm that the SDK sample project in question does not work with Revit 2014 API?

 

Any help would be most welcome!

 

Thanks!

 

0 Likes
Message 3 of 4

jeremytammik
Autodesk
Autodesk

Dear 4dbox,

 

Thank you for your query and also for your separate personal email.

 

ALl that I know about point cloud handling is summarised in this thread:

 

http://forums.autodesk.com/t5/revit-api/point-cloud-indexer-api/m-p/5343427

 

Basically, you use ReCap now instead of the dedicated point cloud engine.

 

I hope this helps.

 

Looking forward to seeing you at the next 3dLovers Meetup event in Athens!

 

Cheers,

 

Jeremy



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

0 Likes
Message 4 of 4

Anonymous
Not applicable

Hi 

 

Jeremy, thanks so much for your response! Very kind of you to reply so promptly, following my PM.

 

Thanks for the link - I had come across the thread you mention before, but I thought it mostly referred to file-based point cloud engines and indexing. I was kind of hoping that custom engines for generating script-based points within Revit (non-file-based) might still be supported. I take it that general support for custom point cloud engines is no longer available, granted the shift of interest towards Recap and the fact that most people would probably be more interested in file-based or db-based point cloud functionality.

 

It's a little disappointing to see that there is no straightforward way to generate and visualise some points within the Revit model that fits my current requirements. The point cloud engine seemed like a good option, since it is optimized for viewport graphics performance, as far as I can tell. 

 

Anyway, thanks for all the help. It's good that I can now rule out the point cloud engine and focus on some other method. For now, the best option seems to be zero-length lines, or in fact near-zero-length lines, because Revit does not allow both endpoints of the line to coincide! For anyone else attempting to do something similar, there seems to be an internal low-end limit for line lengths, as is denoted by the exception I get: "Curve length is too small for Revit's tolerance (as identified by Application.ShortCurveTolerance)"

 

Indeed, I will also be looking forward to meeting you at the Meetup event!

 

 

Best,

 

Tassos

 

 

 

 

0 Likes