EgtExecutor :
- modifiche per nesting pezzi piani con bordi a doppia pendenza.
This commit is contained in:
+38
-12
@@ -674,6 +674,7 @@ MyVerifyPartCluster( IGeomDB* pGeomDB, const INTVECTOR& vTrueIds, const BBox3d&
|
||||
|
||||
// Determino le regioni dei pezzi
|
||||
INTVECTOR vReg ;
|
||||
INTVECTOR vUpReg ;
|
||||
INTVECTOR vDwnReg ;
|
||||
INTVECTOR vCutReg ;
|
||||
INTVECTOR vDwnCutReg ;
|
||||
@@ -688,6 +689,9 @@ MyVerifyPartCluster( IGeomDB* pGeomDB, const INTVECTOR& vTrueIds, const BBox3d&
|
||||
}
|
||||
else
|
||||
return false ;
|
||||
// recupero eventuale regione in alto del pezzo
|
||||
int nUpRegId = GetFlatPartUpRegion( pGeomDB, nId) ;
|
||||
vUpReg.emplace_back( nUpRegId) ;
|
||||
// recupero eventuale regione in basso del pezzo
|
||||
int nDwnRegId = GetFlatPartDownRegion( pGeomDB, nId) ;
|
||||
vDwnReg.emplace_back( nDwnRegId) ;
|
||||
@@ -768,6 +772,7 @@ MyVerifyPartCluster( IGeomDB* pGeomDB, const INTVECTOR& vTrueIds, const BBox3d&
|
||||
|
||||
// Determino le regioni di tutti gli altri pezzi compresi nella regione di interesse
|
||||
INTVECTOR vOthReg ;
|
||||
INTVECTOR vOthUpReg ;
|
||||
INTVECTOR vOthDwnReg ;
|
||||
INTVECTOR vOthCutReg ;
|
||||
INTVECTOR vOthDwnCutReg ;
|
||||
@@ -783,6 +788,9 @@ MyVerifyPartCluster( IGeomDB* pGeomDB, const INTVECTOR& vTrueIds, const BBox3d&
|
||||
vOthReg.emplace_back( nRegId) ;
|
||||
else
|
||||
return false ;
|
||||
// recupero eventuale regione in alto del pezzo
|
||||
int nUpRegId = GetFlatPartUpRegion( pGeomDB, nId2) ;
|
||||
vOthUpReg.emplace_back( nUpRegId) ;
|
||||
// recupero eventuale regione in basso del pezzo
|
||||
int nDwnRegId = GetFlatPartDownRegion( pGeomDB, nId2) ;
|
||||
vOthDwnReg.emplace_back( nDwnRegId) ;
|
||||
@@ -798,15 +806,16 @@ MyVerifyPartCluster( IGeomDB* pGeomDB, const INTVECTOR& vTrueIds, const BBox3d&
|
||||
|
||||
// Eseguo verifiche
|
||||
// regioni dei pezzi
|
||||
for ( int nRegId : vReg) {
|
||||
// verifico con le regioni degli altri pezzi
|
||||
for ( size_t i = 0 ; i < vReg.size() ; ++ i) {
|
||||
// verifico con le regioni degli altri pezzi (sempre regioni standard)
|
||||
for ( int nOthRegId : vOthReg) {
|
||||
if ( ExeSurfFrChunkSimpleClassify( nRegId, 0, nOthRegId, 0) != REGC_OUT)
|
||||
if ( ExeSurfFrChunkSimpleClassify( vReg[i], 0, nOthRegId, 0) != REGC_OUT)
|
||||
return false ;
|
||||
}
|
||||
// e con le regioni dei tagli degli altri pezzi
|
||||
// e con le regioni dei tagli degli altri pezzi (se esistono le regioni up devo usarle)
|
||||
int nRegUpId = ((vUpReg[i] == GDB_ID_NULL) ? vReg[i] : vUpReg[i]) ;
|
||||
for ( int nOthCutRegId : vOthCutReg) {
|
||||
if ( ExeSurfFrChunkSimpleClassify( nRegId, 0, nOthCutRegId, 0) != REGC_OUT)
|
||||
if ( ExeSurfFrChunkSimpleClassify( nRegUpId, 0, nOthCutRegId, 0) != REGC_OUT)
|
||||
return false ;
|
||||
}
|
||||
}
|
||||
@@ -834,8 +843,9 @@ MyVerifyPartCluster( IGeomDB* pGeomDB, const INTVECTOR& vTrueIds, const BBox3d&
|
||||
// regioni delle lavorazioni dei pezzi
|
||||
for ( int nCutRegId : vCutReg) {
|
||||
// le confronto con le regioni degli altri pezzi
|
||||
for ( int nOthRegId : vOthReg) {
|
||||
if ( ExeSurfFrChunkSimpleClassify( nCutRegId, 0, nOthRegId, 0) != REGC_OUT)
|
||||
for ( size_t j = 0 ; j < vOthReg.size() ; ++ j) {
|
||||
int nOthUpRegId = (( vOthUpReg[j] == GDB_ID_NULL) ? vOthReg[j] : vOthUpReg[j]) ;
|
||||
if ( ExeSurfFrChunkSimpleClassify( nCutRegId, 0, nOthUpRegId, 0) != REGC_OUT)
|
||||
return false ;
|
||||
}
|
||||
}
|
||||
@@ -1247,6 +1257,7 @@ MyMovePartCluster( IGeomDB* pGeomDB, const INTVECTOR& vTrueIds, BBox3d b3Cluster
|
||||
|
||||
// Determino le regioni di tutti gli altri pezzi compresi nella regione di interesse
|
||||
INTVECTOR vOthReg ;
|
||||
INTVECTOR vOthUpReg ;
|
||||
INTVECTOR vOthDwnReg ;
|
||||
INTVECTOR vOthCutReg ;
|
||||
INTVECTOR vOthDwnCutReg ;
|
||||
@@ -1262,6 +1273,9 @@ MyMovePartCluster( IGeomDB* pGeomDB, const INTVECTOR& vTrueIds, BBox3d b3Cluster
|
||||
vOthReg.emplace_back( nRegId) ;
|
||||
else
|
||||
return false ;
|
||||
// recupero eventuale regione in alto del pezzo
|
||||
int nUpRegId = GetFlatPartUpRegion( pGeomDB, nId2) ;
|
||||
vOthUpReg.emplace_back( nUpRegId) ;
|
||||
// recupero eventuale regione in basso del pezzo
|
||||
int nDwnRegId = GetFlatPartDownRegion( pGeomDB, nId2) ;
|
||||
vOthDwnReg.emplace_back( nDwnRegId) ;
|
||||
@@ -1309,9 +1323,12 @@ MyMovePartCluster( IGeomDB* pGeomDB, const INTVECTOR& vTrueIds, BBox3d b3Cluster
|
||||
dPrevLen = UpdateCollId( dLen, dPrevLen, nRegId, nOthRegId, false, false, scInfoCurr) ;
|
||||
}
|
||||
// e con le regioni dei tagli degli altri pezzi
|
||||
// recupero regione in alto del pezzo
|
||||
int nUpRegId = GetFlatPartUpRegion( pGeomDB, nTrueId) ;
|
||||
int nTestRegId = (( nUpRegId == GDB_ID_NULL) ? nRegId : nUpRegId) ;
|
||||
for ( int nOthCutRegId : vOthCutReg) {
|
||||
MySurfFrMoveSimpleNoCollision( nRegId, nOthCutRegId, vtDir, dLen, scInfoCurr) ;
|
||||
dPrevLen = UpdateCollId( dLen, dPrevLen, nRegId, nOthCutRegId, false, true, scInfoCurr) ;
|
||||
MySurfFrMoveSimpleNoCollision( nTestRegId, nOthCutRegId, vtDir, dLen, scInfoCurr) ;
|
||||
dPrevLen = UpdateCollId( dLen, dPrevLen, nTestRegId, nOthCutRegId, false, true, scInfoCurr) ;
|
||||
}
|
||||
// -----------------------------------------
|
||||
// recupero regione in basso del pezzo
|
||||
@@ -1360,7 +1377,8 @@ MyMovePartCluster( IGeomDB* pGeomDB, const INTVECTOR& vTrueIds, BBox3d b3Cluster
|
||||
}
|
||||
// le confronto con le regioni degli altri pezzi
|
||||
for ( int nCrId : vCrId) {
|
||||
for ( int nOthRegId : vOthReg) {
|
||||
for ( size_t k = 0 ; k < vOthReg.size() ; ++ k) {
|
||||
int nOthRegId = ( vOthUpReg[k] == GDB_ID_NULL ? vOthReg[k] : vOthUpReg[k]) ;
|
||||
MySurfFrMoveSimpleNoCollision( nCrId, nOthRegId, vtDir, dLen, scInfoCurr) ;
|
||||
dPrevLen = UpdateCollId( dLen, dPrevLen, nCrId, nOthRegId, true, false, scInfoCurr) ;
|
||||
}
|
||||
@@ -1506,6 +1524,7 @@ MyRotatePartCluster( IGeomDB* pGeomDB, const INTVECTOR& vTrueIds, BBox3d& b3Clus
|
||||
|
||||
// Determino le regioni di tutti gli altri pezzi compresi nella regione di interesse
|
||||
INTVECTOR vOthReg ;
|
||||
INTVECTOR vOthUpReg ;
|
||||
INTVECTOR vOthDwnReg ;
|
||||
INTVECTOR vOthCutReg ;
|
||||
INTVECTOR vOthDwnCutReg ;
|
||||
@@ -1521,6 +1540,9 @@ MyRotatePartCluster( IGeomDB* pGeomDB, const INTVECTOR& vTrueIds, BBox3d& b3Clus
|
||||
vOthReg.emplace_back( nRegId) ;
|
||||
else
|
||||
return false ;
|
||||
// recupero eventuale regione in alto del pezzo
|
||||
int nUpRegId = GetFlatPartUpRegion( pGeomDB, nId2) ;
|
||||
vOthUpReg.emplace_back( nUpRegId) ;
|
||||
// recupero eventuale regione in basso del pezzo
|
||||
int nDwnRegId = GetFlatPartDownRegion( pGeomDB, nId2) ;
|
||||
vOthDwnReg.emplace_back( nDwnRegId) ;
|
||||
@@ -1560,8 +1582,11 @@ MyRotatePartCluster( IGeomDB* pGeomDB, const INTVECTOR& vTrueIds, BBox3d& b3Clus
|
||||
ExeSurfFrRotateSimpleNoCollision( nRegId, nOthRegId, ptCen, dAng, RTY_GLOB) ;
|
||||
}
|
||||
// e con le regioni dei tagli degli altri pezzi
|
||||
// recupero regione in alto del pezzo
|
||||
int nUpRegId = GetFlatPartUpRegion( pGeomDB, nTrueId) ;
|
||||
int nTestRegId = (( nUpRegId == GDB_ID_NULL) ? nRegId : nUpRegId) ;
|
||||
for ( int nOthCutRegId : vOthCutReg) {
|
||||
ExeSurfFrRotateSimpleNoCollision( nRegId, nOthCutRegId, ptCen, dAng, RTY_GLOB) ;
|
||||
ExeSurfFrRotateSimpleNoCollision( nTestRegId, nOthCutRegId, ptCen, dAng, RTY_GLOB) ;
|
||||
}
|
||||
// -----------------------------------------
|
||||
// recupero regione in basso del pezzo
|
||||
@@ -1604,7 +1629,8 @@ MyRotatePartCluster( IGeomDB* pGeomDB, const INTVECTOR& vTrueIds, BBox3d& b3Clus
|
||||
}
|
||||
// le confronto con le regioni degli altri pezzi
|
||||
for ( int nCrId : vCrId) {
|
||||
for ( int nOthRegId : vOthReg) {
|
||||
for ( size_t k = 0 ; k < vOthReg.size() ; ++ k) {
|
||||
int nOthRegId = ( vOthUpReg[k] == GDB_ID_NULL ? vOthReg[k] : vOthUpReg[k]) ;
|
||||
ExeSurfFrRotateSimpleNoCollision( nCrId, nOthRegId, ptCen, dAng, RTY_GLOB) ;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user