Show / Hide Table of Contents

Struct Triangle3d

Struct to handle a 3D triangle

Namespace: FpAssistantCore.General
Assembly: FpAssistantCoreScl.dll
Syntax
public struct Triangle3d

Constructors

View Source

Triangle3d(Point2d, Point2d, Point2d)

Create a 3D triangle from 3 coordinates in the form of Point2d

Declaration
public Triangle3d(Point2d point1, Point2d point2, Point2d point3)
Parameters
Type Name Description
Point2d point1

Value of the first point of the triangle

Point2d point2

Value of the second point of the triangle

Point2d point3

Value of the third point of the triangle

Remarks

Z component will be assigned to 0

View Source

Triangle3d(Point3d, Point3d, Point3d)

Create a 3D triangle from 3 coordinates in the form of Point3d

Declaration
public Triangle3d(Point3d point1, Point3d point2, Point3d point3)
Parameters
Type Name Description
Point3d point1

Value of the first point of the triangle

Point3d point2

Value of the second point of the triangle

Point3d point3

Value of the third point of the triangle

Properties

View Source

Normal

Gets the normal of the triangle

Declaration
public readonly Vector3d Normal { get; }
Property Value
Type Description
Vector3d

Vector of Normal of the triangle

View Source

Point1

Property to access the first point of the triangle

Declaration
public Point3d Point1 { get; set; }
Property Value
Type Description
Point3d

FPAssistant Point3d

View Source

Point2

Property to access the second point of the triangle

Declaration
public Point3d Point2 { get; set; }
Property Value
Type Description
Point3d

FPAssistant Point3d

View Source

Point3

Property to access the third point of the triangle

Declaration
public Point3d Point3 { get; set; }
Property Value
Type Description
Point3d

FPAssistant Point3d

View Source

Xmax

Gets X coordinate of the highest point

Declaration
public readonly double Xmax { get; }
Property Value
Type Description
System.Double

Highest X value in the triangle

View Source

Xmin

Gets X coordinate of the lowest point

Declaration
public readonly double Xmin { get; }
Property Value
Type Description
System.Double

Lowest X value in the triangle

View Source

Ymax

Gets Y coord inateof the highest point

Declaration
public readonly double Ymax { get; }
Property Value
Type Description
System.Double

Highest Y value in the triangle

View Source

Ymin

Gets Y coordinate of the lowest point

Declaration
public readonly double Ymin { get; }
Property Value
Type Description
System.Double

Lowest Y value in the triangle

View Source

Zmax

Gets Z coordinate of the highest point

Declaration
public readonly double Zmax { get; }
Property Value
Type Description
System.Double

Highest Z value in the triangle

View Source

Zmin

Gets Z coordinate of the lowest point

Declaration
public readonly double Zmin { get; }
Property Value
Type Description
System.Double

Lowest Z value in the triangle

Methods

View Source

GetPlaneABC()

Return the plane coefficient [A,B,C] as in z = Ax + By + C

Declaration
public double[] GetPlaneABC()
Returns
Type Description
System.Double[]
View Source

IsInsideOn2D(Point2d)

Check whether point P(x, y) lies inside the triangle formed by A(x1, y1), B(x2, y2) and C(x3, y3) in X-Y plan

Declaration
public bool IsInsideOn2D(Point2d point)
Parameters
Type Name Description
Point2d point

Point defined as a Point2d

Returns
Type Description
System.Boolean

True of false depending if point lies inside the triangle

  • View Source
In This Article
Back to top Copyright 2018-2024 CADology Limited