Click or drag to resize

StructuralProxyElement Class

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

Defines a solid object that contains BREP geometry information
Inheritance Hierarchy
SystemObject
  ModelExchanger.AnalysisDataModel.BaseStructuralAnalysisObjectBase
    ModelExchanger.AnalysisDataModel.StructuralElementsStructuralProxyElement

Namespace:  ModelExchanger.AnalysisDataModel.StructuralElements
Assembly:  ModelExchanger.AnalysisDataModel (in ModelExchanger.AnalysisDataModel.dll) Version: 1.13.0+Branch.master.Sha.d583fc64569355d188a9c0818d257b6d0d3e1339
Syntax
C#
public sealed class StructuralProxyElement : StructuralAnalysisObjectBase, 
	IHasColor, ICanHaveRelationWithStructuralObjectIds, IAnalysisObject, IEquatable<StructuralProxyElement>

The StructuralProxyElement type exposes the following members.

Constructors
  NameDescription
Public methodStructuralProxyElement
Create a general solid that consists out of a specific material and whose geometry is defined by the provided BREP
Top
Properties
  NameDescription
Public propertyCode exampleColor
The color of the object. Primarily used when exporting to BIM+
Public propertyGeometry
The BREP that defines the geometry of the solid
Public propertyId
The ID of the Analysis object. Needs to be unique within the entire model
(Inherited from StructuralAnalysisObjectBase.)
Public propertyCode exampleLayer
Custom created layer name. Used to group entities together
Public propertyMaterial
The material out of which the solid is constructed
Public propertyName
The name of the Analysis object. Needs to be unique within it's type
(Inherited from StructuralAnalysisObjectBase.)
Top
Methods
  NameDescription
Public methodEquals(Object)
Check if this object is the same as the provided object.
(Overrides StructuralAnalysisObjectBaseEquals(Object).)
Public methodEquals(StructuralAnalysisObjectBase)
Check if this object is the same as the provided object.
(Inherited from StructuralAnalysisObjectBase.)
Public methodEquals(StructuralProxyElement)
Indicates whether the current object is equal to another object of the same type.
Public methodGetHashCode
Retrieves the hashcode of the object
(Overrides StructuralAnalysisObjectBaseGetHashCode.)
Top
Events
  NameDescription
Public eventPropertyChanged (Inherited from StructuralAnalysisObjectBase.)
Top
Extension Methods
  NameDescription
Public Extension MethodToObjectIdentifier
Converts the provided IAnalysisObject into an AnalysisObjectIdentifier
(Defined by IAnalysisObjectExtensions.)
Top
Examples
Creating an instance
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using ModelExchanger.AnalysisDataModel.Libraries;
using ModelExchanger.AnalysisDataModel.Models;
using ModelExchanger.AnalysisDataModel.StructuralElements;
using ModelExchanger.AnalysisDataModel.Subtypes;
using UnitsNet;

namespace ModelExchanger.AnalysisDataModel.Example.StructuralElements
{
    public sealed class StructuralProxyElementExample : BaseExample<StructuralProxyElement>
    {
        protected override IReadOnlyCollection<StructuralProxyElement> CreateAnalysisObjects(AnalysisModel model)
        {
            IReadOnlyDictionary<string, StructuralMaterial> materials = model.OfType<StructuralMaterial>().ToDictionary(x => x.Name, x => x);

            return new[]
            {
                new StructuralProxyElement(Guid.NewGuid(), "GS1", materials["MAT1"], CreateGeometry())
                {
                    Color = (uint)Color.LightGray.ToArgb()
                }
            };
        }

        private BoundaryRepresentationGeometry CreateGeometry()
        {
            return new BoundaryRepresentationGeometry(CreateCoordinates(), CreateFaces());
        }

        #region Coordinates

        private IReadOnlyList<Coordinate> CreateCoordinates() => new[]
        {
            new Coordinate("C1", Length.FromMeters(-8), Length.FromMeters(0), Length.FromMeters(-4)),
            new Coordinate("C2", Length.FromMeters(-4), Length.FromMeters(0), Length.FromMeters(-4)),
            new Coordinate("C3", Length.FromMeters(-4), Length.FromMeters(0), Length.FromMeters(0)),
            new Coordinate("C4", Length.FromMeters(-8), Length.FromMeters(0), Length.FromMeters(0)),
            new Coordinate("C5", Length.FromMeters(-8), Length.FromMeters(4), Length.FromMeters(-4)),
            new Coordinate("C6", Length.FromMeters(-4), Length.FromMeters(4), Length.FromMeters(-4)),
            new Coordinate("C7", Length.FromMeters(-4), Length.FromMeters(4), Length.FromMeters(0)),
            new Coordinate("C8", Length.FromMeters(-8), Length.FromMeters(4), Length.FromMeters(0)),

            new Coordinate("C9", Length.FromMeters(-7), Length.FromMeters(1), Length.FromMeters(-4)),
            new Coordinate("C10", Length.FromMeters(-5), Length.FromMeters(1), Length.FromMeters(-4)),
            new Coordinate("C11", Length.FromMeters(-5), Length.FromMeters(3), Length.FromMeters(-4)),
            new Coordinate("C12", Length.FromMeters(-7), Length.FromMeters(3), Length.FromMeters(-4)),
            new Coordinate("C13", Length.FromMeters(-7), Length.FromMeters(1), Length.FromMeters(0)),
            new Coordinate("C14", Length.FromMeters(-5), Length.FromMeters(1), Length.FromMeters(0)),
            new Coordinate("C15", Length.FromMeters(-5), Length.FromMeters(3), Length.FromMeters(0)),
            new Coordinate("C16", Length.FromMeters(-7), Length.FromMeters(3), Length.FromMeters(0)),
        };

        #endregion

        #region Faces

        private IReadOnlyList<Face> CreateFaces() => new[]
        {
            new Face(new []{ 0,1,2,3}), // Front
            new Face(new []{ 1,5,6,2}), // Right
            new Face(new []{ 5,4,7,6}), // Back
            new Face(new []{ 4,0,3,7}), // Left
            new Face(new [] // Bottom
            {
                new []{ 4,5,1,0 },
                new []{11,8,9,10} // Opening
            }),
            new Face(new [] // Top
            {
                new []{ 3,2,6,7},
                new [] {12,15,14,13} // Opening
            }),
            new Face(new []{8,9,13,12}), // Inner front
            new Face(new []{ 9,10,14,13}), // Inner right
            new Face(new [] { 10,11,15,14}), // Inner back
            new Face(new []{ 11,8,12,15}), // Inner left
        };

        #endregion

    }
}
See Also