diff --git a/Controller.vb b/Controller.vb index 9257d6b..2a6b6dd 100644 --- a/Controller.vb +++ b/Controller.vb @@ -3954,20 +3954,17 @@ Public Class Controller m_Scene.SetStatusSelPoint(False) Dim nId As Integer = EgtGetLastSelectedObj() EgtCurveLength(nId, m_dPrev) - Dim ptStart As Point3d - EgtStartPoint(nId, ptStart) - ptStart = ptStart.Glob(nId) - Dim ptEnd As Point3d - EgtEndPoint(nId, ptEnd) - ptEnd = ptEnd.Glob(nId) - If ((ptStart - m_ptLastSel).SqLen() <= (ptEnd - m_ptLastSel).SqLen()) Then + Dim bStart As Boolean = True + EgtCurveNearestExtremityToPoint(nId, m_ptLastSel.Loc(nId), bStart) + If bStart Then m_bLast = True - m_ptP1 = ptStart + m_ptP1 = m_ptLastSel EgtStartVector(nId, m_vtCont) m_vtCont = -m_vtCont.Glob(nId) Else m_bLast = False - m_ptP1 = ptEnd + EgtEndPoint(nId, m_ptP1) + m_ptP1 = m_ptLastSel EgtEndVector(nId, m_vtCont) m_vtCont = m_vtCont.Glob(nId) End If diff --git a/EgtInterface.vb b/EgtInterface.vb index 7d31dc7..9a3233f 100644 --- a/EgtInterface.vb +++ b/EgtInterface.vb @@ -1767,6 +1767,10 @@ Public Function EgtFrame(ByVal nId As Integer, ByVal nRefId As Integer, ByRef fr End If End Function + +Public Function EgtCurveDomain(ByVal nId As Integer, ByRef dStart As Double, ByRef dEnd As Double) As Boolean +End Function + Public Function EgtCurveLength(ByVal nId As Integer, ByRef dLen As Double) As Boolean End Function @@ -1778,6 +1782,10 @@ Public Function EgtCurveLengthAtPoint(ByVal nId As Integer, ByVal ptOn As Point3 Return EgtCurveLengthAtPoint(nId, ptOn, 0, dLen) End Function + +Public Function EgtCurveNearestExtremityToPoint(ByVal nId As Integer, ByRef ptP As Point3d, ByRef bStart As Boolean) As Boolean +End Function + Public Function EgtCurveExtrusion(ByVal nId As Integer, ByVal nRefId As Integer, ByRef VtExtr As Vector3d) As Boolean End Function @@ -1790,7 +1798,7 @@ Public Function EgtCurveThickness(ByVal nId As Integer, ByRef dThick As Double) End Function -Public Function EgtGetMinDistPointCurve(ByRef ptP As Point3d, ByVal nId As Integer, ByRef dDist As Double) As Boolean +Public Function EgtGetMinDistPointCurve(ByRef ptP As Point3d, ByVal nId As Integer, ByRef dDist As Double, ByRef dU As Double) As Boolean End Function diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 3bf312a..d83cf0c 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -46,5 +46,5 @@ Imports System.Runtime.InteropServices ' utilizzando l'asterisco (*) come descritto di seguito: ' - - + +