EgtMachKernel :
- aggiunto PARALLEL_SLANT da faccia - aggiunte mortase inclinate.
This commit is contained in:
+16
-1
@@ -611,6 +611,10 @@ Operation::AdjustCurveFromSurf( ICurveComposite* pCrvCompo, int nToolDir, int nF
|
||||
Vector3d vtN ;
|
||||
pCrvCompo->GetExtrusion( vtN) ;
|
||||
|
||||
// direzioni lati precedente e successivo
|
||||
Vector3d vtDirPrev ;
|
||||
Vector3d vtDirNext ;
|
||||
|
||||
// se richiesto contorno
|
||||
if ( nFaceUse == FACE_CONT) {
|
||||
// cerco l'estremo più alto e lo imposto come inizio
|
||||
@@ -654,6 +658,7 @@ Operation::AdjustCurveFromSurf( ICurveComposite* pCrvCompo, int nToolDir, int nF
|
||||
if ( ( vtN ^ vtDir) * vtRef < COS_ANG_MAX) {
|
||||
delete( pCrvCompo->RemoveFirstOrLastCurve( false)) ;
|
||||
pCrv = pCrvCompo->GetFirstCurve() ;
|
||||
vtDirPrev = vtDir ;
|
||||
}
|
||||
else
|
||||
break ;
|
||||
@@ -664,6 +669,7 @@ Operation::AdjustCurveFromSurf( ICurveComposite* pCrvCompo, int nToolDir, int nF
|
||||
if ( ( vtN ^ vtDir) * vtRef < COS_ANG_MAX) {
|
||||
delete( pCrvCompo->RemoveFirstOrLastCurve( true)) ;
|
||||
pCrv = pCrvCompo->GetLastCurve() ;
|
||||
vtDirNext = vtDir ;
|
||||
}
|
||||
else
|
||||
break ;
|
||||
@@ -692,7 +698,7 @@ Operation::AdjustCurveFromSurf( ICurveComposite* pCrvCompo, int nToolDir, int nF
|
||||
}
|
||||
pCrvCompo->SetThickness( 0) ;
|
||||
}
|
||||
else { // nToolDir == TOOL_PARAL
|
||||
else { // nToolDir == TOOL_PARAL o TOOL_PAR_SLANT
|
||||
// sistemo versore
|
||||
Point3d ptStart, ptEnd ;
|
||||
pCrvCompo->GetStartPoint( ptStart) ;
|
||||
@@ -701,6 +707,15 @@ Operation::AdjustCurveFromSurf( ICurveComposite* pCrvCompo, int nToolDir, int nF
|
||||
Vector3d vtExtr = vtN ^ vtT ;
|
||||
if ( ! vtExtr.Normalize())
|
||||
return false ;
|
||||
if ( nToolDir == TOOL_PAR_SLANT) {
|
||||
Vector3d vtDirPN = - vtDirPrev + vtDirNext ;
|
||||
if ( vtDirPN.Normalize()) {
|
||||
if ( vtDirPN * vtExtr > 0)
|
||||
vtExtr = vtDirPN ;
|
||||
else
|
||||
vtExtr = - vtDirPN ;
|
||||
}
|
||||
}
|
||||
pCrvCompo->SetExtrusion( vtExtr) ;
|
||||
// elimino eventuali parti iniziali e/o finali dirette circa come il versore
|
||||
const double MAX_ALL_COS = cos( 25 * DEGTORAD) ;
|
||||
|
||||
Reference in New Issue
Block a user