Skip to content

DiGi.Geometry.Spatial

github-actions[bot] edited this page Aug 21, 2026 · 3 revisions

DiGi.Geometry.Spatial Namespace

Classes

Convert Class

public static class Convert

Inheritance System.Object → Convert

Methods

Convert.ToDiGi(this CoordinateSystem3D) Method

Converts a CoordinateSystem3D instance to a Plane.

public static DiGi.Geometry.Spatial.Classes.Plane? ToDiGi(this DiGi.Geometry.Spatial.Classes.CoordinateSystem3D? coordinateSystem3D);

Parameters

coordinateSystem3D CoordinateSystem3D

The CoordinateSystem3D instance to convert.

Returns

Plane
A Plane object if the provided CoordinateSystem3D is not null; otherwise, null.

Convert.ToDiGi(this Plane) Method

Converts a Plane to a CoordinateSystem3D.

public static DiGi.Geometry.Spatial.Classes.CoordinateSystem3D? ToDiGi(this DiGi.Geometry.Spatial.Classes.Plane? plane);

Parameters

plane Plane

The Plane instance to convert.

Returns

CoordinateSystem3D
A CoordinateSystem3D representing the plane's coordinate system, or null if the provided Plane is null.

Convert.ToNumerics(this Coordinate3D) Method

Converts a Coordinate3D instance to a nullable System.Numerics.Vector3.

public static System.Nullable<System.Numerics.Vector3> ToNumerics(this DiGi.Geometry.Spatial.Classes.Coordinate3D coordinate3D);

Parameters

coordinate3D Coordinate3D

The Coordinate3D instance to convert.

Returns

System.Nullable<System.Numerics.Vector3>
A System.Numerics.Vector3 containing the converted coordinates, or null if the provided Coordinate3D is null.

Create Class

public static class Create

Inheritance System.Object → Create

Methods

Create.AddBooleanOperationCandidates(List<BooleanOperationCandidate>, List<IPolygonalFace3D>, BVHNode, bool, double) Method

Splits every face of polygonalFace3Ds by the faces of the other polyhedron that overlap it (culled through bVHNode) and appends the resulting fragments (or the unsplit face) to booleanOperationCandidates.

private static void AddBooleanOperationCandidates(System.Collections.Generic.List<DiGi.Geometry.Spatial.Create.BooleanOperationCandidate> booleanOperationCandidates, System.Collections.Generic.List<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D> polygonalFace3Ds, DiGi.Geometry.Spatial.Classes.BVHNode bVHNode, bool fromFirst, double tolerance);

Parameters

booleanOperationCandidates System.Collections.Generic.List<BooleanOperationCandidate>

polygonalFace3Ds System.Collections.Generic.List<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>

bVHNode BVHNode

fromFirst System.Boolean

tolerance System.Double

Create.BooleanOperationGeometry3Ds(List<IPolygonalFace3D>) Method

Assembles the final boolean operation geometry from the deduplicated boundary faces: a single solid Polyhedron when the faces form a valid closed volume, the individual faces as a fallback for non-solid remnants, or null when no geometry remains.

private static System.Collections.Generic.List<DiGi.Geometry.Spatial.Interfaces.IGeometry3D>? BooleanOperationGeometry3Ds(System.Collections.Generic.List<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D> polygonalFace3Ds);

Parameters

polygonalFace3Ds System.Collections.Generic.List<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>

Returns

System.Collections.Generic.List<DiGi.Geometry.Spatial.Interfaces.IGeometry3D>

Create.BooleanOperationPolygonalFace3Ds<TPolygonalFace3D>(BooleanOpertaionType, Polyhedron<TPolygonalFace3D>, Polyhedron<TPolygonalFace3D>, List<IPolygonalFace3D>, List<IPolygonalFace3D>, BVHNode, double) Method

Shared core of the 3D boolean operations (Union, Intersection, Difference): splits the faces of each polyhedron by the overlapping faces of the other, classifies every resulting fragment against the other volume with a single BVH-accelerated point-relation query, and deduplicates coplanar overlapping fragments via a spatial hash.

internal static System.Collections.Generic.List<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D> BooleanOperationPolygonalFace3Ds<TPolygonalFace3D>(DiGi.Geometry.Core.Enums.BooleanOpertaionType booleanOpertaionType, DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D> polyhedron_1, DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D> polyhedron_2, System.Collections.Generic.List<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D> polygonalFace3Ds_1, System.Collections.Generic.List<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D> polygonalFace3Ds_2, out DiGi.Geometry.Spatial.Classes.BVHNode bVHNode_2, double tolerance)
    where TPolygonalFace3D : DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D;

Type parameters

TPolygonalFace3D

The type of polygonal face, which must implement DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D.

Parameters

booleanOpertaionType BooleanOpertaionType

The boolean operation deciding which fragments are kept.

polyhedron_1 DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>

The first polyhedron (used only for the rare exact outward-normal fallback).

polyhedron_2 DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>

The second polyhedron (used only for the rare exact outward-normal fallback).

polygonalFace3Ds_1 System.Collections.Generic.List<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>

The faces of the first polyhedron (non-empty).

polygonalFace3Ds_2 System.Collections.Generic.List<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>

The faces of the second polyhedron (non-empty).

bVHNode_2 BVHNode

The Bounding Volume Hierarchy (BVH) built for the second polyhedron, reusable by the caller.

tolerance System.Double

The distance tolerance for the boolean computations.

Returns

System.Collections.Generic.List<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>
The deduplicated boundary faces of the result volume (never null; possibly empty). Difference results have the retained second-polyhedron fragments inverted.

Create.BooleanOperationResult3D<TPolygonalFace3D>(this BooleanOpertaionType, Polyhedron<TPolygonalFace3D>, Polyhedron<TPolygonalFace3D>, double) Method

Calculates the 3D boolean operation result between two polyhedra based on the specified operation type.

public static DiGi.Geometry.Spatial.Classes.BooleanOperationResult3D? BooleanOperationResult3D<TPolygonalFace3D>(this DiGi.Geometry.Core.Enums.BooleanOpertaionType booleanOpertaionType, DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>? polyhedron_1, DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>? polyhedron_2, double tolerance=1E-06)
    where TPolygonalFace3D : DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D;

Type parameters

TPolygonalFace3D

The type of polygonal face, which must implement DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D.

Parameters

booleanOpertaionType BooleanOpertaionType

The type of the boolean operation.

polyhedron_1 DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>

The first polyhedron.

polyhedron_2 DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>

The second polyhedron.

tolerance System.Double

The distance tolerance for the boolean computations.

Returns

BooleanOperationResult3D
A BooleanOperationResult3D containing the result of the operation, or null if the operation type is not supported.

Create.BoundingBox3D(Range<double>, Range<double>, Range<double>) Method

Creates a BoundingBox3D based on the provided X, Y, and Z ranges.

public static DiGi.Geometry.Spatial.Classes.BoundingBox3D? BoundingBox3D(DiGi.Core.Classes.Range<double>? x, DiGi.Core.Classes.Range<double>? y, DiGi.Core.Classes.Range<double>? z);

Parameters

x DiGi.Core.Classes.Range<System.Double>

The Range<double> for the X axis.

y DiGi.Core.Classes.Range<System.Double>

The Range<double> for the Y axis.

z DiGi.Core.Classes.Range<System.Double>

The Range<double> for the Z axis.

Returns

BoundingBox3D
A BoundingBox3D if all provided ranges are not null; otherwise, null.

Create.BoundingBox3D(this IEnumerable<BoundingBox3D>) Method

Calculates a single BoundingBox3D that encompasses all provided bounding boxes in the collection.

public static DiGi.Geometry.Spatial.Classes.BoundingBox3D? BoundingBox3D(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.BoundingBox3D>? boundingBox3Ds);

Parameters

boundingBox3Ds System.Collections.Generic.IEnumerable<BoundingBox3D>

An System.Collections.Generic.IEnumerable<> of BoundingBox3D objects to process.

Returns

BoundingBox3D
A BoundingBox3D representing the union of all input bounding boxes, or null if the collection is null or contains no valid bounding boxes.

Create.BoundingBox3D(this IEnumerable<IPolygonalFace3D>) Method

Calculates a BoundingBox3D that encompasses all provided polygonal faces.

public static DiGi.Geometry.Spatial.Classes.BoundingBox3D? BoundingBox3D(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>? polygonalFace3Ds);

Parameters

polygonalFace3Ds System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>

An System.Collections.Generic.IEnumerable<> of faces to process.

Returns

BoundingBox3D
A BoundingBox3D representing the bounding box, or null if the collection is null or contains no valid bounding boxes.

Create.DifferenceResult3D<TPolygonalFace3D>(this Polyhedron<TPolygonalFace3D>, Polyhedron<TPolygonalFace3D>, double) Method

Calculates the 3D boolean difference between two polyhedra defined by TPolygonalFace3D faces.

public static DiGi.Geometry.Spatial.Classes.DifferenceResult3D? DifferenceResult3D<TPolygonalFace3D>(this DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>? polyhedron_1, DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>? polyhedron_2, double tolerance=1E-06)
    where TPolygonalFace3D : DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D;

Type parameters

TPolygonalFace3D

The type of polygonal face, which must implement DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D.

Parameters

polyhedron_1 DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>

The first polyhedron (from which to subtract).

polyhedron_2 DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>

The second polyhedron (to subtract).

tolerance System.Double

The distance tolerance for boolean difference computations.

Returns

DifferenceResult3D
A DifferenceResult3D containing the difference geometry (either a Polyhedron or individual face/segment elements), or null if polyhedron_1 is null.

Remarks

The boundary of the difference polyhedron A \ B is composed of:

  • Faces of A that lie outside the volume of B.
  • Faces of B that lie inside the volume of A, with their orientations inverted (normals flipped) to face outward from the resulting solid difference volume.

If the remaining boundary pieces do not form a closed solid volume (less than 4 faces, or non-closed shell), the method falls back to returning the individual PolygonalFace3D elements representing the remaining boundary surfaces.

Create.Ellipsoid(Point3D, Point3D, double, double, double) Method

Creates an Ellipsoid(Point3D, Point3D, double, double, double) based on two focal points and two semi-minor axes.

public static DiGi.Geometry.Spatial.Classes.Ellipsoid? Ellipsoid(DiGi.Geometry.Spatial.Classes.Point3D? focalPoint_1, DiGi.Geometry.Spatial.Classes.Point3D? focalPoint_2, double b, double c, double tolerance=1E-06);

Parameters

focalPoint_1 Point3D

The first Point3D representing a focal point of the ellipsoid.

focalPoint_2 Point3D

The second Point3D representing a focal point of the ellipsoid.

b System.Double

A System.Double value representing one of the semi-minor axes.

c System.Double

A System.Double value representing another semi-minor axis.

tolerance System.Double

A System.Double value specifying the distance tolerance.

Returns

Ellipsoid
An Ellipsoid(Point3D, Point3D, double, double, double) object if the parameters are valid and a valid ellipsoid can be constructed; otherwise, null.

Create.InteriorSideInsideOther<TPolygonalFace3D>(BooleanOperationCandidate, Point3D, BVHNodePointRelationSolver, BVHNodePointRelationSolver, Polyhedron<TPolygonalFace3D>, Polyhedron<TPolygonalFace3D>, double) Method

For a candidate fragment lying on the other volume's boundary, determines whether the parent-volume interior side of the (coplanar) boundary lies inside the other volume.

The probe is evaluated on both sides of the face plane, so the sign of the face normal is irrelevant - this avoids the expensive outward-normal orientation ray cast of GetNormal(int, bool, Nullable<Side>, double) in the common case. The exact outward normal is only computed as a rare fallback (very thin parent volume or a probe near a parent edge).

private static bool InteriorSideInsideOther<TPolygonalFace3D>(DiGi.Geometry.Spatial.Create.BooleanOperationCandidate booleanOperationCandidate, DiGi.Geometry.Spatial.Classes.Point3D point3D, DiGi.Geometry.Spatial.Classes.BVHNodePointRelationSolver bVHNodePointRelationSolver_Parent, DiGi.Geometry.Spatial.Classes.BVHNodePointRelationSolver bVHNodePointRelationSolver_Other, DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D> polyhedron_1, DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D> polyhedron_2, double tolerance)
    where TPolygonalFace3D : DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D;

Type parameters

TPolygonalFace3D

Parameters

booleanOperationCandidate BooleanOperationCandidate

point3D Point3D

bVHNodePointRelationSolver_Parent BVHNodePointRelationSolver

bVHNodePointRelationSolver_Other BVHNodePointRelationSolver

polyhedron_1 DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>

polyhedron_2 DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>

tolerance System.Double

Returns

System.Boolean

Create.IntersectionResult3D(this BoundingBox3D, Point3D, Vector3D, double) Method

Calculates the intersection between a 3D bounding box and a ray defined by a point and a direction.

public static DiGi.Geometry.Spatial.Classes.IntersectionResult3D? IntersectionResult3D(this DiGi.Geometry.Spatial.Classes.BoundingBox3D? boundingBox3D, DiGi.Geometry.Spatial.Classes.Point3D? point3D, DiGi.Geometry.Spatial.Classes.Vector3D? vector3D_Direction, double tolerance=1E-06);

Parameters

boundingBox3D BoundingBox3D

The BoundingBox3D to check for intersection.

point3D Point3D

The Point3D representing the starting point of the ray.

vector3D_Direction Vector3D

The Vector3D(Vector3D, bool) representing the direction of the ray.

tolerance System.Double

A System.Double value specifying the distance tolerance for the intersection calculation.

Returns

IntersectionResult3D
An IntersectionResult3D containing the result of the intersection, or null if any of the required parameters are null.

Create.IntersectionResult3D(this BoundingBox3D, ILinear3D, double) Method

Calculates the intersection between a BoundingBox3D and an DiGi.Geometry.Spatial.Interfaces.ILinear3D.

public static DiGi.Geometry.Spatial.Classes.IntersectionResult3D? IntersectionResult3D(this DiGi.Geometry.Spatial.Classes.BoundingBox3D? boundingBox3D, DiGi.Geometry.Spatial.Interfaces.ILinear3D? linear3D, double tolerance=1E-06);

Parameters

boundingBox3D BoundingBox3D

The BoundingBox3D to intersect.

linear3D DiGi.Geometry.Spatial.Interfaces.ILinear3D

The DiGi.Geometry.Spatial.Interfaces.ILinear3D to intersect.

tolerance System.Double

The System.Double tolerance for the intersection calculation.

Returns

IntersectionResult3D
An IntersectionResult3D containing the result of the intersection, or null if either input is null or the operation fails.

Create.IntersectionResult3D(this Sphere, Line3D, double) Method

Calculates the intersection between a sphere and a 3D line.

public static DiGi.Geometry.Spatial.Classes.IntersectionResult3D? IntersectionResult3D(this DiGi.Geometry.Spatial.Classes.Sphere? sphere, DiGi.Geometry.Spatial.Classes.Line3D? line3D, double tolerance=1E-06);

Parameters

sphere Sphere

The Sphere to intersect.

line3D Line3D

The Line3D to intersect.

tolerance System.Double

The System.Double tolerance value used for the intersection calculation.

Returns

IntersectionResult3D
An IntersectionResult3D containing the intersection details, or null if either the sphere or line is null.

Create.IntersectionResult3D(this Sphere, Segment3D, double) Method

Calculates the intersection between a Sphere and a Segment3D.

public static DiGi.Geometry.Spatial.Classes.IntersectionResult3D? IntersectionResult3D(this DiGi.Geometry.Spatial.Classes.Sphere? sphere, DiGi.Geometry.Spatial.Classes.Segment3D? segment3D, double tolerance=1E-06);

Parameters

sphere Sphere

The Sphere to intersect.

segment3D Segment3D

The Segment3D to intersect.

tolerance System.Double

A System.Double value representing the distance tolerance for the intersection calculation.

Returns

IntersectionResult3D
An IntersectionResult3D containing the result of the intersection, or null if either the sphere or segment is null.

Create.IntersectionResult3D<TPolygonalFace3D>(this Polyhedron<TPolygonalFace3D>, Polyhedron<TPolygonalFace3D>, double) Method

Calculates the 3D boolean intersection between two polyhedra defined by TPolygonalFace3D faces.

public static DiGi.Geometry.Spatial.Classes.IntersectionResult3D? IntersectionResult3D<TPolygonalFace3D>(this DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>? polyhedron_1, DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>? polyhedron_2, double tolerance=1E-06)
    where TPolygonalFace3D : DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D;

Type parameters

TPolygonalFace3D

The type of polygonal face, which must implement DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D.

Parameters

polyhedron_1 DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>

The first polyhedron to intersect.

polyhedron_2 DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>

The second polyhedron to intersect.

tolerance System.Double

The distance tolerance for intersection computations.

Returns

IntersectionResult3D
An IntersectionResult3D containing the intersection geometry, or null if either input is null.

Create.IntersectionResult3D<TPolygonalFace3D>(this Polyhedron<TPolygonalFace3D>, ILinear3D, double) Method

Calculates the intersection result between a Polyhedron<TPolygonalFace3D> and an DiGi.Geometry.Spatial.Interfaces.ILinear3D.

