public Column(Vector3 location, double height, StructuralFramingType elementType, Transform transform = null, double startSetback = 0.0, double endSetback = 0.0) : base(new Line(location, new Vector3(location.X, location.Y, location.Z + height)), elementType, startSetback, endSetback, transform) { this.Location = location; this.Height = height; }
/// <summary> /// Construct a beam system under a slab. /// </summary> /// <param name="floor">The floor under which to create beams.</param> /// <param name="count">The number of beams to create.</param> /// <param name="framingType">The structural framing type to be used for all beams.</param> public BeamSystem(Floor floor, int count, StructuralFramingType framingType) { this.Elements = new List <Element>(); var edges = floor.Profile.Perimeter.Segments(); var e1 = edges[0]; var e2 = edges[2].Reversed(); var bbox = new BBox3(framingType.Profile); var depth = bbox.Max.Y - bbox.Min.Y; var edge1 = new Line(new Vector3(e1.Start.X, e1.Start.Y, floor.Elevation - depth / 2), new Vector3(e1.End.X, e1.End.Y, floor.Elevation - depth / 2)); var edge2 = new Line(new Vector3(e2.Start.X, e2.Start.Y, floor.Elevation - depth / 2), new Vector3(e2.End.X, e2.End.Y, floor.Elevation - depth / 2)); CreateBeamsBetweenEdges(edge1, edge2, count, framingType); }
private void CreateBeamsBetweenEdges(Line edge1, Line edge2, int count, StructuralFramingType framingType) { var div = 1.0 / ((double)count + 1); for (var i = 0; i < count; i++) { var t = i * div + div; var a = edge1.PointAt(t); var b = edge2.PointAt(t); var line = new Line(a, b); var beam = new Beam(line, framingType); this.Elements.Add(beam); } }
public Truss(Vector3 start, Vector3 end, double depth, int divisions, StructuralFramingType topChordType, StructuralFramingType bottomChordType, StructuralFramingType webType, Material material, double startSetback = 0.0, double endSetback = 0.0) { if (depth <= 0) { throw new ArgumentOutOfRangeException($"The provided depth ({depth}) must be greater than 0.0."); } this.Start = start; this.End = end; this.Depth = depth; this.Divisions = divisions; this.TopChordType = topChordType; this.BottomChordType = bottomChordType; this.WebType = webType; var l = new Line(start, end); var pts = Vector3.AtNEqualSpacesAlongLine(l, divisions, true); for (var i = 0; i < pts.Count; i++) { if (i != pts.Count - 1) { var bt = new Line(pts[i], pts[i + 1]); var bb = new Line(pts[i] - new Vector3(0, 0, depth), pts[i + 1] - new Vector3(0, 0, depth)); this._topChord.Add(new Beam(bt, topChordType, startSetback, endSetback)); this._bottomChord.Add(new Beam(bb, bottomChordType, startSetback, endSetback)); var diag = i > Math.Ceiling((double)divisions / 2) ? new Line(pts[i], pts[i + 1] - new Vector3(0, 0, depth)) : new Line(pts[i + 1], pts[i] - new Vector3(0, 0, depth)); this._web.Add(new Beam(diag, webType, startSetback, endSetback)); } var wb = new Line(pts[i], pts[i] - new Vector3(0, 0, depth)); this._web.Add(new Beam(wb, webType, startSetback, endSetback)); } this.Elements = new List <Element>(); this.Elements.AddRange(this._topChord); this.Elements.AddRange(this._bottomChord); this.Elements.AddRange(this._web); }
/// <summary> /// Construct a BeamSystem between two edges. /// </summary> /// <param name="count">The number of beams to create.</param> /// <param name="framingType">The structural framing type to be used for all beams.</param> /// <param name="edge1">The first edge of the system.</param> /// <param name="edge2">The second edge of the system.</param> public BeamSystem(int count, StructuralFramingType framingType, Line edge1, Line edge2) { this.Elements = new List <Element>(); CreateBeamsBetweenEdges(edge1, edge2, count, framingType); }
/// <summary> /// Construct a Brace. /// </summary> /// <param name="curve">The brace's center line.</param> /// <param name="elementType">The structural framing type of the brace.</param> /// <param name="startSetback">The setback of the brace's geometry at the start.</param> /// <param name="endSetback">The setback of the brace's geometry at the end.</param> /// [JsonConstructor] public Brace(ICurve curve, StructuralFramingType elementType, double startSetback = 0.0, double endSetback = 0.0) : base(curve, elementType, startSetback, endSetback) { }
public Beam(ICurve curve, StructuralFramingType elementType, double startSetback = 0.0, double endSetback = 0.0, Transform transform = null) : base(curve, elementType, startSetback, endSetback, transform) { }