diff --git a/CompoWindow/CompoParamPage/CompoParamPageVM.vb b/CompoWindow/CompoParamPage/CompoParamPageVM.vb
index 8dd9f39..dcf5681 100644
--- a/CompoWindow/CompoParamPage/CompoParamPageVM.vb
+++ b/CompoWindow/CompoParamPage/CompoParamPageVM.vb
@@ -287,7 +287,7 @@ Public Class CompoParamPageVM
CompoWindowMap.refCompoSceneHostV.CompoScene.ZoomAll()
' Imposto messaggio aggiungi
AddMsg = EgtMsg(MSG_COMPONENTPAGEUC + 48)
- ' altrimenti se è un compo interno
+ ' altrimenti se è un compo interno
Else
If Not bOk Then
EgtOutLog("Error in Component " & CompoWindowMap.refCompoWindowVM.m_SelInternalCompo.LuaPath)
diff --git a/Constants/ConstIni.vb b/Constants/ConstIni.vb
index c35f867..448c86c 100644
--- a/Constants/ConstIni.vb
+++ b/Constants/ConstIni.vb
@@ -112,6 +112,7 @@ Module ConstIni
Public Const S_RAWMOVE As String = "RawMove"
Public Const K_RAWSTEP As String = "Step"
+ Public Const K_RAWROTATION As String = "Rotation"
Public Const K_PERPENDICULAR As String = "Perpendicular"
Public Const S_CAMERA As String = "Camera"
diff --git a/Constants/ConstMsg.vb b/Constants/ConstMsg.vb
index 39c7082..8b9578c 100644
--- a/Constants/ConstMsg.vb
+++ b/Constants/ConstMsg.vb
@@ -37,6 +37,7 @@
Public Const MSG_OPTIONPANEL As Integer = MSG_OMAGOFFICE
Public Const MSG_MYMACHININGDBWINDOW As Integer = MSG_OMAGOFFICE + 50
Public Const MSG_TOPCMDBAR As Integer = MSG_OMAGOFFICE + 100
+ Public Const MSG_RAWPARTTAB As Integer = MSG_OMAGOFFICE + 150
Public Const MSG_EGTWPFLIB5 As Integer = 30000
Public Const MSG_TOPCOMMANDBAR As Integer = MSG_EGTWPFLIB5 + 500
diff --git a/CurrMachWindow/CurrMachWindowVM.vb b/CurrMachWindow/CurrMachWindowVM.vb
index 291c7f2..8f07125 100644
--- a/CurrMachWindow/CurrMachWindowVM.vb
+++ b/CurrMachWindow/CurrMachWindowVM.vb
@@ -337,7 +337,7 @@ Public Class CurrMachWindowVM
sToolList.RemoveAt(ToolIndex)
' Impossibile trovare l'utensile xxx nel DB utensili
'MessageBox.Show(EgtMsg(MSG_SETUPERRORS + 3) & " " & sSearchedTool & " " & EgtMsg(MSG_SETUPERRORS + 4), EgtMsg(MSG_SETUPERRORS + 2), MessageBoxButton.OK, MessageBoxImage.Error)
- ' Altrimenti lo inserisco nelle liste a seconda del tipo
+ ' Altrimenti lo inserisco nelle liste a seconda del tipo
Else
EgtTdbSetCurrTool(sSearchedTool)
Dim ToolType As Integer = 0
diff --git a/EgtStoneLib/CamAuto.vb b/EgtStoneLib/CamAuto.vb
index 0e0182c..a976b82 100644
--- a/EgtStoneLib/CamAuto.vb
+++ b/EgtStoneLib/CamAuto.vb
@@ -528,6 +528,7 @@ Friend Module CamAuto
Dim dHolesOverlap As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_HOLES_OVERLAP, 0, CurrentMachine.sMachIniFile)
Dim dCornerSafety As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, CurrentMachine.sMachIniFile)
Dim bOneHoleIntCorner As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_ONEHOLE_INTCORNER, 0, CurrentMachine.sMachIniFile) <> 0)
+ Dim bMillingOnCorners As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, 1, CurrentMachine.sMachIniFile) <> 0)
Dim bMillingOnSinks As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, CurrentMachine.sMachIniFile) <> 0)
dCornerSafety = Math.Max(dCornerSafety, 10 * EPS_SMALL)
EgtLuaSetGlobStringVar("CAM.SAWMCH", sSawMch)
@@ -539,6 +540,7 @@ Friend Module CamAuto
EgtLuaSetGlobNumVar("CAM.HOLESOVERLAP", dHolesOverlap)
EgtLuaSetGlobBoolVar("CAM.ONEHOLEINTCORNER", bOneHoleIntCorner)
EgtLuaSetGlobNumVar("CAM.CORNERSAFETY", dCornerSafety)
+ EgtLuaSetGlobBoolVar("CAM.MILLINGONCORNERS", bMillingOnCorners)
EgtLuaSetGlobBoolVar("CAM.MILLINGONSINKS", bMillingOnSinks)
EgtLuaSetGlobNumVar("CAM.RAWHEIGHT", GetRawHeight())
Return True
diff --git a/EgtStoneLib/ConstMachIni.vb b/EgtStoneLib/ConstMachIni.vb
index 3d0c5bc..f6fd818 100644
--- a/EgtStoneLib/ConstMachIni.vb
+++ b/EgtStoneLib/ConstMachIni.vb
@@ -102,10 +102,14 @@
Public Const K_MACH_REDUCEDDEPTH As String = "ReducedDepth"
Public Const K_MACH_EXTARCMINRAD As String = "ExtArcMinRad"
Public Const K_MACH_INTARCMAXSIDEANG As String = "IntArcMaxSideAng"
+ Public Const K_MACH_MILLING_ON_CORNERS As String = "MillingOnCorners"
Public Const K_MACH_MILLING_ON_SINKS As String = "MillingOnSinks"
Public Const K_MACH_NEST_ALIGNED As String = "Aligned"
Public Const K_MACH_WASHING As String = "Washing"
+ Public Const S_MACH_RAWMOVE As String = "RawMove"
+ Public Const K_MACH_RM_ROTATE As String = "Rotate"
+
Public Const S_TOOLCHANGER As String = "ToolChanger"
Public Const K_NUMBER As String = "Number"
Public Const K_POS As String = "Pos"
diff --git a/EgtStoneLib/CurrentMachine.vb b/EgtStoneLib/CurrentMachine.vb
index f9b2323..2fc0de8 100644
--- a/EgtStoneLib/CurrentMachine.vb
+++ b/EgtStoneLib/CurrentMachine.vb
@@ -54,6 +54,7 @@ Public Module CurrentMachine
Private m_dIntArcMaxSideAng As Double = 0
' Dati per fresatura
+ Private m_bCornerCuts As Boolean = False
Private m_bInternalCuts As Boolean = False
' Abilitazione lavaggio lastra
@@ -64,6 +65,9 @@ Public Module CurrentMachine
' Massimo diametro lama per tastatura grezzo
Private m_dMaxSawDiamForProbe As Double = 630
+ ' Possibilità di ruotare i grezzi durante separa e muovi
+ Private m_bRawSplMovRotate As Boolean = False
+
' Flag che indicano stato tipologia utensili (attivo/non attivo)
Private m_bSaw As Boolean = False
Private m_bDrill As Boolean = False
@@ -241,6 +245,12 @@ Public Module CurrentMachine
End Get
End Property
+ Friend ReadOnly Property bRawSplMovRotate As Boolean
+ Get
+ Return m_bRawSplMovRotate
+ End Get
+ End Property
+
Public Property dSafeZ As Double
Get
If EgtMdbGetGeneralParam(MCH_GP.SAFEZ, m_dSafeZ) Then
@@ -364,11 +374,21 @@ Public Module CurrentMachine
End Set
End Property
- Public Property bInternalCuts As Double
+ Public Property bCornerCuts As Boolean
+ Get
+ Return m_bCornerCuts
+ End Get
+ Set(value As Boolean)
+ WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, If(value, "1", "0"), sMachIniFile)
+ m_bCornerCuts = value
+ End Set
+ End Property
+
+ Public Property bInternalCuts As Boolean
Get
Return m_bInternalCuts
End Get
- Set(value As Double)
+ Set(value As Boolean)
WritePrivateProfileString(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, If(value, "1", "0"), sMachIniFile)
m_bInternalCuts = value
End Set
@@ -851,6 +871,8 @@ Public Module CurrentMachine
' Leggo angolo di fianco massimo arco interno
m_dIntArcMaxSideAng = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_INTARCMAXSIDEANG, 45, sMachIniFile)
EgtMdbSetGeneralParam(MCH_GP.INTSAWARCMAXSIDEANG, m_dIntArcMaxSideAng)
+ ' Leggo lavorazione angoli con fresa
+ m_bCornerCuts = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, 1, sMachIniFile) <> 0)
' Leggo lavorazione interni con fresa
m_bInternalCuts = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, sMachIniFile) <> 0)
' Leggo abilitazione lavaggio lastra
@@ -870,6 +892,8 @@ Public Module CurrentMachine
' Leggo limiti diametro lama per altre operazioni
m_dMaxSawDiamForVac = GetPrivateProfileDouble(S_TOOLS, K_MAXSAWDIAMFORVAC, 630, sMachIniFile)
m_dMaxSawDiamForProbe = GetPrivateProfileDouble(S_TOOLS, K_MAXSAWDIAMFORPROBE, 630, sMachIniFile)
+ ' Leggo flag abilitazione rotazione grezzi durante spezza e muovi
+ m_bRawSplMovRotate = (GetPrivateProfileInt(S_MACH_RAWMOVE, K_MACH_RM_ROTATE, 0, sMachIniFile) <> 0)
' Leggo flag presenza tipologie lavorazioni
' lama
m_bSawing = (GetPrivateProfileInt(S_MACHININGS, K_SAWING, 0, sMachIniFile) > 0)
diff --git a/EgtStoneLib/EstPhoto.vb b/EgtStoneLib/EstPhoto.vb
index b436abd..fcbe61e 100644
--- a/EgtStoneLib/EstPhoto.vb
+++ b/EgtStoneLib/EstPhoto.vb
@@ -25,7 +25,8 @@ Module EstPhoto
Dim ptOri As New Point3d(0, 0, 0)
Dim ptCen As New Point3d(0, 0, INFINITO)
Dim dMMxPixel As Double = 1
- ReadAuxData(sPath, nSlabId, sSlabName, sMat, ptOri, ptCen, dMMxPixel)
+ Dim dCoeff As Double = 1
+ If Not ReadAuxData(sPath, nSlabId, sSlabName, sMat, ptOri, ptCen, dMMxPixel, dCoeff) Then Return False
' Aggiungo eventuali offset
ptOri += CurrentMachine.PhotoOffset
ptCen += CurrentMachine.PhotoOffset
@@ -73,7 +74,8 @@ Module EstPhoto
Dim ptOri As New Point3d(0, 0, 0)
Dim ptCen As New Point3d(0, 0, INFINITO)
Dim dMMxPixel As Double = 1
- ReadAuxData(sPath, nSlabId, sSlabName, sMat, ptOri, ptCen, dMMxPixel)
+ Dim dCoeff As Double = 1
+ If Not ReadAuxData(sPath, nSlabId, sSlabName, sMat, ptOri, ptCen, dMMxPixel, dCoeff) Then Return False
' Aggiungo eventuali offset
ptOri += CurrentMachine.PhotoOffset
ptCen += CurrentMachine.PhotoOffset
@@ -97,14 +99,19 @@ Module EstPhoto
If Not EgtGetTableRef(1, ptTab) Then Return False
ptOri.ToGlob(New Frame3d(ptTab))
ptCen.ToGlob(New Frame3d(ptTab))
+ ' Verifico coefficiente scalatura Pixel (per MapaScan, normalmente 1)
+ If dCoeff < EPS_SMALL Then
+ EgtOutLog("ReadContour : coefficiente di scalatura pixel nullo")
+ Return False
+ End If
' Se esiste file dxf lancio lettore standard, altrimenti quello personalizzato
Dim nCrvId As Integer = GDB_ID.NULL
Dim sCntPath As String = Path.ChangeExtension(sPath, ".dxf")
If My.Computer.FileSystem.FileExists(sCntPath) Then
- nCrvId = LoadStandardContour(sCntPath, ptOri, dMMxPixel, nPixelY)
+ nCrvId = LoadStandardContour(sCntPath, ptOri, dMMxPixel, nPixelY, dCoeff)
Else
- nCrvId = LoadCustomContour(sPath, ptOri, dMMxPixel, nPixelY)
+ nCrvId = LoadCustomContour(sPath, ptOri, dMMxPixel, nPixelY, dCoeff)
End If
' Eseguo le semplificazioni
Dim nApprType As Integer = APP_TYPE.RIGHT_LINES
@@ -117,7 +124,7 @@ Module EstPhoto
Return True
End Function
- Private Function LoadStandardContour(sPath As String, ptOri As Point3d, dMMxPixel As Double, nPixelY As Integer) As Integer
+ Private Function LoadStandardContour(sPath As String, ptOri As Point3d, dMMxPixel As Double, nPixelY As Integer, dCoeff As Double) As Integer
' Carico Dxf del contorno
If Not EgtImportDxf(sPath, 1) Then Return GDB_ID.NULL
Dim nPartId As Integer = EgtGetLastPart()
@@ -126,9 +133,10 @@ Module EstPhoto
EgtSetLevel(nPartId, GDB_LV.SYSTEM)
If nPartId = GDB_ID.NULL Or nLayerId = GDB_ID.NULL Then Return GDB_ID.NULL
' Ribalto rispetto a YZ locale (i contorni da CW diventano CCW)
- EgtMirror(nLayerId, New Point3d(0, nPixelY / 2, 0), Vector3d.Y_AX(), GDB_RT.GLOB)
+ EgtMirror(nLayerId, New Point3d(0, nPixelY * dCoeff / 2, 0), Vector3d.Y_AX(), GDB_RT.GLOB)
' Eseguo scalatura
- EgtScale(nLayerId, New Frame3d(), dMMxPixel, dMMxPixel, dMMxPixel, GDB_RT.GLOB)
+ Dim dScaCoeff As Double = dMMxPixel / dCoeff
+ EgtScale(nLayerId, New Frame3d(), dScaCoeff, dScaCoeff, dScaCoeff, GDB_RT.GLOB)
' Eseguo spostamento
EgtMove(nLayerId, (ptOri - Point3d.ORIG()), GDB_RT.GLOB)
' Eseguo concatenamento
@@ -155,7 +163,7 @@ Module EstPhoto
Return nCrvId
End Function
- Private Function LoadCustomContour(sPath As String, ptOri As Point3d, dMMxPixel As Double, nPixelY As Integer) As Integer
+ Private Function LoadCustomContour(sPath As String, ptOri As Point3d, dMMxPixel As Double, nPixelY As Integer, dCoeff As Double) As Integer
' Definizione variabili
EgtLuaCreateGlobTable("RCT")
EgtLuaSetGlobStringVar("RCT.FILE", sPath)
@@ -178,12 +186,14 @@ Module EstPhoto
EgtSetLevel(nPartId, GDB_LV.SYSTEM)
Dim nCrvId As Integer = GDB_ID.NULL
EgtLuaGetGlobIntVar("RCT.CRVID", nCrvId)
+ EgtLuaResetGlobVar("RCT")
If nCrvId = GDB_ID.NULL Then Return GDB_ID.NULL
EgtSetColor(nCrvId, New Color3d(0, 255, 0))
' Ribalto rispetto a YZ locale (i contorni da CW diventano CCW)
- EgtMirror(nCrvId, New Point3d(0, nPixelY / 2, 0), Vector3d.Y_AX(), GDB_RT.GLOB)
+ EgtMirror(nCrvId, New Point3d(0, nPixelY * dCoeff / 2, 0), Vector3d.Y_AX(), GDB_RT.GLOB)
' Eseguo scalatura
- EgtScale(nCrvId, New Frame3d(), dMMxPixel, dMMxPixel, dMMxPixel, GDB_RT.GLOB)
+ Dim dScaCoeff As Double = dMMxPixel / dCoeff
+ EgtScale(nCrvId, New Frame3d(), dScaCoeff, dScaCoeff, dScaCoeff, GDB_RT.GLOB)
' Eseguo spostamento
EgtMove(nCrvId, (ptOri - Point3d.ORIG()), GDB_RT.GLOB)
' Deve essere CCW
@@ -196,22 +206,23 @@ Module EstPhoto
Private Function ReadAuxData(sPath As String,
ByRef nSlabId As Integer, ByRef sSlabName As String, ByRef sMat As String,
- ByRef ptOri As Point3d, ByRef ptCen As Point3d, ByRef dMMxPixel As Double) As Boolean
+ ByRef ptOri As Point3d, ByRef ptCen As Point3d, ByRef dMMxPixel As Double, ByRef dCoeff As Double) As Boolean
' Se esiste file txt lancio lettore standard, altrimenti quello personalizzato
Dim sAuxPath As String = Path.ChangeExtension(sPath, ".txt")
If My.Computer.FileSystem.FileExists(sAuxPath) Then
- Return ReadStandardAuxData(sAuxPath, nSlabId, sSlabName, sMat, ptOri, ptCen, dMMxPixel)
+ Return ReadStandardAuxData(sAuxPath, nSlabId, sSlabName, sMat, ptOri, ptCen, dMMxPixel, dCoeff)
Else
- Return ReadCustomAuxData(sPath, nSlabId, sSlabName, sMat, ptOri, ptCen, dMMxPixel)
+ Return ReadCustomAuxData(sPath, nSlabId, sSlabName, sMat, ptOri, ptCen, dMMxPixel, dCoeff)
End If
End Function
Private Function ReadStandardAuxData(sAuxPath As String,
ByRef nSlabId As Integer, ByRef sSlabName As String, ByRef sMat As String,
- ByRef ptOri As Point3d, ByRef ptCen As Point3d, ByRef dMMxPixel As Double) As Boolean
+ ByRef ptOri As Point3d, ByRef ptCen As Point3d, ByRef dMMxPixel As Double, ByRef dCoeff As Double) As Boolean
nSlabId = 0
sSlabName = String.Empty
sMat = String.Empty
+ dCoeff = 1
Try
Dim sLine As String = String.Empty
Dim sr As StreamReader = New StreamReader(sAuxPath)
@@ -248,7 +259,7 @@ Module EstPhoto
Private Function ReadCustomAuxData(sPath As String,
ByRef nSlabId As Integer, ByRef sSlabName As String, ByRef sMat As String,
- ByRef ptOri As Point3d, ByRef ptCen As Point3d, ByRef dMMxPixel As Double) As Boolean
+ ByRef ptOri As Point3d, ByRef ptCen As Point3d, ByRef dMMxPixel As Double, ByRef dCoeff As Double) As Boolean
' Definizione variabili
EgtLuaCreateGlobTable("RDT")
EgtLuaSetGlobStringVar("RDT.FILE", sPath)
@@ -271,7 +282,9 @@ Module EstPhoto
EgtLuaGetGlobNumVar("RDT.TH", dThick)
EgtLuaGetGlobPointVar("RDT.ORI", ptOri)
EgtLuaGetGlobPointVar("RDT.CEN", ptCen)
+ EgtLuaGetGlobNumVar("RDT.COEFF", dCoeff)
EgtLuaGetGlobNumVar("RDT.MMXPIXEL", dMMxPixel)
+ EgtLuaResetGlobVar("RDT")
Return True
End Function
diff --git a/EgtStoneLib/SplitAuto.vb b/EgtStoneLib/SplitAuto.vb
index 78e463d..4cec981 100644
--- a/EgtStoneLib/SplitAuto.vb
+++ b/EgtStoneLib/SplitAuto.vb
@@ -194,7 +194,7 @@ Public Module SplitAuto
Dim nOpeId = EgtGetFirstOperation()
While nOpeId <> GDB_ID.NULL
If EgtGetOperationType(nOpeId) <> MCH_OY.DISP And
- (EgtGetOperationMode(nOpeId) OrElse EgtExistsInfo(nOpeId, INFO_MCH_DUPLED)) Then
+ (EgtGetOperationMode(nOpeId) OrElse EgtExistsInfo(nOpeId, INFO_MCH_USER_OFF) OrElse EgtExistsInfo(nOpeId, INFO_MCH_DUPLED)) Then
Dim nStatus As Integer = If(EgtGetOperationPhase(nOpeId) = nPhase, GDB_ST.ON_, GDB_ST.OFF)
' Lavorazione principale
Dim nPvId As Integer = GDB_ID.NULL
@@ -224,7 +224,7 @@ Public Module SplitAuto
Dim nOpeId = EgtGetFirstOperation()
While nOpeId <> GDB_ID.NULL
If EgtGetOperationType(nOpeId) <> MCH_OY.DISP And
- (EgtGetOperationMode(nOpeId) OrElse EgtExistsInfo(nOpeId, INFO_MCH_DUPLED)) Then
+ (EgtGetOperationMode(nOpeId) OrElse EgtExistsInfo(nOpeId, INFO_MCH_USER_OFF) OrElse EgtExistsInfo(nOpeId, INFO_MCH_DUPLED)) Then
Dim nStatus As Integer = GDB_ST.ON_
' Lavorazione principale
Dim nPvId As Integer = GDB_ID.NULL
@@ -692,12 +692,12 @@ Public Module SplitAuto
Dim rmData As New RawMoveData
If PutVacuumCupsOnRaw(vNewRaws(1), rmData) AndAlso
SafeMoveRawPart(vNewRaws(1), vtMove, dMinMove) Then
- rmData.m_vtMove = vtMove
+ rmData.m_vtRawMove = vtMove
SaveOneMoveInfoInDisposition(nDispId, rmData)
Return True
ElseIf PutVacuumCupsOnRaw(vNewRaws(0), rmData) AndAlso
SafeMoveRawPart(vNewRaws(0), vtMove2, dMinMove) Then
- rmData.m_vtMove = vtMove2
+ rmData.m_vtRawMove = vtMove2
SaveOneMoveInfoInDisposition(nDispId, rmData)
Return True
Else
diff --git a/EgtStoneLib/VacuumCups.vb b/EgtStoneLib/VacuumCups.vb
index ad04f0c..75e552c 100644
--- a/EgtStoneLib/VacuumCups.vb
+++ b/EgtStoneLib/VacuumCups.vb
@@ -15,14 +15,16 @@ Module VacuumCups
Friend Class RawMoveData
Public m_nId As Integer
- Public m_vtMove As Vector3d
+ Public m_vtRawMove As Vector3d
+ Public m_dRawAngRotDeg As Double
Public m_vtDelta As Vector3d
Public m_dAngRotDeg As Double
Public m_sCups As String
Sub New()
m_nId = GDB_ID.NULL
- m_vtMove = Vector3d.NULL()
+ m_vtRawMove = Vector3d.NULL()
+ m_dRawAngRotDeg = 0
m_vtDelta = Vector3d.NULL()
m_dAngRotDeg = 0
m_sCups = String.Empty
@@ -30,7 +32,8 @@ Module VacuumCups
Sub New(nId As Integer)
m_nId = nId
- m_vtMove = Vector3d.NULL()
+ m_vtRawMove = Vector3d.NULL()
+ m_dRawAngRotDeg = 0
m_vtDelta = Vector3d.NULL()
m_dAngRotDeg = 0
m_sCups = String.Empty
@@ -260,7 +263,7 @@ Module VacuumCups
Dim vtDelta As Vector3d = frCurrRef.Orig() - ptRawCen
' Assegno dati noti al movimento del grezzo
rmData.m_nId = nRawId
- rmData.m_vtMove = Vector3d.NULL()
+ rmData.m_vtRawMove = Vector3d.NULL()
rmData.m_vtDelta = vtDelta
rmData.m_dAngRotDeg = dRotAngDeg
Dim sVal As String = String.Empty
@@ -314,10 +317,7 @@ Module VacuumCups
Next
If b3Vac.IsEmpty() Then Return INFINITO
' Se box maggiore di quello del pezzo, scarto soluzione
- If Not ((b3Vac.DimX() < b3Raw.DimX() And b3Vac.DimY() < b3Raw.DimY()) Or
- (b3Vac.DimX() < b3Raw.DimY() And b3Vac.DimY() < b3Raw.DimX())) Then
- Return INFINITO
- End If
+ If b3Vac.Radius() > b3Raw.Radius() Then Return INFINITO
' Determino il movimento
vtMove = ptRawCen - b3Vac.Center()
b3Vac.Move(vtMove)
@@ -395,7 +395,8 @@ Module VacuumCups
Friend Function SaveOneMoveInfo(nId As Integer, rmData As RawMoveData) As Boolean
' Assegno le informazioni
EgtSetInfo(nId, "Id", rmData.m_nId)
- EgtSetInfo(nId, "Mv", rmData.m_vtMove)
+ EgtSetInfo(nId, "Mv", rmData.m_vtRawMove)
+ EgtSetInfo(nId, "Rr", rmData.m_dRawAngRotDeg)
EgtSetInfo(nId, "Dt", rmData.m_vtDelta)
EgtSetInfo(nId, "Ad", rmData.m_dAngRotDeg)
EgtSetInfo(nId, "Vc", rmData.m_sCups)
@@ -404,9 +405,10 @@ Module VacuumCups
End Function
Friend Function RemoveOneMoveInfo(nId As Integer) As Boolean
- ' Assegno le informazioni
+ ' Rimuovo le informazioni
EgtRemoveInfo(nId, "Id")
EgtRemoveInfo(nId, "Mv")
+ EgtRemoveInfo(nId, "Rr")
EgtRemoveInfo(nId, "Dt")
EgtRemoveInfo(nId, "Ad")
EgtRemoveInfo(nId, "Vc")
@@ -415,8 +417,8 @@ Module VacuumCups
End Function
Friend Function SaveOneMoveInfoInDisposition(nDispId As Integer, rmData As RawMoveData) As Boolean
- ' Se movimento trascurabile, inutile salvare
- If rmData.m_vtMove.IsSmall() Then Return True
+ ' Se movimento e rotazione trascurabili, inutile salvare
+ If rmData.m_vtRawMove.IsSmall() AndAlso Math.Abs(rmData.m_dRawAngRotDeg) < EPS_ANG_SMALL Then Return True
' Creo il gruppo
Dim nRpmId As Integer = EgtCreateGroup(nDispId)
If nRpmId = GDB_ID.NULL Then Return False
@@ -445,7 +447,8 @@ Module VacuumCups
' Recupero le informazioni
Dim rmData As New RawMoveData
EgtGetInfo(nRpmId, "Id", rmData.m_nId)
- EgtGetInfo(nRpmId, "Mv", rmData.m_vtMove)
+ EgtGetInfo(nRpmId, "Mv", rmData.m_vtRawMove)
+ EgtGetInfo(nRpmId, "Rr", rmData.m_dRawAngRotDeg)
EgtGetInfo(nRpmId, "Dt", rmData.m_vtDelta)
EgtGetInfo(nRpmId, "Ad", rmData.m_dAngRotDeg)
EgtGetInfo(nRpmId, "Vc", rmData.m_sCups)
@@ -494,7 +497,16 @@ Module VacuumCups
Dim nInd As Integer = AddRawMoveData(nRawId, rmList)
If nInd = -1 Then Return -1
' Aggiorno i valori
- rmList(nInd).m_vtMove += vtMove
+ rmList(nInd).m_vtRawMove += vtMove
+ Return nInd
+ End Function
+
+ Friend Function AddRawMoveData(nRawId As Integer, dRawAngRotDeg As Double, ByRef rmList As List(Of RawMoveData)) As Integer
+ ' Recupero o creo record con dati del grezzo indicato
+ Dim nInd As Integer = AddRawMoveData(nRawId, rmList)
+ If nInd = -1 Then Return -1
+ ' Aggiorno i valori
+ rmList(nInd).m_dRawAngRotDeg += dRawAngRotDeg
Return nInd
End Function
@@ -502,9 +514,11 @@ Module VacuumCups
' Recupero o creo record con dati del grezzo indicato
Dim nInd As Integer = AddRawMoveData(rmData.m_nId, rmList)
If nInd = -1 Then Return -1
- ' Aggiorno i valori
- rmList(nInd).m_vtDelta = rmData.m_vtDelta
- rmList(nInd).m_dAngRotDeg = rmData.m_dAngRotDeg
+ ' Aggiorno i valori (tengo conto di quanto già ruotato il pezzo)
+ Dim vtDeltaRot As New Vector3d(rmData.m_vtDelta)
+ vtDeltaRot.Rotate(Vector3d.Z_AX(), -rmList(nInd).m_dRawAngRotDeg)
+ rmList(nInd).m_vtDelta = vtDeltaRot
+ rmList(nInd).m_dAngRotDeg = rmData.m_dAngRotDeg - rmList(nInd).m_dRawAngRotDeg
rmList(nInd).m_sCups = rmData.m_sCups
Return nInd
End Function
diff --git a/MachOptionWindow/MachOptionWindowV.xaml b/MachOptionWindow/MachOptionWindowV.xaml
index 43af69b..c8651ee 100644
--- a/MachOptionWindow/MachOptionWindowV.xaml
+++ b/MachOptionWindow/MachOptionWindowV.xaml
@@ -17,11 +17,10 @@
-
-
-
-
+
+
+
@@ -141,18 +140,25 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -172,7 +178,7 @@
-
+
-
+
-
-
+
+
diff --git a/OmagOFFICE.vbproj b/OmagOFFICE.vbproj
index 21d5e8c..f1d85f4 100644
--- a/OmagOFFICE.vbproj
+++ b/OmagOFFICE.vbproj
@@ -562,6 +562,12 @@
+
+
+
+
+
+ IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagOFFICE\OmagOFFICER32.exe
diff --git a/OptionPanel/MachiningTab/MoveRawModeV.xaml b/OptionPanel/MachiningTab/MoveRawModeV.xaml
index 1b034f8..a51af7f 100644
--- a/OptionPanel/MachiningTab/MoveRawModeV.xaml
+++ b/OptionPanel/MachiningTab/MoveRawModeV.xaml
@@ -21,6 +21,8 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+