Skip to content

DiGi.Geometry.Spatial.Classes

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

DiGi.Geometry.Spatial.Classes Namespace

Classes

BooleanOperationResult3D Class

Represents the abstract base class for a 3D boolean operation result.

public abstract class BooleanOperationResult3D : DiGi.Core.Classes.SerializableObject, DiGi.Geometry.Spatial.Interfaces.IBooleanOperationResult3D, DiGi.Core.Interfaces.ISerializableResult, DiGi.Core.Interfaces.IResult, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObject → BooleanOperationResult3D

Derived
DifferenceResult3D
IntersectionResult3D
UnionResult3D

Implements IBooleanOperationResult3D, DiGi.Core.Interfaces.ISerializableResult, DiGi.Core.Interfaces.IResult, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject

Constructors

BooleanOperationResult3D() Constructor

Initializes a new instance of the BooleanOperationResult3D class.

protected BooleanOperationResult3D();

BooleanOperationResult3D(BooleanOperationResult3D) Constructor

Initializes a new instance of the BooleanOperationResult3D class using another instance.

protected BooleanOperationResult3D(DiGi.Geometry.Spatial.Classes.BooleanOperationResult3D? booleanOperationResult3D);

Parameters

booleanOperationResult3D BooleanOperationResult3D

The instance to copy from.

BooleanOperationResult3D(IEnumerable<IGeometry3D>) Constructor

Initializes a new instance of the BooleanOperationResult3D class with the specified geometries.

protected BooleanOperationResult3D(System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Interfaces.IGeometry3D>? geometry3Ds);

Parameters

geometry3Ds System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Interfaces.IGeometry3D>

The geometries to store in the result.

BooleanOperationResult3D(JsonObject) Constructor

Initializes a new instance of the BooleanOperationResult3D class using the specified System.Text.Json.Nodes.JsonObject.

