Merge branch 'master' of https://gitlab.steamware.net/egalware-cadcam/interfacce/egtbeamwall
This commit is contained in:
@@ -928,8 +928,15 @@ Public Class LeftPanelVM
|
||||
Case MCH_CR.BR
|
||||
dPosX = WallMachGroup.dL - PartToAdd.dL - dPosX
|
||||
End Select
|
||||
' calcolo box del pezzo e del suo layer box per compensare la eventuale differenza
|
||||
Dim b3Part As New BBox3d
|
||||
EgtGetBBoxGlob(nPartDuploId, GDB_BB.STANDARD, b3Part)
|
||||
Dim b3Box As New BBox3d
|
||||
Dim nBoxLayerId As Integer = EgtGetFirstNameInGroup(nPartDuploId, "Box")
|
||||
EgtGetBBoxGlob(nBoxLayerId, GDB_BB.STANDARD, b3Box)
|
||||
Dim vtDeltaBox As Vector3d = b3Box.Min - b3Part.Min
|
||||
' aggiungo il pezzo al grezzo
|
||||
If EgtAddPartToRawPart(nPartDuploId, New Point3d(dPosX, dPosY, 0), WallMachGroup.MyMachGroupM.nRawPartId) Then
|
||||
If EgtAddPartToRawPart(nPartDuploId, New Point3d(dPosX - vtDeltaBox.x, dPosY - vtDeltaBox.y, 0 - vtDeltaBox.z), WallMachGroup.MyMachGroupM.nRawPartId) Then
|
||||
EgtSetInfo(nPartDuploId, MGR_PRT_POSX, dPosX)
|
||||
EgtSetInfo(nPartDuploId, MGR_PRT_POSY, dPosY)
|
||||
EgtSetInfo(nPartDuploId, MGR_PRT_ROT, PartToAdd.nROTATED)
|
||||
|
||||
@@ -213,7 +213,7 @@ Public Class PartVM
|
||||
' 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)
|
||||
EgtAddPartToRawPart(nPartId, New Point3d(dTempPosX - vtDeltaBox.x, dTempPosY - vtDeltaBox.y, 0 - vtDeltaBox.z), ParentMachGroupVM.MyMachGroupM.nRawPartId)
|
||||
' lo riseleziono
|
||||
EgtSelectObj(nPartId)
|
||||
' resetto validazione del pezzo
|
||||
|
||||
@@ -1484,7 +1484,13 @@ Public Class ProjManagerVM
|
||||
' creo cartella temporanea di estrazione in Temp
|
||||
Dim sProjectimportDir As String = Map.refMainWindowVM.MainWindowM.sTempDir & "\ProjectImport"
|
||||
If Directory.Exists(sProjectimportDir) Then
|
||||
Directory.Delete(sProjectimportDir, True)
|
||||
Try
|
||||
Directory.Delete(sProjectimportDir, True)
|
||||
Catch ex As Exception
|
||||
EgtOutLog("Delete old import project failed!")
|
||||
MessageBox.Show("Importazione Fallita!", "Errore", MessageBoxButton.OK, MessageBoxImage.Error)
|
||||
Return
|
||||
End Try
|
||||
End If
|
||||
Directory.CreateDirectory(sProjectimportDir)
|
||||
Try
|
||||
|
||||
Reference in New Issue
Block a user