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
+20 -20
View File
@@ -1996,16 +1996,16 @@ SurfTriMesh::CreateByTwoCurves( const PolyLine& PL1, const PolyLine& PL2, int nR
return false ;
// Recupero i punti iniziali sulla curva 1
int nV1p ; int nP1p = 0 ;
int nV1s ; int nP1s = 1 ;
int nV1p = -1 ; int nP1p = 0 ;
int nV1s = -1 ; int nP1s = 1 ;
bool bNext1 = ( nP1s < nTotP1) ;
if ( ! bNext1)
return false ;
if ( ( nV1p = AddVertex( vPnt1[nP1p].first)) == SVT_NULL)
return false ;
// Recupero i punti iniziali sulla curva 2
int nV2p ; int nP2p = 0 ;
int nV2s ; int nP2s = 1 ;
int nV2p = -1 ; int nP2p = 0 ;
int nV2s = -1 ; int nP2s = 1 ;
bool bNext2 = ( nP2s < nTotP2) ;
if ( ! bNext2)
return false ;
@@ -2112,23 +2112,23 @@ SurfTriMesh::CreateByTwoCurves( const PolyLine& PL1, const PolyLine& PL2, int nR
return false ;
// recupero i punti iniziali su curva 1
int nV1p = SVT_NULL ; double dU1p ; double dA1p ; Point3d ptP1p ;
int nV1s = SVT_NULL ; double dU1s ; double dA1s ; Point3d ptP1s ;
int nV1p = SVT_NULL ; double dU1p = 0 ; Point3d ptP1p ;
int nV1s = SVT_NULL ; double dU1s = 0 ; Point3d ptP1s ;
bool bNext1 = PL1.GetFirstUPoint( &dU1p, &ptP1p) && PL1.GetNextUPoint( &dU1s, &ptP1s, bClosed) ;
if ( ! bNext1)
return false ;
dA1p = 0 ;
dA1s = ( dU1s - dU1F) / dDeltaU1 ;
double dA1p = 0 ;
double dA1s = ( dU1s - dU1F) / dDeltaU1 ;
if ( ( nV1p = AddVertex( ptP1p)) == SVT_NULL)
return false ;
// recupero i punti iniziali su curva 2
int nV2p = SVT_NULL ; double dU2p ; double dA2p ; Point3d ptP2p ;
int nV2s = SVT_NULL ; double dU2s ; double dA2s ; Point3d ptP2s ;
int nV2p = SVT_NULL ; double dU2p = 0 ; Point3d ptP2p ;
int nV2s = SVT_NULL ; double dU2s = 0 ; Point3d ptP2s ;
bool bNext2 = PL2.GetFirstUPoint( &dU2p, &ptP2p) && PL2.GetNextUPoint( &dU2s, &ptP2s, bClosed) ;
if ( ! bNext2)
return false ;
dA2p = 0 ;
dA2s = ( dU2s - dU2F) / dDeltaU2 ;
double dA2p = 0 ;
double dA2s = ( dU2s - dU2F) / dDeltaU2 ;
int nIdV[3] ;
// se i punti iniziali non coincidono, inserisco il vertice iniziale di 2
if ( ! AreSamePointApprox( ptP1p, ptP2p)) {
@@ -2283,20 +2283,20 @@ SurfTriMesh::VerifyPolylinesForTwoCurves( const PolyLine& PL1, const PolyLine& P
if ( dDeltaU2 < EPS_SMALL)
return false ;
// ciclo sui punti
double dA1p ; double dU1p ; Point3d ptP1p ;
double dA1s ; double dU1s ; Point3d ptP1s ;
double dU1p = 0 ; Point3d ptP1p ;
double dU1s = 0 ; Point3d ptP1s ;
bool bNext1 = PL1.GetFirstUPoint( &dU1p, &ptP1p) && PL1.GetNextUPoint( &dU1s, &ptP1s, true) ;
if ( ! bNext1)
return true ;
dA1p = 0 ;
dA1s = ( dU1s - dU1F) / dDeltaU1 ;
double dA2p ; double dU2s ; Point3d ptP2s ;
double dA2s ; double dU2p ; Point3d ptP2p ;
double dA1p = 0 ;
double dA1s = ( dU1s - dU1F) / dDeltaU1 ;
double dU2s = 0 ; Point3d ptP2s ;
double dU2p = 0 ; Point3d ptP2p ;
bool bNext2 = PL2.GetFirstUPoint( &dU2p, &ptP2p) && PL2.GetNextUPoint( &dU2s, &ptP2s, true) ;
if ( ! bNext2)
return true ;
dA2p = 0 ;
dA2s = ( dU2s - dU2F) / dDeltaU2 ;
double dA2p = 0 ;
double dA2s = ( dU2s - dU2F) / dDeltaU2 ;
// se chiuse, verifico la coincidenza dell'inizio delle due curve
if ( bClosed && AreSamePointApprox( ptP1p, ptP2p))
return false ;