Triangle3d

References
[StructLayout(LayoutKind.Sequential, Pack = 1, Size = 72)] public struct Triangle3d
Represents a triangle, modeled using double three points that use double-precision floating point numbers.

Constructors

Triangle3d

#Since v7.1
Instantiates a new triangle.
public Triangle3d(
a,
First point.
b,
Second point.
c
Third point.
)

Properties

A

#Since v7.1
Gets the first triangle corner.
public Point3d A { get; }

AB

#Since v7.1
Gets the triangle edge connecting the A and B corners.
public Line AB { get; }

AltitudeA

#Since v7.1
Gets the altitude line starting at corner A.
public Line AltitudeA { get; }

AltitudeB

#Since v7.1
Gets the altitude line starting at corner B.
public Line AltitudeB { get; }

AltitudeC

#Since v7.1
Gets the altitude line starting at corner C.
public Line AltitudeC { get; }

AngleA

#Since v7.1
Gets the angle at the A corner.
public double AngleA { get; }

AngleB

#Since v7.1
Gets the angle at the B corner.
public double AngleB { get; }

AngleC

#Since v7.1
Gets the angle at the C corner.
public double AngleC { get; }

Area

#Since v7.1
Gets the area inside this triangle.
public double Area { get; }

AreaCenter

#Since v7.1
Gets the triangle area centroid.
public Point3d AreaCenter { get; }

B

#Since v7.1
Gets the second triangle corner.
public Point3d B { get; }

BC

#Since v7.1
Gets the triangle edge connecting the B and C corners.
public Line BC { get; }

BoundingBox

#Since v7.1
Gets the bounding box of this triangle.
public BoundingBox BoundingBox { get; }

C

#Since v7.1
Gets the third triangle corner.
public Point3d C { get; }

CA

#Since v7.1
Gets the triangle edge connecting the C and A corners.
public Line CA { get; }

Circumcenter

#Since v7.1
Gets the triangle circumcenter.
public Point3d Circumcenter { get; }

Circumcircle

#Since v7.1
Gets the circumcircle of this triangle.
public Circle Circumcircle { get; }

MedianA

#Since v7.1
Gets the median line starting at corner A.
public Line MedianA { get; }

MedianB

#Since v7.1
Gets the median line starting at corner B.
public Line MedianB { get; }

MedianC

#Since v7.1
Gets the median line starting at corner C.
public Line MedianC { get; }

Orthocenter

#Since v7.1
Gets the triangle orthocenter.
public Point3d Orthocenter { get; }

Perimeter

#Since v7.1
Gets the perimeter of this triangle. This is the sum of the lengths of all edges.
public double Perimeter { get; }

PerpendicularAB

#Since v7.1
Gets the perpendicular bisector for edge AB.
public Line PerpendicularAB { get; }

PerpendicularBC

#Since v7.1
Gets the perpendicular bisector for edge BC.
public Line PerpendicularBC { get; }

PerpendicularCA

#Since v7.1
Gets the perpendicular bisector for edge CA.
public Line PerpendicularCA { get; }

Methods

BarycentricCoordsAt

#Since v7.1
Gets the projection of a point onto the barycentric coordinates.
public Point2d BarycentricCoordsAt(
point,
Point to project.
out double
signedHeight
A value indicating the height of the intersection in world units, negative if the point is situated under the triangle.
)
The computed barycentric mass values relating to B and C for point.

ClosestParameterOnBoundary

#Since v7.1
Gets the parameter on the triangle boundary closest to a test point.
public double ClosestParameterOnBoundary(
point
)

ClosestPointOnBoundary

#Since v7.1
Gets the point on the triangle boundary closest to a test point.
public Point3d ClosestPointOnBoundary(
point
)

PointAlongBoundary

#Since v7.1
Gets the point along the boundary of the triangle. The triangle boundary has a domain [0, 3] where each subsequent unit domain maps to a different edge.
public Point3d PointAlongBoundary(
t
Parameter along boundary.
)

PointAtBarycentricCoords

#Since v7.1
Gets a point within this triangle using barycentric coordinates.
public Point3d PointAtBarycentricCoords(
coords
Barycentric mass for vertex B and C. A is valued as (1 - B - C).
)
Point at barycentric mass.

PointOnInterior

#Since v7.1
Gets the point on the triangle using the AB and AC primary axes.
public Point3d PointOnInterior(
u,
Parameter along the AB edge.
v
Parameter along the AC edge.
)
Point at parameter.

ToMesh

#Since v7.1
Create a mesh from this triangle.
public Mesh ToMesh()

ToPolyline

#Since v7.1
Create a polyline from this triangle.
public Polyline ToPolyline()

Transform

#Since v7.1
Transform this triangle.
public Triangle3d Transform(
Transform
transform
)

TrySmallestEnclosingTriangle

#Since v8.4
Attempt to create the smallest triangle containing a set of planar points.
public static bool TrySmallestEnclosingTriangle(
points,
The points to enclose.
tolerance,
The tolerance to use
triangle
The resulting triangle on success.
)
true on success, false on failure.

WithA

#Since v7.1
Replace the A corner.
public Triangle3d WithA()

WithB

#Since v7.1
Replace the B corner.
public Triangle3d WithB()

WithC

#Since v7.1
Replace the C corner.
public Triangle3d WithC()