PointCloudFilter Class

A class used to describe the criteria an application desires when obtaining members of a point cloud.
Inheritance Hierarchy
SystemObject
  Autodesk.Revit.DB.PointCloudsPointCloudFilter

Namespace: Autodesk.Revit.DB.PointClouds
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class PointCloudFilter : IDisposable

The PointCloudFilter type exposes the following members.

Properties
 NameDescription
Public propertyIsValidObject Specifies whether the .NET object represents a valid Revit entity.
Top
Methods
 NameDescription
Public methodClone Returns a copy of the filter. The engine is permitted to copy the filter multiple times e.g. to parallelize filtering.
Public methodDisposeReleases all resources used by the PointCloudFilter
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodPrepareForCell Informs the filter that a series of points within a given cell is about to be checked.
Public methodTestCell Checks whether a given cell, i.e. a box aligned with the XYZ axes, is inside, outside or on the border of the volume of interest.
Public methodTestPointChecks if a point is inside the volume of interest.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Remarks
Client applications which wish to obtain points from a point cloud will have to create a PointCloudFilter to define the volume of interest (see PointCloudFilterFactory). Engine implementations will need to use the methods contained within the point cloud to determine which points to return to Revit.
Example
// Filter will match 1/8 of the overall point cloud
// Use the bounding box (filter coordinates are in the coordinates of the model)
BoundingBoxXYZ boundingBox = pointCloudInstance.get_BoundingBox(null);
List<Plane> planes = new List<Plane>();
XYZ midpoint = (boundingBox.Min + boundingBox.Max) / 2.0;

// X boundaries
planes.Add(Plane.CreateByNormalAndOrigin(XYZ.BasisX, boundingBox.Min));
planes.Add(Plane.CreateByNormalAndOrigin(-XYZ.BasisX, midpoint));

// Y boundaries
planes.Add(Plane.CreateByNormalAndOrigin(XYZ.BasisY, boundingBox.Min));
planes.Add(Plane.CreateByNormalAndOrigin(-XYZ.BasisY, midpoint));

// Z boundaries
planes.Add(Plane.CreateByNormalAndOrigin(XYZ.BasisZ, boundingBox.Min));
planes.Add(Plane.CreateByNormalAndOrigin(-XYZ.BasisZ, midpoint));

// Create filter
PointCloudFilter filter = PointCloudFilterFactory.CreateMultiPlaneFilter(planes);
pointCloudInstance.FilterAction = SelectionFilterAction.Highlight;

return filter;
See Also