public static DiGi.Geometry.Spatial.Classes.IntersectionResult3D? IntersectionResult3D<TPolygonalFace3D>(this DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>? polyhedron, DiGi.Geometry.Spatial.Interfaces.ILinear3D? linear3D, double tolerance=1E-06)
    where TPolygonalFace3D : DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D;

Type parameters

TPolygonalFace3D

The type of polygonal face, which must implement DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D.

Parameters

polyhedron DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>

The Polyhedron<TPolygonalFace3D> to check for intersection.

linear3D DiGi.Geometry.Spatial.Interfaces.ILinear3D

The DiGi.Geometry.Spatial.Interfaces.ILinear3D object to intersect with the polyhedron. Supported implementations are Line3D, Ray3D and Segment3D.

tolerance System.Double

A System.Double value representing the distance tolerance used for calculations.

Returns

IntersectionResult3D
An IntersectionResult3D containing the intersection details, or null if either input is null, the linear type is not supported or the bounding box cannot be determined.

Create.Matrix(this IEnumerable<Point3D>) Method

Creates a DiGi.Math.Classes.Matrix from the specified collection of Point3D points.

public static DiGi.Math.Classes.Matrix? Matrix(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Point3D>? point3Ds);

Parameters

point3Ds System.Collections.Generic.IEnumerable<Point3D>

The System.Collections.Generic.IEnumerable<> of Point3D objects to convert.

Returns

DiGi.Math.Classes.Matrix
A DiGi.Math.Classes.Matrix containing the point coordinates, or null if point3Ds is null.

Create.Matrix(this IEnumerable<Vector3D>) Method

Creates a DiGi.Math.Classes.Matrix from a collection of Vector3D(Vector3D, bool).

public static DiGi.Math.Classes.Matrix? Matrix(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Vector3D>? vector3Ds);

Parameters

vector3Ds System.Collections.Generic.IEnumerable<Vector3D>

An System.Collections.Generic.IEnumerable<> of Vector3D(Vector3D, bool) objects to be converted into a matrix.

Returns

DiGi.Math.Classes.Matrix
A DiGi.Math.Classes.Matrix containing the vectors as rows, or null if the input collection is null.

Create.Mesh3D(this Ellipsoid, double) Method

Generates a Mesh3D from the specified Ellipsoid(Point3D, Point3D, double, double, double) using an angle factor to determine the resolution of stacks and slices.

public static DiGi.Geometry.Spatial.Classes.Mesh3D? Mesh3D(this DiGi.Geometry.Spatial.Classes.Ellipsoid? ellipsoid, double angleFactor);

Parameters

ellipsoid Ellipsoid

The Ellipsoid(Point3D, Point3D, double, double, double) instance to be converted into a mesh.

angleFactor System.Double

A System.Double value used to calculate the number of stacks and slices for the resulting mesh.

Returns

Mesh3D
A Mesh3D object representing the ellipsoid, or null if the provided Ellipsoid(Point3D, Point3D, double, double, double) is null or the angle factor does not yield a positive angular step.

Create.Mesh3D(this Ellipsoid, int, int) Method

Generates a Mesh3D from the specified Ellipsoid(Point3D, Point3D, double, double, double).

public static DiGi.Geometry.Spatial.Classes.Mesh3D? Mesh3D(this DiGi.Geometry.Spatial.Classes.Ellipsoid? ellipsoid, int stacks, int slices);

Parameters

ellipsoid Ellipsoid

The Ellipsoid(Point3D, Point3D, double, double, double) to convert into a mesh.

stacks System.Int32

The number of stacks (latitude divisions) as an System.Int32 used to generate the mesh. Must be at least 2.

slices System.Int32

The number of slices (longitude divisions) as an System.Int32 used to generate the mesh. Must be at least 3.

Returns

Mesh3D
A Mesh3D representing the ellipsoid, or null if the provided Ellipsoid(Point3D, Point3D, double, double, double) is null, incomplete, or the resolution values are out of range.

Create.Mesh3D(this Polyhedron, double) Method

Converts the specified Polyhedron to a Mesh3D by triangulating its polygonal faces.

public static DiGi.Geometry.Spatial.Classes.Mesh3D? Mesh3D(this DiGi.Geometry.Spatial.Classes.Polyhedron? polyhedron, double tolerance=1E-06);

Parameters

polyhedron Polyhedron

The Polyhedron instance to convert.

tolerance System.Double

The System.Double tolerance used during the triangulation of the polygonal faces.

Returns

Mesh3D
A Mesh3D object representing the triangulated mesh, or null if the Polyhedron is null or contains no valid faces.

Create.Mesh3D(this IPolygonalFace3D, double) Method

Converts a polygonal face to a 3D mesh using the specified distance tolerance.

public static DiGi.Geometry.Spatial.Classes.Mesh3D? Mesh3D(this DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D? polygonalFace3D, double tolerance=1E-06);

Parameters

polygonalFace3D DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D

The DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D instance to convert.

tolerance System.Double

The System.Double distance tolerance used for triangulation.

Returns

Mesh3D
A Mesh3D object representing the polygonal face, or null if the input is null.

Create.Mesh3D(this IEnumerable<Triangle3D>, double) Method

Creates a Mesh3D from a collection of Triangle3D objects.

public static DiGi.Geometry.Spatial.Classes.Mesh3D? Mesh3D(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Triangle3D>? triangle3Ds, double tolerance=1E-06);

Parameters

triangle3Ds System.Collections.Generic.IEnumerable<Triangle3D>

The System.Collections.Generic.IEnumerable<> containing the triangles to be converted into a mesh.

tolerance System.Double

The System.Double tolerance value used for merging coincident points.

Returns

Mesh3D
A Mesh3D object if the input collection is not null and contains valid triangles; otherwise, null.

Create.Mesh3Ds(this Mesh3D) Method

Decomposes the specified mesh into its connected components.

public static System.Collections.Generic.List<DiGi.Geometry.Spatial.Classes.Mesh3D>? Mesh3Ds(this DiGi.Geometry.Spatial.Classes.Mesh3D? mesh3D);

Parameters

mesh3D Mesh3D

The Mesh3D to decompose.

Returns

System.Collections.Generic.List<Mesh3D>
A System.Collections.Generic.List<> of Mesh3D instances, each representing a connected component, or null if the input is null or empty.

Create.PlanarIntersectionResult(this Plane, BoundingBox3D, double) Method

Calculates the planar intersection result between a plane and a 3D bounding box.

public static DiGi.Geometry.Spatial.Classes.PlanarIntersectionResult? PlanarIntersectionResult(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Classes.BoundingBox3D? boundingBox3D, double tolerance=1E-06);

Parameters

plane Plane

The Plane to intersect with the bounding box.

boundingBox3D BoundingBox3D

The BoundingBox3D to be intersected by the plane.

tolerance System.Double

A System.Double value representing the distance tolerance for the intersection calculation.

Returns

PlanarIntersectionResult
A PlanarIntersectionResult containing the result of the intersection, or null if either the plane or bounding box is null, or if a polyhedron cannot be created from the bounding box.

Create.PlanarIntersectionResult(this Plane, Line3D, double) Method

Calculates the intersection result between a Plane and a Line3D.

public static DiGi.Geometry.Spatial.Classes.PlanarIntersectionResult? PlanarIntersectionResult(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Classes.Line3D? line3D, double tolerance=1E-06);

Parameters

plane Plane

The Plane to intersect.

line3D Line3D

The Line3D to intersect.

tolerance System.Double

The System.Double tolerance used for the intersection calculation.

Returns

PlanarIntersectionResult
A PlanarIntersectionResult containing the result of the intersection, or null if the plane or line is null.

Create.PlanarIntersectionResult(this Plane, Plane, double) Method

Calculates the intersection result of two planes.

public static DiGi.Geometry.Spatial.Classes.PlanarIntersectionResult? PlanarIntersectionResult(this DiGi.Geometry.Spatial.Classes.Plane? plane_1, DiGi.Geometry.Spatial.Classes.Plane? plane_2, double tolerance=1E-06);

Parameters

plane_1 Plane

The first Plane to intersect.

plane_2 Plane

The second Plane to intersect.

tolerance System.Double

The System.Double tolerance used for the intersection calculation.

Returns

PlanarIntersectionResult
A PlanarIntersectionResult if an intersection is found; otherwise, null.

Create.PlanarIntersectionResult(this Plane, Point3D, Point3D, bool, bool, double) Method

Calculates the intersection result between a Plane and a line segment defined by two Point3D points.

public static DiGi.Geometry.Spatial.Classes.PlanarIntersectionResult? PlanarIntersectionResult(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Classes.Point3D? point3D_1, DiGi.Geometry.Spatial.Classes.Point3D? point3D_2, bool bounded_1=false, bool bounded_2=false, double tolerance=1E-06);

Parameters

plane Plane

The Plane to intersect with.

point3D_1 Point3D

The first Point3D defining the line segment.

point3D_2 Point3D

The second Point3D defining the line segment.

bounded_1 System.Boolean

A System.Boolean value indicating whether the intersection is bounded for the first point.

bounded_2 System.Boolean

A System.Boolean value indicating whether the intersection is bounded for the second point.

tolerance System.Double

The System.Double tolerance used for distance calculations.

Returns

PlanarIntersectionResult
A PlanarIntersectionResult containing the result of the intersection, or null if any input parameters are null.

Create.PlanarIntersectionResult(this Plane, Point3D, double) Method

Calculates the planar intersection result for a given Plane and Point3D.

public static DiGi.Geometry.Spatial.Classes.PlanarIntersectionResult? PlanarIntersectionResult(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Classes.Point3D? point3D, double tolerance=1E-06);

Parameters

plane Plane

The Plane used for the intersection calculation.

point3D Point3D

The Point3D to be checked against the plane.

tolerance System.Double

A System.Double value specifying the distance tolerance for determining if the point lies on the plane.

Returns

PlanarIntersectionResult
A PlanarIntersectionResult containing the intersection details, or null if either input is null or projection fails.

Create.PlanarIntersectionResult(this Plane, Ray3D, double) Method

Calculates the intersection result between a plane and a 3D ray.

public static DiGi.Geometry.Spatial.Classes.PlanarIntersectionResult? PlanarIntersectionResult(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Classes.Ray3D? ray3D, double tolerance=1E-06);

Parameters

plane Plane

The Plane to be intersected.

ray3D Ray3D

The Ray3D used for the intersection calculation.

tolerance System.Double

A System.Double value representing the distance tolerance for the intersection.

Returns

PlanarIntersectionResult
A PlanarIntersectionResult if an intersection is found and inputs are valid; otherwise, null.

Create.PlanarIntersectionResult(this Plane, Segment3D, double) Method

Calculates the intersection result between a plane and a 3D segment.

public static DiGi.Geometry.Spatial.Classes.PlanarIntersectionResult? PlanarIntersectionResult(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Classes.Segment3D? segment3D, double tolerance=1E-06);

Parameters

plane Plane

The Plane to intersect.

segment3D Segment3D

The Segment3D to intersect.

tolerance System.Double

The System.Double tolerance used for the intersection calculation.

Returns

PlanarIntersectionResult
A PlanarIntersectionResult containing the intersection details, or null if either input is null or a result cannot be determined.

Create.PlanarIntersectionResult(this Plane, IPolygonalFace3D, double) Method

Calculates the planar intersection result between a plane and a 3D polygonal face.

public static DiGi.Geometry.Spatial.Classes.PlanarIntersectionResult? PlanarIntersectionResult(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D? polygonalFace3D, double tolerance=1E-06);

Parameters

plane Plane

The Plane to evaluate.

polygonalFace3D DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D

The DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D to evaluate.

tolerance System.Double

The System.Double tolerance used for coplanar and distance checks.

Returns

PlanarIntersectionResult
A PlanarIntersectionResult if the intersection is successfully calculated; otherwise, null.

Create.PlanarIntersectionResult(this Plane, IPolyhedron, double) Method

Calculates the planar intersection between a plane and a polyhedron.

public static DiGi.Geometry.Spatial.Classes.PlanarIntersectionResult? PlanarIntersectionResult(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Interfaces.IPolyhedron? polyhedron, double tolerance=1E-06);

Parameters

plane Plane

The Plane to intersect with the polyhedron.

polyhedron DiGi.Geometry.Spatial.Interfaces.IPolyhedron

The DiGi.Geometry.Spatial.Interfaces.IPolyhedron to be intersected by the plane.

tolerance System.Double

A System.Double value representing the distance tolerance for intersection calculations.

Returns

PlanarIntersectionResult
A PlanarIntersectionResult containing the result of the intersection, or null if either input is null or the polyhedron contains no faces.

Create.PlanarIntersectionResult(this Plane, ISegmentable3D, double) Method

Calculates the planar intersection result between a Plane and an DiGi.Geometry.Spatial.Interfaces.ISegmentable3D object.

public static DiGi.Geometry.Spatial.Classes.PlanarIntersectionResult? PlanarIntersectionResult(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Interfaces.ISegmentable3D? segmentable3D, double tolerance=1E-06);

Parameters

plane Plane

The Plane used for the intersection calculation.

segmentable3D DiGi.Geometry.Spatial.Interfaces.ISegmentable3D

The DiGi.Geometry.Spatial.Interfaces.ISegmentable3D object to be intersected with the plane.

tolerance System.Double

The System.Double tolerance value used to determine if an intersection occurs.

Returns

PlanarIntersectionResult
A PlanarIntersectionResult containing the intersection data, or null if the Plane or DiGi.Geometry.Spatial.Interfaces.ISegmentable3D is null, or if no segments are available.

Create.PlanarIntersectionResult(this IPolygonalFace3D, Line3D, double) Method

Calculates the planar intersection result between a polygonal face and a line.

public static DiGi.Geometry.Spatial.Classes.PlanarIntersectionResult? PlanarIntersectionResult(this DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D? polygonalFace3D, DiGi.Geometry.Spatial.Classes.Line3D? line3D, double tolerance=1E-06);

Parameters

polygonalFace3D DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D

The DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D instance to intersect.

line3D Line3D

The Line3D instance to intersect.

tolerance System.Double

A System.Double value representing the distance tolerance for the intersection calculation.

Returns

PlanarIntersectionResult
A PlanarIntersectionResult containing the result of the intersection, or null if either input is null or an intersection cannot be determined.

Create.PlanarIntersectionResult(this IPolygonalFace3D, Point3D, Point3D, bool, bool, double) Method

Calculates the planar intersection between a 3D polygonal face and a line segment defined by two points.

public static DiGi.Geometry.Spatial.Classes.PlanarIntersectionResult? PlanarIntersectionResult(this DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D? polygonalFace3D, DiGi.Geometry.Spatial.Classes.Point3D? point3D_1, DiGi.Geometry.Spatial.Classes.Point3D? point3D_2, bool bounded_1, bool bounded_2, double tolerance=1E-06);

Parameters

polygonalFace3D DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D

The DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D to intersect with.

point3D_1 Point3D

The first Point3D defining the line segment.

point3D_2 Point3D

The second Point3D defining the line segment.

bounded_1 System.Boolean

A System.Boolean value indicating whether the intersection is bounded by the first point.

bounded_2 System.Boolean

A System.Boolean value indicating whether the intersection is bounded by the second point.

tolerance System.Double

The System.Double tolerance used for distance calculations.

Returns

PlanarIntersectionResult
A PlanarIntersectionResult containing the result of the intersection, or null if the input parameters are null or an intersection cannot be determined.

Create.PlanarIntersectionResult(this IPolygonalFace3D, Point3D, double) Method

Calculates the planar intersection result of a Point3D relative to an DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D.

public static DiGi.Geometry.Spatial.Classes.PlanarIntersectionResult? PlanarIntersectionResult(this DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D? polygonalFace3D, DiGi.Geometry.Spatial.Classes.Point3D? point3D, double tolerance=1E-06);

Parameters

polygonalFace3D DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D

The DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D instance to evaluate.

point3D Point3D

The Point3D instance to check for intersection.

tolerance System.Double

A System.Double value representing the distance tolerance used for range checking.

Returns

PlanarIntersectionResult
A PlanarIntersectionResult containing the plane and potentially the projected point, or null if either input is null or the face has no associated plane.

Create.PlanarIntersectionResult(this IPolygonalFace3D, Ray3D, double) Method

Calculates the planar intersection result between a polygonal face and a ray.

public static DiGi.Geometry.Spatial.Classes.PlanarIntersectionResult? PlanarIntersectionResult(this DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D? polygonalFace3D, DiGi.Geometry.Spatial.Classes.Ray3D? ray3D, double tolerance=1E-06);

Parameters

polygonalFace3D DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D

The DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D instance to intersect.

ray3D Ray3D

The Ray3D instance representing the ray.

tolerance System.Double

The System.Double tolerance value used for calculations.

Returns

PlanarIntersectionResult
A PlanarIntersectionResult containing the intersection details, or null if no intersection is found or if either input is null.

Create.PlanarIntersectionResult(this IPolygonalFace3D, Segment3D, double) Method

Calculates the planar intersection result between a polygonal face and a segment.

public static DiGi.Geometry.Spatial.Classes.PlanarIntersectionResult? PlanarIntersectionResult(this DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D? polygonalFace3D, DiGi.Geometry.Spatial.Classes.Segment3D? segment3D, double tolerance=1E-06);

Parameters

polygonalFace3D DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D

The DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D representing the polygonal face.

segment3D Segment3D

The Segment3D representing the line segment.

tolerance System.Double

A System.Double value specifying the distance tolerance for the intersection calculation.

Returns

PlanarIntersectionResult
A PlanarIntersectionResult containing the result of the intersection, or null if the DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D or Segment3D is null.

Create.PlanarIntersectionResult(this IPolygonalFace3D, IPolygonalFace3D, double) Method

Calculates the planar intersection result between two polygonal faces.

public static DiGi.Geometry.Spatial.Classes.PlanarIntersectionResult? PlanarIntersectionResult(this DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D? polygonalFace3D_1, DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D? polygonalFace3D_2, double tolerance=1E-06);

Parameters

polygonalFace3D_1 DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D

The first DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D face.

polygonalFace3D_2 DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D

The second DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D face.

tolerance System.Double

The System.Double tolerance used for the intersection calculation.

Returns

PlanarIntersectionResult
A PlanarIntersectionResult containing the result of the planar intersection, or null if either face is null or their planes are not defined.

Create.PlanarIntersectionResult(this IPolygonalFace3D, IPolyhedron, double) Method

Calculates the planar intersection result between a polygonal face and all faces of a polyhedron.

public static DiGi.Geometry.Spatial.Classes.PlanarIntersectionResult? PlanarIntersectionResult(this DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D? polygonalFace3D, DiGi.Geometry.Spatial.Interfaces.IPolyhedron? polyhedron, double tolerance=1E-06);

Parameters

polygonalFace3D DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D

The DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D to be intersected.

polyhedron DiGi.Geometry.Spatial.Interfaces.IPolyhedron

The DiGi.Geometry.Spatial.Interfaces.IPolyhedron whose faces are used for the intersection calculation.

tolerance System.Double

A System.Double value specifying the distance tolerance.

Returns

PlanarIntersectionResult
A PlanarIntersectionResult containing the result of the intersection, or null if either the DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D or the DiGi.Geometry.Spatial.Interfaces.IPolyhedron is null.

Create.PlanarIntersectionResult(this IPolygonalFace3D, IEnumerable<IPolygonalFace3D>, double) Method

Calculates the planar intersection between a reference polygonal face and a collection of other polygonal faces.

public static DiGi.Geometry.Spatial.Classes.PlanarIntersectionResult? PlanarIntersectionResult(this DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D? polygonalFace3D, System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>? polygonalFace3Ds, double tolerance=1E-06);

Parameters

polygonalFace3D DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D

The reference DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D object.

polygonalFace3Ds System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>

An System.Collections.Generic.IEnumerable<> containing the polygonal faces to intersect with the reference face.

tolerance System.Double

A System.Double value specifying the distance tolerance for the intersection calculation.

Returns

PlanarIntersectionResult
A PlanarIntersectionResult object if a valid intersection is found; otherwise, null.

Create.Plane(Point3D) Method

Creates a Plane based on the World Z axis at the specified origin point.

public static DiGi.Geometry.Spatial.Classes.Plane? Plane(DiGi.Geometry.Spatial.Classes.Point3D? origin);

Parameters

origin Point3D

The Point3D representing the origin of the plane. If null, the method returns null.

Returns

Plane
A Plane instance if a valid Point3D is provided; otherwise, null.

Create.Plane(Point3D, Vector3D, Vector3D) Method

Creates a Plane defined by an origin point and two axes.

public static DiGi.Geometry.Spatial.Classes.Plane? Plane(DiGi.Geometry.Spatial.Classes.Point3D? origin, DiGi.Geometry.Spatial.Classes.Vector3D? axisX, DiGi.Geometry.Spatial.Classes.Vector3D? axisY);

Parameters

origin Point3D

The Point3D that defines the origin of the plane.

axisX Vector3D

The Vector3D(Vector3D, bool) that defines the X-axis of the plane.

axisY Vector3D

The Vector3D(Vector3D, bool) that defines the Y-axis of the plane.

Returns

Plane
A Plane instance if all parameters are non-null; otherwise, null.

Create.Plane(double) Method

Creates a plane at the specified elevation along the Z-axis.

public static DiGi.Geometry.Spatial.Classes.Plane? Plane(double elevation);

Parameters

elevation System.Double

The double value representing the elevation of the plane.

Returns

Plane
A Plane object positioned at the given elevation, or null if the provided double is NaN.

Create.Plane(double, int) Method

Creates a plane perpendicular to the specified axis and offsets it by the given value.

public static DiGi.Geometry.Spatial.Classes.Plane? Plane(double value, int dimensionIndex);

Parameters

value System.Double

The distance of type System.Double to move the plane along the axis.

dimensionIndex System.Int32

The index of type System.Int32 representing the dimension (0 for X, 1 for Y, 2 for Z).

Returns

Plane
A Plane object shifted by the value, or null if the dimensionIndex is not a valid axis index.

Create.Plane(this Point3D, Point3D, Point3D) Method

Creates a Plane from three specified Point3D points.

public static DiGi.Geometry.Spatial.Classes.Plane? Plane(this DiGi.Geometry.Spatial.Classes.Point3D? point3D_1, DiGi.Geometry.Spatial.Classes.Point3D? point3D_2, DiGi.Geometry.Spatial.Classes.Point3D? point3D_3);

Parameters

point3D_1 Point3D

The first Point3D point.

point3D_2 Point3D

The second Point3D point.

point3D_3 Point3D

The third Point3D point.

Returns

Plane
A Plane if the points are valid and not collinear; otherwise, null.

Create.Plane(this IEnumerable<Point3D>, double) Method

Creates a Plane from a collection of Point3D points using the specified tolerance.

public static DiGi.Geometry.Spatial.Classes.Plane? Plane(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Point3D>? point3Ds, double tolerance=1E-06);

Parameters

point3Ds System.Collections.Generic.IEnumerable<Point3D>

The System.Collections.Generic.IEnumerable<> of Point3D points used to define the plane.

tolerance System.Double

The System.Double tolerance value used for calculating the normal vector.

Returns

Plane
A Plane if a valid plane can be constructed from the provided points; otherwise, null.

Create.Planes(this BoundingBox3D) Method

Returns a list of Plane objects that define the boundaries of the specified BoundingBox3D.

public static System.Collections.Generic.List<DiGi.Geometry.Spatial.Classes.Plane>? Planes(this DiGi.Geometry.Spatial.Classes.BoundingBox3D? boundingBox3D);

Parameters

boundingBox3D BoundingBox3D

The BoundingBox3D instance from which to extract the planes.

Returns

System.Collections.Generic.List<Plane>
A List<Plane> containing the boundary planes, or null if the BoundingBox3D is null or contains invalid bounds.

Create.Point3Ds(this Segment3D, int) Method

Generates a list of Point3D points from the specified Segment3D based on the provided count.

public static System.Collections.Generic.List<DiGi.Geometry.Spatial.Classes.Point3D>? Point3Ds(this DiGi.Geometry.Spatial.Classes.Segment3D? segment3D, int count);

Parameters

segment3D Segment3D

The Segment3D instance to extract points from.

count System.Int32

The number of Point3D points to retrieve.

Returns

System.Collections.Generic.List<Point3D>
A List<Point3D> containing the requested points, or null if the Segment3D is null, the count is negative, or the points cannot be retrieved.

Create.Polygon3D(Plane, Point2D[]) Method

Creates a Polygon3D instance based on the provided Plane and a collection of Point2D points.

public static DiGi.Geometry.Spatial.Classes.Polygon3D? Polygon3D(DiGi.Geometry.Spatial.Classes.Plane? plane, params DiGi.Geometry.Planar.Classes.Point2D?[]? point2Ds);

Parameters

plane Plane

The Plane that defines the surface of the polygon.

point2Ds Point2D[]

A variable number of Point2D objects representing the vertices of the polygon.

Returns

Polygon3D
A new Polygon3D instance if a valid Plane is provided and there are at least three non-null Point2D points; otherwise, null.

Create.Polygon3D(this Segment3D, Vector3D, double) Method

Creates a Polygon3D from a Segment3D and a Vector3D(Vector3D, bool).

public static DiGi.Geometry.Spatial.Classes.Polygon3D? Polygon3D(this DiGi.Geometry.Spatial.Classes.Segment3D? segment3D, DiGi.Geometry.Spatial.Classes.Vector3D? vector3D, double tolerance=1E-06);

Parameters

segment3D Segment3D

The Segment3D to use as the base for the polygon.

vector3D Vector3D

The Vector3D(Vector3D, bool) used to define the polygon's extent or direction.

tolerance System.Double

The System.Double tolerance value used for length and similarity comparisons.

Returns

Polygon3D
A Polygon3D if a valid polygon can be created; otherwise, null.

Create.Polygon3D(this Segment3D, double, double) Method

Creates a Polygon3D from the specified Segment3D with a given height.

public static DiGi.Geometry.Spatial.Classes.Polygon3D? Polygon3D(this DiGi.Geometry.Spatial.Classes.Segment3D? segment3D, double height, double tolerance=0.0349066);

Parameters

segment3D Segment3D

The Segment3D to be converted into a polygon.

height System.Double

The System.Double height of the resulting polygon.

tolerance System.Double

The System.Double tolerance used to determine if the segment is parallel to the Z-axis.

Returns

Polygon3D
A Polygon3D instance, or null if the Segment3D is null, height is NaN, or the segment direction is parallel to the WorldZ axis within the specified tolerance.

Create.Polygon3D(this Vector3D, IEnumerable<Point3D>) Method

Creates a Polygon3D from the specified normal vector and a collection of 3D points.

public static DiGi.Geometry.Spatial.Classes.Polygon3D? Polygon3D(this DiGi.Geometry.Spatial.Classes.Vector3D? normal, System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Point3D?>? point3Ds);

Parameters

normal Vector3D

The Vector3D(Vector3D, bool) representing the normal vector of the plane.

point3Ds System.Collections.Generic.IEnumerable<Point3D>

An System.Collections.Generic.IEnumerable<> containing the vertices to be used for the polygon.

Returns

Polygon3D
A Polygon3D if a valid polygon can be constructed; otherwise, null.

Create.Polygon3D(this IEnumerable<Point3D>, double) Method

Creates a Polygon3D from a collection of Point3D objects.

public static DiGi.Geometry.Spatial.Classes.Polygon3D? Polygon3D(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Point3D?>? point3Ds, double tolerace=1E-06);

Parameters

point3Ds System.Collections.Generic.IEnumerable<Point3D>

The System.Collections.Generic.IEnumerable<> of Point3D objects used to define the polygon.

tolerace System.Double

The System.Double value representing the distance tolerance for plane calculation.

Returns

Polygon3D
A Polygon3D object if a valid polygon can be created; otherwise, null.

Create.Polygon3D<T>(this IPlanar<T>) Method

Converts a planar object to a Polygon3D.

public static DiGi.Geometry.Spatial.Classes.Polygon3D? Polygon3D<T>(this DiGi.Geometry.Spatial.Interfaces.IPlanar<T>? planar)
    where T : DiGi.Geometry.Planar.Interfaces.IPolygonal2D;

Type parameters

T

The type of the 2D polygonal geometry, which must implement IPolygonal2D.

Parameters

planar DiGi.Geometry.Spatial.Interfaces.IPlanar<T>

The DiGi.Geometry.Spatial.Interfaces.IPlanar<> object to convert.

Returns

Polygon3D
A Polygon3D if the DiGi.Geometry.Spatial.Interfaces.IPlanar<> object, its geometry, and its plane are not null; otherwise, null.

Create.Polygon3Ds(BoundingBox3D) Method

Generates a list of Polygon3D objects from the specified BoundingBox3D.

public static System.Collections.Generic.List<DiGi.Geometry.Spatial.Classes.Polygon3D>? Polygon3Ds(DiGi.Geometry.Spatial.Classes.BoundingBox3D? boundingBox3D);

Parameters

boundingBox3D BoundingBox3D

The BoundingBox3D used to create the polygons.

Returns

System.Collections.Generic.List<Polygon3D>
A List<Polygon3D> containing the generated polygons, or null if the provided BoundingBox3D or its boundaries are null.

Create.PolygonalFace3D(Plane, Point2D[]) Method

Creates a PolygonalFace3D based on the specified Plane and a collection of Point2D vertices.

public static DiGi.Geometry.Spatial.Classes.PolygonalFace3D? PolygonalFace3D(DiGi.Geometry.Spatial.Classes.Plane? plane, params DiGi.Geometry.Planar.Classes.Point2D[]? points);

Parameters

plane Plane

The Plane on which the polygonal face is located.

points Point2D[]

An array of Point2D objects defining the vertices of the polygon.

Returns

PolygonalFace3D
A PolygonalFace3D instance if the Plane and Point2D array are not null and contain at least three points; otherwise, null.

Create.PolygonalFace3D(IPolygonal3D, IEnumerable<IPolygonal3D>, double) Method

Creates a PolygonalFace3D based on an external boundary and optional internal boundaries.

public static DiGi.Geometry.Spatial.Classes.PolygonalFace3D? PolygonalFace3D(DiGi.Geometry.Spatial.Interfaces.IPolygonal3D? externalEdge, System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Interfaces.IPolygonal3D>? internalEdges=null, double tolerance=1E-06);

Parameters

externalEdge DiGi.Geometry.Spatial.Interfaces.IPolygonal3D

The DiGi.Geometry.Spatial.Interfaces.IPolygonal3D representing the external edge of the face.

internalEdges System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Interfaces.IPolygonal3D>

An System.Collections.Generic.IEnumerable<> containing the internal edges (holes) of the face.

tolerance System.Double

The System.Double tolerance value used for distance calculations.

Returns

PolygonalFace3D
A PolygonalFace3D object if the face could be created; otherwise, null.

Create.PolygonalFace3D(this IPolygonalFace3D) Method

Converts an DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D instance to a PolygonalFace3D instance if the underlying plane is a Plane and the geometry is an IPolygonalFace2D.

public static DiGi.Geometry.Spatial.Classes.PolygonalFace3D? PolygonalFace3D(this DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D? polygonalFace3D);

Parameters

polygonalFace3D DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D

The DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D instance to convert.

Returns

PolygonalFace3D
A new PolygonalFace3D instance if the conversion is successful; otherwise, null.

Create.PolygonalFace3D<T>(this Planar<T>) Method

Converts a Planar<T> to a PolygonalFace3D.

public static DiGi.Geometry.Spatial.Classes.PolygonalFace3D? PolygonalFace3D<T>(this DiGi.Geometry.Spatial.Classes.Planar<T>? planar)
    where T : DiGi.Geometry.Planar.Interfaces.IPolygonal2D;

Type parameters

T

The type of the polygonal 2D geometry, which must implement IPolygonal2D.

Parameters

planar DiGi.Geometry.Spatial.Classes.Planar<T>

The Planar<T> instance to convert.

Returns

PolygonalFace3D
A PolygonalFace3D if the conversion is successful; otherwise, null.

Create.PolygonalFace3Ds<TPolygonalFace3D>(Polyhedron<TPolygonalFace3D>) Method

Extracts the faces of the given polyhedron without cloning them.

private static System.Collections.Generic.List<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D> PolygonalFace3Ds<TPolygonalFace3D>(DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D> polyhedron)
    where TPolygonalFace3D : DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D;

Type parameters

TPolygonalFace3D

The type of polygonal face, which must implement DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D.

Parameters

polyhedron DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>

The source polyhedron.

Returns

System.Collections.Generic.List<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>
A list of the polyhedron faces (never null; possibly empty).

Create.Polyhedron(this BoundingBox3D) Method

Converts the specified BoundingBox3D to a Polyhedron.

public static DiGi.Geometry.Spatial.Classes.Polyhedron? Polyhedron(this DiGi.Geometry.Spatial.Classes.BoundingBox3D? boundingBox3D);

Parameters

boundingBox3D BoundingBox3D

The BoundingBox3D instance to convert.

Returns

Polyhedron
A Polyhedron representing the bounding box, or null if the provided BoundingBox3D is null or cannot be converted into a valid polyhedron.

Create.Polyhedron(this Ellipsoid, double) Method

Generates a Polyhedron from the specified Ellipsoid(Point3D, Point3D, double, double, double) using an angle factor to determine the resolution of stacks and slices.

public static DiGi.Geometry.Spatial.Classes.Polyhedron? Polyhedron(this DiGi.Geometry.Spatial.Classes.Ellipsoid? ellipsoid, double angleFactor);

Parameters

ellipsoid Ellipsoid

The Ellipsoid(Point3D, Point3D, double, double, double) instance to be converted into a polyhedron.

angleFactor System.Double

A System.Double value used to calculate the number of stacks and slices for the resulting polyhedron.

Returns

Polyhedron
A Polyhedron composed of triangular faces representing the ellipsoid, or null if the provided Ellipsoid(Point3D, Point3D, double, double, double) is null or the angle factor does not yield a positive angular step.

Create.Polyhedron(this Ellipsoid, int, int) Method

Generates a Polyhedron from the specified Ellipsoid(Point3D, Point3D, double, double, double).

public static DiGi.Geometry.Spatial.Classes.Polyhedron? Polyhedron(this DiGi.Geometry.Spatial.Classes.Ellipsoid? ellipsoid, int stacks, int slices);

Parameters

ellipsoid Ellipsoid

