TestEIn 1.6c5 :

- aggiunta gestione raccordi e smussi di curve.
This commit is contained in:
Dario Sassi
2015-03-20 08:33:36 +00:00
parent 2183c972c3
commit 94309ff76c
10 changed files with 298 additions and 140 deletions
+128 -6
View File
@@ -79,6 +79,8 @@ Public Class Controller
ARC3P
ARCPDP
ARCPVP
FILLET
CHAMFER
RECTANGLE2P
POLYGON
POLYGONSIDE
@@ -147,6 +149,8 @@ Public Class Controller
Private m_bLast As Boolean = False
Private m_ptLastSel As Point3d ' punto da ultima selezione entità
Private m_nLastSel As Integer ' info aux da ultima selezione entità
Private m_ptPrevSel As Point3d ' unto da penultima selezione entità
Private m_nPrevSel As Integer ' info aux da penultima selezione entità
Private m_ptCont As Point3d ' punto finale di entità precedente (per continuazione)
Private m_vtCont As Vector3d = Vector3d.X_AX() ' direzione finale di entità precedente (per continuazione)
@@ -764,9 +768,13 @@ Public Class Controller
m_bLast = bVal
End Sub
Public Sub SetPointFromSelection(ByVal PtP As Point3d, ByVal nAux As Integer)
m_ptLastSel = PtP
m_nLastSel = nAux
Public Sub SetPointFromSelection(ByVal nId As Integer, ByVal PtP As Point3d, ByVal nAux As Integer)
If EgtIsSelectedObj(nId) Then
m_ptPrevSel = m_ptLastSel
m_nPrevSel = m_nLastSel
m_ptLastSel = PtP
m_nLastSel = nAux
End If
End Sub
Public Sub ResetStatus()
@@ -897,6 +905,12 @@ Public Class Controller
' ArcPVP
Case CMD.ARCPVP
Return ProcessArcPVP()
' Fillet
Case CMD.FILLET
Return ProcessFillet()
' Chamfer
Case CMD.CHAMFER
Return ProcessChamfer()
' Rectangle 2P
Case CMD.RECTANGLE2P
Return ProcessRectangle2P()
@@ -1027,6 +1041,10 @@ Public Class Controller
DragArcPDP()
Case CMD.ARCPVP
DragArcPVP()
Case CMD.FILLET
DragFillet()
Case CMD.CHAMFER
DragChamfer()
Case CMD.RECTANGLE2P
DragRectangle2P()
Case CMD.POLYGON
@@ -2436,7 +2454,7 @@ Public Class Controller
If GetCurrLayer() = GDB_ID.NULL Or Not m_Scene.CreateDragGroup() Then
Return False
End If
' imposto stato a primo punto per Arc3P
' imposto stato a primo punto per ArcPDP
m_Scene.SetStatusSelPoint(True)
m_nStep = 1
' abilito dialogo
@@ -2647,6 +2665,110 @@ Public Class Controller
End If
End Sub
Private Function ProcessFillet() As Boolean
Select m_nStep
Case 0
' deve esistere un gruppo corrente e devo poter creare il gruppo di drag
If GetCurrLayer() = GDB_ID.NULL Or Not m_Scene.CreateDragGroup() Then
Return False
End If
' imposto stato a raggio per Fillet
m_nStep = 1
' abilito dialogo
RaiseEvent PrepareInputBox("FILLET", "Insert Radius", "Trim", False, True)
RaiseEvent SetInputBoxCheck(True)
m_nInpType = IBT.TY_DOUBLE
SetInputBoxDouble(10)
Case 1
' reset scena
m_Scene.ResetStatus(False)
' creo il fillet (i punti sono in globale)
Dim nId2 As Integer = EgtGetLastSelectedObj()
Dim nId1 As Integer = EgtGetPrevSelectedObj()
EnableCommandLog()
EgtCreateCurveFillet(GetCurrLayer(),
nId1, m_ptPrevSel.Loc(GDB_ID.GRID), nId2, m_ptLastSel.Loc(GDB_ID.GRID),
Vector3d.Z_AX, m_dLast, m_bLast, REF_TY.GRID)
DisableCommandLog()
EgtDraw()
' aggiorno stato
RaiseEvent UpdateUI(Me, True)
m_nStep = 0
Case Else
m_nStep = 0
Return False
End Select
Return True
End Function
Private Sub DragFillet()
' il gruppo di Drag ha riferimento globale
If m_nStep = 1 Then
' svuoto il gruppo di drag
EgtEmptyGroup(m_Scene.GetDragGroup())
' inserisco le due curve nel gruppo di drag
Dim nId2 As Integer = m_Scene.AddToDragGroup(EgtGetLastSelectedObj())
Dim nId1 As Integer = m_Scene.AddToDragGroup(EgtGetPrevSelectedObj())
' creo fillet (il gruppo di Drag ha riferimento globale)
EgtCreateCurveFillet(m_Scene.GetDragGroup(),
nId1, m_ptPrevSel, nId2, m_ptLastSel,
EgtGetGridVersZ(), m_dLast, m_bLast, REF_TY.GLOB)
EgtDraw()
End If
End Sub
Private Function ProcessChamfer() As Boolean
Select Case m_nStep
Case 0
' deve esistere un gruppo corrente e devo poter creare il gruppo di drag
If GetCurrLayer() = GDB_ID.NULL Or Not m_Scene.CreateDragGroup() Then
Return False
End If
' imposto stato a raggio per Fillet
m_nStep = 1
' abilito dialogo
RaiseEvent PrepareInputBox("CHAMFER", "Insert distance", "Trim", False, True)
RaiseEvent SetInputBoxCheck(True)
m_nInpType = IBT.TY_DOUBLE
SetInputBoxDouble(10)
Case 1
' reset scena
m_Scene.ResetStatus(False)
' creo il fillet (i punti sono in globale)
Dim nId2 As Integer = EgtGetLastSelectedObj()
Dim nId1 As Integer = EgtGetPrevSelectedObj()
EnableCommandLog()
EgtCreateCurveChamfer(GetCurrLayer(),
nId1, m_ptPrevSel.Loc(GDB_ID.GRID), nId2, m_ptLastSel.Loc(GDB_ID.GRID),
Vector3d.Z_AX, m_dLast, m_bLast, REF_TY.GRID)
DisableCommandLog()
EgtDraw()
' aggiorno stato
RaiseEvent UpdateUI(Me, True)
m_nStep = 0
Case Else
m_nStep = 0
Return False
End Select
Return True
End Function
Private Sub DragChamfer()
' il gruppo di Drag ha riferimento globale
If m_nStep = 1 Then
' svuoto il gruppo di drag
EgtEmptyGroup(m_Scene.GetDragGroup())
' inserisco le due curve nel gruppo di drag
Dim nId2 As Integer = m_Scene.AddToDragGroup(EgtGetLastSelectedObj())
Dim nId1 As Integer = m_Scene.AddToDragGroup(EgtGetPrevSelectedObj())
' creo chamfer (il gruppo di Drag ha riferimento globale)
EgtCreateCurveChamfer(m_Scene.GetDragGroup(),
nId1, m_ptPrevSel, nId2, m_ptLastSel,
EgtGetGridVersZ(), m_dLast, m_bLast, REF_TY.GLOB)
EgtDraw()
End If
End Sub
Private Function ProcessRectangle2P() As Boolean
Select Case m_nStep
Case 0
@@ -4408,7 +4530,7 @@ Public Class Controller
If bAllSelected Then
Dim nId As Integer = EgtGetFirstSelectedObj()
While nId <> GDB_ID.NULL
If Not m_Scene.AddToDragGroup(nId) Then
If m_Scene.AddToDragGroup(nId) = GDB_ID.NULL Then
m_Scene.EraseDragGroup()
Return False
End If
@@ -4417,7 +4539,7 @@ Public Class Controller
' altrimenti solo l'ultimo
Else
Dim nId As Integer = EgtGetLastSelectedObj()
If nId = GDB_ID.NULL And Not m_Scene.AddToDragGroup(nId) Then
If nId = GDB_ID.NULL Or m_Scene.AddToDragGroup(nId) = GDB_ID.NULL Then
m_Scene.EraseDragGroup()
Return False
End If
+12
View File
@@ -977,6 +977,18 @@ Public Function EgtCreateCurveArc2PVNEx(ByVal nParentId As Integer, ByRef PtStar
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 EgtCreateCurveFillet(ByVal nParentId As Integer, ByVal nCrv1 As Integer, ByRef PtNear1 As Point3d,
ByVal nCrv2 As Integer, ByRef PtNear2 As Point3d,
ByRef VtNorm As Vector3d, ByVal dRad As Double, ByVal bTrimExt As Boolean, Optional ByVal nRefType As REF_TY = REF_TY.LOC) As Integer
End Function
<DllImport(EgtIntDll, CharSet:=CharSet.Unicode)>
Public Function EgtCreateCurveChamfer(ByVal nParentId As Integer, ByVal nCrv1 As Integer, ByRef PtNear1 As Point3d,
ByVal nCrv2 As Integer, ByRef PtNear2 As Point3d,
ByRef VtNorm As Vector3d, ByVal dDist As Double, ByVal bTrimExt As Boolean, 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
+41 -41
View File
@@ -96,13 +96,13 @@ Partial Class Form1
Me.InputCombo = New System.Windows.Forms.ComboBox()
Me.TabControl2 = New System.Windows.Forms.TabControl()
Me.TabDraw = New System.Windows.Forms.TabPage()
Me.btnFillet = New System.Windows.Forms.Button()
Me.btnPolygon = New System.Windows.Forms.Button()
Me.btnText = New System.Windows.Forms.Button()
Me.btnRectangle2P = New System.Windows.Forms.Button()
Me.btnCircleCD = New System.Windows.Forms.Button()
Me.btnLinePDL = New System.Windows.Forms.Button()
Me.btnArcPDP = New System.Windows.Forms.Button()
Me.btnCircleCP = New System.Windows.Forms.Button()
Me.btnCircle = New System.Windows.Forms.Button()
Me.btnArc3P = New System.Windows.Forms.Button()
Me.btnArcCSE = New System.Windows.Forms.Button()
Me.btnPoint = New System.Windows.Forms.Button()
@@ -1341,13 +1341,13 @@ Partial Class Form1
'TabDraw
'
Me.TabDraw.BackColor = System.Drawing.SystemColors.Control
Me.TabDraw.Controls.Add(Me.btnFillet)
Me.TabDraw.Controls.Add(Me.btnPolygon)
Me.TabDraw.Controls.Add(Me.btnText)
Me.TabDraw.Controls.Add(Me.btnRectangle2P)
Me.TabDraw.Controls.Add(Me.btnCircleCD)
Me.TabDraw.Controls.Add(Me.btnLinePDL)
Me.TabDraw.Controls.Add(Me.btnArcPDP)
Me.TabDraw.Controls.Add(Me.btnCircleCP)
Me.TabDraw.Controls.Add(Me.btnCircle)
Me.TabDraw.Controls.Add(Me.btnArc3P)
Me.TabDraw.Controls.Add(Me.btnArcCSE)
Me.TabDraw.Controls.Add(Me.btnPoint)
@@ -1359,6 +1359,23 @@ Partial Class Form1
Me.TabDraw.TabIndex = 0
Me.TabDraw.Text = "Draw"
'
'btnFillet
'
Me.btnFillet.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
Me.btnFillet.FlatAppearance.BorderSize = 0
Me.btnFillet.FlatAppearance.MouseDownBackColor = System.Drawing.SystemColors.Control
Me.btnFillet.FlatAppearance.MouseOverBackColor = System.Drawing.SystemColors.GradientInactiveCaption
Me.btnFillet.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnFillet.Image = CType(resources.GetObject("btnFillet.Image"), System.Drawing.Image)
Me.btnFillet.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.btnFillet.Location = New System.Drawing.Point(3, 336)
Me.btnFillet.Name = "btnFillet"
Me.btnFillet.Size = New System.Drawing.Size(56, 48)
Me.btnFillet.TabIndex = 41
Me.btnFillet.Text = "Fillet"
Me.btnFillet.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me.btnFillet.UseVisualStyleBackColor = False
'
'btnPolygon
'
Me.btnPolygon.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
@@ -1410,23 +1427,6 @@ Partial Class Form1
Me.btnRectangle2P.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me.btnRectangle2P.UseVisualStyleBackColor = False
'
'btnCircleCD
'
Me.btnCircleCD.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
Me.btnCircleCD.FlatAppearance.BorderSize = 0
Me.btnCircleCD.FlatAppearance.MouseDownBackColor = System.Drawing.SystemColors.Control
Me.btnCircleCD.FlatAppearance.MouseOverBackColor = System.Drawing.SystemColors.GradientInactiveCaption
Me.btnCircleCD.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnCircleCD.Image = CType(resources.GetObject("btnCircleCD.Image"), System.Drawing.Image)
Me.btnCircleCD.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.btnCircleCD.Location = New System.Drawing.Point(0, 192)
Me.btnCircleCD.Name = "btnCircleCD"
Me.btnCircleCD.Size = New System.Drawing.Size(56, 48)
Me.btnCircleCD.TabIndex = 37
Me.btnCircleCD.Text = "Circle cd"
Me.btnCircleCD.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me.btnCircleCD.UseVisualStyleBackColor = False
'
'btnLinePDL
'
Me.btnLinePDL.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
@@ -1453,7 +1453,7 @@ Partial Class Form1
Me.btnArcPDP.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnArcPDP.Image = CType(resources.GetObject("btnArcPDP.Image"), System.Drawing.Image)
Me.btnArcPDP.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.btnArcPDP.Location = New System.Drawing.Point(0, 336)
Me.btnArcPDP.Location = New System.Drawing.Point(0, 288)
Me.btnArcPDP.Name = "btnArcPDP"
Me.btnArcPDP.Size = New System.Drawing.Size(56, 48)
Me.btnArcPDP.TabIndex = 35
@@ -1461,22 +1461,22 @@ Partial Class Form1
Me.btnArcPDP.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me.btnArcPDP.UseVisualStyleBackColor = False
'
'btnCircleCP
'btnCircle
'
Me.btnCircleCP.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
Me.btnCircleCP.FlatAppearance.BorderSize = 0
Me.btnCircleCP.FlatAppearance.MouseDownBackColor = System.Drawing.SystemColors.Control
Me.btnCircleCP.FlatAppearance.MouseOverBackColor = System.Drawing.SystemColors.GradientInactiveCaption
Me.btnCircleCP.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnCircleCP.Image = CType(resources.GetObject("btnCircleCP.Image"), System.Drawing.Image)
Me.btnCircleCP.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.btnCircleCP.Location = New System.Drawing.Point(0, 144)
Me.btnCircleCP.Name = "btnCircleCP"
Me.btnCircleCP.Size = New System.Drawing.Size(56, 48)
Me.btnCircleCP.TabIndex = 34
Me.btnCircleCP.Text = "Circle cp"
Me.btnCircleCP.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me.btnCircleCP.UseVisualStyleBackColor = False
Me.btnCircle.FlatAppearance.BorderColor = System.Drawing.SystemColors.Control
Me.btnCircle.FlatAppearance.BorderSize = 0
Me.btnCircle.FlatAppearance.MouseDownBackColor = System.Drawing.SystemColors.Control
Me.btnCircle.FlatAppearance.MouseOverBackColor = System.Drawing.SystemColors.GradientInactiveCaption
Me.btnCircle.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnCircle.Image = CType(resources.GetObject("btnCircle.Image"), System.Drawing.Image)
Me.btnCircle.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.btnCircle.Location = New System.Drawing.Point(0, 144)
Me.btnCircle.Name = "btnCircle"
Me.btnCircle.Size = New System.Drawing.Size(56, 48)
Me.btnCircle.TabIndex = 34
Me.btnCircle.Text = "Circle"
Me.btnCircle.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me.btnCircle.UseVisualStyleBackColor = False
'
'btnArc3P
'
@@ -1487,7 +1487,7 @@ Partial Class Form1
Me.btnArc3P.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnArc3P.Image = CType(resources.GetObject("btnArc3P.Image"), System.Drawing.Image)
Me.btnArc3P.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.btnArc3P.Location = New System.Drawing.Point(0, 288)
Me.btnArc3P.Location = New System.Drawing.Point(0, 240)
Me.btnArc3P.Name = "btnArc3P"
Me.btnArc3P.Size = New System.Drawing.Size(56, 48)
Me.btnArc3P.TabIndex = 33
@@ -1504,7 +1504,7 @@ Partial Class Form1
Me.btnArcCSE.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnArcCSE.Image = CType(resources.GetObject("btnArcCSE.Image"), System.Drawing.Image)
Me.btnArcCSE.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.btnArcCSE.Location = New System.Drawing.Point(0, 240)
Me.btnArcCSE.Location = New System.Drawing.Point(0, 192)
Me.btnArcCSE.Name = "btnArcCSE"
Me.btnArcCSE.Size = New System.Drawing.Size(56, 48)
Me.btnArcCSE.TabIndex = 32
@@ -2473,7 +2473,7 @@ End Sub
Friend WithEvents InputLabel As System.Windows.Forms.Label
Friend WithEvents InputCheck As System.Windows.Forms.CheckBox
Friend WithEvents InputText As System.Windows.Forms.TextBox
Friend WithEvents btnCircleCP As System.Windows.Forms.Button
Friend WithEvents btnCircle As System.Windows.Forms.Button
Friend WithEvents btnScrew As System.Windows.Forms.Button
Friend WithEvents ImageList2 As System.Windows.Forms.ImageList
Friend WithEvents btnCPlane As System.Windows.Forms.Button
@@ -2507,7 +2507,6 @@ End Sub
Friend WithEvents btnShow As System.Windows.Forms.Button
Friend WithEvents btnArcPDP As System.Windows.Forms.Button
Friend WithEvents btnLinePDL As System.Windows.Forms.Button
Friend WithEvents btnCircleCD As System.Windows.Forms.Button
Friend WithEvents btnSetCurveTh As System.Windows.Forms.Button
Friend WithEvents btnCPlaneObj As System.Windows.Forms.Button
Friend WithEvents btnCPlanePerpObj As System.Windows.Forms.Button
@@ -2557,5 +2556,6 @@ End Sub
Friend WithEvents btnMergeSurf As System.Windows.Forms.Button
Friend WithEvents btnInvertSurf As System.Windows.Forms.Button
Friend WithEvents btnChangeStartCurve As System.Windows.Forms.Button
Friend WithEvents btnFillet As System.Windows.Forms.Button
End Class
+21 -23
View File
@@ -883,7 +883,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAC2
DQAAAk1TRnQBSQFMAgEBDgEAATABEAEwAhABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA
DQAAAk1TRnQBSQFMAgEBDgEAAVgBEAFYAhABAAEQAQAE/wEJAQAI/wFCAU0BNgEEBgABNgEEAgABKAMA
AUADAAFAAwABAQEAAQgGAAEQGAABgAIAAYADAAKAAQABgAMAAYABAAGAAQACgAIAA8ABAAHAAdwBwAEA
AfABygGmAQABMwUAATMBAAEzAQABMwEAAjMCAAMWAQADHAEAAyIBAAMpAQADVQEAA00BAANCAQADOQEA
AYABfAH/AQACUAH/AQABkwEAAdYBAAH/AewBzAEAAcYB1gHvAQAB1gLnAQABkAGpAa0CAAH/ATMDAAFm
@@ -952,7 +952,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAADW
CAAAAk1TRnQBSQFMAgEBAgEAAVABBwFQAQcBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
CAAAAk1TRnQBSQFMAgEBAgEAAXgBBwF4AQcBEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@@ -990,6 +990,16 @@
AwABQAMAARADAAEBAQABAQUAAYAXAAP/AQAE/wQABP8EAAHkASMB/AE/BAAB4AEDAfwBPwQAAWABAwH4
AR8EAAFkAQMB+AEfBAABaAETAfgBHwQAAWgBEwH4AR8EAAFwAQsB8AEPBAABcAELAfABDwQAAXABCwHw
AQ8EAAFwAQsB8AEPBAABYAEDAfABDwQAAWgBEwH4AR8EAAF/A/8EAAF/A/8EAAs=
</value>
</data>
<data name="btnFillet.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAHdElNRQffAxMJMyoKsRGSAAAA5ElEQVRYR8WVAQ7CIBAE
eZiP8+fIkR65wrSmAmuTSZu5k90aE1PO+a+gVIJSCUolKJWwTOn1EPtQ5E1gFkoOIWJoZHuBGEasK9A5
D+hpe09h2RU4nj0s8nOwwzIUOIihxnSww1IUbrC8LrA03GApCjdYjuFFj3srYCl6e4PlObyocWcVLM8F
tr29wTIU6GerYbm5QLnatzoMq/zyBzJDuewHbmfXEldLWwqUq4Yfz7XE1eKuAu1Mf75dNGg+g5/Z7nHo
2NCh+Qx+ZrvHoWNDh+Yz9GfjkhKUSlAqQakEpRKUOnL6AIHYR6o7ju9HAAAAAElFTkSuQmCC
</value>
</data>
<data name="btnPolygon.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@@ -1022,19 +1032,6 @@
QWf5mQH8GSGvde+AP6Pkdf4rsIX+7B1IjpagkEBytASFBJKjJSgkkBwtQSGB5GgJCgkkR0tQSCA5WoJC
AskZBfyBEGyOP2v0m9Yc/EIJj9qKP2v0m3LZNu+HmML2sfSbcvnfB1j6DhBG0YY4+FjzgpSRSBmJlJFI
GYmUkUgZR9pu9s4+9wcQHh4AAAAASUVORK5CYII=
</value>
</data>
<data name="btnCircleCD.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
xAAADsQBlSsOGwAAAAd0SU1FB94LFAsCAQUvm9MAAAF1SURBVFhHxZRRTsQwEEP7y532EnxwQa7GDxKH
KHFIUs/E6aTdVUB6InE8drp02fZ9/1ekOCL9PBJYjHiouTOkyCCUCq4wdRkpVhBCgXcIL6HFuNgEY09n
iuFFemEcNvWR/mxvX0w03wvHADNV3tg+3sUF0lHvtZv+6a8Vg1Jef0d5dmPNSbLmECrHXlwgyXbmWDz7
9K68ghzK7HLZyKYkHSaF8Q7KlTf7+awtrCl8+uz7/M7+s3KAvOwvmLO2GBg87MMF+O/svUybcb7Q4Mke
PHktL+upOZEfGjzV08ovznmfNCTG70B54bJv4skB8rK/YM7aggze1KC3PfQS7PV+Np3/H6ByowcghzK7
XG9m49/XC2c3y4HP7M7Nxt22lj5Rfv6pwtMJNIDiF5YnWfg6gQbrBdpFnFfB8w75zeqELI5DgA66MQOk
WMEghdxhWFyRIoMQCrxCWA6kOAKhVKCYKmWkuBIprkSKK5HiSqS4EimuY99+AdSKZd6jDbarAAAAAElF
TkSuQmCC
</value>
</data>
<data name="btnLinePDL.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@@ -1059,16 +1056,17 @@
34K83re+FmA0UhyJFEcixZFIcSRSHEeaXhE4h7KxmXKQAAAAAElFTkSuQmCC
</value>
</data>
<data name="btnCircleCP.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="btnCircle.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
xAAADsQBlSsOGwAAAAd0SU1FB94LARAaLltR1e8AAAFASURBVFhHxZMLDsIgEEQ9WE/r6bxFZQjbzi5D
+cSgyUvK9O2A1b7O8/wrMmyRPkcCFy0ONfeEDBmU0gYzDB1GhgZKqHCF7iF02N/YFWNN9xTNg9RBu2zs
kU7O10E9CIY2N+DT7EX0gF/Ug1MbRzBPXbLPL7ycIi+v0Ou8L3787Q30UGfVyyJLKbolxaTbPARLUmiR
vfcn+/Eeg67LNWgPFu1GWtZFBntUlokuuLxI8b1YsEyRnYfCSM/3YsEyBXtWZEQXXF6k+F68+e9/AFje
YtIdegse39dV0EOdVW+UWUzRfW+VXqdf/PgpYJ66ZJ9b5MAPGNMHwQzNZ6ID6kAMFoYOAY9mGDlfBTls
lwBdtDADZGhgkEpW6D41GTIoocIZxn4yFbZAKW2gGNqUkeFOZLgTGe5EhjuR4U5kuI/z9QVrMm0Sw4U7
uAAAAABJRU5ErkJggg==
xAAADsQBlSsOGwAAAAd0SU1FB98DEwklCbRO1TcAAAGbSURBVFhHxZNRcoMwDET57Z1yiX70PjlLr9af
zPQQVCsse2XL2JCUeOYVI613RQPLuq5vJSxGyLoJ2PS4RedGhEUDphRwhOlhwiKACRmeYWqItjAOdsa4
p17E7iD+pm829TS/y8cPM3Pe35QDzFR4Zvn6DAaQVqAVyqZ9+mPBIIXbdcavbLxYSq14FwrHfTCAlNtz
259nn74KN+BDnqGvCVkkJS+qcdpOOGl3hzBRVxChuu+H6qfCoTWqDBNaQ25bI4N1MOPfudYC0zWQvggT
1ohQTTLR8MCQYb2D9EWYsEaEaXL44Jz26vB0LmuysNB/B9ILp7rKKAJeWUvhqGdNElpDsaaD3vahlpA1
9RXsf68U7uoD4EOerS80eeOF2+eF3slwUHvWfVA21bQW+kR49+nd3japYWId4IXhUna9O656bw1q6gEb
IA9Cuh58vmILS+Fpr0McMQHNS3TkjCyE8gD3xsyQtWc6Q2/YPIBeuVkj6+wQYTiQNT8AI2s0TDeUkbX9
648O8F+ExSsJi1cSFq8kLF5JWLyOdfkDj9YpK3fkyqgAAAAASUVORK5CYII=
</value>
</data>
<data name="btnArc3P.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+21 -9
View File
@@ -368,8 +368,8 @@ Public Class Form1
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)
Private Sub OnMousePointFromSelection(ByVal sender As Object, ByVal nId As Integer, ByVal PtP As Point3d, ByVal nAux As Integer) Handles Scene1.OnMousePointFromSelection
m_Controller.SetPointFromSelection(nId, PtP, nAux)
End Sub
Private Sub OnMouseDone(ByVal sender As Object) Handles Scene1.OnMouseDone
@@ -526,11 +526,11 @@ Public Class Form1
btnPoint.Enabled = bLayerOk
btnLine2P.Enabled = bLayerOk
btnLinePDL.Enabled = bLayerOk
btnCircleCP.Enabled = bLayerOk
btnCircleCD.Enabled = bLayerOk
btnCircle.Enabled = bLayerOk
btnArcCSE.Enabled = bLayerOk
btnArc3P.Enabled = bLayerOk
btnArcPDP.Enabled = bLayerOk
btnFillet.Enabled = bLayerOk
btnRectangle2P.Enabled = bLayerOk
btnPolygon.Enabled = bLayerOk
btnText.Enabled = bLayerOk
@@ -613,11 +613,11 @@ Public Class Form1
SetTextAndToolTip(btnPoint, 303, 304) ' Point / Point
SetTextAndToolTip(btnLine2P, 305, 306) ' Line 2P / Line : 2 Points
SetTextAndToolTip(btnLinePDL, 307, 308) ' Line PDL / Line : point, direction, length
SetTextAndToolTip(btnCircleCP, 309, 310) ' Circle CP / Circle : Center, Point
SetTextAndToolTip(btnCircleCD, 311, 312) ' Circle / Circle : Center, Diameter
SetTextAndToolTip(btnCircle, 309, 310) ' Circle / Circle : Center, Point<br/> Circle : Center, Diameter (Shift)
SetTextAndToolTip(btnArcCSE, 313, 314) ' Arc CSE / Arc : Center, Start, End
SetTextAndToolTip(btnArc3P, 315, 316) ' Arc 3P / Arc : 3 Points
SetTextAndToolTip(btnArcPDP, 317, 318) ' Arc SDE / Arc : Start, Direction, End
SetTextAndToolTip(btnFillet, 311, 312) ' Fillet / Fillet : Radius<br/>Chamfer : Dist1, Dist2 (Shift)
SetTextAndToolTip(btnRectangle2P, 319, 320) ' Rect 2P / Rectangle : 2 Points
SetTextAndToolTip(btnPolygon, 321, 322) ' Polygon / Polygon : Side with 2 Points
SetTextAndToolTip(btnText, 323, 324) ' Text / Text<br/>Advanced Text (Shift)
@@ -901,11 +901,15 @@ Public Class Form1
End If
End Sub
Private Sub btnCircleCP_Click(sender As System.Object, e As System.EventArgs) Handles btnCircleCP.Click
m_Controller.ExecuteCommand(CMD.CIRCLECP)
Private Sub btnCircleCP_Click(sender As System.Object, e As System.EventArgs) Handles btnCircle.Click
If (ModifierKeys And Keys.Shift) <> Keys.Shift Then
m_Controller.ExecuteCommand(CMD.CIRCLECP)
Else
m_Controller.ExecuteCommand(CMD.CIRCLECD)
End If
End Sub
Private Sub btnCircleCD_Click(sender As System.Object, e As System.EventArgs) Handles btnCircleCD.Click
Private Sub btnCircleCD_Click(sender As System.Object, e As System.EventArgs)
m_Controller.ExecuteCommand(CMD.CIRCLECD)
End Sub
@@ -929,6 +933,14 @@ Public Class Form1
End If
End Sub
Private Sub btnFillet_Click(sender As System.Object, e As System.EventArgs) Handles btnFillet.Click
If (ModifierKeys And Keys.Shift) <> Keys.Shift Then
m_Controller.ExecuteCommand(CMD.FILLET)
Else
m_Controller.ExecuteCommand(CMD.CHAMFER)
End If
End Sub
Private Sub btnRectangle2P_Click(sender As System.Object, e As System.EventArgs) Handles btnRectangle2P.Click
m_Controller.ExecuteCommand(CMD.RECTANGLE2P)
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.4")>
<Assembly: AssemblyFileVersion("1.6.3.4")>
<Assembly: AssemblyVersion("1.6.3.5")>
<Assembly: AssemblyFileVersion("1.6.3.5")>
Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

+67 -59
View File
@@ -195,7 +195,7 @@ Public Class Scene
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 OnMousePointFromSelection(ByVal sender As Object, ByVal nId As Integer, 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)
@@ -207,7 +207,7 @@ 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
' Per correggere un problema con hot spot cursore, nei file cur è stato spostato di 4 pixel in Y+ (in basso)
Protected Overrides Sub OnMouseDown(e As System.Windows.Forms.MouseEventArgs)
' Imposto il contesto della scena come corrente
@@ -217,38 +217,15 @@ Public Class Scene
' se stato WINSEL oppure SEL e premuto SHIFT allora inizio selezione a finestra
If m_nStatus = ST.WINSEL Or
(m_nStatus = ST.SEL And (ModifierKeys And Keys.Shift) = Keys.Shift) Then
Cursor = New Cursor(Me.GetType(), "WinSelect.cur")
If m_nStatus <> ST.WINSEL Then
Cursor = New Cursor(Me.GetType(), "WinSelect.cur")
m_nStatus = ST.WINSEL
End If
m_PrevPoint = e.Location
m_nStatus = ST.WINSEL
' 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
Cursor = New Cursor(Me.GetType(), "Analyze.cur")
End If
' per selezione percorso abilito solo le curve
If m_nStatus = ST.SELPATH Or m_nStatus = ST.SELPATHAUTO Then
EgtSetObjFilterForSelect(False, True, False, False, False)
Else
EgtSetObjFilterForSelect(True, True, True, True, True)
End If
Dim nId As Integer = GDB_ID.NULL
Dim nSel As Integer
EgtSelect(e.Location, DIM_SEL, DIM_SEL, nSel)
If nSel = 1 Then
nId = EgtGetFirstObjInSelWin()
ElseIf nSel > 1 Then
Dim MselDlg As New SelectMulti
MselDlg.StartPosition = System.Windows.Forms.FormStartPosition.Manual
Dim ptScreen As Point = PointToScreen(e.Location)
ptScreen.Offset(10, 0)
MselDlg.Location = ptScreen
If MselDlg.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
nId = MselDlg.GetId()
End If
End If
' se stato SEL, SELPART, SELLAYER
ElseIf m_nStatus = ST.SEL Or m_nStatus = ST.SELPART Or m_nStatus = ST.SELLAYER Then
EgtSetObjFilterForSelect(True, True, True, True, True)
Dim nId As Integer = ChooseOneSelectedObj(e.Location)
If nId <> GDB_ID.NULL Then
' evento per entità selezionate
Select Case m_nStatus
@@ -256,31 +233,40 @@ Public Class Scene
RaiseEvent OnMouseSelectedObj(Me, nId, True)
Case ST.SELPART
RaiseEvent OnMouseSelectedPart(Me, nId)
m_nStatus = ST.SEL
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
' evento per posizione punto di selezione
Dim PtTemp As Point3d
Dim nAux As Integer
If EgtGetPointFromSelect(nId, e.Location, PtTemp, nAux) Then
RaiseEvent OnMousePointFromSelection(Me, PtTemp, nAux)
RaiseEvent OnMousePointFromSelection(Me, nId, PtTemp, nAux)
End If
m_nStatus = ST.SEL
End If
' se stato misura di distanza (primo punto)
' se stato SELPATH, SELPATHAUTO
ElseIf m_nStatus = ST.SELPATH Or m_nStatus = ST.SELPATHAUTO Then
EgtSetObjFilterForSelect(False, True, False, False, False) ' abilito solo le curve
Dim nId As Integer = ChooseOneSelectedObj(e.Location)
If nId <> GDB_ID.NULL Then
RaiseEvent OnMouseSelectedPath(Me, nId, (m_nStatus = ST.SELPATH))
Dim PtTemp As Point3d
Dim nAux As Integer
If EgtGetPointFromSelect(nId, e.Location, PtTemp, nAux) Then
RaiseEvent OnMousePointFromSelection(Me, nId, PtTemp, nAux)
End If
m_nStatus = ST.SEL
End If
' se stato ANALYZE
ElseIf m_nStatus = ST.ANALYZE Then
EgtSetObjFilterForSelect(True, True, True, True, True)
Dim nId As Integer = ChooseOneSelectedObj(e.Location)
If nId <> GDB_ID.NULL Then
RaiseEvent OnMouseAnalyzed(Me, nId)
End If
' se stato GETDIST (primo punto per misura di distanza)
ElseIf m_nStatus = ST.GETDIST Then
If m_bExcludeSurfForSnap Then
EgtSetObjFilterForSelect(True, True, False, True, True)
End If
EgtSetObjFilterForSelect(True, True, (Not m_bExcludeSurfForSnap), True, True)
If EgtGetGraphicSnapPoint(m_nSnapType, e.Location, DIM_SEL, DIM_SEL, m_ptPrev) Then
' salvo il punto di riferimento
Dim ptWin As Point3d
@@ -288,11 +274,9 @@ Public Class Scene
m_PrevPoint = New Point(ptWin.x, ptWin.y)
m_nStatus = ST.GETDIST2
End If
' se stato misura di distanza (secondo punto)
' se stato GETDIST2(secondo punto per misura di distanza)
ElseIf m_nStatus = ST.GETDIST2 Then
If m_bExcludeSurfForSnap Then
EgtSetObjFilterForSelect(True, True, False, True, True)
End If
EgtSetObjFilterForSelect(True, True, (Not m_bExcludeSurfForSnap), True, True)
Dim ptSel As Point3d
If EgtGetGraphicSnapPoint(m_nSnapType, e.Location, DIM_SEL, DIM_SEL, ptSel) Then
' disegno la linea (coordinate geo globali)
@@ -318,9 +302,7 @@ Public Class Scene
End If
' se stato selezione punto
ElseIf m_nStatus = ST.SELPOINT Then
If m_bExcludeSurfForSnap Then
EgtSetObjFilterForSelect(True, True, False, True, True)
End If
EgtSetObjFilterForSelect(True, True, (Not m_bExcludeSurfForSnap), True, True)
If Not m_bDragOn Then
' rendo selezionabile gruppo di drag
If Not m_bDragSelectable Then
@@ -430,12 +412,20 @@ Public Class Scene
Dim nSel As Integer
EgtSelect(Center, nH, nW, nSel)
' notifico per ogni entità selezionata
Dim nLastId = GDB_ID.NULL
Dim nId = EgtGetFirstObjInSelWin()
While nId <> GDB_ID.NULL
Dim nNextId = EgtGetNextObjInSelWin()
RaiseEvent OnMouseSelectedObj(Me, nId, (nNextId = GDB_ID.NULL))
nLastId = nId
nId = nNextId
End While
' evento per posizione punto di selezione
Dim PtTemp As Point3d
Dim nAux As Integer
If EgtGetPointFromSelect(nLastId, e.Location, PtTemp, nAux) Then
RaiseEvent OnMousePointFromSelection(Me, nLastId, PtTemp, nAux)
End If
' ritorno allo stato SEL
m_nStatus = ST.SEL
Cursor = New Cursor(Me.GetType(), "Select.cur")
@@ -577,6 +567,25 @@ Public Class Scene
End If
End Sub
Private Function ChooseOneSelectedObj(ByVal WinXY As Point) As Integer
Dim nId As Integer = GDB_ID.NULL
Dim nSel As Integer
EgtSelect(WinXY, DIM_SEL, DIM_SEL, nSel)
If nSel = 1 Then
nId = EgtGetFirstObjInSelWin()
ElseIf nSel > 1 Then
Dim MselDlg As New SelectMulti
MselDlg.StartPosition = System.Windows.Forms.FormStartPosition.Manual
Dim ptScreen As Point = PointToScreen(WinXY)
ptScreen.Offset(10, 0)
MselDlg.Location = ptScreen
If MselDlg.ShowDialog() = System.Windows.Forms.DialogResult.OK Then
nId = MselDlg.GetId()
End If
End If
Return nId
End Function
Private Sub ShowCursorPos(ByVal WinXY As Point)
' se coord. griglia e non snap a punto in Z
@@ -1113,13 +1122,12 @@ Public Class Scene
Return True
End Function
Public Function AddToDragGroup(ByVal nId As Integer) As Boolean
Public Function AddToDragGroup(ByVal nId As Integer) As Integer
' le azioni successive sono temporanee -> non devono cambiare lo stato di modifica del progetto
EgtDisableModified()
' copio entità
Dim nNewId As Integer = EgtCopyGlob(nId, m_nDragGroup, GDB_POS.SON)
Dim bOk As Boolean = (nNewId <> GDB_ID.NULL)
If bOk Then
If nNewId <> GDB_ID.NULL Then
' assegno il colore (potrebbe essere da layer, quindi va fatto)
Dim ColObj As Color3d
EgtGetCalcColor(nId, ColObj)
@@ -1129,7 +1137,7 @@ Public Class Scene
End If
' riabilito possibilità modifica stato progetto
EgtEnableModified()
Return bOk
Return nNewId
End Function
Public Function GetDragGroup() As Integer
+6
View File
@@ -509,6 +509,12 @@
<ItemGroup>
<None Include="Resources\ChangeStart.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\Circle.png" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\Fillet.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<PropertyGroup>
<PostBuildEvent>IF "$(PlatformName)"=="x86" IF "$(ConfigurationName)" == "Release" copy $(TargetPath) c:\EgtProg\TestEIn\TestEInR32.exe