Compare commits

..

9 Commits

Author SHA1 Message Date
NicolaP 614756e1bb Correzione gestione rotazione ventose. 2022-02-17 09:57:34 +01:00
NicolaP 007ad8439c Aggiornamento versione 2.4a3 2022-01-24 19:35:21 +01:00
NicolaP 1ffca8b52c Correzione gestiione VeinMatch per assemblato 3D 2022-01-24 19:34:55 +01:00
NicolaP c96251ba99 Nuova gestione SpliAuto, abilitato alzatine e frontalini 2022-01-24 12:18:34 +01:00
NicolaP 19e347412c Modifica visualizzazione comandi "DB WAterJet" 2022-01-24 12:08:07 +01:00
NicolaP 8ff06da714 Coorezione visualizzazione parametri InclinaLati 2022-01-24 12:05:08 +01:00
DarioS a18408724c OmagOFFICE :
- piccole correzioni.
2022-01-24 09:11:49 +01:00
NicolaP 701f1f2b87 Correzione gestione Quality nel file CamAuto, eliminato la qualità "" 2022-01-20 19:27:27 +01:00
NicolaP 2bb53b0b06 Merge commit 'f456c168274c47995a47f4cc3fc414137f27dac6' 2022-01-19 16:21:50 +01:00
14 changed files with 115 additions and 45 deletions
@@ -67,8 +67,8 @@ Public Class CompoParamPageVM
Private m_AlzAndFront_Visibility As Visibility
Public Property AlzAndFront_Visibility As Visibility
Get
' !!!! Temporaneamente in attesa di completamento Frontalini e alzatine !!!!
Return Visibility.Collapsed
'' !!!! Temporaneamente in attesa di completamento Frontalini e alzatine !!!!
'Return Visibility.Collapsed
Return m_AlzAndFront_Visibility
End Get
Set(value As Visibility)
+3
View File
@@ -122,6 +122,9 @@ Module ConstIni
Public Const K_AUTOMATICOPTIMIZE As String = "AutomaticOptimize"
Public Const K_AUTOMATICMAXTIME As String = "AutomaticMaxTime"
Public Const S_SPLIT As String = "Split"
Public Const K_MOVE_LEV As String = "MoveLevel"
Public Const S_CSV As String = "Csv"
Public Const K_CSVDIRECT As String = "Direct"
Public Const K_MAXDIMONX As String = "MaxDimOnX"
+3 -2
View File
@@ -659,7 +659,7 @@ Public Class CurrMachWindowVM
Dim MachiningMaterials() = SysNotes.Split(";".ToCharArray)
If CurrentMachine.bWaterJet And CurrentMachine.bFromDBWaterJet Then
For Each Material As Object In MachiningMaterials
For Each Material As String In MachiningMaterials
Dim Param() As String = Material.Split(",".ToCharArray)
If Param.Count() < 2 Then Continue For
Dim CurrMatId As String = String.Empty
@@ -672,7 +672,8 @@ Public Class CurrMachWindowVM
End If
Next
Dim SubParam() As String = Param(0).Split(".".ToCharArray)
If SubParam(0) = CurrentMachine.CurrMat.nId.ToString() AndAlso SubParam.Count > 1 AndAlso SubParam(1) = CurrentMachine.CurrMat.SubId.ToString() Then
If Not IsNothing( CurrentMachine.CurrMat) AndAlso SubParam(0) = CurrentMachine.CurrMat.nId.ToString() AndAlso
SubParam.Count > 1 AndAlso SubParam(1) = CurrentMachine.CurrMat.SubId.ToString() Then
Dim MatMinH As Double = 0
StringToDouble(Param(1), MatMinH)
Dim MatMaxH As Double = 0
+4
View File
@@ -717,10 +717,12 @@ Friend Module CamAuto
Private Function SetLuaStandardCamParams(Optional bDripOk As Boolean = True) As Boolean
Dim sMaterial As String = CurrentMachine.CurrMat.sName
Dim sSawMch As String = CurrentMachine.sCurrSawing
Dim sMillMch As String = CurrentMachine.sCurrMilling
Dim sDrillMch As String = CurrentMachine.sCurrDrilling
Dim sWaterJetMch As String = CurrentMachine.sCurrWaterJetting
Dim sWaterJetQual As String = CurrentMachine.sCurrWaterJettingQuality
Dim sDripSawMch As String = If(bDripOk, CurrentMachine.sCurrDripSawing, "")
Dim sDripDrillMch As String = If(bDripOk, CurrentMachine.sCurrDripDrilling, "")
Dim dReducedDepth As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_REDUCEDDEPTH, 1, CurrentMachine.sMachIniFile)
@@ -732,10 +734,12 @@ Friend Module CamAuto
Dim bMillingOnCorners As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_CORNERS, 1, CurrentMachine.sMachIniFile) <> 0)
Dim bMillingOnSinks As Boolean = (GetPrivateProfileInt(S_MACH_NEST, K_MACH_MILLING_ON_SINKS, 0, CurrentMachine.sMachIniFile) <> 0)
Dim dMillingShort As Double = GetPrivateProfileDouble(S_MACH_NEST, K_MACH_MILLING_SHORTENING, 0, CurrentMachine.sMachIniFile)
EgtLuaSetGlobStringVar("CAM.MATERIAL", sMaterial)
EgtLuaSetGlobStringVar("CAM.SAWMCH", sSawMch)
EgtLuaSetGlobStringVar("CAM.MILLMCH", sMillMch)
EgtLuaSetGlobStringVar("CAM.DRILLMCH", sDrillMch)
EgtLuaSetGlobStringVar("CAM.WATERJETMCH", sWaterJetMch)
EgtLuaSetGlobStringVar("CAM.WATERJETQLTY", sWaterJetQual)
EgtLuaSetGlobStringVar("CAM.DRIPSAWMCH", sDripSawMch)
EgtLuaSetGlobStringVar("CAM.DRIPDRILLMCH", sDripDrillMch)
EgtLuaSetGlobNumVar("CAM.REDUCEDDEPTH", dReducedDepth)
+2
View File
@@ -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
-1
View File
@@ -1424,7 +1424,6 @@ Friend Property sCurrMillNoTip As String
Dim sFilePath As String = sMachDir & EgtWPFLib5.WaterjetDbWindowVM.WATERJETDB_PATH
WjMaterialList = EgtWPFLib5.WaterjetDbWindowVM.LoadWjMaterials(sFilePath)
' definisco la lista delle qualità
m_Qualities.Add("")
m_Qualities.Add("Q1")
m_Qualities.Add("Q2")
m_Qualities.Add("Q3")
+2
View File
@@ -77,6 +77,8 @@ Module EstCalc
End Function
Public Function UpdateRawPart() As Boolean
' Passo al contesto principale
EgtSetCurrentContext(OmagOFFICEMap.refSceneHostVM.MainScene.GetCtx())
' determino il grezzo (è il primo con fase 1)
m_nRawId = CamAuto.GetCurrentRaw()
If Not EgtGetRawPartBBox(m_nRawId, m_b3Raw) Then
+32 -12
View File
@@ -747,35 +747,55 @@ Public Module SplitAuto
End Function
Private Function SafeMoveRawPart(nRawId As Integer, ByRef vtMove As Vector3d, dMindist As Double) As Boolean
' Spostamento originale
Dim vtOriMove As New Vector3d(vtMove)
' Livello di movimento
Dim nMoveLevel As Integer = GetPrivateProfileInt(S_SPLIT, K_MOVE_LEV, 5, IniFile.m_sIniFile)
Dim nMove As Integer = 1
' Se esce dalla tavola, movimento già annullato ed esco con errore
If Not EgtMoveRawPart(nRawId, vtMove) Then Return False
If Not EgtMoveRawPart(nRawId, vtOriMove) Then Return False
' Se interferisce con altri grezzi, annullo movimento ed esco con errore
If Not VerifyRawWithOtherRaws(nRawId, dMindist) Then
EgtMoveRawPart(nRawId, -vtMove)
EgtMoveRawPart(nRawId, -vtOriMove)
Return False
End If
If nMoveLevel < 2 Then Return True
' Provo ad aggiungere un altro movimento
If EgtMoveRawPart(nRawId, vtMove) Then
If EgtMoveRawPart(nRawId, vtOriMove) Then
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
vtMove += vtMove
vtMove += vtOriMove
nMove += 1
If nMoveLevel = nMove Then Return True
Else
EgtMoveRawPart(nRawId, -vtMove)
EgtMoveRawPart(nRawId, -vtOriMove)
End If
End If
' Provo ad aggiungere un altro movimento
If EgtMoveRawPart(nRawId, vtOriMove) Then
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
vtMove += vtOriMove
nMove += 1
If nMoveLevel = nMove Then Return True
Else
EgtMoveRawPart(nRawId, -vtOriMove)
End If
End If
' Provo ad aggiungere un movimento dimezzato
If EgtMoveRawPart(nRawId, 0.5 * vtMove) Then
If EgtMoveRawPart(nRawId, 0.5 * vtOriMove) Then
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
vtMove += 0.5 * vtMove
vtMove += 0.5 * vtOriMove
nMove += 1
If nMoveLevel = nMove Then Return True
Else
EgtMoveRawPart(nRawId, -0.5 * vtMove)
EgtMoveRawPart(nRawId, -0.5 * vtOriMove)
End If
End If
' Provo ad aggiunger un movimento 1/4
If EgtMoveRawPart(nRawId, 0.25 * vtMove) Then
' Provo ad aggiungere un movimento 1/4
If EgtMoveRawPart(nRawId, 0.25 * vtOriMove) Then
If VerifyRawWithOtherRaws(nRawId, dMindist) Then
vtMove += 0.25 * vtMove
vtMove += 0.25 * vtOriMove
Else
EgtMoveRawPart(nRawId, -0.25 * vtMove)
EgtMoveRawPart(nRawId, -0.25 * vtOriMove)
End If
End If
Return True
+19 -5
View File
@@ -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
+36 -13
View File
@@ -317,6 +317,7 @@ Public Class VeinMatchingWindow
MessageBox.Show(Me, EgtMsg(91607) & " " & sMachGrpName, EgtMsg(91122), MessageBoxButton.OK, MessageBoxImage.Exclamation)
End If
End If
End If
EgtSetCurrentContext(VeinMatchingScene.GetCtx())
' Se selezione riuscita, la eseguo anche in VME
@@ -1309,6 +1310,9 @@ Friend Module VeinMatching
End Function
Friend Function LinkReferencesOnAlette() As Boolean
Dim x As Integer = EgtGetCurrentContext()
' forzo il DB geometrico corrente
EgtSetCurrentContext(m_nVeinCtx)
Dim nId As Integer = EgtGetFirstPart()
While nId <> GDB_ID.NULL
' escludo dalla ricerca le alette
@@ -1344,6 +1348,7 @@ Friend Module VeinMatching
End Function
Friend Function AssemblyParts(ByVal ThicknessRaw As Double) As Boolean
Dim CurrContext As Integer = EgtGetCurrentContext()
' per definizione un piano cucicina deve avere lo stesso spessore delle alette
'(abbiamo dato per scontato che le alette siano realizate sullo stesso grezzo del pinao cucina...)
CreateListAlzAndFront()
@@ -1374,7 +1379,7 @@ Friend Module VeinMatching
Dim nInfo3D As Integer = 0
EgtGetInfo(Item.SideId, "Info3D", nInfo3D)
If nInfo3D <> 1 Then
EgtSetInfo(Item.SideId, "Info3D", 1)
' EgtSetInfo(Item.SideId, "Info3D", 1)
' creo il solido
If Not CreateAlettaSolid(Item, ThicknessRaw) Then Return False
'' posiziono il solido
@@ -1382,6 +1387,8 @@ Friend Module VeinMatching
End If
' posiziono il solido
If Not MoveAlettaSolid(Item, ThicknessRaw) Then Return False
' solo se arrivo fino a qui allora imposto l'info
EgtSetInfo(Item.SideId, "Info3D", 1)
Next
Draw()
Return True
@@ -1441,12 +1448,12 @@ Friend Module VeinMatching
nIdx = newId
End While
Dim nOutloopGrpOrig As Integer = EgtGetFirstNameInGroup(nId, NAME_OUTLOOP & ".orig")
If nOutloopGrpOrig <> GDB_ID.NULL Then
EgtSetStatus(nOutloopGrpOrig, 1)
Dim nOutloopGrp As Integer = EgtGetFirstNameInGroup(nId, NAME_OUTLOOP)
EgtSetStatus(nOutloopGrp, 0)
End If
'Dim nOutloopGrpOrig As Integer = EgtGetFirstNameInGroup(nId, NAME_OUTLOOP & ".orig")
'If nOutloopGrpOrig <> GDB_ID.NULL Then
' EgtSetStatus(nOutloopGrpOrig, 1)
' Dim nOutloopGrp As Integer = EgtGetFirstNameInGroup(nId, NAME_OUTLOOP)
' EgtSetStatus(nOutloopGrp, 0)
'End If
Return True
@@ -1496,6 +1503,16 @@ Friend Module VeinMatching
EgtInvertSurface(nBottomStm)
nSolidStm = EgtCreateSurfTmBySewing(nSolidGrp, 3, {nTopStm, nBottomStm, nLateralStm}, True)
' elimino il layer generato dalla funzione "EgtCalcFlatPartDownRegion" e rinomino quello acceso
Dim nOutLoopOrig As Integer = EgtGetFirstNameInGroup(nPartId, NAME_OUTLOOP & ".orig")
If nOutLoopOrig <> GDB_ID.NULL Then
Dim nCurrOutLoop As Integer = EgtGetFirstNameInGroup(nPartId, NAME_OUTLOOP)
EgtErase(nCurrOutLoop)
EgtSetName(nOutLoopOrig, NAME_OUTLOOP)
EgtSetStatus(nOutLoopOrig, GDB_ST.ON_)
End If
Return nSolidStm <> GDB_ID.NULL
End Function
@@ -1697,12 +1714,18 @@ Friend Module VeinMatching
If Not EgtEndPoint(Item.IdSideRef, GDB_ID.ROOT, ptERef) Then Return False
If Not EgtEndPoint(Item.SideId, GDB_ID.ROOT, ptE) Then Return False
' ruoto il solido intorno al lato di riferimento
Dim vtRot As Vector3d = ptERef - ptSRef
If nType = 1 Then
EgtRotate(Item.PartId, ptE, vtRot, -90, GDB_RT.GLOB)
ElseIf nType = 2 Then
EgtRotate(Item.PartId, ptE, vtRot, 90, GDB_RT.GLOB)
' verifco che sia già stato ruotato
Dim nInfo3D As Integer = 0
EgtGetInfo(Item.SideId, "Info3D", nInfo3D)
If nInfo3D <> 1 Then
' ruoto il solido intorno al lato di riferimento
Dim vtRot As Vector3d = ptERef - ptSRef
If nType = 1 Then
EgtRotate(Item.PartId, ptE, vtRot, -90, GDB_RT.GLOB)
ElseIf nType = 2 Then
EgtRotate(Item.PartId, ptE, vtRot, 90, GDB_RT.GLOB)
End If
End If
' punto di riferimento per la traslazione sul solido
+6 -5
View File
@@ -13,16 +13,17 @@
Height="20" Width="150"/>-->
<Button Command="{Binding ToolDbCommand}" ToolTip="{Binding ToolDBToolTip}"
Style="{StaticResource ToolBar_TextButton}" Width="55" Content="{Binding ToolDBMsg}"/>
Style="{StaticResource ToolBar_TextButton}" Width="70" Content="{Binding ToolDBMsg}"/>
<Button Command="{Binding MachDbCommand}" ToolTip="{Binding MachiningDbToolTip}"
Style="{StaticResource ToolBar_TextButton}" Width="55" Content="{Binding MachiningDbMsg}"/>
Style="{StaticResource ToolBar_TextButton}" Width="70" Content="{Binding MachiningDbMsg}"/>
<Button Command="{Binding SetUpCommand}" ToolTip="{Binding SetUpToolTip}"
Style="{StaticResource ToolBar_TextButton}" Width="55" Content="{Binding SetUpMsg}"
Style="{StaticResource ToolBar_TextButton}" Width="70" Content="{Binding SetUpMsg}"
Background="{Binding SetUp_Background}"/>
<Button Command="{Binding WaterjetDbCommand}" ToolTip="{Binding WaterjetDbToolTip}"
Style="{StaticResource ToolBar_Button}" Width="70" Content="{Binding WaterjetDbMsg}" Visibility="{Binding WjDb_Visibility}"/>
<Button Command="{Binding MachOptionsCommand}" ToolTip="{Binding OptionsToolTip}">
<Image Source="/Resources/TopCommandBar/Options.png" Height="22" />
</Button>
<Button Command="{Binding WaterjetDbCommand}" ToolTip="{Binding WaterjetDbToolTip}"
Style="{StaticResource ToolBar_Button}" Content="{Binding WaterjetDbMsg}" Visibility="{Binding WjDb_Visibility}"/>
</EgtFloating:EgtFloatingPanel>
+1 -1
View File
@@ -47,7 +47,7 @@ Public Class MyMachinePanelVM
End Property
Public ReadOnly Property WaterjetDbMsg As String
Get
Return "WJ" 'EgtMsg(MSG_MACHINEPAGEUC + 7)
Return "DB WaterJet" 'EgtMsg(MSG_MACHINEPAGEUC + 7)
End Get
End Property
+4 -4
View File
@@ -28,9 +28,9 @@ Imports System.Windows
<Assembly: AssemblyDescription("OmagOFFICE 32 bit")>
#End If
#End If
<Assembly: AssemblyCompany("EgalTech s.r.l.")>
<Assembly: AssemblyCompany("Egalware s.r.l.")>
<Assembly: AssemblyProduct("OmagOFFICE")>
<Assembly: AssemblyCopyright("Copyright © 2017-2021 by EgalTech s.r.l.")>
<Assembly: AssemblyCopyright("Copyright © 2017-2022 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.1.2")>
<Assembly: AssemblyFileVersion("2.4.1.2")>
<Assembly: AssemblyVersion("2.4.1.3")>
<Assembly: AssemblyFileVersion("2.4.1.3")>
+1
View File
@@ -469,6 +469,7 @@ Public Class SideEntityControlVM
Parameter23_Visibility = Windows.Visibility.Hidden
Parameter2_Visibility = Visibility.Visible
Parameter2ab_Visibility = Visibility.Hidden
Parameter4_Visibility = Visibility.Hidden
ElseIf m_Mode = ModeOpt.FILOTOP Then
Parameter23_Visibility = Windows.Visibility.Hidden
Parameter2_Visibility = Visibility.Visible