Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4499a042f8 | |||
| 958421f4f5 |
@@ -144,8 +144,6 @@
|
||||
Public Const BTL_PRT_INVERTED As String = "INVERTED"
|
||||
Public Const BTL_PRT_MATERIAL As String = "MATERIAL"
|
||||
Public Const BTL_PRT_VOLUME As String = "VOLUME"
|
||||
Public Const BTL_PRT_ROT As String = "ROT"
|
||||
Public Const BTL_PRT_FLIP As String = "FLIP"
|
||||
' parametri pezzo
|
||||
Public Const BTL_PRT_SINGLEMEMBERNUM = "SINGLEMEMBERNUMBER"
|
||||
Public Const BTL_PRT_ASSEMBLYNUM = "ASSEMBLYNUMBER"
|
||||
|
||||
@@ -482,8 +482,6 @@ Public Class PartM
|
||||
EgtGetInfo(nPartId, BTL_PRT_GROUP, NewPartM.m_sGROUP)
|
||||
EgtGetInfo(nPartId, BTL_PRT_STOREY, NewPartM.m_sSTOREY)
|
||||
EgtGetInfo(nPartId, BTL_PRT_MATERIAL, NewPartM.m_sMATERIAL)
|
||||
EgtGetInfo(nPartId, BTL_PRT_ROT, NewPartM.m_dROT)
|
||||
EgtGetInfo(nPartId, BTL_PRT_FLIP, NewPartM.m_nFLIP)
|
||||
Dim nTemp As Integer = 0
|
||||
If Not EgtGetInfo(nPartId, BTL_PRT_ROTATED, nTemp) Then
|
||||
nTemp = 0
|
||||
|
||||
@@ -16,7 +16,7 @@ Imports System.Runtime.InteropServices
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("EgtBEAMWALL.Core")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2020-2023 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2020-2024 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
@@ -35,5 +35,5 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.5.12.2")>
|
||||
<Assembly: AssemblyFileVersion("2.5.12.2")>
|
||||
<Assembly: AssemblyVersion("2.6.6.1")>
|
||||
<Assembly: AssemblyFileVersion("2.6.6.1")>
|
||||
|
||||
@@ -10,7 +10,7 @@ using System.Runtime.InteropServices;
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Egalware s.r.l.")]
|
||||
[assembly: AssemblyProduct("EgtBEAMWALL.DataLayer")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2020-2023 by Egalware s.r.l.")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2020-2024 by Egalware s.r.l.")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// 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("2.5.12.2")]
|
||||
[assembly: AssemblyFileVersion("2.5.12.2")]
|
||||
[assembly: AssemblyVersion("2.6.6.1")]
|
||||
[assembly: AssemblyFileVersion("2.6.6.1")]
|
||||
|
||||
@@ -248,8 +248,8 @@ Public Class MainWindowM
|
||||
EgtSetLockId( sLockId)
|
||||
End If
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2512, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5327, 2512, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2606, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5327, 2606, 1, m_nKeyOptions)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||
m_sLogFile = m_sTempDir & "\" & SUPGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||
|
||||
@@ -30,7 +30,7 @@ Imports System.Windows
|
||||
#End if
|
||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("EgtBEAMWALL.Supervisor")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2020-2023 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2020-2024 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: ComVisible(false)>
|
||||
|
||||
@@ -70,5 +70,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.5.12.2")>
|
||||
<Assembly: AssemblyFileVersion("2.5.12.2")>
|
||||
<Assembly: AssemblyVersion("2.6.1.1")>
|
||||
<Assembly: AssemblyFileVersion("2.6.1.1")>
|
||||
|
||||
@@ -427,7 +427,7 @@ Public Class FreeContourManagerVM
|
||||
' posiziono la griglia sul riferimento del contorno libero
|
||||
Dim frFace As New Frame3d
|
||||
EgtBeamGetSideData(SelFeature.nSelSIDE, frFace)
|
||||
Dim frFrame As Frame3d = SelFeature.BTLFeatureM.frFRAME
|
||||
Dim frFrame As New Frame3d( SelFeature.BTLFeatureM.frFRAME)
|
||||
frFrame.ToGlob( frFace)
|
||||
EgtSetGridFrame(frFrame)
|
||||
EgtSetGridShow(True, True)
|
||||
|
||||
@@ -794,12 +794,6 @@ Public Class LeftPanelVM
|
||||
EgtSetMode(nDuploId, GDB_MD.STD)
|
||||
nPartDuploIdList.Add(nDuploId)
|
||||
Next
|
||||
'' salvo lista info
|
||||
Dim saveInfoBeamList As MyMachGroupVM = BeamMachGroup
|
||||
'Dim saveInfoBeamList As New List(Of PartVM)
|
||||
'For Each info As PartVM In BeamMachGroup.PartVMList
|
||||
' saveInfoBeamList.Add(info)
|
||||
'Next
|
||||
' calcolo posizione nuovo pezzo per rispettare ordine lunghezze
|
||||
Dim nInsertIndex As Integer
|
||||
' scrivo dati di tutti i pezzi
|
||||
@@ -858,38 +852,7 @@ Public Class LeftPanelVM
|
||||
End While
|
||||
Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\RawPartLog.txt"
|
||||
If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then
|
||||
EgtOutLog("Fallito inserimento grezzo nella barra in AddPartToBeam")
|
||||
|
||||
' elimino duplo
|
||||
For Each nDuploId In nPartDuploIdList
|
||||
EgtErase(nDuploId)
|
||||
EgtRemoveRawPart(nDuploId)
|
||||
Next
|
||||
|
||||
' rimuovo info duplo e aggiorno info grezzo
|
||||
nPartIndex = 0
|
||||
For nIndex = 0 To BeamMachGroup.PartVMList.Count - 1
|
||||
If nPartIndex < nPartDuploIdList.Count() AndAlso BeamMachGroup.PartVMList(nIndex).dL > PartsToAdd(0).dL Then
|
||||
EgtRemoveInfo(BeamMachGroup.Id, MGR_RPT_PART & nIndex + 1)
|
||||
nPartIndex += 1
|
||||
ElseIf nPartIndex < nPartDuploIdList.Count() AndAlso BeamMachGroup.PartVMList(nIndex).dL < PartsToAdd(0).dL Then
|
||||
EgtRemoveInfo(BeamMachGroup.Id, MGR_RPT_PART & nIndex + 1)
|
||||
nPartIndex += 1
|
||||
End If
|
||||
EgtRemoveInfo(BeamMachGroup.Id, MGR_RPT_PART & nIndex + nPartIndex + 1)
|
||||
EgtSetInfo(BeamMachGroup.Id, MGR_RPT_PART & nIndex + 1, BeamMachGroup.PartVMList(nIndex).nPartId & "," & DoubleToString(BeamMachGroup.PartVMList(nIndex).dPOSX, 3))
|
||||
Next
|
||||
|
||||
' elimino vecchio grezzo ed eseguo script creazione nuovo
|
||||
nRawId = EgtGetFirstRawPart()
|
||||
While nRawId <> GDB_ID.NULL
|
||||
EgtRemoveRawPart(nRawId)
|
||||
nRawId = EgtGetFirstRawPart()
|
||||
End While
|
||||
|
||||
If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then
|
||||
EgtOutLog("Fallita esecuzione ExecBeam. ERRORE")
|
||||
End If
|
||||
Return False
|
||||
End If
|
||||
For nDuploIndex = 0 To PartsToAdd.Count - 1
|
||||
EgtSetInfo(nPartDuploIdList(nDuploIndex), MGR_PRT_ROT, PartsToAdd(nDuploIndex).nROTATED)
|
||||
@@ -898,11 +861,7 @@ Public Class LeftPanelVM
|
||||
' aggiorno lista pezzi
|
||||
BeamMachGroup.MyMachGroupM.RefreshPartList()
|
||||
' seleziono pezzo aggiunto
|
||||
If BeamMachGroup.PartVMList.Count > nInsertIndex Then
|
||||
BeamMachGroup.SelPart = BeamMachGroup.PartVMList(nInsertIndex)
|
||||
Else
|
||||
BeamMachGroup.SelPart = BeamMachGroup.PartVMList(nInsertIndex - 1)
|
||||
End If
|
||||
If BeamMachGroup.PartVMList.Count > nInsertIndex Then BeamMachGroup.SelPart = BeamMachGroup.PartVMList(nInsertIndex)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
|
||||
@@ -201,47 +201,19 @@ Public Class PartVM
|
||||
' recupero box del layer box
|
||||
Dim b3Box As New BBox3d
|
||||
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.STANDARD, b3Box)
|
||||
Dim vtAxes As Vector3d
|
||||
' se travi ruoto attorno all'asse Z
|
||||
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.BEAM Then
|
||||
vtAxes = Vector3d.Z_AX
|
||||
' se pareti ruoto attorno all'asse X
|
||||
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = MachineType.WALL Then
|
||||
vtAxes = Vector3d.X_AX
|
||||
End If
|
||||
If EgtRotate(nPartId, b3Box.Center, vtAxes, 180, GDB_RT.GLOB) Then
|
||||
If EgtRotate(nPartId, b3Box.Center, Vector3d.X_AX, 180, GDB_RT.GLOB) Then
|
||||
m_PartM.nFLIP = If(value, 180, 0)
|
||||
EgtSetInfo(nPartId, MGR_PRT_FLIP, If(value, 180, 0))
|
||||
Else
|
||||
NotifyPropertyChanged(NameOf(bFLIP))
|
||||
End If
|
||||
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL Then
|
||||
' recupero box del pezzo
|
||||
Dim b3Part As New BBox3d
|
||||
EgtGetBBoxGlob(nPartId, GDB_BB.STANDARD, b3Part)
|
||||
' calcolo distanza tra i box
|
||||
Dim vtDeltaBox As Vector3d = b3Box.Min - b3Part.Min
|
||||
' reinserisco il pezzo nel grezzo
|
||||
EgtAddPartToRawPart(nPartId, New Point3d(dTempPosX - vtDeltaBox.x, dTempPosY - vtDeltaBox.y, 0), ParentMachGroupVM.MyMachGroupM.nRawPartId)
|
||||
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
|
||||
' elimino vecchio grezzo ed eseguo script creazione nuovo
|
||||
DeleteOldRaw()
|
||||
Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\RawPartLog.txt"
|
||||
If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then
|
||||
EgtOutLog("Fallita creazione barra nell'ExecBeam in bFlip")
|
||||
' elimino vecchio grezzo ed eseguo script creazione nuovo
|
||||
DeleteOldRaw()
|
||||
If EgtRotate(nPartId, b3Box.Center, vtAxes, 180, GDB_RT.GLOB) Then
|
||||
m_PartM.nFLIP = 180
|
||||
EgtSetInfo(nPartId, MGR_PRT_FLIP, 180)
|
||||
Else
|
||||
NotifyPropertyChanged(NameOf(m_PartM.nFLIP))
|
||||
End If
|
||||
If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then
|
||||
EgtOutLog("Fallita esecuzione ExecBeam. ERRORE")
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
' recupero box del pezzo
|
||||
Dim b3Part As New BBox3d
|
||||
EgtGetBBoxGlob(nPartId, GDB_BB.STANDARD, b3Part)
|
||||
' calcolo distanza tra i box
|
||||
Dim vtDeltaBox As Vector3d = b3Box.Min - b3Part.Min
|
||||
' reinserisco il pezzo nel grezzo
|
||||
EgtAddPartToRawPart(nPartId, New Point3d(dTempPosX - vtDeltaBox.x, dTempPosY - vtDeltaBox.y, 0), ParentMachGroupVM.MyMachGroupM.nRawPartId)
|
||||
' lo riseleziono
|
||||
EgtSelectObj(nPartId)
|
||||
' resetto validazione del pezzo
|
||||
@@ -317,140 +289,66 @@ Public Class PartVM
|
||||
End Sub
|
||||
|
||||
Private Sub Rotate(IsPositive As Boolean)
|
||||
If Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.BEAM Then
|
||||
' elimino vecchio grezzo ed eseguo script creazione nuovo
|
||||
DeleteOldRaw()
|
||||
' recupero layer del box
|
||||
Dim nBoxLayerId As Integer = EgtGetFirstNameInGroup(nPartId, "Box")
|
||||
' recupero box del layer box
|
||||
Dim b3Box As New BBox3d
|
||||
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.STANDARD, b3Box)
|
||||
' se invertito lo reinverto
|
||||
If bFLIP Then EgtRotate(nPartId, b3Box.Center, Vector3d.Z_AX, 180, GDB_RT.GLOB)
|
||||
' eseguo rotazione attorno asse X
|
||||
Dim dRot As Integer = 0
|
||||
If dW <> dH Then
|
||||
dRot = If(IsPositive, 180, -180)
|
||||
ElseIf dW = dH Then
|
||||
dRot = If(IsPositive, 90, -90)
|
||||
' salvo posizione
|
||||
Dim dTempPosX As Double = m_PartM.dPOSX
|
||||
Dim dTempPosY As Double = m_PartM.dPOSY
|
||||
' tolgo il pezzo dal grezzo
|
||||
EgtRemovePartFromRawPart(nPartId)
|
||||
' recupero layer del box
|
||||
Dim nBoxLayerId As Integer = EgtGetFirstNameInGroup(nPartId, "Box")
|
||||
' recupero box del layer box
|
||||
Dim b3Box As New BBox3d
|
||||
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.STANDARD, b3Box)
|
||||
' se invertito lo reinverto
|
||||
Dim bFliped As Boolean = bFLIP
|
||||
If bFliped Then EgtRotate(nPartId, b3Box.Center, Vector3d.X_AX, 180, GDB_RT.GLOB)
|
||||
Dim dAng As Double = If(IsPositive, 90, -90)
|
||||
' eseguo rotazione
|
||||
Dim bOk As Boolean = EgtRotate(nPartId, b3Box.Center, -Vector3d.Z_AX, dAng, GDB_RT.GLOB)
|
||||
If bOk Then
|
||||
Dim TempRot = m_PartM.dROT
|
||||
TempRot += dAng
|
||||
If TempRot >= 360 Then
|
||||
TempRot -= 360
|
||||
ElseIf TempRot < 0 Then
|
||||
TempRot += 360
|
||||
End If
|
||||
Dim bOk As Boolean = EgtRotate(nPartId, b3Box.Center, Vector3d.X_AX, dRot, GDB_RT.GLOB)
|
||||
If bOk Then
|
||||
Dim TempRot = m_PartM.dROT
|
||||
TempRot += dRot
|
||||
If TempRot >= 360 Then
|
||||
TempRot -= 360
|
||||
ElseIf TempRot < 0 Then
|
||||
TempRot += 360
|
||||
End If
|
||||
m_PartM.dROT = TempRot
|
||||
EgtSetInfo(nPartId, MGR_PRT_ROT, m_PartM.dROT)
|
||||
End If
|
||||
' ripristino eventuale inversione
|
||||
If bFLIP Then EgtRotate(nPartId, b3Box.Center, Vector3d.Z_AX, 180, GDB_RT.GLOB)
|
||||
Dim sLogPath As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\RawPartLog.txt"
|
||||
If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then
|
||||
EgtOutLog("Fallita creazione barra nell'ExecBeam in Rotate")
|
||||
' elimino vecchio grezzo ed eseguo script creazione nuovo
|
||||
DeleteOldRaw()
|
||||
' annullo Flip
|
||||
If bFLIP Then EgtRotate(nPartId, b3Box.Center, Vector3d.Z_AX, 180, GDB_RT.GLOB)
|
||||
' ripristino rotazione
|
||||
Dim dRotation As Integer = 0
|
||||
If dW <> dH Then
|
||||
dRotation = m_PartM.dROT + dRot
|
||||
m_PartM.dROT = dRotation
|
||||
If dRotation >= 360 Then
|
||||
dRotation = dRot
|
||||
m_PartM.dROT = 0
|
||||
End If
|
||||
ElseIf dW = dH Then
|
||||
dRotation = m_PartM.dROT - dRot
|
||||
If dRotation = 0 Then
|
||||
dRotation = 3 * dRot
|
||||
m_PartM.dROT = 0
|
||||
ElseIf dRotation = 90 Then
|
||||
dRotation += 2 * dRot
|
||||
m_PartM.dROT = 90
|
||||
ElseIf dRotation = 180 Then
|
||||
dRotation += dRot
|
||||
m_PartM.dROT = 180
|
||||
ElseIf dRotation < 0 Then
|
||||
dRotation += 4 * dRot
|
||||
m_PartM.dROT = 270
|
||||
End If
|
||||
End If
|
||||
EgtRotate(nPartId, b3Box.Center, Vector3d.X_AX, dRotation, GDB_RT.GLOB)
|
||||
' salvo informazione
|
||||
EgtSetInfo(nPartId, MGR_PRT_ROT, m_PartM.dROT)
|
||||
' annullo Flip
|
||||
If bFLIP Then EgtRotate(nPartId, b3Box.Center, Vector3d.Z_AX, 180, GDB_RT.GLOB)
|
||||
If Not ExecBeam(sLogPath, Map.refMachinePanelVM.SelectedMachine.Name, CalcIntegration.CmdTypes.RAWPART, False) Then
|
||||
EgtOutLog("Fallita esecuzione ExecBeam. ERRORE")
|
||||
End If
|
||||
NotifyPropertyChanged(NameOf(m_PartM.dROT))
|
||||
End If
|
||||
ElseIf Map.refProjectVM.BTLStructureVM.nPROJTYPE = BWType.WALL Then
|
||||
' salvo posizione
|
||||
Dim dTempPosX As Double = m_PartM.dPOSX
|
||||
Dim dTempPosY As Double = m_PartM.dPOSY
|
||||
' tolgo il pezzo dal grezzo
|
||||
EgtRemovePartFromRawPart(nPartId)
|
||||
' recupero layer del box
|
||||
Dim nBoxLayerId As Integer = EgtGetFirstNameInGroup(nPartId, "Box")
|
||||
' recupero box del layer box
|
||||
Dim b3Box As New BBox3d
|
||||
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.STANDARD, b3Box)
|
||||
' se invertito lo reinverto
|
||||
If bFLIP Then EgtRotate(nPartId, b3Box.Center, Vector3d.X_AX, 180, GDB_RT.GLOB)
|
||||
Dim dAng As Double = If(IsPositive, 90, -90)
|
||||
' eseguo rotazione
|
||||
Dim bOk As Boolean = EgtRotate(nPartId, b3Box.Center, -Vector3d.Z_AX, dAng, GDB_RT.GLOB)
|
||||
If bOk Then
|
||||
Dim TempRot = m_PartM.dROT
|
||||
TempRot += dAng
|
||||
If TempRot >= 360 Then
|
||||
TempRot -= 360
|
||||
ElseIf TempRot < 0 Then
|
||||
TempRot += 360
|
||||
End If
|
||||
m_PartM.dROT = TempRot
|
||||
EgtSetInfo(nPartId, MGR_PRT_ROT, m_PartM.dROT)
|
||||
End If
|
||||
' ripristino eventuale inversione
|
||||
If bFLIP Then EgtRotate(nPartId, b3Box.Center, Vector3d.X_AX, 180, GDB_RT.GLOB)
|
||||
' recupero box del pezzo
|
||||
Dim b3Part As New BBox3d
|
||||
EgtGetBBoxGlob(nPartId, GDB_BB.STANDARD, b3Part)
|
||||
'aggiorno box del box con rotazione
|
||||
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.STANDARD, b3Box)
|
||||
' calcolo distanza tra i box
|
||||
Dim vtDeltaBox As Vector3d = b3Box.Min - b3Part.Min ' Vector3d.NULL
|
||||
' calcolo posizione rispetto al riferimento
|
||||
Select Case Map.refProjectVM.BTLStructureVM.nPROJTYPE
|
||||
Case BWType.WALL
|
||||
' se parete, valuto angolo di posizionamento
|
||||
Select Case CurrentMachine.NestingCorner
|
||||
Case MCH_CR.TL
|
||||
'vtDeltaBox = New Vector3d(b3Box.Min.x - b3Part.Min.x, b3Box.Max.y - b3Part.Max.y, 0)
|
||||
dTempPosY = dTempPosY - dW + dL
|
||||
Case MCH_CR.BL
|
||||
m_PartM.dROT = TempRot
|
||||
EgtSetInfo(nPartId, MGR_PRT_ROT, m_PartM.dROT)
|
||||
End If
|
||||
' ripristino eventuale inversione
|
||||
If bFliped Then EgtRotate(nPartId, b3Box.Center, Vector3d.X_AX, 180, GDB_RT.GLOB)
|
||||
' recupero box del pezzo
|
||||
Dim b3Part As New BBox3d
|
||||
EgtGetBBoxGlob(nPartId, GDB_BB.STANDARD, b3Part)
|
||||
'aggiorno box del box con rotazione
|
||||
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.STANDARD, b3Box)
|
||||
' calcolo distanza tra i box
|
||||
Dim vtDeltaBox As Vector3d = b3Box.Min - b3Part.Min ' Vector3d.NULL
|
||||
' calcolo posizione rispetto al riferimento
|
||||
Select Case Map.refProjectVM.BTLStructureVM.nPROJTYPE
|
||||
Case BWType.WALL
|
||||
' se parete, valuto angolo di posizionamento
|
||||
Select Case CurrentMachine.NestingCorner
|
||||
Case MCH_CR.TL
|
||||
'vtDeltaBox = New Vector3d(b3Box.Min.x - b3Part.Min.x, b3Box.Max.y - b3Part.Max.y, 0)
|
||||
dTempPosY = dTempPosY - dW + dL
|
||||
Case MCH_CR.BL
|
||||
'vtDeltaBox = b3Box.Min - b3Part.Min
|
||||
' non cambio posizioni
|
||||
Case MCH_CR.TR
|
||||
'vtDeltaBox = b3Box.Max - b3Part.Max
|
||||
dTempPosX = dTempPosX - dL + dW
|
||||
dTempPosY = dTempPosY - dW + dL
|
||||
Case MCH_CR.BR
|
||||
'vtDeltaBox = New Vector3d(b3Box.Max.x - b3Part.Max.x, b3Box.Min.y - b3Part.Min.y, 0)
|
||||
dTempPosX = dTempPosX - dL + dW
|
||||
End Select
|
||||
Case Else
|
||||
' non cambio nulla
|
||||
End Select
|
||||
' reinserisco il pezzo nel grezzo
|
||||
EgtAddPartToRawPart(nPartId, New Point3d(dTempPosX - vtDeltaBox.x, dTempPosY - vtDeltaBox.y, 0), ParentMachGroupVM.MyMachGroupM.nRawPartId)
|
||||
End If
|
||||
Case MCH_CR.TR
|
||||
'vtDeltaBox = b3Box.Max - b3Part.Max
|
||||
dTempPosX = dTempPosX - dL + dW
|
||||
dTempPosY = dTempPosY - dW + dL
|
||||
Case MCH_CR.BR
|
||||
'vtDeltaBox = New Vector3d(b3Box.Max.x - b3Part.Max.x, b3Box.Min.y - b3Part.Min.y, 0)
|
||||
dTempPosX = dTempPosX - dL + dW
|
||||
End Select
|
||||
Case Else
|
||||
' non cambio nulla
|
||||
End Select
|
||||
' reinserisco il pezzo nel grezzo
|
||||
EgtAddPartToRawPart(nPartId, New Point3d(dTempPosX - vtDeltaBox.x, dTempPosY - vtDeltaBox.y, 0), ParentMachGroupVM.MyMachGroupM.nRawPartId)
|
||||
' lo riseleziono
|
||||
EgtSelectObj(nPartId)
|
||||
' resetto validazione del pezzo
|
||||
@@ -458,14 +356,6 @@ Public Class PartVM
|
||||
NotifyPropertyChanged(NameOf(sROT))
|
||||
End Sub
|
||||
|
||||
Private Sub DeleteOldRaw()
|
||||
Dim nRawId As Integer = EgtGetFirstRawPart()
|
||||
While nRawId <> GDB_ID.NULL
|
||||
EgtRemoveRawPart(nRawId)
|
||||
nRawId = EgtGetFirstRawPart()
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Friend Sub SelectBTLPart()
|
||||
' eseguo la selezione nella lista pezzi
|
||||
Dim nBTLPartId As Integer = MyMachGroupPanelM.DuploGetOriginal(nPartId)
|
||||
|
||||
@@ -242,8 +242,8 @@ Public Class MainWindowM
|
||||
EgtSetLockId( sLockId)
|
||||
End If
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2512, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5327, 2512, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(5327, 2606, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(5327, 2606, 1, m_nKeyOptions)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
m_nDebug = GetMainPrivateProfileInt(S_GENERAL, K_DEBUG, 0)
|
||||
m_sLogFile = m_sTempDir & "\" & VWOPTGENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||
|
||||
@@ -30,7 +30,7 @@ Imports System.Windows
|
||||
#End If
|
||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("EgtBEAMWALL.ViewerOptimizer")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2020-2023 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2020-2024 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: ComVisible(false)>
|
||||
|
||||
@@ -70,5 +70,5 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.5.12.2")>
|
||||
<Assembly: AssemblyFileVersion("2.5.12.2")>
|
||||
<Assembly: AssemblyVersion("2.6.6.1")>
|
||||
<Assembly: AssemblyFileVersion("2.6.6.1")>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user