TestEIn 1.6c3 :

- gestione selezione per percorso.
This commit is contained in:
Dario Sassi
2015-03-17 11:13:19 +00:00
parent 7cc2e7d76f
commit 756021ca09
16 changed files with 93 additions and 45 deletions
+16 -14
View File
@@ -518,6 +518,19 @@ Public Class Controller
EgtDraw()
End Sub
Public Sub MouseSelectedPath(ByVal nId As Integer, ByVal bHaltOnFork As Boolean)
' verifico sia parte di un layer
Dim nLayerId = EgtGetParent(nId)
If EgtGetParent(EgtGetParent(nLayerId)) <> GDB_ID.ROOT Then
Return
End If
' eseguo la selezione ed aggiorno
EnableCommandLog()
EgtSelectPathObjs(nId, bHaltOnFork)
DisableCommandLog()
EgtDraw()
End Sub
Public Sub MouseSelectedPoint(ByVal PtP As Point3d, ByVal nSep As SEP, ByVal nId As Integer, ByVal bDone As Boolean)
SetDataFromSelPoint(PtP, nSep, nId)
' avanzo di un passo
@@ -2520,7 +2533,6 @@ Public Class Controller
End If
End Sub
Public Sub ContinueArcPDP()
' verifico di essere in modalità continua
If Not m_bContinue Then
@@ -3647,21 +3659,11 @@ Public Class Controller
If GetCurrLayer() = GDB_ID.NULL Then
Return False
End If
' creo vettore di curve selezionate
Dim nCrvNum As Integer = 0
Dim nCrvIds(EgtGetSelectedObjNbr() - 1) As Integer
Dim nId As Integer = EgtGetFirstSelectedObj()
While nId <> GDB_ID.NULL
Select Case EgtGetType(nId)
Case GDB_TY.CRV_LINE, GDB_TY.CRV_ARC, GDB_TY.CRV_BEZ, GDB_TY.CRV_COMPO
nCrvIds(nCrvNum) = nId
nCrvNum = nCrvNum + 1
End Select
nId = EgtGetNextSelectedObj()
End While
' creo la curva composita (concatenando le curve selezionate)
EnableCommandLog()
EgtCreateCurveCompoByChain(GetCurrLayer(), nCrvNum, nCrvIds, New Point3d, True, REF_TY.GRID)
Dim nCrvIds(0) As Integer
nCrvIds(0) = GDB_ID.SEL
EgtCreateCurveCompoByChain(GetCurrLayer(), 1, nCrvIds, New Point3d, True, REF_TY.GRID)
DisableCommandLog()
' reset stato scena
m_Scene.ResetStatus()
+4
View File
@@ -1217,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)>
+4
View File
@@ -364,6 +364,10 @@ Public Class Form1
m_Controller.MouseSelectedLayer(nId)
End Sub
Private Sub OnMouseSelectedPath(ByVal sender As Object, ByVal nId As Integer, ByVal bHaltOnFork As Boolean) Handles Scene1.OnMouseSelectedPath
m_Controller.MouseSelectedPath(nId, bHaltOnFork)
End Sub
Private Sub OnMousePointFromSelection(ByVal sender As Object, ByVal PtP As Point3d, ByVal nAux As Integer) Handles Scene1.OnMousePointFromSelection
m_Controller.SetPointFromSelection(PtP, nAux)
End Sub
+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.3.2")>
<Assembly: AssemblyFileVersion("1.6.3.2")>
<Assembly: AssemblyVersion("1.6.3.3")>
<Assembly: AssemblyFileVersion("1.6.3.3")>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 326 B

BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 326 B

After

Width:  |  Height:  |  Size: 326 B

