From 2e31cae5dcf2831fbe41e69ec0f33667f208c43a Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Sat, 19 Sep 2015 08:31:31 +0000 Subject: [PATCH] TestEIn : - aggiornata interfaccia per OmagCut. --- EgtInterface.vb | 199 +++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 196 insertions(+), 3 deletions(-) diff --git a/EgtInterface.vb b/EgtInterface.vb index 7089734..a6b9f98 100644 --- a/EgtInterface.vb +++ b/EgtInterface.vb @@ -4876,6 +4876,192 @@ Public Function EgtInitMachMgr(ByVal sMachinesDir As String) As Boolean End If End Function + +Private Function EgtAddMachGroup_32(ByVal sName As String, ByVal sMachineName As String) As Integer +End Function + +Private Function EgtAddMachGroup_64(ByVal sName As String, ByVal sMachineName As String) As Integer +End Function +Public Function EgtAddMachGroup(ByVal sName As String, ByVal sMachineName As String) As Integer + If IntPtr.Size = 4 Then + Return EgtAddMachGroup_32(sName, sMachineName) + Else + Return EgtAddMachGroup_64(sName, sMachineName) + End If +End Function + + +Private Function EgtGetRawPartCount_32() As Integer +End Function + +Private Function EgtGetRawPartCount_64() As Integer +End Function +Public Function EgtGetRawPartCount() As Integer + If IntPtr.Size = 4 Then + Return EgtGetRawPartCount_32() + Else + Return EgtGetRawPartCount_64() + End If +End Function + + +Private Function EgtGetFirstRawPart_32() As Integer +End Function + +Private Function EgtGetFirstRawPart_64() As Integer +End Function +Public Function EgtGetFirstRawPart() As Integer + If IntPtr.Size = 4 Then + Return EgtGetFirstRawPart_32() + Else + Return EgtGetFirstRawPart_64() + End If +End Function + + +Private Function EgtGetNextRawPart_32(ByVal nRawId As Integer) As Integer +End Function + +Private Function EgtGetNextRawPart_64(ByVal nRawId As Integer) As Integer +End Function +Public Function EgtGetNextRawPart(ByVal nRawId As Integer) As Integer + If IntPtr.Size = 4 Then + Return EgtGetNextRawPart_32(nRawId) + Else + Return EgtGetNextRawPart_64(nRawId) + End If +End Function + + +Private Function EgtAddRawPart_32(ByRef ptOrig As Point3d, ByVal dLength As Double, ByVal dWidth As Double, + ByVal dHeight As Double, ByRef Color As Color3d) As Integer +End Function + +Private Function EgtAddRawPart_64(ByRef ptOrig As Point3d, ByVal dLength As Double, ByVal dWidth As Double, + ByVal dHeight As Double, ByRef Color As Color3d) As Integer +End Function +Public Function EgtAddRawPart(ByRef ptOrig As Point3d, ByVal dLength As Double, ByVal dWidth As Double, + ByVal dHeight As Double, ByRef Color As Color3d) As Integer + If IntPtr.Size = 4 Then + Return EgtAddRawPart_32(ptOrig, dLength, dWidth, dHeight, Color) + Else + Return EgtAddRawPart_64(ptOrig, dLength, dWidth, dHeight, Color) + End If +End Function + + +Private Function EgtModifyRawPartSize_32(ByVal nRawId As Integer, ByVal dLength As Double, ByVal dWidth As Double, ByVal dHeight As Double) As Boolean +End Function + +Private Function EgtModifyRawPartSize_64(ByVal nRawId As Integer, ByVal dLength As Double, ByVal dWidth As Double, ByVal dHeight As Double) As Boolean +End Function +Public Function EgtModifyRawPartSize(ByVal nRawId As Integer, ByVal dLength As Double, ByVal dWidth As Double, ByVal dHeight As Double) As Boolean + If IntPtr.Size = 4 Then + Return EgtModifyRawPartSize_32(nRawId, dLength, dWidth, dHeight) + Else + Return EgtModifyRawPartSize_64(nRawId, dLength, dWidth, dHeight) + End If +End Function + + +Private Function EgtModifyRawPartHeight_32(ByVal nRawId As Integer, ByVal dHeight As Double) As Boolean +End Function + +Private Function EgtModifyRawPartHeight_64(ByVal nRawId As Integer, ByVal dHeight As Double) As Boolean +End Function +Public Function EgtModifyRawPartHeight(ByVal nRawId As Integer, ByVal dHeight As Double) As Boolean + If IntPtr.Size = 4 Then + Return EgtModifyRawPartHeight_32(nRawId, dHeight) + Else + Return EgtModifyRawPartHeight_64(nRawId, dHeight) + End If +End Function + + +Private Function EgtMoveToCornerRawPart_32(ByVal nRawId As Integer, ByRef ptCorner As Point3d, ByVal nFlag As Integer) As Boolean +End Function + +Private Function EgtMoveToCornerRawPart_64(ByVal nRawId As Integer, ByRef ptCorner As Point3d, ByVal nFlag As Integer) As Boolean +End Function +Public Function EgtMoveToCornerRawPart(ByVal nRawId As Integer, ByRef ptCorner As Point3d, ByVal nFlag As Integer) As Boolean + If IntPtr.Size = 4 Then + Return EgtMoveToCornerRawPart_32(nRawId, ptCorner, nFlag) + Else + Return EgtMoveToCornerRawPart_64(nRawId, ptCorner, nFlag) + End If +End Function + + +Private Function EgtAddPartToRawPart_32(ByVal nPartId As Integer, ByRef ptPos As Point3d, ByVal nRawId As Integer) As Boolean +End Function + +Private Function EgtAddPartToRawPart_64(ByVal nPartId As Integer, ByRef ptPos As Point3d, ByVal nRawId As Integer) As Boolean +End Function +Public Function EgtAddPartToRawPart(ByVal nPartId As Integer, ByRef ptPos As Point3d, ByVal nRawId As Integer) As Boolean + If IntPtr.Size = 4 Then + Return EgtAddPartToRawPart_32(nPartId, ptPos, nRawId) + Else + Return EgtAddPartToRawPart_64(nPartId, ptPos, nRawId) + End If +End Function + + +Private Function EgtRemovePartFromRawPart_32(ByVal nPartId As Integer) As Boolean +End Function + +Private Function EgtRemovePartFromRawPart_64(ByVal nPartId As Integer) As Boolean +End Function +Public Function EgtRemovePartFromRawPart(ByVal nPartId As Integer) As Boolean + If IntPtr.Size = 4 Then + Return EgtRemovePartFromRawPart_32(nPartId) + Else + Return EgtRemovePartFromRawPart_64(nPartId) + End If +End Function + + +Private Function EgtSetTable_32(ByVal sTable As String) As Boolean +End Function + +Private Function EgtSetTable_64(ByVal sTable As String) As Boolean +End Function +Public Function EgtSetTable(ByVal sTable As String) As Boolean + If IntPtr.Size = 4 Then + Return EgtSetTable_32(sTable) + Else + Return EgtSetTable_64(sTable) + End If +End Function + + +Private Function EgtGetTableRef1_32(ByRef ptPos As Point3d) As Boolean +End Function + +Private Function EgtGetTableRef1_64(ByRef ptPos As Point3d) As Boolean +End Function +Public Function EgtGetTableRef1(ByRef ptPos As Point3d) As Boolean + If IntPtr.Size = 4 Then + Return EgtGetTableRef1_32(ptPos) + Else + Return EgtGetTableRef1_64(ptPos) + End If +End Function + + +Private Function EgtShowOnlyTable_32(ByVal bVal As Boolean) As Boolean +End Function + +Private Function EgtShowOnlyTable_64(ByVal bVal As Boolean) As Boolean +End Function +Public Function EgtShowOnlyTable(ByVal bVal As Boolean) As Boolean + If IntPtr.Size = 4 Then + Return EgtShowOnlyTable_32(bVal) + Else + Return EgtShowOnlyTable_64(bVal) + End If +End Function + + '---------- Scene -------------------------------------------------------------- Private Function EgtInitScene_32(ByVal hWnd As IntPtr, ByVal nDriver As Integer, @@ -6095,11 +6281,11 @@ End Function '---------- Costanti ----------------------------------------------------------- 'Costanti : GEOMETRIA Public Const ONEMM As Double = 1.0 -Public Const ONEINCH As Double = 25.399999999999999 +Public Const ONEINCH As Double = 25.4 Public Const EPS_SMALL As Double = 0.001 -Public Const EPS_ZERO As Double = 0.000000099999999999999995 +Public Const EPS_ZERO As Double = 0.0000001 Public Const INFINITO As Double = 10000000000.0 -Public Const EPS_STM As Double = 0.050000000000000003 +Public Const EPS_STM As Double = 0.05 Public Const EPS_STM_DRAG As Double = 0.5 'Costanti : TIPO DI FILE Public Enum FT As Integer @@ -6269,5 +6455,12 @@ Public Enum FPC_TYPE As Integer LAYER = 2 NGE = 3 End Enum +'Costanti : posizione di inserimento grezzo su corner +Public Enum MCH_CR As Integer + TL = 1 + TR = 2 + BL = 3 + BR = 4 +End Enum End Module