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)
|
||||
|
||||
+3
-2
@@ -1,7 +1,7 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2019-2019
|
||||
// EgalTech 2019-2020
|
||||
//----------------------------------------------------------------------------
|
||||
// File : AutoNester.h Data : 28.11.19 Versione : 2.1k6
|
||||
// File : AutoNester.h Data : 29.01.20 Versione : 2.2a2
|
||||
// Contenuto : Dichiarazione della classe AutoNester.
|
||||
//
|
||||
//
|
||||
@@ -30,6 +30,7 @@ class AutoNester : public IAutoNester
|
||||
bool AddSheet( int nSheetId, const PolyArc& Outline, double dKerf, int nPriority, int nCount) override ;
|
||||
bool AddDefectToSheet( int nSheetId, const PolyArc& Outline) override ;
|
||||
bool AddPart( int nPartId, const PolyArc& Outline, bool bCanFlip, bool bCanRotate, double dRotStep, int nPriority, int nCount) override ;
|
||||
bool AddHoleToPart( int nPartId, const PolyArc& Hole) override ;
|
||||
bool AddAnotherOutlineToPart( int nPartId, const PolyArc& AnotherOutline) override ;
|
||||
bool AddToolOutlineToPart( int nPartId, const PolyArc& ToolOutline) override ;
|
||||
bool SetInterpartGap( double dGap) override ;
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user