TestEIn 1.6o3 :

- aggiornamento.
This commit is contained in:
Dario Sassi
2016-03-29 09:11:02 +00:00
parent b9087e2c64
commit 1c737aaab7
2 changed files with 431 additions and 12 deletions
+429 -10
View File
@@ -369,6 +369,18 @@ Class Frame3d
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
@@ -391,6 +403,9 @@ Class Frame3d
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()
@@ -421,6 +436,40 @@ Class Frame3d
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
@@ -446,21 +495,26 @@ Class Frame3d
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
Function Orig() As Point3d
Public Function Orig() As Point3d
Return PtOrig
End Function
Function VersX() As Vector3d
Public Function VersX() As Vector3d
Return VtDirX
End Function
Function VersY() As Vector3d
Public Function VersY() As Vector3d
Return VtDirY
End Function
Function VersZ() As Vector3d
Public Function VersZ() As Vector3d
Return VtDirZ
End Function
' Traslazione
Function Move(ByRef VtMove As Vector3d) As Boolean
Public Function Move(ByRef VtMove As Vector3d) As Boolean
If bOk Then
Return EgtFrameTranslate(PtOrig, VtDirX, VtDirY, VtDirZ, VtMove)
Else
@@ -468,7 +522,7 @@ Class Frame3d
End If
End Function
' Rotazione
Function Rotate(ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngRotDeg As Double) As Boolean
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
@@ -476,7 +530,7 @@ Class Frame3d
End If
End Function
' Cambio di riferimento : dal riferimento al globale
Function ToGlob(ByRef frRef As Frame3d) As Boolean
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())
@@ -485,7 +539,7 @@ Class Frame3d
End If
End Function
' Cambio di riferimento : dal globale al riferimento
Function ToLoc(ByRef frRef As Frame3d) As Boolean
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())
@@ -494,8 +548,8 @@ Class Frame3d
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
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())
@@ -509,6 +563,150 @@ Class 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
' 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
Return PtMax.x - PtMin.x
End Function
Public Function DimY() As Double
Return PtMax.y - PtMin.y
End Function
Public Function DimZ() As Double
Return PtMax.z - PtMin.z
End Function
Public Function Center() As Point3d
Return Point3d.Media(PtMin, PtMax)
End Function
Public Function Radius() As Double
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
End Class
Structure Color3d
' Membri
Dim R, G, B, A As Integer
@@ -2261,6 +2459,14 @@ Public Function EgtCreateSurfTmBBox(nParentId As Integer, ByRef ptMin As Point3d
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
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtCreateSurfTmByFlatContour")>
Private Function EgtCreateSurfTmByFlatContour_32(nParentId As Integer, nCrvId As Integer, dLinTol As Double) As Integer
@@ -2610,6 +2816,20 @@ Public Function EgtApproxCurve(nId As Integer, nApprType As Integer, dLinTol As
End If
End Function
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtProjectCurveOnPlane")>
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
<DllImport(EgtIntDll64, CharSet:=CharSet.Unicode, EntryPoint:="EgtProjectCurveOnPlane")>
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
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtChangeClosedCurveStartPoint")>
Private Function EgtChangeClosedCurveStartPoint_32(nId As Integer, ByRef PtStart As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean
End Function
@@ -2806,6 +3026,62 @@ Public Function EgtModifyArc3P(nId As Integer, ByRef PtMid As Point3d, Optional
End If
End Function
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtCloseCurveCompo")>
Private Function EgtCloseCurveCompo_32(nId As Integer) As Boolean
End Function
<DllImport(EgtIntDll64, CharSet:=CharSet.Unicode, EntryPoint:="EgtCloseCurveCompo")>
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
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtAddCurveCompoLine")>
Private Function EgtAddCurveCompoLine_32(nId As Integer, ByRef PtNew As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean
End Function
<DllImport(EgtIntDll64, CharSet:=CharSet.Unicode, EntryPoint:="EgtAddCurveCompoLine")>
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
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtAddCurveCompoArcTg")>
Private Function EgtAddCurveCompoArcTg_32(nId As Integer, ByRef PtNew As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean
End Function
<DllImport(EgtIntDll64, CharSet:=CharSet.Unicode, EntryPoint:="EgtAddCurveCompoArcTg")>
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
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtAddCurveCompoArc2P")>
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
<DllImport(EgtIntDll64, CharSet:=CharSet.Unicode, EntryPoint:="EgtAddCurveCompoArc2P")>
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
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtAddCurveCompoJoint")>
Private Function EgtAddCurveCompoJoint_32(nId As Integer, dU As Double) As Boolean
End Function
@@ -3454,6 +3730,18 @@ Public Function EgtGetBBox(nId As Integer, nFlag As Integer,
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
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtGetBBoxGlob")>
Private Function EgtGetBBoxGlob_32(nId As Integer, nFlag As Integer,
@@ -3471,6 +3759,18 @@ Public Function EgtGetBBoxGlob(nId As Integer, nFlag As Integer,
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
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtCopy")>
Private Function EgtCopy_32(nId As Integer, nRefId As Integer, Optional nSonBeforeAfter As GDB_POS = GDB_POS.LAST_SON) As Integer
@@ -4839,6 +5139,34 @@ Public Function EgtCurveLengthAtPoint(nId As Integer, ptOn As Point3d, ByRef dLe
Return EgtCurveLengthAtPoint(nId, ptOn, 0, dLen)
End Function
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtCurveIsClosed")>
Private Function EgtCurveIsClosed_32(nId As Integer) As Boolean
End Function
<DllImport(EgtIntDll64, CharSet:=CharSet.Unicode, EntryPoint:="EgtCurveIsClosed")>
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
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtCurveIsFlat")>
Private Function EgtCurveIsFlat_32(nId As Integer, ByRef VtN As Vector3d, ByRef dDist As Double) As Boolean
End Function
<DllImport(EgtIntDll64, CharSet:=CharSet.Unicode, EntryPoint:="EgtCurveIsFlat")>
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
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtCurveAreaXY")>
Private Function EgtCurveAreaXY_32(nId As Integer, ByRef dArea As Double) As Boolean
End Function
@@ -4853,6 +5181,20 @@ Public Function EgtCurveAreaXY(nId As Integer, ByRef dArea As Double) As Boolean
End If
End Function
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtCurveArea")>
Private Function EgtCurveArea_32(nId As Integer, ByRef VtN As Vector3d, ByRef dDist As Double, ByRef dArea As Double) As Boolean
End Function
<DllImport(EgtIntDll64, CharSet:=CharSet.Unicode, EntryPoint:="EgtCurveArea")>
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
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtCurveNearestExtremityToPoint")>
Private Function EgtCurveNearestExtremityToPoint_32(nId As Integer, ByRef ptP As Point3d, ByRef bStart As Boolean) As Boolean
End Function
@@ -5222,6 +5564,18 @@ Public Function EgtGetClusterBBoxGlob(vId As Integer(),
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
@@ -5231,6 +5585,20 @@ Public Function EgtGetPartBBoxGlob(nPartId As Integer, ByRef PtMin As Point3d, B
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
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtCreateOutRegionRectangle")>
Private Function EgtCreateOutRegionRectangle_32(nParentId As Integer,
@@ -8675,6 +9043,23 @@ Private Function EgtFrameOCS(ByRef PtO As Point3d, ByRef VtDirZ As Vector3d,
End If
End Function
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtFrameGetType")>
Private Function EgtFrameGetType_32(ByRef PtOrig As Point3d,
ByRef VtX As Vector3d, ByRef VtY As Vector3d, ByRef VtZ As Vector3d) As Integer
End Function
<DllImport(EgtIntDll64, CharSet:=CharSet.Unicode, EntryPoint:="EgtFrameGetType")>
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
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtFrameTranslate")>
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
@@ -8763,6 +9148,40 @@ Private Function EgtFrameLocToLoc(ByRef PtOrig As Point3d, ByRef VtX As Vector3d
End If
End Function
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtBBoxTranslate")>
Private Function EgtBBoxTranslate_32(ByRef PtMin As Point3d, ByRef PtMax As Point3d,
ByRef VtMove As Vector3d) As Boolean
End Function
<DllImport(EgtIntDll64, CharSet:=CharSet.Unicode, EntryPoint:="EgtBBoxTranslate")>
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
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtBBoxRotate")>
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
<DllImport(EgtIntDll64, CharSet:=CharSet.Unicode, EntryPoint:="EgtBBoxRotate")>
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
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtBBoxToGlob")>
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
+2 -2
View File
@@ -46,5 +46,5 @@ Imports System.Runtime.InteropServices
' utilizzando l'asterisco (*) come descritto di seguito:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.6.15.2")>
<Assembly: AssemblyFileVersion("1.6.15.2")>
<Assembly: AssemblyVersion("1.6.15.3")>
<Assembly: AssemblyFileVersion("1.6.15.3")>