// // (C) Copyright 2003-2013 by Autodesk, Inc. // // Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, // provided that the above copyright notice appears in all copies and // that both that copyright notice and the limited warranty and // restricted rights notice below appear in all supporting // documentation. // // AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS. // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE // UNINTERRUPTED OR ERROR FREE. // // Use, duplication, or disclosure by the U.S. Government is subject to // restrictions set forth in FAR 52.227-19 (Commercial Computer // Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) // (Rights in Technical Data and Computer Software), as applicable. // using System; using System.Collections.Generic; using System.Linq; using System.Text; using Autodesk.Revit.DB; using Autodesk.Revit.DB.CodeChecking.Engineering; using Autodesk.CodeChecking.Concrete; using CodeCheckingConcreteExample.Engine; using CodeCheckingConcreteExample.Concrete; using CodeCheckingConcreteExample.Utility; using CodeCheckingConcreteExample.ConcreteTypes; using DD = CodeCheckingConcreteExample.ConcreteTypes.DimensioningDirection; /// namespace CodeCheckingConcreteExample.Main.Calculation { class SurfaceSection : SectionDataBase { /// /// Initializes a new instance of user's section object of linear element. /// /// Instance of base section object with predefined parameters to copy. public SurfaceSection(SectionDataBase sectionDataBase) : base(sectionDataBase) { DesignWarning = new Dictionary>() { { DD.X, new List() }, { DD.Y, new List() } }; DesignInfo = new Dictionary>() { { DD.X, new List() }, { DD.Y, new List() } }; DesignError = new Dictionary>() { { DD.X, new List() }, { DD.Y, new List() } }; } /// /// Gets analitical results for RC surface elements (floor, slab, wall) /// /// Analitical results in the section. public ResultInPointSurface GetCalcResultsInPt() { ResultInPointSurface resultInPoint = new ResultInPointSurface(); List vForces = ListInternalForces; resultInPoint[ResultTypeSurface.X] = (CalcPoint as CalcPointSurface).Coord.X; resultInPoint[ResultTypeSurface.Y] = (CalcPoint as CalcPointSurface).Coord.Y; resultInPoint[ResultTypeSurface.Z] = (CalcPoint as CalcPointSurface).Coord.Z; IEnumerable vmxx = from ifo in vForces let mxx = (ifo as InternalForcesSurface).MomentMxx select mxx; resultInPoint[ResultTypeSurface.MxxMax] = vmxx.Max(); resultInPoint[ResultTypeSurface.MxxMin] = vmxx.Min(); IEnumerable vmyy = from ifo in vForces let myy = (ifo as InternalForcesSurface).MomentMyy select myy; resultInPoint[ResultTypeSurface.MyyMax] = vmyy.Max(); resultInPoint[ResultTypeSurface.MyyMin] = vmyy.Min(); IEnumerable vmxy = from ifo in vForces let mxy = (ifo as InternalForcesSurface).MomentMxy select mxy; resultInPoint[ResultTypeSurface.MxyMax] = vmxy.Max(); resultInPoint[ResultTypeSurface.MxyMin] = vmxy.Min(); IEnumerable fmxx = from ifo in vForces let fxx = (ifo as InternalForcesSurface).ForceFxx select fxx; resultInPoint[ResultTypeSurface.FxxMax] = fmxx.Max(); resultInPoint[ResultTypeSurface.FxxMin] = fmxx.Min(); IEnumerable fmyy = from ifo in vForces let fyy = (ifo as InternalForcesSurface).ForceFyy select fyy; resultInPoint[ResultTypeSurface.FyyMax] = fmyy.Max(); resultInPoint[ResultTypeSurface.FyyMin] = fmyy.Min(); IEnumerable fmxy = from ifo in vForces let fxy = (ifo as InternalForcesSurface).ForceFxy select fxy; resultInPoint[ResultTypeSurface.FxyMax] = fmxy.Max(); resultInPoint[ResultTypeSurface.FxyMin] = fmxy.Min(); IEnumerable qmxx = from ifo in vForces let qxx = (ifo as InternalForcesSurface).ForceQxx select qxx; resultInPoint[ResultTypeSurface.QxxMax] = qmxx.Max(); resultInPoint[ResultTypeSurface.QxxMin] = qmxx.Min(); IEnumerable qmyy = from ifo in vForces let qyy = (ifo as InternalForcesSurface).ForceQyy select qyy; resultInPoint[ResultTypeSurface.QyyMax] = qmyy.Max(); resultInPoint[ResultTypeSurface.QyyMin] = qmyy.Min(); resultInPoint[ResultTypeSurface.AxxBottom] = AsBottom[DD.X]; resultInPoint[ResultTypeSurface.AxxTop] = AsTop[DD.X]; resultInPoint[ResultTypeSurface.AyyBottom] = AsBottom[DD.Y]; resultInPoint[ResultTypeSurface.AyyTop] = AsTop[DD.Y]; return resultInPoint; } public List ListInternalForces { get; set; } public Geometry Geometry { get; set; } public double Width { get; set; } public double Height { get; set; } public Dictionary AsBottom = new Dictionary() { { DD.X, 0.00 }, { DD.Y, 0.00 } }; public Dictionary AsTop = new Dictionary() { { DD.X, 0.00 }, { DD.Y, 0.00 } }; public Dictionary MinStiffnes = new Dictionary() { { DD.X, 0.0 }, { DD.Y, 0.0 } }; public Dictionary> LRebar = new Dictionary>() { { DD.X, null }, { DD.Y, null } }; /// /// Gets and sets a list of texts with calculation warnings. /// public Dictionary> DesignWarning { get; set; } /// /// Gets and sets a list of texts with additional calculation information. /// public Dictionary> DesignInfo { get; set; } /// /// Gets and sets a list of texts with calculation errors. /// public Dictionary> DesignError { get; set; } /// /// Gets and sets cref="ElementInfo" object. /// public ElementInfo Info { get; set; } } } ///