EgtNesting 2.2a2 :
- aggiunta funzione AddHoleToPart.
This commit is contained in:
@@ -165,6 +165,27 @@ AutoNester::AddPart( int nPartId, const PolyArc& Outline, bool bCanFlip, bool bC
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
AutoNester::AddHoleToPart( int nPartId, const PolyArc& Hole)
|
||||
{
|
||||
if ( m_pOrder == nullptr)
|
||||
return false ;
|
||||
// verifico buco
|
||||
if ( Hole.GetArcNbr() == 0 || ! Hole.IsClosed())
|
||||
return false ;
|
||||
// cerco il pezzo
|
||||
const auto Iter = m_IdPartPtr.find( nPartId) ;
|
||||
if ( Iter == m_IdPartPtr.end())
|
||||
return false ;
|
||||
CNS_PartPtr pPart = Iter->second ;
|
||||
// aggiungo buco al pezzo
|
||||
vector<CNS_Element> vElem ;
|
||||
GetCNSPath( Hole, vElem) ;
|
||||
CNS_AddHoleToPart( pPart, int( vElem.size()), vElem.data()) ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
AutoNester::AddAnotherOutlineToPart( int nPartId, const PolyArc& AnotherOutline)
|
||||
|
||||
Reference in New Issue
Block a user