protected BooleanOperationResult3D(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The System.Text.Json.Nodes.JsonObject used to initialize the instance.

Properties

BooleanOperationResult3D.BooleanOpertaionType Property

Gets the type of the boolean operation.

public abstract DiGi.Geometry.Core.Enums.BooleanOpertaionType BooleanOpertaionType { get; }

Implements BooleanOpertaionType

Property Value

BooleanOpertaionType

BooleanOperationResult3D.Count Property

Gets the total number of DiGi.Geometry.Spatial.Interfaces.IGeometry3D elements.

public int Count { get; }

Implements Count

Property Value

System.Int32

BooleanOperationResult3D.this[int] Property

Gets the 3D geometry at the specified index.

public DiGi.Geometry.Spatial.Interfaces.IGeometry3D? this[int index] { get; }

Parameters

index System.Int32

The zero-based index of the geometry to retrieve.

Implements this[int]

Property Value

DiGi.Geometry.Spatial.Interfaces.IGeometry3D

Methods

BooleanOperationResult3D.Any() Method

Determines whether there are any 3D geometries present.

public bool Any();

Implements Any()

Returns

System.Boolean
true if any geometries are present; otherwise, false.

BooleanOperationResult3D.Contains<T>() Method

Determines whether the collection contains any object of the specified type T.

public bool Contains<T>()
    where T : DiGi.Geometry.Spatial.Interfaces.IGeometry3D;

Type parameters

T

The type of geometry to search for.

Implements Contains<T>()

Returns

System.Boolean
true if an object of type T is present; otherwise, false.

BooleanOperationResult3D.GetGeometry3Ds<T>() Method

Retrieves a list of 3D geometries of the specified type T.

public System.Collections.Generic.List<T>? GetGeometry3Ds<T>()
    where T : DiGi.Geometry.Spatial.Interfaces.IGeometry3D;

Type parameters

T

The type of geometry to retrieve, which must implement the DiGi.Geometry.Spatial.Interfaces.IGeometry3D interface.

Implements GetGeometry3Ds<T>()

Returns

System.Collections.Generic.List<T>
A list of matching geometries, or null if no geometries are present.

BoundingBox3D Class

Represents a three-dimensional bounding box defined by minimum and maximum Point3D points.

public class BoundingBox3D : DiGi.Geometry.Spatial.Classes.Geometry3D, DiGi.Geometry.Core.Interfaces.IBoundingBox<DiGi.Geometry.Spatial.Classes.Point3D>, DiGi.Geometry.Core.Interfaces.IBoundingBox, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectGeometry3D → BoundingBox3D

Implements DiGi.Geometry.Core.Interfaces.IBoundingBox<Point3D>, DiGi.Geometry.Core.Interfaces.IBoundingBox, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject

Constructors

BoundingBox3D(BoundingBox3D) Constructor

Initializes a new instance of the BoundingBox3D class using an existing BoundingBox3D object.

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

Parameters

boundingBox3D BoundingBox3D

The BoundingBox3D object to copy values from.

BoundingBox3D(Point3D, Point3D) Constructor

Initializes a new instance of the BoundingBox3D class using two Point3D points to define the boundaries.

public BoundingBox3D(DiGi.Geometry.Spatial.Classes.Point3D? point3D_1, DiGi.Geometry.Spatial.Classes.Point3D? point3D_2);

Parameters

point3D_1 Point3D

The first Point3D? point used to calculate the minimum and maximum bounds.

point3D_2 Point3D

The second Point3D? point used to calculate the minimum and maximum bounds.

BoundingBox3D(Point3D, double) Constructor

Initializes a new instance of the BoundingBox3D class using a specified Point3D and an offset value.

public BoundingBox3D(DiGi.Geometry.Spatial.Classes.Point3D? point3D, double offset);

Parameters

point3D Point3D

The optional Point3D to serve as the center point for the bounding box.

offset System.Double

The System.Double offset used to determine the extent of the bounding box from the center point.

BoundingBox3D(IEnumerable<Point3D>) Constructor

Initializes a new instance of the BoundingBox3D class using a collection of nullable Point3D objects.

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

Parameters

point3Ds System.Collections.Generic.IEnumerable<Point3D>

An System.Collections.Generic.IEnumerable<> of nullable Point3D objects used to determine the minimum and maximum boundaries of the bounding box.

BoundingBox3D(IEnumerable<Point3D>, double) Constructor

Initializes a new instance of the BoundingBox3D class using a collection of Point3D points and a specified offset.

public BoundingBox3D(System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Point3D?>? point3Ds, double offset);

Parameters

point3Ds System.Collections.Generic.IEnumerable<Point3D>

The System.Collections.Generic.IEnumerable<> of Point3D objects used to determine the minimum and maximum boundaries.

offset System.Double

The System.Double value to apply as an offset to the bounding box.

BoundingBox3D(JsonObject) Constructor

Initializes a new instance of the BoundingBox3D class using the specified System.Text.Json.Nodes.JsonObject.

public BoundingBox3D(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The System.Text.Json.Nodes.JsonObject containing the data to initialize the bounding box. This value can be null.

Properties

BoundingBox3D.Depth Property

Gets the depth value, calculated as the difference between the Y-coordinate of the maximum point and the Y-coordinate of the minimum point. Returns a System.Double.NaN if either the maximum or minimum points are null.

public double Depth { get; }

Property Value

System.Double
A System.Double representing the depth.

BoundingBox3D.Height Property

Gets the height of the object, calculated as the difference between the Z-coordinate of the maximum point and the Z-coordinate of the minimum point.

public double Height { get; }

Property Value

System.Double
A System.Double representing the height, or System.Double.NaN if the bounds are not defined.

BoundingBox3D.Max Property

Gets or sets the maximum boundary point of the bounding volume. Setting this value expands the bounds to include the specified Point3D.

public DiGi.Geometry.Spatial.Classes.Point3D Max { get; set; }

Implements Max

Property Value

Point3D
The Point3D representing the maximum coordinates.

BoundingBox3D.MaxX Property

Gets the X-coordinate of the maximum bound without allocating a Point3D, or System.Double.NaN if the maximum point is null.

public double MaxX { get; }

Property Value

System.Double
A System.Double representing the maximum X-coordinate.

BoundingBox3D.MaxY Property

Gets the Y-coordinate of the maximum bound without allocating a Point3D, or System.Double.NaN if the maximum point is null.

public double MaxY { get; }

Property Value

System.Double
A System.Double representing the maximum Y-coordinate.

BoundingBox3D.MaxZ Property

Gets the Z-coordinate of the maximum bound without allocating a Point3D, or System.Double.NaN if the maximum point is null.

public double MaxZ { get; }

Property Value

System.Double
A System.Double representing the maximum Z-coordinate.

BoundingBox3D.Min Property

Gets or sets the minimum Point3D point of the boundary.

public DiGi.Geometry.Spatial.Classes.Point3D Min { get; set; }

Implements Min

Property Value

Point3D
The Point3D representing the minimum coordinates.

BoundingBox3D.MinX Property

Gets the X-coordinate of the minimum bound without allocating a Point3D, or System.Double.NaN if the minimum point is null.

public double MinX { get; }

Property Value

System.Double
A System.Double representing the minimum X-coordinate.

BoundingBox3D.MinY Property

Gets the Y-coordinate of the minimum bound without allocating a Point3D, or System.Double.NaN if the minimum point is null.

public double MinY { get; }

Property Value

System.Double
A System.Double representing the minimum Y-coordinate.

BoundingBox3D.MinZ Property

Gets the Z-coordinate of the minimum bound without allocating a Point3D, or System.Double.NaN if the minimum point is null.

public double MinZ { get; }

Property Value

System.Double
A System.Double representing the minimum Z-coordinate.

BoundingBox3D.Width Property

Gets the width of the bounding area.

public double Width { get; }

Property Value

System.Double
A System.Double representing the difference between the maximum X coordinate and the minimum X coordinate, or System.Double.NaN if either point is null.

Methods

BoundingBox3D.Add(BoundingBox3D) Method

Adds a BoundingBox3D to the collection.

public bool Add(DiGi.Geometry.Spatial.Classes.BoundingBox3D? boundingBox3D);

Parameters

boundingBox3D BoundingBox3D

The BoundingBox3D instance to add.

Returns

System.Boolean
A System.Boolean value indicating whether the BoundingBox3D was successfully added; returns false if the provided BoundingBox3D or its minimum and maximum points are null.

BoundingBox3D.Add(Point3D) Method

Adds a Point3D to the bounding volume and updates the minimum and maximum bounds.

public bool Add(DiGi.Geometry.Spatial.Classes.Point3D? point3D);

Parameters

point3D Point3D

The Point3D instance to add.

Returns

System.Boolean
A System.Boolean value indicating whether the point was successfully added; returns false if the provided Point3D is null.

BoundingBox3D.Clone() Method

Creates a copy of the current BoundingBox3D instance.

public override DiGi.Core.Interfaces.ISerializableObject Clone();

Implements Clone()

Returns

DiGi.Core.Interfaces.ISerializableObject
An DiGi.Core.Interfaces.ISerializableObject that is a clone of the current instance.

BoundingBox3D.GetCentroid() Method

Calculates the centroid of the object.

public DiGi.Geometry.Spatial.Classes.Point3D? GetCentroid();

Returns

Point3D
A Point3D representing the centroid, or null if it cannot be calculated.

BoundingBox3D.GetPoints() Method

Retrieves a list of Point3D objects representing the corners of the volume.

public System.Collections.Generic.List<DiGi.Geometry.Spatial.Classes.Point3D>? GetPoints();

Returns

System.Collections.Generic.List<Point3D>
A System.Collections.Generic.List<> containing the calculated points, or null if the minimum or maximum bounds are not defined.

BoundingBox3D.GetVolume() Method

Calculates the volume based on the width, height, and depth properties.

public double GetVolume();

Returns

System.Double
The calculated volume as a System.Double, or System.Double.NaN if any of the dimensions are System.Double.NaN.

BoundingBox3D.InRange(BoundingBox3D, double) Method

Determines whether the specified BoundingBox3D is within range, considering a given tolerance.

public bool InRange(DiGi.Geometry.Spatial.Classes.BoundingBox3D? boundingBox3D, double tolerance=1E-06);

Parameters

boundingBox3D BoundingBox3D

The BoundingBox3D to check.

tolerance System.Double

A System.Double value representing the distance tolerance for the range check.

Returns

System.Boolean
A System.Boolean value indicating true if the bounding box is within range; otherwise, false.

BoundingBox3D.InRange(Line3D, double) Method

Determines whether the object is within a specified tolerance of the given Line3D.

public bool InRange(DiGi.Geometry.Spatial.Classes.Line3D? line3D, double tolerance=1E-06);

Parameters

line3D Line3D

The Line3D to check against.

tolerance System.Double

The System.Double value representing the distance tolerance.

Returns

System.Boolean
A System.Boolean value indicating whether the object is within range of the line.

BoundingBox3D.InRange(Mesh3D, double) Method

Determines whether the specified Mesh3D is within range of this bounding box, considering a given tolerance.

A cheap bounding-box overlap of the mesh against this box rejects fully disjoint meshes before any per-triangle work; the remaining triangles are tested individually with an exact triangle-versus-box overlap test. No containment logic is applied, so a box floating inside a hollow mesh without touching any triangle is not reported as in range.

public bool InRange(DiGi.Geometry.Spatial.Classes.Mesh3D? mesh3D, double tolerance=1E-06);

Parameters

mesh3D Mesh3D

The Mesh3D to evaluate.

tolerance System.Double

The System.Double distance tolerance by which the box is expanded on each axis before the overlap test.

Returns

System.Boolean
A System.Boolean value indicating true if any triangle of the mesh is within range of the box; otherwise, false.

BoundingBox3D.InRange(Plane, double) Method

Determines whether the object is within a specified tolerance of the given plane.

public bool InRange(DiGi.Geometry.Spatial.Classes.Plane? plane, double tolerance=1E-06);

Parameters

plane Plane

The Plane to check against. If null, the method returns false.

tolerance System.Double

The System.Double distance tolerance used to determine if the object is in range.

Returns

System.Boolean
A System.Boolean value indicating whether the object is within the specified tolerance of the plane.

BoundingBox3D.InRange(Point3D, Point3D, bool, bool, double) Method

Determines whether the range defined by two points intersects any of the associated planes within a specified tolerance.

public bool InRange(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

point3D_1 Point3D

The first Point3D point defining the range.

point3D_2 Point3D

The second Point3D? point defining the range.

bounded_1 System.Boolean

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

bounded_2 System.Boolean

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

tolerance System.Double

The System.Double tolerance used for distance calculations.

Returns

System.Boolean
A System.Boolean value indicating whether the range is within the specified criteria.

BoundingBox3D.InRange(Point3D, double) Method

Determines whether the specified Point3D is within the defined range, considering a given tolerance.

public bool InRange(DiGi.Geometry.Spatial.Classes.Point3D? point3D, double tolerance=1E-06);

Parameters

point3D Point3D

The Point3D to evaluate.

tolerance System.Double

The System.Double value representing the allowed distance tolerance.

Returns

System.Boolean
A System.Boolean value indicating whether the point is within the range.

BoundingBox3D.InRange(Ray3D, double) Method

Determines whether the specified Ray3D is within the range, considering a given tolerance.

public bool InRange(DiGi.Geometry.Spatial.Classes.Ray3D? ray3D, double tolerance=1E-06);

Parameters

ray3D Ray3D

The Ray3D to check for being in range.

tolerance System.Double

The System.Double value representing the distance tolerance.

Returns

System.Boolean
A System.Boolean value indicating whether the Ray3D is within the range.

BoundingBox3D.InRange(Segment3D, double) Method

Determines whether the specified Segment3D is within the range.

public bool InRange(DiGi.Geometry.Spatial.Classes.Segment3D? segment3D, double tolerance=1E-06);

Parameters

segment3D Segment3D

The Segment3D to evaluate.

tolerance System.Double

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

Returns

System.Boolean
A System.Boolean value indicating whether the Segment3D is within the range.

BoundingBox3D.InRange(Triangle3D, double) Method

Determines whether the specified Triangle3D overlaps this bounding box, considering a given tolerance.

Uses an exact triangle-versus-axis-aligned-box separating-axis test, so a triangle whose face passes through the box while all three of its vertices lie outside is still reported as in range.

public bool InRange(DiGi.Geometry.Spatial.Classes.Triangle3D? triangle3D, double tolerance=1E-06);

Parameters

triangle3D Triangle3D

The Triangle3D to evaluate.

tolerance System.Double

The System.Double distance tolerance by which the box is expanded on each axis before the overlap test.

Returns

System.Boolean
A System.Boolean value indicating true if the triangle is within range of the box; otherwise, false.

BoundingBox3D.InRange(ISegmentable3D, double) Method

Determines whether the specified DiGi.Geometry.Spatial.Interfaces.ISegmentable3D object is within the defined range, considering a distance tolerance.

public bool InRange(DiGi.Geometry.Spatial.Interfaces.ISegmentable3D? segmentable3D, double tolerance=1E-06);

Parameters

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 used for the range check.

Returns

System.Boolean
A System.Boolean value indicating true if the DiGi.Geometry.Spatial.Interfaces.ISegmentable3D object is within range; otherwise, false.

BoundingBox3D.Inside(Point3D, double) Method

Determines whether a specified Point3D is inside the bounding volume, accounting for a given tolerance.

public bool Inside(DiGi.Geometry.Spatial.Classes.Point3D? point3D, double tolerance=1E-06);

Parameters

point3D Point3D

The Point3D to check.

tolerance System.Double

The System.Double value representing the distance tolerance used to shrink the boundary.

Returns

System.Boolean
A System.Boolean indicating whether the Point3D is inside the volume; returns false if the point or bounding limits are null.

BoundingBox3D.Move(Vector3D) Method

Moves the object by the specified Vector3D vector.

public override bool Move(DiGi.Geometry.Spatial.Classes.Vector3D? vector3D);

Parameters

vector3D Vector3D

The Vector3D? vector to use for the movement.

Implements Move(Vector3D)

Returns

System.Boolean
A bool indicating whether the move operation was successful.

BoundingBox3D.Offset(double) Method

Offsets the minimum and maximum points of the bounding box by the specified double value.

public void Offset(double value);

Parameters

value System.Double

The double value to offset the boundaries by.

BoundingBox3D.On(Point3D, double) Method

Determines whether the specified Point3D is located on the entity within the given tolerance.

public bool On(DiGi.Geometry.Spatial.Classes.Point3D? point3D, double tolerance=1E-06);

Parameters

point3D Point3D

The Point3D to evaluate.

tolerance System.Double

The System.Double distance tolerance used for the calculation.

Returns

System.Boolean
A System.Boolean value indicating whether the point is on the entity.

BVHNode Class

Represents a concrete, non-generic split-axis Bounding Volume Hierarchy (BVH) node that stores DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D elements.

public class BVHNode : DiGi.Geometry.Spatial.Classes.BVHNode<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectDiGi.Geometry.Spatial.Classes.BVHNode<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D> → BVHNode

Constructors

BVHNode(BVHNode) Constructor

Initializes a new instance of the BVHNode class by copying from another node.

public BVHNode(DiGi.Geometry.Spatial.Classes.BVHNode? other);

Parameters

other BVHNode

The source node to copy from.

BVHNode(List<IPolygonalFace3D>) Constructor

Initializes a new instance of the BVHNode class by partitioning the input list of faces.

public BVHNode(System.Collections.Generic.List<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>? polygonalFace3Ds);

Parameters

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

The list of polygonal faces to partition.

BVHNode(JsonObject) Constructor

Initializes a new instance of the BVHNode class using the specified System.Text.Json.Nodes.JsonObject.

public BVHNode(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object containing the data to deserialize.

Methods

BVHNode.Clone() Method

Deep copies the current BVH tree.

public override DiGi.Core.Interfaces.ISerializableObject? Clone();

Implements Clone()

Returns

DiGi.Core.Interfaces.ISerializableObject
A new DiGi.Core.Interfaces.ISerializableObject that is a cloned copy of the current node.

BVHNode.CreateNode(List<IPolygonalFace3D>) Method

Creates a concrete child node of type BVHNode.

protected override DiGi.Geometry.Spatial.Classes.BVHNode<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>? CreateNode(System.Collections.Generic.List<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D> polygonalFace3Ds);

Parameters

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

The list of polygonal faces to assign to the child node.

Returns

DiGi.Geometry.Spatial.Classes.BVHNode<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>
A concrete child instance of BVHNode.

BVHNode<TPolygonalFace3D> Class

Represents an abstract, generic split-axis Bounding Volume Hierarchy (BVH) node designed to accelerate constructive solid geometry (CSG) queries on 3D polyhedra. This structure partitions 3D polygonal faces hierarchically for fast spatial overlap culling during boolean operations such as Intersection, Union, and Difference.

public abstract class BVHNode<TPolygonalFace3D> : DiGi.Core.Classes.SerializableObject
    where TPolygonalFace3D : DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D

Type parameters

TPolygonalFace3D

The type of 3D polygonal face, implementing DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D.

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObject → BVHNode<TPolygonalFace3D>

Derived
BVHNode

Constructors

BVHNode(BVHNode<TPolygonalFace3D>) Constructor

Initializes a new instance of the BVHNode<TPolygonalFace3D> class by copying the properties from an existing node.

protected BVHNode(DiGi.Geometry.Spatial.Classes.BVHNode<TPolygonalFace3D>? other);

Parameters

other DiGi.Geometry.Spatial.Classes.BVHNode<TPolygonalFace3D>

The source node to copy values from.

BVHNode(List<TPolygonalFace3D>) Constructor

Initializes a new instance of the BVHNode<TPolygonalFace3D> class by partitioning the input list of faces hierarchically.

protected BVHNode(System.Collections.Generic.List<TPolygonalFace3D>? polygonalFace3Ds);

Parameters

polygonalFace3Ds System.Collections.Generic.List<TPolygonalFace3D>

The list of polygonal faces to organize inside the spatial hierarchy.

BVHNode(JsonObject) Constructor

Initializes a new instance of the BVHNode<TPolygonalFace3D> class using the specified System.Text.Json.Nodes.JsonObject.

protected BVHNode(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The JSON object containing the data to initialize the node.

Properties

BVHNode<TPolygonalFace3D>.Box Property

Gets the bounding box that encompasses all geometry in this node and its children.

public DiGi.Geometry.Spatial.Classes.BoundingBox3D? Box { get; }

Property Value

BoundingBox3D

BVHNode<TPolygonalFace3D>.Faces Property

Gets the list of polygonal faces stored directly in this leaf node (null or empty if this is an internal node).

public System.Collections.Generic.List<TPolygonalFace3D>? Faces { get; }

Property Value

System.Collections.Generic.List<TPolygonalFace3D>

BVHNode<TPolygonalFace3D>.Left Property

Gets the left child node in the spatial hierarchy.

public DiGi.Geometry.Spatial.Classes.BVHNode<TPolygonalFace3D>? Left { get; }

Property Value

DiGi.Geometry.Spatial.Classes.BVHNode<TPolygonalFace3D>

BVHNode<TPolygonalFace3D>.Right Property

Gets the right child node in the spatial hierarchy.

public DiGi.Geometry.Spatial.Classes.BVHNode<TPolygonalFace3D>? Right { get; }

Property Value

DiGi.Geometry.Spatial.Classes.BVHNode<TPolygonalFace3D>

Methods

BVHNode<TPolygonalFace3D>.CreateNode(List<TPolygonalFace3D>) Method

Creates a child node of the concrete hierarchy type.

protected abstract DiGi.Geometry.Spatial.Classes.BVHNode<TPolygonalFace3D>? CreateNode(System.Collections.Generic.List<TPolygonalFace3D> polygonalFace3Ds);

Parameters

polygonalFace3Ds System.Collections.Generic.List<TPolygonalFace3D>

The list of polygonal faces to assign to the child node.

Returns

DiGi.Geometry.Spatial.Classes.BVHNode<TPolygonalFace3D>
A concrete child instance of BVHNode<TPolygonalFace3D>.

BVHNodePointRelationSolver Class

Classifies points against a closed polyhedron boundary as Inside, On or Outside using a prebuilt Bounding Volume Hierarchy (BVH) for accelerated parity ray-casting queries.

The solver is built once per polyhedron and reused for many point queries during constructive solid geometry (CSG) boolean operations: set Input to the query point, call Solve(), then read Output. This avoids the repeated face extraction, face cloning and bounding box recomputation that the general purpose Inside(Point3D, double) and On(Point3D, double) methods incur on every call.

Not thread-safe: instances keep an internal scratch buffer and are intended for single-threaded use within one boolean operation.

internal class BVHNodePointRelationSolver : DiGi.Core.Interfaces.IOneToOneSolver<DiGi.Geometry.Spatial.Classes.Point3D, DiGi.Geometry.Core.Enums.PointRelation>, DiGi.Core.Interfaces.ISolver, DiGi.Core.Interfaces.IEvaluator

Inheritance System.Object → BVHNodePointRelationSolver

Implements DiGi.Core.Interfaces.IOneToOneSolver<Point3D,PointRelation>, DiGi.Core.Interfaces.ISolver, DiGi.Core.Interfaces.IEvaluator

Constructors

BVHNodePointRelationSolver(BVHNode<IPolygonalFace3D>, double) Constructor

Initializes a new instance of the BVHNodePointRelationSolver class.

internal BVHNodePointRelationSolver(DiGi.Geometry.Spatial.Classes.BVHNode<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D> bVHNode, double tolerance);

Parameters

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

The prebuilt Bounding Volume Hierarchy (BVH) of the polyhedron faces. Its root box defines the query bounds.

tolerance System.Double

The distance tolerance used for On-boundary classification and crossing tests.

Properties

BVHNodePointRelationSolver.Input Property

Sets the query point to classify against the polyhedron boundary on the next Solve() call.

public DiGi.Geometry.Spatial.Classes.Point3D? Input { set; }

Implements Input

Property Value

Point3D

BVHNodePointRelationSolver.Output Property

Gets the spatial relation of the last solved point to the polyhedron boundary.

public DiGi.Geometry.Core.Enums.PointRelation Output { get; }

Implements Output

Property Value

PointRelation

Methods

BVHNodePointRelationSolver.Solve() Method

Classifies Input against the polyhedron boundary and stores the result in Output.

public bool Solve();

Implements Solve()

Returns

System.Boolean
True if the point was classified; false if Input is null or the solver has no bounding box.

Coordinate3D Class

Represents a three-dimensional coordinate in space.

public abstract class Coordinate3D : DiGi.Geometry.Core.Classes.Coordinate, DiGi.Geometry.Spatial.Interfaces.IGeometry3D, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Spatial.Interfaces.IMovable3D, DiGi.Geometry.Spatial.Interfaces.ITransformable3D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Spatial.Interfaces.ITransform3D>, DiGi.Geometry.Core.Interfaces.ITransformable

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectCoordinate → Coordinate3D

Derived
Point3D
Vector3D

Implements DiGi.Geometry.Spatial.Interfaces.IGeometry3D, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Spatial.Interfaces.IMovable3D, DiGi.Geometry.Spatial.Interfaces.ITransformable3D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Spatial.Interfaces.ITransform3D>, DiGi.Geometry.Core.Interfaces.ITransformable

Constructors

Coordinate3D() Constructor

Initializes a new instance of the Coordinate3D class.

public Coordinate3D();

Coordinate3D(Coordinate3D) Constructor

Initializes a new instance of the Coordinate3D class using an existing Coordinate3D object.

public Coordinate3D(DiGi.Geometry.Spatial.Classes.Coordinate3D? coordinate3D);

Parameters

coordinate3D Coordinate3D

The Coordinate3D instance to copy values from.

Coordinate3D(double, double, double) Constructor

Initializes a new instance of the Coordinate3D class with specified X, Y, and Z coordinates.

public Coordinate3D(double x, double y, double z);

Parameters

x System.Double

The X coordinate as a double value.

y System.Double

The Y coordinate as a double value.

z System.Double

The Z coordinate as a double value.

Coordinate3D(double[]) Constructor

Initializes a new instance of the Coordinate3D class using an array of System.Double values.

public Coordinate3D(double[]? values);

Parameters

values System.Double[]

An optional array of double values. If the array is null or contains fewer than three elements, all coordinates are initialized to System.Double.NaN.

Coordinate3D(int) Constructor

Initializes a new instance of the Coordinate3D class with the specified internal values array length.

protected Coordinate3D(int length);

Parameters

length System.Int32

The length of the values array.

Coordinate3D(JsonObject) Constructor

Initializes a new instance of the Coordinate3D class using the specified System.Text.Json.Nodes.JsonObject.

public Coordinate3D(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The System.Text.Json.Nodes.JsonObject used to initialize the coordinate. This value can be null.

Properties

Coordinate3D.X Property

Gets or sets the X-coordinate value as a double.

public double X { get; set; }

Property Value

System.Double

Coordinate3D.Y Property

Gets or sets the Y-coordinate value as a double.

public double Y { get; set; }

Property Value

System.Double

Coordinate3D.Z Property

Gets or sets the Z-coordinate value as a double.

public double Z { get; set; }

Property Value

System.Double

Methods

Coordinate3D.Move(Vector3D) Method

Moves the object by adding the specified Vector3D offset to its current values.

public bool Move(DiGi.Geometry.Spatial.Classes.Vector3D? vector3D);

Parameters

vector3D Vector3D

The Vector3D? vector used for translation.

Implements Move(Vector3D)

Returns

System.Boolean
A bool value indicating whether the movement was successfully applied.

Coordinate3D.Transform(ITransform3D) Method

Transforms the current values using the specified 3D transformation.

public virtual bool Transform(DiGi.Geometry.Spatial.Interfaces.ITransform3D? transform);

Parameters

transform DiGi.Geometry.Spatial.Interfaces.ITransform3D

The DiGi.Geometry.Spatial.Interfaces.ITransform3D object used to perform the transformation.

Returns

System.Boolean
A System.Boolean value indicating whether the transformation was successfully applied; otherwise, false.

CoordinateSystem3D Class

Represents a three-dimensional coordinate system defined by an origin and axes.

public class CoordinateSystem3D : DiGi.Geometry.Spatial.Classes.Geometry3D, DiGi.Geometry.Spatial.Interfaces.ICoordinateSystem3D, DiGi.Geometry.Core.Interfaces.ICoordinateSystem<DiGi.Geometry.Spatial.Classes.Point3D>, DiGi.Geometry.Core.Interfaces.ICoordinateSystem, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Spatial.Interfaces.IGeometry3D, DiGi.Geometry.Spatial.Interfaces.IMovable3D

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectGeometry3D → CoordinateSystem3D

Implements DiGi.Geometry.Spatial.Interfaces.ICoordinateSystem3D, DiGi.Geometry.Core.Interfaces.ICoordinateSystem<Point3D>, DiGi.Geometry.Core.Interfaces.ICoordinateSystem, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Spatial.Interfaces.IGeometry3D, DiGi.Geometry.Spatial.Interfaces.IMovable3D

Constructors

CoordinateSystem3D(CoordinateSystem3D) Constructor

Initializes a new instance of the CoordinateSystem3D class by copying the properties from an existing CoordinateSystem3D object.

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

Parameters

coordinateSystem3D CoordinateSystem3D

The source CoordinateSystem3D object to copy data from.

CoordinateSystem3D(CoordinateSystem3D, Point3D) Constructor

Initializes a new instance of the CoordinateSystem3D class using the axes from an existing CoordinateSystem3D and a specified Point3D as the origin.

public CoordinateSystem3D(DiGi.Geometry.Spatial.Classes.CoordinateSystem3D? coordinateSystem3D, DiGi.Geometry.Spatial.Classes.Point3D? origin);

Parameters

coordinateSystem3D CoordinateSystem3D

The CoordinateSystem3D from which to copy the axis vectors.

origin Point3D

The Point3D that defines the origin of the coordinate system.

CoordinateSystem3D(Point3D, Vector3D) Constructor

Initializes a new instance of the CoordinateSystem3D class with the specified origin and Z-axis.

public CoordinateSystem3D(DiGi.Geometry.Spatial.Classes.Point3D? origin, DiGi.Geometry.Spatial.Classes.Vector3D? axisZ);

Parameters

origin Point3D

The optional Point3D that defines the origin of the coordinate system.

axisZ Vector3D

The optional Vector3D that defines the direction of the Z-axis.

CoordinateSystem3D(Point3D, Vector3D, Vector3D) Constructor

Initializes a new instance of the CoordinateSystem3D class using the specified origin, X-axis, and Y-axis.

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

Parameters

origin Point3D

The Point3D representing the origin of the coordinate system.

axisX Vector3D

The Vector3D representing the direction of the X-axis.

axisY Vector3D

The Vector3D representing the direction of the Y-axis.

CoordinateSystem3D(JsonObject) Constructor

Initializes a new instance of the CoordinateSystem3D class using the provided System.Text.Json.Nodes.JsonObject.

public CoordinateSystem3D(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The System.Text.Json.Nodes.JsonObject containing the data used to initialize this instance.

Properties

CoordinateSystem3D.AxisX Property

Gets the X-axis vector.

public DiGi.Geometry.Spatial.Classes.Vector3D? AxisX { get; }

Property Value

Vector3D
A Vector3D representing the X-axis, or null if it is not defined.

CoordinateSystem3D.AxisY Property

Gets the Y-axis vector.

public DiGi.Geometry.Spatial.Classes.Vector3D? AxisY { get; }

Property Value

Vector3D
A Vector3D representing the Y-axis, or null if it is not defined.

CoordinateSystem3D.AxisZ Property

Gets the Z-axis vector.

public DiGi.Geometry.Spatial.Classes.Vector3D? AxisZ { get; }

Property Value

Vector3D
A Vector3D representing the Z-axis, or null if it is not defined.

CoordinateSystem3D.Origin Property

Gets or sets the origin Point3D.

public DiGi.Geometry.Spatial.Classes.Point3D? Origin { get; set; }

Implements Origin

Property Value

Point3D

Methods

CoordinateSystem3D.ClosestPoint(Point3D) Method

Calculates the closest point on the line to the specified Point3D.

public DiGi.Geometry.Spatial.Classes.Point3D? ClosestPoint(DiGi.Geometry.Spatial.Classes.Point3D? point3D);

Parameters

point3D Point3D

The Point3D for which the closest point is calculated.

Returns

Point3D
The closest Point3D on the line, or null if the provided Point3D, origin, or axis Z is null.

CoordinateSystem3D.Distance(Point3D) Method

Calculates the distance between the specified Point3D and the closest point on this object.

public double Distance(DiGi.Geometry.Spatial.Classes.Point3D? point3D);

Parameters

point3D Point3D

The Point3D to calculate the distance from.

Returns

System.Double
The distance as a System.Double, or System.Double.NaN if no closest point is found.

CoordinateSystem3D.GetAxis(SpatialAxis) Method

Retrieves the Vector3D associated with the specified SpatialAxis.

public DiGi.Geometry.Spatial.Classes.Vector3D? GetAxis(DiGi.Geometry.Spatial.Enums.SpatialAxis axis);

Parameters

axis SpatialAxis

The SpatialAxis to retrieve.

Returns

Vector3D
A Vector3D representing the axis, or null if the axis is undefined or invalid.

CoordinateSystem3D.Inverse() Method

Inverts the direction of the Z and Y axes.

public void Inverse();

CoordinateSystem3D.Move(Vector3D) Method

Moves the object using the specified Vector3D? vector.

public override bool Move(DiGi.Geometry.Spatial.Classes.Vector3D? vector3D);

Parameters

vector3D Vector3D

The Vector3D? value representing the displacement.

Implements Move(Vector3D)

Returns

System.Boolean
A bool indicating whether the move operation was successful.

DifferenceResult3D Class

Represents the result of a 3D difference operation.

public class DifferenceResult3D : DiGi.Geometry.Spatial.Classes.BooleanOperationResult3D, DiGi.Geometry.Spatial.Interfaces.IDifferenceResult3D, DiGi.Geometry.Spatial.Interfaces.IBooleanOperationResult3D, DiGi.Core.Interfaces.ISerializableResult, DiGi.Core.Interfaces.IResult, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectBooleanOperationResult3D → DifferenceResult3D

Implements IDifferenceResult3D, IBooleanOperationResult3D, DiGi.Core.Interfaces.ISerializableResult, DiGi.Core.Interfaces.IResult, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject

Constructors

DifferenceResult3D() Constructor

Initializes a new instance of the DifferenceResult3D class.

public DifferenceResult3D();

DifferenceResult3D(DifferenceResult3D) Constructor

Initializes a new instance of the DifferenceResult3D class using another DifferenceResult3D instance.

public DifferenceResult3D(DiGi.Geometry.Spatial.Classes.DifferenceResult3D? differenceResult3D);

Parameters

differenceResult3D DifferenceResult3D

The DifferenceResult3D instance to copy from.

DifferenceResult3D(IGeometry3D) Constructor

Initializes a new instance of the DifferenceResult3D class with the specified DiGi.Geometry.Spatial.Interfaces.IGeometry3D.

public DifferenceResult3D(DiGi.Geometry.Spatial.Interfaces.IGeometry3D? geometry3D);

Parameters

geometry3D DiGi.Geometry.Spatial.Interfaces.IGeometry3D

The DiGi.Geometry.Spatial.Interfaces.IGeometry3D to initialize the result with. This value can be null.

DifferenceResult3D(IEnumerable<IGeometry3D>) Constructor

Initializes a new instance of the DifferenceResult3D class.

public DifferenceResult3D(System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Interfaces.IGeometry3D>? geometry3Ds);

Parameters

geometry3Ds System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Interfaces.IGeometry3D>

An optional collection of DiGi.Geometry.Spatial.Interfaces.IGeometry3D objects to be cloned and stored in the result.

DifferenceResult3D(JsonObject) Constructor

Initializes a new instance of the DifferenceResult3D class using the specified System.Text.Json.Nodes.JsonObject.

public DifferenceResult3D(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The System.Text.Json.Nodes.JsonObject used to initialize the instance.

Properties

DifferenceResult3D.BooleanOpertaionType Property

Gets the type of the boolean operation, which is Difference.

public override DiGi.Geometry.Core.Enums.BooleanOpertaionType BooleanOpertaionType { get; }

Implements BooleanOpertaionType

Property Value

BooleanOpertaionType

Methods

DifferenceResult3D.Clone() Method

Creates a copy of the current DifferenceResult3D instance.

public override DiGi.Core.Interfaces.ISerializableObject? Clone();

Implements Clone()

Returns

DiGi.Core.Interfaces.ISerializableObject
A new DiGi.Core.Interfaces.ISerializableObject instance that is a clone of the current object.

Ellipse3D Class

Represents a three-dimensional ellipse defined on a plane.

public class Ellipse3D : DiGi.Geometry.Spatial.Classes.Planar<DiGi.Geometry.Planar.Classes.Ellipse2D>, DiGi.Geometry.Spatial.Interfaces.IEllipse3D, DiGi.Geometry.Spatial.Interfaces.IGeometry3D, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Spatial.Interfaces.IMovable3D, DiGi.Geometry.Spatial.Interfaces.IBoundable3D, DiGi.Geometry.Core.Interfaces.IBoundable, DiGi.Geometry.Spatial.Interfaces.IClosedPlanarCurve3D, DiGi.Geometry.Spatial.Interfaces.IClosedCurve3D, DiGi.Geometry.Core.Interfaces.IClosedCurve, DiGi.Geometry.Core.Interfaces.ICurve, DiGi.Geometry.Spatial.Interfaces.ICurve3D, DiGi.Geometry.Spatial.Interfaces.IPlanar

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectGeometry3DDiGi.Geometry.Spatial.Classes.Planar<Ellipse2D> → Ellipse3D

Implements DiGi.Geometry.Spatial.Interfaces.IEllipse3D, DiGi.Geometry.Spatial.Interfaces.IGeometry3D, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Spatial.Interfaces.IMovable3D, DiGi.Geometry.Spatial.Interfaces.IBoundable3D, DiGi.Geometry.Core.Interfaces.IBoundable, DiGi.Geometry.Spatial.Interfaces.IClosedPlanarCurve3D, DiGi.Geometry.Spatial.Interfaces.IClosedCurve3D, DiGi.Geometry.Core.Interfaces.IClosedCurve, DiGi.Geometry.Core.Interfaces.ICurve, DiGi.Geometry.Spatial.Interfaces.ICurve3D, DiGi.Geometry.Spatial.Interfaces.IPlanar

Constructors

Ellipse3D(Ellipse3D) Constructor

Initializes a new instance of the Ellipse3D class using an existing Ellipse3D instance.

public Ellipse3D(DiGi.Geometry.Spatial.Classes.Ellipse3D? ellipse3D);

Parameters

ellipse3D Ellipse3D

The Ellipse3D instance to copy from.

Ellipse3D(Plane, Ellipse2D) Constructor

Initializes a new instance of the Ellipse3D class using the specified Plane and Ellipse2D.

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

Parameters

plane Plane

The Plane on which the ellipse is located.

ellipse2D Ellipse2D

The Ellipse2D that defines the geometry of the ellipse.

Ellipse3D(JsonObject) Constructor

Initializes a new instance of the Ellipse3D class using the specified System.Text.Json.Nodes.JsonObject.

public Ellipse3D(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The System.Text.Json.Nodes.JsonObject used to initialize the instance.

Properties

Ellipse3D.A Property

Gets or sets the A value of the 2D geometry. Returns System.Double.NaN if the underlying geometry is null.

public double A { get; set; }

Property Value

System.Double
A System.Double representing the A component.

Ellipse3D.B Property

Gets or sets the double value for B from the associated 2D geometry. Returns double.NaN if the underlying geometry is null.

public double B { get; set; }

Property Value

System.Double

Ellipse3D.Center Property

Gets the center point of the geometry converted to a Point3D.

public DiGi.Geometry.Spatial.Classes.Point3D? Center { get; }

Implements Center

Property Value

Point3D
A Point3D representing the center, or null if the conversion cannot be performed.

Ellipse3D.Direction Property

Gets the direction of the ellipse as a Vector3D.

public DiGi.Geometry.Spatial.Classes.Vector3D? Direction { get; }

Property Value

Vector3D
The Vector3D representing the direction, or null if it cannot be determined.

Methods

Ellipse3D.Clone() Method

Creates a copy of the current object.

public override DiGi.Core.Interfaces.ISerializableObject? Clone();

Implements Clone()

Returns

DiGi.Core.Interfaces.ISerializableObject
An DiGi.Core.Interfaces.ISerializableObject that is a clone of the current instance.

Ellipse3D.GetArea() Method

Calculates the area of the 2D geometry.

public double GetArea();

Implements GetArea()

Returns

System.Double
A System.Double representing the area, or System.Double.NaN if the 2D geometry is null.

Ellipse3D.GetBoundingBox() Method

Calculates the 3D bounding box of the geometry based on the associated plane.

public DiGi.Geometry.Spatial.Classes.BoundingBox3D? GetBoundingBox();

Implements GetBoundingBox()

Returns

BoundingBox3D
A BoundingBox3D representing the bounding box, or null if the geometry is empty or the plane is not defined.

Ellipse3D.GetFocalPoints() Method

Retrieves the focal points of the geometry converted to 3D space.

public DiGi.Geometry.Spatial.Classes.Point3D[]? GetFocalPoints();

Returns

Point3D[]
An array of Point3D objects representing the focal points, or null if the plane or geometry is not defined or no focal points exist.

Ellipse3D.GetInternalPoint(double) Method

Gets an internal point of the geometry converted to 3D space.

public DiGi.Geometry.Spatial.Classes.Point3D? GetInternalPoint(double tolerance=1E-06);

Parameters

tolerance System.Double

The System.Double tolerance value used for the calculation.

Implements GetInternalPoint(double)

Returns

Point3D
A Point3D representing the internal point if the plane and geometry are available; otherwise, null.

Ellipse3D.GetPerimeter() Method

Calculates and returns the perimeter of the 2D geometry.

public double GetPerimeter();

Implements GetPerimeter()

Returns

System.Double
A System.Double representing the perimeter, or System.Double.NaN if the underlying geometry is null.

Ellipse3D.InRange(Point3D, double) Method

Determines whether the specified Point3D is within range of the geometry, given a specific tolerance.

public bool InRange(DiGi.Geometry.Spatial.Classes.Point3D? point3D, double tolerance=1E-06);

Parameters

point3D Point3D

The nullable Point3D to evaluate.

tolerance System.Double

The System.Double distance tolerance used for the calculation.

Implements InRange(Point3D, double)

Returns

System.Boolean
A System.Boolean value indicating whether the point is within range.

Ellipse3D.Inside(Point3D, double) Method

Determines whether the specified Point3D is inside the geometry within a given tolerance.

public bool Inside(DiGi.Geometry.Spatial.Classes.Point3D? point3D, double tolerance=1E-06);

Parameters

point3D Point3D

The Point3D object to check.

tolerance System.Double

The double value representing the distance tolerance for the operation.

Implements Inside(Point3D, double)

Returns

System.Boolean
A bool indicating whether the point is inside the geometry.

Ellipse3D.Inverse() Method

Inverts the underlying 2D geometry if it is not null.

public void Inverse();

Ellipsoid Class

Represents an ellipsoid geometry in 3D space.

public class Ellipsoid : DiGi.Geometry.Spatial.Classes.Geometry3D, DiGi.Geometry.Spatial.Interfaces.IEllipsoid, DiGi.Geometry.Spatial.Interfaces.IGeometry3D, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Spatial.Interfaces.IMovable3D, DiGi.Geometry.Spatial.Interfaces.IBoundable3D, DiGi.Geometry.Core.Interfaces.IBoundable

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectGeometry3D → Ellipsoid

Implements DiGi.Geometry.Spatial.Interfaces.IEllipsoid, DiGi.Geometry.Spatial.Interfaces.IGeometry3D, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Spatial.Interfaces.IMovable3D, DiGi.Geometry.Spatial.Interfaces.IBoundable3D, DiGi.Geometry.Core.Interfaces.IBoundable

Constructors

Ellipsoid(Ellipsoid) Constructor

Initializes a new instance of the Ellipsoid class by copying the properties from an existing Ellipsoid object.

public Ellipsoid(DiGi.Geometry.Spatial.Classes.Ellipsoid? ellipsoid);

Parameters

ellipsoid Ellipsoid

The Ellipsoid object to copy data from, or null to initialize a default instance.

Ellipsoid(Plane, double, double, double) Constructor

Initializes a new instance of the Ellipsoid class with the specified plane and semi-axis lengths.

public Ellipsoid(DiGi.Geometry.Spatial.Classes.Plane? plane, double a, double b, double c);

Parameters

plane Plane

The Plane that defines the ellipsoid's orientation, or null.

a System.Double

The length of the first semi-axis as a System.Double.

b System.Double

The length of the second semi-axis as a System.Double.

c System.Double

The length of the third semi-axis as a System.Double.

Ellipsoid(Point3D, double, double, double) Constructor

Initializes a new instance of the Ellipsoid class with the specified center and semi-axes lengths.

public Ellipsoid(DiGi.Geometry.Spatial.Classes.Point3D? center, double a, double b, double c);

Parameters

center Point3D

The Point3D? coordinates of the center point.

a System.Double

The System.Double length of the first semi-axis.

b System.Double

The System.Double length of the second semi-axis.

c System.Double

The System.Double length of the third semi-axis.

Ellipsoid(JsonObject) Constructor

Initializes a new instance of the Ellipsoid class using the provided System.Text.Json.Nodes.JsonObject.

public Ellipsoid(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The System.Text.Json.Nodes.JsonObject containing the data used to initialize this instance.

Properties

Ellipsoid.A Property

Gets the double value of A.

public double A { get; }

Property Value

System.Double

Ellipsoid.B Property

Gets the double value of B.

public double B { get; }

Property Value

System.Double

Ellipsoid.C Property

Gets the C constant of the plane equation as a System.Double.

public double C { get; }

Property Value

System.Double

Ellipsoid.Center Property

Gets the center point of the plane as a Point3D.

public DiGi.Geometry.Spatial.Classes.Point3D? Center { get; }

Implements Center

Property Value

Point3D

Ellipsoid.DirectionA Property

Gets the X-axis direction vector of the plane.

public DiGi.Geometry.Spatial.Classes.Vector3D? DirectionA { get; }

Property Value

Vector3D
A Vector3D representing the first direction axis, or null if the plane is not defined.

Ellipsoid.DirectionB Property

Gets the direction vector B, which represents the Y-axis of the associated plane.

public DiGi.Geometry.Spatial.Classes.Vector3D? DirectionB { get; }

Property Value

Vector3D
A Vector3D representing the Y-axis of the plane, or null if no plane is defined.

Ellipsoid.DirectionC Property

Gets the direction vector for axis C, typically corresponding to the Z-axis of the associated plane.

public DiGi.Geometry.Spatial.Classes.Vector3D? DirectionC { get; }

Property Value

Vector3D
A Vector3D? representing the direction of axis C, or null if no plane is defined.

Ellipsoid.Extent Property

Gets the extent of the ellipsoid as a Vector3D.

public DiGi.Geometry.Spatial.Classes.Vector3D? Extent { get; }

Implements Extent

Property Value

Vector3D
A Vector3D representing the spatial extent, or null if not defined.

Methods

Ellipsoid.GetBoundingBox() Method

Calculates the bounding box of the object based on its center and extent.

public DiGi.Geometry.Spatial.Classes.BoundingBox3D? GetBoundingBox();

Implements GetBoundingBox()

Returns

BoundingBox3D
A BoundingBox3D representing the bounding box, or null if the center or extent is not defined.

Ellipsoid.GetFocalPoints(double) Method

Calculates the focal points of the object.

public DiGi.Geometry.Spatial.Classes.Point3D[]? GetFocalPoints(double tolerance=1E-06);

Parameters

tolerance System.Double

The System.Double tolerance value used for calculations.

Returns

Point3D[]
An array of Point3D objects representing the focal points, or null if the center or directions are not defined.

Ellipsoid.GetPoint(double, double) Method

Calculates a point in 3D space based on the specified theta and phi angles.

public DiGi.Geometry.Spatial.Classes.Point3D? GetPoint(double theta, double phi);

Parameters

theta System.Double

The theta angle as a System.Double.

phi System.Double

The phi angle as a System.Double.

Returns

Point3D
A Point3D if the plane axes are defined; otherwise, null.

Ellipsoid.GetVolume() Method

Calculates the volume of the ellipsoid.

public double GetVolume();

Returns

System.Double
A System.Double representing the calculated volume.

Ellipsoid.Inside(Point3D, double) Method

Determines whether the specified Point3D is inside the boundary within a given tolerance.

public bool Inside(DiGi.Geometry.Spatial.Classes.Point3D? point3D, double tolerance=1E-06);

Parameters

point3D Point3D

The Point3D to evaluate.

tolerance System.Double

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

Returns

System.Boolean
A System.Boolean indicating whether the point is inside the boundary.

Ellipsoid.Move(Vector3D) Method

Moves the object using the specified Vector3D? vector.

public override bool Move(DiGi.Geometry.Spatial.Classes.Vector3D? vector3D);

Parameters

vector3D Vector3D

The Vector3D? instance representing the movement vector.

Implements Move(Vector3D)

Returns

System.Boolean
A boolean value indicating whether the move operation was successful.

Operators

Ellipsoid.implicit operator Ellipsoid(Sphere) Operator

Implicitly converts a Sphere to an Ellipsoid.

public static DiGi.Geometry.Spatial.Classes.Ellipsoid? implicit operator DiGi.Geometry.Spatial.Classes.Ellipsoid?(DiGi.Geometry.Spatial.Classes.Sphere? sphere);

Parameters

sphere Sphere

The Sphere instance to convert.

Returns

Ellipsoid
An Ellipsoid created from the provided sphere, or null if the sphere is null.

Ellipsoid.implicit operator Ellipsoid(Spheroid) Operator

Implicitly converts a Spheroid to an Ellipsoid.

public static DiGi.Geometry.Spatial.Classes.Ellipsoid? implicit operator DiGi.Geometry.Spatial.Classes.Ellipsoid?(DiGi.Geometry.Spatial.Classes.Spheroid? spheroid);

Parameters

spheroid Spheroid

The Spheroid instance to convert.

Returns

Ellipsoid
An Ellipsoid created from the provided spheroid, or null if the spheroid is null.

Extrusion<TSurface3D> Class

Represents an abstract base class for a 3D geometry created by extruding a surface along a specific vector.

public abstract class Extrusion<TSurface3D> : DiGi.Geometry.Spatial.Classes.Geometry3D, DiGi.Geometry.Spatial.Interfaces.IBoundable3D, DiGi.Geometry.Spatial.Interfaces.IGeometry3D, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Spatial.Interfaces.IMovable3D, DiGi.Geometry.Core.Interfaces.IBoundable
    where TSurface3D : DiGi.Geometry.Spatial.Interfaces.ISurface3D

Type parameters

TSurface3D

The type of the surface being extruded, which must implement DiGi.Geometry.Spatial.Interfaces.ISurface3D.

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectGeometry3D → Extrusion<TSurface3D>

Derived
PolygonalFaceExtrusion

Implements DiGi.Geometry.Spatial.Interfaces.IBoundable3D, DiGi.Geometry.Spatial.Interfaces.IGeometry3D, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Spatial.Interfaces.IMovable3D, DiGi.Geometry.Core.Interfaces.IBoundable

Constructors

Extrusion(Extrusion<TSurface3D>) Constructor

Initializes a new instance of the Extrusion<TSurface3D> class by cloning an existing Extrusion<TSurface3D> object.

public Extrusion(DiGi.Geometry.Spatial.Classes.Extrusion<TSurface3D>? extrusion);

Parameters

extrusion DiGi.Geometry.Spatial.Classes.Extrusion<TSurface3D>

The Extrusion<TSurface3D> object to clone from.

Extrusion(JsonObject) Constructor

Initializes a new instance of the Extrusion<TSurface3D> class using the specified System.Text.Json.Nodes.JsonObject.

public Extrusion(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The System.Text.Json.Nodes.JsonObject used to initialize the extrusion.

Extrusion(TSurface3D, Vector3D) Constructor

Initializes a new instance of the Extrusion<TSurface3D> class with the specified TSurface3D surface and Vector3D vector.

public Extrusion(TSurface3D? surface, DiGi.Geometry.Spatial.Classes.Vector3D? vector);

Parameters

surface TSurface3D

The TSurface3D surface to extrude.

vector Vector3D

The Vector3D vector defining the extrusion direction and distance.

Properties

Extrusion<TSurface3D>.Surface Property

Gets the 3D surface.

public TSurface3D? Surface { get; }

Property Value

TSurface3D
The TSurface3D instance representing the surface, or null if it is not defined.

Extrusion<TSurface3D>.Vector Property

Gets the associated Vector3D.

public DiGi.Geometry.Spatial.Classes.Vector3D? Vector { get; }

Property Value

Vector3D
A Vector3D object, or null if no vector is defined.

Methods

Extrusion<TSurface3D>.GetBoundingBox() Method

Calculates the bounding box of the object, incorporating the surface and any associated vector points.

public DiGi.Geometry.Spatial.Classes.BoundingBox3D? GetBoundingBox();

Implements GetBoundingBox()

Returns

BoundingBox3D
A BoundingBox3D representing the calculated bounding box, or null if no bounding box is available.

Extrusion<TSurface3D>.Move(Vector3D) Method

Moves the object by the specified Vector3D? vector.

public override bool Move(DiGi.Geometry.Spatial.Classes.Vector3D? vector3D);

Parameters

vector3D Vector3D

The Vector3D? value representing the displacement.

Implements Move(Vector3D)

Returns

System.Boolean
A bool indicating whether the move operation was successful.

Geometry3D Class

Represents an abstract base class for 3D geometry objects.

public abstract class Geometry3D : DiGi.Core.Classes.SerializableObject, DiGi.Geometry.Spatial.Interfaces.IGeometry3D, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Spatial.Interfaces.IMovable3D

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObject → Geometry3D

Derived
BoundingBox3D
CoordinateSystem3D
Ellipsoid
Extrusion<TSurface3D>
Line3D
Planar<T>
Plane
Polyhedron<TPolygonalFace3D>
Polyline3D
Ray3D
Segment3D
Segmentable3D
Sphere
Spheroid
Triangle3D

Implements DiGi.Geometry.Spatial.Interfaces.IGeometry3D, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Spatial.Interfaces.IMovable3D

Constructors

Geometry3D() Constructor

Initializes a new instance of the Geometry3D class.

public Geometry3D();

Geometry3D(Geometry3D) Constructor

Initializes a new instance of the Geometry3D class using the specified Geometry3D instance.

public Geometry3D(DiGi.Geometry.Spatial.Classes.Geometry3D? geometry3D);

Parameters

geometry3D Geometry3D

The Geometry3D instance to copy from.

Geometry3D(JsonObject) Constructor

Initializes a new instance of the Geometry3D class using the specified System.Text.Json.Nodes.JsonObject.

public Geometry3D(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The System.Text.Json.Nodes.JsonObject used to initialize the instance.

Methods

Geometry3D.Move(Vector3D) Method

Moves the object by the specified Vector3D.

public abstract bool Move(DiGi.Geometry.Spatial.Classes.Vector3D? vector3D);

Parameters

vector3D Vector3D

The optional Vector3D representing the displacement vector.

Implements Move(Vector3D)

Returns

System.Boolean
A System.Boolean value indicating whether the move operation was successful.

IntersectionResult3D Class

Represents the result of a 3D intersection operation.

public class IntersectionResult3D : DiGi.Geometry.Spatial.Classes.BooleanOperationResult3D, DiGi.Geometry.Spatial.Interfaces.IIntersectionResult3D, DiGi.Geometry.Core.Interfaces.IIntersectionResult, DiGi.Geometry.Core.Interfaces.IBooleanOperationResult, DiGi.Core.Interfaces.ISerializableResult, DiGi.Core.Interfaces.IResult, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectBooleanOperationResult3D → IntersectionResult3D

Implements DiGi.Geometry.Spatial.Interfaces.IIntersectionResult3D, DiGi.Geometry.Core.Interfaces.IIntersectionResult, IBooleanOperationResult, DiGi.Core.Interfaces.ISerializableResult, DiGi.Core.Interfaces.IResult, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject

Constructors

IntersectionResult3D() Constructor

Initializes a new instance of the IntersectionResult3D class.

public IntersectionResult3D();

IntersectionResult3D(IntersectionResult3D) Constructor

Initializes a new instance of the IntersectionResult3D class using another IntersectionResult3D instance.

public IntersectionResult3D(DiGi.Geometry.Spatial.Classes.IntersectionResult3D? intersectionResult3D);

Parameters

intersectionResult3D IntersectionResult3D

The IntersectionResult3D instance to copy from.

IntersectionResult3D(IGeometry3D) Constructor

Initializes a new instance of the IntersectionResult3D class with the specified DiGi.Geometry.Spatial.Interfaces.IGeometry3D.

public IntersectionResult3D(DiGi.Geometry.Spatial.Interfaces.IGeometry3D? geometry3D);

Parameters

geometry3D DiGi.Geometry.Spatial.Interfaces.IGeometry3D

The DiGi.Geometry.Spatial.Interfaces.IGeometry3D to initialize the result with. This value can be null.

IntersectionResult3D(IEnumerable<IGeometry3D>) Constructor

Initializes a new instance of the IntersectionResult3D class.

public IntersectionResult3D(System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Interfaces.IGeometry3D>? geometry3Ds);

Parameters

geometry3Ds System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Interfaces.IGeometry3D>

An optional collection of DiGi.Geometry.Spatial.Interfaces.IGeometry3D objects to be cloned and stored in the result.

IntersectionResult3D(JsonObject) Constructor

Initializes a new instance of the IntersectionResult3D class using the specified System.Text.Json.Nodes.JsonObject.

public IntersectionResult3D(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The System.Text.Json.Nodes.JsonObject used to initialize the instance.

Properties

IntersectionResult3D.BooleanOpertaionType Property

Gets the type of the boolean operation, which is Intersection.

public override DiGi.Geometry.Core.Enums.BooleanOpertaionType BooleanOpertaionType { get; }

Implements BooleanOpertaionType

Property Value

BooleanOpertaionType

Methods

IntersectionResult3D.Clone() Method

Creates a copy of the current IntersectionResult3D instance.

public override DiGi.Core.Interfaces.ISerializableObject? Clone();

Implements Clone()

Returns

DiGi.Core.Interfaces.ISerializableObject
A new DiGi.Core.Interfaces.ISerializableObject instance that is a clone of the current object.

Line3D Class

Represents a line in 3D space defined by an origin point and a direction vector.

public class Line3D : DiGi.Geometry.Spatial.Classes.Geometry3D, DiGi.Geometry.Spatial.Interfaces.ILinear3D, DiGi.Geometry.Spatial.Interfaces.IMovable3D, DiGi.Geometry.Core.Interfaces.ICurve, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Spatial.Interfaces.ITransformable3D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Spatial.Interfaces.ITransform3D>, DiGi.Geometry.Core.Interfaces.ITransformable

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectGeometry3D → Line3D

Implements DiGi.Geometry.Spatial.Interfaces.ILinear3D, DiGi.Geometry.Spatial.Interfaces.IMovable3D, DiGi.Geometry.Core.Interfaces.ICurve, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Spatial.Interfaces.ITransformable3D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Spatial.Interfaces.ITransform3D>, DiGi.Geometry.Core.Interfaces.ITransformable

Constructors

Line3D(Line3D) Constructor

Initializes a new instance of the Line3D class by cloning an existing Line3D object.

public Line3D(DiGi.Geometry.Spatial.Classes.Line3D? line3D);

Parameters

line3D Line3D

The source Line3D object to clone.

Line3D(Point3D, Point3D) Constructor

Initializes a new instance of the Line3D class using two Point3D points to define the origin and direction.

public Line3D(DiGi.Geometry.Spatial.Classes.Point3D? point3D_1, DiGi.Geometry.Spatial.Classes.Point3D? point3D_2);

Parameters

point3D_1 Point3D

The Point3D that defines the origin of the line.

point3D_2 Point3D

The Point3D used to determine the unit direction vector from the origin.

Line3D(Point3D, Vector3D) Constructor

Initializes a new instance of the Line3D class with the specified origin point and direction vector.

public Line3D(DiGi.Geometry.Spatial.Classes.Point3D? origin, DiGi.Geometry.Spatial.Classes.Vector3D? direction);

Parameters

origin Point3D

The Point3D that defines the origin of the line.

direction Vector3D

The Vector3D that defines the direction of the line.

Line3D(JsonObject) Constructor

Initializes a new instance of the Line3D class.

public Line3D(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The System.Text.Json.Nodes.JsonObject used to initialize the instance.

Properties

Line3D.Direction Property

Gets or sets the Vector3D representing the direction.

public DiGi.Geometry.Spatial.Classes.Vector3D? Direction { get; set; }

Implements Direction

Property Value

Vector3D
A nullable Vector3D that defines the direction.

Line3D.Origin Property

Gets or sets the origin point of the 3D line.

public DiGi.Geometry.Spatial.Classes.Point3D? Origin { get; set; }

Property Value

Point3D
A Point3D representing the origin, or null if not specified.

Methods

Line3D.Clone() Method

Creates a copy of the current object.

public override DiGi.Core.Interfaces.ISerializableObject? Clone();

Implements Clone()

Returns

DiGi.Core.Interfaces.ISerializableObject
A new DiGi.Core.Interfaces.ISerializableObject instance that is a clone of the current object, or null.

Line3D.ClosestPoint(Point3D) Method

Calculates the closest point on the geometry to the specified Point3D.

public DiGi.Geometry.Spatial.Classes.Point3D? ClosestPoint(DiGi.Geometry.Spatial.Classes.Point3D? point3D);

Parameters

point3D Point3D

The Point3D for which the closest point is calculated.

Implements ClosestPoint(Point3D)

Returns

Point3D
The closest Point3D on the geometry, or null if it cannot be determined.

Line3D.Collinear(ILinear3D, double) Method

Determines whether this linear object is collinear with the specified DiGi.Geometry.Spatial.Interfaces.ILinear3D object within a given tolerance.

public bool Collinear(DiGi.Geometry.Spatial.Interfaces.ILinear3D? linear3D, double tolerance=1E-06);

Parameters

linear3D DiGi.Geometry.Spatial.Interfaces.ILinear3D

The DiGi.Geometry.Spatial.Interfaces.ILinear3D object to check for collinearity.

tolerance System.Double

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

Implements Collinear(ILinear3D, double)

Returns

System.Boolean
A System.Boolean value indicating whether the objects are collinear; returns false if either linear object is null.

Line3D.Distance(Point3D) Method

Calculates the distance between a specified Point3D and this object.

public double Distance(DiGi.Geometry.Spatial.Classes.Point3D? point3D);

Parameters

point3D Point3D

The Point3D instance to calculate the distance from.

Implements Distance(Point3D)

Returns

System.Double
A System.Double representing the distance, or System.Double.NaN if the provided Point3D is null or cannot be projected.

Line3D.Equals(object) Method

Determines whether the specified System.Object is equal to the current Line3D.

public override bool Equals(object obj);

Parameters

obj System.Object

The System.Object to compare with the current Line3D.

Returns

System.Boolean
true if the specified System.Object is a Line3D and has the same origin and direction as the current instance; otherwise, false.

Line3D.GetHashCode() Method

Returns a hash code for the current object based on its origin and direction.

public override int GetHashCode();

Returns

System.Int32
An System.Int32 representing the hash code of the instance.

Line3D.IntersectionPoint(Line3D, double) Method

Calculates the intersection point between this object and the specified Line3D.

public DiGi.Geometry.Spatial.Classes.Point3D? IntersectionPoint(DiGi.Geometry.Spatial.Classes.Line3D? line3D, double tolerance=1E-06);

Parameters

line3D Line3D

The Line3D to intersect with.

tolerance System.Double

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

Returns

Point3D
A Point3D representing the intersection point if one exists; otherwise, null.

Line3D.IntersectionPoint(Segment3D, double) Method

Calculates the intersection point between this object and a specified Segment3D.

public DiGi.Geometry.Spatial.Classes.Point3D? IntersectionPoint(DiGi.Geometry.Spatial.Classes.Segment3D? segment3D, double tolerance=1E-06);

Parameters

segment3D Segment3D

The Segment3D to intersect with.

tolerance System.Double

The System.Double tolerance used for the intersection calculation.

Returns

Point3D
A Point3D representing the intersection point if it exists and lies on the segment; otherwise, null.

Line3D.Move(Vector3D) Method

Moves the object by the specified Vector3D.

public override bool Move(DiGi.Geometry.Spatial.Classes.Vector3D? vector3D);

Parameters

vector3D Vector3D

The Vector3D that defines the translation.

Implements Move(Vector3D)

Returns

System.Boolean
A System.Boolean value indicating whether the move operation was successful.

Line3D.On(Point3D, double) Method

Determines whether the specified Point3D is located on the object within a given tolerance.

public bool On(DiGi.Geometry.Spatial.Classes.Point3D? point3D, double tolerance=1E-06);

Parameters

point3D Point3D

The Point3D to evaluate.

tolerance System.Double

The System.Double value representing the maximum allowable distance for the point to be considered on the object.

Implements On(Point3D, double)

Returns

System.Boolean
A System.Boolean value indicating whether the Point3D is within the specified tolerance of the object.

Line3D.Project(Point3D) Method

Projects a given Point3D onto the line defined by the origin and direction.

public DiGi.Geometry.Spatial.Classes.Point3D? Project(DiGi.Geometry.Spatial.Classes.Point3D? point3D);

Parameters

point3D Point3D

The Point3D to project.

Implements Project(Point3D)

Returns

Point3D
The projected Point3D, or null if the projection cannot be determined.

Line3D.Transform(ITransform3D) Method

Transforms the origin and direction of the object using the specified DiGi.Geometry.Spatial.Interfaces.ITransform3D transformation.

public bool Transform(DiGi.Geometry.Spatial.Interfaces.ITransform3D? transform);

Parameters

transform DiGi.Geometry.Spatial.Interfaces.ITransform3D

The DiGi.Geometry.Spatial.Interfaces.ITransform3D instance to apply for the transformation.

Returns

System.Boolean
A System.Boolean value indicating whether the transformation was successfully applied; returns false if the DiGi.Geometry.Spatial.Interfaces.ITransform3D transform, origin, or direction is null.

Operators

Line3D.operator ==(Line3D, Line3D) Operator

Indicates whether the two specified Line3D objects are equal.

public static bool operator ==(DiGi.Geometry.Spatial.Classes.Line3D? line3D_1, DiGi.Geometry.Spatial.Classes.Line3D? line3D_2);

Parameters

line3D_1 Line3D

The first Line3D object to compare.

line3D_2 Line3D

The second Line3D object to compare.

Returns

System.Boolean
true if the objects are equal; otherwise, false.

Line3D.operator !=(Line3D, Line3D) Operator

Indicates whether the two specified Line3D objects are not equal.

public static bool operator !=(DiGi.Geometry.Spatial.Classes.Line3D? line3D_1, DiGi.Geometry.Spatial.Classes.Line3D? line3D_2);

Parameters

line3D_1 Line3D

The first Line3D object to compare.

line3D_2 Line3D

The second Line3D object to compare.

Returns

System.Boolean
true if the objects are not equal; otherwise, false.

Mesh3D Class

Represents a three-dimensional mesh composed of Point3D vertices.

public class Mesh3D : DiGi.Geometry.Core.Classes.Mesh<DiGi.Geometry.Spatial.Classes.Point3D>, DiGi.Geometry.Spatial.Interfaces.IGeometry3D, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Spatial.Interfaces.IMovable3D, DiGi.Geometry.Spatial.Interfaces.IBoundable3D, DiGi.Geometry.Core.Interfaces.IBoundable, DiGi.Geometry.Spatial.Interfaces.ICollectable3D, DiGi.Geometry.Core.Interfaces.ICollectable

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectDiGi.Geometry.Core.Classes.Mesh<Point3D> → Mesh3D

Implements DiGi.Geometry.Spatial.Interfaces.IGeometry3D, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Spatial.Interfaces.IMovable3D, DiGi.Geometry.Spatial.Interfaces.IBoundable3D, DiGi.Geometry.Core.Interfaces.IBoundable, DiGi.Geometry.Spatial.Interfaces.ICollectable3D, DiGi.Geometry.Core.Interfaces.ICollectable

Constructors

Mesh3D(Mesh3D) Constructor

Initializes a new instance of the Mesh3D class by copying an existing Mesh3D instance.

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

Parameters

mesh3D Mesh3D

The Mesh3D instance to copy from.

Mesh3D(IEnumerable<Point3D>, IEnumerable<int[]>) Constructor

Initializes a new instance of the Mesh3D class using the specified collection of Point3D points and integer array indexes.

public Mesh3D(System.Collections.Generic.IEnumerable<DiGi.Geometry.Spatial.Classes.Point3D>? points, System.Collections.Generic.IEnumerable<int[]>? indexes);

Parameters

points System.Collections.Generic.IEnumerable<Point3D>

An System.Collections.Generic.IEnumerable<> of Point3D objects representing the vertices of the mesh.

indexes System.Collections.Generic.IEnumerable<System.Int32[]>

An System.Collections.Generic.IEnumerable<> of System.Int32 arrays representing the vertex indices for each face of the mesh.

Mesh3D(List<Point3D>, List<int[]>, bool) Constructor

Initializes a new instance of the Mesh3D class from prebuilt lists.

internal Mesh3D(System.Collections.Generic.List<DiGi.Geometry.Spatial.Classes.Point3D>? point3Ds, System.Collections.Generic.List<int[]>? indexes, bool clone);

Parameters

point3Ds System.Collections.Generic.List<Point3D>

The System.Collections.Generic.List<> containing the vertices of the mesh.

indexes System.Collections.Generic.List<System.Int32[]>

The System.Collections.Generic.List<> of int[] defining the triangle indices of the mesh.

clone System.Boolean

When true, the inputs are defensively copied and validated; when false, the supplied lists are adopted directly without cloning. Use false only when the caller owns freshly created, valid data that is not shared.

Mesh3D(JsonObject) Constructor

Initializes a new instance of the Mesh3D class using the provided System.Text.Json.Nodes.JsonObject.

public Mesh3D(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The System.Text.Json.Nodes.JsonObject containing the data used to initialize the mesh.

Methods

Mesh3D.Clone() Method

Creates a copy of the current object.

public override DiGi.Core.Interfaces.ISerializableObject? Clone();

Implements Clone()

Returns

DiGi.Core.Interfaces.ISerializableObject
A new DiGi.Core.Interfaces.ISerializableObject instance that is a clone of the current object, or null.

Mesh3D.GetArea() Method

Calculates the total surface area of the mesh as the sum of the areas of its triangles.

Uses scalar coordinate arithmetic only, without allocating intermediate vector objects.

public double GetArea();

Returns

System.Double
A System.Double representing the total surface area, or System.Double.NaN if the points or indexes are unavailable.

Mesh3D.GetAuxiliarySegments() Method

Retrieves a list of auxiliary segments based on the available points and indexes.

public System.Collections.Generic.List<DiGi.Geometry.Spatial.Classes.Segment3D>? GetAuxiliarySegments();

Returns

System.Collections.Generic.List<Segment3D>
A System.Collections.Generic.List<> containing the auxiliary segments, or null if the points, indexes, or auxiliary index data are unavailable.

Mesh3D.GetBoundaryEdges() Method

Retrieves the boundary edges of the geometry as a list of polyloops.

public System.Collections.Generic.List<DiGi.Geometry.Spatial.Classes.Polyloop>? GetBoundaryEdges();

Returns

System.Collections.Generic.List<Polyloop>
A System.Collections.Generic.List<> containing the boundary edges if they are successfully calculated; otherwise, null.

Mesh3D.GetBoundaryEdges(List<Segment3D>) Method

Retrieves the boundary edges as a list of Polyloop.

public System.Collections.Generic.List<DiGi.Geometry.Spatial.Classes.Polyloop>? GetBoundaryEdges(out System.Collections.Generic.List<DiGi.Geometry.Spatial.Classes.Segment3D>? auxiliarySegments);

Parameters

auxiliarySegments System.Collections.Generic.List<Segment3D>

When called, contains a System.Collections.Generic.List<> of auxiliary segments, or null if none are found.

Returns

System.Collections.Generic.List<Polyloop>
A System.Collections.Generic.List<> containing the boundary edges, or null if the points or indexes are not available.

Mesh3D.GetBoundingBox() Method

Calculates and returns the bounding box for the set of points.

public DiGi.Geometry.Spatial.Classes.BoundingBox3D? GetBoundingBox();

Implements GetBoundingBox()

Returns

BoundingBox3D
A BoundingBox3D representing the bounding box, or null if the points are not available.

Mesh3D.GetTriangle(int) Method

Retrieves the Triangle3D at the specified index.

public DiGi.Geometry.Spatial.Classes.Triangle3D? GetTriangle(int index);

Parameters

index System.Int32

The zero-based index of the triangle to retrieve as an System.Int32.

Returns

Triangle3D
A Triangle3D object if the index is valid and data exists; otherwise, null.

Mesh3D.GetTriangles() Method

Retrieves a list of Triangle3D objects based on the available points and indexes.

public System.Collections.Generic.List<DiGi.Geometry.Spatial.Classes.Triangle3D>? GetTriangles();

Returns

System.Collections.Generic.List<Triangle3D>
A System.Collections.Generic.List<> containing the triangles if the data is valid; otherwise, null.

Mesh3D.GetVolume() Method

Calculates the enclosed volume of the mesh using the divergence theorem (sum of signed tetrahedron volumes relative to the origin).

The result is only meaningful for a closed mesh with consistently oriented triangles; use IsClosed() to verify closedness first.

public double GetVolume();

Returns

System.Double
A System.Double representing the absolute enclosed volume, or System.Double.NaN if the points or indexes are unavailable.

Mesh3D.Move(Vector3D) Method

Moves all points by the specified Vector3D offset.

public bool Move(DiGi.Geometry.Spatial.Classes.Vector3D? vector2D);

Parameters

vector2D Vector3D

The Vector3D? translation vector used to move the points.

Implements Move(Vector3D)

Returns

System.Boolean
True if the operation was successful; otherwise, false.

Mesh3D.Transform(ITransform3D) Method

Transforms the points using the specified 3D transformation.

public bool Transform(DiGi.Geometry.Spatial.Interfaces.ITransform3D? transform);

Parameters

transform DiGi.Geometry.Spatial.Interfaces.ITransform3D

The DiGi.Geometry.Spatial.Interfaces.ITransform3D object used to perform the transformation.

Returns

System.Boolean
A System.Boolean value indicating whether the transformation was successfully applied; returns false if the DiGi.Geometry.Spatial.Interfaces.ITransform3D transform or the points collection is null.

Planar<T> Class

Represents an abstract 3D geometry that exists on a plane and is associated with a corresponding 2D geometry of type T.

public abstract class Planar<T> : DiGi.Geometry.Spatial.Classes.Geometry3D, DiGi.Geometry.Spatial.Interfaces.IPlanar<T>, DiGi.Geometry.Spatial.Interfaces.IPlanar, DiGi.Geometry.Spatial.Interfaces.IGeometry3D, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Spatial.Interfaces.IMovable3D, DiGi.Geometry.Spatial.Interfaces.IFlippable
    where T : DiGi.Geometry.Planar.Interfaces.IGeometry2D

Type parameters

T

The type of the 2D geometry, which must implement the DiGi.Geometry.Planar.Interfaces.IGeometry2D interface.

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectGeometry3D → Planar<T>

Derived
Ellipse3D
Polygon3D
PolygonalFace3D
Rectangle3D

Implements DiGi.Geometry.Spatial.Interfaces.IPlanar<T>, DiGi.Geometry.Spatial.Interfaces.IPlanar, DiGi.Geometry.Spatial.Interfaces.IGeometry3D, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Spatial.Interfaces.IMovable3D, DiGi.Geometry.Spatial.Interfaces.IFlippable

Constructors

Planar(Planar<T>) Constructor

Initializes a new instance of the Planar<T> class by cloning an existing Planar<T> instance.

public Planar(DiGi.Geometry.Spatial.Classes.Planar<T>? planar);

Parameters

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

The source Planar<T> instance to copy from.

Planar(Plane) Constructor

Initializes a new instance of the Planar<T> class using the specified Plane.

public Planar(DiGi.Geometry.Spatial.Classes.Plane? plane);

Parameters

plane Plane

The Plane used to initialize the planar object.

Planar(Plane, T) Constructor

Initializes a new instance of the Planar<T> class.

public Planar(DiGi.Geometry.Spatial.Classes.Plane? plane, T? geometry2D);

Parameters

plane Plane

The Plane that defines the planar surface.

geometry2D T

The 2D geometry of type <typeparam ref="T" /> to be associated with this instance.

Planar(Plane, T, bool) Constructor

Initializes a new instance of the Planar<T> class from a prebuilt plane and 2D geometry.

internal Planar(DiGi.Geometry.Spatial.Classes.Plane? plane, T? geometry2D, bool clone);

Parameters

plane Plane

The Plane that defines the planar surface.

geometry2D T

The 2D geometry of type T to be associated with this instance.

clone System.Boolean

When true, the inputs are defensively cloned; when false, the supplied instances are adopted directly without cloning. Use false only when the caller owns freshly created instances that are not shared.

Planar(JsonObject) Constructor

Initializes a new instance of the Planar<T> class using the specified System.Text.Json.Nodes.JsonObject.

public Planar(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The System.Text.Json.Nodes.JsonObject used to initialize the instance.

Properties

Planar<T>.Geometry2D Property

Gets the 2D geometry representation.

public T? Geometry2D { get; }

Implements Geometry2D

Property Value

T

Planar<T>.Plane Property

Gets the Plane associated with this object.

public DiGi.Geometry.Spatial.Classes.Plane? Plane { get; }

Implements Plane

Property Value

Plane
A Plane instance if one exists; otherwise, null.

Methods

Planar<T>.Flip(SpatialAxis, SpatialAxis) Method

Flips the orientation of the plane based on the specified primary and secondary axes.

public bool Flip(DiGi.Geometry.Spatial.Enums.SpatialAxis prmiaryAxis=DiGi.Geometry.Spatial.Enums.SpatialAxis.Z, DiGi.Geometry.Spatial.Enums.SpatialAxis secondaryAxis=DiGi.Geometry.Spatial.Enums.SpatialAxis.X);

Parameters

prmiaryAxis SpatialAxis

The SpatialAxis representing the primary axis for the flip operation.

secondaryAxis SpatialAxis

The SpatialAxis representing the secondary axis for the flip operation.

Implements Flip(SpatialAxis, SpatialAxis)

Returns

System.Boolean
A System.Boolean value indicating whether the flip operation was successful.

Planar<T>.Move(Vector3D) Method

Moves the object based on the provided Vector3D vector.

public override bool Move(DiGi.Geometry.Spatial.Classes.Vector3D? vector3D);

Parameters

vector3D Vector3D

The optional Vector3D value specifying the direction and distance to move.

Implements Move(Vector3D)

Returns

System.Boolean
A boolean value indicating whether the movement was successful.

PlanarIntersectionResult Class

Represents the result of a planar intersection operation in 3D space.

public class PlanarIntersectionResult : DiGi.Geometry.Spatial.Classes.PlanarResult, DiGi.Geometry.Spatial.Interfaces.IIntersectionResult3D, DiGi.Geometry.Core.Interfaces.IIntersectionResult, DiGi.Geometry.Core.Interfaces.IBooleanOperationResult, DiGi.Core.Interfaces.ISerializableResult, DiGi.Core.Interfaces.IResult, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectPlanarResult → PlanarIntersectionResult

Implements DiGi.Geometry.Spatial.Interfaces.IIntersectionResult3D, DiGi.Geometry.Core.Interfaces.IIntersectionResult, IBooleanOperationResult, DiGi.Core.Interfaces.ISerializableResult, DiGi.Core.Interfaces.IResult, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject

Constructors

PlanarIntersectionResult() Constructor

Initializes a new instance of the PlanarIntersectionResult class.

public PlanarIntersectionResult();

PlanarIntersectionResult(PlanarIntersectionResult) Constructor

Initializes a new instance of the PlanarIntersectionResult class using another PlanarIntersectionResult instance.

public PlanarIntersectionResult(DiGi.Geometry.Spatial.Classes.PlanarIntersectionResult? planarIntersectionResult);

Parameters

planarIntersectionResult PlanarIntersectionResult

The PlanarIntersectionResult instance to copy from.

PlanarIntersectionResult(Plane) Constructor

Initializes a new instance of the PlanarIntersectionResult class using the specified Plane.

public PlanarIntersectionResult(DiGi.Geometry.Spatial.Classes.Plane? plane);

Parameters

plane Plane

The Plane used to initialize the result.

PlanarIntersectionResult(Plane, IGeometry2D) Constructor

Initializes a new instance of the PlanarIntersectionResult class.

public PlanarIntersectionResult(DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Planar.Interfaces.IGeometry2D? geometry2D);

Parameters

plane Plane

The Plane used for the intersection.

geometry2D DiGi.Geometry.Planar.Interfaces.IGeometry2D

The DiGi.Geometry.Planar.Interfaces.IGeometry2D resulting from the intersection.

PlanarIntersectionResult(Plane, IEnumerable<IGeometry2D>) Constructor

Initializes a new instance of the PlanarIntersectionResult class with the specified plane and a collection of 2D geometries.

public PlanarIntersectionResult(DiGi.Geometry.Spatial.Classes.Plane? plane, System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Interfaces.IGeometry2D>? geometry2Ds);

Parameters

plane Plane

The Plane that defines the planar intersection, or null if not applicable.

geometry2Ds System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Interfaces.IGeometry2D>

An System.Collections.Generic.IEnumerable<> containing the 2D geometries resulting from the intersection, or null if no geometries were found.

PlanarIntersectionResult(JsonObject) Constructor

Initializes a new instance of the PlanarIntersectionResult class using the specified System.Text.Json.Nodes.JsonObject.

public PlanarIntersectionResult(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The System.Text.Json.Nodes.JsonObject used to initialize the current instance.

Methods

PlanarIntersectionResult.Any() Method

Determines whether an intersection exists.

public bool Any();

Implements Any()

Returns

System.Boolean
A System.Boolean value that is true if the count of intersecting elements is greater than zero; otherwise, false.

PlanarIntersectionResult.Clone() Method

Creates a copy of the current PlanarIntersectionResult instance.

public override DiGi.Core.Interfaces.ISerializableObject? Clone();

Implements Clone()

Returns

DiGi.Core.Interfaces.ISerializableObject
An DiGi.Core.Interfaces.ISerializableObject that is a clone of the current instance.

PlanarResult Class

Represents an abstract base class for results that are defined on a 2D plane.

public abstract class PlanarResult : DiGi.Core.Classes.SerializableObject, DiGi.Core.Interfaces.ISerializableResult, DiGi.Core.Interfaces.IResult, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObject → PlanarResult

Derived
PlanarIntersectionResult
ProjectionResult

Implements DiGi.Core.Interfaces.ISerializableResult, DiGi.Core.Interfaces.IResult, DiGi.Core.Interfaces.IObject, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject

Constructors

PlanarResult() Constructor

Initializes a new instance of the PlanarResult class.

public PlanarResult();

PlanarResult(PlanarResult) Constructor

Initializes a new instance of the PlanarResult class by copying the data from an existing PlanarResult instance.

public PlanarResult(DiGi.Geometry.Spatial.Classes.PlanarResult? planarResult);

Parameters

planarResult PlanarResult

The source PlanarResult instance to copy.

PlanarResult(Plane) Constructor

Initializes a new instance of the PlanarResult class using the specified Plane.

public PlanarResult(DiGi.Geometry.Spatial.Classes.Plane? plane);

Parameters

plane Plane

The Plane to initialize the result with, or null.

PlanarResult(Plane, IGeometry2D) Constructor

Initializes a new instance of the PlanarResult class.

public PlanarResult(DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Planar.Interfaces.IGeometry2D? geometry2D);

Parameters

plane Plane

The Plane to associate with this result, or null.

geometry2D DiGi.Geometry.Planar.Interfaces.IGeometry2D

The DiGi.Geometry.Planar.Interfaces.IGeometry2D geometry to include in the result, or null.

PlanarResult(Plane, IEnumerable<IGeometry2D>) Constructor

Initializes a new instance of the PlanarResult class.

public PlanarResult(DiGi.Geometry.Spatial.Classes.Plane? plane, System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Interfaces.IGeometry2D>? geometry2Ds);

Parameters

plane Plane

The Plane to associate with this result, or null.

geometry2Ds System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Interfaces.IGeometry2D>

A collection of DiGi.Geometry.Planar.Interfaces.IGeometry2D objects to associate with this result, or null.

PlanarResult(JsonObject) Constructor

Initializes a new instance of the PlanarResult class using the specified System.Text.Json.Nodes.JsonObject.

public PlanarResult(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The System.Text.Json.Nodes.JsonObject used to initialize the instance. This value can be null.

Properties

PlanarResult.Count Property

Gets the number of geometry elements contained in this object.

public int Count { get; }

Property Value

System.Int32

PlanarResult.Plane Property

Gets the associated Plane instance.

public DiGi.Geometry.Spatial.Classes.Plane? Plane { get; }

Property Value

Plane
The Plane object, or null if no plane is defined.

Methods

PlanarResult.Contains<T>() Method

Determines whether the collection contains any geometry objects of the specified type T.

public bool Contains<T>()
    where T : DiGi.Geometry.Planar.Interfaces.IGeometry2D;

Type parameters

T

The type of geometry to search for, which must implement the DiGi.Geometry.Planar.Interfaces.IGeometry2D interface.

Returns

System.Boolean
A System.Boolean value indicating whether an object of type T is present in the collection.

PlanarResult.GetGeometry2Ds<T>() Method

Retrieves a list of cloned 2D geometry objects of the specified type T.

public System.Collections.Generic.List<T>? GetGeometry2Ds<T>()
    where T : DiGi.Geometry.Planar.Interfaces.IGeometry2D;

Type parameters

T

The type of geometry to retrieve, which must implement IGeometry2D.

Returns

System.Collections.Generic.List<T>
A List<T> containing clones of the 2D geometry objects if the collection is not null; otherwise, null.

PlanarResult.GetGeometry3Ds<T>() Method

Retrieves a list of 3D geometry objects of the specified type T.

public System.Collections.Generic.List<T>? GetGeometry3Ds<T>()
    where T : DiGi.Geometry.Spatial.Interfaces.IGeometry3D;

Type parameters

T

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

Returns

System.Collections.Generic.List<T>
A System.Collections.Generic.List<> containing the converted 3D geometries, or null if no source 2D geometries are available.

Plane Class

Represents a plane in 3D space, inheriting from Geometry3D and implementing DiGi.Geometry.Spatial.Interfaces.IFlippable.

public class Plane : DiGi.Geometry.Spatial.Classes.Geometry3D, DiGi.Geometry.Spatial.Interfaces.IFlippable, DiGi.Geometry.Spatial.Interfaces.IGeometry3D, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Spatial.Interfaces.IMovable3D

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectGeometry3D → Plane

Implements DiGi.Geometry.Spatial.Interfaces.IFlippable, DiGi.Geometry.Spatial.Interfaces.IGeometry3D, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Spatial.Interfaces.IMovable3D

Constructors

Plane(Plane) Constructor

Initializes a new instance of the Plane class by copying the values from an existing Plane object.

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

Parameters

plane Plane

The source Plane object to copy data from. If null, the current instance remains uninitialized.

Plane(Plane, Point3D) Constructor

Initializes a new instance of the Plane class using an existing Plane for orientation and an optional Point3D for the origin.

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

Parameters

plane Plane

The Plane object to copy the normal and axisY vectors from. Can be null.

origin Point3D

The Point3D object to set as the origin of the plane. Can be null.

Plane(Point3D, Point3D, Point3D) Constructor

Initializes a new instance of the Plane class using three points to define the plane's origin and orientation.

public Plane(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?, which is used as the origin of the plane.

point3D_2 Point3D

The second Point3D? used to determine the normal vector of the plane.

point3D_3 Point3D

The third Point3D? used to determine the normal vector of the plane.

Plane(Point3D, Vector3D) Constructor

Initializes a new instance of the Plane class using the specified origin point and normal vector.

public Plane(DiGi.Geometry.Spatial.Classes.Point3D? origin, DiGi.Geometry.Spatial.Classes.Vector3D? normal);

Parameters

origin Point3D

The optional Point3D that defines the origin of the plane.

normal Vector3D

The optional Vector3D that defines the normal vector of the plane.

Plane(Point3D, Vector3D, Vector3D) Constructor

Initializes a new instance of the Plane class using an origin point and two basis vectors.

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

Parameters

origin Point3D

The Point3D? representing the origin point of the plane.

axisX Vector3D

The Vector3D? representing the X-axis vector of the plane.

axisY Vector3D

The Vector3D representing the Y-axis vector of the plane.

Plane(JsonObject) Constructor

Initializes a new instance of the Plane class using the provided System.Text.Json.Nodes.JsonObject.

public Plane(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The System.Text.Json.Nodes.JsonObject containing the data used to initialize the plane.

Properties

Plane.A Property

A factor for point-normal equation A(x−a)+B(y−b)+C(z−c) = 0 where origin(a,b,c), normal(A,B,C)

public double A { get; }

Property Value

System.Double
A value for point-normal equation

Plane.AxisX Property

Gets the X-axis vector of the coordinate system.

public DiGi.Geometry.Spatial.Classes.Vector3D? AxisX { get; }

Property Value

Vector3D
A Vector3D representing the X-axis, or null if it cannot be determined.

Plane.AxisY Property

Gets the Y-axis as a Vector3D.

public DiGi.Geometry.Spatial.Classes.Vector3D? AxisY { get; }

Property Value

Vector3D
A Vector3D representing the Y-axis, or null if it is not defined.

Plane.AxisZ Property

Gets the Z-axis vector derived from the normal.

public DiGi.Geometry.Spatial.Classes.Vector3D? AxisZ { get; }

Property Value

Vector3D
A Vector3D representing the Z-axis if the normal is defined; otherwise, null.

Plane.B Property

B factor for point-normal equation A(x−a)+B(y−b)+C(z−c) = 0 where origin(a,b,c), normal(A,B,C)

public double B { get; }

Property Value

System.Double
B value for point-normal equation

Plane.C Property

C factor for point-normal equation A(x−a)+B(y−b)+C(z−c) = 0 where origin(a,b,c), normal(A,B,C)

public double C { get; }

Property Value

System.Double
C value for point-normal equation

Plane.D Property

D factor for point-normal equation Ax+By+Cz = D where origin(a,b,c), normal(A,B,C)

public double D { get; }

Property Value

System.Double
D value for point-normal equation

Plane.Normal Property

Gets the normal vector of the object.

public DiGi.Geometry.Spatial.Classes.Vector3D? Normal { get; }

Property Value

Vector3D
A Vector3D representing the normal vector, or null if it is not defined.

Plane.Origin Property

Gets or sets the origin point in 3D space.

public DiGi.Geometry.Spatial.Classes.Point3D? Origin { get; set; }

Property Value

Point3D
A Point3D? representing the origin coordinates.

Methods

Plane.ClosestPoint(Point3D) Method

Calculates the closest point on the plane to the specified Point3D.

public DiGi.Geometry.Spatial.Classes.Point3D? ClosestPoint(DiGi.Geometry.Spatial.Classes.Point3D? point3D);

Parameters

point3D Point3D

The Point3D for which the closest point is calculated.

Returns

Point3D
The closest Point3D on the plane, or null if the provided Point3D or the plane normal is null.

Plane.Coplanar(Plane, double) Method

Determines whether this plane is coplanar with the specified Plane.

public bool Coplanar(DiGi.Geometry.Spatial.Classes.Plane? plane, double tolerance=1E-06);

Parameters

plane Plane

The Plane to compare against.

tolerance System.Double

The System.Double tolerance used for the comparison.

Returns

System.Boolean
A System.Boolean value indicating whether the planes are coplanar.

Plane.Distance(Point3D) Method

Calculates the distance between the current object and the specified Point3D.

public double Distance(DiGi.Geometry.Spatial.Classes.Point3D? point3D);

Parameters

point3D Point3D

The Point3D to calculate the distance to. This value can be null.

Returns

System.Double
A System.Double representing the distance, or System.Double.NaN if the provided point is null or a closest point cannot be determined.

Plane.Flip(SpatialAxis, SpatialAxis) Method

Flips the orientation based on the specified primary and secondary spatial axes.

public bool Flip(DiGi.Geometry.Spatial.Enums.SpatialAxis prmiaryAxis=DiGi.Geometry.Spatial.Enums.SpatialAxis.Z, DiGi.Geometry.Spatial.Enums.SpatialAxis secondaryAxis=DiGi.Geometry.Spatial.Enums.SpatialAxis.X);

Parameters

prmiaryAxis SpatialAxis

The SpatialAxis representing the primary axis.

secondaryAxis SpatialAxis

The SpatialAxis representing the secondary axis.

Implements Flip(SpatialAxis, SpatialAxis)

Returns

System.Boolean
A System.Boolean value indicating whether the flip operation was successfully performed.

Plane.GetAxis(SpatialAxis) Method

Retrieves the Vector3D associated with the specified SpatialAxis.

public DiGi.Geometry.Spatial.Classes.Vector3D? GetAxis(DiGi.Geometry.Spatial.Enums.SpatialAxis axis);

Parameters

axis SpatialAxis

The SpatialAxis to retrieve.

Returns

Vector3D
A Vector3D representing the axis, or null if the SpatialAxis is undefined.

Plane.Move(Vector3D) Method

Moves the object by the specified Vector3D? vector.

public override bool Move(DiGi.Geometry.Spatial.Classes.Vector3D? vector3D);

Parameters

vector3D Vector3D

The Vector3D? value representing the displacement.

Implements Move(Vector3D)

Returns

System.Boolean
A bool indicating whether the move operation was successful.

Point3D Class

Represents a point in three-dimensional space.

public class Point3D : DiGi.Geometry.Spatial.Classes.Coordinate3D, DiGi.Geometry.Spatial.Interfaces.IMovable3D, DiGi.Geometry.Core.Interfaces.IPoint<DiGi.Geometry.Spatial.Classes.Point3D>, DiGi.Geometry.Core.Interfaces.IPoint, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Spatial.Interfaces.ITransformable3D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Spatial.Interfaces.ITransform3D>, DiGi.Geometry.Core.Interfaces.ITransformable

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectCoordinateCoordinate3D → Point3D

Implements DiGi.Geometry.Spatial.Interfaces.IMovable3D, DiGi.Geometry.Core.Interfaces.IPoint<Point3D>, DiGi.Geometry.Core.Interfaces.IPoint, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Spatial.Interfaces.ITransformable3D, DiGi.Geometry.Core.Interfaces.ITransformable<DiGi.Geometry.Spatial.Interfaces.ITransform3D>, DiGi.Geometry.Core.Interfaces.ITransformable

Constructors

Point3D(Point3D) Constructor

Initializes a new instance of the Point3D class using the values from an existing Point3D instance.

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

Parameters

point3D Point3D

The Point3D instance to copy values from.

Point3D(double, double, double) Constructor

Initializes a new instance of the Point3D class with the specified double x, double y, and double z coordinates.

public Point3D(double x, double y, double z);

Parameters

x System.Double

The double value for the X coordinate.

y System.Double

The double value for the Y coordinate.

z System.Double

The double value for the Z coordinate.

Point3D(double[]) Constructor

Initializes a new instance of the Point3D class using an array of System.Double.

public Point3D(double[]? values);

Parameters

values System.Double[]

An array of System.Double containing the coordinate values.

Point3D(JsonObject) Constructor

Initializes a new instance of the Point3D class using the specified System.Text.Json.Nodes.JsonObject.

public Point3D(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The System.Text.Json.Nodes.JsonObject used to initialize the point.

Methods

Point3D.Clone() Method

Creates a copy of the current instance.

public override DiGi.Core.Interfaces.ISerializableObject? Clone();

Implements Clone()

Returns

DiGi.Core.Interfaces.ISerializableObject
A new DiGi.Core.Interfaces.ISerializableObject that is a clone of the current instance, or null.

Point3D.Distance(Point3D) Method

Calculates the distance between this point and a specified Point3D.

public double Distance(DiGi.Geometry.Spatial.Classes.Point3D? point3D);

Parameters

point3D Point3D

The Point3D to calculate the distance to.

Returns

System.Double
The distance as a System.Double, or System.Double.NaN if the provided Point3D is null.

Point3D.Equals(object) Method

Determines whether the specified System.Object is equal to the current Point3D.

public override bool Equals(object? obj);

Parameters

obj System.Object

The System.Object to compare with the current instance.

Returns

System.Boolean
true if the specified System.Object is a Point3D with equal component values; otherwise, false.

Point3D.GetAbs() Method

Returns a new Point3D instance containing the absolute values of the current point's coordinates.

public DiGi.Geometry.Spatial.Classes.Point3D GetAbs();

Returns

Point3D
A new Point3D object with absolute coordinate values.

Point3D.GetHashCode() Method

Returns a hash code for the current Point3D.

public override int GetHashCode();

Returns

System.Int32
An System.Int32 hash code.

Point3D.GetMoved(Vector3D) Method

Returns a new Point3D that is the result of moving this point by the specified Vector3D.

public DiGi.Geometry.Spatial.Classes.Point3D? GetMoved(DiGi.Geometry.Spatial.Classes.Vector3D? vector3D);

Parameters

vector3D Vector3D

The Vector3D to move the point by.

Returns

Point3D
A new Point3D representing the moved position, or null if the provided Vector3D is null.

Point3D.InDistance(Point3D, double, double) Method

Determines whether the specified Point3D is within a given distance, accounting for an optional tolerance.

public bool InDistance(DiGi.Geometry.Spatial.Classes.Point3D? point3D, double distance, double tolerance=1E-06);

Parameters

point3D Point3D

The Point3D to evaluate.

distance System.Double

The maximum allowed distance as a System.Double.

tolerance System.Double

The tolerance value as a System.Double to be added to the distance threshold.

Returns

System.Boolean
A System.Boolean indicating whether the point is within the specified distance and tolerance; returns false if point3D is null.

Point3D.Mid(Point3D) Method

Calculates the midpoint between this point and another Point3D.

public DiGi.Geometry.Spatial.Classes.Point3D? Mid(DiGi.Geometry.Spatial.Classes.Point3D? point3D);

Parameters

point3D Point3D

The other Point3D to calculate the midpoint with.

Returns

Point3D
A Point3D representing the midpoint, or null if the provided Point3D is null.

Operators

Point3D.operator +(Point3D, Vector3D) Operator

Adds a Vector3D to a Point3D to produce a new point.

public static DiGi.Geometry.Spatial.Classes.Point3D? operator +(DiGi.Geometry.Spatial.Classes.Point3D? point3D, DiGi.Geometry.Spatial.Classes.Vector3D? vector3D);

Parameters

point3D Point3D

The starting Point3D.

vector3D Vector3D

The Vector3D to add to the point.

Returns

Point3D
A new Point3D resulting from the addition, or null if either input is null.

Point3D.operator ==(Point3D, Point3D) Operator

Indicates whether two Point3D instances are equal.

public static bool operator ==(DiGi.Geometry.Spatial.Classes.Point3D? point3D_1, DiGi.Geometry.Spatial.Classes.Point3D? point3D_2);

Parameters

point3D_1 Point3D

The first Point3D to compare.

point3D_2 Point3D

The second Point3D to compare.

Returns

System.Boolean
true if the points are equal; otherwise, false.

Point3D.operator !=(Point3D, Point3D) Operator

Indicates whether two Point3D instances are not equal.

public static bool operator !=(DiGi.Geometry.Spatial.Classes.Point3D? point3D_1, DiGi.Geometry.Spatial.Classes.Point3D? point3D_2);

Parameters

point3D_1 Point3D

The first Point3D to compare.

point3D_2 Point3D

The second Point3D to compare.

Returns

System.Boolean
true if the points are not equal; otherwise, false.

Point3D.operator -(Point3D, Point3D) Operator

Subtracts one Point3D from another to produce a Vector3D.

public static DiGi.Geometry.Spatial.Classes.Vector3D? operator -(DiGi.Geometry.Spatial.Classes.Point3D? point3D_1, DiGi.Geometry.Spatial.Classes.Point3D? point3D_2);

Parameters

point3D_1 Point3D

The first Point3D.

point3D_2 Point3D

The second Point3D.

Returns

Vector3D
A new Vector3D resulting from the subtraction, or null if either input is null.

Point3D.operator -(Point3D, Vector3D) Operator

Subtracts a Vector3D from a Point3D to produce a new point.

public static DiGi.Geometry.Spatial.Classes.Point3D? operator -(DiGi.Geometry.Spatial.Classes.Point3D? point3D, DiGi.Geometry.Spatial.Classes.Vector3D? vector3D);

Parameters

point3D Point3D

The starting Point3D.

vector3D Vector3D

The Vector3D to subtract from the point.

Returns

Point3D
A new Point3D resulting from the subtraction, or null if either input is null.

Polygon3D Class

Represents a three-dimensional polygon defined on a specific plane.

public class Polygon3D : DiGi.Geometry.Spatial.Classes.Planar<DiGi.Geometry.Planar.Classes.Polygon2D>, DiGi.Geometry.Spatial.Interfaces.IPolygonal3D<DiGi.Geometry.Planar.Classes.Polygon2D>, DiGi.Geometry.Spatial.Interfaces.IPolygonal3D, DiGi.Geometry.Spatial.Interfaces.IClosedPlanarCurve3D, DiGi.Geometry.Spatial.Interfaces.IClosedCurve3D, DiGi.Geometry.Core.Interfaces.IClosedCurve, DiGi.Geometry.Core.Interfaces.ICurve, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Spatial.Interfaces.IGeometry3D, DiGi.Geometry.Spatial.Interfaces.IMovable3D, DiGi.Geometry.Spatial.Interfaces.ICurve3D, DiGi.Geometry.Spatial.Interfaces.ISegmentable3D, DiGi.Geometry.Core.Interfaces.ISegmentable<DiGi.Geometry.Spatial.Classes.Point3D>, DiGi.Geometry.Core.Interfaces.ISegmentable, DiGi.Geometry.Core.Interfaces.IInvertible, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Spatial.Interfaces.IBoundable3D, DiGi.Geometry.Core.Interfaces.IBoundable, DiGi.Geometry.Spatial.Interfaces.IInvertible3D, DiGi.Geometry.Spatial.Interfaces.IPlanar, DiGi.Geometry.Spatial.Interfaces.IPlanar<DiGi.Geometry.Planar.Classes.Polygon2D>

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectGeometry3DDiGi.Geometry.Spatial.Classes.Planar<Polygon2D> → Polygon3D

Implements DiGi.Geometry.Spatial.Interfaces.IPolygonal3D<Polygon2D>, DiGi.Geometry.Spatial.Interfaces.IPolygonal3D, DiGi.Geometry.Spatial.Interfaces.IClosedPlanarCurve3D, DiGi.Geometry.Spatial.Interfaces.IClosedCurve3D, DiGi.Geometry.Core.Interfaces.IClosedCurve, DiGi.Geometry.Core.Interfaces.ICurve, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Spatial.Interfaces.IGeometry3D, DiGi.Geometry.Spatial.Interfaces.IMovable3D, DiGi.Geometry.Spatial.Interfaces.ICurve3D, DiGi.Geometry.Spatial.Interfaces.ISegmentable3D, DiGi.Geometry.Core.Interfaces.ISegmentable<Point3D>, DiGi.Geometry.Core.Interfaces.ISegmentable, DiGi.Geometry.Core.Interfaces.IInvertible, DiGi.Geometry.Core.Interfaces.IMovable, DiGi.Geometry.Spatial.Interfaces.IBoundable3D, DiGi.Geometry.Core.Interfaces.IBoundable, DiGi.Geometry.Spatial.Interfaces.IInvertible3D, DiGi.Geometry.Spatial.Interfaces.IPlanar, DiGi.Geometry.Spatial.Interfaces.IPlanar<Polygon2D>

Constructors

Polygon3D(Plane, Polygon2D) Constructor

Initializes a new instance of the Polygon3D class using the specified Plane and Polygon2D.

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

Parameters

plane Plane

The Plane on which the polygon is defined.

polygon2D Polygon2D

The Polygon2D that defines the 2D shape of the polygon.

Polygon3D(Plane, IEnumerable<Point2D>) Constructor

Initializes a new instance of the Polygon3D class using the specified Plane and a collection of Point2D points.

public Polygon3D(DiGi.Geometry.Spatial.Classes.Plane? plane, System.Collections.Generic.IEnumerable<DiGi.Geometry.Planar.Classes.Point2D>? point2Ds);

Parameters

plane Plane

The Plane on which the polygon is defined. This value can be null.

point2Ds System.Collections.Generic.IEnumerable<Point2D>

An System.Collections.Generic.IEnumerable<> containing the 2D points that define the vertices of the polygon. This value can be null.

Polygon3D(Polygon3D) Constructor

Initializes a new instance of the Polygon3D class by copying an existing Polygon3D object.

public Polygon3D(DiGi.Geometry.Spatial.Classes.Polygon3D? polygon3D);

Parameters

polygon3D Polygon3D

The Polygon3D object to copy from.

Polygon3D(JsonObject) Constructor

Initializes a new instance of the Polygon3D class using the specified System.Text.Json.Nodes.JsonObject.

public Polygon3D(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The System.Text.Json.Nodes.JsonObject used to initialize the polygon.

Properties

Polygon3D.Length Property

Gets the length of the geometry.

public double Length { get; }

Implements Length

Property Value

System.Double
A System.Double representing the length, or System.Double.NaN if the underlying geometry is null.

Methods

Polygon3D.Clone() Method

Creates a copy of the current instance.

public override DiGi.Core.Interfaces.ISerializableObject? Clone();

Implements Clone()

Returns

DiGi.Core.Interfaces.ISerializableObject
A new DiGi.Core.Interfaces.ISerializableObject that is a clone of the current instance, or null.

Polygon3D.ClosestPoint(Point3D) Method

Calculates the closest point on the geometry to the specified Point3D.

public DiGi.Geometry.Spatial.Classes.Point3D? ClosestPoint(DiGi.Geometry.Spatial.Classes.Point3D? point3D);

Parameters

point3D Point3D

The Point3D for which the closest point is sought.

Returns

Point3D
The closest Point3D found, or null if the input Point3D is null or the geometry is not available.

Polygon3D.GetArea() Method

Calculates the area of the 2D geometry.

public double GetArea();

Implements GetArea()

Returns

System.Double
A System.Double representing the area, or System.Double.NaN if the 2D geometry is null.

Polygon3D.GetBoundingBox() Method

Calculates the 3D bounding box for the current geometry based on its points.

public DiGi.Geometry.Spatial.Classes.BoundingBox3D? GetBoundingBox();

Implements GetBoundingBox()

Returns

BoundingBox3D
A BoundingBox3D containing all points, or null if no points are available.

Polygon3D.GetCentroid() Method

Calculates the centroid of the geometry and converts it to a 3D point.

public DiGi.Geometry.Spatial.Classes.Point3D? GetCentroid();

Implements GetCentroid()

Returns

Point3D
A Point3D representing the centroid, or null if the plane or geometry is not available.

Polygon3D.GetInternalPoint(double) Method

Gets an internal point of the geometry converted to 3D space.

public DiGi.Geometry.Spatial.Classes.Point3D? GetInternalPoint(double tolerance=1E-06);

Parameters

tolerance System.Double

The System.Double tolerance used for the calculation.

Implements GetInternalPoint(double)

Returns

Point3D
A Point3D representing the internal point, or null if the plane or geometry is not available.

Polygon3D.GetPerimeter() Method

Gets the perimeter of the geometry.

public double GetPerimeter();

Implements GetPerimeter()

Returns

System.Double
A System.Double value representing the total length of the perimeter.

Polygon3D.GetPoints() Method

Retrieves a list of Point3D objects by converting the 2D points from the geometry using the associated plane.

public System.Collections.Generic.List<DiGi.Geometry.Spatial.Classes.Point3D>? GetPoints();

Implements GetPoints()

Returns

System.Collections.Generic.List<Point3D>
A System.Collections.Generic.List<> containing the converted points, or null if the plane, geometry, or source points are unavailable.

Polygon3D.GetSegments() Method

Retrieves a list of Segment3D segments.

public System.Collections.Generic.List<DiGi.Geometry.Spatial.Classes.Segment3D>? GetSegments();

Implements GetSegments()

Returns

System.Collections.Generic.List<Segment3D>
A System.Collections.Generic.List<> of Segment3D objects if points are available; otherwise, null.

Polygon3D.InRange(Point3D, double) Method

Determines whether the specified Point3D is within range based on the provided tolerance.

public bool InRange(DiGi.Geometry.Spatial.Classes.Point3D? point3D, double tolerance=1E-06);

Parameters

point3D Point3D

The Point3D to evaluate.

tolerance System.Double

The System.Double distance tolerance used for the range check.

Implements InRange(Point3D, double)

Returns

System.Boolean
A System.Boolean value indicating whether the point is within range; otherwise, false if the point or required internal geometry is null.

Polygon3D.InRange(ISegmentable3D, double) Method

Determines whether the specified DiGi.Geometry.Spatial.Interfaces.ISegmentable3D object is within a given distance tolerance.

public bool InRange(DiGi.Geometry.Spatial.Interfaces.ISegmentable3D? segmentable3D, double tolerance=1E-06);

Parameters

segmentable3D DiGi.Geometry.Spatial.Interfaces.ISegmentable3D

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

tolerance System.Double

The System.Double value representing the distance tolerance.

Implements InRange(ISegmentable3D, double)

Returns

System.Boolean
A System.Boolean value indicating whether the object is within range; otherwise, false if any required components are null.

Polygon3D.Inside(Point3D, double) Method

Determines whether the specified Point3D is inside the geometry within the given tolerance.

public bool Inside(DiGi.Geometry.Spatial.Classes.Point3D? point3D, double tolerance=1E-06);

Parameters

point3D Point3D

The Point3D to evaluate.

tolerance System.Double

The System.Double distance tolerance used for the check.

Implements Inside(Point3D, double)

Returns

System.Boolean
A System.Boolean value indicating whether the point is inside; returns false if the Point3D, geometry, or plane is null.

Polygon3D.Inside(ISegmentable3D, double) Method

Determines whether the specified DiGi.Geometry.Spatial.Interfaces.ISegmentable3D object is inside the geometry.

public bool Inside(DiGi.Geometry.Spatial.Interfaces.ISegmentable3D? segmentable3D, double tolerance=1E-06);

Parameters

segmentable3D DiGi.Geometry.Spatial.Interfaces.ISegmentable3D

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

tolerance System.Double

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

Implements Inside(ISegmentable3D, double)

Returns

System.Boolean
A System.Boolean value indicating whether the DiGi.Geometry.Spatial.Interfaces.ISegmentable3D object is inside the geometry.

Polygon3D.Inverse() Method

Inverts the geometry.

public bool Inverse();

Implements Inverse()

Returns

System.Boolean
A System.Boolean value indicating whether the inversion was successful.

Polygon3D.On(Point3D, double) Method

Determines whether the specified Point3D is on the geometry within the given tolerance.

public bool On(DiGi.Geometry.Spatial.Classes.Point3D? point3D, double tolerance=1E-06);

Parameters

point3D Point3D

The Point3D to check.

tolerance System.Double

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

Returns

System.Boolean
A System.Boolean value indicating whether the point is on the geometry.

Polygon3D.Triangulate(double) Method

Triangulates the geometry into a list of Triangle3D objects.

public System.Collections.Generic.List<DiGi.Geometry.Spatial.Classes.Triangle3D>? Triangulate(double tolerance=1E-09);

Parameters

tolerance System.Double

The System.Double tolerance value used for the triangulation process.

Implements Triangulate(double)

Returns

System.Collections.Generic.List<Triangle3D>
A System.Collections.Generic.List<> containing the resulting 3D triangles, or null if the plane is null or the 2D triangulation fails.

Polygonal3DNormalizationUpdater Class

Updates the normalization of a 3D polygonal geometry to ensure it matches a specified orientation.

public class Polygonal3DNormalizationUpdater : DiGi.Geometry.Core.Classes.GeometryUpdater<DiGi.Geometry.Spatial.Interfaces.IPolygonal3D>, DiGi.Geometry.Core.Interfaces.INormalizationUpdater<DiGi.Geometry.Spatial.Interfaces.IPolygonal3D>, DiGi.Geometry.Core.Interfaces.IGeometryUpdater<DiGi.Geometry.Spatial.Interfaces.IPolygonal3D>, DiGi.Geometry.Core.Interfaces.IGeometryUpdater, DiGi.Core.Interfaces.IUpdater, DiGi.Core.Interfaces.IEvaluator, DiGi.Core.Interfaces.IUpdater<DiGi.Geometry.Spatial.Interfaces.IPolygonal3D>

Inheritance System.ObjectDiGi.Geometry.Core.Classes.GeometryUpdater<DiGi.Geometry.Spatial.Interfaces.IPolygonal3D> → Polygonal3DNormalizationUpdater

Implements DiGi.Geometry.Core.Interfaces.INormalizationUpdater<DiGi.Geometry.Spatial.Interfaces.IPolygonal3D>, DiGi.Geometry.Core.Interfaces.IGeometryUpdater<DiGi.Geometry.Spatial.Interfaces.IPolygonal3D>, DiGi.Geometry.Core.Interfaces.IGeometryUpdater, DiGi.Core.Interfaces.IUpdater, DiGi.Core.Interfaces.IEvaluator, DiGi.Core.Interfaces.IUpdater<DiGi.Geometry.Spatial.Interfaces.IPolygonal3D>

Constructors

Polygonal3DNormalizationUpdater(Orientation) Constructor

Initializes a new instance of the Polygonal3DNormalizationUpdater class.

public Polygonal3DNormalizationUpdater(DiGi.Geometry.Core.Enums.Orientation orientation);

Parameters

orientation Orientation

The Orientation to which the polygonal 3D object should be normalized.

Methods

Polygonal3DNormalizationUpdater.Normalized() Method

Determines whether the current value is normalized based on the specified orientation.

public bool Normalized();

Implements Normalized()

Returns

System.Boolean
A System.Boolean value indicating true if the value is normalized; otherwise, false.

Polygonal3DNormalizationUpdater.Update() Method

Updates the orientation of the current value.

public override bool Update();

Implements Update()

Returns

System.Boolean
A System.Boolean indicating whether the update operation was successful.

PolygonalFace3D Class

Represents a polygonal face in 3D space that is planar.

public class PolygonalFace3D : DiGi.Geometry.Spatial.Classes.Planar<DiGi.Geometry.Planar.Interfaces.IPolygonalFace2D>, DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D, DiGi.Geometry.Spatial.Interfaces.IFace3D<DiGi.Geometry.Spatial.Interfaces.IPolygonal3D>, DiGi.Geometry.Spatial.Interfaces.IFace3D, DiGi.Geometry.Core.Interfaces.IFace, DiGi.Geometry.Core.Interfaces.ISurface, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Spatial.Interfaces.ISurface3D, DiGi.Geometry.Spatial.Interfaces.IBoundable3D, DiGi.Geometry.Spatial.Interfaces.IGeometry3D, DiGi.Geometry.Spatial.Interfaces.IMovable3D, DiGi.Geometry.Core.Interfaces.IBoundable, DiGi.Geometry.Spatial.Interfaces.IPlanar, DiGi.Geometry.Core.Interfaces.IFace<DiGi.Geometry.Spatial.Interfaces.IPolygonal3D>, DiGi.Geometry.Spatial.Interfaces.IPlanar<DiGi.Geometry.Planar.Interfaces.IPolygonalFace2D>, DiGi.Geometry.Spatial.Interfaces.IInvertible3D, DiGi.Geometry.Core.Interfaces.IInvertible, DiGi.Geometry.Spatial.Interfaces.IFlippable

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectGeometry3DDiGi.Geometry.Spatial.Classes.Planar<IPolygonalFace2D> → PolygonalFace3D

Implements DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D, DiGi.Geometry.Spatial.Interfaces.IFace3D<DiGi.Geometry.Spatial.Interfaces.IPolygonal3D>, DiGi.Geometry.Spatial.Interfaces.IFace3D, DiGi.Geometry.Core.Interfaces.IFace, DiGi.Geometry.Core.Interfaces.ISurface, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Spatial.Interfaces.ISurface3D, DiGi.Geometry.Spatial.Interfaces.IBoundable3D, DiGi.Geometry.Spatial.Interfaces.IGeometry3D, DiGi.Geometry.Spatial.Interfaces.IMovable3D, DiGi.Geometry.Core.Interfaces.IBoundable, DiGi.Geometry.Spatial.Interfaces.IPlanar, DiGi.Geometry.Core.Interfaces.IFace<DiGi.Geometry.Spatial.Interfaces.IPolygonal3D>, DiGi.Geometry.Spatial.Interfaces.IPlanar<IPolygonalFace2D>, DiGi.Geometry.Spatial.Interfaces.IInvertible3D, DiGi.Geometry.Core.Interfaces.IInvertible, DiGi.Geometry.Spatial.Interfaces.IFlippable

Constructors

PolygonalFace3D(Plane, IPolygonalFace2D) Constructor

Initializes a new instance of the PolygonalFace3D class.

public PolygonalFace3D(DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Planar.Interfaces.IPolygonalFace2D? polygonalFace2D);

Parameters

plane Plane

The Plane that defines the surface of the polygonal face.

polygonalFace2D IPolygonalFace2D

The IPolygonalFace2D representation of the polygonal face in 2D space.

PolygonalFace3D(Plane, IPolygonalFace2D, bool) Constructor

Initializes a new instance of the PolygonalFace3D class from a prebuilt plane and 2D face.

internal PolygonalFace3D(DiGi.Geometry.Spatial.Classes.Plane? plane, DiGi.Geometry.Planar.Interfaces.IPolygonalFace2D? polygonalFace2D, bool clone);

Parameters

plane Plane

The Plane that defines the surface of the polygonal face.

polygonalFace2D IPolygonalFace2D

The IPolygonalFace2D representation of the polygonal face in 2D space.

clone System.Boolean

When true, the inputs are defensively cloned; when false, the supplied instances are adopted directly without cloning. Use false only when the caller owns freshly created instances that are not shared.

PolygonalFace3D(PolygonalFace3D) Constructor

Initializes a new instance of the PolygonalFace3D class using the values from another PolygonalFace3D instance.

public PolygonalFace3D(DiGi.Geometry.Spatial.Classes.PolygonalFace3D? polygonalFace3D);

Parameters

polygonalFace3D PolygonalFace3D

The PolygonalFace3D instance to copy from.

PolygonalFace3D(IPolygonal3D) Constructor

Initializes a new instance of the PolygonalFace3D class using the specified external edge.

public PolygonalFace3D(DiGi.Geometry.Spatial.Interfaces.IPolygonal3D? externalEdge);

Parameters

externalEdge DiGi.Geometry.Spatial.Interfaces.IPolygonal3D

The DiGi.Geometry.Spatial.Interfaces.IPolygonal3D object representing the external edge used to initialize the face. This value can be null.

PolygonalFace3D(JsonObject) Constructor

Initializes a new instance of the PolygonalFace3D class using the specified System.Text.Json.Nodes.JsonObject.

public PolygonalFace3D(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The System.Text.Json.Nodes.JsonObject containing the data to initialize the PolygonalFace3D instance.

Properties

PolygonalFace3D.Edges Property

Gets a list of all polygonal 3D edges, combining the external edge and any internal edges.

public System.Collections.Generic.List<DiGi.Geometry.Spatial.Interfaces.IPolygonal3D>? Edges { get; }

Implements Edges

Property Value

System.Collections.Generic.List<DiGi.Geometry.Spatial.Interfaces.IPolygonal3D>
A System.Collections.Generic.List<> containing both the external and internal edges, or null if no external edge exists.

PolygonalFace3D.ExternalEdge Property

Gets the external edge of the geometry as an IPolygonal3D object.

public DiGi.Geometry.Spatial.Interfaces.IPolygonal3D? ExternalEdge { get; }

Implements ExternalEdge

Property Value

DiGi.Geometry.Spatial.Interfaces.IPolygonal3D
The IPolygonal3D representation of the external edge, or null if the plane or underlying 2D geometry is not available.

PolygonalFace3D.InternalEdges Property

Gets the list of internal edges as DiGi.Geometry.Spatial.Interfaces.IPolygonal3D. Returns null if the plane, geometry 2D, or the source internal edges are not available.

public System.Collections.Generic.List<DiGi.Geometry.Spatial.Interfaces.IPolygonal3D>? InternalEdges { get; }

Implements InternalEdges

Property Value

System.Collections.Generic.List<DiGi.Geometry.Spatial.Interfaces.IPolygonal3D>
A System.Collections.Generic.List<> containing the converted internal edges, or null.

Methods

PolygonalFace3D.Clone() Method

Creates a copy of the current object.

public override DiGi.Core.Interfaces.ISerializableObject? Clone();

Implements Clone()

Returns

DiGi.Core.Interfaces.ISerializableObject
A new DiGi.Core.Interfaces.ISerializableObject that is a clone of the current instance, or null.

PolygonalFace3D.ClosestPoint(Point3D) Method

Calculates the closest point on the geometry to the specified Point3D.

public DiGi.Geometry.Spatial.Classes.Point3D? ClosestPoint(DiGi.Geometry.Spatial.Classes.Point3D? point3D);

Parameters

point3D Point3D

The Point3D for which the closest point is calculated.

Implements ClosestPoint(Point3D)

Returns

Point3D
The closest Point3D on the geometry, or null if the input point, plane, or geometry is null.

PolygonalFace3D.GetArea() Method

Calculates the area of the 2D geometry.

public double GetArea();

Implements GetArea()

Returns

System.Double
A System.Double representing the area, or System.Double.NaN if the underlying 2D geometry is null.

PolygonalFace3D.GetBoundingBox() Method

Gets the bounding box of the object.

public DiGi.Geometry.Spatial.Classes.BoundingBox3D? GetBoundingBox();

Implements GetBoundingBox()

Returns

BoundingBox3D
A BoundingBox3D representing the bounding box, or null if it cannot be determined.

PolygonalFace3D.GetInternalPoint(double) Method

Gets an internal point of the geometry within the specified tolerance.

public DiGi.Geometry.Spatial.Classes.Point3D? GetInternalPoint(double tolerance=1E-06);

Parameters

tolerance System.Double

The double value representing the distance tolerance used for calculations.

Implements GetInternalPoint(double)

Returns

Point3D
A Point3D object if an internal point is found; otherwise, null.

PolygonalFace3D.InRange(Point3D, double) Method

Determines whether the specified Point3D? is within the range of the geometry based on the provided System.Double tolerance.

public bool InRange(DiGi.Geometry.Spatial.Classes.Point3D? point3D, double tolerance=1E-06);

Parameters

point3D Point3D

The Point3D? to evaluate.

tolerance System.Double

The System.Double distance tolerance used for the range check.

Implements InRange(Point3D, double)

Returns

System.Boolean
A System.Boolean value indicating whether the point is within range; returns false if the point, plane, or geometry is null.

PolygonalFace3D.Inside(Point3D, double) Method

Determines whether the specified Point3D is located inside the geometry on the plane within a given tolerance.

public bool Inside(DiGi.Geometry.Spatial.Classes.Point3D? point3D, double tolerance=1E-06);

Parameters

point3D Point3D

The nullable Point3D to evaluate.

tolerance System.Double

The System.Double distance tolerance used for the proximity check.

Implements Inside(Point3D, double)

Returns

System.Boolean
A System.Boolean value indicating true if the point is within the geometry; otherwise, false.

PolygonalFace3D.Inverse() Method

Inverts the underlying 2D geometry.

public bool Inverse();

Implements Inverse()

Returns

System.Boolean
A System.Boolean value indicating whether the inversion was successful.

PolygonalFace3D.OnEdge(Point3D, double) Method

Determines whether the specified 3D point lies on the edge of the geometry within a given tolerance.

public bool OnEdge(DiGi.Geometry.Spatial.Classes.Point3D? point3D, double tolerance=1E-06);

Parameters

point3D Point3D

The nullable Point3D to evaluate.

tolerance System.Double

The System.Double distance tolerance used for the calculation.

Implements OnEdge(Point3D, double)

Returns

System.Boolean
A System.Boolean value indicating true if the point is on the edge; otherwise, false.

PolygonalFace3D.Orient(Nullable<Orientation>, Nullable<Orientation>) Method

Orients the external and internal edges of the geometry based on the specified orientations.

public bool Orient(System.Nullable<DiGi.Geometry.Core.Enums.Orientation> externalEdgeOrientation, System.Nullable<DiGi.Geometry.Core.Enums.Orientation> internalEdgeOrientation);

Parameters

externalEdgeOrientation System.Nullable<Orientation>

The optional Orientation to apply to the external edge.

internalEdgeOrientation System.Nullable<Orientation>

The optional Orientation to apply to the internal edge.

Implements Orient(Nullable<Orientation>, Nullable<Orientation>)

Returns

System.Boolean
A System.Boolean value indicating whether the orientation process was successful.

PolygonalFace3D.Triangulate(double) Method

Triangulates the geometry into a list of Triangle3D objects based on the specified tolerance.

public System.Collections.Generic.List<DiGi.Geometry.Spatial.Classes.Triangle3D>? Triangulate(double tolerance=1E-09);

Parameters

tolerance System.Double

The System.Double tolerance value used during the triangulation process.

Implements Triangulate(double)

Returns

System.Collections.Generic.List<Triangle3D>
A List<Triangle3D> containing the resulting 3D triangles, or null if the plane or underlying 2D geometry is not available.

PolygonalFace3DInternalPointSolver Class

Provides a solver to find an internal point within a 3D polygonal face by utilizing a 2D planar projection.

public class PolygonalFace3DInternalPointSolver : DiGi.Geometry.Core.Interfaces.IInternalPointSolver<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D, DiGi.Geometry.Spatial.Classes.Point3D>, DiGi.Geometry.Core.Interfaces.IGeometrySolver, DiGi.Core.Interfaces.ISolver, DiGi.Core.Interfaces.IEvaluator, DiGi.Geometry.Core.Interfaces.IOneToManyGeometrySolver<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D, DiGi.Geometry.Spatial.Classes.Point3D>, DiGi.Core.Interfaces.IOneToManySolver<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D, DiGi.Geometry.Spatial.Classes.Point3D>

Inheritance System.Object → PolygonalFace3DInternalPointSolver

Implements DiGi.Geometry.Core.Interfaces.IInternalPointSolver<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D,Point3D>, DiGi.Geometry.Core.Interfaces.IGeometrySolver, DiGi.Core.Interfaces.ISolver, DiGi.Core.Interfaces.IEvaluator, DiGi.Geometry.Core.Interfaces.IOneToManyGeometrySolver<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D,Point3D>, DiGi.Core.Interfaces.IOneToManySolver<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D,Point3D>

Constructors

PolygonalFace3DInternalPointSolver(double) Constructor

Initializes a new instance of the PolygonalFace3DInternalPointSolver class.

public PolygonalFace3DInternalPointSolver(double tolerance=1E-06);

Parameters

tolerance System.Double

The System.Double tolerance value used for internal point calculations.

PolygonalFace3DInternalPointSolver(int, double) Constructor

Initializes a new instance of the PolygonalFace3DInternalPointSolver class.

public PolygonalFace3DInternalPointSolver(int maxCount, double tolerance=1E-06);

Parameters

maxCount System.Int32

The maximum number of internal points to be calculated as an System.Int32.

tolerance System.Double

The distance tolerance used for calculations as a System.Double.

Properties

PolygonalFace3DInternalPointSolver.Input Property

Gets or sets the DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D input for the polygonal face internal point solver.

public DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D? Input { set; }

Implements Input

Property Value

DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D

PolygonalFace3DInternalPointSolver.MaxCount Property

Gets or sets the maximum count for the polygonal face 2D internal point solver.

public int MaxCount { get; set; }

Implements MaxCount

Property Value

System.Int32
An System.Int32 representing the maximum count.

PolygonalFace3DInternalPointSolver.Ouput Property

Gets the calculated internal point as a Point3D.

public DiGi.Geometry.Spatial.Classes.Point3D? Ouput { get; }

Property Value

Point3D
The converted Point3D result from the internal point solver, or null if no output is available.

PolygonalFace3DInternalPointSolver.Outputs Property

Gets the list of Point3D outputs generated by the internal point solver, converted to the plane coordinates and filtered for null values.

public System.Collections.Generic.List<DiGi.Geometry.Spatial.Classes.Point3D>? Outputs { get; }

Implements Outputs

Property Value

System.Collections.Generic.List<Point3D>

Methods

PolygonalFace3DInternalPointSolver.Solve() Method

Solves for the internal point of the polygonal face 2D.

public bool Solve();

Implements Solve()

Returns

System.Boolean
A System.Boolean value indicating whether the operation was successful.

PolygonalFace3DNormalizationUpdater Class

Provides functionality to update and normalize the orientation of a 3D polygonal face.

public class PolygonalFace3DNormalizationUpdater : DiGi.Geometry.Core.Classes.GeometryUpdater<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>, DiGi.Geometry.Core.Interfaces.INormalizationUpdater<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>, DiGi.Geometry.Core.Interfaces.IGeometryUpdater<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>, DiGi.Geometry.Core.Interfaces.IGeometryUpdater, DiGi.Core.Interfaces.IUpdater, DiGi.Core.Interfaces.IEvaluator, DiGi.Core.Interfaces.IUpdater<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>

Inheritance System.ObjectDiGi.Geometry.Core.Classes.GeometryUpdater<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D> → PolygonalFace3DNormalizationUpdater

Implements DiGi.Geometry.Core.Interfaces.INormalizationUpdater<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>, DiGi.Geometry.Core.Interfaces.IGeometryUpdater<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>, DiGi.Geometry.Core.Interfaces.IGeometryUpdater, DiGi.Core.Interfaces.IUpdater, DiGi.Core.Interfaces.IEvaluator, DiGi.Core.Interfaces.IUpdater<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>

Constructors

PolygonalFace3DNormalizationUpdater(Orientation) Constructor

Initializes a new instance of the PolygonalFace3DNormalizationUpdater class using the specified Orientation for both internal and external edges.

public PolygonalFace3DNormalizationUpdater(DiGi.Geometry.Core.Enums.Orientation orientation);

Parameters

orientation Orientation

The Orientation to be applied to both internal and external edge orientations.

PolygonalFace3DNormalizationUpdater(Nullable<Orientation>, Nullable<Orientation>) Constructor

Initializes a new instance of the PolygonalFace3DNormalizationUpdater class with the specified orientation requirements for external and internal edges.

public PolygonalFace3DNormalizationUpdater(System.Nullable<DiGi.Geometry.Core.Enums.Orientation> externalEdgeOrientation, System.Nullable<DiGi.Geometry.Core.Enums.Orientation> internalEdgeOrientation);

Parameters

externalEdgeOrientation System.Nullable<Orientation>

The required Orientation for external edges, or null if no specific orientation is required.

internalEdgeOrientation System.Nullable<Orientation>

The required Orientation for internal edges, or null if no specific orientation is required.

Methods

PolygonalFace3DNormalizationUpdater.Normalized() Method

Determines whether the value is normalized based on the external and internal edge orientations.

public bool Normalized();

Implements Normalized()

Returns

System.Boolean
A System.Boolean value indicating whether the value is normalized.

PolygonalFace3DNormalizationUpdater.Update() Method

Updates the orientation of the value using the external and internal edge orientations.

public override bool Update();

Implements Update()

Returns

System.Boolean
A System.Boolean indicating whether the update was successfully performed.

PolygonalFaceExtrusion Class

Represents the extrusion of a polygonal face in three-dimensional space.

public class PolygonalFaceExtrusion : DiGi.Geometry.Spatial.Classes.Extrusion<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectGeometry3DDiGi.Geometry.Spatial.Classes.Extrusion<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D> → PolygonalFaceExtrusion

Constructors

PolygonalFaceExtrusion(PolygonalFaceExtrusion) Constructor

Initializes a new instance of the PolygonalFaceExtrusion class using an existing PolygonalFaceExtrusion object.

public PolygonalFaceExtrusion(DiGi.Geometry.Spatial.Classes.PolygonalFaceExtrusion? polygonalFaceExtrusion);

Parameters

polygonalFaceExtrusion PolygonalFaceExtrusion

The PolygonalFaceExtrusion object to copy from.

PolygonalFaceExtrusion(IPolygonalFace3D, Vector3D) Constructor

Initializes a new instance of the PolygonalFaceExtrusion class.

public PolygonalFaceExtrusion(DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D? surface, DiGi.Geometry.Spatial.Classes.Vector3D? vector);

Parameters

surface DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D

The DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D surface to be extruded.

vector Vector3D

The Vector3D vector defining the extrusion direction and distance.

PolygonalFaceExtrusion(JsonObject) Constructor

Initializes a new instance of the PolygonalFaceExtrusion class using the specified System.Text.Json.Nodes.JsonObject.

public PolygonalFaceExtrusion(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The System.Text.Json.Nodes.JsonObject used to initialize the extrusion.

Polyhedron Class

Represents a polyhedron composed of polygonal faces.

public class Polyhedron : DiGi.Geometry.Spatial.Classes.Polyhedron<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectGeometry3DDiGi.Geometry.Spatial.Classes.Polyhedron<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D> → Polyhedron

Constructors

Polyhedron(Polyhedron) Constructor

Initializes a new instance of the Polyhedron class by copying an existing Polyhedron object.

public Polyhedron(DiGi.Geometry.Spatial.Classes.Polyhedron? polyhedron);

Parameters

polyhedron Polyhedron

The Polyhedron object to copy from.

Polyhedron(List<IPolygonalFace3D>, bool) Constructor

Initializes a new instance of the Polyhedron class from a prebuilt list of polygonal faces.

internal Polyhedron(System.Collections.Generic.List<DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D>? polygonalFaces, bool clone);

Parameters

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

The System.Collections.Generic.List<> containing the polygonal faces of the polyhedron.

clone System.Boolean

When true, the faces are defensively cloned; when false, the supplied list is adopted directly without cloning. Use false only when the caller owns freshly created faces that are not shared.

Polyhedron(JsonObject) Constructor

Initializes a new instance of the Polyhedron class using the provided System.Text.Json.Nodes.JsonObject.

public Polyhedron(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The System.Text.Json.Nodes.JsonObject used to initialize the polyhedron.

Methods

Polyhedron.Clone() Method

Creates a clone of the current instance.

public override DiGi.Core.Interfaces.ISerializableObject? Clone();

Implements Clone()

Returns

DiGi.Core.Interfaces.ISerializableObject
A new DiGi.Core.Interfaces.ISerializableObject that is a copy of the current instance, or null.

Polyhedron<TPolygonalFace3D> Class

Represents an abstract base class for a 3D polyhedron consisting of polygonal faces.

public abstract class Polyhedron<TPolygonalFace3D> : DiGi.Geometry.Spatial.Classes.Geometry3D, DiGi.Geometry.Spatial.Interfaces.IPolyhedron, DiGi.Geometry.Spatial.Interfaces.IGeometry3D, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Spatial.Interfaces.IMovable3D, DiGi.Geometry.Spatial.Interfaces.IBoundable3D, DiGi.Geometry.Core.Interfaces.IBoundable, DiGi.Geometry.Spatial.Interfaces.IInvertible3D, DiGi.Geometry.Core.Interfaces.IInvertible
    where TPolygonalFace3D : DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D

Type parameters

TPolygonalFace3D

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

Inheritance System.ObjectDiGi.Core.Classes.ObjectDiGi.Core.Classes.SerializableObjectGeometry3D → Polyhedron<TPolygonalFace3D>

Derived
Polyhedron

Implements DiGi.Geometry.Spatial.Interfaces.IPolyhedron, DiGi.Geometry.Spatial.Interfaces.IGeometry3D, DiGi.Geometry.Core.Interfaces.IGeometry, DiGi.Core.Interfaces.ISerializableObject, DiGi.Core.Interfaces.ICloneableObject<DiGi.Core.Interfaces.ISerializableObject>, DiGi.Core.Interfaces.ICloneableObject, DiGi.Core.Interfaces.IObject, DiGi.Geometry.Spatial.Interfaces.IMovable3D, DiGi.Geometry.Spatial.Interfaces.IBoundable3D, DiGi.Geometry.Core.Interfaces.IBoundable, DiGi.Geometry.Spatial.Interfaces.IInvertible3D, DiGi.Geometry.Core.Interfaces.IInvertible

Constructors

Polyhedron(Polyhedron<TPolygonalFace3D>) Constructor

Initializes a new instance of the Polyhedron class using an existing Polyhedron<TPolygonalFace3D> instance.

public Polyhedron(DiGi.Geometry.Spatial.Classes.Polyhedron<TPolygonalFace3D>? polyhedron);

Parameters

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

The Polyhedron<TPolygonalFace3D> instance to copy from.

Polyhedron(List<TPolygonalFace3D>, bool) Constructor

Initializes a new instance of the Polyhedron<TPolygonalFace3D> class from a prebuilt list of polygonal faces.

protected Polyhedron(System.Collections.Generic.List<TPolygonalFace3D>? polygonalFaces, bool clone);

Parameters

polygonalFaces System.Collections.Generic.List<TPolygonalFace3D>

The System.Collections.Generic.List<> containing the polygonal faces of the polyhedron.

clone System.Boolean

When true, the faces are defensively cloned; when false, the supplied list is adopted directly without cloning. Use false only when the caller owns freshly created faces that are not shared.

Polyhedron(JsonObject) Constructor

Initializes a new instance of the Polyhedron class using the provided System.Text.Json.Nodes.JsonObject.

public Polyhedron(System.Text.Json.Nodes.JsonObject? jsonObject);

Parameters

jsonObject System.Text.Json.Nodes.JsonObject

The System.Text.Json.Nodes.JsonObject used to initialize the polyhedron. This value can be null.

Properties

Polyhedron<TPolygonalFace3D>.Count Property

Gets the total number of polygonal faces.

public int Count { get; }

Implements Count

Property Value

System.Int32
An System.Int32 representing the count of polygonal faces.

Polyhedron<TPolygonalFace3D>.PolygonalFaces Property

Gets the list of TPolygonalFace3D objects representing the polygonal faces.

public System.Collections.Generic.List<TPolygonalFace3D>? PolygonalFaces { get; }

Property Value

System.Collections.Generic.List<TPolygonalFace3D>
A System.Collections.Generic.List<> containing the cloned polygonal faces, or null if no faces are defined.

Polyhedron<TPolygonalFace3D>.this[int] Property

Gets the polygonal face at the specified index.

public TPolygonalFace3D? this[int i] { get; }

Parameters

i System.Int32

The zero-based index of the polygonal face to retrieve.

Property Value

TPolygonalFace3D

Methods

Polyhedron<TPolygonalFace3D>.GetBoundingBox() Method

Calculates the bounding box that encompasses all polygonal faces of the object.

public DiGi.Geometry.Spatial.Classes.BoundingBox3D? GetBoundingBox();

Implements GetBoundingBox()

Returns

BoundingBox3D
A BoundingBox3D representing the total bounding area, or null if there are no polygonal faces.

Polyhedron<TPolygonalFace3D>.GetInternalPoint(double) Method

Calculates and returns a point located inside the polyhedron.

public DiGi.Geometry.Spatial.Classes.Point3D? GetInternalPoint(double tolerance=1E-06);

Parameters

tolerance System.Double

The System.Double tolerance value used to determine if a point is internal.

Returns

Point3D
A Point3D representing an internal point if one is found; otherwise, null.

Polyhedron<TPolygonalFace3D>.GetNormal(int, bool, Nullable<Side>, double) Method

Gets the normal vector of a polygonal face at the specified index.

public DiGi.Geometry.Spatial.Classes.Vector3D? GetNormal(int index, out bool inversed, System.Nullable<DiGi.Geometry.Core.Enums.Side> side=null, double tolerance=1E-06);

Parameters

index System.Int32

The zero-based index of the polygonal face.

inversed System.Boolean

When called, contains a System.Boolean value indicating whether the resulting normal is inversed.

side System.Nullable<Side>

An optional Side specifying the side to consider for the normal calculation.

tolerance System.Double

A System.Double representing the distance tolerance used during calculations.

Implements GetNormal(int, bool, Nullable<Side>, double)

Returns

Vector3D
A Vector3D? containing the normal vector if successful; otherwise, null.

Polyhedron<TPolygonalFace3D>.GetNormal(int, Nullable<Side>, double) Method

Gets the normal vector of the polygonal face at the specified index.

public DiGi.Geometry.Spatial.Classes.Vector3D? GetNormal(int index, System.Nullable<DiGi.Geometry.Core.Enums.Side> side=null, double tolerance=1E-06);

Parameters

index System.Int32

The zero-based index of the polygonal face.

side System.Nullable<Side>

An optional Side specifying which side of the face to use for the normal calculation.

tolerance System.Double

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

Returns

Vector3D
A Vector3D representing the normal vector if successful; otherwise, null.

Polyhedron<TPolygonalFace3D>.GetPolygonalFace3D<UPolygonalFace3D>(int) Method

Retrieves the polygonal face at the specified index, cast to the requested type.

public UPolygonalFace3D? GetPolygonalFace3D<UPolygonalFace3D>(int index)
    where UPolygonalFace3D : DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D;

Type parameters

UPolygonalFace3D

The specific type of DiGi.Geometry.Spatial.Interfaces.IPolygonalFace3D to retrieve.

Parameters

index System.Int32

The zero-based integer index of the polygonal face in the collection.

Implements GetPolygonalFace3D<TPolygonalFace3D>(int)

Returns

UPolygonalFace3D
An instance of <typeparam ref="UPolygonalFace3D" /> if the element at the specified index exists and is of the requested type; otherwise, null.

Polyhedron<TPolygonalFace3D>.InRange(Point3D, double) Method

Determines whether the specified Point3D is within the given tolerance range.

public bool InRange(DiGi.Geometry.Spatial.Classes.Point3D? point3D, double tolerance=1E-06);

Parameters

point3D Point3D

The nullable Point3D to evaluate.

tolerance System.Double

The System.Double value representing the distance tolerance.

Returns

System.Boolean
A System.Boolean value indicating true if the point is within range; otherwise, false.

Polyhedron<TPolygonalFace3D>.Inside(Point3D, double) Method

Determines whether the specified Point3D is located inside the object, excluding points that are on the boundary.

public bool Inside(DiGi.Geometry.Spatial.Classes.Point3D? point3D, double tolerance=1E-06);

Parameters

point3D Point3D

The Point3D to check for containment.

tolerance System.Double

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

Implements Inside(Point3D, double)

Returns

System.Boolean
A System.Boolean value indicating true if the point is inside; otherwise, false.

Polyhedron<TPolygonalFace3D>.Inverse() Method

Inverts the orientation of all polygonal faces associated with this object.

public bool Inverse();

Implements Inverse()

Returns

System.Boolean
A System.Boolean value indicating whether at least one polygonal face was successfully inversed; otherwise, false.

Polyhedron<TPolygonalFace3D>.Move(Vector3D) Method

Moves the object by the specified Vector3D vector.

public override bool Move(DiGi.Geometry.Spatial.Classes.Vector3D? vector3D);

Parameters

vector3D Vector3D

The Vector3D? vector to translate the polygonal faces by.

Implements Move(Vector3D)

Returns

System.Boolean
A bool indicating whether the move operation was successful.

Polyhedron<TPolygonalFace3D>.Normalized(int, Nullable<Orientation>, Nullable<Orientation>, double) Method

Determines whether the polygonal face at the specified index is normalized based on the provided external and internal edge orientations and a distance tolerance.

public bool Normalized(int index, System.Nullable<DiGi.Geometry.Core.Enums.Orientation> externalEdgeOrientation, System.Nullable<DiGi.Geometry.Core.Enums.Orientation> internalEdgeOrientation, double tolerance=1E-06);

Parameters

index System.Int32

The System.Int32 index of the polygonal face to evaluate.

externalEdgeOrientation System.Nullable<Orientation>

The optional Orientation for external edges.

internalEdgeOrientation System.Nullable<Orientation>

The optional Orientation for internal edges.

tolerance System.Double

The System.Double tolerance value used to determine normalization.

Implements Normalized(int, Nullable<Orientation>, Nullable<Orientation>, double)

Returns

System.Boolean
A System.Boolean value indicating whether the face is normalized; returns false if the polygonal faces collection is null.

Polyhedron<TPolygonalFace3D>.On(Point3D, double) Method

Determines whether the specified Point3D is located on any of the polygonal faces within a given tolerance.

public bool On(DiGi.Geometry.Spatial.Classes.Point3D? point3D, double tolerance=1E-06);

Parameters

point3D Point3D

The Point3D to evaluate\

Clone this wiki locally