Struct Facet
Handling of facet consisting of 3 or 4 points declared as cartesian points
Namespace: FpAssistantCore.General
Assembly: FpAssistantCoreScl.dll
Syntax
public struct Facet
Constructors
View SourceFacet(Point3d, Point3d, Point3d)
Constructor to initalise with a 3 vertices for a triangle based facet
Declaration
public Facet(Point3d vertex1, Point3d vertex2, Point3d vertex3)
Parameters
Type | Name | Description |
---|---|---|
Point3d | vertex1 | Vertex point 1 |
Point3d | vertex2 | Vertex point 2 |
Point3d | vertex3 | Vertex point 3 |
Facet(Point3d, Point3d, Point3d, Point3d)
Constructor to initalise with a 4 vertices for a planar or non-planar based facet
Declaration
public Facet(Point3d vertex1, Point3d vertex2, Point3d vertex3, Point3d vertex4)
Parameters
Type | Name | Description |
---|---|---|
Point3d | vertex1 | Vertex point 1 |
Point3d | vertex2 | Vertex point 2 |
Point3d | vertex3 | Vertex point 3 |
Point3d | vertex4 | Vertex point 4 |
Properties
View SourceDescription
A description relating the facet, not always used but will be presented in reports
Declaration
public string Description { get; set; }
Property Value
Type | Description |
---|---|
System.String |
FacetType
The type of facet based on the vertices
Declaration
public FacetType FacetType { get; }
Property Value
Type | Description |
---|---|
FacetType | Type of facet |
Vertex1
Contains the first vertex in the facet definition
Declaration
public Point3d Vertex1 { get; }
Property Value
Type | Description |
---|---|
Point3d | X, Y and Z cartesian coordinate values |
Vertex2
Contains the second vertex in the facet definition
Declaration
public Point3d Vertex2 { get; }
Property Value
Type | Description |
---|---|
Point3d | X, Y and Z cartesian coordinate values |
Vertex3
Contains the third vertex in the facet definition
Declaration
public Point3d Vertex3 { get; }
Property Value
Type | Description |
---|---|
Point3d | X, Y and Z cartesian coordinate values |
Vertex4
Contains the fourth vertex in the facet definition
Declaration
public Point3d Vertex4 { get; }
Property Value
Type | Description |
---|---|
Point3d | X, Y and Z cartesian coordinate values |
Remarks
This might have the same value as the third vertex if a triangular or if the FacetType is set to triangle then this property should be ignored
Methods
View SourceAsTriangles2d()
Convert facet to triangles (2D)
Declaration
public Triangle2d[] AsTriangles2d()
Returns
Type | Description |
---|---|
Triangle2d[] |
Remarks
There will be 1 triangle for a 3 point facet otherwise 2 triangles will be returned
AsTriangles3d()
Convert facet to triangles (3D)
Declaration
public Triangle3d[] AsTriangles3d()
Returns
Type | Description |
---|---|
Triangle3d[] |
Remarks
There will be 1 triangle for a 3 point facet otherwise 2 triangles will be returned
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 |
IsCoplanar(Point3d, Point3d, Point3d, Point3d)
Determine if 4 points are coplanar
Declaration
public static bool IsCoplanar(Point3d point3d_1, Point3d point3d_2, Point3d point3d_3, Point3d point3d_4)
Parameters
Type | Name | Description |
---|---|---|
Point3d | point3d_1 | Vertex point 1 |
Point3d | point3d_2 | Vertex point 2 |
Point3d | point3d_3 | Vertex point 3 |
Point3d | point3d_4 | Vertex point 4 |
Returns
Type | Description |
---|---|
System.Boolean | True if coplanar |
IsCoplanar(Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double, Double)
Determine if 4 points of X,Y,Z are coplanar
Declaration
public static bool IsCoplanar(double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3, double x, double y, double z)
Parameters
Type | Name | Description |
---|---|---|
System.Double | x1 | X coordinate of point 1 |
System.Double | y1 | Y coordinate of point 1 |
System.Double | z1 | Z coordinate of point 1 |
System.Double | x2 | X coordinate of point 2 |
System.Double | y2 | Y coordinate of point 2 |
System.Double | z2 | Z coordinate of point 2 |
System.Double | x3 | X coordinate of point 3 |
System.Double | y3 | Y coordinate of point 3 |
System.Double | z3 | Z coordinate of point 3 |
System.Double | x | |
System.Double | y | |
System.Double | z |
Returns
Type | Description |
---|---|
System.Boolean | True if coplanar |
Operators
View SourceEquality(Facet, Facet)
Declaration
public static bool operator ==(Facet a1, Facet a2)
Parameters
Type | Name | Description |
---|---|---|
Facet | a1 | |
Facet | a2 |
Returns
Type | Description |
---|---|
System.Boolean |
Inequality(Facet, Facet)
Declaration
public static bool operator !=(Facet a1, Facet a2)
Parameters
Type | Name | Description |
---|---|---|
Facet | a1 | |
Facet | a2 |
Returns
Type | Description |
---|---|
System.Boolean |