DelaunayVoronoi3d

public static class DelaunayVoronoi3d
3D Delaunay tetrahedralization and box-clipped 3D Voronoi diagram. Robustness: all orientation/insphere decisions use exactly filtered arithmetic with symbolic perturbation for cospherical input, so regular grids and other degenerate configurations are handled deterministically. Self-contained: depends only on RhinoCommon and the BCL.

Methods

Compute

#
public static DelaunayVoronoiResult Compute(IEnumerable<Point3d> points, double duplicateTolerance, BoundingBox? clipBox = null, DelaunayVoronoiOutputs outputs = DelaunayVoronoiOutputs.All, double minTetQuality = 0, CancellationToken token = default(CancellationToken))
Computes the Delaunay tetrahedralization and the box-clipped Voronoi diagram of the given points.
points (IEnumerable<Point3d>)Input points; at least 4 non-coplanar points required.
duplicateTolerance (double)Points closer than this are merged (greedily, onto the earliest point). Pass 0 or a negative value to merge exact duplicates only.
clipBox (BoundingBox? = null)Optional box the Voronoi cells are clipped to. When null, the point bounds inflated by 10% of their diagonal are used. Cells of sites outside the box may come out empty (null).
outputs (DelaunayVoronoiOutputs = DelaunayVoronoiOutputs.All)Which outputs to build; unrequested result fields are null and their cost is skipped entirely. Defaults to everything.
minTetQuality (double = 0)Minimum scale-invariant tetrahedron quality (see TetQuality(Point3d, Point3d, Point3d, Point3d), 1 = regular, ~0 = sliver). Only tetrahedra with quality >= this value contribute to the Delaunay-family outputs (DelaunayVoronoiResult.Tets, DelaunayVoronoiResult.DelaunayMeshes, DelaunayVoronoiResult.DelaunayEdges, DelaunayVoronoiResult.DelaunayEdgeTopology and DelaunayVoronoiResult.Adjacency). The Voronoi outputs are unaffected. Pass 0 or a negative value to keep every tetrahedron.
token (CancellationToken = null)A cancellation token to cancel the computation.
ArgumentExceptionThrown for empty/non-finite input, fewer than 4 distinct points, collinear or coplanar point sets, or an invalid/degenerate clip box.

TetQuality

#
public static double TetQuality(Point3d a, Point3d b, Point3d c, Point3d d)
Scale-invariant tet quality: Volume over the cube of the root-mean-square edge length, with a constant factor so the result is 1 for a regular tetrahedron and ~0 for slivers. This is the 'Volume-Length' measure from "Tetrahedral Mesh Improvement" Klingner 2008
a (Point3d)
b (Point3d)
c (Point3d)
d (Point3d)