EgtMachKernel 1.9c3 :

- tagli di lama ora possono operare su facce di trimesh
- migliorato recupero contorni da facce.
This commit is contained in:
Dario Sassi
2018-03-14 11:00:18 +00:00
parent 1427b57169
commit 47036161c8
13 changed files with 359 additions and 496 deletions
+3 -22
View File
@@ -831,10 +831,12 @@ Chiseling::GetCurve( SelData Id)
return nullptr ;
// assegno l'estrusione dalla normale alla faccia
pCrvCompo->SetExtrusion( vtN) ;
// unisco le eventuali parti allineate
pCrvCompo->MergeCurves( 10 * EPS_SMALL, 10 * EPS_ANG_SMALL) ;
// la porto in globale
pCrvCompo->ToGlob( frGlob) ;
// sistemazioni varie
AdjustCurveFromSurf( pCrvCompo) ;
AdjustCurveFromSurf( pCrvCompo, TOOL_ORTHO, FACE_CONT, 0) ;
// la restituisco
return Release( pCrvCompo) ;
}
@@ -843,27 +845,6 @@ Chiseling::GetCurve( SelData Id)
return nullptr ;
}
//----------------------------------------------------------------------------
bool
Chiseling::AdjustCurveFromSurf( ICurveComposite* pCrvCompo)
{
// cerco l'estremo più alto del contorno e lo imposto come inizio
double dU = 0 ;
double dUmax = 0 ;
double dZmax = - INFINITO ;
Point3d ptP ;
while ( pCrvCompo->GetPointD1D2( dU, ICurve::FROM_MINUS, ptP)) {
if ( ptP.z > dZmax + EPS_SMALL) {
dZmax = ptP.z ;
dUmax = dU ;
}
dU += 1 ;
}
if ( dU != 0)
pCrvCompo->ChangeStartPoint( dUmax) ;
return true ;
}
//----------------------------------------------------------------------------
bool
Chiseling::Chain( int nGrpDestId)