From 9f49f4e4e1faba5c296918e2d5a10cabd86af4ca Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Fri, 5 Apr 2024 16:59:49 +0200 Subject: [PATCH] =?UTF-8?q?EgtUILib=20:=20-=20in=20Interfaccia=20aggiornat?= =?UTF-8?q?a=20EgtCreateSurfTmSwept=20con=20possibilit=C3=A0=20di=20nuovo?= =?UTF-8?q?=20parametro=20vettore=20normale=20al=20piano=20di=20giacitura?= =?UTF-8?q?=20asse=20X=20-=20in=20Controller=20aggiunta=20gestione=20swept?= =?UTF-8?q?=20in=203d=20con=20opzione=20Rotation=20X=20plane=20o=20Rotatio?= =?UTF-8?q?n=20Minimizing.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controller.vb | 10 +++++++--- EgtInterface.vb | 45 ++++++++++++++++++++++++++------------------- EgtUILib.vbproj | 4 +++- 3 files changed, 36 insertions(+), 23 deletions(-) diff --git a/Controller.vb b/Controller.vb index 8eda217..b30f8b0 100644 --- a/Controller.vb +++ b/Controller.vb @@ -4880,8 +4880,10 @@ Public Class Controller ' imposto nuovo stato m_nStep = 1 ' abilito dialogo - RaiseEvent PrepareInputBox("SWEPT", "", "CapEnds", False, True) + RaiseEvent PrepareInputBox("SWEPT", "", "CapEnds", True, True) RaiseEvent SetInputBoxCheck(m_bLastCapEndsCheck) + RaiseEvent AddInputBoxCombo("Rotation X plane", True) + RaiseEvent AddInputBoxCombo("Rotation Minimizing", False) m_nInpType = IBT.TY_NULL ' anteprima EgtDisableModified() @@ -4892,7 +4894,8 @@ Public Class Controller EnableCommandLog() Dim nGuideId As Integer = EgtGetLastSelectedObj() Dim nSectId As Integer = EgtGetPrevSelectedObj() - EgtCreateSurfTmSwept(GetCurrLayer(), nSectId, nGuideId, m_bLast, m_dEpsStm) + Dim vtAx As Vector3d = If( m_nLast = 0, Vector3d.Z_AX(), Vector3d.NULL()) + EgtCreateSurfTmSwept(GetCurrLayer(), nSectId, nGuideId, vtAx, m_bLast, m_dEpsStm, GDB_RT.GRID) DisableCommandLog() ' reset stato scena m_Scene.ResetStatus() @@ -4913,8 +4916,9 @@ Public Class Controller ' creo la superficie di swept (a partire dai contorni selezionati) Dim nGuideId As Integer = EgtGetLastSelectedObj() Dim nSectId As Integer = EgtGetPrevSelectedObj() + Dim vtAx As Vector3d = If( m_nLast = 0, Vector3d.Z_AX(), Vector3d.NULL()) ' eseguo - EgtCreateSurfTmSwept(m_Scene.GetDragGroup(), nSectId, nGuideId, m_bLast, EPS_STM_DRAG) + EgtCreateSurfTmSwept(m_Scene.GetDragGroup(), nSectId, nGuideId, vtAx, m_bLast, EPS_STM_DRAG, GDB_RT.GRID) EgtDraw() End If End Sub diff --git a/EgtInterface.vb b/EgtInterface.vb index 66af569..c54ec1e 100644 --- a/EgtInterface.vb +++ b/EgtInterface.vb @@ -3789,13 +3789,11 @@ End Function Private Function EgtCreateSurfTmByExtrusion_32(nParentId As Integer, nNumCrv As Integer, nCrvId() As Integer, - ByRef VtExtr As Vector3d, dLinTol As Double, - Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer + ByRef VtExtr As Vector3d, dLinTol As Double, nRefType As GDB_RT) As Integer End Function Private Function EgtCreateSurfTmByExtrusion_64(nParentId As Integer, nNumCrv As Integer, nCrvId() As Integer, - ByRef VtExtr As Vector3d, dLinTol As Double, - Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer + ByRef VtExtr As Vector3d, dLinTol As Double, nRefType As GDB_RT) As Integer End Function Public Function EgtCreateSurfTmByExtrusion(nParentId As Integer, nNumCrv As Integer, nCrvId() As Integer, ByRef VtExtr As Vector3d, dLinTol As Double, @@ -3809,13 +3807,11 @@ End Function Private Function EgtCreateSurfTmByRegionExtrusion_32(nParentId As Integer, nNumCrv As Integer, nCrvId() As Integer, - ByRef VtExtr As Vector3d, dLinTol As Double, - Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer + ByRef VtExtr As Vector3d, dLinTol As Double, nRefType As GDB_RT) As Integer End Function Private Function EgtCreateSurfTmByRegionExtrusion_64(nParentId As Integer, nNumCrv As Integer, nCrvId() As Integer, - ByRef VtExtr As Vector3d, dLinTol As Double, - Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer + ByRef VtExtr As Vector3d, dLinTol As Double, nRefType As GDB_RT) As Integer End Function Public Function EgtCreateSurfTmByRegionExtrusion(nParentId As Integer, nNumCrv As Integer, nCrvId() As Integer, ByRef VtExtr As Vector3d, dLinTol As Double, @@ -3830,14 +3826,12 @@ End Function Private Function EgtCreateSurfTmByRevolve_32(nParentId As Integer, nCrvId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, - bCapEnds As Boolean, dLinTol As Double, - Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer + bCapEnds As Boolean, dLinTol As Double, nRefType As GDB_RT) As Integer End Function Private Function EgtCreateSurfTmByRevolve_64(nParentId As Integer, nCrvId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, - bCapEnds As Boolean, dLinTol As Double, - Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer + bCapEnds As Boolean, dLinTol As Double, nRefType As GDB_RT) As Integer End Function Public Function EgtCreateSurfTmByRevolve(nParentId As Integer, nCrvId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, @@ -3854,13 +3848,13 @@ End Function Private Function EgtCreateSurfTmByScrewing_32(nParentId As Integer, nCrvId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngRotDeg As Double, dMove As Double, bCapEnds As Boolean, - dLinTol As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer + dLinTol As Double, nRefType As GDB_RT) As Integer End Function Private Function EgtCreateSurfTmByScrewing_64(nParentId As Integer, nCrvId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, dAngRotDeg As Double, dMove As Double, bCapEnds As Boolean, - dLinTol As Double, Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer + dLinTol As Double, nRefType As GDB_RT) As Integer End Function Public Function EgtCreateSurfTmByScrewing(nParentId As Integer, nCrvId As Integer, ByRef PtAx As Point3d, ByRef VtAx As Vector3d, @@ -3874,16 +3868,29 @@ Public Function EgtCreateSurfTmByScrewing(nParentId As Integer, nCrvId As Intege End Function -Private Function EgtCreateSurfTmSwept_32(nParentId As Integer, nSectId As Integer, nGuideId As Integer, bCapEnds As Boolean, dLinTol As Double) As Integer +Private Function EgtCreateSurfTmSwept_32(nParentId As Integer, nSectId As Integer, nGuideId As Integer, ByRef VtAx As Vector3d, + bCapEnds As Boolean, dLinTol As Double, nRefType As GDB_RT) As Integer End Function -Private Function EgtCreateSurfTmSwept_64(nParentId As Integer, nSectId As Integer, nGuideId As Integer, bCapEnds As Boolean, dLinTol As Double) As Integer +Private Function EgtCreateSurfTmSwept_64(nParentId As Integer, nSectId As Integer, nGuideId As Integer, ByRef VtAx As Vector3d, + bCapEnds As Boolean, dLinTol As Double, nRefType As GDB_RT) As Integer End Function -Public Function EgtCreateSurfTmSwept(nParentId As Integer, nSectId As Integer, nGuideId As Integer, bCapEnds As Boolean, dLinTol As Double) As Integer +Public Function EgtCreateSurfTmSwept(nParentId As Integer, nSectId As Integer, nGuideId As Integer, + ByRef VtAx As Vector3d, bCapEnds As Boolean, dLinTol As Double, + Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer If IntPtr.Size = 4 Then - Return EgtCreateSurfTmSwept_32(nParentId, nSectId, nGuideId, bCapEnds, dLinTol) + Return EgtCreateSurfTmSwept_32(nParentId, nSectId, nGuideId, vtAx, bCapEnds, dLinTol, nRefType) Else - Return EgtCreateSurfTmSwept_64(nParentId, nSectId, nGuideId, bCapEnds, dLinTol) + Return EgtCreateSurfTmSwept_64(nParentId, nSectId, nGuideId, vtAx, bCapEnds, dLinTol, nRefType) + End If +End Function +Public Function EgtCreateSurfTmSwept(nParentId As Integer, nSectId As Integer, nGuideId As Integer, + bCapEnds As Boolean, dLinTol As Double, + Optional nRefType As GDB_RT = GDB_RT.LOC) As Integer + If IntPtr.Size = 4 Then + Return EgtCreateSurfTmSwept_32(nParentId, nSectId, nGuideId, Vector3d.NULL(), bCapEnds, dLinTol, nRefType) + Else + Return EgtCreateSurfTmSwept_64(nParentId, nSectId, nGuideId, Vector3d.NULL(), bCapEnds, dLinTol, nRefType) End If End Function diff --git a/EgtUILib.vbproj b/EgtUILib.vbproj index 5f3c255..34fbbfe 100644 --- a/EgtUILib.vbproj +++ b/EgtUILib.vbproj @@ -135,7 +135,9 @@ btnBack.vb - + + Component + btnExec.vb