public double GetDepthAtPoint(Point3d point, FeatureLine existingGround, FeatureLine proposedGround)
        {
            NHBC2020FoundationDepth depth = new NHBC2020FoundationDepth();

            depth.ExistingGroundLevel = existingGround.GetElevationAtPoint(point);
            depth.ProposedGroundLevel = proposedGround.GetElevationAtPoint(point);

            /*if (ProposedGround != null)
             * {
             *  FeatureLine proposedLine = GetFeatureLine(this.BaseObject, soilSurfaceContainer.ProposedGround);
             *  depth.ProposedGroundLevel = proposedLine.MinElevation;
             * }*/

            switch (SoilProperties.SoilShrinkability)
            {
            case Shrinkage.High:
                depth.SoilPlasticity = VolumeChangePotential.High;
                break;

            case Shrinkage.Medium:
                depth.SoilPlasticity = VolumeChangePotential.Medium;
                break;

            case Shrinkage.Low:
                depth.SoilPlasticity = VolumeChangePotential.Low;
                break;
            }

            depth.Run();

            return(depth.FoundationDepth.Value);
        }
Exemplo n.º 2
0
        public void ExistingGroundRequired()
        {
            NHBC2020FoundationDepth calc = new NHBC2020FoundationDepth();

            CalculationContext context = new CalculationContext();

            Assert.Throws(typeof(ArgumentNullException), () => calc.Run(new OutputBuilder()));
            Assert.IsFalse(calc.Calculated, "Calculation should not have completed");
        }
Exemplo n.º 3
0
        public double CalculateFoundationDepth(double?existingGround, double?proposedGround, double?existingTrees, double?proposedTrees, double?removedTrees, double?topOfConcrete, VolumeChangePotential?changePotential)
        {
            NHBC2020FoundationDepth calc = new NHBC2020FoundationDepth();

            calc.ExistingGroundLevel   = existingGround;
            calc.ProposedGroundLevel   = proposedGround;
            calc.ExistingTreeInfluence = existingTrees;
            calc.ProposedTreeInfluence = proposedTrees;
            calc.RemovedTreeInfluence  = removedTrees;
            calc.TopOfConcreteLevel    = topOfConcrete;
            calc.SoilPlasticity        = changePotential;
            calc.Run(new OutputBuilder());

            Assert.IsTrue(calc.Calculated, "Calculation failed to complete successfully");

            return(calc.FoundationDepth.Value);
        }
 private ConceptualPlot() : base()
 {
     _depth = new NHBC2020FoundationDepth();
 }
 public ConceptualPlot(PolylineDrawingObject drawingObject) : base(drawingObject)
 {
     _depth = new NHBC2020FoundationDepth();
 }