The Ellipsoid(Point3D, Point3D, double, double, double) to convert into a polyhedron.

stacks System.Int32

The number of stacks (latitude divisions) as an System.Int32 used to generate the polyhedron. Must be at least 2.

slices System.Int32

The number of slices (longitude divisions) as an System.Int32 used to generate the polyhedron. Must be at least 3.

Returns

Polyhedron
A Polyhedron composed of triangular faces representing the ellipsoid, or null if the provided Ellipsoid(Point3D, Point3D, double, double, double) is null, incomplete, or the resolution values are out of range.

Create.Polyhedron(this Mesh3D) Method

Converts the specified Mesh3D to a Polyhedron by creating a triangular polygonal face for each mesh triangle.

Faces are built with scalar plane-coordinate arithmetic and adopted directly into the polyhedron without defensive cloning, so the conversion runs without reflection-based copies.

public static DiGi.Geometry.Spatial.Classes.Polyhedron? Polyhedron(this DiGi.Geometry.Spatial.Classes.Mesh3D? mesh3D);

Parameters

mesh3D Mesh3D

The Mesh3D instance to convert.

Returns

Polyhedron
A Polyhedron composed of triangular faces, or null if the Mesh3D is null, invalid, or yields fewer than four valid faces.

Create.Polyhedron(this PolygonalFaceExtrusion, double) Method

Creates a Polyhedron from the specified PolygonalFaceExtrusion.

public static DiGi.Geometry.Spatial.Classes.Polyhedron? Polyhedron(this DiGi.Geometry.Spatial.Classes.PolygonalFaceExtrusion? polygonalFaceExtrusion, double tolerance=1E-06);

Parameters

polygonalFaceExtrusion PolygonalFaceExtrusion

The PolygonalFaceExtrusion to convert into a Polyhedron.

tolerance System.Double

The System.Double tolerance value used for the operation.

Returns

Polyhedron
A Polyhedron if the PolygonalFaceExtrusion is not null; otherwise, null.

Create.Polyhedron(this IPolygonalFace3D, Vector3D, double) Method

Creates a Polyhedron(this IPolygonalFace3D, Vector3D, double) from the specified DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D and Vector3D(Vector3D, bool).

public static DiGi.Geometry.Spatial.Classes.Polyhedron? Polyhedron(this DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D? polygonalFace3D, DiGi.Geometry.Spatial.Classes.Vector3D? vector3D, double tolerance=1E-06);

Parameters

polygonalFace3D DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D

The DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D that serves as the base of the polyhedron.

vector3D Vector3D

The Vector3D(Vector3D, bool) defining the direction and magnitude for the polyhedron creation.

tolerance System.Double

A System.Double value representing the distance tolerance used for calculations.

Returns

Polyhedron
A Polyhedron if successfully created; otherwise, null.

Create.Polyhedron(this IPolyhedron) Method

Converts the specified DiGi.Geometry.Spatial.Interfaces.IPolyhedron to a Polyhedron.

public static DiGi.Geometry.Spatial.Classes.Polyhedron? Polyhedron(this DiGi.Geometry.Spatial.Interfaces.IPolyhedron polyhedron);

Parameters

polyhedron DiGi.Geometry.Spatial.Interfaces.IPolyhedron

The DiGi.Geometry.Spatial.Interfaces.IPolyhedron instance to convert.

Returns

Polyhedron
A Polyhedron instance if the conversion is successful; otherwise, null.

Create.Polyhedron(this IEnumerable<IPolygonalFace3D>) Method

Creates a Polyhedron(this IPolygonalFace3D, Vector3D, double) from the specified collection of polygonal faces.

public static DiGi.Geometry.Spatial.Classes.Polyhedron? Polyhedron(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>? polygonalFace3Ds);

Parameters

polygonalFace3Ds System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>

An System.Collections.Generic.IEnumerable<> containing the polygonal faces to be used for the construction.

Returns

Polyhedron
A new Polyhedron instance if the System.Collections.Generic.IEnumerable<> is not null and contains at least four elements; otherwise, null.

Create.ProjectionResult(this Plane, Ellipse3D, double) Method

Calculates the projection result of a 3D ellipse onto a plane.

public static DiGi.Geometry.Spatial.Classes.ProjectionResult? ProjectionResult(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Classes.Ellipse3D? ellipse3D, double tolerance=1E-06);

Parameters

plane Plane

The Plane onto which the ellipse is projected.

ellipse3D Ellipse3D

The Ellipse3D to be projected.

tolerance System.Double

The System.Double tolerance used to determine if the plane and the ellipse's plane are parallel.

Returns

ProjectionResult
A ProjectionResult containing the projected 2D ellipse, or null if either the Plane or Ellipse3D is null.

Create.ProjectionResult(this Plane, Line3D, double) Method

Projects a Line3D onto a Plane.

public static DiGi.Geometry.Spatial.Classes.ProjectionResult? ProjectionResult(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Classes.Line3D? line3D, double tolerance=1E-06);

Parameters

plane Plane

The Plane to project the line onto.

line3D Line3D

The Line3D to be projected.

tolerance System.Double

The System.Double tolerance used for similarity and intersection calculations.

Returns

ProjectionResult
A ProjectionResult containing the projection results, or null if either input is null or the projection cannot be determined.

Create.ProjectionResult(this Plane, Point3D) Method

Projects a Point3D onto a Plane to create a ProjectionResult.

public static DiGi.Geometry.Spatial.Classes.ProjectionResult? ProjectionResult(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Classes.Point3D? point3D);

Parameters

plane Plane

The Plane used for the projection.

point3D Point3D

The Point3D to be projected onto the plane.

Returns

ProjectionResult
A ProjectionResult containing the result of the projection, or null if the Plane or Point3D is null, or if the conversion to a Point2D fails.

Create.ProjectionResult(this Plane, Polygon3D, double) Method

Projects a Polygon3D onto a Plane.

public static DiGi.Geometry.Spatial.Classes.ProjectionResult? ProjectionResult(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Classes.Polygon3D? polygon3D, double tolerance=1E-06);

Parameters

plane Plane

The Plane to project onto.

polygon3D Polygon3D

The Polygon3D to be projected.

tolerance System.Double

A System.Double value representing the distance tolerance for the projection.

Returns

ProjectionResult
A ProjectionResult containing the result of the projection, or null if the input parameters are null or the resulting geometry is invalid.

Create.ProjectionResult(this Plane, PolygonalFace3D, double) Method

Calculates the projection result of a 3D polygonal face onto a plane.

public static DiGi.Geometry.Spatial.Classes.ProjectionResult? ProjectionResult(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Classes.PolygonalFace3D? polygonalFace3D, double tolerance=1E-06);

Parameters

plane Plane

The Plane to project onto.

polygonalFace3D PolygonalFace3D

The PolygonalFace3D to be projected.

tolerance System.Double

A System.Double value representing the distance tolerance for the projection.

Returns

ProjectionResult
A ProjectionResult if the projection is successful; otherwise, null.

Create.ProjectionResult(this Plane, Ray3D, double) Method

Calculates the projection of a 3D ray onto a plane.

public static DiGi.Geometry.Spatial.Classes.ProjectionResult? ProjectionResult(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Classes.Ray3D? ray3D, double tolerance=1E-06);

Parameters

plane Plane

The Plane to project the ray onto.

ray3D Ray3D

The Ray3D to be projected.

tolerance System.Double

The System.Double tolerance used for similarity and distance calculations.

Returns

ProjectionResult
A ProjectionResult containing the projection data, or null if either the Plane or Ray3D is null.

Create.ProjectionResult(this Plane, Segment3D, double) Method

Calculates the projection result of a Segment3D onto a Plane.

public static DiGi.Geometry.Spatial.Classes.ProjectionResult? ProjectionResult(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Classes.Segment3D? segment3D, double tolerance=1E-06);

Parameters

plane Plane

The Plane to project onto.

segment3D Segment3D

The Segment3D to be projected.

tolerance System.Double

A System.Double value representing the tolerance for similarity calculations.

Returns

ProjectionResult
A ProjectionResult containing the projection details, or null if either the Plane or Segment3D is null.

Create.ProjectionResult(this Plane, Triangle3D, double) Method

Calculates the projection result of a 3D triangle onto a plane.

public static DiGi.Geometry.Spatial.Classes.ProjectionResult? ProjectionResult(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Classes.Triangle3D? triangle3D, double tolerance=1E-06);

Parameters

plane Plane

The Plane object to project onto.

triangle3D Triangle3D

The Triangle3D object to be projected.

tolerance System.Double

A System.Double value representing the distance tolerance for collinearity checks.

Returns

ProjectionResult
A ProjectionResult containing the projection data, or null if the input is null or the resulting points are not valid.

Create.ProjectionResult(this Plane, Vector3D, double) Method

Calculates the projection result of a Vector3D(Vector3D, bool) onto a Plane.

public static DiGi.Geometry.Spatial.Classes.ProjectionResult? ProjectionResult(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Classes.Vector3D? vector3D, double tolerance=1E-06);

Parameters

plane Plane

The Plane to project onto.

vector3D Vector3D

The Vector3D(Vector3D, bool) to be projected.

tolerance System.Double

A System.Double value representing the minimum length threshold for the projection result.

Returns

ProjectionResult
A ProjectionResult containing the projection details, or null if the input parameters are null or the resulting vector length is less than the specified System.Double tolerance.

Create.ProjectionResult(this Plane, IGeometry3D, double) Method

Calculates the projection result of a specified 3D geometry onto a plane.

public static DiGi.Geometry.Spatial.Classes.ProjectionResult? ProjectionResult(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Interfaces.IGeometry3D? geometry3D, double tolerance=1E-06);

Parameters

plane Plane

The Plane to project onto.

geometry3D DiGi.Geometry.Spatial.Interfaces.IGeometry3D

The DiGi.Geometry.Spatial.Interfaces.IGeometry3D object to be projected.

tolerance System.Double

The System.Double value representing the distance tolerance for the projection.

Returns

ProjectionResult
A ProjectionResult containing the result of the projection, or null if either the plane or geometry is null.

Create.ProjectionResult(this Plane, IEnumerable<Point3D>) Method

Projects a collection of Point3D points onto a Plane.

public static DiGi.Geometry.Spatial.Classes.ProjectionResult? ProjectionResult(this DiGi.Geometry.Spatial.Classes.Plane? plane, System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Point3D>? point3Ds);

Parameters

plane Plane

The Plane to which the points are projected.

point3Ds System.Collections.Generic.IEnumerable<Point3D>

An System.Collections.Generic.IEnumerable<> of Point3D objects to project.

Returns

ProjectionResult
A ProjectionResult containing the projection data, or null if either the Plane or the System.Collections.Generic.IEnumerable<> of Point3D is null.

Create.ProjectionResult<T>(this Plane, IEnumerable<T>, double) Method

Projects a collection of 3D geometry objects onto a plane.

public static DiGi.Geometry.Spatial.Classes.ProjectionResult? ProjectionResult<T>(this DiGi.Geometry.Spatial.Classes.Plane? plane, System.Collections.Generic.IEnumerable<T>? geometry3Ds, double tolerance=1E-06)
    where T : DiGi.Geometry.Spatial.Interfaces.IGeometry3D;

Type parameters

T

The type of 3D geometry, which must implement DiGi.Geometry.Spatial.Interfaces.IGeometry3D.

Parameters

plane Plane

The Plane to project the geometries onto.

geometry3Ds System.Collections.Generic.IEnumerable<T>

An System.Collections.Generic.IEnumerable<> of 3D geometry objects to be projected.

tolerance System.Double

A System.Double value specifying the distance tolerance for the projection process.

Returns

ProjectionResult
A ProjectionResult containing the results of the projection, or null if the plane or geometry3Ds is null.

Create.Segment3Ds(this IEnumerable<Point3D>, bool) Method

Converts a collection of Point3D objects into a list of Segment3D objects.

public static System.Collections.Generic.List<DiGi.Geometry.Spatial.Classes.Segment3D>? Segment3Ds(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Point3D>? point3Ds, bool closed=false);

Parameters

point3Ds System.Collections.Generic.IEnumerable<Point3D>

The System.Collections.Generic.IEnumerable<> of Point3D points to process.

closed System.Boolean

A System.Boolean value indicating whether the segment list should be closed by connecting the last point back to the first point.

Returns

System.Collections.Generic.List<Segment3D>
A System.Collections.Generic.List<> of Segment3D objects, or null if the provided System.Collections.Generic.IEnumerable<> is null.

Create.UnionResult3D<TPolygonalFace3D>(this Polyhedron<TPolygonalFace3D>, Polyhedron<TPolygonalFace3D>, double) Method

Calculates the 3D boolean union between two polyhedra defined by TPolygonalFace3D faces.

public static DiGi.Geometry.Spatial.Classes.UnionResult3D? UnionResult3D<TPolygonalFace3D>(this DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>? polyhedron_1, DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>? polyhedron_2, double tolerance=1E-06)
    where TPolygonalFace3D : DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D;

Type parameters

TPolygonalFace3D

The type of polygonal face, which must implement DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D.

Parameters

polyhedron_1 DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>

The first polyhedron.

polyhedron_2 DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>

The second polyhedron.

tolerance System.Double

The distance tolerance for boolean union computations.

Returns

UnionResult3D
A UnionResult3D containing the union geometry (either a Polyhedron, multiple disjoint Polyhedrons, or individual face/segment elements), or null if both inputs are null.

Remarks

The boundary of the union polyhedron A U B is composed of:

  • Faces of A that lie outside the volume of B.
  • Faces of B that lie outside the volume of A.

If the remaining boundary pieces do not form a closed solid volume (less than 4 faces, or non-closed shell), the method falls back to returning the individual PolygonalFace3D elements representing the remaining boundary surfaces.

Create.UniquePolygonalFace3Ds(List<IPolygonalFace3D>, double) Method

Deduplicates coplanar faces with coincident centroids using a spatial hash on the centroid coordinates, replacing the quadratic all-pairs comparison with an expected linear-time pass. Centroids are computed once per face instead of once per comparison.

private static System.Collections.Generic.List<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D> UniquePolygonalFace3Ds(System.Collections.Generic.List<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D> polygonalFace3Ds, double tolerance);

Parameters

polygonalFace3Ds System.Collections.Generic.List<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>

tolerance System.Double

Returns

System.Collections.Generic.List<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>

Create.Vector3D(Vector3D, bool) Method

Creates a copy of the specified Vector3D(Vector3D, bool), with an option to normalize the resulting vector.

public static DiGi.Geometry.Spatial.Classes.Vector3D? Vector3D(DiGi.Geometry.Spatial.Classes.Vector3D? vector3D, bool normalize=false);

Parameters

vector3D Vector3D

The source Vector3D(Vector3D, bool) instance to be copied.

normalize System.Boolean

A System.Boolean value indicating whether the returned vector should be normalized.

Returns

Vector3D
A new Vector3D(Vector3D, bool) instance if the provided Vector3D(Vector3D, bool) is not null; otherwise, returns null.

Create.Transform3D Class

public static class Create.Transform3D

Inheritance System.Object → Transform3D

Methods

Create.Transform3D.CoordinateSystem3DToCoordinateSystem3D(CoordinateSystem3D, CoordinateSystem3D) Method

Calculates the transformation from one 3D coordinate system to another 3D coordinate system.

public static DiGi.Geometry.Spatial.Classes.Transform3D? CoordinateSystem3DToCoordinateSystem3D(DiGi.Geometry.Spatial.Classes.CoordinateSystem3D? coordinateSystem3D_From, DiGi.Geometry.Spatial.Classes.CoordinateSystem3D? coordinateSystem3D_To);

Parameters

coordinateSystem3D_From CoordinateSystem3D

The source CoordinateSystem3D coordinate system.

coordinateSystem3D_To CoordinateSystem3D

The destination CoordinateSystem3D coordinate system.

Returns

Transform3D
A Transform3D representing the transformation from the source to the destination, or null if either input is null.

Create.Transform3D.CoordinateSystem3DToOrigin(CoordinateSystem3D) Method

Converts a CoordinateSystem3D to a Transform3D that transforms the coordinate system to the origin.

public static DiGi.Geometry.Spatial.Classes.Transform3D? CoordinateSystem3DToOrigin(DiGi.Geometry.Spatial.Classes.CoordinateSystem3D? coordinateSystem3D);

Parameters

coordinateSystem3D CoordinateSystem3D

The CoordinateSystem3D to convert. This value can be null.

Returns

Transform3D
A Transform3D representing the transformation to the origin, or null if the provided CoordinateSystem3D is null.

Create.Transform3D.Identity() Method

Creates a new Transform3D representing the identity transformation.

public static DiGi.Geometry.Spatial.Classes.Transform3D Identity();

Returns

Transform3D
A Transform3D instance initialized with an identity matrix.

Create.Transform3D.MirrorXY() Method

Creates a transformation matrix that mirrors coordinates across the XY plane.

public static DiGi.Geometry.Spatial.Classes.Transform3D MirrorXY();

Returns

Transform3D
A Transform3D representing the mirroring transformation.

Create.Transform3D.MirrorXZ() Method

Creates a Transform3D that mirrors coordinates across the XZ plane.

public static DiGi.Geometry.Spatial.Classes.Transform3D MirrorXZ();

