Aggiunto un flag per specificare il tipo di taglio diretto

This commit is contained in:
Nicola Pievani
2025-06-20 10:32:38 +02:00
parent eb1f776ed7
commit a23b18e5cb
2 changed files with 22 additions and 4 deletions
+9 -4
View File
@@ -1,6 +1,7 @@
Imports System.Reflection
Imports EgtUILib
Imports EgtUILib.EgtInterface
Imports OmagCUT.MainWindow
Public Class FlatteningCut
@@ -11,6 +12,8 @@ Public Class FlatteningCut
Private m_bActive As Boolean = False
' Flag di simulazione in corso
Private m_bSimul As Boolean = False
' Definizione del taglio diretto di questa pagina
Private Const FLATTENING As String = "Flattening"
' Origine tavola e dati grezzo
Private m_bRawOk As Boolean = False
@@ -725,7 +728,8 @@ Public Class FlatteningCut
Dim ptStart As Point3d = m_ptTipP1
ptStart.z = 0
Dim nCutId = EgtCreateLinePDL(nLayerId, ptStart, m_dAngO, m_dLen)
EgtSetInfo(nCutId, INFO_DIRECTCUT, 1)
' Inidico che è un taglio Diretto di tipo Flattening
EgtSetInfo(nCutId, INFO_DIRECTCUT, FlagDirectCuts.Flattening)
' Imposto affondamento e angolo di fianco sul taglio
EgtSetInfo(nCutId, INFO_DEPTH, m_dDepth)
If (m_nTool = TOOL.MILL) Then
@@ -844,8 +848,8 @@ Public Class FlatteningCut
End If
End If
End If
CutsList.Add(nCut2Id)
End If
CutsList.Add(nCut2Id)
End If
' ----------------------- CREO SEGMENTI PER CONCATENAMENTO CURVE -----------------------
Next
@@ -876,7 +880,8 @@ Public Class FlatteningCut
Dim ptNear As Point3d
EgtStartPoint(CutsList(0), ptNear)
Dim IdJointCurv As Integer = EgtCreateCurveCompoByChain(nLayerId, CutsList.ToArray, ptNear, True)
EgtSetInfo(IdJointCurv, INFO_DIRECTCUT, 1)
' Inidico che è un taglio Diretto di tipo Flattening
EgtSetInfo(IdJointCurv, INFO_DIRECTCUT, FlagDirectCuts.Flattening)
EgtSetInfo(IdJointCurv, INFO_STEP_TYPE, m_nMachType)
EgtSetInfo(IdJointCurv, INFO_WIDTH, dThick)
' Se unisco il percorso devo per forza usare la fresa!
+13
View File
@@ -149,6 +149,19 @@ Class MainWindow
Options
End Enum
' Elenco delle operazioni tagli diretti (decoficiato in CamAuto per riconoscere il tipo taglio diretto)
Friend Enum FlagDirectCuts
ManualMove = 1
SingleCut = 2
GridCut = 3
SinleDrill = 4
Flattening = 5
Squaring = 6
SawTest = 7
Polishing = 8
CopyTemplate = 9
End Enum
Public Function GetExeRootDir() As String
Return m_sExeRoot
End Function