Compare commits

...

10 Commits

Author SHA1 Message Date
NicolaP a92822bb87 Gestione visualizzazione percorso FiloTop 2022-06-30 19:01:07 +02:00
NicolaP fb0d35eddf Cambio versione 2022-06-27 09:47:50 +02:00
NicolaP c367f1bfe9 Merge branch 'Features/Manage_Multi_Istances' into develop 2022-06-20 18:17:18 +02:00
NicolaP d789be4547 Merge branch 'Features/Manage_Engrave' into develop 2022-06-20 18:17:11 +02:00
NicolaP 20e1e9b41c Merge branch 'Features/Manage_REDO' into develop 2022-06-20 18:16:58 +02:00
NicolaP b25f065f3c Merge branch 'Features/SHOTT_Over_Table' into develop 2022-06-20 18:16:46 +02:00
NicolaP 83cf2646cf Passo alla libreira il nome dello User 2022-06-20 15:08:08 +02:00
NicolaP 11bc92bb10 Getsione comunicazionea DB lastra in lettura 2022-06-16 16:17:35 +02:00
NicolaP 953083e429 Gestione affandamento incisioni da sopra 2022-06-13 12:46:22 +02:00
NicolaP 132990d705 Mantegno attive le lavorazioni della fase corrente 2022-06-09 12:52:41 +02:00
13 changed files with 380 additions and 33 deletions
@@ -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"
+45 -2
View File
@@ -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")
+19
View File
@@ -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
+2
View File
@@ -104,6 +104,7 @@ 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_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"
@@ -111,6 +112,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"
+1
View File
@@ -160,6 +160,7 @@ Module ConstMach
Public Const NAME_PREVIEW As String = "PV"
' 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"
+7 -3
View File
@@ -197,8 +197,8 @@ Public Class MainWindowM
' Verifico abilitazione nesting automatico
m_bAutoNestOption = Not String.IsNullOrWhiteSpace( sNestKey)
' Recupero livello e opzioni della chiave
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2405, 1, m_nKeyLevel) And
EgtGetKeyOptions(9423, 2405, 1, m_nKeyOptions)
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2406, 1, m_nKeyLevel) And
EgtGetKeyOptions(9423, 2406, 1, m_nKeyOptions)
' Verifico abilitazione prodotto
Dim bProd As Boolean = GetKeyOption(KEY_OPT.OFFICE_BASE)
' Inizializzazione generale di EgtInterface
@@ -269,10 +269,14 @@ 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
Private Sub ManageInstance()
+2 -2
View File
@@ -69,6 +69,6 @@ Imports System.Windows
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.4.5.4")>
<Assembly: AssemblyFileVersion("2.4.5.4")>
<Assembly: AssemblyVersion("2.4.6.1")>
<Assembly: AssemblyFileVersion("2.4.6.1")>
+24
View File
@@ -595,8 +595,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
+26 -3
View File
@@ -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
@@ -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"
+14 -1
View File
@@ -172,6 +172,19 @@
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>
</UserControl>
+235 -19
View File
@@ -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,41 @@ 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
Private m_dSideAngle As Double = 0
Private m_HeightA As Double = 0
@@ -369,13 +411,16 @@ 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_CallingWndScene As Scene
@@ -415,16 +460,26 @@ 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
#End Region ' Messages
#Region "CONSTRUCTOR"
@@ -470,21 +525,26 @@ Public Class SideEntityControlVM
Parameter2_Visibility = Visibility.Visible
Parameter2ab_Visibility = Visibility.Hidden
Parameter4_Visibility = Visibility.Hidden
Parameter5_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
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
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
End If
'------------------ VALORI E TITOLI PARAMETRI
@@ -497,12 +557,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 +575,13 @@ 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)
SetParameter1(m_dDripOffset)
SetParameter2(m_dDripOffset2)
SetParameter2a(m_nEngrNbr2)
SetParameter2b(m_dDripOffset2)
SetParameter3(m_dDripDepth)
SetParameter4(m_dDripShort)
SetParameter4(m_dEngraveDepth2)
ElseIf m_Mode = ModeOpt.ALZANDFRONT Then
' definisco i nomi dei campi
@@ -536,6 +600,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 +676,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,7 +786,7 @@ 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
@@ -1101,6 +1170,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,10 +1183,14 @@ 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
If m_Mode = ModeOpt.DRIP Then
' Esplodo nelle curve componenti
nCrvId = EgtGetFirstInGroup(DripLayer)
@@ -1137,7 +1213,7 @@ Public Class SideEntityControlVM
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"))
nCrvId = EgtGetNext(nCrvId)
End While
@@ -1266,8 +1342,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 +1360,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 +1372,12 @@ 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))
For Each objEntity In m_SideEntityList
If TypeOf objEntity Is DripEntity Then
Dim CurrEntity As DripEntity = DirectCast(objEntity, DripEntity)
@@ -1736,8 +1814,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
-1
View File
@@ -120,7 +120,6 @@ Module OmagOFFICEMap
End Get
End Property
'Public ReadOnly Property refProjectVM As ProjectLibVM
' Get
' Return PhotoMap.refProjectVM