Show / Hide Table of Contents

    Class Floor

    A floor is a horizontal element defined by a profile.

    Examples
    // Create a floor with no elevation.
    var p = Polygon.Rectangle(10, 20);
    var floor1 = new Floor(p, 0.1);
    
    // Create a floor with an elevation.
    var floor2 = new Floor(p, 0.1, new Transform(0, 0, 3));
    
    // Create some openings.
    floor1.AddOpening(1, 1, 1, 1);
    floor2.AddOpening(3, 3, 3, 3);
    
    Inheritance
    System.Object
    Element
    GeometricElement
    Floor
    Implements
    System.ComponentModel.INotifyPropertyChanged
    IHasOpenings
    Inherited Members
    GeometricElement.Bounds
    GeometricElement.Transform
    GeometricElement.Material
    GeometricElement.Representation
    GeometricElement.IsElementDefinition
    GeometricElement.ModifyVertexAttributes
    GeometricElement.UpdateBoundsAndComputeSolid(Boolean)
    GeometricElement.CreateInstance(Transform, String)
    GeometricElement.ToMesh(Boolean)
    GeometricElement.HasGeometry()
    GeometricElement.Intersects(Plane, Dictionary<Guid, List<Polygon>>, Dictionary<Guid, List<Polygon>>, Dictionary<Guid, List<Line>>)
    GeometricElement.TryToGraphicsBuffers(List<GraphicsBuffers>, String, Nullable<MeshPrimitive.ModeEnum>)
    Element.Id
    Element.Name
    Element.AdditionalProperties
    Element.PropertyChanged
    Element.RaisePropertyChanged(String)
    Element.SetMapping(String, MappingBase)
    Element.GetMapping(String)
    Element.GetMapping<T>(String)
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Elements
    Assembly: Hypar.Elements.dll
    Syntax
    public class Floor : GeometricElement, INotifyPropertyChanged, IHasOpenings

    Constructors

    Floor()

    Empty constructor for compatibility purposes. It is best to use the structured constructor with arguments, to ensure the floor is correctly created.

    Declaration
    public Floor()

    Floor(Profile, Double, Transform, Material, Representation, Boolean, Guid, String)

    Create a floor.

    Declaration
    public Floor(Profile profile, double thickness, Transform transform = null, Material material = null, Representation representation = null, bool isElementDefinition = false, Guid id = default(Guid), string name = null)
    Parameters
    Type Name Description
    Profile profile

    The perimeter of the floor.

    System.Double thickness

    The thickness of the floor.

    Transform transform

    The floor's transform. Create a transform with a Z coordinate for the origin, to define the elevation of the floor.

    Material material

    The floor's material.

    Representation representation

    The floor's representation.

    System.Boolean isElementDefinition

    Is this an element definition?

    System.Guid id

    The floor's id.

    System.String name

    The floor's name.

    Floor(Profile, Double, Nullable<Guid>, Transform, Material, Representation, Boolean, Guid, String)

    Create a floor.

    Declaration
    public Floor(Profile profile, double thickness, Guid? level, Transform transform = null, Material material = null, Representation representation = null, bool isElementDefinition = false, Guid id = default(Guid), string name = null)
    Parameters
    Type Name Description
    Profile profile

    The perimeter of the floor.

    System.Double thickness

    The thickness of the floor.

    System.Nullable<System.Guid> level

    The level this floor belongs to.

    Transform transform

    The floor's transform. Create a transform with a Z coordinate for the origin, to define the elevation of the floor.

    Material material

    The floor's material.

    Representation representation

    The floor's representation.

    System.Boolean isElementDefinition

    Is this an element definition?

    System.Guid id

    The floor's id.

    System.String name

    The floor's name.

    Properties

    Elevation

    The elevation from which the floor is extruded.

    Declaration
    [JsonIgnore]
    public double Elevation { get; }
    Property Value
    Type Description
    System.Double

    Level

    The Level this floor belongs to.

    Declaration
    public Guid? Level { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Guid>

    Openings

    A collection of openings in the floor.

    Declaration
    public List<Opening> Openings { get; }
    Property Value
    Type Description
    System.Collections.Generic.List<Opening>

    Profile

    The untransformed profile of the floor.

    Declaration
    public Profile Profile { get; set; }
    Property Value
    Type Description
    Profile

    Thickness

    The thickness of the floor.

    Declaration
    public double Thickness { get; set; }
    Property Value
    Type Description
    System.Double

    Methods

    AddOpening(Polygon, Double, Double, Double, Double)

    Add an opening in the wall.

    Declaration
    public Opening AddOpening(Polygon perimeter, double x, double y, double depthFront = 1, double depthBack = 1)
    Parameters
    Type Name Description
    Polygon perimeter

    The perimeter of the opening.

    System.Double x

    The distance to the origin of the perimeter along the host's x axis.

    System.Double y

    The height to the origin of the perimeter along the host's y axis.

    System.Double depthFront

    The depth of the opening along the opening's +Z axis.

    System.Double depthBack

    The depth of the opening along the opening's -Z axis.

    Returns
    Type Description
    Opening

    AddOpening(Double, Double, Double, Double, Double, Double)

    Add an opening.

    Declaration
    public Opening AddOpening(double width, double height, double x, double y, double depthFront = 1, double depthBack = 1)
    Parameters
    Type Name Description
    System.Double width

    The width of the opening.

    System.Double height

    The height of the opening.

    System.Double x

    The distance to the center of the opening along the host's x axis.

    System.Double y

    The distance to the center of the opening along the host's y axis.

    System.Double depthFront

    The depth of the opening along the opening's +Z axis.

    System.Double depthBack

    The depth of the opening along the opening's -Z axis.

    Returns
    Type Description
    Opening

    Area()

    The area of the floor.

    Declaration
    public double Area()
    Returns
    Type Description
    System.Double

    The area of the floor, not including the area of openings.

    ProfileTransformed()

    Get the profile of the floor transformed by the floor's transform.

    Declaration
    public Profile ProfileTransformed()
    Returns
    Type Description
    Profile

    UpdateRepresentations()

    Update the representations.

    Declaration
    public override void UpdateRepresentations()
    Overrides
    GeometricElement.UpdateRepresentations()

    Volume()

    The area of the floor.

    Declaration
    public double Volume()
    Returns
    Type Description
    System.Double

    The area of the floor, not including the area of openings.

    Implements

    System.ComponentModel.INotifyPropertyChanged
    IHasOpenings

    Extension Methods

    ElementProxyExtensions.Proxy<T>(T, String)
    Identity.AddOverrideIdentity(Element, IOverride)
    Identity.AddOverrideIdentity(Element, String, String, Object)
    Identity.AddOverrideValue(Element, String, Object)
    Identity.OverrideIds<T>(Element, String)