diff --git a/EXE_GeoInters.cpp b/EXE_GeoInters.cpp index bdc040a..0d5da0d 100644 --- a/EXE_GeoInters.cpp +++ b/EXE_GeoInters.cpp @@ -250,64 +250,8 @@ MyLineSurfBzInters( const Point3d& ptP, const Vector3d& vtDir, int nId, int nRef if ( ! IntersLineSurfBz( ptPL, vtDirL, dLen, pSbz, vInfo, false)) return false ; - - //// ciclo sulle intersezioni - //for ( const auto& Info : vInfo) { - // // se intersezione puntuale - // if ( Info.nILTT == ILTT_VERT || Info.nILTT == ILTT_EDGE || Info.nILTT == ILTT_IN) { - // int nFlag = SLT_TOUCH ; - // if ( Info.dCosDN > EPS_ZERO) - // nFlag = SLT_OUT ; - // else if ( Info.dCosDN < -EPS_ZERO) - // nFlag = SLT_IN ; - // vInters.emplace_back( nFlag, Info.dU) ; - // } - // // se altrimenti intersezione con coincidenza - // else if ( Info.nILTT == ILTT_SEGM || Info.nILTT == ILTT_SEGM_ON_EDGE) { - // vInters.emplace_back( SLT_TG_INI, Info.dU) ; - // vInters.emplace_back( SLT_TG_FIN, Info.dU2) ; - // } - //} - //// elimino intersezioni ripetute - //for ( size_t j = 1 ; j < vInters.size() ; ) { - // // intersezione precedente - // size_t i = j - 1 ; - // // se hanno lo stesso parametro - // if ( abs( vInters[i].second - vInters[j].second) < EPS_SMALL) { - // // se sono entrambe entranti o uscenti, elimino la seconda - // if ( ( vInters[i].first == SLT_IN && vInters[j].first == SLT_IN) || - // ( vInters[i].first == SLT_OUT && vInters[j].first == SLT_OUT)) { - // vInters.erase( vInters.begin() + j) ; - // continue ; - // } - // // se una entrante e l'altra uscente, cambio in touch ed elimino la seconda - // else if ( ( vInters[i].first == SLT_IN && vInters[j].first == SLT_OUT) || - // ( vInters[i].first == SLT_OUT && vInters[j].first == SLT_IN)) { - // vInters[i].first = SLT_TOUCH ; - // vInters.erase( vInters.begin() + j) ; - // continue ; - // } - // // se una puntuale e l'altra inizio di coincidenza, elimino la prima - // else if ( ( vInters[i].first == SLT_IN || vInters[i].first == SLT_OUT || vInters[i].first == SLT_TOUCH) && vInters[j].first == SLT_TG_INI) { - // vInters.erase( vInters.begin() + i) ; - // continue ; - // } - // // se una fine di coincidenza e l'altra puntuale, elimino la seconda - // else if ( vInters[i].first == SLT_TG_FIN && ( vInters[j].first == SLT_IN || vInters[j].first == SLT_OUT || vInters[j].first == SLT_TOUCH)) { - // vInters.erase( vInters.begin() + j) ; - // continue ; - // } - // // se una fine di coincidenza e l'altra inizio di coincidenza, elimino entrambe - // else if ( i > 0 && vInters[i].first == SLT_TG_FIN && vInters[j].first == SLT_TG_INI) { - // vInters.erase( vInters.begin() + j) ; - // vInters.erase( vInters.begin() + i) ; - // -- j ; - // continue ; - // } - // } - // // passo alla successiva - // ++ j ; - //} + // filtro le intersezioni + FilterLineSurfBzInters( vInfo, vInters) ; return true ; }