OmagCUT :

- aggiunte info nei contorni dei pezzi piatti.
This commit is contained in:
Dario Sassi
2016-01-21 12:04:00 +00:00
parent f5c89ac320
commit c544d00a7b
4 changed files with 49 additions and 52 deletions
+2 -2
View File
@@ -345,9 +345,9 @@ Public Class CurrentProjectPageUC
nMarkId = EgtCreateGroup(GDB_ID.ROOT)
EgtSetName(nMarkId, NAME_PROJMARK)
EgtSetLevel(nMarkId, GDB_LV.SYSTEM)
Dim nReducedCut As Integer = GetPrivateProfileInt(S_MACH_NEST, K_MACH_REDUCEDCUT, 1, m_MainWindow.GetMachIniFile())
EgtSetInfo(nMarkId, INFO_REDUCEDCUT, nReducedCut)
End If
Dim nReducedCut As Integer = GetPrivateProfileInt(S_MACH_NEST, K_MACH_REDUCEDCUT, 1, m_MainWindow.GetMachIniFile())
EgtSetInfo(nMarkId, INFO_REDUCEDCUT, nReducedCut)
Return nMarkId
End Function
+2
View File
@@ -330,6 +330,8 @@ Public Class DrawPageUC
' Muovo la regione in Z per evitare problemi in visualizzazione
Dim nRegId = EgtGetFirstNameInGroup(nId2, NAME_REGION)
EgtMove(nRegId, New Vector3d(0, 0, DELTAZ_REG), GDB_RT.GLOB)
' Aggiusto per lavorazioni
AdjustFlatPart(nId2)
' Inserisco in parcheggio
m_MainWindow.m_CadCutPageUC.m_NestPage.StoreOnePart(nId2, True)
' Se richiesto posizionamento diretto, lo eseguo
+2 -34
View File
@@ -348,40 +348,8 @@ Public Class ImportPageUC
' Ciclo sui pezzi
Dim nPartId As Integer = EgtGetFirstPart()
While nPartId <> GDB_ID.NULL
' Ciclo sui layer
Dim nLayerId As Integer = EgtGetFirstLayer(nPartId)
While nLayerId <> GDB_ID.NULL
' Recupero il layer successivo
Dim nNextLayerId As Integer = EgtGetNextLayer(nLayerId)
' Recupero il nome del layer
Dim sLayName As String = String.Empty
If EgtGetName(nLayerId, sLayName) Then
' Se layer OutLoop o InLoop
If String.Compare(sLayName, NAME_OUTLOOP, True) = 0 Or
String.Compare(sLayName, NAME_INLOOP, True) = 0 Then
' Compatto e poi esplodo le curve composite
Dim nId As Integer = EgtGetFirstInGroup(nLayerId)
While nId <> GDB_ID.NULL
' Recupero successivo
Dim nNextId As Integer = EgtGetNext(nId)
' Compatto
EgtMergeCurvesInCurveCompo(nId, 10 * EPS_SMALL)
' Esplodo curva composita
If EgtGetType(nId) = GDB_TY.CRV_COMPO Then
Dim nCount As Integer
EgtExplodeCurveCompo(nId, nCount)
End If
' Passo all'entità successiva
nId = nNextId
End While
End If
' Se senza nome, lo elimino
Else
EgtErase(nLayerId)
End If
' Passo al layer successivo
nLayerId = nNextLayerId
End While
' Sistemo il pezzo
AdjustFlatPart(nPartId)
' Passo al pezzo successivo
nPartId = EgtGetNextPart(nPartId)
End While
+43 -16
View File
@@ -3,22 +3,7 @@ Imports EgtUILib
Module Utility
Friend Sub HideParkedParts()
Dim nPartId As Integer = EgtGetFirstPart()
While nPartId <> GDB_ID.NULL
EgtSetStatus(nPartId, GDB_ST.OFF)
nPartId = EgtGetNextPart(nPartId)
End While
End Sub
Friend Sub ShowParkedParts()
Dim nPartId As Integer = EgtGetFirstPart()
While nPartId <> GDB_ID.NULL
EgtSetStatus(nPartId, GDB_ST.ON_)
nPartId = EgtGetNextPart(nPartId)
End While
End Sub
'--------------------------------------------------------------------------------------------------
Friend Function DoubleToString(ByVal dVal As Double, ByVal nNumDec As Integer) As String
Dim sFormat As String = "F" + Math.Abs(nNumDec).ToString()
Dim sVal As String = dVal.ToString(sFormat, CultureInfo.InvariantCulture)
@@ -60,7 +45,49 @@ Module Utility
Return sExpr.Replace("*GEO.ONE_INCH", """")
End Function
'--------------------------------------------------------------------------------------------------
Friend Sub HideParkedParts()
Dim nPartId As Integer = EgtGetFirstPart()
While nPartId <> GDB_ID.NULL
EgtSetStatus(nPartId, GDB_ST.OFF)
nPartId = EgtGetNextPart(nPartId)
End While
End Sub
Friend Sub ShowParkedParts()
Dim nPartId As Integer = EgtGetFirstPart()
While nPartId <> GDB_ID.NULL
EgtSetStatus(nPartId, GDB_ST.ON_)
nPartId = EgtGetNextPart(nPartId)
End While
End Sub
Friend Function AdjustFlatPart(nPartId As Integer) As Boolean
' Ciclo sui layer
Dim nLayerId As Integer = EgtGetFirstLayer(nPartId)
While nLayerId <> GDB_ID.NULL
' Recupero il layer successivo
Dim nNextLayerId As Integer = EgtGetNextLayer(nLayerId)
' Recupero il nome del layer
Dim sLayName As String = String.Empty
If EgtGetName(nLayerId, sLayName) Then
' Se layer OutLoop o InLoop
If String.Compare(sLayName, NAME_OUTLOOP, True) = 0 Or
String.Compare(sLayName, NAME_INLOOP, True) = 0 Then
' Sistemo i layer per applicare facilmente le lavorazioni
EgtAdjustFlatPartLayer(nLayerId)
End If
' Se senza nome, lo elimino
Else
EgtErase(nLayerId)
End If
' Passo al layer successivo
nLayerId = nNextLayerId
End While
Return True
End Function
'--------------------------------------------------------------------------------------------------
Public Class Language
Private m_sLanguageName As String