OmagOFFICE 2.3k1 :

- modifiche per escludere spessore sovratavola da scalatura foto fatte con CameraMng
- all'esportazione verso la macchina le foto vengono rese non più scalabili per lo spessore pezzo (come gli scan)
- corretta scrittura dati in interfaccia per problema decimali che falsano la posizione del cursore.
This commit is contained in:
DarioS
2021-11-16 06:37:37 +01:00
parent f4887ab587
commit 2d39dcacc3
10 changed files with 55 additions and 38 deletions
@@ -67,6 +67,8 @@ Public Class CompoParamPageVM
Private m_AlzAndFront_Visibility As Visibility
Public Property AlzAndFront_Visibility As Visibility
Get
' !!!! Temporaneamente in attesa di completamento Frontalini e alzatine !!!!
Return Visibility.Collapsed
Return m_AlzAndFront_Visibility
End Get
Set(value As Visibility)
+29 -15
View File
@@ -1,13 +1,13 @@
'----------------------------------------------------------------------------
' EgalTech 2015-2017
' EgalTech 2015-2021
'----------------------------------------------------------------------------
' File : GenPhoto.vb Data : 12.04.17 Versione : 1.8d1
' File : GenPhoto.vb Data : 15.11.21 Versione : 2.3k1
' Contenuto : Modulo gestione fotografie.
' Ogni gruppo di lavoro può avere una sua foto della lastra.
'
'
' Modifiche : 12.04.17 DS Creazione modulo.
'
' 15.11.21 PS Correzioni per scalatura foto da CameraMng senza sovratavola.
'
'----------------------------------------------------------------------------
@@ -35,12 +35,12 @@ Module EstPhoto
If dThick > EPS_SMALL Then
OmagOFFICEMap.refRawPartTabVM.Height = DoubleToString( dThick, 3)
End If
' Altezza eventuale tavola aggiuntiva
' Altezza della eventuale tavola aggiuntiva per solo posizionamento in Z
Dim dAddTable As Double = CurrentMachine.dAdditionalTable
' Aggiusto dati per spessore grezzo
If Math.Abs(EstCalc.GetRawHeight() + dAddTable) > EPS_SMALL Then
' Coefficiente di scalatura
Dim dFsca As Double = (ptCen.z - EstCalc.GetRawHeight() - dAddTable) / (ptCen.z - ptOri.z)
' Coefficiente di scalatura (non va considerata la sovratavola)
Dim dFsca As Double = (ptCen.z - EstCalc.GetRawHeight()) / (ptCen.z - ptOri.z)
dMMxPixel *= dFsca
ptOri.x = ptCen.x + (ptOri.x - ptCen.x) * dFsca
ptOri.y = ptCen.y + (ptOri.y - ptCen.y) * dFsca
@@ -67,7 +67,11 @@ Module EstPhoto
End If
EgtSetLevel(nPhGrpId, GDB_LV.SYSTEM)
' Carico la fotografia
Return EgtAddPhoto(GetPhotoName(), sPath, ptOri, ptCen, dMMxPixel, nPhGrpId, b3Tab.Min(), b3Tab.Max()) <> GDB_ID.NULL
Dim nPhotoId As Integer = EgtAddPhoto(GetPhotoName(), sPath, ptOri, ptCen, dMMxPixel, nPhGrpId, b3Tab.Min(), b3Tab.Max())
If nPhotoId = GDB_ID.NULL Then Return False
' Salvo spessore sovratavola usato per posizionamento in Z
EgtSetInfo( nPhotoId, "OvTab", dAddTable)
Return True
End Function
Friend Function LoadContour(sPath As String) As Boolean
@@ -92,12 +96,12 @@ Module EstPhoto
Dim nPixelX As Integer = 0
Dim nPixelY As Integer = 0
If Not EgtGetPhotoImagePixels(GetPhoto(), nPixelX, nPixelY) Then Return False
' Altezza eventuale tavola aggiuntiva
' Altezza della eventuale tavola aggiuntiva per solo posizionamento in Z
Dim dAddTable As Double = CurrentMachine.dAdditionalTable
' Aggiusto dati per spessore grezzo
If Math.Abs(EstCalc.GetRawHeight() + dAddTable) > EPS_SMALL Then
' Coefficiente di scalatura
Dim dFsca As Double = (ptCen.z - EstCalc.GetRawHeight() - dAddTable) / (ptCen.z - ptOri.z)
' Coefficiente di scalatura (non va considerata la sovratavola)
Dim dFsca As Double = (ptCen.z - EstCalc.GetRawHeight()) / (ptCen.z - ptOri.z)
dMMxPixel *= dFsca
ptOri.x = ptCen.x + (ptOri.x - ptCen.x) * dFsca
ptOri.y = ptCen.y + (ptOri.y - ptCen.y) * dFsca
@@ -385,10 +389,13 @@ Module EstPhoto
' Porto i punti in locale
ptOri.ToLoc(New Frame3d(ptTab))
ptCen.ToLoc(New Frame3d(ptTab))
' Altezza eventuale tavola aggiuntiva
' Altezza della eventuale tavola aggiuntiva originaria
Dim dOrigAddTable As Double = 0
EgtGetInfo( nPhotoId, "OvTab", dOrigAddTable)
' Altezza della eventuale tavola aggiuntiva per solo posizionamento in Z
Dim dAddTable As Double = CurrentMachine.dAdditionalTable
' Aggiusto dati per spessore grezzo (Coefficiente di scalatura)
Dim dFsca As Double = (ptCen.z - EstCalc.GetRawHeight() - dAddTable) / (ptCen.z - ptOri.z)
Dim dFsca As Double = (ptCen.z - EstCalc.GetRawHeight()) / (ptCen.z - ptOri.z + dOrigAddTable)
dDimX *= dFsca
dDimY *= dFsca
ptOri.x = ptCen.x + (ptOri.x - ptCen.x) * dFsca
@@ -426,6 +433,8 @@ Module EstPhoto
EgtSetInfo(nNewPhotoId, "OffsX", dOffsetX)
EgtSetInfo(nNewPhotoId, "OffsY", dOffsetY)
EgtSetInfo(nNewPhotoId, "Rot", dRot)
' Salvo sovratavola attuale
EgtSetInfo( nPhotoId, "OvTab", dAddTable)
Return True
End Function
@@ -482,18 +491,23 @@ Module EstPhoto
' Recupero origine della tavola
Dim ptTab As Point3d
If Not EgtGetTableRef(1, ptTab) Then Return False
' Altezza eventuale tavola aggiuntiva
' Altezza della eventuale tavola aggiuntiva originaria
Dim dOrigAddTable As Double = 0
EgtGetInfo( nPhotoId, "OvTab", dOrigAddTable)
' Altezza della eventuale tavola aggiuntiva per solo posizionamento in Z
Dim dAddTable As Double = CurrentMachine.dAdditionalTable
' Recupero inizio contorno
Dim ptStart As Point3d
EgtStartPoint(nCrvId, GDB_ID.ROOT, ptStart)
' Calcolo coefficiente di scalatura
Dim dFsca As Double = (ptCen.z - ptTab.z - EstCalc.GetRawHeight() - dAddTable) / (ptCen.z - ptStart.z)
Dim dFsca As Double = (ptCen.z - ptTab.z - EstCalc.GetRawHeight()) / (ptCen.z - ptStart.z + dOrigAddTable)
' Scalo opportunamente
EgtScale(nCrvId, New Frame3d(ptCen), dFsca, dFsca, 1, GDB_RT.GLOB)
' Sposto in Z
Dim vtMove As New Vector3d(0, 0, ptTab.z + EstCalc.GetRawHeight() + dAddTable - ptStart.z)
Dim vtMove As New Vector3d(0, 0, ptTab.z + EstCalc.GetRawHeight() + CurrentMachine.dAdditionalTable - ptStart.z)
EgtMove(nCrvId, vtMove, GDB_RT.GLOB)
' Salvo sovratavola attuale
EgtSetInfo( nPhotoId, "OvTab", dAddTable)
Return True
End Function
+10 -10
View File
@@ -33,7 +33,7 @@ Public Class MachOptionWindowVM
Public Property HolesOffset As String
Get
Return LenToString(CurrentMachine.dHolesOffset, -2)
Return LenToString(CurrentMachine.dHolesOffset, 2)
End Get
Set(value As String)
Dim dHolesOffset As Double = 0
@@ -45,7 +45,7 @@ Public Class MachOptionWindowVM
Public Property HolesOverlap As String
Get
Return LenToString(CurrentMachine.dHolesOverlap, -2)
Return LenToString(CurrentMachine.dHolesOverlap, 2)
End Get
Set(value As String)
Dim dHolesOverlap As Double = 0
@@ -57,7 +57,7 @@ Public Class MachOptionWindowVM
Public Property HolesTolerance As String
Get
Return LenToString(CurrentMachine.dHolesTolerance, -2)
Return LenToString(CurrentMachine.dHolesTolerance, 2)
End Get
Set(value As String)
Dim dHolesTolerance As Double = 0
@@ -82,7 +82,7 @@ Public Class MachOptionWindowVM
Public Property CutExtraLen As String
Get
Return LenToString(CurrentMachine.dCutExtraLen, -2)
Return LenToString(CurrentMachine.dCutExtraLen, 2)
End Get
Set(value As String)
Dim dCutExtraLen As Double = 0
@@ -94,7 +94,7 @@ Public Class MachOptionWindowVM
Public Property AngleCutExtraLen As String
Get
Return LenToString(CurrentMachine.dAngleCutExtraLen, -2)
Return LenToString(CurrentMachine.dAngleCutExtraLen, 2)
End Get
Set(value As String)
Dim dAngleCutExtraLen As Double = 0
@@ -106,7 +106,7 @@ Public Class MachOptionWindowVM
Public Property ExtArcMinRad As String
Get
Return LenToString(CurrentMachine.dExtArcMinRad, -2)
Return LenToString(CurrentMachine.dExtArcMinRad, 2)
End Get
Set(value As String)
Dim dExtArcMinRad As Double = 0
@@ -118,7 +118,7 @@ Public Class MachOptionWindowVM
Public Property IntArcMaxSideAng As String
Get
Return DoubleToString(CurrentMachine.dIntArcMaxSideAng, -2)
Return DoubleToString(CurrentMachine.dIntArcMaxSideAng, 2)
End Get
Set(value As String)
Dim dIntArcMaxSideAng As Double = 0
@@ -150,7 +150,7 @@ Public Class MachOptionWindowVM
Public Property SafeZ As String
Get
Return LenToString(CurrentMachine.dSafeZ, -2)
Return LenToString(CurrentMachine.dSafeZ, 2)
End Get
Set(value As String)
Dim dSafeZ As Double = 0
@@ -184,7 +184,7 @@ Public Class MachOptionWindowVM
Public Property ShortCut As String
Get
Return LenToString(CurrentMachine.dShortCut, -2)
Return LenToString(CurrentMachine.dShortCut, 2)
End Get
Set(value As String)
Dim dShortCut As Double = 0
@@ -264,7 +264,7 @@ Public Class MachOptionWindowVM
Public Property AdditionalTable As String
Get
Return LenToString(CurrentMachine.dAdditionalTable, -2)
Return LenToString(CurrentMachine.dAdditionalTable, 2)
End Get
Set(value As String)
Dim dAdditionalTable As Double = 0
+2 -2
View File
@@ -195,8 +195,8 @@ Public Class MainWindowM
' Verifico abilitazione nesting automatico
m_bAutoNestOption = Not String.IsNullOrWhiteSpace( sNestKey)
' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2310, 1, m_nKeyLevel) And
EgtGetKeyOptions(9423, 2310, 1, m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2311, 1, m_nKeyLevel) And
EgtGetKeyOptions(9423, 2311, 1, m_nKeyOptions)
' Verifico abilitazione prodotto
Dim bProd As Boolean = GetKeyOption(KEY_OPT.OFFICE_BASE)
' Inizializzazione generale di EgtInterface
+2 -2
View File
@@ -69,6 +69,6 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.3.10.3")>
<Assembly: AssemblyFileVersion("2.3.10.3")>
<Assembly: AssemblyVersion("2.3.11.1")>
<Assembly: AssemblyFileVersion("2.3.11.1")>
+1
View File
@@ -285,6 +285,7 @@ Public Class MySceneHostVM
EgtOutLog( "Slab image not found :" & sOriPath)
End Try
EgtSetName(nPhotoId, PHOTO_NAME)
EgtChangePhotoCenterAsFlatScan( nPhotoId)
End If
' Elimino gli altri gruppi di lavorazioni
For Each nMGrpId As Integer In vMchGrps
+1 -1
View File
@@ -231,7 +231,7 @@ Public Class RawPartTabVM
Else
Return LenToString(m_dLength, 2)
End If
'Return LenToString(m_dLength, -2)
'Return LenToString(m_dLength, 2)
End Get
Set(value As String)
Dim dLength As Double = 0
+2 -2
View File
@@ -101,9 +101,9 @@ Public Class MachineAxis
EgtSetAxisPos(m_Name, dVal)
EgtGetAxisPos(m_Name, dVal)
If m_Linear Then
Value = LenToString(dVal, -3)
Value = LenToString(dVal, 3)
Else
Value = DoubleToString(dVal, -3)
Value = DoubleToString(dVal, 3)
End If
EgtDraw()
End Sub
+4 -4
View File
@@ -116,7 +116,7 @@ Public Class SideEntityControlVM
If m_Mode = ModeOpt.SIDEANGLE Then
Return DoubleToString(m_Parameter1, 2)
Else
Return LenToString(m_Parameter1, -2)
Return LenToString(m_Parameter1, 2)
End If
End Get
Set(value As String)
@@ -178,7 +178,7 @@ Public Class SideEntityControlVM
If m_Mode = ModeOpt.SIDEANGLE Then
Return LenToString(m_Parameter2, 2)
Else
Return LenToString(m_Parameter2, -2)
Return LenToString(m_Parameter2, 2)
End If
End Get
Set(value As String)
@@ -307,7 +307,7 @@ Public Class SideEntityControlVM
Private m_Parameter3 As Double
Public Property Parameter3 As String
Get
Return LenToString(m_Parameter3, -2)
Return LenToString(m_Parameter3, 2)
End Get
Set(value As String)
If m_Mode <> ModeOpt.SIDEANGLE Then
@@ -344,7 +344,7 @@ Public Class SideEntityControlVM
Private m_Parameter4 As Double
Public Property Parameter4 As String
Get
Return LenToString(m_Parameter4, -2)
Return LenToString(m_Parameter4, 2)
End Get
Set(value As String)
If m_Mode <> ModeOpt.SIDEANGLE Then
+1 -1
View File
@@ -7,7 +7,7 @@ Public Class UnderDrillControlVM
Private m_dDrillDepth As Double
Public Property dDrillDepth As String
Get
Return LenToString(m_dDrillDepth, -2)
Return LenToString(m_dDrillDepth, 2)
End Get
Set(value As String)
StringToLen(value, m_dDrillDepth)