Merge branch 'master' into MoreBezier

This commit is contained in:
Daniele Bariletti
2024-06-06 09:21:18 +02:00
3 changed files with 4 additions and 4 deletions
+2 -1
View File
@@ -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<CurveLine> pLine( CreateBasicCurveLine()) ;
if ( IsNull( pLine))
+1 -1
View File
@@ -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) ;
+1 -2
View File
@@ -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