Returns

Transform3D
A Transform3D representing the mirroring transformation.

Create.Transform3D.MirrorYZ() Method

Creates a Transform3D that mirrors coordinates across the YZ plane.

public static DiGi.Geometry.Spatial.Classes.Transform3D MirrorYZ();

Returns

Transform3D
A Transform3D representing the mirroring transformation.

Create.Transform3D.OriginToCoordinateSystem3D(CoordinateSystem3D) Method

Creates a Transform3D that represents the transformation from the origin to the specified CoordinateSystem3D.

public static DiGi.Geometry.Spatial.Classes.Transform3D? OriginToCoordinateSystem3D(DiGi.Geometry.Spatial.Classes.CoordinateSystem3D? coordinateSystem3D);

Parameters

coordinateSystem3D CoordinateSystem3D

The CoordinateSystem3D to transform to.

Returns

Transform3D
A Transform3D representing the transformation from the origin to the coordinate system, or null if the provided CoordinateSystem3D is null.

Create.Transform3D.OriginToPlane(Plane) Method

Calculates the transformation from the origin to the specified Plane.

public static DiGi.Geometry.Spatial.Classes.Transform3D? OriginToPlane(DiGi.Geometry.Spatial.Classes.Plane? plane);

Parameters

plane Plane

The Plane to which the origin is transformed.

Returns

Transform3D
A Transform3D representing the transformation, or null if the provided Plane is null.

Create.Transform3D.OriginTranslation(Point3D) Method

Creates a transformation matrix that translates the origin to the specified Point3D.

public static DiGi.Geometry.Spatial.Classes.Transform3D? OriginTranslation(DiGi.Geometry.Spatial.Classes.Point3D? point3D);

Parameters

point3D Point3D

The Point3D specifying the translation coordinates.

Returns

Transform3D
A Transform3D representing the translation, or null if the provided Point3D is null.

Create.Transform3D.PlaneToOrigin(Plane) Method

Calculates the Transform3D required to transform a specified Plane to the origin.

public static DiGi.Geometry.Spatial.Classes.Transform3D? PlaneToOrigin(DiGi.Geometry.Spatial.Classes.Plane? plane);

Parameters

plane Plane

The Plane to be transformed to the origin.

Returns

Transform3D
A Transform3D representing the transformation from the plane to the origin, or null if the provided Plane is null.

Create.Transform3D.PlaneToOrigin(Point3D, Vector3D, Vector3D, Vector3D) Method

Creates a transformation that maps a plane defined by an origin and three axes to the coordinate system's origin.

public static DiGi.Geometry.Spatial.Classes.Transform3D? PlaneToOrigin(DiGi.Geometry.Spatial.Classes.Point3D? origin, DiGi.Geometry.Spatial.Classes.Vector3D? axisX, DiGi.Geometry.Spatial.Classes.Vector3D? axisY, DiGi.Geometry.Spatial.Classes.Vector3D? axisZ);

Parameters

origin Point3D

The Point3D representing the origin of the plane.

axisX Vector3D

The Vector3D(Vector3D, bool) representing the X-axis of the plane.

axisY Vector3D

The Vector3D(Vector3D, bool) representing the Y-axis of the plane.

axisZ Vector3D

The Vector3D(Vector3D, bool) representing the Z-axis of the plane.

Returns

Transform3D
A Transform3D object if all parameters are provided; otherwise, null.

Create.Transform3D.PlaneToPlane(Plane, Plane) Method

Calculates a Transform3D that transforms coordinates from one Plane to another.

public static DiGi.Geometry.Spatial.Classes.Transform3D? PlaneToPlane(DiGi.Geometry.Spatial.Classes.Plane? plane_From, DiGi.Geometry.Spatial.Classes.Plane? plane_To);

Parameters

plane_From Plane

The source Plane.

plane_To Plane

The destination Plane.

Returns

Transform3D
A Transform3D representing the transformation from the source plane to the destination plane, or null if either input plane is null.

Create.Transform3D.ProjectionXY() Method

Creates a transformation matrix that projects coordinates onto the XY plane by setting the Z component to zero.

public static DiGi.Geometry.Spatial.Classes.Transform3D ProjectionXY();

Returns

Transform3D
A Transform3D representing the projection onto the XY plane.

Create.Transform3D.ProjectionXZ() Method

Creates a transformation matrix that projects coordinates onto the XZ plane.

public static DiGi.Geometry.Spatial.Classes.Transform3D ProjectionXZ();

Returns

Transform3D
A Transform3D representing the projection onto the XZ plane.

Create.Transform3D.ProjectionYZ() Method

Creates a transformation matrix that projects points onto the YZ plane by removing the X component.

public static DiGi.Geometry.Spatial.Classes.Transform3D ProjectionYZ();

Returns

Transform3D
A Transform3D representing the projection onto the YZ plane.

Create.Transform3D.Rotation(Point3D, Vector3D, double) Method

Rotation Transform around given axis and origin by angle.

public static DiGi.Geometry.Spatial.Classes.Transform3D? Rotation(DiGi.Geometry.Spatial.Classes.Point3D? origin, DiGi.Geometry.Spatial.Classes.Vector3D? axis, double angle);

Parameters

origin Point3D

Origin Point

axis Vector3D

Axis

angle System.Double

Angle

Returns

Transform3D

Create.Transform3D.Rotation(Vector3D, double) Method

Rotation Transform3D around the axis.

public static DiGi.Geometry.Spatial.Classes.Transform3D? Rotation(DiGi.Geometry.Spatial.Classes.Vector3D? axis, double angle);

Parameters

axis Vector3D

rotation axis Vector3D

angle System.Double

Angle in radians

Returns

Transform3D
Transform3D

Create.Transform3D.RotationX(double) Method

Gets Rotation Transform3D around the x-axis

public static DiGi.Geometry.Spatial.Classes.Transform3D RotationX(double angle);

Parameters

angle System.Double

Angle in radians

Returns

Transform3D
Transform3D

Create.Transform3D.RotationY(double) Method

Gets Rotation Transform3D around the y-axis

public static DiGi.Geometry.Spatial.Classes.Transform3D RotationY(double angle);

Parameters

angle System.Double

Angle in radians

Returns

Transform3D
Transform3D

Create.Transform3D.RotationYawPitchRoll(double, double, double) Method

Creates a 3D rotation transformation matrix from Euler/Tait-Bryan angles (yaw, pitch, roll) in radians.

The rotation sequence applied is Yaw (around Z), then Pitch (around Y), then Roll (around X).

public static DiGi.Geometry.Spatial.Classes.Transform3D RotationYawPitchRoll(double yaw, double pitch, double roll);

Parameters

yaw System.Double

The rotation angle around the Z-axis in radians.

pitch System.Double

The rotation angle around the Y-axis in radians.

roll System.Double

The rotation angle around the X-axis in radians.

Returns

Transform3D
A new Transform3D representing the combined rotation transform.

Create.Transform3D.RotationZ(double) Method

Gets Rotation Transform3D around the z-axis

public static DiGi.Geometry.Spatial.Classes.Transform3D RotationZ(double angle);

Parameters

angle System.Double

Angle in radians

Returns

Transform3D
Transform3D

Create.Transform3D.Scale(Point3D, double) Method

Creates a scaling transformation relative to a specified origin point.

public static DiGi.Geometry.Spatial.Classes.Transform3D? Scale(DiGi.Geometry.Spatial.Classes.Point3D? origin, double factor);

Parameters

origin Point3D

The Point3D representing the center of the scale operation.

factor System.Double

The double value used as the scaling factor.

Returns

Transform3D
A Transform3D object that performs the scaling, or null if the origin is null.

Create.Transform3D.Scale(double) Method

Creates a uniform scaling transformation matrix using the specified scale factor.

public static DiGi.Geometry.Spatial.Classes.Transform3D Scale(double factor);

Parameters

factor System.Double

The double value to use as the scale factor for all axes.

Returns

Transform3D
A Classes.Transform3D object representing the uniform scaling transformation.

Create.Transform3D.Scale(double, double, double) Method

Creates a scaling transformation matrix with specified factors for the X, Y, and Z axes.

public static DiGi.Geometry.Spatial.Classes.Transform3D Scale(double x, double y, double z);

Parameters

x System.Double

The scale factor for the X axis as a double.

y System.Double

The scale factor for the Y axis as a double.

z System.Double

The scale factor for the Z axis as a double.

Returns

Transform3D
A Transform3D representing the scaling transformation.

Create.Transform3D.ShearXY(double, double) Method

Creates a 3D shearing transformation matrix in the XY plane relative to the Z-axis.

public static DiGi.Geometry.Spatial.Classes.Transform3D ShearXY(double factorX, double factorY);

Parameters

factorX System.Double

The shearing factor along the X-axis relative to Z.

factorY System.Double

The shearing factor along the Y-axis relative to Z.

Returns

Transform3D
A new Transform3D representing the shearing transform.

Create.Transform3D.Translation(Vector3D) Method

Creates a translation transformation based on the specified Vector3D(Vector3D, bool).

public static DiGi.Geometry.Spatial.Classes.Transform3D? Translation(DiGi.Geometry.Spatial.Classes.Vector3D? vector3D);

Parameters

vector3D Vector3D

The Vector3D(Vector3D, bool) that defines the translation offset.

Returns

Transform3D
A Transform3D representing the translation, or null if the provided Vector3D(Vector3D, bool) is null.

Create.Transform3D.Translation(double, double, double) Method

Creates a translation transformation matrix based on the specified coordinates.

public static DiGi.Geometry.Spatial.Classes.Transform3D Translation(double x, double y, double z);

Parameters

x System.Double

The translation distance along the X axis as a double.

y System.Double

The translation distance along the Y axis as a double.

z System.Double

The translation distance along the Z axis as a double.

Returns

Transform3D
A Classes.Transform3D representing the translation transformation.

Create.Transform3D.Unset() Method

Creates a Transform3D with an unset matrix.

public static DiGi.Geometry.Spatial.Classes.Transform3D Unset();

Returns

Transform3D
A Transform3D instance.

Create.Transform3D.Zero() Method

Zero Transform3D Diagonal = (0,0,0,1)

public static DiGi.Geometry.Spatial.Classes.Transform3D Zero();

Returns

Transform3D
Transform3D

Modify Class

public static class Modify

Inheritance System.Object → Modify

Methods

Modify.Add(this List<Point3D>, double, double, double) Method

Adds a new Point3D to the specified list of nullable Point3D objects using the provided coordinates.

public static void Add(this System.Collections.Generic.List<DiGi.Geometry.Spatial.Classes.Point3D?>? point3Ds, double x, double y, double z);

Parameters

point3Ds System.Collections.Generic.List<Point3D>

The List<Point3D?> to which the point will be added. If this list is null, no action is taken.

x System.Double

The double value representing the X coordinate of the point.

y System.Double

The double value representing the Y coordinate of the point.

z System.Double

The double value representing the Z coordinate of the point.

Modify.AddOverlappingFaces(this List<IPolygonalFace3D>, BVHNode<IPolygonalFace3D>, BoundingBox3D, double) Method

Recursively traverses a Bounding Volume Hierarchy (BVH) tree starting at bVHNode and adds all DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D elements that overlap with boundingBox3D (within distance tolerance) into the result list.

CSG Reusability: This method serves as the standard performance-culling query for all 3D constructive solid geometry (CSG) boolean operations (Intersection, Union, and Difference) between two polyhedra. For each face of Polyhedron A, query the BVH tree built for Polyhedron B to cull non-intersecting faces, narrowing candidates down from (O(N \cdot M)) to (O(N \log M)) before computing splits.

public static void AddOverlappingFaces(this System.Collections.Generic.List<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D> result, DiGi.Geometry.Spatial.Classes.BVHNode<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>? bVHNode, DiGi.Geometry.Spatial.Classes.BoundingBox3D boundingBox3D, double tolerance=1E-06);

Parameters

result System.Collections.Generic.List<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>

The destination System.Collections.Generic.List<> where overlapping faces will be collected.

bVHNode DiGi.Geometry.Spatial.Classes.BVHNode<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>

The root or subtree node of the Bounding Volume Hierarchy (BVH) to traverse.

boundingBox3D BoundingBox3D

The target BoundingBox3D representing the search query bounds.

tolerance System.Double

The distance tolerance for coordinate comparison and bounding box overlap checks.

Modify.Orient(this IPolygonal3D, Orientation, bool) Method

Orients the specified DiGi.Geometry.Spatial.Interfaces.IPolygonal3D to a target orientation, inverting it if necessary.

public static bool Orient(this DiGi.Geometry.Spatial.Interfaces.IPolygonal3D? polygonal3D, DiGi.Geometry.Core.Enums.Orientation orientation, bool convexHull=true);

Parameters

polygonal3D DiGi.Geometry.Spatial.Interfaces.IPolygonal3D

The DiGi.Geometry.Spatial.Interfaces.IPolygonal3D instance to orient.

orientation Orientation

The target Orientation to achieve.

convexHull System.Boolean

A System.Boolean value indicating whether the convex hull should be used to determine the current orientation. Defaults to true.

Returns

System.Boolean
A System.Boolean value indicating whether the orientation of the DiGi.Geometry.Spatial.Interfaces.IPolygonal3D was changed.

Modify.RemoveDuplicates(this List<Point3D>, bool, double) Method

Removes every point which coincides with the point before it, so the geometry holds no zero length segment.

Spatial counterpart of RemoveDuplicates(this List<Point2D>, bool, double). Trimming a ring before a plane is fitted to it also matters in its own right, because the plane takes the average of the points as its origin and a repeated point pulls that origin towards the corner it repeats.

Set closed for a ring, where the last point is the predecessor of the first. That is what strips the repeated closing position a gml:LinearRing carries.

No floor is applied to how many points survive, so a ring which is nothing but repeats of one corner collapses to that single point. That is deliberate - the caller checks the count afterwards, and leaving a degenerate ring padded out to three points would let it pass a check for three corners while holding fewer.

public static bool RemoveDuplicates(this System.Collections.Generic.List<DiGi.Geometry.Spatial.Classes.Point3D>? point3Ds, bool closed, double tolerance=1E-06);

Parameters

point3Ds System.Collections.Generic.List<Point3D>

The System.Collections.Generic.List<> to clean up in place.

closed System.Boolean

A System.Boolean value indicating whether the points form a closed ring, in which case the last point is compared against the first.

tolerance System.Double

The System.Double distance within which two points are treated as one.

Returns

System.Boolean
A System.Boolean value indicating whether any point was removed.

Query Class

public static class Query

Inheritance System.Object → Query

Methods

Query.Above(this Plane, Point3D, double) Method

Determines whether a specified Point3D is located above a Plane.

public static bool Above(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Classes.Point3D? point3D, double tolerance=1E-06);

Parameters

plane Plane

The Plane to check against.

point3D Point3D

The Point3D to evaluate.

tolerance System.Double

A System.Double value representing the distance tolerance.

Returns

System.Boolean
A System.Boolean value indicating whether the point is above the plane beyond the specified tolerance; otherwise, false.

Query.Above(this Plane, IPolygonal3D, double) Method

Determines whether the specified DiGi.Geometry.Spatial.Interfaces.IPolygonal3D is above the Plane.

public static bool Above(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Interfaces.IPolygonal3D? polygonal3D, double tolerance=1E-06);

Parameters

plane Plane

The Plane to check against.

polygonal3D DiGi.Geometry.Spatial.Interfaces.IPolygonal3D

The DiGi.Geometry.Spatial.Interfaces.IPolygonal3D object to evaluate.

tolerance System.Double

A System.Double value representing the distance tolerance for the calculation.

Returns

System.Boolean
A System.Boolean value indicating whether all points of the DiGi.Geometry.Spatial.Interfaces.IPolygonal3D are above the Plane within the specified System.Double tolerance; otherwise, false.

Query.AlmostEquals(this Point3D, Point3D, double) Method

Determines whether two Point3D? points are approximately equal based on a specified distance tolerance.

public static bool AlmostEquals(this DiGi.Geometry.Spatial.Classes.Point3D? point3D_1, DiGi.Geometry.Spatial.Classes.Point3D? point3D_2, double tolerance=1E-06);

Parameters

point3D_1 Point3D

The first Point3D? point to compare.

point3D_2 Point3D

The second Point3D? point to compare.

tolerance System.Double

The System.Double distance tolerance used to determine equality.

Returns

System.Boolean
A System.Boolean value indicating whether the two points are approximately equal.

Query.AlmostEquals(this ISegmentable3D, ISegmentable3D, double) Method

Determines whether two DiGi.Geometry.Spatial.Interfaces.ISegmentable3D objects are almost equal based on a specified tolerance.

public static bool AlmostEquals(this DiGi.Geometry.Spatial.Interfaces.ISegmentable3D? segmentable3D_1, DiGi.Geometry.Spatial.Interfaces.ISegmentable3D? segmentable3D_2, double tolerance=1E-06);

Parameters

segmentable3D_1 DiGi.Geometry.Spatial.Interfaces.ISegmentable3D

The first DiGi.Geometry.Spatial.Interfaces.ISegmentable3D object to compare.

segmentable3D_2 DiGi.Geometry.Spatial.Interfaces.ISegmentable3D

The second DiGi.Geometry.Spatial.Interfaces.ISegmentable3D object to compare.

