From c7ac8bacf949d96f90b9e6df1274fbc50d062245 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Wed, 3 Jul 2019 17:57:26 +0000 Subject: [PATCH] =?UTF-8?q?Integration=202.1g3=20:=20-=20corretta=20esport?= =?UTF-8?q?azione=20contorno=20libero=20chiuso=20-=20corretta=20esportazio?= =?UTF-8?q?ne=20contorno=20libero=20con=20ultima=20entit=C3=A0=20un=20arco?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IntegrationEgaltech/BTL.cs | 14 ++++++++++---- IntegrationEgaltech/Properties/AssemblyInfo.cs | 4 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/IntegrationEgaltech/BTL.cs b/IntegrationEgaltech/BTL.cs index dd7c2f6..fa8d586 100644 --- a/IntegrationEgaltech/BTL.cs +++ b/IntegrationEgaltech/BTL.cs @@ -119,7 +119,13 @@ namespace ib.essetre.integration.egaltech if ( singleFeature.sag1 == "") return ; - string[] arrParam = singleFeature.sag1.Split( new string[] { "POLY([", "),", ")],'P','O')" }, StringSplitOptions.RemoveEmptyEntries) ; + string[] arrParam = singleFeature.sag1.Split( new string[] { "POLY([", "),", ")]" }, StringSplitOptions.RemoveEmptyEntries) ; + // Se chiusa, copio il primo punto nell'ultimo elemento + if ( arrParam[arrParam.Length-1] == ",'P','C')") + arrParam[arrParam.Length-1] = arrParam[0] ; + // altrimenti aperta, quindi elimino l'ultimo elemento + else + Array.Resize( ref arrParam, arrParam.Length-1) ; // Se il parametro Q10 è 1, l'ordine dell'array viene invertito if ( singleFeature.processParameters[35] == "1") @@ -140,9 +146,9 @@ namespace ib.essetre.integration.egaltech tw.Write("P01:" + MultAndConvertTo8(parts[1]) + " "); // x tw.Write("P02:" + MultAndConvertTo8(parts[2]) + " "); // y tw.Write("P03:" + MultAndConvertTo8(parts[3]) + " "); // z - tw.Write("P05:" + Constants.EIGHT_ZEROS + " "); + tw.Write("P05:" + MultAndConvertTo8(singleFeature.processParameters[4]) + " "); tw.Write("P06:" + Constants.EIGHT_ZEROS + " "); - tw.Write("P07:" + Constants.EIGHT_ZEROS + " "); + tw.Write("P07:" + MultAndConvertTo8(singleFeature.processParameters[6]) + " "); tw.Write("P08:" + Constants.EIGHT_ZEROS + " "); if ( i == arrParam.Length - 1) // Verifica se ci troviamo all'ultimo parametro di POLY tw.Write("P09:" + Constants.EIGHT_ZEROS + " "); // L'ultimo elemento di POLY deve avere "P09: 00000000" @@ -200,7 +206,7 @@ namespace ib.essetre.integration.egaltech tw.Write("P06:" + Constants.EIGHT_ZEROS + " "); tw.Write("P07:" + Constants.EIGHT_ZEROS + " "); tw.Write("P08:" + "00000200" + " "); - if ( i == arrParam.Length - 1) + if ( i == arrParam.Length - 2) tw.Write("P09:" + Constants.EIGHT_ZEROS + " "); else tw.Write("P09:" + MultAndConvertTo8((Convert.ToDouble(singleFeature.processParameters[8]) + i - count).ToString()) + " "); diff --git a/IntegrationEgaltech/Properties/AssemblyInfo.cs b/IntegrationEgaltech/Properties/AssemblyInfo.cs index 59d2044..16b4e39 100644 --- a/IntegrationEgaltech/Properties/AssemblyInfo.cs +++ b/IntegrationEgaltech/Properties/AssemblyInfo.cs @@ -36,5 +36,5 @@ using System.Runtime.InteropServices; // È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build // usando l'asterisco '*' come illustrato di seguito: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2.1.7.2")] -[assembly: AssemblyFileVersion("2.1.7.2")] +[assembly: AssemblyVersion("2.1.7.3")] +[assembly: AssemblyFileVersion("2.1.7.3")]