diff --git a/ArcSpecial.cpp b/ArcSpecial.cpp index b06b486..73b9c8c 100644 --- a/ArcSpecial.cpp +++ b/ArcSpecial.cpp @@ -134,7 +134,8 @@ GetArc3P( const Point3d& ptStart, const Point3d& ptOther, const Point3d& ptEnd, // calcolo arco non riuscito, se i punti sono allineati nel giusto verso per essere una retta // verifico se i punti sono allineati nel giusto verso - if ( ( ptOther - ptStart) * ( ptEnd - ptOther) > EPS_ZERO) { + if ( ( ptOther - ptStart) * ( ptEnd - ptOther) > EPS_ZERO || + AreSamePointApprox( ptOther, ptStart) || AreSamePointApprox( ptEnd, ptOther)) { // creo l'oggetto retta PtrOwner pLine( CreateBasicCurveLine()) ; if ( IsNull( pLine)) diff --git a/SurfBezier.cpp b/SurfBezier.cpp index e0bf027..2028569 100644 --- a/SurfBezier.cpp +++ b/SurfBezier.cpp @@ -2363,7 +2363,7 @@ SurfBezier::UnprojectPointFromStm( int nT, const Point3d& ptI, Point3d& ptSP, in return false ; if ( bThroughEdge != nullptr) *bThroughEdge = true ; - Point3d ptI2 = ptI + ( ptIPrevOrNext - ptI) * EPS_SMALL ; + Point3d ptI2 = ptI + ( ptIPrevOrNext - ptI) * 3 * EPS_SMALL ; // ricalcolo il triangolo di appartenenza DistPointSurfTm dPtStm( ptI2, *pSurfTm) ; dPtStm.GetMinDistTriaIndex( nTriaIndex) ; diff --git a/SurfTriMeshBooleans.cpp b/SurfTriMeshBooleans.cpp index 3ad98a6..4a2b497 100644 --- a/SurfTriMeshBooleans.cpp +++ b/SurfTriMeshBooleans.cpp @@ -73,8 +73,7 @@ SurfTriMesh::DecomposeLoop( CHAINVECTOR& cvOpenChain, INTVECTOR& vnDegVec, PNTMA bool bChangedStart = ChangeStart( ptOpenLoopStP, cvBoundClosedLoopVec[nLoop]) ; // splitto bool bSplitted = SplitAtPoint( ptOpenLoopEnP, cvBoundClosedLoopVec[nLoop], Loop1, Loop2) ; - if ( ! ( bChangedStart && bSplitted) || - ( nLastOpenLoopPoint == 0 && ( Loop1.size() == 2 || Loop2.size() == 2))) + if ( ! ( bChangedStart && bSplitted)) continue ; // la catena aperta non รจ interna al loop chiuso attuale // il loop 2 segue sempre la direzione della catena, il loop 1 ha dentro la catena invertita