private void RecalculateReelsLengths() { foreach (var reel in ReelViewModelsList) { reel.Length = CableCalculations.CalculateMaxCableLengthOnReel(reel.Diameter, reel.ReelCoreDiameter, reel.Width, EdgeClearance, CoreDiameter); } }
public string GetCableName(CablePresenter cable, decimal areaInSqrMm, CablePropertySet?cableProperty, PowerWiresColorScheme?powerWiresColorScheme) { _nameBuilder.Clear(); _nameBuilder.Append("КУНРС "); var namePart = _polymerNamePartsDict[cable.CoverPolimerGroupId]; if (cableProperty.HasValue) { _nameBuilder.Append((cableProperty & CablePropertySet.HasFoilShield) == CablePropertySet.HasFoilShield ? "Э" : string.Empty); _nameBuilder.Append((cableProperty & CablePropertySet.HasArmourTube) == CablePropertySet.HasArmourTube ? $"{namePart}K" : string.Empty); } _nameBuilder.Append(namePart); _nameBuilder.Append(cable.CoverPolimerGroupId == 6 ? "нг(А)-FRLS" : "нг(А)-FRHF"); namePart = CableCalculations.FormatConductorArea(areaInSqrMm); _nameBuilder.Append($" {cable.ElementsCount}х{namePart}"); if (powerWiresColorScheme.HasValue) { namePart = powerWiresColorScheme.Value.GetDescription(); } if (!string.IsNullOrEmpty(namePart)) { _nameBuilder.Append($" {namePart}"); } return(_nameBuilder.ToString()); }
public string GetCableTitle(Cable cable, InsulatedBillet mainBillet, CablePropertySet?cableProperty, object parameter = null) { string shield = string.Empty; if (cableProperty.HasValue) { shield = "Э"; } string namePart; if (mainBillet.PolymerGroup.Title == "PVC LS") { namePart = $"КЭВ{shield}Внг(А)-LS "; } else { namePart = $"КЭРс{shield}"; } _nameBuilder = new StringBuilder(namePart); if (cable.CoverPolymerGroup.Title == "HFCompound") { _nameBuilder.Append("Пнг(А)-FRHF "); } if (cable.CoverPolymerGroup.Title == "PUR") { _nameBuilder.Append("Унг(D)-FRHF "); } namePart = CableCalculations.FormatConductorArea(mainBillet.Conductor.AreaInSqrMm); _nameBuilder.Append($"{cable.ElementsCount}х{namePart}"); return(_nameBuilder.ToString()); }
public string GetCableName(Skab cable) { var skabVoltageType = cable.OperatingVoltage.ACVoltage == 380 ? 250 : 660; _nameBuilder.Append($"СКАБ {skabVoltageType}"); if (cable.HasArmourTube) { _nameBuilder.Append("K"); } else if (cable.HasBraidArmour) { _nameBuilder.Append("KГ"); } if (cable.CoverPolymerGroup == PolymerGroup.PUR) { _nameBuilder.Append("У"); } _nameBuilder.Append(cable.FireProtectionClass.Designation); if (cable.CoverPolymerGroup == PolymerGroup.HFCompound || cable.CoverPolymerGroup == PolymerGroup.PUR) { _nameBuilder.Append($"-{cable.ClimaticModification.Title}"); } var namePart = cable.HasIndividualFoilShields ? "э" : string.Empty; _nameBuilder.Append($" {cable.ElementsCount}х{(int)cable.TwistedElementType}{namePart}х"); if (cable.InsulatedBillet.Billet.DeclaredAreaInSqrMm == null) { throw new ArgumentException("Неверные данные! Площадь сечения для кабелей марки СКАБ должна быть обязательно указана!"); } namePart = CableCalculations.FormatConductorArea(cable.InsulatedBillet.Billet.DeclaredAreaInSqrMm ?? 0d); _nameBuilder.Append(namePart + "л"); var braidMod = !cable.HasBraidShield ? "ф" : string.Empty; var fillMod = !cable.HasFilling ? "о" : string.Empty; var waterBlockMod = cable.HasWaterBlockingElements ? "в" : string.Empty; _nameBuilder.Append($" {braidMod}{fillMod}{waterBlockMod}"); _nameBuilder.Append(cable.SparkSafety ? " Ex-i" : string.Empty); return(_nameBuilder.ToString()); }
public string GetCableName(Kunrs cable) { _nameBuilder.Append(cable.HasFoilShield ? "Э" : string.Empty); var namePart = _polymerNamePartsDict[cable.CoverPolymerGroup]; _nameBuilder.Append(cable.HasArmourTube ? $"{namePart}K" : string.Empty); _nameBuilder.Append(namePart); _nameBuilder.Append(cable.FireProtectionClass.Designation); if (cable.InsulatedBillet.Billet.DeclaredAreaInSqrMm == null) { throw new ArgumentException("Неверные данные! Площадь сечения для кабелей марки СКАБ должна быть обязательно указана!"); } namePart = CableCalculations.FormatConductorArea(cable.InsulatedBillet.Billet.DeclaredAreaInSqrMm ?? 0d); _nameBuilder.Append($" {cable.ElementsCount}х{namePart}"); _nameBuilder.Append($" {cable.PowerColorScheme.GetDescription()}"); return(_nameBuilder.ToString()); }
public string GetCableName(CablePresenter cable, decimal areaInSqrMm, CablePropertySet?cableProperty) { _nameBuilder.Clear(); _nameBuilder.Append("КПС"); if (cableProperty.HasValue) { _nameBuilder.Append((cableProperty.Value & CablePropertySet.HasFoilShield) == CablePropertySet.HasFoilShield ? "Э" : string.Empty); _nameBuilder.Append((cableProperty.Value & CablePropertySet.HasMicaWinding) == CablePropertySet.HasMicaWinding ? "С" : string.Empty); } _nameBuilder.Append(cable.CoverPolimerGroupId == 6 ? "нг(А)-FRLS" : "нг(А)-FRHF"); var namePart = cable.TwistedElementTypeId == 2 ? "2х" : string.Empty; var formattedArea = CableCalculations.FormatConductorArea(areaInSqrMm); _nameBuilder.Append($" {cable.ElementsCount}х{namePart}{formattedArea}"); return(_nameBuilder.ToString()); }
public string GetCableName(CablePresenter cable, decimal areaInSqrMm, CablePropertySet?cableProperty) { _nameBuilder.Clear(); var skabVoltageType = cable.OperatingVoltageId == 2 ? 250 : 660; _nameBuilder.Append($"СКАБ {skabVoltageType}"); if ((cableProperty & CablePropertySet.HasArmourTube) == CablePropertySet.HasArmourTube) { _nameBuilder.Append("K"); } else if ((cableProperty & CablePropertySet.HasArmourBraid) == CablePropertySet.HasArmourBraid) { _nameBuilder.Append("KГ"); } if (cable.CoverPolimerGroupId == (long)PolymerGroup.PUR) { _nameBuilder.Append("У"); } _nameBuilder.Append(GetFireProtectDesignationById(cable.FireProtectionId)); string namePart; if (cable.TwistedElementTypeId == 1L) { _nameBuilder.Append($" {cable.ElementsCount}х"); } else { namePart = (cableProperty & CablePropertySet.HasIndividualFoilShields) == CablePropertySet.HasIndividualFoilShields ? "э" : string.Empty; _nameBuilder.Append($" {cable.ElementsCount}х{(int)cable.TwistedElementTypeId}{namePart}х"); } namePart = CableCalculations.FormatConductorArea(areaInSqrMm); _nameBuilder.Append(namePart + "л"); var onlyFoilShield = (cableProperty & CablePropertySet.HasBraidShield) != CablePropertySet.HasBraidShield; var withoutFilling = (cableProperty & CablePropertySet.HasFilling) != CablePropertySet.HasFilling; var hasWaterblockStripe = (cableProperty & CablePropertySet.HasWaterBlockStripe) == CablePropertySet.HasWaterBlockStripe; if (onlyFoilShield || withoutFilling || hasWaterblockStripe) { _nameBuilder.Append(" "); if (onlyFoilShield) { _nameBuilder.Append("ф"); } if (withoutFilling) { _nameBuilder.Append("о"); } if (hasWaterblockStripe) { _nameBuilder.Append("в"); } } if ((cableProperty & CablePropertySet.SparkSafety) == CablePropertySet.SparkSafety) { _nameBuilder.Append(" Ex-i"); } return(_nameBuilder.ToString()); }
public string GetCableTitle(CablePresenter cable, decimal areaInSqrMm, CablePropertySet?cableProperty, object parameter = null) { _nameBuilder.Clear(); if (cable.CoverPolimerGroupId == 7) //PVC LSLTx { _nameBuilder.Append("ЛОУТОКС "); } _nameBuilder.Append("КПСВ"); if (cableProperty != null && (cableProperty & CablePropertySet.HasFoilShield) == CablePropertySet.HasFoilShield) { _nameBuilder.Append("Э"); } string namePart = string.Empty; switch (cable.CoverPolimerGroupId) { case 1: //PVC case 11: //PVC Term case 6: //PVC LS case 10: //PVC Cold case 7: //PVC LSLTx namePart = "В"; break; case 12: //PE Self Extinguish namePart = "Пс"; break; } _nameBuilder.Append(namePart); if (cableProperty != null && (cableProperty & CablePropertySet.HasArmourBraid) == CablePropertySet.HasArmourBraid) { if ((cableProperty & CablePropertySet.HasArmourTube) == CablePropertySet.HasArmourTube) { _nameBuilder.Append($"К{namePart}"); } else { _nameBuilder.Append("КГ"); } } if (cableProperty != null && (cableProperty & CablePropertySet.HasArmourTape | CablePropertySet.HasArmourTube) == (CablePropertySet.HasArmourTape | CablePropertySet.HasArmourTube)) { _nameBuilder.Append($"Б{namePart}"); } if (cable.CoverPolimerGroupId == 11) { _nameBuilder.Append("т"); } if (cable.CoverPolimerGroupId == 10) { _nameBuilder.Append("м"); } if (cable.CoverPolimerGroupId == 6) { _nameBuilder.Append("нг(А)-LS"); } if (cable.CoverPolimerGroupId == 7) { _nameBuilder.Append("нг(А)-LSLTx"); } var cableConductorArea = areaInSqrMm; namePart = CableCalculations.FormatConductorArea(cableConductorArea); _nameBuilder.Append($" {cable.ElementsCount}х2х{namePart}"); return(_nameBuilder.ToString()); }
public string GetCableTitle(Cable cable, InsulatedBillet billet, CablePropertySet?cableProperty, object parameter = null) { _nameBuilder.Clear(); if (cable.CoverPolymerGroup.Title == "PVC LSLTx") { _nameBuilder.Append("ЛОУТОКС "); } _nameBuilder.Append("КПСВ"); if (cableProperty != null && (cableProperty & CablePropertySet.HasFoilShield) == CablePropertySet.HasFoilShield) { _nameBuilder.Append("Э"); } string namePart = string.Empty; switch (cable.CoverPolymerGroup.Title) { case "PVC": case "PVC Term": case "PVC LS": case "PVC Cold": case "PVC LSLTx": namePart = "В"; break; case "PE Self Extinguish": namePart = "Пс"; break; } _nameBuilder.Append(namePart); if (cableProperty != null && (cableProperty & CablePropertySet.HasArmourBraid) == CablePropertySet.HasArmourBraid) { if ((cableProperty & CablePropertySet.HasArmourTube) == CablePropertySet.HasArmourTube) { _nameBuilder.Append($"К{namePart}"); } else { _nameBuilder.Append("КГ"); } } if (cableProperty != null && (cableProperty & CablePropertySet.HasArmourTape | CablePropertySet.HasArmourTube) == (CablePropertySet.HasArmourTape | CablePropertySet.HasArmourTube)) { _nameBuilder.Append($"Б{namePart}"); } if (cable.CoverPolymerGroup.Title == "PVC Term") { _nameBuilder.Append("т"); } if (cable.CoverPolymerGroup.Title == "PVC Cold") { _nameBuilder.Append("м"); } if (cable.CoverPolymerGroup.Title == "PVC LS") { _nameBuilder.Append("нг(А)-LS"); } if (cable.CoverPolymerGroup.Title == "PVC LSLTx") { _nameBuilder.Append("нг(А)-LSLTx"); } var cableConductorArea = billet.Conductor.AreaInSqrMm; namePart = CableCalculations.FormatConductorArea(cableConductorArea); _nameBuilder.Append($" {cable.ElementsCount}х2х{namePart}"); return(_nameBuilder.ToString()); }
public string GetCableTitle(Cable cable, InsulatedBillet mainBillet, CablePropertySet?cableProperty, object parameter = null) { _nameBuilder.Clear(); _nameBuilder.Append($"СКАБ "); if (cable.OperatingVoltage.ACVoltage == 380 && cable.OperatingVoltage.ACFriquency == 400 && cable.OperatingVoltage.DCVoltage == 540) { _nameBuilder.Append(250); } if (cable.OperatingVoltage.ACVoltage == 660 && cable.OperatingVoltage.ACFriquency == 400 && cable.OperatingVoltage.DCVoltage == 1000) { _nameBuilder.Append(660); } if ((cableProperty & CablePropertySet.HasArmourTube) == CablePropertySet.HasArmourTube) { _nameBuilder.Append("К"); } else if ((cableProperty & CablePropertySet.HasArmourBraid) == CablePropertySet.HasArmourBraid) { _nameBuilder.Append("КГ"); } if (cable.CoverPolymerGroup.Title == "PUR") { _nameBuilder.Append("У"); } string namePart; var fireClassDesignation = cable.FireProtectionClass.Designation; namePart = fireClassDesignation.Contains("HF") ? "-ХЛ" : string.Empty; _nameBuilder.Append(fireClassDesignation); _nameBuilder.Append(namePart); if (cable.TwistedElementType.Id == 1) { _nameBuilder.Append($" {cable.ElementsCount}х"); } else { namePart = (cableProperty & CablePropertySet.HasIndividualFoilShields) == CablePropertySet.HasIndividualFoilShields ? "э" : string.Empty; _nameBuilder.Append($" {cable.ElementsCount}х{cable.TwistedElementType.Id}{namePart}х"); } namePart = CableCalculations.FormatConductorArea(mainBillet.Conductor.AreaInSqrMm); _nameBuilder.Append(namePart + "л"); var onlyFoilShield = (cableProperty & CablePropertySet.HasBraidShield) != CablePropertySet.HasBraidShield; var withoutFilling = (cableProperty & CablePropertySet.HasFilling) != CablePropertySet.HasFilling; var hasWaterblockStripe = (cableProperty & CablePropertySet.HasWaterBlockStripe) == CablePropertySet.HasWaterBlockStripe; if (onlyFoilShield || withoutFilling || hasWaterblockStripe) { _nameBuilder.Append(" "); if (onlyFoilShield) { _nameBuilder.Append("ф"); } if (withoutFilling) { _nameBuilder.Append("о"); } if (hasWaterblockStripe) { _nameBuilder.Append("в"); } } if ((cableProperty & CablePropertySet.SparkSafety) == CablePropertySet.SparkSafety) { _nameBuilder.Append(" Ex-i"); } return(_nameBuilder.ToString()); }