EgtGeomKernel 1.5f7 :
- aggiunta intersezione tra curve composte (e gestione loro topologia) - corretto salvataggio entità testo - aggiunto EPS_SMALL a test su box - aggiunte funzioni di verifica validità e tipo parametro di curve - aggiunto comando TSC OUTTEXTICCI.
This commit is contained in:
+8
-8
@@ -958,7 +958,7 @@ SurfTriMesh::CreateByTwoCurves( const PolyLine& PL1, const PolyLine& PL2)
|
||||
dA2s = ( dU2s - dU2F) / dDeltaU2 ;
|
||||
int nIdV[3] ;
|
||||
// se i punti iniziali non coincidono, inserisco il vertice iniziale di 2
|
||||
if ( ! AreSamePointNear( ptP1p, ptP2p)) {
|
||||
if ( ! AreSamePointApprox( ptP1p, ptP2p)) {
|
||||
if ( ( nV2p = AddVertex( ptP2p)) == SVT_NULL)
|
||||
return false ;
|
||||
}
|
||||
@@ -1001,7 +1001,7 @@ SurfTriMesh::CreateByTwoCurves( const PolyLine& PL1, const PolyLine& PL2)
|
||||
if ( AddTriangle( nIdV) == SVT_NULL)
|
||||
return false ;
|
||||
// se i punti correnti coincidono passo al successivo anche su 2
|
||||
if ( AreSamePointNear( ptP1s, ptP2s)) {
|
||||
if ( AreSamePointApprox( ptP1s, ptP2s)) {
|
||||
nV2p = nV2s ; dA2p = dA2s ; dU2p = dU2s ; ptP2p = ptP2s ;
|
||||
bNext2 = PL2.GetNextUPoint( &dU2s, &ptP2s, bClosed) ;
|
||||
if ( bNext2)
|
||||
@@ -1025,7 +1025,7 @@ SurfTriMesh::CreateByTwoCurves( const PolyLine& PL1, const PolyLine& PL2)
|
||||
if ( AddTriangle( nIdV) == SVT_NULL)
|
||||
return false ;
|
||||
// se i punti correnti coincidono passo al successivo anche su 1
|
||||
if ( AreSamePointNear( ptP1s, ptP2s)) {
|
||||
if ( AreSamePointApprox( ptP1s, ptP2s)) {
|
||||
nV1p = nV1s ; dA1p = dA1s ; dU1p = dU1s ; ptP1p = ptP1s ;
|
||||
bNext1 = PL1.GetNextUPoint( &dU1s, &ptP1s, bClosed) ;
|
||||
if ( bNext1)
|
||||
@@ -1124,14 +1124,14 @@ SurfTriMesh::VerifyPolylinesForTwoCurves( const PolyLine& PL1, const PolyLine& P
|
||||
dA2p = 0 ;
|
||||
dA2s = ( dU2s - dU2F) / dDeltaU2 ;
|
||||
// se chiuse, verifico la coincidenza dell'inizio delle due curve
|
||||
if ( bClosed && AreSamePointNear( ptP1p, ptP2p))
|
||||
if ( bClosed && AreSamePointApprox( ptP1p, ptP2p))
|
||||
return false ;
|
||||
// verifiche sui punti successivi (non sugli ultimi)
|
||||
while ( bNext1 || bNext2) {
|
||||
// se c'è nuovo dA1s e la diagonale più corta è dA2p -> dA1s oppure non c'è dA2s
|
||||
if ( ( bNext1 && ( dA1s - dA2p) <= ( dA2s - dA1p) + EPS_PARAM) || ! bNext2) {
|
||||
// verifico se coincidono
|
||||
if ( AreSamePointNear( ptP2p, ptP1s))
|
||||
if ( AreSamePointApprox( ptP2p, ptP1s))
|
||||
return false ;
|
||||
// passo al punto successivo su 1
|
||||
dA1p = dA1s ; dU1p = dU1s ; ptP1p = ptP1s ;
|
||||
@@ -1142,7 +1142,7 @@ SurfTriMesh::VerifyPolylinesForTwoCurves( const PolyLine& PL1, const PolyLine& P
|
||||
// altrimenti è dA1p -> dA2s = 1
|
||||
else {
|
||||
// verifico se coincidono
|
||||
if ( AreSamePointNear( ptP1p, ptP2s))
|
||||
if ( AreSamePointApprox( ptP1p, ptP2s))
|
||||
return false ;
|
||||
// passo al punto successivo su 2
|
||||
dA2p = dA2s ; dU2p = dU2s ; ptP2p = ptP2s ;
|
||||
@@ -1381,8 +1381,8 @@ SurfTriMesh::VeryfyPolylineForRevolution( const PolyLine& PL, const Point3d& ptA
|
||||
// verifico distanza
|
||||
if ( DistPointLine( ORIG, ptPp, ptPc).IsSmall()) {
|
||||
if ( bClosed ||
|
||||
( ! ( nSeg == 1 && AreSamePointNear( ORIG, ptPp)) &&
|
||||
! ( nSeg == nTotSeg && AreSamePointNear( ORIG, ptPc))))
|
||||
( ! ( nSeg == 1 && AreSamePointApprox( ORIG, ptPp)) &&
|
||||
! ( nSeg == nTotSeg && AreSamePointApprox( ORIG, ptPc))))
|
||||
return false ;
|
||||
}
|
||||
// salvo punto
|
||||
|
||||
Reference in New Issue
Block a user