EgtMachKernel :
- aggiunto PARALLEL_SLANT da faccia - aggiunte mortase inclinate.
This commit is contained in:
+1
-1
@@ -957,7 +957,7 @@ Mortising::GetCurve( SelData Id)
|
||||
else if ( ( m_Params.m_nFaceUse & 32) != 0)
|
||||
nToolDir = TOOL_ORTHO ;
|
||||
else
|
||||
nToolDir = TOOL_PARAL ;
|
||||
nToolDir = TOOL_PAR_SLANT ;
|
||||
int nFaceUse = ( m_Params.m_nFaceUse & 31) ;
|
||||
AdjustCurveFromSurf( pCrvCompo, nToolDir, nFaceUse, m_TParams.m_dThick) ;
|
||||
// la restituisco
|
||||
|
||||
+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) ;
|
||||
|
||||
+1
-1
@@ -166,6 +166,6 @@ inline Operation* GetOperation( IUserObj* pUserObj)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// tipo posizione utensile
|
||||
enum { TOOL_PARAL = 1, TOOL_ORTHO = 2, TOOL_ORTUP = 3} ;
|
||||
enum { TOOL_PARAL = 1, TOOL_ORTHO = 2, TOOL_ORTUP = 3, TOOL_PAR_SLANT= 4} ;
|
||||
// tipo di utilizzo contorno faccia
|
||||
enum { FACE_DOWN = 1, FACE_TOP = 2, FACE_FRONT = 3, FACE_BACK = 4, FACE_LEFT = 5, FACE_RIGHT = 6, FACE_CONT = 7} ;
|
||||
|
||||
Reference in New Issue
Block a user