Click or drag to resize

Polyeder Class

[This is preliminary documentation and is subject to change.]

Represents geometry using vertices and faces. All indexing is 0-based. Attempts to add a duplicate vertex will return the index of the existing vertex.
Inheritance Hierarchy
SystemObject
  Infrastructure.GeometryPolyeder

Namespace:  Infrastructure.Geometry
Assembly:  Infrastructure.Geometry (in Infrastructure.Geometry.dll) Version: 1.13.0+Branch.master.Sha.d583fc64569355d188a9c0818d257b6d0d3e1339
Syntax
C#
public sealed class Polyeder

The Polyeder type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyColor
The color ARGB value of the polyeder
Public propertyFaces
The faces in the polyeder
Public propertyFacesCount
The amount of faces in the polyeder
Public propertyVertices
The vertices in the polyeder
Public propertyVerticesCount
The amount of vertices in the polyeder
Top
Methods
  NameDescription
Public methodAddFace(Face)
Adds a new face to the polyeder, defined by face. If a face already exists with the same vertex indexes, nothing is added and the index of the existing face is returned.
Public methodAddFace(IReadOnlyListInt32)
Adds a new face to the polyeder, using the provided vertexIndexes If a face already exists with the same vertex indexes, nothing is added and the index of the existing face is returned.
Public methodStatic memberAddOffSet
Creates a new Polyeder with the given offset added
Public methodAddVertex(Point)
Adds a new vertex to the polyeder, defined by the provided point If a vertex already exists in that position, nothing is added and the index of the existing vertex is returned.
Public methodAddVertex(Point)
Adds the vertices to the polyeder and return their indexes.
Public methodAddVertex(Double, Double, Double)
Adds a new vertex to the polyeder, using the provided x, y and z values expressed in meters.
Public methodAddVertex(Length, Length, Length)
Adds a new vertex to the polyeder, using the provided x, y and z values.
Public methodMerge
Merge this polyeder with the provided mergeWith polyeder. The polyeder being merged with will have its indexes updated and duplicate vertices will not be merged but re-used instead.
Top
Extension Methods
  NameDescription
Public Extension MethodAddOneDRectangle
Creates a 1D rectangle by adding 4 new vertices and 1 face to the polyeder which together form a rectangle of a given width and height.
(Defined by PolyederExtensions.)
Public Extension MethodAddOneDSquare
Creates a 1D square by adding 4 new points and 1 face to the polyeder which together from a square of given size. The square will always be in the Z = 0 plane
(Defined by PolyederExtensions.)
Public Extension MethodAddThreeDCircle
Create a 3D circle around the origin of the provided coordinate system with given radius thickness.
(Defined by PolyederExtensions.)
Public Extension MethodAddThreeDCube
Generate a 3D cube with a given size (width, height and length) from the origin of the provided coordinate system. The origin of the coordinate system will be at the center of the cube
(Defined by PolyederExtensions.)
Public Extension MethodAddThreeDCylinder
Adds a 3D cylinder to the polyeder.
(Defined by PolyederExtensions.)
Public Extension MethodAddThreeDPyramid
Create a 3D pyramid from a provided coordinate system and tip point and given width.
(Defined by PolyederExtensions.)
Public Extension MethodAddThreeDPyramidFaces
Adds 4 faces to the Polyeder, following a predefined order using the provided vertexIndexes (counter-clockwise). These 4 faces are the remaining "side" faces of 3D pyramid. Each face consists out of 3 vertex indexes.
(Defined by PolyederExtensions.)
Public Extension MethodAddThreeDRectangle(CoordinateSystem, Length, Length, Length)Overloaded.
Generate a 3D rectangle with a given length, width and height from the origin of the provided coordinate system The origin of the coordinate system will be at the center of the rectangle
(Defined by PolyederExtensions.)
Public Extension MethodAddThreeDRectangle(Line, Length, Length, CoordinateSystemAdjustment)Overloaded.
Generate a 3D rectangle with given width and height, based on the provided line. The line represents the X-axis and runs through the center of the rectangle
(Defined by PolyederExtensions.)
Public Extension MethodAddThreeDRectangleFaces
Adds 4 faces to the Polyeder, following a predefined order using the provided vertexIndexes (counter-clockwise). These 4 faces are the remaining faces of a 3D rectangle, of which 2 opposite facing faces have already been added to the polyeder.
(Defined by PolyederExtensions.)
Public Extension MethodAddThreeDRectangles
Generate 3D rectangles between the provided points, with given width and height. At least 2 points must be provided.
(Defined by PolyederExtensions.)
Public Extension MethodAddThreeDSquare
Generate a 3D square "frame" in which the sides of the frames are created using 3D rectangles with the given thickness (width & length). The size determines how big the square will be (height and/ width)
(Defined by PolyederExtensions.)
Public Extension MethodAddThreeDZigZag
Create a 3D "zigzag" / lightning-ish bolt
(Defined by PolyederExtensions.)
Top
See Also