EgtNesting :

- aggiunta funzione AddAnotherOutlineToPart.
This commit is contained in:
Dario Sassi
2019-12-05 09:33:34 +00:00
parent a60d7b0a7c
commit d9cca68227
2 changed files with 23 additions and 1 deletions
+22 -1
View File
@@ -1,7 +1,7 @@
//----------------------------------------------------------------------------
// EgalTech 2019-2019
//----------------------------------------------------------------------------
// File : AutoNester.cpp Data : 28.11.19 Versione : 2.1k6
// File : AutoNester.cpp Data : 05.12.19 Versione : 2.1l2
// Contenuto : Implementazione della classe AutoNester.
//
//
@@ -165,6 +165,27 @@ AutoNester::AddPart( int nPartId, const PolyArc& Outline, bool bCanFlip, bool bC
return true ;
}
//----------------------------------------------------------------------------
bool
AutoNester::AddAnotherOutlineToPart( int nPartId, const PolyArc& AnotherOutline)
{
if ( m_pOrder == nullptr)
return false ;
// verifico outline
if ( AnotherOutline.GetArcNbr() == 0 || ! AnotherOutline.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 contorno aggiuntivo al pezzo
vector<CNS_Element> vElem ;
GetCNSPath( AnotherOutline, vElem) ;
CNS_AddExternalBoundaryToPart( pPart, int( vElem.size()), vElem.data()) ;
return true ;
}
//----------------------------------------------------------------------------
bool
AutoNester::AddToolOutlineToPart( int nPartId, const PolyArc& ToolOutline)