OmagOFFICE 2.3a1:
-> aggiunto il comando FiloTop nella CompoListPage -> aggiunto il comandi Invert nelle lavorazioni -> aggiunto il comando Cad2d nella pagina DxfImportWindow
This commit is contained in:
@@ -6,9 +6,10 @@ Public Class SideEntityControlVM
|
||||
Inherits VMBase
|
||||
|
||||
Public Enum ModeOpt As Integer
|
||||
SIDEANGLE = 0
|
||||
DRIP = 1
|
||||
ENGRAVE = 2
|
||||
SIDEANGLE = 0 ' inclina lato
|
||||
DRIP = 1 ' incidi da sotto
|
||||
ENGRAVE = 2 ' incidi da sopra
|
||||
FILOTOP = 3 ' filo top
|
||||
End Enum
|
||||
|
||||
Public Enum CallingWindowOpt As Integer
|
||||
@@ -21,7 +22,7 @@ Public Class SideEntityControlVM
|
||||
|
||||
Friend Shared m_SideAngleCheck As Boolean = False
|
||||
|
||||
' Lista di tutte le entità inclinabili presenti nel progetto
|
||||
' Lista di tutte le entità (inclinabili) presenti nel progetto
|
||||
Private m_SideEntityList As ObservableCollection(Of SideEntity)
|
||||
Public Property SideEntityList As ObservableCollection(Of SideEntity)
|
||||
Get
|
||||
@@ -32,10 +33,12 @@ Public Class SideEntityControlVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
' stampa il nome delle colonne
|
||||
Public ReadOnly Property Legenda_Visibility As Visibility
|
||||
Get
|
||||
If m_Mode = SideEntityControlVM.ModeOpt.DRIP OrElse
|
||||
m_Mode = SideEntityControlVM.ModeOpt.ENGRAVE OrElse
|
||||
m_Mode = SideEntityControlVM.ModeOpt.FILOTOP OrElse
|
||||
SideEntityControlVM.m_SideAngleCheck OrElse
|
||||
m_SideEntityList.Count() = 0 Then
|
||||
Return Visibility.Collapsed
|
||||
@@ -81,8 +84,6 @@ Public Class SideEntityControlVM
|
||||
End If
|
||||
End Get
|
||||
Set(value As String)
|
||||
'StringToLen(value, m_Parameter1)
|
||||
'SideAngleEntity.m_Parameter1 = m_Parameter1
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
StringToDouble(value, m_Parameter1)
|
||||
SideAngleEntity.m_Parameter1 = m_Parameter1
|
||||
@@ -117,6 +118,17 @@ Public Class SideEntityControlVM
|
||||
NotifyPropertyChanged("Parameter1")
|
||||
End Sub
|
||||
|
||||
Private m_Parameter2_Visibility As Visibility = Visibility.Visible
|
||||
Public Property Parameter2_Visibility As Visibility
|
||||
Get
|
||||
Return m_Parameter2_Visibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_Parameter2_Visibility = value
|
||||
NotifyPropertyChanged("Parameter2_Visbility")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Parameter2 As Double
|
||||
Public Property Parameter2 As String
|
||||
Get
|
||||
@@ -165,6 +177,55 @@ Public Class SideEntityControlVM
|
||||
NotifyPropertyChanged("Parameter2")
|
||||
End Sub
|
||||
|
||||
Private m_Parameter2ab_Visibility As Visibility = Visibility.Visible
|
||||
Public Property Parameter2ab_Visibility As Visibility
|
||||
Get
|
||||
Return m_Parameter2ab_Visibility
|
||||
End Get
|
||||
Set(value As Visibility)
|
||||
m_Parameter2ab_Visibility = value
|
||||
NotifyPropertyChanged("Parameter2ab_Visbility")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_Parameter2a As Integer
|
||||
Public Property Parameter2a As String
|
||||
Get
|
||||
Return DoubleToString(m_Parameter2a, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
StringToInt(value, m_Parameter2a)
|
||||
' Recupero il valore
|
||||
StringToInt(value, m_nEngrNbr2)
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
End Set
|
||||
End Property
|
||||
Private Sub SetParameter2a(value As Integer)
|
||||
m_Parameter2a = value
|
||||
SideAngleEntity.m_Parameter2a = value
|
||||
NotifyPropertyChanged("Parameter2a")
|
||||
End Sub
|
||||
|
||||
Private m_Parameter2b As Double
|
||||
Public Property Parameter2b As String
|
||||
Get
|
||||
Return DoubleToString(m_Parameter2b, 2)
|
||||
End Get
|
||||
Set(value As String)
|
||||
StringToLen(value, m_Parameter2b)
|
||||
' Recupero il valore
|
||||
StringToLen(value, m_dDripOffset2)
|
||||
' Creo le geometrie dei gocciolatoi
|
||||
RefreshSideAngleText()
|
||||
End Set
|
||||
End Property
|
||||
Private Sub SetParameter2b(value As Double)
|
||||
m_Parameter2b = value
|
||||
SideAngleEntity.m_Parameter2b = value
|
||||
NotifyPropertyChanged("Parameter2b")
|
||||
End Sub
|
||||
|
||||
Private m_Parameter3 As Double
|
||||
Public Property Parameter3 As String
|
||||
Get
|
||||
@@ -203,8 +264,14 @@ Public Class SideEntityControlVM
|
||||
NotifyPropertyChanged("Parameter4")
|
||||
End Sub
|
||||
|
||||
Private m_dSideAngle As Double = 0
|
||||
|
||||
Private m_dOffsetFiloTop As Double = 5
|
||||
Private m_dDepthFiloTop As Double = 5
|
||||
|
||||
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_dDripShort As Double = 0
|
||||
|
||||
@@ -223,15 +290,18 @@ Public Class SideEntityControlVM
|
||||
NotifyPropertyChanged("Parameter1Msg")
|
||||
End Set
|
||||
End Property
|
||||
Public ReadOnly Property Parameter2Msg As String
|
||||
|
||||
Private m_Parameter2Msg As String
|
||||
Public Property Parameter2Msg As String
|
||||
Get
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
Return EgtMsg(91002)
|
||||
Else
|
||||
Return EgtMsg(MSG_IMPORTPAGEUC + 16) ' Offset 2
|
||||
End If
|
||||
Return m_Parameter2Msg
|
||||
End Get
|
||||
Set(value As String)
|
||||
m_Parameter2Msg = value
|
||||
NotifyPropertyChanged("Parameter2Msg")
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public ReadOnly Property Parameter3Msg As String
|
||||
Get
|
||||
Return EgtMsg(MSG_IMPORTPAGEUC + 11) ' Affondamento
|
||||
@@ -278,25 +348,42 @@ Public Class SideEntityControlVM
|
||||
End If
|
||||
|
||||
' Gestisco visualizzazione dei parametri
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
If m_Mode = ModeOpt.SIDEANGLE Or m_Mode = ModeOpt.FILOTOP Then
|
||||
Parameter23_Visibility = Windows.Visibility.Hidden
|
||||
Parameter2_Visibility = Visibility.Visible
|
||||
Parameter2ab_Visibility = Visibility.Hidden
|
||||
Else
|
||||
Parameter23_Visibility = Windows.Visibility.Visible
|
||||
Parameter2ab_Visibility = Visibility.Visible
|
||||
Parameter2_Visibility = Visibility.Hidden
|
||||
End If
|
||||
|
||||
' Aggiorno valori
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
Parameter1Msg = EgtMsg(MSG_IMPORTPAGEUC + 9) ' Angolo
|
||||
Dim dVal As Double = GetMainPrivateProfileDouble(S_SIDES, K_SIDEANGLE, 45)
|
||||
SetParameter1(dVal)
|
||||
Parameter2Msg = EgtMsg(91002) ' Tallone
|
||||
m_dSideAngle = GetMainPrivateProfileDouble(S_SIDES, K_SIDEANGLE, 45)
|
||||
SetParameter1(m_dSideAngle)
|
||||
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
|
||||
m_dOffsetFiloTop = GetMainPrivateProfileDouble(S_SIDES, K_FILOTOPOFFSET, 5)
|
||||
m_dDepthFiloTop = GetMainPrivateProfileDouble(S_SIDES, K_FILOTOPDEPTH, 5)
|
||||
SetParameter1(m_dOffsetFiloTop)
|
||||
SetParameter2(m_dDepthFiloTop)
|
||||
Else
|
||||
Parameter1Msg = EgtMsg(MSG_IMPORTPAGEUC + 10) ' Offset
|
||||
Parameter2Msg = EgtMsg(MSG_IMPORTPAGEUC + 16) ' Offset 2
|
||||
m_dDripOffset = GetMainPrivateProfileDouble(S_SIDES, K_DRIPOFFSET, 20)
|
||||
m_dDripOffset2 = GetMainPrivateProfileDouble(S_SIDES, K_DRIPOFFSET2, 0)
|
||||
m_nEngrNbr2 = GetMainPrivateProfileInt(S_SIDES, K_ENGRAVENUMBER2, 1)
|
||||
m_dDripDepth = GetMainPrivateProfileDouble(S_SIDES, K_DRIPDEPTH, 10)
|
||||
m_dDripShort = GetMainPrivateProfileDouble(S_SIDES, K_DRIPSHORT, 0)
|
||||
SetParameter1(m_dDripOffset)
|
||||
SetParameter2(m_dDripOffset2)
|
||||
SetParameter2a(m_nEngrNbr2)
|
||||
SetParameter2b(m_dDripOffset2)
|
||||
SetParameter3(m_dDripDepth)
|
||||
SetParameter4(m_dDripShort)
|
||||
End If
|
||||
@@ -409,14 +496,16 @@ Public Class SideEntityControlVM
|
||||
Dim NextLine As Integer = EgtGetNext(CurrLine)
|
||||
If NextLine = GDB_ID.NULL Then NextLine = EgtGetFirstInGroup( LoopId)
|
||||
If m_Mode = ModeOpt.SIDEANGLE Then
|
||||
If VerifyIsSideAnglePossible(PrevLine, CurrLine, NextLine, bOutLoop) Then
|
||||
If VerifySideAnglePossible(PrevLine, CurrLine, NextLine, bOutLoop) Then
|
||||
' Aggiungo il lato alla lista di quelli inclinabili e ne azzero l'inclinazione
|
||||
AddSideAngle(CurrLine, TextLayer, dBBoxRad, nEntityIndex)
|
||||
nEntityIndex += 1
|
||||
Else
|
||||
EgtSetName( CurrLine, "B" & nOtherIndex.ToString())
|
||||
EgtSetName(CurrLine, "B" & nOtherIndex.ToString())
|
||||
nOtherIndex += 1
|
||||
End If
|
||||
ElseIf m_Mode = ModeOpt.FILOTOP Then
|
||||
|
||||
Else
|
||||
If VerifyIsSideDripPossible(PrevLine, CurrLine, NextLine) Then
|
||||
' Aggiungo il lato alla lista di quelli su cui è possibile mettere il gocciolatoio
|
||||
@@ -659,12 +748,14 @@ Public Class SideEntityControlVM
|
||||
nCrvId = EgtGetNext(nCrvId)
|
||||
End While
|
||||
' Eventuali curve aggiuntive con offset2
|
||||
If m_dDripOffset2 > EPS_SMALL Then
|
||||
If m_nEngrNbr2 > 0 And m_dDripOffset2 > EPS_SMALL Then
|
||||
nCrvId = EgtGetFirstInGroup(DripLayer)
|
||||
While nCrvId <> GDB_ID.NULL
|
||||
Dim nNextCrvId As Integer = EgtGetNext(nCrvId)
|
||||
Dim nNewId As Integer = EgtCopy(nCrvId, nCrvId, GDB_POS.AFTER)
|
||||
EgtOffsetCurve(nNewId, -m_dDripOffset2, OFF_TYPE.EXTEND)
|
||||
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)
|
||||
Next
|
||||
nCrvId = nNextCrvId
|
||||
End While
|
||||
End If
|
||||
@@ -795,10 +886,13 @@ Public Class SideEntityControlVM
|
||||
Parameter1Msg = EgtMsg(MSG_IMPORTPAGEUC + 10) ' Offset
|
||||
m_dDripOffset = GetMainPrivateProfileDouble(S_SIDES, K_DRIPOFFSET, 20)
|
||||
m_dDripOffset2 = GetMainPrivateProfileDouble(S_SIDES, K_DRIPOFFSET2, 0)
|
||||
m_nEngrNbr2 = GetMainPrivateProfileInt(S_SIDES, K_ENGRAVENUMBER2, 0)
|
||||
m_dDripDepth = GetMainPrivateProfileDouble(S_SIDES, K_DRIPDEPTH, 10)
|
||||
m_dDripShort = GetMainPrivateProfileDouble(S_SIDES, K_DRIPSHORT, 0)
|
||||
SetParameter1(m_dDripOffset)
|
||||
SetParameter2(m_dDripOffset2)
|
||||
SetParameter2a(m_nEngrNbr2)
|
||||
SetParameter2b(m_dDripOffset2)
|
||||
SetParameter3(m_dDripDepth)
|
||||
SetParameter4(m_dDripShort)
|
||||
End If
|
||||
@@ -812,9 +906,12 @@ Public Class SideEntityControlVM
|
||||
ElseIf m_CallingWindow = CallingWindowOpt.DXFIMPORT Then
|
||||
' Nessuna azione necessaria
|
||||
End If
|
||||
|
||||
' salvo le modifiche nel file config
|
||||
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))
|
||||
ElseIf m_Mode = ModeOpt.DRIP Then
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPOFFSET, DoubleToString(m_dDripOffset, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_DRIPOFFSET2, DoubleToString(m_dDripOffset2, 3))
|
||||
@@ -823,6 +920,7 @@ Public Class SideEntityControlVM
|
||||
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_ENGRAVENUMBER2, m_nEngrNbr2.ToString)
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVEDEPTH, DoubleToString(m_dDripDepth, 3))
|
||||
WriteMainPrivateProfileString(S_SIDES, K_ENGRAVESHORT, DoubleToString(m_dDripShort, 3))
|
||||
End If
|
||||
@@ -858,44 +956,51 @@ Public Class SideEntityControlVM
|
||||
End Sub
|
||||
|
||||
' Funzione che verifica se la linea corrente è inclinabile in base al tipo della precedente e successiva
|
||||
Shared Function VerifyIsSideAnglePossible(LastLine As Integer, CurrLine As Integer, NextLine As Integer, bOutLoop As Boolean) As Boolean
|
||||
Shared Function VerifySideAnglePossible(LastLine As Integer, CurrLine As Integer, NextLine As Integer, bOutLoop As Boolean) As Boolean
|
||||
' Se WaterJet si tolgono i limiti
|
||||
Dim bSideFree As Boolean = CurrentMachine.bWaterJetting
|
||||
' Analisi del tipo
|
||||
Select EgtGetType(CurrLine)
|
||||
Select Case EgtGetType(CurrLine)
|
||||
Case GDB_TY.CRV_LINE
|
||||
' Le linee vanno bene di per sè
|
||||
Case GDB_TY.CRV_ARC
|
||||
' Gli archi devono essere lavorati sul lato esterno
|
||||
Dim dAngCen As Double : EgtArcAngCenter( CurrLine, dAngCen)
|
||||
If ( bOutLoop And dAngCen < 0) Or ( Not bOutLoop And dAngCen > 0) Then Return False
|
||||
If Not bSideFree Then
|
||||
' Gli archi devono essere lavorati sul lato esterno
|
||||
Dim dAngCen As Double : EgtArcAngCenter(CurrLine, dAngCen)
|
||||
If (bOutLoop And dAngCen < 0) Or (Not bOutLoop And dAngCen > 0) Then Return False
|
||||
End If
|
||||
Case GDB_TY.CRV_COMPO
|
||||
' Gli archi componenti devono essere lavorati sul lato esterno
|
||||
Dim nCopyId As Integer = EgtCopy( CurrLine, CurrLine, GDB_POS.AFTER)
|
||||
If nCopyId = GDB_ID.NULL Then Return False
|
||||
Dim bOk As Boolean = True
|
||||
Dim nCount As Integer = 0
|
||||
Dim nNewId As Integer = EgtExplodeCurveCompo( nCopyId, nCount)
|
||||
For nI As Integer = 0 To nCount - 1
|
||||
Dim nEntId As Integer = nNewId + nI
|
||||
If EgtGetType( nEntId) = GDB_TY.CRV_ARC Then
|
||||
Dim dAngCen As Double : EgtArcAngCenter( nEntId, dAngCen)
|
||||
If ( bOutLoop And dAngCen < 0) Or ( Not bOutLoop And dAngCen > 0) Then bOk = False
|
||||
End If
|
||||
EgtErase( nEntId)
|
||||
Next
|
||||
If Not bOk Then Return False
|
||||
If Not bSideFree Then
|
||||
' Gli archi componenti devono essere lavorati sul lato esterno
|
||||
Dim nCopyId As Integer = EgtCopy(CurrLine, CurrLine, GDB_POS.AFTER)
|
||||
If nCopyId = GDB_ID.NULL Then Return False
|
||||
Dim bOk As Boolean = True
|
||||
Dim nCount As Integer = 0
|
||||
Dim nNewId As Integer = EgtExplodeCurveCompo(nCopyId, nCount)
|
||||
For nI As Integer = 0 To nCount - 1
|
||||
Dim nEntId As Integer = nNewId + nI
|
||||
If EgtGetType(nEntId) = GDB_TY.CRV_ARC Then
|
||||
Dim dAngCen As Double : EgtArcAngCenter(nEntId, dAngCen)
|
||||
If (bOutLoop And dAngCen < 0) Or (Not bOutLoop And dAngCen > 0) Then bOk = False
|
||||
End If
|
||||
EgtErase(nEntId)
|
||||
Next
|
||||
If Not bOk Then Return False
|
||||
End If
|
||||
Case Else
|
||||
Return False
|
||||
End Select
|
||||
|
||||
' Se curva chiusa va bene solo se loop esterno
|
||||
if EgtCurveIsClosed( CurrLine) Then Return bOutLoop
|
||||
If Not bSideFree AndAlso EgtCurveIsClosed(CurrLine) Then Return bOutLoop
|
||||
|
||||
' Delta angolare limite per tangenza
|
||||
Const DELTA_ANG_TG_DEF As Double = 5.0
|
||||
Const DELTA_ANG_TG_DEF As Double = 5.0
|
||||
Dim dDeltaAngTg As Double = GetMainPrivateProfileDouble(S_SIDES, K_DELTA_ANG_TG, DELTA_ANG_TG_DEF)
|
||||
If bSideFree Then dDeltaAngTg = 0
|
||||
' Verifico se curva precedente mi permette di inclinare
|
||||
Dim bLastOk As Boolean = False
|
||||
Select EgtGetType(LastLine)
|
||||
Select Case EgtGetType(LastLine)
|
||||
Case GDB_TY.CRV_LINE, GDB_TY.CRV_ARC, GDB_TY.CRV_COMPO
|
||||
' Ricavo direzione finale linea precedente
|
||||
Dim vtLastEnd As Vector3d
|
||||
@@ -904,16 +1009,16 @@ Public Class SideEntityControlVM
|
||||
Dim vtCurrStart As Vector3d
|
||||
EgtStartVector(CurrLine, vtCurrStart)
|
||||
' Confronto direzioni per vedere se sono tangenti
|
||||
Dim dAngDeg As Double = GetAngle( vtLastEnd, vtCurrStart)
|
||||
Dim dAngDeg As Double = GetAngle(vtLastEnd, vtCurrStart)
|
||||
' verifico se l'angolo è significativo
|
||||
bLastOk = ( dDeltaAngTg < EPS_ANG_SMALL Or dAngDeg > dDeltaAngTg)
|
||||
bLastOk = (dDeltaAngTg < EPS_ANG_SMALL Or dAngDeg > dDeltaAngTg)
|
||||
Case Else
|
||||
EgtOutLog("Error in Compo Outloop: found an entity that is not a line or a arc")
|
||||
End Select
|
||||
|
||||
' Verifico se curva successiva mi permette di inclinare
|
||||
Dim bNextOk As Boolean = False
|
||||
Select EgtGetType(NextLine)
|
||||
Select Case EgtGetType(NextLine)
|
||||
Case GDB_TY.CRV_LINE, GDB_TY.CRV_ARC, GDB_TY.CRV_COMPO
|
||||
' Ricavo direzione finale linea corrente
|
||||
Dim vtCurrEnd As Vector3d
|
||||
@@ -922,15 +1027,15 @@ Public Class SideEntityControlVM
|
||||
Dim vtNextStart As Vector3d
|
||||
EgtStartVector(NextLine, vtNextStart)
|
||||
' Confronto direzioni per vedere se sono tangenti
|
||||
Dim dAngDeg As Double = GetAngle( vtCurrEnd, vtNextStart)
|
||||
Dim dAngDeg As Double = GetAngle(vtCurrEnd, vtNextStart)
|
||||
' verifico se l'angolo è significativo
|
||||
bNextOk = ( dDeltaAngTg < EPS_ANG_SMALL Or dAngDeg > dDeltaAngTg)
|
||||
bNextOk = (dDeltaAngTg < EPS_ANG_SMALL Or dAngDeg > dDeltaAngTg)
|
||||
Case Else
|
||||
EgtOutLog("Error in Compo Outloop: found an entity that is not a line or a arc")
|
||||
End Select
|
||||
|
||||
' Se entrambe me lo permettono restituisco vero
|
||||
Return ( bLastOk And bNextOk)
|
||||
Return (bLastOk And bNextOk)
|
||||
End Function
|
||||
|
||||
Shared Function AdjustAsTrfParSides( PartId As Integer) As Boolean
|
||||
@@ -1034,15 +1139,15 @@ Public Class SideEntityControlVM
|
||||
While EntId <> GDB_ID.NULL
|
||||
Dim NextId As Integer = EgtGetNext( EntId)
|
||||
If NextId = GDB_ID.NULL Then NextId = EgtGetFirstInGroup( LoopId)
|
||||
If VerifyIsSideAnglePossible( PrevId, EntId, NextId, bOutLoop) Then
|
||||
If VerifySideAnglePossible(PrevId, EntId, NextId, bOutLoop) Then
|
||||
Dim colEnt As Color3d
|
||||
If EgtGetColor( EntId, colEnt) Then
|
||||
If EgtGetColor(EntId, colEnt) Then
|
||||
Dim dAng As Double
|
||||
Dim dHeel As Double
|
||||
If CurrCSA.GetSideAngHeel( colEnt, dAng, dHeel) Then
|
||||
EgtSetInfo( EntId, INFO_SIDE_ANGLE, dAng)
|
||||
EgtSetInfo( EntId, INFO_ORIG_SIDE_ANGLE, dAng)
|
||||
EgtSetInfo( EntId, INFO_HEEL, dHeel)
|
||||
If CurrCSA.GetSideAngHeel(colEnt, dAng, dHeel) Then
|
||||
EgtSetInfo(EntId, INFO_SIDE_ANGLE, dAng)
|
||||
EgtSetInfo(EntId, INFO_ORIG_SIDE_ANGLE, dAng)
|
||||
EgtSetInfo(EntId, INFO_HEEL, dHeel)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -1146,6 +1251,8 @@ Friend Class SideAngleEntity
|
||||
|
||||
Friend Shared m_Parameter1 As Double
|
||||
Friend Shared m_Parameter2 As Double
|
||||
Friend Shared m_Parameter2a As Integer
|
||||
Friend Shared m_Parameter2b As Double
|
||||
Friend Shared m_ModifySideAngle As Action(Of String, Double)
|
||||
Friend Shared m_ModifySideHeel As Action(Of String, Double)
|
||||
Friend Shared m_RefreshSideAngleText As Action
|
||||
@@ -1324,7 +1431,59 @@ Friend Class DripEntity
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Friend Class FiloTopEntity
|
||||
Inherits SideEntity
|
||||
|
||||
Friend Shared m_ModifyDrip As Action(Of String, Boolean)
|
||||
Friend Shared m_RefreshSideAngleText As Action
|
||||
|
||||
Private m_bHaveDrip As Boolean
|
||||
Public Property bHaveDrip As Boolean
|
||||
Get
|
||||
Return m_bHaveDrip
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
m_bHaveDrip = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Overrides Property bIsChecked As Boolean
|
||||
Get
|
||||
Return m_bHaveDrip
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
If value <> m_bHaveDrip Then
|
||||
m_bHaveDrip = value
|
||||
' Lo modifico nella geometria e nella lista inclinazioni
|
||||
m_ModifyDrip(sEntityName, m_bHaveDrip)
|
||||
' Aggiorno tutti i testi
|
||||
m_RefreshSideAngleText()
|
||||
NotifyPropertyChanged("bIsChecked")
|
||||
End If
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Sub New(nId As Integer, sEntityName As String, nTextId As Integer, bHaveDrip As Boolean, Mode As SideEntityControlVM.ModeOpt)
|
||||
MyBase.New(nId, sEntityName, nTextId, Mode)
|
||||
m_bHaveDrip = bHaveDrip
|
||||
End Sub
|
||||
|
||||
Friend Shared Function FindEntity(sEntityName As String, EntityList As ObservableCollection(Of SideEntity)) As DripEntity
|
||||
If IsNothing(EntityList) Then
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
For Each Entity In EntityList
|
||||
If Entity.sEntityName = sEntityName Then
|
||||
Return DirectCast(Entity, DripEntity)
|
||||
End If
|
||||
Next
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
Friend Class ColorSideAngs
|
||||
Class CTSA
|
||||
Friend m_bOk As Boolean
|
||||
|
||||
Reference in New Issue
Block a user