TestEIn 1.9l4 :

- modifiche per aggiornamento.
This commit is contained in:
Dario Sassi
2019-01-03 08:13:18 +00:00
parent e11590b58c
commit 5b09566dbe
4 changed files with 95 additions and 18 deletions
+36 -5
View File
@@ -137,6 +137,7 @@ Public Class Controller
Private m_nLastCmd As CMD = CMD.NULL
Private m_nStep As Integer = 0
Private m_bContinue As Boolean = False
Private m_nContinueId As Integer = GDB_ID.NULL
Private m_ptP1 As Point3d
Private m_sepP1 As SEP
Private m_nIdP1 As Integer
@@ -1004,6 +1005,7 @@ Public Class Controller
Public Sub ResetStatus(Optional bRedraw As Boolean = True)
m_nStep = 0
m_bContinue = False
m_nContinueId = GDB_ID.NULL
m_sepP1 = SEP.PT_STD
m_sepP2 = SEP.PT_STD
m_sepLast = SEP.PT_STD
@@ -1012,12 +1014,17 @@ Public Class Controller
Public Sub SetContinue()
m_bContinue = True
m_nContinueId = GDB_ID.NULL
End Sub
Public Function GetContinue() As Boolean
Return m_bContinue
End Function
Public Function GetContinueId() As Integer
Return m_nContinueId
End Function
Public Function RepeatLastCommand() As Boolean
Return ExecuteCommand(m_nLastCmd)
End Function
@@ -2350,8 +2357,21 @@ Public Class Controller
' creo la linea (i punti sono in globale)
EnableCommandLog()
Dim nId As Integer = EgtCreateLineEx(GetCurrLayer(),
m_ptP1.Loc(GDB_ID.GRID), m_sepP1, m_nIdP1,
m_ptLast.Loc(GDB_ID.GRID), m_sepLast, m_nIdLast, GDB_RT.GRID)
m_ptP1.Loc(GDB_ID.GRID), m_sepP1, m_nIdP1,
m_ptLast.Loc(GDB_ID.GRID), m_sepLast, m_nIdLast, GDB_RT.GRID)
' se richiesta curva composita e creazione riuscita
If m_bContinue And nId <> GDB_ID.NULL Then
If m_nContinueId = GDB_ID.NULL Then
m_nContinueId = EgtCreateCurveCompo(GetCurrLayer(), nId, True)
nId = m_nContinueId
Else
If EgtAddCurveCompoCurve(m_nContinueId, nId, True) Then
nId = m_nContinueId
Else
nId = GDB_ID.NULL
End If
End If
End If
DisableCommandLog()
If nId <> GDB_ID.NULL Then
m_ptCont = m_ptLast
@@ -2913,6 +2933,19 @@ Public Class Controller
EnableCommandLog()
Dim nId = EgtCreateArc2PDEx(GetCurrLayer(), m_ptP1.Loc(GDB_ID.GRID), m_ptLast.Loc(GDB_ID.GRID),
m_sepLast, m_nIdLast, m_dLast, GDB_RT.GRID)
' se richiesta curva composita e creazione riuscita
If m_bContinue And nId <> GDB_ID.NULL Then
If m_nContinueId = GDB_ID.NULL Then
m_nContinueId = EgtCreateCurveCompo(GetCurrLayer(), nId, True)
nId = m_nContinueId
Else
If EgtAddCurveCompoCurve(m_nContinueId, nId, True) Then
nId = m_nContinueId
Else
nId = GDB_ID.NULL
End If
End If
End If
DisableCommandLog()
If nId <> GDB_ID.NULL Then
m_ptCont = m_ptLast
@@ -4273,9 +4306,7 @@ Public Class Controller
End If
' creo la curva composita (concatenando le curve selezionate)
EnableCommandLog()
Dim nCrvIds(0) As Integer
nCrvIds(0) = GDB_ID.SEL
EgtCreateCurveCompoByChain(GetCurrLayer(), 1, nCrvIds, New Point3d, Not m_bLast, GDB_RT.GRID)
EgtCreateCurveCompoByChain(GetCurrLayer(), 1, {GDB_ID.SEL}, New Point3d, Not m_bLast, GDB_RT.GRID)
DisableCommandLog()
' reset stato scena
m_Scene.ResetStatus()
+52 -10
View File
@@ -2575,6 +2575,23 @@ Public Function EgtCreateCurveChamfer(nParentId As Integer, nCrv1 As Integer, By
End If
End Function
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtCreateCurveCompo"), SuppressUnmanagedCodeSecurity()>
Private Function EgtCreateCurveCompo_32(nParentId As Integer, nNumCrv As Integer, nCrvId() As Integer, bCrvErase As Boolean) As Integer
End Function
<DllImport(EgtIntDll64, CharSet:=CharSet.Unicode, EntryPoint:="EgtCreateCurveCompo"), SuppressUnmanagedCodeSecurity()>
Private Function EgtCreateCurveCompo_64(nParentId As Integer, nNumCrv As Integer, nCrvId() As Integer, bCrvErase As Boolean) As Integer
End Function
Public Function EgtCreateCurveCompo(nParentId As Integer, nCrvId() As Integer, bCrvErase As Boolean) As Integer
If IntPtr.Size = 4 Then
Return EgtCreateCurveCompo_32(nParentId, nCrvId.Count(), nCrvId, bCrvErase)
Else
Return EgtCreateCurveCompo_64(nParentId, nCrvId.Count(), nCrvId, bCrvErase)
End If
End Function
Public Function EgtCreateCurveCompo(nParentId As Integer, nCrvId As Integer, bCrvErase As Boolean) As Integer
Return EgtCreateCurveCompo(nParentId, {nCrvId}, bCrvErase)
End Function
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtCreateCurveCompoByChain"), SuppressUnmanagedCodeSecurity()>
Private Function EgtCreateCurveCompoByChain_32(nParentId As Integer, nNumCrv As Integer, nCrvId() As Integer,
ByRef PtNearStart As Point3d, bCrvErase As Boolean, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer
@@ -2591,6 +2608,10 @@ Public Function EgtCreateCurveCompoByChain(nParentId As Integer, nNumCrv As Inte
Return EgtCreateCurveCompoByChain_64(nParentId, nNumCrv, nCrvId, PtNearStart, bCrvErase, nRefType)
End If
End Function
Public Function EgtCreateCurveCompoByChain(nParentId As Integer, nCrvId() As Integer,
ByRef PtNearStart As Point3d, bCrvErase As Boolean, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer
Return EgtCreateCurveCompoByChain(nParentId, nCrvId.Count(), nCrvId, PtNearStart, bCrvErase, nRefType)
End Function
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtCreateCurveCompoByReorder"), SuppressUnmanagedCodeSecurity()>
Private Function EgtCreateCurveCompoByReorder_32(nParentId As Integer, nNumCrv As Integer, nCrvId() As Integer,
@@ -2608,6 +2629,10 @@ Public Function EgtCreateCurveCompoByReorder(nParentId As Integer, nNumCrv As In
Return EgtCreateCurveCompoByReorder_64(nParentId, nNumCrv, nCrvId, PtNearStart, bCrvErase, nRefType)
End If
End Function
Public Function EgtCreateCurveCompoByReorder(nParentId As Integer, nCrvId() As Integer,
ByRef PtNearStart As Point3d, bCrvErase As Boolean, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer
Return EgtCreateCurveCompoByReorder_32(nParentId, nCrvId.Count(), nCrvId, PtNearStart, bCrvErase, nRefType)
End Function
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtCreateRectangle2P"), SuppressUnmanagedCodeSecurity()>
Private Function EgtCreateRectangle2P_32(nParentId As Integer,
@@ -3409,6 +3434,20 @@ Public Function EgtCloseCurveCompo(nId As Integer) As Boolean
End If
End Function
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtAddCurveCompoCurve"), SuppressUnmanagedCodeSecurity()>
Private Function EgtAddCurveCompoCurve_32(nId As Integer, nAddCrvId As Integer, bEraseOrig As Boolean) As Boolean
End Function
<DllImport(EgtIntDll64, CharSet:=CharSet.Unicode, EntryPoint:="EgtAddCurveCompoCurve"), SuppressUnmanagedCodeSecurity()>
Private Function EgtAddCurveCompoCurve_64(nId As Integer, nAddCrvId As Integer, bEraseOrig As Boolean) As Boolean
End Function
Public Function EgtAddCurveCompoCurve(nId As Integer, nAddCrvId As Integer, bEraseOrig As Boolean) As Boolean
If IntPtr.Size = 4 Then
Return EgtAddCurveCompoCurve_32(nId, nAddCrvId, bEraseOrig)
Else
Return EgtAddCurveCompoCurve_64(nId, nAddCrvId, bEraseOrig)
End If
End Function
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtAddCurveCompoLine"), SuppressUnmanagedCodeSecurity()>
Private Function EgtAddCurveCompoLine_32(nId As Integer, ByRef PtNew As Point3d, Optional nRefType As GDB_RT = GDB_RT.LOC) As Boolean
End Function
@@ -6481,17 +6520,20 @@ End Function
'---------- Nestings -----------------------------------------------------------
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtCreateFlatParts"), SuppressUnmanagedCodeSecurity()>
Private Function EgtCreateFlatParts_32(nType As Integer) As Boolean
Private Function EgtCreateFlatParts_32(nType As Integer, dToler As Double) As Boolean
End Function
<DllImport(EgtIntDll64, CharSet:=CharSet.Unicode, EntryPoint:="EgtCreateFlatParts"), SuppressUnmanagedCodeSecurity()>
Private Function EgtCreateFlatParts_64(nType As Integer) As Boolean
Private Function EgtCreateFlatParts_64(nType As Integer, dToler As Double) As Boolean
End Function
Public Function EgtCreateFlatParts(nType As Integer, dToler As Double) As Boolean
If IntPtr.Size = 4 Then
Return EgtCreateFlatParts_32(nType, dToler)
Else
Return EgtCreateFlatParts_64(nType, dToler)
End If
End Function
Public Function EgtCreateFlatParts(nType As Integer) As Boolean
If IntPtr.Size = 4 Then
Return EgtCreateFlatParts_32(nType)
Else
Return EgtCreateFlatParts_64(nType)
End If
Return EgtCreateFlatParts(nType, 0.10000000000000001)
End Function
<DllImport(EgtIntDll32, CharSet:=CharSet.Unicode, EntryPoint:="EgtAdjustFlatPartLayer"), SuppressUnmanagedCodeSecurity()>
@@ -11898,12 +11940,12 @@ End Function
'---------- Costanti -----------------------------------------------------------
'Costanti : GEOMETRIA
Public Const ONEMM As Double = 1.0
Public Const ONEINCH As Double = 25.4
Public Const ONEINCH As Double = 25.399999999999999
Public Const EPS_SMALL As Double = 0.001
Public Const EPS_ZERO As Double = 0.0000001
Public Const EPS_ZERO As Double = 0.000000099999999999999995
Public Const EPS_ANG_SMALL As Double = 0.001
Public Const INFINITO As Double = 10000000000.0
Public Const EPS_STM As Double = 0.05
Public Const EPS_STM As Double = 0.050000000000000003
Public Const EPS_STM_DRAG As Double = 0.5
'Cosatnti : TIPO DI CHIAVE
Public Enum KEY_TYPE As Integer
+3 -3
View File
@@ -27,7 +27,7 @@ Imports System.Runtime.InteropServices
#End If
<Assembly: AssemblyCompany("EgalTech s.r.l.")>
<Assembly: AssemblyProduct("TestEIn")>
<Assembly: AssemblyCopyright("Copyright © 2014-2018 by EgalTech s.r.l.")>
<Assembly: AssemblyCopyright("Copyright © 2014-2019 by EgalTech s.r.l.")>
<Assembly: AssemblyTrademark("")>
<Assembly: ComVisible(False)>
@@ -46,5 +46,5 @@ Imports System.Runtime.InteropServices
' utilizzando l'asterisco (*) come descritto di seguito:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.9.12.2")>
<Assembly: AssemblyFileVersion("1.9.12.2")>
<Assembly: AssemblyVersion("1.9.12.4")>
<Assembly: AssemblyFileVersion("1.9.12.4")>
+4
View File
@@ -1443,6 +1443,10 @@ Public Class Scene
EgtZoom(ZM.OUT)
End Sub
Public Sub ZoomSel()
EgtZoomObject(GDB_ID.SEL)
End Sub
'---- Rendering Buttons ----
Public Sub WireFrame()
EgtSetShowMode(SM.WIREFRAME)