tolerance System.Double

A System.Double value representing the distance tolerance used for comparison.

Returns

System.Boolean
A System.Boolean value indicating whether the two objects are almost equal.

Query.Average(this IEnumerable<Point3D>) Method

Calculates the average of a collection of Point3D objects.

public static DiGi.Geometry.Spatial.Classes.Point3D? Average(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Point3D>? point3Ds);

Parameters

point3Ds System.Collections.Generic.IEnumerable<Point3D>

An System.Collections.Generic.IEnumerable<> of Point3D objects to be averaged.

Returns

Point3D
A Point3D representing the average position, or null if the input collection is null or empty.

Query.Average(this IEnumerable<Vector3D>) Method

Calculates the average of a sequence of Vector3D objects.

public static DiGi.Geometry.Spatial.Classes.Vector3D? Average(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Vector3D>? vector3Ds);

Parameters

vector3Ds System.Collections.Generic.IEnumerable<Vector3D>

The System.Collections.Generic.IEnumerable<> of vectors to average.

Returns

Vector3D
A Vector3D representing the average value, or null if the input sequence is null or empty.

Query.AxisX(this Vector3D) Method

Calculates an X-axis vector perpendicular to the specified Vector3D normal.

public static DiGi.Geometry.Spatial.Classes.Vector3D? AxisX(this DiGi.Geometry.Spatial.Classes.Vector3D? normal);

Parameters

normal Vector3D

The Vector3D normal vector used as a reference.

Returns

Vector3D
A Vector3D representing the calculated X-axis, or null if the provided Vector3D normal is null.

Query.AxisX(this Vector3D, Vector3D) Method

Calculates the X-axis vector based on a normal vector and a Y-axis vector.

public static DiGi.Geometry.Spatial.Classes.Vector3D? AxisX(this DiGi.Geometry.Spatial.Classes.Vector3D? normal, DiGi.Geometry.Spatial.Classes.Vector3D? axisY);

Parameters

normal Vector3D

The Vector3D? normal vector.

axisY Vector3D

The Vector3D? Y-axis vector.

Returns

Vector3D
A Vector3D? representing the unit X-axis vector, or null if either the normal or axisY is null.

Query.AxisY(this Vector3D) Method

Calculates the Y-axis vector based on the provided normal vector.

public static DiGi.Geometry.Spatial.Classes.Vector3D? AxisY(this DiGi.Geometry.Spatial.Classes.Vector3D? normal);

Parameters

normal Vector3D

The Vector3D? normal vector used as a basis for calculating the Y-axis.

Returns

Vector3D
A Vector3D? representing the Y-axis, or null if the provided normal is null.

Query.AxisY(this Vector3D, Vector3D) Method

Calculates the Y-axis vector by computing the cross product of the normal and the X-axis, then normalizing the result.

public static DiGi.Geometry.Spatial.Classes.Vector3D? AxisY(this DiGi.Geometry.Spatial.Classes.Vector3D? normal, DiGi.Geometry.Spatial.Classes.Vector3D? axisX);

Parameters

normal Vector3D

The Vector3D representing the normal vector.

axisX Vector3D

The Vector3D representing the X-axis vector.

Returns

Vector3D
A Vector3D representing the normalized Y-axis if both inputs are non-null and a valid unit vector can be derived; otherwise, null.

Query.Centroid(this IEnumerable<Point3D>) Method

Calculates the centroid of a collection of Point3D points.

public static DiGi.Geometry.Spatial.Classes.Point3D? Centroid(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Point3D>? point3Ds);

Parameters

point3Ds System.Collections.Generic.IEnumerable<Point3D>

An IEnumerable<Point3D> containing the points to process.

Returns

Point3D
A Point3D? representing the centroid, or null if the input collection is null or empty.

Query.ClosestPoint(this Point3D, Point3D, Point3D, bool) Method

Calculates the closest Point3D on a line defined by two points relative to a given point.

public static DiGi.Geometry.Spatial.Classes.Point3D? ClosestPoint(this DiGi.Geometry.Spatial.Classes.Point3D? point3D, DiGi.Geometry.Spatial.Classes.Point3D? point3D_1, DiGi.Geometry.Spatial.Classes.Point3D? point3D_2, bool bounded);

Parameters

point3D Point3D

The target Point3D? for which the closest point is calculated.

point3D_1 Point3D

The first Point3D? defining the line.

point3D_2 Point3D

The second Point3D? defining the line.

bounded System.Boolean

A System.Boolean value indicating whether the result should be bounded to the segment between the two points.

Returns

Point3D
The closest Point3D? on the line, or null if any of the input points are null.

Query.ClosestPoint(this Point3D, Point3D, Point3D, bool, bool) Method

Calculates the closest Point3D on a line or line segment defined by two points to a given target point.

public static DiGi.Geometry.Spatial.Classes.Point3D? ClosestPoint(this DiGi.Geometry.Spatial.Classes.Point3D? point3D, DiGi.Geometry.Spatial.Classes.Point3D? point3D_1, DiGi.Geometry.Spatial.Classes.Point3D? point3D_2, bool bounded_1, bool bounded_2);

Parameters

point3D Point3D

The target Point3D for which the closest point is calculated.

point3D_1 Point3D

The first Point3D? defining the line or segment.

point3D_2 Point3D

The second Point3D defining the line or segment.

bounded_1 System.Boolean

A System.Boolean indicating whether the result is bounded by the first point.

bounded_2 System.Boolean

A bool indicating whether the result is bounded by the second point.

Returns

Point3D
The closest Point3D on the line or segment, or null if any of the input points are null.

Query.ClosestPoint(this Point3D, ISegmentable3D) Method

Calculates the closest point on an DiGi.Geometry.Spatial.Interfaces.ISegmentable3D object to a given Point3D.

public static DiGi.Geometry.Spatial.Classes.Point3D? ClosestPoint(this DiGi.Geometry.Spatial.Classes.Point3D? point3D, DiGi.Geometry.Spatial.Interfaces.ISegmentable3D segmentable3D);

Parameters

point3D Point3D

The source Point3D for which the closest point is being calculated.

segmentable3D DiGi.Geometry.Spatial.Interfaces.ISegmentable3D

The DiGi.Geometry.Spatial.Interfaces.ISegmentable3D object to find the closest point on.

Returns

Point3D
The closest Point3D found on the segmentable object, or null if no such point exists.

Query.ClosestPoint(this Point3D, ISegmentable3D, double) Method

Calculates the closest point on an DiGi.Geometry.Spatial.Interfaces.ISegmentable3D object from a given Point3D.

public static DiGi.Geometry.Spatial.Classes.Point3D? ClosestPoint(this DiGi.Geometry.Spatial.Classes.Point3D? point3D, DiGi.Geometry.Spatial.Interfaces.ISegmentable3D? segmentable3D, out double distance);

Parameters

point3D Point3D

The source Point3D to find the closest point from.

segmentable3D DiGi.Geometry.Spatial.Interfaces.ISegmentable3D

The DiGi.Geometry.Spatial.Interfaces.ISegmentable3D object containing segments to evaluate.

distance System.Double

When this method returns, contains the distance between the source Point3D and the closest point found; otherwise, System.Double.NaN.

Returns

Point3D
The closest Point3D on the segments of the DiGi.Geometry.Spatial.Interfaces.ISegmentable3D object, or null if no point could be determined.

Query.ClosestPoint(this Point3D, IEnumerable<Point3D>, double) Method

Finds the closest Point3D in a collection of points to a specified source point.

public static DiGi.Geometry.Spatial.Classes.Point3D? ClosestPoint(this DiGi.Geometry.Spatial.Classes.Point3D? point3D, System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Point3D>? point3Ds, out double distance);

Parameters

point3D Point3D

The source Point3D used as the reference for distance calculations.

point3Ds System.Collections.Generic.IEnumerable<Point3D>

An System.Collections.Generic.IEnumerable<> of Point3D objects to search through.

distance System.Double

When this method returns, contains the minimum System.Double distance between the source point and the closest point found; otherwise, System.Double.NaN.

Returns

Point3D
The closest Point3D from the collection, or null if the source point is null, the collection is null, or no points are available.

Query.ClosestPoint(this Point3D, IEnumerable<Segment3D>) Method

Calculates the closest point among a collection of 3D segments to a given 3D point.

public static DiGi.Geometry.Spatial.Classes.Point3D? ClosestPoint(this DiGi.Geometry.Spatial.Classes.Point3D? point3D, System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Segment3D>? segment3Ds);

Parameters

point3D Point3D

The Point3D source point.

segment3Ds System.Collections.Generic.IEnumerable<Segment3D>

An System.Collections.Generic.IEnumerable<> of Segment3D objects to evaluate.

Returns

Point3D
The closest Point3D found on the segments, or null if the source point or the collection is null.

Query.ClosestPoint(this Point3D, IEnumerable<Segment3D>, double) Method

Calculates the closest point on a collection of 3D segments relative to a given 3D point.

public static DiGi.Geometry.Spatial.Classes.Point3D? ClosestPoint(this DiGi.Geometry.Spatial.Classes.Point3D? point3D, System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Segment3D>? segment3Ds, out double distance);

Parameters

point3D Point3D

The source Point3D point.

segment3Ds System.Collections.Generic.IEnumerable<Segment3D>

An System.Collections.Generic.IEnumerable<> of Segment3D segments to evaluate.

distance System.Double

When this method returns, contains the distance between the source Point3D and the closest point found; otherwise, System.Double.NaN.

Returns

Point3D
The closest Point3D found among the provided segments, or null if no point is found or input parameters are null.

Query.ClosestPoint<TPolygonalFace3D>(this Point3D, IEnumerable<TPolygonalFace3D>) Method

Calculates the closest point on a collection of polygonal faces to a given point.

public static DiGi.Geometry.Spatial.Classes.Point3D? ClosestPoint<TPolygonalFace3D>(this DiGi.Geometry.Spatial.Classes.Point3D? point3D, System.Collections.Generic.IEnumerable<TPolygonalFace3D> polygonalFace3Ds)
    where TPolygonalFace3D : DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D;

Type parameters

TPolygonalFace3D

The type of the polygonal face, which must implement DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D.

Parameters

point3D Point3D

The source Point3D? point.

polygonalFace3Ds System.Collections.Generic.IEnumerable<TPolygonalFace3D>

An System.Collections.Generic.IEnumerable<> of polygonal faces to evaluate.

Returns

Point3D
The closest Point3D? found on the provided polygonal faces, or null if the input point or collection is null.

Query.ClosestPoint<TPolygonalFace3D>(this Point3D, IEnumerable<TPolygonalFace3D>, TPolygonalFace3D, double, double) Method

Calculates the closest point to a given point from a collection of polygonal faces.

public static DiGi.Geometry.Spatial.Classes.Point3D? ClosestPoint<TPolygonalFace3D>(this DiGi.Geometry.Spatial.Classes.Point3D? point3D, System.Collections.Generic.IEnumerable<TPolygonalFace3D> polygonalFace3Ds, out TPolygonalFace3D? closestPolygonalFace3D, out double distance, double tolerance=1E-06)
    where TPolygonalFace3D : DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D;

Type parameters

TPolygonalFace3D

The type of the polygonal face, which must implement DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D.

Parameters

point3D Point3D

The source Point3D? from which to find the closest point.

polygonalFace3Ds System.Collections.Generic.IEnumerable<TPolygonalFace3D>

An System.Collections.Generic.IEnumerable<> of polygonal faces to evaluate.

closestPolygonalFace3D TPolygonalFace3D

When this method returns, contains the TPolygonalFace3D? that is closest to the source point.

distance System.Double

When this method returns, contains the System.Double distance between the source point and the closest point found.

tolerance System.Double

The System.Double tolerance used for calculations.

Returns

Point3D
The closest Point3D? found among all provided polygonal faces, or null if no closest point is found or the input point or collection is null.

Query.Collinear(this Point3D, Point3D, Point3D, double) Method

Determines whether three 3D points are collinear within a specified angular tolerance.

public static bool Collinear(this DiGi.Geometry.Spatial.Classes.Point3D? point3D_1, DiGi.Geometry.Spatial.Classes.Point3D? point3D_2, DiGi.Geometry.Spatial.Classes.Point3D? point3D_3, double tolerance=0.0349066);

Parameters

point3D_1 Point3D

The first Point3D? point.

point3D_2 Point3D

The second Point3D? point, acting as the vertex for the angle calculation.

point3D_3 Point3D

The third Point3D? point.

tolerance System.Double

A System.Double value representing the angular tolerance used to determine collinearity.

Returns

System.Boolean
A System.Boolean indicating whether the points are collinear; returns false if any of the provided points are null.

Query.Collinear(this IEnumerable<Point3D>, double) Method

Determines whether a collection of Point3D points are collinear within a specified tolerance.

public static bool Collinear(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Point3D>? point3Ds, double tolerance=1E-06);

Parameters

point3Ds System.Collections.Generic.IEnumerable<Point3D>

The System.Collections.Generic.IEnumerable<> of Point3D objects to evaluate.

tolerance System.Double

The System.Double value representing the distance tolerance for collinearity.

Returns

System.Boolean
A System.Boolean value indicating whether the points are collinear. Returns true if there are fewer than three points; otherwise, returns false if the collection is null or the points are not collinear.

Query.Convert(Plane, BoundingBox2D) Method

Converts a Plane and a BoundingBox2D into a Rectangle3D.

public static DiGi.Geometry.Spatial.Classes.Rectangle3D? Convert(DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Planar.Classes.BoundingBox2D? boundingBox2D);

Parameters

plane Plane

The Plane to use for the conversion.

boundingBox2D BoundingBox2D

The BoundingBox2D to use for the conversion.

Returns

Rectangle3D
A Rectangle3D if both parameters are valid; otherwise, null.

Query.Convert(IPlanar) Method

Converts an DiGi.Geometry.Spatial.Interfaces.IPlanar object to an DiGi.Geometry.Planar.Interfaces.IGeometry2D.

public static DiGi.Geometry.Planar.Interfaces.IGeometry2D? Convert(DiGi.Geometry.Spatial.Interfaces.IPlanar? planar);

Parameters

planar DiGi.Geometry.Spatial.Interfaces.IPlanar

The DiGi.Geometry.Spatial.Interfaces.IPlanar instance to convert.

Returns

DiGi.Geometry.Planar.Interfaces.IGeometry2D
An DiGi.Geometry.Planar.Interfaces.IGeometry2D representation if the conversion is successful; otherwise, null.

Query.Convert(this Plane, Ellipse2D) Method

Converts a Ellipse2D to an Ellipse3D using the specified Plane.

public static DiGi.Geometry.Spatial.Classes.Ellipse3D? Convert(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Planar.Classes.Ellipse2D? ellipse2D);

Parameters

plane Plane

The Plane used for the conversion.

ellipse2D Ellipse2D

The Ellipse2D to convert.

Returns

Ellipse3D
An Ellipse3D if both the Plane and Ellipse2D are not null; otherwise, null.

Query.Convert(this Plane, Line2D) Method

Converts a Line2D to a Line3D using the specified Plane.

public static DiGi.Geometry.Spatial.Classes.Line3D? Convert(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Planar.Classes.Line2D? line2D);

Parameters

plane Plane

The Plane used for the conversion.

line2D Line2D

The Line2D instance to convert.

Returns

Line3D
A Line3D representing the converted line, or null if the Plane or Line2D is null, or if conversion of the origin or direction fails.

Query.Convert(this Plane, Point2D) Method

Converts a Point2D to a Point3D based on the coordinate system of the provided Plane.

public static DiGi.Geometry.Spatial.Classes.Point3D? Convert(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Planar.Classes.Point2D? point2D);

Parameters

plane Plane

The Plane used as the reference for the conversion.

point2D Point2D

The Point2D to convert.

Returns

Point3D
A Point3D representing the 2D point in 3D space, or null if the Plane, the Point2D, or the plane's axes are null.

Query.Convert(this Plane, Polygon2D) Method

Converts a Polygon2D to a Polygon3D using the specified Plane.

public static DiGi.Geometry.Spatial.Classes.Polygon3D? Convert(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Planar.Classes.Polygon2D? polygon2D);

Parameters

plane Plane

The Plane used for the conversion.

polygon2D Polygon2D

The Polygon2D instance to convert.

Returns

Polygon3D
A Polygon3D instance if both the Plane and Polygon2D are not null; otherwise, null.

Query.Convert(this Plane, PolygonalFace2D) Method

Converts a PolygonalFace2D to a PolygonalFace3D using the specified Plane.

public static DiGi.Geometry.Spatial.Classes.PolygonalFace3D? Convert(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Planar.Classes.PolygonalFace2D? polygonalFace2D);

Parameters

plane Plane

The Plane used for the conversion.

polygonalFace2D PolygonalFace2D

The PolygonalFace2D instance to convert.

Returns

PolygonalFace3D
A PolygonalFace3D instance if both the Plane and PolygonalFace2D are not null; otherwise, null.

Query.Convert(this Plane, Polyline2D) Method

Converts a Polyline2D to a Polyline3D using the specified Plane.

public static DiGi.Geometry.Spatial.Classes.Polyline3D? Convert(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Planar.Classes.Polyline2D? polyline2D);

Parameters

plane Plane

The Plane used for the conversion.

