From f93e98c0f9f399cb018f440041e53c0e6e94e381 Mon Sep 17 00:00:00 2001 From: Serghei Cebotari Date: Sun, 16 Feb 2025 11:01:04 +0300 Subject: Sleeves calc fix --- RhSolutions.AddIn/Properties/AssemblyInfo.cs | 4 ++-- RhSolutions.AddIn/Services/SleevesCalculator.cs | 4 ++-- .../TestWorkbooks/TestSpecificationSleeves.xlsx | Bin 356040 -> 356159 bytes 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/RhSolutions.AddIn/Properties/AssemblyInfo.cs b/RhSolutions.AddIn/Properties/AssemblyInfo.cs index 77dd608..0144653 100644 --- a/RhSolutions.AddIn/Properties/AssemblyInfo.cs +++ b/RhSolutions.AddIn/Properties/AssemblyInfo.cs @@ -32,6 +32,6 @@ using Microsoft.Extensions.Configuration.UserSecrets; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.10.1.0")] -[assembly: AssemblyFileVersion("1.10.1.0")] +[assembly: AssemblyVersion("1.10.2.0")] +[assembly: AssemblyFileVersion("1.10.2.0")] [assembly: UserSecretsId("d4bb704e-14a5-421f-8f2d-0ffb66d090a2")] diff --git a/RhSolutions.AddIn/Services/SleevesCalculator.cs b/RhSolutions.AddIn/Services/SleevesCalculator.cs index 13a60d1..f4de418 100644 --- a/RhSolutions.AddIn/Services/SleevesCalculator.cs +++ b/RhSolutions.AddIn/Services/SleevesCalculator.cs @@ -5,9 +5,9 @@ namespace RhSolutions.Services; public class SleevesCalculator : IFittingsCalculator { private const string doublePattern = - @"((?i)равнопроходная|угольник\s+90|угольник\s+45|Т-образная|Комплект\s+трубок(?i))(.+?\b(?16|20|25|32|40|50|63)\b)+"; + @"((?i)равнопроходная|угольник\D+90|угольник\D+45|Т-образная|Комплект\s+трубок(?-i))(.+?\b(?16|20|25|32|40|50|63)\b)+"; private const string singlePattern = - @"((?i)муфта|тройник|переходник|угольник|штуцер|Г-образная|заглушка(?i))(.+?\b(?16|20|25|32|40|50|63)\b)+"; + @"((?i)муфта|тройник|переходник|угольник|штуцер|Г-образная|заглушка(?-i))(.+?\b(?16|20|25|32|40|50|63)\b)+"; public Dictionary Calculate(Dictionary products) { diff --git a/RhSolutions.Tests/TestWorkbooks/TestSpecificationSleeves.xlsx b/RhSolutions.Tests/TestWorkbooks/TestSpecificationSleeves.xlsx index 13fcb4e..073dbfe 100644 Binary files a/RhSolutions.Tests/TestWorkbooks/TestSpecificationSleeves.xlsx and b/RhSolutions.Tests/TestWorkbooks/TestSpecificationSleeves.xlsx differ -- cgit v1.2.3