EgtGeomKernel 1.5e2 :
- creazione STM per rototraslazione e da due curve.
This commit is contained in:
+7
-3
@@ -110,7 +110,7 @@ PolyLine::Splice( PolyLine& PL)
|
||||
bool
|
||||
PolyLine::IsClosed( void) const
|
||||
{
|
||||
if ( m_lUPoints.empty())
|
||||
if ( m_lUPoints.size() < 3)
|
||||
return false ;
|
||||
|
||||
return ( AreSamePointNear( m_lUPoints.front().second, m_lUPoints.back().second)) ;
|
||||
@@ -134,11 +134,13 @@ PolyLine::GetFirstUPoint( double* pdPar, Point3d* pptP) const
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
PolyLine::GetNextUPoint( double* pdPar, Point3d* pptP) const
|
||||
PolyLine::GetNextUPoint( double* pdPar, Point3d* pptP, bool bNotLast) const
|
||||
{
|
||||
++ m_iter ;
|
||||
if ( m_iter == m_lUPoints.end())
|
||||
return false ;
|
||||
if ( bNotLast && m_iter == -- ( m_lUPoints.end()))
|
||||
return false ;
|
||||
|
||||
if ( pdPar != nullptr)
|
||||
*pdPar = m_iter->first ;
|
||||
@@ -170,11 +172,13 @@ PolyLine::GetLastUPoint( double* pdPar, Point3d* pptP) const
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
PolyLine::GetPrevUPoint( double* pdPar, Point3d* pptP) const
|
||||
PolyLine::GetPrevUPoint( double* pdPar, Point3d* pptP, bool bNotFirst) const
|
||||
{
|
||||
if ( m_iter == m_lUPoints.begin())
|
||||
return false ;
|
||||
-- m_iter ;
|
||||
if ( bNotFirst && m_iter == m_lUPoints.begin())
|
||||
return false ;
|
||||
|
||||
if ( pdPar != nullptr)
|
||||
*pdPar = m_iter->first ;
|
||||
|
||||
Reference in New Issue
Block a user