TestEIn 1.6n2 :
- aggiornamenti.
This commit is contained in:
+162
-9
@@ -99,10 +99,18 @@ Structure Vector3d
|
||||
Function SqLen() As Double
|
||||
Return (x * x + y * y + z * z)
|
||||
End Function
|
||||
' Quadrato della lunghezza nelpiano XY
|
||||
Function SqLenXY() As Double
|
||||
Return (x * x + y * y)
|
||||
End Function
|
||||
' Lunghezza
|
||||
Function Len() As Double
|
||||
Return Math.Sqrt(x * x + y * y + z * z)
|
||||
End Function
|
||||
' Lunghezza nel piano XY
|
||||
Function LenXY() As Double
|
||||
Return Math.Sqrt(x * x + y * y)
|
||||
End Function
|
||||
' Verifica di vettore quasi nullo
|
||||
Function IsSmall() As Boolean
|
||||
Return ((x * x + y * y + z * z) < EPS_SMALL * EPS_SMALL)
|
||||
@@ -261,10 +269,18 @@ Structure Point3d
|
||||
Shared Function SqDist(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d) As Double
|
||||
Return (ptP2 - ptP1).SqLen()
|
||||
End Function
|
||||
' Quadrato della distanza nel piano XY
|
||||
Shared Function SqDistXY(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d) As Double
|
||||
Return (ptP2 - ptP1).SqLenXY()
|
||||
End Function
|
||||
' Distanza
|
||||
Shared Function Dist(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d) As Double
|
||||
Return (ptP2 - ptP1).Len()
|
||||
End Function
|
||||
' Distanza nel piano XY
|
||||
Shared Function DistXY(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d) As Double
|
||||
Return (ptP2 - ptP1).LenXY()
|
||||
End Function
|
||||
' Sono lo stesso punto approssimativamente
|
||||
Shared Function SameApprox(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d) As Boolean
|
||||
Return (ptP2 - ptP1).SqLen() < EPS_SMALL * EPS_SMALL
|
||||
@@ -5391,9 +5407,9 @@ Public Function EgtGetPartClusterCenterGlob(ByVal vId As Integer(), ByVal ptCen
|
||||
Return EgtGetPartClusterCenterGlob_64(vId, vId.Count(), ptCen)
|
||||
End If
|
||||
End Function
|
||||
Public Function EgtGetSelectedPartClusterCenterGlob(ByRef ptCen As Point3d) As Boolean
|
||||
Public Function EgtGetPartPartClusterCenterGlob(ByVal nPartId As Integer, ByRef ptCen As Point3d) As Boolean
|
||||
Dim vId(0) As Integer
|
||||
vId(0) = GDB_ID.SEL
|
||||
vId(0) = nPartId
|
||||
If IntPtr.Size = 4 Then
|
||||
Return EgtGetPartClusterCenterGlob_32(vId, 1, ptCen)
|
||||
Else
|
||||
@@ -5401,6 +5417,34 @@ Public Function EgtGetSelectedPartClusterCenterGlob(ByRef ptCen As Point3d) As B
|
||||
End If
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtVerifyMachining")>
|
||||
Private Function EgtVerifyMachining_32(ByVal nId As Integer, ByRef nResult As Integer) As Boolean
|
||||
End Function
|
||||
<DllImport(EgtIntDll64, CharSet:=CharSet.Unicode, EntryPoint:="EgtVerifyMachining")>
|
||||
Private Function EgtVerifyMachining_64(ByVal nId As Integer, ByRef nResult As Integer) As Boolean
|
||||
End Function
|
||||
Public Function EgtVerifyMachining(ByVal nId As Integer, ByRef nResult As Integer) As Boolean
|
||||
If IntPtr.Size = 4 Then
|
||||
Return EgtVerifyMachining_32(nId, nResult)
|
||||
Else
|
||||
Return EgtVerifyMachining_64(nId, nResult)
|
||||
End If
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtVerifyCutAsSplitting")>
|
||||
Private Function EgtVerifyCutAsSplitting_32(ByVal nId As Integer) As Boolean
|
||||
End Function
|
||||
<DllImport(EgtIntDll64, CharSet:=CharSet.Unicode, EntryPoint:="EgtVerifyCutAsSplitting")>
|
||||
Private Function EgtVerifyCutAsSplitting_64(ByVal nId As Integer) As Boolean
|
||||
End Function
|
||||
Public Function EgtVerifyCutAsSplitting(ByVal nId As Integer) As Boolean
|
||||
If IntPtr.Size = 4 Then
|
||||
Return EgtVerifyCutAsSplitting_32(nId)
|
||||
Else
|
||||
Return EgtVerifyCutAsSplitting_64(nId)
|
||||
End If
|
||||
End Function
|
||||
|
||||
|
||||
'---------- Machinings ---------------------------------------------------------
|
||||
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtInitMachMgr")>
|
||||
@@ -6641,17 +6685,87 @@ Public Function EgtSetCurrMachining(ByVal nId As Integer) As Boolean
|
||||
End If
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtIsMachiningNotEmpty")>
|
||||
Private Function EgtIsMachiningNotEmpty_32() As Boolean
|
||||
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtSetMachiningParamInt")>
|
||||
Private Function EgtSetMachiningParamInt_32(ByVal nType As Integer, ByVal nVal As Integer) As Boolean
|
||||
End Function
|
||||
<DllImport(EgtIntDll64, CharSet:=CharSet.Unicode, EntryPoint:="EgtIsMachiningNotEmpty")>
|
||||
Private Function EgtIsMachiningNotEmpty_64() As Boolean
|
||||
<DllImport(EgtIntDll64, CharSet:=CharSet.Unicode, EntryPoint:="EgtSetMachiningParamInt")>
|
||||
Private Function EgtSetMachiningParamInt_64(ByVal nType As Integer, ByVal nVal As Integer) As Boolean
|
||||
End Function
|
||||
Public Function EgtIsMachiningNotEmpty() As Boolean
|
||||
Public Function EgtSetMachiningParam(ByVal nType As Integer, ByVal nVal As Integer) As Boolean
|
||||
If IntPtr.Size = 4 Then
|
||||
Return EgtIsMachiningNotEmpty_32()
|
||||
Return EgtSetMachiningParamInt_32(nType, nVal)
|
||||
Else
|
||||
Return EgtIsMachiningNotEmpty_64()
|
||||
Return EgtSetMachiningParamInt_64(nType, nVal)
|
||||
End If
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtSetMachiningParamDouble")>
|
||||
Private Function EgtSetMachiningParamDouble_32(ByVal nType As Integer, ByVal dVal As Double) As Boolean
|
||||
End Function
|
||||
<DllImport(EgtIntDll64, CharSet:=CharSet.Unicode, EntryPoint:="EgtSetMachiningParamDouble")>
|
||||
Private Function EgtSetMachiningParamDouble_64(ByVal nType As Integer, ByVal dVal As Double) As Boolean
|
||||
End Function
|
||||
Public Function EgtSetMachiningParam(ByVal nType As Integer, ByVal dVal As Double) As Boolean
|
||||
If IntPtr.Size = 4 Then
|
||||
Return EgtSetMachiningParamDouble_32(nType, dVal)
|
||||
Else
|
||||
Return EgtSetMachiningParamDouble_64(nType, dVal)
|
||||
End If
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtPreviewMachining")>
|
||||
Private Function EgtPreviewMachining_32(ByVal bRecalc As Boolean) As Boolean
|
||||
End Function
|
||||
<DllImport(EgtIntDll64, CharSet:=CharSet.Unicode, EntryPoint:="EgtPreviewMachining")>
|
||||
Private Function EgtPreviewMachining_64(ByVal bRecalc As Boolean) As Boolean
|
||||
End Function
|
||||
Public Function EgtPreviewMachining(ByVal bRecalc As Boolean) As Boolean
|
||||
If IntPtr.Size = 4 Then
|
||||
Return EgtPreviewMachining_32(bRecalc)
|
||||
Else
|
||||
Return EgtPreviewMachining_64(bRecalc)
|
||||
End If
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtGetMachiningParamInt")>
|
||||
Private Function EgtGetMachiningParamInt_32(ByVal nType As Integer, ByRef nVal As Integer) As Boolean
|
||||
End Function
|
||||
<DllImport(EgtIntDll64, CharSet:=CharSet.Unicode, EntryPoint:="EgtGetMachiningParamInt")>
|
||||
Private Function EgtGetMachiningParamInt_64(ByVal nType As Integer, ByRef nVal As Integer) As Boolean
|
||||
End Function
|
||||
Public Function EgtGetMachiningParam(ByVal nType As Integer, ByRef nVal As Integer) As Boolean
|
||||
If IntPtr.Size = 4 Then
|
||||
Return EgtGetMachiningParamInt_32(nType, nVal)
|
||||
Else
|
||||
Return EgtGetMachiningParamInt_64(nType, nVal)
|
||||
End If
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtGetMachiningParamDouble")>
|
||||
Private Function EgtGetMachiningParamDouble_32(ByVal nType As Integer, ByRef dVal As Double) As Boolean
|
||||
End Function
|
||||
<DllImport(EgtIntDll64, CharSet:=CharSet.Unicode, EntryPoint:="EgtGetMachiningParamDouble")>
|
||||
Private Function EgtGetMachiningParamDouble_64(ByVal nType As Integer, ByRef dVal As Double) As Boolean
|
||||
End Function
|
||||
Public Function EgtGetMachiningParam(ByVal nType As Integer, ByRef dVal As Double) As Boolean
|
||||
If IntPtr.Size = 4 Then
|
||||
Return EgtGetMachiningParamDouble_32(nType, dVal)
|
||||
Else
|
||||
Return EgtGetMachiningParamDouble_64(nType, dVal)
|
||||
End If
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtIsMachiningEmpty")>
|
||||
Private Function EgtIsMachiningEmpty_32() As Boolean
|
||||
End Function
|
||||
<DllImport(EgtIntDll64, CharSet:=CharSet.Unicode, EntryPoint:="EgtIsMachiningEmpty")>
|
||||
Private Function EgtIsMachiningEmpty_64() As Boolean
|
||||
End Function
|
||||
Public Function EgtIsMachiningEmpty() As Boolean
|
||||
If IntPtr.Size = 4 Then
|
||||
Return EgtIsMachiningEmpty_32()
|
||||
Else
|
||||
Return EgtIsMachiningEmpty_64()
|
||||
End If
|
||||
End Function
|
||||
|
||||
@@ -8447,6 +8561,13 @@ Public Enum FPC_TYPE As Integer
|
||||
LAYER = 2
|
||||
CLOSEDCURVE = 3
|
||||
End Enum
|
||||
' Costanti : tipo interferenza lavorazioni piane con pezzi
|
||||
Public Enum FMI_TYPE As Integer
|
||||
NONE = 0
|
||||
LI = 1
|
||||
RM = 2
|
||||
LO = 4
|
||||
End Enum
|
||||
'Costanti : posizione di inserimento grezzo su corner
|
||||
Public Enum MCH_CR As Integer
|
||||
TL = 1
|
||||
@@ -8591,6 +8712,38 @@ Public Enum MCH_MP As Integer
|
||||
OVERLAP_STR = 32775
|
||||
OFFSET_STR = 32776
|
||||
End Enum
|
||||
'Costanti : lato di lavoro per il taglio
|
||||
Public Enum MCH_SAW_WS As Integer
|
||||
CENTER = 0
|
||||
LEFT = 1
|
||||
RIGHT = 2
|
||||
End Enum
|
||||
'Costanti : lato di posizionamento della testa per il taglio
|
||||
Public Enum MCH_SAW_HS As Integer
|
||||
LEFT = 1
|
||||
RIGHT = 2
|
||||
End Enum
|
||||
'Costanti : tipi di attacco per il taglio
|
||||
Public Enum MCH_SAW_LI As Integer
|
||||
CENT = 0
|
||||
STRICT = 1
|
||||
OUT = 2
|
||||
EXT_CENT = 3
|
||||
EXT_OUT = 4
|
||||
End Enum
|
||||
'Costanti : tipi di link esterni per il taglio
|
||||
Public Enum MCH_SAW_EL As Integer
|
||||
CENT = 0
|
||||
EXT_PREV = 1
|
||||
EXT_NEXT = 2
|
||||
EXT_BOTH = 3
|
||||
End Enum
|
||||
'Costanti : tipi di uscite per il taglio
|
||||
Public Enum MCH_SAW_LO As Integer
|
||||
CENT = 0
|
||||
STRICT = 1
|
||||
EXT = 2
|
||||
End Enum
|
||||
'Costanti : stato movimento di simulazione
|
||||
Public Enum MCH_SIM As Integer
|
||||
OK = 0
|
||||
|
||||
+10
-1
@@ -1,6 +1,7 @@
|
||||
Imports System.Runtime.InteropServices
|
||||
Imports System.Text
|
||||
Imports TestEIn.EgtInterface
|
||||
Imports System.Globalization
|
||||
|
||||
Public Module GenInterface
|
||||
|
||||
@@ -20,7 +21,15 @@ Public Function GetPrivateProfileDouble(
|
||||
ByVal lpFileName As String) As Double
|
||||
Dim sValue As String = String.Empty
|
||||
GetPrivateProfileString(lpAppName, lpKeyName, dDefault.ToString(), sValue, lpFileName)
|
||||
Return Double.Parse(sValue, System.Globalization.CultureInfo.InvariantCulture)
|
||||
Dim nPos As Integer = sValue.IndexOf(";")
|
||||
If nPos >= 0 Then
|
||||
sValue = sValue.Remove(nPos)
|
||||
End If
|
||||
Dim dValue As Double
|
||||
If Not Double.TryParse(sValue, NumberStyles.Float, System.Globalization.CultureInfo.InvariantCulture, dValue) Then
|
||||
dValue = dDefault
|
||||
End If
|
||||
Return dValue
|
||||
End Function
|
||||
|
||||
<DllImport("kernel32.dll", CharSet:=CharSet.Unicode)>
|
||||
|
||||
@@ -46,5 +46,5 @@ Imports System.Runtime.InteropServices
|
||||
' utilizzando l'asterisco (*) come descritto di seguito:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.6.12.9")>
|
||||
<Assembly: AssemblyFileVersion("1.6.12.9")>
|
||||
<Assembly: AssemblyVersion("1.6.14.2")>
|
||||
<Assembly: AssemblyFileVersion("1.6.14.2")>
|
||||
|
||||
Reference in New Issue
Block a user