Files
EgtUILib/EgtInterface.vb
T
Dario Sassi eaaa2dcbfe EgtUILib 1.6a6 :
- allineamento con TestEIn.
2015-01-28 14:07:07 +00:00

2054 lines
83 KiB
VB.net

'----------------------------------------------------------------------------
' EgalTech 2014-2015
'----------------------------------------------------------------------------
' File : EgtInterface.vb Data : 27.01.15 Versione : 1.6a6
' Contenuto : Modulo EgtInterface (interfaccia verso il motore EgalTech).
'
'
'
' Modifiche : 04.11.14 DS Creazione modulo.
'
'
'----------------------------------------------------------------------------
Imports System.Runtime.InteropServices
Public Module EgtInterface
Structure Vector3d
' Membri
Dim x, y, z As Double
' Costruttori
Sub New(ByVal dX As Double, ByVal dY As Double, ByVal 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(ByVal dLen As Double, ByVal dAngVertDeg As Double, ByVal 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(ByVal dLen As Double, ByVal 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 -(ByVal VtV1 As Vector3d) As Vector3d
Dim vtV As New Vector3d(-VtV1.x, -VtV1.y, -VtV1.z)
Return vtV
End Operator
' Somma
Shared Operator +(ByVal VtV1 As Vector3d, ByVal 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 -(ByVal VtV1 As Vector3d, ByVal 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 *(ByVal dNum As Double, ByVal 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 *(ByVal VtV1 As Vector3d, ByVal 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 /(ByVal VtV1 As Vector3d, ByVal 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 *(ByVal VtV1 As Vector3d, ByVal 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(ByVal VtV1 As Vector3d, ByVal VtV2 As Vector3d) As Double
Return (VtV1.x * VtV2.x + VtV1.y * VtV2.y)
End Function
' Prodotto vettoriale
Shared Operator ^(ByVal VtV1 As Vector3d, ByVal 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(ByVal VtV1 As Vector3d, ByVal 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
' Lunghezza
Function Len() As Double
Return Math.Sqrt(x * x + y * y + z * z)
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 ByVal 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 = IIf(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, ByVal dAngRotDeg As Double) As Boolean
Return EgtVectorRotate(x, y, z, VtAx, dAngRotDeg)
End Function
' Scalatura
Function Scale(ByRef frRef As Frame3d, ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal 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, ByVal 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(ByVal 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(ByVal 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(ByVal nIdSou As Integer, ByVal 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
Structure Point3d
' Membri
Dim x, y, z As Double
' Costruttori
Sub New(ByVal dX As Double, ByVal dY As Double, ByVal 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 +(ByVal PtP1 As Point3d, ByVal 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 +(ByVal VtV1 As Vector3d, ByVal 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 -(ByVal PtP1 As Point3d, ByVal 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
' 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 ByVal 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
' Distanza
Shared Function Dist(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d) As Double
Return (ptP2 - ptP1).Len()
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, ByVal dAngRotDeg As Double) As Boolean
Return EgtPointRotate(x, y, z, PtAx, VtAx, dAngRotDeg)
End Function
' Scalatura
Function Scale(ByRef frRef As Frame3d, ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal 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, ByVal 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(ByVal 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(ByVal 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(ByVal nIdSou As Integer, ByVal 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
' 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 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
' 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
' Restituzione componenti
Function Orig() As Point3d
Return PtOrig
End Function
Function VersX() As Vector3d
Return VtDirX
End Function
Function VersY() As Vector3d
Return VtDirY
End Function
Function VersZ() As Vector3d
Return VtDirZ
End Function
' Traslazione
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
Function Rotate(ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal 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
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
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
Function LocToLoc(ByRef frSou As Frame3d, ByRef frDest As Frame3d) As Boolean
If 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
Structure Color3d
' Membri
Dim R, G, B, A As Integer
' Costruttori
Sub New(ByVal nRed As Integer, ByVal nGreen As Integer, ByVal nBlue As Integer, Optional ByVal nAlpha As Integer = 100)
R = nRed
G = nGreen
B = nBlue
A = nAlpha
End Sub
' Inizializzatori
Sub Setup(ByVal nRed As Integer, ByVal nGreen As Integer, ByVal nBlue As Integer, Optional ByVal 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(ByVal SysCol As System.Drawing.Color)
R = SysCol.R
G = SysCol.G
B = SysCol.B
A = SysCol.A * 100 / 255
End Sub
End Structure
#If PLATFORM = "x64" Then
#If DEBUG Then
Const EgtIntDll As String = "EgtInterfaceD64.dll"
#Else
Const EgtIntDll As String = "EgtInterfaceR64.dll"
#End If
#Else
#If DEBUG Then
Const EgtIntDll As String = "EgtInterfaceD32.dll"
#Else
Const EgtIntDll As String = "EgtInterfaceR32.dll"
#End If
#End If
'---------- General ------------------------------------------------------------
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtInit(ByVal nDebug As Integer, ByVal sLogFile As String) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtExit() As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSetKey(ByVal sKey As String) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSetFont(ByVal sNfeFontDir As String, ByVal sDefaultFont As String) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtGetNfeFontDir(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 = EgtGetNfeFontDir(psNfeFontDir)
sNfeFontDir = Marshal.PtrToStringUni(psNfeFontDir)
EgtFreeMemory(psNfeFontDir)
Return bOk
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtGetDefaultFont(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 = EgtGetDefaultFont(psDefaultFont)
sDefaultFont = Marshal.PtrToStringUni(psDefaultFont)
EgtFreeMemory(psDefaultFont)
Return bOk
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSetLuaLibs(ByVal sLuaLibsDir As String) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSetCommandLogger(ByVal sLogFile As String) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Sub EgtEnableCommandLogger()
End Sub
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Sub EgtDisableCommandLogger()
End Sub
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtFreeMemory(ByVal sB As IntPtr) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtOutLog(ByVal sMag As String) As Boolean
End Function
'---------- Geo Base -----------------------------------------------------------
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtVectorNormalize(ByRef X As Double, ByRef Y As Double, ByRef Z As Double,
Optional ByVal dEps As Double = EPS_SMALL) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtVectorRotate(ByRef X As Double, ByRef Y As Double, ByRef Z As Double,
ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
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,
ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtVectorMirror(ByRef X As Double, ByRef Y As Double, ByRef Z As Double,
ByRef VtNorm As Vector3d) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtVectorShear(ByRef X As Double, ByRef Y As Double, ByRef Z As Double,
ByRef VtNorm As Vector3d, ByRef VtDir As Vector3d, ByVal dCoeff As Double) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
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
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
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
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
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
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
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
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtPointTranslate(ByRef X As Double, ByRef Y As Double, ByRef Z As Double,
ByRef VtMove As Vector3d) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtPointRotate(ByRef X As Double, ByRef Y As Double, ByRef Z As Double,
ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
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,
ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
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
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
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, ByVal dCoeff As Double) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
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
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
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
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
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
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
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
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
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
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
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
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
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, ByVal dAngRotDeg As Double) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
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
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
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
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
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
End Function
'---------- GeomDb -------------------------------------------------------------
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtInitGeomDB() As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSetCurrentContext(ByVal nCtx As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtResetCurrentContext() As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetCurrentContext() As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSetDefaultMaterial(ByRef DefCol As Color3d) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtSetGridFrame(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
Return EgtSetGridFrame(frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ())
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtGetGridFrame(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
If Not EgtGetGridFrame(PtOrig, VtDirX, VtDirY, VtDirZ) 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
EgtGetGridFrame(PtOrig, VtDirX, VtDirY, VtDirZ)
Return PtOrig
End Function
Public Function EgtGetGridVersX() As Vector3d
Dim PtOrig As Point3d
Dim VtDirX, VtDirY, VtDirZ As Vector3d
EgtGetGridFrame(PtOrig, VtDirX, VtDirY, VtDirZ)
Return VtDirX
End Function
Public Function EgtGetGridVersY() As Vector3d
Dim PtOrig As Point3d
Dim VtDirX, VtDirY, VtDirZ As Vector3d
EgtGetGridFrame(PtOrig, VtDirX, VtDirY, VtDirZ)
Return VtDirY
End Function
Public Function EgtGetGridVersZ() As Vector3d
Dim PtOrig As Point3d
Dim VtDirX, VtDirY, VtDirZ As Vector3d
EgtGetGridFrame(PtOrig, VtDirX, VtDirY, VtDirZ)
Return VtDirZ
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtNewFile() As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtOpenFile(ByVal sFilePath As String) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtInsertFile(ByVal sFilePath As String) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSaveFile(ByVal sFilePath As String, ByVal nFlag As NGE) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetFileType(ByVal sFilePath As String) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtImportDxf(ByVal sFilePath As String) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtImportStl(ByVal sFilePath As String) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtImportCnc(ByVal sFilePath As String) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtExportDxf(ByVal nId As Integer, ByVal sFilePath As String) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtExportStl(ByVal nId As Integer, ByVal sFilePath As String) As Boolean
End Function
'---------- GeomDb Objects Create ----------------------------------------------
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtCreateGroup(ByVal nParentId As Integer,
ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByVal nRefType As REF_TY) As Integer
End Function
Public Function EgtCreateGroup(ByVal nParentId As Integer, ByRef frRef As Frame3d, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Integer
Return EgtCreateGroup(nParentId, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ(), nRefType)
End Function
Public Function EgtCreateGroup(ByVal nParentId As Integer) As Integer
Return EgtCreateGroup(nParentId, Point3d.ORIG(), Vector3d.X_AX, Vector3d.Y_AX, Vector3d.Z_AX, REF_TY.LOC)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCreateGeoPoint(ByVal nParentId As Integer,
ByRef PtP As Point3d, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCreateGeoVector(ByVal nParentId As Integer,
ByRef vtV As Vector3d, ByRef PtB As Point3d, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtCreateGeoFrame(ByVal nParentId As Integer,
ByRef PtOrig As Point3d, ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByVal nRefType As REF_TY) As Integer
End Function
Public Function EgtCreateGeoFrame(ByVal nParentId As Integer, ByRef frRef As Frame3d, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Integer
Return EgtCreateGeoFrame(nParentId, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ(), nRefType)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCreateCurveLine(ByVal nParentId As Integer,
ByRef PtStart As Point3d, ByRef PtEnd As Point3d, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCreateCurveLineEx(ByVal nParentId As Integer,
ByRef PtStart As Point3d, ByVal nSepS As SEP, ByVal nIdS As Integer,
ByRef PtEnd As Point3d, ByVal nSepE As SEP, ByVal nIdE As Integer, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCreateCurveLinePVL(ByVal nParentId As Integer,
ByRef PtStart As Point3d, ByRef VtDir As Vector3d, ByVal dLen As Double, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCreateCurveCircle(ByVal nParentId As Integer,
ByRef PtCen As Point3d, ByRef VtNorm As Vector3d, ByVal dRad As Double, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCreateCurveCircleCPN(ByVal nParentId As Integer,
ByRef PtCen As Point3d, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCreateCurveArc3P(ByVal nParentId As Integer,
ByRef PtStart As Point3d, ByRef PtMid As Point3d, ByRef PtEnd As Point3d, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCreateCurveArcC2PN(ByVal nParentId As Integer,
ByRef PtCen As Point3d, ByRef PtStart As Point3d, ByRef PtEnd As Point3d,
ByRef VtNorm As Vector3d, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCreateCurveArc2PVN(ByVal nParentId As Integer,
ByRef PtStart As Point3d, ByRef PtEnd As Point3d, ByRef VtDirS As Vector3d,
ByRef VtNorm As Vector3d, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCreateCurveCompoByChain(ByVal nParentId As Integer, ByVal nNumCrv As Integer, ByVal nCrvId() As Integer,
ByRef PtNearStart As Point3d, ByVal bCrvErase As Boolean, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCreateRectangle3P(ByVal nParentId As Integer,
ByRef PtStart As Point3d, ByRef PtCross As Point3d,
ByRef PtDir As Point3d, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCreatePolygonFromSide(ByVal nParentId As Integer, ByVal nNumSides As Integer, ByRef PtStart As Point3d,
ByRef PtFin As Point3d, ByRef VtNorm As Vector3d, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCreateSurfTriMeshByContour(ByVal nParentId As Integer, ByVal nCrvId As Integer, ByVal dLinTol As Double) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCreateSurfTriMeshByExtrusion(ByVal nParentId As Integer, ByVal nCrvId As Integer, ByRef VtExtr As Vector3d,
ByVal dLinTol As Double, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCreateSurfTriMeshByScrewing(ByVal nParentId As Integer, ByVal nCrvId As Integer,
ByRef PtAx As Point3d, ByRef VtAx As Vector3d,
ByVal dAngRotDeg As Double, ByVal dMove As Double,
ByVal dLinTol As Double, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCreateSurfTriMeshRuled(ByVal nParentId As Integer, ByVal nCrvId1 As Integer, ByVal nCrvId2 As Integer, ByVal dLinTol As Double) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCreateText(ByVal nParentId As Integer, ByRef ptP As Point3d, ByVal dAngRotDeg As Double,
ByVal sText As String, ByVal dH As Double, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCreateTextEx(ByVal nParentId As Integer, ByRef ptP As Point3d, ByRef vtN As Vector3d, ByRef vtD As Vector3d,
ByVal sText As String, ByVal sFont As String, ByVal bItalic As Boolean, ByVal dH As Double,
Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCreateTextAdv(ByVal nParentId As Integer, ByRef ptP As Point3d, ByRef vtN As Vector3d, ByRef vtD As Vector3d,
ByVal sText As String, ByVal sFont As String, ByVal nW As Integer, ByVal bItalic As Boolean,
ByVal dH As Double, ByVal dRat As Double, ByVal dAddAdv As Double, ByVal nInsPos As Integer,
Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Integer
End Function
'---------- GeomDb Objects Modify ----------------------------------------------
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtChangeGroupFrame(ByVal nId As Integer, ByRef PtOrig As Point3d,
ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d, ByVal nRefType As REF_TY) As Boolean
End Function
Public Function EgtChangeGroupFrame(ByVal nId As Integer, ByRef frRef As Frame3d, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Boolean
Return EgtChangeGroupFrame(nId, frRef.Orig(), frRef.VersX(), frRef.VersY(), frRef.VersZ(), nRefType)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtChangeVectorBase(ByVal nId As Integer, ByRef PtBase As Point3d, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtInvertSurface(ByVal nId As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtFlipText(ByVal nId As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtMirrorText(ByVal nId As Integer, ByVal bOnL As Boolean) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtExplodeText(ByVal nId As Integer) As Boolean
End Function
'---------- GeomDb Curves Modify -----------------------------------------------
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtInvertCurve(ByVal nId As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtModifyCurveStartPoint(ByVal nId As Integer, ByRef PtStart As Point3d, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtModifyCurveEndPoint(ByVal nId As Integer, ByRef PtEnd As Point3d, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtModifyCurveExtrusion(ByVal nId As Integer, ByRef VtExtr As Vector3d, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtModifyCurveThickness(ByVal nId As Integer, ByVal bTh As Double) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtExtendCurveStartByLen(ByVal nId As Integer, ByVal dLen As Double) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtExtendCurveEndByLen(ByVal nId As Integer, ByVal dLen As Double) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtTrimExtendCurveByLen(ByVal nId As Integer, ByVal dLen As Double, ByRef PtNear As Point3d, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSplitCurveAtPoint(ByVal nId As Integer, ByRef PtOn As Point3d, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtOffsetCurve(ByVal nId As Integer, ByVal dDist As Double, ByVal nType As OFF_TYPE) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtModifyCurveCircleCPN(ByVal nId As Integer, ByRef PtOn As Point3d, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtModifyCurveArcRadius(ByVal nId As Integer, ByVal dRad As Double) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtModifyCurveArcC2PN(ByVal nId As Integer, ByRef PtEnd As Point3d, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtModifyCurveArc3P(ByVal nId As Integer, ByRef PtMid As Point3d, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtExplodeCurveCompo(ByVal nId As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtExplodeCurveBezier(ByVal nId As Integer, ByVal dTolLin As Double, ByVal bArcsVsLines As Boolean) As Boolean
End Function
'---------- GeomDb Objects -----------------------------------------------------
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtExistsObj(ByVal nId As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetParent(ByVal nId As Integer) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtGetGroupGlobFrame(ByVal 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 EgtGetGroupGlobFrame(ByVal nId As Integer, ByRef frGRef As Frame3d) As Boolean
Dim PtOrig As Point3d
Dim VtDirX, VtDirY, VtDirZ As Vector3d
If Not EgtGetGroupGlobFrame(nId, PtOrig, VtDirX, VtDirY, VtDirZ) Then
Return False
Else
Return frGRef.Setup(PtOrig, VtDirX, VtDirY, VtDirZ)
End If
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetGroupObjs(ByVal nGroupId As Integer) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetFirstInGroup(ByVal nGroupId As Integer) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetNext(ByVal nId As Integer) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetLastInGroup(ByVal nGroupId As Integer) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetPrev(ByVal nId As Integer) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetFirstGroupInGroup(ByVal nGroupId As Integer) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetNextGroup(ByVal nId As Integer) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetLastGroupInGroup(ByVal nGroupId As Integer) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetPrevGroup(ByVal nId As Integer) As Integer
End Function
Public Function EgtGetFirstVisiblePart() As Integer
Dim nPartId As Integer = EgtGetFirstGroupInGroup(GDB_ID.ROOT)
Return EgtVerifyOrNextVisible(nPartId)
End Function
Public Function EgtGetNextVisiblePart(ByVal nPartId As Integer) As Integer
Dim nNextId As Integer = EgtGetNextGroup(nPartId)
Return EgtVerifyOrNextVisible(nNextId)
End Function
Public Function EgtGetFirstVisibleLayer(ByVal nPartId As Integer) As Integer
' verifico visibilità del pezzo
If Not EgtIsVisibleObj(nPartId) Then
Return GDB_ID.NULL
End If
' cerco il primo layer visibile
Dim nLayerId As Integer = EgtGetFirstGroupInGroup(nPartId)
Return EgtVerifyOrNextVisible(nLayerId)
End Function
Public Function EgtGetNextVisibleLayer(ByVal nLayerId As Integer) As Integer
Dim nNextId As Integer = EgtGetNextGroup(nLayerId)
Return EgtVerifyOrNextVisible(nNextId)
End Function
Private Function EgtVerifyOrNextVisible(ByVal nId As Integer) As Integer
While nId <> GDB_ID.NULL
If EgtIsVisibleObj(nId) Then
Return nId
End If
nId = EgtGetNextGroup(nId)
End While
Return GDB_ID.NULL
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetBBox(ByVal nId As Integer, ByVal nFlag As Integer,
ByRef PtMin As Point3d, ByRef PtMax As Point3d) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetBBoxGlob(ByVal nId As Integer, ByVal nFlag As Integer,
ByRef PtMin As Point3d, ByRef PtMax As Point3d) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCopy(ByVal nId As Integer, ByVal nRefId As Integer, Optional ByVal nSonBeforeAfter As GDB_POS = GDB_POS.SON) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCopyGlob(ByVal nId As Integer, ByVal nRefId As Integer, Optional ByVal nSonBeforeAfter As GDB_POS = GDB_POS.SON) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtRelocate(ByVal nId As Integer, ByVal nRefId As Integer, Optional ByVal nSonBeforeAfter As GDB_POS = GDB_POS.SON) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtRelocateGlob(ByVal nId As Integer, ByVal nRefId As Integer, Optional ByVal nSonBeforeAfter As GDB_POS = GDB_POS.SON) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtErase(ByVal nId As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetType(ByVal nId As Integer) As GDB_TY
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtGetTitle(ByVal nId As Integer, ByRef psTitle As IntPtr) As Boolean
End Function
Public Function EgtGetTitle(ByVal nId As Integer, ByRef sTitle As String) As Boolean
Dim psTitle As IntPtr
Dim bOk As Boolean = EgtGetTitle(nId, psTitle)
sTitle = Marshal.PtrToStringUni(psTitle)
EgtFreeMemory(psTitle)
Return bOk
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtGroupDump(ByVal nId As Integer, ByRef psDump As IntPtr) As Boolean
End Function
Public Function EgtGroupDump(ByVal nId As Integer, ByRef sDump As String) As Boolean
Dim psDump As IntPtr
Dim bOk As Boolean = EgtGroupDump(nId, psDump)
sDump = Marshal.PtrToStringUni(psDump)
EgtFreeMemory(psDump)
Return bOk
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtGeoObjDump(ByVal nId As Integer, ByRef psDump As IntPtr) As Boolean
End Function
Public Function EgtGeoObjDump(ByVal nId As Integer, ByRef sDump As String) As Boolean
Dim psDump As IntPtr
Dim bOk As Boolean = EgtGeoObjDump(nId, psDump)
sDump = Marshal.PtrToStringUni(psDump)
EgtFreeMemory(psDump)
Return bOk
End Function
'---------- GeomDb Obj Attributes ----------------------------------------------
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSetLevel(ByVal nId As Integer, ByVal nLevel As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtRevertLevel(ByVal nId As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetLevel(ByVal nId As Integer, ByRef nLevel As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetCalcLevel(ByVal nId As Integer, ByRef nLevel As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSetMode(ByVal nId As Integer, ByVal nMode As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtRevertMode(ByVal nId As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetMode(ByVal nId As Integer, ByRef nMode As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetCalcMode(ByVal nId As Integer, ByRef nMode As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSetStatus(ByVal nId As Integer, ByVal nStat As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtRevertStatus(ByVal nId As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetStatus(ByVal nId As Integer, ByRef nStat As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetCalcStatus(ByVal nId As Integer, ByRef nStat As Integer) As Boolean
End Function
Public Function EgtIsVisibleObj(ByVal nId As Integer) As Boolean
Dim nStat As GDB_ST = GDB_ST.ON_
Return EgtGetCalcStatus(nId, nStat) AndAlso nStat <> GDB_ST.OFF
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSetMark(ByVal nId As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtResetMark(ByVal nId As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetMark(ByVal nId As Integer, ByRef bMark As Boolean) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetCalcMark(ByVal nId As Integer, ByRef bMark As Boolean) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSetColor(ByVal nId As Integer, ByRef ColObj As Color3d) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtResetColor(ByVal nId As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetColor(ByVal nId As Integer, ByRef ColObj As Color3d) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetCalcColor(ByVal nId As Integer, ByRef ColObj As Color3d) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSetName(ByVal nId As Integer, ByVal sName As String) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtGetName(ByVal nId As Integer, ByRef psName As IntPtr) As Boolean
End Function
Public Function EgtGetName(ByVal nId As Integer, ByRef sName As String) As Boolean
Dim psName As IntPtr
Dim bOk As Boolean = EgtGetName(nId, psName)
sName = Marshal.PtrToStringUni(psName)
EgtFreeMemory(psName)
Return bOk
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtExistsName(ByVal nId As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtRemoveName(ByVal nId As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSetInfo(ByVal nId As Integer, ByVal sKey As String, ByVal sInfo As String) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtGetInfo(ByVal nId As Integer, ByVal sKey As String, ByRef psInfo As IntPtr) As Boolean
End Function
Public Function EgtGetInfo(ByVal nId As Integer, ByVal sKey As String, ByRef sInfo As String) As Boolean
Dim psInfo As IntPtr
Dim bOk As Boolean = EgtGetInfo(nId, sKey, psInfo)
sInfo = Marshal.PtrToStringUni(psInfo)
EgtFreeMemory(psInfo)
Return bOk
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtGetInfoInt(ByVal nId As Integer, ByVal sKey As String, ByRef nInfo As Integer) As Boolean
End Function
Public Function EgtGetInfo(ByVal nId As Integer, ByVal sKey As String, ByRef nInfo As Integer) As Boolean
Return EgtGetInfoInt(nId, sKey, nInfo)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtExistsInfo(ByVal nId As Integer, ByVal sKey As String) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtRemoveInfo(ByVal nId As Integer, ByVal sKey As String) As Boolean
End Function
'---------- GeomDb Obj Selection -----------------------------------------------
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSelectObj(ByVal nId As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtDeselectObj(ByVal nId As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSelectAll(Optional ByVal bOnlyIfVisible As Boolean = False) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtDeselectAll() As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSelectPartObjs(ByVal nPartId As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtDeselectPartObjs(ByVal nPartId As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSelectLayerObjs(ByVal nLayerId As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtDeselectLayerObjs(ByVal nLayerId As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtIsSelectedObj(ByVal nId As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetSelectedObjNbr() As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetFirstSelectedObj() As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetNextSelectedObj() As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetLastSelectedObj() As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetPrevSelectedObj() As Integer
End Function
'---------- GeomDb Obj Transform -----------------------------------------------
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtMove(ByVal nId As Integer, ByRef VtMove As Vector3d, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtRotate(ByVal nId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtScale(ByVal nId As Integer, ByRef PtOrig As Point3d,
ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d,
ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double, ByVal nRefType As REF_TY) As Boolean
End Function
Public Function EgtScale(ByVal nId As Integer, ByRef Frame As Frame3d,
ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Boolean
Return EgtScale(nId, Frame.Orig(), Frame.VersX(), Frame.VersY(), Frame.VersZ(), dCoeffX, dCoeffY, dCoeffZ, nRefType)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtMirror(ByVal nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtShear(ByVal nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d,
ByRef VtDir As Vector3d, ByVal dCoeff As Double, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtMoveGroup(ByVal nId As Integer, ByRef VtMove As Vector3d) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtRotateGroup(ByVal nId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, ByVal dAngRotDeg As Double) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtScaleGroup(ByVal nId As Integer, ByRef PtOrig As Point3d,
ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d,
ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double) As Boolean
End Function
Public Function EgtScaleGroup(ByVal nId As Integer, ByRef Frame As Frame3d,
ByVal dCoeffX As Double, ByVal dCoeffY As Double, ByVal dCoeffZ As Double) As Boolean
Return EgtScaleGroup(nId, Frame.Orig(), Frame.VersX(), Frame.VersY(), Frame.VersZ(), dCoeffX, dCoeffY, dCoeffZ)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtMirrorGroup(ByVal nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtShearGroup(ByVal nId As Integer, ByRef PtOn As Point3d, ByRef VtNorm As Vector3d,
ByRef VtDir As Vector3d, ByVal dCoeff As Double) As Boolean
End Function
'---------- GeomDb Snap Vector/Point/Frame -------------------------------------
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtStartPoint(ByVal nId As Integer, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean
End Function
Public Function EgtStartPoint(ByVal nId As Integer, ByRef PtP As Point3d) As Boolean
Return EgtStartPoint(nId, nId, PtP)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtEndPoint(ByVal nId As Integer, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean
End Function
Public Function EgtEndPoint(ByVal nId As Integer, ByRef PtP As Point3d) As Boolean
Return EgtEndPoint(nId, nId, PtP)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtMidPoint(ByVal nId As Integer, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean
End Function
Public Function EgtMidPoint(ByVal nId As Integer, ByRef PtP As Point3d) As Boolean
Return EgtMidPoint(nId, nId, PtP)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCenterPoint(ByVal nId As Integer, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean
End Function
Public Function EgtCenterPoint(ByVal nId As Integer, ByRef PtP As Point3d) As Boolean
Return EgtCenterPoint(nId, nId, PtP)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtAtParamPoint(ByVal nId As Integer, ByVal dU As Double, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean
End Function
Public Function EgtAtParamPoint(ByVal nId As Integer, ByVal dU As Double, ByRef PtP As Point3d) As Boolean
Return EgtAtParamPoint(nId, dU, nId, PtP)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtNearPoint(ByVal nId As Integer, ByRef PtNear As Point3d, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean
End Function
Public Function EgtNearPoint(ByVal nId As Integer, ByRef PtNear As Point3d, ByRef PtP As Point3d) As Boolean
Return EgtNearPoint(nId, PtNear, nId, PtP)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtIntersectionPoint(ByVal nId1 As Integer, ByVal nId2 As Integer, ByRef PtNear As Point3d,
ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean
End Function
Public Function EgtIntersectionPoint(ByVal nId1 As Integer, ByVal nId2 As Integer, ByRef PtNear As Point3d,
ByRef PtP As Point3d) As Boolean
Return EgtIntersectionPoint(nId1, nId2, PtNear, nId1, PtP)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtStartVector(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtV As Vector3d) As Boolean
End Function
Public Function EgtStartVector(ByVal nId As Integer, ByRef VtV As Vector3d) As Boolean
Return EgtStartVector(nId, nId, VtV)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtEndVector(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtV As Vector3d) As Boolean
End Function
Public Function EgtEndVector(ByVal nId As Integer, ByRef VtV As Vector3d) As Boolean
Return EgtEndVector(nId, nId, VtV)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtMidVector(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtV As Vector3d) As Boolean
End Function
Public Function EgtMidVector(ByVal nId As Integer, ByRef VtV As Vector3d) As Boolean
Return EgtMidVector(nId, nId, VtV)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtAtParamVector(ByVal nId As Integer, ByVal dU As Double, ByVal nRefId As Integer, ByRef VtV As Vector3d) As Boolean
End Function
Public Function EgtAtParamVector(ByVal nId As Integer, ByVal dU As Double, ByRef VtV As Vector3d) As Boolean
Return EgtAtParamVector(nId, dU, nId, VtV)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCurveLength(ByVal nId As Integer, ByRef dLen As Double) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCurveLengthAtPoint(ByVal nId As Integer, ByRef ptOn As Point3d, ByRef dLen As Double) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCurveExtrusion(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtExtr As Vector3d) As Boolean
End Function
Public Function EgtCurveExtrusion(ByVal nId As Integer, ByRef VtExtr As Vector3d) As Boolean
Return EgtCurveExtrusion(nId, nId, VtExtr)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCurveThickness(ByVal nId As Integer, ByRef dThick As Double) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetMinDistPointCurve(ByRef ptP As Point3d, ByVal nId As Integer, ByRef dDist As Double) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetMinDistPntSidePointCurve(ByRef ptP As Point3d, ByVal nId As Integer, ByRef vtN As Vector3d,
ByRef dDist As Double, ByRef ptMin As Point3d, ByRef nSide As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtExtTextNormVersor(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean
End Function
Public Function EgtExtTextNormVersor(ByVal nId As Integer, ByRef VtNorm As Vector3d) As Boolean
Return EgtExtTextNormVersor(nId, nId, VtNorm)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCurveArcNormVersor(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean
End Function
Public Function EgtCurveArcNormVersor(ByVal nId As Integer, ByRef VtNorm As Vector3d) As Boolean
Return EgtCurveArcNormVersor(nId, nId, VtNorm)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtPointToIdGlob(ByRef PtP As Point3d, ByVal nId As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtPointToIdLoc(ByRef PtP As Point3d, ByVal nId As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtVectorToIdGlob(ByRef VtV As Vector3d, ByVal nId As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtVectorToIdLoc(ByRef VtV As Vector3d, ByVal nId As Integer) As Boolean
End Function
'---------- Scene --------------------------------------------------------------
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtInitScene(ByVal hWnd As IntPtr, ByVal nDriver As Integer,
ByVal b2Buff As Boolean, ByVal nColorBits As Integer, ByVal nDepthBits As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtGetSceneInfo(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 = EgtGetSceneInfo(psInfo)
sInfo = Marshal.PtrToStringUni(psInfo)
EgtFreeMemory(psInfo)
Return bOk
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSetBackground(ByRef colTop As Color3d, ByRef colBottom As Color3d, Optional ByVal bRedraw As Boolean = True) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSetMarkAttribs(ByRef colMark As Color3d) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSetSelSurfAttribs(ByRef colSelSurf As Color3d) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSetGeoLineAttribs(ByRef colGl As Color3d) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSetGeoTriaAttribs(ByRef colGt As Color3d) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSetWinRectAttribs(ByVal bOutline As Boolean, ByRef colWr As Color3d) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSetGlobFrameShow(ByVal bShow As Boolean) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSetGridShow(ByVal bShowGrid As Boolean, ByVal bShowFrame As Boolean) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSetGridGeo(ByVal dSnapStep As Double, ByVal nMinLineSstep As Integer, ByVal nMajLineSstep As Integer, ByVal nExtSstep As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSetGridColor(ByRef colMinLine As Color3d, ByRef colMajLine As Color3d) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtResize(ByVal nW As Integer, ByVal nH As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtDraw() As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtSelect(ByVal nWinX As Integer, ByVal nWinY As Integer,
ByVal nSelW As Integer, ByVal nSelH As Integer, ByRef nSel As Integer) As Boolean
End Function
Public Function EgtSelect(ByVal Curr As Point, ByVal nSelW As Integer, ByVal nSelH As Integer,
ByRef nSel As Integer) As Boolean
Return EgtSelect(Curr.X, Curr.Y, nSelW, nSelH, nSel)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetFirstObjInSelWin() As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetNextObjInSelWin() As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtUnselectableAdd(ByVal nId As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtUnselectableRemove(ByVal nId As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtUnselectableClearAll() As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtGetPointFromSelect(ByVal nSelId As Integer, ByVal nWinX As Integer, ByVal nWinY As Integer,
ByRef ptP As Point3d) As Boolean
End Function
Public Function EgtGetPointFromSelect(ByVal nSelId As Integer, ByVal PtWin As Point, ByRef ptP As Point3d) As Boolean
Return EgtGetPointFromSelect(nSelId, PtWin.X, PtWin.Y, ptP)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtGetGraphicSnapPoint(ByVal nSnap As Integer,
ByVal nWinX As Integer, ByVal nWinY As Integer, ByVal nSelW As Integer, ByVal nSelH As Integer,
ByRef ptP As Point3d) As Boolean
End Function
Public Function EgtGetGraphicSnapPoint(ByVal nSnap As Integer,
ByVal PtWin As Point, ByVal nSelW As Integer, ByVal nSelH As Integer,
ByRef ptP As Point3d) As Boolean
Return EgtGetGraphicSnapPoint(nSnap, PtWin.X, PtWin.Y, nSelW, nSelH, ptP)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtGetGridSnapPointZ(ByVal bSketch As Boolean,
ByVal nWinX As Integer, ByVal nWinY As Integer, ByRef ptGrid As Point3d,
ByRef ptP As Point3d) As Boolean
End Function
Public Function EgtGetGridSnapPointZ(ByVal bSketch As Boolean,
ByVal PtWin As Point, ByVal ptGrid As Point3d,
ByRef ptP As Point3d) As Boolean
Return EgtGetGridSnapPointZ(bSketch, PtWin.X, PtWin.Y, ptGrid, ptP)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetLastSnapId() As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetLastSnapDir(ByRef VtDir As Vector3d) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSetShowMode(ByVal nShowMode As SM, Optional ByVal bRedraw As Boolean = True) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetShowMode() As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSetShowCurveDirection(ByVal bShow As Boolean, Optional ByVal bRedraw As Boolean = True) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetShowCurveDirection() As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtZoom(ByVal nZoom As ZM, Optional ByVal bRedraw As Boolean = True) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtZoomOnPoint(ByVal nWinX As Integer, ByVal nWinY As Integer, ByVal dCoeff As Double, ByVal bRedraw As Boolean) As Boolean
End Function
Public Function EgtZoomOnPoint(ByVal Curr As Point, ByVal dCoeff As Double, Optional ByVal bRedraw As Boolean = True) As Boolean
Return EgtZoomOnPoint(Curr.X, Curr.Y, dCoeff, bRedraw)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSetGeoLine(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d, Optional ByVal bRedraw As Boolean = True) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtResetGeoLine(Optional ByVal bRedraw As Boolean = True) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSetGeoTria(ByRef ptP1 As Point3d, ByRef ptP2 As Point3d, ByRef ptP3 As Point3d, Optional ByVal bRedraw As Boolean = True) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtResetGeoTria(Optional ByVal bRedraw As Boolean = True) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtSetWinRect(ByVal nPrevX As Integer, ByVal nPrevY As Integer, ByVal nCurrX As Integer, ByVal nCurrY As Integer, ByVal bRedraw As Boolean) As Boolean
End Function
Public Function EgtSetWinRect(ByVal Prev As Point, ByVal Curr As Point, Optional ByVal bRedraw As Boolean = True) As Boolean
Return EgtSetWinRect(Prev.X, Prev.Y, Curr.X, Curr.Y, bRedraw)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtResetWinRect(Optional ByVal bRedraw As Boolean = True) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtZoomWin(ByVal nPrevX As Integer, ByVal nPrevY As Integer, ByVal nCurrX As Integer, ByVal nCurrY As Integer, ByVal bRedraw As Boolean) As Boolean
End Function
Public Function EgtZoomWin(ByVal Prev As Point, ByVal Curr As Point, Optional ByVal bRedraw As Boolean = True) As Boolean
Return EgtZoomWin(Prev.X, Prev.Y, Curr.X, Curr.Y, bRedraw)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtSetView(ByVal nView As VT, Optional ByVal bRedraw As Boolean = True) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtPanCamera(ByVal nPrevX As Integer, ByVal nPrevY As Integer, ByVal nCurrX As Integer, ByVal nCurrY As Integer, ByVal bRedraw As Boolean) As Boolean
End Function
Public Function EgtPanCamera(ByVal Prev As Point, ByVal Curr As Point, Optional ByVal bRedraw As Boolean = True) As Boolean
Return EgtPanCamera(Prev.X, Prev.Y, Curr.X, Curr.Y, bRedraw)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtRotateCamera(ByVal nPrevX As Integer, ByVal nPrevY As Integer, ByVal nCurrX As Integer, ByVal nCurrY As Integer, ByVal bRedraw As Boolean) As Boolean
End Function
Public Function EgtRotateCamera(ByVal Prev As Point, ByVal Curr As Point, Optional ByVal bRedraw As Boolean = True) As Boolean
Return EgtRotateCamera(Prev.X, Prev.Y, Curr.X, Curr.Y, bRedraw)
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtGetCameraDir(ByRef nDir As Integer) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtProjectPoint(ByRef ptP As Point3d, ByRef ptWin As Point3d) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtUnProjectPoint(ByVal nWinX As Integer, ByVal nWinY As Integer, ByRef ptP As Point3d) As Boolean
End Function
Public Function EgtUnProjectPoint(ByVal Curr As Point, ByRef ptP As Point3d) As Boolean
Return EgtUnProjectPoint(Curr.X, Curr.Y, ptP)
End Function
'---------- Tsc Executor -------------------------------------------------------
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtInitTscExec() As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtTscExecFile(ByVal sFilePath As String) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtTscExecLine(ByVal sLine As String) As Boolean
End Function
'---------- LUA Executor -------------------------------------------------------
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtLuaEvalNumExpr(ByVal sLine As String, ByRef dVal As Double) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtLuaEvalStringExpr(ByVal sLine As String, ByRef psVal As IntPtr) As Boolean
End Function
Public Function EgtLuaEvalStringExpr(ByVal sLine As String, ByRef sVal As String) As Boolean
Dim psVal As IntPtr
Dim bOk As Boolean = EgtLuaEvalStringExpr(sLine, psVal)
sVal = Marshal.PtrToStringUni(psVal)
EgtFreeMemory(psVal)
Return bOk
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtLuaExecLine(ByVal sLine As String) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtLuaExecFile(ByVal sFilePath As String) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtLuaRequire(ByVal sFilePath As String) As Boolean
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Private Function EgtLuaGetLastError(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 = EgtLuaGetLastError(psError)
sError = Marshal.PtrToStringUni(psError)
EgtFreeMemory(psError)
Return bOk
End Function
'Costanti : GEOMETRIA
Public Const EPS_SMALL As Double = 0.001
Public Const EPS_ZERO As Double = 0.0000001
Public Const EPS_STM As Double = 0.05
Public Const EPS_STM_DRAG As Double = 0.5
'Costanti : TIPO DI FILE
Public Enum FT As Integer
NULL = 0
NGE = 1
NFE = 2
DXF = 11
STL = 12
CNC = 13
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
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
VOL_ZMAP = 1024
EXT_TEXT = 2048
End Enum
'Costanti : TIPO RIFERIMENTO DI DATI GEOMETRICI
Public Enum REF_TY As Integer
GLOB = 0
LOC = 1
GRID = 2
End Enum
'Costanti : POSIZIONE DI COPIA DI UN OGGETTO
Public Enum GDB_POS As Integer
BEFORE = -1
SON = 0
AFTER = 1
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 : TIPO VISUALIZZAZIONE
Public Enum SM As Integer
WIREFRAME = 0
HIDDENLINE = 1
SHADING = 2
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
PT_NEAR = 6
PT_INTERS = 7
PT_TANGENT = 8
PT_PERPENDICULAR = 9
PT_MINDIST = 10
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 : flag per BBOX
Public Enum BBF As Integer
STANDARD = 0
ONLY_VISIBLE = 1
IGNORE_TEXT = 2
IGNORE_DIM = 4
EXACT = 8
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 : 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 : interruzione di riga
Public Const LINE_BREAK As String = "<br/>"
End Module