EgtExecutor :
- modifiche varie per OmagCut.
This commit is contained in:
+7
-4
@@ -541,9 +541,12 @@ ExePackPart( int nId, double dXmin, double dYmin, double dXmax, double dYmax, do
|
||||
b3Part.Expand( dOffs - 2 * EPS_SMALL, dOffs - 2 * EPS_SMALL, 0) ;
|
||||
// Box della regione di interesse
|
||||
BBox3d b3Region( dXmin, dYmin, 0, dXmax, dYmax, 0) ;
|
||||
// Verifico se pezzo sotto la radice o pezzo in altro gruppo
|
||||
int nGroupId = pGeomDB->GetParentId( nId) ;
|
||||
bool bInRoot = ( nGroupId == GDB_ID_ROOT) ;
|
||||
// Determino il box di tutti gli altri pezzi compresi nella regione di interesse
|
||||
BOXVECTOR vBox ;
|
||||
int nId2 = ExeGetFirstPart( true) ;
|
||||
int nId2 = ( bInRoot ? ExeGetFirstPart( true) : ExeGetFirstGroupInGroup( nGroupId)) ;
|
||||
while ( nId2 != GDB_ID_NULL) {
|
||||
if ( nId2 != nId) {
|
||||
BBox3d b3Part2 ;
|
||||
@@ -551,7 +554,7 @@ ExePackPart( int nId, double dXmin, double dYmin, double dXmax, double dYmax, do
|
||||
b3Region.OverlapsXY( b3Part2))
|
||||
vBox.emplace_back( b3Part2) ;
|
||||
}
|
||||
nId2 = ExeGetNextPart( nId2, true) ;
|
||||
nId2 = ( bInRoot ? ExeGetNextPart( nId2, true) : ExeGetNextGroup( nId2)) ;
|
||||
}
|
||||
// Ordino i box dei pezzi secondo la X crescente
|
||||
sort( vBox.begin(), vBox.end(), []( const BBox3d& a, const BBox3d& b)
|
||||
@@ -598,7 +601,7 @@ ExePackPart( int nId, double dXmin, double dYmin, double dXmax, double dYmax, do
|
||||
else if ( ! bBottomUp && b3Part.GetMin().y - ptPart.y + dYok < dYmin - dOffs - EPS_SMALL)
|
||||
return false ;
|
||||
// Porto il pezzo nella giusta posizione
|
||||
if ( ! pGeomDB->TranslateGlob( nId, Point3d( dXok, dYok, 0) - ptPart))
|
||||
if ( ! pGeomDB->TranslateGlob( nId, Point3d( dXok, dYok, ptPart.z) - ptPart))
|
||||
return false ;
|
||||
ExeSetModified() ;
|
||||
return true ;
|
||||
@@ -702,7 +705,7 @@ ExePackCluster( const INTVECTOR& vIds, double dXmin, double dYmin, double dXmax,
|
||||
return false ;
|
||||
// Porto il cluster nella giusta posizione
|
||||
for ( auto nTrueId : vTrueIds) {
|
||||
pGeomDB->TranslateGlob( nTrueId, Point3d( dXok, dYok, 0) - ptCluster) ;
|
||||
pGeomDB->TranslateGlob( nTrueId, Point3d( dXok, dYok, ptCluster.z) - ptCluster) ;
|
||||
}
|
||||
ExeSetModified() ;
|
||||
return true ;
|
||||
|
||||
Reference in New Issue
Block a user