'---------------------------------------------------------------------------- ' EgalTech 2014-2015 '---------------------------------------------------------------------------- ' File : EgtInterface.vb Data : 30.06.15 Versione : 1.6f4 ' Contenuto : Modulo EgtInterface (interfaccia verso il motore EgalTech). ' ' ' ' Modifiche : 04.11.14 DS Creazione modulo. ' 30.06.15 DS Unificati 32 e 64 bit in AnyCPU. ' '---------------------------------------------------------------------------- Imports System.Runtime.InteropServices Imports System.Security Public Module EgtInterface Structure Vector3d ' Membri Dim x, y, z As Double ' Costruttori Sub New(dX As Double, dY As Double, dZ As Double) x = dX y = dY z = dZ End Sub Sub New(ByRef VtV As Vector3d) x = VtV.x y = VtV.y z = VtV.z End Sub ' Calcolatori da componenti polari / sferici Shared Function FromSpherical(dLen As Double, dAngVertDeg As Double, dAngOrizzDeg As Double) As Vector3d Dim dAngVertRad As Double = dAngVertDeg * Math.PI / 180 Dim dAngOrizzRad As Double = dAngOrizzDeg * Math.PI / 180 Dim dSinAngVert As Double = Math.Sin(dAngVertRad) Dim vtV As New Vector3d(dLen * dSinAngVert * Math.Cos(dAngOrizzRad), dLen * dSinAngVert * Math.Sin(dAngOrizzRad), dLen * Math.Cos(dAngVertRad)) Return vtV End Function Shared Function FromPolar(dLen As Double, dAngOrizzDeg As Double) As Vector3d Dim dAngOrizzRad As Double = dAngOrizzDeg * Math.PI / 180 Dim vtV As New Vector3d(dLen * Math.Cos(dAngOrizzRad), dLen * Math.Sin(dAngOrizzRad), 0) Return vtV End Function ' Vettore opposto Shared Operator -(VtV1 As Vector3d) As Vector3d Dim vtV As New Vector3d(-VtV1.x, -VtV1.y, -VtV1.z) Return vtV End Operator ' Somma Shared Operator +(VtV1 As Vector3d, VtV2 As Vector3d) As Vector3d Dim vtV As New Vector3d(VtV1.x + VtV2.x, VtV1.y + VtV2.y, VtV1.z + VtV2.z) Return vtV End Operator ' Sottrazione Shared Operator -(VtV1 As Vector3d, VtV2 As Vector3d) As Vector3d Dim vtV As New Vector3d(VtV1.x - VtV2.x, VtV1.y - VtV2.y, VtV1.z - VtV2.z) Return vtV End Operator ' Prodotto con un numero Shared Operator *(dNum As Double, VtV2 As Vector3d) As Vector3d Dim vtV As New Vector3d(dNum * VtV2.x, dNum * VtV2.y, dNum * VtV2.z) Return vtV End Operator Shared Operator *(VtV1 As Vector3d, dNum As Double) As Vector3d Dim vtV As New Vector3d(dNum * VtV1.x, dNum * VtV1.y, dNum * VtV1.z) Return vtV End Operator ' Divisione per un numero Shared Operator /(VtV1 As Vector3d, dDiv As Double) As Vector3d Dim dMul As Double = 1 / dDiv Dim vtV As New Vector3d(dMul * VtV1.x, dMul * VtV1.y, dMul * VtV1.z) Return vtV End Operator ' Prodotto scalare Shared Operator *(VtV1 As Vector3d, VtV2 As Vector3d) As Double Return (VtV1.x * VtV2.x + VtV1.y * VtV2.y + VtV1.z * VtV2.z) End Operator ' Prodotto scalare nel piano XY Shared Function ScalarXY(VtV1 As Vector3d, VtV2 As Vector3d) As Double Return (VtV1.x * VtV2.x + VtV1.y * VtV2.y) End Function ' Prodotto vettoriale Shared Operator ^(VtV1 As Vector3d, VtV2 As Vector3d) As Vector3d Dim vtV As New Vector3d(VtV1.y * VtV2.z - VtV1.z * VtV2.y, VtV1.z * VtV2.x - VtV1.x * VtV2.z, VtV1.x * VtV2.y - VtV1.y * VtV2.x) Return vtV End Operator ' Prodotto vettoriale nel piano XY Shared Function CrossXY(VtV1 As Vector3d, VtV2 As Vector3d) As Double Return (VtV1.x * VtV2.y - VtV1.y * VtV2.x) End Function ' Quadrato della lunghezza 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) End Function ' Normalizzazione Function Normalize(Optional dEps As Double = EPS_SMALL) As Boolean Return EgtVectorNormalize(x, y, z, dEps) End Function ' Ritorna la rappresentazione in coordinate sferiche Sub ToSpherical(ByRef dLen As Double, ByRef dAngVertDeg As Double, ByRef dAngOrizzDeg As Double) ' lunghezza dLen = Len() ' angoli ' se vettore nullo If dLen < EPS_ZERO Then dAngVertDeg = 0 dAngOrizzDeg = 0 ' se diretto come Z ElseIf Math.Abs(x) < EPS_ZERO And Math.Abs(y) < EPS_ZERO Then dAngVertDeg = If(z > 0, 0, 180) dAngOrizzDeg = 0 ' se altrimenti nel piano XY ElseIf Math.Abs(z) < EPS_ZERO Then dAngVertDeg = 90 dAngOrizzDeg = Math.Atan2(y, x) * 180 / Math.PI If dAngOrizzDeg < 0 Then dAngOrizzDeg += 360 End If ' caso generico Else dAngVertDeg = Math.Acos(z / dLen) * 180 / Math.PI dAngOrizzDeg = Math.Atan2(y, x) * 180 / Math.PI If dAngOrizzDeg < 0 Then dAngOrizzDeg += 360 End If End If End Sub ' Rotazione Function Rotate(ByRef VtAx As Vector3d, dAngRotDeg As Double) As Boolean Return EgtVectorRotate(x, y, z, VtAx, dAngRotDeg) End Function ' Scalatura Function Scale(ByRef frRef As Frame3d, dCoeffX As Double, dCoeffY As Double, dCoeffZ As Double) As Boolean Return EgtVectorScale(x, y, z, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ(), dCoeffX, dCoeffY, dCoeffZ) End Function ' Mirror Function Mirror(ByRef PtOn As Point3d, ByRef VtNorm As Vector3d) As Boolean Return EgtVectorMirror(x, y, z, VtNorm) End Function ' Shear Function Shear(ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, dCoeff As Double) As Boolean Return EgtVectorShear(x, y, z, VtNorm, VtDir, dCoeff) End Function ' Cambio di riferimento : dal riferimento al globale Function ToGlob(ByRef frRef As Frame3d) As Boolean If frRef.IsValid Then Return EgtVectorToGlob(x, y, z, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ()) Else Return False End If End Function ' Cambio di riferimento : dal globale al riferimento Function ToLoc(ByRef frRef As Frame3d) As Boolean If frRef.IsValid Then Return EgtVectorToLoc(x, y, z, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ()) Else Return False End If End Function ' Cambio di riferimento : dal primo riferimento al secondo Function LocToLoc(ByRef frSou As Frame3d, ByRef frDest As Frame3d) As Boolean If frSou.IsValid And frDest.IsValid Then Return EgtVectorLocToLoc(x, y, z, frSou.Orig(), frSou.VersX(), frSou.VersY(), frSou.VersZ(), frDest.Orig(), frDest.VersX(), frDest.VersY(), frDest.VersZ()) Else Return False End If End Function ' Restituisce vettore in globale partendo da espressione nel riferimento dell'oggetto Function Glob(nId As Integer) As Vector3d Dim vtV As New Vector3d(x, y, z) EgtVectorToIdGlob(vtV, nId) Return vtV End Function ' Restituisce vettore nel riferimento dell'oggetto partendo da espressione in globale Function Loc(nId As Integer) As Vector3d Dim vtV As New Vector3d(x, y, z) EgtVectorToIdLoc(vtV, nId) Return vtV End Function ' Restituisce vettore nel riferimento del 2°oggetto partendo da espressione nel riferimento del 1° oggetto Function LocLoc(nIdSou As Integer, nIdDest As Integer) As Vector3d Dim vtV As New Vector3d(x, y, z) If EgtVectorToIdGlob(vtV, nIdSou) And EgtVectorToIdLoc(vtV, nIdDest) Then Return vtV Else Return Me End If End Function ' vettore nullo Shared Function NULL() As Vector3d Return New Vector3d(0, 0, 0) End Function ' Versore Asse X Shared Function X_AX() As Vector3d Return New Vector3d(1, 0, 0) End Function ' Versore Asse Y Shared Function Y_AX() As Vector3d Return New Vector3d(0, 1, 0) End Function ' Versore Asse Z Shared Function Z_AX() As Vector3d Return New Vector3d(0, 0, 1) End Function End Structure ' Calcolo dell'angolo tra due vettori Function GetAngle( ByRef vtV1 As Vector3d, ByRef vtV2 As Vector3d) As Double ' quantità ugualmente proporzionali a coseno e seno Dim dProSca As Double = vtV1 * vtV2 Dim dProVett As Double = ( vtV1 ^ vtV2).Len() ' se entrambe nulle If Math.Abs( dProSca) < EPS_ZERO And Math.Abs( dProVett) < EPS_ZERO Then Return 0 ' calcolo l'angolo Return Math.Atan2( dProVett, dProSca) * 180 / Math.PI End Function Structure Point3d ' Membri Dim x, y, z As Double ' Costruttori Sub New(dX As Double, dY As Double, dZ As Double) x = dX y = dY z = dZ End Sub Sub New(ByRef PtP As Point3d) x = PtP.x y = PtP.y z = PtP.z End Sub ' Somma di un punto e un vettore Shared Operator +(PtP1 As Point3d, VtV2 As Vector3d) As Point3d Dim ptP As New Point3d(PtP1.x + VtV2.x, PtP1.y + VtV2.y, PtP1.z + VtV2.z) Return ptP End Operator Shared Operator +(VtV1 As Vector3d, PtP2 As Point3d) As Point3d Dim ptP As New Point3d(VtV1.x + PtP2.x, VtV1.y + PtP2.y, VtV1.z + PtP2.z) Return ptP End Operator ' Differenza di due punti (produce un vettore) Shared Operator -(PtP1 As Point3d, PtP2 As Point3d) As Vector3d Dim vtV As New Vector3d(PtP1.x - PtP2.x, PtP1.y - PtP2.y, PtP1.z - PtP2.z) Return vtV End Operator ' Differenza di un punto e un vettore Shared Operator -(PtP1 As Point3d, VtV2 As Vector3d) As Point3d Dim ptP As New Point3d(PtP1.x - VtV2.x, PtP1.y - VtV2.y, PtP1.z - VtV2.z) Return ptP End Operator ' Media pesata di due punti (con 0 è il primo, con 1 il secondo, con 0.5 il medio, ...) Shared Function Media(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d, Optional dCoeff As Double = 0.5) As Point3d Dim ptMedia As New Point3d((1 - dCoeff) * ptP1.x + dCoeff * ptP2.x, (1 - dCoeff) * ptP1.y + dCoeff * ptP2.y, (1 - dCoeff) * ptP1.z + dCoeff * ptP2.z) Return ptMedia End Function ' Quadrato della distanza 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 End Function ' Traslazione Function Move(ByRef VtMove As Vector3d) As Boolean Return EgtPointTranslate(x, y, z, VtMove) End Function ' Rotazione Function Rotate(ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngRotDeg As Double) As Boolean Return EgtPointRotate(x, y, z, PtAx, VtAx, dAngRotDeg) End Function ' Scalatura Function Scale(ByRef frRef As Frame3d, dCoeffX As Double, dCoeffY As Double, dCoeffZ As Double) As Boolean Return EgtPointScale(x, y, z, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ(), dCoeffX, dCoeffY, dCoeffZ) End Function ' Mirror Function Mirror(ByRef PtOn As Point3d, ByRef VtNorm As Vector3d) As Boolean Return EgtPointMirror(x, y, z, PtOn, VtNorm) End Function ' Shear Function Shear(ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, dCoeff As Double) As Boolean Return EgtPointShear(x, y, z, PtOn, VtNorm, VtDir, dCoeff) End Function ' Cambio di riferimento : dal riferimento al globale Function ToGlob(ByRef frRef As Frame3d) As Boolean If frRef.IsValid Then Return EgtPointToGlob(x, y, z, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ()) Else Return False End If End Function ' Cambio di riferimento : dal globale al riferimento Function ToLoc(ByRef frRef As Frame3d) As Boolean If frRef.IsValid Then Return EgtPointToLoc(x, y, z, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ()) Else Return False End If End Function ' Cambio di riferimento : dal primo riferimento al secondo Function LocToLoc(ByRef frSou As Frame3d, ByRef frDest As Frame3d) As Boolean If frSou.IsValid And frDest.IsValid Then Return EgtPointLocToLoc(x, y, z, frSou.Orig(), frSou.VersX(), frSou.VersY(), frSou.VersZ(), frDest.Orig(), frDest.VersX(), frDest.VersY(), frDest.VersZ()) Else Return False End If End Function ' Restituisce punto in globale partendo da espressione nel riferimento dell'oggetto Function Glob(nId As Integer) As Point3d Dim ptP As New Point3d(x, y, z) EgtPointToIdGlob(ptP, nId) Return ptP End Function ' Restituisce punto nel riferimento dell'oggetto partendo da espressione in globale Function Loc(nId As Integer) As Point3d Dim ptP As New Point3d(x, y, z) EgtPointToIdLoc(ptP, nId) Return ptP End Function ' Restituisce punto nel riferimento del 2°oggetto partendo da espressione nel riferimento del 1° oggetto Function LocLoc(nIdSou As Integer, nIdDest As Integer) As Point3d Dim ptP As New Point3d(x, y, z) If EgtPointToIdGlob(ptP, nIdSou) And EgtPointToIdLoc(ptP, nIdDest) Then Return ptP Else Return Me End If End Function ' Punto Origine Shared Function ORIG() As Point3d Return New Point3d(0, 0, 0) End Function End Structure Class Frame3d ' Membri Private PtOrig As Point3d Private VtDirX, VtDirY, VtDirZ As Vector3d Private bOk As Boolean ' Enum per tipo Public Enum TYPE As Integer ERR = 0 TOP = 1 BOTTOM = 2 FRONT = 3 BACK = 4 LEFT = 5 RIGHT = 6 GEN = 7 End Enum ' Costruttori Sub New() PtOrig = Point3d.ORIG VtDirX = Vector3d.X_AX VtDirY = Vector3d.Y_AX VtDirZ = Vector3d.Z_AX bOk = True End Sub Sub New(ByRef PtOri As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) PtOrig = PtOri VtDirX = VtX VtDirY = VtY VtDirZ = VtZ bOk = VtDirX.Normalize() And VtDirY.Normalize() And VtDirZ.Normalize() And Verify() End Sub Sub New(ByRef PtOri As Point3d) PtOrig = PtOri VtDirX = Vector3d.X_AX VtDirY = Vector3d.Y_AX VtDirZ = Vector3d.Z_AX bOk = True End Sub Sub New(ByRef PtOri As Point3d, nType As Integer) Setup(PtOri, nType) End Sub Sub New(ByRef frFrame As Frame3d) PtOrig = frFrame.Orig() VtDirX = frFrame.VersX() VtDirY = frFrame.VersY() VtDirZ = frFrame.VersZ() bOk = True End Sub ' Inizializzatori Public Function Setup(ByRef PtOri As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean PtOrig = PtOri VtDirX = VtX VtDirY = VtY VtDirZ = VtZ bOk = VtDirX.Normalize() And VtDirY.Normalize() And VtDirZ.Normalize() And Verify() Return bOk End Function Public Function Setup(ByRef PtOri As Point3d) As Boolean PtOrig = PtOri VtDirX = Vector3d.X_AX VtDirY = Vector3d.Y_AX VtDirZ = Vector3d.Z_AX bOk = True Return bOk End Function Public Function Setup(ByRef PtOri As Point3d, ByRef PtOnX As Point3d, ByRef PtNearY As Point3d) As Boolean Return EgtFrameFrom3Points(PtOri, PtOnX, PtNearY, PtOrig, VtDirX, VtDirY, VtDirZ) End Function Public Function Setup(ByRef PtOri As Point3d, ByRef VtZ As Vector3d) As Boolean Return EgtFrameOCS(PtOri, VtZ, PtOrig, VtDirX, VtDirY, VtDirZ) End Function Public Function Setup(ByRef PtOri As Point3d, nType As Integer) As Boolean Select Case nType Case TYPE.TOP VtDirX = Vector3d.X_AX VtDirY = Vector3d.Y_AX VtDirZ = Vector3d.Z_AX Case TYPE.BOTTOM VtDirX = Vector3d.X_AX VtDirY = -Vector3d.Y_AX VtDirZ = -Vector3d.Z_AX Case TYPE.FRONT VtDirX = Vector3d.X_AX VtDirY = Vector3d.Z_AX VtDirZ = -Vector3d.Y_AX Case TYPE.BACK VtDirX = -Vector3d.X_AX VtDirY = Vector3d.Z_AX VtDirZ = Vector3d.Y_AX Case TYPE.LEFT VtDirX = -Vector3d.Y_AX VtDirY = Vector3d.Z_AX VtDirZ = -Vector3d.X_AX Case TYPE.RIGHT VtDirX = Vector3d.Y_AX VtDirY = Vector3d.Z_AX VtDirZ = Vector3d.X_AX Case Else bOk = False Return False End Select PtOrig = PtOri bOk = True Return True End Function ' Cambio origine Public Function ChangeOrigin(ByRef PtOri As Point3d) As Boolean PtOrig = PtOri Return True End Function ' Verifica Private Function Verify() As Boolean ' verifica della ortogonalità dei versori e del senso destrorso Dim dOrtXY As Double = VtDirX * VtDirY Dim dOrtYZ As Double = VtDirY * VtDirZ Dim dOrtZX As Double = VtDirZ * VtDirX Dim vtTmp As Vector3d = VtDirX ^ VtDirY Dim dRight As Double = vtTmp * VtDirZ If Math.Abs(dOrtXY) > EPS_ZERO Or Math.Abs(dOrtYZ) > EPS_ZERO Or Math.Abs(dOrtZX) > EPS_ZERO Or dRight < EPS_ZERO Then Return False Else Return True End If End Function Public Function IsValid() As Boolean Return bOk End Function ' Determinazione del tipo Public Function GetEgtType() As Integer If Not bOk Then Return TYPE.ERR Return EgtFrameGetType(PtOrig, VtDirX, VtDirY, VtDirZ) End Function ' Restituzione componenti Public Function Orig() As Point3d Return PtOrig End Function Public Function VersX() As Vector3d Return VtDirX End Function Public Function VersY() As Vector3d Return VtDirY End Function Public Function VersZ() As Vector3d Return VtDirZ End Function ' Traslazione Public Function Move(ByRef VtMove As Vector3d) As Boolean If bOk Then Return EgtFrameTranslate(PtOrig, VtDirX, VtDirY, VtDirZ, VtMove) Else Return False End If End Function ' Rotazione Public Function Rotate(ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngRotDeg As Double) As Boolean If bOk Then Return EgtFrameRotate(PtOrig, VtDirX, VtDirY, VtDirZ, PtAx, VtAx, dAngRotDeg) Else Return False End If End Function ' Cambio di riferimento : dal riferimento al globale Public Function ToGlob(ByRef frRef As Frame3d) As Boolean If bOk And frRef.IsValid Then Return EgtFrameToGlob(PtOrig, VtDirX, VtDirY, VtDirZ, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ()) Else Return False End If End Function ' Cambio di riferimento : dal globale al riferimento Public Function ToLoc(ByRef frRef As Frame3d) As Boolean If bOk And frRef.IsValid Then Return EgtFrameToLoc(PtOrig, VtDirX, VtDirY, VtDirZ, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ()) Else Return False End If End Function ' Cambio di riferimento : dal primo riferimento al secondo Public Function LocToLoc(ByRef frSou As Frame3d, ByRef frDest As Frame3d) As Boolean If bOk And frSou.IsValid And frDest.IsValid Then Return EgtFrameLocToLoc(PtOrig, VtDirX, VtDirY, VtDirZ, frSou.Orig(), frSou.VersX(), frSou.VersY(), frSou.VersZ(), frDest.Orig(), frDest.VersX(), frDest.VersY(), frDest.VersZ()) Else Return False End If End Function ' Riferimento Globale o Identità Shared Function GLOB() As Frame3d Return New Frame3d End Function End Class Class BBox3d ' Membri Private PtMin, PtMax As Point3d ' Costruttori Sub New() PtMin.x = INFINITO PtMin.y = INFINITO PtMin.z = INFINITO PtMax.x = -INFINITO PtMax.y = -INFINITO PtMax.z = -INFINITO End Sub Sub New(ByRef ptP As Point3d) PtMin = ptP PtMax = ptP End Sub Sub New(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d) PtMin.x = Math.Min(ptP1.x, ptP2.x) PtMin.y = Math.Min(ptP1.y, ptP2.y) PtMin.z = Math.Min(ptP1.z, ptP2.z) PtMax.x = Math.Max(ptP1.x, ptP2.x) PtMax.y = Math.Max(ptP1.y, ptP2.y) PtMax.z = Math.Max(ptP1.z, ptP2.z) End Sub Sub New(ByRef b3Box As BBox3d) PtMin = b3Box.PtMin PtMax = b3Box.PtMax End Sub ' Inizializzatori Public Function Setup() As Boolean PtMin.x = INFINITO PtMin.y = INFINITO PtMin.z = INFINITO PtMax.x = -INFINITO PtMax.y = -INFINITO PtMax.z = -INFINITO Return True End Function Public Function Setup(ByRef ptP As Point3d) As Boolean PtMin = ptP PtMax = ptP Return True End Function Public Function Setup(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d) As Boolean PtMin.x = Math.Min(ptP1.x, ptP2.x) PtMin.y = Math.Min(ptP1.y, ptP2.y) PtMin.z = Math.Min(ptP1.z, ptP2.z) PtMax.x = Math.Max(ptP1.x, ptP2.x) PtMax.y = Math.Max(ptP1.y, ptP2.y) PtMax.z = Math.Max(ptP1.z, ptP2.z) Return True End Function ' Verifica Public Function IsEmpty() As Boolean Return Not (PtMin.x < PtMax.x + EPS_SMALL And PtMin.y < PtMax.y + EPS_SMALL And PtMin.z < PtMax.z + EPS_SMALL) End Function ' Aggiungo punto Public Function Add(ByRef ptP As Point3d) As Boolean If ptP.x < PtMin.x Then PtMin.x = ptP.x If ptP.y < PtMin.y Then PtMin.y = ptP.y If ptP.z < PtMin.z Then PtMin.z = ptP.z If ptP.x > PtMax.x Then PtMax.x = ptP.x If ptP.y > PtMax.y Then PtMax.y = ptP.y If ptP.z > PtMax.z Then PtMax.z = ptP.z Return True End Function ' Aggiungo altro box Public Function Add(ByRef b3Box As BBox3d) As Boolean Return Add(b3Box.PtMin) And Add(b3Box.PtMax) End Function ' Espansione isotropa Public Function Expand(dDelta As Double) As Boolean If IsEmpty() Then Return True PtMin.x -= dDelta PtMin.y -= dDelta PtMin.z -= dDelta PtMax.x += dDelta PtMax.y += dDelta PtMax.z += dDelta Return True End Function Public Function Expand(dDeltaX As Double, dDeltaY As Double, dDeltaZ As Double) As Boolean If IsEmpty() Then Return True PtMin -= New Vector3d(dDeltaX, dDeltaY, dDeltaZ) PtMax += New Vector3d(dDeltaX, dDeltaY, dDeltaZ) Return True End Function ' Restituzione componenti Public Function Min() As Point3d Return PtMin End Function Public Function Max() As Point3d Return PtMax End Function Public Function DimX() As Double If IsEmpty() Then Return 0 Return PtMax.x - PtMin.x End Function Public Function DimY() As Double If IsEmpty() Then Return 0 Return PtMax.y - PtMin.y End Function Public Function DimZ() As Double If IsEmpty() Then Return 0 Return PtMax.z - PtMin.z End Function Public Function Center() As Point3d Return Point3d.Media(PtMin, PtMax) End Function Public Function Radius() As Double If IsEmpty() Then Return 0 Return 0.5 * Point3d.Dist(PtMin, PtMax) End Function ' Traslazione Public Function Move(ByRef VtMove As Vector3d) As Boolean Return EgtBBoxTranslate(PtMin, PtMax, VtMove) End Function ' Rotazione Public Function Rotate(ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngRotDeg As Double) As Boolean Return EgtBBoxRotate(PtMin, PtMax, PtAx, VtAx, dAngRotDeg) End Function ' Cambio di riferimento : dal riferimento al globale Public Function ToGlob(ByRef frRef As Frame3d) As Boolean If frRef.IsValid Then Return EgtBBoxToGlob(PtMin, PtMax, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ()) Else Return False End If End Function ' Cambio di riferimento : dal globale al riferimento Public Function ToLoc(ByRef frRef As Frame3d) As Boolean If frRef.IsValid Then Return EgtBBoxToLoc(PtMin, PtMax, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ()) Else Return False End If End Function ' Cambio di riferimento : dal primo riferimento al secondo Public Function LocToLoc(ByRef frSou As Frame3d, ByRef frDest As Frame3d) As Boolean If frSou.IsValid And frDest.IsValid Then Return EgtBBoxLocToLoc(PtMin, PtMax, frSou.Orig(), frSou.VersX(), frSou.VersY(), frSou.VersZ(), frDest.Orig(), frDest.VersX(), frDest.VersY(), frDest.VersZ()) Else Return False End If End Function ' Punto incluso nel box Public Function Encloses(ByRef ptOther As Point3d) As Boolean If PtMax.x < ptOther.x - EPS_SMALL Or PtMin.x > ptOther.x + EPS_SMALL Then Return False If PtMax.y < ptOther.y - EPS_SMALL Or PtMin.y > ptOther.y + EPS_SMALL Then Return False If PtMax.z < ptOther.z - EPS_SMALL Or PtMin.z > ptOther.z + EPS_SMALL Then Return False Return True End Function Public Function EnclosesXY(ByRef ptOther As Point3d) As Boolean If PtMax.x < ptOther.x - EPS_SMALL Or PtMin.x > ptOther.x + EPS_SMALL Then Return False If PtMax.y < ptOther.y - EPS_SMALL Or PtMin.y > ptOther.y + EPS_SMALL Then Return False Return True End Function ' Altro box incluso nel box Public Function Encloses(ByRef b3Other As BBox3d) As Boolean If b3Other.IsEmpty() Then Return False Return Encloses(b3Other.PtMin) AndAlso Encloses(b3Other.PtMax) End Function Public Function EnclosesXY(ByRef b3Other As BBox3d) As Boolean If b3Other.IsEmpty() Then Return False Return EnclosesXY(b3Other.PtMin) AndAlso EnclosesXY(b3Other.PtMax) End Function ' Sovrapposizione con altro box Public Function Overlaps(ByRef b3Other As BBox3d) As Boolean If b3Other.IsEmpty() Then Return False If PtMax.x < b3Other.PtMin.x - EPS_SMALL Or PtMin.x > b3Other.PtMax.x + EPS_SMALL Then Return False If PtMax.y < b3Other.PtMin.y - EPS_SMALL Or PtMin.y > b3Other.PtMax.y + EPS_SMALL Then Return False If PtMax.z < b3Other.PtMin.z - EPS_SMALL Or PtMin.z > b3Other.PtMax.z + EPS_SMALL Then Return False Return True End Function Public Function OverlapsXY(ByRef b3Other As BBox3d) As Boolean If b3Other.IsEmpty() Then Return False If PtMax.x < b3Other.PtMin.x - EPS_SMALL Or PtMin.x > b3Other.PtMax.x + EPS_SMALL Then Return False If PtMax.y < b3Other.PtMin.y - EPS_SMALL Or PtMin.y > b3Other.PtMax.y + EPS_SMALL Then Return False Return True End Function End Class Structure Color3d ' Membri Dim R, G, B, A As Integer ' Costruttori Sub New(nRed As Integer, nGreen As Integer, nBlue As Integer, Optional nAlpha As Integer = 100) R = Clamp(nRed, 0, 255) G = Clamp(nGreen, 0, 255) B = Clamp(nBlue, 0, 255) A = Clamp(nAlpha, 0, 100) End Sub Sub New(ByRef colSou As Color3d) R = colSou.R G = colSou.G B = colSou.B A = colSou.A End Sub ' Inizializzatori Sub Setup(nRed As Integer, nGreen As Integer, nBlue As Integer, Optional nAlpha As Integer = 100) R = nRed G = nGreen B = nBlue A = nAlpha End Sub ' Conversione a System.Drawing.Color Function ToColor() As System.Drawing.Color Return System.Drawing.Color.FromArgb(A * 255 / 100, R, G, B) End Function ' Conversione da System.Drawing.Color Sub FromColor(SysCol As System.Drawing.Color) R = SysCol.R G = SysCol.G B = SysCol.B A = SysCol.A * 100 / 255 End Sub ' Per limitare un intero in un intervallo Function Clamp(nVal As Integer, nMin As Integer, nMax As Integer) As Integer If nVal < nMin Then Return nMin If nVal > nMax Then Return nMax Return nVal End Function End Structure Structure FlagPar Dim nFlag As Integer Dim dPar As Double Sub New(nF As Integer, dP As Double) nFlag = nF dPar = dP End Sub End Structure #If DEBUG Then Const EgtIntDll32 As String = "EgtInterfaceD32.dll" Const EgtIntDll64 As String = "EgtInterfaceD64.dll" #Else Const EgtIntDll32 As String = "EgtInterfaceR32.dll" Const EgtIntDll64 As String = "EgtInterfaceR64.dll" #End If '---------- General ------------------------------------------------------------ Private Function EgtInit_32(nDebug As Integer, sLogFile As String, Optional sLogMsg As String = "") As Boolean End Function Private Function EgtInit_64(nDebug As Integer, sLogFile As String, Optional sLogMsg As String = "") As Boolean End Function Public Function EgtInit(nDebug As Integer, sLogFile As String, Optional sLogMsg As String = "") As Boolean Dim MyDll As System.Reflection.AssemblyName = System.Reflection.Assembly.GetExecutingAssembly().GetName() sLogMsg &= vbLf & "EgtUILib.dll ver. " & MyDll.Version.Major.ToString() & "." & MyDll.Version.Minor.ToString() & (ChrW(97 - 1 + MyDll.Version.Build)).ToString() & MyDll.Version.Revision.ToString() If IntPtr.Size = 4 Then Return EgtInit_32(nDebug, sLogFile, sLogMsg) Else Return EgtInit_64(nDebug, sLogFile, sLogMsg) End If End Function Private Function EgtExit_32() As Boolean End Function Private Function EgtExit_64() As Boolean End Function Public Function EgtExit() As Boolean If IntPtr.Size = 4 Then Return EgtExit_32() Else Return EgtExit_64() End If End Function Private Function EgtSetKey_32(sKey As String) As Boolean End Function Private Function EgtSetKey_64(sKey As String) As Boolean End Function Public Function EgtSetKey(sKey As String) As Boolean If IntPtr.Size = 4 Then Return EgtSetKey_32(sKey) Else Return EgtSetKey_64(sKey) End If End Function Private Function EgtSetFont_32(sNfeFontDir As String, sDefaultFont As String) As Boolean End Function Private Function EgtSetFont_64(sNfeFontDir As String, sDefaultFont As String) As Boolean End Function Public Function EgtSetFont(sNfeFontDir As String, sDefaultFont As String) As Boolean If IntPtr.Size = 4 Then Return EgtSetFont_32(sNfeFontDir, sDefaultFont) Else Return EgtSetFont_64(sNfeFontDir, sDefaultFont) End If End Function Private Function EgtGetNfeFontDir_32(ByRef psNfeFontDir As IntPtr) As Boolean End Function Private Function EgtGetNfeFontDir_64(ByRef psNfeFontDir As IntPtr) As Boolean End Function Public Function EgtGetNfeFontDir(ByRef sNfeFontDir As String) As Boolean Dim psNfeFontDir As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetNfeFontDir_32(psNfeFontDir) Else bOk = EgtGetNfeFontDir_64(psNfeFontDir) End If If bOk Then sNfeFontDir = Marshal.PtrToStringUni(psNfeFontDir) EgtFreeMemory(psNfeFontDir) Else sNfeFontDir = String.Empty End If Return bOk End Function Private Function EgtGetDefaultFont_32(ByRef psDefaultFont As IntPtr) As Boolean End Function Private Function EgtGetDefaultFont_64(ByRef psDefaultFont As IntPtr) As Boolean End Function Public Function EgtGetDefaultFont(ByRef sDefaultFont As String) As Boolean Dim psDefaultFont As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetDefaultFont_32(psDefaultFont) Else bOk = EgtGetDefaultFont_64(psDefaultFont) End If If bOk Then sDefaultFont = Marshal.PtrToStringUni(psDefaultFont) EgtFreeMemory(psDefaultFont) Else sDefaultFont = String.Empty End If Return bOk End Function Private Function EgtSetLuaLibs_32(sLuaLibsDir As String) As Boolean End Function Private Function EgtSetLuaLibs_64(sLuaLibsDir As String) As Boolean End Function Public Function EgtSetLuaLibs(sLuaLibsDir As String) As Boolean If IntPtr.Size = 4 Then Return EgtSetLuaLibs_32(sLuaLibsDir) Else Return EgtSetLuaLibs_64(sLuaLibsDir) End If End Function Private Function EgtSetIniFile_32(sIniFile As String) As Boolean End Function Private Function EgtSetIniFile_64(sIniFile As String) As Boolean End Function Public Function EgtSetIniFile(sIniFile As String) As Boolean If IntPtr.Size = 4 Then Return EgtSetIniFile_32(sIniFile) Else Return EgtSetIniFile_64(sIniFile) End If End Function Private Function EgtGetIniFile_32(ByRef psIniFile As IntPtr) As Boolean End Function Private Function EgtGetIniFile_64(ByRef psIniFile As IntPtr) As Boolean End Function Public Function EgtGetIniFile(ByRef sIniFile As String) As Boolean Dim psIniFile As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetIniFile_32(psIniFile) Else bOk = EgtGetIniFile_64(psIniFile) End If If bOk Then sIniFile = Marshal.PtrToStringUni(psIniFile) EgtFreeMemory(psIniFile) Else sIniFile = String.Empty End If Return bOk End Function Private Function EgtSetCommandLogger_32(sLogFile As String) As Boolean End Function Private Function EgtSetCommandLogger_64(sLogFile As String) As Boolean End Function Public Function EgtSetCommandLogger(sLogFile As String) As Boolean If IntPtr.Size = 4 Then Return EgtSetCommandLogger_32(sLogFile) Else Return EgtSetCommandLogger_64(sLogFile) End If End Function Private Sub EgtEnableCommandLogger_32() End Sub Private Sub EgtEnableCommandLogger_64() End Sub Public Sub EgtEnableCommandLogger() If IntPtr.Size = 4 Then EgtEnableCommandLogger_32() Else EgtEnableCommandLogger_64() End If End Sub Private Sub EgtDisableCommandLogger_32() End Sub Private Sub EgtDisableCommandLogger_64() End Sub Public Sub EgtDisableCommandLogger() If IntPtr.Size = 4 Then EgtDisableCommandLogger_32() Else EgtDisableCommandLogger_64() End If End Sub Private Function EgtGetVersionInfo_32(ByRef psVerInfo As IntPtr) As Boolean End Function Private Function EgtGetVersionInfo_64(ByRef psVerInfo As IntPtr) As Boolean End Function Public Function EgtGetVersionInfo(ByRef sVerInfo As String) As Boolean Dim psVerInfo As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetVersionInfo_32(psVerInfo) Else bOk = EgtGetVersionInfo_64(psVerInfo) End If If bOk Then sVerInfo = Marshal.PtrToStringUni(psVerInfo) EgtFreeMemory(psVerInfo) Else sVerInfo = String.Empty End If Return bOk End Function Private Function EgtGetKeyInfo_32(ByRef psKeyInfo As IntPtr) As Boolean End Function Private Function EgtGetKeyInfo_64(ByRef psKeyInfo As IntPtr) As Boolean End Function Public Function EgtGetKeyInfo(ByRef sKeyInfo As String) As Boolean Dim psKeyInfo As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetKeyInfo_32(psKeyInfo) Else bOk = EgtGetKeyInfo_64(psKeyInfo) End If If bOk Then sKeyInfo = Marshal.PtrToStringUni(psKeyInfo) EgtFreeMemory(psKeyInfo) Else sKeyInfo = String.Empty End If Return bOk End Function Private Function EgtSetLockType_32(nType As Integer) As Boolean End Function Private Function EgtSetLockType_64(nType As Integer) As Boolean End Function Public Function EgtSetLockType(nType As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSetLockType_32(nType) Else Return EgtSetLockType_64(nType) End If End Function Private Function EgtGetKeyLevel_32(nProd As Integer, nVer As Integer, nLev As Integer, ByRef nKLev As Integer) As Boolean End Function Private Function EgtGetKeyLevel_64(nProd As Integer, nVer As Integer, nLev As Integer, ByRef nKLev As Integer) As Boolean End Function Public Function EgtGetKeyLevel(nProd As Integer, nVer As Integer, nLev As Integer, ByRef nKLev As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetKeyLevel_32(nProd, nVer, nLev, nKLev) Else Return EgtGetKeyLevel_64(nProd, nVer, nLev, nKLev) End If End Function Private Function EgtGetKeyOptions_32(nProd As Integer, nVer As Integer, nLev As Integer, ByRef nOpt2 As UInteger) As Boolean End Function Private Function EgtGetKeyOptions_64(nProd As Integer, nVer As Integer, nLev As Integer, ByRef nOpt2 As UInteger) As Boolean End Function Public Function EgtGetKeyOptions(nProd As Integer, nVer As Integer, nLev As Integer, ByRef nOpt2 As UInteger) As Boolean If IntPtr.Size = 4 Then Return EgtGetKeyOptions_32(nProd, nVer, nLev, nOpt2) Else Return EgtGetKeyOptions_64(nProd, nVer, nLev, nOpt2) End If End Function Private Function EgtGetKeyLeftDays_32(ByRef nLeftDays As Integer) As Boolean End Function Private Function EgtGetKeyLeftDays_64(ByRef nLeftDays As Integer) As Boolean End Function Public Function EgtGetKeyLeftDays(ByRef nLeftDays As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetKeyLeftDays_32(nLeftDays) Else Return EgtGetKeyLeftDays_64(nLeftDays) End If End Function Private Function EgtGetKeyOptLeftDays_32(ByRef nOptLeftDays As Integer) As Boolean End Function Private Function EgtGetKeyOptLeftDays_64(ByRef nOptLeftDays As Integer) As Boolean End Function Public Function EgtGetKeyOptLeftDays(ByRef nOptLeftDays As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetKeyOptLeftDays_32(nOptLeftDays) Else Return EgtGetKeyOptLeftDays_64(nOptLeftDays) End If End Function Private Function EgtGetOsInfo_32(ByRef psOsInfo As IntPtr) As Boolean End Function Private Function EgtGetOsInfo_64(ByRef psOsInfo As IntPtr) As Boolean End Function Public Function EgtGetOsInfo(ByRef sOsInfo As String) As Boolean Dim psOsInfo As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetOsInfo_32(psOsInfo) Else bOk = EgtGetOsInfo_64(psOsInfo) End If If bOk Then sOsInfo = Marshal.PtrToStringUni(psOsInfo) EgtFreeMemory(psOsInfo) Else sOsInfo = String.Empty End If Return bOk End Function Private Function EgtGetCpuInfo_32(ByRef psCpuInfo As IntPtr) As Boolean End Function Private Function EgtGetCpuInfo_64(ByRef psCpuInfo As IntPtr) As Boolean End Function Public Function EgtGetCpuInfo(ByRef sCpuInfo As String) As Boolean Dim psCpuInfo As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetCpuInfo_32(psCpuInfo) Else bOk = EgtGetCpuInfo_64(psCpuInfo) End If If bOk Then sCpuInfo = Marshal.PtrToStringUni(psCpuInfo) EgtFreeMemory(psCpuInfo) Else sCpuInfo = String.Empty End If Return bOk End Function Private Function EgtGetMemoryInfo_32(ByRef psMemInfo As IntPtr) As Boolean End Function Private Function EgtGetMemoryInfo_64(ByRef psMemInfo As IntPtr) As Boolean End Function Public Function EgtGetMemoryInfo(ByRef sMemInfo As String) As Boolean Dim psMemInfo As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetMemoryInfo_32(psMemInfo) Else bOk = EgtGetMemoryInfo_64(psMemInfo) End If If bOk Then sMemInfo = Marshal.PtrToStringUni(psMemInfo) EgtFreeMemory(psMemInfo) Else sMemInfo = String.Empty End If Return bOk End Function Private Function EgtFreeMemory_32(sB As IntPtr) As Boolean End Function Private Function EgtFreeMemory_64(sB As IntPtr) As Boolean End Function Public Function EgtFreeMemory(sB As IntPtr) As Boolean If IntPtr.Size = 4 Then Return EgtFreeMemory_32(sB) Else Return EgtFreeMemory_64(sB) End If End Function Private Function EgtOutLog_32(sMsg As String) As Boolean End Function Private Function EgtOutLog_64(sMsg As String) As Boolean End Function Public Function EgtOutLog(sMsg As String) As Boolean If IntPtr.Size = 4 Then Return EgtOutLog_32(sMsg) Else Return EgtOutLog_64(sMsg) End If End Function Public Delegate Function ProcessEventsCallback(nProg As Integer, nPause As Integer) As Integer Private Function EgtSetProcessEvents_32(Callback As ProcessEventsCallback) As Boolean End Function Private Function EgtSetProcessEvents_64(Callback As ProcessEventsCallback) As Boolean End Function Public Function EgtSetProcessEvents(Callback As ProcessEventsCallback) As Boolean If IntPtr.Size = 4 Then Return EgtSetProcessEvents_32(Callback) Else Return EgtSetProcessEvents_64(Callback) End If End Function Public Delegate Function OutTextCallback(ByRef psText As IntPtr) As Boolean Private Function EgtSetOutText_32(Callback As OutTextCallback) As Boolean End Function Private Function EgtSetOutText_64(Callback As OutTextCallback) As Boolean End Function Public Function EgtSetOutText(Callback As OutTextCallback) As Boolean If IntPtr.Size = 4 Then Return EgtSetOutText_32(Callback) Else Return EgtSetOutText_64(Callback) End If End Function Private Function EgtSetTempDir_32(sTempDir As String) As Boolean End Function Private Function EgtSetTempDir_64(sTempDir As String) As Boolean End Function Public Function EgtSetTempDir(sTempDir As String) As Boolean If IntPtr.Size = 4 Then Return EgtSetTempDir_32(sTempDir) Else Return EgtSetTempDir_64(sTempDir) End If End Function Private Function EgtGetTempDir_32(ByRef psTempDir As IntPtr) As Boolean End Function Private Function EgtGetTempDir_64(ByRef psTempDir As IntPtr) As Boolean End Function Public Function EgtGetTempDir(ByRef sTempDir As String) As Boolean Dim psTempDir As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetTempDir_32(psTempDir) Else bOk = EgtGetTempDir_64(psTempDir) End If If bOk Then sTempDir = Marshal.PtrToStringUni(psTempDir) EgtFreeMemory(psTempDir) Else sTempDir = String.Empty End If Return bOk End Function Private Function EgtSetMainWindowHandle_32(hMainWnd As IntPtr) As Boolean End Function Private Function EgtSetMainWindowHandle_64(hMainWnd As IntPtr) As Boolean End Function Public Function EgtSetMainWindowHandle(hMainWnd As IntPtr) As Boolean If IntPtr.Size = 4 Then Return EgtSetMainWindowHandle_32(hMainWnd) Else Return EgtSetMainWindowHandle_64(hMainWnd) End If End Function Private Function EgtGetStringUtf8FromIni_32(sSec As String, sKey As String, sDef As String, ByRef sVal As IntPtr, sIniFile As String) As Boolean End Function Private Function EgtGetStringUtf8FromIni_64(sSec As String, sKey As String, sDef As String, ByRef sVal As IntPtr, sIniFile As String) As Boolean End Function Public Function EgtGetStringUtf8FromIni(sSec As String, sKey As String, sDef As String, ByRef sVal As String, sIniFile As String) As Boolean Dim psVal As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetStringUtf8FromIni_32(sSec, sKey, sDef, psVal, sIniFile) Else bOk = EgtGetStringUtf8FromIni_64(sSec, sKey, sDef, psVal, sIniFile) End If If bOk Then sVal = Marshal.PtrToStringUni(psVal) EgtFreeMemory(psVal) Else sVal = String.Empty End If Return bOk End Function Private Function EgtWriteStringUtf8toIni_32(sSec As String, sKey As String, sVal As String, sIniFile As String) As Boolean End Function Private Function EgtWriteStringUtf8toIni_64(sSec As String, sKey As String, sVal As String, sIniFile As String) As Boolean End Function Public Function EgtWriteStringUtf8toIni(sSec As String, sKey As String, sVal As String, sIniFile As String) As Boolean If IntPtr.Size = 4 Then Return EgtWriteStringUtf8toIni_32(sSec, sKey, sVal, sIniFile) Else Return EgtWriteStringUtf8toIni_64(sSec, sKey, sVal, sIniFile) End If End Function '---------- UiUnits ------------------------------------------------------------ Private Function EgtSetUiUnits_32(bMM As Boolean) As Boolean End Function Private Function EgtSetUiUnits_64(bMM As Boolean) As Boolean End Function Public Function EgtSetUiUnits(bMM As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtSetUiUnits_32(bMM) Else Return EgtSetUiUnits_64(bMM) End If End Function Private Function EgtUiUnitsAreMM_32() As Boolean End Function Private Function EgtUiUnitsAreMM_64() As Boolean End Function Public Function EgtUiUnitsAreMM() As Boolean If IntPtr.Size = 4 Then Return EgtUiUnitsAreMM_32() Else Return EgtUiUnitsAreMM_64() End If End Function Private Function EgtFromUiUnits_32(dVal As Double) As Double End Function Private Function EgtFromUiUnits_64(dVal As Double) As Double End Function Public Function EgtFromUiUnits(dVal As Double) As Double If IntPtr.Size = 4 Then Return EgtFromUiUnits_32(dVal) Else Return EgtFromUiUnits_64(dVal) End If End Function Private Function EgtToUiUnits_32(dVal As Double) As Double End Function Private Function EgtToUiUnits_64(dVal As Double) As Double End Function Public Function EgtToUiUnits(dVal As Double) As Double If IntPtr.Size = 4 Then Return EgtToUiUnits_32(dVal) Else Return EgtToUiUnits_64(dVal) End If End Function '---------- GeomDb ------------------------------------------------------------- Private Function EgtInitContext_32() As Integer End Function Private Function EgtInitContext_64() As Integer End Function Public Function EgtInitContext() As Integer If IntPtr.Size = 4 Then Return EgtInitContext_32() Else Return EgtInitContext_64() End If End Function Private Function EgtDeleteContext_32(nCtx As Integer) As Boolean End Function Private Function EgtDeleteContext_64(nCtx As Integer) As Boolean End Function Public Function EgtDeleteContext(nCtx As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtDeleteContext_32(nCtx) Else Return EgtDeleteContext_64(nCtx) End If End Function Private Function EgtSetCurrentContext_32(nCtx As Integer) As Boolean End Function Private Function EgtSetCurrentContext_64(nCtx As Integer) As Boolean End Function Public Function EgtSetCurrentContext(nCtx As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSetCurrentContext_32(nCtx) Else Return EgtSetCurrentContext_64(nCtx) End If End Function Private Function EgtResetCurrentContext_32() As Boolean End Function Private Function EgtResetCurrentContext_64() As Boolean End Function Public Function EgtResetCurrentContext() As Boolean If IntPtr.Size = 4 Then Return EgtResetCurrentContext_32() Else Return EgtResetCurrentContext_64() End If End Function Private Function EgtGetCurrentContext_32() As Integer End Function Private Function EgtGetCurrentContext_64() As Integer End Function Public Function EgtGetCurrentContext() As Integer If IntPtr.Size = 4 Then Return EgtGetCurrentContext_32() Else Return EgtGetCurrentContext_64() End If End Function Private Function EgtSetDefaultMaterial_32(ByRef DefCol As Color3d) As Boolean End Function Private Function EgtSetDefaultMaterial_64(ByRef DefCol As Color3d) As Boolean End Function Public Function EgtSetDefaultMaterial(ByRef DefCol As Color3d) As Boolean If IntPtr.Size = 4 Then Return EgtSetDefaultMaterial_32(DefCol) Else Return EgtSetDefaultMaterial_64(DefCol) End If End Function Private Function EgtSetGridFrame_32(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtSetGridFrame_64(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Public Function EgtSetGridFrame(ByRef frRef As Frame3d) As Boolean If IntPtr.Size = 4 Then Return EgtSetGridFrame_32(frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ()) Else Return EgtSetGridFrame_64(frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ()) End If End Function Private Function EgtGetGridFrame_32(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtGetGridFrame_64(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Public Function EgtGetGridFrame() As Frame3d Dim PtOrig As Point3d Dim VtDirX, VtDirY, VtDirZ As Vector3d Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetGridFrame_32(PtOrig, VtDirX, VtDirY, VtDirZ) Else bOk = EgtGetGridFrame_64(PtOrig, VtDirX, VtDirY, VtDirZ) End If If Not bOk Then Dim frRef As New Frame3d Return frRef Else Dim frRef As New Frame3d(PtOrig, VtDirX, VtDirY, VtDirZ) Return frRef End If End Function Public Function EgtGetGridOrigin() As Point3d Dim PtOrig As Point3d Dim VtDirX, VtDirY, VtDirZ As Vector3d If IntPtr.Size = 4 Then EgtGetGridFrame_32(PtOrig, VtDirX, VtDirY, VtDirZ) Else EgtGetGridFrame_64(PtOrig, VtDirX, VtDirY, VtDirZ) End If Return PtOrig End Function Public Function EgtGetGridVersX() As Vector3d Dim PtOrig As Point3d Dim VtDirX, VtDirY, VtDirZ As Vector3d If IntPtr.Size = 4 Then EgtGetGridFrame_32(PtOrig, VtDirX, VtDirY, VtDirZ) Else EgtGetGridFrame_64(PtOrig, VtDirX, VtDirY, VtDirZ) End If Return VtDirX End Function Public Function EgtGetGridVersY() As Vector3d Dim PtOrig As Point3d Dim VtDirX, VtDirY, VtDirZ As Vector3d If IntPtr.Size = 4 Then EgtGetGridFrame_32(PtOrig, VtDirX, VtDirY, VtDirZ) Else EgtGetGridFrame_64(PtOrig, VtDirX, VtDirY, VtDirZ) End If Return VtDirY End Function Public Function EgtGetGridVersZ() As Vector3d Dim PtOrig As Point3d Dim VtDirX, VtDirY, VtDirZ As Vector3d If IntPtr.Size = 4 Then EgtGetGridFrame_32(PtOrig, VtDirX, VtDirY, VtDirZ) Else EgtGetGridFrame_64(PtOrig, VtDirX, VtDirY, VtDirZ) End If Return VtDirZ End Function Private Function EgtSetCurrFilePath_32(sFilePath As String) As Boolean End Function Private Function EgtSetCurrFilePath_64(sFilePath As String) As Boolean End Function Public Function EgtSetCurrFilePath(sFilePath As String) As Boolean If IntPtr.Size = 4 Then Return EgtSetCurrFilePath_32(sFilePath) Else Return EgtSetCurrFilePath_64(sFilePath) End If End Function Private Function EgtGetCurrFilePath_32(ByRef psFilePath As IntPtr) As Boolean End Function Private Function EgtGetCurrFilePath_64(ByRef psFilePath As IntPtr) As Boolean End Function Public Function EgtGetCurrFilePath(ByRef sFilePath As String) As Boolean Dim psFilePath As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetCurrFilePath_32(psFilePath) Else bOk = EgtGetCurrFilePath_64(psFilePath) End If If bOk Then sFilePath = Marshal.PtrToStringUni(psFilePath) EgtFreeMemory(psFilePath) Else sFilePath = String.Empty End If Return bOk End Function Private Function EgtEnableModified_32() As Boolean End Function Private Function EgtEnableModified_64() As Boolean End Function Public Function EgtEnableModified() As Boolean If IntPtr.Size = 4 Then Return EgtEnableModified_32() Else Return EgtEnableModified_64() End If End Function Private Function EgtDisableModified_32() As Boolean End Function Private Function EgtDisableModified_64() As Boolean End Function Public Function EgtDisableModified() As Boolean If IntPtr.Size = 4 Then Return EgtDisableModified_32() Else Return EgtDisableModified_64() End If End Function Private Function EgtGetEnableModified_32() As Boolean End Function Private Function EgtGetEnableModified_64() As Boolean End Function Public Function EgtGetEnableModified() As Boolean If IntPtr.Size = 4 Then Return EgtGetEnableModified_32() Else Return EgtGetEnableModified_64() End If End Function Private Function EgtSetModified_32() As Boolean End Function Private Function EgtSetModified_64() As Boolean End Function Public Function EgtSetModified() As Boolean If IntPtr.Size = 4 Then Return EgtSetModified_32() Else Return EgtSetModified_64() End If End Function Private Function EgtResetModified_32() As Boolean End Function Private Function EgtResetModified_64() As Boolean End Function Public Function EgtResetModified() As Boolean If IntPtr.Size = 4 Then Return EgtResetModified_32() Else Return EgtResetModified_64() End If End Function Private Function EgtGetModified_32() As Boolean End Function Private Function EgtGetModified_64() As Boolean End Function Public Function EgtGetModified() As Boolean If IntPtr.Size = 4 Then Return EgtGetModified_32() Else Return EgtGetModified_64() End If End Function Private Function EgtNewFile_32() As Boolean End Function Private Function EgtNewFile_64() As Boolean End Function Public Function EgtNewFile() As Boolean If IntPtr.Size = 4 Then Return EgtNewFile_32() Else Return EgtNewFile_64() End If End Function Private Function EgtOpenFile_32(sFilePath As String) As Boolean End Function Private Function EgtOpenFile_64(sFilePath As String) As Boolean End Function Public Function EgtOpenFile(sFilePath As String) As Boolean If IntPtr.Size = 4 Then Return EgtOpenFile_32(sFilePath) Else Return EgtOpenFile_64(sFilePath) End If End Function Private Function EgtInsertFile_32(sFilePath As String) As Boolean End Function Private Function EgtInsertFile_64(sFilePath As String) As Boolean End Function Public Function EgtInsertFile(sFilePath As String) As Boolean If IntPtr.Size = 4 Then Return EgtInsertFile_32(sFilePath) Else Return EgtInsertFile_64(sFilePath) End If End Function Private Function EgtSaveFile_32(sFilePath As String, nFlag As NGE) As Boolean End Function Private Function EgtSaveFile_64(sFilePath As String, nFlag As NGE) As Boolean End Function Public Function EgtSaveFile(sFilePath As String, nFlag As NGE) As Boolean If IntPtr.Size = 4 Then Return EgtSaveFile_32(sFilePath, nFlag) Else Return EgtSaveFile_64(sFilePath, nFlag) End If End Function Private Function EgtSaveObjToFile_32(nId As Integer, sFilePath As String, nFlag As NGE) As Boolean End Function Private Function EgtSaveObjToFile_64(nId As Integer, sFilePath As String, nFlag As NGE) As Boolean End Function Public Function EgtSaveObjToFile(nId As Integer, sFilePath As String, nFlag As NGE) As Boolean If IntPtr.Size = 4 Then Return EgtSaveObjToFile_32(nId, sFilePath, nFlag) Else Return EgtSaveObjToFile_64(nId, sFilePath, nFlag) End If End Function '---------- Exchange ----------------------------------------------------------- Private Function EgtGetFileType_32(sFilePath As String) As Integer End Function Private Function EgtGetFileType_64(sFilePath As String) As Integer End Function Public Function EgtGetFileType(sFilePath As String) As Integer If IntPtr.Size = 4 Then Return EgtGetFileType_32(sFilePath) Else Return EgtGetFileType_64(sFilePath) End If End Function Private Function EgtImportBtl_32(sFilePath As String, nFlag As Integer) As Boolean End Function Private Function EgtImportBtl_64(sFilePath As String, nFlag As Integer) As Boolean End Function Public Function EgtImportBtl(sFilePath As String, Optional nFlag As Integer = EIB_FL.NONE) As Boolean If IntPtr.Size = 4 Then Return EgtImportBtl_32(sFilePath, nFlag) Else Return EgtImportBtl_64(sFilePath, nFlag) End If End Function Private Function EgtImportCnc_32(sFilePath As String, nFlag As Integer) As Boolean End Function Private Function EgtImportCnc_64(sFilePath As String, nFlag As Integer) As Boolean End Function Public Function EgtImportCnc(sFilePath As String, Optional nFlag As Integer = EIC_FL.NONE) As Boolean If IntPtr.Size = 4 Then Return EgtImportCnc_32(sFilePath, nFlag) Else Return EgtImportCnc_64(sFilePath, nFlag) End If End Function Private Function EgtImportCsf_32(sFilePath As String) As Boolean End Function Private Function EgtImportCsf_64(sFilePath As String) As Boolean End Function Public Function EgtImportCsf(sFilePath As String) As Boolean If IntPtr.Size = 4 Then Return EgtImportCsf_32(sFilePath) Else Return EgtImportCsf_64(sFilePath) End If End Function Private Function EgtImportDxf_32(sFilePath As String, dScaleFactor As Double) As Boolean End Function Private Function EgtImportDxf_64(sFilePath As String, dScaleFactor As Double) As Boolean End Function Public Function EgtImportDxf(sFilePath As String, dScaleFactor As Double) As Boolean If IntPtr.Size = 4 Then Return EgtImportDxf_32(sFilePath, dScaleFactor) Else Return EgtImportDxf_64(sFilePath, dScaleFactor) End If End Function Private Function EgtImportPnt_32(sFilePath As String, nFlag As Integer) As Boolean End Function Private Function EgtImportPnt_64(sFilePath As String, nFlag As Integer) As Boolean End Function Public Function EgtImportPnt(sFilePath As String, Optional nFlag As Integer = EIC_FL.NONE) As Boolean If IntPtr.Size = 4 Then Return EgtImportPnt_32(sFilePath, nFlag) Else Return EgtImportPnt_64(sFilePath, nFlag) End If End Function Private Function EgtImportStl_32(sFilePath As String, dScaleFactor As Double) As Boolean End Function Private Function EgtImportStl_64(sFilePath As String, dScaleFactor As Double) As Boolean End Function Public Function EgtImportStl(sFilePath As String, dScaleFactor As Double) As Boolean If IntPtr.Size = 4 Then Return EgtImportStl_32(sFilePath, dScaleFactor) Else Return EgtImportStl_64(sFilePath, dScaleFactor) End If End Function Private Function EgtExportDxf_32(nId As Integer, sFilePath As String) As Boolean End Function Private Function EgtExportDxf_64(nId As Integer, sFilePath As String) As Boolean End Function Public Function EgtExportDxf(nId As Integer, sFilePath As String) As Boolean If IntPtr.Size = 4 Then Return EgtExportDxf_32(nId, sFilePath) Else Return EgtExportDxf_64(nId, sFilePath) End If End Function Private Function EgtExportStl_32(nId As Integer, sFilePath As String) As Boolean End Function Private Function EgtExportStl_64(nId As Integer, sFilePath As String) As Boolean End Function Public Function EgtExportStl(nId As Integer, sFilePath As String) As Boolean If IntPtr.Size = 4 Then Return EgtExportStl_32(nId, sFilePath) Else Return EgtExportStl_64(nId, sFilePath) End If End Function Private Function EgtExportSvg_32(nId As Integer, sFilePath As String) As Boolean End Function Private Function EgtExportSvg_64(nId As Integer, sFilePath As String) As Boolean End Function Public Function EgtExportSvg(nId As Integer, sFilePath As String) As Boolean If IntPtr.Size = 4 Then Return EgtExportSvg_32(nId, sFilePath) Else Return EgtExportSvg_64(nId, sFilePath) End If End Function '---------- Tsc Executor ------------------------------------------------------- Private Function EgtInitTscExec_32() As Boolean End Function Private Function EgtInitTscExec_64() As Boolean End Function Public Function EgtInitTscExec() As Boolean If IntPtr.Size = 4 Then Return EgtInitTscExec_32() Else Return EgtInitTscExec_64() End If End Function Private Function EgtTscExecFile_32(sFilePath As String) As Boolean End Function Private Function EgtTscExecFile_64(sFilePath As String) As Boolean End Function Public Function EgtTscExecFile(sFilePath As String) As Boolean If IntPtr.Size = 4 Then Return EgtTscExecFile_32(sFilePath) Else Return EgtTscExecFile_64(sFilePath) End If End Function Private Function EgtTscExecLine_32(sLine As String) As Boolean End Function Private Function EgtTscExecLine_64(sLine As String) As Boolean End Function Public Function EgtTscExecLine(sLine As String) As Boolean If IntPtr.Size = 4 Then Return EgtTscExecLine_32(sLine) Else Return EgtTscExecLine_64(sLine) End If End Function '---------- LUA Executor ------------------------------------------------------- Private Function EgtLuaCreateGlobTable_32(sVar As String) As Boolean End Function Private Function EgtLuaCreateGlobTable_64(sVar As String) As Boolean End Function Public Function EgtLuaCreateGlobTable(sVar As String) As Boolean If IntPtr.Size = 4 Then Return EgtLuaCreateGlobTable_32(sVar) Else Return EgtLuaCreateGlobTable_64(sVar) End If End Function Private Function EgtLuaSetGlobBoolVar_32(sVar As String, bVal As Boolean) As Boolean End Function Private Function EgtLuaSetGlobBoolVar_64(sVar As String, bVal As Boolean) As Boolean End Function Public Function EgtLuaSetGlobBoolVar(sVar As String, bVal As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtLuaSetGlobBoolVar_32(sVar, bVal) Else Return EgtLuaSetGlobBoolVar_64(sVar, bVal) End If End Function Private Function EgtLuaSetGlobIntVar_32(sVar As String, nVal As Integer) As Boolean End Function Private Function EgtLuaSetGlobIntVar_64(sVar As String, nVal As Integer) As Boolean End Function Public Function EgtLuaSetGlobIntVar(sVar As String, nVal As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtLuaSetGlobIntVar_32(sVar, nVal) Else Return EgtLuaSetGlobIntVar_64(sVar, nVal) End If End Function Private Function EgtLuaSetGlobNumVar_32(sVar As String, dVal As Double) As Boolean End Function Private Function EgtLuaSetGlobNumVar_64(sVar As String, dVal As Double) As Boolean End Function Public Function EgtLuaSetGlobNumVar(sVar As String, dVal As Double) As Boolean If IntPtr.Size = 4 Then Return EgtLuaSetGlobNumVar_32(sVar, dVal) Else Return EgtLuaSetGlobNumVar_64(sVar, dVal) End If End Function Private Function EgtLuaSetGlobStringVar_32(sVar As String, sVal As String) As Boolean End Function Private Function EgtLuaSetGlobStringVar_64(sVar As String, sVal As String) As Boolean End Function Public Function EgtLuaSetGlobStringVar(sVar As String, sVal As String) As Boolean If IntPtr.Size = 4 Then Return EgtLuaSetGlobStringVar_32(sVar, sVal) Else Return EgtLuaSetGlobStringVar_64(sVar, sVal) End If End Function Private Function EgtLuaSetGlobVectorVar_32(sVar As String, ByRef vtVal As Vector3d) As Boolean End Function Private Function EgtLuaSetGlobVectorVar_64(sVar As String, ByRef vtVal As Vector3d) As Boolean End Function Public Function EgtLuaSetGlobVectorVar(sVar As String, vtVal As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtLuaSetGlobVectorVar_32(sVar, vtVal) Else Return EgtLuaSetGlobVectorVar_64(sVar, vtVal) End If End Function Private Function EgtLuaSetGlobPointVar_32(sVar As String, ByRef ptVal As Point3d) As Boolean End Function Private Function EgtLuaSetGlobPointVar_64(sVar As String, ByRef ptVal As Point3d) As Boolean End Function Public Function EgtLuaSetGlobPointVar(sVar As String, ptVal As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtLuaSetGlobPointVar_32(sVar, ptVal) Else Return EgtLuaSetGlobPointVar_64(sVar, ptVal) End If End Function Private Function EgtLuaGetGlobBoolVar_32(sVar As String, ByRef bVal As Boolean) As Boolean End Function Private Function EgtLuaGetGlobBoolVar_64(sVar As String, ByRef bVal As Boolean) As Boolean End Function Public Function EgtLuaGetGlobBoolVar(sVar As String, ByRef bVal As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtLuaGetGlobBoolVar_32(sVar, bVal) Else Return EgtLuaGetGlobBoolVar_64(sVar, bVal) End If End Function Private Function EgtLuaGetGlobIntVar_32(sVar As String, ByRef nVal As Integer) As Boolean End Function Private Function EgtLuaGetGlobIntVar_64(sVar As String, ByRef nVal As Integer) As Boolean End Function Public Function EgtLuaGetGlobIntVar(sVar As String, ByRef nVal As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtLuaGetGlobIntVar_32(sVar, nVal) Else Return EgtLuaGetGlobIntVar_64(sVar, nVal) End If End Function Private Function EgtLuaGetGlobNumVar_32(sVar As String, ByRef dVal As Double) As Boolean End Function Private Function EgtLuaGetGlobNumVar_64(sVar As String, ByRef dVal As Double) As Boolean End Function Public Function EgtLuaGetGlobNumVar(sVar As String, ByRef dVal As Double) As Boolean If IntPtr.Size = 4 Then Return EgtLuaGetGlobNumVar_32(sVar, dVal) Else Return EgtLuaGetGlobNumVar_64(sVar, dVal) End If End Function Private Function EgtLuaGetGlobStringVar_32(sVar As String, ByRef psVal As IntPtr) As Boolean End Function Private Function EgtLuaGetGlobStringVar_64(sVar As String, ByRef psVal As IntPtr) As Boolean End Function Public Function EgtLuaGetGlobStringVar(sVar As String, ByRef sVal As String) As Boolean Dim psVal As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtLuaGetGlobStringVar_32(sVar, psVal) Else bOk = EgtLuaGetGlobStringVar_64(sVar, psVal) End If If bOk Then sVal = Marshal.PtrToStringUni(psVal) EgtFreeMemory(psVal) Else sVal = String.Empty End If Return bOk End Function Private Function EgtLuaGetGlobVectorVar_32(sVar As String, ByRef vtVal As Vector3d) As Boolean End Function Private Function EgtLuaGetGlobVectorVar_64(sVar As String, ByRef vtVal As Vector3d) As Boolean End Function Public Function EgtLuaGetGlobVectorVar(sVar As String, ByRef vtVal As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtLuaGetGlobVectorVar_32(sVar, vtVal) Else Return EgtLuaGetGlobVectorVar_64(sVar, vtVal) End If End Function Private Function EgtLuaGetGlobPointVar_32(sVar As String, ByRef ptVal As Point3d) As Boolean End Function Private Function EgtLuaGetGlobPointVar_64(sVar As String, ByRef ptVal As Point3d) As Boolean End Function Public Function EgtLuaGetGlobPointVar(sVar As String, ByRef ptVal As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtLuaGetGlobPointVar_32(sVar, ptVal) Else Return EgtLuaGetGlobPointVar_64(sVar, ptVal) End If End Function Private Function EgtLuaResetGlobVar_32(sVar As String) As Boolean End Function Private Function EgtLuaResetGlobVar_64(sVar As String) As Boolean End Function Public Function EgtLuaResetGlobVar(sVar As String) As Boolean If IntPtr.Size = 4 Then Return EgtLuaResetGlobVar_32(sVar) Else Return EgtLuaResetGlobVar_64(sVar) End If End Function Private Function EgtLuaCallFunction_32(sFun As String) As Boolean End Function Private Function EgtLuaCallFunction_64(sFun As String) As Boolean End Function Public Function EgtLuaCallFunction(sFun As String) As Boolean If IntPtr.Size = 4 Then Return EgtLuaCallFunction_32(sFun) Else Return EgtLuaCallFunction_64(sFun) End If End Function Private Function EgtLuaEvalNumExpr_32(sLine As String, ByRef dVal As Double) As Boolean End Function Private Function EgtLuaEvalNumExpr_64(sLine As String, ByRef dVal As Double) As Boolean End Function Public Function EgtLuaEvalNumExpr(sLine As String, ByRef dVal As Double) As Boolean If IntPtr.Size = 4 Then Return EgtLuaEvalNumExpr_32(sLine, dVal) Else Return EgtLuaEvalNumExpr_64(sLine, dVal) End If End Function Private Function EgtLuaEvalStringExpr_32(sLine As String, ByRef psVal As IntPtr) As Boolean End Function Private Function EgtLuaEvalStringExpr_64(sLine As String, ByRef psVal As IntPtr) As Boolean End Function Public Function EgtLuaEvalStringExpr(sLine As String, ByRef sVal As String) As Boolean Dim psVal As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtLuaEvalStringExpr_32(sLine, psVal) Else bOk = EgtLuaEvalStringExpr_64(sLine, psVal) End If If bOk Then sVal = Marshal.PtrToStringUni(psVal) EgtFreeMemory(psVal) Else sVal = String.Empty End If Return bOk End Function Private Function EgtLuaExecLine_32(sLine As String) As Boolean End Function Private Function EgtLuaExecLine_64(sLine As String) As Boolean End Function Public Function EgtLuaExecLine(sLine As String) As Boolean If IntPtr.Size = 4 Then Return EgtLuaExecLine_32(sLine) Else Return EgtLuaExecLine_64(sLine) End If End Function Private Function EgtLuaExecFile_32(sFilePath As String) As Boolean End Function Private Function EgtLuaExecFile_64(sFilePath As String) As Boolean End Function Public Function EgtLuaExecFile(sFilePath As String) As Boolean If IntPtr.Size = 4 Then Return EgtLuaExecFile_32(sFilePath) Else Return EgtLuaExecFile_64(sFilePath) End If End Function Private Function EgtLuaRequire_32(sFilePath As String) As Boolean End Function Private Function EgtLuaRequire_64(sFilePath As String) As Boolean End Function Public Function EgtLuaRequire(sFilePath As String) As Boolean If IntPtr.Size = 4 Then Return EgtLuaRequire_32(sFilePath) Else Return EgtLuaRequire_64(sFilePath) End If End Function Private Function EgtLuaGetLastError_32(ByRef psError As IntPtr) As Boolean End Function Private Function EgtLuaGetLastError_64(ByRef psError As IntPtr) As Boolean End Function Public Function EgtLuaGetLastError(ByRef sError As String) As Boolean Dim psError As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtLuaGetLastError_32(psError) Else bOk = EgtLuaGetLastError_64(psError) End If If bOk Then sError = Marshal.PtrToStringUni(psError) EgtFreeMemory(psError) Else sError = String.Empty End If Return bOk End Function '---------- GeomDb Objects Create ---------------------------------------------- Private Function EgtCreateGroup_32(nParentId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, nRefType As GDB_RT) As Integer End Function Private Function EgtCreateGroup_64(nParentId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, nRefType As GDB_RT) As Integer End Function Public Function EgtCreateGroup(nParentId As Integer, ByRef frRef As Frame3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateGroup_32(nParentId, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ(), nRefType) Else Return EgtCreateGroup_64(nParentId, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ(), nRefType) End If End Function Public Function EgtCreateGroup(nParentId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtCreateGroup_32(nParentId, Point3d.ORIG(), Vector3d.X_AX, Vector3d.Y_AX, Vector3d.Z_AX, GDB_RT.LOC) Else Return EgtCreateGroup_64(nParentId, Point3d.ORIG(), Vector3d.X_AX, Vector3d.Y_AX, Vector3d.Z_AX, GDB_RT.LOC) End If End Function Private Function EgtCreateGeoPoint_32(nParentId As Integer, ByRef PtP As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateGeoPoint_64(nParentId As Integer, ByRef PtP As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateGeoPoint(nParentId As Integer, ByRef PtP As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateGeoPoint_32(nParentId, PtP, nRefType) Else Return EgtCreateGeoPoint_64(nParentId, PtP, nRefType) End If End Function Private Function EgtCreateGeoVector_32(nParentId As Integer, ByRef vtV As Vector3d, ByRef PtB As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateGeoVector_64(nParentId As Integer, ByRef vtV As Vector3d, ByRef PtB As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateGeoVector(nParentId As Integer, ByRef vtV As Vector3d, ByRef PtB As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateGeoVector_32(nParentId, vtV, PtB, nRefType) Else Return EgtCreateGeoVector_64(nParentId, vtV, PtB, nRefType) End If End Function Private Function EgtCreateGeoFrame_32(nParentId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, nRefType As GDB_RT) As Integer End Function Private Function EgtCreateGeoFrame_64(nParentId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, nRefType As GDB_RT) As Integer End Function Public Function EgtCreateGeoFrame(nParentId As Integer, ByRef frRef As Frame3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateGeoFrame_32(nParentId, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ(), nRefType) Else Return EgtCreateGeoFrame_64(nParentId, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ(), nRefType) End If End Function Private Function EgtCreateLine_32(nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateLine_64(nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateLine(nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateLine_32(nParentId, PtStart, PtEnd, nRefType) Else Return EgtCreateLine_64(nParentId, PtStart, PtEnd, nRefType) End If End Function Private Function EgtCreateLineEx_32(nParentId As Integer, ByRef PtStart As Point3d, nSepS As SEP, nIdS As Integer, ByRef PtEnd As Point3d, nSepE As SEP, nIdE As Integer, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateLineEx_64(nParentId As Integer, ByRef PtStart As Point3d, nSepS As SEP, nIdS As Integer, ByRef PtEnd As Point3d, nSepE As SEP, nIdE As Integer, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateLineEx(nParentId As Integer, ByRef PtStart As Point3d, nSepS As SEP, nIdS As Integer, ByRef PtEnd As Point3d, nSepE As SEP, nIdE As Integer, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateLineEx_32(nParentId, PtStart, nSepS, nIdS, PtEnd, nSepE, nIdE, nRefType) Else Return EgtCreateLineEx_64(nParentId, PtStart, nSepS, nIdS, PtEnd, nSepE, nIdE, nRefType) End If End Function Private Function EgtCreateLinePDL_32(nParentId As Integer, ByRef PtStart As Point3d, dDirDeg As Double, dLen As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateLinePDL_64(nParentId As Integer, ByRef PtStart As Point3d, dDirDeg As Double, dLen As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateLinePDL(nParentId As Integer, ByRef PtStart As Point3d, dDirDeg As Double, dLen As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateLinePDL_32(nParentId, PtStart, dDirDeg, dLen, nRefType) Else Return EgtCreateLinePDL_64(nParentId, PtStart, dDirDeg, dLen, nRefType) End If End Function Private Function EgtCreateLinePVL_32(nParentId As Integer, ByRef PtStart As Point3d, ByRef VtDir As Vector3d, dLen As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateLinePVL_64(nParentId As Integer, ByRef PtStart As Point3d, ByRef VtDir As Vector3d, dLen As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateLinePVL(nParentId As Integer, ByRef PtStart As Point3d, ByRef VtDir As Vector3d, dLen As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateLinePVL_32(nParentId, PtStart, VtDir, dLen, nRefType) Else Return EgtCreateLinePVL_64(nParentId, PtStart, VtDir, dLen, nRefType) End If End Function Private Function EgtCreateCircle_32(nParentId As Integer, ByRef PtCen As Point3d, dRad As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateCircle_64(nParentId As Integer, ByRef PtCen As Point3d, dRad As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateCircle(nParentId As Integer, ByRef PtCen As Point3d, dRad As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateCircle_32(nParentId, PtCen, dRad, nRefType) Else Return EgtCreateCircle_64(nParentId, PtCen, dRad, nRefType) End If End Function Private Function EgtCreateCircleCP_32(nParentId As Integer, ByRef PtCen As Point3d, ByRef PtOn As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateCircleCP_64(nParentId As Integer, ByRef PtCen As Point3d, ByRef PtOn As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateCircleCP(nParentId As Integer, ByRef PtCen As Point3d, ByRef PtOn As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateCircleCP_32(nParentId, PtCen, PtOn, nRefType) Else Return EgtCreateCircleCP_64(nParentId, PtCen, PtOn, nRefType) End If End Function Private Function EgtCreateCircleCPEx_32(nParentId As Integer, ByRef PtCen As Point3d, ByRef PtOn As Point3d, nSepO As SEP, nIdO As Integer, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateCircleCPEx_64(nParentId As Integer, ByRef PtCen As Point3d, ByRef PtOn As Point3d, nSepO As SEP, nIdO As Integer, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateCircleCPEx(nParentId As Integer, ByRef PtCen As Point3d, ByRef PtOn As Point3d, nSepO As SEP, nIdO As Integer, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateCircleCPEx_32(nParentId, PtCen, PtOn, nSepO, nIdO, nRefType) Else Return EgtCreateCircleCPEx_64(nParentId, PtCen, PtOn, nSepO, nIdO, nRefType) End If End Function Private Function EgtCreateArc_32(nParentId As Integer, ByRef PtCen As Point3d, dRad As Double, dAngIniDeg As Double, dAngCenDeg As Double, dDeltaN As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateArc_64(nParentId As Integer, ByRef PtCen As Point3d, dRad As Double, dAngIniDeg As Double, dAngCenDeg As Double, dDeltaN As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateArc(nParentId As Integer, ByRef PtCen As Point3d, dRad As Double, dAngIniDeg As Double, dAngCenDeg As Double, dDeltaN As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateArc_32(nParentId, PtCen, dRad, dAngIniDeg, dAngCenDeg, dDeltaN, nRefType) Else Return EgtCreateArc_64(nParentId, PtCen, dRad, dAngIniDeg, dAngCenDeg, dDeltaN, nRefType) End If End Function Private Function EgtCreateArc3P_32(nParentId As Integer, ByRef PtStart As Point3d, ByRef PtMid As Point3d, ByRef PtEnd As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateArc3P_64(nParentId As Integer, ByRef PtStart As Point3d, ByRef PtMid As Point3d, ByRef PtEnd As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateArc3P(nParentId As Integer, ByRef PtStart As Point3d, ByRef PtMid As Point3d, ByRef PtEnd As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateArc3P_32(nParentId, PtStart, PtMid, PtEnd, nRefType) Else Return EgtCreateArc3P_64(nParentId, PtStart, PtMid, PtEnd, nRefType) End If End Function Private Function EgtCreateArcC2P_32(nParentId As Integer, ByRef PtCen As Point3d, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateArcC2P_64(nParentId As Integer, ByRef PtCen As Point3d, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateArcC2P(nParentId As Integer, ByRef PtCen As Point3d, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateArcC2P_32(nParentId, PtCen, PtStart, PtEnd, nRefType) Else Return EgtCreateArcC2P_64(nParentId, PtCen, PtStart, PtEnd, nRefType) End If End Function Private Function EgtCreateArcC2PEx_32(nParentId As Integer, ByRef PtCen As Point3d, ByRef PtStart As Point3d, nSepS As SEP, nIdS As Integer, ByRef PtEnd As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateArcC2PEx_64(nParentId As Integer, ByRef PtCen As Point3d, ByRef PtStart As Point3d, nSepS As SEP, nIdS As Integer, ByRef PtEnd As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateArcC2PEx(nParentId As Integer, ByRef PtCen As Point3d, ByRef PtStart As Point3d, nSepS As SEP, nIdS As Integer, ByRef PtEnd As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateArcC2PEx_32(nParentId, PtCen, PtStart, nSepS, nIdS, PtEnd, nRefType) Else Return EgtCreateArcC2PEx_64(nParentId, PtCen, PtStart, nSepS, nIdS, PtEnd, nRefType) End If End Function Private Function EgtCreateArc2PD_32(nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, dDirSDeg As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateArc2PD_64(nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, dDirSDeg As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateArc2PD(nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, dDirSDeg As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateArc2PD_32(nParentId, PtStart, PtEnd, dDirSDeg, nRefType) Else Return EgtCreateArc2PD_64(nParentId, PtStart, PtEnd, dDirSDeg, nRefType) End If End Function Private Function EgtCreateArc2PDEx_32(nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, nSepE As SEP, nIdE As Integer, dDirSDeg As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateArc2PDEx_64(nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, nSepE As SEP, nIdE As Integer, dDirSDeg As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateArc2PDEx(nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, nSepE As SEP, nIdE As Integer, dDirSDeg As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateArc2PDEx_32(nParentId, PtStart, PtEnd, nSepE, nIdE, dDirSDeg, nRefType) Else Return EgtCreateArc2PDEx_64(nParentId, PtStart, PtEnd, nSepE, nIdE, dDirSDeg, nRefType) End If End Function Private Function EgtCreateArc2PV_32(nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, ByRef VtDirS As Vector3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateArc2PV_64(nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, ByRef VtDirS As Vector3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateArc2PV(nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, ByRef VtDirS As Vector3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateArc2PV_32(nParentId, PtStart, PtEnd, VtDirS, nRefType) Else Return EgtCreateArc2PV_64(nParentId, PtStart, PtEnd, VtDirS, nRefType) End If End Function Private Function EgtCreateBiArc_32(nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, dDirSDeg As Double, dDirEDeg As Double, dPar As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateBiArc_64(nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, dDirSDeg As Double, dDirEDeg As Double, dPar As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateBiArc(nParentId As Integer, ByRef PtStart As Point3d, ByRef PtEnd As Point3d, dDirSDeg As Double, dDirEDeg As Double, dPar As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateBiArc_32(nParentId, PtStart, PtEnd, dDirSDeg, dDirEDeg, dPar, nRefType) Else Return EgtCreateBiArc_64(nParentId, PtStart, PtEnd, dDirSDeg, dDirEDeg, dPar, nRefType) End If End Function Private Function EgtCreateCurveFillet_32(nParentId As Integer, nCrv1 As Integer, ByRef PtNear1 As Point3d, nCrv2 As Integer, ByRef PtNear2 As Point3d, dRad As Double, bTrimExt As Boolean, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateCurveFillet_64(nParentId As Integer, nCrv1 As Integer, ByRef PtNear1 As Point3d, nCrv2 As Integer, ByRef PtNear2 As Point3d, dRad As Double, bTrimExt As Boolean, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateCurveFillet(nParentId As Integer, nCrv1 As Integer, ByRef PtNear1 As Point3d, nCrv2 As Integer, ByRef PtNear2 As Point3d, dRad As Double, bTrimExt As Boolean, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateCurveFillet_32(nParentId, nCrv1, PtNear1, nCrv2, PtNear2, dRad, bTrimExt, nRefType) Else Return EgtCreateCurveFillet_64(nParentId, nCrv1, PtNear1, nCrv2, PtNear2, dRad, bTrimExt, nRefType) End If End Function Private Function EgtCreateCurveChamfer_32(nParentId As Integer, nCrv1 As Integer, ByRef PtNear1 As Point3d, nCrv2 As Integer, ByRef PtNear2 As Point3d, dDist As Double, bTrimExt As Boolean, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateCurveChamfer_64(nParentId As Integer, nCrv1 As Integer, ByRef PtNear1 As Point3d, nCrv2 As Integer, ByRef PtNear2 As Point3d, dDist As Double, bTrimExt As Boolean, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateCurveChamfer(nParentId As Integer, nCrv1 As Integer, ByRef PtNear1 As Point3d, nCrv2 As Integer, ByRef PtNear2 As Point3d, dDist As Double, bTrimExt As Boolean, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateCurveChamfer_32(nParentId, nCrv1, PtNear1, nCrv2, PtNear2, dDist, bTrimExt, nRefType) Else Return EgtCreateCurveChamfer_64(nParentId, nCrv1, PtNear1, nCrv2, PtNear2, dDist, bTrimExt, nRefType) End If End Function Private Function EgtCreateCurveCompo_32(nParentId As Integer, nNumCrv As Integer, nCrvId() As Integer, bCrvErase As Boolean) As Integer End Function Private Function EgtCreateCurveCompo_64(nParentId As Integer, nNumCrv As Integer, nCrvId() As Integer, bCrvErase As Boolean) As Integer End Function Public Function EgtCreateCurveCompo(nParentId As Integer, nCrvId() As Integer, bCrvErase As Boolean) As Integer If IntPtr.Size = 4 Then Return EgtCreateCurveCompo_32(nParentId, nCrvId.Count(), nCrvId, bCrvErase) Else Return EgtCreateCurveCompo_64(nParentId, nCrvId.Count(), nCrvId, bCrvErase) End If End Function Public Function EgtCreateCurveCompo(nParentId As Integer, nCrvId As Integer, bCrvErase As Boolean) As Integer Return EgtCreateCurveCompo(nParentId, {nCrvId}, bCrvErase) End Function Private Function EgtCreateCurveCompoByChain_32(nParentId As Integer, nNumCrv As Integer, nCrvId() As Integer, ByRef PtNearStart As Point3d, bCrvErase As Boolean, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateCurveCompoByChain_64(nParentId As Integer, nNumCrv As Integer, nCrvId() As Integer, ByRef PtNearStart As Point3d, bCrvErase As Boolean, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateCurveCompoByChain(nParentId As Integer, nNumCrv As Integer, nCrvId() As Integer, ByRef PtNearStart As Point3d, bCrvErase As Boolean, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateCurveCompoByChain_32(nParentId, nNumCrv, nCrvId, PtNearStart, bCrvErase, nRefType) Else Return EgtCreateCurveCompoByChain_64(nParentId, nNumCrv, nCrvId, PtNearStart, bCrvErase, nRefType) End If End Function Public Function EgtCreateCurveCompoByChain(nParentId As Integer, nCrvId() As Integer, ByRef PtNearStart As Point3d, bCrvErase As Boolean, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer Return EgtCreateCurveCompoByChain(nParentId, nCrvId.Count(), nCrvId, PtNearStart, bCrvErase, nRefType) End Function Private Function EgtCreateCurveCompoByReorder_32(nParentId As Integer, nNumCrv As Integer, nCrvId() As Integer, ByRef PtNearStart As Point3d, bCrvErase As Boolean, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateCurveCompoByReorder_64(nParentId As Integer, nNumCrv As Integer, nCrvId() As Integer, ByRef PtNearStart As Point3d, bCrvErase As Boolean, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateCurveCompoByReorder(nParentId As Integer, nNumCrv As Integer, nCrvId() As Integer, ByRef PtNearStart As Point3d, bCrvErase As Boolean, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateCurveCompoByReorder_32(nParentId, nNumCrv, nCrvId, PtNearStart, bCrvErase, nRefType) Else Return EgtCreateCurveCompoByReorder_64(nParentId, nNumCrv, nCrvId, PtNearStart, bCrvErase, nRefType) End If End Function Public Function EgtCreateCurveCompoByReorder(nParentId As Integer, nCrvId() As Integer, ByRef PtNearStart As Point3d, bCrvErase As Boolean, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer Return EgtCreateCurveCompoByReorder_32(nParentId, nCrvId.Count(), nCrvId, PtNearStart, bCrvErase, nRefType) End Function Private Function EgtCreateRectangle2P_32(nParentId As Integer, ByRef PtStart As Point3d, ByRef PtCross As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateRectangle2P_64(nParentId As Integer, ByRef PtStart As Point3d, ByRef PtCross As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateRectangle2P(nParentId As Integer, ByRef PtStart As Point3d, ByRef PtCross As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateRectangle2P_32(nParentId, PtStart, PtCross, nRefType) Else Return EgtCreateRectangle2P_64(nParentId, PtStart, PtCross, nRefType) End If End Function Private Function EgtCreateRectangle3P_32(nParentId As Integer, ByRef PtStart As Point3d, ByRef PtCross As Point3d, ByRef PtDir As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateRectangle3P_64(nParentId As Integer, ByRef PtStart As Point3d, ByRef PtCross As Point3d, ByRef PtDir As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateRectangle3P(nParentId As Integer, ByRef PtStart As Point3d, ByRef PtCross As Point3d, ByRef PtDir As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateRectangle3P_32(nParentId, PtStart, PtCross, PtDir, nRefType) Else Return EgtCreateRectangle3P_64(nParentId, PtStart, PtCross, PtDir, nRefType) End If End Function Private Function EgtCreatePolygonFromRadius_32(nParentId As Integer, nNumSides As Integer, ByRef PtCen As Point3d, ByRef PtCorn As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreatePolygonFromRadius_64(nParentId As Integer, nNumSides As Integer, ByRef PtCen As Point3d, ByRef PtCorn As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreatePolygonFromRadius(nParentId As Integer, nNumSides As Integer, ByRef PtCen As Point3d, ByRef PtCorn As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreatePolygonFromRadius_32(nParentId, nNumSides, PtCen, PtCorn, nRefType) Else Return EgtCreatePolygonFromRadius_64(nParentId, nNumSides, PtCen, PtCorn, nRefType) End If End Function Private Function EgtCreatePolygonFromApothem_32(nParentId As Integer, nNumSides As Integer, ByRef PtCen As Point3d, ByRef PtMid As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreatePolygonFromApothem_64(nParentId As Integer, nNumSides As Integer, ByRef PtCen As Point3d, ByRef PtMid As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreatePolygonFromApothem(nParentId As Integer, nNumSides As Integer, ByRef PtCen As Point3d, ByRef PtMid As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreatePolygonFromApothem_32(nParentId, nNumSides, PtCen, PtMid, nRefType) Else Return EgtCreatePolygonFromApothem_64(nParentId, nNumSides, PtCen, PtMid, nRefType) End If End Function Private Function EgtCreatePolygonFromSide_32(nParentId As Integer, nNumSides As Integer, ByRef PtStart As Point3d, ByRef PtFin As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreatePolygonFromSide_64(nParentId As Integer, nNumSides As Integer, ByRef PtStart As Point3d, ByRef PtFin As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreatePolygonFromSide(nParentId As Integer, nNumSides As Integer, ByRef PtStart As Point3d, ByRef PtFin As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreatePolygonFromSide_32(nParentId, nNumSides, PtStart, PtFin, nRefType) Else Return EgtCreatePolygonFromSide_64(nParentId, nNumSides, PtStart, PtFin, nRefType) End If End Function Private Function EgtCreateSurfFrRectangle_32(nParentId As Integer, ByRef ptMin As Point3d, ByRef ptMax As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateSurfFrRectangle_64(nParentId As Integer, ByRef ptMin As Point3d, ByRef ptMax As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateSurfFrRectangle(nParentId As Integer, ByRef ptMin As Point3d, ByRef ptMax As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateSurfFrRectangle_32(nParentId, ptMin, ptMax, nRefType) Else Return EgtCreateSurfFrRectangle_64(nParentId, ptMin, ptMax, nRefType) End If End Function Private Function EgtCreateSurfFlatRegion_32(nParentId As Integer, nNumCrv As Integer, nCrvId() As Integer) As Integer End Function Private Function EgtCreateSurfFlatRegion_64(nParentId As Integer, nNumCrv As Integer, nCrvId() As Integer) As Integer End Function Public Function EgtCreateSurfFlatRegion(nParentId As Integer, nCrvId() As Integer) As Integer If IntPtr.Size = 4 Then Return EgtCreateSurfFlatRegion_32(nParentId, nCrvId.Length(), nCrvId) Else Return EgtCreateSurfFlatRegion_64(nParentId, nCrvId.Length(), nCrvId) End If End Function Public Function EgtCreateSurfFlatRegion(nParentId As Integer, nCrvId As Integer) As Integer Dim nCrvIds(0) As Integer nCrvIds(0) = nCrvId If IntPtr.Size = 4 Then Return EgtCreateSurfFlatRegion_32(nParentId, 1, nCrvIds) Else Return EgtCreateSurfFlatRegion_64(nParentId, 1, nCrvIds) End If End Function Private Function EgtCreateSurfTmBBox_32(nParentId As Integer, ByRef ptMin As Point3d, ByRef ptMax As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateSurfTmBBox_64(nParentId As Integer, ByRef ptMin As Point3d, ByRef ptMax As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateSurfTmBBox(nParentId As Integer, ByRef ptMin As Point3d, ByRef ptMax As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateSurfTmBBox_32(nParentId, ptMin, ptMax, nRefType) Else Return EgtCreateSurfTmBBox_64(nParentId, ptMin, ptMax, nRefType) End If End Function Public Function EgtCreateSurfTmBBox(nParentId As Integer, ByRef b3Box As BBox3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateSurfTmBBox_32(nParentId, b3Box.Min(), b3Box.Max(), nRefType) Else Return EgtCreateSurfTmBBox_64(nParentId, b3Box.Min(), b3Box.Max(), nRefType) End If End Function Private Function EgtCreateSurfTmByFlatContour_32(nParentId As Integer, nCrvId As Integer, dLinTol As Double) As Integer End Function Private Function EgtCreateSurfTmByFlatContour_64(nParentId As Integer, nCrvId As Integer, dLinTol As Double) As Integer End Function Public Function EgtCreateSurfTmByFlatContour(nParentId As Integer, nCrvId As Integer, dLinTol As Double) As Integer If IntPtr.Size = 4 Then Return EgtCreateSurfTmByFlatContour_32(nParentId, nCrvId, dLinTol) Else Return EgtCreateSurfTmByFlatContour_64(nParentId, nCrvId, dLinTol) End If End Function Private Function EgtCreateSurfTmByRegion_32(nParentId As Integer, nNumCrv As Integer, nCrvId() As Integer, dLinTol As Double) As Integer End Function Private Function EgtCreateSurfTmByRegion_64(nParentId As Integer, nNumCrv As Integer, nCrvId() As Integer, dLinTol As Double) As Integer End Function Public Function EgtCreateSurfTmByRegion(nParentId As Integer, nCrvId() As Integer, dLinTol As Double) As Integer If IntPtr.Size = 4 Then Return EgtCreateSurfTmByRegion_32(nParentId, nCrvId.Length(), nCrvId, dLinTol) Else Return EgtCreateSurfTmByRegion_64(nParentId, nCrvId.Length(), nCrvId, dLinTol) End If End Function Private Function EgtCreateSurfTmByExtrusion_32(nParentId As Integer, nNumCrv As Integer, nCrvId() As Integer, ByRef VtExtr As Vector3d, dLinTol As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateSurfTmByExtrusion_64(nParentId As Integer, nNumCrv As Integer, nCrvId() As Integer, ByRef VtExtr As Vector3d, dLinTol As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateSurfTmByExtrusion(nParentId As Integer, nNumCrv As Integer, nCrvId() As Integer, ByRef VtExtr As Vector3d, dLinTol As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateSurfTmByExtrusion_32(nParentId, nNumCrv, nCrvId, VtExtr, dLinTol, nRefType) Else Return EgtCreateSurfTmByExtrusion_64(nParentId, nNumCrv, nCrvId, VtExtr, dLinTol, nRefType) End If End Function Private Function EgtCreateSurfTmByRegionExtrusion_32(nParentId As Integer, nNumCrv As Integer, nCrvId() As Integer, ByRef VtExtr As Vector3d, dLinTol As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateSurfTmByRegionExtrusion_64(nParentId As Integer, nNumCrv As Integer, nCrvId() As Integer, ByRef VtExtr As Vector3d, dLinTol As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateSurfTmByRegionExtrusion(nParentId As Integer, nNumCrv As Integer, nCrvId() As Integer, ByRef VtExtr As Vector3d, dLinTol As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateSurfTmByRegionExtrusion_32(nParentId, nNumCrv, nCrvId, VtExtr, dLinTol, nRefType) Else Return EgtCreateSurfTmByRegionExtrusion_64(nParentId, nNumCrv, nCrvId, VtExtr, dLinTol, nRefType) End If End Function Private Function EgtCreateSurfTmByRevolve_32(nParentId As Integer, nCrvId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, bCapEnds As Boolean, dLinTol As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateSurfTmByRevolve_64(nParentId As Integer, nCrvId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, bCapEnds As Boolean, dLinTol As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateSurfTmByRevolve(nParentId As Integer, nCrvId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, bCapEnds As Boolean, dLinTol As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateSurfTmByRevolve_32(nParentId, nCrvId, PtAx, VtAx, bCapEnds, dLinTol, nRefType) Else Return EgtCreateSurfTmByRevolve_64(nParentId, nCrvId, PtAx, VtAx, bCapEnds, dLinTol, nRefType) End If End Function Private Function EgtCreateSurfTmByScrewing_32(nParentId As Integer, nCrvId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngRotDeg As Double, dMove As Double, bCapEnds As Boolean, dLinTol As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateSurfTmByScrewing_64(nParentId As Integer, nCrvId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngRotDeg As Double, dMove As Double, bCapEnds As Boolean, dLinTol As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateSurfTmByScrewing(nParentId As Integer, nCrvId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngRotDeg As Double, dMove As Double, bCapEnds As Boolean, dLinTol As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateSurfTmByScrewing_32(nParentId, nCrvId, PtAx, VtAx, dAngRotDeg, dMove, bCapEnds, dLinTol, nRefType) Else Return EgtCreateSurfTmByScrewing_64(nParentId, nCrvId, PtAx, VtAx, dAngRotDeg, dMove, bCapEnds, dLinTol, nRefType) End If End Function Private Function EgtCreateSurfTmSwept_32(nParentId As Integer, nSectId As Integer, nGuideId As Integer, bCapEnds As Boolean, dLinTol As Double) As Integer End Function Private Function EgtCreateSurfTmSwept_64(nParentId As Integer, nSectId As Integer, nGuideId As Integer, bCapEnds As Boolean, dLinTol As Double) As Integer End Function Public Function EgtCreateSurfTmSwept(nParentId As Integer, nSectId As Integer, nGuideId As Integer, bCapEnds As Boolean, dLinTol As Double) As Integer If IntPtr.Size = 4 Then Return EgtCreateSurfTmSwept_32(nParentId, nSectId, nGuideId, bCapEnds, dLinTol) Else Return EgtCreateSurfTmSwept_64(nParentId, nSectId, nGuideId, bCapEnds, dLinTol) End If End Function Private Function EgtCreateSurfTmRuled_32(nParentId As Integer, nCrvId1 As Integer, nCrvId2 As Integer, nType As Integer, dLinTol As Double) As Integer End Function Private Function EgtCreateSurfTmRuled_64(nParentId As Integer, nCrvId1 As Integer, nCrvId2 As Integer, nType As Integer, dLinTol As Double) As Integer End Function Public Function EgtCreateSurfTmRuled(nParentId As Integer, nCrvId1 As Integer, nCrvId2 As Integer, nType As Integer, dLinTol As Double) As Integer If IntPtr.Size = 4 Then Return EgtCreateSurfTmRuled_32(nParentId, nCrvId1, nCrvId2, nType, dLinTol) Else Return EgtCreateSurfTmRuled_64(nParentId, nCrvId1, nCrvId2, nType, dLinTol) End If End Function Private Function EgtCreateSurfTmByTriangles_32(nParentId As Integer, nNumSrf As Integer, nSrfId() As Integer, bSrfErase As Boolean) As Integer End Function Private Function EgtCreateSurfTmByTriangles_64(nParentId As Integer, nNumSrf As Integer, nSrfId() As Integer, bSrfErase As Boolean) As Integer End Function Public Function EgtCreateSurfTmByTriangles(nParentId As Integer, nNumSrf As Integer, nSrfId() As Integer, bSrfErase As Boolean) As Integer If IntPtr.Size = 4 Then Return EgtCreateSurfTmByTriangles_32(nParentId, nNumSrf, nSrfId, bSrfErase) Else Return EgtCreateSurfTmByTriangles_64(nParentId, nNumSrf, nSrfId, bSrfErase) End If End Function Private Function EgtCreateSurfTmBySewing_32(nParentId As Integer, nNumSrf As Integer, nSrfId() As Integer, bSrfErase As Boolean) As Integer End Function Private Function EgtCreateSurfTmBySewing_64(nParentId As Integer, nNumSrf As Integer, nSrfId() As Integer, bSrfErase As Boolean) As Integer End Function Public Function EgtCreateSurfTmBySewing(nParentId As Integer, nNumSrf As Integer, nSrfId() As Integer, bSrfErase As Boolean) As Integer If IntPtr.Size = 4 Then Return EgtCreateSurfTmBySewing_32(nParentId, nNumSrf, nSrfId, bSrfErase) Else Return EgtCreateSurfTmBySewing_64(nParentId, nNumSrf, nSrfId, bSrfErase) End If End Function Private Function EgtCreateText_32(nParentId As Integer, ByRef ptP As Point3d, sText As String, dH As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateText_64(nParentId As Integer, ByRef ptP As Point3d, sText As String, dH As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateText(nParentId As Integer, ByRef ptP As Point3d, sText As String, dH As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateText_32(nParentId, ptP, sText, dH, nRefType) Else Return EgtCreateText_64(nParentId, ptP, sText, dH, nRefType) End If End Function Private Function EgtCreateTextEx_32(nParentId As Integer, ByRef ptP As Point3d, dAngRotDeg As Double, sText As String, sFont As String, bItalic As Boolean, dH As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateTextEx_64(nParentId As Integer, ByRef ptP As Point3d, dAngRotDeg As Double, sText As String, sFont As String, bItalic As Boolean, dH As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateTextEx(nParentId As Integer, ByRef ptP As Point3d, dAngRotDeg As Double, sText As String, sFont As String, bItalic As Boolean, dH As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateTextEx_32(nParentId, ptP, dAngRotDeg, sText, sFont, bItalic, dH, nRefType) Else Return EgtCreateTextEx_64(nParentId, ptP, dAngRotDeg, sText, sFont, bItalic, dH, nRefType) End If End Function Private Function EgtCreateTextAdv_32(nParentId As Integer, ByRef ptP As Point3d, dAngRotDeg As Double, sText As String, sFont As String, nW As Integer, bItalic As Boolean, dH As Double, dRat As Double, dAddAdv As Double, nInsPos As Integer, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtCreateTextAdv_64(nParentId As Integer, ByRef ptP As Point3d, dAngRotDeg As Double, sText As String, sFont As String, nW As Integer, bItalic As Boolean, dH As Double, dRat As Double, dAddAdv As Double, nInsPos As Integer, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtCreateTextAdv(nParentId As Integer, ByRef ptP As Point3d, dAngRotDeg As Double, sText As String, sFont As String, nW As Integer, bItalic As Boolean, dH As Double, dRat As Double, dAddAdv As Double, nInsPos As Integer, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtCreateTextAdv_32(nParentId, ptP, dAngRotDeg, sText, sFont, nW, bItalic, dH, dRat, dAddAdv, nInsPos, nRefType) Else Return EgtCreateTextAdv_64(nParentId, ptP, dAngRotDeg, sText, sFont, nW, bItalic, dH, dRat, dAddAdv, nInsPos, nRefType) End If End Function '---------- GeomDb Objects Modify ---------------------------------------------- Private Function EgtChangeGroupFrame_32(nId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, nRefType As GDB_RT) As Boolean End Function Private Function EgtChangeGroupFrame_64(nId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, nRefType As GDB_RT) As Boolean End Function Public Function EgtChangeGroupFrame(nId As Integer, ByRef frRef As Frame3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtChangeGroupFrame_32(nId, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ(), nRefType) Else Return EgtChangeGroupFrame_64(nId, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ(), nRefType) End If End Function Private Function EgtChangeVectorBase_32(nId As Integer, ByRef PtBase As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Private Function EgtChangeVectorBase_64(nId As Integer, ByRef PtBase As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Public Function EgtChangeVectorBase(nId As Integer, ByRef PtBase As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtChangeVectorBase_32(nId, PtBase, nRefType) Else Return EgtChangeVectorBase_64(nId, PtBase, nRefType) End If End Function Private Function EgtInvertVector_32(nNumVec As Integer, nVecId() As Integer) As Boolean End Function Private Function EgtInvertVector_64(nNumVec As Integer, nVecId() As Integer) As Boolean End Function Public Function EgtInvertVector(nVecId() As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtInvertVector_32(nVecId.Count(), nVecId) Else Return EgtInvertVector_64(nVecId.Count(), nVecId) End If End Function Public Function EgtInvertVector(nVecId As Integer) As Boolean Dim vVecId() As Integer = {nVecId} If IntPtr.Size = 4 Then Return EgtInvertVector_32(1, vVecId) Else Return EgtInvertVector_64(1, vVecId) End If End Function Private Function EgtFlipText_32(nId As Integer) As Boolean End Function Private Function EgtFlipText_64(nId As Integer) As Boolean End Function Public Function EgtFlipText(nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtFlipText_32(nId) Else Return EgtFlipText_64(nId) End If End Function Private Function EgtMirrorText_32(nId As Integer, bOnL As Boolean) As Boolean End Function Private Function EgtMirrorText_64(nId As Integer, bOnL As Boolean) As Boolean End Function Public Function EgtMirrorText(nId As Integer, bOnL As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtMirrorText_32(nId, bOnL) Else Return EgtMirrorText_64(nId, bOnL) End If End Function Private Function EgtModifyText_32(nId As Integer, sText As String) As Boolean End Function Private Function EgtModifyText_64(nId As Integer, sText As String) As Boolean End Function Public Function EgtModifyText(nId As Integer, sText As String) As Boolean If IntPtr.Size = 4 Then Return EgtModifyText_32(nId, sText) Else Return EgtModifyText_64(nId, sText) End If End Function Private Function EgtChangeTextFont_32(nId As Integer, sNewFont As String) As Boolean End Function Private Function EgtChangeTextFont_64(nId As Integer, sNewFont As String) As Boolean End Function Public Function EgtChangeTextFont(nId As Integer, sNewFont As String) As Boolean If IntPtr.Size = 4 Then Return EgtChangeTextFont_32(nId, sNewFont) Else Return EgtChangeTextFont_64(nId, sNewFont) End If End Function Private Function EgtChangeTextHeight_32(nId As Integer, dNewH As Double) As Boolean End Function Private Function EgtChangeTextHeight_64(nId As Integer, dNewH As Double) As Boolean End Function Public Function EgtChangeTextHeight(nId As Integer, dNewH As Double) As Boolean If IntPtr.Size = 4 Then Return EgtChangeTextHeight_32(nId, dNewH) Else Return EgtChangeTextHeight_64(nId, dNewH) End If End Function Private Function EgtChangeTextItalic_32(nId As Integer, bNewItalic As Boolean) As Boolean End Function Private Function EgtChangeTextItalic_64(nId As Integer, bNewItalic As Boolean) As Boolean End Function Public Function EgtChangeTextItalic(nId As Integer, bNewItalic As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtChangeTextItalic_32(nId, bNewItalic) Else Return EgtChangeTextItalic_64(nId, bNewItalic) End If End Function Private Function EgtExplodeText_32(nId As Integer, ByRef nCount As Integer) As Integer End Function Private Function EgtExplodeText_64(nId As Integer, ByRef nCount As Integer) As Integer End Function Public Function EgtExplodeText(nId As Integer, ByRef nCount As Integer) As Integer If IntPtr.Size = 4 Then Return EgtExplodeText_32(nId, nCount) Else Return EgtExplodeText_64(nId, nCount) End If End Function '---------- GeomDb Curves Modify ----------------------------------------------- Private Function EgtInvertCurve_32(nNumCrv As Integer, nCrvId() As Integer) As Boolean End Function Private Function EgtInvertCurve_64(nNumCrv As Integer, nCrvId() As Integer) As Boolean End Function Public Function EgtInvertCurve(nCrvId() As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtInvertCurve_32(nCrvId.Count(), nCrvId) Else Return EgtInvertCurve_64(nCrvId.Count(), nCrvId) End If End Function Public Function EgtInvertCurve(nCrvId As Integer) As Boolean Dim vCrvId() As Integer = {nCrvId} If IntPtr.Size = 4 Then Return EgtInvertCurve_32(1, vCrvId) Else Return EgtInvertCurve_64(1, vCrvId) End If End Function Private Function EgtOffsetCurve_32(nId As Integer, dDist As Double, nType As OFF_TYPE) As Boolean End Function Private Function EgtOffsetCurve_64(nId As Integer, dDist As Double, nType As OFF_TYPE) As Boolean End Function Public Function EgtOffsetCurve(nId As Integer, dDist As Double, nType As OFF_TYPE) As Boolean If IntPtr.Size = 4 Then Return EgtOffsetCurve_32(nId, dDist, nType) Else Return EgtOffsetCurve_64(nId, dDist, nType) End If End Function Private Function EgtOffsetCurveAdv_32(nId As Integer, dDist As Double, nType As OFF_TYPE, ByRef nCount As Integer) As Integer End Function Private Function EgtOffsetCurveAdv_64(nId As Integer, dDist As Double, nType As OFF_TYPE, ByRef nCount As Integer) As Integer End Function Public Function EgtOffsetCurveAdv(nId As Integer, dDist As Double, nType As OFF_TYPE, ByRef nCount As Integer) As Integer If IntPtr.Size = 4 Then Return EgtOffsetCurveAdv_32(nId, dDist, nType, nCount) Else Return EgtOffsetCurveAdv_64(nId, dDist, nType, nCount) End If End Function Private Function EgtApproxCurve_32(nId As Integer, nApprType As Integer, dLinTol As Double) As Boolean End Function Private Function EgtApproxCurve_64(nId As Integer, nApprType As Integer, dLinTol As Double) As Boolean End Function Public Function EgtApproxCurve(nId As Integer, nApprType As Integer, dLinTol As Double) As Boolean If IntPtr.Size = 4 Then Return EgtApproxCurve_32(nId, nApprType, dLinTol) Else Return EgtApproxCurve_64(nId, nApprType, dLinTol) End If End Function Private Function EgtProjectCurveOnPlane_32(nId As Integer, ByRef PtOn As Point3d, ByRef VtN As Vector3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Private Function EgtProjectCurveOnPlane_64(nId As Integer, ByRef PtOn As Point3d, ByRef VtN As Vector3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Public Function EgtProjectCurveOnPlane(nId As Integer, ByRef PtOn As Point3d, ByRef VtN As Vector3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtProjectCurveOnPlane_32(nId, PtOn, VtN, nRefType) Else Return EgtProjectCurveOnPlane_64(nId, PtOn, VtN, nRefType) End If End Function Private Function EgtChangeClosedCurveStartPoint_32(nId As Integer, ByRef PtStart As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Private Function EgtChangeClosedCurveStartPoint_64(nId As Integer, ByRef PtStart As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Public Function EgtChangeClosedCurveStartPoint(nId As Integer, ByRef PtStart As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtChangeClosedCurveStartPoint_32(nId, PtStart, nRefType) Else Return EgtChangeClosedCurveStartPoint_64(nId, PtStart, nRefType) End If End Function Private Function EgtModifyCurveStartPoint_32(nId As Integer, ByRef PtStart As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Private Function EgtModifyCurveStartPoint_64(nId As Integer, ByRef PtStart As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Public Function EgtModifyCurveStartPoint(nId As Integer, ByRef PtStart As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtModifyCurveStartPoint_32(nId, PtStart, nRefType) Else Return EgtModifyCurveStartPoint_64(nId, PtStart, nRefType) End If End Function Private Function EgtModifyCurveEndPoint_32(nId As Integer, ByRef PtEnd As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Private Function EgtModifyCurveEndPoint_64(nId As Integer, ByRef PtEnd As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Public Function EgtModifyCurveEndPoint(nId As Integer, ByRef PtEnd As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtModifyCurveEndPoint_32(nId, PtEnd, nRefType) Else Return EgtModifyCurveEndPoint_64(nId, PtEnd, nRefType) End If End Function Private Function EgtModifyCurveExtrusion_32(nId As Integer, ByRef VtExtr As Vector3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Private Function EgtModifyCurveExtrusion_64(nId As Integer, ByRef VtExtr As Vector3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Public Function EgtModifyCurveExtrusion(nId As Integer, ByRef VtExtr As Vector3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtModifyCurveExtrusion_32(nId, VtExtr, nRefType) Else Return EgtModifyCurveExtrusion_64(nId, VtExtr, nRefType) End If End Function Private Function EgtModifyCurveThickness_32(nId As Integer, dTh As Double) As Boolean End Function Private Function EgtModifyCurveThickness_64(nId As Integer, dTh As Double) As Boolean End Function Public Function EgtModifyCurveThickness(nId As Integer, dTh As Double) As Boolean If IntPtr.Size = 4 Then Return EgtModifyCurveThickness_32(nId, dTh) Else Return EgtModifyCurveThickness_64(nId, dTh) End If End Function Private Function EgtTrimCurveStartAtLen_32(nId As Integer, dLen As Double) As Boolean End Function Private Function EgtTrimCurveStartAtLen_64(nId As Integer, dLen As Double) As Boolean End Function Public Function EgtTrimCurveStartAtLen(nId As Integer, dLen As Double) As Boolean If IntPtr.Size = 4 Then Return EgtTrimCurveStartAtLen_32(nId, dLen) Else Return EgtTrimCurveStartAtLen_64(nId, dLen) End If End Function Private Function EgtTrimCurveEndAtLen_32(nId As Integer, dLen As Double) As Boolean End Function Private Function EgtTrimCurveEndAtLen_64(nId As Integer, dLen As Double) As Boolean End Function Public Function EgtTrimCurveEndAtLen(nId As Integer, dLen As Double) As Boolean If IntPtr.Size = 4 Then Return EgtTrimCurveEndAtLen_32(nId, dLen) Else Return EgtTrimCurveEndAtLen_64(nId, dLen) End If End Function Private Function EgtExtendCurveStartByLen_32(nId As Integer, dLen As Double) As Boolean End Function Private Function EgtExtendCurveStartByLen_64(nId As Integer, dLen As Double) As Boolean End Function Public Function EgtExtendCurveStartByLen(nId As Integer, dLen As Double) As Boolean If IntPtr.Size = 4 Then Return EgtExtendCurveStartByLen_32(nId, dLen) Else Return EgtExtendCurveStartByLen_64(nId, dLen) End If End Function Private Function EgtExtendCurveEndByLen_32(nId As Integer, dLen As Double) As Boolean End Function Private Function EgtExtendCurveEndByLen_64(nId As Integer, dLen As Double) As Boolean End Function Public Function EgtExtendCurveEndByLen(nId As Integer, dLen As Double) As Boolean If IntPtr.Size = 4 Then Return EgtExtendCurveEndByLen_32(nId, dLen) Else Return EgtExtendCurveEndByLen_64(nId, dLen) End If End Function Private Function EgtTrimExtendCurveByLen_32(nId As Integer, dLen As Double, ByRef PtNear As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Private Function EgtTrimExtendCurveByLen_64(nId As Integer, dLen As Double, ByRef PtNear As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Public Function EgtTrimExtendCurveByLen(nId As Integer, dLen As Double, ByRef PtNear As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtTrimExtendCurveByLen_32(nId, dLen, PtNear, nRefType) Else Return EgtTrimExtendCurveByLen_64(nId, dLen, PtNear, nRefType) End If End Function Private Function EgtSplitCurve_32(nId As Integer, nParts As Integer) As Integer End Function Private Function EgtSplitCurve_64(nId As Integer, nParts As Integer) As Integer End Function Public Function EgtSplitCurve(nId As Integer, nParts As Integer) As Integer If IntPtr.Size = 4 Then Return EgtSplitCurve_32(nId, nParts) Else Return EgtSplitCurve_64(nId, nParts) End If End Function Private Function EgtSplitCurveAtPoint_32(nId As Integer, ByRef PtOn As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Private Function EgtSplitCurveAtPoint_64(nId As Integer, ByRef PtOn As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer End Function Public Function EgtSplitCurveAtPoint(nId As Integer, ByRef PtOn As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtSplitCurveAtPoint_32(nId, PtOn, nRefType) Else Return EgtSplitCurveAtPoint_64(nId, PtOn, nRefType) End If End Function Private Function EgtModifyCircleCP_32(nId As Integer, ByRef PtOn As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Private Function EgtModifyCircleCP_64(nId As Integer, ByRef PtOn As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Public Function EgtModifyCircleCP(nId As Integer, ByRef PtOn As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtModifyCircleCP_32(nId, PtOn, nRefType) Else Return EgtModifyCircleCP_64(nId, PtOn, nRefType) End If End Function Private Function EgtModifyArcRadius_32(nId As Integer, dRad As Double) As Boolean End Function Private Function EgtModifyArcRadius_64(nId As Integer, dRad As Double) As Boolean End Function Public Function EgtModifyArcRadius(nId As Integer, dRad As Double) As Boolean If IntPtr.Size = 4 Then Return EgtModifyArcRadius_32(nId, dRad) Else Return EgtModifyArcRadius_64(nId, dRad) End If End Function Private Function EgtModifyArcC2P_32(nId As Integer, ByRef PtEnd As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Private Function EgtModifyArcC2P_64(nId As Integer, ByRef PtEnd As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Public Function EgtModifyArcC2P(nId As Integer, ByRef PtEnd As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtModifyArcC2P_32(nId, PtEnd, nRefType) Else Return EgtModifyArcC2P_64(nId, PtEnd, nRefType) End If End Function Private Function EgtModifyArc3P_32(nId As Integer, ByRef PtMid As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Private Function EgtModifyArc3P_64(nId As Integer, ByRef PtMid As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Public Function EgtModifyArc3P(nId As Integer, ByRef PtMid As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtModifyArc3P_32(nId, PtMid, nRefType) Else Return EgtModifyArc3P_64(nId, PtMid, nRefType) End If End Function Private Function EgtCloseCurveCompo_32(nId As Integer) As Boolean End Function Private Function EgtCloseCurveCompo_64(nId As Integer) As Boolean End Function Public Function EgtCloseCurveCompo(nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtCloseCurveCompo_32(nId) Else Return EgtCloseCurveCompo_64(nId) End If End Function Private Function EgtAddCurveCompoCurve_32(nId As Integer, nAddCrvId As Integer, bEraseOrig As Boolean) As Boolean End Function Private Function EgtAddCurveCompoCurve_64(nId As Integer, nAddCrvId As Integer, bEraseOrig As Boolean) As Boolean End Function Public Function EgtAddCurveCompoCurve(nId As Integer, nAddCrvId As Integer, bEraseOrig As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtAddCurveCompoCurve_32(nId, nAddCrvId, bEraseOrig) Else Return EgtAddCurveCompoCurve_64(nId, nAddCrvId, bEraseOrig) End If End Function Private Function EgtAddCurveCompoLine_32(nId As Integer, ByRef PtNew As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Private Function EgtAddCurveCompoLine_64(nId As Integer, ByRef PtNew As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Public Function EgtAddCurveCompoLine(nId As Integer, ByRef PtNew As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtAddCurveCompoLine_32(nId, PtNew, nRefType) Else Return EgtAddCurveCompoLine_64(nId, PtNew, nRefType) End If End Function Private Function EgtAddCurveCompoArcTg_32(nId As Integer, ByRef PtNew As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Private Function EgtAddCurveCompoArcTg_64(nId As Integer, ByRef PtNew As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Public Function EgtAddCurveCompoArcTg(nId As Integer, ByRef PtNew As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtAddCurveCompoArcTg_32(nId, PtNew, nRefType) Else Return EgtAddCurveCompoArcTg_64(nId, PtNew, nRefType) End If End Function Private Function EgtAddCurveCompoArc2P_32(nId As Integer, ByRef PtMid As Point3d, ByRef PtNew As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Private Function EgtAddCurveCompoArc2P_64(nId As Integer, ByRef PtMid As Point3d, ByRef PtNew As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Public Function EgtAddCurveCompoArc2P(nId As Integer, ByRef PtMid As Point3d, ByRef PtNew As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtAddCurveCompoArc2P_32(nId, PtMid, PtNew, nRefType) Else Return EgtAddCurveCompoArc2P_64(nId, PtMid, PtNew, nRefType) End If End Function Private Function EgtRemoveCurveCompoCurve_32(nId As Integer, bLast As Boolean) As Boolean End Function Private Function EgtRemoveCurveCompoCurve_64(nId As Integer, bLast As Boolean) As Boolean End Function Public Function EgtRemoveCurveCompoCurve(nId As Integer, Optional bLast As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtRemoveCurveCompoCurve_32(nId, bLast) Else Return EgtRemoveCurveCompoCurve_64(nId, bLast) End If End Function Private Function EgtAddCurveCompoJoint_32(nId As Integer, dU As Double) As Boolean End Function Private Function EgtAddCurveCompoJoint_64(nId As Integer, dU As Double) As Boolean End Function Public Function EgtAddCurveCompoJoint(nId As Integer, dU As Double) As Boolean If IntPtr.Size = 4 Then Return EgtAddCurveCompoJoint_32(nId, dU) Else Return EgtAddCurveCompoJoint_64(nId, dU) End If End Function Private Function EgtModifyCurveCompoJoint_32(nId As Integer, nU As Integer, ByRef PtJoint As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Private Function EgtModifyCurveCompoJoint_64(nId As Integer, nU As Integer, ByRef PtJoint As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Public Function EgtModifyCurveCompoJoint(nId As Integer, nU As Integer, ByRef PtJoint As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtModifyCurveCompoJoint_32(nId, nU, PtJoint, nRefType) Else Return EgtModifyCurveCompoJoint_64(nId, nU, PtJoint, nRefType) End If End Function Private Function EgtGetCurveCompoJointCount_32(nId As Integer) As Integer End Function Private Function EgtGetCurveCompoJointCount_64(nId As Integer) As Integer End Function Public Function EgtGetCurveCompoJointCount(nId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetCurveCompoJointCount_32(nId) Else Return EgtGetCurveCompoJointCount_64(nId) End If End Function Private Function EgtRemoveCurveCompoJoint_32(nId As Integer, nU As Integer) As Boolean End Function Private Function EgtRemoveCurveCompoJoint_64(nId As Integer, nU As Integer) As Boolean End Function Public Function EgtRemoveCurveCompoJoint(nId As Integer, nU As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtRemoveCurveCompoJoint_32(nId, nU) Else Return EgtRemoveCurveCompoJoint_64(nId, nU) End If End Function Private Function EgtExplodeCurveCompo_32(nId As Integer, ByRef nCount As Integer) As Integer End Function Private Function EgtExplodeCurveCompo_64(nId As Integer, ByRef nCount As Integer) As Integer End Function Public Function EgtExplodeCurveCompo(nId As Integer, ByRef nCount As Integer) As Integer If IntPtr.Size = 4 Then Return EgtExplodeCurveCompo_32(nId, nCount) Else Return EgtExplodeCurveCompo_64(nId, nCount) End If End Function Private Function EgtMergeCurvesInCurveCompo_32(nId As Integer, dLinTol As Double, bStartEnd As Boolean) As Boolean End Function Private Function EgtMergeCurvesInCurveCompo_64(nId As Integer, dLinTol As Double, bStartEnd As Boolean) As Boolean End Function Public Function EgtMergeCurvesInCurveCompo(nId As Integer, dLinTol As Double, Optional bStartEnd As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtMergeCurvesInCurveCompo_32(nId, dLinTol, bStartEnd) Else Return EgtMergeCurvesInCurveCompo_64(nId, dLinTol, bStartEnd) End If End Function '---------- GeomDb Surfaces Modify --------------------------------------------- Private Function EgtInvertSurface_32(nId As Integer) As Boolean End Function Private Function EgtInvertSurface_64(nId As Integer) As Boolean End Function Public Function EgtInvertSurface(nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtInvertSurface_32(nId) Else Return EgtInvertSurface_64(nId) End If End Function Private Function EgtExplodeSurface_32(nId As Integer, ByRef nCount As Integer) As Integer End Function Private Function EgtExplodeSurface_64(nId As Integer, ByRef nCount As Integer) As Integer End Function Public Function EgtExplodeSurface(nId As Integer, ByRef nCount As Integer) As Integer If IntPtr.Size = 4 Then Return EgtExplodeSurface_32(nId, nCount) Else Return EgtExplodeSurface_64(nId, nCount) End If End Function Private Function EgtSurfFrAdd_32(nId1 As Integer, nId2 As Integer) As Boolean End Function Private Function EgtSurfFrAdd_64(nId1 As Integer, nId2 As Integer) As Boolean End Function Public Function EgtSurfFrAdd(nId1 As Integer, nId2 As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSurfFrAdd_32(nId1, nId2) Else Return EgtSurfFrAdd_64(nId1, nId2) End If End Function Private Function EgtSurfFrSubtract_32(nId1 As Integer, nId2 As Integer) As Boolean End Function Private Function EgtSurfFrSubtract_64(nId1 As Integer, nId2 As Integer) As Boolean End Function Public Function EgtSurfFrSubtract(nId1 As Integer, nId2 As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSurfFrSubtract_32(nId1, nId2) Else Return EgtSurfFrSubtract_64(nId1, nId2) End If End Function Private Function EgtSurfFrIntersect_32(nId1 As Integer, nId2 As Integer) As Boolean End Function Private Function EgtSurfFrIntersect_64(nId1 As Integer, nId2 As Integer) As Boolean End Function Public Function EgtSurfFrIntersect(nId1 As Integer, nId2 As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSurfFrIntersect_32(nId1, nId2) Else Return EgtSurfFrIntersect_64(nId1, nId2) End If End Function Private Function EgtSurfFrOffset_32(nId As Integer, dDist As Double, nType As Integer) As Boolean End Function Private Function EgtSurfFrOffset_64(nId As Integer, dDist As Double, nType As Integer) As Boolean End Function Public Function EgtSurfFrOffset(nId As Integer, dDist As Double, nType As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSurfFrOffset_32(nId, dDist, nType) Else Return EgtSurfFrOffset_64(nId, dDist, nType) End If End Function Private Function EgtExtractSurfFrChunkLoops_32(nId As Integer, nChunk As Integer, nDestGrpId As Integer, ByRef nCount As Integer) As Integer End Function Private Function EgtExtractSurfFrChunkLoops_64(nId As Integer, nChunk As Integer, nDestGrpId As Integer, ByRef nCount As Integer) As Integer End Function Public Function EgtExtractSurfFrChunkLoops(nId As Integer, nChunk As Integer, nDestGrpId As Integer, ByRef nCount As Integer) As Integer If IntPtr.Size = 4 Then Return EgtExtractSurfFrChunkLoops_32(nId, nChunk, nDestGrpId, nCount) Else Return EgtExtractSurfFrChunkLoops_64(nId, nChunk, nDestGrpId, nCount) End If End Function Private Function EgtGetSurfTmSilhouette_32(nId As Integer, ByRef vtDir As Vector3d, nDestGrpId As Integer, nRefType As Integer, ByRef nCount As Integer) As Integer End Function Private Function EgtGetSurfTmSilhouette_64(nId As Integer, ByRef vtDir As Vector3d, nDestGrpId As Integer, nRefType As Integer, ByRef nCount As Integer) As Integer End Function Public Function EgtGetSurfTmSilhouette(nId As Integer, vtDir As Vector3d, nDestGrpId As Integer, nRefType As Integer, ByRef nCount As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetSurfTmSilhouette_32(nId, vtDir, nDestGrpId, nRefType, nCount) Else Return EgtGetSurfTmSilhouette_64(nId, vtDir, nDestGrpId, nRefType, nCount) End If End Function Private Function EgtExtractSurfTmLoops_32(nId As Integer, nDestGrpId As Integer, ByRef nCount As Integer) As Integer End Function Private Function EgtExtractSurfTmLoops_64(nId As Integer, nDestGrpId As Integer, ByRef nCount As Integer) As Integer End Function Public Function EgtExtractSurfTmLoops(nId As Integer, nDestGrpId As Integer, ByRef nCount As Integer) As Integer If IntPtr.Size = 4 Then Return EgtExtractSurfTmLoops_32(nId, nDestGrpId, nCount) Else Return EgtExtractSurfTmLoops_64(nId, nDestGrpId, nCount) End If End Function Private Function EgtExtractSurfTmFacetLoops_32(nId As Integer, nFacet As Integer, nDestGrpId As Integer, ByRef nCount As Integer) As Integer End Function Private Function EgtExtractSurfTmFacetLoops_64(nId As Integer, nFacet As Integer, nDestGrpId As Integer, ByRef nCount As Integer) As Integer End Function Public Function EgtExtractSurfTmFacetLoops(nId As Integer, nFacet As Integer, nDestGrpId As Integer, ByRef nCount As Integer) As Integer If IntPtr.Size = 4 Then Return EgtExtractSurfTmFacetLoops_32(nId, nFacet, nDestGrpId, nCount) Else Return EgtExtractSurfTmFacetLoops_64(nId, nFacet, nDestGrpId, nCount) End If End Function Private Function EgtCopySurfTmFacet_32(nId As Integer, nFacet As Integer, nDestGrpId As Integer) As Integer End Function Private Function EgtCopySurfTmFacet_64(nId As Integer, nFacet As Integer, nDestGrpId As Integer) As Integer End Function Public Function EgtCopySurfTmFacet(nId As Integer, nFacet As Integer, nDestGrpId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtCopySurfTmFacet_32(nId, nFacet, nDestGrpId) Else Return EgtCopySurfTmFacet_64(nId, nFacet, nDestGrpId) End If End Function Private Function EgtSurfTmAdd_32(nId1 As Integer, nId2 As Integer) As Boolean End Function Private Function EgtSurfTmAdd_64(nId1 As Integer, nId2 As Integer) As Boolean End Function Public Function EgtSurfTmAdd(nId1 As Integer, nId2 As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSurfTmAdd_32(nId1, nId2) Else Return EgtSurfTmAdd_64(nId1, nId2) End If End Function Private Function EgtSurfTmSubtract_32(nId1 As Integer, nId2 As Integer) As Boolean End Function Private Function EgtSurfTmSubtract_64(nId1 As Integer, nId2 As Integer) As Boolean End Function Public Function EgtSurfTmSubtract(nId1 As Integer, nId2 As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSurfTmSubtract_32(nId1, nId2) Else Return EgtSurfTmSubtract_64(nId1, nId2) End If End Function Private Function EgtSurfTmIntersect_32(nId1 As Integer, nId2 As Integer) As Boolean End Function Private Function EgtSurfTmIntersect_64(nId1 As Integer, nId2 As Integer) As Boolean End Function Public Function EgtSurfTmIntersect(nId1 As Integer, nId2 As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSurfTmIntersect_32(nId1, nId2) Else Return EgtSurfTmIntersect_64(nId1, nId2) End If End Function '---------- GeomDb Parts & Layers ---------------------------------------------- Private Function EgtIsPart_32(nPartId As Integer) As Boolean End Function Private Function EgtIsPart_64(nPartId As Integer) As Boolean End Function Public Function EgtIsPart(nPartId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtIsPart_32(nPartId) Else Return EgtIsPart_64(nPartId) End If End Function Private Function EgtIsLayer_32(nLayerId As Integer) As Boolean End Function Private Function EgtIsLayer_64(nLayerId As Integer) As Boolean End Function Public Function EgtIsLayer(nLayerId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtIsLayer_32(nLayerId) Else Return EgtIsLayer_64(nLayerId) End If End Function Private Function EgtGetCurrPart_32() As Integer End Function Private Function EgtGetCurrPart_64() As Integer End Function Public Function EgtGetCurrPart() As Integer If IntPtr.Size = 4 Then Return EgtGetCurrPart_32() Else Return EgtGetCurrPart_64() End If End Function Private Function EgtGetCurrLayer_32() As Integer End Function Private Function EgtGetCurrLayer_64() As Integer End Function Public Function EgtGetCurrLayer() As Integer If IntPtr.Size = 4 Then Return EgtGetCurrLayer_32() Else Return EgtGetCurrLayer_64() End If End Function Private Function EgtSetCurrPartLayer_32(nPartId As Integer, nLayerId As Integer) As Integer End Function Private Function EgtSetCurrPartLayer_64(nPartId As Integer, nLayerId As Integer) As Integer End Function Public Function EgtSetCurrPartLayer(nPartId As Integer, nLayerId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtSetCurrPartLayer_32(nPartId, nLayerId) Else Return EgtSetCurrPartLayer_64(nPartId, nLayerId) End If End Function Private Function EgtResetCurrPartLayer_32() As Integer End Function Private Function EgtResetCurrPartLayer_64() As Integer End Function Public Function EgtResetCurrPartLayer() As Integer If IntPtr.Size = 4 Then Return EgtResetCurrPartLayer_32() Else Return EgtResetCurrPartLayer_64() End If End Function Private Function EgtGetFirstPart_32(Optional bOnlyVisible As Boolean = False) As Integer End Function Private Function EgtGetFirstPart_64(Optional bOnlyVisible As Boolean = False) As Integer End Function Public Function EgtGetFirstPart(Optional bOnlyVisible As Boolean = False) As Integer If IntPtr.Size = 4 Then Return EgtGetFirstPart_32(bOnlyVisible) Else Return EgtGetFirstPart_64(bOnlyVisible) End If End Function Private Function EgtGetNextPart_32(nPartId As Integer, Optional bOnlyVisible As Boolean = False) As Integer End Function Private Function EgtGetNextPart_64(nPartId As Integer, Optional bOnlyVisible As Boolean = False) As Integer End Function Public Function EgtGetNextPart(nPartId As Integer, Optional bOnlyVisible As Boolean = False) As Integer If IntPtr.Size = 4 Then Return EgtGetNextPart_32(nPartId, bOnlyVisible) Else Return EgtGetNextPart_64(nPartId, bOnlyVisible) End If End Function Private Function EgtGetLastPart_32(Optional bOnlyVisible As Boolean = False) As Integer End Function Private Function EgtGetLastPart_64(Optional bOnlyVisible As Boolean = False) As Integer End Function Public Function EgtGetLastPart(Optional bOnlyVisible As Boolean = False) As Integer If IntPtr.Size = 4 Then Return EgtGetLastPart_32(bOnlyVisible) Else Return EgtGetLastPart_64(bOnlyVisible) End If End Function Private Function EgtGetPrevPart_32(nPartId As Integer, Optional bOnlyVisible As Boolean = False) As Integer End Function Private Function EgtGetPrevPart_64(nPartId As Integer, Optional bOnlyVisible As Boolean = False) As Integer End Function Public Function EgtGetPrevPart(nPartId As Integer, Optional bOnlyVisible As Boolean = False) As Integer If IntPtr.Size = 4 Then Return EgtGetPrevPart_32(nPartId, bOnlyVisible) Else Return EgtGetPrevPart_64(nPartId, bOnlyVisible) End If End Function Private Function EgtGetFirstLayer_32(nPartId As Integer, Optional bOnlyVisible As Boolean = False) As Integer End Function Private Function EgtGetFirstLayer_64(nPartId As Integer, Optional bOnlyVisible As Boolean = False) As Integer End Function Public Function EgtGetFirstLayer(nPartId As Integer, Optional bOnlyVisible As Boolean = False) As Integer If IntPtr.Size = 4 Then Return EgtGetFirstLayer_32(nPartId, bOnlyVisible) Else Return EgtGetFirstLayer_64(nPartId, bOnlyVisible) End If End Function Private Function EgtGetNextLayer_32(nLayerId As Integer, Optional bOnlyVisible As Boolean = False) As Integer End Function Private Function EgtGetNextLayer_64(nLayerId As Integer, Optional bOnlyVisible As Boolean = False) As Integer End Function Public Function EgtGetNextLayer(nLayerId As Integer, Optional bOnlyVisible As Boolean = False) As Integer If IntPtr.Size = 4 Then Return EgtGetNextLayer_32(nLayerId, bOnlyVisible) Else Return EgtGetNextLayer_64(nLayerId, bOnlyVisible) End If End Function Private Function EgtGetLastLayer_32(nPartId As Integer, Optional bOnlyVisible As Boolean = False) As Integer End Function Private Function EgtGetlastLayer_64(nPartId As Integer, Optional bOnlyVisible As Boolean = False) As Integer End Function Public Function EgtGetLastLayer(nPartId As Integer, Optional bOnlyVisible As Boolean = False) As Integer If IntPtr.Size = 4 Then Return EgtGetLastLayer_32(nPartId, bOnlyVisible) Else Return EgtGetlastLayer_64(nPartId, bOnlyVisible) End If End Function Private Function EgtGetPrevLayer_32(nLayerId As Integer, Optional bOnlyVisible As Boolean = False) As Integer End Function Private Function EgtGetPrevLayer_64(nLayerId As Integer, Optional bOnlyVisible As Boolean = False) As Integer End Function Public Function EgtGetPrevLayer(nLayerId As Integer, Optional bOnlyVisible As Boolean = False) As Integer If IntPtr.Size = 4 Then Return EgtGetPrevLayer_32(nLayerId, bOnlyVisible) Else Return EgtGetPrevLayer_64(nLayerId, bOnlyVisible) End If End Function Private Function EgtGetFirstGhostPart_32() As Integer End Function Private Function EgtGetFirstGhostPart_64() As Integer End Function Public Function EgtGetFirstGhostPart() As Integer If IntPtr.Size = 4 Then Return EgtGetFirstGhostPart_32() Else Return EgtGetFirstGhostPart_64() End If End Function Private Function EgtGetNextGhostPart_32(nGhostId As Integer) As Integer End Function Private Function EgtGetNextGhostPart_64(nGhostId As Integer) As Integer End Function Public Function EgtGetNextGhostPart(nGhostId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetNextGhostPart_32(nGhostId) Else Return EgtGetNextGhostPart_64(nGhostId) End If End Function Private Function EgtEraseEmptyParts_32() As Boolean End Function Private Function EgtEraseEmptyParts_64() As Boolean End Function Public Function EgtEraseEmptyParts() As Boolean If IntPtr.Size = 4 Then Return EgtEraseEmptyParts_32() Else Return EgtEraseEmptyParts_64() End If End Function Private Function EgtSelectPartObjs_32(nPartId As Integer) As Boolean End Function Private Function EgtSelectPartObjs_64(nPartId As Integer) As Boolean End Function Public Function EgtSelectPartObjs(nPartId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSelectPartObjs_32(nPartId) Else Return EgtSelectPartObjs_64(nPartId) End If End Function Private Function EgtDeselectPartObjs_32(nPartId As Integer) As Boolean End Function Private Function EgtDeselectPartObjs_64(nPartId As Integer) As Boolean End Function Public Function EgtDeselectPartObjs(nPartId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtDeselectPartObjs_32(nPartId) Else Return EgtDeselectPartObjs_64(nPartId) End If End Function Private Function EgtSelectLayerObjs_32(nLayerId As Integer) As Boolean End Function Private Function EgtSelectLayerObjs_64(nLayerId As Integer) As Boolean End Function Public Function EgtSelectLayerObjs(nLayerId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSelectLayerObjs_32(nLayerId) Else Return EgtSelectLayerObjs_64(nLayerId) End If End Function Private Function EgtDeselectLayerObjs_32(nLayerId As Integer) As Boolean End Function Private Function EgtDeselectLayerObjs_64(nLayerId As Integer) As Boolean End Function Public Function EgtDeselectLayerObjs(nLayerId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtDeselectLayerObjs_32(nLayerId) Else Return EgtDeselectLayerObjs_64(nLayerId) End If End Function Private Function EgtSelectPathObjs_32(nId As Integer, bHaltOnFork As Boolean) As Boolean End Function Private Function EgtSelectPathObjs_64(nId As Integer, bHaltOnFork As Boolean) As Boolean End Function Public Function EgtSelectPathObjs(nId As Integer, bHaltOnFork As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtSelectPathObjs_32(nId, bHaltOnFork) Else Return EgtSelectPathObjs_64(nId, bHaltOnFork) End If End Function '---------- GeomDb Objects ----------------------------------------------------- Private Function EgtExistsObj_32(nId As Integer) As Boolean End Function Private Function EgtExistsObj_64(nId As Integer) As Boolean End Function Public Function EgtExistsObj(nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtExistsObj_32(nId) Else Return EgtExistsObj_64(nId) End If End Function Private Function EgtGetParent_32(nId As Integer) As Integer End Function Private Function EgtGetParent_64(nId As Integer) As Integer End Function Public Function EgtGetParent(nId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetParent_32(nId) Else Return EgtGetParent_64(nId) End If End Function Private Function EgtGetGlobFrame_32(nId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtGetGlobFrame_64(nId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Public Function EgtGetGlobFrame(nId As Integer, ByRef frGRef As Frame3d) As Boolean Dim PtOrig As Point3d Dim VtDirX, VtDirY, VtDirZ As Vector3d Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetGlobFrame_32(nId, PtOrig, VtDirX, VtDirY, VtDirZ) Else bOk = EgtGetGlobFrame_64(nId, PtOrig, VtDirX, VtDirY, VtDirZ) End If If Not bOk Then Return False Else Return frGRef.Setup(PtOrig, VtDirX, VtDirY, VtDirZ) End If End Function Private Function EgtGetGroupGlobFrame_32(nGroupId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtGetGroupGlobFrame_64(nGroupId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Public Function EgtGetGroupGlobFrame(nGroupId As Integer, ByRef frGRef As Frame3d) As Boolean Dim PtOrig As Point3d Dim VtDirX, VtDirY, VtDirZ As Vector3d Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetGroupGlobFrame_32(nGroupId, PtOrig, VtDirX, VtDirY, VtDirZ) Else bOk = EgtGetGroupGlobFrame_64(nGroupId, PtOrig, VtDirX, VtDirY, VtDirZ) End If If Not bOk Then Return False Else Return frGRef.Setup(PtOrig, VtDirX, VtDirY, VtDirZ) End If End Function Private Function EgtGetGroupObjs_32(nGroupId As Integer) As Integer End Function Private Function EgtGetGroupObjs_64(nGroupId As Integer) As Integer End Function Public Function EgtGetGroupObjs(nGroupId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetGroupObjs_32(nGroupId) Else Return EgtGetGroupObjs_64(nGroupId) End If End Function Private Function EgtGetFirstInGroup_32(nGroupId As Integer) As Integer End Function Private Function EgtGetFirstInGroup_64(nGroupId As Integer) As Integer End Function Public Function EgtGetFirstInGroup(nGroupId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetFirstInGroup_32(nGroupId) Else Return EgtGetFirstInGroup_64(nGroupId) End If End Function Private Function EgtGetNext_32(nId As Integer) As Integer End Function Private Function EgtGetNext_64(nId As Integer) As Integer End Function Public Function EgtGetNext(nId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetNext_32(nId) Else Return EgtGetNext_64(nId) End If End Function Private Function EgtGetLastInGroup_32(nGroupId As Integer) As Integer End Function Private Function EgtGetLastInGroup_64(nGroupId As Integer) As Integer End Function Public Function EgtGetLastInGroup(nGroupId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetLastInGroup_32(nGroupId) Else Return EgtGetLastInGroup_64(nGroupId) End If End Function Private Function EgtGetPrev_32(nId As Integer) As Integer End Function Private Function EgtGetPrev_64(nId As Integer) As Integer End Function Public Function EgtGetPrev(nId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetPrev_32(nId) Else Return EgtGetPrev_64(nId) End If End Function Private Function EgtGetFirstGroupInGroup_32(nGroupId As Integer) As Integer End Function Private Function EgtGetFirstGroupInGroup_64(nGroupId As Integer) As Integer End Function Public Function EgtGetFirstGroupInGroup(nGroupId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetFirstGroupInGroup_32(nGroupId) Else Return EgtGetFirstGroupInGroup_64(nGroupId) End If End Function Private Function EgtGetNextGroup_32(nId As Integer) As Integer End Function Private Function EgtGetNextGroup_64(nId As Integer) As Integer End Function Public Function EgtGetNextGroup(nId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetNextGroup_32(nId) Else Return EgtGetNextGroup_64(nId) End If End Function Private Function EgtGetLastGroupInGroup_32(nGroupId As Integer) As Integer End Function Private Function EgtGetLastGroupInGroup_64(nGroupId As Integer) As Integer End Function Public Function EgtGetLastGroupInGroup(nGroupId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetLastGroupInGroup_32(nGroupId) Else Return EgtGetLastGroupInGroup_64(nGroupId) End If End Function Private Function EgtGetPrevGroup_32(nId As Integer) As Integer End Function Private Function EgtGetPrevGroup_64(nId As Integer) As Integer End Function Public Function EgtGetPrevGroup(nId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetPrevGroup_32(nId) Else Return EgtGetPrevGroup_64(nId) End If End Function Private Function EgtGetFirstNameInGroup_32(nGroupId As Integer, sName As String) As Integer End Function Private Function EgtGetFirstNameInGroup_64(nGroupId As Integer, sName As String) As Integer End Function Public Function EgtGetFirstNameInGroup(nGroupId As Integer, sName As String) As Integer If IntPtr.Size = 4 Then Return EgtGetFirstNameInGroup_32(nGroupId, sName) Else Return EgtGetFirstNameInGroup_64(nGroupId, sName) End If End Function Private Function EgtGetNextName_32(nId As Integer, sName As String) As Integer End Function Private Function EgtGetNextName_64(nId As Integer, sName As String) As Integer End Function Public Function EgtGetNextName(nId As Integer, sName As String) As Integer If IntPtr.Size = 4 Then Return EgtGetNextName_32(nId, sName) Else Return EgtGetNextName_64(nId, sName) End If End Function Private Function EgtGetLastNameInGroup_32(nGroupId As Integer, sName As String) As Integer End Function Private Function EgtGetLastNameInGroup_64(nGroupId As Integer, sName As String) As Integer End Function Public Function EgtGetLastNameInGroup(nGroupId As Integer, sName As String) As Integer If IntPtr.Size = 4 Then Return EgtGetLastNameInGroup_32(nGroupId, sName) Else Return EgtGetLastNameInGroup_64(nGroupId, sName) End If End Function Private Function EgtGetPrevName_32(nId As Integer, sName As String) As Integer End Function Private Function EgtGetPrevName_64(nId As Integer, sName As String) As Integer End Function Public Function EgtGetPrevName(nId As Integer, sName As String) As Integer If IntPtr.Size = 4 Then Return EgtGetPrevName_32(nId, sName) Else Return EgtGetPrevName_64(nId, sName) End If End Function Private Function EgtGetBBox_32(nId As Integer, nFlag As Integer, ByRef PtMin As Point3d, ByRef PtMax As Point3d) As Boolean End Function Private Function EgtGetBBox_64(nId As Integer, nFlag As Integer, ByRef PtMin As Point3d, ByRef PtMax As Point3d) As Boolean End Function Public Function EgtGetBBox(nId As Integer, nFlag As Integer, ByRef PtMin As Point3d, ByRef PtMax As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetBBox_32(nId, nFlag, PtMin, PtMax) Else Return EgtGetBBox_64(nId, nFlag, PtMin, PtMax) End If End Function Public Function EgtGetBBox(nId As Integer, nFlag As Integer, ByRef b3Box As BBox3d) As Boolean b3Box.Setup() Dim ptMin, ptMax As Point3d If IntPtr.Size = 4 Then If Not EgtGetBBox_32(nId, nFlag, ptMin, ptMax) Then Return False Else If Not EgtGetBBox_64(nId, nFlag, ptMin, ptMax) Then Return False End If b3Box.Add(ptMin) b3Box.Add(ptMax) Return True End Function Private Function EgtGetBBoxGlob_32(nId As Integer, nFlag As Integer, ByRef PtMin As Point3d, ByRef PtMax As Point3d) As Boolean End Function Private Function EgtGetBBoxGlob_64(nId As Integer, nFlag As Integer, ByRef PtMin As Point3d, ByRef PtMax As Point3d) As Boolean End Function Public Function EgtGetBBoxGlob(nId As Integer, nFlag As Integer, ByRef PtMin As Point3d, ByRef PtMax As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetBBoxGlob_32(nId, nFlag, PtMin, PtMax) Else Return EgtGetBBoxGlob_64(nId, nFlag, PtMin, PtMax) End If End Function Public Function EgtGetBBoxGlob(nId As Integer, nFlag As Integer, ByRef b3Box As BBox3d) As Boolean b3Box.Setup() Dim ptMin, ptMax As Point3d If IntPtr.Size = 4 Then If Not EgtGetBBoxGlob_32(nId, nFlag, ptMin, ptMax) Then Return False Else If Not EgtGetBBoxGlob_64(nId, nFlag, ptMin, ptMax) Then Return False End If b3Box.Add(ptMin) b3Box.Add(ptMax) Return True End Function Private Function EgtCopy_32(nId As Integer, nRefId As Integer, Optional nSonBeforeAfter As GDB_POS = GDB_POS.LAST_SON) As Integer End Function Private Function EgtCopy_64(nId As Integer, nRefId As Integer, Optional nSonBeforeAfter As GDB_POS = GDB_POS.LAST_SON) As Integer End Function Public Function EgtCopy(nId As Integer, nRefId As Integer, Optional nSonBeforeAfter As GDB_POS = GDB_POS.LAST_SON) As Integer If IntPtr.Size = 4 Then Return EgtCopy_32(nId, nRefId, nSonBeforeAfter) Else Return EgtCopy_64(nId, nRefId, nSonBeforeAfter) End If End Function Private Function EgtCopyGlob_32(nId As Integer, nRefId As Integer, Optional nSonBeforeAfter As GDB_POS = GDB_POS.LAST_SON) As Integer End Function Private Function EgtCopyGlob_64(nId As Integer, nRefId As Integer, Optional nSonBeforeAfter As GDB_POS = GDB_POS.LAST_SON) As Integer End Function Public Function EgtCopyGlob(nId As Integer, nRefId As Integer, Optional nSonBeforeAfter As GDB_POS = GDB_POS.LAST_SON) As Integer If IntPtr.Size = 4 Then Return EgtCopyGlob_32(nId, nRefId, nSonBeforeAfter) Else Return EgtCopyGlob_64(nId, nRefId, nSonBeforeAfter) End If End Function Private Function EgtRelocate_32(nId As Integer, nRefId As Integer, Optional nSonBeforeAfter As GDB_POS = GDB_POS.LAST_SON) As Boolean End Function Private Function EgtRelocate_64(nId As Integer, nRefId As Integer, Optional nSonBeforeAfter As GDB_POS = GDB_POS.LAST_SON) As Boolean End Function Public Function EgtRelocate(nId As Integer, nRefId As Integer, Optional nSonBeforeAfter As GDB_POS = GDB_POS.LAST_SON) As Boolean If IntPtr.Size = 4 Then Return EgtRelocate_32(nId, nRefId, nSonBeforeAfter) Else Return EgtRelocate_64(nId, nRefId, nSonBeforeAfter) End If End Function Private Function EgtRelocateGlob_32(nId As Integer, nRefId As Integer, Optional nSonBeforeAfter As GDB_POS = GDB_POS.LAST_SON) As Boolean End Function Private Function EgtRelocateGlob_64(nId As Integer, nRefId As Integer, Optional nSonBeforeAfter As GDB_POS = GDB_POS.LAST_SON) As Boolean End Function Public Function EgtRelocateGlob(nId As Integer, nRefId As Integer, Optional nSonBeforeAfter As GDB_POS = GDB_POS.LAST_SON) As Boolean If IntPtr.Size = 4 Then Return EgtRelocateGlob_32(nId, nRefId, nSonBeforeAfter) Else Return EgtRelocateGlob_64(nId, nRefId, nSonBeforeAfter) End If End Function Private Function EgtChangeId_32(nId As Integer, nNewId As Integer) As Boolean End Function Private Function EgtChangeId_64(nId As Integer, nNewId As Integer) As Boolean End Function Public Function EgtChangeId(nId As Integer, nNewId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtChangeId_32(nId, nNewId) Else Return EgtChangeId_64(nId, nNewId) End If End Function Private Function EgtErase_32(nId As Integer) As Boolean End Function Private Function EgtErase_64(nId As Integer) As Boolean End Function Public Function EgtErase(nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtErase_32(nId) Else Return EgtErase_64(nId) End If End Function Private Function EgtEmptyGroup_32(nId As Integer) As Boolean End Function Private Function EgtEmptyGroup_64(nId As Integer) As Boolean End Function Public Function EgtEmptyGroup(nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtEmptyGroup_32(nId) Else Return EgtEmptyGroup_64(nId) End If End Function Private Function EgtGetType_32(nId As Integer) As GDB_TY End Function Private Function EgtGetType_64(nId As Integer) As GDB_TY End Function Public Function EgtGetType(nId As Integer) As GDB_TY If IntPtr.Size = 4 Then Return EgtGetType_32(nId) Else Return EgtGetType_64(nId) End If End Function Private Function EgtGetTitle_32(nId As Integer, ByRef psTitle As IntPtr) As Boolean End Function Private Function EgtGetTitle_64(nId As Integer, ByRef psTitle As IntPtr) As Boolean End Function Public Function EgtGetTitle(nId As Integer, ByRef sTitle As String) As Boolean Dim psTitle As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetTitle_32(nId, psTitle) Else bOk = EgtGetTitle_64(nId, psTitle) End If If bOk Then sTitle = Marshal.PtrToStringUni(psTitle) EgtFreeMemory(psTitle) Else sTitle = String.Empty End If Return bOk End Function Private Function EgtGroupDump_32(nId As Integer, ByRef psDump As IntPtr) As Boolean End Function Private Function EgtGroupDump_64(nId As Integer, ByRef psDump As IntPtr) As Boolean End Function Public Function EgtGroupDump(nId As Integer, ByRef sDump As String) As Boolean Dim psDump As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGroupDump_32(nId, psDump) Else bOk = EgtGroupDump_64(nId, psDump) End If If bOk Then sDump = Marshal.PtrToStringUni(psDump) EgtFreeMemory(psDump) Else sDump = String.Empty End If Return bOk End Function Private Function EgtGeoObjDump_32(nId As Integer, ByRef psDump As IntPtr) As Boolean End Function Private Function EgtGeoObjDump_64(nId As Integer, ByRef psDump As IntPtr) As Boolean End Function Public Function EgtGeoObjDump(nId As Integer, ByRef sDump As String) As Boolean Dim psDump As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGeoObjDump_32(nId, psDump) Else bOk = EgtGeoObjDump_64(nId, psDump) End If If bOk Then sDump = Marshal.PtrToStringUni(psDump) EgtFreeMemory(psDump) Else sDump = String.Empty End If Return bOk End Function '---------- GeomDb Obj Attributes ---------------------------------------------- Private Function EgtSetLevel_32(nId As Integer, nLevel As Integer) As Boolean End Function Private Function EgtSetLevel_64(nId As Integer, nLevel As Integer) As Boolean End Function Public Function EgtSetLevel(nId As Integer, nLevel As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSetLevel_32(nId, nLevel) Else Return EgtSetLevel_64(nId, nLevel) End If End Function Private Function EgtRevertLevel_32(nId As Integer) As Boolean End Function Private Function EgtRevertLevel_64(nId As Integer) As Boolean End Function Public Function EgtRevertLevel(nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtRevertLevel_32(nId) Else Return EgtRevertLevel_64(nId) End If End Function Private Function EgtGetLevel_32(nId As Integer, ByRef nLevel As Integer) As Boolean End Function Private Function EgtGetLevel_64(nId As Integer, ByRef nLevel As Integer) As Boolean End Function Public Function EgtGetLevel(nId As Integer, ByRef nLevel As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetLevel_32(nId, nLevel) Else Return EgtGetLevel_64(nId, nLevel) End If End Function Private Function EgtGetCalcLevel_32(nId As Integer, ByRef nLevel As Integer) As Boolean End Function Private Function EgtGetCalcLevel_64(nId As Integer, ByRef nLevel As Integer) As Boolean End Function Public Function EgtGetCalcLevel(nId As Integer, ByRef nLevel As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetCalcLevel_32(nId, nLevel) Else Return EgtGetCalcLevel_64(nId, nLevel) End If End Function Private Function EgtSetMode_32(nId As Integer, nMode As Integer) As Boolean End Function Private Function EgtSetMode_64(nId As Integer, nMode As Integer) As Boolean End Function Public Function EgtSetMode(nId As Integer, nMode As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSetMode_32(nId, nMode) Else Return EgtSetMode_64(nId, nMode) End If End Function Private Function EgtRevertMode_32(nId As Integer) As Boolean End Function Private Function EgtRevertMode_64(nId As Integer) As Boolean End Function Public Function EgtRevertMode(nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtRevertMode_32(nId) Else Return EgtRevertMode_64(nId) End If End Function Private Function EgtGetMode_32(nId As Integer, ByRef nMode As Integer) As Boolean End Function Private Function EgtGetMode_64(nId As Integer, ByRef nMode As Integer) As Boolean End Function Public Function EgtGetMode(nId As Integer, ByRef nMode As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetMode_32(nId, nMode) Else Return EgtGetMode_64(nId, nMode) End If End Function Private Function EgtGetCalcMode_32(nId As Integer, ByRef nMode As Integer) As Boolean End Function Private Function EgtGetCalcMode_64(nId As Integer, ByRef nMode As Integer) As Boolean End Function Public Function EgtGetCalcMode(nId As Integer, ByRef nMode As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetCalcMode_32(nId, nMode) Else Return EgtGetCalcMode_64(nId, nMode) End If End Function Private Function EgtSetStatus_32(nId As Integer, nStat As Integer) As Boolean End Function Private Function EgtSetStatus_64(nId As Integer, nStat As Integer) As Boolean End Function Public Function EgtSetStatus(nId As Integer, nStat As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSetStatus_32(nId, nStat) Else Return EgtSetStatus_64(nId, nStat) End If End Function Private Function EgtRevertStatus_32(nId As Integer) As Boolean End Function Private Function EgtRevertStatus_64(nId As Integer) As Boolean End Function Public Function EgtRevertStatus(nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtRevertStatus_32(nId) Else Return EgtRevertStatus_64(nId) End If End Function Private Function EgtGetStatus_32(nId As Integer, ByRef nStat As Integer) As Boolean End Function Private Function EgtGetStatus_64(nId As Integer, ByRef nStat As Integer) As Boolean End Function Public Function EgtGetStatus(nId As Integer, ByRef nStat As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetStatus_32(nId, nStat) Else Return EgtGetStatus_64(nId, nStat) End If End Function Private Function EgtGetCalcStatus_32(nId As Integer, ByRef nStat As Integer) As Boolean End Function Private Function EgtGetCalcStatus_64(nId As Integer, ByRef nStat As Integer) As Boolean End Function Public Function EgtGetCalcStatus(nId As Integer, ByRef nStat As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetCalcStatus_32(nId, nStat) Else Return EgtGetCalcStatus_64(nId, nStat) End If End Function Public Function EgtIsVisibleObj(nId As Integer) As Boolean Dim nStat As GDB_ST = GDB_ST.ON_ Return EgtGetCalcStatus(nId, nStat) AndAlso nStat <> GDB_ST.OFF End Function Private Function EgtSetMark_32(nId As Integer) As Boolean End Function Private Function EgtSetMark_64(nId As Integer) As Boolean End Function Public Function EgtSetMark(nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSetMark_32(nId) Else Return EgtSetMark_64(nId) End If End Function Private Function EgtResetMark_32(nId As Integer) As Boolean End Function Private Function EgtResetMark_64(nId As Integer) As Boolean End Function Public Function EgtResetMark(nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtResetMark_32(nId) Else Return EgtResetMark_64(nId) End If End Function Private Function EgtGetMark_32(nId As Integer, ByRef bMark As Boolean) As Boolean End Function Private Function EgtGetMark_64(nId As Integer, ByRef bMark As Boolean) As Boolean End Function Public Function EgtGetMark(nId As Integer, ByRef bMark As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtGetMark_32(nId, bMark) Else Return EgtGetMark_64(nId, bMark) End If End Function Private Function EgtGetCalcMark_32(nId As Integer, ByRef bMark As Boolean) As Boolean End Function Private Function EgtGetCalcMark_64(nId As Integer, ByRef bMark As Boolean) As Boolean End Function Public Function EgtGetCalcMark(nId As Integer, ByRef bMark As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtGetCalcMark_32(nId, bMark) Else Return EgtGetCalcMark_64(nId, bMark) End If End Function Private Function EgtSetColor_32(nId As Integer, ByRef ColObj As Color3d, Optional bSetAlpha As Boolean = True) As Boolean End Function Private Function EgtSetColor_64(nId As Integer, ByRef ColObj As Color3d, Optional bSetAlpha As Boolean = True) As Boolean End Function Public Function EgtSetColor(nId As Integer, ByRef ColObj As Color3d, Optional bSetAlpha As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtSetColor_32(nId, ColObj, bSetAlpha) Else Return EgtSetColor_64(nId, ColObj, bSetAlpha) End If End Function Private Function EgtSetAlpha_32(nId As Integer, nAlpha As Integer) As Boolean End Function Private Function EgtSetAlpha_64(nId As Integer, nAlpha As Integer) As Boolean End Function Public Function EgtSetAlpha(nId As Integer, nAlpha As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSetAlpha_32(nId, nAlpha) Else Return EgtSetAlpha_64(nId, nAlpha) End If End Function Private Function EgtResetColor_32(nId As Integer) As Boolean End Function Private Function EgtResetColor_64(nId As Integer) As Boolean End Function Public Function EgtResetColor(nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtResetColor_32(nId) Else Return EgtResetColor_64(nId) End If End Function Private Function EgtGetColor_32(nId As Integer, ByRef ColObj As Color3d) As Boolean End Function Private Function EgtGetColor_64(nId As Integer, ByRef ColObj As Color3d) As Boolean End Function Public Function EgtGetColor(nId As Integer, ByRef ColObj As Color3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetColor_32(nId, ColObj) Else Return EgtGetColor_64(nId, ColObj) End If End Function Private Function EgtGetCalcColor_32(nId As Integer, ByRef ColObj As Color3d) As Boolean End Function Private Function EgtGetCalcColor_64(nId As Integer, ByRef ColObj As Color3d) As Boolean End Function Public Function EgtGetCalcColor(nId As Integer, ByRef ColObj As Color3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetCalcColor_32(nId, ColObj) Else Return EgtGetCalcColor_64(nId, ColObj) End If End Function Private Function EgtSetName_32(nId As Integer, sName As String) As Boolean End Function Private Function EgtSetName_64(nId As Integer, sName As String) As Boolean End Function Public Function EgtSetName(nId As Integer, sName As String) As Boolean If IntPtr.Size = 4 Then Return EgtSetName_32(nId, sName) Else Return EgtSetName_64(nId, sName) End If End Function Private Function EgtGetName_32(nId As Integer, ByRef psName As IntPtr) As Boolean End Function Private Function EgtGetName_64(nId As Integer, ByRef psName As IntPtr) As Boolean End Function Public Function EgtGetName(nId As Integer, ByRef sName As String) As Boolean Dim psName As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetName_32(nId, psName) Else bOk = EgtGetName_64(nId, psName) End If If bOk Then sName = Marshal.PtrToStringUni(psName) EgtFreeMemory(psName) Else sName = String.Empty End If Return bOk End Function Private Function EgtExistsName_32(nId As Integer) As Boolean End Function Private Function EgtExistsName_64(nId As Integer) As Boolean End Function Public Function EgtExistsName(nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtExistsName_32(nId) Else Return EgtExistsName_64(nId) End If End Function Private Function EgtRemoveName_32(nId As Integer) As Boolean End Function Private Function EgtRemoveName_64(nId As Integer) As Boolean End Function Public Function EgtRemoveName(nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtRemoveName_32(nId) Else Return EgtRemoveName_64(nId) End If End Function Private Function EgtSetInfo_32(nId As Integer, sKey As String, sInfo As String) As Boolean End Function Private Function EgtSetInfo_64(nId As Integer, sKey As String, sInfo As String) As Boolean End Function Public Function EgtSetInfo(nId As Integer, sKey As String, sInfo As String) As Boolean If IntPtr.Size = 4 Then Return EgtSetInfo_32(nId, sKey, sInfo) Else Return EgtSetInfo_64(nId, sKey, sInfo) End If End Function Private Function EgtSetInfoBool_32(nId As Integer, sKey As String, bInfo As Boolean) As Boolean End Function Private Function EgtSetInfoBool_64(nId As Integer, sKey As String, bInfo As Boolean) As Boolean End Function Public Function EgtSetInfo(nId As Integer, sKey As String, bInfo As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtSetInfoBool_32(nId, sKey, bInfo) Else Return EgtSetInfoBool_64(nId, sKey, bInfo) End If End Function Private Function EgtSetInfoInt_32(nId As Integer, sKey As String, nInfo As Integer) As Boolean End Function Private Function EgtSetInfoInt_64(nId As Integer, sKey As String, nInfo As Integer) As Boolean End Function Public Function EgtSetInfo(nId As Integer, sKey As String, nInfo As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSetInfoInt_32(nId, sKey, nInfo) Else Return EgtSetInfoInt_64(nId, sKey, nInfo) End If End Function Private Function EgtSetInfoDouble_32(nId As Integer, sKey As String, dInfo As Double) As Boolean End Function Private Function EgtSetInfoDouble_64(nId As Integer, sKey As String, dInfo As Double) As Boolean End Function Public Function EgtSetInfo(nId As Integer, sKey As String, dInfo As Double) As Boolean If IntPtr.Size = 4 Then Return EgtSetInfoDouble_32(nId, sKey, dInfo) Else Return EgtSetInfoDouble_64(nId, sKey, dInfo) End If End Function Private Function EgtSetInfoVector_32(nId As Integer, sKey As String, ByRef vtV As Vector3d) As Boolean End Function Private Function EgtSetInfoVector_64(nId As Integer, sKey As String, ByRef vtV As Vector3d) As Boolean End Function Public Function EgtSetInfo(nId As Integer, sKey As String, vtV As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtSetInfoVector_32(nId, sKey, vtV) Else Return EgtSetInfoVector_64(nId, sKey, vtV) End If End Function Private Function EgtSetInfoPoint_32(nId As Integer, sKey As String, ByRef ptP As Point3d) As Boolean End Function Private Function EgtSetInfoPoint_64(nId As Integer, sKey As String, ByRef ptP As Point3d) As Boolean End Function Public Function EgtSetInfo(nId As Integer, sKey As String, ptP As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtSetInfoPoint_32(nId, sKey, ptP) Else Return EgtSetInfoPoint_64(nId, sKey, ptP) End If End Function Private Function EgtSetInfoBBox_32(nId As Integer, sKey As String, ByRef PtMin As Point3d, ByRef PtMax As Point3d) As Boolean End Function Private Function EgtSetInfoBBox_64(nId As Integer, sKey As String, ByRef PtMin As Point3d, ByRef PtMax As Point3d) As Boolean End Function Public Function EgtSetInfo(nId As Integer, sKey As String, Box As BBox3d) As Boolean If IntPtr.Size = 4 Then Return EgtSetInfoBBox_32(nId, sKey, Box.Min(), Box.Max()) Else Return EgtSetInfoBBox_64(nId, sKey, Box.Min(), Box.Max()) End If End Function Private Function EgtSetInfoFrame_32(nId As Integer, sKey As String, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtSetInfoFrame_64(nId As Integer, sKey As String, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Public Function EgtSetInfo(nId As Integer, sKey As String, Frame As Frame3d) As Boolean If IntPtr.Size = 4 Then Return EgtSetInfoFrame_32(nId, sKey, Frame.Orig(), Frame.VersX(), Frame.VersY(), Frame.VersZ()) Else Return EgtSetInfoFrame_64(nId, sKey, Frame.Orig(), Frame.VersX(), Frame.VersY(), Frame.VersZ()) End If End Function Private Function EgtGetInfo_32(nId As Integer, sKey As String, ByRef psInfo As IntPtr) As Boolean End Function Private Function EgtGetInfo_64(nId As Integer, sKey As String, ByRef psInfo As IntPtr) As Boolean End Function Public Function EgtGetInfo(nId As Integer, sKey As String, ByRef sInfo As String) As Boolean Dim psInfo As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetInfo_32(nId, sKey, psInfo) Else bOk = EgtGetInfo_64(nId, sKey, psInfo) End If If bOk Then sInfo = Marshal.PtrToStringUni(psInfo) EgtFreeMemory(psInfo) Else sInfo = String.Empty End If Return bOk End Function Private Function EgtGetInfoBool_32(nId As Integer, sKey As String, ByRef bInfo As Boolean) As Boolean End Function Private Function EgtGetInfoBool_64(nId As Integer, sKey As String, ByRef bInfo As Boolean) As Boolean End Function Public Function EgtGetInfo(nId As Integer, sKey As String, ByRef bInfo As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtGetInfoBool_32(nId, sKey, bInfo) Else Return EgtGetInfoBool_64(nId, sKey, bInfo) End If End Function Private Function EgtGetInfoInt_32(nId As Integer, sKey As String, ByRef nInfo As Integer) As Boolean End Function Private Function EgtGetInfoInt_64(nId As Integer, sKey As String, ByRef nInfo As Integer) As Boolean End Function Public Function EgtGetInfo(nId As Integer, sKey As String, ByRef nInfo As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetInfoInt_32(nId, sKey, nInfo) Else Return EgtGetInfoInt_64(nId, sKey, nInfo) End If End Function Private Function EgtGetInfoDouble_32(nId As Integer, sKey As String, ByRef dInfo As Double) As Boolean End Function Private Function EgtGetInfoDouble_64(nId As Integer, sKey As String, ByRef dInfo As Double) As Boolean End Function Public Function EgtGetInfo(nId As Integer, sKey As String, ByRef dInfo As Double) As Boolean If IntPtr.Size = 4 Then Return EgtGetInfoDouble_32(nId, sKey, dInfo) Else Return EgtGetInfoDouble_64(nId, sKey, dInfo) End If End Function Private Function EgtGetInfoVector_32(nId As Integer, sKey As String, ByRef vtV As Vector3d) As Boolean End Function Private Function EgtGetInfoVector_64(nId As Integer, sKey As String, ByRef vtV As Vector3d) As Boolean End Function Public Function EgtGetInfo(nId As Integer, sKey As String, ByRef vtV As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetInfoVector_32(nId, sKey, vtV) Else Return EgtGetInfoVector_64(nId, sKey, vtV) End If End Function Private Function EgtGetInfoPoint_32(nId As Integer, sKey As String, ByRef ptP As Point3d) As Boolean End Function Private Function EgtGetInfoPoint_64(nId As Integer, sKey As String, ByRef ptP As Point3d) As Boolean End Function Public Function EgtGetInfo(nId As Integer, sKey As String, ByRef ptP As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetInfoPoint_32(nId, sKey, ptP) Else Return EgtGetInfoPoint_64(nId, sKey, ptP) End If End Function Private Function EgtGetInfoBBox_32(nId As Integer, sKey As String, ByRef PtMin As Point3d, ByRef PtMax As Point3d) As Boolean End Function Private Function EgtGetInfoBBox_64(nId As Integer, sKey As String, ByRef PtMin As Point3d, ByRef PtMax As Point3d) As Boolean End Function Public Function EgtGetInfo(nId As Integer, sKey As String, ByRef Box As BBox3d) As Boolean Dim ptMin As Point3d Dim ptMax As Point3d If IntPtr.Size = 4 Then If Not EgtGetInfoBBox_32(nId, sKey, ptMin, ptMax) Then Return False End If Else If Not EgtGetInfoBBox_64(nId, sKey, ptMin, ptMax) Then Return False End If End If Return Box.Setup(ptMin, ptMax) End Function Private Function EgtGetInfoFrame_32(nId As Integer, sKey As String, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtGetInfoFrame_64(nId As Integer, sKey As String, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Public Function EgtGetInfo(nId As Integer, sKey As String, ByRef Frame As Frame3d) As Boolean Dim ptOri As Point3d Dim vtX As Vector3d Dim vtY As Vector3d Dim vtZ As Vector3d If IntPtr.Size = 4 Then If Not EgtGetInfoFrame_32(nId, sKey, ptOri, vtX, vtY, vtZ) Then Return False End If Else If Not EgtGetInfoFrame_64(nId, sKey, ptOri, vtX, vtY, vtZ) Then Return False End If End If Return Frame.Setup(ptOri, vtX, vtY, vtZ) End Function Private Function EgtExistsInfo_32(nId As Integer, sKey As String) As Boolean End Function Private Function EgtExistsInfo_64(nId As Integer, sKey As String) As Boolean End Function Public Function EgtExistsInfo(nId As Integer, sKey As String) As Boolean If IntPtr.Size = 4 Then Return EgtExistsInfo_32(nId, sKey) Else Return EgtExistsInfo_64(nId, sKey) End If End Function Private Function EgtRemoveInfo_32(nId As Integer, sKey As String) As Boolean End Function Private Function EgtRemoveInfo_64(nId As Integer, sKey As String) As Boolean End Function Public Function EgtRemoveInfo(nId As Integer, sKey As String) As Boolean If IntPtr.Size = 4 Then Return EgtRemoveInfo_32(nId, sKey) Else Return EgtRemoveInfo_64(nId, sKey) End If End Function Private Function EgtSetTextureName_32(nId As Integer, sName As String) As Boolean End Function Private Function EgtSetTextureName_64(nId As Integer, sName As String) As Boolean End Function Public Function EgtSetTextureName(nId As Integer, sName As String) As Boolean If IntPtr.Size = 4 Then Return EgtSetTextureName_32(nId, sName) Else Return EgtSetTextureName_64(nId, sName) End If End Function Private Function EgtSetTextureFrame_32(nId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, nRefType As GDB_RT) As Boolean End Function Private Function EgtSetTextureFrame_64(nId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, nRefType As GDB_RT) As Boolean End Function Public Function EgtSetTextureFrame(nId As Integer, ByRef frRef As Frame3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtSetTextureFrame_32(nId, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ(), nRefType) Else Return EgtSetTextureFrame_64(nId, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ(), nRefType) End If End Function Private Function EgtRemoveTextureData_32(nId As Integer) As Boolean End Function Private Function EgtRemoveTextureData_64(nId As Integer) As Boolean End Function Public Function EgtRemoveTextureData(nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtRemoveTextureData_32(nId) Else Return EgtRemoveTextureData_64(nId) End If End Function Private Function EgtGetTextureName_32(nId As Integer, ByRef psName As IntPtr) As Boolean End Function Private Function EgtGetTextureName_64(nId As Integer, ByRef psName As IntPtr) As Boolean End Function Public Function EgtGetTextureName(nId As Integer, ByRef sName As String) As Boolean Dim psName As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetTextureName_32(nId, psName) Else bOk = EgtGetTextureName_64(nId, psName) End If If bOk Then sName = Marshal.PtrToStringUni(psName) EgtFreeMemory(psName) Else sName = String.Empty End If Return bOk End Function Private Function EgtGetTextureFrame_32(nId As Integer, nRefId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtGetTextureFrame_64(nId As Integer, nRefId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Public Function EgtGetTextureFrame(nId As Integer, nRefId As Integer, ByRef frRef As Frame3d) As Boolean Dim ptOri As Point3d Dim vtX As Vector3d Dim vtY As Vector3d Dim vtZ As Vector3d If IntPtr.Size = 4 Then If Not EgtGetTextureFrame_32(nId, nRefId, ptOri, vtX, vtY, vtZ) Then Return False End If Else If Not EgtGetTextureFrame_64(nId, nRefId, ptOri, vtX, vtY, vtZ) Then Return False End If End If Return frRef.Setup(ptOri, vtX, vtY, vtZ) End Function '---------- GeomDb Obj Selection ----------------------------------------------- Private Function EgtSetObjFilterForSelect_32(bZeroDim As Boolean, bCurve As Boolean, bSurf As Boolean, bVolume As Boolean, bExtra As Boolean) As Boolean End Function Private Function EgtSetObjFilterForSelect_64(bZeroDim As Boolean, bCurve As Boolean, bSurf As Boolean, bVolume As Boolean, bExtra As Boolean) As Boolean End Function Public Function EgtSetObjFilterForSelect(bZeroDim As Boolean, bCurve As Boolean, bSurf As Boolean, bVolume As Boolean, bExtra As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtSetObjFilterForSelect_32(bZeroDim, bCurve, bSurf, bVolume, bExtra) Else Return EgtSetObjFilterForSelect_64(bZeroDim, bCurve, bSurf, bVolume, bExtra) End If End Function Private Function EgtSelectObj_32(nId As Integer) As Boolean End Function Private Function EgtSelectObj_64(nId As Integer) As Boolean End Function Public Function EgtSelectObj(nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSelectObj_32(nId) Else Return EgtSelectObj_64(nId) End If End Function Private Function EgtDeselectObj_32(nId As Integer) As Boolean End Function Private Function EgtDeselectObj_64(nId As Integer) As Boolean End Function Public Function EgtDeselectObj(nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtDeselectObj_32(nId) Else Return EgtDeselectObj_64(nId) End If End Function Private Function EgtSelectAll_32(Optional bOnlyIfVisible As Boolean = False) As Boolean End Function Private Function EgtSelectAll_64(Optional bOnlyIfVisible As Boolean = False) As Boolean End Function Public Function EgtSelectAll(Optional bOnlyIfVisible As Boolean = False) As Boolean If IntPtr.Size = 4 Then Return EgtSelectAll_32(bOnlyIfVisible) Else Return EgtSelectAll_64(bOnlyIfVisible) End If End Function Private Function EgtDeselectAll_32() As Boolean End Function Private Function EgtDeselectAll_64() As Boolean End Function Public Function EgtDeselectAll() As Boolean If IntPtr.Size = 4 Then Return EgtDeselectAll_32() Else Return EgtDeselectAll_64() End If End Function Private Function EgtSelectGroupObjs_32(nGroupId As Integer) As Boolean End Function Private Function EgtSelectGroupObjs_64(nGroupId As Integer) As Boolean End Function Public Function EgtSelectGroupObjs(nGroupId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSelectGroupObjs_32(nGroupId) Else Return EgtSelectGroupObjs_64(nGroupId) End If End Function Private Function EgtDeselectGroupObjs_32(nGroupId As Integer) As Boolean End Function Private Function EgtDeselectGroupObjs_64(nGroupId As Integer) As Boolean End Function Public Function EgtDeselectGroupObjs(nGroupId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtDeselectGroupObjs_32(nGroupId) Else Return EgtDeselectGroupObjs_64(nGroupId) End If End Function Private Function EgtIsSelectedObj_32(nId As Integer) As Boolean End Function Private Function EgtIsSelectedObj_64(nId As Integer) As Boolean End Function Public Function EgtIsSelectedObj(nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtIsSelectedObj_32(nId) Else Return EgtIsSelectedObj_64(nId) End If End Function Private Function EgtGetSelectedObjCount_32() As Integer End Function Private Function EgtGetSelectedObjCount_64() As Integer End Function Public Function EgtGetSelectedObjCount() As Integer If IntPtr.Size = 4 Then Return EgtGetSelectedObjCount_32() Else Return EgtGetSelectedObjCount_64() End If End Function Private Function EgtGetFirstSelectedObj_32() As Integer End Function Private Function EgtGetFirstSelectedObj_64() As Integer End Function Public Function EgtGetFirstSelectedObj() As Integer If IntPtr.Size = 4 Then Return EgtGetFirstSelectedObj_32() Else Return EgtGetFirstSelectedObj_64() End If End Function Private Function EgtGetNextSelectedObj_32() As Integer End Function Private Function EgtGetNextSelectedObj_64() As Integer End Function Public Function EgtGetNextSelectedObj() As Integer If IntPtr.Size = 4 Then Return EgtGetNextSelectedObj_32() Else Return EgtGetNextSelectedObj_64() End If End Function Private Function EgtGetLastSelectedObj_32() As Integer End Function Private Function EgtGetLastSelectedObj_64() As Integer End Function Public Function EgtGetLastSelectedObj() As Integer If IntPtr.Size = 4 Then Return EgtGetLastSelectedObj_32() Else Return EgtGetLastSelectedObj_64() End If End Function Private Function EgtGetPrevSelectedObj_32() As Integer End Function Private Function EgtGetPrevSelectedObj_64() As Integer End Function Public Function EgtGetPrevSelectedObj() As Integer If IntPtr.Size = 4 Then Return EgtGetPrevSelectedObj_32() Else Return EgtGetPrevSelectedObj_64() End If End Function Private Function EgtSetSelInfo_32( nId As Integer, nSub As Integer, ByRef ptSel As Point3d) As Boolean End Function Private Function EgtSetSelInfo_64( nId As Integer, nSub As Integer, ByRef ptSel As Point3d) As Boolean End Function Public Function EgtSetSelInfo( nId As Integer, nSub As Integer, ByRef ptSel As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtSetSelInfo_32( nId, nSub, ptSel) Else Return EgtSetSelInfo_64( nId, nSub, ptSel) End If End Function Private Function EgtGetLastSelInfo_32( ByRef nLastId As Integer, ByRef nLastSub As Integer, ByRef ptLastSel As Point3d) As Boolean End Function Private Function EgtGetLastSelInfo_64( ByRef nLastId As Integer, ByRef nLastSub As Integer, ByRef ptLastSel As Point3d) As Boolean End Function Public Function EgtGetLastSelInfo( ByRef nLastId As Integer, ByRef nLastSub As Integer, ByRef ptLastSel As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetLastSelInfo_32(nLastId, nLastSub, ptLastSel) Else Return EgtGetLastSelInfo_64(nLastId, nLastSub, ptLastSel) End If End Function Private Function EgtGetPrevSelInfo_32( ByRef nPrevId As Integer, ByRef nPrevSub As Integer, ByRef ptPrevSel As Point3d) As Boolean End Function Private Function EgtGetPrevSelInfo_64( ByRef nPrevId As Integer, ByRef nPrevSub As Integer, ByRef ptPrevSel As Point3d) As Boolean End Function Public Function EgtGetPrevSelInfo( ByRef nPrevId As Integer, ByRef nPrevSub As Integer, ByRef ptPrevSel As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetPrevSelInfo_32(nPrevId, nPrevSub, ptPrevSel) Else Return EgtGetPrevSelInfo_64(nPrevId, nPrevSub, ptPrevSel) End If End Function '---------- GeomDb Obj Transform ----------------------------------------------- Private Function EgtMove_32(nId As Integer, ByRef VtMove As Vector3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Private Function EgtMove_64(nId As Integer, ByRef VtMove As Vector3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Public Function EgtMove(nId As Integer, ByRef VtMove As Vector3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtMove_32(nId, VtMove, nRefType) Else Return EgtMove_64(nId, VtMove, nRefType) End If End Function Private Function EgtRotate_32(nId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngRotDeg As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Private Function EgtRotate_64(nId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngRotDeg As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Public Function EgtRotate(nId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngRotDeg As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtRotate_32(nId, PtAx, VtAx, dAngRotDeg, nRefType) Else Return EgtRotate_64(nId, PtAx, VtAx, dAngRotDeg, nRefType) End If End Function Private Function EgtScale_32(nId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, dCoeffX As Double, dCoeffY As Double, dCoeffZ As Double, nRefType As GDB_RT) As Boolean End Function Private Function EgtScale_64(nId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, dCoeffX As Double, dCoeffY As Double, dCoeffZ As Double, nRefType As GDB_RT) As Boolean End Function Public Function EgtScale(nId As Integer, Frame As Frame3d, dCoeffX As Double, dCoeffY As Double, dCoeffZ As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtScale_32(nId, Frame.Orig(), Frame.VersX(), Frame.VersY(), Frame.VersZ(), dCoeffX, dCoeffY, dCoeffZ, nRefType) Else Return EgtScale_64(nId, Frame.Orig(), Frame.VersX(), Frame.VersY(), Frame.VersZ(), dCoeffX, dCoeffY, dCoeffZ, nRefType) End If End Function Private Function EgtMirror_32(nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Private Function EgtMirror_64(nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Public Function EgtMirror(nId As Integer, PtOn As Point3d, VtNorm As Vector3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtMirror_32(nId, PtOn, VtNorm, nRefType) Else Return EgtMirror_64(nId, PtOn, VtNorm, nRefType) End If End Function Private Function EgtShear_32(nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, dCoeff As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Private Function EgtShear_64(nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, dCoeff As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean End Function Public Function EgtShear(nId As Integer, PtOn As Point3d, VtNorm As Vector3d, VtDir As Vector3d, dCoeff As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean If IntPtr.Size = 4 Then Return EgtShear_32(nId, PtOn, VtNorm, VtDir, dCoeff, nRefType) Else Return EgtShear_64(nId, PtOn, VtNorm, VtDir, dCoeff, nRefType) End If End Function Private Function EgtMoveGroup_32(nId As Integer, ByRef VtMove As Vector3d) As Boolean End Function Private Function EgtMoveGroup_64(nId As Integer, ByRef VtMove As Vector3d) As Boolean End Function Public Function EgtMoveGroup(nId As Integer, VtMove As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtMoveGroup_32(nId, VtMove) Else Return EgtMoveGroup_64(nId, VtMove) End If End Function Private Function EgtRotateGroup_32(nId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngRotDeg As Double) As Boolean End Function Private Function EgtRotateGroup_64(nId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngRotDeg As Double) As Boolean End Function Public Function EgtRotateGroup(nId As Integer, PtAx As Point3d, VtAx As Vector3d, dAngRotDeg As Double) As Boolean If IntPtr.Size = 4 Then Return EgtRotateGroup_32(nId, PtAx, VtAx, dAngRotDeg) Else Return EgtRotateGroup_64(nId, PtAx, VtAx, dAngRotDeg) End If End Function Private Function EgtScaleGroup_32(nId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, dCoeffX As Double, dCoeffY As Double, dCoeffZ As Double) As Boolean End Function Private Function EgtScaleGroup_64(nId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, dCoeffX As Double, dCoeffY As Double, dCoeffZ As Double) As Boolean End Function Public Function EgtScaleGroup(nId As Integer, Frame As Frame3d, dCoeffX As Double, dCoeffY As Double, dCoeffZ As Double) As Boolean If IntPtr.Size = 4 Then Return EgtScaleGroup_32(nId, Frame.Orig(), Frame.VersX(), Frame.VersY(), Frame.VersZ(), dCoeffX, dCoeffY, dCoeffZ) Else Return EgtScaleGroup_64(nId, Frame.Orig(), Frame.VersX(), Frame.VersY(), Frame.VersZ(), dCoeffX, dCoeffY, dCoeffZ) End If End Function Private Function EgtMirrorGroup_32(nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d) As Boolean End Function Private Function EgtMirrorGroup_64(nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d) As Boolean End Function Public Function EgtMirrorGroup(nId As Integer, PtOn As Point3d, VtNorm As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtMirrorGroup_32(nId, PtOn, VtNorm) Else Return EgtMirrorGroup_64(nId, PtOn, VtNorm) End If End Function Private Function EgtShearGroup_32(nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, dCoeff As Double) As Boolean End Function Private Function EgtShearGroup_64(nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, dCoeff As Double) As Boolean End Function Public Function EgtShearGroup(nId As Integer, PtOn As Point3d, VtNorm As Vector3d, VtDir As Vector3d, dCoeff As Double) As Boolean If IntPtr.Size = 4 Then Return EgtShearGroup_32(nId, PtOn, VtNorm, VtDir, dCoeff) Else Return EgtShearGroup_64(nId, PtOn, VtNorm, VtDir, dCoeff) End If End Function '---------- GeomDb Snap Vector/Point/Frame ------------------------------------- Private Function EgtStartPoint_32(nId As Integer, nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Private Function EgtStartPoint_64(nId As Integer, nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Public Function EgtStartPoint(nId As Integer, nRefId As Integer, ByRef PtP As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtStartPoint_32(nId, nRefId, PtP) Else Return EgtStartPoint_64(nId, nRefId, PtP) End If End Function Public Function EgtStartPoint(nId As Integer, ByRef PtP As Point3d) As Boolean Return EgtStartPoint(nId, nId, PtP) End Function Private Function EgtEndPoint_32(nId As Integer, nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Private Function EgtEndPoint_64(nId As Integer, nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Public Function EgtEndPoint(nId As Integer, nRefId As Integer, ByRef PtP As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtEndPoint_32(nId, nRefId, PtP) Else Return EgtEndPoint_64(nId, nRefId, PtP) End If End Function Public Function EgtEndPoint(nId As Integer, ByRef PtP As Point3d) As Boolean Return EgtEndPoint(nId, nId, PtP) End Function Private Function EgtMidPoint_32(nId As Integer, nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Private Function EgtMidPoint_64(nId As Integer, nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Public Function EgtMidPoint(nId As Integer, nRefId As Integer, ByRef PtP As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtMidPoint_32(nId, nRefId, PtP) Else Return EgtMidPoint_64(nId, nRefId, PtP) End If End Function Public Function EgtMidPoint(nId As Integer, ByRef PtP As Point3d) As Boolean Return EgtMidPoint(nId, nId, PtP) End Function Private Function EgtCenterPoint_32(nId As Integer, nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Private Function EgtCenterPoint_64(nId As Integer, nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Public Function EgtCenterPoint(nId As Integer, nRefId As Integer, ByRef PtP As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtCenterPoint_32(nId, nRefId, PtP) Else Return EgtCenterPoint_64(nId, nRefId, PtP) End If End Function Public Function EgtCenterPoint(nId As Integer, ByRef PtP As Point3d) As Boolean Return EgtCenterPoint(nId, nId, PtP) End Function Private Function EgtCentroid_32(nId As Integer, nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Private Function EgtCentroid_64(nId As Integer, nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Public Function EgtCentroid(nId As Integer, nRefId As Integer, ByRef PtP As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtCentroid_32(nId, nRefId, PtP) Else Return EgtCentroid_64(nId, nRefId, PtP) End If End Function Public Function EgtCentroid(nId As Integer, ByRef PtP As Point3d) As Boolean Return EgtCentroid(nId, nId, PtP) End Function Private Function EgtAtParamPoint_32(nId As Integer, dU As Double, nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Private Function EgtAtParamPoint_64(nId As Integer, dU As Double, nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Public Function EgtAtParamPoint(nId As Integer, dU As Double, nRefId As Integer, ByRef PtP As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtAtParamPoint_32(nId, dU, nRefId, PtP) Else Return EgtAtParamPoint_64(nId, dU, nRefId, PtP) End If End Function Public Function EgtAtParamPoint(nId As Integer, dU As Double, ByRef PtP As Point3d) As Boolean Return EgtAtParamPoint(nId, dU, nId, PtP) End Function Private Function EgtNearPoint_32(nId As Integer, ByRef PtNear As Point3d, nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Private Function EgtNearPoint_64(nId As Integer, ByRef PtNear As Point3d, nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Public Function EgtNearPoint(nId As Integer, ByRef PtNear As Point3d, nRefId As Integer, ByRef PtP As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtNearPoint_32(nId, PtNear, nRefId, PtP) Else Return EgtNearPoint_64(nId, PtNear, nRefId, PtP) End If End Function Public Function EgtNearPoint(nId As Integer, ByRef PtNear As Point3d, ByRef PtP As Point3d) As Boolean Return EgtNearPoint(nId, PtNear, nId, PtP) End Function Private Function EgtIntersectionPoint_32(nId1 As Integer, nId2 As Integer, ByRef PtNear As Point3d, nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Private Function EgtIntersectionPoint_64(nId1 As Integer, nId2 As Integer, ByRef PtNear As Point3d, nRefId As Integer, ByRef PtP As Point3d) As Boolean End Function Public Function EgtIntersectionPoint(nId1 As Integer, nId2 As Integer, ByRef PtNear As Point3d, nRefId As Integer, ByRef PtP As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtIntersectionPoint_32(nId1, nId2, PtNear, nRefId, PtP) Else Return EgtIntersectionPoint_64(nId1, nId2, PtNear, nRefId, PtP) End If End Function Public Function EgtIntersectionPoint(nId1 As Integer, nId2 As Integer, ByRef PtNear As Point3d, ByRef PtP As Point3d) As Boolean Return EgtIntersectionPoint(nId1, nId2, PtNear, nId1, PtP) End Function Private Function EgtStartVector_32(nId As Integer, nRefId As Integer, ByRef VtV As Vector3d) As Boolean End Function Private Function EgtStartVector_64(nId As Integer, nRefId As Integer, ByRef VtV As Vector3d) As Boolean End Function Public Function EgtStartVector(nId As Integer, nRefId As Integer, ByRef VtV As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtStartVector_32(nId, nRefId, VtV) Else Return EgtStartVector_64(nId, nRefId, VtV) End If End Function Public Function EgtStartVector(nId As Integer, ByRef VtV As Vector3d) As Boolean Return EgtStartVector(nId, nId, VtV) End Function Private Function EgtEndVector_32(nId As Integer, nRefId As Integer, ByRef VtV As Vector3d) As Boolean End Function Private Function EgtEndVector_64(nId As Integer, nRefId As Integer, ByRef VtV As Vector3d) As Boolean End Function Public Function EgtEndVector(nId As Integer, nRefId As Integer, ByRef VtV As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtEndVector_32(nId, nRefId, VtV) Else Return EgtEndVector_64(nId, nRefId, VtV) End If End Function Public Function EgtEndVector(nId As Integer, ByRef VtV As Vector3d) As Boolean Return EgtEndVector(nId, nId, VtV) End Function Private Function EgtMidVector_32(nId As Integer, nRefId As Integer, ByRef VtV As Vector3d) As Boolean End Function Private Function EgtMidVector_64(nId As Integer, nRefId As Integer, ByRef VtV As Vector3d) As Boolean End Function Public Function EgtMidVector(nId As Integer, nRefId As Integer, ByRef VtV As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtMidVector_32(nId, nRefId, VtV) Else Return EgtMidVector_64(nId, nRefId, VtV) End If End Function Public Function EgtMidVector(nId As Integer, ByRef VtV As Vector3d) As Boolean Return EgtMidVector(nId, nId, VtV) End Function Private Function EgtAtParamVector_32(nId As Integer, dU As Double, nRefId As Integer, ByRef VtV As Vector3d) As Boolean End Function Private Function EgtAtParamVector_64(nId As Integer, dU As Double, nRefId As Integer, ByRef VtV As Vector3d) As Boolean End Function Public Function EgtAtParamVector(nId As Integer, dU As Double, nRefId As Integer, ByRef VtV As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtAtParamVector_32(nId, dU, nRefId, VtV) Else Return EgtAtParamVector_64(nId, dU, nRefId, VtV) End If End Function Public Function EgtAtParamVector(nId As Integer, dU As Double, ByRef VtV As Vector3d) As Boolean Return EgtAtParamVector(nId, dU, nId, VtV) End Function Private Function EgtFrame_32(nId As Integer, nRefId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtFrame_64(nId As Integer, nRefId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Public Function EgtFrame(nId As Integer, nRefId As Integer, ByRef frFrame As Frame3d) As Boolean Dim PtOrig As Point3d Dim VtDirX, VtDirY, VtDirZ As Vector3d Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtFrame_32(nId, nRefId, PtOrig, VtDirX, VtDirY, VtDirZ) Else bOk = EgtFrame_64(nId, nRefId, PtOrig, VtDirX, VtDirY, VtDirZ) End If If Not bOk Then frFrame = Frame3d.GLOB() Return False Else Return frFrame.Setup(PtOrig, VtDirX, VtDirY, VtDirZ) End If End Function Private Function EgtCurveDomain_32(nId As Integer, ByRef dStart As Double, ByRef dEnd As Double) As Boolean End Function Private Function EgtCurveDomain_64(nId As Integer, ByRef dStart As Double, ByRef dEnd As Double) As Boolean End Function Public Function EgtCurveDomain(nId As Integer, ByRef dStart As Double, ByRef dEnd As Double) As Boolean If IntPtr.Size = 4 Then Return EgtCurveDomain_32(nId, dStart, dEnd) Else Return EgtCurveDomain_64(nId, dStart, dEnd) End If End Function Private Function EgtCurveLength_32(nId As Integer, ByRef dLen As Double) As Boolean End Function Private Function EgtCurveLength_64(nId As Integer, ByRef dLen As Double) As Boolean End Function Public Function EgtCurveLength(nId As Integer, ByRef dLen As Double) As Boolean If IntPtr.Size = 4 Then Return EgtCurveLength_32(nId, dLen) Else Return EgtCurveLength_64(nId, dLen) End If End Function Private Function EgtCurveLengthAtPoint_32(nId As Integer, ByRef ptOn As Point3d, dExtend As Double, ByRef dLen As Double) As Boolean End Function Private Function EgtCurveLengthAtPoint_64(nId As Integer, ByRef ptOn As Point3d, dExtend As Double, ByRef dLen As Double) As Boolean End Function Public Function EgtCurveLengthAtPoint(nId As Integer, ByRef ptOn As Point3d, dExtend As Double, ByRef dLen As Double) As Boolean If IntPtr.Size = 4 Then Return EgtCurveLengthAtPoint_32(nId, ptOn, dExtend, dLen) Else Return EgtCurveLengthAtPoint_64(nId, ptOn, dExtend, dLen) End If End Function Public Function EgtCurveLengthAtPoint(nId As Integer, ptOn As Point3d, ByRef dLen As Double) As Boolean Return EgtCurveLengthAtPoint(nId, ptOn, 0, dLen) End Function Private Function EgtCurveIsClosed_32(nId As Integer) As Boolean End Function Private Function EgtCurveIsClosed_64(nId As Integer) As Boolean End Function Public Function EgtCurveIsClosed(nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtCurveIsClosed_32(nId) Else Return EgtCurveIsClosed_64(nId) End If End Function Private Function EgtCurveIsFlat_32(nId As Integer, ByRef VtN As Vector3d, ByRef dDist As Double) As Boolean End Function Private Function EgtCurveIsFlat_64(nId As Integer, ByRef VtN As Vector3d, ByRef dDist As Double) As Boolean End Function Public Function EgtCurveIsFlat(nId As Integer, ByRef VtN As Vector3d, ByRef dDist As Double) As Boolean If IntPtr.Size = 4 Then Return EgtCurveIsFlat_32(nId, VtN, dDist) Else Return EgtCurveIsFlat_64(nId, VtN, dDist) End If End Function Private Function EgtCurveAreaXY_32(nId As Integer, ByRef dArea As Double) As Boolean End Function Private Function EgtCurveAreaXY_64(nId As Integer, ByRef dArea As Double) As Boolean End Function Public Function EgtCurveAreaXY(nId As Integer, ByRef dArea As Double) As Boolean If IntPtr.Size = 4 Then Return EgtCurveAreaXY_32(nId, dArea) Else Return EgtCurveAreaXY_64(nId, dArea) End If End Function Private Function EgtCurveArea_32(nId As Integer, ByRef VtN As Vector3d, ByRef dDist As Double, ByRef dArea As Double) As Boolean End Function Private Function EgtCurveArea_64(nId As Integer, ByRef VtN As Vector3d, ByRef dDist As Double, ByRef dArea As Double) As Boolean End Function Public Function EgtCurveArea(nId As Integer, ByRef VtN As Vector3d, ByRef dDist As Double, ByRef dArea As Double) As Boolean If IntPtr.Size = 4 Then Return EgtCurveArea_32(nId, VtN, dDist, dArea) Else Return EgtCurveArea_64(nId, VtN, dDist, dArea) End If End Function Private Function EgtCurveNearestExtremityToPoint_32(nId As Integer, ByRef ptP As Point3d, ByRef bStart As Boolean) As Boolean End Function Private Function EgtCurveNearestExtremityToPoint_64(nId As Integer, ByRef ptP As Point3d, ByRef bStart As Boolean) As Boolean End Function Public Function EgtCurveNearestExtremityToPoint(nId As Integer, ByRef ptP As Point3d, ByRef bStart As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtCurveNearestExtremityToPoint_32(nId, ptP, bStart) Else Return EgtCurveNearestExtremityToPoint_64(nId, ptP, bStart) End If End Function Private Function EgtCurveExtrusion_32(nId As Integer, nRefId As Integer, ByRef VtExtr As Vector3d) As Boolean End Function Private Function EgtCurveExtrusion_64(nId As Integer, nRefId As Integer, ByRef VtExtr As Vector3d) As Boolean End Function Public Function EgtCurveExtrusion(nId As Integer, nRefId As Integer, ByRef VtExtr As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtCurveExtrusion_32(nId, nRefId, VtExtr) Else Return EgtCurveExtrusion_64(nId, nRefId, VtExtr) End If End Function Public Function EgtCurveExtrusion(nId As Integer, ByRef VtExtr As Vector3d) As Boolean Return EgtCurveExtrusion(nId, nId, VtExtr) End Function Private Function EgtCurveThickness_32(nId As Integer, ByRef dThick As Double) As Boolean End Function Private Function EgtCurveThickness_64(nId As Integer, ByRef dThick As Double) As Boolean End Function Public Function EgtCurveThickness(nId As Integer, ByRef dThick As Double) As Boolean If IntPtr.Size = 4 Then Return EgtCurveThickness_32(nId, dThick) Else Return EgtCurveThickness_64(nId, dThick) End If End Function Private Function EgtCurveSelfIntersCount_32(nId As Integer, ByRef nCount As Integer) As Boolean End Function Private Function EgtCurveSelfIntersCount_64(nId As Integer, ByRef nCount As Integer) As Boolean End Function Public Function EgtCurveSelfIntersCount(nId As Integer, ByRef nCount As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtCurveSelfIntersCount_32(nId, nCount) Else Return EgtCurveSelfIntersCount_64(nId, nCount) End If End Function Private Function EgtCurveMinAreaRectangleXY_32(nId As Integer, nRefId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef dDimX As Double, ByRef dDimY As Double) As Boolean End Function Private Function EgtCurveMinAreaRectangleXY_64(nId As Integer, nRefId As Integer, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef dDimX As Double, ByRef dDimY As Double) As Boolean End Function Public Function EgtCurveMinAreaRectangleXY(nId As Integer, nRefId As Integer, ByRef frFrame As Frame3d, ByRef dDimX As Double, ByRef dDimY As Double) As Boolean Dim PtOrig As Point3d Dim VtDirX, VtDirY, VtDirZ As Vector3d Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtCurveMinAreaRectangleXY_32(nId, nRefId, PtOrig, VtDirX, VtDirY, VtDirZ, dDimX, dDimY) Else bOk = EgtCurveMinAreaRectangleXY_64(nId, nRefId, PtOrig, VtDirX, VtDirY, VtDirZ, dDimX, dDimY) End If If Not bOk Then frFrame = Frame3d.GLOB() Return False Else Return frFrame.Setup(PtOrig, VtDirX, VtDirY, VtDirZ) End If End Function Public Function EgtCurveMinAreaRectangleXY(nId As Integer, nRefId As Integer, ByRef frFrame As Frame3d) As Boolean Dim PtOrig As Point3d Dim VtDirX, VtDirY, VtDirZ As Vector3d Dim dDimX, dDimY As Double Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtCurveMinAreaRectangleXY_32(nId, nRefId, PtOrig, VtDirX, VtDirY, VtDirZ, dDimX, dDimY) Else bOk = EgtCurveMinAreaRectangleXY_64(nId, nRefId, PtOrig, VtDirX, VtDirY, VtDirZ, dDimX, dDimY) End If If Not bOk Then frFrame = Frame3d.GLOB() Return False Else Return frFrame.Setup(PtOrig, VtDirX, VtDirY, VtDirZ) End If End Function Private Function EgtClosedCurveClassify_32(nId1 As Integer, nId2 As Integer) As Integer End Function Private Function EgtClosedCurveClassify_64(nId1 As Integer, nId2 As Integer) As Integer End Function Public Function EgtClosedCurveClassify(nId1 As Integer, nId2 As Integer) As Integer If IntPtr.Size = 4 Then Return EgtClosedCurveClassify_32(nId1, nId2) Else Return EgtClosedCurveClassify_64(nId1, nId2) End If End Function Private Function EgtArcRadius_32(nId As Integer, ByRef dRad As Double) As Boolean End Function Private Function EgtArcRadius_64(nId As Integer, ByRef dRad As Double) As Boolean End Function Public Function EgtArcRadius(nId As Integer, ByRef dRad As Double) As Boolean If IntPtr.Size = 4 Then Return EgtArcRadius_32(nId, dRad) Else Return EgtArcRadius_64(nId, dRad) End If End Function Private Function EgtArcAngCenter_32(nId As Integer, ByRef dAngDeg As Double) As Boolean End Function Private Function EgtArcAngCenter_64(nId As Integer, ByRef dAngDeg As Double) As Boolean End Function Public Function EgtArcAngCenter(nId As Integer, ByRef dAngDeg As Double) As Boolean If IntPtr.Size = 4 Then Return EgtArcAngCenter_32(nId, dAngDeg) Else Return EgtArcAngCenter_64(nId, dAngDeg) End If End Function Private Function EgtArcDeltaN_32(nId As Integer, ByRef dDeltaN As Double) As Boolean End Function Private Function EgtArcDeltaN_64(nId As Integer, ByRef dDeltaN As Double) As Boolean End Function Public Function EgtArcDeltaN(nId As Integer, ByRef dDeltaN As Double) As Boolean If IntPtr.Size = 4 Then Return EgtArcDeltaN_32(nId, dDeltaN) Else Return EgtArcDeltaN_64(nId, dDeltaN) End If End Function Private Function EgtArcNormVersor_32(nId As Integer, nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean End Function Private Function EgtArcNormVersor_64(nId As Integer, nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean End Function Public Function EgtArcNormVersor(nId As Integer, nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtArcNormVersor_32(nId, nRefId, VtNorm) Else Return EgtArcNormVersor_64(nId, nRefId, VtNorm) End If End Function Public Function EgtArcNormVersor(nId As Integer, ByRef VtNorm As Vector3d) As Boolean Return EgtArcNormVersor(nId, nId, VtNorm) End Function Private Function EgtSurfFrNormVersor_32(nId As Integer, nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean End Function Private Function EgtSurfFrNormVersor_64(nId As Integer, nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean End Function Public Function EgtSurfFrNormVersor(nId As Integer, nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtSurfFrNormVersor_32(nId, nRefId, VtNorm) Else Return EgtSurfFrNormVersor_64(nId, nRefId, VtNorm) End If End Function Public Function EgtSurfFrNormVersor(nId As Integer, ByRef VtNorm As Vector3d) As Boolean Return EgtSurfFrNormVersor(nId, nId, VtNorm) End Function Private Function EgtSurfFrChunkCount_32(nId As Integer) As Integer End Function Private Function EgtSurfFrChunkCount_64(nId As Integer) As Integer End Function Public Function EgtSurfFrChunkCount(nId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtSurfFrChunkCount_32(nId) Else Return EgtSurfFrChunkCount_64(nId) End If End Function Private Function EgtSurfFrChunkSimpleClassify_32(nId1 As Integer, nChunk1 As Integer, nId2 As Integer, nChunk2 As Integer) As Integer End Function Private Function EgtSurfFrChunkSimpleClassify_64(nId1 As Integer, nChunk1 As Integer, nId2 As Integer, nChunk2 As Integer) As Integer End Function Public Function EgtSurfFrChunkSimpleClassify(nId1 As Integer, nChunk1 As Integer, nId2 As Integer, nChunk2 As Integer) As Integer If IntPtr.Size = 4 Then Return EgtSurfFrChunkSimpleClassify_32(nId1, nChunk1, nId2, nChunk2) Else Return EgtSurfFrChunkSimpleClassify_64(nId1, nChunk1, nId2, nChunk2) End If End Function Private Function EgtSurfTmFacetFromTria_32(nId As Integer, nT As Integer) As Integer End Function Private Function EgtSurfTmFacetFromTria_64(nId As Integer, nT As Integer) As Integer End Function Public Function EgtSurfTmFacetFromTria(nId As Integer, nT As Integer) As Integer If IntPtr.Size = 4 Then Return EgtSurfTmFacetFromTria_32(nId, nT) Else Return EgtSurfTmFacetFromTria_64(nId, nT) End If End Function Private Function EgtSurfTmFacetNearestEndPoint_32(nId As Integer, nF As Integer, ByRef PtNear As Point3d, nRefId As Integer, ByRef PtP As Point3d, ByRef VtNorm As Vector3d) As Boolean End Function Private Function EgtSurfTmFacetNearestEndPoint_64(nId As Integer, nF As Integer, ByRef PtNear As Point3d, nRefId As Integer, ByRef PtP As Point3d, ByRef VtNorm As Vector3d) As Boolean End Function Public Function EgtSurfTmFacetNearestEndPoint(nId As Integer, nF As Integer, ByRef PtNear As Point3d, nRefId As Integer, ByRef PtP As Point3d, ByRef VtNorm As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtSurfTmFacetNearestEndPoint_32(nId, nF, PtNear, nRefId, PtP, VtNorm) Else Return EgtSurfTmFacetNearestEndPoint_64(nId, nF, PtNear, nRefId, PtP, VtNorm) End If End Function Public Function EgtSurfTmFacetNearestEndPoint(nId As Integer, nF As Integer, ByRef PtNear As Point3d, ByRef PtP As Point3d, ByRef VtNorm As Vector3d) As Boolean Return EgtSurfTmFacetNearestEndPoint(nId, nF, PtNear, nId, PtP, VtNorm) End Function Private Function EgtSurfTmFacetCenter_32(nId As Integer, nF As Integer, nRefId As Integer, ByRef PtP As Point3d, ByRef VtNorm As Vector3d) As Boolean End Function Private Function EgtSurfTmFacetCenter_64(nId As Integer, nF As Integer, nRefId As Integer, ByRef PtP As Point3d, ByRef VtNorm As Vector3d) As Boolean End Function Public Function EgtSurfTmFacetCenter(nId As Integer, nF As Integer, nRefId As Integer, ByRef PtP As Point3d, ByRef VtNorm As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtSurfTmFacetCenter_32(nId, nF, nRefId, PtP, VtNorm) Else Return EgtSurfTmFacetCenter_64(nId, nF, nRefId, PtP, VtNorm) End If End Function Public Function EgtSurfTmFacetCenter(nId As Integer, nF As Integer, ByRef PtP As Point3d, ByRef VtNorm As Vector3d) As Boolean Return EgtSurfTmFacetCenter(nId, nF, nId, PtP, VtNorm) End Function Private Function EgtSurfTmFacetNormVersor_32(nId As Integer, nF As Integer, nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean End Function Private Function EgtSurfTmFacetNormVersor_64(nId As Integer, nF As Integer, nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean End Function Public Function EgtSurfTmFacetNormVersor(nId As Integer, nF As Integer, nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtSurfTmFacetNormVersor_32(nId, nF, nRefId, VtNorm) Else Return EgtSurfTmFacetNormVersor_64(nId, nF, nRefId, VtNorm) End If End Function Public Function EgtSurfTmFacetNormVersor(nId As Integer, nF As Integer, ByRef VtNorm As Vector3d) As Boolean Return EgtSurfTmFacetNormVersor(nId, nF, nId, VtNorm) End Function Private Function EgtSurfTmFacetOppositeSide_32(nId As Integer, nFacet As Integer, ByRef vtDir As Vector3d, nRefId As Integer, ByRef ptP1 As Point3d, ByRef ptP2 As Point3d) As Boolean End Function Private Function EgtSurfTmFacetOppositeSide_64(nId As Integer, nFacet As Integer, ByRef vtDir As Vector3d, nRefId As Integer, ByRef ptP1 As Point3d, ByRef ptP2 As Point3d) As Boolean End Function Public Function EgtSurfTmFacetOppositeSide(nId As Integer, nFacet As Integer, ByRef vtDir As Vector3d, nRefId As Integer, ByRef ptP1 As Point3d, ByRef ptP2 As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtSurfTmFacetOppositeSide_32(nId, nFacet, vtDir, nRefId, ptP1, ptP2) Else Return EgtSurfTmFacetOppositeSide_64(nId, nFacet, vtDir, nRefId, ptP1, ptP2) End If End Function Public Function EgtSurfTmFacetOppositeSide(nId As Integer, nFacet As Integer, ByRef vtDir As Vector3d, ByRef ptP1 As Point3d, ByRef ptP2 As Point3d) As Boolean Return EgtSurfTmFacetOppositeSide(nId, nFacet, vtDir, nId, ptP1, ptP2) End Function Private Function EgtSurfTmFacetAdjacencies_32(nId As Integer, nF As Integer, ByRef pvAdj As IntPtr, ByRef nCount As Integer) As Boolean End Function Private Function EgtSurfTmFacetAdjacencies_64(nId As Integer, nF As Integer, ByRef pvAdj As IntPtr, ByRef nCount As Integer) As Boolean End Function Public Function EgtSurfTmFacetAdjacencies(nId As Integer, nF As Integer, ByRef vAdj As List(Of Integer)) As Boolean Dim pvAdj As IntPtr Dim nCount As Integer Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtSurfTmFacetAdjacencies_32(nId, nF, pvAdj, nCount) Else bOk = EgtSurfTmFacetAdjacencies_64(nId, nF, pvAdj, nCount) End If vAdj.Clear() If bOk And nCount > 0 Then vAdj.Capacity = nCount For nI As Integer = 0 To nCount - 1 vAdj.Add(Marshal.ReadInt32(pvAdj, nI * 4)) Next EgtFreeMemory(pvAdj) Else End If Return bOk End Function Private Function EgtSurfTmFacetsContact_32(nId As Integer, nF1 As Integer, nF2 As Integer, nRefId As Integer, ByRef bAdjac As Boolean, ByRef PtP1 As Point3d, ByRef PtP2 As Point3d, ByRef dAng As Double) As Boolean End Function Private Function EgtSurfTmFacetsContact_64(nId As Integer, nF1 As Integer, nF2 As Integer, nRefId As Integer, ByRef bAdjac As Boolean, ByRef PtP1 As Point3d, ByRef PtP2 As Point3d, ByRef dAng As Double) As Boolean End Function Public Function EgtSurfTmFacetsContact(nId As Integer, nF1 As Integer, nF2 As Integer, nRefId As Integer, ByRef bAdjac As Boolean, ByRef PtP1 As Point3d, ByRef PtP2 As Point3d, ByRef dAng As Double) As Boolean If IntPtr.Size = 4 Then Return EgtSurfTmFacetsContact_32(nId, nF1, nF2, nRefId, bAdjac, PtP1, PtP2, dAng) Else Return EgtSurfTmFacetsContact_64(nId, nF1, nF2, nRefId, bAdjac, PtP1, PtP2, dAng) End If End Function Public Function EgtSurfTmFacetsContact(nId As Integer, nF1 As Integer, nF2 As Integer, ByRef bAdjac As Boolean, ByRef PtP1 As Point3d, ByRef PtP2 As Point3d, ByRef dAng As Double) As Boolean Return EgtSurfTmFacetsContact(nId, nF1, nF2, nId, bAdjac, PtP1, PtP2, dAng) End Function Private Function EgtTextNormVersor_32(nId As Integer, nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean End Function Private Function EgtTextNormVersor_64(nId As Integer, nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean End Function Public Function EgtTextNormVersor(nId As Integer, nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtTextNormVersor_32(nId, nRefId, VtNorm) Else Return EgtTextNormVersor_64(nId, nRefId, VtNorm) End If End Function Public Function EgtTextNormVersor(nId As Integer, ByRef VtNorm As Vector3d) As Boolean Return EgtTextNormVersor(nId, nId, VtNorm) End Function Private Function EgtTextGetContent_32(nId As Integer, ByRef psText As IntPtr) As Boolean End Function Private Function EgtTextGetContent_64(nId As Integer, ByRef psText As IntPtr) As Boolean End Function Public Function EgtTextGetContent(nId As Integer, ByRef sText As String) As Boolean Dim psText As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtTextGetContent_32(nId, psText) Else bOk = EgtTextGetContent_64(nId, psText) End If If bOk Then sText = Marshal.PtrToStringUni(psText) EgtFreeMemory(psText) Else sText = String.Empty End If Return bOk End Function Private Function EgtTextGetFont_32(nId As Integer, ByRef psFont As IntPtr) As Boolean End Function Private Function EgtTextGetFont_64(nId As Integer, ByRef psFont As IntPtr) As Boolean End Function Public Function EgtTextGetFont(nId As Integer, ByRef sFont As String) As Boolean Dim psFont As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtTextGetFont_32(nId, psFont) Else bOk = EgtTextGetFont_64(nId, psFont) End If If bOk Then sFont = Marshal.PtrToStringUni(psFont) EgtFreeMemory(psFont) Else sFont = String.Empty End If Return bOk End Function Private Function EgtTextGetHeight_32(nId As Integer, ByRef dH As Double) As Boolean End Function Private Function EgtTextGetHeight_64(nId As Integer, ByRef dH As Double) As Boolean End Function Public Function EgtTextGetHeight(nId As Integer, ByRef dH As Double) As Boolean If IntPtr.Size = 4 Then Return EgtTextGetHeight_32(nId, dH) Else Return EgtTextGetHeight_64(nId, dH) End If End Function Private Function EgtTextGetItalic_32(nId As Integer, ByRef bItalic As Boolean) As Boolean End Function Private Function EgtTextGetItalic_64(nId As Integer, ByRef bItalic As Boolean) As Boolean End Function Public Function EgtTextGetItalic(nId As Integer, ByRef bItalic As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtTextGetItalic_32(nId, bItalic) Else Return EgtTextGetItalic_64(nId, bItalic) End If End Function Private Function EgtPointToIdGlob_32(ByRef PtP As Point3d, nId As Integer) As Boolean End Function Private Function EgtPointToIdGlob_64(ByRef PtP As Point3d, nId As Integer) As Boolean End Function Private Function EgtPointToIdGlob(ByRef PtP As Point3d, nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtPointToIdGlob_32(PtP, nId) Else Return EgtPointToIdGlob_64(PtP, nId) End If End Function Private Function EgtPointToIdLoc_32(ByRef PtP As Point3d, nId As Integer) As Boolean End Function Private Function EgtPointToIdLoc_64(ByRef PtP As Point3d, nId As Integer) As Boolean End Function Private Function EgtPointToIdLoc(ByRef PtP As Point3d, nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtPointToIdLoc_32(PtP, nId) Else Return EgtPointToIdLoc_64(PtP, nId) End If End Function Private Function EgtVectorToIdGlob_32(ByRef VtV As Vector3d, nId As Integer) As Boolean End Function Private Function EgtVectorToIdGlob_64(ByRef VtV As Vector3d, nId As Integer) As Boolean End Function Private Function EgtVectorToIdGlob(ByRef VtV As Vector3d, nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtVectorToIdGlob_32(VtV, nId) Else Return EgtVectorToIdGlob_64(VtV, nId) End If End Function Private Function EgtVectorToIdLoc_32(ByRef VtV As Vector3d, nId As Integer) As Boolean End Function Private Function EgtVectorToIdLoc_64(ByRef VtV As Vector3d, nId As Integer) As Boolean End Function Private Function EgtVectorToIdLoc(ByRef VtV As Vector3d, nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtVectorToIdLoc_32(VtV, nId) Else Return EgtVectorToIdLoc_64(VtV, nId) End If End Function '---------- Geo Dist ----------------------------------------------------------- Private Function EgtPointCurveDist_32(ByRef ptP As Point3d, nId As Integer, nRefId As Integer, ByRef dDist As Double, ByRef dU As Double) As Boolean End Function Private Function EgtPointCurveDist_64(ByRef ptP As Point3d, nId As Integer, nRefId As Integer, ByRef dDist As Double, ByRef dU As Double) As Boolean End Function Public Function EgtPointCurveDist(ByRef ptP As Point3d, nId As Integer, nRefId As Integer, ByRef dDist As Double, ByRef dU As Double) As Boolean If IntPtr.Size = 4 Then Return EgtPointCurveDist_32(ptP, nId, nRefId, dDist, dU) Else Return EgtPointCurveDist_64(ptP, nId, nRefId, dDist, dU) End If End Function Private Function EgtPointCurveDistSide_32(ByRef ptP As Point3d, nId As Integer, ByRef vtN As Vector3d, nRefId As Integer, ByRef dDist As Double, ByRef ptMin As Point3d, ByRef nSide As Integer) As Boolean End Function Private Function EgtPointCurveDistSide_64(ByRef ptP As Point3d, nId As Integer, ByRef vtN As Vector3d, nRefId As Integer, ByRef dDist As Double, ByRef ptMin As Point3d, ByRef nSide As Integer) As Boolean End Function Public Function EgtPointCurveDistSide(ByRef ptP As Point3d, nId As Integer, ByRef vtN As Vector3d, nRefId As Integer, ByRef dDist As Double, ByRef ptMin As Point3d, ByRef nSide As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtPointCurveDistSide_32(ptP, nId, vtN, nRefId, dDist, ptMin, nSide) Else Return EgtPointCurveDistSide_64(ptP, nId, vtN, nRefId, dDist, ptMin, nSide) End If End Function Private Function EgtPointSurfTmDist_32(ByRef ptP As Point3d, nId As Integer, ByRef vtN As Vector3d, nRefId As Integer, ByRef dDist As Double, ByRef ptMin As Point3d, ByRef nTria As Integer) As Boolean End Function Private Function EgtPointSurfTmDist_64(ByRef ptP As Point3d, nId As Integer, ByRef vtN As Vector3d, nRefId As Integer, ByRef dDist As Double, ByRef ptMin As Point3d, ByRef nTria As Integer) As Boolean End Function Public Function EgtPointSurfTmDist(ByRef ptP As Point3d, nId As Integer, ByRef vtN As Vector3d, nRefId As Integer, ByRef dDist As Double, ByRef ptMin As Point3d, ByRef nTria As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtPointSurfTmDist_32(ptP, nId, vtN, nRefId, dDist, ptMin, nTria) Else Return EgtPointSurfTmDist_64(ptP, nId, vtN, nRefId, dDist, ptMin, nTria) End If End Function '---------- Geo Inters --------------------------------------------------------- Private Function EgtLineSurfTmInters_32(ByRef ptP As Point3d, ByRef vtDir As Vector3d, nId As Integer, nRefId As Integer, ByRef pvFlagInters As IntPtr, ByRef pvParInters As IntPtr, ByRef nCount As Integer) As Boolean End Function Private Function EgtLineSurfTmInters_64(ByRef ptP As Point3d, ByRef vtDir As Vector3d, nId As Integer, nRefId As Integer, ByRef pvFlagInters As IntPtr, ByRef pvParInters As IntPtr, ByRef nCount As Integer) As Boolean End Function Public Function EgtLineSurfTmInters(ptP As Point3d, vtDir As Vector3d, nId As Integer, nRefId As Integer, ByRef vInters As List(Of FlagPar)) As Boolean Dim pvFlagInters As IntPtr Dim pvParInters As IntPtr Dim nCount As Integer Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtLineSurfTmInters_32(ptP, vtDir, nId, nRefId, pvFlagInters, pvParInters, nCount) Else bOk = EgtLineSurfTmInters_64(ptP, vtDir, nId, nRefId, pvFlagInters, pvParInters, nCount) End If vInters.Clear() If bOk And nCount > 0 Then Dim vnFlag(nCount) As Integer Marshal.Copy(pvFlagInters, vnFlag, 0, nCount) Dim vnPar(nCount) As Double vInters.Capacity = nCount Marshal.Copy(pvParInters, vnPar, 0, nCount) For i As Integer = 0 To nCount - 1 vInters.Add(New FlagPar(vnFlag(i), vnPar(i))) Next EgtFreeMemory(pvFlagInters) EgtFreeMemory(pvParInters) End If Return bOk End Function Public Function EgtLineSurfTmInters(ptP As Point3d, vtDir As Vector3d, nId As Integer, ByRef vInters As List(Of FlagPar)) As Boolean Return EgtLineSurfTmInters(ptP, vtDir, nId, nId, vInters) End Function '---------- Nestings ----------------------------------------------------------- Private Function EgtCreateAdjustFlatParts_32(nType As Integer, dToler As Double) As Boolean End Function Private Function EgtCreateAdjustFlatParts_64(nType As Integer, dToler As Double) As Boolean End Function Public Function EgtCreateAdjustFlatParts(nType As Integer, dToler As Double) As Boolean If IntPtr.Size = 4 Then Return EgtCreateAdjustFlatParts_32(nType, dToler) Else Return EgtCreateAdjustFlatParts_64(nType, dToler) End If End Function Public Function EgtCreateAdjustFlatParts(nType As Integer) As Boolean Return EgtCreateAdjustFlatParts(nType, 0.1) End Function Private Function EgtCreateFlatParts_32(nType As Integer, dToler As Double) As Boolean End Function Private Function EgtCreateFlatParts_64(nType As Integer, dToler As Double) As Boolean End Function Public Function EgtCreateFlatParts(nType As Integer, dToler As Double) As Boolean If IntPtr.Size = 4 Then Return EgtCreateFlatParts_32(nType, dToler) Else Return EgtCreateFlatParts_64(nType, dToler) End If End Function Public Function EgtCreateFlatParts(nType As Integer) As Boolean Return EgtCreateFlatParts(nType, 0.10000000000000001) End Function Private Function EgtAdjustFlatParts_32() As Boolean End Function Private Function EgtAdjustFlatParts_64() As Boolean End Function Public Function EgtAdjustFlatParts() As Boolean If IntPtr.Size = 4 Then Return EgtAdjustFlatParts_32() Else Return EgtAdjustFlatParts_64() End If End Function Private Function EgtAdjustFlatPart_32(nPartId As Integer) As Boolean End Function Private Function EgtAdjustFlatPart_64(nPartId As Integer) As Boolean End Function Public Function EgtAdjustFlatPart(nPartId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtAdjustFlatPart_32(nPartId) Else Return EgtAdjustFlatPart_64(nPartId) End If End Function Private Function EgtAdjustFlatPartLayer_32(nLayerId As Integer) As Boolean End Function Private Function EgtAdjustFlatPartLayer_64(nLayerId As Integer) As Boolean End Function Public Function EgtAdjustFlatPartLayer(nLayerId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtAdjustFlatPartLayer_32(nLayerId) Else Return EgtAdjustFlatPartLayer_64(nLayerId) End If End Function Private Function EgtCalcFlatPartUpRegion_32(nPartId As Integer, bCalc As Boolean) As Boolean End Function Private Function EgtCalcFlatPartUpRegion_64(nPartId As Integer, bCalc As Boolean) As Boolean End Function Public Function EgtCalcFlatPartUpRegion(nPartId As Integer, bCalc As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtCalcFlatPartUpRegion_32(nPartId, bCalc) Else Return EgtCalcFlatPartUpRegion_64(nPartId, bCalc) End If End Function Private Function EgtCalcFlatPartDownRegion_32(nPartId As Integer, dH As Double) As Boolean End Function Private Function EgtCalcFlatPartDownRegion_64(nPartId As Integer, dH As Double) As Boolean End Function Public Function EgtCalcFlatPartDownRegion(nPartId As Integer, dH As Double) As Boolean If IntPtr.Size = 4 Then Return EgtCalcFlatPartDownRegion_32(nPartId, dH) Else Return EgtCalcFlatPartDownRegion_64(nPartId, dH) End If End Function Private Function EgtPackBoxCluster_32(vId As Integer(), nCount As Integer, dXmin As Double, dYmin As Double, dXmax As Double, dYmax As Double, dOffs As Double, bBottomUp As Boolean) As Boolean End Function Private Function EgtPackBoxCluster_64(vId As Integer(), nCount As Integer, dXmin As Double, dYmin As Double, dXmax As Double, dYmax As Double, dOffs As Double, bBottomUp As Boolean) As Boolean End Function Public Function EgtPackBoxCluster(vId As Integer(), dXmin As Double, dYmin As Double, dXmax As Double, dYmax As Double, dOffs As Double, bBottomUp As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtPackBoxCluster_32(vId, vId.Count(), dXmin, dYmin, dXmax, dYmax, dOffs, bBottomUp) Else Return EgtPackBoxCluster_64(vId, vId.Count(), dXmin, dYmin, dXmax, dYmax, dOffs, bBottomUp) End If End Function Public Function EgtPackBox(nPartId As Integer, dXmin As Double, dYmin As Double, dXmax As Double, dYmax As Double, dOffs As Double, bBottomUp As Boolean) As Boolean Dim vId(0) As Integer vId(0) = nPartId If IntPtr.Size = 4 Then Return EgtPackBoxCluster_32(vId, 1, dXmin, dYmin, dXmax, dYmax, dOffs, bBottomUp) Else Return EgtPackBoxCluster_64(vId, 1, dXmin, dYmin, dXmax, dYmax, dOffs, bBottomUp) End If End Function Private Function EgtMoveBoxCluster_32(vId As Integer(), nCount As Integer, ByRef vtMove As Vector3d, dXmin As Double, dYmin As Double, dXmax As Double, dYmax As Double, dOffs As Double) As Boolean End Function Private Function EgtMoveBoxCluster_64(vId As Integer(), nCount As Integer, ByRef vtMove As Vector3d, dXmin As Double, dYmin As Double, dXmax As Double, dYmax As Double, dOffs As Double) As Boolean End Function Public Function EgtMoveBoxCluster(vId As Integer(), ByRef vtMove As Vector3d, dXmin As Double, dYmin As Double, dXmax As Double, dYmax As Double, dOffs As Double) As Boolean If IntPtr.Size = 4 Then Return EgtMoveBoxCluster_32(vId, vId.Count(), vtMove, dXmin, dYmin, dXmax, dYmax, dOffs) Else Return EgtMoveBoxCluster_64(vId, vId.Count(), vtMove, dXmin, dYmin, dXmax, dYmax, dOffs) End If End Function Public Function EgtMoveBox(nPartId As Integer, ByRef vtMove As Vector3d, dXmin As Double, dYmin As Double, dXmax As Double, dYmax As Double, dOffs As Double) As Boolean Dim vId(0) As Integer vId(0) = nPartId If IntPtr.Size = 4 Then Return EgtMoveBoxCluster_32(vId, 1, vtMove, dXmin, dYmin, dXmax, dYmax, dOffs) Else Return EgtMoveBoxCluster_64(vId, 1, vtMove, dXmin, dYmin, dXmax, dYmax, dOffs) End If End Function Private Function EgtGetClusterBBoxGlob_32(vId As Integer(), nCount As Integer, ByRef PtMin As Point3d, ByRef PtMax As Point3d) As Boolean End Function Private Function EgtGetClusterBBoxGlob_64(vId As Integer(), nCount As Integer, ByRef PtMin As Point3d, ByRef PtMax As Point3d) As Boolean End Function Public Function EgtGetClusterBBoxGlob(vId As Integer(), ByRef PtMin As Point3d, ByRef PtMax As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetClusterBBoxGlob_32(vId, vId.Count(), PtMin, PtMax) Else Return EgtGetClusterBBoxGlob_64(vId, vId.Count(), PtMin, PtMax) End If End Function Public Function EgtGetClusterBBoxGlob(vId As Integer(), ByRef b3Box As BBox3d) As Boolean b3Box.Setup() Dim ptMin, ptMax As Point3d If IntPtr.Size = 4 Then If Not EgtGetClusterBBoxGlob_32(vId, vId.Count(), ptMin, ptMax) Then Return False Else If Not EgtGetClusterBBoxGlob_64(vId, vId.Count(), ptMin, ptMax) Then Return False End If b3Box.Add(ptMin) b3Box.Add(ptMax) Return True End Function Public Function EgtGetPartBBoxGlob(nPartId As Integer, ByRef PtMin As Point3d, ByRef PtMax As Point3d) As Boolean Dim vId(0) As Integer vId(0) = nPartId If IntPtr.Size = 4 Then Return EgtGetClusterBBoxGlob_32(vId, 1, PtMin, PtMax) Else Return EgtGetClusterBBoxGlob_64(vId, 1, PtMin, PtMax) End If End Function Public Function EgtGetPartBBoxGlob(nPartId As Integer, ByRef b3Box As BBox3d) As Boolean b3Box.Setup() Dim vId(0) As Integer vId(0) = nPartId Dim ptMin, ptMax As Point3d If IntPtr.Size = 4 Then If Not EgtGetClusterBBoxGlob_32(vId, 1, ptMin, ptMax) Then Return False Else If Not EgtGetClusterBBoxGlob_64(vId, 1, ptMin, ptMax) Then Return False End If b3Box.Add(ptMin) b3Box.Add(ptMax) Return True End Function Private Function EgtCreateOutRegionRectangle_32(nParentId As Integer, dXmin As Double, dYmin As Double, dXmax As Double, dYmax As Double, dZ As Double) As Boolean End Function Private Function EgtCreateOutRegionRectangle_64(nParentId As Integer, dXmin As Double, dYmin As Double, dXmax As Double, dYmax As Double, dZ As Double) As Boolean End Function Public Function EgtCreateOutRegionRectangle(nParentId As Integer, dXmin As Double, dYmin As Double, dXmax As Double, dYmax As Double, dZ As Double) As Boolean If IntPtr.Size = 4 Then Return EgtCreateOutRegionRectangle_32(nParentId, dXmin, dYmin, dXmax, dYmax, dZ) Else Return EgtCreateOutRegionRectangle_64(nParentId, dXmin, dYmin, dXmax, dYmax, dZ) End If End Function Private Function EgtCreateOutRegion_32(nParentId As Integer, nOutCrvId As Integer) As Boolean End Function Private Function EgtCreateOutRegion_64(nParentId As Integer, nOutCrvId As Integer) As Boolean End Function Public Function EgtCreateOutRegion(nParentId As Integer, nOutCrvId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtCreateOutRegion_32(nParentId, nOutCrvId) Else Return EgtCreateOutRegion_64(nParentId, nOutCrvId) End If End Function Private Function EgtCreateReferenceRegion_32(nParentId As Integer, nOutCrvId As Integer, bBottomUp As Boolean) As Boolean End Function Private Function EgtCreateReferenceRegion_64(nParentId As Integer, nOutCrvId As Integer, bBottomUp As Boolean) As Boolean End Function Public Function EgtCreateReferenceRegion(nParentId As Integer, nOutCrvId As Integer, bBottomUp As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtCreateReferenceRegion_32(nParentId, nOutCrvId, bBottomUp) Else Return EgtCreateReferenceRegion_64(nParentId, nOutCrvId, bBottomUp) End If End Function Private Function EgtCreateDamagedRegion_32(nParentId As Integer, nDmgCrvId As Integer) As Boolean End Function Private Function EgtCreateDamagedRegion_64(nParentId As Integer, nDmgCrvId As Integer) As Boolean End Function Public Function EgtCreateDamagedRegion(nParentId As Integer, nDmgCrvId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtCreateDamagedRegion_32(nParentId, nDmgCrvId) Else Return EgtCreateDamagedRegion_64(nParentId, nDmgCrvId) End If End Function Private Function EgtVerifyPartCluster_32(vId As Integer(), nCount As Integer, bReducedCut As Boolean) As Boolean End Function Private Function EgtVerifyPartCluster_64(vId As Integer(), nCount As Integer, bReducedCut As Boolean) As Boolean End Function Public Function EgtVerifyPartCluster(vId As Integer(), bReducedCut As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtVerifyPartCluster_32(vId, vId.Count(), bReducedCut) Else Return EgtVerifyPartCluster_64(vId, vId.Count(), bReducedCut) End If End Function Public Function EgtVerifyPart(nPartId As Integer, bReducedCut As Boolean) As Boolean Dim vId(0) As Integer vId(0) = nPartId If IntPtr.Size = 4 Then Return EgtVerifyPartCluster_32(vId, 1, bReducedCut) Else Return EgtVerifyPartCluster_64(vId, 1, bReducedCut) End If End Function Private Function EgtPackPartClusterInRectangle_32(vId As Integer(), nCount As Integer, bReducedCut As Boolean, bBottomUp As Boolean) As Boolean End Function Private Function EgtPackPartClusterInRectangle_64(vId As Integer(), nCount As Integer, bReducedCut As Boolean, bBottomUp As Boolean) As Boolean End Function Public Function EgtPackPartClusterInRectangle(vId As Integer(), bReducedCut As Boolean, bBottomUp As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtPackPartClusterInRectangle_32(vId, vId.Count(), bReducedCut, bBottomUp) Else Return EgtPackPartClusterInRectangle_64(vId, vId.Count(), bReducedCut, bBottomUp) End If End Function Public Function EgtPackPartInRectangle(nPartId As Integer, bReducedCut As Boolean, bBottomUp As Boolean) As Boolean Dim vId(0) As Integer vId(0) = nPartId If IntPtr.Size = 4 Then Return EgtPackPartClusterInRectangle_32(vId, 1, bReducedCut, bBottomUp) Else Return EgtPackPartClusterInRectangle_64(vId, 1, bReducedCut, bBottomUp) End If End Function Private Function EgtPackPartCluster_32(vId As Integer(), nCount As Integer, bReducedCut As Boolean, bBottomUp As Boolean) As Boolean End Function Private Function EgtPackPartCluster_64(vId As Integer(), nCount As Integer, bReducedCut As Boolean, bBottomUp As Boolean) As Boolean End Function Public Function EgtPackPartCluster(vId As Integer(), bReducedCut As Boolean, bBottomUp As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtPackPartCluster_32(vId, vId.Count(), bReducedCut, bBottomUp) Else Return EgtPackPartCluster_64(vId, vId.Count(), bReducedCut, bBottomUp) End If End Function Public Function EgtPackPart(nPartId As Integer, bReducedCut As Boolean, bBottomUp As Boolean) As Boolean Dim vId(0) As Integer vId(0) = nPartId If IntPtr.Size = 4 Then Return EgtPackPartCluster_32(vId, 1, bReducedCut, bBottomUp) Else Return EgtPackPartCluster_64(vId, 1, bReducedCut, bBottomUp) End If End Function Private Function EgtMovePartCluster_32(vId As Integer(), nCount As Integer, bReducedCut As Boolean, ByRef vtMove As Vector3d) As Boolean End Function Private Function EgtMovePartCluster_64(vId As Integer(), nCount As Integer, bReducedCut As Boolean, ByRef vtMove As Vector3d) As Boolean End Function Public Function EgtMovePartCluster(vId As Integer(), bReducedCut As Boolean, ByRef vtMove As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtMovePartCluster_32(vId, vId.Count(), bReducedCut, vtMove) Else Return EgtMovePartCluster_64(vId, vId.Count(), bReducedCut, vtMove) End If End Function Public Function EgtMovePart(nPartId As Integer, bReducedCut As Boolean, ByRef vtMove As Vector3d) As Boolean Dim vId(0) As Integer vId(0) = nPartId If IntPtr.Size = 4 Then Return EgtMovePartCluster_32(vId, 1, bReducedCut, vtMove) Else Return EgtMovePartCluster_64(vId, 1, bReducedCut, vtMove) End If End Function Private Function EgtRotatePartCluster_32(vId As Integer(), nCount As Integer, bReducedCut As Boolean, ByRef ptCen As Point3d, ByRef dRotAngDeg As Double) As Boolean End Function Private Function EgtRotatePartCluster_64(vId As Integer(), nCount As Integer, bReducedCut As Boolean, ByRef ptCen As Point3d, ByRef dRotAngDeg As Double) As Boolean End Function Public Function EgtRotatePartCluster(vId As Integer(), bReducedCut As Boolean, ptCen As Point3d, ByRef dRotAngDeg As Double) As Boolean If IntPtr.Size = 4 Then Return EgtRotatePartCluster_32(vId, vId.Count(), bReducedCut, ptCen, dRotAngDeg) Else Return EgtRotatePartCluster_64(vId, vId.Count(), bReducedCut, ptCen, dRotAngDeg) End If End Function Public Function EgtRotatePart(nPartId As Integer, bReducedCut As Boolean, ptCen As Point3d, ByRef dRotAngDeg As Double) As Boolean Dim vId(0) As Integer vId(0) = nPartId If IntPtr.Size = 4 Then Return EgtRotatePartCluster_32(vId, 1, bReducedCut, ptCen, dRotAngDeg) Else Return EgtRotatePartCluster_64(vId, 1, bReducedCut, ptCen, dRotAngDeg) End If End Function Private Function EgtTgMovePartClusterOnCollision_32(vId As Integer(), nCount As Integer, bReducedCut As Boolean, ByRef vtMove As Vector3d) As Boolean End Function Private Function EgtTgMovePartClusterOnCollision_64(vId As Integer(), nCount As Integer, bReducedCut As Boolean, ByRef vtMove As Vector3d) As Boolean End Function Public Function EgtTgMovePartClusterOnCollision(vId As Integer(), bReducedCut As Boolean, ByRef vtMove As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtTgMovePartClusterOnCollision_32(vId, vId.Count(), bReducedCut, vtMove) Else Return EgtTgMovePartClusterOnCollision_64(vId, vId.Count(), bReducedCut, vtMove) End If End Function Public Function EgtTgMovePartOnCollision(nPartId As Integer, bReducedCut As Boolean, ByRef vtMove As Vector3d) As Boolean Dim vId(0) As Integer vId(0) = nPartId If IntPtr.Size = 4 Then Return EgtTgMovePartClusterOnCollision_32(vId, 1, bReducedCut, vtMove) Else Return EgtTgMovePartClusterOnCollision_64(vId, 1, bReducedCut, vtMove) End If End Function Private Function EgtAlignPartClusterOnCollision_32(vId As Integer(), nCount As Integer, bReducedCut As Boolean, ByRef bMoved As Boolean) As Boolean End Function Private Function EgtAlignPartClusterOnCollision_64(vId As Integer(), nCount As Integer, bReducedCut As Boolean, ByRef bMoved As Boolean) As Boolean End Function Public Function EgtAlignPartClusterOnCollision(vId As Integer(), bReducedCut As Boolean, ByRef bMoved As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtAlignPartClusterOnCollision_32(vId, vId.Count(), bReducedCut, bMoved) Else Return EgtAlignPartClusterOnCollision_64(vId, vId.Count(), bReducedCut, bMoved) End If End Function Public Function EgtAlignPartOnCollision(nPartId As Integer, bReducedCut As Boolean, ByRef bMoved As Boolean) As Boolean Dim vId(0) As Integer vId(0) = nPartId If IntPtr.Size = 4 Then Return EgtAlignPartClusterOnCollision_32(vId, 1, bReducedCut, bMoved) Else Return EgtAlignPartClusterOnCollision_64(vId, 1, bReducedCut, bMoved) End If End Function Private Function EgtMoveToSnapPointOnCollision_32(vId As Integer(), nCount As Integer, bReducedCut As Boolean, dMaxMove As Double, ByRef bMoved As Boolean) As Boolean End Function Private Function EgtMoveToSnapPointOnCollision_64(vId As Integer(), nCount As Integer, bReducedCut As Boolean, dMaxMove As Double, ByRef bMoved As Boolean) As Boolean End Function Public Function EgtMoveToSnapPointOnCollision(vId As Integer(), bReducedCut As Boolean, dMaxMove As Double, ByRef bMoved As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtMoveToSnapPointOnCollision_32(vId, vId.Count(), bReducedCut, dMaxMove, bMoved) Else Return EgtMoveToSnapPointOnCollision_64(vId, vId.Count(), bReducedCut, dMaxMove, bMoved) End If End Function Public Function EgtMovePartToSnapPointOnCollision(nPartId As Integer, bReducedCut As Boolean, dMaxMove As Double, ByRef bMoved As Boolean) As Boolean Dim vId(0) As Integer vId(0) = nPartId If IntPtr.Size = 4 Then Return EgtMoveToSnapPointOnCollision_32(vId, 1, bReducedCut, dMaxMove, bMoved) Else Return EgtMoveToSnapPointOnCollision_64(vId, 1, bReducedCut, dMaxMove, bMoved) End If End Function Private Sub EgtSaveCollInfo_32() End Sub Private Sub EgtSaveCollInfo_64() End Sub Public Sub EgtSaveCollInfo() If IntPtr.Size = 4 Then EgtSaveCollInfo_32() Else EgtSaveCollInfo_64() End If End Sub Private Sub EgtRestoreCollInfo_32() End Sub Private Sub EgtRestoreCollInfo_64() End Sub Public Sub EgtRestoreCollInfo() If IntPtr.Size = 4 Then EgtRestoreCollInfo_32() Else EgtRestoreCollInfo_64() End If End Sub Private Function EgtGetPartClusterCenterGlob_32(vId As Integer(), nCount As Integer, ByRef ptCen As Point3d) As Boolean End Function Private Function EgtGetPartClusterCenterGlob_64(vId As Integer(), nCount As Integer, ByRef ptCen As Point3d) As Boolean End Function Public Function EgtGetPartClusterCenterGlob(vId As Integer(), ptCen As Point3d, ByRef dRotAngDeg As Double) As Boolean If IntPtr.Size = 4 Then Return EgtGetPartClusterCenterGlob_32(vId, vId.Count(), ptCen) Else Return EgtGetPartClusterCenterGlob_64(vId, vId.Count(), ptCen) End If End Function Public Function EgtGetPartPartClusterCenterGlob(nPartId As Integer, ByRef ptCen As Point3d) As Boolean Dim vId(0) As Integer vId(0) = nPartId If IntPtr.Size = 4 Then Return EgtGetPartClusterCenterGlob_32(vId, 1, ptCen) Else Return EgtGetPartClusterCenterGlob_64(vId, 1, ptCen) End If End Function Private Function EgtVerifyMachining_32(nId As Integer, ByRef nResult As Integer) As Boolean End Function Private Function EgtVerifyMachining_64(nId As Integer, ByRef nResult As Integer) As Boolean End Function Public Function EgtVerifyMachining(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 Private Function EgtVerifyCutAsSplitting_32(nId As Integer) As Integer End Function Private Function EgtVerifyCutAsSplitting_64(nId As Integer) As Integer End Function Public Function EgtVerifyCutAsSplitting(nId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtVerifyCutAsSplitting_32(nId) Else Return EgtVerifyCutAsSplitting_64(nId) End If End Function '---------- Machinings --------------------------------------------------------- Private Function EgtInitMachMgr_32(sMachinesDir As String, sToolMakersDir As String) As Boolean End Function Private Function EgtInitMachMgr_64(sMachinesDir As String, sToolMakersDir As String) As Boolean End Function Public Function EgtInitMachMgr(sMachinesDir As String, sToolMakersDir As String) As Boolean If IntPtr.Size = 4 Then Return EgtInitMachMgr_32(sMachinesDir, sToolMakersDir) Else Return EgtInitMachMgr_64(sMachinesDir, sToolMakersDir) End If End Function ' Errors & Warnings Private Function EgtGetLastMachMgrErrorId_32() As Integer End Function Private Function EgtGetLastMachMgrErrorId_64() As Integer End Function Public Function EgtGetLastMachMgrErrorId() As Integer If IntPtr.Size = 4 Then Return EgtGetLastMachMgrErrorId_32() Else Return EgtGetLastMachMgrErrorId_64() End If End Function Private Function EgtGetLastMachMgrErrorString_32() As IntPtr End Function Private Function EgtGetLastMachMgrErrorString_64() As IntPtr End Function Public Function EgtGetLastMachMgrErrorString() As String Dim sErr As String = String.Empty Dim nTmp As IntPtr If IntPtr.Size = 4 Then nTmp = EgtGetLastMachMgrErrorString_32() Else nTmp = EgtGetLastMachMgrErrorString_64() End If If Not IsNothing(nTmp) Then sErr = Marshal.PtrToStringUni(nTmp) EgtFreeMemory(nTmp) End If Return sErr End Function Private Function EgtGetMachMgrWarningId_32( nInd As Integer) As Integer End Function Private Function EgtGetMachMgrWarningId_64( nInd As Integer) As Integer End Function Public Function EgtGetMachMgrWarningId( nInd As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetMachMgrWarningId_32( nInd) Else Return EgtGetMachMgrWarningId_64( nInd) End If End Function Private Function EgtGetMachMgrWarningString_32( nInd As Integer) As IntPtr End Function Private Function EgtGetMachMgrWarningString_64( nInd As Integer) As IntPtr End Function Public Function EgtGetMachMgrWarningString( nInd As Integer) As String Dim sErr As String = String.Empty Dim nTmp As IntPtr If IntPtr.Size = 4 Then nTmp = EgtGetMachMgrWarningString_32( nInd) Else nTmp = EgtGetMachMgrWarningString_64( nInd) End If If Not IsNothing(nTmp) Then sErr = Marshal.PtrToStringUni(nTmp) EgtFreeMemory(nTmp) End If Return sErr End Function ' Machines Private Function EgtSetCurrMachine_32(sMachineName As String) As Boolean End Function Private Function EgtSetCurrMachine_64(sMachineName As String) As Boolean End Function Public Function EgtSetCurrMachine(sMachineName As String) As Boolean If IntPtr.Size = 4 Then Return EgtSetCurrMachine_32(sMachineName) Else Return EgtSetCurrMachine_64(sMachineName) End If End Function Private Function EgtGetCurrMachineName_32(ByRef psMachineName As IntPtr) As Boolean End Function Private Function EgtGetCurrMachineName_64(ByRef psMachineName As IntPtr) As Boolean End Function Public Function EgtGetCurrMachineName(ByRef sMachineName As String) As Boolean Dim psMachineName As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetCurrMachineName_32(psMachineName) Else bOk = EgtGetCurrMachineName_64(psMachineName) End If If bOk Then sMachineName = Marshal.PtrToStringUni(psMachineName) EgtFreeMemory(psMachineName) Else sMachineName = String.Empty End If Return bOk End Function ' Machining Groups Private Function EgtGetMachGroupCount_32() As Integer End Function Private Function EgtGetMachGroupCount_64() As Integer End Function Public Function EgtGetMachGroupCount() As Integer If IntPtr.Size = 4 Then Return EgtGetMachGroupCount_32() Else Return EgtGetMachGroupCount_64() End If End Function Private Function EgtGetFirstMachGroup_32() As Integer End Function Private Function EgtGetFirstMachGroup_64() As Integer End Function Public Function EgtGetFirstMachGroup() As Integer If IntPtr.Size = 4 Then Return EgtGetFirstMachGroup_32() Else Return EgtGetFirstMachGroup_64() End If End Function Private Function EgtGetNextMachGroup_32(nMGroupId As Integer) As Integer End Function Private Function EgtGetNextMachGroup_64(nMGroupId As Integer) As Integer End Function Public Function EgtGetNextMachGroup(nMGroupId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetNextMachGroup_32(nMGroupId) Else Return EgtGetNextMachGroup_64(nMGroupId) End If End Function Private Function EgtGetLastMachGroup_32() As Integer End Function Private Function EgtGetLastMachGroup_64() As Integer End Function Public Function EgtGetLastMachGroup() As Integer If IntPtr.Size = 4 Then Return EgtGetLastMachGroup_32() Else Return EgtGetLastMachGroup_64() End If End Function Private Function EgtGetPrevMachGroup_32(nMGroupId As Integer) As Integer End Function Private Function EgtGetPrevMachGroup_64(nMGroupId As Integer) As Integer End Function Public Function EgtGetPrevMachGroup(nMGroupId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetPrevMachGroup_32(nMGroupId) Else Return EgtGetPrevMachGroup_64(nMGroupId) End If End Function Private Function EgtGetMachGroupNewName_32(sName As String, ByRef psNewName As IntPtr) As Boolean End Function Private Function EgtGetMachGroupNewName_64(sName As String, ByRef psNewName As IntPtr) As Boolean End Function Public Function EgtGetMachGroupNewName(ByRef sName As String) As Boolean Dim psNewName As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetMachGroupNewName_32(sName, psNewName) Else bOk = EgtGetMachGroupNewName_64(sName, psNewName) End If If bOk Then sName = Marshal.PtrToStringUni(psNewName) EgtFreeMemory(psNewName) Else sName = String.Empty End If Return bOk End Function Private Function EgtAddMachGroup_32(sName As String, sMachineName As String) As Integer End Function Private Function EgtAddMachGroup_64(sName As String, sMachineName As String) As Integer End Function Public Function EgtAddMachGroup(sName As String, Optional 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 EgtRemoveMachGroup_32(nMGroupId As Integer) As Boolean End Function Private Function EgtRemoveMachGroup_64(nMGroupId As Integer) As Boolean End Function Public Function EgtRemoveMachGroup(nMGroupId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtRemoveMachGroup_32(nMGroupId) Else Return EgtRemoveMachGroup_64(nMGroupId) End If End Function Private Function EgtGetMachGroupName_32(nMGroupId As Integer, ByRef psMachGrpName As IntPtr) As Boolean End Function Private Function EgtGetMachGroupName_64(nMGroupId As Integer, ByRef psMachGrpName As IntPtr) As Boolean End Function Public Function EgtGetMachGroupName(nMGroupId As Integer, ByRef sMachGrpName As String) As Boolean Dim psMachGrpName As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetMachGroupName_32(nMGroupId, psMachGrpName) Else bOk = EgtGetMachGroupName_64(nMGroupId, psMachGrpName) End If If bOk Then sMachGrpName = Marshal.PtrToStringUni(psMachGrpName) EgtFreeMemory(psMachGrpName) Else sMachGrpName = String.Empty End If Return bOk End Function Private Function EgtGetMachGroupMachineName_32(nMGroupId As Integer, ByRef psMachineName As IntPtr) As Boolean End Function Private Function EgtGetMachGroupMachineName_64(nMGroupId As Integer, ByRef psMachineName As IntPtr) As Boolean End Function Public Function EgtGetMachGroupMachineName(nMGroupId As Integer, ByRef sMachineName As String) As Boolean Dim psMachineName As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetMachGroupMachineName_32(nMGroupId, psMachineName) Else bOk = EgtGetMachGroupMachineName_64(nMGroupId, psMachineName) End If If bOk Then sMachineName = Marshal.PtrToStringUni(psMachineName) EgtFreeMemory(psMachineName) Else sMachineName = String.Empty End If Return bOk End Function Private Function EgtGetMachGroupId_32(sMachGrpName As String) As Integer End Function Private Function EgtGetMachGroupId_64(sMachGrpName As String) As Integer End Function Public Function EgtGetMachGroupId(sMachGrpName As String) As Integer If IntPtr.Size = 4 Then Return EgtGetMachGroupId_32(sMachGrpName) Else Return EgtGetMachGroupId_64(sMachGrpName) End If End Function Private Function EgtSetCurrMachGroup_32(nMGroupId As Integer) As Boolean End Function Private Function EgtSetCurrMachGroup_64(nMGroupId As Integer) As Boolean End Function Public Function EgtSetCurrMachGroup(nMGroupId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSetCurrMachGroup_32(nMGroupId) Else Return EgtSetCurrMachGroup_64(nMGroupId) End If End Function Private Function EgtResetCurrMachGroup_32() As Boolean End Function Private Function EgtResetCurrMachGroup_64() As Boolean End Function Public Function EgtResetCurrMachGroup() As Boolean If IntPtr.Size = 4 Then Return EgtResetCurrMachGroup_32() Else Return EgtResetCurrMachGroup_64() End If End Function Private Function EgtGetCurrMachGroup_32() As Integer End Function Private Function EgtGetCurrMachGroup_64() As Integer End Function Public Function EgtGetCurrMachGroup() As Integer If IntPtr.Size = 4 Then Return EgtGetCurrMachGroup_32() Else Return EgtGetCurrMachGroup_64() End If End Function ' Phases Private Function EgtAddPhase_32() As Integer End Function Private Function EgtAddPhase_64() As Integer End Function Public Function EgtAddPhase() As Integer If IntPtr.Size = 4 Then Return EgtAddPhase_32() Else Return EgtAddPhase_64() End If End Function Private Function EgtSetCurrPhase_32(nPhase As Integer, bForced As Boolean) As Boolean End Function Private Function EgtSetCurrPhase_64(nPhase As Integer, bForced As Boolean) As Boolean End Function Public Function EgtSetCurrPhase(nPhase As Integer, Optional bForced As Boolean = False) As Boolean If IntPtr.Size = 4 Then Return EgtSetCurrPhase_32(nPhase, bForced) Else Return EgtSetCurrPhase_64(nPhase, bForced) End If End Function Private Function EgtGetCurrPhase_32() As Integer End Function Private Function EgtGetCurrPhase_64() As Integer End Function Public Function EgtGetCurrPhase() As Integer If IntPtr.Size = 4 Then Return EgtGetCurrPhase_32() Else Return EgtGetCurrPhase_64() End If End Function Private Function EgtRemoveLastPhase_32() As Boolean End Function Private Function EgtRemoveLastPhase_64() As Boolean End Function Public Function EgtRemoveLastPhase() As Boolean If IntPtr.Size = 4 Then Return EgtRemoveLastPhase_32() Else Return EgtRemoveLastPhase_64() End If End Function Private Function EgtGetPhaseCount_32() As Integer End Function Private Function EgtGetPhaseCount_64() As Integer End Function Public Function EgtGetPhaseCount() As Integer If IntPtr.Size = 4 Then Return EgtGetPhaseCount_32() Else Return EgtGetPhaseCount_64() End If End Function ' RawParts & Parts 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(nRawId As Integer) As Integer End Function Private Function EgtGetNextRawPart_64(nRawId As Integer) As Integer End Function Public Function EgtGetNextRawPart(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, dLength As Double, dWidth As Double, dHeight As Double, ByRef Color As Color3d) As Integer End Function Private Function EgtAddRawPart_64(ByRef ptOrig As Point3d, dLength As Double, dWidth As Double, dHeight As Double, ByRef Color As Color3d) As Integer End Function Public Function EgtAddRawPart(ByRef ptOrig As Point3d, dLength As Double, dWidth As Double, 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 EgtModifyRawPart_32(nRawId As Integer, ByRef ptOrig As Point3d, dLength As Double, dWidth As Double, dHeight As Double, ByRef Color As Color3d) As Boolean End Function Private Function EgtModifyRawPart_64(nRawId As Integer, ByRef ptOrig As Point3d, dLength As Double, dWidth As Double, dHeight As Double, ByRef Color As Color3d) As Boolean End Function Public Function EgtModifyRawPart(nRawId As Integer, ByRef ptOrig As Point3d, dLength As Double, dWidth As Double, dHeight As Double, ByRef Color As Color3d) As Boolean If IntPtr.Size = 4 Then Return EgtModifyRawPart_32(nRawId, ptOrig, dLength, dWidth, dHeight, Color) Else Return EgtModifyRawPart_64(nRawId, ptOrig, dLength, dWidth, dHeight, Color) End If End Function Private Function EgtModifyRawPart2_32(nRawId As Integer, nCrvId As Integer, dOverMat As Double, dZmin As Double, dHeight As Double, ByRef Color As Color3d) As Boolean End Function Private Function EgtModifyRawPart2_64(nRawId As Integer, nCrvId As Integer, dOverMat As Double, dZmin As Double, dHeight As Double, ByRef Color As Color3d) As Boolean End Function Public Function EgtModifyRawPart(nRawId As Integer, nCrvId As Integer, dOverMat As Double, dZmin As Double, dHeight As Double, ByRef Color As Color3d) As Boolean If IntPtr.Size = 4 Then Return EgtModifyRawPart2_32(nRawId, nCrvId, dOverMat, dZmin, dHeight, Color) Else Return EgtModifyRawPart2_64(nRawId, nCrvId, dOverMat, dZmin, dHeight, Color) End If End Function Private Function EgtModifyRawPartSize_32(nRawId As Integer, dLength As Double, dWidth As Double, dHeight As Double) As Boolean End Function Private Function EgtModifyRawPartSize_64(nRawId As Integer, dLength As Double, dWidth As Double, dHeight As Double) As Boolean End Function Public Function EgtModifyRawPartSize(nRawId As Integer, dLength As Double, dWidth As Double, 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(nRawId As Integer, dHeight As Double) As Boolean End Function Private Function EgtModifyRawPartHeight_64(nRawId As Integer, dHeight As Double) As Boolean End Function Public Function EgtModifyRawPartHeight(nRawId As Integer, 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 EgtKeepRawPart_32(nRawId As Integer, nSouPhase As Integer) As Boolean End Function Private Function EgtKeepRawPart_64(nRawId As Integer, nSouPhase As Integer) As Boolean End Function Public Function EgtKeepRawPart(nRawId As Integer, Optional nSouPhase As Integer = 0) As Boolean If IntPtr.Size = 4 Then Return EgtKeepRawPart_32(nRawId, nSouPhase) Else Return EgtKeepRawPart_64(nRawId, nSouPhase) End If End Function Private Function EgtVerifyRawPartPhase_32(nRawId As Integer, nPhase As Integer) As Boolean End Function Private Function EgtVerifyRawPartPhase_64(nRawId As Integer, nPhase As Integer) As Boolean End Function Public Function EgtVerifyRawPartPhase(nRawId As Integer, nPhase As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtVerifyRawPartPhase_32(nRawId, nPhase) Else Return EgtVerifyRawPartPhase_64(nRawId, nPhase) End If End Function Private Function EgtVerifyRawPartCurrPhase_32(nRawId As Integer) As Boolean End Function Private Function EgtVerifyRawPartCurrPhase_64(nRawId As Integer) As Boolean End Function Public Function EgtVerifyRawPartCurrPhase(nRawId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtVerifyRawPartCurrPhase_32(nRawId) Else Return EgtVerifyRawPartCurrPhase_64(nRawId) End If End Function Private Function EgtRemoveRawPartFromCurrPhase_32(nRawId As Integer) As Boolean End Function Private Function EgtRemoveRawPartFromCurrPhase_64(nRawId As Integer) As Boolean End Function Public Function EgtRemoveRawPartFromCurrPhase(nRawId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtRemoveRawPartFromCurrPhase_32(nRawId) Else Return EgtRemoveRawPartFromCurrPhase_64(nRawId) End If End Function Private Function EgtRemoveRawPart_32(nRawId As Integer) As Boolean End Function Private Function EgtRemoveRawPart_64(nRawId As Integer) As Boolean End Function Public Function EgtRemoveRawPart(nRawId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtRemoveRawPart_32(nRawId) Else Return EgtRemoveRawPart_64(nRawId) End If End Function Private Function EgtMoveToCornerRawPart_32(nRawId As Integer, ByRef ptCorner As Point3d, nFlag As Integer) As Boolean End Function Private Function EgtMoveToCornerRawPart_64(nRawId As Integer, ByRef ptCorner As Point3d, nFlag As Integer) As Boolean End Function Public Function EgtMoveToCornerRawPart(nRawId As Integer, ByRef ptCorner As Point3d, 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 EgtMoveRawPart_32(nRawId As Integer, ByRef vtMove As Vector3d) As Boolean End Function Private Function EgtMoveRawPart_64(nRawId As Integer, ByRef vtMove As Vector3d) As Boolean End Function Public Function EgtMoveRawPart(nRawId As Integer, ByRef vtMove As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtMoveRawPart_32(nRawId, vtMove) Else Return EgtMoveRawPart_64(nRawId, vtMove) End If End Function Private Function EgtRotateRawPart_32(nRawId As Integer, ByRef vtAx As Vector3d, dAngDeg As Double) As Boolean End Function Private Function EgtRotateRawPart_64(nRawId As Integer, ByRef vtAx As Vector3d, dAngDeg As Double) As Boolean End Function Public Function EgtRotateRawPart(nRawId As Integer, ByRef vtAx As Vector3d, dAngDeg As Double) As Boolean If IntPtr.Size = 4 Then Return EgtRotateRawPart_32(nRawId, vtAx, dAngDeg) Else Return EgtRotateRawPart_64(nRawId, vtAx, dAngDeg) End If End Function Private Function EgtGetRawPartCenter_32(nRawId As Integer, ByRef ptCen As Point3d) As Boolean End Function Private Function EgtGetRawPartCenter_64(nRawId As Integer, ByRef ptCen As Point3d) As Boolean End Function Public Function EgtGetRawPartCenter(nRawId As Integer, ByRef ptCen As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetRawPartCenter_32(nRawId, ptCen) Else Return EgtGetRawPartCenter_64(nRawId, ptCen) End If End Function Private Function EgtGetRawPartBBox_32(nRawId As Integer, ByRef ptMin As Point3d, ByRef ptMax As Point3d) As Boolean End Function Private Function EgtGetRawPartBBox_64(nRawId As Integer, ByRef ptMin As Point3d, ByRef ptMax As Point3d) As Boolean End Function Public Function EgtGetRawPartBBox(nRawId As Integer, ByRef ptMin As Point3d, ByRef ptMax As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetRawPartBBox_32(nRawId, ptMin, ptMax) Else Return EgtGetRawPartBBox_64(nRawId, ptMin, ptMax) End If End Function Public Function EgtGetRawPartBBox(nRawId As Integer, ByRef b3Box As BBox3d) As Boolean b3Box.Setup() Dim ptMin, ptMax As Point3d If IntPtr.Size = 4 Then If Not EgtGetRawPartBBox_32(nRawId, ptMin, ptMax) Then Return False Else If Not EgtGetRawPartBBox_64(nRawId, ptMin, ptMax) Then Return False End If b3Box.Add(ptMin) b3Box.Add(ptMax) Return True End Function Private Function EgtSplitFlatRawPartWithMachinings_32(nRawId As Integer, nNumMch As Integer, nMchId() As Integer) As Integer End Function Private Function EgtSplitFlatRawPartWithMachinings_64(nRawId As Integer, nNumMch As Integer, nMchId() As Integer) As Integer End Function Public Function EgtSplitFlatRawPartWithMachinings(nRawId As Integer, nMchId() As Integer) As Integer If IntPtr.Size = 4 Then Return EgtSplitFlatRawPartWithMachinings_32(nRawId, nMchId.Length(), nMchId) Else Return EgtSplitFlatRawPartWithMachinings_64(nRawId, nMchId.Length(), nMchId) End If End Function Private Function EgtGetPartInRawPartCount_32(nRawId As Integer) As Integer End Function Private Function EgtGetPartInRawPartCount_64(nRawId As Integer) As Integer End Function Public Function EgtGetPartInRawPartCount(nRawId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetPartInRawPartCount_32(nRawId) Else Return EgtGetPartInRawPartCount_64(nRawId) End If End Function Private Function EgtGetFirstPartInRawPart_32(nRawId As Integer) As Integer End Function Private Function EgtGetFirstPartInRawPart_64(nRawId As Integer) As Integer End Function Public Function EgtGetFirstPartInRawPart(nRawId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetFirstPartInRawPart_32(nRawId) Else Return EgtGetFirstPartInRawPart_64(nRawId) End If End Function Private Function EgtGetNextPartInRawPart_32(nPartId As Integer) As Integer End Function Private Function EgtGetNextPartInRawPart_64(nPartId As Integer) As Integer End Function Public Function EgtGetNextPartInRawPart(nPartId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetNextPartInRawPart_32(nPartId) Else Return EgtGetNextPartInRawPart_64(nPartId) End If End Function Private Function EgtAddPartToRawPart_32(nPartId As Integer, ByRef ptPos As Point3d, nRawId As Integer) As Boolean End Function Private Function EgtAddPartToRawPart_64(nPartId As Integer, ByRef ptPos As Point3d, nRawId As Integer) As Boolean End Function Public Function EgtAddPartToRawPart(nPartId As Integer, ByRef ptPos As Point3d, 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 EgtGetRawPartFromPart_32(nPartId As Integer) As Integer End Function Private Function EgtGetRawPartFromPart_64(nPartId As Integer) As Integer End Function Public Function EgtGetRawPartFromPart(nPartId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetRawPartFromPart_32(nPartId) Else Return EgtGetRawPartFromPart_64(nPartId) End If End Function Private Function EgtRemovePartFromRawPart_32(nPartId As Integer) As Boolean End Function Private Function EgtRemovePartFromRawPart_64(nPartId As Integer) As Boolean End Function Public Function EgtRemovePartFromRawPart(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 EgtMovePartInRawPart_32(nRawId As Integer, ByRef vtMove As Vector3d) As Boolean End Function Private Function EgtMovePartInRawPart_64(nRawId As Integer, ByRef vtMove As Vector3d) As Boolean End Function Public Function EgtMovePartInRawPart(nRawId As Integer, ByRef vtMove As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtMovePartInRawPart_32(nRawId, vtMove) Else Return EgtMovePartInRawPart_64(nRawId, vtMove) End If End Function Private Function EgtRotatePartInRawPart_32(nRawId As Integer, ByRef vtAx As Vector3d, dAngDeg As Double) As Boolean End Function Private Function EgtRotatePartInRawPart_64(nRawId As Integer, ByRef vtAx As Vector3d, dAngDeg As Double) As Boolean End Function Public Function EgtRotatePartInRawPart(nRawId As Integer, ByRef vtAx As Vector3d, dAngDeg As Double) As Boolean If IntPtr.Size = 4 Then Return EgtRotatePartInRawPart_32(nRawId, vtAx, dAngDeg) Else Return EgtRotatePartInRawPart_64(nRawId, vtAx, dAngDeg) End If End Function ' Table & Fixtures Private Function EgtSetTable_32(sTable As String) As Boolean End Function Private Function EgtSetTable_64(sTable As String) As Boolean End Function Public Function EgtSetTable(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 EgtSetTableAreaOffset_32(dOffsXP As Double, dOffsYP As Double, dOffsXM As Double, dOffsYM As Double) As Boolean End Function Private Function EgtSetTableAreaOffset_64(dOffsXP As Double, dOffsYP As Double, dOffsXM As Double, dOffsYM As Double) As Boolean End Function Public Function EgtSetTableAreaOffset(dOffsXP As Double, dOffsYP As Double, dOffsXM As Double, dOffsYM As Double) As Boolean If IntPtr.Size = 4 Then Return EgtSetTableAreaOffset_32(dOffsXP, dOffsYP, dOffsXM, dOffsYM) Else Return EgtSetTableAreaOffset_64(dOffsXP, dOffsYP, dOffsXM, dOffsYM) End If End Function Private Function EgtGetTableName_32(ByRef psTableName As IntPtr) As Boolean End Function Private Function EgtGetTableName_64(ByRef psTableName As IntPtr) As Boolean End Function Public Function EgtGetTableName(ByRef sTableName As String) As Boolean Dim psTableName As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetTableName_32(psTableName) Else bOk = EgtGetTableName_64(psTableName) End If If bOk Then sTableName = Marshal.PtrToStringUni(psTableName) EgtFreeMemory(psTableName) Else sTableName = String.Empty End If Return bOk End Function Private Function EgtGetTableRef_32(nInd As Integer, ByRef ptPos As Point3d) As Boolean End Function Private Function EgtGetTableRef_64(nInd As Integer, ByRef ptPos As Point3d) As Boolean End Function Public Function EgtGetTableRef(nInd As Integer, ByRef ptPos As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetTableRef_32(nInd, ptPos) Else Return EgtGetTableRef_64(nInd, ptPos) End If End Function Private Function EgtGetTableArea_32(nInd As Integer, ByRef ptMin As Point3d, ByRef ptMax As Point3d) As Boolean End Function Private Function EgtGetTableArea_64(nInd As Integer, ByRef ptMin As Point3d, ByRef ptMax As Point3d) As Boolean End Function Public Function EgtGetTableArea(nInd As Integer, ByRef ptMin As Point3d, ByRef ptMax As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetTableArea_32(nInd, ptMin, ptMax) Else Return EgtGetTableArea_64(nInd, ptMin, ptMax) End If End Function Public Function EgtGetTableArea(nInd As Integer, ByRef b3Box As BBox3d) As Boolean b3Box.Setup() Dim ptMin, ptMax As Point3d If IntPtr.Size = 4 Then If Not EgtGetTableArea_32(nInd, ptMin, ptMax) Then Return False Else If Not EgtGetTableArea_64(nInd, ptMin, ptMax) Then Return False End If b3Box.Add(ptMin) b3Box.Add(ptMax) Return True End Function Private Function EgtGetTableAreaOffset_32(nInd As Integer, ByRef ptMinOffs As Point3d, ByRef ptMaxOffs As Point3d) As Boolean End Function Private Function EgtGetTableAreaOffset_64(nInd As Integer, ByRef ptMinOffs As Point3d, ByRef ptMaxOffs As Point3d) As Boolean End Function Public Function EgtGetTableAreaOffset(nInd As Integer, ByRef ptMinOffs As Point3d, ByRef ptMaxOffs As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetTableAreaOffset_32(nInd, ptMinOffs, ptMaxOffs) Else Return EgtGetTableAreaOffset_64(nInd, ptMinOffs, ptMaxOffs) End If End Function Public Function EgtGetTableAreaOffset(nInd As Integer, ByRef b3BoxOffs As BBox3d) As Boolean b3BoxOffs.Setup() Dim ptMinOffs, ptMaxOffs As Point3d If IntPtr.Size = 4 Then If Not EgtGetTableAreaOffset_32(nInd, ptMinOffs, ptMaxOffs) Then Return False Else If Not EgtGetTableAreaOffset_64(nInd, ptMinOffs, ptMaxOffs) Then Return False End If b3BoxOffs.Add(ptMinOffs) b3BoxOffs.Add(ptMaxOffs) Return True End Function Private Function EgtShowOnlyTable_32(bVal As Boolean) As Boolean End Function Private Function EgtShowOnlyTable_64(bVal As Boolean) As Boolean End Function Public Function EgtShowOnlyTable(bVal As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtShowOnlyTable_32(bVal) Else Return EgtShowOnlyTable_64(bVal) End If End Function Private Function EgtAddFixture_32(sName As String, ByRef ptPos As Point3d, dAngRotDeg As Double, dMov As Double) As Integer End Function Private Function EgtAddFixture_64(sName As String, ByRef ptPos As Point3d, dAngRotDeg As Double, dMov As Double) As Integer End Function Public Function EgtAddFixture(sName As String, ByRef ptPos As Point3d, dAngRotDeg As Double, dMov As Double) As Integer If IntPtr.Size = 4 Then Return EgtAddFixture_32(sName, ptPos, dAngRotDeg, dMov) Else Return EgtAddFixture_64(sName, ptPos, dAngRotDeg, dMov) End If End Function Private Function EgtKeepFixture_32(nFixtId As Integer, nSouPhase As Integer) As Boolean End Function Private Function EgtKeepFixture_64(nFixtId As Integer, nSouPhase As Integer) As Boolean End Function Public Function EgtKeepFixture(nFixtId As Integer, Optional nSouPhase As Integer = 0) As Boolean If IntPtr.Size = 4 Then Return EgtKeepFixture_32(nFixtId, nSouPhase) Else Return EgtKeepFixture_64(nFixtId, nSouPhase) End If End Function Private Function EgtRemoveFixture_32(nFixtId As Integer) As Boolean End Function Private Function EgtRemoveFixture_64(nFixtId As Integer) As Boolean End Function Public Function EgtRemoveFixture(nFixtId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtRemoveFixture_32(nFixtId) Else Return EgtRemoveFixture_64(nFixtId) End If End Function Private Function EgtVerifyFixture_32(nFixtId As Integer) As Boolean End Function Private Function EgtVerifyFixture_64(nFixtId As Integer) As Boolean End Function Public Function EgtVerifyFixture(nFixtId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtVerifyFixture_32(nFixtId) Else Return EgtVerifyFixture_64(nFixtId) End If End Function Private Function EgtGetFirstFixture_32() As Integer End Function Private Function EgtGetFirstFixture_64() As Integer End Function Public Function EgtGetFirstFixture() As Integer If IntPtr.Size = 4 Then Return EgtGetFirstFixture_32() Else Return EgtGetFirstFixture_64() End If End Function Private Function EgtGetNextFixture_32(nFixtId As Integer) As Integer End Function Private Function EgtGetNextFixture_64(nFixtId As Integer) As Integer End Function Public Function EgtGetNextFixture(nFixtId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetNextFixture_32(nFixtId) Else Return EgtGetNextFixture_64(nFixtId) End If End Function Private Function EgtMoveFixture_32(nFixtId As Integer, ByRef vtMove As Vector3d) As Boolean End Function Private Function EgtMoveFixture_64(nFixtId As Integer, ByRef vtMove As Vector3d) As Boolean End Function Public Function EgtMoveFixture(nFixtId As Integer, ByRef vtMove As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtMoveFixture_32(nFixtId, vtMove) Else Return EgtMoveFixture_64(nFixtId, vtMove) End If End Function Private Function EgtRotateFixture_32(nFixtId As Integer, dDeltaAngDeg As Double) As Boolean End Function Private Function EgtRotateFixture_64(nFixtId As Integer, dDeltaAngDeg As Double) As Boolean End Function Public Function EgtRotateFixture(nFixtId As Integer, dDeltaAngDeg As Double) As Boolean If IntPtr.Size = 4 Then Return EgtRotateFixture_32(nFixtId, dDeltaAngDeg) Else Return EgtRotateFixture_64(nFixtId, dDeltaAngDeg) End If End Function Private Function EgtMoveFixtureMobile_32(nFixtId As Integer, dDeltaMov As Double) As Boolean End Function Private Function EgtMoveFixtureMobile_64(nFixtId As Integer, dDeltaMov As Double) As Boolean End Function Public Function EgtMoveFixtureMobile(nFixtId As Integer, dDeltaMov As Double) As Boolean If IntPtr.Size = 4 Then Return EgtMoveFixtureMobile_32(nFixtId, dDeltaMov) Else Return EgtMoveFixtureMobile_64(nFixtId, dDeltaMov) End If End Function ' Tools Database Private Function EgtTdbGetToolNewName_32(sName As String, ByRef psNewName As IntPtr) As Boolean End Function Private Function EgtTdbGetToolNewName_64(sName As String, ByRef psNewName As IntPtr) As Boolean End Function Public Function EgtTdbGetToolNewName(ByRef sName As String) As Boolean Dim psNewName As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtTdbGetToolNewName_32(sName, psNewName) Else bOk = EgtTdbGetToolNewName_64(sName, psNewName) End If If bOk Then sName = Marshal.PtrToStringUni(psNewName) EgtFreeMemory(psNewName) Else sName = String.Empty End If Return bOk End Function Private Function EgtTdbAddTool_32(sName As String, nType As Integer) As Boolean End Function Private Function EgtTdbAddTool_64(sName As String, nType As Integer) As Boolean End Function Public Function EgtTdbAddTool(sName As String, nType As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtTdbAddTool_32(sName, nType) Else Return EgtTdbAddTool_64(sName, nType) End If End Function Private Function EgtTdbCopyTool_32(sSource As String, sName As String) As Boolean End Function Private Function EgtTdbCopyTool_64(sSource As String, sName As String) As Boolean End Function Public Function EgtTdbCopyTool(sSource As String, sName As String) As Boolean If IntPtr.Size = 4 Then Return EgtTdbCopyTool_32(sSource, sName) Else Return EgtTdbCopyTool_64(sSource, sName) End If End Function Private Function EgtTdbRemoveTool_32(sName As String) As Boolean End Function Private Function EgtTdbRemoveTool_64(sName As String) As Boolean End Function Public Function EgtTdbRemoveTool(sName As String) As Boolean If IntPtr.Size = 4 Then Return EgtTdbRemoveTool_32(sName) Else Return EgtTdbRemoveTool_64(sName) End If End Function Private Function EgtTdbGetFirstTool_32(nFamily As Integer, ByRef psName As IntPtr, ByRef nType As Integer) As Boolean End Function Private Function EgtTdbGetFirstTool_64(nFamily As Integer, ByRef psName As IntPtr, ByRef nType As Integer) As Boolean End Function Public Function EgtTdbGetFirstTool(nFamily As Integer, ByRef sName As String, ByRef nType As Integer) As Boolean Dim psName As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtTdbGetFirstTool_32(nFamily, psName, nType) Else bOk = EgtTdbGetFirstTool_64(nFamily, psName, nType) End If If bOk Then sName = Marshal.PtrToStringUni(psName) EgtFreeMemory(psName) Else sName = String.Empty End If Return bOk End Function Private Function EgtTdbGetNextTool_32(nFamily As Integer, ByRef psName As IntPtr, ByRef nType As Integer) As Boolean End Function Private Function EgtTdbGetNextTool_64(nFamily As Integer, ByRef psName As IntPtr, ByRef nType As Integer) As Boolean End Function Public Function EgtTdbGetNextTool(nFamily As Integer, ByRef sName As String, ByRef nType As Integer) As Boolean Dim psName As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtTdbGetNextTool_32(nFamily, psName, nType) Else bOk = EgtTdbGetNextTool_64(nFamily, psName, nType) End If If bOk Then sName = Marshal.PtrToStringUni(psName) EgtFreeMemory(psName) Else sName = String.Empty End If Return bOk End Function Private Function EgtTdbGetToolFromUUID_32(sTuuid As String, ByRef psName As IntPtr) As Boolean End Function Private Function EgtTdbGetToolFromUUID_64(sTuuid As String, ByRef psName As IntPtr) As Boolean End Function Public Function EgtTdbGetToolFromUUID(sTuuid As String, ByRef sName As String) As Boolean Dim psName As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtTdbGetToolFromUUID_32(sTuuid, psName) Else bOk = EgtTdbGetToolFromUUID_64(sTuuid, psName) End If If bOk Then sName = Marshal.PtrToStringUni(psName) EgtFreeMemory(psName) Else sName = String.Empty End If Return bOk End Function Private Function EgtTdbSetCurrTool_32(sName As String) As Boolean End Function Private Function EgtTdbSetCurrTool_64(sName As String) As Boolean End Function Public Function EgtTdbSetCurrTool(sName As String) As Boolean If IntPtr.Size = 4 Then Return EgtTdbSetCurrTool_32(sName) Else Return EgtTdbSetCurrTool_64(sName) End If End Function Private Function EgtTdbSaveCurrTool_32() As Boolean End Function Private Function EgtTdbSaveCurrTool_64() As Boolean End Function Public Function EgtTdbSaveCurrTool() As Boolean If IntPtr.Size = 4 Then Return EgtTdbSaveCurrTool_32() Else Return EgtTdbSaveCurrTool_64() End If End Function Private Function EgtTdbIsCurrToolModified_32() As Boolean End Function Private Function EgtTdbIsCurrToolModified_64() As Boolean End Function Public Function EgtTdbIsCurrToolModified() As Boolean If IntPtr.Size = 4 Then Return EgtTdbIsCurrToolModified_32() Else Return EgtTdbIsCurrToolModified_64() End If End Function Private Function EgtTdbSetCurrToolParamBool_32(nType As Integer, bVal As Boolean) As Boolean End Function Private Function EgtTdbSetCurrToolParamBool_64(nType As Integer, bVal As Boolean) As Boolean End Function Public Function EgtTdbSetCurrToolParam(nType As Integer, bVal As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtTdbSetCurrToolParamBool_32(nType, bVal) Else Return EgtTdbSetCurrToolParamBool_64(nType, bVal) End If End Function Private Function EgtTdbSetCurrToolParamInt_32(nType As Integer, nVal As Integer) As Boolean End Function Private Function EgtTdbSetCurrToolParamInt_64(nType As Integer, nVal As Integer) As Boolean End Function Public Function EgtTdbSetCurrToolParam(nType As Integer, nVal As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtTdbSetCurrToolParamInt_32(nType, nVal) Else Return EgtTdbSetCurrToolParamInt_64(nType, nVal) End If End Function Private Function EgtTdbSetCurrToolParamDouble_32(nType As Integer, dVal As Double) As Boolean End Function Private Function EgtTdbSetCurrToolParamDouble_64(nType As Integer, dVal As Double) As Boolean End Function Public Function EgtTdbSetCurrToolParam(nType As Integer, dVal As Double) As Boolean If IntPtr.Size = 4 Then Return EgtTdbSetCurrToolParamDouble_32(nType, dVal) Else Return EgtTdbSetCurrToolParamDouble_64(nType, dVal) End If End Function Private Function EgtTdbSetCurrToolParamString_32(nType As Integer, sVal As String) As Boolean End Function Private Function EgtTdbSetCurrToolParamString_64(nType As Integer, sVal As String) As Boolean End Function Public Function EgtTdbSetCurrToolParam(nType As Integer, sVal As String) As Boolean If IntPtr.Size = 4 Then Return EgtTdbSetCurrToolParamString_32(nType, sVal) Else Return EgtTdbSetCurrToolParamString_64(nType, sVal) End If End Function Private Function EgtTdbGetCurrToolParamBool_32(nType As Integer, ByRef bVal As Boolean) As Boolean End Function Private Function EgtTdbGetCurrToolParamBool_64(nType As Integer, ByRef bVal As Boolean) As Boolean End Function Public Function EgtTdbGetCurrToolParam(nType As Integer, ByRef bVal As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtTdbGetCurrToolParamBool_32(nType, bVal) Else Return EgtTdbGetCurrToolParamBool_64(nType, bVal) End If End Function Private Function EgtTdbGetCurrToolParamInt_32(nType As Integer, ByRef nVal As Integer) As Boolean End Function Private Function EgtTdbGetCurrToolParamInt_64(nType As Integer, ByRef nVal As Integer) As Boolean End Function Public Function EgtTdbGetCurrToolParam(nType As Integer, ByRef nVal As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtTdbGetCurrToolParamInt_32(nType, nVal) Else Return EgtTdbGetCurrToolParamInt_64(nType, nVal) End If End Function Private Function EgtTdbGetCurrToolParamDouble_32(nType As Integer, ByRef dVal As Double) As Boolean End Function Private Function EgtTdbGetCurrToolParamDouble_64(nType As Integer, ByRef dVal As Double) As Boolean End Function Public Function EgtTdbGetCurrToolParam(nType As Integer, ByRef dVal As Double) As Boolean If IntPtr.Size = 4 Then Return EgtTdbGetCurrToolParamDouble_32(nType, dVal) Else Return EgtTdbGetCurrToolParamDouble_64(nType, dVal) End If End Function Private Function EgtTdbGetCurrToolParamString_32(nType As Integer, ByRef psVal As IntPtr) As Boolean End Function Private Function EgtTdbGetCurrToolParamString_64(nType As Integer, ByRef psVal As IntPtr) As Boolean End Function Public Function EgtTdbGetCurrToolParam(nType As Integer, ByRef sVal As String) As Boolean Dim psVal As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtTdbGetCurrToolParamString_32(nType, psVal) Else bOk = EgtTdbGetCurrToolParamString_64(nType, psVal) End If If bOk Then sVal = Marshal.PtrToStringUni(psVal) EgtFreeMemory(psVal) Else sVal = String.Empty End If Return bOk End Function Private Function EgtTdbGetCurrToolMaxDepth_32(ByRef dVal As Double) As Boolean End Function Private Function EgtTdbGetCurrToolMaxDepth_64(ByRef dVal As Double) As Boolean End Function Public Function EgtTdbGetCurrToolMaxDepth(ByRef dVal As Double) As Boolean If IntPtr.Size = 4 Then Return EgtTdbGetCurrToolMaxDepth_32(dVal) Else Return EgtTdbGetCurrToolMaxDepth_64(dVal) End If End Function Private Function EgtTdbCurrToolDraw_32( nGenCtx As Integer, nToolCtx As Integer) As Integer End Function Private Function EgtTdbCurrToolDraw_64( nGenCtx As Integer, nToolCtx As Integer) As Integer End Function Public Function EgtTdbCurrToolDraw( nGenCtx As Integer, nToolCtx As Integer) As Integer If IntPtr.Size = 4 Then Return EgtTdbCurrToolDraw_32( nGenCtx, nToolCtx) Else Return EgtTdbCurrToolDraw_64( nGenCtx, nToolCtx) End If End Function Private Function EgtTdbReload_32() As Boolean End Function Private Function EgtTdbReload_64() As Boolean End Function Public Function EgtTdbReload() As Boolean If IntPtr.Size = 4 Then Return EgtTdbReload_32() Else Return EgtTdbReload_64() End If End Function Private Function EgtTdbSave_32() As Boolean End Function Private Function EgtTdbSave_64() As Boolean End Function Public Function EgtTdbSave() As Boolean If IntPtr.Size = 4 Then Return EgtTdbSave_32() Else Return EgtTdbSave_64() End If End Function Private Function EgtTdbGetToolDir_32(ByRef psToolDir As IntPtr) As Boolean End Function Private Function EgtTdbGetToolDir_64(ByRef psToolDir As IntPtr) As Boolean End Function Public Function EgtTdbGetToolDir(ByRef sToolDir As String) As Boolean Dim psToolDir As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtTdbGetToolDir_32(psToolDir) Else bOk = EgtTdbGetToolDir_64(psToolDir) End If If bOk Then sToolDir = Marshal.PtrToStringUni(psToolDir) EgtFreeMemory(psToolDir) Else sToolDir = String.Empty End If Return bOk End Function Private Function EgtTdbGetToolHolderDir_32(ByRef psTHolderDir As IntPtr) As Boolean End Function Private Function EgtTdbGetToolHolderDir_64(ByRef psTHolderDir As IntPtr) As Boolean End Function Public Function EgtTdbGetToolHolderDir(ByRef sTHolderDir As String) As Boolean Dim psTHolderDir As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtTdbGetToolHolderDir_32(psTHolderDir) Else bOk = EgtTdbGetToolHolderDir_64(psTHolderDir) End If If bOk Then sTHolderDir = Marshal.PtrToStringUni(psTHolderDir) EgtFreeMemory(psTHolderDir) Else sTHolderDir = String.Empty End If Return bOk End Function ' Setup Private Function EgtGetCurrSetup_32() As Integer End Function Private Function EgtGetCurrSetup_64() As Integer End Function Public Function EgtGetCurrSetup() As Integer If IntPtr.Size = 4 Then Return EgtGetCurrSetup_32() Else Return EgtGetCurrSetup_64() End If End Function Private Function EgtImportSetup_32(sName As String) As Boolean End Function Private Function EgtImportSetup_64(sName As String) As Boolean End Function Public Function EgtImportSetup(sName As String) As Boolean If IntPtr.Size = 4 Then Return EgtImportSetup_32(sName) Else Return EgtImportSetup_64(sName) End If End Function Private Function EgtUpdateSetup_32() As Boolean End Function Private Function EgtUpdateSetup_64() As Boolean End Function Public Function EgtUpdateSetup() As Boolean If IntPtr.Size = 4 Then Return EgtUpdateSetup_32() Else Return EgtUpdateSetup_64() End If End Function ' Machinings Database Private Function EgtMdbGetMachiningNewName_32(sName As String, ByRef psNewName As IntPtr) As Boolean End Function Private Function EgtMdbGetMachiningNewName_64(sName As String, ByRef psNewName As IntPtr) As Boolean End Function Public Function EgtMdbGetMachiningNewName(ByRef sName As String) As Boolean Dim psNewName As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtMdbGetMachiningNewName_32(sName, psNewName) Else bOk = EgtMdbGetMachiningNewName_64(sName, psNewName) End If If bOk Then sName = Marshal.PtrToStringUni(psNewName) EgtFreeMemory(psNewName) Else sName = String.Empty End If Return bOk End Function Private Function EgtMdbAddMachining_32(sName As String, nType As Integer) As Boolean End Function Private Function EgtMdbAddMachining_64(sName As String, nType As Integer) As Boolean End Function Public Function EgtMdbAddMachining(sName As String, nType As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtMdbAddMachining_32(sName, nType) Else Return EgtMdbAddMachining_64(sName, nType) End If End Function Private Function EgtMdbCopyMachining_32(sSource As String, sName As String) As Boolean End Function Private Function EgtMdbCopyMachining_64(sSource As String, sName As String) As Boolean End Function Public Function EgtMdbCopyMachining(sSource As String, sName As String) As Boolean If IntPtr.Size = 4 Then Return EgtMdbCopyMachining_32(sSource, sName) Else Return EgtMdbCopyMachining_64(sSource, sName) End If End Function Private Function EgtMdbRemoveMachining_32(sName As String) As Boolean End Function Private Function EgtMdbRemoveMachining_64(sName As String) As Boolean End Function Public Function EgtMdbRemoveMachining(sName As String) As Boolean If IntPtr.Size = 4 Then Return EgtMdbRemoveMachining_32(sName) Else Return EgtMdbRemoveMachining_64(sName) End If End Function Private Function EgtMdbGetFirstMachining_32(nType As Integer, ByRef psName As IntPtr) As Boolean End Function Private Function EgtMdbGetFirstMachining_64(nType As Integer, ByRef psName As IntPtr) As Boolean End Function Public Function EgtMdbGetFirstMachining(nType As Integer, ByRef sName As String) As Boolean Dim psName As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtMdbGetFirstMachining_32(nType, psName) Else bOk = EgtMdbGetFirstMachining_64(nType, psName) End If If bOk Then sName = Marshal.PtrToStringUni(psName) EgtFreeMemory(psName) Else sName = String.Empty End If Return bOk End Function Private Function EgtMdbGetNextMachining_32(nType As Integer, ByRef psName As IntPtr) As Boolean End Function Private Function EgtMdbGetNextMachining_64(nType As Integer, ByRef psName As IntPtr) As Boolean End Function Public Function EgtMdbGetNextMachining(nType As Integer, ByRef sName As String) As Boolean Dim psName As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtMdbGetNextMachining_32(nType, psName) Else bOk = EgtMdbGetNextMachining_64(nType, psName) End If If bOk Then sName = Marshal.PtrToStringUni(psName) EgtFreeMemory(psName) Else sName = String.Empty End If Return bOk End Function Private Function EgtMdbGetMachiningFromUUID_32(sMuuid As String, ByRef psName As IntPtr) As Boolean End Function Private Function EgtMdbGetMachiningFromUUID_64(sMuuid As String, ByRef psName As IntPtr) As Boolean End Function Public Function EgtMdbGetMachiningFromUUID(sMuuid As String, ByRef sName As String) As Boolean Dim psName As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtMdbGetMachiningFromUUID_32(sMuuid, psName) Else bOk = EgtMdbGetMachiningFromUUID_64(sMuuid, psName) End If If bOk Then sName = Marshal.PtrToStringUni(psName) EgtFreeMemory(psName) Else sName = String.Empty End If Return bOk End Function Private Function EgtMdbSetCurrMachining_32(sName As String) As Boolean End Function Private Function EgtMdbSetCurrMachining_64(sName As String) As Boolean End Function Public Function EgtMdbSetCurrMachining(sName As String) As Boolean If IntPtr.Size = 4 Then Return EgtMdbSetCurrMachining_32(sName) Else Return EgtMdbSetCurrMachining_64(sName) End If End Function Private Function EgtMdbSaveCurrMachining_32() As Boolean End Function Private Function EgtMdbSaveCurrMachining_64() As Boolean End Function Public Function EgtMdbSaveCurrMachining() As Boolean If IntPtr.Size = 4 Then Return EgtMdbSaveCurrMachining_32() Else Return EgtMdbSaveCurrMachining_64() End If End Function Private Function EgtMdbIsCurrMachiningModified_32() As Boolean End Function Private Function EgtMdbIsCurrMachiningModified_64() As Boolean End Function Public Function EgtMdbIsCurrMachiningModified() As Boolean If IntPtr.Size = 4 Then Return EgtMdbIsCurrMachiningModified_32() Else Return EgtMdbIsCurrMachiningModified_64() End If End Function Private Function EgtMdbSetCurrMachiningParamBool_32(nType As Integer, nVal As Boolean) As Boolean End Function Private Function EgtMdbSetCurrMachiningParamBool_64(nType As Integer, nVal As Boolean) As Boolean End Function Public Function EgtMdbSetCurrMachiningParam(nType As Integer, nVal As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtMdbSetCurrMachiningParamBool_32(nType, nVal) Else Return EgtMdbSetCurrMachiningParamBool_64(nType, nVal) End If End Function Private Function EgtMdbSetCurrMachiningParamInt_32(nType As Integer, nVal As Integer) As Boolean End Function Private Function EgtMdbSetCurrMachiningParamInt_64(nType As Integer, nVal As Integer) As Boolean End Function Public Function EgtMdbSetCurrMachiningParam(nType As Integer, nVal As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtMdbSetCurrMachiningParamInt_32(nType, nVal) Else Return EgtMdbSetCurrMachiningParamInt_64(nType, nVal) End If End Function Private Function EgtMdbSetCurrMachiningParamDouble_32(nType As Integer, dVal As Double) As Boolean End Function Private Function EgtMdbSetCurrMachiningParamDouble_64(nType As Integer, dVal As Double) As Boolean End Function Public Function EgtMdbSetCurrMachiningParam(nType As Integer, dVal As Double) As Boolean If IntPtr.Size = 4 Then Return EgtMdbSetCurrMachiningParamDouble_32(nType, dVal) Else Return EgtMdbSetCurrMachiningParamDouble_64(nType, dVal) End If End Function Private Function EgtMdbSetCurrMachiningParamString_32(nType As Integer, sVal As String) As Boolean End Function Private Function EgtMdbSetCurrMachiningParamString_64(nType As Integer, sVal As String) As Boolean End Function Public Function EgtMdbSetCurrMachiningParam(nType As Integer, sVal As String) As Boolean If IntPtr.Size = 4 Then Return EgtMdbSetCurrMachiningParamString_32(nType, sVal) Else Return EgtMdbSetCurrMachiningParamString_64(nType, sVal) End If End Function Private Function EgtMdbGetCurrMachiningParamBool_32(nType As Integer, ByRef bVal As Boolean) As Boolean End Function Private Function EgtMdbGetCurrMachiningParamBool_64(nType As Integer, ByRef bVal As Boolean) As Boolean End Function Public Function EgtMdbGetCurrMachiningParam(nType As Integer, ByRef bVal As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtMdbGetCurrMachiningParamBool_32(nType, bVal) Else Return EgtMdbGetCurrMachiningParamBool_64(nType, bVal) End If End Function Private Function EgtMdbGetCurrMachiningParamInt_32(nType As Integer, ByRef nVal As Integer) As Boolean End Function Private Function EgtMdbGetCurrMachiningParamInt_64(nType As Integer, ByRef nVal As Integer) As Boolean End Function Public Function EgtMdbGetCurrMachiningParam(nType As Integer, ByRef nVal As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtMdbGetCurrMachiningParamInt_32(nType, nVal) Else Return EgtMdbGetCurrMachiningParamInt_64(nType, nVal) End If End Function Private Function EgtMdbGetCurrMachiningParamDouble_32(nType As Integer, ByRef dVal As Double) As Boolean End Function Private Function EgtMdbGetCurrMachiningParamDouble_64(nType As Integer, ByRef dVal As Double) As Boolean End Function Public Function EgtMdbGetCurrMachiningParam(nType As Integer, ByRef dVal As Double) As Boolean If IntPtr.Size = 4 Then Return EgtMdbGetCurrMachiningParamDouble_32(nType, dVal) Else Return EgtMdbGetCurrMachiningParamDouble_64(nType, dVal) End If End Function Private Function EgtMdbGetCurrMachiningParamString_32(nType As Integer, ByRef psVal As IntPtr) As Boolean End Function Private Function EgtMdbGetCurrMachiningParamString_64(nType As Integer, ByRef psVal As IntPtr) As Boolean End Function Public Function EgtMdbGetCurrMachiningParam(nType As Integer, ByRef sVal As String) As Boolean Dim psVal As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtMdbGetCurrMachiningParamString_32(nType, psVal) Else bOk = EgtMdbGetCurrMachiningParamString_64(nType, psVal) End If If bOk Then sVal = Marshal.PtrToStringUni(psVal) EgtFreeMemory(psVal) Else sVal = String.Empty End If Return bOk End Function Private Function EgtMdbSetGeneralParamBool_32(nType As Integer, bVal As Boolean) As Boolean End Function Private Function EgtMdbSetGeneralParamBool_64(nType As Integer, bVal As Boolean) As Boolean End Function Public Function EgtMdbSetGeneralParam(nType As Integer, bVal As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtMdbSetGeneralParamBool_32(nType, bVal) Else Return EgtMdbSetGeneralParamBool_64(nType, bVal) End If End Function Private Function EgtMdbSetGeneralParamInt_32(nType As Integer, nVal As Integer) As Boolean End Function Private Function EgtMdbSetGeneralParamInt_64(nType As Integer, nVal As Integer) As Boolean End Function Public Function EgtMdbSetGeneralParam(nType As Integer, nVal As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtMdbSetGeneralParamInt_32(nType, nVal) Else Return EgtMdbSetGeneralParamInt_64(nType, nVal) End If End Function Private Function EgtMdbSetGeneralParamDouble_32(nType As Integer, dVal As Double) As Boolean End Function Private Function EgtMdbSetGeneralParamDouble_64(nType As Integer, dVal As Double) As Boolean End Function Public Function EgtMdbSetGeneralParam(nType As Integer, dVal As Double) As Boolean If IntPtr.Size = 4 Then Return EgtMdbSetGeneralParamDouble_32(nType, dVal) Else Return EgtMdbSetGeneralParamDouble_64(nType, dVal) End If End Function Private Function EgtMdbGetGeneralParamBool_32(nType As Integer, ByRef bVal As Boolean) As Boolean End Function Private Function EgtMdbGetGeneralParamBool_64(nType As Integer, ByRef bVal As Boolean) As Boolean End Function Public Function EgtMdbGetGeneralParam(nType As Integer, ByRef bVal As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtMdbGetGeneralParamBool_32(nType, bVal) Else Return EgtMdbGetGeneralParamBool_64(nType, bVal) End If End Function Private Function EgtMdbGetGeneralParamInt_32(nType As Integer, ByRef nVal As Integer) As Boolean End Function Private Function EgtMdbGetGeneralParamInt_64(nType As Integer, ByRef nVal As Integer) As Boolean End Function Public Function EgtMdbGetGeneralParam(nType As Integer, ByRef nVal As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtMdbGetGeneralParamInt_32(nType, nVal) Else Return EgtMdbGetGeneralParamInt_64(nType, nVal) End If End Function Private Function EgtMdbGetGeneralParamDouble_32(nType As Integer, ByRef dVal As Double) As Boolean End Function Private Function EgtMdbGetGeneralParamDouble_64(nType As Integer, ByRef dVal As Double) As Boolean End Function Public Function EgtMdbGetGeneralParam(nType As Integer, ByRef dVal As Double) As Boolean If IntPtr.Size = 4 Then Return EgtMdbGetGeneralParamDouble_32(nType, dVal) Else Return EgtMdbGetGeneralParamDouble_64(nType, dVal) End If End Function Private Function EgtMdbReload_32() As Boolean End Function Private Function EgtMdbReload_64() As Boolean End Function Public Function EgtMdbReload() As Boolean If IntPtr.Size = 4 Then Return EgtMdbReload_32() Else Return EgtMdbReload_64() End If End Function Private Function EgtMdbSave_32() As Boolean End Function Private Function EgtMdbSave_64() As Boolean End Function Public Function EgtMdbSave() As Boolean If IntPtr.Size = 4 Then Return EgtMdbSave_32() Else Return EgtMdbSave_64() End If End Function Private Function EgtMdbGetMachiningDir_32(ByRef psMachiningDir As IntPtr) As Boolean End Function Private Function EgtMdbGetMachiningDir_64(ByRef psMachiningDir As IntPtr) As Boolean End Function Public Function EgtMdbGetMachiningDir(ByRef sMachiningDir As String) As Boolean Dim psMachiningDir As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtMdbGetMachiningDir_32(psMachiningDir) Else bOk = EgtMdbGetMachiningDir_64(psMachiningDir) End If If bOk Then sMachiningDir = Marshal.PtrToStringUni(psMachiningDir) EgtFreeMemory(psMachiningDir) Else sMachiningDir = String.Empty End If Return bOk End Function ' Operations Private Function EgtGetFirstOperation_32() As Integer End Function Private Function EgtGetFirstOperation_64() As Integer End Function Public Function EgtGetFirstOperation() As Integer If IntPtr.Size = 4 Then Return EgtGetFirstOperation_32() Else Return EgtGetFirstOperation_64() End If End Function Private Function EgtGetNextOperation_32(nId As Integer) As Integer End Function Private Function EgtGetNextOperation_64(nId As Integer) As Integer End Function Public Function EgtGetNextOperation(nId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetNextOperation_32(nId) Else Return EgtGetNextOperation_64(nId) End If End Function Private Function EgtGetLastOperation_32() As Integer End Function Private Function EgtGetLastOperation_64() As Integer End Function Public Function EgtGetLastOperation() As Integer If IntPtr.Size = 4 Then Return EgtGetLastOperation_32() Else Return EgtGetLastOperation_64() End If End Function Private Function EgtGetPrevOperation_32(nId As Integer) As Integer End Function Private Function EgtGetPrevOperation_64(nId As Integer) As Integer End Function Public Function EgtGetPrevOperation(nId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetPrevOperation_32(nId) Else Return EgtGetPrevOperation_64(nId) End If End Function Private Function EgtGetFirstActiveOperation_32() As Integer End Function Private Function EgtGetFirstActiveOperation_64() As Integer End Function Public Function EgtGetFirstActiveOperation() As Integer If IntPtr.Size = 4 Then Return EgtGetFirstActiveOperation_32() Else Return EgtGetFirstActiveOperation_64() End If End Function Private Function EgtGetNextActiveOperation_32(nId As Integer) As Integer End Function Private Function EgtGetNextActiveOperation_64(nId As Integer) As Integer End Function Public Function EgtGetNextActiveOperation(nId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetNextActiveOperation_32(nId) Else Return EgtGetNextActiveOperation_64(nId) End If End Function Private Function EgtGetLastActiveOperation_32() As Integer End Function Private Function EgtGetLastActiveOperation_64() As Integer End Function Public Function EgtGetLastActiveOperation() As Integer If IntPtr.Size = 4 Then Return EgtGetLastActiveOperation_32() Else Return EgtGetLastActiveOperation_64() End If End Function Private Function EgtGetPrevActiveOperation_32(nId As Integer) As Integer End Function Private Function EgtGetPrevActiveOperation_64(nId As Integer) As Integer End Function Public Function EgtGetPrevActiveOperation(nId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetPrevActiveOperation_32(nId) Else Return EgtGetPrevActiveOperation_64(nId) End If End Function Private Function EgtGetOperationType_32(nId As Integer) As Integer End Function Private Function EgtGetOperationType_64(nId As Integer) As Integer End Function Public Function EgtGetOperationType(nId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetOperationType_32(nId) Else Return EgtGetOperationType_64(nId) End If End Function Private Function EgtGetOperationPhase_32(nId As Integer) As Integer End Function Private Function EgtGetOperationPhase_64(nId As Integer) As Integer End Function Public Function EgtGetOperationPhase(nId As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetOperationPhase_32(nId) Else Return EgtGetOperationPhase_64(nId) End If End Function Private Function EgtSetOperationName_32(nId As Integer, sName As String) As Boolean End Function Private Function EgtSetOperationName_64(nId As Integer, sName As String) As Boolean End Function Public Function EgtSetOperationName(nId As Integer, sName As String) As Boolean If IntPtr.Size = 4 Then Return EgtSetOperationName_32(nId, sName) Else Return EgtSetOperationName_64(nId, sName) End If End Function Private Function EgtGetOperationName_32(nId As Integer, ByRef psName As IntPtr) As Boolean End Function Private Function EgtGetOperationName_64(nId As Integer, ByRef psName As IntPtr) As Boolean End Function Public Function EgtGetOperationName(nId As Integer, ByRef sName As String) As Boolean Dim psName As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetOperationName_32(nId, psName) Else bOk = EgtGetOperationName_64(nId, psName) End If If bOk Then sName = Marshal.PtrToStringUni(psName) EgtFreeMemory(psName) Else sName = String.Empty End If Return bOk End Function Private Function EgtGetOperationId_32(sName As String) As Integer End Function Private Function EgtGetOperationId_64(sName As String) As Integer End Function Public Function EgtGetOperationId(sName As String) As Integer If IntPtr.Size = 4 Then Return EgtGetOperationId_32(sName) Else Return EgtGetOperationId_64(sName) End If End Function Private Function EgtIsOperationEmpty_32(nId As Integer) As Boolean End Function Private Function EgtIsOperationEmpty_64(nId As Integer) As Boolean End Function Public Function EgtIsOperationEmpty(nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtIsOperationEmpty_32(nId) Else Return EgtIsOperationEmpty_64(nId) End If End Function Private Function EgtRemoveOperation_32(nId As Integer) As Boolean End Function Private Function EgtRemoveOperation_64(nId As Integer) As Boolean End Function Public Function EgtRemoveOperation(nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtRemoveOperation_32(nId) Else Return EgtRemoveOperation_64(nId) End If End Function Private Function EgtRemoveAllPhaseOperations_32(nPhase As Integer) As Boolean End Function Private Function EgtRemoveAllPhaseOperations_64(nPhase As Integer) As Boolean End Function Public Function EgtRemoveAllPhaseOperations(nPhase As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtRemoveAllPhaseOperations_32(nPhase) Else Return EgtRemoveAllPhaseOperations_64(nPhase) End If End Function Private Function EgtRemoveAllOperations_32() As Boolean End Function Private Function EgtRemoveAllOperations_64() As Boolean End Function Public Function EgtRemoveAllOperations() As Boolean If IntPtr.Size = 4 Then Return EgtRemoveAllOperations_32() Else Return EgtRemoveAllOperations_64() End If End Function Private Function EgtSetOperationMode_32(nId As Integer, bActive As Boolean) As Boolean End Function Private Function EgtSetOperationMode_64(nId As Integer, bActive As Boolean) As Boolean End Function Public Function EgtSetOperationMode(nId As Integer, bActive As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtSetOperationMode_32(nId, bActive) Else Return EgtSetOperationMode_64(nId, bActive) End If End Function Private Function EgtGetOperationMode_32(nId As Integer) As Boolean End Function Private Function EgtGetOperationMode_64(nId As Integer) As Boolean End Function Public Function EgtGetOperationMode(nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetOperationMode_32(nId) Else Return EgtGetOperationMode_64(nId) End If End Function Private Function EgtSetAllOperationsMode_32(bActive As Boolean) As Boolean End Function Private Function EgtSetAllOperationsMode_64(bActive As Boolean) As Boolean End Function Public Function EgtSetAllOperationsMode(bActive As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtSetAllOperationsMode_32(bActive) Else Return EgtSetAllOperationsMode_64(bActive) End If End Function Private Function EgtSetOperationStatus_32(nId As Integer, bShow As Boolean) As Boolean End Function Private Function EgtSetOperationStatus_64(nId As Integer, bShow As Boolean) As Boolean End Function Public Function EgtSetOperationStatus(nId As Integer, bShow As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtSetOperationStatus_32(nId, bShow) Else Return EgtSetOperationStatus_64(nId, bShow) End If End Function Private Function EgtGetOperationStatus_32(nId As Integer) As Boolean End Function Private Function EgtGetOperationStatus_64(nId As Integer) As Boolean End Function Public Function EgtGetOperationStatus(nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetOperationStatus_32(nId) Else Return EgtGetOperationStatus_64(nId) End If End Function Private Function EgtSetAllOperationsStatus_32(bShow As Boolean) As Boolean End Function Private Function EgtSetAllOperationsStatus_64(bShow As Boolean) As Boolean End Function Public Function EgtSetAllOperationsStatus(bShow As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtSetAllOperationsStatus_32(bShow) Else Return EgtSetAllOperationsStatus_64(bShow) End If End Function Private Function EgtChangeOperationPhase_32(nId As Integer, nNewPhase As Integer) As Boolean End Function Private Function EgtChangeOperationPhase_64(nId As Integer, nNewPhase As Integer) As Boolean End Function Public Function EgtChangeOperationPhase(nId As Integer, nNewPhase As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtChangeOperationPhase_32(nId, nNewPhase) Else Return EgtChangeOperationPhase_64(nId, nNewPhase) End If End Function Private Function EgtGetPhaseLastOperation_32(nPhase As Integer) As Integer End Function Private Function EgtGetPhaseLastOperation_64(nPhase As Integer) As Integer End Function Public Function EgtGetPhaseLastOperation(nPhase As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetPhaseLastOperation_32(nPhase) Else Return EgtGetPhaseLastOperation_64(nPhase) End If End Function Private Function EgtRemoveOperationHome_32(nId As Integer) As Boolean End Function Private Function EgtRemoveOperationHome_64(nId As Integer) As Boolean End Function Public Function EgtRemoveOperationHome(nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtRemoveOperationHome_32(nId) Else Return EgtRemoveOperationHome_64(nId) End If End Function ' Dispositions Private Function EgtGetPhaseDisposition_32(nPhase As Integer) As Integer End Function Private Function EgtGetPhaseDisposition_64(nPhase As Integer) As Integer End Function Public Function EgtGetPhaseDisposition(nPhase As Integer) As Integer If IntPtr.Size = 4 Then Return EgtGetPhaseDisposition_32(nPhase) Else Return EgtGetPhaseDisposition_64(nPhase) End If End Function Private Function EgtSpecialApplyDisposition_32(nId As Integer, bRecalc As Boolean) As Boolean End Function Private Function EgtSpecialApplyDisposition_64(nId As Integer, bRecalc As Boolean) As Boolean End Function Public Function EgtSpecialApplyDisposition(nId As Integer, bRecalc As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtSpecialApplyDisposition_32(nId, bRecalc) Else Return EgtSpecialApplyDisposition_64(nId, bRecalc) End If End Function Private Function EgtSpecialUpdateDisposition_32(nId As Integer) As Boolean End Function Private Function EgtSpecialUpdateDisposition_64(nId As Integer) As Boolean End Function Public Function EgtSpecialUpdateDisposition(nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSpecialUpdateDisposition_32(nId) Else Return EgtSpecialUpdateDisposition_64(nId) End If End Function ' Machinings Private Function EgtAddMachining_32(sName As String, sMachining As String) As Integer End Function Private Function EgtAddMachining_64(sName As String, sMachining As String) As Integer End Function Public Function EgtAddMachining(sName As String, sMachining As String) As Integer If IntPtr.Size = 4 Then Return EgtAddMachining_32(sName, sMachining) Else Return EgtAddMachining_64(sName, sMachining) End If End Function Private Function EgtCreateMachining_32(sName As String, nType As Integer, sTool As String) As Integer End Function Private Function EgtCreateMachining_64(sName As String, nType As Integer, sTool As String) As Integer End Function Public Function EgtCreateMachining(sName As String, nType As Integer, sTool As String) As Integer If IntPtr.Size = 4 Then Return EgtCreateMachining_32(sName, nType, sTool) Else Return EgtCreateMachining_64(sName, nType, sTool) End If End Function Private Function EgtCopyMachining_32(sName As String, sSouName As String) As Integer End Function Private Function EgtCopyMachining_64(sName As String, sSouName As String) As Integer End Function Public Function EgtCopyMachining(sName As String, sSouName As String) As Integer If IntPtr.Size = 4 Then Return EgtCopyMachining_32(sName, sSouName) Else Return EgtCopyMachining_64(sName, sSouName) End If End Function Private Function EgtSetCurrMachining_32(nId As Integer) As Boolean End Function Private Function EgtSetCurrMachining_64(nId As Integer) As Boolean End Function Public Function EgtSetCurrMachining(nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSetCurrMachining_32(nId) Else Return EgtSetCurrMachining_64(nId) End If End Function Private Function EgtResetCurrMachining_32() As Boolean End Function Private Function EgtResetCurrMachining_64() As Boolean End Function Public Function EgtResetCurrMachining() As Boolean If IntPtr.Size = 4 Then Return EgtResetCurrMachining_32() Else Return EgtResetCurrMachining_64() End If End Function Private Function EgtGetCurrMachining_32() As Integer End Function Private Function EgtGetCurrMachining_64() As Integer End Function Public Function EgtGetCurrMachining() As Integer If IntPtr.Size = 4 Then Return EgtGetCurrMachining_32() Else Return EgtGetCurrMachining_64() End If End Function Private Function EgtSetMachiningParamBool_32(nType As Integer, nVal As Boolean) As Boolean End Function Private Function EgtSetMachiningParamBool_64(nType As Integer, nVal As Boolean) As Boolean End Function Public Function EgtSetMachiningParam(nType As Integer, nVal As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtSetMachiningParamBool_32(nType, nVal) Else Return EgtSetMachiningParamBool_64(nType, nVal) End If End Function Private Function EgtSetMachiningParamInt_32(nType As Integer, nVal As Integer) As Boolean End Function Private Function EgtSetMachiningParamInt_64(nType As Integer, nVal As Integer) As Boolean End Function Public Function EgtSetMachiningParam(nType As Integer, nVal As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSetMachiningParamInt_32(nType, nVal) Else Return EgtSetMachiningParamInt_64(nType, nVal) End If End Function Private Function EgtSetMachiningParamDouble_32(nType As Integer, dVal As Double) As Boolean End Function Private Function EgtSetMachiningParamDouble_64(nType As Integer, dVal As Double) As Boolean End Function Public Function EgtSetMachiningParam(nType As Integer, 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 Private Function EgtSetMachiningParamString_32(nType As Integer, sVal As String) As Boolean End Function Private Function EgtSetMachiningParamString_64(nType As Integer, sVal As String) As Boolean End Function Public Function EgtSetMachiningParam(nType As Integer, sVal As String) As Boolean If IntPtr.Size = 4 Then Return EgtSetMachiningParamString_32(nType, sVal) Else Return EgtSetMachiningParamString_64(nType, sVal) End If End Function Private Function EgtSetMachiningGeometry_32(nNumId As Integer, nId() As Integer, nSub() As Integer) As Boolean End Function Private Function EgtSetMachiningGeometry_64(nNumId As Integer, nId() As Integer, nSub() As Integer) As Boolean End Function Public Function EgtSetMachiningGeometry(nId() As Integer, nSub() As Integer) As Boolean If nId.Length() <> nSub.Length() Then Return False If IntPtr.Size = 4 Then Return EgtSetMachiningGeometry_32(nId.Length(), nId, nSub) Else Return EgtSetMachiningGeometry_64(nId.Length(), nId, nSub) End If End Function Public Function EgtSetMachiningGeometry(nId() As Integer) As Boolean Dim nSub(nId.Length() - 1) As Integer For I As Integer = 0 To nId.Length() - 1 nSub(I) = -1 Next If IntPtr.Size = 4 Then Return EgtSetMachiningGeometry_32(nId.Length(), nId, nSub) Else Return EgtSetMachiningGeometry_64(nId.Length(), nId, nSub) End If End Function Private Function EgtPreviewMachining_32(bRecalc As Boolean) As Boolean End Function Private Function EgtPreviewMachining_64(bRecalc As Boolean) As Boolean End Function Public Function EgtPreviewMachining(bRecalc As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtPreviewMachining_32(bRecalc) Else Return EgtPreviewMachining_64(bRecalc) End If End Function Private Function EgtApplyMachining_32(bRecalc As Boolean) As Boolean End Function Private Function EgtApplyMachining_64(bRecalc As Boolean) As Boolean End Function Public Function EgtApplyMachining(bRecalc As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtApplyMachining_32(bRecalc) Else Return EgtApplyMachining_64(bRecalc) End If End Function Private Function EgtUpdateMachining_32() As Boolean End Function Private Function EgtUpdateMachining_64() As Boolean End Function Public Function EgtUpdateMachining() As Boolean If IntPtr.Size = 4 Then Return EgtUpdateMachining_32() Else Return EgtUpdateMachining_64() End If End Function Private Function EgtPreparePreviewMachiningTool_32() As Boolean End Function Private Function EgtPreparePreviewMachiningTool_64() As Boolean End Function Public Function EgtPreparePreviewMachiningTool() As Boolean If IntPtr.Size = 4 Then Return EgtPreparePreviewMachiningTool_32() Else Return EgtPreparePreviewMachiningTool_64() End If End Function Private Function EgtRemovePreviewMachiningTool_32() As Boolean End Function Private Function EgtRemovePreviewMachiningTool_64() As Boolean End Function Public Function EgtRemovePreviewMachiningTool() As Boolean If IntPtr.Size = 4 Then Return EgtRemovePreviewMachiningTool_32() Else Return EgtRemovePreviewMachiningTool_64() End If End Function Private Function EgtPreviewMachiningTool_32(nEntId As Integer, nFlag As Integer) As Integer End Function Private Function EgtPreviewMachiningTool_64(nEntId As Integer, nFlag As Integer) As Integer End Function Public Function EgtPreviewMachiningTool(nEntId As Integer, nFlag As Integer) As Integer If IntPtr.Size = 4 Then Return EgtPreviewMachiningTool_32(nEntId, nFlag) Else Return EgtPreviewMachiningTool_64(nEntId, nFlag) End If End Function Private Function EgtGetMachiningParamBool_32(nType As Integer, ByRef bVal As Boolean) As Boolean End Function Private Function EgtGetMachiningParamBool_64(nType As Integer, ByRef bVal As Boolean) As Boolean End Function Public Function EgtGetMachiningParam(nType As Integer, ByRef bVal As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtGetMachiningParamBool_32(nType, bVal) Else Return EgtGetMachiningParamBool_64(nType, bVal) End If End Function Private Function EgtGetMachiningParamInt_32(nType As Integer, ByRef nVal As Integer) As Boolean End Function Private Function EgtGetMachiningParamInt_64(nType As Integer, ByRef nVal As Integer) As Boolean End Function Public Function EgtGetMachiningParam(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 Private Function EgtGetMachiningParamDouble_32(nType As Integer, ByRef dVal As Double) As Boolean End Function Private Function EgtGetMachiningParamDouble_64(nType As Integer, ByRef dVal As Double) As Boolean End Function Public Function EgtGetMachiningParam(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 Private Function EgtGetMachiningParamString_32(nType As Integer, ByRef psVal As IntPtr) As Boolean End Function Private Function EgtGetMachiningParamString_64(nType As Integer, ByRef psVal As IntPtr) As Boolean End Function Public Function EgtGetMachiningParam(nType As Integer, ByRef sVal As String) As Boolean Dim psVal As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetMachiningParamString_32(nType, psVal) Else bOk = EgtGetMachiningParamString_64(nType, psVal) End If If bOk Then sVal = Marshal.PtrToStringUni(psVal) EgtFreeMemory(psVal) Else sVal = String.Empty End If Return bOk End Function Private Function EgtGetMachiningGeometry_32(nInd As Integer, ByRef nId As Integer, ByRef nSub As Integer) As Boolean End Function Private Function EgtGetMachiningGeometry_64(nInd As Integer, ByRef nId As Integer, ByRef nSub As Integer) As Boolean End Function Public Function EgtGetMachiningGeometry(nInd As Integer, ByRef nId As Integer, ByRef nSub As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetMachiningGeometry_32(nInd, nId, nSub) Else Return EgtGetMachiningGeometry_64(nInd, nId, nSub) End If End Function Private Function EgtIsMachiningEmpty_32() As Boolean End Function 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 Private Function EgtApplyAllMachinings_32(bRecalc As Boolean, bStopOnFirstErr As Boolean, ByRef psErrList As IntPtr) As Boolean End Function Private Function EgtApplyAllMachinings_64(bRecalc As Boolean, bStopOnFirstErr As Boolean, ByRef psErrList As IntPtr) As Boolean End Function Public Function EgtApplyAllMachinings(bRecalc As Boolean, bStopOnFirstErr As Boolean, ByRef sErrList As String) As Boolean Dim psErrList As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtApplyAllMachinings_32(bRecalc, bStopOnFirstErr, psErrList) Else bOk = EgtApplyAllMachinings_64(bRecalc, bStopOnFirstErr, psErrList) End If If Not IsNothing(psErrList) Then sErrList = Marshal.PtrToStringUni(psErrList) EgtFreeMemory(psErrList) Else sErrList = String.Empty End If Return bOk End Function Private Function EgtUpdateAllMachinings_32(bStopOnFirstErr As Boolean, ByRef psErrList As IntPtr) As Boolean End Function Private Function EgtUpdateAllMachinings_64(bStopOnFirstErr As Boolean, ByRef psErrList As IntPtr) As Boolean End Function Public Function EgtUpdateAllMachinings(bStopOnFirstErr As Boolean, ByRef sErrList As String) As Boolean Dim psErrList As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtUpdateAllMachinings_32(bStopOnFirstErr, psErrList) Else bOk = EgtUpdateAllMachinings_64(bStopOnFirstErr, psErrList) End If If Not IsNothing(psErrList) Then sErrList = Marshal.PtrToStringUni(psErrList) EgtFreeMemory(psErrList) Else sErrList = String.Empty End If Return bOk End Function ' Simulation Private Function EgtSimInit_32() As Boolean End Function Private Function EgtSimInit_64() As Boolean End Function Public Function EgtSimInit() As Boolean If IntPtr.Size = 4 Then Return EgtSimInit_32() Else Return EgtSimInit_64() End If End Function Private Function EgtSimStart_32(bFirst As Boolean) As Boolean End Function Private Function EgtSimStart_64(bFirst As Boolean) As Boolean End Function Public Function EgtSimStart(Optional bFirst As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtSimStart_32(bFirst) Else Return EgtSimStart_64(bFirst) End If End Function Private Function EgtSimMove_32(ByRef nStatus As Integer) As Boolean End Function Private Function EgtSimMove_64(ByRef nStatus As Integer) As Boolean End Function Public Function EgtSimMove(ByRef nStatus As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSimMove_32(nStatus) Else Return EgtSimMove_64(nStatus) End If End Function Private Function EgtSimHome_32() As Boolean End Function Private Function EgtSimHome_64() As Boolean End Function Public Function EgtSimHome() As Boolean If IntPtr.Size = 4 Then Return EgtSimHome_32() Else Return EgtSimHome_64() End If End Function Private Function EgtSimSetStep_32(dStep As Double) As Boolean End Function Private Function EgtSimSetStep_64(dStep As Double) As Boolean End Function Public Function EgtSimSetStep(dStep As Double) As Boolean If IntPtr.Size = 4 Then Return EgtSimSetStep_32(dStep) Else Return EgtSimSetStep_64(dStep) End If End Function Private Function EgtSimSetUiStatus_32(nUiStatus As Integer) As Boolean End Function Private Function EgtSimSetUiStatus_64(nUiStatus As Integer) As Boolean End Function Public Function EgtSimSetUiStatus(nUiStatus As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSimSetUiStatus_32(nUiStatus) Else Return EgtSimSetUiStatus_64(nUiStatus) End If End Function Private Function EgtSimGetAxisInfoPos_32(nInd As Integer, ByRef psName As IntPtr, ByRef psToken As IntPtr, ByRef bLinear As Boolean, ByRef dVal As Double) As Boolean End Function Private Function EgtSimGetAxisInfoPos_64(nInd As Integer, ByRef psName As IntPtr, ByRef psToken As IntPtr, ByRef bLinear As Boolean, ByRef dVal As Double) As Boolean End Function Public Function EgtSimGetAxisInfoPos(nInd As Integer, ByRef sName As String, ByRef sToken As String, ByRef bLinear As Boolean, ByRef dVal As Double) As Boolean Dim psName As IntPtr Dim psToken As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtSimGetAxisInfoPos_32(nInd, psName, psToken, bLinear, dVal) Else bOk = EgtSimGetAxisInfoPos_64(nInd, psName, psToken, bLinear, dVal) End If If bOk Then sName = Marshal.PtrToStringUni(psName) EgtFreeMemory(psName) sToken = Marshal.PtrToStringUni(psToken) EgtFreeMemory(psToken) Else sName = String.Empty sToken = String.Empty End If Return bOk End Function Private Function EgtSimGetToolInfo_32(ByRef psTool As IntPtr, ByRef dSpeed As Double) As Boolean End Function Private Function EgtSimGetToolInfo_64(ByRef psTool As IntPtr, ByRef dSpeed As Double) As Boolean End Function Public Function EgtSimGetToolInfo(ByRef sTool As String, ByRef dSpeed As Double) As Boolean Dim psTool As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtSimGetToolInfo_32(psTool, dSpeed) Else bOk = EgtSimGetToolInfo_64(psTool, dSpeed) End If If bOk Then sTool = Marshal.PtrToStringUni(psTool) EgtFreeMemory(psTool) Else sTool = String.Empty End If Return bOk End Function Private Function EgtSimGetOperationInfo_32(ByRef psName As IntPtr, ByRef nType As Integer) As Boolean End Function Private Function EgtSimGetOperationInfo_64(ByRef psName As IntPtr, ByRef nType As Integer) As Boolean End Function Public Function EgtSimGetOperationInfo(ByRef sName As String, ByRef nType As Integer) As Boolean Dim psName As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtSimGetOperationInfo_32(psName, nType) Else bOk = EgtSimGetOperationInfo_64(psName, nType) End If If bOk Then sName = Marshal.PtrToStringUni(psName) EgtFreeMemory(psName) Else sName = String.Empty End If Return bOk End Function Private Function EgtSimGetMoveInfo_32(ByRef nGmove As Integer, ByRef dSpeed As Double) As Boolean End Function Private Function EgtSimGetMoveInfo_64(ByRef nGmove As Integer, ByRef dSpeed As Double) As Boolean End Function Public Function EgtSimGetMoveInfo(ByRef nGmove As Integer, ByRef dSpeed As Double) As Boolean If IntPtr.Size = 4 Then Return EgtSimGetMoveInfo_32(nGmove, dSpeed) Else Return EgtSimGetMoveInfo_64(nGmove, dSpeed) End If End Function Private Function EgtSimExit_32() As Boolean End Function Private Function EgtSimExit_64() As Boolean End Function Public Function EgtSimExit() As Boolean If IntPtr.Size = 4 Then Return EgtSimExit_32() Else Return EgtSimExit_64() End If End Function ' Generation & T&L estimation Private Function EgtGenerate_32(sCncFile As String, sInfo As String) As Boolean End Function Private Function EgtGenerate_64(sCncFile As String, sInfo As String) As Boolean End Function Public Function EgtGenerate(sCncFile As String, sInfo As String) As Boolean If IntPtr.Size = 4 Then Return EgtGenerate_32(sCncFile, sInfo) Else Return EgtGenerate_64(sCncFile, sInfo) End If End Function Private Function EgtEstimate_32(sEstFile As String, sInfo As String) As Boolean End Function Private Function EgtEstimate_64(sEstFile As String, sInfo As String) As Boolean End Function Public Function EgtEstimate(sEstFile As String, sInfo As String) As Boolean If IntPtr.Size = 4 Then Return EgtEstimate_32(sEstFile, sInfo) Else Return EgtEstimate_64(sEstFile, sInfo) End If End Function ' Machine Private Function EgtGetBaseId_32(sBase As String) As Integer End Function Private Function EgtGetBaseId_64(sBase As String) As Integer End Function Public Function EgtGetBaseId(sBase As String) As Integer If IntPtr.Size = 4 Then Return EgtGetBaseId_32(sBase) Else Return EgtGetBaseId_64(sBase) End If End Function Private Function EgtGetTableId_32(sTable As String) As Integer End Function Private Function EgtGetTableId_64(sTable As String) As Integer End Function Public Function EgtGetTableId(sTable As String) As Integer If IntPtr.Size = 4 Then Return EgtGetTableId_32(sTable) Else Return EgtGetTableId_64(sTable) End If End Function Private Function EgtGetAxisId_32(sAxis As String) As Integer End Function Private Function EgtGetAxisId_64(sAxis As String) As Integer End Function Public Function EgtGetAxisId(sAxis As String) As Integer If IntPtr.Size = 4 Then Return EgtGetAxisId_32(sAxis) Else Return EgtGetAxisId_64(sAxis) End If End Function Private Function EgtGetHeadId_32(sHead As String) As Integer End Function Private Function EgtGetHeadId_64(sHead As String) As Integer End Function Public Function EgtGetHeadId(sHead As String) As Integer If IntPtr.Size = 4 Then Return EgtGetHeadId_32(sHead) Else Return EgtGetHeadId_64(sHead) End If End Function Private Function EgtGetHeadExitCount_32(sHead As String) As Integer End Function Private Function EgtGetHeadExitCount_64(sHead As String) As Integer End Function Public Function EgtGetHeadExitCount(sHead As String) As Integer If IntPtr.Size = 4 Then Return EgtGetHeadExitCount_32(sHead) Else Return EgtGetHeadExitCount_64(sHead) End If End Function Private Function EgtGetAxisInvert_32(sAxis As String, ByRef bInvert As Boolean) As Boolean End Function Private Function EgtGetAxisInvert_64(sAxis As String, ByRef bInvert As Boolean) As Boolean End Function Public Function EgtGetAxisInvert(sAxis As String, ByRef bInvert As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtGetAxisInvert_32(sAxis, bInvert) Else Return EgtGetAxisInvert_64(sAxis, bInvert) End If End Function Private Function EgtGetAllHeadsNames_32(ByRef psNames As IntPtr) As Boolean End Function Private Function EgtGetAllHeadsNames_64(ByRef psNames As IntPtr) As Boolean End Function Public Function EgtGetAllHeadsNames(ByRef sNames As String) As Boolean Dim psNames As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetAllHeadsNames_32(psNames) Else bOk = EgtGetAllHeadsNames_64(psNames) End If If bOk Then sNames = Marshal.PtrToStringUni(psNames) EgtFreeMemory(psNames) Else sNames = String.Empty End If Return bOk End Function Private Function EgtGetAllTablesNames_32(ByRef psNames As IntPtr) As Boolean End Function Private Function EgtGetAllTablesNames_64(ByRef psNames As IntPtr) As Boolean End Function Public Function EgtGetAllTablesNames(ByRef sNames As String) As Boolean Dim psNames As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetAllTablesNames_32(psNames) Else bOk = EgtGetAllTablesNames_64(psNames) End If If bOk Then sNames = Marshal.PtrToStringUni(psNames) EgtFreeMemory(psNames) Else sNames = String.Empty End If Return bOk End Function ' Machine Calc Private Function EgtSetCalcTool_32(sTool As String, sHead As String, nExit As Integer) As Boolean End Function Private Function EgtSetCalcTool_64(sTool As String, sHead As String, nExit As Integer) As Boolean End Function Public Function EgtSetCalcTool(sTool As String, sHead As String, nExit As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSetCalcTool_32(sTool, sHead, nExit) Else Return EgtSetCalcTool_64(sTool, sHead, nExit) End If End Function Private Function EgtGetCalcTipFromPositions_32(dX As Double, dY As Double, dZ As Double, dAngA As Double, dAngB As Double, bBottom As Boolean, ByRef ptTip As Point3d) As Boolean End Function Private Function EgtGetCalcTipFromPositions_64(dX As Double, dY As Double, dZ As Double, dAngA As Double, dAngB As Double, bBottom As Boolean, ByRef ptTip As Point3d) As Boolean End Function Public Function EgtGetCalcTipFromPositions(dX As Double, dY As Double, dZ As Double, dAngA As Double, dAngB As Double, bBottom As Boolean, ByRef ptTip As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetCalcTipFromPositions_32(dX, dY, dZ, dAngA, dAngB, bBottom, ptTip) Else Return EgtGetCalcTipFromPositions_64(dX, dY, dZ, dAngA, dAngB, bBottom, ptTip) End If End Function Private Function EgtGetCalcToolDirFromAngles_32(dAngA As Double, dAngB As Double, ByRef vtDir As Vector3d) As Boolean End Function Private Function EgtGetCalcToolDirFromAngles_64(dAngA As Double, dAngB As Double, ByRef vtDir As Vector3d) As Boolean End Function Public Function EgtGetCalcToolDirFromAngles(dAngA As Double, dAngB As Double, ByRef vtDir As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetCalcToolDirFromAngles_32(dAngA, dAngB, vtDir) Else Return EgtGetCalcToolDirFromAngles_64(dAngA, dAngB, vtDir) End If End Function Private Function EgtVerifyOutstroke_32(dX As Double, dY As Double, dZ As Double, dAngA As Double, dAngB As Double, ByRef nStat As Integer) As Boolean End Function Private Function EgtVerifyOutstroke_64(dX As Double, dY As Double, dZ As Double, dAngA As Double, dAngB As Double, ByRef nStat As Integer) As Boolean End Function Public Function EgtVerifyOutstroke(dX As Double, dY As Double, dZ As Double, dAngA As Double, dAngB As Double, ByRef nStat As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtVerifyOutstroke_32(dX, dY, dZ, dAngA, dAngB, nStat) Else Return EgtVerifyOutstroke_64(dX, dY, dZ, dAngA, dAngB, nStat) End If End Function Private Function EgtGetOutstrokeInfo_32(ByRef psInfo As IntPtr) As Boolean End Function Private Function EgtGetOutstrokeInfo_64(ByRef psInfo As IntPtr) As Boolean End Function Public Function EgtGetOutstrokeInfo(ByRef sInfo As String) As Boolean Dim psInfo As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetOutstrokeInfo_32(psInfo) Else bOk = EgtGetOutstrokeInfo_64(psInfo) End If If bOk Then sInfo = Marshal.PtrToStringUni(psInfo) EgtFreeMemory(psInfo) Else sInfo = String.Empty End If Return bOk End Function ' Machine Move Private Function EgtSetAxisPos_32(sAxis As String, dVal As Double) As Boolean End Function Private Function EgtSetAxisPos_64(sAxis As String, dVal As Double) As Boolean End Function Public Function EgtSetAxisPos(sAxis As String, dVal As Double) As Boolean If IntPtr.Size = 4 Then Return EgtSetAxisPos_32(sAxis, dVal) Else Return EgtSetAxisPos_64(sAxis, dVal) End If End Function Private Function EgtGetAxisPos_32(sAxis As String, ByRef dVal As Double) As Boolean End Function Private Function EgtGetAxisPos_64(sAxis As String, ByRef dVal As Double) As Boolean End Function Public Function EgtGetAxisPos(sAxis As String, ByRef dVal As Double) As Boolean If IntPtr.Size = 4 Then Return EgtGetAxisPos_32(sAxis, dVal) Else Return EgtGetAxisPos_64(sAxis, dVal) End If End Function Private Function EgtLoadTool_32(sHead As String, nExit As Integer, sTool As String) As Boolean End Function Private Function EgtLoadTool_64(sHead As String, nExit As Integer, sTool As String) As Boolean End Function Public Function EgtLoadTool(sHead As String, nExit As Integer, sTool As String) As Boolean If IntPtr.Size = 4 Then Return EgtLoadTool_32(sHead, nExit, sTool) Else Return EgtLoadTool_64(sHead, nExit, sTool) End If End Function Private Function EgtResetHeadSet_32(sHead As String) As Boolean End Function Private Function EgtResetHeadSet_64(sHead As String) As Boolean End Function Public Function EgtResetHeadSet(sHead As String) As Boolean If IntPtr.Size = 4 Then Return EgtResetHeadSet_32(sHead) Else Return EgtResetHeadSet_64(sHead) End If End Function Private Function EgtSetMachineLook_32(nFlag As Integer) As Boolean End Function Private Function EgtSetMachineLook_64(nFlag As Integer) As Boolean End Function Public Function EgtSetMachineLook(nFlag As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSetMachineLook_32(nFlag) Else Return EgtSetMachineLook_64(nFlag) End If End Function '---------- Scene -------------------------------------------------------------- Private Function EgtInitScene_32(hWnd As IntPtr, nDriver As Integer, b2Buff As Boolean, nColorBits As Integer, nDepthBits As Integer) As Boolean End Function Private Function EgtInitScene_64(hWnd As IntPtr, nDriver As Integer, b2Buff As Boolean, nColorBits As Integer, nDepthBits As Integer) As Boolean End Function Public Function EgtInitScene(hWnd As IntPtr, nDriver As Integer, b2Buff As Boolean, nColorBits As Integer, nDepthBits As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtInitScene_32(hWnd, nDriver, b2Buff, nColorBits, nDepthBits) Else Return EgtInitScene_64(hWnd, nDriver, b2Buff, nColorBits, nDepthBits) End If End Function Private Function EgtGetSceneInfo_32(ByRef psInfo As IntPtr) As Boolean End Function Private Function EgtGetSceneInfo_64(ByRef psInfo As IntPtr) As Boolean End Function Public Function EgtGetSceneInfo(ByRef sInfo As String) As Boolean Dim psInfo As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetSceneInfo_32(psInfo) Else bOk = EgtGetSceneInfo_64(psInfo) End If If bOk Then sInfo = Marshal.PtrToStringUni(psInfo) EgtFreeMemory(psInfo) Else sInfo = String.Empty End If Return bOk End Function Private Function EgtSetBackground_32(ByRef colTop As Color3d, ByRef colBottom As Color3d, bRedraw As Boolean) As Boolean End Function Private Function EgtSetBackground_64(ByRef colTop As Color3d, ByRef colBottom As Color3d, bRedraw As Boolean) As Boolean End Function Public Function EgtSetBackground(ByRef colTop As Color3d, ByRef colBottom As Color3d, Optional bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtSetBackground_32(colTop, colBottom, bRedraw) Else Return EgtSetBackground_64(colTop, colBottom, bRedraw) End If End Function Private Function EgtSetMarkAttribs_32(ByRef colMark As Color3d) As Boolean End Function Private Function EgtSetMarkAttribs_64(ByRef colMark As Color3d) As Boolean End Function Public Function EgtSetMarkAttribs(ByRef colMark As Color3d) As Boolean If IntPtr.Size = 4 Then Return EgtSetMarkAttribs_32(colMark) Else Return EgtSetMarkAttribs_64(colMark) End If End Function Private Function EgtSetSelSurfAttribs_32(ByRef colSelSurf As Color3d) As Boolean End Function Private Function EgtSetSelSurfAttribs_64(ByRef colSelSurf As Color3d) As Boolean End Function Public Function EgtSetSelSurfAttribs(ByRef colSelSurf As Color3d) As Boolean If IntPtr.Size = 4 Then Return EgtSetSelSurfAttribs_32(colSelSurf) Else Return EgtSetSelSurfAttribs_64(colSelSurf) End If End Function Private Function EgtSetGeoLineAttribs_32(ByRef colGl As Color3d) As Boolean End Function Private Function EgtSetGeoLineAttribs_64(ByRef colGl As Color3d) As Boolean End Function Public Function EgtSetGeoLineAttribs(ByRef colGl As Color3d) As Boolean If IntPtr.Size = 4 Then Return EgtSetGeoLineAttribs_32(colGl) Else Return EgtSetGeoLineAttribs_64(colGl) End If End Function Private Function EgtSetGeoTriaAttribs_32(ByRef colGt As Color3d) As Boolean End Function Private Function EgtSetGeoTriaAttribs_64(ByRef colGt As Color3d) As Boolean End Function Public Function EgtSetGeoTriaAttribs(ByRef colGt As Color3d) As Boolean If IntPtr.Size = 4 Then Return EgtSetGeoTriaAttribs_32(colGt) Else Return EgtSetGeoTriaAttribs_64(colGt) End If End Function Private Function EgtSetWinRectAttribs_32(bOutline As Boolean, ByRef colWr As Color3d) As Boolean End Function Private Function EgtSetWinRectAttribs_64(bOutline As Boolean, ByRef colWr As Color3d) As Boolean End Function Public Function EgtSetWinRectAttribs(bOutline As Boolean, ByRef colWr As Color3d) As Boolean If IntPtr.Size = 4 Then Return EgtSetWinRectAttribs_32(bOutline, colWr) Else Return EgtSetWinRectAttribs_64(bOutline, colWr) End If End Function Private Function EgtSetGlobFrameShow_32(bShow As Boolean) As Boolean End Function Private Function EgtSetGlobFrameShow_64(bShow As Boolean) As Boolean End Function Public Function EgtSetGlobFrameShow(bShow As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtSetGlobFrameShow_32(bShow) Else Return EgtSetGlobFrameShow_64(bShow) End If End Function Private Function EgtSetGridShow_32(bShowGrid As Boolean, bShowFrame As Boolean) As Boolean End Function Private Function EgtSetGridShow_64(bShowGrid As Boolean, bShowFrame As Boolean) As Boolean End Function Public Function EgtSetGridShow(bShowGrid As Boolean, bShowFrame As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtSetGridShow_32(bShowGrid, bShowFrame) Else Return EgtSetGridShow_64(bShowGrid, bShowFrame) End If End Function Private Function EgtSetGridGeo_32(dSnapStep As Double, nMinLineSstep As Integer, nMajLineSstep As Integer, nExtSstep As Integer) As Boolean End Function Private Function EgtSetGridGeo_64(dSnapStep As Double, nMinLineSstep As Integer, nMajLineSstep As Integer, nExtSstep As Integer) As Boolean End Function Public Function EgtSetGridGeo(dSnapStep As Double, nMinLineSstep As Integer, nMajLineSstep As Integer, nExtSstep As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSetGridGeo_32(dSnapStep, nMinLineSstep, nMajLineSstep, nExtSstep) Else Return EgtSetGridGeo_64(dSnapStep, nMinLineSstep, nMajLineSstep, nExtSstep) End If End Function Private Function EgtSetGridColor_32(ByRef colMinLine As Color3d, ByRef colMajLine As Color3d) As Boolean End Function Private Function EgtSetGridColor_64(ByRef colMinLine As Color3d, ByRef colMajLine As Color3d) As Boolean End Function Public Function EgtSetGridColor(ByRef colMinLine As Color3d, ByRef colMajLine As Color3d) As Boolean If IntPtr.Size = 4 Then Return EgtSetGridColor_32(colMinLine, colMajLine) Else Return EgtSetGridColor_64(colMinLine, colMajLine) End If End Function Private Function EgtResize_32(nW As Integer, nH As Integer) As Boolean End Function Private Function EgtResize_64(nW As Integer, nH As Integer) As Boolean End Function Public Function EgtResize(nW As Integer, nH As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtResize_32(nW, nH) Else Return EgtResize_64(nW, nH) End If End Function Private Function EgtDraw_32() As Boolean End Function Private Function EgtDraw_64() As Boolean End Function Public Function EgtDraw() As Boolean If IntPtr.Size = 4 Then Return EgtDraw_32() Else Return EgtDraw_64() End If End Function Private Function EgtSelect_32(nWinX As Integer, nWinY As Integer, nSelW As Integer, nSelH As Integer, ByRef nSel As Integer) As Boolean End Function Private Function EgtSelect_64(nWinX As Integer, nWinY As Integer, nSelW As Integer, nSelH As Integer, ByRef nSel As Integer) As Boolean End Function Public Function EgtSelect(Curr As Point, nSelW As Integer, nSelH As Integer, ByRef nSel As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSelect_32(Curr.X, Curr.Y, nSelW, nSelH, nSel) Else Return EgtSelect_64(Curr.X, Curr.Y, nSelW, nSelH, nSel) End If End Function Private Function EgtSetObjFilterForSelWin_32(bZeroDim As Boolean, bCurve As Boolean, bSurf As Boolean, bVolume As Boolean, bExtra As Boolean) As Boolean End Function Private Function EgtSetObjFilterForSelWin_64(bZeroDim As Boolean, bCurve As Boolean, bSurf As Boolean, bVolume As Boolean, bExtra As Boolean) As Boolean End Function Public Function EgtSetObjFilterForSelWin(bZeroDim As Boolean, bCurve As Boolean, bSurf As Boolean, bVolume As Boolean, bExtra As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtSetObjFilterForSelWin_32(bZeroDim, bCurve, bSurf, bVolume, bExtra) Else Return EgtSetObjFilterForSelWin_64(bZeroDim, bCurve, bSurf, bVolume, bExtra) End If End Function Private Function EgtUnselectableAdd_32(nId As Integer) As Boolean End Function Private Function EgtUnselectableAdd_64(nId As Integer) As Boolean End Function Public Function EgtUnselectableAdd(nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtUnselectableAdd_32(nId) Else Return EgtUnselectableAdd_64(nId) End If End Function Private Function EgtUnselectableRemove_32(nId As Integer) As Boolean End Function Private Function EgtUnselectableRemove_64(nId As Integer) As Boolean End Function Public Function EgtUnselectableRemove(nId As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtUnselectableRemove_32(nId) Else Return EgtUnselectableRemove_64(nId) End If End Function Private Function EgtUnselectableClearAll_32() As Boolean End Function Private Function EgtUnselectableClearAll_64() As Boolean End Function Public Function EgtUnselectableClearAll() As Boolean If IntPtr.Size = 4 Then Return EgtUnselectableClearAll_32() Else Return EgtUnselectableClearAll_64() End If End Function Private Function EgtGetFirstObjInSelWin_32() As Integer End Function Private Function EgtGetFirstObjInSelWin_64() As Integer End Function Public Function EgtGetFirstObjInSelWin() As Integer If IntPtr.Size = 4 Then Return EgtGetFirstObjInSelWin_32() Else Return EgtGetFirstObjInSelWin_64() End If End Function Private Function EgtGetNextObjInSelWin_32() As Integer End Function Private Function EgtGetNextObjInSelWin_64() As Integer End Function Public Function EgtGetNextObjInSelWin() As Integer If IntPtr.Size = 4 Then Return EgtGetNextObjInSelWin_32() Else Return EgtGetNextObjInSelWin_64() End If End Function Private Function EgtGetPointFromSelect_32(nSelId As Integer, nWinX As Integer, nWinY As Integer, ByRef ptP As Point3d, ByRef nAux As Integer) As Boolean End Function Private Function EgtGetPointFromSelect_64(nSelId As Integer, nWinX As Integer, nWinY As Integer, ByRef ptP As Point3d, ByRef nAux As Integer) As Boolean End Function Public Function EgtGetPointFromSelect(nSelId As Integer, PtWin As Point, ByRef ptP As Point3d, ByRef nAux As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetPointFromSelect_32(nSelId, PtWin.X, PtWin.Y, ptP, nAux) Else Return EgtGetPointFromSelect_64(nSelId, PtWin.X, PtWin.Y, ptP, nAux) End If End Function Private Function EgtGetGraphicSnapPoint_32(nSnap As Integer, nWinX As Integer, nWinY As Integer, nSelW As Integer, nSelH As Integer, ByRef ptP As Point3d) As Boolean End Function Private Function EgtGetGraphicSnapPoint_64(nSnap As Integer, nWinX As Integer, nWinY As Integer, nSelW As Integer, nSelH As Integer, ByRef ptP As Point3d) As Boolean End Function Public Function EgtGetGraphicSnapPoint(nSnap As Integer, PtWin As Point, nSelW As Integer, nSelH As Integer, ByRef ptP As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetGraphicSnapPoint_32(nSnap, PtWin.X, PtWin.Y, nSelW, nSelH, ptP) Else Return EgtGetGraphicSnapPoint_64(nSnap, PtWin.X, PtWin.Y, nSelW, nSelH, ptP) End If End Function Private Function EgtGetGridSnapPointZ_32(bSketch As Boolean, nWinX As Integer, nWinY As Integer, ByRef ptGrid As Point3d, ByRef ptP As Point3d) As Boolean End Function Private Function EgtGetGridSnapPointZ_64(bSketch As Boolean, nWinX As Integer, nWinY As Integer, ByRef ptGrid As Point3d, ByRef ptP As Point3d) As Boolean End Function Public Function EgtGetGridSnapPointZ(bSketch As Boolean, PtWin As Point, ptGrid As Point3d, ByRef ptP As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetGridSnapPointZ_32(bSketch, PtWin.X, PtWin.Y, ptGrid, ptP) Else Return EgtGetGridSnapPointZ_64(bSketch, PtWin.X, PtWin.Y, ptGrid, ptP) End If End Function Private Function EgtGetLastSnapId_32() As Integer End Function Private Function EgtGetLastSnapId_64() As Integer End Function Public Function EgtGetLastSnapId() As Integer If IntPtr.Size = 4 Then Return EgtGetLastSnapId_32() Else Return EgtGetLastSnapId_64() End If End Function Private Function EgtGetLastSnapDir_32(ByRef VtDir As Vector3d) As Boolean End Function Private Function EgtGetLastSnapDir_64(ByRef VtDir As Vector3d) As Boolean End Function Public Function EgtGetLastSnapDir(ByRef VtDir As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetLastSnapDir_32(VtDir) Else Return EgtGetLastSnapDir_64(VtDir) End If End Function Private Function EgtGetPlaneSnapPoint_32(nWinX As Integer, nWinY As Integer, ByRef VtN As Vector3d, dDist As Double, ByRef ptP As Point3d) As Boolean End Function Private Function EgtGetPlaneSnapPoint_64(nWinX As Integer, nWinY As Integer, ByRef VtN As Vector3d, dDist As Double, ByRef ptP As Point3d) As Boolean End Function Public Function EgtGetPlaneSnapPoint(PtWin As Point, VtN As Vector3d, dDist As Double, ByRef ptP As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetPlaneSnapPoint_32(PtWin.X, PtWin.Y, VtN, dDist, ptP) Else Return EgtGetPlaneSnapPoint_64(PtWin.X, PtWin.Y, VtN, dDist, ptP) End If End Function Private Function EgtSetShowMode_32(nShowMode As SM, bRedraw As Boolean) As Boolean End Function Private Function EgtSetShowMode_64(nShowMode As SM, bRedraw As Boolean) As Boolean End Function Public Function EgtSetShowMode(nShowMode As SM, Optional bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtSetShowMode_32(nShowMode, bRedraw) Else Return EgtSetShowMode_64(nShowMode, bRedraw) End If End Function Private Function EgtGetShowMode_32() As Integer End Function Private Function EgtGetShowMode_64() As Integer End Function Public Function EgtGetShowMode() As Integer If IntPtr.Size = 4 Then Return EgtGetShowMode_32() Else Return EgtGetShowMode_64() End If End Function Private Function EgtSetShowCurveDirection_32(bShow As Boolean, bRedraw As Boolean) As Boolean End Function Private Function EgtSetShowCurveDirection_64(bShow As Boolean, bRedraw As Boolean) As Boolean End Function Public Function EgtSetShowCurveDirection(bShow As Boolean, Optional bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtSetShowCurveDirection_32(bShow, bRedraw) Else Return EgtSetShowCurveDirection_64(bShow, bRedraw) End If End Function Private Function EgtGetShowCurveDirection_32() As Boolean End Function Private Function EgtGetShowCurveDirection_64() As Boolean End Function Public Function EgtGetShowCurveDirection() As Boolean If IntPtr.Size = 4 Then Return EgtGetShowCurveDirection_32() Else Return EgtGetShowCurveDirection_64() End If End Function Private Function EgtSetShowTriaAdv_32(bAdvanced As Boolean, bRedraw As Boolean) As Boolean End Function Private Function EgtSetShowTriaAdv_64(bAdvanced As Boolean, bRedraw As Boolean) As Boolean End Function Public Function EgtSetShowTriaAdv(bAdvanced As Boolean, Optional bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtSetShowTriaAdv_32(bAdvanced, bRedraw) Else Return EgtSetShowTriaAdv_64(bAdvanced, bRedraw) End If End Function Private Function EgtGetShowTriaAdv_32() As Boolean End Function Private Function EgtGetShowTriaAdv_64() As Boolean End Function Public Function EgtGetShowTriaAdv() As Boolean If IntPtr.Size = 4 Then Return EgtGetShowTriaAdv_32() Else Return EgtGetShowTriaAdv_64() End If End Function Private Function EgtSetShowZmap_32(nShowMode As Integer, bRedraw As Boolean) As Boolean End Function Private Function EgtSetShowZmap_64(nShowMode As Integer, bRedraw As Boolean) As Boolean End Function Public Function EgtSetShowZmap(nShowMode As Integer, Optional bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtSetShowZmap_32(nShowMode, bRedraw) Else Return EgtSetShowZmap_64(nShowMode, bRedraw) End If End Function Private Function EgtGetShowZmap_32() As Integer End Function Private Function EgtGetShowZmap_64() As Integer End Function Public Function EgtGetShowZmap() As Integer If IntPtr.Size = 4 Then Return EgtGetShowZmap_32() Else Return EgtGetShowZmap_64() End If End Function Private Function EgtZoom_32(nZoom As ZM, bRedraw As Boolean) As Boolean End Function Private Function EgtZoom_64(nZoom As ZM, bRedraw As Boolean) As Boolean End Function Public Function EgtZoom(nZoom As ZM, Optional bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtZoom_32(nZoom, bRedraw) Else Return EgtZoom_64(nZoom, bRedraw) End If End Function Private Function EgtZoomRadius_32(dRad As Double, bRedraw As Boolean) As Boolean End Function Private Function EgtZoomRadius_64(dRad As Double, bRedraw As Boolean) As Boolean End Function Public Function EgtZoomRadius(dRad As Double, Optional bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtZoomRadius_32(dRad, bRedraw) Else Return EgtZoomRadius_64(dRad, bRedraw) End If End Function Private Function EgtZoomObject_32(nId As Integer, bRedraw As Boolean) As Boolean End Function Private Function EgtZoomObject_64(nId As Integer, bRedraw As Boolean) As Boolean End Function Public Function EgtZoomObject(nId As Integer, Optional bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtZoomObject_32(nId, bRedraw) Else Return EgtZoomObject_64(nId, bRedraw) End If End Function Private Function EgtZoomOnPoint_32(nWinX As Integer, nWinY As Integer, dCoeff As Double, bRedraw As Boolean) As Boolean End Function Private Function EgtZoomOnPoint_64(nWinX As Integer, nWinY As Integer, dCoeff As Double, bRedraw As Boolean) As Boolean End Function Public Function EgtZoomOnPoint(Curr As Point, dCoeff As Double, Optional bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtZoomOnPoint_32(Curr.X, Curr.Y, dCoeff, bRedraw) Else Return EgtZoomOnPoint_64(Curr.X, Curr.Y, dCoeff, bRedraw) End If End Function Private Function EgtSetGeoLine_32(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d, bRedraw As Boolean) As Boolean End Function Private Function EgtSetGeoLine_64(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d, bRedraw As Boolean) As Boolean End Function Public Function EgtSetGeoLine(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d, Optional bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtSetGeoLine_32(ptP1, ptP2, bRedraw) Else Return EgtSetGeoLine_64(ptP1, ptP2, bRedraw) End If End Function Private Function EgtResetGeoLine_32(bRedraw As Boolean) As Boolean End Function Private Function EgtResetGeoLine_64(bRedraw As Boolean) As Boolean End Function Public Function EgtResetGeoLine(Optional bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtResetGeoLine_32(bRedraw) Else Return EgtResetGeoLine_64(bRedraw) End If End Function Private Function EgtSetGeoTria_32(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d, ByRef ptP3 As Point3d, bRedraw As Boolean) As Boolean End Function Private Function EgtSetGeoTria_64(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d, ByRef ptP3 As Point3d, bRedraw As Boolean) As Boolean End Function Public Function EgtSetGeoTria(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d, ByRef ptP3 As Point3d, Optional bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtSetGeoTria_32(ptP1, ptP2, ptP3, bRedraw) Else Return EgtSetGeoTria_64(ptP1, ptP2, ptP3, bRedraw) End If End Function Private Function EgtResetGeoTria_32(bRedraw As Boolean) As Boolean End Function Private Function EgtResetGeoTria_64(bRedraw As Boolean) As Boolean End Function Public Function EgtResetGeoTria(Optional bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtResetGeoTria_32(bRedraw) Else Return EgtResetGeoTria_64(bRedraw) End If End Function Private Function EgtSetWinRect_32(nPrevX As Integer, nPrevY As Integer, nCurrX As Integer, nCurrY As Integer, bRedraw As Boolean) As Boolean End Function Private Function EgtSetWinRect_64(nPrevX As Integer, nPrevY As Integer, nCurrX As Integer, nCurrY As Integer, bRedraw As Boolean) As Boolean End Function Public Function EgtSetWinRect(Prev As Point, Curr As Point, Optional bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtSetWinRect_32(Prev.X, Prev.Y, Curr.X, Curr.Y, bRedraw) Else Return EgtSetWinRect_64(Prev.X, Prev.Y, Curr.X, Curr.Y, bRedraw) End If End Function Private Function EgtResetWinRect_32(bRedraw As Boolean) As Boolean End Function Private Function EgtResetWinRect_64(bRedraw As Boolean) As Boolean End Function Public Function EgtResetWinRect(Optional bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtResetWinRect_32(bRedraw) Else Return EgtResetWinRect_64(bRedraw) End If End Function Private Function EgtZoomWin_32(nPrevX As Integer, nPrevY As Integer, nCurrX As Integer, nCurrY As Integer, bRedraw As Boolean) As Boolean End Function Private Function EgtZoomWin_64(nPrevX As Integer, nPrevY As Integer, nCurrX As Integer, nCurrY As Integer, bRedraw As Boolean) As Boolean End Function Public Function EgtZoomWin(Prev As Point, Curr As Point, Optional bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtZoomWin_32(Prev.X, Prev.Y, Curr.X, Curr.Y, bRedraw) Else Return EgtZoomWin_64(Prev.X, Prev.Y, Curr.X, Curr.Y, bRedraw) End If End Function Private Function EgtSetView_32(nView As VT, bRedraw As Boolean) As Boolean End Function Private Function EgtSetView_64(nView As VT, bRedraw As Boolean) As Boolean End Function Public Function EgtSetView(nView As VT, Optional bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtSetView_32(nView, bRedraw) Else Return EgtSetView_64(nView, bRedraw) End If End Function Private Function EgtSetGenericView_32(dAngVertDeg As Double, dAngHorizDeg As Double, bRedraw As Boolean) As Boolean End Function Private Function EgtSetGenericView_64(dAngVertDeg As Double, dAngHorizDeg As Double, bRedraw As Boolean) As Boolean End Function Public Function EgtSetGenericView(dAngVertDeg As Double, dAngHorizDeg As Double, Optional bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtSetGenericView_32(dAngVertDeg, dAngHorizDeg, bRedraw) Else Return EgtSetGenericView_64(dAngVertDeg, dAngHorizDeg, bRedraw) End If End Function Private Function EgtPanView_32(nPrevX As Integer, nPrevY As Integer, nCurrX As Integer, nCurrY As Integer, bRedraw As Boolean) As Boolean End Function Private Function EgtPanView_64(nPrevX As Integer, nPrevY As Integer, nCurrX As Integer, nCurrY As Integer, bRedraw As Boolean) As Boolean End Function Public Function EgtPanView(Prev As Point, Curr As Point, Optional bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtPanView_32(Prev.X, Prev.Y, Curr.X, Curr.Y, bRedraw) Else Return EgtPanView_64(Prev.X, Prev.Y, Curr.X, Curr.Y, bRedraw) End If End Function Private Function EgtRotateView_32(nPrevX As Integer, nPrevY As Integer, nCurrX As Integer, nCurrY As Integer, bRedraw As Boolean) As Boolean End Function Private Function EgtRotateView_64(nPrevX As Integer, nPrevY As Integer, nCurrX As Integer, nCurrY As Integer, bRedraw As Boolean) As Boolean End Function Public Function EgtRotateView(Prev As Point, Curr As Point, Optional bRedraw As Boolean = True) As Boolean If IntPtr.Size = 4 Then Return EgtRotateView_32(Prev.X, Prev.Y, Curr.X, Curr.Y, bRedraw) Else Return EgtRotateView_64(Prev.X, Prev.Y, Curr.X, Curr.Y, bRedraw) End If End Function Private Function EgtGetView_32(ByRef nDir As Integer) As Boolean End Function Private Function EgtGetView_64(ByRef nDir As Integer) As Boolean End Function Public Function EgtGetView(ByRef nDir As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetView_32(nDir) Else Return EgtGetView_64(nDir) End If End Function Private Function EgtGetGenericView_32(ByRef dAngVertDeg As Double, ByRef dAngHorizDeg As Double) As Boolean End Function Private Function EgtGetGenericView_64(ByRef dAngVertDeg As Double, ByRef dAngHorizDeg As Double) As Boolean End Function Public Function EgtGetGenericView(ByRef dAngVertDeg As Double, ByRef dAngHorizDeg As Double) As Boolean If IntPtr.Size = 4 Then Return EgtGetGenericView_32(dAngVertDeg, dAngHorizDeg) Else Return EgtGetGenericView_64(dAngVertDeg, dAngHorizDeg) End If End Function Private Function EgtGetViewUp_32(ByRef vtUp As Vector3d) As Boolean End Function Private Function EgtGetViewUp_64(ByRef vtUp As Vector3d) As Boolean End Function Public Function EgtGetViewUp(ByRef vtUp As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetViewUp_32(vtUp) Else Return EgtGetViewUp_64(vtUp) End If End Function Private Function EgtProjectPoint_32(ByRef ptP As Point3d, ByRef ptWin As Point3d) As Boolean End Function Private Function EgtProjectPoint_64(ByRef ptP As Point3d, ByRef ptWin As Point3d) As Boolean End Function Public Function EgtProjectPoint(ByRef ptP As Point3d, ByRef ptWin As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtProjectPoint_32(ptP, ptWin) Else Return EgtProjectPoint_64(ptP, ptWin) End If End Function Private Function EgtUnProjectPoint_32(nWinX As Integer, nWinY As Integer, ByRef ptP As Point3d) As Boolean End Function Private Function EgtUnProjectPoint_64(nWinX As Integer, nWinY As Integer, ByRef ptP As Point3d) As Boolean End Function Public Function EgtUnProjectPoint(Curr As Point, ByRef ptP As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtUnProjectPoint_32(Curr.X, Curr.Y, ptP) Else Return EgtUnProjectPoint_64(Curr.X, Curr.Y, ptP) End If End Function Private Function EgtSetTextureMaxLinPixels_32(nMaxLinPix As Integer) As Boolean End Function Private Function EgtSetTextureMaxLinPixels_64(nMaxLinPix As Integer) As Boolean End Function Public Function EgtSetTextureMaxLinPixels(nMaxLinPix As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtSetTextureMaxLinPixels_32(nMaxLinPix) Else Return EgtSetTextureMaxLinPixels_64(nMaxLinPix) End If End Function Private Function EgtLoadTexture_32(sName As String, sFile As String, dMMxPix As Double, dDimX As Double, dDimY As Double, nRepeat As Integer) As Boolean End Function Private Function EgtLoadTexture_64(sName As String, sFile As String, dMMxPix As Double, dDimX As Double, dDimY As Double, nRepeat As Integer) As Boolean End Function Public Function EgtLoadTexture(sName As String, sFile As String, dMMxPix As Double, dDimX As Double, dDimY As Double, nRepeat As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtLoadTexture_32(sName, sFile, dMMxPix, dDimX, dDimY, nRepeat) Else Return EgtLoadTexture_64(sName, sFile, dMMxPix, dDimX, dDimY, nRepeat) End If End Function Private Function EgtUnloadTexture_32(sName As String) As Boolean End Function Private Function EgtUnloadTexture_64(sName As String) As Boolean End Function Public Function EgtUnloadTexture(sName As String) As Boolean If IntPtr.Size = 4 Then Return EgtUnloadTexture_32(sName) Else Return EgtUnloadTexture_64(sName) End If End Function Private Function EgtGetTexturePixels_32(sName As String, ByRef nWidth As Integer, ByRef nHeight As Integer) As Boolean End Function Private Function EgtGetTexturePixels_64(sName As String, ByRef nWidth As Integer, ByRef nHeight As Integer) As Boolean End Function Public Function EgtGetTexturePixels(sName As String, ByRef nWidth As Integer, ByRef nHeight As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetTexturePixels_32(sName, nWidth, nHeight) Else Return EgtGetTexturePixels_64(sName, nWidth, nHeight) End If End Function Private Function EgtGetTextureDimensions_32(sName As String, ByRef dDimX As Double, ByRef dDimY As Double) As Boolean End Function Private Function EgtGetTextureDimensions_64(sName As String, ByRef dDimX As Double, ByRef dDimY As Double) As Boolean End Function Public Function EgtGetTextureDimensions(sName As String, ByRef dDimX As Double, ByRef dDimY As Double) As Boolean If IntPtr.Size = 4 Then Return EgtGetTextureDimensions_32(sName, dDimX, dDimY) Else Return EgtGetTextureDimensions_64(sName, dDimX, dDimY) End If End Function Private Function EgtChangeTextureDimensions_32(sName As String, dDimX As Double, dDimY As Double) As Boolean End Function Private Function EgtChangeTextureDimensions_64(sName As String, dDimX As Double, dDimY As Double) As Boolean End Function Public Function EgtChangeTextureDimensions(sName As String, dDimX As Double, dDimY As Double) As Boolean If IntPtr.Size = 4 Then Return EgtChangeTextureDimensions_32(sName, dDimX, dDimY) Else Return EgtChangeTextureDimensions_64(sName, dDimX, dDimY) End If End Function Private Function EgtGetImage_32(nShowMode As SM, ByRef colTop As Color3d, ByRef colBottom As Color3d, nWidth As Integer, nHeight As Integer, sName As String) As Boolean End Function Private Function EgtGetImage_64(nShowMode As SM, ByRef colTop As Color3d, ByRef colBottom As Color3d, nWidth As Integer, nHeight As Integer, sName As String) As Boolean End Function Public Function EgtGetImage(nShowMode As SM, ByRef colTop As Color3d, ByRef colBottom As Color3d, nWidth As Integer, nHeight As Integer, sName As String) As Boolean If IntPtr.Size = 4 Then Return EgtGetImage_32(nShowMode, colTop, colBottom, nWidth, nHeight, sName) Else Return EgtGetImage_64(nShowMode, colTop, colBottom, nWidth, nHeight, sName) End If End Function '---------- Image -------------------------------------------------------------- Private Function EgtGetImagePixels_32(sFile As String, ByRef nPixelX As Integer, ByRef nPixelY As Integer) As Boolean End Function Private Function EgtGetImagePixels_64(sFile As String, ByRef nPixelX As Integer, ByRef nPixelY As Integer) As Boolean End Function Public Function EgtGetImagePixels(sFile As String, ByRef nPixelX As Integer, ByRef nPixelY As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetImagePixels_32(sFile, nPixelX, nPixelY) Else Return EgtGetImagePixels_64(sFile, nPixelX, nPixelY) End If End Function '---------- Photo -------------------------------------------------------------- Private Function EgtAddPhoto_32(sName As String, sFile As String, ByRef ptOri As Point3d, ByRef ptCen As Point3d, dMMxPix As Double, nParentId As Integer, ByRef ptMin As Point3d, ByRef ptMax As Point3d) As Integer End Function Private Function EgtAddPhoto_64(sName As String, sFile As String, ByRef ptOri As Point3d, ByRef ptCen As Point3d, dMMxPix As Double, nParentId As Integer, ByRef ptMin As Point3d, ByRef ptMax As Point3d) As Integer End Function Public Function EgtAddPhoto(sName As String, sFile As String, ByRef ptOri As Point3d, ByRef ptCen As Point3d, dMMxPix As Double, nParentId As Integer, ByRef ptMin As Point3d, ByRef ptMax As Point3d) As Integer If IntPtr.Size = 4 Then Return EgtAddPhoto_32(sName, sFile, ptOri, ptCen, dMMxPix, nParentId, ptMin, ptMax) Else Return EgtAddPhoto_64(sName, sFile, ptOri, ptCen, dMMxPix, nParentId, ptMin, ptMax) End If End Function Private Function EgtAddPhoto2_32(sName As String, sFile As String, ByRef ptOri As Point3d, ByRef ptCen As Point3d, dDimX As Double, dDimY As Double, nParentId As Integer, ByRef ptMin As Point3d, ByRef ptMax As Point3d) As Integer End Function Private Function EgtAddPhoto2_64(sName As String, sFile As String, ByRef ptOri As Point3d, ByRef ptCen As Point3d, dDimX As Double, dDimY As Double, nParentId As Integer, ByRef ptMin As Point3d, ByRef ptMax As Point3d) As Integer End Function Public Function EgtAddPhoto2(sName As String, sFile As String, ByRef ptOri As Point3d, ByRef ptCen As Point3d, dDimX As Double, dDimY As Double, nParentId As Integer, ByRef ptMin As Point3d, ByRef ptMax As Point3d) As Integer If IntPtr.Size = 4 Then Return EgtAddPhoto2_32(sName, sFile, ptOri, ptCen, dDimX, dDimY, nParentId, ptMin, ptMax) Else Return EgtAddPhoto2_64(sName, sFile, ptOri, ptCen, dDimX, dDimY, nParentId, ptMin, ptMax) End If End Function Private Function EgtMovePhoto_32(nId As Integer, ByRef VtMove As Vector3d) As Boolean End Function Private Function EgtMovePhoto_64(nId As Integer, ByRef VtMove As Vector3d) As Boolean End Function Public Function EgtMovePhoto(nId As Integer, ByRef VtMove As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtMovePhoto_32(nId, VtMove) Else Return EgtMovePhoto_64(nId, VtMove) End If End Function Private Function EgtRotatePhoto_32(nId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngDeg As Double) As Boolean End Function Private Function EgtRotatePhoto_64(nId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngDeg As Double) As Boolean End Function Public Function EgtRotatePhoto(nId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngDeg As Double) As Boolean If IntPtr.Size = 4 Then Return EgtRotatePhoto_32(nId, PtAx, VtAx, dAngDeg) Else Return EgtRotatePhoto_64(nId, PtAx, VtAx, dAngDeg) End If End Function Private Function EgtGetPhotoPath_32(nId As Integer, ByRef psFile As IntPtr) As Boolean End Function Private Function EgtGetPhotoPath_64(nId As Integer, ByRef psFile As IntPtr) As Boolean End Function Public Function EgtGetPhotoPath(nId As Integer, ByRef sFile As String) As Boolean Dim psFile As IntPtr Dim bOk As Boolean If IntPtr.Size = 4 Then bOk = EgtGetPhotoPath_32(nId, psFile) Else bOk = EgtGetPhotoPath_64(nId, psFile) End If If bOk Then sFile = Marshal.PtrToStringUni(psFile) EgtFreeMemory(psFile) Else sFile = String.Empty End If Return bOk End Function Private Function EgtChangePhotoPath_32(nId As Integer, sFile As String) As Boolean End Function Private Function EgtChangePhotoPath_64(nId As Integer, sFile As String) As Boolean End Function Public Function EgtChangePhotoPath(nId As Integer, sFile As String) As Boolean If IntPtr.Size = 4 Then Return EgtChangePhotoPath_32(nId, sFile) Else Return EgtChangePhotoPath_64(nId, sFile) End If End Function Private Function EgtGetPhotoOrigin_32(nId As Integer, ByRef ptOri As Point3d) As Boolean End Function Private Function EgtGetPhotoOrigin_64(nId As Integer, ByRef ptOri As Point3d) As Boolean End Function Public Function EgtGetPhotoOrigin(nId As Integer, ByRef ptOri As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetPhotoOrigin_32(nId, ptOri) Else Return EgtGetPhotoOrigin_64(nId, ptOri) End If End Function Private Function EgtGetPhotoCenter_32(nId As Integer, ByRef ptCen As Point3d) As Boolean End Function Private Function EgtGetPhotoCenter_64(nId As Integer, ByRef ptCen As Point3d) As Boolean End Function Public Function EgtGetPhotoCenter(nId As Integer, ByRef ptCen As Point3d) As Boolean If IntPtr.Size = 4 Then Return EgtGetPhotoCenter_32(nId, ptCen) Else Return EgtGetPhotoCenter_64(nId, ptCen) End If End Function Private Function EgtGetPhotoDimensions_32(nId As Integer, ByRef dDimX As Double, ByRef dDimY As Double) As Boolean End Function Private Function EgtGetPhotoDimensions_64(nId As Integer, ByRef dDimX As Double, ByRef dDimY As Double) As Boolean End Function Public Function EgtGetPhotoDimensions(nId As Integer, ByRef dDimX As Double, ByRef dDimY As Double) As Boolean If IntPtr.Size = 4 Then Return EgtGetPhotoDimensions_32(nId, dDimX, dDimY) Else Return EgtGetPhotoDimensions_64(nId, dDimX, dDimY) End If End Function Private Function EgtGetPhotoPixels_32(nId As Integer, ByRef nPixelX As Integer, ByRef nPixelY As Integer) As Boolean End Function Private Function EgtGetPhotoPixels_64(nId As Integer, ByRef nPixelX As Integer, ByRef nPixelY As Integer) As Boolean End Function Public Function EgtGetPhotoPixels(nId As Integer, ByRef nPixelX As Integer, ByRef nPixelY As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetPhotoPixels_32(nId, nPixelX, nPixelY) Else Return EgtGetPhotoPixels_64(nId, nPixelX, nPixelY) End If End Function Private Function EgtGetPhotoImagePixels_32(nId As Integer, ByRef nPixelX As Integer, ByRef nPixelY As Integer) As Boolean End Function Private Function EgtGetPhotoImagePixels_64(nId As Integer, ByRef nPixelX As Integer, ByRef nPixelY As Integer) As Boolean End Function Public Function EgtGetPhotoImagePixels(nId As Integer, ByRef nPixelX As Integer, ByRef nPixelY As Integer) As Boolean If IntPtr.Size = 4 Then Return EgtGetPhotoImagePixels_32(nId, nPixelX, nPixelY) Else Return EgtGetPhotoImagePixels_64(nId, nPixelX, nPixelY) End If End Function '---------- Picture ------------------------------------------------------------ Private Function EgtAddPicture_32(nParentId As Integer, sName As String, sFile As String, dDimX As Double, dDimY As Double, nRefType As GDB_RT) As Integer End Function Private Function EgtAddPicture_64(nParentId As Integer, sName As String, sFile As String, dDimX As Double, dDimY As Double, nRefType As GDB_RT) As Integer End Function Public Function EgtAddPicture(nParentId As Integer, sName As String, sFile As String, dDimX As Double, dDimY As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then Return EgtAddPicture_32(nParentId, sName, sFile, dDimX, dDimY, nRefType) Else Return EgtAddPicture_64(nParentId, sName, sFile, dDimX, dDimY, nRefType) End If End Function '---------- Geo Base ----------------------------------------------------------- Private Function EgtVectorNormalize_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, dEps As Double) As Boolean End Function Private Function EgtVectorNormalize_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, dEps As Double) As Boolean End Function Private Function EgtVectorNormalize(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, Optional dEps As Double = EPS_SMALL) As Boolean If IntPtr.Size = 4 Then Return EgtVectorNormalize_32(X, Y, Z, dEps) Else Return EgtVectorNormalize_64(X, Y, Z, dEps) End If End Function Private Function EgtVectorRotate_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef VtAx As Vector3d, dAngRotDeg As Double) As Boolean End Function Private Function EgtVectorRotate_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef VtAx As Vector3d, dAngRotDeg As Double) As Boolean End Function Private Function EgtVectorRotate(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef VtAx As Vector3d, dAngRotDeg As Double) As Boolean If IntPtr.Size = 4 Then Return EgtVectorRotate_32(X, Y, Z, VtAx, dAngRotDeg) Else Return EgtVectorRotate_64(X, Y, Z, VtAx, dAngRotDeg) End If End Function Private Function EgtVectorScale_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, dCoeffX As Double, dCoeffY As Double, dCoeffZ As Double) As Boolean End Function Private Function EgtVectorScale_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, dCoeffX As Double, dCoeffY As Double, dCoeffZ As Double) As Boolean End Function Private Function EgtVectorScale(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, dCoeffX As Double, dCoeffY As Double, dCoeffZ As Double) As Boolean If IntPtr.Size = 4 Then Return EgtVectorScale_32(X, Y, Z, PtOrig, VtX, VtY, VtZ, dCoeffX, dCoeffY, dCoeffZ) Else Return EgtVectorScale_64(X, Y, Z, PtOrig, VtX, VtY, VtZ, dCoeffX, dCoeffY, dCoeffZ) End If End Function Private Function EgtVectorMirror_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef VtNorm As Vector3d) As Boolean End Function Private Function EgtVectorMirror_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef VtNorm As Vector3d) As Boolean End Function Private Function EgtVectorMirror(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef VtNorm As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtVectorMirror_32(X, Y, Z, VtNorm) Else Return EgtVectorMirror_64(X, Y, Z, VtNorm) End If End Function Private Function EgtVectorShear_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, dCoeff As Double) As Boolean End Function Private Function EgtVectorShear_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, dCoeff As Double) As Boolean End Function Private Function EgtVectorShear(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, dCoeff As Double) As Boolean If IntPtr.Size = 4 Then Return EgtVectorShear_32(X, Y, Z, VtNorm, VtDir, dCoeff) Else Return EgtVectorShear_64(X, Y, Z, VtNorm, VtDir, dCoeff) End If End Function Private Function EgtVectorToGlob_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtVectorToGlob_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtVectorToGlob(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtVectorToGlob_32(X, Y, Z, PtOrig, VtX, VtY, VtZ) Else Return EgtVectorToGlob_64(X, Y, Z, PtOrig, VtX, VtY, VtZ) End If End Function Private Function EgtVectorToLoc_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtVectorToLoc_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtVectorToLoc(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtVectorToLoc_32(X, Y, Z, PtOrig, VtX, VtY, VtZ) Else Return EgtVectorToLoc_64(X, Y, Z, PtOrig, VtX, VtY, VtZ) End If End Function Private Function EgtVectorLocToLoc_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean End Function Private Function EgtVectorLocToLoc_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean End Function Private Function EgtVectorLocToLoc(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtVectorLocToLoc_32(X, Y, Z, PtO1, VtX1, VtY1, VtZ1, PtO2, VtX2, VtY2, VtZ2) Else Return EgtVectorLocToLoc_64(X, Y, Z, PtO1, VtX1, VtY1, VtZ1, PtO2, VtX2, VtY2, VtZ2) End If End Function Private Function EgtGetVectorRotation_32(ByRef VtS As Vector3d, ByRef VtE As Vector3d, ByRef VtAx As Vector3d, ByRef dAngRotDeg As Double, ByRef bDet As Boolean) As Boolean End Function Private Function EgtGetVectorRotation_64(ByRef VtS As Vector3d, ByRef VtE As Vector3d, ByRef VtAx As Vector3d, ByRef dAngRotDeg As Double, ByRef bDet As Boolean) As Boolean End Function Public Function EgtGetVectorRotation(ByRef VtS As Vector3d, ByRef VtE As Vector3d, ByRef VtAx As Vector3d, ByRef dAngRotDeg As Double, ByRef bDet As Boolean) As Boolean If IntPtr.Size = 4 Then Return EgtGetVectorRotation_32(VtS, VtE, VtAx, dAngRotDeg, bDet) Else Return EgtGetVectorRotation_64(VtS, VtE, VtAx, dAngRotDeg, bDet) End If End Function Private Function EgtPointTranslate_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef VtMove As Vector3d) As Boolean End Function Private Function EgtPointTranslate_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef VtMove As Vector3d) As Boolean End Function Private Function EgtPointTranslate(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef VtMove As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtPointTranslate_32(X, Y, Z, VtMove) Else Return EgtPointTranslate_64(X, Y, Z, VtMove) End If End Function Private Function EgtPointRotate_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngRotDeg As Double) As Boolean End Function Private Function EgtPointRotate_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngRotDeg As Double) As Boolean End Function Private Function EgtPointRotate(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngRotDeg As Double) As Boolean If IntPtr.Size = 4 Then Return EgtPointRotate_32(X, Y, Z, PtAx, VtAx, dAngRotDeg) Else Return EgtPointRotate_64(X, Y, Z, PtAx, VtAx, dAngRotDeg) End If End Function Private Function EgtPointScale_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, dCoeffX As Double, dCoeffY As Double, dCoeffZ As Double) As Boolean End Function Private Function EgtPointScale_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, dCoeffX As Double, dCoeffY As Double, dCoeffZ As Double) As Boolean End Function Private Function EgtPointScale(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, dCoeffX As Double, dCoeffY As Double, dCoeffZ As Double) As Boolean If IntPtr.Size = 4 Then Return EgtPointScale_32(X, Y, Z, PtOrig, VtX, VtY, VtZ, dCoeffX, dCoeffY, dCoeffZ) Else Return EgtPointScale_64(X, Y, Z, PtOrig, VtX, VtY, VtZ, dCoeffX, dCoeffY, dCoeffZ) End If End Function Private Function EgtPointMirror_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d) As Boolean End Function Private Function EgtPointMirror_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d) As Boolean End Function Private Function EgtPointMirror(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtPointMirror_32(X, Y, Z, PtOn, VtNorm) Else Return EgtPointMirror_64(X, Y, Z, PtOn, VtNorm) End If End Function Private Function EgtPointShear_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, dCoeff As Double) As Boolean End Function Private Function EgtPointShear_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, dCoeff As Double) As Boolean End Function Private Function EgtPointShear(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, dCoeff As Double) As Boolean If IntPtr.Size = 4 Then Return EgtPointShear_32(X, Y, Z, PtOn, VtNorm, VtDir, dCoeff) Else Return EgtPointShear_64(X, Y, Z, PtOn, VtNorm, VtDir, dCoeff) End If End Function Private Function EgtPointToGlob_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtPointToGlob_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtPointToGlob(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtPointToGlob_32(X, Y, Z, PtOrig, VtX, VtY, VtZ) Else Return EgtPointToGlob_64(X, Y, Z, PtOrig, VtX, VtY, VtZ) End If End Function Private Function EgtPointToLoc_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtPointToLoc_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtPointToLoc(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtPointToLoc_32(X, Y, Z, PtOrig, VtX, VtY, VtZ) Else Return EgtPointToLoc_64(X, Y, Z, PtOrig, VtX, VtY, VtZ) End If End Function Private Function EgtPointLocToLoc_32(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean End Function Private Function EgtPointLocToLoc_64(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean End Function Private Function EgtPointLocToLoc(ByRef X As Double, ByRef Y As Double, ByRef Z As Double, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtPointLocToLoc_32(X, Y, Z, PtO1, VtX1, VtY1, VtZ1, PtO2, VtX2, VtY2, VtZ2) Else Return EgtPointLocToLoc_64(X, Y, Z, PtO1, VtX1, VtY1, VtZ1, PtO2, VtX2, VtY2, VtZ2) End If End Function Private Function EgtFrameFrom3Points_32(ByRef PtO As Point3d, ByRef PtOnX As Point3d, ByRef PtOnY As Point3d, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtFrameFrom3Points_64(ByRef PtO As Point3d, ByRef PtOnX As Point3d, ByRef PtOnY As Point3d, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtFrameFrom3Points(ByRef PtO As Point3d, ByRef PtOnX As Point3d, ByRef PtOnY As Point3d, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtFrameFrom3Points_32(PtO, PtOnX, PtOnY, PtOrig, VtX, VtY, VtZ) Else Return EgtFrameFrom3Points_64(PtO, PtOnX, PtOnY, PtOrig, VtX, VtY, VtZ) End If End Function Private Function EgtFrameOCS_32(ByRef PtO As Point3d, ByRef VtDirZ As Vector3d, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtFrameOCS_64(ByRef PtO As Point3d, ByRef VtDirZ As Vector3d, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean End Function Private Function EgtFrameOCS(ByRef PtO As Point3d, ByRef VtDirZ As Vector3d, ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtFrameOCS_32(PtO, VtDirZ, PtOrig, VtX, VtY, VtZ) Else Return EgtFrameOCS_64(PtO, VtDirZ, PtOrig, VtX, VtY, VtZ) End If End Function Private Function EgtFrameGetType_32(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Integer End Function Private Function EgtFrameGetType_64(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Integer End Function Private Function EgtFrameGetType(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Integer If IntPtr.Size = 4 Then Return EgtFrameGetType_32(PtOrig, VtX, VtY, VtZ) Else Return EgtFrameGetType_64(PtOrig, VtX, VtY, VtZ) End If End Function Private Function EgtFrameTranslate_32(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef VtMove As Vector3d) As Boolean End Function Private Function EgtFrameTranslate_64(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef VtMove As Vector3d) As Boolean End Function Private Function EgtFrameTranslate(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef VtMove As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtFrameTranslate_32(PtOrig, VtX, VtY, VtZ, VtMove) Else Return EgtFrameTranslate_64(PtOrig, VtX, VtY, VtZ, VtMove) End If End Function Private Function EgtFrameRotate_32(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngRotDeg As Double) As Boolean End Function Private Function EgtFrameRotate_64(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngRotDeg As Double) As Boolean End Function Private Function EgtFrameRotate(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngRotDeg As Double) As Boolean If IntPtr.Size = 4 Then Return EgtFrameRotate_32(PtOrig, VtX, VtY, VtZ, PtAx, VtAx, dAngRotDeg) Else Return EgtFrameRotate_64(PtOrig, VtX, VtY, VtZ, PtAx, VtAx, dAngRotDeg) End If End Function Private Function EgtFrameToGlob_32(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d) As Boolean End Function Private Function EgtFrameToGlob_64(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d) As Boolean End Function Private Function EgtFrameToGlob(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtFrameToGlob_32(PtOrig, VtX, VtY, VtZ, PtO1, VtX1, VtY1, VtZ1) Else Return EgtFrameToGlob_64(PtOrig, VtX, VtY, VtZ, PtO1, VtX1, VtY1, VtZ1) End If End Function Private Function EgtFrameToLoc_32(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d) As Boolean End Function Private Function EgtFrameToLoc_64(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d) As Boolean End Function Private Function EgtFrameToLoc(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtFrameToLoc_32(PtOrig, VtX, VtY, VtZ, PtO1, VtX1, VtY1, VtZ1) Else Return EgtFrameToLoc_64(PtOrig, VtX, VtY, VtZ, PtO1, VtX1, VtY1, VtZ1) End If End Function Private Function EgtFrameLocToLoc_32(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean End Function Private Function EgtFrameLocToLoc_64(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean End Function Private Function EgtFrameLocToLoc(ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtFrameLocToLoc_32(PtOrig, VtX, VtY, VtZ, PtO1, VtX1, VtY1, VtZ1, PtO2, VtX2, VtY2, VtZ2) Else Return EgtFrameLocToLoc_64(PtOrig, VtX, VtY, VtZ, PtO1, VtX1, VtY1, VtZ1, PtO2, VtX2, VtY2, VtZ2) End If End Function Private Function EgtBBoxTranslate_32(ByRef PtMin As Point3d, ByRef PtMax As Point3d, ByRef VtMove As Vector3d) As Boolean End Function Private Function EgtBBoxTranslate_64(ByRef PtMin As Point3d, ByRef PtMax As Point3d, ByRef VtMove As Vector3d) As Boolean End Function Private Function EgtBBoxTranslate(ByRef PtMin As Point3d, ByRef PtMax As Point3d, ByRef VtMove As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtBBoxTranslate_32(PtMin, PtMax, VtMove) Else Return EgtBBoxTranslate_64(PtMin, PtMax, VtMove) End If End Function Private Function EgtBBoxRotate_32(ByRef PtMin As Point3d, ByRef PtMax As Point3d, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngRotDeg As Double) As Boolean End Function Private Function EgtBBoxRotate_64(ByRef PtMin As Point3d, ByRef PtMax As Point3d, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngRotDeg As Double) As Boolean End Function Private Function EgtBBoxRotate(ByRef PtMin As Point3d, ByRef PtMax As Point3d, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngRotDeg As Double) As Boolean If IntPtr.Size = 4 Then Return EgtBBoxRotate_32(PtMin, PtMax, PtAx, VtAx, dAngRotDeg) Else Return EgtBBoxRotate_64(PtMin, PtMax, PtAx, VtAx, dAngRotDeg) End If End Function Private Function EgtBBoxToGlob_32(ByRef PtMin As Point3d, ByRef PtMax As Point3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d) As Boolean End Function Private Function EgtBBoxToGlob_64(ByRef PtMin As Point3d, ByRef PtMax As Point3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d) As Boolean End Function Private Function EgtBBoxToGlob(ByRef PtMin As Point3d, ByRef PtMax As Point3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtBBoxToGlob_32(PtMin, PtMax, PtO1, VtX1, VtY1, VtZ1) Else Return EgtBBoxToGlob_64(PtMin, PtMax, PtO1, VtX1, VtY1, VtZ1) End If End Function Private Function EgtBBoxToLoc_32(ByRef PtMin As Point3d, ByRef PtMax As Point3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d) As Boolean End Function Private Function EgtBBoxToLoc_64(ByRef PtMin As Point3d, ByRef PtMax As Point3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d) As Boolean End Function Private Function EgtBBoxToLoc(ByRef PtMin As Point3d, ByRef PtMax As Point3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtBBoxToLoc_32(PtMin, PtMax, PtO1, VtX1, VtY1, VtZ1) Else Return EgtBBoxToLoc_64(PtMin, PtMax, PtO1, VtX1, VtY1, VtZ1) End If End Function Private Function EgtBBoxLocToLoc_32(ByRef PtMin As Point3d, ByRef PtMax As Point3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean End Function Private Function EgtBBoxLocToLoc_64(ByRef PtMin As Point3d, ByRef PtMax As Point3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean End Function Private Function EgtBBoxLocToLoc(ByRef PtMin As Point3d, ByRef PtMax As Point3d, ByRef PtO1 As Point3d, ByRef VtX1 As Vector3d, ByRef VtY1 As Vector3d, ByRef VtZ1 As Vector3d, ByRef PtO2 As Point3d, ByRef VtX2 As Vector3d, ByRef VtY2 As Vector3d, ByRef VtZ2 As Vector3d) As Boolean If IntPtr.Size = 4 Then Return EgtBBoxLocToLoc_32(PtMin, PtMax, PtO1, VtX1, VtY1, VtZ1, PtO2, VtX2, VtY2, VtZ2) Else Return EgtBBoxLocToLoc_64(PtMin, PtMax, PtO1, VtX1, VtY1, VtZ1, PtO2, VtX2, VtY2, VtZ2) End If End Function '---------- Messages ----------------------------------------------------------- Private Function EgtLoadMessages_32(sMsgFilePath As String) As Boolean End Function Private Function EgtLoadMessages_64(sMsgFilePath As String) As Boolean End Function Public Function EgtLoadMessages(sMsgFilePath As String) As Boolean If IntPtr.Size = 4 Then Return EgtLoadMessages_32(sMsgFilePath) Else Return EgtLoadMessages_64(sMsgFilePath) End If End Function Private Function EgtGetMsg_32(nId As Integer) As IntPtr End Function Private Function EgtGetMsg_64(nId As Integer) As IntPtr End Function Public Function EgtMsg(nId As Integer) As String If IntPtr.Size = 4 Then Return Marshal.PtrToStringUni(EgtGetMsg_32(nId)) Else Return Marshal.PtrToStringUni(EgtGetMsg_64(nId)) End If ' Non è necessario liberare la memoria nativa perchè usa un buffer statico End Function '---------- Costanti ----------------------------------------------------------- 'Costanti : GEOMETRIA Public Const ONEMM As Double = 1.0 Public Const ONEINCH As Double = 25.399999999999999 Public Const EPS_SMALL As Double = 0.001 Public Const EPS_ZERO As Double = 0.000000099999999999999995 Public Const EPS_ANG_SMALL As Double = 0.001 Public Const INFINITO As Double = 10000000000.0 Public Const EPS_STM As Double = 0.050000000000000003 Public Const EPS_STM_DRAG As Double = 0.5 'Cosatnti : TIPO DI CHIAVE Public Enum KEY_TYPE As Integer ANY = 0 SW = 1 HW = 2 End Enum 'Costanti : TIPO DI FILE Public Enum FT As Integer NULL = 0 NGE = 1 NFE = 2 DXF = 11 STL = 12 CNC = 13 CSF = 14 BTL = 15 IMG = 16 PNT = 17 SVG = 18 TSC = 101 LUA = 102 End Enum 'Costanti : FORMATO FILE NGE Public Enum NGE As Integer TEXT = 0 BIN = 1 CMPTEXT = 2 End Enum 'Costanti : ID GEOMDB Public Enum GDB_ID As Integer ROOT = 0 NULL = -1 SEL = -2 GRID = -3 CURRPART = -4 CURRLAYER = -5 End Enum 'Costanti : TIPO OGGETTI Public Enum GDB_TY As Integer NONE = 0 GROUP = 2 GEO_VECTOR = 128 GEO_POINT = 129 GEO_FRAME = 130 CRV_LINE = 256 CRV_ARC = 257 CRV_BEZ = 258 CRV_COMPO = 259 SRF_MESH = 512 SRF_FRGN = 513 VOL_ZMAP = 1024 EXT_TEXT = 2048 End Enum 'Costanti : TIPO RIFERIMENTO DI DATI GEOMETRICI Public Enum GDB_RT As Integer GLOB = 0 GRID = -3 LOC = -6 End Enum 'Costanti : POSIZIONE DI COPIA DI UN OGGETTO Public Enum GDB_POS As Integer FIRST_SON = 0 LAST_SON = 1 BEFORE = 2 AFTER = 3 End Enum 'Costanti : LIVELLO DI UN OGGETTO Public Enum GDB_LV As Integer USER = 1 SYSTEM = 2 TEMP = 3 End Enum 'Costanti : MODO DI UN OGGETTO Public Enum GDB_MD As Integer STD = 1 LOCKED = 2 HIDDEN = 3 End Enum 'Costanti : STATO DI UN OGGETTO Public Enum GDB_ST As Integer OFF = 0 ON_ = 1 SEL = 2 End Enum 'Costanti : FLAG PER BBOX Public Enum GDB_BB As Integer STANDARD = 0 ONLY_VISIBLE = 1 EXACT = 2 IGNORE_TEXT = 4 IGNORE_DIM = 8 End Enum 'Costanti : INFO DI SISTEMA Public Const GDB_SI_SOURCE As String = "!SOU" Public Const GDB_SI_BASE As String = "!BAS" Public Const GDB_SI_LIST As String = "!LST" Public Const GDB_SI_COPY As String = "!COP" Public Const GDB_SI_MGRPONLY As String = "!MGO" 'Costanti : TIPO VISUALIZZAZIONE Public Enum SM As Integer WIREFRAME = 0 HIDDENLINE = 1 SHADING = 2 End Enum 'Costanti : TIPO VISUALIZZAZIONE ZMAP (in or bit a bit tra loro) Public Enum ZSM As Integer SURF = 1 LINES = 2 NORMALS = 4 MORE_COLORS = 8 End Enum 'Costanti : TIPO ZOOM Public Enum ZM As Integer ALL = 1 IN_ = 2 OUT = 3 End Enum 'Costanti : TIPO VISTA Public Enum VT As Integer NONE = 0 TOP = 1 FRONT = 2 RIGHT = 3 BACK = 4 LEFT = 5 BOTTOM = 6 ISO_SW = 7 ISO_SE = 8 ISO_NE = 9 ISO_NW = 10 CPLANE = 11 End Enum 'Costanti : TIPO SNAP POINT Public Enum SP As Integer PT_NONE = 0 PT_SKETCH = 1 PT_GRID = 2 PT_END = 3 PT_MID = 4 CENTER = 5 CENTROID = 6 PT_NEAR = 7 PT_INTERS = 8 PT_TANGENT = 9 PT_PERPENDICULAR = 10 PT_MINDIST = 11 End Enum 'Costanti : TIPO SELECTED POINT Public Enum SEP As Integer PT_STD = 0 PT_TG = 1 PT_PERP = 2 PT_MINDIST = 3 End Enum 'Costanti : ripetizione texture Public Enum TXR_REP As Integer CLAMP = 0 REPEAT = 1 MIRROR = 2 End Enum 'Costanti : tipo di offset Public Enum OFF_TYPE As Integer FILLET = 0 CHAMFER = 1 EXTEND = 2 MEDIA_INTDZ = 4 FORCE_OPEN = 8 NO_VERTLINE = 16 End Enum 'Costanti : tipo di approssimazione di curva Public Enum APP_TYPE As Integer LINES = 0 SPECIAL_LINES = 10 LEFT_LINES = 1 LEFT_CONVEX_LINES = 11 RIGHT_LINES = 2 RIGHT_CONVEX_LINES = 12 ARCS = 3 End Enum 'Costanti : posizione di inserimento per testi Public Enum INS_POS As Integer TL = 1 TC = 2 TR = 3 ML = 4 MC = 5 MR = 6 BL = 7 BC = 8 BR = 9 End Enum 'Costanti : classificazione di due curve chiuse come fossero regioni Public Enum CCREGC As Integer NULL = 0 IN1 = 1 IN2 = 2 SAME = 3 OUT = 4 INTERS = 5 End Enum 'Costanti : semplice classificazione dei chunk di due regioni Public Enum REGC As Integer NULL = 0 IN1 = 1 IN2 = 2 SAME = 3 OUT = 4 INTERS = 5 End Enum 'Costanti : tipo punto intersezione Linea/SurfTriMesh Public Enum SLI_TYPE As Integer NONE = 0 IN_ = 1 OUT_ = 2 TG_INI = 3 TG_FIN = 4 TOUCH = 5 End Enum 'Costanti : tipo di costruzione di superficie rigata Public Enum RUL_TYPE As Integer ISOPAR = 0 MINDIST = 1 End Enum 'Costanti : flag per import CNC (sommabili tra loro) Public Enum EIC_FL As Integer NONE = 0 CHAIN = 1 SKIP_ZEROMACH = 2 SKIP_RAPID = 4 End Enum 'Costanti : flag per import BTL (sommabili tra loro) Public Enum EIB_FL As Integer NONE = 0 FLAT_POS = 1 VERT_POS = 2 SPECIAL_TRIM = 4 End Enum 'Costanti : interruzione di riga Public Const LINE_BREAK As String = "
" 'Costanti : flag separazione loop in adiacenze di facet Public Const STM_FACETADJ_ENDLOOP As Integer = -2 'Costanti : tipo creazione pezzo piatto Public Enum FPC_TYPE As Integer NGE = 0 REGION = 1 LAYER = 2 CLOSEDCURVE = 3 End Enum ' Costanti : nome solido del grezzo Public Const RAWSOLID As String = "RawSolid" ' Costanti : nome centro del grezzo Public Const RAWCENTER As String = "RawCenter" ' Costanti : nome centro del grezzo Public Const RAWOUTLINE As String = "RawOutline" ' Costanti : solido del sottopezzo Public Const SOLID As String = "SOLID" ' Costanti : tipo di Sottopezzo Public Const FIX_TYPE As String = "TYPE" Public Const FIX_REF As String = "REF" Public Const FIX_VAC As String = "VAC" Public Const FIX_VIS As String = "VIS" ' Costanti : arco di battuta dei riferimenti Public Const REF_ARC As String = "Ref" ' Costanti : disco colorato dei riferimenti Public Const REF_DISK As String = "RefDisk" ' Costanti : nomi sottogruppi della lavorazione Public Const MCH_MGR_PV As String = "PV" Public Const MCH_MGR_CL As String = "CL" Public Const MCH_MGR_ST As String = "ST" Public Const MCH_MGR_PATH As String = "P" ' Costanti : tipo interferenza lavorazioni piane con pezzi Public Enum FMI_TYPE As Integer NONE = 0 LI = 1 RM = 2 LO = 4 End Enum 'Costanti : risultato verifica tagli lama allungati Public Enum CAR_RES As Integer INTERF = 0 LI_OK = 1 LO_OK = 2 LI_LO_OK = 1 + 2 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 'Costanti : famiglie di utensili Public Enum MCH_TF As Integer DRILLBIT = 256 SAWBLADE = 512 MILL = 1024 MORTISE = 2048 CHISEL = 4096 WATERJET = 8192 COMPO = 16384 End Enum 'Costanti : tipi di utensili Public Enum MCH_TY As Integer NONE = 0 DRILL_STD = 256 DRILL_LONG = 257 SAW_STD = 512 SAW_FLAT = 513 MILL_STD = 1024 MILL_NOTIP = 1025 MORTISE_STD = 2048 CHISEL_STD = 4096 WATERJET = 8192 COMPO = 16384 End Enum 'Costanti : parametri degli utensili Public Enum MCH_TP As Integer NONE = 0 ACTIVE = 4096 CORR = 8192 EXIT_ = 8193 TYPE = 8194 COOLANT = 8195 CORNRAD = 16384 DIAM = 16385 TOTDIAM = 16386 FEED = 16387 ENDFEED = 16388 STARTFEED = 16389 TIPFEED = 16390 LEN = 16391 TOTLEN = 16392 MAXMAT = 16393 LONOFFSET = 16394 RADOFFSET = 16395 SPEED = 16396 SIDEANG = 16397 MAXSPEED = 16398 THICK = 16399 MAXABSORPTION = 16400 MINFEED = 16401 DRAW = 32768 HEAD = 32769 NAME = 32770 SYSNOTES = 32771 USERNOTES = 32772 TCPOS = 32773 UUID = 32774 End Enum 'Costanti per utensili: liquido refrigerante Public Enum MCH_TC As Integer NO = 0 INNER = 1 OUTER = 2 BOTH = 3 End Enum 'Costanti : operazioni Public Enum MCH_OY As Integer NONE = 0 DISP = 256 DRILLING = 512 SAWING = 1024 MILLING = 2048 POCKETING = 4096 MORTISING = 8192 SAWROUGHING = 16384 SAWFINISHING = 32768 GENMACHINING = 65536 CHISELING = 131072 SURFROUGHING = 262144 SURFFINISHING = 524288 WATERJETTING = 1048576 End Enum ' Funzioni per famiglie di operazioni Public Function IsValidDispositionType(nType As Integer) As Boolean Return (nType = MCH_OY.DISP) End Function Public Function IsValidMachiningType(nType As Integer) As Boolean Return (nType = MCH_OY.DRILLING Or nType = MCH_OY.SAWING Or nType = MCH_OY.MILLING Or nType = MCH_OY.POCKETING Or nType = MCH_OY.MORTISING Or nType = MCH_OY.SAWROUGHING Or nType = MCH_OY.SAWFINISHING Or nType = MCH_OY.GENMACHINING Or nType = MCH_OY.CHISELING Or nType = MCH_OY.SURFROUGHING Or nType = MCH_OY.SURFFINISHING Or nType = MCH_OY.WATERJETTING) End Function 'Costanti : tipi di lavorazioni (altre operazioni) Public Enum MCH_MY As Integer NONE = 0 DRILLING = MCH_OY.DRILLING SAWING = MCH_OY.SAWING MILLING = MCH_OY.MILLING POCKETING = MCH_OY.POCKETING MORTISING = MCH_OY.MORTISING SAWROUGHING = MCH_OY.SAWROUGHING SAWFINISHING = MCH_OY.SAWFINISHING GENMACHINING = MCH_OY.GENMACHINING CHISELING = MCH_OY.CHISELING SURFROUGHING = MCH_OY.SURFROUGHING SURFFINISHING = MCH_OY.SURFFINISHING WATERJETTING = MCH_OY.WATERJETTING End Enum 'Costanti : parametri generali delle lavorazioni Public Enum MCH_GP As Integer NONE = 0 COMP3A = 4096 COMP5A = 4097 SPLITARCS = 8192 SAFEZ = 16384 EXTRALONCUTREG = 16385 EXTRARONDRIREG = 16386 HOLEDIAMTOLER = 16387 EXTSAWARCMINRAD = 16388 INTSAWARCMAXSIDEANG = 16389 SAFEAGGRBOTTZ = 16390 End Enum 'Costanti : tipi di splitarcs Public Enum MCH_SA As Integer NEVER = 0 GEN_PLANE = 1 NO_XY_PLANE = 2 ALWAYS = 3 End Enum 'Costanti : parametri delle lavorazioni Public Enum MCH_MP As Integer NONE = 0 INVERT = 4096 LEAVETAB = 4097 TOOLINVERT = 4098 TYPE = 8192 WORKSIDE = 8193 HEADSIDE = 8194 LEADINTYPE = 8195 EXTLINKTYPE = 8196 LEADOUTTYPE = 8197 CURVEUSE = 8198 STEPTYPE = 8199 SUBTYPE = 8200 LEADLINKTYPE = 8201 SOLCHOICETYPE = 8202 FACEUSE = 8203 SPEED = 16384 FEED = 16385 STARTFEED = 16386 ENDFEED = 16387 TIPFEED = 16388 OFFSR = 16389 OFFSL = 16390 DEPTH = 16391 SIDEANGLE = 16392 APPROX = 16393 STARTPOS = 16394 STARTSLOWLEN = 16395 ENDSLOWLEN = 16396 THROUADDLEN = 16397 STEP_ = 16398 RETURNPOS = 16399 OVERLAP = 16400 TABLEN = 16401 TABDIST = 16402 TABHEIGHT = 16403 TABANGLE = 16404 LITANG = 16405 LIPERP = 16406 LIELEV = 16407 LICOMPLEN = 16408 LOTANG = 16409 LOPERP = 16410 LOELEV = 16411 LOCOMPLEN = 16412 STARTADDLEN = 16413 ENDADDLEN = 16414 OFFSET = 16415 STEPEXTARC = 16416 STEPINTARC = 16417 SIDESTEP = 16418 VERTFEED = 16419 STEPSIDEANG = 16420 OVERL = 16421 STEPBACK = 16422 STEPSIDEANGBACK = 16423 BACKFEED = 16424 NAME = 32768 TOOL = 32769 DEPTH_STR = 32770 TUUID = 32771 UUID = 32772 SYSNOTES = 32773 USERNOTES = 32774 OVERLAP_STR = 32775 OFFSET_STR = 32776 INITANGS = 32777 BLOCKEDAXIS = 32778 End Enum 'Costanti per Scelta Soluzione Public Enum MCH_SCC As Integer NONE = 0 STD = 1 OPPOSITE = 2 ADIR_XP = 11 ADIR_XM = 12 ADIR_YP = 13 ADIR_YM = 14 ADIR_ZP = 15 ADIR_ZM = 16 ADIR_NEAR = 21 ADIR_FAR = 22 End Enum 'Costanti per Taglio Con Lama : 'Lato di lavoro Public Enum MCH_SAW_WS As Integer CENTER = 0 LEFT = 1 RIGHT = 2 End Enum 'Lato di posizionamento della testa Public Enum MCH_SAW_HS As Integer LEFT = 1 RIGHT = 2 End Enum 'Tipo di lavorazione a step Public Enum MCH_SAW_ST As Integer ZIGZAG = 0 ONEWAY = 1 TOANDFROM = 2 End Enum 'Tipo di attacco Public Enum MCH_SAW_LI As Integer CENT = 0 STRICT = 1 OUT = 2 EXT_CENT = 3 EXT_OUT = 4 End Enum 'Tipo di link esterno Public Enum MCH_SAW_EL As Integer CENT = 0 EXT_PREV = 1 EXT_NEXT = 2 EXT_BOTH = 3 End Enum 'Tipo di uscita (EXT mantenuto per compatibilità) Public Enum MCH_SAW_LO As Integer CENT = 0 STRICT = 1 EXT = 2 EXT_CENT = 2 OUT = 3 EXT_OUT = 4 End Enum 'Tipo di utilizzazione delle curve Public Enum MCH_SAW_CU As Integer SKIP = 0 APPROX = 1 CONVEX = 2 KEEP = 3 End Enum 'Costanti per Fresatura : 'Lato di lavoro Public Enum MCH_MIL_WS As Integer CENTER = 0 LEFT = 1 RIGHT = 2 End Enum 'Tipo di lavorazione a step Public Enum MCH_MIL_ST As Integer ZIGZAG = 0 ONEWAY = 1 SPIRAL = 2 End Enum 'Tipo di attacco Public Enum MCH_MIL_LI As Integer NONE = 0 LINEAR = 1 TANGENT = 2 GLIDE = 3 ZIGZAG = 4 HELIX = 5 End Enum 'Tipo di uscita Public Enum MCH_MIL_LO As Integer NONE = 0 LINEAR = 1 TANGENT = 2 GLIDE = 3 AS_LI = 4 End Enum 'Tipo di lavorazione faccia Public Enum MCH_MIL_FU As Integer NONE = 0 PARAL_DOWN = 1 PARAL_TOP = 2 PARAL_FRONT = 3 PARAL_BACK = 4 PARAL_LEFT = 5 PARAL_RIGHT = 6 ORTHO_DOWN = 33 ORTHO_TOP = 34 ORTHO_FRONT = 35 ORTHO_BACK = 36 ORTHO_LEFT = 37 ORTHO_RIGHT = 38 ORTHO_CONT = 39 ORTUP_DOWN = 65 ORTUP_TOP = 66 ORTUP_FRONT = 67 ORTUP_BACK = 68 ORTUP_LEFT = 69 ORTUP_RIGHT = 70 ORTUP_CONT = 71 End Enum 'Costanti per Sgrossatura con Lama 'Lato di posizionamento della testa Public Enum MCH_SAWROU_HS As Integer LEFT = 1 RIGHT = 2 End Enum 'Tipo di lavorazione a step Public Enum MCH_SAWROU_ST As Integer ZIGZAG = 0 ONEWAY = 1 End Enum 'Tipo di ingresso/collegamento/uscita Public Enum MCH_SAWROU_LL As Integer CENT = 0 EXT = 1 End Enum 'Costanti per Finitura con Lama 'Lato di posizionamento della testa Public Enum MCH_SAWFIN_HS As Integer LEFT = 1 RIGHT = 2 End Enum 'Tipo di lavorazione a step Public Enum MCH_SAWFIN_ST As Integer ZIGZAG = 0 ONEWAY = 1 End Enum 'Tipo di finitura Public Enum MCH_SAWFIN_SUB As Integer ALONG = 0 ACROSS = 1 End Enum 'Tipo di ingresso/collegamento/uscita Public Enum MCH_SAWFIN_LL As Integer STD = 0 CENT = 1 EXT = 2 End Enum 'Costanti per Svuotatura ' Sottotipo di svuotatura Public Enum MCH_POCK_SUB As Integer ZIGZAG = 0 ONEWAY = 1 SPIRALIN = 2 SPIRALOUT = 3 End Enum ' Tipo di attacco Public Enum MCH_POCK_LI As Integer NONE = 0 GLIDE = 1 ZIGZAG = 2 HELIX = 3 End Enum ' Tipo di uscita Public Enum MCH_POCK_LO As Integer NONE = 0 GLIDE = 1 End Enum 'Costanti per Scalpellatura (chiseling) 'Lato di lavoro Public Enum MCH_CHISEL_WS As Integer LEFT = 1 RIGHT = 2 End Enum 'Costanti per Mortasatura (mortising) 'Lato di lavoro Public Enum MCH_MORTISE_WS As Integer LEFT = 1 RIGHT = 2 End Enum 'Tipo di lavorazione a step Public Enum MCH_MORTISE_ST As Integer ZIGZAG = 0 ONEWAY = 1 End Enum 'Tipo di lavorazione faccia Public Enum MCH_MORTISE_FU As Integer NONE = 0 PARAL_DOWN = 1 PARAL_TOP = 2 PARAL_FRONT = 3 PARAL_BACK = 4 PARAL_LEFT = 5 PARAL_RIGHT = 6 End Enum ' Costanti per finitura superficie Public Enum MCH_SURFFIN_SUB As Integer ZIGZAG = 0 ONEWAY = 1 SPIRALIN = 2 SPIRALOUT = 3 End Enum Public Enum MCH_SURFFIN_LI As Integer NONE = 0 LINEAR = 1 TANGENT = 2 End Enum Public Enum MCH_SURFFIN_LL As Integer STD = 0 CENT = 1 End Enum Public Enum MCH_SURFFIN_LO As Integer NONE = 0 LINEAR = 1 TANGENT = 2 AS_LI = 3 End Enum ' Costanti per lavorazione getto d'acqua (waterjetting) Public Enum MCH_WATERJET_WS As Integer CENTER = 0 LEFT = 1 RIGHT = 2 End Enum Public Enum MCH_WATERJET_LI As Integer NONE = 0 LINEAR = 1 TANGENT = 2 End Enum Public Enum MCH_WATERJET_LO As Integer NONE = 0 LINEAR = 1 TANGENT = 2 AS_LI = 3 End Enum 'Costanti : posizione per preview utensile in lavorazione Public Enum MCH_PTM As Integer CURR = 0 BEFORE = -1 AFTER = 1 End Enum 'Costanti : risultato del movimento di simulazione Public Enum MCH_SIM As Integer OK = 0 END_STEP = 1 END_ = 2 STOP_ = 3 OUTSTROKE = 4 DIR_ERR = 5 COLLISION = 6 ERR = 7 End Enum 'Costanti : stato di simulazione Public Enum MCH_SIM_ST As Integer UI_NULL = 0 UI_STOP = 1 UI_PLAY = 2 UI_STEP = 3 UI_PAUSE = 4 End Enum 'Costanti : stato visualizzazione macchina Public Enum MCH_LOOK As Integer TAB = 0 TAB_TOOL = 1 TAB_HEAD = 2 ALL = 3 End Enum End Module