public override string Execute(IList <string> parameters)
        {
            int    elementId;
            int    loadCaseNumber;
            double loadValue;
            double loadPosition;

            try
            {
                elementId      = int.Parse(parameters[0]);
                loadCaseNumber = int.Parse(parameters[1]);
                loadValue      = double.Parse(parameters[2]);
                loadPosition   = double.Parse(parameters[3]);
            }
            catch
            {
                throw new ArgumentException("Failed to parse AssignConcentratedNormalLoadToFrame command parameters.");
            }

            IFrameElement frameElement = base.dbctx.FrameElements[elementId];
            ILoadCase     loadCase     = base.dbctx.LoadCases[loadCaseNumber];

            IFrameLoad frameLoad = this.factory.CreateConcentratedNormalLoad(loadCase, frameElement.ElementLength, 0.0,
                                                                             loadValue, loadPosition);

            FrameService.AddLoad(frameElement, frameLoad);

            return($"Concentrated normal frame load with intensity {loadValue} and Load Case Numeber {loadCaseNumber} has been assigned to element with ID {frameElement.Number}.");
        }
        public override string Execute(IList <string> parameters)
        {
            int    elementId;
            int    loadCaseNumber;
            double loadAtStart;
            double loadAtEnd;
            double loadStartsAt;
            double loadEndsAt;

            try
            {
                elementId      = int.Parse(parameters[0]);
                loadCaseNumber = int.Parse(parameters[1]);
                loadAtStart    = double.Parse(parameters[2]);
                loadAtEnd      = double.Parse(parameters[3]);
                loadStartsAt   = double.Parse(parameters[4]);
                loadEndsAt     = double.Parse(parameters[5]);
            }
            catch
            {
                throw new ArgumentException("Failed to parse AssignDistributedMomentXZPlaneToFrame command parameters.");
            }

            IFrameElement frameElement = base.dbctx.FrameElements[elementId];
            ILoadCase     loadCase     = base.dbctx.LoadCases[loadCaseNumber];
            double        gCoefficient = (frameElement.MaterialProp.EModule * frameElement.SectionProp.MomentOfInertiaY * frameElement.SectionProp.Mju)
                                         / (frameElement.SectionProp.Area * frameElement.MaterialProp.GModule);

            IFrameLoad frameLoad = this.factory.CreateDistributedMomentXZPlane(loadCase, frameElement.ElementLength, gCoefficient,
                                                                               loadAtStart, loadAtEnd, loadStartsAt, loadEndsAt);

            FrameService.AddLoad(frameElement, frameLoad);

            return($"Distributed moment frame load in XZ plane with intensities {loadAtStart} and {loadAtEnd} and Load Case Numeber {loadCaseNumber} has been assigned to element with ID {frameElement.Number}.");
        }
        public override string Execute(IList <string> parameters)
        {
            int    elementId;
            int    loadCaseNumber;
            double loadValue;
            double loadPosition;

            try
            {
                elementId      = int.Parse(parameters[0]);
                loadCaseNumber = int.Parse(parameters[1]);
                loadValue      = double.Parse(parameters[2]);
                loadPosition   = double.Parse(parameters[3]);
            }
            catch
            {
                throw new ArgumentException("Failed to parse AssignConcentratedShearLoadXYPlaneToFrame command parameters.");
            }

            IFrameElement frameElement = base.dbctx.FrameElements[elementId];
            ILoadCase     loadCase     = base.dbctx.LoadCases[loadCaseNumber];
            double        gCoefficient = (frameElement.MaterialProp.EModule * frameElement.SectionProp.MomentOfInertiaZ * frameElement.SectionProp.Mju)
                                         / (frameElement.SectionProp.Area * frameElement.MaterialProp.GModule);

            IFrameLoad frameLoad = this.factory.CreateConcentratedShearLoadXYPlane(loadCase, frameElement.ElementLength, gCoefficient,
                                                                                   loadValue, loadPosition);

            FrameService.AddLoad(frameElement, frameLoad);

            return($"Concentrated shear frame load in XY plane with intensity {loadValue} and Load Case Numeber {loadCaseNumber} has been assigned to element with ID {frameElement.Number}.");
        }
        public override string Execute(IList <string> parameters)
        {
            int    elementId;
            int    loadCaseNumber;
            double loadAtStart;
            double loadAtEnd;
            double loadStartsAt;
            double loadEndsAt;

            try
            {
                elementId      = int.Parse(parameters[0]);
                loadCaseNumber = int.Parse(parameters[1]);
                loadAtStart    = double.Parse(parameters[2]);
                loadAtEnd      = double.Parse(parameters[3]);
                loadStartsAt   = double.Parse(parameters[4]);
                loadEndsAt     = double.Parse(parameters[5]);
            }
            catch
            {
                throw new ArgumentException("Failed to parse AssignDistributedTorsionToFrame command parameters.");
            }

            IFrameElement frameElement = base.dbctx.FrameElements[elementId];
            ILoadCase     loadCase     = base.dbctx.LoadCases[loadCaseNumber];

            IFrameLoad frameLoad = this.factory.CreateDistributedTorsion(loadCase, frameElement.ElementLength, 0.0,
                                                                         loadAtStart, loadAtEnd, loadStartsAt, loadEndsAt);

            FrameService.AddLoad(frameElement, frameLoad);

            return($"Distributed torsion with intensities {loadAtStart} and {loadAtEnd} and Load Case Numeber {loadCaseNumber} has been assigned to element with ID {frameElement.Number}.");
        }
        public override string Execute(IList <string> parameters)
        {
            int    elementId;
            int    loadCaseNumber;
            double loadAtStart;
            double loadAtEnd;
            double loadStartsAt;
            double loadEndsAt;

            try
            {
                elementId      = int.Parse(parameters[0]);
                loadCaseNumber = int.Parse(parameters[1]);
                loadAtStart    = double.Parse(parameters[2]);
                loadAtEnd      = double.Parse(parameters[3]);
                loadStartsAt   = double.Parse(parameters[4]);
                loadEndsAt     = double.Parse(parameters[5]);
            }
            catch
            {
                throw new ArgumentException("Failed to parse AssignDistributedMomentAroundGlobalYDirection command parameters.");
            }

            IFrameElement frameElement  = base.dbctx.FrameElements[elementId];
            ILoadCase     loadCase      = base.dbctx.LoadCases[loadCaseNumber];
            double        gCoefficientY = (frameElement.MaterialProp.EModule * frameElement.SectionProp.MomentOfInertiaY * frameElement.SectionProp.Mju)
                                          / (frameElement.SectionProp.Area * frameElement.MaterialProp.GModule);

            double gCoefficientZ = (frameElement.MaterialProp.EModule * frameElement.SectionProp.MomentOfInertiaZ * frameElement.SectionProp.Mju)
                                   / (frameElement.SectionProp.Area * frameElement.MaterialProp.GModule);

            Vector <double> startPointEntryLoad = Vector <double> .Build.SparseOfArray(new double[] { 0, loadAtStart, 0 });

            Vector <double> endPointEntryLoad = Vector <double> .Build.SparseOfArray(new double[] { 0, loadAtEnd, 0 });

            Vector <double> startPointLoadVector = FrameService.InclinedLoadVector(frameElement, startPointEntryLoad);
            Vector <double> endPointLoadVector   = FrameService.InclinedLoadVector(frameElement, endPointEntryLoad);

            IFrameLoad frameMomentAroundLocalX = this.factory.CreateDistributedTorsion(loadCase, frameElement.ElementLength, 0.0,
                                                                                       startPointLoadVector[0], endPointLoadVector[0], loadStartsAt, loadEndsAt);

            IFrameLoad frameMomentAroundLocalY = this.factory.CreateDistributedMomentXZPlane(loadCase, frameElement.ElementLength, gCoefficientY,
                                                                                             startPointLoadVector[1], endPointLoadVector[1], loadStartsAt, loadEndsAt);

            IFrameLoad frameMomentAroundLocalZ = this.factory.CreateDistributedMomentXYPlane(loadCase, frameElement.ElementLength, gCoefficientZ,
                                                                                             startPointLoadVector[2], endPointLoadVector[2], loadStartsAt, loadEndsAt);

            FrameService.AddLoad(frameElement, frameMomentAroundLocalX);
            FrameService.AddLoad(frameElement, frameMomentAroundLocalY);
            FrameService.AddLoad(frameElement, frameMomentAroundLocalZ);

            return($"Distributed frame moment around global Y direction with intensities {loadAtStart} and {loadAtEnd} and Load Case Numeber {loadCaseNumber} has been assigned to element with ID {frameElement.Number}.");
        }
        public override string Execute(IList <string> parameters)
        {
            int    elementId;
            int    loadCaseNumber;
            double loadValue;
            double loadPosition;

            try
            {
                elementId      = int.Parse(parameters[0]);
                loadCaseNumber = int.Parse(parameters[1]);
                loadValue      = double.Parse(parameters[2]);
                loadPosition   = double.Parse(parameters[3]);
            }
            catch
            {
                throw new ArgumentException("Failed to parse AssignConcentratedLoadGlobalYDirection command parameters.");
            }

            IFrameElement frameElement  = base.dbctx.FrameElements[elementId];
            ILoadCase     loadCase      = base.dbctx.LoadCases[loadCaseNumber];
            double        gCoefficientY = (frameElement.MaterialProp.EModule * frameElement.SectionProp.MomentOfInertiaZ * frameElement.SectionProp.Mju)
                                          / (frameElement.SectionProp.Area * frameElement.MaterialProp.GModule);

            double gCoefficientZ = (frameElement.MaterialProp.EModule * frameElement.SectionProp.MomentOfInertiaY * frameElement.SectionProp.Mju)
                                   / (frameElement.SectionProp.Area * frameElement.MaterialProp.GModule);

            Vector <double> EntryLoad = Vector <double> .Build.SparseOfArray(new double[] { 0, loadValue, 0 });

            Vector <double> LoadVector = FrameService.InclinedLoadVector(frameElement, EntryLoad);

            IFrameLoad frameLoadLocalX = this.factory.CreateConcentratedNormalLoad(loadCase, frameElement.ElementLength, 0.0,
                                                                                   LoadVector[0], loadPosition);

            IFrameLoad frameLoadLocalY = this.factory.CreateConcentratedShearLoadXYPlane(loadCase, frameElement.ElementLength, gCoefficientY,
                                                                                         LoadVector[1], loadPosition);

            IFrameLoad frameLoadLocalZ = this.factory.CreateConcentratedShearLoadXZPlane(loadCase, frameElement.ElementLength, gCoefficientZ,
                                                                                         LoadVector[2], loadPosition);

            FrameService.AddLoad(frameElement, frameLoadLocalX);
            FrameService.AddLoad(frameElement, frameLoadLocalY);
            FrameService.AddLoad(frameElement, frameLoadLocalZ);

            return($"Concentrated frame load in global Y direction with intensity {loadValue} and Load Case Numeber {loadCaseNumber} has been assigned to element with ID {frameElement.Number}.");
        }