From f77795f1d05159bc35756f2ea4f0eb843d0bdafa Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 21 Jul 2026 10:57:11 +0200 Subject: [PATCH] =?UTF-8?q?OmagCUT=203.1g2=20:=20-=20aggiunta=20possibilit?= =?UTF-8?q?=C3=A0=20di=20estendere=20l'area=20della=20tavola=20per=20spost?= =?UTF-8?q?are=20i=20pezzi=20gi=C3=A0=20lavorati=20(da=20Ini=20Macchina=20?= =?UTF-8?q?[RawMove]=20TableExtend=3DDX+,DY+,DX-DY-).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CadCuts/MoveRawPartPage.xaml.vb | 14 ++++++----- CadCuts/SplitAuto.vb | 19 +++++++++++++++ Constants/ConstMachIni.vb | 1 + My Project/AssemblyInfo.vb | 4 +-- My Project/Resources.Designer.vb | 4 +-- My Project/Settings.Designer.vb | 42 +++++++++++++++++--------------- OmagCUT.vbproj | 6 +++++ 7 files changed, 60 insertions(+), 30 deletions(-) diff --git a/CadCuts/MoveRawPartPage.xaml.vb b/CadCuts/MoveRawPartPage.xaml.vb index ae439dc..1c94d72 100644 --- a/CadCuts/MoveRawPartPage.xaml.vb +++ b/CadCuts/MoveRawPartPage.xaml.vb @@ -773,7 +773,7 @@ Public Class MoveRawPartPage Dim ptRawCen As Point3d EgtGetRawPartCenter(nRawId, ptRawCen) m_CurrProjPage.ClearMessage() - VerifyReleasdAngleIsValid(dAng, ptRawCen) + VerifyReleaseAngleIsValid(dAng, ptRawCen) ' ----------- FINE verifica di essere entro i limiti macchina ----------- If EgtRotateRawPart(nRawId, Vector3d.Z_AX(), dAng) Then '' Recupero il centro del grezzo @@ -807,7 +807,7 @@ Public Class MoveRawPartPage Dim ptRawCen As Point3d EgtGetRawPartCenter(nRawId, ptRawCen) m_CurrProjPage.ClearMessage() - VerifyReleasdAngleIsValid(dAng, ptRawCen) + VerifyReleaseAngleIsValid(dAng, ptRawCen) ' ----------- FINE verifica di essere entro i limiti macchina ----------- If EgtRotateRawPart(nRawId, Vector3d.Z_AX(), dAng) Then '' Recupero il centro del grezzo @@ -832,7 +832,7 @@ Public Class MoveRawPartPage #End Region ' Rotate CounterClockWise/ClockWise ' verifica che la rotazione da raggiungere sia nei limiti delle corse - Private Function VerifyReleasdAngleIsValid(ByRef dAngDeg As Double, ByVal ptCenter As Point3d) As Boolean + Private Function VerifyReleaseAngleIsValid(ByRef dAngDeg As Double, ByVal ptCenter As Point3d) As Boolean Dim bOk As Boolean = True ' determino il punto finale dello spostamento Dim ptEndPointLift As Point3d = VacuumCups.m_ptStartPointLift @@ -1096,7 +1096,7 @@ Public Class MoveRawPartPage EgtDraw() End Sub - ' calcolo la poszione del Pezzo/Grezzo presente sulla tavola + ' calcolo la posizione del Pezzo/Grezzo presente sulla tavola Private Function DispositionRawOnTable(nRawId As Integer, ByRef dMyAngH As Double, ByRef AngVacList As List(Of Double)) As Boolean Dim nPartId As Integer If EgtVerifyRawPartCurrPhase(nRawId) Then @@ -1234,10 +1234,12 @@ Public Class MoveRawPartPage Return True End Function - ' crea una nuvoa fase/disposizione, la rende corrente, ricalcolo i grezzi e le lavorazioni della nuova fase + ' crea una nuova fase/disposizione, la rende corrente, ricalcolo i grezzi e le lavorazioni della nuova fase Private Function AddNewPhase() As Boolean ' Creo nuova fase Dim nNewPhase As Integer = EgtAddPhase() + ' Eventuale allargamento area valida di tavola + ExtendTableArea() ' Carico i grezzi rimasti sulla tavola nella nuova fase ChangePhaseRawPart(nNewPhase) ' Sposto le lavorazioni rimaste nella nuova fase @@ -1402,7 +1404,7 @@ Public Class MoveRawPartPage ' se la tavola di scarico presente oppure ci sono pezzi sulla tavola di scarico Dim LclLstOfUnldPart As New List(Of Integer) If m_SplitPage.m_bOnAuxTab Or PartOnAuxTab(LclLstOfUnldPart, m_nCurrPhase) Then - ' se ci sono pezzi sulla tavola di scarico prima di procedere inserisco una pausa e creo una nuoava fase + ' se ci sono pezzi sulla tavola di scarico prima di procedere inserisco una pausa e creo una nuova fase If m_IsCurrPhaseUnloaded AndAlso InsertPauseInCurrPhase() Then AddNewPhase() ' nascondo la tavola di scarico EgtDisableModified() diff --git a/CadCuts/SplitAuto.vb b/CadCuts/SplitAuto.vb index c7ecabf..91de45e 100644 --- a/CadCuts/SplitAuto.vb +++ b/CadCuts/SplitAuto.vb @@ -415,6 +415,8 @@ Public Module SplitAuto Dim ptOri As Point3d EgtGetTableRef(1, ptOri) Dim vtOri As New Vector3d(ptOri.x, ptOri.y, ptOri.z) + ' Eventuale allargamento area valida di tavola + ExtendTableArea() ' ---------------------------------- GREZZI ---------------------------------- ' Eseguo eventuali spezzature dei grezzi e vi sposto i pezzi (i grezzi devono essere sempre copiati per Registrazione con rotazione) Dim nRawId As Integer = EgtGetFirstRawPart() @@ -1019,4 +1021,21 @@ Public Module SplitAuto Return dMustache + dExtraL End Function + Public Function ExtendTableArea() As Boolean + ' Eventuale allargamento + Dim sTabExt As String = "" + If GetPrivateProfileString(S_MACH_RAWMOVE, K_MACH_TABLEEXTEND, "", sTabExt, m_MainWindow.GetMachIniFile()) > 0 Then + Dim sItems() As String = sTabExt.Split(","c) + Dim dExts() As Double = {0, 0, 0, 0} + For nI As Integer = 0 To sItems.Count() - 1 + If nI < 4 Then + Dim dVal As Double + If StringToDouble( sItems(nI), dVal) AndAlso dVal > 0 Then dExts( nI) = dVal + End If + Next + EgtSetTableAreaOffset(dExts(0), dExts(1), dExts(2), dExts(3)) + End If + Return True + End Function + End Module \ No newline at end of file diff --git a/Constants/ConstMachIni.vb b/Constants/ConstMachIni.vb index 73d2cbf..edf1e94 100644 --- a/Constants/ConstMachIni.vb +++ b/Constants/ConstMachIni.vb @@ -288,6 +288,7 @@ Public Const K_MACH_WEIGHT_DOUBLEPLUGGER As String = "MaxWeightDoublePlugger" Public Const K_MACH_ROTATEVACUUMFOREXTRASTROKEY As String = "RotateVacuumForExtraStrokeY" Public Const K_MACH_ROTATEVACUUMFOREXTRASTROKEX As String = "RotateVacuumForExtraStrokeX" + Public Const K_MACH_TABLEEXTEND As String = "TableExtend" Public Const K_ISNEWSCRAPS As String = "IsNewScraps" Public Const K_DATABASEID As String = "DatabaseID" diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 8c9e249..51046ac 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -62,5 +62,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + + diff --git a/My Project/Resources.Designer.vb b/My Project/Resources.Designer.vb index 1717160..e340117 100644 --- a/My Project/Resources.Designer.vb +++ b/My Project/Resources.Designer.vb @@ -1,7 +1,7 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.34209 +' Runtime Version:4.0.30319.42000 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -22,7 +22,7 @@ Namespace My.Resources ''' ''' A strongly-typed resource class, for looking up localized strings, etc. ''' - _ diff --git a/My Project/Settings.Designer.vb b/My Project/Settings.Designer.vb index 160711a..0da4fd8 100644 --- a/My Project/Settings.Designer.vb +++ b/My Project/Settings.Designer.vb @@ -1,7 +1,7 @@ '------------------------------------------------------------------------------ ' ' This code was generated by a tool. -' Runtime Version:4.0.30319.34209 +' Runtime Version:4.0.30319.42000 ' ' Changes to this file may cause incorrect behavior and will be lost if ' the code is regenerated. @@ -12,15 +12,16 @@ Option Strict On Option Explicit On - - _ -Partial Friend NotInheritable Class MySettings - Inherits Global.System.Configuration.ApplicationSettingsBase - - Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) +Namespace My + _ + Partial Friend NotInheritable Class MySettings + Inherits Global.System.Configuration.ApplicationSettingsBase + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) + #Region "My.Settings Auto-Save Functionality" #If _MyType = "WindowsForms" Then Private Shared addedHandler As Boolean @@ -28,17 +29,17 @@ Partial Friend NotInheritable Class MySettings Private Shared addedHandlerLockObject As New Object _ - Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) + Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs) If My.Application.SaveMySettingsOnExit Then My.Settings.Save() End If End Sub #End If #End Region - - Public Shared ReadOnly Property [Default]() As MySettings - Get - + + Public Shared ReadOnly Property [Default]() As MySettings + Get + #If _MyType = "WindowsForms" Then If Not addedHandler Then SyncLock addedHandlerLockObject @@ -49,10 +50,11 @@ Partial Friend NotInheritable Class MySettings End SyncLock End If #End If - Return defaultInstance - End Get - End Property -End Class + Return defaultInstance + End Get + End Property + End Class +End Namespace Namespace My @@ -62,9 +64,9 @@ Namespace My Friend Module MySettingsProperty _ - Friend ReadOnly Property Settings() As Global.OmagCUT.MySettings + Friend ReadOnly Property Settings() As Global.OmagCUT.My.MySettings Get - Return Global.OmagCUT.MySettings.Default + Return Global.OmagCUT.My.MySettings.Default End Get End Property End Module diff --git a/OmagCUT.vbproj b/OmagCUT.vbproj index 4108703..b388100 100644 --- a/OmagCUT.vbproj +++ b/OmagCUT.vbproj @@ -25,6 +25,7 @@ 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 + false AnyCPU @@ -39,6 +40,7 @@ 41999,42016,42017,42018,42019,42020,42021,42022,42032,42036 + false On @@ -64,6 +66,7 @@ MinimumRecommendedRules.ruleset + false false @@ -78,6 +81,7 @@ false + false @@ -100,6 +104,7 @@ pdbonly AnyCPU MinimumRecommendedRules.ruleset + false bin\x86\Trial\ @@ -110,6 +115,7 @@ x86 MinimumRecommendedRules.ruleset TRIAL=True + false