polyline2D Polyline2D

The Polyline2D to convert.

Returns

Polyline3D
A Polyline3D resulting from the conversion, or null if the Plane or Polyline2D is null.

Query.Convert(this Plane, Ray2D) Method

Converts a Ray2D to a Ray3D using the specified Plane.

public static DiGi.Geometry.Spatial.Classes.Ray3D? Convert(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Planar.Classes.Ray2D? ray2D);

Parameters

plane Plane

The Plane used for the conversion.

ray2D Ray2D

The Ray2D to convert.

Returns

Ray3D
A Ray3D if the conversion is successful; otherwise, null.

Query.Convert(this Plane, Rectangle2D) Method

Converts a Rectangle2D to a Rectangle3D using the specified Plane.

public static DiGi.Geometry.Spatial.Classes.Rectangle3D? Convert(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Planar.Classes.Rectangle2D rectangle2D);

Parameters

plane Plane

The Plane used for the conversion.

rectangle2D Rectangle2D

The Rectangle2D to convert.

Returns

Rectangle3D
A Rectangle3D if both parameters are not null; otherwise, null.

Query.Convert(this Plane, Segment2D) Method

Converts a Segment2D to a Segment3D using the specified Plane.

public static DiGi.Geometry.Spatial.Classes.Segment3D? Convert(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Planar.Classes.Segment2D? segment2D);

Parameters

plane Plane

The Plane used for conversion.

segment2D Segment2D

The Segment2D to convert.

Returns

Segment3D
A Segment3D if the conversion is successful; otherwise, null.

Query.Convert(this Plane, Triangle2D) Method

Converts a Triangle2D to a Triangle3D using the specified Plane.

public static DiGi.Geometry.Spatial.Classes.Triangle3D? Convert(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Planar.Classes.Triangle2D? triangle2D);

Parameters

plane Plane

The Plane used for the conversion.

triangle2D Triangle2D

The Triangle2D to convert.

Returns

Triangle3D
A Triangle3D if the conversion is successful; otherwise, null.

Query.Convert(this Plane, Vector2D) Method

Converts a Vector2D to a Vector3D based on the coordinate system of the provided Plane.

public static DiGi.Geometry.Spatial.Classes.Vector3D? Convert(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Planar.Classes.Vector2D? vector2D);

Parameters

plane Plane

The Plane used as the reference for the conversion.

vector2D Vector2D

The Vector2D to convert.

Returns

Vector3D
A Vector3D representing the converted vector, or null if the Plane, the Vector2D, or any of the plane's axes are null.

Query.Convert(this Plane, IGeometry2D) Method

Converts a 2D geometry object to a 3D geometry object based on the specified plane.

public static DiGi.Geometry.Spatial.Interfaces.IGeometry3D? Convert(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Planar.Interfaces.IGeometry2D? geometry2D);

Parameters

plane Plane

The Plane used as the reference for the conversion.

geometry2D DiGi.Geometry.Planar.Interfaces.IGeometry2D

The DiGi.Geometry.Planar.Interfaces.IGeometry2D instance to be converted.

Returns

DiGi.Geometry.Spatial.Interfaces.IGeometry3D
An DiGi.Geometry.Spatial.Interfaces.IGeometry3D object if the conversion is successful; otherwise, null if either the Plane or DiGi.Geometry.Planar.Interfaces.IGeometry2D is null.

Query.Convert(this Plane, IPolygonal2D) Method

Converts a 2D polygonal object to a 3D polygonal object based on the specified plane.

public static DiGi.Geometry.Spatial.Interfaces.IPolygonal3D? Convert(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Planar.Interfaces.IPolygonal2D? polygonal2D);

Parameters

plane Plane

The Plane used as the reference for the conversion.

polygonal2D IPolygonal2D

The IPolygonal2D object to be converted.

Returns

DiGi.Geometry.Spatial.Interfaces.IPolygonal3D
An DiGi.Geometry.Spatial.Interfaces.IPolygonal3D representation of the 2D polygonal shape, or null if the Plane or IPolygonal2D is null.

Query.Convert(this Plane, IPolygonalFace2D) Method

Converts a 2D polygonal face to a 3D polygonal face using the specified plane.

public static DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D? Convert(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Planar.Interfaces.IPolygonalFace2D? polygonalFace3D);

Parameters

plane Plane

The Plane used for the conversion.

polygonalFace3D IPolygonalFace2D

The IPolygonalFace2D to convert.

Returns

DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D
An DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D if the conversion is successful; otherwise, null.

Query.Convert(this Plane, Line3D) Method

Converts a Line3D to a Line2D relative to the specified Plane.

public static DiGi.Geometry.Planar.Classes.Line2D? Convert(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Classes.Line3D? line3D);

Parameters

plane Plane

The Plane used for the conversion.

line3D Line3D

The Line3D to convert.

Returns

Line2D
A Line2D representing the converted line, or null if the plane, the line, or any of its components cannot be converted.

Query.Convert(this Plane, Point3D) Method

Converts a Point3D to a Point2D relative to the specified Plane.

public static DiGi.Geometry.Planar.Classes.Point2D? Convert(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Classes.Point3D? point3D);

Parameters

plane Plane

The Plane used as the reference for conversion.

point3D Point3D

The Point3D to be converted.

Returns

Point2D
A Point2D representing the point's coordinates on the plane, or null if the Plane, the Point3D, or any required plane components are null.

Query.Convert(this Plane, Polygon3D) Method

Converts a Polygon3D to a Polygon2D using the specified Plane.

public static DiGi.Geometry.Planar.Classes.Polygon2D? Convert(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Classes.Polygon3D? polygon3D);

Parameters

plane Plane

The Plane used to project the 3D polygon into 2D space.

polygon3D Polygon3D

The Polygon3D object to convert.

Returns

Polygon2D
A Polygon2D representing the converted polygon, or null if the plane, the 3D polygon, or its points are null.

Query.Convert(this Plane, PolygonalFace3D) Method

Converts a PolygonalFace3D to a PolygonalFace2D using the specified Plane.

public static DiGi.Geometry.Planar.Classes.PolygonalFace2D? Convert(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Classes.PolygonalFace3D? polygonalFace3D);

Parameters

plane Plane

The Plane used for the conversion.

polygonalFace3D PolygonalFace3D

The PolygonalFace3D to convert.

Returns

PolygonalFace2D
A PolygonalFace2D if the conversion is successful; otherwise, null.

Query.Convert(this Plane, Ray3D) Method

Converts a Ray3D to a Ray2D relative to the specified Plane.

public static DiGi.Geometry.Planar.Classes.Ray2D? Convert(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Classes.Ray3D? ray3D);

Parameters

plane Plane

The Plane used for the conversion.

ray3D Ray3D

The Ray3D to convert.

Returns

Ray2D
A Ray2D if the conversion is successful; otherwise, null.

Query.Convert(this Plane, Rectangle3D, double) Method

Converts a Rectangle3D to an IPolygonal2D relative to the specified Plane.

public static DiGi.Geometry.Planar.Interfaces.IPolygonal2D? Convert(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Classes.Rectangle3D? rectangle3D, double tolerance=1E-06);

Parameters

plane Plane

The Plane used for the conversion.

rectangle3D Rectangle3D

The Rectangle3D to convert.

tolerance System.Double

A System.Double value representing the distance tolerance.

Returns

IPolygonal2D
An IPolygonal2D if the conversion is successful; otherwise, null.

Query.Convert(this Plane, Segment3D) Method

Converts a Segment3D to a Segment2D using the specified Plane.

public static DiGi.Geometry.Planar.Classes.Segment2D? Convert(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Classes.Segment3D? segment3D);

Parameters

plane Plane

The Plane used for the conversion.

segment3D Segment3D

The Segment3D to convert.

Returns

Segment2D
A Segment2D if the conversion is successful; otherwise, null.

Query.Convert(this Plane, Triangle3D) Method

Converts a Triangle3D to a Triangle2D using the specified Plane.

public static DiGi.Geometry.Planar.Classes.Triangle2D? Convert(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Classes.Triangle3D? triangle3D);

Parameters

plane Plane

The Plane used for the conversion.

triangle3D Triangle3D

The Triangle3D to convert.

Returns

Triangle2D
A Triangle2D representing the projected triangle, or null if the Plane, the Triangle3D, or any of its points are null or cannot be converted.

Query.Convert(this Plane, Vector3D) Method

Converts a Vector3D to a Vector2D based on the coordinate system of the specified Plane.

public static DiGi.Geometry.Planar.Classes.Vector2D? Convert(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Classes.Vector3D? vector3D);

Parameters

plane Plane

The Plane used as the reference for the conversion.

vector3D Vector3D

The Vector3D to be converted.

Returns

Vector2D
A Vector2D representing the projection of the Vector3D onto the plane's axes, or null if the Plane, Vector3D, or any of the plane's axes are null.

Query.Convert(this Plane, IPolygonal3D, double) Method

Converts a 3D polygonal object to a 2D polygonal object based on a specified Plane and tolerance.

public static DiGi.Geometry.Planar.Interfaces.IPolygonal2D? Convert(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Interfaces.IPolygonal3D? polygonal3D, double tolerance=1E-06);

Parameters

plane Plane

The Plane used for the projection.

polygonal3D DiGi.Geometry.Spatial.Interfaces.IPolygonal3D

The DiGi.Geometry.Spatial.Interfaces.IPolygonal3D object to be converted.

tolerance System.Double

The System.Double tolerance value used during conversion.

Returns

IPolygonal2D
An IPolygonal2D representation of the 3D polygon on the plane, or null if either the Plane or the DiGi.Geometry.Spatial.Interfaces.IPolygonal3D is null.

Query.Convert(this Plane, IPolygonalFace3D) Method

Converts a 3D polygonal face to a 2D polygonal face using the specified plane.

public static DiGi.Geometry.Planar.Interfaces.IPolygonalFace2D? Convert(this DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D? polygonalFace3D);

Parameters

plane Plane

The Plane used for the conversion.

polygonalFace3D DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D

The DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D to be converted.

Returns

IPolygonalFace2D
An IPolygonalFace2D if the conversion is successful; otherwise, null.

Query.Convert<TGeometry3D>(IGeometry3D) Method

Converts a given DiGi.Geometry.Spatial.Interfaces.IGeometry3D instance into a list of TGeometry3D instances.

public static System.Collections.Generic.List<TGeometry3D>? Convert<TGeometry3D>(DiGi.Geometry.Spatial.Interfaces.IGeometry3D? geometry3D)
    where TGeometry3D : DiGi.Geometry.Spatial.Interfaces.IGeometry3D;

Type parameters

TGeometry3D

The target type that implements the DiGi.Geometry.Spatial.Interfaces.IGeometry3D interface.

Parameters

geometry3D DiGi.Geometry.Spatial.Interfaces.IGeometry3D

The source DiGi.Geometry.Spatial.Interfaces.IGeometry3D object to convert.

Returns

System.Collections.Generic.List<TGeometry3D>
A System.Collections.Generic.List<> containing the converted geometry, or null if the provided DiGi.Geometry.Spatial.Interfaces.IGeometry3D is null.

Query.Coplanar(this IPlanar, IPlanar, double) Method

Determines whether two DiGi.Geometry.Spatial.Interfaces.IPlanar objects are coplanar within a specified tolerance.

public static bool Coplanar(this DiGi.Geometry.Spatial.Interfaces.IPlanar? planar_1, DiGi.Geometry.Spatial.Interfaces.IPlanar? planar_2, double tolerance=1E-06);

Parameters

planar_1 DiGi.Geometry.Spatial.Interfaces.IPlanar

The first DiGi.Geometry.Spatial.Interfaces.IPlanar object to evaluate.

planar_2 DiGi.Geometry.Spatial.Interfaces.IPlanar

The second DiGi.Geometry.Spatial.Interfaces.IPlanar object to evaluate.

tolerance System.Double

A System.Double value representing the distance tolerance for coplanarity.

Returns

System.Boolean
A System.Boolean value indicating whether the two objects are coplanar.

Query.Coplanar(this IEnumerable<Point3D>, double) Method

Determines whether a collection of Point3D points are coplanar within a specified tolerance.

public static bool Coplanar(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Point3D>? point3Ds, double tolerance=1E-06);

Parameters

point3Ds System.Collections.Generic.IEnumerable<Point3D>

The System.Collections.Generic.IEnumerable<> of points to evaluate.

tolerance System.Double

The System.Double distance tolerance used to determine if the points lie on the same plane.

Returns

System.Boolean
A System.Boolean value indicating whether the points are coplanar; returns false if the collection is null.

Query.Decompose(this Transform3D, Vector3D, Transform3D, Vector3D) Method

Decomposes an affine 3D transformation matrix into its translation vector, pure rotation matrix, and scale factors.

public static bool Decompose(this DiGi.Geometry.Spatial.Classes.Transform3D? transform3D, out DiGi.Geometry.Spatial.Classes.Vector3D? translation, out DiGi.Geometry.Spatial.Classes.Transform3D? rotation, out DiGi.Geometry.Spatial.Classes.Vector3D? scale);

Parameters

transform3D Transform3D

The source Transform3D matrix to decompose.

translation Vector3D

When this method returns, contains the extracted translation Vector3D, or null if decomposition fails.

rotation Transform3D

When this method returns, contains the extracted pure rotation Transform3D matrix, or null if decomposition fails.

scale Vector3D

When this method returns, contains the extracted scale factors as a Vector3D, or null if decomposition fails.

Returns

System.Boolean
A System.Boolean value indicating whether the matrix was successfully decomposed.

Query.Determinant(this Point3D, Point3D, Point3D, Vector3D) Method

Calculates the determinant of a 3x3 matrix formed by three Point3D points and a Vector3D normal vector.

public static double Determinant(this DiGi.Geometry.Spatial.Classes.Point3D? point3D_1, DiGi.Geometry.Spatial.Classes.Point3D? point3D_2, DiGi.Geometry.Spatial.Classes.Point3D? point3D_3, DiGi.Geometry.Spatial.Classes.Vector3D? normal);

Parameters

point3D_1 Point3D

The first Point3D point.

point3D_2 Point3D

The second Point3D point.

point3D_3 Point3D

The third Point3D point.

normal Vector3D

The Vector3D normal vector.

Returns

System.Double
The calculated System.Double determinant, or System.Double.NaN if any of the provided parameters are null.

Query.Determinant(this Vector3D, Vector3D, Vector3D) Method

Calculates the determinant of a 3x3 matrix formed by three Vector3D vectors.

public static double Determinant(this DiGi.Geometry.Spatial.Classes.Vector3D? vector3D_1, DiGi.Geometry.Spatial.Classes.Vector3D? vector3D_2, DiGi.Geometry.Spatial.Classes.Vector3D? normal);

Parameters

vector3D_1 Vector3D

The first Vector3D vector.

vector3D_2 Vector3D

The second Vector3D vector.

normal Vector3D

The third Vector3D vector.

Returns

System.Double
A System.Double representing the determinant, or System.Double.NaN if any of the input vectors are null.

Query.Difference<TPolygonalFace3D>(this Polyhedron<TPolygonalFace3D>, Polyhedron<TPolygonalFace3D>, double) Method

Calculates the 3D boolean difference between two polyhedra.

public static System.Collections.Generic.List<DiGi.Geometry.Spatial.Classes.Polyhedron>? Difference<TPolygonalFace3D>(this DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>? polyhedron_1, DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>? polyhedron_2, double tolerance=1E-06)
    where TPolygonalFace3D : DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D;

Type parameters

TPolygonalFace3D

The type of polygonal face, which must implement DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D.

Parameters

polyhedron_1 DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>

The first polyhedron (from which to subtract).

polyhedron_2 DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>

The second polyhedron (to subtract).

tolerance System.Double

The distance tolerance for boolean difference computations.

Returns

System.Collections.Generic.List<Polyhedron>
A list of Polyhedron objects representing the resulting difference, or null if either input is null.

Remarks

The computation is delegated to DifferenceResult3D<TPolygonalFace3D>(this Polyhedron<TPolygonalFace3D>, Polyhedron<TPolygonalFace3D>, double); only the polyhedra of the result are returned. Use the result object directly to access lower-dimensional geometry elements.

Query.ExtremePoints(this IEnumerable<Point3D>, Point3D, Point3D) Method

Calculates the two extreme points from a collection of nullable Point3D objects.

public static void ExtremePoints(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Point3D?>? point3Ds, out DiGi.Geometry.Spatial.Classes.Point3D? point3D_1, out DiGi.Geometry.Spatial.Classes.Point3D? point3D_2);

Parameters

point3Ds System.Collections.Generic.IEnumerable<Point3D>

The System.Collections.Generic.IEnumerable<> of nullable Point3D objects to evaluate.

point3D_1 Point3D

When this method returns, contains the first extreme Point3D found; otherwise, null.

point3D_2 Point3D

When this method returns, contains the second extreme Point3D found; otherwise, null.

Query.ExtremePoints(this IEnumerable<Point3D>, Point3D, Point3D, double) Method

Finds the two points within a collection that are furthest apart and calculates the distance between them.

public static void ExtremePoints(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Point3D?>? point3Ds, out DiGi.Geometry.Spatial.Classes.Point3D? point3D_1, out DiGi.Geometry.Spatial.Classes.Point3D? point3D_2, out double distance);

