private ConceptualPlot BuildConceptualPlot(FoundationInput input, Document doc, Transaction trans) { ConceptualPlot plot; DataService.Current.PopulateStoreTypes(); SoilProperties props = DataService.Current.GetStore <StructureDocumentStore>(doc.Name).SoilProperties; props.ExistingGroundSurfaceName = input.ExistingGround; props.ProposedGroundSurfaceName = input.ProposedGround; ObjectId obj = doc.Database.GetObjectId(false, new Handle(146034), 0); DBObject ent = trans.GetObject(obj, OpenMode.ForWrite); PolylineDrawingObject polyObject = new PolylineDrawingObject(ent as Polyline); plot = new ConceptualPlot(polyObject); CivSurface existingGround = GetSurface(props.ExistingGroundSurfaceName); CivSurface proposedGround = GetSurface(props.ProposedGroundSurfaceName); plot.EstimateFoundationLevel(existingGround, proposedGround, props); plot.RenderFoundations(props.DepthBands, null); return(plot); }
public string AddHatchResident(FoundationInput input) { Document doc = Application.DocumentManager.MdiActiveDocument; ConceptualPlot plot; using (Transaction trans = doc.TransactionManager.StartTransaction()) { plot = BuildConceptualPlot(input, doc, trans); return(ColorTranslator.ToHtml(plot.DepthHatch.Color.ColorValue)); } }
public void AddHatch(string exGround, string propGround, string expectedResult) { FoundationInput input = new FoundationInput() { ExistingGround = exGround, ProposedGround = propGround }; string hatchColor = RunTest <string>(nameof(AddHatchResident), input); StringAssert.AreEqualIgnoringCase(expectedResult, hatchColor); }
public void EstimateFoundations(string exGround, string propGround, double expectedResult) { FoundationInput input = new FoundationInput() { ExistingGround = exGround, ProposedGround = propGround }; FoundationLevels levels = RunTest <FoundationLevels>(nameof(EstimateFoundationsResident), input); Assert.AreEqual(expectedResult, levels.FoundationLevel, 0.001); }
public FoundationLevels EstimateFoundationsResident(FoundationInput input) { Document doc = Application.DocumentManager.MdiActiveDocument; ConceptualPlot plot; using (Transaction trans = doc.TransactionManager.StartTransaction()) { plot = BuildConceptualPlot(input, doc, trans); FoundationLevels result = new FoundationLevels() { FoundationLevel = plot.FoundationDepth }; return(result); } }