Show / Hide Table of Contents

    Class Obstacle

    AdaptiveGrid obstacle represented by a set of points with extra parameters. Points are used to created bounding box that is aligned with transformation parameter with extra offset. Since offset is applied on the box, distance on corners is even larger. Can be constructed from different objects.

    Inheritance
    System.Object
    Element
    GeometricElement
    Obstacle
    Implements
    System.ComponentModel.INotifyPropertyChanged
    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.Spatial.AdaptiveGrid
    Assembly: Hypar.Elements.dll
    Syntax
    public class Obstacle : GeometricElement, INotifyPropertyChanged

    Constructors

    Obstacle(Polygon, Double, Double, Boolean, Boolean, Transform)

    Create an obstacle from a list of points.

    Declaration
    public Obstacle(Polygon boundary, double height, double offset, bool addPerimeterEdges, bool allowOutsideBoundary, Transform orientation)
    Parameters
    Type Name Description
    Polygon boundary

    Boundary of an obstacle

    System.Double height

    Height of an obstacle

    System.Double offset

    Extra space around obstacle bounding box.

    System.Boolean addPerimeterEdges

    Should edges be created around obstacle.

    System.Boolean allowOutsideBoundary

    Should edges be created when obstacle is outside of Boundaries

    Transform orientation

    Orientation of the obstacle in space. Helpful for better bounding box creation.

    Properties

    AddPerimeterEdges

    Should edges be created around obstacle. If false - any intersected edges are just discarded. If true - intersected edges are cut to obstacle and perimeter edges are inserted.

    Declaration
    public bool AddPerimeterEdges { get; set; }
    Property Value
    Type Description
    System.Boolean

    AllowOutsideBoudary

    Should edges be created when obstacle is outside Boundaries, it will work only when AddPerimeterEdges property is true />

    Declaration
    public bool AllowOutsideBoudary { get; set; }
    Property Value
    Type Description
    System.Boolean

    Boundary

    Perimeter defining obstacle.

    Declaration
    public Polygon Boundary { get; set; }
    Property Value
    Type Description
    Polygon

    Height

    Obstacle height, offset by Boundary normal vector

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

    Offset

    Offset of bounding box created from the list of points.

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

    Orientation

    Additional information about obstacle orientation in space. Use inverted orientation to work in local space of the obstacle.

    Declaration
    public Transform Orientation { get; set; }
    Property Value
    Type Description
    Transform

    Points

    List of points defining obstacle.

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

    Methods

    FromBBox(BBox3, Double, Boolean, Boolean)

    Create an obstacle from a bounding box.

    Declaration
    public static Obstacle FromBBox(BBox3 box, double offset = 0, bool addPerimeterEdges = false, bool allowOutsideBoundary = false)
    Parameters
    Type Name Description
    BBox3 box

    Bounding box to avoid.

    System.Double offset

    Extra space around obstacle bounding box.

    System.Boolean addPerimeterEdges

    Should edges be created around obstacle.

    System.Boolean allowOutsideBoundary

    Should edges be created when obstacle is outside of Boundaries

    Returns
    Type Description
    Obstacle

    New obstacle object.

    FromColumn(Column, Double, Boolean, Boolean)

    Create an obstacle from a column.

    Declaration
    public static Obstacle FromColumn(Column column, double offset = 0, bool addPerimeterEdges = false, bool allowOutsideBoundary = false)
    Parameters
    Type Name Description
    Column column

    Column to avoid.

    System.Double offset

    Extra space around obstacle bounding box.

    System.Boolean addPerimeterEdges

    Should edges be created around obstacle.

    System.Boolean allowOutsideBoundary

    Should edges be created when obstacle is outside of Boundaries

    Returns
    Type Description
    Obstacle

    New obstacle object.

    FromLine(Line, Double, Boolean, Boolean)

    Create an obstacle from a line.

    Declaration
    public static Obstacle FromLine(Line line, double offset = 0.1, bool addPerimeterEdges = false, bool allowOutsideBoundary = false)
    Parameters
    Type Name Description
    Line line

    Line to avoid.

    System.Double offset

    Extra space around obstacle bounding box. Should be larger than 0.

    System.Boolean addPerimeterEdges

    Should edges be created around obstacle.

    System.Boolean allowOutsideBoundary

    Should edges be created when obstacle is outside of Boundaries

    Returns
    Type Description
    Obstacle

    New obstacle object.

    FromWall(StandardWall, Double, Boolean, Boolean)

    Create an obstacle from a wall.

    Declaration
    public static Obstacle FromWall(StandardWall wall, double offset = 0, bool addPerimeterEdges = false, bool allowOutsideBoundary = false)
    Parameters
    Type Name Description
    StandardWall wall

    Wall to avoid.

    System.Double offset

    Extra space around obstacle bounding box.

    System.Boolean addPerimeterEdges

    Should edges be created around obstacle.

    System.Boolean allowOutsideBoundary

    Should edges be created when obstacle is outside of Boundaries

    Returns
    Type Description
    Obstacle

    New obstacle object.

    Intersects(Line, Double)

    Check if line intersects with obstacle

    Declaration
    public bool Intersects(Line line, double tolerance = 1E-05)
    Parameters
    Type Name Description
    Line line

    Line to check

    System.Double tolerance

    Tolerance of checks

    Returns
    Type Description
    System.Boolean

    Result of check

    Intersects(Polyline, Double)

    Check if any segment of polyline intersects with obstacle or is inside of obstacle

    Declaration
    public bool Intersects(Polyline polyline, double tolerance = 1E-05)
    Parameters
    Type Name Description
    Polyline polyline

    Polyline to check

    System.Double tolerance

    Tolerance of checks

    Returns
    Type Description
    System.Boolean

    Result of check

    UpdateRepresentations()

    Create visual representation of obstacle

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

    Implements

    System.ComponentModel.INotifyPropertyChanged

    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)