Parameters

point3Ds System.Collections.Generic.IEnumerable<Point3D>

The IEnumerable<Point3D?> of Point3D objects to evaluate.

point3D_1 Point3D

When this method returns, contains the first point of the pair with the maximum distance, or null if the collection is null or contains fewer than two points.

point3D_2 Point3D

When this method returns, contains the second point of the pair with the maximum distance, or null if the collection is null or contains fewer than two points.

distance System.Double

When this method returns, contains the System.Double value representing the distance between the two extreme points, or System.Double.NaN if the collection is null or contains fewer than two points.

Query.InRange<T>(IPlanar<T>, Point3D, double) Method

Determines whether a specified Point3D is within the range of the provided DiGi.Geometry.Spatial.Interfaces.IPlanar<> geometry, considering a given tolerance.

public static bool InRange<T>(DiGi.Geometry.Spatial.Interfaces.IPlanar<T> planar, DiGi.Geometry.Spatial.Classes.Point3D point3D, double tolerance=1E-06)
    where T : DiGi.Geometry.Planar.Interfaces.IPolygonal2D;

Type parameters

T

The type of polygonal geometry, which must implement IPolygonal2D.

Parameters

planar DiGi.Geometry.Spatial.Interfaces.IPlanar<T>

The DiGi.Geometry.Spatial.Interfaces.IPlanar<> object to check against.

point3D Point3D

The Point3D point to evaluate.

tolerance System.Double

A System.Double value representing the distance tolerance.

Returns

System.Boolean
A System.Boolean value indicating whether the Point3D is within range; otherwise, false.

Query.InRange<T>(IPlanar<T>, ISegmentable3D, double) Method

Determines whether a segmentable 3D entity is within the range of a planar entity.

public static bool InRange<T>(DiGi.Geometry.Spatial.Interfaces.IPlanar<T> planar, DiGi.Geometry.Spatial.Interfaces.ISegmentable3D segmentable3D, double tolerance=1E-06)
    where T : DiGi.Geometry.Planar.Interfaces.IPolygonal2D;

Type parameters

T

The type that implements IPolygonal2D.

Parameters

planar DiGi.Geometry.Spatial.Interfaces.IPlanar<T>

The DiGi.Geometry.Spatial.Interfaces.IPlanar<> object to check against.

segmentable3D DiGi.Geometry.Spatial.Interfaces.ISegmentable3D

The DiGi.Geometry.Spatial.Interfaces.ISegmentable3D object to evaluate.

tolerance System.Double

A System.Double value representing the distance tolerance.

Returns

System.Boolean
A System.Boolean value indicating true if the segmentable 3D entity is within range; otherwise, false.

Query.InRange<T>(IPlanar<T>, IEnumerable<Point3D>, double) Method

Determines whether a collection of Point3D objects are within the range of the specified DiGi.Geometry.Spatial.Interfaces.IPlanar<> object.

public static bool InRange<T>(DiGi.Geometry.Spatial.Interfaces.IPlanar<T>? planar, System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Point3D>? point3Ds, double tolerance=1E-06)
    where T : DiGi.Geometry.Planar.Interfaces.IPolygonal2D;

Type parameters

T

The type of polygonal geometry, which must implement IPolygonal2D.

Parameters

planar DiGi.Geometry.Spatial.Interfaces.IPlanar<T>

The DiGi.Geometry.Spatial.Interfaces.IPlanar<> object to check against.

point3Ds System.Collections.Generic.IEnumerable<Point3D>

An System.Collections.Generic.IEnumerable<> containing the points to evaluate.

tolerance System.Double

A System.Double value representing the distance tolerance.

Returns

System.Boolean
A System.Boolean value indicating true if the points are within range; otherwise, false.

Query.Inside(this Point3D, Point3D, Point3D, Point3D, double) Method

Determines whether a point is located inside the triangle formed by three points within a given tolerance.

public static bool Inside(this DiGi.Geometry.Spatial.Classes.Point3D? point3D, DiGi.Geometry.Spatial.Classes.Point3D? point3D_1, DiGi.Geometry.Spatial.Classes.Point3D? point3D_2, DiGi.Geometry.Spatial.Classes.Point3D? point3D_3, double tolerance=1E-06);

Parameters

point3D Point3D

The Point3D point to check.

point3D_1 Point3D

The first vertex of the triangle.

point3D_2 Point3D

The second vertex of the triangle.

point3D_3 Point3D

The third vertex of the triangle.

tolerance System.Double

The distance tolerance value.

Returns

System.Boolean
True if the point lies inside or on the boundary of the triangle; otherwise, false.

Query.Inside<T>(IPlanar<T>, Point3D, double) Method

Determines whether a specified Point3D is inside the given DiGi.Geometry.Spatial.Interfaces.IPlanar<> object within a certain tolerance.

public static bool Inside<T>(DiGi.Geometry.Spatial.Interfaces.IPlanar<T>? planar, DiGi.Geometry.Spatial.Classes.Point3D? point3D, double tolerance=1E-06)
    where T : DiGi.Geometry.Planar.Interfaces.IPolygonal2D;

Type parameters

T

The type of the polygonal 2D object, which must implement IPolygonal2D.

Parameters

planar DiGi.Geometry.Spatial.Interfaces.IPlanar<T>

The DiGi.Geometry.Spatial.Interfaces.IPlanar<> object to check against.

point3D Point3D

The Point3D point to evaluate.

tolerance System.Double

A System.Double value representing the distance tolerance for the operation.

Returns

System.Boolean
A System.Boolean value indicating whether the Point3D is inside the DiGi.Geometry.Spatial.Interfaces.IPlanar<> object; otherwise, false if either parameter is null.

Query.Inside<T>(IPlanar<T>, ISegmentable3D, double) Method

Determines whether a specified DiGi.Geometry.Spatial.Interfaces.ISegmentable3D object is located inside a specified DiGi.Geometry.Spatial.Interfaces.IPlanar<> planar region within a given tolerance.

public static bool Inside<T>(DiGi.Geometry.Spatial.Interfaces.IPlanar<T>? planar, DiGi.Geometry.Spatial.Interfaces.ISegmentable3D? segmentable3D, double tolerance=1E-06)
    where T : DiGi.Geometry.Planar.Interfaces.IPolygonal2D;

Type parameters

T

A type that implements IPolygonal2D.

Parameters

planar DiGi.Geometry.Spatial.Interfaces.IPlanar<T>

The DiGi.Geometry.Spatial.Interfaces.IPlanar<> planar region to check against.

segmentable3D DiGi.Geometry.Spatial.Interfaces.ISegmentable3D

The DiGi.Geometry.Spatial.Interfaces.ISegmentable3D object to evaluate.

tolerance System.Double

A System.Double value representing the distance tolerance for the operation.

Returns

System.Boolean
A System.Boolean value indicating true if the DiGi.Geometry.Spatial.Interfaces.ISegmentable3D object is inside the planar region; otherwise, false.

Query.Inside<T>(IPlanar<T>, IEnumerable<Point3D>, double) Method

Determines whether a collection of Point3D points are located on the plane of the specified DiGi.Geometry.Spatial.Interfaces.IPlanar<> object within a given tolerance.

public static bool Inside<T>(DiGi.Geometry.Spatial.Interfaces.IPlanar<T>? planar, System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Point3D>? point3Ds, double tolerance=1E-06)
    where T : DiGi.Geometry.Planar.Interfaces.IPolygonal2D;

Type parameters

T

A type that implements IPolygonal2D.

Parameters

planar DiGi.Geometry.Spatial.Interfaces.IPlanar<T>

The DiGi.Geometry.Spatial.Interfaces.IPlanar<> object whose plane is being evaluated.

point3Ds System.Collections.Generic.IEnumerable<Point3D>

An System.Collections.Generic.IEnumerable<> containing the points to check.

tolerance System.Double

A System.Double value representing the distance tolerance for the operation.

Returns

System.Boolean
A System.Boolean value indicating true if all provided points are on the plane within the specified tolerance; otherwise, false.

Query.Intersect(double, double, double, double, double, double, Triangle3D) Method

Determines whether the specified Triangle3D overlaps an axis-aligned box given by its center and per-axis half-extents, using the Akenine-Möller separating-axis theorem (thirteen candidate axes: three box face normals, one triangle face normal, and nine edge cross products).

All arithmetic is performed on scalar doubles in the box's local frame, allocating nothing. A degenerate triangle whose normal is zero degrades gracefully to the box-axis and edge tests.

public static bool Intersect(double centerX, double centerY, double centerZ, double halfX, double halfY, double halfZ, DiGi.Geometry.Spatial.Classes.Triangle3D? triangle3D);

Parameters

centerX System.Double

The X-coordinate of the box center.

centerY System.Double

The Y-coordinate of the box center.

centerZ System.Double

The Z-coordinate of the box center.

halfX System.Double

The half-extent of the box along the X axis, already expanded by any tolerance.

halfY System.Double

The half-extent of the box along the Y axis, already expanded by any tolerance.

halfZ System.Double

The half-extent of the box along the Z axis, already expanded by any tolerance.

triangle3D Triangle3D

The Triangle3D to test for overlap.

Returns

System.Boolean
A System.Boolean value indicating true when no separating axis exists (the triangle overlaps the box); otherwise, false.

Query.Intersect(this IPolygonalFace3D, Segment3D, double, bool, bool) Method

Determines whether a specified Segment3D intersects the given DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D object within a certain tolerance.

public static bool Intersect(this DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D? polygonalFace3D, DiGi.Geometry.Spatial.Classes.Segment3D? segment3D, double tolerance=1E-06, bool includeStart=false, bool includeEnd=false);

Parameters

polygonalFace3D DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D

The DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D to check against.

segment3D Segment3D

The Segment3D segment to check.

tolerance System.Double

The tolerance value.

includeStart System.Boolean

If true, includes intersection at the start point of the segment.

includeEnd System.Boolean

If true, includes intersection at the end point of the segment.

Returns

System.Boolean
True if the segment intersects the face; otherwise, false.

Query.Intersection<TPolygonalFace3D>(this Polyhedron<TPolygonalFace3D>, Polyhedron<TPolygonalFace3D>, double) Method

Calculates the 3D boolean intersection between two polyhedra.

public static System.Collections.Generic.List<DiGi.Geometry.Spatial.Classes.Polyhedron>? Intersection<TPolygonalFace3D>(this DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>? polyhedron_1, DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>? polyhedron_2, double tolerance=1E-06)
    where TPolygonalFace3D : DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D;

Type parameters

TPolygonalFace3D

The type of polygonal face, which must implement DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D.

Parameters

polyhedron_1 DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>

The first polyhedron to intersect.

polyhedron_2 DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>

The second polyhedron to intersect.

tolerance System.Double

The distance tolerance for boolean intersection computations.

Returns

System.Collections.Generic.List<Polyhedron>
A list of Polyhedron objects representing the resulting intersection, or null if either input is null.

Remarks

The computation is delegated to IntersectionResult3D<TPolygonalFace3D>(this Polyhedron<TPolygonalFace3D>, Polyhedron<TPolygonalFace3D>, double); only the polyhedra of the result are returned. Use the result object directly to access lower-dimensional geometry elements.

Query.IntersectionPoint(Point3D, Point3D, Point3D, Point3D, double) Method

Calculates the intersection point of two lines defined by their start and end points.

public static DiGi.Geometry.Spatial.Classes.Point3D? IntersectionPoint(DiGi.Geometry.Spatial.Classes.Point3D? point3D_1_Start, DiGi.Geometry.Spatial.Classes.Point3D? point3D_1_End, DiGi.Geometry.Spatial.Classes.Point3D? point3D_2_Start, DiGi.Geometry.Spatial.Classes.Point3D? point3D_2_End, double tolerance=1E-06);

Parameters

point3D_1_Start Point3D

The starting Point3D of the first line.

point3D_1_End Point3D

The ending Point3D of the first line.

point3D_2_Start Point3D

The starting Point3D of the second line.

point3D_2_End Point3D

The ending Point3D of the second line.

tolerance System.Double

The System.Double tolerance used to determine if an intersection exists.

Returns

Point3D
A Point3D representing the intersection point, or null if no intersection is found within the specified tolerance.

Query.IntersectionPoint(this Point3D, Vector3D, Point3D, Vector3D, bool, double) Method

Intersection of tw lines represented by vector3D (direction) and Point3D (origin). Source: https://github\.com/arakis/Net3dBool/blob/39354914eba2f9d34aedd2a16a6528d50e19beec/src/Net3dBool/Line\.cs\#L46

public static DiGi.Geometry.Spatial.Classes.Point3D? IntersectionPoint(this DiGi.Geometry.Spatial.Classes.Point3D? point3D_1, DiGi.Geometry.Spatial.Classes.Vector3D? vector3D_1, DiGi.Geometry.Spatial.Classes.Point3D? point3D_2, DiGi.Geometry.Spatial.Classes.Vector3D? vector3D_2, bool bounded, double tolerance=1E-06);

Parameters

point3D_1 Point3D

Origin point3D of first line

vector3D_1 Vector3D

Direction Vector3D of first line

point3D_2 Point3D

Origin point3D of second line

vector3D_2 Vector3D

Direction Vector3D of second line

bounded System.Boolean

Bounded means the intersection is limited to the line segments

tolerance System.Double

Tolerance

Returns

Point3D

Query.IsClosed<TPolygonalFace3D>(this Polyhedron<TPolygonalFace3D>, bool, double) Method

Determines whether the specified Polyhedron<TPolygonalFace3D> is fully closed within the given distance tolerance.

Face vertices are welded into shared indices using a tolerance-sized spatial hash, and each resulting edge is counted. Edges collapsing onto a single welded vertex are ignored.

Returns false for a null polyhedron, for fewer than four faces (the minimum for a closed solid), and for any structurally malformed face - a face with no plane, no 2D geometry, no edges, a ring holding fewer than three points, or a null point within a ring. A face that cannot be read in full is never treated as contributing no edges, because that would let a broken face pass as closed.

Known limitations. Winding is not checked: two faces sharing an edge in the same direction are accepted, whereas a consistently oriented solid traverses a shared edge in opposite directions - use Orient(Nullable<Orientation>, Nullable<Orientation>) for that. T-junctions report open: when one face's long edge is met by two shorter faces whose shared vertex lies mid-span, no vertex pair matches. Welding is not transitive, so a chain of vertices each within tolerance of the next can weld together even though the chain spans more than the tolerance.

public static bool IsClosed<TPolygonalFace3D>(this DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>? polyhedron, bool manifold, double tolerance=1E-06)
    where TPolygonalFace3D : DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D;

Type parameters

TPolygonalFace3D

The type of the polygonal face, which must implement DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D.

Parameters

polyhedron DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>

The Polyhedron<TPolygonalFace3D> to evaluate.

manifold System.Boolean

When true, every edge must be used exactly twice (a strict 2-manifold surface), so an edge shared by three or more faces is rejected. When false, every edge must be used an even number of times, which accepts an edge shared by four faces.

tolerance System.Double

The System.Double distance tolerance used to weld coincident vertices. Values of zero or less fall back to DiGi.Core.Constants.Tolerance.MicroDistance. Defaults to DiGi.Core.Constants.Tolerance.Distance.

Returns

System.Boolean
A System.Boolean value indicating whether the polyhedron is fully closed.

Query.IsClosed<TPolygonalFace3D>(this Polyhedron<TPolygonalFace3D>, double) Method

Determines whether the specified Polyhedron<TPolygonalFace3D> is fully closed (i.e., has no naked edges) within the given distance tolerance.

Every edge must be used an even number of times. Use the overload taking a manifold flag to require that every edge is used exactly twice.

public static bool IsClosed<TPolygonalFace3D>(this DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>? polyhedron, double tolerance=1E-06)
    where TPolygonalFace3D : DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D;

Type parameters

TPolygonalFace3D

The type of the polygonal face, which must implement DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D.

Parameters

polyhedron DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>

The Polyhedron<TPolygonalFace3D> to evaluate.

tolerance System.Double

The System.Double distance tolerance used to weld coincident vertices. Values of zero or less fall back to DiGi.Core.Constants.Tolerance.MicroDistance. Defaults to DiGi.Core.Constants.Tolerance.Distance.

Returns

System.Boolean
A System.Boolean value indicating whether the polyhedron is fully closed.

Query.Max(this Point3D, Point3D) Method

Returns the maximum of two Point3D? points.

public static DiGi.Geometry.Spatial.Classes.Point3D? Max(this DiGi.Geometry.Spatial.Classes.Point3D? point3D_1, DiGi.Geometry.Spatial.Classes.Point3D? point3D_2);

Parameters

point3D_1 Point3D

The first Point3D? point to compare.

point3D_2 Point3D

The second Point3D? point to compare.

Returns

Point3D
The maximum of the two Point3D? points, or null if either input is null.

Query.Max(this IEnumerable<Point3D>) Method

Returns the maximum Point3D from the specified collection of nullable Point3D objects.

public static DiGi.Geometry.Spatial.Classes.Point3D? Max(this System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Point3D?>? point3Ds);

Parameters

point3Ds System.Collections.Generic.IEnumerable<Point3D>

The [System.Collections.Generic.IEnumerable<>](https://learn.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1 'System.Colle

Clone this wiki locally