Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d0646eb922 | |||
| 83f37dc628 | |||
| 568d7c109d | |||
| 1c36907b47 | |||
| d2e45a937e | |||
| 13f9fc9bd2 | |||
| 614756e1bb |
@@ -121,7 +121,7 @@ Module ConstIni
|
||||
Public Const K_TEXTCOLOR As String = "TextColor"
|
||||
Public Const K_AUTOMATICOPTIMIZE As String = "AutomaticOptimize"
|
||||
Public Const K_AUTOMATICMAXTIME As String = "AutomaticMaxTime"
|
||||
Public Const K_DRAGRETTANGLE As String = "DragRettangle"
|
||||
Public Const K_DRAGRETTANGLE As String = "DragRectangle"
|
||||
|
||||
Public Const S_SPLIT As String = "Split"
|
||||
Public Const K_MOVE_LEV As String = "MoveLevel"
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
<!--Quality-->
|
||||
<ComboBox ItemsSource="{Binding CurrWaterjettingQualityList}"
|
||||
SelectedItem="{Binding SelCurrWaterjettingQuality}"
|
||||
Visibility="{Binding CurrWaterjettingQuality_Visibility}"
|
||||
Visibility="{Binding CurrWaterjetting_Visibility}"
|
||||
Margin="5,0,0,5"
|
||||
Grid.Column="1">
|
||||
</ComboBox>
|
||||
|
||||
@@ -290,7 +290,7 @@ Public Class CurrMachWindowVM
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private m_CurrWaterjetting_Visibility As Visibility
|
||||
Private m_CurrWaterjetting_Visibility As Visibility = Visibility.Collapsed
|
||||
Public Property CurrWaterjetting_Visibility As Visibility
|
||||
Get
|
||||
Return m_CurrWaterjetting_Visibility
|
||||
|
||||
@@ -33,6 +33,8 @@ Module ConstMach
|
||||
Public Const KEY_VACLAY_SEL As String = "Sel"
|
||||
' Info in gruppo layout per angolo di rotazione preferito
|
||||
Public Const KEY_VACLAY_PREFROT As String = "PreferredRot"
|
||||
Public Const KEY_VACLAY_PREFVROTXMINUS As String = "PrefVertRotXMinus"
|
||||
Public Const KEY_VACLAY_PREFVROTXPLUS As String = "PrefVertRotXPlus"
|
||||
' Info in gruppo layout per direzione di riferimento ventose per tagli da sotto
|
||||
Public Const KEY_VACLAY_DRIPREFDIR As String = "DripRefDir"
|
||||
' Info in asse rotante ventosa per step discreti
|
||||
|
||||
@@ -8,6 +8,8 @@ Module VacuumCups
|
||||
Private m_nVacId As Integer = GDB_ID.NULL
|
||||
Private m_nRefId As Integer = GDB_ID.NULL
|
||||
Private m_dPreferredRot As Double = 0
|
||||
Private m_dPrefVertRotXMinus As Double = 0
|
||||
Private m_dPrefVertRotXPlus As Double = 0
|
||||
Private m_dDripRefAng As Double = 0
|
||||
|
||||
' Nome del gruppo temporaneo per le ventose
|
||||
@@ -73,7 +75,10 @@ Module VacuumCups
|
||||
m_nVacId = EgtCopyGlob(nLayId, m_nTempId)
|
||||
If m_nVacId = GDB_ID.NULL Then Return False
|
||||
' Angolo di rotazione preferito
|
||||
EgtGetInfo( m_nVacId, KEY_VACLAY_PREFROT, m_dPreferredRot)
|
||||
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFROT, m_dPreferredRot)
|
||||
' Angoli di rotazione preferiti per ventosa in verticale (lungo Y) a sinistra e a destra del centro tavola
|
||||
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTXMINUS, m_dPrefVertRotXMinus)
|
||||
EgtGetInfo(m_nVacId, KEY_VACLAY_PREFVROTXPLUS, m_dPrefVertRotXPlus)
|
||||
' Direzione di riferimento per tagli Drip
|
||||
EgtGetInfo( m_nVacId, KEY_VACLAY_DRIPREFDIR, m_dDripRefAng)
|
||||
' Nascondo il gruppo ma rendo visibili le curve di contorno delle ventose
|
||||
@@ -363,6 +368,9 @@ Module VacuumCups
|
||||
If b3Vac.IsEmpty() Then Return INFINITO
|
||||
' Se box maggiore di quello del pezzo, scarto soluzione
|
||||
If b3Vac.Radius() > b3Raw.Radius() Then Return INFINITO
|
||||
' Recupero l'area della tavola
|
||||
Dim b3Tab As New BBox3d
|
||||
EgtGetTableArea(1, b3Tab)
|
||||
' Determino il movimento
|
||||
vtMove = ptRawCen - b3Vac.Center()
|
||||
b3Vac.Move(vtMove)
|
||||
@@ -374,11 +382,19 @@ Module VacuumCups
|
||||
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 Math.Abs(dRotAngDeg - 90) < 45 Or Math.Abs(dRotAngDeg - 270) < 45 Then
|
||||
If frMinRect.Orig().x < b3Tab.Center().x Then
|
||||
dPreferredRot = m_dPrefVertRotXMinus
|
||||
Else
|
||||
dPreferredRot = m_dPrefVertRotXPlus
|
||||
End If
|
||||
End If
|
||||
Dim dAngDelta As Double = If( Math.Abs( b3Vac.DimY() - b3Vac.DimX()) < 10 * EPS_SMALL, 90, 180)
|
||||
While dRotAngDeg - m_dPreferredRot >= dAngDelta / 2
|
||||
While dRotAngDeg - dPreferredRot >= dAngDelta / 2
|
||||
dRotAngDeg -= dAngDelta
|
||||
End While
|
||||
While dRotAngDeg - m_dPreferredRot <= -dAngDelta / 2
|
||||
While dRotAngDeg - dPreferredRot <= -dAngDelta / 2
|
||||
dRotAngDeg += dAngDelta
|
||||
End While
|
||||
Else
|
||||
@@ -431,8 +447,6 @@ Module VacuumCups
|
||||
ptRef.Move(vtMove)
|
||||
ptRef.Rotate(ptRotCen, Vector3d.Z_AX(), dRotAngDeg)
|
||||
' Ne calcolo la distanza dal centro della tavola
|
||||
Dim b3Tab As New BBox3d
|
||||
EgtGetTableArea(1, b3Tab)
|
||||
Dim dDist As Double = Point3d.DistXY(ptRef, b3Tab.Center())
|
||||
Return dDist
|
||||
End Function
|
||||
|
||||
@@ -195,8 +195,8 @@ Public Class MainWindowM
|
||||
' Verifico abilitazione nesting automatico
|
||||
m_bAutoNestOption = Not String.IsNullOrWhiteSpace( sNestKey)
|
||||
' Recupero livello e opzioni della chiave
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2401, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2401, 1, m_nKeyOptions)
|
||||
Dim bKey As Boolean = EgtGetKeyLevel(9423, 2402, 1, m_nKeyLevel) And
|
||||
EgtGetKeyOptions(9423, 2402, 1, m_nKeyOptions)
|
||||
' Verifico abilitazione prodotto
|
||||
Dim bProd As Boolean = GetKeyOption(KEY_OPT.OFFICE_BASE)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
|
||||
@@ -69,6 +69,6 @@ Imports System.Windows
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("2.4.1.3")>
|
||||
<Assembly: AssemblyFileVersion("2.4.1.3")>
|
||||
<Assembly: AssemblyVersion("2.4.2.3")>
|
||||
<Assembly: AssemblyFileVersion("2.4.2.3")>
|
||||
|
||||
|
||||
@@ -115,8 +115,7 @@ Public Class NestingTabVM
|
||||
End Get
|
||||
Set(value As String)
|
||||
Dim dValue As Double
|
||||
'StringToDouble(value, m_dRotationAngle)
|
||||
If StringToLen(value, dValue) Then
|
||||
If StringToDouble(value, dValue) Then
|
||||
If dValue < 0 Then
|
||||
dValue = 0
|
||||
ElseIf dValue > 180 Then
|
||||
@@ -175,7 +174,7 @@ Public Class NestingTabVM
|
||||
|
||||
Public ReadOnly Property DragRettangleMsg As String
|
||||
Get
|
||||
Return "Drag Rettangle"
|
||||
Return "Drag Rectangle"
|
||||
End Get
|
||||
End Property
|
||||
|
||||
@@ -759,25 +758,29 @@ Public Class NestingTabVM
|
||||
Dim ptCen As Point3d
|
||||
EgtCenterPoint(m_nIdSelectedTextRettangle, ptCen)
|
||||
EgtModifyText(m_nIdSelectedTextRettangle, m_sTextContent & LenToString(MaxLen + dProjection, 2) & " x " & LenToString(MinLen, 2))
|
||||
EgtMove(m_nIdSelectedTextRettangle, vtMove * 0.5)
|
||||
EgtMove(m_nIdSelectedTextRettangle, vtMove * 0.5, GDB_ID.ROOT)
|
||||
If m_nIdSelectedTextTopRettangle <> GDB_ID.NULL Then
|
||||
EgtMove(m_nIdSelectedTextTopRettangle, vtMove * 0.5)
|
||||
EgtMove(m_nIdSelectedTextTopRettangle, vtMove * 0.5, GDB_ID.ROOT)
|
||||
End If
|
||||
End If
|
||||
|
||||
' verifico che il il lato maggiore rimanga semore il lato maggiore
|
||||
Dim bRettangleCorrect As Boolean = False
|
||||
If (MaxLen + dProjection - MinLen) > EPS_SMALL Then bRettangleCorrect = True
|
||||
|
||||
Dim nWarn As Integer = 0
|
||||
ResetAllMachinings(nWarn)
|
||||
EnableReferenceRegion(False)
|
||||
' se la modifica genera un errore allora ripristino la figura prima della defomrazione
|
||||
If Not EgtVerifyPart(EgtGetParent(m_nIdSelectedOutLoopRettangle), True) Then
|
||||
If Not EgtVerifyPart(EgtGetParent(m_nIdSelectedOutLoopRettangle), True) Or Not bRettangleCorrect Then
|
||||
EgtScale(m_nIdSelectedOutLoopRettangle, frFixed, 1 / dScalefactor, 1, 1, GDB_ID.ROOT)
|
||||
EgtScale(m_nIdSelectedFlatSurfRettangle, frFixed, 1 / dScalefactor, 1, 1, GDB_ID.ROOT)
|
||||
Dim ptCen As Point3d
|
||||
EgtCenterPoint(m_nIdSelectedTextRettangle, ptCen)
|
||||
EgtModifyText(m_nIdSelectedTextRettangle, m_sTextContent & LenToString(MaxLen, 2) & " x " & LenToString(MinLen, 2))
|
||||
EgtMove(m_nIdSelectedTextRettangle, -vtMove * 0.5)
|
||||
EgtMove(m_nIdSelectedTextRettangle, -vtMove * 0.5, GDB_ID.ROOT)
|
||||
If m_nIdSelectedTextTopRettangle <> GDB_ID.NULL Then
|
||||
EgtMove(m_nIdSelectedTextTopRettangle, -vtMove * 0.5)
|
||||
EgtMove(m_nIdSelectedTextTopRettangle, -vtMove * 0.5, GDB_ID.ROOT)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
@@ -1678,8 +1678,11 @@ Public Class RawPartTabVM
|
||||
End Sub
|
||||
|
||||
Private Sub AdjustRawPartOnExit()
|
||||
' Se non c'è il grezzo, esco
|
||||
If EstCalc.GetRawId() = GDB_ID.NULL Then Return
|
||||
' Se non c'è il grezzo, esco dopo aver nascosto eventuale foto
|
||||
If EstCalc.GetRawId() = GDB_ID.NULL Then
|
||||
ShowPhoto(False)
|
||||
Return
|
||||
End If
|
||||
' Disabilito impostazione modificato
|
||||
Dim bOldEnMod = EgtGetEnableModified()
|
||||
If bOldEnMod Then EgtDisableModified()
|
||||
|
||||
Reference in New Issue
Block a user