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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
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!