public ParkingBuilding(BlockReference blRef, string blName) : base(blRef, blName) { IdBlRef = blRef.Id; Height = Floors * 3; FriendlyTypeName = "Паркинг"; BuildingType = BuildingTypeEnum.Garage; var valPlaces = BlockBase.GetPropValue <string>(ParamPlaces, exactMatch: false); var resPlaces = AcadLib.Strings.StringHelper.GetStartInteger(valPlaces); if (resPlaces.Success) { Places = resPlaces.Value; } else { BlockBase.AddError($"Не определено кол машиномест из параметра {ParamPlaces} = {valPlaces}"); } // Полилиния контура var plContour = BlockBase.FindPolylineInLayer(LayerContour).FirstOrDefault(); if (plContour == null) { Inspector.AddError($"Не определена полилиния контура здания парковки на слое {LayerContour}.", IdBlRef, System.Drawing.SystemIcons.Warning); } else { IdPlContour = plContour.Id; } }
public TowerKPBS(BlockReference blRef, string blName) : base(blRef, blName) { AreaBKFN = BlockBase.GetPropValue <double>(propAreaBKFN); AreaGNS = BlockBase.GetPropValue <double>(propAreaGNS); AreaLive = BlockBase.GetPropValue <double>(propAreaLive); FriendlyTypeName = "башня СЭМ2"; }
/// <summary> /// Определение высоты /// </summary> /// <returns></returns> private double DefineHeight() { HeightFirstFloor = BlockBase.GetPropValue(PropHeightFirstFloor, 3.6, writeDefaultValue: true); HeightTypicalFloors = BlockBase.GetPropValue(PropHeightTypicalFloor, 2.9, writeDefaultValue: true); HeightTechnicalFloor = BlockBase.GetPropValue(PropHeightTechFloor, 1.6, writeDefaultValue: true); return(CalcHeight(HeightFirstFloor, HeightTypicalFloors, HeightTechnicalFloor, Floors)); }
public BuildingBlockBase(BlockReference blRef, string blName) : base(blRef) { BlockBase = new BlockBase(blRef, blName); ExtentsInModel = blRef.GeometricExtentsСlean(); Floors = BlockBase.GetPropValue <int>("^ЭТАЖ", exactMatch: false); IsProjectedBuilding = true; }
private int GetPlaces(string paramName) { int value = 0; string input = BlockBase.GetPropValue <string>(paramName, exactMatch: false); // 100 круглый var resInt = AcadLib.Strings.StringHelper.GetStartInteger(input); if (resInt.Success) { value = resInt.Value; } else { BlockBase.AddError($"Не определено '{paramName}' из параметра - {input}"); } return(value); }
public BlockSectionGP(BlockReference blRef, string blName) : base(blRef, blName) { FriendlyTypeName = "б/с ПИК1"; // Кол этажей //Floors = BlockBase.GetPropValue<int>(SettingsBS.Default.AttrNumberFloor); //Height = Floors * 3 + 3; // Наименование Name = BlockBase.GetPropValue <string>(AttrName); // Площадь БКФН AreaBKFN = BlockBase.GetPropValue <double>(AttrAreaBKFN); //if (Floors >= 30) // AreaBKFN *= 0.92; // Площадь квартир на одном этаже AreaLive = BlockBase.GetPropValue <double>(AttrAreaApart); // Площадь квартир общая на секцию (по всем этажам кроме 1) //AreaApartTotal = GetPropValue<double>(SettingsBS.Default.AttrAreaApartTotal); AreaApartTotal = CalcAreaApartTotal(); }
public SocialBuilding(BlockReference blRef, string blName, string layerPlContour) : base(blRef, blName) { Type = BlockBase.GetPropValue <string>("^ТИП", exactMatch: false); Height = Floors * 4; Places = GetPlaces(ParamPlaces); BuildingType = BuildingTypeEnum.Social; // Полилиния контура здания var plContour = BlockBase.FindPolylineInLayer(layerPlContour).FirstOrDefault(); if (plContour == null) { Inspector.AddError($"Не определена полилиния котура здания на слое {layerPlContour}.", System.Drawing.SystemIcons.Warning); } else { IdPlContour = plContour.Id; } }
public BlockSectionBase(BlockReference blRef, string blName) : base(blRef, blName) { //ExtentsInModel = BlockBase.Bounds.Value; // Определить параметры блок-секции: площадь,этажность FriendlyTypeName = "Блок-секция"; Height = DefineHeight(); // Относительный уровень Elevation = BlockBase.GetPropValue <double>(PropElevation, false, true); // Площадь по внешней полилинии Polyline plLayer; var plContour = BlockSectionContours.FindContourPolyline(blRef, out plLayer); if (plContour == null) { throw new Exception("Не определен контур блок-секции"); } else { IdPlContour = plContour.Id; AreaGNS = plContour.Area; } }