Class Face
A Face within a cell. Multiple cells can share the same Face.
Inherited Members
Namespace: Elements.Spatial.CellComplex
Assembly: Hypar.Elements.dll
Syntax
public class Face : ChildBase<Face, Polygon>, IDistanceTo, IHasNeighbors<Face, Polygon>
Fields
DirectedEdgeIds
Directed edge IDs.
Declaration
public List<ulong> DirectedEdgeIds
Field Value
Type | Description |
---|---|
System.Collections.Generic.List<System.UInt64> |
Methods
DistanceTo(Vector3)
Get the shortest distance from a point to the geometry representing this face.
Declaration
public override double DistanceTo(Vector3 point)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | point |
Returns
Type | Description |
---|---|
System.Double |
Overrides
GetCells()
Get associated Cells.
Declaration
public List<Cell> GetCells()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<Cell> |
GetClosestCell(Vector3)
Get the associated Cell that is closest to a point.
Declaration
public Cell GetClosestCell(Vector3 point)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | point |
Returns
Type | Description |
---|---|
Cell |
GetClosestEdge(Vector3)
Get the associated Edge that is closest to a point.
Declaration
public Edge GetClosestEdge(Vector3 point)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | point |
Returns
Type | Description |
---|---|
Edge |
GetClosestNeighbor(Vector3)
Get the closest associated Face to a given point.
Declaration
public Face GetClosestNeighbor(Vector3 target)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | target |
Returns
Type | Description |
---|---|
Face |
GetClosestNeighbor(Vector3, Boolean, Boolean)
Get the closest associated Face to a given point.
Declaration
public Face GetClosestNeighbor(Vector3 target, bool parallel = false, bool includeSharedVertices = false)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | target | |
System.Boolean | parallel | If true, only checks faces that are oriented the same way as this Face. |
System.Boolean | includeSharedVertices | If true, checks Faces that share a Vertex as well as Faces that share a Edge. |
Returns
Type | Description |
---|---|
Face |
GetClosestVertex(Vector3)
Get the associated Vertex that is closest to a point.
Declaration
public Vertex GetClosestVertex(Vector3 point)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | point |
Returns
Type | Description |
---|---|
Vertex |
GetEdges()
Get associated Edges.
Declaration
public List<Edge> GetEdges()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<Edge> |
GetGeometry()
Get the geometry for this Face.
Declaration
public override Polygon GetGeometry()
Returns
Type | Description |
---|---|
Polygon |
Overrides
GetNeighbors()
Get a list of all neighbors of this Face. A neighbor is defined as a Face which shares any Edge.
Declaration
public List<Face> GetNeighbors()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<Face> |
GetNeighbors(Edge, Boolean)
Get a list of neighboring Faces that share a specific Edge.
Declaration
public List<Face> GetNeighbors(Edge edge, bool parallel = false)
Parameters
Type | Name | Description |
---|---|---|
Edge | edge | Edge that the neighbor should share. |
System.Boolean | parallel | Whether to only return Faces that are parallel to this Face. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<Face> |
GetNeighbors(Boolean, Boolean)
Get a list of all neighbors of this Face. A neighbor is defined as a Face which shares any Edge.
Declaration
public List<Face> GetNeighbors(bool parallel = false, bool includeSharedVertices = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | parallel | If true, only returns Faces that are oriented the same way as this Face. |
System.Boolean | includeSharedVertices | If true, includes Faces that share a Vertex as well as Faces that share an Edge. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<Face> |
GetOrientation()
Get the user-set U and V Orientatinos of this face.
Declaration
public (Orientation U, Orientation V) GetOrientation()
Returns
Type | Description |
---|---|
System.ValueTuple<Orientation, Orientation> |
GetVertices()
Get associated Vertices.
Declaration
public List<Vertex> GetVertices()
Returns
Type | Description |
---|---|
System.Collections.Generic.List<Vertex> |
TraverseNeighbors(Vector3, Boolean, Boolean, Double)
Traverse the neighbors of this Face toward the target point.
Declaration
public List<Face> TraverseNeighbors(Vector3 target, bool parallel = false, bool includeSharedVertices = false, double completedRadius = 0)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | target | |
System.Boolean | parallel | If true, only checks faces that are oriented the same way as this Face. |
System.Boolean | includeSharedVertices | If true, checks Faces that share a Vertex as well as Faces that share a Edge. |
System.Double | completedRadius | If provided, ends the traversal when the neighbor is within this distance to the target point. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<Face> | A collection of traversed Faces, including the starting Face. |
TraverseNeighbors(Vector3, Double)
Traverse the neighbors of this Face toward the target point.
Declaration
public List<Face> TraverseNeighbors(Vector3 target, double completedRadius = 0)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | target | |
System.Double | completedRadius |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<Face> |