Compare commits
94 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 753ff7b4f1 | |||
| 1edfe486cb | |||
| 7190993f11 | |||
| 249289144f | |||
| 36ee5e4352 | |||
| 147099b702 | |||
| dd81384bb8 | |||
| 9cf61d691d | |||
| 358c5df390 | |||
| ccaec9af5a | |||
| 1dbecd0083 | |||
| 11c6f95378 | |||
| 3604a85cc1 | |||
| 3aaaa0fcb6 | |||
| 52da2bc2c9 | |||
| 4de476907f | |||
| 07bcb7479b | |||
| 92818aafd4 | |||
| f4326b27b7 | |||
| 1f4a0afd75 | |||
| 565ba3c756 | |||
| 7ab4e56594 | |||
| 697fb4c730 | |||
| 4f5804206d | |||
| 58828cf846 | |||
| 36138ec459 | |||
| 7fc49b0d1d | |||
| cf9379272c | |||
| cd6714752e | |||
| 4c62410c20 | |||
| b017fef2b9 | |||
| 17785afc20 | |||
| 62953c981e | |||
| c3a3057420 | |||
| 8fa7b6188c | |||
| f3770dfc7c | |||
| 1358cef04a | |||
| e0fe4d9444 | |||
| 05186db728 | |||
| 5b21559e56 | |||
| 13a774429e | |||
| bde6c38733 | |||
| e3beaf2aa3 | |||
| deb8b34402 | |||
| 49311579ec | |||
| 589b7211ab | |||
| 892806d32a | |||
| 914a89014e | |||
| 3043a717d3 | |||
| 8a3b52e082 | |||
| f4126dba7a | |||
| 6009db35cd | |||
| 4a42374891 | |||
| 64c6a6cf9b | |||
| d1a8f033db | |||
| a6be019b32 | |||
| c343b18571 | |||
| f2a777a226 | |||
| 2e0979a618 | |||
| bd33450bb0 | |||
| fa0ebe1503 | |||
| d33a976d3b | |||
| ebe0c84e1f | |||
| 090e930a0f | |||
| f319409261 | |||
| ad7634f52d | |||
| c95fb50006 | |||
| a788f207af | |||
| f4a8edd421 | |||
| 601f66187a | |||
| a92822bb87 | |||
| 1a9045a23f | |||
| fb0d35eddf | |||
| c367f1bfe9 | |||
| d789be4547 | |||
| 20e1e9b41c | |||
| b25f065f3c | |||
| 83cf2646cf | |||
| 11bc92bb10 | |||
| 953083e429 | |||
| 132990d705 | |||
| 0477c42208 | |||
| c11925e90f | |||
| d745119195 | |||
| aa283fd190 | |||
| 243125cbb4 | |||
| 2789051005 | |||
| 0b13379731 | |||
| 6cc7ba8ccd | |||
| 36674aeb65 | |||
| 9aa9b51710 | |||
| 15b87d7911 | |||
| e9ff1c198b | |||
| abc304e25c |
@@ -108,6 +108,8 @@ Public Class CompoListPageVM
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If m_SideAngle_IsChecked OrElse m_Drip_IsChecked Then Return
|
||||
CompoWindowMap.refCompoSceneHostV.m_SelListHole.Clear()
|
||||
CompoWindowMap.refCompoSceneHostV.m_DeselectListHole.Clear()
|
||||
m_FiloTop_IsChecked = value
|
||||
If value Then
|
||||
' Se non ci sono loop interni, imposto quello esterno
|
||||
@@ -122,6 +124,7 @@ Public Class CompoListPageVM
|
||||
SideEntityControl = New SideEntityControlV(m_SideEntityControlVM)
|
||||
m_CompoListVisibility = Visibility.Collapsed
|
||||
m_CompoBackVisibility = Visibility.Collapsed
|
||||
CompoWindowMap.refCompoSceneHostV.SetRefSideEntityControlVM(m_SideEntityControlVM)
|
||||
Else
|
||||
m_SideEntityControlVM.Close()
|
||||
m_SideEntityControlVM = Nothing
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
</ToggleButton.Content>
|
||||
</ToggleButton>
|
||||
|
||||
<!--FiloTop--><!--
|
||||
<ToggleButton Padding="0"
|
||||
<!--FiloTop-->
|
||||
<!--<ToggleButton Padding="0"
|
||||
IsChecked="{Binding FiloTop_IsChecked}"
|
||||
Style="{StaticResource CompoWindow_ToggleButton}"
|
||||
Margin="0,0,1.75,0"
|
||||
|
||||
@@ -67,8 +67,6 @@ 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)
|
||||
@@ -750,6 +748,50 @@ Public Class CompoParamPageVM
|
||||
NotifyPropertyChanged("MsgColor")
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateInLoopReference(nCmp As Integer)
|
||||
' aggiorno il layer "FiloTop"
|
||||
Dim nIdInLoop As Integer = EgtGetFirstNameInGroup(EgtGetFirstGroupInGroup(GDB_ID.ROOT), "InLoop")
|
||||
While nIdInLoop <> GDB_ID.NULL
|
||||
Dim nCmpInfoIL As Integer = 0
|
||||
If EgtGetInfo(nIdInLoop, "ID", nCmpInfoIL) AndAlso nCmp = nCmpInfoIL Then
|
||||
Dim nLayFiloTop As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(nIdInLoop, "FiloTopRef", nLayFiloTop)
|
||||
If nLayFiloTop <> GDB_ID.NULL Then
|
||||
Dim LocalList As New List(Of Integer) From {nIdInLoop}
|
||||
If IsNothing(m_SideEntityControlVM) Then
|
||||
m_SideEntityControlVM = New SideEntityControlVM(SideEntityControlVM.CallingWindowOpt.COMPO,
|
||||
CompoWindowMap.refCompoSceneHostV.CompoScene,
|
||||
SideEntityControlVM.ModeOpt.FILOTOP)
|
||||
m_SideEntityControlVM.CreateFiloTopPreView(LocalList)
|
||||
Else
|
||||
m_SideEntityControlVM.CreateFiloTopPreView(LocalList)
|
||||
End If
|
||||
EgtSetStatus(nLayFiloTop, GDB_ST.ON_)
|
||||
Exit While
|
||||
End If
|
||||
End If
|
||||
nIdInLoop = EgtGetNextName(nIdInLoop, "InLoop")
|
||||
End While
|
||||
End Sub
|
||||
|
||||
' riceve la info "ID" della componente
|
||||
Public Sub SetStatusVisibilityInLoopReference(nCmp As Integer, Status As GDB_ST)
|
||||
' aggiorno il layer "FiloTop"
|
||||
Dim nIdInLoop As Integer = EgtGetFirstNameInGroup(EgtGetFirstGroupInGroup(GDB_ID.ROOT), "InLoop")
|
||||
While nIdInLoop <> GDB_ID.NULL
|
||||
Dim nCmpInfoIL As Integer = 0
|
||||
If EgtGetInfo(nIdInLoop, "ID", nCmpInfoIL) AndAlso nCmp = nCmpInfoIL Then
|
||||
Dim nLayFiloTop As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(nIdInLoop, "FiloTopRef", nLayFiloTop)
|
||||
If nLayFiloTop <> GDB_ID.NULL Then
|
||||
EgtSetStatus(nLayFiloTop, Status)
|
||||
Exit While
|
||||
End If
|
||||
End If
|
||||
nIdInLoop = EgtGetNextName(nIdInLoop, "InLoop")
|
||||
End While
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
@@ -867,6 +909,7 @@ Public Class CompoParamPageVM
|
||||
Dim nCmpInfo As Integer = 0
|
||||
If EgtGetInfo(nId, "ID", nCmpInfo) AndAlso nCmp = nCmpInfo Then
|
||||
EgtSetStatus(nId, GDB_ST.OFF)
|
||||
UpdateInLoopReference(nCmp)
|
||||
Exit While
|
||||
End If
|
||||
nId = EgtGetNextName(nId, "HoleLabels")
|
||||
|
||||
@@ -3,6 +3,11 @@ Imports EgtWPFLib5
|
||||
|
||||
Public Class CompoSceneHostV
|
||||
|
||||
Public m_SelListHole As New List(Of Integer)
|
||||
Public m_DeselectListHole As New List(Of Integer)
|
||||
|
||||
Private m_refSideEntityControlVM As SideEntityControlVM
|
||||
|
||||
Private m_SelFromScene As Boolean = False
|
||||
Friend ReadOnly Property SelFromScene As Boolean
|
||||
Get
|
||||
@@ -36,6 +41,10 @@ Public Class CompoSceneHostV
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Public Sub SetRefSideEntityControlVM(refSideEntityControl As SideEntityControlVM)
|
||||
m_refSideEntityControlVM = refSideEntityControl
|
||||
End Sub
|
||||
|
||||
Private Sub PreInitializeScene()
|
||||
' imposto colore di default
|
||||
Dim DefColor As New Color3d(0, 0, 0)
|
||||
@@ -156,6 +165,8 @@ Public Class CompoSceneHostV
|
||||
Dim nCmpInfo As Integer = 0
|
||||
If EgtGetInfo(nHLId, "ID", nCmpInfo) AndAlso nCmp = nCmpInfo Then
|
||||
EgtSetStatus(nHLId, GDB_ST.ON_)
|
||||
' nascondo eventuali FiloTop
|
||||
CompoWindowMap.refCompoParamPageVM.SetStatusVisibilityInLoopReference(nCmp, GDB_ST.OFF)
|
||||
Exit While
|
||||
End If
|
||||
nHLId = EgtGetNextName(nHLId, "HoleLabels")
|
||||
@@ -262,6 +273,8 @@ Public Class CompoSceneHostV
|
||||
EgtRemoveInfo(nLayId, INFO_DEPTH)
|
||||
EgtResetColor(nLayId)
|
||||
End If
|
||||
m_DeselectListHole.Add(nLayId)
|
||||
m_SelListHole.Remove(nLayId)
|
||||
Else
|
||||
Dim sLayName As String = ""
|
||||
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP Then
|
||||
@@ -272,12 +285,18 @@ Public Class CompoSceneHostV
|
||||
EgtSetInfo(nLayId, INFO_DEPTH, SideAngleEntity.m_Parameter2)
|
||||
EgtSetColor(nLayId, New Color3d(255, 255, 255))
|
||||
End If
|
||||
m_SelListHole.Add(nLayId)
|
||||
m_DeselectListHole.Remove(nLayId)
|
||||
End If
|
||||
EgtDraw()
|
||||
End If
|
||||
End If
|
||||
nId = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
If Not IsNothing(m_refSideEntityControlVM) Then
|
||||
m_refSideEntityControlVM.CreateFiloTopPreView(m_SelListHole)
|
||||
m_refSideEntityControlVM.EraseFiloTopPreview(m_DeselectListHole)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' Events
|
||||
|
||||
@@ -18,6 +18,7 @@ Module ConstIni
|
||||
Public Const S_GENERAL As String = "General"
|
||||
Public Const K_DEBUG As String = "Debug"
|
||||
Public Const K_LICENCE As String = "Licence"
|
||||
Public Const K_NETKEY As String = "NetKey"
|
||||
Public Const K_USERLEVEL As String = "UserLevel"
|
||||
Public Const K_MAXINST As String = "MaxInstances"
|
||||
Public Const K_INSTANCES As String = "Instances"
|
||||
@@ -103,6 +104,8 @@ Module ConstIni
|
||||
Public Const K_ENGRAVENUMBER2 As String = "EngraveNumber2"
|
||||
Public Const K_ENGRAVEDEPTH As String = "EngraveDepth"
|
||||
Public Const K_ENGRAVESHORT As String = "EngraveShort"
|
||||
Public Const K_ENGRAVEANGLE As String = "EngraveAngle"
|
||||
Public Const K_ENGRAVEDEPTH2 As String = "EngraveDepth2"
|
||||
Public Const K_DRIPOFFSET As String = "DripOffset"
|
||||
Public Const K_DRIPOFFSET2 As String = "DripOffset2"
|
||||
Public Const K_DRIPDEPTH As String = "DripDepth"
|
||||
@@ -110,6 +113,7 @@ Module ConstIni
|
||||
Public Const K_UNDERDRILLDEPTH As String = "UnderDrillDepth"
|
||||
Public Const K_FILOTOPOFFSET As String = "FiloTopOffset"
|
||||
Public Const K_FILOTOPDEPTH As String = "FiloTopDepth"
|
||||
Public Const K_FILOTOPROUNDOFF As String = "FiloTopRoundOff"
|
||||
|
||||
Public Const S_NEST As String = "Nest"
|
||||
Public Const K_DIRECT As String = "Direct"
|
||||
@@ -122,6 +126,7 @@ Module ConstIni
|
||||
Public Const K_AUTOMATICOPTIMIZE As String = "AutomaticOptimize"
|
||||
Public Const K_AUTOMATICMAXTIME As String = "AutomaticMaxTime"
|
||||
Public Const K_DRAGRECTANGLE As String = "DragRectangle"
|
||||
Public Const K_STARTENDMODIFYONINTCORNER As String = "StartEndModifyOnIntCorner"
|
||||
|
||||
Public Const S_SPLIT As String = "Split"
|
||||
Public Const K_MOVE_LEV As String = "MoveLevel"
|
||||
|
||||
@@ -99,6 +99,9 @@ Friend Module CamAuto
|
||||
Dim bOk As Boolean = True
|
||||
Dim nIdPart As Integer = EgtGetFirstPart()
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' elimino il layer dei flag di separazione "AUX_SPLIT_WJ"
|
||||
Dim IdAuxLayer As Integer = EgtGetFirstNameInGroup(nIdPart, "AUX_SPLIT_WJ")
|
||||
EgtErase(IdAuxLayer)
|
||||
' accedo al Layer OutLoop
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
Dim nIdMy As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
@@ -111,6 +114,9 @@ Friend Module CamAuto
|
||||
Dim nRawId As Integer = CamAuto.GetCurrentRaw()
|
||||
nIdPart = EgtGetFirstPartInRawPart(nRawId)
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
' elimino il layer dei flag di separazione "AUX_SPLIT_WJ"
|
||||
Dim IdAuxLayer As Integer = EgtGetFirstNameInGroup(nIdPart, "AUX_SPLIT_WJ")
|
||||
EgtErase(IdAuxLayer)
|
||||
' accedo al Layer OutLoop
|
||||
Dim nIdLayerOutLoop As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_OUTLOOP)
|
||||
Dim nIdMy As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
@@ -143,6 +149,14 @@ Friend Module CamAuto
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Friend Function ResetAllBridges() As Boolean
|
||||
Dim bOk As Boolean = True
|
||||
Dim nMachGroup As Integer = EgtGetCurrMachGroup()
|
||||
Dim nBridgesGroup As Integer = EgtGetFirstNameInGroup(nMachGroup, "Bridges")
|
||||
bOk = EgtErase(nBridgesGroup)
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
' verifico che il contorno passato non sia stato separato
|
||||
Friend Function VerifyOutLoopIsClosed(nIdLayerOutLoop As Integer) As Boolean
|
||||
Dim nIdMy As Integer = EgtGetFirstInGroup(nIdLayerOutLoop)
|
||||
|
||||
@@ -158,8 +158,11 @@ Module ConstMach
|
||||
Public Const NAME_UNDERDRILL As String = "UnderDrill"
|
||||
' Nome layer preview
|
||||
Public Const NAME_PREVIEW As String = "PV"
|
||||
Public Const NAME_BRIDGES As String = "Bridges"
|
||||
Public Const NAME_BRIDGESLINE As String = "BridgeLine"
|
||||
' Info in layer contorno interno per FiloTop
|
||||
Public Const INFO_FILOTOP As String = "FiloTop"
|
||||
Public Const INFO_ROUNDOFF As String = "RoundOff"
|
||||
' Info in entità da tagliare per affondamento
|
||||
Public Const INFO_DEPTH As String = "Depth"
|
||||
Public Const INFO_DEPTH2 As String = "Depth2"
|
||||
@@ -251,6 +254,12 @@ Module ConstMach
|
||||
Public Const SELECT_REGION_LAYER As String = "SelectRegion"
|
||||
' Info in pezzo per stato rotazione
|
||||
Public Const INFO_PARTROT As String = "ROT"
|
||||
' Info in entità in OutLoop per indicare se è separata WaterJet
|
||||
Public Const INFO_JOINTENTITY As String = "JoinEntity"
|
||||
' Nome layer per "*" inidcanti un lato separato nel taglio WaterJet
|
||||
Public Const INFO_AUX_SPLIT_WJ As String = "AUX_SPLIT_WJ"
|
||||
' Info in OutLoop per punto inzio lavorazione WaterJet
|
||||
Public Const INFO_START As String = "Start"
|
||||
|
||||
' Nome di pezzo che è una cornice
|
||||
Public Const NAME_FRAME As String = "Frame"
|
||||
@@ -317,6 +326,9 @@ Module ConstMach
|
||||
Public Function COL_MCH_DRIPCUT() As Color3d
|
||||
Return New Color3d(255, 0, 165)
|
||||
End Function
|
||||
Public Function COL_MCH_ONENGRAVE_ANG() As Color3d
|
||||
Return New Color3d(255, 255, 100)
|
||||
End Function
|
||||
Public Function COL_MCH_DRIPFREE() As Color3d
|
||||
Return New Color3d(192, 0, 128)
|
||||
End Function
|
||||
|
||||
@@ -1415,6 +1415,16 @@ Friend Property sCurrMillNoTip As String
|
||||
OmagOFFICEMap.refMachinePanelVM.NotifyPropertyChanged(NameOf(OmagOFFICEMap.refMachinePanelVM.WjDb_Visibility))
|
||||
End Sub
|
||||
|
||||
' recupro dalla lista delle macchine l'oggetto associato al nome indicato
|
||||
Public Sub GetMachineClass(sMachineName As String)
|
||||
For Each Item In OmagOFFICEMap.refMachinePanelVM.MachineList
|
||||
If string.Compare(Item.Name, sMachineName, True) = 0 Then
|
||||
OmagOFFICEMap.refMachinePanelVM.SelectedMachine = Item
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
Public Sub LoadWJMaterial(Optional bIsStart As Boolean = False)
|
||||
Dim TempCurrMat As Material = CurrMat
|
||||
' Svuoto l'attuale lista di materiali e delle qualità
|
||||
|
||||
@@ -92,11 +92,12 @@ Public Module SplitAuto
|
||||
Mach.m_dStartFreeLen = FREELEN_INF + 1
|
||||
Mach.m_dEndFreeLen = FREELEN_INF + 1
|
||||
Dim nEntId, nSub As Integer
|
||||
If EgtGetMachiningGeometry( 0, nEntId, nSub) Then
|
||||
If EgtGetType( nEntId) = GDB_TY.CRV_ARC OrElse EgtGetType( nEntId) = GDB_TY.CRV_COMPO Then Mach.m_bIsLine = False
|
||||
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_PREVANG, INFO_NEXTANG), Mach.m_dPrevAng)
|
||||
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_NEXTANG, INFO_PREVANG), Mach.m_dNextAng)
|
||||
EgtGetInfo( nEntId, If( Not Mach.m_bInvert, INFO_START_FREELEN, INFO_END_FREELEN), Mach.m_dStartFreeLen)
|
||||
If EgtGetMachiningGeometry(0, nEntId, nSub) Then
|
||||
' EgtGetType( nEntId) = GDB_TY.CRV_ARC OrElse
|
||||
If EgtGetType(nEntId) = GDB_TY.CRV_COMPO Then Mach.m_bIsLine = False
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_PREVANG, INFO_NEXTANG), Mach.m_dPrevAng)
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_NEXTANG, INFO_PREVANG), Mach.m_dNextAng)
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_START_FREELEN, INFO_END_FREELEN), Mach.m_dStartFreeLen)
|
||||
EgtGetInfo(nEntId, If(Not Mach.m_bInvert, INFO_END_FREELEN, INFO_START_FREELEN), Mach.m_dEndFreeLen)
|
||||
Mach.m_bEnableInvert = GetEnableInvert(nEntId)
|
||||
EgtMidVector(nEntId, GDB_ID.ROOT, Mach.m_vtDir)
|
||||
|
||||
@@ -444,15 +444,14 @@ Module VacuumCups
|
||||
Dim dLen, dAngVertDeg, dAngOrizzDeg As Double
|
||||
frMinRect.VersX().ToSpherical(dLen, dAngVertDeg, dAngOrizzDeg)
|
||||
dRotAngDeg = dAngOrizzDeg
|
||||
If b3Vac.DimY() > b3Vac.DimX() + EPS_SMALL Then dRotAngDeg -= 90
|
||||
Dim dPreferredRot As Double = m_dPreferredRot
|
||||
If bRotateVacuumNearExtraStrokeX And (Math.Abs(dRotAngDeg - 90) < 45 Or Math.Abs(dRotAngDeg - 270) < 45) Then
|
||||
If bRotateVacuumNearExtraStrokeX And Not IsHorizontal(dAngOrizzDeg) Then
|
||||
If frMinRect.Orig().x < b3Tab.Center().x Then
|
||||
dPreferredRot = m_dPrefVertRotXMinus
|
||||
Else
|
||||
dPreferredRot = m_dPrefVertRotXPlus
|
||||
End If
|
||||
ElseIf bRotateVacuumNearExtraStrokeY And (Math.Abs(dRotAngDeg - 90) > 45 Or Math.Abs(dRotAngDeg - 270) > 45) Then
|
||||
ElseIf bRotateVacuumNearExtraStrokeY And IsHorizontal(dAngOrizzDeg) Then
|
||||
' se l'orientemanto è orizzontale e la macchina è stata abilitata
|
||||
If frMinRect.Orig().y < b3Tab.Center().y Then
|
||||
dPreferredRot = m_dPrefVertRotYPlus
|
||||
@@ -460,6 +459,7 @@ Module VacuumCups
|
||||
dPreferredRot = m_dPrefVertRotYMinus
|
||||
End If
|
||||
End If
|
||||
If b3Vac.DimY() > b3Vac.DimX() + EPS_SMALL Then dRotAngDeg -= 90
|
||||
Dim dAngDelta As Double = If( Math.Abs( b3Vac.DimY() - b3Vac.DimX()) < 10 * EPS_SMALL, 90, 180)
|
||||
While dRotAngDeg - dPreferredRot >= dAngDelta / 2
|
||||
dRotAngDeg -= dAngDelta
|
||||
@@ -530,6 +530,13 @@ Module VacuumCups
|
||||
Return dDist
|
||||
End Function
|
||||
|
||||
Private Function IsHorizontal(dDegAng As Double) As Boolean
|
||||
If (Math.Abs(dDegAng) > 45 And Math.Abs(dDegAng) < 135) Or (Math.Abs(dDegAng) > 225 And Math.Abs(dDegAng) < 315) Then
|
||||
Return False
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' assegante le posizioni del centro delle ventose e l'angolo di posizionamento orizzontale verifica che la posizione sia raggiungibile
|
||||
Public Function VerifyOutOfStrokes(ptRef As Point3d, dRotAngDeg As Double) As Integer
|
||||
Dim dX, dY, dZ As Double
|
||||
|
||||
@@ -29,6 +29,13 @@ Public Class VeinMatchingWindow
|
||||
Private m_locPrev As System.Drawing.Point
|
||||
Private m_ptPrev As Point3d
|
||||
Private m_ptCen As Point3d
|
||||
' Gestione rotazione pezzi in fase di Drag
|
||||
Private m_bKeyCtrlPressed As Boolean = False
|
||||
Private m_bKeyLeftShiftPressed As Boolean = False
|
||||
Private m_dAngTotal As Double = 0
|
||||
Private m_dStartAng As Double = 0
|
||||
Private m_bStartRot As Boolean = False
|
||||
Private m_bStartMove As Boolean = False
|
||||
|
||||
Private Sub Window_Initialized(sender As Object, e As EventArgs)
|
||||
' Assegnazione scena all'host e posizionamento nella PlacePageGrid
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
<EgtFloating:EgtFloatingPanel x:Class="PrintPanelV"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:EgtFloating="clr-namespace:EgtWPFLib5.EgtFloating;assembly=EgtWPFLib5"
|
||||
IsTopDockable="True" IsBottomDockable="False" IsLeftDockable="False"
|
||||
IsRightDockable="False" Style="{StaticResource ToolBar_EgtFloatingPanel}">
|
||||
|
||||
<Button ToolTip="{Binding PrintToolTip}"
|
||||
Style="{StaticResource ToolBar_Button}"
|
||||
Command="{Binding PrintCommand}">
|
||||
<Image Source="/Resources/InstrumentPanel/Print.png" Stretch="Uniform"/>
|
||||
</Button>
|
||||
|
||||
</EgtFloating:EgtFloatingPanel>
|
||||
@@ -0,0 +1,3 @@
|
||||
Public Class PrintPanelV
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,84 @@
|
||||
Imports EgtUILib
|
||||
Imports EgtWPFLib5
|
||||
Public Class PrintPanelVM
|
||||
|
||||
' Definizione comandi
|
||||
Private m_cmdPrint As ICommand
|
||||
|
||||
Public ReadOnly Property PrintToolTip As String
|
||||
Get
|
||||
Return "Print shading" & vbCrLf & "Print hidden line (Shift)"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "PrintCommand"
|
||||
|
||||
Public ReadOnly Property PrintCommand As ICommand
|
||||
Get
|
||||
If m_cmdPrint Is Nothing Then
|
||||
m_cmdPrint = New Command(AddressOf Print)
|
||||
End If
|
||||
Return m_cmdPrint
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Sub Print(ByVal param As Object)
|
||||
Dim SM_Select As SM = SM.SHADING
|
||||
If (Keyboard.Modifiers And ModifierKeys.Shift) > 0 Then
|
||||
SM_Select = SM.HIDDENLINE
|
||||
EgtSetLineAttribs(3)
|
||||
End If
|
||||
Dim printDlg As New PrintDialog
|
||||
Dim sPath = OmagOFFICEMap.refMainWindowVM.MainWindowM.sTempDir & "\Image.png"
|
||||
If printDlg.ShowDialog() Then
|
||||
' Recupero le dimensioni dell'area di stampa
|
||||
Dim dW As Double = printDlg.PrintableAreaWidth
|
||||
Dim dH As Double = printDlg.PrintableAreaHeight
|
||||
Try
|
||||
' Creo l'immagine da allegare
|
||||
' EgtZoom(ZM.ALL, True)
|
||||
' Prendo l'immagine per la stampa
|
||||
Dim colWhite As New Color3d(255, 255, 255)
|
||||
Dim nImgW As Integer = GetWidthDimProjectV()
|
||||
Dim nImgH As Integer = GetHeightDimProjectV()
|
||||
If Not EgtGetImage(SM_Select, colWhite, colWhite, nImgW, nImgH, sPath) Then
|
||||
' Error in creating the print image
|
||||
EgtOutLog(EgtMsg(50181))
|
||||
EgtSetLineAttribs(1)
|
||||
Return
|
||||
End If
|
||||
EgtSetLineAttribs(1)
|
||||
'Metodo complesso di stampa che permette di rilasciare il file :
|
||||
'carico la bitmap e la metto in uno stream in memoria
|
||||
Dim stream As System.IO.Stream = New System.IO.MemoryStream()
|
||||
Dim bitmap As System.Drawing.Bitmap = New System.Drawing.Bitmap(sPath)
|
||||
bitmap.Save(stream, System.Drawing.Imaging.ImageFormat.Png)
|
||||
bitmap.Dispose()
|
||||
' la sposto in una BitmapImage
|
||||
Dim bitImage As New System.Windows.Media.Imaging.BitmapImage()
|
||||
bitImage.BeginInit()
|
||||
bitImage.StreamSource = stream
|
||||
bitImage.EndInit()
|
||||
' la sposto in un Visual Control
|
||||
Dim tmpImg As New Image
|
||||
tmpImg.BeginInit()
|
||||
tmpImg.Source = bitImage
|
||||
'tmpImg.Margin = New Thickness(-100)
|
||||
tmpImg.Stretch = Stretch.Uniform
|
||||
' ruoto a seconda dell'aspetto della pagina
|
||||
'If (dH > dW And nImgH < nImgW) Or (dH < dW And nImgH > nImgW) Then
|
||||
' tmpImg.LayoutTransform = New RotateTransform(-90)
|
||||
'End If
|
||||
tmpImg.EndInit()
|
||||
' eseguo la stampa
|
||||
printDlg.PrintVisual(tmpImg, "Parts Layout")
|
||||
Catch
|
||||
' Rrror in executing print
|
||||
EgtOutLog(EgtMsg(50182))
|
||||
End Try
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' PrintCommand
|
||||
|
||||
End Class
|
||||
@@ -95,16 +95,19 @@ Public Class MyMachinePanelVM
|
||||
OmagOFFICEMap.SetRefMachinePanelVM(Me)
|
||||
' recupero cartella radice delle macchine
|
||||
m_sMachinesRoot = OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot
|
||||
' Carica macchine da cartella delle macchine
|
||||
Machine.MachineListInit(m_sMachinesRoot, MachineList)
|
||||
' Inizializzo valori visibilità parametri Db utensili e lavorazioni
|
||||
OmagOFFICETMDbParamVisibility.Init()
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Sub Init( sMchRoots As String)
|
||||
' procedo ad inizializzare la classe → carico la lista "MachineList" che visualizzo per l'inserimento di nuovi MachGroup
|
||||
Machine.MachineListInit(sMchRoots, MachineList)
|
||||
' Inizializzo valori visibilità parametri Db utensili e lavorazioni
|
||||
OmagOFFICETMDbParamVisibility.Init()
|
||||
End Sub
|
||||
|
||||
''' <summary>
|
||||
''' Execute the Exec. This method is invoked by the ExecCommand.
|
||||
''' </summary>
|
||||
|
||||
@@ -86,13 +86,29 @@ Public Class MainWindowM
|
||||
Return m_sTempDir
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'------------------INIZIO Gestione elenco direttori macchine ------------------
|
||||
|
||||
Private m_sMachinesRootList As New List(Of String)
|
||||
Friend ReadOnly Property sMachinesRootList As List(Of String)
|
||||
Get
|
||||
Return m_sMachinesRootList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'------------------FINE Gestione elenco direttori macchine ------------------
|
||||
|
||||
Private m_sMachinesRoot As String
|
||||
Friend ReadOnly Property sMachinesRoot As String
|
||||
Friend Property sMachinesRoot As String
|
||||
Get
|
||||
Return m_sMachinesRoot
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_sMachinesRoot = value
|
||||
End Set
|
||||
End Property
|
||||
Private m_sToolMakersDir As String
|
||||
|
||||
Friend ReadOnly Property sToolMakersDir As String
|
||||
Get
|
||||
Return m_sToolMakersDir
|
||||
@@ -168,10 +184,20 @@ Public Class MainWindowM
|
||||
Directory.CreateDirectory(m_sBackUpDir)
|
||||
' Impostazione path resources dir
|
||||
m_sResourcesRoot = m_sDataRoot & "\" & RES_DIR
|
||||
' Impostazione direttorio per le macchine
|
||||
Dim nIndexDir As Integer = 1
|
||||
Dim sCurrMachineDir As String = String.Empty
|
||||
While GetMainPrivateProfileString(S_MACH, K_MACHINESDIR & nIndexDir.ToString, "", sCurrMachineDir) <> 0
|
||||
If VerifyMachineIsUnique(sCurrMachineDir) Then
|
||||
m_sMachinesRootList.Add(sCurrMachineDir)
|
||||
End If
|
||||
nIndexDir += 1
|
||||
End While
|
||||
' Impostazione direttorio (versioni precedenti 2.4i2) per le macchine
|
||||
If GetMainPrivateProfileString(S_MACH, K_MACHINESDIR, "", m_sMachinesRoot) = 0 Then
|
||||
m_sMachinesRoot = m_sDataRoot & "\" & MACHINES_DFL_DIR
|
||||
End If
|
||||
' Carico il direttorio nell'elenco dei direttori macchina
|
||||
If Not String.IsNullOrEmpty(m_sMachinesRoot) Then m_sMachinesRootList.Add(m_sMachinesRoot)
|
||||
' Impostazione direttorio per toolmakers
|
||||
If GetMainPrivateProfileString(S_MACH, K_TOOLMAKERSDIR, "", m_sToolMakersDir) = 0 Then
|
||||
m_sToolMakersDir = m_sDataRoot & "\" & TOOLMAKERS_DFL_DIR
|
||||
@@ -192,11 +218,13 @@ Public Class MainWindowM
|
||||
Dim sNestKey As String = ""
|
||||
EgtUILib.GetPrivateProfileString( S_LICENCE, K_NESTKEY, "", sNestKey, sLicFile)
|
||||
EgtSetNestKey( sNestKey)
|
||||
Dim bNetHwKey As Boolean = ( GetMainPrivateProfileInt(S_GENERAL, K_NETKEY, 0) = 1)
|
||||
EgtSetNetHwKey( bNetHwKey)
|
||||
' Verifico abilitazione nesting automatico
|
||||
m_bAutoNestOption = Not String.IsNullOrWhiteSpace( sNestKey)
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2405, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2405, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2502, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2502, 1, m_nKeyOptions)
|
||||
' Verifico abilitazione prodotto
|
||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.OFFICE_BASE)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
@@ -267,12 +295,26 @@ Public Class MainWindowM
|
||||
EgtOutLog("KeyOptions : " & bKey.ToString() & " " & m_nKeyOptions.ToString() & " " & bProd.ToString())
|
||||
EgtPHOTOLib.MainData.SetConfigDir(m_sConfigDir)
|
||||
EgtPHOTOLib.MainData.SetKeyLevel(m_nKeyLevel)
|
||||
EgtPHOTOLib.MainData.SetKeyOptions( CInt( m_nKeyOptions))
|
||||
EgtPHOTOLib.MainData.SetKeyOptions(CInt(m_nKeyOptions))
|
||||
EgtPHOTOLib.MainData.SetPhotoDir(m_sPhotoDir)
|
||||
EgtPHOTOLib.MainData.SetBackUpDir(m_sBackUpDir)
|
||||
EgtPHOTOLib.MainData.SetIsOmagOFFICE(True)
|
||||
EgtPHOTOLib.MainData.SetUser(Environment.MachineName & "\" & Environment.UserName & " (" & nInstance.ToString() & ")")
|
||||
Dim sIdKey As String = String.Empty
|
||||
EgtGetKeyInfo(sIdKey)
|
||||
EgtPHOTOLib.MainData.SetKey(sIdKey)
|
||||
End Sub
|
||||
|
||||
' verifico che il nome da inserire non esista già in elenco
|
||||
Private Function VerifyMachineIsUnique(sMachDir As String) As Boolean
|
||||
For Each sDir As String In m_sMachinesRootList
|
||||
If String.Compare( sDir.Trim().TrimEnd("\"c), sMachDir.Trim().TrimEnd("\"c), True) = 0 Then
|
||||
Return False
|
||||
End If
|
||||
Next
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Sub ManageInstance()
|
||||
Dim bCreated As Boolean
|
||||
Try
|
||||
|
||||
@@ -29,8 +29,8 @@ Imports System.Windows
|
||||
#End If
|
||||
#End If
|
||||
<Assembly: AssemblyCompany("Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("OmagOFFICE")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2017-2022 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyProduct("OmagOFFICE")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2017-2023 by Egalware s.r.l.")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
<Assembly: ComVisible(false)>
|
||||
'In order to begin building localizable applications, set
|
||||
@@ -69,6 +69,6 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.4.5.1")>
|
||||
<Assembly: AssemblyFileVersion("2.4.5.1")>
|
||||
<Assembly: AssemblyVersion("2.5.2.1")>
|
||||
<Assembly: AssemblyFileVersion("2.5.2.1")>
|
||||
|
||||
|
||||
@@ -33,19 +33,22 @@ Public Class MyMachGroupPanelVM
|
||||
|
||||
Sub New()
|
||||
MyBase.New()
|
||||
' Recupero la macchina di default
|
||||
Dim sDefaultMachine As String = String.Empty
|
||||
GetMainPrivateProfileString(S_MACH, K_CURRMACH, "", sDefaultMachine)
|
||||
' Creo riferimento a questa classe in OmagOFFICEMap
|
||||
OmagOFFICEMap.SetRefMachGroupPanelVM(Me)
|
||||
InitMachGroupPanel(True, OmagOFFICEMap.refMachinePanelVM.MachineList.ToList(),
|
||||
sDefaultMachine, BASE_MACH_GROUP & "1")
|
||||
End Sub
|
||||
|
||||
#End Region ' CONSTRUCTOR
|
||||
|
||||
#Region "METHODS"
|
||||
|
||||
Public Sub Init()
|
||||
' Recupero la macchina di default
|
||||
Dim sDefaultMachine As String = String.Empty
|
||||
GetMainPrivateProfileString(S_MACH, K_CURRMACH, "", sDefaultMachine)
|
||||
EgtSetCurrMachine(sDefaultMachine)
|
||||
InitMachGroupPanel(True, OmagOFFICEMap.refMachinePanelVM.MachineList.ToList(), sDefaultMachine, BASE_MACH_GROUP & "1")
|
||||
End Sub
|
||||
|
||||
Public Overrides Sub AddMachGroup()
|
||||
If NewMachGroup() Then
|
||||
' creo oggetto gruppo creato
|
||||
@@ -71,7 +74,9 @@ Public Class MyMachGroupPanelVM
|
||||
Dim sMachine As String = String.Empty
|
||||
EgtGetMachGroupName(nId, sName)
|
||||
EgtGetMachGroupMachineName(nId, sMachine)
|
||||
MachGroupList.Add(New MyMachGroup(nId, sName, sMachine, EgtGetFirstNameInGroup(nId, "Opers")))
|
||||
Dim NewMyMachGoup As MyMachGroup = New MyMachGroup(nId, sName, sMachine, EgtGetFirstNameInGroup(nId, "Opers"))
|
||||
NewMyMachGoup.IsValid = VerifyMachExists(sMachine)
|
||||
MachGroupList.Add(NewMyMachGoup)
|
||||
If OmagOFFICEMap.refMainWindowVM.MainWindowM.m_SlabDB Then
|
||||
Dim sSlabNameDB As String = String.Empty
|
||||
EgtGetInfo(nId, INFO_SLABNAME, sSlabNameDB)
|
||||
@@ -99,6 +104,8 @@ Public Class MyMachGroupPanelVM
|
||||
' Salvo macchina del gruppo come nuovo default
|
||||
Dim sCurrMachName As String = String.Empty
|
||||
EgtGetCurrMachineName(sCurrMachName)
|
||||
CurrentMachine.GetMachineClass(sCurrMachName)
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot = Path.GetDirectoryName(OmagOFFICEMap.refMachinePanelVM.SelectedMachine.DirPath)
|
||||
WriteMainPrivateProfileString(S_MACH, K_CURRMACH, sCurrMachName)
|
||||
' Ricarico la macchina corrente
|
||||
InitCurrentMachine(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, sCurrMachName,
|
||||
@@ -152,6 +159,9 @@ Public Class MyMachGroupPanelVM
|
||||
Public Overrides Function OnPostSetCurrMachGroup() As Boolean
|
||||
' Imposto vista solo tavola
|
||||
EgtSetMachineLook(MCH_LOOK.TAB)
|
||||
CurrentMachine.GetMachineClass(SelectedMachGroup.Machine)
|
||||
If IsNothing(OmagOFFICEMap.refMachinePanelVM.SelectedMachine) Then Return False
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot = Path.GetDirectoryName(OmagOFFICEMap.refMachinePanelVM.SelectedMachine.DirPath)
|
||||
' Ricarico la macchina corrente
|
||||
InitCurrentMachine(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, SelectedMachGroup.Machine,
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.PRODUCTION_LINE),
|
||||
|
||||
@@ -33,8 +33,15 @@ Public Class MySceneHostVM
|
||||
' Recupero e imposto handle finestra principale
|
||||
Dim hMainWnd As IntPtr = New WindowInteropHelper(Application.Current.MainWindow).Handle
|
||||
EgtSetMainWindowHandle(hMainWnd)
|
||||
' Recupero l'elenco dei direttori radice macchina come stringa del tipo "..\Dir1\Example01|..\Dir2\|Example02"
|
||||
Dim sMchRoots As String = GetMachineBaseDirs()
|
||||
' inizializzo gestore lavorazioni
|
||||
EgtInitMachMgr(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, OmagOFFICEMap.refMainWindowVM.MainWindowM.sToolMakersDir)
|
||||
If Not EgtInitMachMgr(sMchRoots, OmagOFFICEMap.refMainWindowVM.MainWindowM.sToolMakersDir) Then
|
||||
EgtOutLog("Error on loading machines roots: " & sMchRoots)
|
||||
End If
|
||||
' inizializzo gestione più macchine
|
||||
OmagOFFICEMap.refMachinePanelVM.Init(sMchRoots)
|
||||
OmagOFFICEMap.refMachGroupPanelVM.Init()
|
||||
Return
|
||||
End If
|
||||
' Problemi
|
||||
@@ -157,6 +164,21 @@ Public Class MySceneHostVM
|
||||
MainScene.SetStatusNull()
|
||||
End Sub
|
||||
|
||||
Private Function GetMachineBaseDirs() As String
|
||||
' Trasformo l'elenco dei direttori radice macchina in una stringa del tipo "..\Dir1\Example01|..\Dir2\|Example02"
|
||||
Dim sMchRoots As String = ""
|
||||
' Pulisco eventuali caratteri nascosti: origString.Replace(vbCr, "").Replace(vbLf, "")
|
||||
For Each MachDir In OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRootList
|
||||
MachDir = MachDir.Replace(vbCr, "").Replace(vbLf, "")
|
||||
sMchRoots &= MachDir & "|"
|
||||
Next
|
||||
' rimuovo dalla stringa l'ultimo carattere "|" inserito
|
||||
sMchRoots = sMchRoots.Remove(sMchRoots.Length - 1, 1)
|
||||
If String.IsNullOrEmpty(sMchRoots) Then sMchRoots = OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot
|
||||
EgtOutLog("Machine root list: " & sMchRoots)
|
||||
Return sMchRoots
|
||||
End Function
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "ProjectManager"
|
||||
@@ -223,6 +245,8 @@ Public Class MySceneHostVM
|
||||
End Sub
|
||||
|
||||
Private Function ExecExport(sDirDest As String) As Boolean
|
||||
' salvo il nome della macchina correntemente selezionata
|
||||
Dim CurrentSelectedMachGroup As String = OmagOFFICEMap.refMachGroupPanelVM.SelectedMachGroup.Machine
|
||||
' Path completa del progetto corrente
|
||||
Dim sFilePath As String = String.Empty
|
||||
EgtGetCurrFilePath(sFilePath)
|
||||
@@ -238,7 +262,9 @@ Public Class MySceneHostVM
|
||||
' Creo un contesto separato con gestore lavorazioni per poter spezzettare il progetto
|
||||
Dim nCurrCtx As Integer = EgtGetCurrentContext()
|
||||
Dim nCtx As Integer = EgtInitContext()
|
||||
EgtInitMachMgr(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, OmagOFFICEMap.refMainWindowVM.MainWindowM.sToolMakersDir)
|
||||
' Recupero l'elenco dei direttori radice macchina come stringa del tipo "..\Dir1\Example01|..\Dir2\|Example02"
|
||||
Dim sMchRoots As String = GetMachineBaseDirs()
|
||||
EgtInitMachMgr(sMchRoots, OmagOFFICEMap.refMainWindowVM.MainWindowM.sToolMakersDir)
|
||||
' Per ogni gruppo di lavoro
|
||||
For Each nMchGrpId As Integer In vMchGrps
|
||||
' Carico il progetto
|
||||
@@ -282,10 +308,10 @@ Public Class MySceneHostVM
|
||||
File.Copy(sOriPath, sNewPath, True)
|
||||
Catch ex As Exception
|
||||
bOk = False
|
||||
EgtOutLog( "Slab image not found :" & sOriPath)
|
||||
EgtOutLog("Slab image not found :" & sOriPath)
|
||||
End Try
|
||||
EgtSetName(nPhotoId, PHOTO_NAME)
|
||||
EgtChangePhotoCenterAsFlatScan( nPhotoId)
|
||||
EgtChangePhotoCenterAsFlatScan(nPhotoId)
|
||||
End If
|
||||
' Elimino gli altri gruppi di lavorazioni
|
||||
For Each nMGrpId As Integer In vMchGrps
|
||||
@@ -308,6 +334,27 @@ Public Class MySceneHostVM
|
||||
Dim nMarkId As Integer = EgtCreateGroup(GDB_ID.ROOT)
|
||||
EgtSetName(nMarkId, NAME_PROJMARK)
|
||||
EgtSetLevel(nMarkId, GDB_LV.SYSTEM)
|
||||
' Imposto la macchina: salvo l'altezza della sovratavola
|
||||
Dim sMachine As String = String.Empty
|
||||
EgtGetInfo(nMchGrpId, "Machine", sMachine)
|
||||
If Not String.IsNullOrEmpty(sMachine) Then
|
||||
CurrentMachine.GetMachineClass(sMachine)
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot = Path.GetDirectoryName(OmagOFFICEMap.refMachinePanelVM.SelectedMachine.DirPath)
|
||||
InitCurrentMachine(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, sMachine,
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.PRODUCTION_LINE),
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_MILL),
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_POLISHING),
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_WJ),
|
||||
True)
|
||||
Select Case GetCurrentTable()
|
||||
Case 3
|
||||
EgtSetInfo(nMarkId, K_TAB3_ADDITIONALTABLE, CurrentMachine.dAdditionalTable)
|
||||
Case 2
|
||||
EgtSetInfo(nMarkId, K_TAB2_ADDITIONALTABLE, CurrentMachine.dAdditionalTable)
|
||||
Case Else
|
||||
EgtSetInfo(nMarkId, K_ADDITIONALTABLE, CurrentMachine.dAdditionalTable)
|
||||
End Select
|
||||
End If
|
||||
Dim nReducedCut As Integer = 1
|
||||
EgtGetInfo(nMchGrpId, INFO_REDUCEDCUT, nReducedCut)
|
||||
EgtSetInfo(nMarkId, INFO_REDUCEDCUT, nReducedCut)
|
||||
@@ -326,6 +373,15 @@ Public Class MySceneHostVM
|
||||
' Salvo il file
|
||||
If Not EgtSaveFile(sFileDest, NGE.CMPTEXT) Then bOk = False
|
||||
Next
|
||||
CurrentMachine.GetMachineClass(CurrentSelectedMachGroup)
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot = Path.GetDirectoryName(OmagOFFICEMap.refMachinePanelVM.SelectedMachine.DirPath)
|
||||
' reimposto la macchina corrente
|
||||
InitCurrentMachine(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, CurrentSelectedMachGroup,
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.PRODUCTION_LINE),
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_MILL),
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_POLISHING),
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.GetKeyOption(KEY_OPT.ENABLE_WJ),
|
||||
True)
|
||||
' Distruggo il contesto corrente e ripristino quello originale
|
||||
EgtSetCurrentContext(nCurrCtx)
|
||||
EgtDeleteContext(nCtx)
|
||||
@@ -376,7 +432,9 @@ Public Class MySceneHostVM
|
||||
' Creo un contesto separato con gestore lavorazioni per poter spezzettare il progetto
|
||||
Dim nCurrCtx As Integer = EgtGetCurrentContext()
|
||||
Dim nCtx As Integer = EgtInitContext()
|
||||
EgtInitMachMgr(OmagOFFICEMap.refMainWindowVM.MainWindowM.sMachinesRoot, OmagOFFICEMap.refMainWindowVM.MainWindowM.sToolMakersDir)
|
||||
' Recupero l'elenco dei direttori radice macchina come stringa del tipo "..\Dir1\Example01|..\Dir2\|Example02"
|
||||
Dim sMchRoots As String = GetMachineBaseDirs()
|
||||
EgtInitMachMgr(sMchRoots, OmagOFFICEMap.refMainWindowVM.MainWindowM.sToolMakersDir)
|
||||
' Per ogni gruppo di lavoro
|
||||
For Each nMchGrpId As Integer In vMchGrps
|
||||
' Carico il progetto
|
||||
@@ -769,6 +827,7 @@ Public Class MySceneHostVM
|
||||
Case OptionPanelVM.Tabs.NESTING
|
||||
OmagOFFICEMap.refNestingTabVM.OnKeyDownScene(sender, e)
|
||||
Case OptionPanelVM.Tabs.MACHINING
|
||||
OmagOFFICEMap.refSplitModeVM.OnKeyDownScene(sender, e)
|
||||
Case OptionPanelVM.Tabs.SIMUL
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -213,7 +213,11 @@
|
||||
<Compile Include="EgtStoneLib\VeinMatchingWindow.xaml.vb">
|
||||
<DependentUpon>VeinMatchingWindow.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="InstrumentPanel\PrintPanelV.xaml.vb">
|
||||
<DependentUpon>PrintPanelV.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="InstrumentPanel\MyInstrumentPanelVM.vb" />
|
||||
<Compile Include="InstrumentPanel\PrintPanelVM.vb" />
|
||||
<Compile Include="MachinePanel\MyMachinePanelVM.vb" />
|
||||
<Compile Include="MyMachGroupPanel\MyMachGroupPanelVM.vb" />
|
||||
<Compile Include="MachinePanel\MachinePanelV.xaml.vb">
|
||||
@@ -389,6 +393,10 @@
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="InstrumentPanel\PrintPanelV.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Page Include="MachinePanel\MachinePanelV.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
@@ -691,6 +699,9 @@
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\TopCommandBar\DxfOut.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Resources\InstrumentPanel\Print.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\OmagOFFICE\OmagOFFICER32.exe
|
||||
|
||||
@@ -224,13 +224,17 @@ Public Class MachiningTabVM
|
||||
End Property
|
||||
|
||||
Public Sub Prev(ByVal param As Object)
|
||||
Dim bOk As Boolean = True
|
||||
' Dichiaro solo visualizzazione
|
||||
m_bIsShow = True
|
||||
If m_MachiningMode = MachiningModeOpt.SPLIT Then
|
||||
OmagOFFICEMap.refSplitModeVM.ExitSplitRaw(False)
|
||||
Else
|
||||
OmagOFFICEMap.refMoveRawModeVM.ExitMoveRaw()
|
||||
' verifico collisione dei pezzi in fase di scarico
|
||||
bOk = OmagOFFICEMap.refMoveRawModeVM.ExitMoveRaw()
|
||||
End If
|
||||
' se trovata interferenza tra grezzi (dopo movimentazione) esco
|
||||
If Not bOk Then Return
|
||||
' Torno alla fase precedente
|
||||
EgtSetCurrPhase(EgtGetCurrPhase() - 1)
|
||||
' Si va sempre in Split
|
||||
@@ -255,19 +259,22 @@ Public Class MachiningTabVM
|
||||
End Property
|
||||
|
||||
Public Sub NextCmd(ByVal param As Object)
|
||||
Dim bOk As Boolean = True
|
||||
If m_MachiningMode = MachiningModeOpt.SPLIT Then
|
||||
OmagOFFICEMap.refSplitModeVM.ExitSplitRaw(False)
|
||||
MachiningMode = MachiningModeOpt.MOVERAWPART
|
||||
AutoVisibility = Visibility.Hidden
|
||||
OmagOFFICEMap.refMoveRawModeVM.InitMoveRaw()
|
||||
bOk = OmagOFFICEMap.refMoveRawModeVM.InitMoveRaw()
|
||||
Else
|
||||
OmagOFFICEMap.refMoveRawModeVM.ExitMoveRaw()
|
||||
' se verificata una interferenza allora esco
|
||||
bOk = OmagOFFICEMap.refMoveRawModeVM.ExitMoveRaw()
|
||||
If Not bOk Then Return
|
||||
MachiningMode = MachiningModeOpt.SPLIT
|
||||
AutoVisibility = Visibility.Visible
|
||||
OmagOFFICEMap.refSplitModeVM.InitSplitRaw()
|
||||
End If
|
||||
' Aggiorno possibilità di uscire
|
||||
ManageExit()
|
||||
' Se non ci sono interferenze tra i grezzi -> aggiorno possibilità di uscire
|
||||
If bOk Then ManageExit()
|
||||
End Sub
|
||||
|
||||
#End Region ' NextCommand
|
||||
|
||||
@@ -17,6 +17,7 @@ Public Class MoveRawModeVM
|
||||
Private m_bRemovedRaw As Boolean = False ' flag per rimozione manuale pezzi
|
||||
Private m_RawMoveDataList As New List(Of RawMoveData) ' dati di movimento
|
||||
Private m_bRawWithCups As Boolean = False ' flag per pezzo corrente con ventose
|
||||
Private m_CurrRawOnVacuum As Integer = GDB_ID.NULL ' identificativo pezzo correntemente attaccato alle ventose
|
||||
|
||||
Private m_dMoveStep As Double
|
||||
Public Property MoveStep As String
|
||||
@@ -108,6 +109,17 @@ Public Class MoveRawModeVM
|
||||
#Region "METHODS"
|
||||
|
||||
Friend Function InitMoveRaw() As Boolean
|
||||
'' verifico che il pezzo sia depositabile
|
||||
'If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then
|
||||
' ' mantengo la selezione del pezzo
|
||||
' EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
|
||||
' OmagOFFICEMap.refStatusBarVM.SetOutputMessage("Collisione pezzi", 3, MSG_TYPE.ERROR_)
|
||||
' EgtDraw()
|
||||
' ' non cambio pagina
|
||||
' Return False
|
||||
'End If
|
||||
' resetto l'inidice del pezzo da mnovimentare
|
||||
m_CurrRawOnVacuum = GDB_ID.NULL
|
||||
' Deseleziono tutto
|
||||
EgtDeselectAll()
|
||||
' Recupero i tagli allungati prima definiti
|
||||
@@ -158,14 +170,14 @@ Public Class MoveRawModeVM
|
||||
' Distanza iniziale
|
||||
m_dCurrDist = 0
|
||||
End If
|
||||
' Non dovrebbe mai accadere, ma inizializzo con default
|
||||
' Non dovrebbe mai accadere, ma inizializzo con default
|
||||
Else
|
||||
m_vtDir = Vector3d.Y_AX()
|
||||
m_ptMid = Point3d.ORIG()
|
||||
m_dOrigDist = 0
|
||||
m_dCurrDist = 0
|
||||
End If
|
||||
' Altrimenti movimento con ventose
|
||||
' Altrimenti movimento con ventose
|
||||
Else
|
||||
m_bRemovedRaw = False
|
||||
m_bRawWithCups = False
|
||||
@@ -182,7 +194,7 @@ Public Class MoveRawModeVM
|
||||
If OmagOFFICEMap.refMachiningTabVM.ByHand Then
|
||||
LRArrowVisibility = Visibility.Hidden
|
||||
RotationVisibility = Visibility.Hidden
|
||||
' Altrimenti per movimento con ventose
|
||||
' Altrimenti per movimento con ventose
|
||||
Else
|
||||
LRArrowVisibility = Visibility.Visible
|
||||
RotationVisibility = If(CurrentMachine.bRawSplMovRotate, Visibility.Visible, Visibility.Hidden)
|
||||
@@ -195,6 +207,17 @@ Public Class MoveRawModeVM
|
||||
End Function
|
||||
|
||||
Friend Function ExitMoveRaw() As Boolean
|
||||
' verifico che il pezzo sia depositabile
|
||||
If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then
|
||||
' mantengo la selezione del pezzo
|
||||
EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage("Collisione pezzi", 3, MSG_TYPE.ERROR_)
|
||||
EgtDraw()
|
||||
' non cambio pagina
|
||||
Return False
|
||||
End If
|
||||
' resetto l'inidice del pezzo da mnovimentare
|
||||
m_CurrRawOnVacuum = GDB_ID.NULL
|
||||
' Deseleziono tutto
|
||||
EgtDeselectAll()
|
||||
' Se movimento con ventose
|
||||
@@ -351,6 +374,39 @@ Public Class MoveRawModeVM
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
' Veririfica che il grezzo non entri in colliosione con altri pezzi
|
||||
Private Function VerifyCollisionWithOtherRawPart(nIdOnVacumm As Integer) As Boolean
|
||||
If nIdOnVacumm = GDB_ID.NULL Then Return False
|
||||
' Creo gruppo temporaneo in cui generare le superfici per la veririfica di collisione
|
||||
Dim m_nTempId As Integer = EgtCreateGroup(GDB_ID.ROOT)
|
||||
If m_nTempId = GDB_ID.NULL Then Return False
|
||||
EgtSetName(m_nTempId, "RawTemp")
|
||||
Dim nIdActualRawOutLine As Integer = EgtGetFirstNameInGroup(nIdOnVacumm, "RawOutline")
|
||||
Dim ActualRawFlatRegion As Integer = EgtCreateSurfFlatRegion(m_nTempId, nIdActualRawOutLine)
|
||||
Dim nCurrPhase As Integer = EgtGetCurrPhase()
|
||||
Dim nRawGroupId = EgtGetParent(EgtGetFirstRawPart())
|
||||
Dim nIdRaw As Integer = EgtGetFirstRawPart()
|
||||
' ciclo su tutti i grezzi per veririficare eventuali collisioni
|
||||
While nIdRaw <> GDB_ID.NULL
|
||||
' verifico la fase del grezzo
|
||||
If EgtVerifyRawPartCurrPhase(nIdRaw) And nIdOnVacumm <> nIdRaw Then
|
||||
' recupero il contorno del pezzo
|
||||
Dim nIdRawOutLine As Integer = EgtGetFirstNameInGroup(nIdRaw, "RawOutline")
|
||||
Dim nIdRawFlatRegion As Integer = EgtCreateSurfFlatRegion(m_nTempId, nIdRawOutLine)
|
||||
If EgtSurfFrIntersect(nIdRawFlatRegion, ActualRawFlatRegion) Then
|
||||
If EgtExistsObj(nIdRawFlatRegion) Then
|
||||
EgtErase(m_nTempId)
|
||||
' esiste una intersezione delle superfici
|
||||
Return True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
nIdRaw = EgtGetNextRawPart(nIdRaw)
|
||||
End While
|
||||
EgtErase(m_nTempId)
|
||||
Return False
|
||||
End Function
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
@@ -685,12 +741,34 @@ Public Class MoveRawModeVM
|
||||
' Se trovato il grezzo
|
||||
If nParentId = nRawGroupId Then
|
||||
Dim nStat As Integer = GDB_ST.ON_
|
||||
' Se il pezzo corrente è selezionato allora lo disattivo -> deposito del pezzo
|
||||
EgtGetStatus(nId, nStat)
|
||||
If nStat = GDB_ST.SEL Then
|
||||
EgtSetStatus(nId, GDB_ST.ON_)
|
||||
' Se con ventose, le nascondo
|
||||
If Not OmagOFFICEMap.refMachiningTabVM.ByHand Then EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
||||
' prima di rilasciare il pezzo verifico che non vada in collisione con altri pezzi sulla tavola
|
||||
If VerifyCollisionWithOtherRawPart(nId) Then
|
||||
' mantengo la selezione del pezzo
|
||||
EgtSetStatus(nId, GDB_ST.SEL)
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage("Collisione pezzi", 3, MSG_TYPE.ERROR_)
|
||||
Else
|
||||
' Se con ventose, le nascondo
|
||||
If Not OmagOFFICEMap.refMachiningTabVM.ByHand Then EgtSetStatus(GetVacuumId(), GDB_ST.OFF)
|
||||
End If
|
||||
|
||||
Else
|
||||
|
||||
' verifico che il pezzo precedente possa essere depositato correttamente
|
||||
If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then
|
||||
' mantengo la selezione del pezzo
|
||||
EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage("Collisione pezzi", 3, MSG_TYPE.ERROR_)
|
||||
EgtDraw()
|
||||
' esco dal ciclo, prima devo depositare correttamente il pezzo
|
||||
Exit While
|
||||
End If
|
||||
' salvo l'indice del pezzo correntemente attaccato alle ventose
|
||||
m_CurrRawOnVacuum = nId
|
||||
|
||||
EgtDeselectAll()
|
||||
EgtSetStatus(nId, GDB_ST.SEL)
|
||||
' Se con ventose, le posiziono sul grezzo
|
||||
@@ -736,6 +814,15 @@ Public Class MoveRawModeVM
|
||||
End If
|
||||
nId = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
|
||||
' clicco su un oggetto che non è un grezzo -> verifico che il pezzo precedente possa essere depositato correttamente
|
||||
If VerifyCollisionWithOtherRawPart(m_CurrRawOnVacuum) Then
|
||||
' mantengo la selezione del pezzo
|
||||
EgtSetStatus(m_CurrRawOnVacuum, GDB_ST.SEL)
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage("Collisione pezzi", 3, MSG_TYPE.ERROR_)
|
||||
EgtDraw()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region ' EVENTS
|
||||
|
||||
@@ -69,23 +69,38 @@
|
||||
<StackPanel>
|
||||
|
||||
<UniformGrid Columns="3" Margin="0,0,0,5">
|
||||
|
||||
<Button Content="{Binding CutMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding CutCommand}"
|
||||
Visibility="{Binding CutBtnVisibility}"
|
||||
Margin="0,0,2.5,0"/>
|
||||
<Grid>
|
||||
<Button Content="{Binding CutMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding CutCommand}"
|
||||
Visibility="{Binding CutBtnVisibility}"
|
||||
Margin="0,0,2.5,0"/>
|
||||
<ToggleButton Grid.Row="0"
|
||||
Content="{Binding BridgeMsg}"
|
||||
Style="{StaticResource OptionPanel_ToggleWrapButton}"
|
||||
IsChecked="{Binding BridgeBtn_IsChecked}"
|
||||
Visibility="{Binding BridgeBtnVisibility}"
|
||||
Margin="0,0,2.5,0" Padding="0"/>
|
||||
</Grid>
|
||||
|
||||
<Button Content="{Binding CutStartMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding CutStartCommand}"
|
||||
Visibility="{Binding CutStartBtnVisibility}"
|
||||
Margin="2.5,0,2.5,0"/>
|
||||
<Button Content="{Binding CutEndMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding CutEndCommand}"
|
||||
Visibility="{Binding CutEndBtnVisibility}"
|
||||
Margin="2.5,0,0,0"/>
|
||||
|
||||
<Grid>
|
||||
<Button Content="{Binding CutEndMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding CutEndCommand}"
|
||||
Visibility="{Binding CutEndBtnVisibility}"
|
||||
Margin="2.5,0,0,0"/>
|
||||
<ToggleButton Grid.Row="0"
|
||||
Content="{Binding BridgeDeleteMsg}"
|
||||
Style="{StaticResource OptionPanel_ToggleWrapButton}"
|
||||
IsChecked="{Binding BridgeDeleteBtn_IsChecked}"
|
||||
Visibility="{Binding BridgeDeleteBtnVisibility}"
|
||||
Margin="2.5,0,0,0" Padding="0"/>
|
||||
</Grid>
|
||||
</UniformGrid>
|
||||
|
||||
<Grid Visibility="{Binding AllExtRedVisibility}">
|
||||
@@ -138,23 +153,25 @@
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Columns="3" Margin="0,0,0,5">
|
||||
|
||||
|
||||
<Button Content="{Binding OutCenEndMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding OutCenEndCommand}"
|
||||
Visibility="{Binding OutCenEndBtnVisibility}"
|
||||
Margin="0,0,2.5,0" Padding="0"/>
|
||||
|
||||
<Button Content="{Binding AllOutEndMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding AllOutEndCommand}"
|
||||
Visibility="{Binding AllOutEndBtnVisibility}"
|
||||
Margin="2.5,0,2.5,0"/>
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding AllOutEndCommand}"
|
||||
Visibility="{Binding AllOutEndBtnVisibility}"
|
||||
Margin="2.5,0,2.5,0"/>
|
||||
|
||||
<Button Content="{Binding AllCenEndMsg}"
|
||||
Style="{StaticResource OptionPanel_TextWrapButton}"
|
||||
Command="{Binding AllCenEndCommand}"
|
||||
Visibility="{Binding AllCenEndBtnVisibility}"
|
||||
Margin="2.5,0,0,0"/>
|
||||
|
||||
|
||||
</UniformGrid>
|
||||
|
||||
<UniformGrid Columns="3" Margin="0,0,0,5">
|
||||
|
||||
@@ -25,6 +25,20 @@ Public Class SplitModeVM
|
||||
' verifico che le lavorazioni selezionate siano omogenee (con lo stesso utensile)
|
||||
Private m_bAreHomogeneous As Boolean = False
|
||||
|
||||
' Id tagli WJ per generazione ponticelli tra due percorsi
|
||||
Private m_nIdSelectedPartWJ_Srt As Integer = GDB_ID.NULL
|
||||
Private m_nIdSelectedSideWJ_Srt As Integer = GDB_ID.NULL
|
||||
Private m_nIdSelectedWaterJet_Srt As Integer = GDB_ID.NULL
|
||||
Private m_nIdSelectedPartWJ_End As Integer = GDB_ID.NULL
|
||||
Private m_nIdSelectedSideWJ_End As Integer = GDB_ID.NULL
|
||||
Private m_nIdSelectedWaterJet_End As Integer = GDB_ID.NULL
|
||||
' Id gruppo Bridges (Nuovo da versione 30/08/2022)
|
||||
Private m_nIdBridgesGroup As Integer = GDB_ID.NULL
|
||||
'Private m_nIdBridgeLineGroup As Integer = GDB_ID.NULL
|
||||
Private m_nIdBridge As Integer = GDB_ID.NULL
|
||||
Private m_ptSrtBridge As New Point3d
|
||||
Private m_ptEndBridge As New Point3d
|
||||
|
||||
' Flag di pagina attiva
|
||||
Private m_bActive As Boolean = False
|
||||
' Drag
|
||||
@@ -34,6 +48,8 @@ Public Class SplitModeVM
|
||||
Private m_bDragging As Boolean = False
|
||||
' Selected cut
|
||||
Private m_nSelected As Integer = GDB_ID.NULL
|
||||
' Abilita la mofica Inizio fine per i tagli interni sugli angoli
|
||||
Private m_StartEndModifyOnIntCorner As Boolean = False
|
||||
|
||||
Private m_ItemList As New ObservableCollection(Of NameIdLsBxItem)
|
||||
Public ReadOnly Property ItemList As ObservableCollection(Of NameIdLsBxItem)
|
||||
@@ -218,6 +234,52 @@ Public Class SplitModeVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_BridgeBtnVisibility As Visibility = Visibility.Hidden
|
||||
Public Property BridgeBtnVisibility As Visibility
|
||||
Get
|
||||
Return m_BridgeBtnVisibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_BridgeBtnVisibility = value
|
||||
NotifyPropertyChanged(NameOf(BridgeBtnVisibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_BridgeDeleteBtnVisibility As Visibility = Visibility.Hidden
|
||||
Public Property BridgeDeleteBtnVisibility As Visibility
|
||||
Get
|
||||
Return m_BridgeDeleteBtnVisibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_BridgeDeleteBtnVisibility = value
|
||||
NotifyPropertyChanged(NameOf(BridgeDeleteBtnVisibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_BridgeBtn_IsChecked As Boolean = False
|
||||
Public Property BridgeBtn_IsChecked As Boolean
|
||||
Get
|
||||
Return m_BridgeBtn_IsChecked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_BridgeBtn_IsChecked = value
|
||||
BridgeIsChecked()
|
||||
NotifyPropertyChanged(NameOf(BridgeBtn_IsChecked))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_BridgeDeleteBtn_IsChecked As Boolean = False
|
||||
Public Property BridgeDeleteBtn_IsChecked As Boolean
|
||||
Get
|
||||
Return m_BridgeDeleteBtn_IsChecked
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_BridgeDeleteBtn_IsChecked = value
|
||||
BridgeDeleteIsChecked()
|
||||
NotifyPropertyChanged(NameOf(BridgeDeleteBtn_IsChecked))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#Region "Messages"
|
||||
|
||||
Public ReadOnly Property OnOffMsg As String
|
||||
@@ -328,6 +390,18 @@ Public Class SplitModeVM
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property BridgeMsg As String
|
||||
Get
|
||||
Return "Bridge"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property BridgeDeleteMsg As String
|
||||
Get
|
||||
Return "Delete Bridge"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
' Definizione comandi
|
||||
@@ -367,9 +441,16 @@ Public Class SplitModeVM
|
||||
|
||||
Friend Function InitSplitRaw() As Boolean
|
||||
m_bActive = True
|
||||
' aggiorno la visualizzazione dei comandi per generare i bridge
|
||||
m_BridgeBtn_IsChecked = False
|
||||
NotifyPropertyChanged(NameOf(BridgeBtn_IsChecked))
|
||||
m_BridgeDeleteBtn_IsChecked = False
|
||||
NotifyPropertyChanged(NameOf(BridgeDeleteBtn_IsChecked))
|
||||
'm_CurrProjPage = m_MainWindow.m_CurrentProjectPageUC
|
||||
m_nDragInd = -1
|
||||
m_nDragType = 0
|
||||
' verifico se è abilitata la possibiltà di allungare i lati interni
|
||||
m_StartEndModifyOnIntCorner = (GetPrivateProfileInt(S_NEST, K_STARTENDMODIFYONINTCORNER, 0, sMachIniFile) <> 0)
|
||||
' Nascondo eventuali pezzi in parcheggio
|
||||
EstCalc.HideParkedParts()
|
||||
' Nascondo eventuale contorno da foto
|
||||
@@ -433,6 +514,9 @@ Public Class SplitModeVM
|
||||
|
||||
Friend Function ExitSplitRaw(Optional bTrueExit As Boolean = True) As Boolean
|
||||
m_bActive = False
|
||||
' eventualmente interrompo la creazione dei ponticelli
|
||||
DeselectWJBridgesPart()
|
||||
|
||||
' Rimuovo evidenziazione e numeri
|
||||
RemoveMarkAndNumbers()
|
||||
' Ripristino colori lavorazioni
|
||||
@@ -595,8 +679,32 @@ Public Class SplitModeVM
|
||||
' assegno numerazione
|
||||
NumberDirectionMachining(nI)
|
||||
Next
|
||||
' -------------------- Recupero le lavorazioni indicate come attive --------------------
|
||||
Dim ActiveMachLst As New List(Of Integer)
|
||||
For Each ItemSplitMach As NameIdLsBxItem In m_ItemList
|
||||
ActiveMachLst.Add(ItemSplitMach.Ind)
|
||||
Next
|
||||
' -------------------- Recupero le lavorazioni indicate come attive --------------------
|
||||
' Preparo la lista degli Item
|
||||
ShowMachiningList()
|
||||
' -------------------- Riattivo le lavorazioni precedenti --------------------
|
||||
For Each Item As SplitMach In m_MachiningList
|
||||
EgtSetInfo(Item.m_nId, INFO_MCH_USER_OFF, True)
|
||||
Next
|
||||
|
||||
For nIndex As Integer = 0 To ActiveMachLst.Count - 1
|
||||
For Each ItemSplitMach As NameIdLsBxItem In m_ItemList
|
||||
If ItemSplitMach.Ind = ActiveMachLst(nIndex) Then
|
||||
EgtRemoveInfo(m_MachiningList(ItemSplitMach.Ind).m_nId, INFO_MCH_USER_OFF)
|
||||
m_MachiningList(ItemSplitMach.Ind).m_bEnabled = True
|
||||
ItemSplitMach.bIsActive = True
|
||||
' sistemo colore
|
||||
ColorMachining(m_MachiningList(ItemSplitMach.Ind))
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
' -------------------- Riattivo le lavorazioni precedenti --------------------
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
' Aggiono abilitazione bottoni
|
||||
@@ -753,6 +861,21 @@ Public Class SplitModeVM
|
||||
AllReduceBtnVisibility = Visibility.Visible
|
||||
End If
|
||||
|
||||
' gestione bottone per generazione ponticelli
|
||||
If Type = MCH_OY.WATERJETTING Then
|
||||
' siccome la stessa posizione è occupata da due comandi sovrapposti
|
||||
If CutBtnVisibility = Visibility.Hidden Then
|
||||
BridgeBtnVisibility = Visibility.Visible
|
||||
BridgeDeleteBtnVisibility = Visibility.Visible
|
||||
Else
|
||||
BridgeBtnVisibility = Visibility.Hidden
|
||||
BridgeDeleteBtnVisibility = Visibility.Hidden
|
||||
End If
|
||||
Else
|
||||
BridgeBtnVisibility = Visibility.Hidden
|
||||
BridgeDeleteBtnVisibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function ModifyOtherLeadIn(nI As Integer, nLiOthType As Integer) As Boolean
|
||||
@@ -797,6 +920,15 @@ Public Class SplitModeVM
|
||||
vtXY.Normalize()
|
||||
Dim ptCen As Point3d = Point3d.Media(ptMin, ptMax) + vtXY * If(Not b2ndLav, -0.8, 0.8) * dHtxt
|
||||
ptCen.z = ptMax.z + 1
|
||||
|
||||
' ricavo la posizione del punto (se waterjet separata)
|
||||
If m_MachiningList(nI).m_nType = MCH_OY.WATERJETTING Or m_MachiningList(nI).m_nType = MCH_OY.MILLING Then
|
||||
Dim ptMid As Point3d
|
||||
Dim vVers As Vector3d
|
||||
MidPointOfCurve(m_MachiningList(nI).m_nId, ptMid, vVers)
|
||||
ptCen = ptMid ' + vVers * If(Not b2ndLav, -0.8, 0.8) * dHtxt
|
||||
End If
|
||||
|
||||
If bNumber Then
|
||||
Dim nNbrId As Integer = EgtCreateTextAdv(m_nNbrGrpId, ptCen, 0, (nI + 1).ToString(), "",
|
||||
300, False, dHtxt, dRat, 0, INS_POS.MC)
|
||||
@@ -851,6 +983,36 @@ Public Class SplitModeVM
|
||||
Return EgtGetBBoxGlob(nPvId, GDB_BB.STANDARD, ptMin, ptMax)
|
||||
End Function
|
||||
|
||||
Private Function MidPointOfCurve(nOperId As Integer, ByRef ptMid As Point3d, ByRef vVers As Vector3d) As Boolean
|
||||
Dim nPvId As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||
' creo un layer ausiliario per creare la curva composita
|
||||
Dim AuxLayer As Integer = EgtCreateGroup(nPvId)
|
||||
' imposto la lavorazione corrente
|
||||
EgtSetCurrMachining(nOperId)
|
||||
' recupero tutte le entità della lavorazione corrente
|
||||
Dim nInd As Integer = 0
|
||||
Dim nIdCurr As Integer
|
||||
Dim nSub As Integer
|
||||
Dim CurveCompoList As New List(Of Integer)
|
||||
While EgtGetMachiningGeometry(nInd, nIdCurr, nSub)
|
||||
CurveCompoList.Add(nIdCurr)
|
||||
nInd += 1
|
||||
End While
|
||||
Dim PtNearStart As Point3d
|
||||
Dim nIdCutPath As Integer = EgtCreateCurveCompoByChain(AuxLayer, CurveCompoList.ToArray, PtNearStart, False)
|
||||
Dim dLength As Double = 0
|
||||
EgtCurveLength(nIdCutPath, dLength)
|
||||
Dim dParam As Double = 0
|
||||
EgtCurveParamAtLength(nIdCutPath, dLength / 2, dParam)
|
||||
EgtAtParamPoint(nIdCutPath, dParam, GDB_RT.GLOB, ptMid)
|
||||
EgtAtParamVector(nIdCutPath, dParam, -1, vVers)
|
||||
vVers.Normalize()
|
||||
vVers.Rotate(Vector3d.Z_AX, 90)
|
||||
EgtErase(AuxLayer)
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function AddMachiningDirection(ptStart As Point3d, vtDir As Vector3d, dLen As Double, bTwin As Boolean) As Integer
|
||||
Dim dArrX As Double = dLen * Math.Cos(30 * Math.PI / 180)
|
||||
Dim dArrY As Double = dLen * Math.Sin(30 * Math.PI / 180)
|
||||
@@ -978,6 +1140,45 @@ Public Class SplitModeVM
|
||||
EgtSetInfo(m_MachiningList(nI).m_nId, INFO_MCH_USER_EAL, dOrigUsal)
|
||||
End Sub
|
||||
|
||||
Private Sub BridgeIsChecked()
|
||||
' eventualmente spengo il comando per eliminare i ponticelli
|
||||
If m_BridgeDeleteBtn_IsChecked Then
|
||||
m_BridgeDeleteBtn_IsChecked = False
|
||||
NotifyPropertyChanged(NameOf(BridgeDeleteBtn_IsChecked))
|
||||
End If
|
||||
' se deseleziono resetto tutte le variabili
|
||||
If Not m_BridgeBtn_IsChecked Then
|
||||
' se sono in fase di creazione di un ponticello interrompo
|
||||
DeselectWJBridgesPart()
|
||||
Return
|
||||
End If
|
||||
' recuoero il gruppo di lavorazione corrente
|
||||
Dim nIdCurrMachGroup As Integer = EgtGetCurrMachGroup()
|
||||
' creo il gruppo per i ponticelli
|
||||
Dim sNameGroup As String = NAME_BRIDGES
|
||||
Dim nId As Integer = EgtGetFirstNameInGroup(nIdCurrMachGroup, sNameGroup)
|
||||
If nId <> GDB_ID.NULL Then
|
||||
m_nIdBridgesGroup = nId
|
||||
End If
|
||||
' se non lo trovo allora lo creo
|
||||
If nId = GDB_ID.NULL Then
|
||||
m_nIdBridgesGroup = EgtCreateGroup(nIdCurrMachGroup)
|
||||
EgtSetName(m_nIdBridgesGroup, NAME_BRIDGES)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub BridgeDeleteIsChecked()
|
||||
' eventualmente spengo il comando per inserire i ponticelli
|
||||
If m_BridgeBtn_IsChecked Then
|
||||
m_BridgeBtn_IsChecked = False
|
||||
NotifyPropertyChanged(NameOf(BridgeBtn_IsChecked))
|
||||
End If
|
||||
|
||||
If Not m_BridgeDeleteBtn_IsChecked Then
|
||||
DeselectWJBridgesPart()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
#Region "COMMANDS"
|
||||
@@ -1770,10 +1971,27 @@ Public Class SplitModeVM
|
||||
|
||||
Dim bRepeat As Boolean = False
|
||||
Do
|
||||
' Se c'è limite alla lunghezza libera
|
||||
If m_MachiningList(nI).m_dStartFreeLen < FREELEN_INF Then
|
||||
' se abilitati i controlli sugli allungamenti dei lati interni
|
||||
If Not m_StartEndModifyOnIntCorner Then
|
||||
' Recupero sicurezza in corner interno
|
||||
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, CurrentMachine.sMachIniFile), 10 * EPS_SMALL)
|
||||
' Recupero lunghezza baffo del taglio
|
||||
Dim nPvId As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||
Dim dDT As Double = 0
|
||||
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
|
||||
dUsal = Math.Min(dUsal, m_MachiningList(nI).m_dStartFreeLen - dDT - dCornerSafety)
|
||||
End If
|
||||
End If
|
||||
EgtSetCurrMachining(nOperId)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.STARTADDLEN, dAddLen)
|
||||
If dAddLen - dOrigUsal < -10 * EPS_SMALL Then Return
|
||||
' verifico che non sia sull'angolo interno (altrimenti vieto la modifica)
|
||||
If Not m_StartEndModifyOnIntCorner And (dAddLen - dOrigUsal < -10 * EPS_SMALL) Then
|
||||
Return
|
||||
End If
|
||||
EgtSetMachiningParam(MCH_MP.STARTADDLEN, dAddLen + dUsal - dOrigUsal)
|
||||
EgtSetInfo(nOperId, INFO_MCH_USER_SAL, dUsal)
|
||||
UpdateMachiningPreview(m_MachiningList(nI).m_nId, True)
|
||||
@@ -1933,10 +2151,24 @@ Public Class SplitModeVM
|
||||
End If
|
||||
Dim bRepeat As Boolean = False
|
||||
Do
|
||||
' Se c'è limite alla lunghezza libera
|
||||
If m_MachiningList(nI).m_dEndFreeLen < FREELEN_INF Then
|
||||
' se abilitati i controlli sugli allungamenti dei lati interni
|
||||
If Not m_StartEndModifyOnIntCorner Then
|
||||
' Recupero sicurezza in corner interno
|
||||
Dim dCornerSafety As Double = Math.Max(GetPrivateProfileDouble(S_MACH_NEST, K_MACH_SAFE_LEN_INTCORNER, 1, CurrentMachine.sMachIniFile), 10 * EPS_SMALL)
|
||||
' Recupero lunghezza baffo del taglio
|
||||
Dim nPvId As Integer = GDB_ID.NULL
|
||||
EgtGetInfo(EgtGetFirstNameInGroup(nOperId, NAME_PREVIEW), INFO_PV_ONPART_ID, nPvId)
|
||||
Dim dDT As Double = 0
|
||||
EgtGetInfo(EgtGetFirstGroupInGroup(nPvId), "DT", dDT)
|
||||
dUeal = Math.Min(dUeal, m_MachiningList(nI).m_dEndFreeLen - dDT - dCornerSafety)
|
||||
End If
|
||||
End If
|
||||
EgtSetCurrMachining(nOperId)
|
||||
Dim dAddLen As Double = 0
|
||||
EgtGetMachiningParam(MCH_MP.ENDADDLEN, dAddLen)
|
||||
If dAddLen - dOrigUeal < -10 * EPS_SMALL Then
|
||||
If Not m_StartEndModifyOnIntCorner And (dAddLen - dOrigUeal < -10 * EPS_SMALL) Then
|
||||
Return
|
||||
End If
|
||||
EgtSetMachiningParam(MCH_MP.ENDADDLEN, dAddLen + dUeal - dOrigUeal)
|
||||
@@ -2075,8 +2307,6 @@ Public Class SplitModeVM
|
||||
|
||||
#Region "InvertCommand"
|
||||
|
||||
#End Region ' InvertComman
|
||||
|
||||
Public ReadOnly Property InvertCommand As ICommand
|
||||
Get
|
||||
If m_cmdInvert Is Nothing Then
|
||||
@@ -2133,10 +2363,248 @@ Public Class SplitModeVM
|
||||
Next
|
||||
End Sub
|
||||
|
||||
#End Region ' InvertComman
|
||||
|
||||
#End Region ' COMMANDS
|
||||
|
||||
#Region "EVENTS"
|
||||
|
||||
#Region "BRIDGE"
|
||||
|
||||
Private Sub OnMyMouseDownSceneBridges(sender As Object, e As System.Windows.Forms.MouseEventArgs,
|
||||
ByVal IsFirst As Boolean,
|
||||
ByRef m_nIdSelectedSideWJ As Integer,
|
||||
ByRef m_nIdSelectedWaterJet As Integer,
|
||||
ByRef nIdParentPart As Integer)
|
||||
|
||||
' Acquisisco punto da disegno
|
||||
Dim CurrPoint As New Point3d
|
||||
EgtUnProjectPoint(e.Location, CurrPoint)
|
||||
|
||||
' Verifico se selezionato indicativo di pezzo
|
||||
EgtSetObjFilterForSelWin(False, True, False, False, False)
|
||||
Dim nSelMy As Integer
|
||||
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSelMy)
|
||||
Dim nIdMy As Integer = EgtGetFirstObjInSelWin()
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
Dim sLayer As String = String.Empty
|
||||
' layer di origine
|
||||
Dim nIdParent As Integer = EgtGetParent(nIdMy)
|
||||
' recupero il nome del Layer
|
||||
EgtGetName(nIdParent, sLayer)
|
||||
' solo se il nome del layer è quello associato ad un lato esterno allora procedo con l'evidenziazione
|
||||
If sLayer = NAME_OUTLOOP Then
|
||||
If (EgtGetType(nIdMy) = GDB_TY.CRV_ARC OrElse EgtGetType(nIdMy) = GDB_TY.CRV_COMPO OrElse EgtGetType(nIdMy) = GDB_TY.CRV_LINE) AndAlso VerifySideIsAcceptable(nIdMy) Then
|
||||
If m_nIdSelectedSideWJ <> GDB_ID.NULL Or m_nIdSelectedSideWJ = nIdMy Then
|
||||
EgtDeselectObj(m_nIdSelectedSideWJ)
|
||||
End If
|
||||
' recupero il gruppo della lavorazione associata
|
||||
nIdParentPart = EgtGetParent(nIdParent)
|
||||
' se non esiste almeno 1 Preview di tipo WaterJet
|
||||
If IsWaterJetting(nIdMy) Then
|
||||
m_nIdSelectedSideWJ = nIdMy
|
||||
' recupero il punto più vicino alla curva passata
|
||||
If IsFirst Then
|
||||
EgtNearPoint(nIdMy, CurrPoint, GDB_RT.GLOB, m_ptSrtBridge)
|
||||
Else
|
||||
' prima di confermare verifico che non ci siano interferenze
|
||||
EgtNearPoint(nIdMy, CurrPoint, GDB_RT.GLOB, m_ptEndBridge)
|
||||
EgtModifyCurveEndPoint(m_nIdBridge, m_ptEndBridge, GDB_RT.GLOB)
|
||||
If VerifyInterference(m_nIdBridge) Then
|
||||
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||
EgtSetInfo(m_nIdBridge, "PartStart", m_nIdSelectedPartWJ_Srt)
|
||||
EgtSetInfo(m_nIdBridge, "EntStart", m_nIdSelectedSideWJ_Srt)
|
||||
EgtSetInfo(m_nIdBridge, "PartEnd", m_nIdSelectedPartWJ_End)
|
||||
EgtSetInfo(m_nIdBridge, "EntEnd", m_nIdSelectedSideWJ_End)
|
||||
EgtSetInfo(m_nIdBridge, "Ph", EgtGetCurrPhase())
|
||||
' Ricalcolo tutte le lavorazioni
|
||||
Dim nWarn As Integer = 0
|
||||
ResetAllMachinings(nWarn)
|
||||
Else
|
||||
' attendo la selezione di un punto valido
|
||||
m_nIdSelectedSideWJ = GDB_ID.NULL
|
||||
m_nIdSelectedWaterJet = GDB_ID.NULL
|
||||
nIdParentPart = GDB_ID.NULL
|
||||
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage("Bridge intersects part", 3, MSG_TYPE.ERROR_)
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
' salvo il valore del PreView evidenziato
|
||||
EgtSetMark(nIdParentPart)
|
||||
' EgtSetMark(nIdWJ)
|
||||
EgtSelectObj(nIdMy)
|
||||
EgtDraw()
|
||||
Exit While
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
nIdMy = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseDownSceneBridgesDelete(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
' Acquisisco punto da disegno
|
||||
Dim CurrPoint As New Point3d
|
||||
EgtUnProjectPoint(e.Location, CurrPoint)
|
||||
|
||||
' Verifico se selezionato indicativo di pezzo
|
||||
EgtSetObjFilterForSelWin(False, True, False, False, False)
|
||||
Dim nSelMy As Integer
|
||||
EgtSelect(e.Location, Scene.DIM_SEL, Scene.DIM_SEL, nSelMy)
|
||||
Dim nIdMy As Integer = EgtGetFirstObjInSelWin()
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
Dim sGroupName As String = String.Empty
|
||||
Dim sSelName As String = String.Empty
|
||||
' gruppo di appartenenza
|
||||
Dim nIdParent As Integer = EgtGetParent(nIdMy)
|
||||
' recupero il nome del gruppo di appartenenza
|
||||
EgtGetName(nIdParent, sGroupName)
|
||||
' recupero il nome dell'oggetto selezionato
|
||||
EgtGetName(nIdMy, sSelName)
|
||||
If sGroupName.Contains(NAME_BRIDGES) AndAlso sSelName.Contains(NAME_BRIDGESLINE) Then
|
||||
EgtErase(nIdMy)
|
||||
EgtDraw()
|
||||
' Ricalcolo tutte le lavorazioni
|
||||
Dim nWarn As Integer = 0
|
||||
ResetAllMachinings(nWarn)
|
||||
Return
|
||||
End If
|
||||
nIdMy = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
End Sub
|
||||
|
||||
Private Sub OnMyMouseMoveSceneBridges(ptCurr As Point3d)
|
||||
ptCurr.z = m_ptSrtBridge.z
|
||||
' rappresento il egmento
|
||||
If m_nIdBridge = GDB_ID.NULL Then
|
||||
m_nIdBridge = EgtCreateLine(m_nIdBridgesGroup, m_ptSrtBridge, ptCurr, GDB_RT.GLOB)
|
||||
' assegno un nome alla linea
|
||||
EgtSetName(m_nIdBridge, NAME_BRIDGESLINE)
|
||||
End If
|
||||
EgtModifyCurveEndPoint(m_nIdBridge, ptCurr, GDB_RT.GLOB)
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Function VerifyInterference(nIdBridge As Integer) As Boolean
|
||||
' prima di procedere alla verifica accorco il segmento (solo per sicurezza) 10 * EPS_SMALL
|
||||
Dim dLen As Double
|
||||
EgtCurveLength(nIdBridge, dLen)
|
||||
If dLen > 21 AndAlso Not EgtCurveIsClosed(nIdBridge) Then
|
||||
EgtTrimCurveEndAtLen(nIdBridge, dLen - 10 * EPS_SMALL)
|
||||
EgtTrimCurveStartAtLen(nIdBridge, 10 * EPS_SMALL)
|
||||
End If
|
||||
' EgtSaveFile("c:\EgtData\OmagOFFICE\Temp\Bridge.nge", NGE.BIN)
|
||||
Dim nIdPart As Integer = GDB_ID.NULL
|
||||
nIdPart = EgtGetFirstPartInRawPart(GetCurrentRaw())
|
||||
While nIdPart <> GDB_ID.NULL
|
||||
Dim nIdRegion As Integer = EgtGetFirstNameInGroup(nIdPart, NAME_REGION)
|
||||
Dim nIdSurf As Integer = EgtGetFirstInGroup(nIdRegion)
|
||||
While nIdSurf <> GDB_ID.NULL
|
||||
If EgtGetType(nIdSurf) = GDB_TY.SRF_FRGN Then
|
||||
' se la linea bridge interseca la superficie allora restitusco false
|
||||
If EgtCurveWithRegionClassify(nIdBridge, nIdSurf) <> CREGC.OUT Then
|
||||
EgtExtendCurveStartByLen(nIdBridge, 10 * EPS_SMALL)
|
||||
Return False
|
||||
End If
|
||||
Exit While
|
||||
End If
|
||||
End While
|
||||
nIdPart = EgtGetNextPartInRawPart(nIdPart)
|
||||
End While
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Private Function VerifySideIsAcceptable(nMyId As Integer) As Boolean
|
||||
Dim dVal As Double = 0
|
||||
' verifico che l'entità selezionata non contenga questi parametri
|
||||
If EgtGetInfo(nMyId, INFO_SIDE_ANGLE2, dVal) Then
|
||||
If dVal <> 0 Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
If EgtGetInfo(nMyId, INFO_SIDE_ANGLE, dVal) Then
|
||||
If dVal <> 0 Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
If EgtGetInfo(nMyId, INFO_ORIG_SIDE_ANGLE, dVal) Then
|
||||
If dVal <> 0 Then
|
||||
Return False
|
||||
End If
|
||||
End If
|
||||
' altrimenti l'entità è accettabile
|
||||
Return True
|
||||
End Function
|
||||
|
||||
' verifico che il lato selezionato appartenga ad una lavorazione di tipo Waterjet
|
||||
Private Function IsWaterJetting(nMyId As Integer) As Boolean
|
||||
' verifico che sul lato indicato sia impostato un taglio di tipo WaterJet
|
||||
Dim nMchId As Integer = GDB_ID.NULL
|
||||
For nInd As Integer = 0 To m_MachiningList.Count() - 1
|
||||
nMchId = m_MachiningList(nInd).m_nId
|
||||
Dim nMachiningType As Integer = EgtGetOperationType(m_MachiningList(nInd).m_nId)
|
||||
If nMachiningType = MCH_MY.WATERJETTING Then
|
||||
EgtSetCurrMachining(nMchId)
|
||||
Dim nIndex As Integer = 0
|
||||
Dim nIdSide As Integer = GDB_ID.NULL
|
||||
Dim nSub As Integer = GDB_ID.NULL
|
||||
While EgtGetMachiningGeometry(nIndex, nIdSide, nSub)
|
||||
If nIdSide = nMyId Then
|
||||
Return True
|
||||
End If
|
||||
nIndex += 1
|
||||
End While
|
||||
End If
|
||||
Next
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Private Sub RefreshMachList()
|
||||
For nI As Integer = 0 To m_MachiningList.Count() - 1
|
||||
' cancello tutti gli indici di lavorazione presenti nel disegno
|
||||
Dim nNbrId As Integer = GDB_ID.NULL
|
||||
EgtErase(m_MachiningList(nI).m_nNbrId)
|
||||
EgtRemoveInfo(m_MachiningList(nI).m_nId, "NbrId")
|
||||
Next
|
||||
' Preparo la lista delle lavorazioni
|
||||
CalculateSplitMachList(m_nCurrPhase, m_MachiningList)
|
||||
' Aggiorno visualizzazione delle lavorazioni
|
||||
For nI As Integer = 0 To m_MachiningList.Count() - 1
|
||||
' sistemo colore
|
||||
ColorMachining(m_MachiningList(nI))
|
||||
' assegno nuova numerazione
|
||||
NumberDirectionMachining(nI)
|
||||
' conto il numero di tipi di lavorazioni
|
||||
CountMachiningType(m_MachiningList(nI), m_nCountSawing, m_nCountWaterjetting, m_nCountOtherMachining)
|
||||
Next
|
||||
' aggiorno grafica
|
||||
ShowMachiningList()
|
||||
' aggiorno la visualizzazione
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
Private Sub DeselectWJBridgesPart()
|
||||
' se in fase di definzione di un ponticello lo elimino
|
||||
If m_nIdSelectedSideWJ_Srt <> GDB_ID.NULL And m_nIdSelectedSideWJ_End = GDB_ID.NULL And m_nIdBridge <> GDB_ID.NULL Then
|
||||
EgtErase(EgtGetParent(m_nIdBridge))
|
||||
End If
|
||||
m_nIdBridge = GDB_ID.NULL
|
||||
EgtResetMark(m_nIdSelectedPartWJ_Srt)
|
||||
m_nIdSelectedPartWJ_Srt = GDB_ID.NULL
|
||||
EgtDeselectObj(m_nIdSelectedSideWJ_Srt)
|
||||
m_nIdSelectedSideWJ_Srt = GDB_ID.NULL
|
||||
m_nIdSelectedWaterJet_Srt = GDB_ID.NULL
|
||||
EgtResetMark(m_nIdSelectedPartWJ_End)
|
||||
m_nIdSelectedPartWJ_End = GDB_ID.NULL
|
||||
EgtDeselectObj(m_nIdSelectedSideWJ_End)
|
||||
m_nIdSelectedSideWJ_End = GDB_ID.NULL
|
||||
m_nIdSelectedWaterJet_End = GDB_ID.NULL
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
#End Region ' Bridge
|
||||
|
||||
Friend Sub OnMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
' Verifico di essere il gestore attivo e non in modalità sola visualizzazione
|
||||
If Not m_bActive OrElse OmagOFFICEMap.refMachiningTabVM.IsShow Then Return
|
||||
@@ -2145,6 +2613,31 @@ Public Class SplitModeVM
|
||||
Not OmagOFFICEMap.refSceneHostVM.MainScene.IsStatusNull() Then
|
||||
Return
|
||||
End If
|
||||
|
||||
' definizione dei ponticelli
|
||||
If m_BridgeBtn_IsChecked Then
|
||||
If m_nIdSelectedPartWJ_Srt = GDB_ID.NULL Then
|
||||
OnMyMouseDownSceneBridges(sender, e, True, m_nIdSelectedSideWJ_Srt, m_nIdSelectedWaterJet_Srt, m_nIdSelectedPartWJ_Srt)
|
||||
Else
|
||||
OnMyMouseDownSceneBridges(sender, e, False, m_nIdSelectedSideWJ_End, m_nIdSelectedWaterJet_End, m_nIdSelectedPartWJ_End)
|
||||
' aggiorno la visualizzazione delle lavorazioni e la lista
|
||||
RefreshMachList()
|
||||
End If
|
||||
' se entrambi i pezzi sono stati definiti allora procedo alla deselezione
|
||||
If m_nIdSelectedPartWJ_Srt <> GDB_ID.NULL And m_nIdSelectedPartWJ_End <> GDB_ID.NULL Then
|
||||
DeselectWJBridgesPart()
|
||||
End If
|
||||
Return
|
||||
End If
|
||||
|
||||
' eliminazione dei ponticelli
|
||||
If m_BridgeDeleteBtn_IsChecked Then
|
||||
OnMyMouseDownSceneBridgesDelete(sender, e)
|
||||
' aggiorno la visualizzazione delle lavorazioni e la lista
|
||||
RefreshMachList()
|
||||
Return
|
||||
End If
|
||||
|
||||
' Reset drag
|
||||
m_nDragInd = -1
|
||||
m_nDragType = 0
|
||||
@@ -2233,13 +2726,22 @@ Public Class SplitModeVM
|
||||
Friend Sub OnMyMouseMoveScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
' Verifico di essere il gestore attivo e non in modalità sola visualizzazione
|
||||
If Not m_bActive OrElse OmagOFFICEMap.refMachiningTabVM.IsShow Then Return
|
||||
' Ricavo il punto corrente in coordinate mondo
|
||||
Dim ptCurr As Point3d
|
||||
EgtUnProjectPoint(e.Location, ptCurr)
|
||||
|
||||
' definizione dei ponticelli
|
||||
If m_BridgeBtn_IsChecked Then
|
||||
If m_nIdSelectedPartWJ_Srt <> GDB_ID.NULL Then
|
||||
OnMyMouseMoveSceneBridges(ptCurr)
|
||||
End If
|
||||
Return
|
||||
End If
|
||||
|
||||
' Se drag non abilitato o in corso
|
||||
If m_nDragInd = -1L Or m_bDragging Then Return
|
||||
m_bDragging = True
|
||||
Dim nOperId As Integer = m_MachiningList(m_nDragInd).m_nId
|
||||
' Ricavo il punto corrente in coordinate mondo
|
||||
Dim ptCurr As Point3d
|
||||
EgtUnProjectPoint(e.Location, ptCurr)
|
||||
' Ricavo il vettore di movimento e la variazione di lunghezza
|
||||
Dim vtMove As Vector3d = ptCurr - m_ptDragPrev
|
||||
Dim dDelta = vtMove * m_MachiningList(m_nDragInd).m_vtDir
|
||||
@@ -2328,6 +2830,12 @@ Public Class SplitModeVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Sub OnKeyDownScene(sender As Object, e As System.Windows.Forms.KeyEventArgs)
|
||||
' Con CANC cancello i pezzi selezionati
|
||||
If (e.KeyData = System.Windows.Forms.Keys.Delete Or e.KeyData = System.Windows.Forms.Keys.Escape) And (m_BridgeBtn_IsChecked Or m_BridgeDeleteBtn_IsChecked) Then
|
||||
DeselectWJBridgesPart()
|
||||
End If
|
||||
End Sub
|
||||
#End Region ' EVENTS
|
||||
|
||||
'-----------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -31,6 +31,13 @@ Public Class NestingTabVM
|
||||
Private m_ptPrev As Point3d
|
||||
Private m_vtTotMove As Vector3d
|
||||
Private m_dSnapDist As Double = 0
|
||||
' Gestione rotazione pezzi in fase di Drag
|
||||
Private m_bKeyCtrlPressed As Boolean = False
|
||||
Private m_bKeyLeftShiftPressed As Boolean = False
|
||||
Private m_dAngTotal As Double = 0
|
||||
Private m_dStartAng As Double = 0
|
||||
Private m_bStartRot As Boolean = False
|
||||
Private m_bStartMove As Boolean = False
|
||||
' Abilitazioni TrfData e CsvData
|
||||
Private m_bTrfData As Boolean = False
|
||||
Private m_bCsvData As Boolean = False
|
||||
@@ -151,7 +158,7 @@ Public Class NestingTabVM
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_CsvData_Visibility = value
|
||||
NotifyPropertyChanged( "CsvData_Visibility")
|
||||
NotifyPropertyChanged("CsvData_Visibility")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
@@ -190,13 +197,15 @@ Public Class NestingTabVM
|
||||
|
||||
Public ReadOnly Property SplitCurvWJMsg As String
|
||||
Get
|
||||
Return "Split"
|
||||
'91133=Separa
|
||||
Return EgtMsg(91133)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property StartCurvWJMsg As String
|
||||
Get
|
||||
Return "Start"
|
||||
'91132=Start
|
||||
Return EgtMsg(91132)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -268,7 +277,7 @@ Public Class NestingTabVM
|
||||
|
||||
Friend Function InitNesting() As Boolean
|
||||
' Se previsto, abilito bottone VeinMatching
|
||||
If Not IsNothing( OmagOFFICEMap.refMainWindowVM.VeinMatchingWnd) Then
|
||||
If Not IsNothing(OmagOFFICEMap.refMainWindowVM.VeinMatchingWnd) Then
|
||||
OmagOFFICEMap.refVeinMatchPanelVM.VeinMatchIsEnabled = True
|
||||
End If
|
||||
' Abilitazione TrfData
|
||||
@@ -278,7 +287,7 @@ Public Class NestingTabVM
|
||||
m_bCsvData = Not m_bTrfData And
|
||||
(GetMainPrivateProfileInt(S_COMPO, K_CSVDATA, 0) <> 0)
|
||||
' Se previsto, abilito bottone CsvData
|
||||
CsvData_Visibility = If( m_bCsvData, Visibility.Visible, Visibility.Collapsed)
|
||||
CsvData_Visibility = If(m_bCsvData, Visibility.Visible, Visibility.Collapsed)
|
||||
' Imposto il corretto contesto
|
||||
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
|
||||
' aggiorno dati del grezzo
|
||||
@@ -356,7 +365,7 @@ Public Class NestingTabVM
|
||||
|
||||
Private Sub AutomaticInsert()
|
||||
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage( EgtMsg( 90340)) ' Nesting Automatico in corso
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(90340)) ' Nesting Automatico in corso
|
||||
Dim bWrongTrf As Boolean = False
|
||||
Dim vParts As New List(Of Integer)
|
||||
' Ciclo di pre-inserimento in tavola dei pezzi selezionati
|
||||
@@ -374,7 +383,7 @@ Public Class NestingTabVM
|
||||
End If
|
||||
' Lo preparo in tavola, se possibile
|
||||
If PreInsertOnePart(nId) Then
|
||||
vParts.Add( nId)
|
||||
vParts.Add(nId)
|
||||
Else
|
||||
EgtSetStatus(nId, GDB_ST.ON_)
|
||||
VeinMatching.OnDeselectPart(nId)
|
||||
@@ -389,12 +398,12 @@ Public Class NestingTabVM
|
||||
Dim bAligned As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_NEST_ALIGNED, 0, CurrentMachine.sMachIniFile) <> 0)
|
||||
EnableReferenceRegion(bAligned)
|
||||
' Eseguo nesting automatico
|
||||
Dim bOpimizeOnX As Boolean = ( GetMainPrivateProfileInt( S_NEST, K_AUTOMATICOPTIMIZE, 2) = 1)
|
||||
Dim bOpimizeOnX As Boolean = (GetMainPrivateProfileInt(S_NEST, K_AUTOMATICOPTIMIZE, 2) = 1)
|
||||
Dim bGuillotineMode As Boolean = bAligned
|
||||
Dim nAutomaticMaxTime As Integer = GetMainPrivateProfileInt( S_NEST, K_AUTOMATICMAXTIME, 20)
|
||||
Dim dPartTime As Double = If( bGuillotineMode, 1.0, 0.5)
|
||||
Dim nMaxTime As Integer = Math.Min( CInt( 2 + dPartTime * vParts.Count()), nAutomaticMaxTime)
|
||||
EgtAutomaticPackParts( vParts, bOpimizeOnX, CurrentMachine.bReducedCut, bGuillotineMode, nMaxTime)
|
||||
Dim nAutomaticMaxTime As Integer = GetMainPrivateProfileInt(S_NEST, K_AUTOMATICMAXTIME, 20)
|
||||
Dim dPartTime As Double = If(bGuillotineMode, 1.0, 0.5)
|
||||
Dim nMaxTime As Integer = Math.Min(CInt(2 + dPartTime * vParts.Count()), nAutomaticMaxTime)
|
||||
EgtAutomaticPackParts(vParts, bOpimizeOnX, CurrentMachine.bReducedCut, bGuillotineMode, nMaxTime)
|
||||
' Sistemo i pezzi
|
||||
For Each nPartId As Integer In vParts
|
||||
' se pezzo inserito
|
||||
@@ -402,11 +411,11 @@ Public Class NestingTabVM
|
||||
VeinMatching.OnInsertPartInRaw(nPartId)
|
||||
' Eventuale aggiunta solido per taglio da sotto
|
||||
UpdateSolidForDrip(nPartId)
|
||||
' altrimenti rifiutato
|
||||
else
|
||||
' altrimenti rifiutato
|
||||
Else
|
||||
' Ripristino lo stato originale
|
||||
PreRemoveOnePart( Math.Abs( nPartId))
|
||||
VeinMatching.OnDeselectPart( Math.Abs( nPartId))
|
||||
PreRemoveOnePart(Math.Abs(nPartId))
|
||||
VeinMatching.OnDeselectPart(Math.Abs(nPartId))
|
||||
End If
|
||||
Next
|
||||
' Aggiorno flag selezionati
|
||||
@@ -421,6 +430,93 @@ Public Class NestingTabVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub VerifyMove()
|
||||
If m_bVerify Then
|
||||
' Determino cosa verificare
|
||||
Dim nMoveId = If(m_nIdToSel <> GDB_ID.NULL, m_nIdToSel, GDB_ID.SEL)
|
||||
' Aggiorno regioni per nesting
|
||||
UpdateNestRegions()
|
||||
EnableReferenceRegion(False)
|
||||
' Eseguo verifica
|
||||
If VerifyTrfData(nMoveId) And EgtVerifyPart(nMoveId, CurrentMachine.bReducedCut) Then
|
||||
EstCalc.ResetOrderMachiningFlag()
|
||||
' Non superata riporto alla posizione iniziale
|
||||
Else
|
||||
If m_bFromParking Then
|
||||
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||
PreRemoveOnePart(nMoveId)
|
||||
VeinMatching.OnRemovePartFromRaw(nMoveId)
|
||||
Else
|
||||
EgtMove(nMoveId, -m_vtTotMove)
|
||||
' Eventuale notifica al VeinMatching
|
||||
If nMoveId = GDB_ID.SEL Then
|
||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||
While nId <> GDB_ID.NULL
|
||||
VeinMatching.OnMovePartInRaw(nId)
|
||||
nId = EgtGetNextSelectedObj()
|
||||
End While
|
||||
Else
|
||||
VeinMatching.OnMovePartInRaw(nMoveId)
|
||||
End If
|
||||
End If
|
||||
'---------------------- COUNTER PART ----------------------
|
||||
' solo se pezzo disposto in tavola
|
||||
If m_bFromParking Then
|
||||
Dim sRefGroup As String = String.Empty
|
||||
If EgtGetInfo(nMoveId, INFO_REFGROUP, sRefGroup) Then
|
||||
' accendo il layer che contiene il contatore (spento in fase di Drag)
|
||||
Dim nCounterLayer As Integer = EgtGetFirstNameInGroup(nMoveId, INFO_COUNTERLY)
|
||||
EgtSetStatus(nCounterLayer, GDB_ST.ON_)
|
||||
' aggiorno il layer che indica il numero di pezzi in parcheggio
|
||||
CountPartInFamily(sRefGroup)
|
||||
End If
|
||||
End If
|
||||
'---------------------- COUNTER PART ----------------------
|
||||
End If
|
||||
m_bFromParking = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub VerifyRot()
|
||||
' se comando Shift è stato attivato
|
||||
If m_bKeyLeftShiftPressed Then
|
||||
' Determino cosa verificare
|
||||
Dim nMoveId = If(m_nIdToSel <> GDB_ID.NULL, m_nIdToSel, GDB_ID.SEL)
|
||||
If Not EgtVerifyPart(nMoveId, CurrentMachine.bReducedCut) Then
|
||||
Dim ptCen As Point3d
|
||||
If Not EgtGetPartPartClusterCenterGlob(nMoveId, ptCen) Then Return
|
||||
EgtRotate(nMoveId, ptCen, Vector3d.Z_AX(), -m_dAngTotal, GDB_RT.GLOB)
|
||||
End If
|
||||
End If
|
||||
' resetto i valori
|
||||
m_dStartAng = 0
|
||||
m_dAngTotal = 0
|
||||
m_bStartRot = False
|
||||
End Sub
|
||||
|
||||
' verifica che la rotazione sia ammessa
|
||||
Private Function RotatePartInsideBond(dAngRotDeg As Double, nIdMove As Integer) As Boolean
|
||||
' Verifico se ci sono dei pezzi bloccati in rotazione
|
||||
Dim bLockedRot As Boolean = GetLockOnRotation(nIdMove)
|
||||
' Se tutti i pezzi possono ruotare
|
||||
If Not bLockedRot Then
|
||||
' Calcolo il centro di rotazione come centro del cluster
|
||||
Dim ptCen As Point3d
|
||||
If Not EgtGetPartPartClusterCenterGlob(nIdMove, ptCen) Then Return False
|
||||
' Aggiorno regioni per nesting
|
||||
UpdateNestRegions()
|
||||
EnableReferenceRegion(False)
|
||||
' Verifico rotazione complessiva
|
||||
EgtRotate(nIdMove, ptCen, Vector3d.Z_AX(), dAngRotDeg, GDB_RT.GLOB)
|
||||
If EgtVerifyPart(nIdMove, CurrentMachine.bReducedCut) Then Return True
|
||||
' Provo rotazione parziale (dopo aver annullato la complessiva)
|
||||
EgtRotate(nIdMove, ptCen, Vector3d.Z_AX(), -dAngRotDeg, GDB_RT.GLOB)
|
||||
Return EgtRotatePart(nIdMove, CurrentMachine.bReducedCut, ptCen, dAngRotDeg)
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Function RotateCluster(ByVal dAngRotDeg As Double) As Boolean
|
||||
' Se non ci sono pezzi selezionati, esco
|
||||
If EgtGetSelectedObjCount() = 0 Then Return True
|
||||
@@ -430,7 +526,7 @@ Public Class NestingTabVM
|
||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||
While nId <> GDB_ID.NULL
|
||||
' Se pezzo con rotazione libera
|
||||
If Not EgtExistsInfo( nId, INFO_PARTROT) Then
|
||||
If Not EgtExistsInfo(nId, INFO_PARTROT) Then
|
||||
' Calcolo il centro di rotazione come centro del pezzo
|
||||
Dim ptCen As Point3d
|
||||
If Not EgtGetPartPartClusterCenterGlob(nId, ptCen) Then Return False
|
||||
@@ -464,40 +560,22 @@ Public Class NestingTabVM
|
||||
nId = EgtGetNextSelectedObj()
|
||||
End While
|
||||
Return True
|
||||
' Altrimenti li ruoto tenendo conto delle collisioni
|
||||
' Altrimenti li ruoto tenendo conto delle collisioni
|
||||
Else
|
||||
' Verifico se ci sono dei pezzi bloccati in rotazione
|
||||
Dim bLockedRot As Boolean = GetLockOnRotation( GDB_ID.SEL)
|
||||
' Se tutti i pezzi possono ruotare
|
||||
If Not bLockedRot Then
|
||||
' Calcolo il centro di rotazione come centro del cluster
|
||||
Dim ptCen As Point3d
|
||||
If Not EgtGetPartPartClusterCenterGlob(GDB_ID.SEL, ptCen) Then Return False
|
||||
' Aggiorno regioni per nesting
|
||||
UpdateNestRegions()
|
||||
EnableReferenceRegion(False)
|
||||
' Verifico rotazione complessiva
|
||||
EgtRotate(GDB_ID.SEL, ptCen, Vector3d.Z_AX(), dAngRotDeg, GDB_RT.GLOB)
|
||||
If EgtVerifyPart(GDB_ID.SEL, CurrentMachine.bReducedCut) Then Return True
|
||||
' Provo rotazione parziale (dopo aver annullato la complessiva)
|
||||
EgtRotate(GDB_ID.SEL, ptCen, Vector3d.Z_AX(), -dAngRotDeg, GDB_RT.GLOB)
|
||||
Return EgtRotatePart(GDB_ID.SEL, CurrentMachine.bReducedCut, ptCen, dAngRotDeg)
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
Return RotatePartInsideBond(dAngRotDeg, GDB_ID.SEL)
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Function GetLockOnRotation( nPartId As Integer) As Boolean
|
||||
Private Function GetLockOnRotation(nPartId As Integer) As Boolean
|
||||
' Se singolo pezzo
|
||||
If nPartId <> GDB_ID.SEL Then
|
||||
Return EgtExistsInfo( nPartId, INFO_PARTROT)
|
||||
' Altrimenti tutti i selezionati
|
||||
Return EgtExistsInfo(nPartId, INFO_PARTROT)
|
||||
' Altrimenti tutti i selezionati
|
||||
Else
|
||||
Dim bLockedRot As Boolean = False
|
||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||
While nId <> GDB_ID.NULL
|
||||
If EgtExistsInfo( nId, INFO_PARTROT) Then
|
||||
If EgtExistsInfo(nId, INFO_PARTROT) Then
|
||||
bLockedRot = True
|
||||
Exit While
|
||||
End If
|
||||
@@ -562,13 +640,13 @@ Public Class NestingTabVM
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Friend Function ExitNesting( bChange As Boolean) As Boolean
|
||||
Friend Function ExitNesting(bChange As Boolean) As Boolean
|
||||
If m_CsvImport_IsChecked Then
|
||||
m_CsvImportWindow.Close()
|
||||
m_CsvImportWindow = Nothing
|
||||
End If
|
||||
If bChange Then
|
||||
OmagOFFICEMap.refVeinMatchPanelVM.SetVeinMatchIsChecked( False)
|
||||
OmagOFFICEMap.refVeinMatchPanelVM.SetVeinMatchIsChecked(False)
|
||||
OmagOFFICEMap.refVeinMatchPanelVM.VeinMatchIsEnabled = False
|
||||
End If
|
||||
Return True
|
||||
@@ -603,7 +681,7 @@ Public Class NestingTabVM
|
||||
End If
|
||||
' recupero il gruppo della lavorazione associata
|
||||
Dim nIdParentPart As Integer = EgtGetParent(nIdParent)
|
||||
Dim nIdPV As Integer = EgtGetFirstNameInGroup(nIdParentPart, "PV")
|
||||
Dim nIdPV As Integer = EgtGetFirstNameInGroup(nIdParentPart, NAME_PREVIEW)
|
||||
' se non esiste un gruppo di lavorazione associato allora esco
|
||||
If nIdPV = GDB_ID.NULL Then
|
||||
'm_CurrProjPage.ClearMessage()
|
||||
@@ -915,26 +993,27 @@ Public Class NestingTabVM
|
||||
End If
|
||||
' recupero il gruppo della lavorazione associata
|
||||
Dim nIdParentPart As Integer = EgtGetParent(nIdParent)
|
||||
Dim nIdPV As Integer = EgtGetFirstNameInGroup(nIdParentPart, "PV")
|
||||
Dim nIdPV As Integer = EgtGetFirstNameInGroup(nIdParentPart, NAME_PREVIEW)
|
||||
' VERIFICA: recupero l'elenco delle Preview di Tipo WaterJet associate a questo Part
|
||||
Dim ListGroup As List(Of Integer) = ResearchGropuWJ(nIdParent, nIdPV)
|
||||
' VERIFICA: se esistono delle lavorazioni associate al percorso OutLoop di tipo Saw allora non procedo
|
||||
Dim ListGroupSaw As List(Of Integer) = ResearchGropuSaw(nIdParent, nIdPV)
|
||||
' se non esiste almeno 1 Preview di tipo WaterJet
|
||||
If ListGroup.Count > 0 Then
|
||||
If ListGroup.Count > 0 And ListGroupSaw.Count = 0 Then
|
||||
m_nIdSelectedSideWJ = nIdMy
|
||||
Dim nValInfo As Integer = 1
|
||||
If EgtGetInfo(nIdMy, "JoinEntity", nValInfo) Then
|
||||
Dim nNewValInfo As Integer = nValInfo
|
||||
If EgtGetInfo(nIdMy, INFO_JOINTENTITY, nValInfo) Then
|
||||
If nValInfo = 1 Then
|
||||
' separo il taglio
|
||||
EgtSetInfo(nIdMy, "JoinEntity", 0)
|
||||
nNewValInfo = 0
|
||||
Else
|
||||
' unisco il taglio
|
||||
EgtSetInfo(nIdMy, "JoinEntity", 1)
|
||||
nNewValInfo = 1
|
||||
End If
|
||||
Else
|
||||
' se manca l'info allora il taglio sValInfo = "1" quindi separo il taglio
|
||||
EgtSetInfo(nIdMy, "JoinEntity", 0)
|
||||
nNewValInfo = 0
|
||||
End If
|
||||
|
||||
EgtSetInfo(nIdMy, INFO_JOINTENTITY, nNewValInfo)
|
||||
' Ricalcolo tutte le lavorazioni
|
||||
Dim nWarn As Integer = 0
|
||||
ResetAllMachinings(nWarn)
|
||||
@@ -942,6 +1021,12 @@ Public Class NestingTabVM
|
||||
ListGroup = ResearchGropuWJ(nIdParent, nIdPV)
|
||||
Dim nIdWJ As Integer = GetPVIdFromIdSide(ListGroup, nIdMy)
|
||||
GetCurrentPVFromIdSide(ListGroup, nIdMy, nIdWJ, nIdParent)
|
||||
' assegno un identificativo grafico per inidcare che è un taglio separato
|
||||
If nNewValInfo = 0 Then
|
||||
AssignFlagOnGraphic(nIdMy, nIdParentPart)
|
||||
Else
|
||||
EraseFlagOnGraphic(nIdMy, nIdParentPart)
|
||||
End If
|
||||
' salvo il valore del PreView evidenziato
|
||||
m_nIdSelectedWaterJet = nIdWJ
|
||||
EgtSetMark(nIdWJ)
|
||||
@@ -976,6 +1061,25 @@ Public Class NestingTabVM
|
||||
Return ListOfGroupPV
|
||||
End Function
|
||||
|
||||
' restituisce l'elenco dei Gruppi Saw associati al contorno indicato
|
||||
Public Function ResearchGropuSaw(nIdOutLoop As Integer, nIdPV As Integer) As List(Of Integer)
|
||||
Dim ListOfGroupPV As New List(Of Integer)
|
||||
Dim nIdGroup As Integer = GDB_ID.NULL
|
||||
Dim nIdMy As Integer = GDB_ID.NULL
|
||||
' recupero il primo lato dall'elenco dei lati della figura
|
||||
nIdMy = EgtGetFirstInGroup(nIdOutLoop)
|
||||
' altrimenti cerco all'interno del layer OutLoop per ogni lato la lavorazione associata
|
||||
While nIdMy <> GDB_ID.NULL
|
||||
' verifico se esiste una Preview associata al lato
|
||||
nIdGroup = EgtGetFirstNameInGroup(nIdPV, "Saw" & nIdMy.ToString)
|
||||
If nIdGroup <> GDB_ID.NULL Then
|
||||
ListOfGroupPV.Add(nIdGroup)
|
||||
End If
|
||||
nIdMy = EgtGetNext(nIdMy)
|
||||
End While
|
||||
Return ListOfGroupPV
|
||||
End Function
|
||||
|
||||
Public Function GetPVIdFromIdSide(ListGroup As List(Of Integer), nIdMy As Integer) As Integer
|
||||
Dim IdWaterjetPV As Integer = GDB_ID.NULL
|
||||
For Each nIdItem As Integer In ListGroup
|
||||
@@ -1030,7 +1134,7 @@ Public Class NestingTabVM
|
||||
' se arrivato al primo valore allora continuo la ricerca dall'ultimo
|
||||
If nIdWJPrev = GDB_ID.NULL Then nIdWJPrev = EgtGetLastInGroup(EgtGetParent(nIdMy))
|
||||
nCount += 1
|
||||
EgtGetInfo(nIdWJPrev, "JoinEntity", nValInfo)
|
||||
EgtGetInfo(nIdWJPrev, INFO_JOINTENTITY, nValInfo)
|
||||
If nValInfo = 1 Then
|
||||
nIdWj = GetPVIdFromIdSide(ListGroup, nIdWJPrev)
|
||||
If nIdWj <> GDB_ID.NULL Then Return
|
||||
@@ -1054,6 +1158,62 @@ Public Class NestingTabVM
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
' ricevo l'ID del percorso di lavorazione WJ al quale associo una etichetta grafica con scritto "S"
|
||||
Private Sub AssignFlagOnGraphic(nIdMy As Integer, IdParentPart As Integer)
|
||||
' cerco se esiste già un layer nominato "AUX_SPLIT_WJ", altrimenti lo creo
|
||||
Dim IdAuxLayer As Integer = EgtGetFirstNameInGroup(IdParentPart, INFO_AUX_SPLIT_WJ)
|
||||
If IdAuxLayer = GDB_ID.NULL Then
|
||||
IdAuxLayer = EgtCreateGroup(IdParentPart)
|
||||
EgtSetName(IdAuxLayer, INFO_AUX_SPLIT_WJ)
|
||||
End If
|
||||
' recupero il punto medio del segmento selezionato
|
||||
Dim MidPoint As Point3d
|
||||
EgtMidPoint(nIdMy, GDB_RT.GLOB, MidPoint)
|
||||
'Dim nIdTextFlag As Integer = EgtCreateText(IdAuxLayer, MidPoint, "*", 20, GDB_RT.GLOB)
|
||||
Dim nIdTextFlag As Integer = GetCreateFlagText(nIdMy, IdAuxLayer)
|
||||
EgtSetColor(nIdTextFlag, New Color3d(255, 0, 0))
|
||||
EgtSetName(nIdTextFlag, "RefSide_" & nIdMy.ToString)
|
||||
End Sub
|
||||
|
||||
Private Function GetCreateFlagText(nId As Integer, nIdLayer As Integer, Optional sText As String = "*") As Integer
|
||||
' recupero il punto medio
|
||||
Dim MidPoint As Point3d
|
||||
EgtMidPoint(nId, GDB_RT.GLOB, MidPoint)
|
||||
' recupero la direzione del vettore nel punto medio
|
||||
Dim vVers As Vector3d
|
||||
EgtMidVector(nId, GDB_RT.GLOB, vVers)
|
||||
vVers.Normalize()
|
||||
vVers.Rotate(Vector3d.Z_AX, 90)
|
||||
' Ingombro complessivo della lavorazione
|
||||
Dim ptMin, ptMax As Point3d
|
||||
EgtStartPoint(nId, GDB_RT.GLOB, ptMin)
|
||||
EgtEndPoint(nId, GDB_RT.GLOB, ptMax)
|
||||
' Metto il numero nel centro
|
||||
Dim dRadXY = Point3d.DistXY(ptMin, ptMax)
|
||||
Dim dHtxt As Double = 50
|
||||
Dim dRat As Double = 0.75
|
||||
If dRadXY < 200 Then
|
||||
dHtxt = 40
|
||||
dRat = 0.6
|
||||
ElseIf dRadXY < 25 Then
|
||||
dHtxt = 25
|
||||
dRat = 0.5
|
||||
End If
|
||||
' determino la posizione del flag
|
||||
MidPoint.x += vVers.x * dHtxt / 2
|
||||
MidPoint.y += vVers.y * dHtxt / 2
|
||||
|
||||
Return EgtCreateTextAdv(nIdLayer, MidPoint, 0, sText, "", 300, False, dHtxt, dRat, 0, INS_POS.MC, GDB_RT.GLOB)
|
||||
End Function
|
||||
|
||||
Private Sub EraseFlagOnGraphic(nIdMy As Integer, IdParentPart As Integer)
|
||||
' cerco se esiste già un layer nominato "AUX_SPLIT_WJ", altrimenti lo creo
|
||||
Dim IdAuxLayer As Integer = EgtGetFirstNameInGroup(IdParentPart, INFO_AUX_SPLIT_WJ)
|
||||
If IdAuxLayer = GDB_ID.NULL Then Return
|
||||
Dim nIdTextFlag As Integer = EgtGetFirstNameInGroup(IdAuxLayer, "RefSide_" & nIdMy.ToString)
|
||||
EgtErase(nIdTextFlag)
|
||||
End Sub
|
||||
|
||||
#End Region ' WaterJet Section and StartPoint
|
||||
|
||||
Private m_bSplitCurvWJ As Boolean
|
||||
@@ -1127,21 +1287,24 @@ Public Class NestingTabVM
|
||||
' recupero il nome del Layer
|
||||
EgtGetName(nIdParent, sLayer)
|
||||
' solo se il nome del layer è quello associato ad un lato esterno allora procedo con l'evidenziazione
|
||||
If sLayer = NAME_OUTLOOP Then
|
||||
If sLayer = NAME_OUTLOOP Or sLayer = NAME_INLOOP Then
|
||||
If EgtGetType(nIdMy) = GDB_TY.CRV_ARC OrElse EgtGetType(nIdMy) = GDB_TY.CRV_COMPO OrElse EgtGetType(nIdMy) = GDB_TY.CRV_LINE Then
|
||||
' verifico che il contorno sia chiuso, altrimenti esco
|
||||
If Not VerifyOutLoopIsClosed(nIdParent) Then
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage("Il contorno non è chiuso (0)", MSG_TYPE.WARNING)
|
||||
'91131=Il contorno non è chiuso
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(91131), MSG_TYPE.WARNING)
|
||||
Exit While
|
||||
End If
|
||||
' recupero il gruppo della lavorazione associata
|
||||
Dim nIdParentPart As Integer = EgtGetParent(nIdParent)
|
||||
Dim nIdPV As Integer = EgtGetFirstNameInGroup(nIdParentPart, "PV")
|
||||
Dim nIdPV As Integer = EgtGetFirstNameInGroup(nIdParentPart, NAME_PREVIEW)
|
||||
' VERIFICA: recupero l'elenco delle Preview di Tipo WaterJet_n_S associate a questo Part
|
||||
Dim ListGroup As List(Of Integer) = ResearchGropuWJ(nIdParent, nIdPV)
|
||||
' VERIFICA: se esistono delle lavorazioni associate al percorso OutLoop di tipo Saw allora non procedo
|
||||
Dim ListGroupSaw As List(Of Integer) = ResearchGropuSaw(nIdParent, nIdPV)
|
||||
' se non esiste almeno 1 Preview di tipo WaterJet
|
||||
If ListGroup.Count <> EgtGetGroupObjs(nIdParent) Then
|
||||
EgtSetInfo(nIdParent, "Start", ptStartCurv)
|
||||
If ListGroup.Count = 1 And ListGroupSaw.Count = 0 Then
|
||||
EgtSetInfo(nIdParent, INFO_START, ptStartCurv)
|
||||
' Ricalcolo tutte le lavorazioni
|
||||
Dim nWarn As Integer = 0
|
||||
ResetAllMachinings(nWarn)
|
||||
@@ -1154,18 +1317,19 @@ Public Class NestingTabVM
|
||||
EgtDraw()
|
||||
Exit While
|
||||
Else
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage("Il contorno non è chiuso (1)", MSG_TYPE.WARNING)
|
||||
'91131=Il contorno non è chiuso
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(91131), MSG_TYPE.WARNING)
|
||||
Exit While
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
nIdMy = EgtGetNextObjInSelWin()
|
||||
End While
|
||||
Return
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
#End Region ' Water Start Point
|
||||
|
||||
Private m_bStartCurvWJ As Boolean
|
||||
Public Property bStartCurvWJ As Boolean
|
||||
@@ -1253,22 +1417,22 @@ Public Class NestingTabVM
|
||||
If EgtGetSelectedObjCount() = 0 OrElse m_nPartPos <> PART_POS.OUT_TABLE Then Return
|
||||
' Tolgo blocco rotazione sui pezzi selezionati
|
||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||
While nId <> GDB_ID.NULL
|
||||
While nId <> GDB_ID.NULL
|
||||
' Se rotazione bloccata, tolgo blocco e aggiorno info
|
||||
If EgtExistsInfo( nId, INFO_PARTROT) Then
|
||||
If EgtExistsInfo(nId, INFO_PARTROT) Then
|
||||
' Rimuovo flag di rotazione bloccata
|
||||
EgtRemoveInfo( nId, INFO_PARTROT)
|
||||
EgtRemoveInfo(nId, INFO_PARTROT)
|
||||
' Tolgo da info sul pezzo Codice
|
||||
Dim nTextId As Integer = EgtGetFirstInGroup( EgtGetFirstNameInGroup( nId, NAME_REGION))
|
||||
Dim nTextId As Integer = EgtGetFirstInGroup(EgtGetFirstNameInGroup(nId, NAME_REGION))
|
||||
While nTextId <> GDB_ID.NULL
|
||||
If EgtGetType( nTextId) = GDB_TY.EXT_TEXT Then
|
||||
If EgtGetType(nTextId) = GDB_TY.EXT_TEXT Then
|
||||
Dim sText As String = ""
|
||||
EgtTextGetContent( nTextId, sText)
|
||||
sText = sText.Replace( "<br/>(X)", "")
|
||||
EgtModifyText( nTextId, sText)
|
||||
EgtTextGetContent(nTextId, sText)
|
||||
sText = sText.Replace("<br/>(X)", "")
|
||||
EgtModifyText(nTextId, sText)
|
||||
Exit While
|
||||
End If
|
||||
nTextId = EgtGetNext( nTextId)
|
||||
nTextId = EgtGetNext(nTextId)
|
||||
End While
|
||||
End If
|
||||
' Passo al successivo selezionato
|
||||
@@ -1297,22 +1461,22 @@ Public Class NestingTabVM
|
||||
If EgtGetSelectedObjCount() = 0 OrElse m_nPartPos <> PART_POS.OUT_TABLE Then Return
|
||||
' Metto blocco rotazione sui pezzi selezionati
|
||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||
While nId <> GDB_ID.NULL
|
||||
While nId <> GDB_ID.NULL
|
||||
' Se rotazione libera, applico blocco e aggiorno info
|
||||
If Not EgtExistsInfo( nId, INFO_PARTROT) Then
|
||||
If Not EgtExistsInfo(nId, INFO_PARTROT) Then
|
||||
' Imposto flag di rotazione bloccata
|
||||
EgtSetInfo( nId, INFO_PARTROT, 0)
|
||||
EgtSetInfo(nId, INFO_PARTROT, 0)
|
||||
' Inserisco in info sul pezzo Codice
|
||||
Dim nTextId As Integer = EgtGetFirstInGroup( EgtGetFirstNameInGroup( nId, NAME_REGION))
|
||||
Dim nTextId As Integer = EgtGetFirstInGroup(EgtGetFirstNameInGroup(nId, NAME_REGION))
|
||||
While nTextId <> GDB_ID.NULL
|
||||
If EgtGetType( nTextId) = GDB_TY.EXT_TEXT Then
|
||||
If EgtGetType(nTextId) = GDB_TY.EXT_TEXT Then
|
||||
Dim sText As String = ""
|
||||
EgtTextGetContent( nTextId, sText)
|
||||
EgtTextGetContent(nTextId, sText)
|
||||
sText &= "<br/>(X)"
|
||||
EgtModifyText( nTextId, sText)
|
||||
EgtModifyText(nTextId, sText)
|
||||
Exit While
|
||||
End If
|
||||
nTextId = EgtGetNext( nTextId)
|
||||
nTextId = EgtGetNext(nTextId)
|
||||
End While
|
||||
End If
|
||||
' Passo al successivo selezionato
|
||||
@@ -1348,7 +1512,7 @@ Public Class NestingTabVM
|
||||
Dim bAlignMoved As Boolean = False
|
||||
Dim bSnapMoved As Boolean = False
|
||||
If m_bMagnetic Then
|
||||
If Not GetLockOnRotation( GDB_ID.SEL) Then
|
||||
If Not GetLockOnRotation(GDB_ID.SEL) Then
|
||||
EgtAlignPartOnCollision(GDB_ID.SEL, CurrentMachine.bReducedCut, bAlignMoved)
|
||||
End If
|
||||
If m_dSnapDist > EPS_SMALL Then
|
||||
@@ -1392,7 +1556,7 @@ Public Class NestingTabVM
|
||||
Dim bAlignMoved As Boolean = False
|
||||
Dim bSnapMoved As Boolean = False
|
||||
If m_bMagnetic Then
|
||||
If Not GetLockOnRotation( GDB_ID.SEL) Then
|
||||
If Not GetLockOnRotation(GDB_ID.SEL) Then
|
||||
EgtAlignPartOnCollision(GDB_ID.SEL, CurrentMachine.bReducedCut, bAlignMoved)
|
||||
End If
|
||||
If m_dSnapDist > EPS_SMALL Then
|
||||
@@ -1436,7 +1600,7 @@ Public Class NestingTabVM
|
||||
Dim bAlignMoved As Boolean = False
|
||||
Dim bSnapMoved As Boolean = False
|
||||
If m_bMagnetic Then
|
||||
If Not GetLockOnRotation( GDB_ID.SEL) Then
|
||||
If Not GetLockOnRotation(GDB_ID.SEL) Then
|
||||
EgtAlignPartOnCollision(GDB_ID.SEL, CurrentMachine.bReducedCut, bAlignMoved)
|
||||
End If
|
||||
If m_dSnapDist > EPS_SMALL Then
|
||||
@@ -1480,7 +1644,7 @@ Public Class NestingTabVM
|
||||
Dim bAlignMoved As Boolean = False
|
||||
Dim bSnapMoved As Boolean = False
|
||||
If m_bMagnetic Then
|
||||
If Not GetLockOnRotation( GDB_ID.SEL) Then
|
||||
If Not GetLockOnRotation(GDB_ID.SEL) Then
|
||||
EgtAlignPartOnCollision(GDB_ID.SEL, CurrentMachine.bReducedCut, bAlignMoved)
|
||||
End If
|
||||
If m_dSnapDist > EPS_SMALL Then
|
||||
@@ -1568,7 +1732,7 @@ Public Class NestingTabVM
|
||||
If CurrentMachine.bAutomatic And
|
||||
OmagOFFICEMap.refMainWindowVM.MainWindowM.AutoNestOption() Then
|
||||
AutomaticInsert()
|
||||
' altrimenti inserimento standard
|
||||
' altrimenti inserimento standard
|
||||
Else
|
||||
StandardInsert()
|
||||
End If
|
||||
@@ -1656,6 +1820,10 @@ Public Class NestingTabVM
|
||||
' Ciclo di cancellazione dei pezzi selezionati
|
||||
nId = EgtGetFirstSelectedObj()
|
||||
While nId <> GDB_ID.NULL
|
||||
'' elimino eventuali ponticelli associati al pezzo: non è gestito il movimento del pezzo
|
||||
'DeleteBridgeAssociated(nId)
|
||||
' se è stato eseguito il Drag allora cancello tutti i ponticelli
|
||||
ResetAllBridges()
|
||||
' Recupero indice del successivo
|
||||
Dim nNextId = EgtGetNextSelectedObj()
|
||||
' Se abilitata cancellazione in ogni caso o pezzo non da Csv
|
||||
@@ -1697,6 +1865,47 @@ Public Class NestingTabVM
|
||||
VeinMatching.Draw()
|
||||
End Sub
|
||||
|
||||
Private Sub DeleteBridgeAssociated(nMyId As Integer)
|
||||
' verifico se esistono dei ponticelli associati al pezzo indicato
|
||||
' recuoero il gruppo di lavorazione corrente
|
||||
Dim nIdCurrMachGroup As Integer = EgtGetCurrMachGroup()
|
||||
' creo il gruppo per i ponticelli
|
||||
Dim sNameGroup As String = NAME_BRIDGES
|
||||
Dim nIdBridgesGroup As Integer = EgtGetFirstNameInGroup(nIdCurrMachGroup, sNameGroup)
|
||||
If nIdBridgesGroup <> GDB_ID.NULL Then
|
||||
' carico la prima entità del gruppo BRIDGES
|
||||
Dim nIdBridgeLine As Integer = GDB_ID.NULL
|
||||
nIdBridgeLine = EgtGetFirstNameInGroup(nIdBridgesGroup, NAME_BRIDGESLINE)
|
||||
' ciclo su tutte le entità
|
||||
While nIdBridgeLine <> GDB_ID.NULL
|
||||
Dim nNextBridgeLine As Integer = GDB_ID.NULL
|
||||
Dim nIdPart As Integer = GDB_ID.NULL
|
||||
If EgtGetInfo(nIdBridgeLine, "PartStart", nIdPart) Then
|
||||
If nIdPart = nMyId Then
|
||||
nNextBridgeLine = EgtGetNext(nIdBridgeLine)
|
||||
' il ponticello deve essere eliminato
|
||||
EgtErase(nIdBridgeLine)
|
||||
nIdBridgeLine = nNextBridgeLine
|
||||
' riparto dall'inizio del ciclo
|
||||
Continue While
|
||||
End If
|
||||
End If
|
||||
If EgtGetInfo(nIdBridgeLine, "PartEnd", nIdPart) Then
|
||||
If nIdPart = nMyId Then
|
||||
nNextBridgeLine = EgtGetNext(nIdBridgeLine)
|
||||
' il ponticello deve essere eliminato
|
||||
EgtErase(nIdBridgeLine)
|
||||
nIdBridgeLine = nNextBridgeLine
|
||||
' riparto dall'inizio del ciclo
|
||||
Continue While
|
||||
End If
|
||||
End If
|
||||
' il BridgeLine corrente non contiene riferimeti al pezzo da eliminare
|
||||
nIdBridgeLine = EgtGetNext(nIdBridgeLine)
|
||||
End While
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' RemovePartCommand
|
||||
|
||||
#Region "SelectAllCommand"
|
||||
@@ -1783,6 +1992,8 @@ Public Class NestingTabVM
|
||||
ResetAllSplitCurv()
|
||||
' cancello tutti i punti di inizio (Waterjet)
|
||||
ResetAllStartCurv()
|
||||
' cancello tutti i ponticelli disegnati
|
||||
ResetAllBridges()
|
||||
' Cancello tutte le lavorazioni
|
||||
CamAuto.EraseMachinings(GDB_ID.NULL)
|
||||
' Reinserisco tutte le lavorazioni piane
|
||||
@@ -1814,44 +2025,44 @@ Public Class NestingTabVM
|
||||
' Deseleziono eventuali altri
|
||||
If EgtGetNextSelectedObj() <> GDB_ID.NULL Then
|
||||
EgtDeselectAll()
|
||||
EgtSelectObj( nPartId)
|
||||
EgtSelectObj(nPartId)
|
||||
EgtDraw()
|
||||
End If
|
||||
' Recupero dati del pezzo
|
||||
Dim sCsvOrder As String = "" : EgtGetInfo( nPartId, INFO_CSV_ORD, sCsvOrder)
|
||||
Dim sCsvList As String = "" : EgtGetInfo( nPartId, INFO_CSV_DIST, sCsvList)
|
||||
Dim sCsvName As String = "" : EgtGetInfo( nPartId, INFO_CSV_PART, sCsvName)
|
||||
Dim sCsvOrder As String = "" : EgtGetInfo(nPartId, INFO_CSV_ORD, sCsvOrder)
|
||||
Dim sCsvList As String = "" : EgtGetInfo(nPartId, INFO_CSV_DIST, sCsvList)
|
||||
Dim sCsvName As String = "" : EgtGetInfo(nPartId, INFO_CSV_PART, sCsvName)
|
||||
' Avvio dialogo modifica
|
||||
Dim DlgCsvDataVM As New CompoCsvDataWindowVM()
|
||||
Dim DlgCsvDataV As New CompoCsvDataWindowV(Application.Current.MainWindow, DlgCsvDataVM)
|
||||
DlgCsvDataVM.SetData( sCsvOrder, sCsvList, sCsvName)
|
||||
DlgCsvDataVM.SetData(sCsvOrder, sCsvList, sCsvName)
|
||||
If DlgCsvDataV.ShowDialog() Then
|
||||
' Recupero i nuovi dati
|
||||
Dim sNewOrder As String = ""
|
||||
Dim sNewList As String = ""
|
||||
Dim sNewName As String = ""
|
||||
DlgCsvDataVM.GetData( sNewOrder, sNewList, sNewName)
|
||||
DlgCsvDataVM.GetData(sNewOrder, sNewList, sNewName)
|
||||
' Assegno i nuovi dati
|
||||
EgtSetInfo( nPartId, INFO_CSV_ORD, sNewOrder)
|
||||
EgtSetInfo( nPartId, INFO_CSV_DIST, sNewList)
|
||||
EgtSetInfo( nPartId, INFO_CSV_PART, sNewName)
|
||||
EgtSetInfo(nPartId, INFO_CSV_ORD, sNewOrder)
|
||||
EgtSetInfo(nPartId, INFO_CSV_DIST, sNewList)
|
||||
EgtSetInfo(nPartId, INFO_CSV_PART, sNewName)
|
||||
' Se necessario, modifico la scritta
|
||||
If sNewName <> sCsvName Then
|
||||
Dim nRegLayId As Integer = EgtGetFirstNameInGroup( nPartId, NAME_REGION)
|
||||
Dim nRegLayId As Integer = EgtGetFirstNameInGroup(nPartId, NAME_REGION)
|
||||
Dim nTextId = EgtGetFirstInGroup(nRegLayId)
|
||||
While nTextId <> GDB_ID.NULL
|
||||
If EgtGetType( nTextId) = GDB_TY.EXT_TEXT Then
|
||||
If EgtGetType(nTextId) = GDB_TY.EXT_TEXT Then
|
||||
Dim sText As String = String.Empty
|
||||
EgtTextGetContent( nTextId, sText)
|
||||
Dim nPos As Integer = sText.IndexOf( sCsvName)
|
||||
EgtTextGetContent(nTextId, sText)
|
||||
Dim nPos As Integer = sText.IndexOf(sCsvName)
|
||||
Dim sNewText As String
|
||||
If nPos <0 Then
|
||||
sNewText= sNewName & "<br/>" & sText
|
||||
If nPos < 0 Then
|
||||
sNewText = sNewName & "<br/>" & sText
|
||||
Else
|
||||
sNewText = sText.Remove( nPos, sCsvName.Length()).Insert( nPos, sNewName)
|
||||
sNewText = sText.Remove(nPos, sCsvName.Length()).Insert(nPos, sNewName)
|
||||
End If
|
||||
EgtModifyText( nTextId, sNewText)
|
||||
VeinMatching.ModifyPartText( nPartId, sNewText)
|
||||
EgtModifyText(nTextId, sNewText)
|
||||
VeinMatching.ModifyPartText(nPartId, sNewText)
|
||||
Exit While
|
||||
End If
|
||||
nTextId = EgtGetNext(nTextId)
|
||||
@@ -1946,6 +2157,7 @@ Public Class NestingTabVM
|
||||
m_bDrag = m_bDrag AndAlso EgtUnProjectPoint(e.Location, m_ptPrev)
|
||||
m_bDragToStart = m_bDrag
|
||||
m_bVerify = m_bDrag AndAlso (Keyboard.Modifiers And ModifierKeys.Shift) > 0
|
||||
m_bKeyLeftShiftPressed = m_bVerify
|
||||
m_vtTotMove = Vector3d.NULL()
|
||||
End Sub
|
||||
|
||||
@@ -1954,7 +2166,7 @@ Public Class NestingTabVM
|
||||
If Not m_bDrag Or m_bDragging Then Return
|
||||
' Se primo movimento di drag, verifico di aver superato la soglia di movimento in pixel
|
||||
If m_bDragToStart Then
|
||||
If Math.Abs(e.Location.X - m_locPrev.X) <m_nRestRadius And
|
||||
If Math.Abs(e.Location.X - m_locPrev.X) < m_nRestRadius And
|
||||
Math.Abs(e.Location.Y - m_locPrev.Y) < m_nRestRadius Then
|
||||
Return
|
||||
End If
|
||||
@@ -1980,12 +2192,12 @@ Public Class NestingTabVM
|
||||
OmagOFFICEMap.refStatusBarVM.SetOutputMessage(EgtMsg(MSG_NESTPAGEUC + 7), MSG_TYPE.WARNING)
|
||||
End If
|
||||
' Applico le lavorazioni al pezzo
|
||||
Dim b3Curr As new BBox3d
|
||||
EgtGetBBoxGlob( EgtGetFirstNameInGroup(nTestId, NAME_REGION), BBFLAG, b3Curr)
|
||||
if Not EstCalc.PreInsertOnePart( nTestId) Then Return
|
||||
Dim b3Ins As new BBox3d
|
||||
EgtGetBBoxGlob( EgtGetFirstNameInGroup( nTestId, NAME_REGION), BBFLAG, b3Ins)
|
||||
Dim vtDiff As new Vector3d( b3Curr.Min().x - b3Ins.Min().x, b3Curr.Min().y - b3Ins.Min().y, 0)
|
||||
Dim b3Curr As New BBox3d
|
||||
EgtGetBBoxGlob(EgtGetFirstNameInGroup(nTestId, NAME_REGION), BBFLAG, b3Curr)
|
||||
If Not EstCalc.PreInsertOnePart(nTestId) Then Return
|
||||
Dim b3Ins As New BBox3d
|
||||
EgtGetBBoxGlob(EgtGetFirstNameInGroup(nTestId, NAME_REGION), BBFLAG, b3Ins)
|
||||
Dim vtDiff As New Vector3d(b3Curr.Min().x - b3Ins.Min().x, b3Curr.Min().y - b3Ins.Min().y, 0)
|
||||
EgtMove(nMoveId, vtDiff)
|
||||
|
||||
'---------------------- COUNTER PART ----------------------
|
||||
@@ -2001,7 +2213,7 @@ Public Class NestingTabVM
|
||||
'---------------------- COUNTER PART ----------------------
|
||||
|
||||
' Gestione VeinMatching
|
||||
VeinMatching.OnInsertPartInRaw( nMoveId)
|
||||
VeinMatching.OnInsertPartInRaw(nMoveId)
|
||||
' Imposto stato
|
||||
m_bVerify = True
|
||||
m_bFromParking = True
|
||||
@@ -2011,46 +2223,108 @@ Public Class NestingTabVM
|
||||
' Ricavo il punto corrente in coordinate mondo
|
||||
Dim ptCurr As Point3d
|
||||
EgtUnProjectPoint(e.Location, ptCurr)
|
||||
' Ricavo il vettore di movimento
|
||||
Dim vtMove As Vector3d = ptCurr - m_ptPrev
|
||||
' Muovo i pezzi selezionati di quanto possibile
|
||||
If vtMove.SqLen() > EPS_SMALL * EPS_SMALL Then
|
||||
' Se movimento con sola verifica finale
|
||||
If m_bVerify Then
|
||||
EgtMove(nMoveId, vtMove)
|
||||
m_vtTotMove += vtMove
|
||||
' altrimenti caso con verifica durante il movimento
|
||||
Else
|
||||
' Aggiorno regioni per nesting
|
||||
UpdateNestRegions()
|
||||
EnableReferenceRegion(False)
|
||||
' muovo il pezzo
|
||||
EgtMovePart(nMoveId, CurrentMachine.bReducedCut, vtMove)
|
||||
EgtSaveCollInfo()
|
||||
' se movimento risultante nullo, provo con movimento tangente
|
||||
Dim bTgMoved As Boolean = False
|
||||
If vtMove.IsSmall() Then
|
||||
' riprovo con movimento tangente
|
||||
Dim vtTgMove As Vector3d = ptCurr - m_ptPrev
|
||||
EgtTgMovePartOnCollision(nMoveId, CurrentMachine.bReducedCut, vtTgMove)
|
||||
bTgMoved = (Not vtTgMove.IsSmall())
|
||||
End If
|
||||
' se abilitato magnetico (allineamento + snap), lo provo
|
||||
Dim bAlignMoved As Boolean = False
|
||||
Dim bSnapMoved As Boolean = False
|
||||
If m_bMagnetic Then
|
||||
If Not GetLockOnRotation( nMoveId) Then
|
||||
EgtAlignPartOnCollision(nMoveId, CurrentMachine.bReducedCut, bAlignMoved)
|
||||
End If
|
||||
If m_dSnapDist > EPS_SMALL Then
|
||||
EgtRestoreCollInfo()
|
||||
EgtMovePartToSnapPointOnCollision(nMoveId, CurrentMachine.bReducedCut, m_dSnapDist, bSnapMoved)
|
||||
End If
|
||||
End If
|
||||
EstCalc.ResetOrderMachiningFlag()
|
||||
|
||||
' la rotazione è attivabile solo se premuto il tasto Ctrl (e non sono in parheggio)
|
||||
m_bKeyCtrlPressed = m_bDrag AndAlso (Keyboard.Modifiers And ModifierKeys.Control) > 0
|
||||
|
||||
'-------------Inizio ROTAZIONE ----------------
|
||||
If m_bKeyCtrlPressed AndAlso (Not m_bFromParking OrElse m_bKeyLeftShiftPressed) Then
|
||||
' Calcolo il centro di rotazione come centro del cluster
|
||||
Dim ptCen As Point3d
|
||||
If Not EgtGetPartPartClusterCenterGlob(nMoveId, ptCen) Then Return
|
||||
' definisco il vettore dal centro del pezzo alla posizione del cursore
|
||||
Dim vtCurr As Vector3d = ptCurr - ptCen
|
||||
Dim dLen, dHAng, dVAng As Double
|
||||
' recupero l'angolo orizzontale del vettore
|
||||
vtCurr.ToSpherical(dLen, dHAng, dVAng)
|
||||
If Not m_bStartRot Then
|
||||
m_dAngTotal = 0
|
||||
' notifico una rotazione
|
||||
m_bStartRot = True
|
||||
m_dStartAng = dVAng
|
||||
End If
|
||||
EgtDraw()
|
||||
' Eventuale notifica al VeinMatching
|
||||
Dim dDeltaAng As Double = dVAng - m_dStartAng
|
||||
' gestione del passaggio da 0° → 360° evitando mantenendo la visualizzazione fluida
|
||||
If Math.Abs(dDeltaAng) > 90 Then
|
||||
If m_dStartAng < 180 And dVAng > 180 Then
|
||||
dDeltaAng = dVAng - 360 - m_dStartAng
|
||||
ElseIf m_dStartAng > 180 And dVAng < 180 Then
|
||||
dDeltaAng = dVAng - m_dStartAng + 360
|
||||
End If
|
||||
End If
|
||||
' Rotazione del pezzo attorno al suo centro
|
||||
If Math.Abs(dDeltaAng) > EPS_ANG_SMALL Then
|
||||
' se il tasto Shift è premuto (disabilitato il controllo collisioni durante il Drag)
|
||||
If m_bKeyLeftShiftPressed Then
|
||||
EgtRotate(nMoveId, ptCen, Vector3d.Z_AX(), dDeltaAng, GDB_RT.GLOB)
|
||||
m_dAngTotal += dDeltaAng
|
||||
Else
|
||||
' esegue la rotazione fino ad incontrare un altro pezzo
|
||||
RotatePartInsideBond(dDeltaAng, nMoveId)
|
||||
EstCalc.ResetOrderMachiningFlag()
|
||||
' Eventuale notifica al VeinMatching
|
||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||
While nId <> GDB_ID.NULL
|
||||
VeinMatching.OnMovePartInRaw(nId)
|
||||
nId = EgtGetNextSelectedObj()
|
||||
End While
|
||||
End If
|
||||
m_dStartAng = dVAng
|
||||
End If
|
||||
'-------------Fine ROTAZIONE ----------------
|
||||
|
||||
Else
|
||||
' -------------Inizio TRASLAZIONE ---------------
|
||||
' Ricavo il vettore di movimento
|
||||
Dim vtMove As Vector3d = ptCurr - m_ptPrev
|
||||
' Muovo i pezzi selezionati di quanto possibile
|
||||
If vtMove.SqLen() > EPS_SMALL * EPS_SMALL Then
|
||||
' notifico una traslazione
|
||||
If Not m_bStartMove Then
|
||||
m_bStartMove = True
|
||||
End If
|
||||
|
||||
' Se movimento con sola verifica finale (disabilitato il controllo collisioni durante il Drag)
|
||||
If m_bVerify Then
|
||||
EgtMove(nMoveId, vtMove)
|
||||
m_vtTotMove += vtMove
|
||||
' altrimenti caso con verifica durante il movimento
|
||||
Else
|
||||
' Aggiorno regioni per nesting
|
||||
UpdateNestRegions()
|
||||
EnableReferenceRegion(False)
|
||||
' muovo il pezzo
|
||||
EgtMovePart(nMoveId, CurrentMachine.bReducedCut, vtMove)
|
||||
EgtSaveCollInfo()
|
||||
' se movimento risultante nullo, provo con movimento tangente
|
||||
Dim bTgMoved As Boolean = False
|
||||
If vtMove.IsSmall() Then
|
||||
' riprovo con movimento tangente
|
||||
Dim vtTgMove As Vector3d = ptCurr - m_ptPrev
|
||||
EgtTgMovePartOnCollision(nMoveId, CurrentMachine.bReducedCut, vtTgMove)
|
||||
bTgMoved = (Not vtTgMove.IsSmall())
|
||||
End If
|
||||
' se abilitato magnetico (allineamento + snap), lo provo
|
||||
Dim bAlignMoved As Boolean = False
|
||||
Dim bSnapMoved As Boolean = False
|
||||
If m_bMagnetic Then
|
||||
If Not GetLockOnRotation(nMoveId) Then
|
||||
EgtAlignPartOnCollision(nMoveId, CurrentMachine.bReducedCut, bAlignMoved)
|
||||
End If
|
||||
If m_dSnapDist > EPS_SMALL Then
|
||||
EgtRestoreCollInfo()
|
||||
EgtMovePartToSnapPointOnCollision(nMoveId, CurrentMachine.bReducedCut, m_dSnapDist, bSnapMoved)
|
||||
End If
|
||||
End If
|
||||
EstCalc.ResetOrderMachiningFlag()
|
||||
End If
|
||||
' -------------Fine TRASLAZIONE ---------------
|
||||
End If
|
||||
End If
|
||||
|
||||
EgtDraw()
|
||||
' Eventuale notifica al VeinMatching
|
||||
If m_bStartMove OrElse m_bStartRot Then
|
||||
If nMoveId = GDB_ID.SEL Then
|
||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||
While nId <> GDB_ID.NULL
|
||||
@@ -2065,6 +2339,10 @@ Public Class NestingTabVM
|
||||
m_ptPrev = ptCurr
|
||||
' Terminata esecuzione di drag
|
||||
m_bDragging = False
|
||||
' se è stato eseguito il Drag allora cancello tutti i ponticelli
|
||||
ResetAllBridges()
|
||||
' non è gestito il movimento della lavorazione!
|
||||
'DeleteBridgeAssociated(nMoveId)
|
||||
End Sub
|
||||
|
||||
Friend Sub OnMouseUpScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
|
||||
@@ -2086,48 +2364,31 @@ Public Class NestingTabVM
|
||||
|
||||
' Se eseguito drag
|
||||
If Not m_bDragToStart Then
|
||||
' Se movimento con sola verifica finale
|
||||
If m_bVerify Then
|
||||
' Determino cosa verificare
|
||||
Dim nMoveId = If(m_nIdToSel <> GDB_ID.NULL, m_nIdToSel, GDB_ID.SEL)
|
||||
' Aggiorno regioni per nesting
|
||||
UpdateNestRegions()
|
||||
EnableReferenceRegion(False)
|
||||
' Eseguo verifica
|
||||
If VerifyTrfData(nMoveId) And EgtVerifyPart(nMoveId, CurrentMachine.bReducedCut) Then
|
||||
EstCalc.ResetOrderMachiningFlag()
|
||||
' Non superata riporto alla posizione iniziale
|
||||
' Se movimento con sola verifica finale ----- TRASLAZIONE
|
||||
If Not m_bStartRot And m_bStartMove Then
|
||||
VerifyMove()
|
||||
' Se movimento con sola verifica finale ----- TRASLAZIONE + ROTAZIONE
|
||||
ElseIf m_bStartRot And m_bStartMove Then
|
||||
If Not m_bFromParking Then
|
||||
VerifyRot()
|
||||
Else
|
||||
If m_bFromParking Then
|
||||
OmagOFFICEMap.refStatusBarVM.ClearOutputMessage()
|
||||
PreRemoveOnePart(nMoveId)
|
||||
VeinMatching.OnRemovePartFromRaw(nMoveId)
|
||||
Else
|
||||
EgtMove(nMoveId, -m_vtTotMove)
|
||||
' Eventuale notifica al VeinMatching
|
||||
If nMoveId = GDB_ID.SEL Then
|
||||
Dim nId As Integer = EgtGetFirstSelectedObj()
|
||||
While nId <> GDB_ID.NULL
|
||||
VeinMatching.OnMovePartInRaw(nId)
|
||||
nId = EgtGetNextSelectedObj()
|
||||
End While
|
||||
Else
|
||||
VeinMatching.OnMovePartInRaw(nMoveId)
|
||||
End If
|
||||
End If
|
||||
'---------------------- COUNTER PART ----------------------
|
||||
Dim sRefGroup As String = String.Empty
|
||||
If EgtGetInfo(nMoveId, INFO_REFGROUP, sRefGroup) Then
|
||||
' accendo il layer che contiene il contatore (spento in fase di Drag)
|
||||
Dim nCounterLayer As Integer = EgtGetFirstNameInGroup(nMoveId, INFO_COUNTERLY)
|
||||
EgtSetStatus(nCounterLayer, GDB_ST.ON_)
|
||||
' aggiorno il layer che indica il numero di pezzi in parcheggio
|
||||
CountPartInFamily(sRefGroup)
|
||||
End If
|
||||
'---------------------- COUNTER PART ----------------------
|
||||
' forzo il reset delle info di rotazione
|
||||
m_dStartAng = 0
|
||||
m_dAngTotal = 0
|
||||
m_bStartRot = False
|
||||
End If
|
||||
VerifyMove()
|
||||
' verifico se la posizione finale della rotazione è corretta ----- ROTAZIONE
|
||||
ElseIf m_bStartRot And Not m_bStartMove Then
|
||||
If m_bFromParking Then
|
||||
VerifyMove()
|
||||
' forzo il reset delle info di rotazione
|
||||
m_dStartAng = 0
|
||||
m_dAngTotal = 0
|
||||
m_bStartRot = False
|
||||
Else
|
||||
VerifyRot()
|
||||
End If
|
||||
m_bFromParking = False
|
||||
' altrimenti caso con verifica durante il movimento
|
||||
Else
|
||||
' Basta reset alla fine
|
||||
End If
|
||||
@@ -2181,7 +2442,7 @@ Public Class NestingTabVM
|
||||
' Con CANC cancello i pezzi selezionati
|
||||
If e.KeyData = System.Windows.Forms.Keys.Delete Then
|
||||
RemovePart()
|
||||
' Con INS eseguo inserimento dei pezzi selezionati in VeinMatching
|
||||
' Con INS eseguo inserimento dei pezzi selezionati in VeinMatching
|
||||
ElseIf e.KeyData = System.Windows.Forms.Keys.Insert Then
|
||||
' Vettore dei pezzi selezionati (l'inserimento di un pezzo in VM cancella la selezione)
|
||||
Dim vSel As New List(Of Integer)
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
Imports System.IO
|
||||
Imports System.Threading
|
||||
Imports System.Windows.Threading
|
||||
Imports System.IO
|
||||
Imports System.Collections.ObjectModel
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtPHOTOLib
|
||||
@@ -7,6 +9,10 @@ Imports EgtUILib
|
||||
Public Class RawPartTabVM
|
||||
Inherits VMBase
|
||||
|
||||
' Timer
|
||||
Private m_TimerIsBusy As Boolean = False
|
||||
Private m_RefreshTimer As New DispatcherTimer
|
||||
|
||||
Friend OmagPhoto As OmagPhotoV
|
||||
|
||||
Private m_OmagPhotoVM As OmagPhotoVM
|
||||
@@ -1139,14 +1145,14 @@ Public Class RawPartTabVM
|
||||
dRawWidth = m_dTableWidth - 2 * dRawKerf
|
||||
End If
|
||||
If dRawOffsX < dRawKerf Then dRawOffsX = dRawKerf
|
||||
If dRawOffsX + dRawLen + dRawKerf > m_dTableLength Then
|
||||
dRawOffsX = Math.Max(dRawKerf, m_dTableLength - dRawLen - dRawKerf)
|
||||
dRawLen = Math.Min(dRawLen, m_dTableLength - dRawOffsX - dRawKerf)
|
||||
If dRawOffsX + dRawLen + 2 * dRawKerf > m_dTableLength Then
|
||||
dRawOffsX = Math.Max(dRawKerf, m_dTableLength - dRawLen - 2 * dRawKerf)
|
||||
dRawLen = Math.Min(dRawLen, m_dTableLength - dRawOffsX - 2 * dRawKerf)
|
||||
End If
|
||||
If dRawOffsY < dRawKerf Then dRawOffsY = dRawKerf
|
||||
If dRawOffsY + dRawWidth + dRawKerf > m_dTableWidth Then
|
||||
dRawOffsY = Math.Max(dRawKerf, m_dTableWidth - dRawWidth - dRawKerf)
|
||||
dRawWidth = Math.Min(dRawWidth, m_dTableWidth - dRawOffsY - dRawKerf)
|
||||
If dRawOffsY + dRawWidth + 2 * dRawKerf > m_dTableWidth Then
|
||||
dRawOffsY = Math.Max(dRawKerf, m_dTableWidth - dRawWidth - 2 * dRawKerf)
|
||||
dRawWidth = Math.Min(dRawWidth, m_dTableWidth - dRawOffsY - 2 * dRawKerf)
|
||||
End If
|
||||
' Assegno i dati
|
||||
SetLength(dRawLen)
|
||||
@@ -2034,11 +2040,17 @@ Public Class RawPartTabVM
|
||||
' inserisco in elenco solo i materiali della macchina corrente
|
||||
AddHandler PhotoMap.refOptionPanelVM.SlabIsSelectedOFFICE, AddressOf OmagOFFICEMap.refRawPartTabVM.ClosePhotoWnd
|
||||
|
||||
' Dim OmagPhotoWnd As New OmagPhotoV(Application.Current.MainWindow(), New OmagPhotoVM)
|
||||
'OmagPhotoWnd.ShowDialog()
|
||||
' lancio il timer di aggiornamento dell'interfaccia, per la gestione di due OmagPHOTO che accedono allo stesso SQL
|
||||
AddHandler m_RefreshTimer.Tick, AddressOf RefreshTimer_Tick
|
||||
m_RefreshTimer.Interval = TimeSpan.FromMilliseconds(2000)
|
||||
m_RefreshTimer.Start()
|
||||
|
||||
' apro la finestra per accedere al DB delle lastre
|
||||
Me.OmagPhoto = New OmagPhotoV
|
||||
OmagPhoto.ShowDialog()
|
||||
|
||||
m_RefreshTimer.Stop()
|
||||
|
||||
EgtSetCurrentContext(EgtPHOTOLib.MainData.PreviousContext)
|
||||
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
|
||||
|
||||
@@ -2156,6 +2168,17 @@ Public Class RawPartTabVM
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
' per la gestione di due OmagPHOTO che accedono allo stesso SQL
|
||||
Private Sub RefreshTimer_Tick()
|
||||
If Not m_TimerIsBusy And PhotoMap.refProjectVM.SelProjectMode = ProjectSlabVM.ProjectModeOpt.LIST Then
|
||||
m_TimerIsBusy = True
|
||||
m_RefreshTimer.Stop()
|
||||
EgtPHOTOLib.PhotoMap.refListPageVM.RefreshLisPage()
|
||||
m_TimerIsBusy = False
|
||||
m_RefreshTimer.Start()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region ' PhotoCommand
|
||||
|
||||
#Region "ConfirmPhotoCommand"
|
||||
@@ -2366,6 +2389,8 @@ Public Class RawPartTabVM
|
||||
End If
|
||||
' Aggiorno il punto precedente
|
||||
m_ptPrev = ptCurr
|
||||
' Resetto i ponticelli (per ora non sono in grado di muoverli assieme ai pezzi)
|
||||
ResetAllBridges()
|
||||
End Sub
|
||||
|
||||
Private Sub ModifyPhoto(ptCurr As Point3d)
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<OmagOFFICE:ShowPanelV DataContext="{StaticResource ShowPanelVM}"/>
|
||||
<OmagOFFICE:ViewPanelV DataContext="{StaticResource ViewPanelVM}"/>
|
||||
<OmagOFFICE:InstrumentPanelV DataContext="{StaticResource InstrumentPanelVM}"/>
|
||||
<OmagOFFICE:PrintPanelV DataContext="{StaticResource PrintPanelVM}"/>
|
||||
<OmagOFFICE:VeinMatchPanelV DataContext="{StaticResource VeinMatchPanelVM}"/>
|
||||
<OmagOFFICE:MachinePanelV DataContext="{StaticResource MachinePanelVM}"/>
|
||||
</EgtFloating:EgtFloatingTray>
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
Public Class ProjectV
|
||||
|
||||
Private Sub LoadPage() Handles Me.Loaded
|
||||
OmagOFFICEMap.SetRefProjectV(Me)
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 637 B |
@@ -11,7 +11,8 @@
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Titolo delle colonne-->
|
||||
<Grid Visibility="{Binding Legenda_Visibility}"
|
||||
@@ -172,6 +173,32 @@
|
||||
Grid.Column="1"/>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
<Grid Visibility="{Binding Parameter5_Visibility}"
|
||||
Grid.Row="5"
|
||||
Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.8*"/>
|
||||
<ColumnDefinition Width="1.2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding Parameter5Msg}" Grid.Row="2"/>
|
||||
<CheckBox IsChecked="{Binding Parameter5ChBx}" HorizontalAlignment="Center"
|
||||
Grid.Column="1"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Visibility="{Binding Parameter6_Visibility}"
|
||||
Grid.Row="6"
|
||||
Margin="0,0,0,5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="1.8*"/>
|
||||
<ColumnDefinition Width="1.2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<TextBlock Text="{Binding Parameter6Msg}" Grid.Row="2"/>
|
||||
<EgtWPFLib5:EgtTextBox Text="{Binding Parameter6}"
|
||||
Grid.Column="1"/>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
</UserControl>
|
||||
|
||||
@@ -143,6 +143,7 @@ Public Class SideEntityControlVM
|
||||
StringToLen(value, m_Parameter1)
|
||||
' Recupero il valore
|
||||
StringToLen(value, m_dDripOffset)
|
||||
StringToLen(value, m_dOffsetFiloTop)
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
' Aggiorno i dati delle alette
|
||||
@@ -203,6 +204,7 @@ Public Class SideEntityControlVM
|
||||
RefreshSideAngleText()
|
||||
Else
|
||||
m_dDripOffset2 = m_Parameter2
|
||||
m_dDepthFiloTop = m_Parameter2
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
End If
|
||||
@@ -347,11 +349,16 @@ Public Class SideEntityControlVM
|
||||
Return LenToString(m_Parameter4, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
If m_Mode <> ModeOpt.SIDEANGLE Then
|
||||
If m_Mode = ModeOpt.DRIP Then
|
||||
StringToLen(value, m_Parameter4)
|
||||
m_dDripShort = m_Parameter4
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
ElseIf m_Mode = ModeOpt.ENGRAVE Then
|
||||
StringToLen(value, m_Parameter4)
|
||||
m_dEngraveDepth2 = m_Parameter4
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
@@ -362,6 +369,75 @@ Public Class SideEntityControlVM
|
||||
|
||||
#End Region 'Parameter 4
|
||||
|
||||
#Region "Parameter 5"
|
||||
|
||||
Private m_Parameter5_Visibility As Visibility
|
||||
Public Property Parameter5_Visibility As Visibility
|
||||
Get
|
||||
Return m_Parameter5_Visibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_Parameter5_Visibility = value
|
||||
NotifyPropertyChanged(NameOf(Parameter5_Visibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Parameter5ChBx As Boolean
|
||||
Public Property Parameter5ChBx As Boolean
|
||||
Get
|
||||
Return m_Parameter5ChBx
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If m_Mode = ModeOpt.FILOTOP Then
|
||||
m_bCornerRadius = value
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
m_Parameter5ChBx = m_bCornerRadius
|
||||
End If
|
||||
NotifyPropertyChanged("Parameter5ChBx")
|
||||
End Set
|
||||
End Property
|
||||
Private Sub SetParameter5(value As Boolean)
|
||||
m_Parameter5ChBx = value
|
||||
NotifyPropertyChanged("Parameter5ChBx")
|
||||
End Sub
|
||||
|
||||
#End Region 'Parameter 5
|
||||
|
||||
#Region "Parameter 6"
|
||||
|
||||
Private m_Parameter6_Visibility As Visibility
|
||||
Public Property Parameter6_Visibility As Visibility
|
||||
Get
|
||||
Return m_Parameter6_Visibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_Parameter6_Visibility = value
|
||||
NotifyPropertyChanged(NameOf(Parameter6_Visibility))
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Parameter6 As Double
|
||||
Public Property Parameter6 As String
|
||||
Get
|
||||
Return LenToString(m_Parameter6, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
If m_Mode = ModeOpt.ENGRAVE Then
|
||||
StringToLen(value, m_Parameter6)
|
||||
m_dEngraveAngle = m_Parameter6
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
Private Sub SetParameter6(value As Double)
|
||||
m_Parameter6 = value
|
||||
NotifyPropertyChanged("Parameter6")
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
Private m_dSideAngle As Double = 0
|
||||
|
||||
Private m_HeightA As Double = 0
|
||||
@@ -369,14 +445,18 @@ Public Class SideEntityControlVM
|
||||
Private m_DeltaAngF As Double = 0
|
||||
Private m_DeltaAngA As Double = 0
|
||||
|
||||
Private m_SelList As New List(Of Integer)
|
||||
Private m_dOffsetFiloTop As Double = 5
|
||||
Private m_dDepthFiloTop As Double = 5
|
||||
Private m_bCornerRadius As Boolean = False
|
||||
|
||||
Private m_dDripOffset As Double = 10
|
||||
Private m_dDripOffset2 As Double = 0
|
||||
Private m_nEngrNbr2 As Integer = 1
|
||||
Private m_dDripDepth As Double = 10
|
||||
Private m_dEngraveDepth2 As Double = 5
|
||||
Private m_dDripShort As Double = 0
|
||||
Private m_dEngraveAngle As Double = 0
|
||||
|
||||
Private m_CallingWndScene As Scene
|
||||
Private m_CallingWindow As CallingWindowOpt
|
||||
@@ -415,16 +495,36 @@ Public Class SideEntityControlVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Parameter4Msg As String = EgtMsg(MSG_IMPORTPAGEUC + 12)
|
||||
Private m_Parameter4Msg As String = EgtMsg(MSG_IMPORTPAGEUC + 11) & "2"
|
||||
Public Property Parameter4Msg As String
|
||||
Get
|
||||
Return m_Parameter4Msg ' Accorciamento
|
||||
Return m_Parameter4Msg ' Affondamento2
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Parameter4Msg = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Parameter5Msg As String = "RoundOff"
|
||||
Public Property Parameter5Msg As String
|
||||
Get
|
||||
Return m_Parameter5Msg ' Arrotonda
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Parameter5Msg = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Parameter6Msg As String = "Angle"
|
||||
Public Property Parameter6Msg As String
|
||||
Get
|
||||
Return m_Parameter6Msg ' Angolo
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Parameter6Msg = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region ' Messages
|
||||
|
||||
#Region "CONSTRUCTOR"
|
||||
@@ -470,21 +570,38 @@ Public Class SideEntityControlVM
|
||||
Parameter2_Visibility = Visibility.Visible
|
||||
Parameter2ab_Visibility = Visibility.Hidden
|
||||
Parameter4_Visibility = Visibility.Hidden
|
||||
Parameter5_Visibility = Visibility.Hidden
|
||||
Parameter6_Visibility = Visibility.Hidden
|
||||
ElseIf m_Mode = ModeOpt.FILOTOP Then
|
||||
Parameter23_Visibility = Windows.Visibility.Hidden
|
||||
Parameter2_Visibility = Visibility.Visible
|
||||
Parameter2ab_Visibility = Visibility.Hidden
|
||||
Parameter4_Visibility = Visibility.Hidden
|
||||
Parameter5_Visibility = Visibility.Visible
|
||||
Parameter6_Visibility = Visibility.Hidden
|
||||
ElseIf m_Mode = ModeOpt.ALZANDFRONT Then
|
||||
Parameter2_Visibility = Visibility.Hidden
|
||||
Parameter23_Visibility = Windows.Visibility.Visible
|
||||
Parameter2ab_Visibility = Visibility.Visible
|
||||
Parameter4_Visibility = Visibility.Hidden
|
||||
Parameter5_Visibility = Visibility.Hidden
|
||||
Parameter6_Visibility = Visibility.Hidden
|
||||
ElseIf m_Mode = ModeOpt.ENGRAVE Then
|
||||
' Temporaneamente lo disabilito
|
||||
Parameter23_Visibility = Windows.Visibility.Visible
|
||||
Parameter4_Visibility = Visibility.Visible
|
||||
Parameter2ab_Visibility = Visibility.Visible
|
||||
Parameter2_Visibility = Visibility.Hidden
|
||||
Parameter5_Visibility = Visibility.Hidden
|
||||
Parameter6_Visibility = Visibility.Visible
|
||||
Else
|
||||
' Temporaneamente lo disabilito
|
||||
Parameter23_Visibility = Windows.Visibility.Visible
|
||||
Parameter4_Visibility = Visibility.Collapsed
|
||||
Parameter4_Visibility = Visibility.Visible
|
||||
Parameter2ab_Visibility = Visibility.Visible
|
||||
Parameter2_Visibility = Visibility.Hidden
|
||||
Parameter5_Visibility = Visibility.Hidden
|
||||
Parameter6_Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
'------------------ VALORI E TITOLI PARAMETRI
|
||||
@@ -497,12 +614,15 @@ Public Class SideEntityControlVM
|
||||
|
||||
ElseIf m_Mode = ModeOpt.FILOTOP Then
|
||||
Parameter1Msg = EgtMsg(MSG_IMPORTPAGEUC + 10) ' Offset
|
||||
Dim x As String = EgtMsg(MSG_IMPORTPAGEUC + 11)
|
||||
Parameter2Msg = EgtMsg(MSG_IMPORTPAGEUC + 11) ' Depth
|
||||
Parameter5Msg = "Round Off"
|
||||
m_dOffsetFiloTop = GetMainPrivateProfileDouble(S_SIDES, K_FILOTOPOFFSET, 5)
|
||||
m_dDepthFiloTop = GetMainPrivateProfileDouble(S_SIDES, K_FILOTOPDEPTH, 5)
|
||||
m_bCornerRadius = GetMainPrivateProfileInt(S_SIDES, K_FILOTOPROUNDOFF, 0) <> 0
|
||||
SetParameter1(m_dOffsetFiloTop)
|
||||
SetParameter2(m_dDepthFiloTop)
|
||||
SetParameter5(m_bCornerRadius)
|
||||
m_SelList.Clear()
|
||||
|
||||
ElseIf m_Mode = ModeOpt.ENGRAVE Or m_Mode = ModeOpt.DRIP Then
|
||||
Parameter1Msg = EgtMsg(MSG_IMPORTPAGEUC + 10) ' Offset
|
||||
@@ -512,12 +632,15 @@ Public Class SideEntityControlVM
|
||||
m_nEngrNbr2 = GetMainPrivateProfileInt(S_SIDES, K_ENGRAVENUMBER2, 1)
|
||||
m_dDripDepth = GetMainPrivateProfileDouble(S_SIDES, K_DRIPDEPTH, 10)
|
||||
m_dDripShort = GetMainPrivateProfileDouble(S_SIDES, K_DRIPSHORT, 0)
|
||||
m_dEngraveDepth2 = GetMainPrivateProfileDouble(S_SIDES, K_ENGRAVEDEPTH2, 0)
|
||||
m_dEngraveAngle = GetMainPrivateProfileDouble(S_SIDES, K_ENGRAVEANGLE, 0)
|
||||
SetParameter1(m_dDripOffset)
|
||||
SetParameter2(m_dDripOffset2)
|
||||
SetParameter2a(m_nEngrNbr2)
|
||||
SetParameter2b(m_dDripOffset2)
|
||||
SetParameter3(m_dDripDepth)
|
||||
SetParameter4(m_dDripShort)
|
||||
SetParameter4(m_dEngraveDepth2)
|
||||
SetParameter6(m_dEngraveAngle)
|
||||
|
||||
ElseIf m_Mode = ModeOpt.ALZANDFRONT Then
|
||||
' definisco i nomi dei campi
|
||||
@@ -536,6 +659,9 @@ Public Class SideEntityControlVM
|
||||
LoadCurrentCompo()
|
||||
End If
|
||||
|
||||
' aggiorno i testi sui lati della figura
|
||||
RefreshSideAngleText()
|
||||
|
||||
' Aggiorno visualizzazione
|
||||
If CallingWindow = CallingWindowOpt.COMPO Then
|
||||
EgtZoom(ZM.ALL)
|
||||
@@ -609,7 +735,9 @@ Public Class SideEntityControlVM
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
CreateDripGeom(PartId)
|
||||
ElseIf m_Mode = ModeOpt.ENGRAVE Then
|
||||
'--- ??? ---
|
||||
' --- ??? ---
|
||||
ElseIf m_Mode = ModeOpt.FILOTOP Then
|
||||
CreateFiloTopPreView(m_SelList, False)
|
||||
End If
|
||||
' Aggiorno visualizzazione
|
||||
EgtDraw()
|
||||
@@ -717,21 +845,25 @@ Public Class SideEntityControlVM
|
||||
End If
|
||||
|
||||
' Aggiorno interfaccia
|
||||
If m_CallingWindow = CallingWindowOpt.DXFIMPORT Then
|
||||
If m_CallingWindow = CallingWindowOpt.DXFIMPORT Or m_CallingWindow = CallingWindowOpt.COMPO Then
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
For Each Entity In m_SideEntityList
|
||||
If DirectCast(Entity, SideAngleEntity).dSideAngle <> 0 Then
|
||||
Dim nI As Integer = 0
|
||||
StringToInt(Entity.sEntityName.Substring(1), nI)
|
||||
CheckSide(nI)
|
||||
If TypeOf Entity Is SideAngleEntity Then
|
||||
If DirectCast(Entity, SideAngleEntity).dSideAngle <> 0 Then
|
||||
Dim nI As Integer = 0
|
||||
StringToInt(Entity.sEntityName.Substring(1), nI)
|
||||
CheckSide(nI)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
For Each Entity In m_SideEntityList
|
||||
If DirectCast(Entity, DripEntity).bHaveDrip Then
|
||||
Dim nI As Integer = 0
|
||||
StringToInt(Entity.sEntityName.Substring(1), nI)
|
||||
CheckSide(nI)
|
||||
If TypeOf Entity Is DripEntity Then
|
||||
If DirectCast(Entity, DripEntity).bHaveDrip Then
|
||||
Dim nI As Integer = 0
|
||||
StringToInt(Entity.sEntityName.Substring(1), nI)
|
||||
CheckSide(nI)
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
@@ -1101,6 +1233,9 @@ Public Class SideEntityControlVM
|
||||
Dim nCrvId = EgtGetFirstInGroup(DripLayer)
|
||||
While nCrvId <> GDB_ID.NULL
|
||||
EgtOffsetCurve(nCrvId, -m_dDripOffset, OFF_TYPE.EXTEND)
|
||||
If m_Mode = ModeOpt.ENGRAVE Then
|
||||
EgtSetInfo(nCrvId, INFO_DEPTH, m_dDripDepth)
|
||||
End If
|
||||
nCrvId = EgtGetNext(nCrvId)
|
||||
End While
|
||||
' Eventuali curve aggiuntive con offset2
|
||||
@@ -1111,11 +1246,19 @@ Public Class SideEntityControlVM
|
||||
For i As Integer = 1 To m_nEngrNbr2
|
||||
Dim nNewId As Integer = EgtCopy(nCrvId, nCrvId, GDB_POS.AFTER)
|
||||
EgtOffsetCurve(nNewId, -i * m_dDripOffset2, OFF_TYPE.EXTEND)
|
||||
If m_Mode = ModeOpt.ENGRAVE Then
|
||||
EgtSetInfo(nNewId, INFO_DEPTH, m_dEngraveDepth2)
|
||||
End If
|
||||
Next
|
||||
nCrvId = nNextCrvId
|
||||
End While
|
||||
End If
|
||||
|
||||
Dim ListEngraveSideAng As New List(Of Integer)
|
||||
|
||||
If m_Mode = ModeOpt.DRIP Then
|
||||
' Assegno colore e attributi
|
||||
Dim nInd As Integer = 0
|
||||
' Esplodo nelle curve componenti
|
||||
nCrvId = EgtGetFirstInGroup(DripLayer)
|
||||
While nCrvId <> GDB_ID.NULL
|
||||
@@ -1134,14 +1277,70 @@ Public Class SideEntityControlVM
|
||||
End While
|
||||
Else
|
||||
' Assegno colore e attributi
|
||||
Dim nInd As Integer = 0
|
||||
nCrvId = EgtGetFirstInGroup(DripLayer)
|
||||
While nCrvId <> GDB_ID.NULL
|
||||
EgtSetColor(nCrvId, COL_MCH_DRIPCUT())
|
||||
EgtSetInfo(nCrvId, INFO_DEPTH, m_dDripDepth)
|
||||
'EgtSetInfo(nCrvId, INFO_DEPTH, m_dDripDepth)
|
||||
EgtSetInfo(nCrvId, INFO_STRICT, If(m_dDripShort > EPS_SMALL, "3", "0"))
|
||||
If nInd = 0 Then
|
||||
' solo se m_dEngraveAngle > 0
|
||||
If Math.Abs(m_dEngraveAngle) > EPS_ANG_SMALL Then
|
||||
' salvo l'Id della curva che deve essere manipolato separatamente
|
||||
ListEngraveSideAng.Add(nCrvId)
|
||||
Else
|
||||
EgtRemoveInfo(nCrvId, INFO_SIDE_ANGLE)
|
||||
EgtModifyCurveThickness(nCrvId, -m_dEngraveDepth2)
|
||||
End If
|
||||
Else
|
||||
If nInd = m_nEngrNbr2 Then
|
||||
nInd = -1
|
||||
End If
|
||||
EgtModifyCurveThickness(nCrvId, -m_dEngraveDepth2)
|
||||
End If
|
||||
nInd = nInd + 1
|
||||
If nInd > m_nEngrNbr2 Then nInd = 0
|
||||
nCrvId = EgtGetNext(nCrvId)
|
||||
End While
|
||||
End If
|
||||
SplitJointedSideEngrave(ListEngraveSideAng)
|
||||
End Sub
|
||||
|
||||
Private Sub SplitJointedSideEngrave(ListEngraveSideAngId As List(Of Integer))
|
||||
For Each nCrvId As Integer In ListEngraveSideAngId
|
||||
' eventualmente separo il taglio inclinato
|
||||
Dim dUs, dUe As Double
|
||||
EgtCurveDomain(nCrvId, dUs, dUe)
|
||||
Dim dU As Double = dUs
|
||||
While dU < dUe ' + EPS_ZERO
|
||||
Dim ptCurr As Point3d
|
||||
EgtAtParamPoint(nCrvId, dU + 1, nCrvId, ptCurr)
|
||||
' separa la curva in questo punto
|
||||
Dim nNewCurvId As Integer = GDB_ID.NULL
|
||||
If dUe > 1 Then
|
||||
nNewCurvId = EgtSplitCurveAtPoint(nCrvId, ptCurr, GDB_RT.LOC)
|
||||
Else
|
||||
nNewCurvId = nCrvId
|
||||
End If
|
||||
EgtSetColor(nCrvId, COL_MCH_ONENGRAVE_ANG())
|
||||
EgtSetInfo(nCrvId, INFO_SIDE_ANGLE, m_dEngraveAngle)
|
||||
' recupero il vettore di estrusione della curva e la direzione della curva
|
||||
Dim vtAux As Vector3d
|
||||
EgtStartVector(nCrvId, vtAux)
|
||||
Dim vtExtrusion As Vector3d
|
||||
EgtCurveExtrusion(nCrvId, vtExtrusion)
|
||||
' ruoto il vetottore nella nuova direzione
|
||||
vtExtrusion.Rotate(vtAux, -m_dEngraveAngle)
|
||||
' assegno il vettore di estrusione nella nuova direzione indicata (segno negativo perchè dentro il pezzo)
|
||||
EgtModifyCurveExtrusion(nCrvId, vtExtrusion)
|
||||
Dim ExtendFactor As Double = New Vector3d(0, 0, 1) * vtExtrusion
|
||||
EgtModifyCurveThickness(nCrvId, -m_dDripDepth / ExtendFactor)
|
||||
If dUe = 1 Then Exit While
|
||||
nCrvId = nNewCurvId
|
||||
' aggiorno i valori del dominio della curva che rimane
|
||||
EgtCurveDomain(nCrvId, dUs, dUe)
|
||||
End While
|
||||
Next
|
||||
End Sub
|
||||
|
||||
' Funzione che modifica l'inclinazione di un lato
|
||||
@@ -1266,8 +1465,9 @@ Public Class SideEntityControlVM
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
WriteMainPrivateProfileString(S_SIDES, K_SIDEANGLE, DoubleToString(m_Parameter1, 3))
|
||||
ElseIf m_Mode = ModeOpt.FILOTOP Then
|
||||
WriteMainPrivateProfileString(S_SIDES, K_FILOTOPOFFSET, DoubleToString(m_Parameter1, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_FILOTOPDEPTH, DoubleToString(m_Parameter2, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_FILOTOPOFFSET, LenToString(m_Parameter1, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_FILOTOPDEPTH, LenToString(m_Parameter2, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_FILOTOPROUNDOFF, If(m_Parameter5ChBx, "1", "0"))
|
||||
' Aggiorno affondamento del profilo
|
||||
Dim nPartId As Integer = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
@@ -1283,10 +1483,10 @@ Public Class SideEntityControlVM
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
ElseIf m_Mode = ModeOpt.DRIP Then
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPOFFSET, DoubleToString(m_dDripOffset, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPOFFSET2, DoubleToString(m_dDripOffset2, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPDEPTH, DoubleToString(m_dDripDepth, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPSHORT, DoubleToString(m_dDripShort, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPOFFSET, LenToString(m_dDripOffset, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPOFFSET2, LenToString(m_dDripOffset2, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPDEPTH, LenToString(m_dDripDepth, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPSHORT, LenToString(m_dDripShort, 3))
|
||||
For Each objEntity In m_SideEntityList
|
||||
If TypeOf objEntity Is DripEntity Then
|
||||
Dim CurrEntity As DripEntity = DirectCast(objEntity, DripEntity)
|
||||
@@ -1295,11 +1495,13 @@ Public Class SideEntityControlVM
|
||||
End If
|
||||
Next
|
||||
ElseIf m_Mode = ModeOpt.ENGRAVE Then
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEOFFSET, DoubleToString(m_dDripOffset, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEOFFSET2, DoubleToString(m_dDripOffset2, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEOFFSET, LenToString(m_dDripOffset, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEOFFSET2, LenToString(m_dDripOffset2, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVENUMBER2, m_nEngrNbr2.ToString)
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEDEPTH, DoubleToString(m_dDripDepth, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVESHORT, DoubleToString(m_dDripShort, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEDEPTH, LenToString(m_dDripDepth, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVESHORT, LenToString(m_dDripShort, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEDEPTH2, LenToString(m_dEngraveDepth2, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEANGLE, LenToString(m_dEngraveAngle, 3))
|
||||
For Each objEntity In m_SideEntityList
|
||||
If TypeOf objEntity Is DripEntity Then
|
||||
Dim CurrEntity As DripEntity = DirectCast(objEntity, DripEntity)
|
||||
@@ -1736,8 +1938,146 @@ Public Class SideEntityControlVM
|
||||
End If
|
||||
End Sub
|
||||
|
||||
' ----------------------- FILO TOP -----------------------
|
||||
Public Sub CreateFiloTopPreView(SelList As List(Of Integer), Optional bReadInfo As Boolean = True)
|
||||
m_SelList = SelList
|
||||
If m_SelList.Count < 1 Then Return
|
||||
Dim nPartId As Integer = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
Dim nLayId As Integer = EgtGetFirstLayer(nPartId)
|
||||
While nLayId <> GDB_ID.NULL
|
||||
Dim sLayName As String = ""
|
||||
' verifico che lemento corrente appartenga all'elenco degli elementi selezionati
|
||||
Dim bIsSelected As Boolean = m_SelList.Find(Function(value As Integer)
|
||||
Return value = nLayId
|
||||
End Function) <> 0
|
||||
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso EgtExistsInfo(nLayId, INFO_FILOTOP) AndAlso bIsSelected Then
|
||||
' ---------------------- Inizio GESTIONE PREVIEW percorso -------------------------------
|
||||
Dim nLayFiloTop As Integer = GDB_ID.NULL
|
||||
Dim nInLoopRef As Integer = GDB_ID.NULL
|
||||
nLayFiloTop = EgtGetFirstNameInGroup(nPartId, "FiloTop")
|
||||
EgtGetInfo(nLayFiloTop, "InLoopRef", nInLoopRef)
|
||||
' verifico il Layer "FiloTop" sia associato all'InLoop corrente
|
||||
While (nLayFiloTop <> GDB_ID.NULL AndAlso nInLoopRef <> nLayId)
|
||||
nLayFiloTop = EgtGetNextName(nLayFiloTop, "FiloTop")
|
||||
EgtGetInfo(nLayFiloTop, "InLoopRef", nInLoopRef)
|
||||
End While
|
||||
|
||||
' se non esiste il Layer "FiloTop"
|
||||
If nLayFiloTop = GDB_ID.NULL Then
|
||||
' lo creo
|
||||
nLayFiloTop = EgtCreateGroup(nPartId)
|
||||
EgtSetName(nLayFiloTop, "FiloTop")
|
||||
EgtSetInfo(nLayFiloTop, "InLoopRef", nLayId)
|
||||
EgtSetInfo(nLayId, "FiloTopRef", nLayFiloTop)
|
||||
End If
|
||||
|
||||
' carico i dati del filo top selezionato
|
||||
If bReadInfo Then
|
||||
EgtGetInfo(nLayFiloTop, INFO_OFFSET, m_dOffsetFiloTop)
|
||||
EgtGetInfo(nLayFiloTop, INFO_DEPTH, m_dDepthFiloTop)
|
||||
Dim nVal As Integer = If(m_bCornerRadius, 1, 0)
|
||||
EgtGetInfo(nLayFiloTop, INFO_ROUNDOFF, nVal)
|
||||
m_bCornerRadius = If(nVal = 1, True, False)
|
||||
SetParameter1(m_dOffsetFiloTop)
|
||||
SetParameter2(m_dDepthFiloTop)
|
||||
SetParameter5(m_bCornerRadius)
|
||||
End If
|
||||
|
||||
' procedo alla creazione della curva
|
||||
Dim nIdCompoCurve As Integer = GDB_ID.NULL
|
||||
' cancello un eventuale curva composita creata in precedenza
|
||||
nIdCompoCurve = EgtGetFirstNameInGroup(nLayFiloTop, "OffsetPreView")
|
||||
If nIdCompoCurve <> GDB_ID.NULL Then
|
||||
EgtErase(nIdCompoCurve)
|
||||
End If
|
||||
Dim nCompoCurve As New List(Of Integer)
|
||||
' costruisco il percorso chiuso dati i lati di contorno
|
||||
Dim nLine As Integer = EgtGetFirstInGroup(nLayId)
|
||||
While nLine <> GDB_ID.NULL
|
||||
nCompoCurve.Add(nLine)
|
||||
nLine = EgtGetNext(nLine)
|
||||
End While
|
||||
Dim PtNearStart As Point3d
|
||||
Dim nInfoRoundOff As Integer = If(m_bCornerRadius, 1, 0)
|
||||
|
||||
nIdCompoCurve = EgtCreateCurveCompoByChain(nLayFiloTop, nCompoCurve.ToArray, PtNearStart, False)
|
||||
EgtSetName(nIdCompoCurve, "OffsetPreView")
|
||||
|
||||
' salvo i dati nel layer FiloTop
|
||||
EgtSetInfo(nLayFiloTop, INFO_OFFSET, m_dOffsetFiloTop)
|
||||
EgtSetInfo(nLayFiloTop, INFO_DEPTH, m_dDepthFiloTop)
|
||||
EgtSetInfo(nLayFiloTop, INFO_ROUNDOFF, nInfoRoundOff)
|
||||
|
||||
Dim bOk As Boolean = False
|
||||
' leggo che tipo di offset applicare (Round, Extend)
|
||||
If nInfoRoundOff <> 1 Then
|
||||
bOk = EgtOffsetCurve(nIdCompoCurve, -m_dOffsetFiloTop, OFF_TYPE.EXTEND)
|
||||
Else
|
||||
bOk = EgtOffsetCurve(nIdCompoCurve, -m_dOffsetFiloTop, OFF_TYPE.FILLET)
|
||||
End If
|
||||
|
||||
' se la generazione della curva non va a buon fine
|
||||
If Not bOk Then
|
||||
EgtErase(nLayFiloTop)
|
||||
EgtRemoveInfo(nLayId, "FiloTopRef")
|
||||
EgtOutLog("Error in generation OffsetPreView in TopEgde ")
|
||||
End If
|
||||
' ---------------------- Fine GESTIONE PREVIEW percorso -------------------------------
|
||||
End If
|
||||
nLayId = EgtGetNextLayer(nLayId)
|
||||
End While
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
' riceve la lista dei LayerFiloTop che devono essere eliminati
|
||||
Public Sub EraseFiloTopPreview(EraseList As List(Of Integer))
|
||||
Dim m_EraseList As List(Of Integer) = EraseList
|
||||
If m_EraseList.Count < 1 Then Return
|
||||
Dim nPartId As Integer = EgtGetFirstPart()
|
||||
While nPartId <> GDB_ID.NULL
|
||||
Dim nLayId As Integer = EgtGetFirstLayer(nPartId)
|
||||
While nLayId <> GDB_ID.NULL
|
||||
Dim sLayName As String = ""
|
||||
Dim bIsSelected As Boolean = m_EraseList.Find(Function(value As Integer)
|
||||
Return value = nLayId
|
||||
End Function) <> 0
|
||||
If EgtGetName(nLayId, sLayName) AndAlso sLayName = NAME_INLOOP AndAlso bIsSelected Then
|
||||
' ---------------------- Inizio GESTIONE PREVIEW percorso -------------------------------
|
||||
Dim nLayFiloTop As Integer = GDB_ID.NULL
|
||||
Dim nInLoopRef As Integer = GDB_ID.NULL
|
||||
nLayFiloTop = EgtGetFirstNameInGroup(nPartId, "FiloTop")
|
||||
EgtGetInfo(nLayFiloTop, "InLoopRef", nInLoopRef)
|
||||
' cerco il Layer associato all'InLoop corrente
|
||||
While (nLayFiloTop <> GDB_ID.NULL AndAlso nInLoopRef <> nLayId)
|
||||
nLayFiloTop = EgtGetNextName(nLayFiloTop, "FiloTop")
|
||||
EgtGetInfo(nLayFiloTop, "InLoopRef", nInLoopRef)
|
||||
End While
|
||||
|
||||
' se non esiste il Layer
|
||||
If nLayFiloTop = GDB_ID.NULL Then
|
||||
' esco
|
||||
Return
|
||||
Else
|
||||
' lo elimino
|
||||
EgtErase(nLayFiloTop)
|
||||
EraseList.Remove(nLayId)
|
||||
End If
|
||||
' ---------------------- Fine GESTIONE PREVIEW percorso -------------------------------
|
||||
End If
|
||||
nLayId = EgtGetNextLayer(nLayId)
|
||||
End While
|
||||
nPartId = EgtGetNextPart(nPartId)
|
||||
End While
|
||||
EgtDraw()
|
||||
End Sub
|
||||
|
||||
#End Region ' METHODS
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Public MustInherit Class SideEntity
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
<EgtWPFLib5:ShowPanelVM x:Key="ShowPanelVM"/>
|
||||
<EgtWPFLib5:ViewPanelVM x:Key="ViewPanelVM"/>
|
||||
<EgtWPFLib5:InstrumentPanelVM x:Key="InstrumentPanelVM"/>
|
||||
<OmagOFFICE:PrintPanelVM x:Key="PrintPanelVM"/>
|
||||
<OmagOFFICE:MyMachinePanelVM x:Key="MachinePanelVM"/>
|
||||
<OmagOFFICE:VeinMatchPanelVM x:Key="VeinMatchPanelVM"/>
|
||||
<OmagOFFICE:OptionPanelVM x:Key="OptionPanelVM"/>
|
||||
@@ -223,7 +224,11 @@
|
||||
<Setter Property="Height" Value="30"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OptionPanel_NestingToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Style x:Key="OptionPanel_ToggleWrapButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="45"/>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OptionPanel_NestingToggleButton" TargetType="{x:Type ToggleButton}" BasedOn="{StaticResource {x:Type ToggleButton}}">
|
||||
<Setter Property="Height" Value="60"/>
|
||||
<Setter Property="Width" Value="60"/>
|
||||
</Style>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
Imports EgtWPFLib5
|
||||
Imports EgtPHOTOLib
|
||||
Imports EgtUILib
|
||||
|
||||
Module OmagOFFICEMap
|
||||
|
||||
@@ -120,7 +121,6 @@ Module OmagOFFICEMap
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
'Public ReadOnly Property refProjectVM As ProjectLibVM
|
||||
' Get
|
||||
' Return PhotoMap.refProjectVM
|
||||
@@ -230,6 +230,43 @@ Module OmagOFFICEMap
|
||||
Return Not IsNothing(m_refSimulTabVM)
|
||||
End Function
|
||||
|
||||
|
||||
Private m_refProjectV As ProjectV
|
||||
Friend Sub SetRefProjectV(ProjectV As ProjectV)
|
||||
m_refProjectV = ProjectV
|
||||
End Sub
|
||||
|
||||
Private m_WidthProjectV As Integer = 2000
|
||||
Friend Sub SetWidthDimProjectV(Width As Integer)
|
||||
m_WidthProjectV = Width
|
||||
End Sub
|
||||
Friend Function GetWidthDimProjectV() As Integer
|
||||
If Not IsNothing(m_refProjectV) Then
|
||||
Try
|
||||
m_WidthProjectV = CInt(m_refProjectV.ActualWidth)
|
||||
Catch ex As Exception
|
||||
EgtOutLog(ex.Message)
|
||||
End Try
|
||||
End If
|
||||
Return m_WidthProjectV
|
||||
End Function
|
||||
|
||||
Private m_HeightProjectV As Integer = 1000
|
||||
Friend Sub SetHeightDimProjectV(Eight As Integer)
|
||||
m_HeightProjectV = Eight
|
||||
End Sub
|
||||
|
||||
Friend Function GetHeightDimProjectV() As Integer
|
||||
If Not IsNothing(m_refProjectV) Then
|
||||
Try
|
||||
m_HeightProjectV = CInt(m_refProjectV.ActualHeight)
|
||||
Catch ex As Exception
|
||||
EgtOutLog(ex.Message)
|
||||
End Try
|
||||
End If
|
||||
Return m_HeightProjectV
|
||||
End Function
|
||||
|
||||
#End Region ' Set
|
||||
|
||||
#Region "Init"
|
||||
|
||||
Reference in New Issue
Block a user