EgtUILib 1.6c1 :
- aggiornamento libreria.
This commit is contained in:
+751
-131
File diff suppressed because it is too large
Load Diff
+235
-33
@@ -498,6 +498,12 @@ Structure Color3d
|
||||
B = nBlue
|
||||
A = nAlpha
|
||||
End Sub
|
||||
Sub New(ByRef colSou As Color3d)
|
||||
R = colSou.R
|
||||
G = colSou.G
|
||||
B = colSou.B
|
||||
A = colSou.A
|
||||
End Sub
|
||||
' Inizializzatori
|
||||
Sub Setup(ByVal nRed As Integer, ByVal nGreen As Integer, ByVal nBlue As Integer, Optional ByVal nAlpha As Integer = 100)
|
||||
R = nRed
|
||||
@@ -535,7 +541,7 @@ Const EgtIntDll As String = "EgtInterfaceR32.dll"
|
||||
|
||||
'---------- General ------------------------------------------------------------
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
Public Function EgtInit(ByVal nDebug As Integer, ByVal sLogFile As String) As Boolean
|
||||
Public Function EgtInit(ByVal nDebug As Integer, ByVal sLogFile As String, Optional ByVal sLogMsg As String = "") As Boolean
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
@@ -596,6 +602,66 @@ End Sub
|
||||
Public Sub EgtDisableCommandLogger()
|
||||
End Sub
|
||||
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
Private Function EgtGetVersionInfo(ByRef psVerInfo As IntPtr) As Boolean
|
||||
End Function
|
||||
Public Function EgtGetVersionInfo(ByRef sVerInfo As String) As Boolean
|
||||
Dim psVerInfo As IntPtr
|
||||
Dim bOk As Boolean = EgtGetVersionInfo(psVerInfo)
|
||||
If bOk Then
|
||||
sVerInfo = Marshal.PtrToStringUni(psVerInfo)
|
||||
EgtFreeMemory(psVerInfo)
|
||||
Else
|
||||
sVerInfo = String.Empty
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
Private Function EgtGetOsInfo(ByRef psOsInfo As IntPtr) As Boolean
|
||||
End Function
|
||||
Public Function EgtGetOsInfo(ByRef sOsInfo As String) As Boolean
|
||||
Dim psOsInfo As IntPtr
|
||||
Dim bOk As Boolean = EgtGetOsInfo(psOsInfo)
|
||||
If bOk Then
|
||||
sOsInfo = Marshal.PtrToStringUni(psOsInfo)
|
||||
EgtFreeMemory(psOsInfo)
|
||||
Else
|
||||
sOsInfo = String.Empty
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
Private Function EgtGetCpuInfo(ByRef psCpuInfo As IntPtr) As Boolean
|
||||
End Function
|
||||
Public Function EgtGetCpuInfo(ByRef sCpuInfo As String) As Boolean
|
||||
Dim psCpuInfo As IntPtr
|
||||
Dim bOk As Boolean = EgtGetCpuInfo(psCpuInfo)
|
||||
If bOk Then
|
||||
sCpuInfo = Marshal.PtrToStringUni(psCpuInfo)
|
||||
EgtFreeMemory(psCpuInfo)
|
||||
Else
|
||||
sCpuInfo = String.Empty
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
Private Function EgtGetMemoryInfo(ByRef psMemInfo As IntPtr) As Boolean
|
||||
End Function
|
||||
Public Function EgtGetMemoryInfo(ByRef sMemInfo As String) As Boolean
|
||||
Dim psMemInfo As IntPtr
|
||||
Dim bOk As Boolean = EgtGetMemoryInfo(psMemInfo)
|
||||
If bOk Then
|
||||
sMemInfo = Marshal.PtrToStringUni(psMemInfo)
|
||||
EgtFreeMemory(psMemInfo)
|
||||
Else
|
||||
sMemInfo = String.Empty
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
Public Function EgtFreeMemory(ByVal sB As IntPtr) As Boolean
|
||||
End Function
|
||||
@@ -876,6 +942,12 @@ 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 EgtCreateCurveCircleCPNEx(ByVal nParentId As Integer,
|
||||
ByRef PtCen As Point3d, ByRef PtOn As Point3d, ByVal nSepO As SEP, ByVal nIdO As Integer,
|
||||
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
|
||||
@@ -887,12 +959,24 @@ Public Function EgtCreateCurveArcC2PN(ByVal nParentId As Integer,
|
||||
ByRef VtNorm As Vector3d, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Integer
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
Public Function EgtCreateCurveArcC2PNEx(ByVal nParentId As Integer,
|
||||
ByRef PtCen As Point3d, ByRef PtStart As Point3d, ByVal nSepS As SEP, ByVal nIdS As Integer,
|
||||
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 EgtCreateCurveArc2PVNEx(ByVal nParentId As Integer, ByRef PtStart As Point3d,
|
||||
ByRef PtEnd As Point3d, ByVal nSepE As SEP, ByVal nIdE As Integer,
|
||||
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
|
||||
@@ -904,29 +988,61 @@ Public Function EgtCreateRectangle3P(ByVal nParentId As Integer,
|
||||
ByRef PtDir As Point3d, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Integer
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
Public Function EgtCreatePolygonFromRadius(ByVal nParentId As Integer, ByVal nNumSides As Integer, ByRef PtCen As Point3d,
|
||||
ByRef PtCorn 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 EgtCreatePolygonFromApothem(ByVal nParentId As Integer, ByVal nNumSides As Integer, ByRef PtCen As Point3d,
|
||||
ByRef PtMid 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 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
|
||||
Public Function EgtCreateSurfTmByFlatContour(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
|
||||
Public Function EgtCreateSurfTmByRegion(ByVal nParentId As Integer, ByVal nNumCrv As Integer, ByVal nCrvId() As Integer, ByVal dLinTol As Double) 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
|
||||
Public Function EgtCreateSurfTmByExtrusion(ByVal nParentId As Integer, ByVal nNumCrv 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 EgtCreateSurfTriMeshRuled(ByVal nParentId As Integer, ByVal nCrvId1 As Integer, ByVal nCrvId2 As Integer, ByVal dLinTol As Double) As Integer
|
||||
Public Function EgtCreateSurfTmByRegionExtrusion(ByVal nParentId As Integer, ByVal nNumCrv 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 EgtCreateSurfTmByRevolve(ByVal nParentId As Integer, ByVal nCrvId As Integer,
|
||||
ByRef PtAx As Point3d, ByRef VtAx As Vector3d,
|
||||
ByVal bCapEnds As Boolean, ByVal dLinTol As Double,
|
||||
Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Integer
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
Public Function EgtCreateSurfTmByScrewing(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 EgtCreateSurfTmRuled(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 EgtCreateSurfTmBySewing(ByVal nParentId As Integer, ByVal nNumSrf As Integer, ByVal nSrfId() As Integer, ByVal bSrfErase As Boolean) As Integer
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
@@ -983,6 +1099,10 @@ End Function
|
||||
Public Function EgtInvertCurve(ByVal nId As Integer) As Boolean
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
Public Function EgtChangeClosedCurveStartPoint(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 EgtModifyCurveStartPoint(ByVal nId As Integer, ByRef PtStart As Point3d, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Boolean
|
||||
End Function
|
||||
@@ -1011,6 +1131,10 @@ End Function
|
||||
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 EgtSplitCurve(ByVal nId As Integer, ByVal nParts As Integer) 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
|
||||
@@ -1040,7 +1164,7 @@ 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
|
||||
Public Function EgtExplodeCurveBezier(ByVal nId As Integer, ByVal bArcsVsLines As Boolean, ByVal dLinTol As Double) As Boolean
|
||||
End Function
|
||||
|
||||
|
||||
@@ -1093,6 +1217,10 @@ End Function
|
||||
Public Function EgtDeselectLayerObjs(ByVal nLayerId As Integer) As Boolean
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
Public Function EgtSelectPathObjs(ByVal nId As Integer, ByVal bHaltOnFork As Boolean) As Boolean
|
||||
End Function
|
||||
|
||||
|
||||
'---------- GeomDb Objects -----------------------------------------------------
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
@@ -1183,6 +1311,10 @@ End Function
|
||||
Public Function EgtErase(ByVal nId As Integer) As Boolean
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
Public Function EgtEmptyGroup(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
|
||||
@@ -1304,7 +1436,11 @@ Public Function EgtGetCalcMark(ByVal nId As Integer, ByRef bMark As Boolean) As
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
Public Function EgtSetColor(ByVal nId As Integer, ByRef ColObj As Color3d) As Boolean
|
||||
Public Function EgtSetColor(ByVal nId As Integer, ByRef ColObj As Color3d, Optional ByVal bSetAlpha As Boolean = True) As Boolean
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
Public Function EgtSetAlpha(ByVal nId As Integer, ByVal nAlpha As Integer) As Boolean
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
@@ -1516,6 +1652,13 @@ Public Function EgtCenterPoint(ByVal nId As Integer, ByRef PtP As Point3d) As Bo
|
||||
Return EgtCenterPoint(nId, nId, PtP)
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
Public Function EgtCentroid(ByVal nId As Integer, ByVal nRefId As Integer, ByRef PtP As Point3d) As Boolean
|
||||
End Function
|
||||
Public Function EgtCentroid(ByVal nId As Integer, ByRef PtP As Point3d) As Boolean
|
||||
Return EgtCentroid(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
|
||||
@@ -1595,13 +1738,6 @@ Public Function EgtGetMinDistPntSidePointCurve(ByRef ptP As Point3d, ByVal nId A
|
||||
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
|
||||
@@ -1609,6 +1745,40 @@ Public Function EgtCurveArcNormVersor(ByVal nId As Integer, ByRef VtNorm As Vect
|
||||
Return EgtCurveArcNormVersor(nId, nId, VtNorm)
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
Public Function EgtSurfTmFacetFromTria(ByVal nId As Integer, ByVal nT As Integer) As Integer
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
Public Function EgtSurfTmFacetNearestEndPoint(ByVal nId As Integer, ByVal nF As Integer, ByRef PtNear As Point3d, ByVal nRefId As Integer,
|
||||
ByRef PtP As Point3d, ByRef VtNorm As Vector3d) As Boolean
|
||||
End Function
|
||||
Public Function EgtSurfTmFacetNearestEndPoint(ByVal nId As Integer, ByVal nF As Integer, ByRef PtNear As Point3d,
|
||||
ByRef PtP As Point3d, ByRef VtNorm As Vector3d) As Boolean
|
||||
Return EgtSurfTmFacetNearestEndPoint(nId, nF, PtNear, nId, PtP, VtNorm)
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
Public Function EgtSurfTmFacetCenter(ByVal nId As Integer, ByVal nF As Integer, ByVal nRefId As Integer, ByRef PtP As Point3d, ByRef VtNorm As Vector3d) As Boolean
|
||||
End Function
|
||||
Public Function EgtSurfTmFacetCenter(ByVal nId As Integer, ByVal nF As Integer, ByRef PtP As Point3d, ByRef VtNorm As Vector3d) As Boolean
|
||||
Return EgtSurfTmFacetCenter(nId, nF, nId, PtP, VtNorm)
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
Public Function EgtSurfTmFacetNormVersor(ByVal nId As Integer, ByVal nF As Integer, ByVal nRefId As Integer, ByRef VtNorm As Vector3d) As Boolean
|
||||
End Function
|
||||
Public Function EgtSurfTmFacetNormVersor(ByVal nId As Integer, ByVal nF As Integer, ByRef VtNorm As Vector3d) As Boolean
|
||||
Return EgtSurfTmFacetNormVersor(nId, nF, nId, VtNorm)
|
||||
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)>
|
||||
Private Function EgtPointToIdGlob(ByRef PtP As Point3d, ByVal nId As Integer) As Boolean
|
||||
End Function
|
||||
@@ -1726,10 +1896,10 @@ 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
|
||||
ByRef ptP As Point3d, ByRef nAux As Integer) 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)
|
||||
Public Function EgtGetPointFromSelect(ByVal nSelId As Integer, ByVal PtWin As Point, ByRef ptP As Point3d, ByRef nAux As Integer) As Boolean
|
||||
Return EgtGetPointFromSelect(nSelId, PtWin.X, PtWin.Y, ptP, nAux)
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
@@ -1762,6 +1932,11 @@ End Function
|
||||
Public Function EgtGetLastSnapDir(ByRef VtDir As Vector3d) As Boolean
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
Public Function EgtSetObjFilterForSnap(ByVal bZeroDim As Boolean, ByVal bCurve As Boolean,
|
||||
ByVal bSurf As Boolean, ByVal bVolume As Boolean, ByVal bExtra As Boolean) 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
|
||||
@@ -1778,6 +1953,14 @@ End Function
|
||||
Public Function EgtGetShowCurveDirection() As Boolean
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
Public Function EgtSetShowTriaAdv(ByVal bAdvanced As Boolean, Optional ByVal bRedraw As Boolean = True) As Boolean
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
Public Function EgtGetShowTriaAdv() 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
|
||||
@@ -1828,21 +2011,25 @@ Public Function EgtSetView(ByVal nView As VT, Optional ByVal bRedraw 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
|
||||
Private Function EgtPanView(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)
|
||||
Public Function EgtPanView(ByVal Prev As Point, ByVal Curr As Point, Optional ByVal bRedraw As Boolean = True) As Boolean
|
||||
Return EgtPanView(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
|
||||
Private Function EgtRotateView(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)
|
||||
Public Function EgtRotateView(ByVal Prev As Point, ByVal Curr As Point, Optional ByVal bRedraw As Boolean = True) As Boolean
|
||||
Return EgtRotateView(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
|
||||
Public Function EgtGetView(ByRef nDir As Integer) As Boolean
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
Public Function EgtGetGenericView(ByRef dAngVertDeg As Double, ByRef dAngHorizDeg As Double) As Boolean
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
@@ -1984,6 +2171,20 @@ Private Function EgtFrameLocToLoc(ByRef PtOrig As Point3d, ByRef VtX As Vector3d
|
||||
End Function
|
||||
|
||||
|
||||
'---------- Messages -----------------------------------------------------------
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
Public Function EgtLoadMessages(ByVal sMsgFilePath As String) As Boolean
|
||||
End Function
|
||||
|
||||
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
|
||||
Private Function EgtGetMsg(ByVal nId As Integer) As IntPtr
|
||||
End Function
|
||||
Public Function EgtMsg(ByVal nId As Integer) As String
|
||||
Return Marshal.PtrToStringUni(EgtGetMsg(nId))
|
||||
' Non è necessario liberare la memoria nativa perchè usa un buffer statico
|
||||
End Function
|
||||
|
||||
|
||||
'---------- Costanti -----------------------------------------------------------
|
||||
'Costanti : GEOMETRIA
|
||||
Public Const EPS_SMALL As Double = 0.001
|
||||
@@ -2094,11 +2295,12 @@ Public Enum SP As Integer
|
||||
PT_END = 3
|
||||
PT_MID = 4
|
||||
CENTER = 5
|
||||
PT_NEAR = 6
|
||||
PT_INTERS = 7
|
||||
PT_TANGENT = 8
|
||||
PT_PERPENDICULAR = 9
|
||||
PT_MINDIST = 10
|
||||
CENTROID = 6
|
||||
PT_NEAR = 7
|
||||
PT_INTERS = 8
|
||||
PT_TANGENT = 9
|
||||
PT_PERPENDICULAR = 10
|
||||
PT_MINDIST = 11
|
||||
End Enum
|
||||
'Costanti : TIPO SELECTED POINT
|
||||
Public Enum SEP As Integer
|
||||
|
||||
@@ -145,4 +145,15 @@ Public Const MF_SEPARATOR As UInt32 = &H800
|
||||
Public Const WM_SYSCOMMAND As UInt32 = &H112
|
||||
Public Const IDM_ABOUTBOX As UInt32 = &H10
|
||||
|
||||
'-------------------------------- Windows --------------------------------------------------------
|
||||
<DllImport("user32.dll")>
|
||||
Public Function ShowWindow(ByVal hWnd As IntPtr, ByVal nCmdShow As Integer) As Boolean
|
||||
End Function
|
||||
Public Enum SW As Integer
|
||||
HIDE = 0
|
||||
SHOWMAXIMIZED = 3
|
||||
RESTORE = 9
|
||||
End Enum
|
||||
|
||||
|
||||
End Module
|
||||
|
||||
@@ -42,5 +42,5 @@ Imports System.Runtime.InteropServices
|
||||
' È possibile specificare tutti i valori oppure impostare valori predefiniti per i numeri relativi alla revisione e alla build
|
||||
' utilizzando l'asterisco (*) come descritto di seguito:
|
||||
|
||||
<Assembly: AssemblyVersion("1.6.1.7")>
|
||||
<Assembly: AssemblyFileVersion("1.6.1.7")>
|
||||
<Assembly: AssemblyVersion("1.6.3.1")>
|
||||
<Assembly: AssemblyFileVersion("1.6.3.1")>
|
||||
|
||||
Generated
+79
-27
@@ -28,142 +28,187 @@ Partial Class Scene
|
||||
Me.cmdDeselectAll = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.sepSel1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.cmdWinSelect = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.cmdSelectLayer = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.cmdSelectPart = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.cmdSelectLayer = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.cmdSelectPath = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.cmdSelectPathAuto = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.cmdRestartDrag = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.cmdSketchPoint = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.cmdGridPoint = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.cmdEndPoint = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.cmdMidPoint = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.cmdCenterPoint = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.cmdCentroid = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.cmdNearPoint = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.cmdIntersectionPoint = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.cmdTangentPoint = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.cmdPerpendicularPoint = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.cmdMinDistPoint = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.sepSelPnt1 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.cmdExcludeSurfForSnap = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.sepSelPnt2 = New System.Windows.Forms.ToolStripSeparator()
|
||||
Me.cmdStopDrag = New System.Windows.Forms.ToolStripMenuItem()
|
||||
Me.MenuScene.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'MenuScene
|
||||
'
|
||||
Me.MenuScene.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.cmdSelectAll, Me.cmdDeselectAll, Me.sepSel1, Me.cmdWinSelect, Me.cmdSelectLayer, Me.cmdSelectPart, Me.cmdRestartDrag, Me.cmdSketchPoint, Me.cmdGridPoint, Me.cmdEndPoint, Me.cmdMidPoint, Me.cmdCenterPoint, Me.cmdNearPoint, Me.cmdIntersectionPoint, Me.cmdTangentPoint, Me.cmdPerpendicularPoint, Me.cmdMinDistPoint, Me.sepSelPnt1, Me.cmdStopDrag})
|
||||
Me.MenuScene.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.cmdSelectAll, Me.cmdDeselectAll, Me.sepSel1, Me.cmdWinSelect, Me.cmdSelectPart, Me.cmdSelectLayer, Me.cmdSelectPath, Me.cmdSelectPathAuto, Me.cmdRestartDrag, Me.cmdSketchPoint, Me.cmdGridPoint, Me.cmdEndPoint, Me.cmdMidPoint, Me.cmdCenterPoint, Me.cmdCentroid, Me.cmdNearPoint, Me.cmdIntersectionPoint, Me.cmdTangentPoint, Me.cmdPerpendicularPoint, Me.cmdMinDistPoint, Me.sepSelPnt1, Me.cmdExcludeSurfForSnap, Me.sepSelPnt2, Me.cmdStopDrag})
|
||||
Me.MenuScene.Name = "ContextMenuStrip1"
|
||||
Me.MenuScene.ShowCheckMargin = True
|
||||
Me.MenuScene.ShowImageMargin = False
|
||||
Me.MenuScene.Size = New System.Drawing.Size(179, 412)
|
||||
Me.MenuScene.Size = New System.Drawing.Size(193, 484)
|
||||
'
|
||||
'cmdSelectAll
|
||||
'
|
||||
Me.cmdSelectAll.Name = "cmdSelectAll"
|
||||
Me.cmdSelectAll.Size = New System.Drawing.Size(178, 22)
|
||||
Me.cmdSelectAll.Size = New System.Drawing.Size(192, 22)
|
||||
Me.cmdSelectAll.Text = "Select All"
|
||||
'
|
||||
'cmdDeselectAll
|
||||
'
|
||||
Me.cmdDeselectAll.Name = "cmdDeselectAll"
|
||||
Me.cmdDeselectAll.Size = New System.Drawing.Size(178, 22)
|
||||
Me.cmdDeselectAll.Size = New System.Drawing.Size(192, 22)
|
||||
Me.cmdDeselectAll.Text = "Deselect All"
|
||||
'
|
||||
'sepSel1
|
||||
'
|
||||
Me.sepSel1.Name = "sepSel1"
|
||||
Me.sepSel1.Size = New System.Drawing.Size(175, 6)
|
||||
Me.sepSel1.Size = New System.Drawing.Size(189, 6)
|
||||
'
|
||||
'cmdWinSelect
|
||||
'
|
||||
Me.cmdWinSelect.Name = "cmdWinSelect"
|
||||
Me.cmdWinSelect.Size = New System.Drawing.Size(178, 22)
|
||||
Me.cmdWinSelect.Size = New System.Drawing.Size(192, 22)
|
||||
Me.cmdWinSelect.Text = "Select Window"
|
||||
'
|
||||
'cmdSelectLayer
|
||||
'
|
||||
Me.cmdSelectLayer.Name = "cmdSelectLayer"
|
||||
Me.cmdSelectLayer.Size = New System.Drawing.Size(178, 22)
|
||||
Me.cmdSelectLayer.Text = "Select Layer"
|
||||
'
|
||||
'cmdSelectPart
|
||||
'
|
||||
Me.cmdSelectPart.Name = "cmdSelectPart"
|
||||
Me.cmdSelectPart.Size = New System.Drawing.Size(178, 22)
|
||||
Me.cmdSelectPart.Size = New System.Drawing.Size(192, 22)
|
||||
Me.cmdSelectPart.Text = "Select Part"
|
||||
'
|
||||
'cmdSelectLayer
|
||||
'
|
||||
Me.cmdSelectLayer.Name = "cmdSelectLayer"
|
||||
Me.cmdSelectLayer.Size = New System.Drawing.Size(192, 22)
|
||||
Me.cmdSelectLayer.Text = "Select Layer"
|
||||
'
|
||||
'cmdSelectPath
|
||||
'
|
||||
Me.cmdSelectPath.Name = "cmdSelectPath"
|
||||
Me.cmdSelectPath.Size = New System.Drawing.Size(192, 22)
|
||||
Me.cmdSelectPath.Text = "Select Path"
|
||||
'
|
||||
'cmdSelectPathAuto
|
||||
'
|
||||
Me.cmdSelectPathAuto.Name = "cmdSelectPathAuto"
|
||||
Me.cmdSelectPathAuto.Size = New System.Drawing.Size(192, 22)
|
||||
Me.cmdSelectPathAuto.Text = "Select Path Auto"
|
||||
'
|
||||
'cmdRestartDrag
|
||||
'
|
||||
Me.cmdRestartDrag.Name = "cmdRestartDrag"
|
||||
Me.cmdRestartDrag.Size = New System.Drawing.Size(178, 22)
|
||||
Me.cmdRestartDrag.Size = New System.Drawing.Size(192, 22)
|
||||
Me.cmdRestartDrag.Text = "Drag On"
|
||||
'
|
||||
'cmdSketchPoint
|
||||
'
|
||||
Me.cmdSketchPoint.Name = "cmdSketchPoint"
|
||||
Me.cmdSketchPoint.Size = New System.Drawing.Size(178, 22)
|
||||
Me.cmdSketchPoint.ShortcutKeyDisplayString = "S"
|
||||
Me.cmdSketchPoint.Size = New System.Drawing.Size(192, 22)
|
||||
Me.cmdSketchPoint.Text = "Sketch Point"
|
||||
'
|
||||
'cmdGridPoint
|
||||
'
|
||||
Me.cmdGridPoint.Name = "cmdGridPoint"
|
||||
Me.cmdGridPoint.Size = New System.Drawing.Size(178, 22)
|
||||
Me.cmdGridPoint.ShortcutKeyDisplayString = "G"
|
||||
Me.cmdGridPoint.Size = New System.Drawing.Size(192, 22)
|
||||
Me.cmdGridPoint.Text = "Grid Point"
|
||||
'
|
||||
'cmdEndPoint
|
||||
'
|
||||
Me.cmdEndPoint.Name = "cmdEndPoint"
|
||||
Me.cmdEndPoint.Size = New System.Drawing.Size(178, 22)
|
||||
Me.cmdEndPoint.ShortcutKeyDisplayString = "E"
|
||||
Me.cmdEndPoint.Size = New System.Drawing.Size(192, 22)
|
||||
Me.cmdEndPoint.Text = "End Point"
|
||||
'
|
||||
'cmdMidPoint
|
||||
'
|
||||
Me.cmdMidPoint.Name = "cmdMidPoint"
|
||||
Me.cmdMidPoint.Size = New System.Drawing.Size(178, 22)
|
||||
Me.cmdMidPoint.ShortcutKeyDisplayString = "M"
|
||||
Me.cmdMidPoint.Size = New System.Drawing.Size(192, 22)
|
||||
Me.cmdMidPoint.Text = "Mid Point"
|
||||
'
|
||||
'cmdCenterPoint
|
||||
'
|
||||
Me.cmdCenterPoint.Name = "cmdCenterPoint"
|
||||
Me.cmdCenterPoint.Size = New System.Drawing.Size(178, 22)
|
||||
Me.cmdCenterPoint.ShortcutKeyDisplayString = "C"
|
||||
Me.cmdCenterPoint.Size = New System.Drawing.Size(192, 22)
|
||||
Me.cmdCenterPoint.Text = "Center"
|
||||
'
|
||||
'cmdCentroid
|
||||
'
|
||||
Me.cmdCentroid.Name = "cmdCentroid"
|
||||
Me.cmdCentroid.ShortcutKeyDisplayString = "B"
|
||||
Me.cmdCentroid.Size = New System.Drawing.Size(192, 22)
|
||||
Me.cmdCentroid.Text = "Centroid"
|
||||
'
|
||||
'cmdNearPoint
|
||||
'
|
||||
Me.cmdNearPoint.Name = "cmdNearPoint"
|
||||
Me.cmdNearPoint.Size = New System.Drawing.Size(178, 22)
|
||||
Me.cmdNearPoint.ShortcutKeyDisplayString = "N"
|
||||
Me.cmdNearPoint.Size = New System.Drawing.Size(192, 22)
|
||||
Me.cmdNearPoint.Text = "Near Point"
|
||||
'
|
||||
'cmdIntersectionPoint
|
||||
'
|
||||
Me.cmdIntersectionPoint.Name = "cmdIntersectionPoint"
|
||||
Me.cmdIntersectionPoint.Size = New System.Drawing.Size(178, 22)
|
||||
Me.cmdIntersectionPoint.ShortcutKeyDisplayString = "I"
|
||||
Me.cmdIntersectionPoint.Size = New System.Drawing.Size(192, 22)
|
||||
Me.cmdIntersectionPoint.Text = "Intersection Point"
|
||||
'
|
||||
'cmdTangentPoint
|
||||
'
|
||||
Me.cmdTangentPoint.Name = "cmdTangentPoint"
|
||||
Me.cmdTangentPoint.Size = New System.Drawing.Size(178, 22)
|
||||
Me.cmdTangentPoint.ShortcutKeyDisplayString = "T"
|
||||
Me.cmdTangentPoint.Size = New System.Drawing.Size(192, 22)
|
||||
Me.cmdTangentPoint.Text = "Tangent Point"
|
||||
'
|
||||
'cmdPerpendicularPoint
|
||||
'
|
||||
Me.cmdPerpendicularPoint.Name = "cmdPerpendicularPoint"
|
||||
Me.cmdPerpendicularPoint.Size = New System.Drawing.Size(178, 22)
|
||||
Me.cmdPerpendicularPoint.ShortcutKeyDisplayString = "P"
|
||||
Me.cmdPerpendicularPoint.Size = New System.Drawing.Size(192, 22)
|
||||
Me.cmdPerpendicularPoint.Text = "Perpendicular Point"
|
||||
'
|
||||
'cmdMinDistPoint
|
||||
'
|
||||
Me.cmdMinDistPoint.Name = "cmdMinDistPoint"
|
||||
Me.cmdMinDistPoint.Size = New System.Drawing.Size(178, 22)
|
||||
Me.cmdMinDistPoint.ShortcutKeyDisplayString = "D"
|
||||
Me.cmdMinDistPoint.Size = New System.Drawing.Size(192, 22)
|
||||
Me.cmdMinDistPoint.Text = "Min Dist Point"
|
||||
'
|
||||
'sepSelPnt1
|
||||
'
|
||||
Me.sepSelPnt1.Name = "sepSelPnt1"
|
||||
Me.sepSelPnt1.Size = New System.Drawing.Size(175, 6)
|
||||
Me.sepSelPnt1.Size = New System.Drawing.Size(189, 6)
|
||||
'
|
||||
'cmdExcludeSurfForSnap
|
||||
'
|
||||
Me.cmdExcludeSurfForSnap.Name = "cmdExcludeSurfForSnap"
|
||||
Me.cmdExcludeSurfForSnap.Size = New System.Drawing.Size(192, 22)
|
||||
Me.cmdExcludeSurfForSnap.Text = "ToolStripMenuItem1"
|
||||
'
|
||||
'sepSelPnt2
|
||||
'
|
||||
Me.sepSelPnt2.Name = "sepSelPnt2"
|
||||
Me.sepSelPnt2.Size = New System.Drawing.Size(189, 6)
|
||||
'
|
||||
'cmdStopDrag
|
||||
'
|
||||
Me.cmdStopDrag.Name = "cmdStopDrag"
|
||||
Me.cmdStopDrag.Size = New System.Drawing.Size(178, 22)
|
||||
Me.cmdStopDrag.Size = New System.Drawing.Size(192, 22)
|
||||
Me.cmdStopDrag.Text = "Drag Off"
|
||||
'
|
||||
'Scene
|
||||
@@ -171,6 +216,8 @@ Partial Class Scene
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ContextMenuStrip = Me.MenuScene
|
||||
Me.Cursor = System.Windows.Forms.Cursors.Cross
|
||||
Me.Margin = New System.Windows.Forms.Padding(0)
|
||||
Me.Name = "Scene"
|
||||
Me.MenuScene.ResumeLayout(False)
|
||||
Me.ResumeLayout(False)
|
||||
@@ -196,5 +243,10 @@ End Sub
|
||||
Friend WithEvents cmdTangentPoint As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents cmdPerpendicularPoint As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents cmdMinDistPoint As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents cmdCentroid As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents cmdExcludeSurfForSnap As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents sepSelPnt2 As System.Windows.Forms.ToolStripSeparator
|
||||
Friend WithEvents cmdSelectPath As System.Windows.Forms.ToolStripMenuItem
|
||||
Friend WithEvents cmdSelectPathAuto As System.Windows.Forms.ToolStripMenuItem
|
||||
|
||||
End Class
|
||||
|
||||
@@ -120,4 +120,7 @@
|
||||
<metadata name="MenuScene.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>46</value>
|
||||
</metadata>
|
||||
</root>
|
||||
@@ -27,12 +27,15 @@ Public Class Scene
|
||||
Private m_nOldStatus As ST
|
||||
Private Enum ST As Integer
|
||||
NULL = 0
|
||||
SEL
|
||||
PAN
|
||||
ROT
|
||||
ZOOMWIN
|
||||
WINSEL
|
||||
SELPART
|
||||
SELLAYER
|
||||
SELPATH
|
||||
SELPATHAUTO
|
||||
ANALYZE
|
||||
GETDIST
|
||||
GETDIST2
|
||||
@@ -41,6 +44,7 @@ Public Class Scene
|
||||
End Enum
|
||||
Private m_nSnapType As SP ' tipo di snap in selezione punto
|
||||
Private m_bAlsoSelDir As Boolean ' abilita anche selezione direzione quando selezione punto
|
||||
Private m_bExcludeSurfForSnap As Boolean ' abilita anche le superfici come sorgenti per snap a punto
|
||||
Private m_PrevPoint As Point
|
||||
Private m_ptPrev As Point3d
|
||||
Private m_ptGrid As Point3d
|
||||
@@ -68,11 +72,11 @@ Public Class Scene
|
||||
SetStyle(ControlStyles.UserPaint, True)
|
||||
SetStyle(ControlStyles.AllPaintingInWmPaint, True)
|
||||
m_nGseContext = 0
|
||||
m_nStatus = ST.NULL
|
||||
m_nOldStatus = ST.NULL
|
||||
m_nStatus = ST.SEL
|
||||
m_nOldStatus = ST.SEL
|
||||
m_nSnapType = SP.PT_GRID
|
||||
RaiseEvent OnChangedSnapPointType(Me, m_nSnapType)
|
||||
m_bAlsoSelDir = False
|
||||
m_bExcludeSurfForSnap = False
|
||||
m_PrevPoint = Point.Empty
|
||||
m_bGridCursorPos = False
|
||||
m_nDriver = 3
|
||||
@@ -87,7 +91,7 @@ Public Class Scene
|
||||
m_bZwOutline = True
|
||||
m_ZwColor.Setup(0, 0, 0)
|
||||
m_DstLnColor.Setup(255, 0, 0)
|
||||
Cursor = Cursors.Default
|
||||
Cursor = New Cursor(Me.GetType(), "Select.cur")
|
||||
End Sub
|
||||
|
||||
'---- Initials --------
|
||||
@@ -142,6 +146,7 @@ Public Class Scene
|
||||
EgtSetGeoLineAttribs(m_DstLnColor)
|
||||
EgtSetGeoTriaAttribs(m_DstLnColor)
|
||||
EgtInitTscExec()
|
||||
RaiseEvent OnChangedSnapPointType(Me, m_nSnapType)
|
||||
End Sub
|
||||
|
||||
Public Function GetCtx() As Integer
|
||||
@@ -188,8 +193,9 @@ Public Class Scene
|
||||
Public Event OnMouseSelectedObj(ByVal sender As Object, ByVal nId As Integer, ByVal bLast As Boolean)
|
||||
Public Event OnMouseSelectedPart(ByVal sender As Object, ByVal nId As Integer)
|
||||
Public Event OnMouseSelectedLayer(ByVal sender As Object, ByVal nId As Integer)
|
||||
Public Event OnMouseSelectedPath(ByVal sender As Object, ByVal nId As Integer, ByVal bHaltOnFork As Boolean)
|
||||
Public Event OnMouseAnalyzed(ByVal sender As Object, ByVal nId As Integer)
|
||||
Public Event OnMousePointFromSelection(ByVal sender As Object, ByVal PtP As Point3d)
|
||||
Public Event OnMousePointFromSelection(ByVal sender As Object, ByVal PtP As Point3d, ByVal nAux As Integer)
|
||||
Public Event OnMouseDownScene(ByVal sender As Object)
|
||||
Public Event OnCursorPos(ByVal sender As Object, ByVal sCursorPos As String)
|
||||
Public Event OnShowDistance(ByVal sender As Object, ByVal sDistance As String)
|
||||
@@ -201,20 +207,22 @@ Public Class Scene
|
||||
Public Event OnChangedSnapPointType(ByVal sender As Object, ByVal nSpType As SP)
|
||||
|
||||
'---- Mouse -----------
|
||||
' Per correggere un problema con hot point cursore, nei file cur sono stati spostati di 4 pixel in Y
|
||||
|
||||
Protected Overrides Sub OnMouseDown(e As System.Windows.Forms.MouseEventArgs)
|
||||
' Imposto il contesto della scena come corrente
|
||||
EgtSetCurrentContext(m_nGseContext)
|
||||
' --- Pressione tasto sinistro ---
|
||||
If e.Button = Windows.Forms.MouseButtons.Left Then
|
||||
' se stato WINSEL oppure NULL e premuto SHIFT allora inizio selezione a finestra
|
||||
' se stato WINSEL oppure SEL e premuto SHIFT allora inizio selezione a finestra
|
||||
If m_nStatus = ST.WINSEL Or
|
||||
(m_nStatus = ST.NULL And (ModifierKeys And Keys.Shift) = Keys.Shift) Then
|
||||
(m_nStatus = ST.SEL And (ModifierKeys And Keys.Shift) = Keys.Shift) Then
|
||||
Cursor = New Cursor(Me.GetType(), "WinSelect.cur")
|
||||
m_PrevPoint = e.Location
|
||||
m_nStatus = ST.WINSEL
|
||||
' se stato NULL (selezione), SELPART, SELLAYER o ANALYZE
|
||||
ElseIf m_nStatus = ST.NULL Or m_nStatus = ST.SELPART Or
|
||||
m_nStatus = ST.SELLAYER Or m_nStatus = ST.ANALYZE Then
|
||||
' se stato SEL, SELPART, SELLAYER, SELPATH, SELPATHAUTO o ANALYZE
|
||||
ElseIf m_nStatus = ST.SEL Or m_nStatus = ST.SELPART Or m_nStatus = ST.SELLAYER Or
|
||||
m_nStatus = ST.SELPATH Or m_nStatus = ST.SELPATHAUTO Or m_nStatus = ST.ANALYZE Then
|
||||
If m_nStatus <> ST.ANALYZE Then
|
||||
Cursor = New Cursor(Me.GetType(), "Select.cur")
|
||||
Else
|
||||
@@ -238,21 +246,28 @@ Public Class Scene
|
||||
If nId <> GDB_ID.NULL Then
|
||||
' evento per entità selezionate
|
||||
Select Case m_nStatus
|
||||
Case ST.NULL
|
||||
Case ST.SEL
|
||||
RaiseEvent OnMouseSelectedObj(Me, nId, True)
|
||||
Case ST.SELPART
|
||||
RaiseEvent OnMouseSelectedPart(Me, nId)
|
||||
m_nStatus = ST.NULL
|
||||
m_nStatus = ST.SEL
|
||||
Case ST.SELLAYER
|
||||
RaiseEvent OnMouseSelectedLayer(Me, nId)
|
||||
m_nStatus = ST.NULL
|
||||
m_nStatus = ST.SEL
|
||||
Case ST.SELPATH
|
||||
RaiseEvent OnMouseSelectedPath(Me, nId, True)
|
||||
m_nStatus = ST.SEL
|
||||
Case ST.SELPATHAUTO
|
||||
RaiseEvent OnMouseSelectedPath(Me, nId, False)
|
||||
m_nStatus = ST.SEL
|
||||
Case Else
|
||||
RaiseEvent OnMouseAnalyzed(Me, nId)
|
||||
End Select
|
||||
' evento per posizione punto di selezione
|
||||
Dim PtTemp As Point3d
|
||||
If EgtGetPointFromSelect(nId, e.Location, PtTemp) Then
|
||||
RaiseEvent OnMousePointFromSelection(Me, PtTemp)
|
||||
Dim nAux As Integer
|
||||
If EgtGetPointFromSelect(nId, e.Location, PtTemp, nAux) Then
|
||||
RaiseEvent OnMousePointFromSelection(Me, PtTemp, nAux)
|
||||
End If
|
||||
End If
|
||||
' se stato misura di distanza (primo punto)
|
||||
@@ -276,7 +291,7 @@ Public Class Scene
|
||||
Dim dZ As Double = ptSel.z - m_ptPrev.z
|
||||
Dim dDist As Double = Sqrt(dX * dX + dY * dY + dZ * dZ)
|
||||
Dim sOut As New System.Text.StringBuilder
|
||||
sOut.Append("Dist=")
|
||||
sOut.Append(EgtMsg(1301)) ' Dist=
|
||||
sOut.Append(dDist.ToString("F4", CultureInfo.InvariantCulture))
|
||||
sOut.Append(" dX=")
|
||||
sOut.Append(dX.ToString("F4", CultureInfo.InvariantCulture))
|
||||
@@ -287,7 +302,7 @@ Public Class Scene
|
||||
' lancio l'evento per visualizzare la distanza
|
||||
RaiseEvent OnShowDistance(Me, sOut.ToString())
|
||||
m_nStatus = ST.GETDIST
|
||||
m_nOldStatus = ST.NULL
|
||||
m_nOldStatus = ST.SEL
|
||||
End If
|
||||
' se stato selezione punto
|
||||
ElseIf m_nStatus = ST.SELPOINT Then
|
||||
@@ -406,8 +421,8 @@ Public Class Scene
|
||||
RaiseEvent OnMouseSelectedObj(Me, nId, (nNextId = GDB_ID.NULL))
|
||||
nId = nNextId
|
||||
End While
|
||||
' ritorno allo stato NULL
|
||||
m_nStatus = ST.NULL
|
||||
' ritorno allo stato SEL
|
||||
m_nStatus = ST.SEL
|
||||
Cursor = New Cursor(Me.GetType(), "Select.cur")
|
||||
End If
|
||||
' --- Rilascio tasto medio (rotella) ---
|
||||
@@ -419,9 +434,9 @@ Public Class Scene
|
||||
' eventuale ripristino vecchio stato
|
||||
If RestoreStatus() Then
|
||||
' non devo fare alcunché
|
||||
' reset dello stato se non NULL
|
||||
ElseIf m_nStatus <> ST.NULL Then
|
||||
m_nStatus = ST.NULL
|
||||
' reset dello stato se non SEL
|
||||
ElseIf m_nStatus <> ST.SEL Then
|
||||
m_nStatus = ST.SEL
|
||||
Cursor = New Cursor(Me.GetType(), "Select.cur")
|
||||
End If
|
||||
' --- Rilascio tasto destro ---
|
||||
@@ -445,8 +460,9 @@ Public Class Scene
|
||||
EgtSetCurrentContext(m_nGseContext)
|
||||
End If
|
||||
' Se sono abbastanza all'interno della scena (10% della dimensione), imposto il focus
|
||||
If e.Location.X > 0.1 * Size.Width AndAlso e.Location.X < 0.9 * Size.Width AndAlso
|
||||
e.Location.Y > 0.1 * Size.Height AndAlso e.Location.Y < 0.9 * Size.Height Then
|
||||
Const BordPu As Double = 0.10000000000000001
|
||||
If e.Location.X > BordPu * Size.Width AndAlso e.Location.X < (1 - BordPu) * Size.Width AndAlso
|
||||
e.Location.Y > BordPu * Size.Height AndAlso e.Location.Y < (1 - BordPu) * Size.Height Then
|
||||
Focus()
|
||||
End If
|
||||
' Visualizzo le coordinate del mouse
|
||||
@@ -465,14 +481,14 @@ Public Class Scene
|
||||
'Il punto di riferimento deve rimanere quello originale
|
||||
ElseIf m_nStatus = ST.ROT Then
|
||||
Cursor = New Cursor(Me.GetType(), "Rotate.cur")
|
||||
EgtRotateCamera(m_PrevPoint, e.Location, True)
|
||||
EgtRotateView(m_PrevPoint, e.Location, True)
|
||||
m_PrevPoint = e.Location
|
||||
ElseIf m_nStatus = ST.PAN Then
|
||||
Cursor = New Cursor(Me.GetType(), "Pan.cur")
|
||||
EgtPanCamera(m_PrevPoint, e.Location, True)
|
||||
EgtPanView(m_PrevPoint, e.Location, True)
|
||||
m_PrevPoint = e.Location
|
||||
Else
|
||||
m_nStatus = ST.NULL
|
||||
m_nStatus = ST.SEL
|
||||
End If
|
||||
' --- Altri casi dipendenti dallo stato ---
|
||||
ElseIf m_nStatus = ST.WINSEL Then
|
||||
@@ -508,6 +524,8 @@ Public Class Scene
|
||||
MyBase.OnMouseMove(e)
|
||||
End If
|
||||
If m_nStatus = ST.NULL Then
|
||||
Cursor = Cursors.Default
|
||||
ElseIf m_nStatus = ST.SEL Then
|
||||
Cursor = New Cursor(Me.GetType(), "Select.cur")
|
||||
End If
|
||||
' Ripristino il contesto originale
|
||||
@@ -527,7 +545,7 @@ Public Class Scene
|
||||
End If
|
||||
' calcolo coefficiente
|
||||
Const WHEEL_DELTA As Double = 120
|
||||
Dim dCoeff As Double = 1 - 0.1 * Abs(e.Delta) / WHEEL_DELTA
|
||||
Dim dCoeff As Double = 1 - 0.10000000000000001 * Abs(e.Delta) / WHEEL_DELTA
|
||||
If e.Delta < 0 Then
|
||||
dCoeff = 1 / dCoeff
|
||||
End If
|
||||
@@ -602,7 +620,7 @@ Public Class Scene
|
||||
EgtUnProjectPoint(WinXY, ptWorld)
|
||||
'ricavo direzione di vista
|
||||
Dim nDir As Integer
|
||||
EgtGetCameraDir(nDir)
|
||||
EgtGetView(nDir)
|
||||
'costruisco stringa con dati
|
||||
Dim sCursorPos As New System.Text.StringBuilder
|
||||
Select Case nDir
|
||||
@@ -673,54 +691,76 @@ Public Class Scene
|
||||
|
||||
Private Sub PrepareMenuScene()
|
||||
' per selezione oggetti
|
||||
If m_nStatus = ST.NULL Then
|
||||
MenuScene.Visible = True
|
||||
If m_nStatus = ST.SEL Then
|
||||
For Each i As ToolStripItem In MenuScene.Items
|
||||
If i.Name = "cmdSelectAll" Then
|
||||
i.Text = EgtMsg(1001) ' Select All
|
||||
i.Visible = True
|
||||
ElseIf i.Name = "cmdDeselectAll" Then
|
||||
i.Text = EgtMsg(1003) ' Deselect All
|
||||
i.Visible = True
|
||||
ElseIf i.Name = "sepSel1" Then
|
||||
i.Visible = True
|
||||
ElseIf i.Name = "cmdWinSelect" Then
|
||||
i.Text = EgtMsg(1005) ' Select Window
|
||||
i.Visible = True
|
||||
ElseIf i.Name = "cmdSelectPart" Then
|
||||
i.Text = EgtMsg(1007) ' Select Part
|
||||
i.Visible = True
|
||||
ElseIf i.Name = "cmdSelectLayer" Then
|
||||
i.Text = EgtMsg(1009) ' Select Layer
|
||||
i.Visible = True
|
||||
ElseIf i.Name = "cmdSelectPath" Then
|
||||
i.Text = EgtMsg(1011) ' Select Path
|
||||
i.Visible = True
|
||||
ElseIf i.Name = "cmdSelectPathAuto" Then
|
||||
i.Text = EgtMsg(1013) ' Select Path Auto
|
||||
i.Visible = True
|
||||
Else
|
||||
i.Visible = False
|
||||
End If
|
||||
Next
|
||||
MenuScene.Visible = True
|
||||
' per selezione punti
|
||||
ElseIf m_nStatus = ST.GETDIST Or m_nStatus = ST.GETDIST2 Or m_nStatus = ST.SELPOINT Then
|
||||
MenuScene.Visible = True
|
||||
' se drag abilitato
|
||||
If m_bDragOn Then
|
||||
For Each i As ToolStripItem In MenuScene.Items
|
||||
Select Case i.Name
|
||||
Case "cmdSketchPoint"
|
||||
i.Text = EgtMsg(1101) ' Sketch Point
|
||||
i.Visible = True
|
||||
DirectCast(i, ToolStripMenuItem).Checked = (m_nSnapType = SP.PT_SKETCH)
|
||||
Case "cmdGridPoint"
|
||||
i.Text = EgtMsg(1103) ' Grid Point
|
||||
i.Visible = True
|
||||
DirectCast(i, ToolStripMenuItem).Checked = (m_nSnapType = SP.PT_GRID)
|
||||
Case "cmdEndPoint"
|
||||
i.Text = EgtMsg(1105) ' End Point
|
||||
i.Visible = True
|
||||
DirectCast(i, ToolStripMenuItem).Checked = (m_nSnapType = SP.PT_END)
|
||||
Case "cmdMidPoint"
|
||||
i.Text = EgtMsg(1107) ' Mid Point
|
||||
i.Visible = True
|
||||
DirectCast(i, ToolStripMenuItem).Checked = (m_nSnapType = SP.PT_MID)
|
||||
Case "cmdCenterPoint"
|
||||
i.Text = EgtMsg(1109) ' Center Point
|
||||
i.Visible = True
|
||||
DirectCast(i, ToolStripMenuItem).Checked = (m_nSnapType = SP.CENTER)
|
||||
Case "cmdCentroid"
|
||||
i.Text = EgtMsg(1111) ' Centroid
|
||||
i.Visible = True
|
||||
DirectCast(i, ToolStripMenuItem).Checked = (m_nSnapType = SP.CENTROID)
|
||||
Case "cmdNearPoint"
|
||||
i.Text = EgtMsg(1113) ' Near Point
|
||||
i.Visible = True
|
||||
DirectCast(i, ToolStripMenuItem).Checked = (m_nSnapType = SP.PT_NEAR)
|
||||
Case "cmdIntersectionPoint"
|
||||
i.Text = EgtMsg(1115) ' Intersection Point
|
||||
i.Visible = True
|
||||
DirectCast(i, ToolStripMenuItem).Checked = (m_nSnapType = SP.PT_INTERS)
|
||||
Case "cmdTangentPoint"
|
||||
i.Text = EgtMsg(1117) ' Tangent Point
|
||||
If m_bTangentPointOn Then
|
||||
i.Visible = True
|
||||
DirectCast(i, ToolStripMenuItem).Checked = (m_nSnapType = SP.PT_TANGENT)
|
||||
@@ -728,6 +768,7 @@ Public Class Scene
|
||||
i.Visible = False
|
||||
End If
|
||||
Case "cmdPerpendicularPoint"
|
||||
i.Text = EgtMsg(1119) ' Perpendicular Point
|
||||
If m_bPerpendicularPointOn Then
|
||||
i.Visible = True
|
||||
DirectCast(i, ToolStripMenuItem).Checked = (m_nSnapType = SP.PT_PERPENDICULAR)
|
||||
@@ -735,6 +776,7 @@ Public Class Scene
|
||||
i.Visible = False
|
||||
End If
|
||||
Case "cmdMinDistPoint"
|
||||
i.Text = EgtMsg(1121) ' Min Dist Point
|
||||
If m_bMinDistPointOn Then
|
||||
i.Visible = True
|
||||
DirectCast(i, ToolStripMenuItem).Checked = (m_nSnapType = SP.PT_MINDIST)
|
||||
@@ -742,8 +784,15 @@ Public Class Scene
|
||||
i.Visible = False
|
||||
End If
|
||||
Case "sepSelPnt1"
|
||||
i.Visible = True
|
||||
Case "cmdExcludeSurfForSnap"
|
||||
i.Text = EgtMsg(1123) ' Exclude Surfaces
|
||||
i.Visible = True
|
||||
DirectCast(i, ToolStripMenuItem).Checked = m_bExcludeSurfForSnap
|
||||
Case "sepSelPnt2"
|
||||
i.Visible = (m_nStatus <> ST.GETDIST And m_nStatus <> ST.GETDIST2)
|
||||
Case "cmdStopDrag"
|
||||
i.Text = EgtMsg(1201) ' Drag Off
|
||||
i.Visible = (m_nStatus <> ST.GETDIST And m_nStatus <> ST.GETDIST2)
|
||||
Case Else
|
||||
i.Visible = False
|
||||
@@ -753,12 +802,14 @@ Public Class Scene
|
||||
Else
|
||||
For Each i As ToolStripItem In MenuScene.Items
|
||||
If i.Name = "cmdRestartDrag" Then
|
||||
i.Text = EgtMsg(1203) ' Drag On
|
||||
i.Visible = True
|
||||
Else
|
||||
i.Visible = False
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
MenuScene.Visible = True
|
||||
' altri casi
|
||||
Else
|
||||
MenuScene.Visible = False
|
||||
@@ -777,6 +828,10 @@ Public Class Scene
|
||||
m_nStatus = ST.SELPART
|
||||
ElseIf e.ClickedItem.Name = "cmdSelectLayer" Then
|
||||
m_nStatus = ST.SELLAYER
|
||||
ElseIf e.ClickedItem.Name = "cmdSelectPath" Then
|
||||
m_nStatus = ST.SELPATH
|
||||
ElseIf e.ClickedItem.Name = "cmdSelectPathAuto" Then
|
||||
m_nStatus = ST.SELPATHAUTO
|
||||
' Riabilitazione drag sospeso
|
||||
ElseIf e.ClickedItem.Name = "cmdRestartDrag" Then
|
||||
EgtResetGeoLine()
|
||||
@@ -798,6 +853,9 @@ Public Class Scene
|
||||
ElseIf e.ClickedItem.Name = "cmdCenterPoint" Then
|
||||
m_nSnapType = SP.CENTER
|
||||
RaiseEvent OnChangedSnapPointType(Me, m_nSnapType)
|
||||
ElseIf e.ClickedItem.Name = "cmdCentroid" Then
|
||||
m_nSnapType = SP.CENTROID
|
||||
RaiseEvent OnChangedSnapPointType(Me, m_nSnapType)
|
||||
ElseIf e.ClickedItem.Name = "cmdNearPoint" Then
|
||||
m_nSnapType = SP.PT_NEAR
|
||||
RaiseEvent OnChangedSnapPointType(Me, m_nSnapType)
|
||||
@@ -813,16 +871,79 @@ Public Class Scene
|
||||
ElseIf e.ClickedItem.Name = "cmdMinDistPoint" Then
|
||||
m_nSnapType = SP.PT_MINDIST
|
||||
RaiseEvent OnChangedSnapPointType(Me, m_nSnapType)
|
||||
' esclusione superfici da punto snap
|
||||
ElseIf e.ClickedItem.Name = "cmdExcludeSurfForSnap" Then
|
||||
m_bExcludeSurfForSnap = Not m_bExcludeSurfForSnap
|
||||
EgtSetObjFilterForSnap(True, True, Not m_bExcludeSurfForSnap, True, True)
|
||||
' Sospensione drag
|
||||
ElseIf e.ClickedItem.Name = "cmdStopDrag" Then
|
||||
m_bDragOn = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'-------------------------------- KeyDown --------------------------------------------------------
|
||||
Private Sub Scene_KeyDown(ByVal sender As System.Object, ByVal e As KeyEventArgs) Handles MyBase.KeyDown
|
||||
' Con selezione punti e drag abilitato
|
||||
If (m_nStatus = ST.GETDIST Or m_nStatus = ST.GETDIST2 Or m_nStatus = ST.SELPOINT) And m_bDragOn Then
|
||||
' Con 'S' imposto Punto Sketch
|
||||
If e.KeyData = Keys.S Then
|
||||
m_nSnapType = SP.PT_SKETCH
|
||||
RaiseEvent OnChangedSnapPointType(Me, m_nSnapType)
|
||||
' Con 'G' imposto Punto Griglia
|
||||
ElseIf e.KeyData = Keys.G Then
|
||||
m_nSnapType = SP.PT_GRID
|
||||
RaiseEvent OnChangedSnapPointType(Me, m_nSnapType)
|
||||
' Con 'E' imposto Punto Finale
|
||||
ElseIf e.KeyData = Keys.E Then
|
||||
m_nSnapType = SP.PT_END
|
||||
RaiseEvent OnChangedSnapPointType(Me, m_nSnapType)
|
||||
' Con 'M' imposto Punto Medio
|
||||
ElseIf e.KeyData = Keys.M Then
|
||||
m_nSnapType = SP.PT_MID
|
||||
RaiseEvent OnChangedSnapPointType(Me, m_nSnapType)
|
||||
' Con 'C' imposto Centro
|
||||
ElseIf e.KeyData = Keys.C Then
|
||||
m_nSnapType = SP.CENTER
|
||||
RaiseEvent OnChangedSnapPointType(Me, m_nSnapType)
|
||||
' Con 'B' imposto Baricentro
|
||||
ElseIf e.KeyData = Keys.B Then
|
||||
m_nSnapType = SP.CENTROID
|
||||
RaiseEvent OnChangedSnapPointType(Me, m_nSnapType)
|
||||
' Con 'N' imposto Punto Vicino
|
||||
ElseIf e.KeyData = Keys.N Then
|
||||
m_nSnapType = SP.PT_NEAR
|
||||
RaiseEvent OnChangedSnapPointType(Me, m_nSnapType)
|
||||
' Con 'I' imposto Punto Intersezione
|
||||
ElseIf e.KeyData = Keys.I Then
|
||||
m_nSnapType = SP.PT_INTERS
|
||||
RaiseEvent OnChangedSnapPointType(Me, m_nSnapType)
|
||||
' Con 'T' imposto Punto Tangente
|
||||
ElseIf e.KeyData = Keys.T Then
|
||||
If m_bTangentPointOn Then
|
||||
m_nSnapType = SP.PT_TANGENT
|
||||
RaiseEvent OnChangedSnapPointType(Me, m_nSnapType)
|
||||
End If
|
||||
' Con 'P' imposto Punto Perpendicolare
|
||||
ElseIf e.KeyData = Keys.P Then
|
||||
If m_bPerpendicularPointOn Then
|
||||
m_nSnapType = SP.PT_PERPENDICULAR
|
||||
RaiseEvent OnChangedSnapPointType(Me, m_nSnapType)
|
||||
End If
|
||||
' Con 'D' imposto Punto Minima Distanza
|
||||
ElseIf e.KeyData = Keys.D Then
|
||||
If m_bMinDistPointOn Then
|
||||
m_nSnapType = SP.PT_MINDIST
|
||||
RaiseEvent OnChangedSnapPointType(Me, m_nSnapType)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
'---- Status management -------------
|
||||
Private Function IsRestorableCurrStatus() As Boolean
|
||||
Select Case m_nStatus
|
||||
Case ST.NULL, ST.ANALYZE, ST.SELPART, ST.SELLAYER, ST.GETDIST, ST.GETDIST2, ST.SELPOINT, ST.SELPOINTZ
|
||||
Case ST.NULL, ST.SEL, ST.ANALYZE, ST.SELPART, ST.SELLAYER,
|
||||
ST.SELPATH, ST.SELPATHAUTO, ST.GETDIST, ST.GETDIST2, ST.SELPOINT, ST.SELPOINTZ
|
||||
Return True
|
||||
Case Else
|
||||
Return False
|
||||
@@ -837,7 +958,12 @@ Public Class Scene
|
||||
|
||||
Private Function RestoreStatus() As Boolean
|
||||
' eventuale ripristino vecchio stato
|
||||
If m_nOldStatus = ST.NULL Or m_nOldStatus = ST.SELPART Or m_nOldStatus = ST.SELLAYER Then
|
||||
If m_nOldStatus = ST.NULL Then
|
||||
m_nStatus = m_nOldStatus
|
||||
Cursor = Cursors.Default
|
||||
Return True
|
||||
ElseIf m_nOldStatus = ST.SEL Or m_nOldStatus = ST.SELPART Or m_nOldStatus = ST.SELLAYER Or
|
||||
m_nOldStatus = ST.SELPATH Or m_nOldStatus = ST.SELPATHAUTO Then
|
||||
m_nStatus = m_nOldStatus
|
||||
Cursor = New Cursor(Me.GetType(), "Select.cur")
|
||||
Return True
|
||||
@@ -857,6 +983,10 @@ Public Class Scene
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Public Sub SetStatusNull()
|
||||
m_nStatus = ST.NULL
|
||||
End Sub
|
||||
|
||||
Public Sub SetStatusAnalyze()
|
||||
m_nStatus = ST.ANALYZE
|
||||
End Sub
|
||||
@@ -879,8 +1009,8 @@ Public Class Scene
|
||||
' reset entità non selezionabili
|
||||
EgtUnselectableClearAll()
|
||||
' imposto lo stato
|
||||
m_nStatus = ST.NULL
|
||||
m_nOldStatus = ST.NULL
|
||||
m_nStatus = ST.SEL
|
||||
m_nOldStatus = ST.SEL
|
||||
' disabilito scelta punto tangente, perpendicolare e minima distanza
|
||||
DisableTangentPoint()
|
||||
DisablePerpendicularPoint()
|
||||
@@ -895,15 +1025,15 @@ Public Class Scene
|
||||
|
||||
Public Sub ResetStatusAnalyze()
|
||||
If m_nStatus = ST.ANALYZE Then
|
||||
m_nStatus = ST.NULL
|
||||
m_nOldStatus = ST.NULL
|
||||
m_nStatus = ST.SEL
|
||||
m_nOldStatus = ST.SEL
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub ResetStatusGetDistance()
|
||||
If m_nStatus = ST.GETDIST Or m_nStatus = ST.GETDIST2 Then
|
||||
m_nStatus = ST.NULL
|
||||
m_nOldStatus = ST.NULL
|
||||
m_nStatus = ST.SEL
|
||||
m_nOldStatus = ST.SEL
|
||||
End If
|
||||
EgtResetGeoLine()
|
||||
RaiseEvent OnCloseGetDist(Me)
|
||||
|
||||
Reference in New Issue
Block a user