OmagCUT :

- aggiustamento automatico tagli inclinati con talloni e regioni pezzi al cambio spessore grezzo (#2990).
This commit is contained in:
Dario Sassi
2026-06-07 19:16:58 +02:00
parent cab4e9192c
commit e720c129bf
2 changed files with 21 additions and 8 deletions
+3 -3
View File
@@ -1862,7 +1862,7 @@ Public Class NestPageUC
End If
End Function
Private Function AdjustPartSideAngleHeel(nPartId As Integer, dTh As Double) As Boolean
Friend Function AdjustPartSideAngleHeel(nPartId As Integer, dTh As Double) As Boolean
' Recupero entità del layer esterno e di quelli interni
Dim vEnt As New List(Of Integer)
Dim nEntId As Integer = EgtGetFirstInGroup(EgtGetFirstNameInGroup(nPartId, NAME_OUTLOOP))
@@ -1915,7 +1915,7 @@ Public Class NestPageUC
EgtRemoveInfo(nEnt, INFO_DEPTH2)
EgtRemoveInfo(nEnt, INFO_AGG2)
End If
' Inclinazione interna
' Inclinazione interna
Else
' Se tallone inferiore a spessore
If dHeel < dTh - 10 * EPS_SMALL Then
@@ -1932,7 +1932,7 @@ Public Class NestPageUC
EgtRemoveInfo(nEnt, INFO_AGG2)
End If
End If
' Se altrimenti inclinazione esterna
' Se altrimenti inclinazione esterna
ElseIf dSideAng > EPS_ANG_SMALL Then
If Not bSizeOnTop Then
EgtSetInfo(nEnt, INFO_OFFSET, -dTh * Math.Tan(dSideAng * Math.PI / 180))
+18 -5
View File
@@ -1,5 +1,6 @@
Imports System.IO
Imports System.Runtime.Remoting.Metadata.W3cXsd2001
Imports System.Security.Cryptography
Imports EgtUILib
Imports EgtWPFLib
@@ -1808,11 +1809,11 @@ Public Class RawPartPageUC
If nRawId = GDB_ID.NULL And m_RawHeight > EPS_SMALL Then
m_CurrProjPage.m_nRawId = EgtAddRawPart(Point3d.ORIG(), m_RawLength + 2 * m_RawKerf,
m_RawWidth + 2 * m_RawKerf, m_RawHeight, Col)
' se esiste e da cancellare
' se esiste e da cancellare
ElseIf m_RawHeight < EPS_SMALL Then
EgtRemoveRawPart(nRawId)
m_CurrProjPage.m_nRawId = GDB_ID.NULL
' Altrimenti lo modifico
' Altrimenti lo modifico
Else
m_CurrProjPage.m_nRawId = nRawId
EgtModifyRawPart(nRawId, Point3d.ORIG(), m_RawLength + 2 * m_RawKerf,
@@ -1905,7 +1906,7 @@ Public Class RawPartPageUC
If m_CurrProjPage.m_nRawId = GDB_ID.NULL Then
UpdateRawPart(True)
Return
' se da cancellare
' se da cancellare
ElseIf m_RawHeight < EPS_SMALL Then
' Se ci sono pezzi
If EgtGetFirstPartInRawPart(m_CurrProjPage.m_nRawId) <> GDB_ID.NULL Then
@@ -1930,7 +1931,7 @@ Public Class RawPartPageUC
' Imposto modalità rettangolo
RawModeCmBx.SelectedIndex = RAWMODE.RECTANGLE
PointsGpBx.Visibility = Windows.Visibility.Hidden
' altrimenti da aggiornare
' altrimenti da aggiornare
Else
' Salvo vecchia altezza
Dim dOldHeight As Double = GetRawHeight()
@@ -1943,10 +1944,22 @@ Public Class RawPartPageUC
If nKerfId <> GDB_ID.NULL Then
EgtMove(nKerfId, vtMove)
End If
' Se ci sono pezzi ne aggiorno la quota
' Recupero il tipo di progetto (pezzi piani o cornici)
Dim nPrjType As Integer = m_CurrProjPage.GetCurrentProjectType()
' Se ci sono pezzi
Dim nPartId As Integer = EgtGetFirstPartInRawPart(m_CurrProjPage.m_nRawId)
While nPartId <> GDB_ID.NULL
' Aggiorno la quota
EgtMovePartInRawPart(nPartId, vtMove)
' Se pezzi piani, aggiorno lati inclinati e regioni
If nPrjType = CurrentProjectPageUC.PRJ_TYPE.FLATS Then
' Sistemazioni per eventuali lati inclinati con tallone
m_MainWindow.m_CadCutPageUC.m_NestPage.AdjustPartSideAngleHeel(nPartId, m_RawHeight)
' Sistemazioni per eventuali lati esterni inclinati e/o offsettati
EgtCalcFlatPartUpRegion(nPartId, True)
EgtCalcFlatPartDownRegion(nPartId, m_RawHeight)
End If
' Passo al successivo
nPartId = EgtGetNextPartInRawPart(nPartId)
End While
End If