PointCloudFilter Class


A class used to describe the criteria an application desires when obtaining members of a point cloud.

Namespace: Autodesk.Revit.DB.PointClouds
Assembly: RevitAPI (in RevitAPI.dll) Version: 17.0.0.0 (17.0.484.0)
Since: 2012

Syntax

C#
public class PointCloudFilter : IDisposable
Visual Basic
Public Class PointCloudFilter _
	Implements IDisposable
Visual C++
public ref class PointCloudFilter : IDisposable

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.

Examples

Copy C#
// 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;
Copy VB.NET
' Filter will match 1/8 of the overall point cloud
' Use the bounding box (filter coordinates are in the coordinates of the model)
Dim boundingBox As BoundingBoxXYZ = pointCloudInstance.BoundingBox(Nothing)
Dim planes As New List(Of Plane)()
Dim midpoint As XYZ = (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
Dim filter As PointCloudFilter = PointCloudFilterFactory.CreateMultiPlaneFilter(planes)
pointCloudInstance.FilterAction = SelectionFilterAction.Highlight

Return filter

Inheritance Hierarchy

System Object
Autodesk.Revit.DB.PointClouds PointCloudFilter

See Also