EgtUILib :

- aggiornata interfaccia di EgtSurfBezierParamsFromPoint
- aggiunta interfaccia di EgtSurfBezierGetPointNrmD1
- in Scene ora l'evento OnMouseAnalyzedEx restituisce anche lo stato dei tasti (SHIFT, CTRL e ALT).
This commit is contained in:
Dario Sassi
2026-03-13 13:36:06 +01:00
parent 977f82ce26
commit 4c7c851394
2 changed files with 48 additions and 9 deletions
+32 -7
View File
@@ -5464,17 +5464,37 @@ Public Function EgtExtractSurfBezierLoops(nId As Integer, nDestGrpId As Integer,
End If
End Function
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtSurfBezParamsFromPoint"), SuppressUnmanagedCodeSecurity()>
Private Function EgtSurfBezParamsFromPoint_32( nIdSurf As Integer, ByRef ptPBez As Point3d, nDestGroup As Integer, ByRef dU As Double, ByRef dV As Double) As Boolean
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtSurfBezierParamsFromPoint"), SuppressUnmanagedCodeSecurity()>
Private Function EgtSurfBezierParamsFromPoint_32( nIdSurf As Integer, ByRef ptOnSurf As Point3d, nRefId As Integer,
ByRef dU As Double, ByRef dV As Double) As Boolean
End Function
<DllImport(EgtIntDll64, CharSet:=CharSet.Unicode, EntryPoint:="EgtSurfBezParamsFromPoint"), SuppressUnmanagedCodeSecurity()>
Private Function EgtSurfBezParamsFromPoint_64( nIdSurf As Integer, ByRef ptPBez As Point3d, nDestGroup As Integer, ByRef dU As Double, ByRef dV As Double) As Boolean
<DllImport(EgtIntDll64, CharSet:=CharSet.Unicode, EntryPoint:="EgtSurfBezierParamsFromPoint"), SuppressUnmanagedCodeSecurity()>
Private Function EgtSurfBezierParamsFromPoint_64( nIdSurf As Integer, ByRef ptOnSurf As Point3d, nRefId As Integer,
ByRef dU As Double, ByRef dV As Double) As Boolean
End Function
Public Function EgtSurfBezParamsFromPoint(nIdSurf As Integer, ByRef ptPBez As Point3d, nDestGroup As Integer, ByRef dU As Double, ByRef dV As Double) As Boolean
Public Function EgtSurfBezierParamsFromPoint(nIdSurf As Integer, ByRef ptOnSurf As Point3d, nRefId As Integer,
ByRef dU As Double, ByRef dV As Double) As Boolean
If IntPtr.Size = 4 Then
Return EgtSurfBezParamsFromPoint_32(nIdSurf, ptPBez, nDestGroup, dU, dV)
Return EgtSurfBezierParamsFromPoint_32(nIdSurf, ptOnSurf, nRefId, dU, dV)
Else
Return EgtSurfBezParamsFromPoint_64(nIdSurf, ptPBez, nDestGroup, dU, dV)
Return EgtSurfBezierParamsFromPoint_64(nIdSurf, ptOnSurf, nRefId, dU, dV)
End If
End Function
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtSurfBezierGetPointNrmD1"), SuppressUnmanagedCodeSecurity()>
Private Function EgtSurfBezierGetPointNrmD1_32( nIdSurf As Integer, dU As Double, dV As Double, nUsd As Integer, nVsd As Integer, nRefId As Integer,
ByRef PtP As Point3d, ByRef vtNorm As Vector3d, ByRef vtDerU As Vector3d, ByRef vtDerV As Vector3d) As Boolean
End Function
<DllImport(EgtIntDll64, CharSet:=CharSet.Unicode, EntryPoint:="EgtSurfBezierGetPointNrmD1"), SuppressUnmanagedCodeSecurity()>
Private Function EgtSurfBezierGetPointNrmD1_64( nIdSurf As Integer, dU As Double, dV As Double, nUsd As Integer, nVsd As Integer, nRefId As Integer,
ByRef PtP As Point3d, ByRef vtNorm As Vector3d, ByRef vtDerU As Vector3d, ByRef vtDerV As Vector3d) As Boolean
End Function
Public Function EgtSurfBezierGetPointNrmD1(nIdSurf As Integer, dU As Double, dV As Double, nUsd As Integer, nVsd As Integer, nRefId As Integer,
ByRef PtP As Point3d, ByRef vtNorm As Vector3d, ByRef vtDerU As Vector3d, ByRef vtDerV As Vector3d) As Boolean
If IntPtr.Size = 4 Then
Return EgtSurfBezierGetPointNrmD1_32(nIdSurf, dU, dV, nUsd, nVsd, nRefId, ptP, vtNorm, vtDerU, vtDerV)
Else
Return EgtSurfBezierGetPointNrmD1_64(nIdSurf, dU, dV, nUsd, nVsd, nRefId, ptP, vtNorm, vtDerU, vtDerV)
End If
End Function
@@ -15754,6 +15774,11 @@ Public Enum CRV_SIDE As Integer
FROM_MINUS = -1
FROM_PLUS = 1
End Enum
'Costanti : direzione di calcolo tangente lungo la curva di superficie
Public Enum SRF_SIDE As Integer
FROM_MINUS = -1
FROM_PLUS = 1
End Enum
'Costanti : TIPO VISUALIZZAZIONE
Public Enum SM As Integer
WIREFRAME = 0
+16 -2
View File
@@ -20,6 +20,12 @@ Public Class Scene
'---- Constants -------
Public Const DIM_SEL As Integer = 13
Public Enum MODKEY As Integer
NONE = 0
SHIFT = 1
CTRL = 2
ALT = 3
End Enum
'---- Members ---------
Private m_nGseContext As Integer
@@ -282,7 +288,7 @@ Public Class Scene
Public Event OnMouseSelectedLayer(sender As Object, nId As Integer)
Public Event OnMouseSelectedPath(sender As Object, nId As Integer, bHaltOnFork As Boolean)
Public Event OnMouseAnalyzed(sender As Object, nId As Integer)
Public Event OnMouseAnalyzedEx(sender As Object, nId As Integer, nSub As Integer, ptP As Point3d)
Public Event OnMouseAnalyzedEx(sender As Object, nId As Integer, nSub As Integer, ptP As Point3d, nModKey As Integer)
Public Event OnMousePointFromSelection(sender As Object, nId As Integer, PtP As Point3d, nAux As Integer)
Public Event OnStartingMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs, ByRef bContinue As Boolean)
Public Event OnMouseDownScene(sender As Object, e As System.Windows.Forms.MouseEventArgs)
@@ -403,6 +409,14 @@ Public Class Scene
m_PrevPoint = e.Location
' se stato ANALYZE
ElseIf m_nStatus = ST.ANALYZE Then
Dim nModKey As Integer = MODKEY.NONE
If (ModifierKeys And Keys.Shift) = Keys.Shift Then
nModKey = MODKEY.SHIFT
ElseIf (ModifierKeys And Keys.Control) = Keys.Control Then
nModKey = MODKEY.CTRL
ElseIf (ModifierKeys And Keys.Alt) = Keys.Alt Then
nModKey = MODKEY.ALT
End If
EgtSetObjFilterForSelWin(m_bZeroDimForSel, m_bCurveForSel, m_bSurfForSel, m_bVolumeForSel, m_bExtraForSel)
Dim nId As Integer = ChooseOneSelectedObj(e.Location, m_nStatus)
If nId <> GDB_ID.NULL Then
@@ -412,7 +426,7 @@ Public Class Scene
Dim PtTemp As Point3d
Dim nAux As Integer = -1
EgtGetPointFromSelect(nId, e.Location, PtTemp, nAux)
RaiseEvent OnMouseAnalyzedEx( Me, nId, nAux, PtTemp)
RaiseEvent OnMouseAnalyzedEx( Me, nId, nAux, PtTemp, nModKey)
End If
' se stato GETDIST (primo punto per misura di distanza)
ElseIf m_nStatus = ST.GETDIST Then