StructuralProxyElement Class |
[This is preliminary documentation and is subject to change.]
Namespace: ModelExchanger.AnalysisDataModel.StructuralElements
public sealed class StructuralProxyElement : StructuralAnalysisObjectBase, IHasColor, ICanHaveRelationWithStructuralObjectIds, IAnalysisObject, IEquatable<StructuralProxyElement>
The StructuralProxyElement type exposes the following members.
Name | Description | |
---|---|---|
StructuralProxyElement |
Name | Description | |
---|---|---|
Color |
The color of the object.
Primarily used when exporting to BIM+
| |
Geometry |
The BREP that defines the geometry of the solid
| |
Id |
The ID of the Analysis object.
Needs to be unique within the entire model
(Inherited from StructuralAnalysisObjectBase.) | |
Layer |
Custom created layer name. Used to group entities together
| |
Material |
The material out of which the solid is constructed
| |
Name |
The name of the Analysis object.
Needs to be unique within it's type
(Inherited from StructuralAnalysisObjectBase.) |
Name | Description | |
---|---|---|
Equals(Object) |
Check if this object is the same as the provided object.
(Overrides StructuralAnalysisObjectBaseEquals(Object).) | |
Equals(StructuralAnalysisObjectBase) |
Check if this object is the same as the provided object.
(Inherited from StructuralAnalysisObjectBase.) | |
Equals(StructuralProxyElement) | Indicates whether the current object is equal to another object of the same type. | |
GetHashCode |
Retrieves the hashcode of the object
(Overrides StructuralAnalysisObjectBaseGetHashCode.) |
Name | Description | |
---|---|---|
PropertyChanged | (Inherited from StructuralAnalysisObjectBase.) |
Name | Description | |
---|---|---|
ToObjectIdentifier |
Converts the provided IAnalysisObject into an AnalysisObjectIdentifier (Defined by IAnalysisObjectExtensions.) |
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 } }