EgtGeomKernel :

- modifiche a sistemazione topologie di intersezioni di curve composite
- eliminazione di linee inutili in generale
- cambio nome di variabili che nascondono omonime.
This commit is contained in:
Dario Sassi
2020-10-05 06:56:24 +00:00
parent 74df7ecfcd
commit be027def9c
18 changed files with 152 additions and 232 deletions
+5 -49
View File
@@ -3248,8 +3248,6 @@ GdbExecutor::LineDiscInters( const STRVECTOR& vsParams)
if ( nIntType == D_ERROR_INT)
return false ;
if ( nIntType == D_NO_INTERS)
int nSol = 0 ;
if ( nIntType == D_BOUNDARY_INT_LINE_NOT_IN_PLANE) {
PtrOwner<CurveLine> pLine( CreateBasicCurveLine()) ;
pLine->Set( ptPS - vtLine, ptPS + vtLine) ;
@@ -3318,8 +3316,6 @@ GdbExecutor::RayDiscInters( const STRVECTOR& vsParams)
if ( nIntType == D_ERROR_INT)
return false ;
if ( nIntType == D_NO_INTERS)
int nSol = 0 ;
if ( nIntType == D_BOUNDARY_INT_LINE_NOT_IN_PLANE) {
PtrOwner<CurveLine> pLine( CreateBasicCurveLine()) ;
pLine->Set( ptPS - vtLine, ptPS + vtLine) ;
@@ -3392,8 +3388,6 @@ GdbExecutor::SegmentDiscInters( const STRVECTOR& vsParams)
if ( nIntType == D_ERROR_INT)
return false ;
if ( nIntType == D_NO_INTERS)
int nSol = 0 ;
if ( nIntType == D_BOUNDARY_INT_LINE_NOT_IN_PLANE) {
PtrOwner<CurveLine> pLine( CreateBasicCurveLine()) ;
pLine->Set( ptPS - vtLine, ptPS + vtLine) ;
@@ -3457,8 +3451,6 @@ GdbExecutor::LineSphereInters( const STRVECTOR& vsParams)
if ( nIntType == S_ERROR_INT)
return false ;
if ( nIntType == S_NO_INTERS)
int nSol = 0 ;
if ( nIntType == S_TWO_INT) {
PtrOwner<CurveLine> pLine( CreateBasicCurveLine()) ;
pLine->Set( ptPS, ptPE) ;
@@ -3510,8 +3502,6 @@ GdbExecutor::RaySphereInters( const STRVECTOR& vsParams)
if ( nIntType == S_ERROR_INT)
return false ;
if ( nIntType == S_NO_INTERS)
int nSol = 0 ;
if ( nIntType == S_TWO_INT) {
PtrOwner<CurveLine> pLine( CreateBasicCurveLine()) ;
pLine->Set( ptPS, ptPE) ;
@@ -3572,8 +3562,6 @@ GdbExecutor::SegmentSphereInters( const STRVECTOR& vsParams)
if ( nIntType == S_ERROR_INT)
return false ;
if ( nIntType == S_NO_INTERS)
int nSol = 0 ;
if ( nIntType == S_TWO_INT) {
Point3d ptPS = ptP + dU1 * vtV ;
Point3d ptPE = ptP + dU2 * vtV ;
@@ -3641,8 +3629,6 @@ GdbExecutor::LineSemiSphereInters( const STRVECTOR& vsParams)
if ( nIntType == S_ERROR_INT)
return false ;
if ( nIntType == S_NO_INTERS)
int nSol = 0 ;
if ( nIntType == S_TWO_INT) {
PtrOwner<CurveLine> pLine( CreateBasicCurveLine()) ;
pLine->Set( ptPS, ptPE) ;
@@ -3700,8 +3686,6 @@ GdbExecutor::RaySemiSphereInters( const STRVECTOR& vsParams)
if ( nIntType == S_ERROR_INT)
return false ;
if ( nIntType == S_NO_INTERS)
int nSol = 0 ;
if ( nIntType == S_TWO_INT) {
PtrOwner<CurveLine> pLine( CreateBasicCurveLine()) ;
pLine->Set( ptPS, ptPE) ;
@@ -3767,8 +3751,6 @@ GdbExecutor::SegmentSemiSphereInters( const STRVECTOR& vsParams)
if ( nIntType == S_ERROR_INT)
return false ;
if ( nIntType == S_NO_INTERS)
int nSol = 0 ;
if ( nIntType == S_TWO_INT) {
Point3d ptPS = ptP + dU1 * vtV ;
Point3d ptPE = ptP + dU2 * vtV ;
@@ -3840,8 +3822,6 @@ GdbExecutor::LinCompSemiSphereInters( const STRVECTOR& vsParams)
if ( nIntType == S_ERROR_INT)
return false ;
if ( nIntType == S_NO_INTERS)
int nSol = 0 ;
if ( nIntType == S_TWO_INT) {
Point3d ptPS = ptP + dU1 * vtV ;
Point3d ptPE = ptP + dU2 * vtV ;
@@ -3909,8 +3889,6 @@ GdbExecutor::LineInfiniteCylinderInters( const STRVECTOR& vsParams)
if ( nTypeInt == CC_ERROR_INT)
return false ;
if ( nTypeInt == CC_NO_INTERS)
int nSol = 0 ;
if ( nTypeInt == CC_ONE_INT_SEC) {
PtrOwner<CurveLine> pLine( CreateBasicCurveLine()) ;
pLine->Set( ptPS - 3 * vtLine, ptPS + 3 * vtLine) ;
@@ -3980,8 +3958,6 @@ GdbExecutor::RayInfiniteCylinderInters( const STRVECTOR& vsParams)
if ( nTypeInt == CC_ERROR_INT)
return false ;
if ( nTypeInt == CC_NO_INTERS)
int nSol = 0 ;
if ( nTypeInt == CC_ONE_INT_SEC) {
PtrOwner<CurveLine> pLine( CreateBasicCurveLine()) ;
pLine->Set( ptPS - 3 * vtLine, ptPS + 3 * vtLine) ;
@@ -4054,8 +4030,6 @@ GdbExecutor::SegmentInfiniteCylinderInters( const STRVECTOR& vsParams)
if ( nTypeInt == CC_ERROR_INT)
return false ;
if ( nTypeInt == CC_NO_INTERS)
int nSol = 0 ;
if ( nTypeInt == CC_ONE_INT_SEC) {
PtrOwner<CurveLine> pLine( CreateBasicCurveLine()) ;
pLine->Set( ptPS - 3 * vtLine, ptPS + 3 * vtLine) ;
@@ -4132,8 +4106,6 @@ GdbExecutor::SegmentCylinderInters( const STRVECTOR& vsParams)
if ( nTypeInt == CC_ERROR_INT)
return false ;
if ( nTypeInt == CC_NO_INTERS)
int nSol = 0 ;
if ( nTypeInt == CC_ONE_INT_SEC) {
PtrOwner<CurveLine> pLine( CreateBasicCurveLine()) ;
pLine->Set( ptPS - 3 * vtLine, ptPS + 3 * vtLine) ;
@@ -4210,8 +4182,6 @@ GdbExecutor::SegmentConeInters( const STRVECTOR& vsParams)
if ( nTypeInt == CC_ERROR_INT)
return false ;
if ( nTypeInt == CC_NO_INTERS)
int nSol = 0 ;
if ( nTypeInt == CC_ONE_INT_SEC) {
PtrOwner<CurveLine> pLine( CreateBasicCurveLine()) ;
pLine->Set( ptPS - 3 * vtLine, ptPS + 3 * vtLine) ;
@@ -4293,8 +4263,6 @@ GdbExecutor::LineTruncateConeInters( const STRVECTOR& vsParams)
if ( nTypeInt == CC_ERROR_INT)
return false ;
if ( nTypeInt == CC_NO_INTERS)
int nSol = 0 ;
if ( nTypeInt == CC_ONE_INT_SEC) {
PtrOwner<CurveLine> pLine( CreateBasicCurveLine()) ;
pLine->Set( ptPS - 3 * vtLine, ptPS + 3 * vtLine) ;
@@ -4377,8 +4345,6 @@ GdbExecutor::RayTruncateConeInters( const STRVECTOR& vsParams)
if ( nTypeInt == CC_ERROR_INT)
return false ;
if ( nTypeInt == CC_NO_INTERS)
int nSol = 0 ;
if ( nTypeInt == CC_ONE_INT_SEC) {
PtrOwner<CurveLine> pLine( CreateBasicCurveLine()) ;
pLine->Set( ptPS - 3 * vtLine, ptPS + 3 * vtLine) ;
@@ -4464,8 +4430,6 @@ GdbExecutor::SegmentTruncateConeInters( const STRVECTOR& vsParams)
if ( nTypeInt == CC_ERROR_INT)
return false ;
if ( nTypeInt == CC_NO_INTERS)
int nSol = 0 ;
if ( nTypeInt == CC_ONE_INT_SEC) {
PtrOwner<CurveLine> pLine( CreateBasicCurveLine()) ;
pLine->Set( ptPS - 3 * vtLine, ptPS + 3 * vtLine) ;
@@ -4542,8 +4506,6 @@ GdbExecutor::LineTorusInters( const STRVECTOR& vsParams)
if ( nTypeInt == T_ERROR)
return false ;
if ( nTypeInt == T_NO_INT)
int nSol = 0 ;
if ( nTypeInt == T_ONE_TAN) {
Point3d ptInt = ptLine + vdP[0] * vtLine ;
PtrOwner<CurveLine> pLine( CreateBasicCurveLine()) ;
@@ -4599,7 +4561,7 @@ GdbExecutor::LineTorusInters( const STRVECTOR& vsParams)
AddGeoObj( "$NN", vsParams[1], Release( pLine1))) ;
}
}
else if ( T_FOUR_SEC) {
else if ( nTypeInt == T_FOUR_SEC) {
Point3d ptInt0 = ptLine + vdP[0] * vtLine ;
Point3d ptInt1 = ptLine + vdP[1] * vtLine ;
Point3d ptInt2 = ptLine + vdP[2] * vtLine ;
@@ -4659,8 +4621,6 @@ GdbExecutor::RayTorusInters( const STRVECTOR& vsParams)
if ( nTypeInt == T_ERROR)
return false ;
if ( nTypeInt == T_NO_INT)
int nSol = 0 ;
if ( nTypeInt == T_ONE_TAN) {
Point3d ptInt = ptLine + vdP[0] * vtLine ;
PtrOwner<CurveLine> pLine( CreateBasicCurveLine()) ;
@@ -4815,8 +4775,6 @@ GdbExecutor::SegmentTorusInters( const STRVECTOR& vsParams)
if ( nTypeInt == T_ERROR)
return false ;
if ( nTypeInt == T_NO_INT)
int nSol = 0 ;
if ( nTypeInt == T_ONE_TAN) {
Point3d ptInt = ptLine + vdP[0] * vtLine ;
PtrOwner<CurveLine> pLine( CreateBasicCurveLine()) ;
@@ -4989,8 +4947,6 @@ GdbExecutor::LinCompTorusPartInters( const STRVECTOR& vsParams)
if ( nTypeInt == T_ERROR)
return false ;
if ( nTypeInt == T_NO_INT)
int nSol = 0 ;
if ( nTypeInt == T_ONE_TAN) {
Point3d ptInt = ptLine + vdP[0] * vtLine ;
PtrOwner<CurveLine> pLine( CreateBasicCurveLine()) ;
@@ -7793,10 +7749,10 @@ GdbExecutor::CurveCopyByChain( const STRVECTOR& vsParams)
if ( IsNull( pCrvCompo))
return false ;
// recupero le curve semplici e le inserisco nella curva composita
INTVECTOR::iterator Iter ;
for ( Iter = vIds.begin() ; Iter != vIds.end() ; ++Iter) {
int nId = abs( *Iter) ;
bool bInvert = ( *Iter < 0) ;
INTVECTOR::iterator Iter2 ;
for ( Iter2 = vIds.begin() ; Iter2 != vIds.end() ; ++Iter2) {
int nId = abs( *Iter2) ;
bool bInvert = ( *Iter2 < 0) ;
// recupero la curva e il suo riferimento
ICurve* pCrv = GetCurve( m_pGDB->GetGeoObj( nId)) ;
if ( pCrv == nullptr)