+39 -21
View File
@@ -28,8 +28,10 @@ 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()
@@ -51,65 +53,77 @@ Partial Class Scene
'
'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.cmdCentroid, Me.cmdNearPoint, Me.cmdIntersectionPoint, Me.cmdTangentPoint, Me.cmdPerpendicularPoint, Me.cmdMinDistPoint, Me.sepSelPnt1, Me.cmdExcludeSurfForSnap, Me.sepSelPnt2, 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(193, 462)
Me.MenuScene.Size = New System.Drawing.Size(193, 484)
'
'cmdSelectAll
'
Me.cmdSelectAll.Name = "cmdSelectAll"
Me.cmdSelectAll.Size = New System.Drawing.Size(183, 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(183, 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(180, 6)
Me.sepSel1.Size = New System.Drawing.Size(189, 6)
'
'cmdWinSelect
'
Me.cmdWinSelect.Name = "cmdWinSelect"
Me.cmdWinSelect.Size = New System.Drawing.Size(183, 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(183, 22)
Me.cmdSelectLayer.Text = "Select Layer"
'
'cmdSelectPart
'
Me.cmdSelectPart.Name = "cmdSelectPart"
Me.cmdSelectPart.Size = New System.Drawing.Size(183, 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(183, 22)
Me.cmdRestartDrag.Size = New System.Drawing.Size(192, 22)
Me.cmdRestartDrag.Text = "Drag On"
'
'cmdSketchPoint
'
Me.cmdSketchPoint.Name = "cmdSketchPoint"
Me.cmdSketchPoint.ShortcutKeyDisplayString = "S"
Me.cmdSketchPoint.Size = New System.Drawing.Size(183, 22)
Me.cmdSketchPoint.Size = New System.Drawing.Size(192, 22)
Me.cmdSketchPoint.Text = "Sketch Point"
'
'cmdGridPoint
'
Me.cmdGridPoint.Name = "cmdGridPoint"
Me.cmdGridPoint.ShortcutKeyDisplayString = "G"
Me.cmdGridPoint.Size = New System.Drawing.Size(183, 22)
Me.cmdGridPoint.Size = New System.Drawing.Size(192, 22)
Me.cmdGridPoint.Text = "Grid Point"
'
'cmdEndPoint
@@ -178,23 +192,23 @@ Partial Class Scene
'sepSelPnt1
'
Me.sepSelPnt1.Name = "sepSelPnt1"
Me.sepSelPnt1.Size = New System.Drawing.Size(180, 6)
Me.sepSelPnt1.Size = New System.Drawing.Size(189, 6)
'
'cmdExcludeSurfForSnap
'
Me.cmdExcludeSurfForSnap.Name = "cmdExcludeSurfForSnap"
Me.cmdExcludeSurfForSnap.Size = New System.Drawing.Size(183, 22)
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(180, 6)
Me.sepSelPnt2.Size = New System.Drawing.Size(189, 6)
'
'cmdStopDrag
'
Me.cmdStopDrag.Name = "cmdStopDrag"
Me.cmdStopDrag.Size = New System.Drawing.Size(183, 22)
Me.cmdStopDrag.Size = New System.Drawing.Size(192, 22)
Me.cmdStopDrag.Text = "Drag Off"
'
'Scene
@@ -202,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)
@@ -230,5 +246,7 @@ End Sub
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
+28 -5
View File
@@ -34,6 +34,8 @@ Public Class Scene
WINSEL
SELPART
SELLAYER
SELPATH
SELPATHAUTO
ANALYZE
GETDIST
GETDIST2
@@ -191,6 +193,7 @@ 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, ByVal nAux As Integer)
Public Event OnMouseDownScene(ByVal sender As Object)
@@ -204,6 +207,8 @@ 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)
@@ -215,9 +220,9 @@ Public Class Scene
Cursor = New Cursor(Me.GetType(), "WinSelect.cur")
m_PrevPoint = e.Location
m_nStatus = ST.WINSEL
' se stato SEL, SELPART, SELLAYER o ANALYZE
ElseIf m_nStatus = ST.SEL 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
@@ -249,6 +254,12 @@ Public Class Scene
Case ST.SELLAYER
RaiseEvent OnMouseSelectedLayer(Me, nId)
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
@@ -699,6 +710,12 @@ Public Class Scene
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
@@ -811,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()
@@ -921,7 +942,8 @@ Public Class Scene
'---- Status management -------------
Private Function IsRestorableCurrStatus() As Boolean
Select Case m_nStatus
Case ST.NULL, ST.SEL, 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
@@ -940,7 +962,8 @@ Public Class Scene
m_nStatus = m_nOldStatus
Cursor = Cursors.Default
Return True
ElseIf m_nOldStatus = ST.SEL Or m_nOldStatus = ST.SELPART Or m_nOldStatus = ST.SELLAYER Then
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
-3
View File
@@ -494,9 +494,6 @@
<ItemGroup>
<None Include="Resources\Text.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\PolygonSide.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\Screw.png" />
</ItemGroup>