EgtGeomKernel :
- correzione al VM 5 assi con movimenti che fanno perno.
This commit is contained in:
+203
-80
@@ -31,6 +31,13 @@
|
||||
#include <future>
|
||||
#include <numeric>
|
||||
|
||||
#define SAVETRIMMINGTOOL 0
|
||||
|
||||
#if SAVETRIMMINGTOOL
|
||||
std::vector<IGeoObj*> vGeo ;
|
||||
#include "/EgtDev/Include/EGkGeoObjSave.h"
|
||||
#endif
|
||||
|
||||
using namespace std ;
|
||||
|
||||
// ------------------------- OPERAZIONI SU INTERVALLI --------------------------------------------------------------------------------------
|
||||
@@ -1569,10 +1576,6 @@ VolZmap::Comp_5AxisMilling( int nGrid, const Point3d& ptS, const Point3d& ptE, c
|
||||
else if ( n5AxisType == Move5Axis::ACROSS)
|
||||
nTotSurf = 2 + nSub * 4 + nSub * 2 + 16 ; // come sopra
|
||||
|
||||
int nSurfInd = 0 ;
|
||||
vector<SurfBezForInters> vSurfBez( nTotSurf) ;
|
||||
double dSide = 0 ;
|
||||
|
||||
// punti di riferimento sul tool
|
||||
// tip del tool
|
||||
Point3d ptP1T ;
|
||||
@@ -1585,6 +1588,14 @@ VolZmap::Comp_5AxisMilling( int nGrid, const Point3d& ptS, const Point3d& ptE, c
|
||||
Vector3d vtDirTip = ptP2T - ptP1T ;
|
||||
bool bTopIsPivot = vtDirTop.IsSmall() ;
|
||||
bool bTipIsPivot = vtDirTip.IsSmall() ;
|
||||
bool bInverse = ! (bTopIsPivot || bTipIsPivot) && vtDirTop * vtDirTip < 0 ;
|
||||
|
||||
if ( bInverse)
|
||||
nTotSurf += 4 ;
|
||||
|
||||
int nSurfInd = 0 ;
|
||||
vector<SurfBezForInters> vSurfBez( nTotSurf) ;
|
||||
double dSide = 0 ;
|
||||
|
||||
// box dell'intero volume spazzato, nel riferimento object oriented
|
||||
BBox3d bbVol ;
|
||||
@@ -1617,10 +1628,10 @@ VolZmap::Comp_5AxisMilling( int nGrid, const Point3d& ptS, const Point3d& ptE, c
|
||||
dSide = ( ptRefEnd - ptRefStart) * vtLs ;
|
||||
|
||||
// calcolo anche i vettori per le basi inferiori
|
||||
Vector3d vtTipBaseStart = -( vtLs ^ vtDirTip) ;
|
||||
Vector3d vtTipBaseStart = bInverse ? ( vtLs ^ vtDirTip) : -( vtLs ^ vtDirTip) ;
|
||||
vtTipBaseStart.Normalize() ;
|
||||
vtTipBaseStart *= dMinRad ;
|
||||
Vector3d vtTipBaseEnd = -( vtLe ^ vtDirTip) ;
|
||||
Vector3d vtTipBaseEnd = bInverse ? ( vtLe ^ vtDirTip) : -( vtLe ^ vtDirTip) ;
|
||||
vtTipBaseEnd.Normalize() ;
|
||||
vtTipBaseEnd *= dMinRad ;
|
||||
// aggiungo il primo punto per ognuno dei gruppi
|
||||
@@ -1670,20 +1681,24 @@ VolZmap::Comp_5AxisMilling( int nGrid, const Point3d& ptS, const Point3d& ptE, c
|
||||
|
||||
vector<PNTVECTOR> vvPtCtrl ;
|
||||
// superficie laterale sinistra
|
||||
CurveLine cLineLeftStart ; cLineLeftStart.Set( vPntTipStartFront.back(), vPntTopStartFront.back()) ;
|
||||
PtrOwner<CurveBezier> cBezLeftStart( GetBasicCurveBezier( LineToBezierCurve( &cLineLeftStart, nDegU, bRat))) ;
|
||||
CurveLine cLineLeftEnd ; cLineLeftEnd.Set( vPntTipEndFront.back(), vPntTopEndFront.back()) ;
|
||||
PtrOwner<CurveBezier> cBezLeftEnd( GetBasicCurveBezier( LineToBezierCurve( &cLineLeftEnd, nDegU, bRat))) ;
|
||||
vvPtCtrl.emplace_back( cBezLeftStart->GetAllControlPoints()) ;
|
||||
PNTVECTOR vPntLeft = cBezLeftEnd->GetAllControlPoints() ;
|
||||
CurveLine cLineLeftBottom ; cLineLeftBottom.Set( vPntTipEndFront.back(), vPntTipStartFront.back()) ;
|
||||
if ( bInverse)
|
||||
cLineLeftBottom.Invert() ;
|
||||
PtrOwner<CurveBezier> cBezLeftBottom( GetBasicCurveBezier( LineToBezierCurve( &cLineLeftBottom, nDegU, bRat))) ;
|
||||
CurveLine cLineLeftTop ; cLineLeftTop.Set( vPntTopEndFront.back(), vPntTopStartFront.back()) ;
|
||||
PtrOwner<CurveBezier> cBezLeftTop( GetBasicCurveBezier( LineToBezierCurve( &cLineLeftTop, nDegU, bRat))) ;
|
||||
vvPtCtrl.emplace_back( cBezLeftBottom->GetAllControlPoints()) ;
|
||||
PNTVECTOR vPntLeft = cBezLeftTop->GetAllControlPoints() ;
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntLeft.begin(), vPntLeft.end()) ;
|
||||
// superficie laterale destra
|
||||
CurveLine cLineRightStart ; cLineRightStart.Set( vPntTopStartFront.front(), vPntTipStartFront.front()) ;
|
||||
PtrOwner<CurveBezier> cBezRightStart( GetBasicCurveBezier( LineToBezierCurve( &cLineRightStart, nDegU, bRat))) ;
|
||||
CurveLine cLineRightEnd ; cLineRightEnd.Set( vPntTopEndFront.front(), vPntTipEndFront.front()) ;
|
||||
PtrOwner<CurveBezier> cBezRightEnd( GetBasicCurveBezier( LineToBezierCurve( &cLineRightEnd, nDegU, bRat))) ;
|
||||
vvPtCtrl.emplace_back( cBezRightStart->GetAllControlPoints()) ;
|
||||
PNTVECTOR vPntRight = cBezRightEnd->GetAllControlPoints() ;
|
||||
CurveLine cLineRightBottom ; cLineRightBottom.Set( vPntTipStartFront.front(), vPntTipEndFront.front()) ;
|
||||
if ( bInverse)
|
||||
cLineRightBottom.Invert() ;
|
||||
PtrOwner<CurveBezier> cBezRightBottom( GetBasicCurveBezier( LineToBezierCurve( &cLineRightBottom, nDegU, bRat))) ;
|
||||
CurveLine cLineRightTop ; cLineRightTop.Set( vPntTopStartFront.front(), vPntTopEndFront.front()) ;
|
||||
PtrOwner<CurveBezier> cBezRightTop( GetBasicCurveBezier( LineToBezierCurve( &cLineRightTop, nDegU, bRat))) ;
|
||||
vvPtCtrl.emplace_back( cBezRightBottom->GetAllControlPoints()) ;
|
||||
PNTVECTOR vPntRight = cBezRightTop->GetAllControlPoints() ;
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntRight.begin(), vPntRight.end()) ;
|
||||
if ( nSub == 1) {
|
||||
// superficie inferiore
|
||||
@@ -1748,43 +1763,83 @@ VolZmap::Comp_5AxisMilling( int nGrid, const Point3d& ptS, const Point3d& ptE, c
|
||||
if ( ! bTipIsPivot) {
|
||||
// inferiori
|
||||
if ( dSide > 0) {
|
||||
vvPtCtrl.emplace_back(cBezTipStartF1->GetAllControlPoints());
|
||||
PNTVECTOR vPntTipEnd1 = cBezTipEndF1->GetAllControlPoints();
|
||||
vvPtCtrl.back().insert(vvPtCtrl.back().end(), vPntTipEnd1.begin(), vPntTipEnd1.end());
|
||||
vvPtCtrl.emplace_back(cBezTipStartF2->GetAllControlPoints());
|
||||
PNTVECTOR vPntTipEnd2 = cBezTipEndF2->GetAllControlPoints();
|
||||
vvPtCtrl.back().insert(vvPtCtrl.back().end(), vPntTipEnd2.begin(), vPntTipEnd2.end());
|
||||
PNTVECTOR vPntTipEnd01 = cBezTipStartF1->GetAllControlPoints() ;
|
||||
if ( ! bInverse)
|
||||
vvPtCtrl.emplace_back( vPntTipEnd01.begin(), vPntTipEnd01.end()) ;
|
||||
else
|
||||
vvPtCtrl.emplace_back( vPntTipEnd01.rbegin(), vPntTipEnd01.rend()) ;
|
||||
PNTVECTOR vPntTipEnd1 = cBezTipEndF1->GetAllControlPoints() ;
|
||||
if ( ! bInverse)
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntTipEnd1.begin(), vPntTipEnd1.end()) ;
|
||||
else
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntTipEnd1.rbegin(), vPntTipEnd1.rend()) ;
|
||||
PNTVECTOR vPntTipEnd02 = cBezTipStartF2->GetAllControlPoints() ;
|
||||
if ( ! bInverse)
|
||||
vvPtCtrl.emplace_back( vPntTipEnd02.begin(), vPntTipEnd02.end()) ;
|
||||
else
|
||||
vvPtCtrl.emplace_back( vPntTipEnd02.rbegin(), vPntTipEnd02.rend()) ;
|
||||
PNTVECTOR vPntTipEnd2 = cBezTipEndF2->GetAllControlPoints() ;
|
||||
if ( ! bInverse)
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntTipEnd2.begin(), vPntTipEnd2.end()) ;
|
||||
else
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntTipEnd2.rbegin(), vPntTipEnd2.rend()) ;
|
||||
}
|
||||
else {
|
||||
PNTVECTOR vPntTipEnd01 = cBezTipStartB1->GetAllControlPoints();
|
||||
vvPtCtrl.emplace_back(vPntTipEnd01.rbegin(), vPntTipEnd01.rend());
|
||||
PNTVECTOR vPntTipEnd1 = cBezTipEndB1->GetAllControlPoints();
|
||||
vvPtCtrl.back().insert(vvPtCtrl.back().end(), vPntTipEnd1.rbegin(), vPntTipEnd1.rend());
|
||||
PNTVECTOR vPntTipEnd02 = cBezTipStartB2->GetAllControlPoints();
|
||||
vvPtCtrl.emplace_back(vPntTipEnd02.rbegin(), vPntTipEnd02.rend());
|
||||
PNTVECTOR vPntTipEnd2 = cBezTipEndB2->GetAllControlPoints();
|
||||
vvPtCtrl.back().insert(vvPtCtrl.back().end(), vPntTipEnd2.rbegin(), vPntTipEnd2.rend());
|
||||
PNTVECTOR vPntTipEnd01 = cBezTipStartB1->GetAllControlPoints() ;
|
||||
if ( ! bInverse)
|
||||
vvPtCtrl.emplace_back( vPntTipEnd01.rbegin(), vPntTipEnd01.rend()) ;
|
||||
else
|
||||
vvPtCtrl.emplace_back( vPntTipEnd01.begin(), vPntTipEnd01.end()) ;
|
||||
PNTVECTOR vPntTipEnd1 = cBezTipEndB1->GetAllControlPoints() ;
|
||||
if ( ! bInverse)
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntTipEnd1.rbegin(), vPntTipEnd1.rend()) ;
|
||||
else
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntTipEnd1.begin(), vPntTipEnd1.end()) ;
|
||||
PNTVECTOR vPntTipEnd02 = cBezTipStartB2->GetAllControlPoints() ;
|
||||
if ( ! bInverse)
|
||||
vvPtCtrl.emplace_back( vPntTipEnd02.rbegin(), vPntTipEnd02.rend()) ;
|
||||
else
|
||||
vvPtCtrl.emplace_back( vPntTipEnd02.begin(), vPntTipEnd02.end()) ;
|
||||
PNTVECTOR vPntTipEnd2 = cBezTipEndB2->GetAllControlPoints() ;
|
||||
if ( ! bInverse)
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntTipEnd2.rbegin(), vPntTipEnd2.rend()) ;
|
||||
else
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntTipEnd2.begin(), vPntTipEnd2.end()) ;
|
||||
}
|
||||
}
|
||||
if ( ! bTopIsPivot) {
|
||||
// superiori
|
||||
if ( dSide > 0) {
|
||||
vvPtCtrl.emplace_back(cBezTopStartB1->GetAllControlPoints());
|
||||
PNTVECTOR vPntTopEnd1 = cBezTopEndB1->GetAllControlPoints();
|
||||
vvPtCtrl.back().insert(vvPtCtrl.back().end(), vPntTopEnd1.begin(), vPntTopEnd1.end());
|
||||
vvPtCtrl.emplace_back(cBezTopStartB2->GetAllControlPoints());
|
||||
PNTVECTOR vPntTopEnd2 = cBezTopEndB2->GetAllControlPoints();
|
||||
vvPtCtrl.back().insert(vvPtCtrl.back().end(), vPntTopEnd2.begin(), vPntTopEnd2.end());
|
||||
PNTVECTOR vPntTopEnd01 = cBezTopStartB1->GetAllControlPoints() ;
|
||||
vvPtCtrl.emplace_back( vPntTopEnd01.begin(), vPntTopEnd01.end()) ;
|
||||
PNTVECTOR vPntTopEnd1 = cBezTopEndB1->GetAllControlPoints() ;
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntTopEnd1.begin(), vPntTopEnd1.end()) ;
|
||||
PNTVECTOR vPntTopEnd02 = cBezTopStartB2->GetAllControlPoints() ;
|
||||
vvPtCtrl.emplace_back( vPntTopEnd02.begin(), vPntTopEnd02.end()) ;
|
||||
PNTVECTOR vPntTopEnd2 = cBezTopEndB2->GetAllControlPoints() ;
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntTopEnd2.begin(), vPntTopEnd2.end()) ;
|
||||
}
|
||||
else {
|
||||
PNTVECTOR vPntTopEnd01 = cBezTopStartF1->GetAllControlPoints();
|
||||
vvPtCtrl.emplace_back(vPntTopEnd01.rbegin(), vPntTopEnd01.rend());
|
||||
PNTVECTOR vPntTopEnd1 = cBezTopEndF1->GetAllControlPoints();
|
||||
vvPtCtrl.back().insert(vvPtCtrl.back().end(), vPntTopEnd1.rbegin(), vPntTopEnd1.rend());
|
||||
PNTVECTOR vPntTopEnd02 = cBezTopStartF2->GetAllControlPoints();
|
||||
vvPtCtrl.emplace_back(vPntTopEnd02.rbegin(), vPntTopEnd02.rend());
|
||||
PNTVECTOR vPntTopEnd2 = cBezTopEndF2->GetAllControlPoints();
|
||||
vvPtCtrl.back().insert(vvPtCtrl.back().end(), vPntTopEnd2.rbegin(), vPntTopEnd2.rend());
|
||||
PNTVECTOR vPntTopEnd01 = cBezTopStartF1->GetAllControlPoints() ;
|
||||
if ( ! bInverse)
|
||||
vvPtCtrl.emplace_back( vPntTopEnd01.rbegin(), vPntTopEnd01.rend()) ;
|
||||
else
|
||||
vvPtCtrl.emplace_back( vPntTopEnd01.begin(), vPntTopEnd01.end()) ;
|
||||
PNTVECTOR vPntTopEnd1 = cBezTopEndF1->GetAllControlPoints() ;
|
||||
if ( ! bInverse)
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntTopEnd1.rbegin(), vPntTopEnd1.rend()) ;
|
||||
else
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntTopEnd1.begin(), vPntTopEnd1.end()) ;
|
||||
PNTVECTOR vPntTopEnd02 = cBezTopStartF2->GetAllControlPoints() ;
|
||||
if ( ! bInverse)
|
||||
vvPtCtrl.emplace_back( vPntTopEnd02.rbegin(), vPntTopEnd02.rend()) ;
|
||||
else
|
||||
vvPtCtrl.emplace_back( vPntTopEnd02.begin(), vPntTopEnd02.end()) ;
|
||||
PNTVECTOR vPntTopEnd2 = cBezTopEndF2->GetAllControlPoints() ;
|
||||
if ( ! bInverse)
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntTopEnd2.rbegin(), vPntTopEnd2.rend()) ;
|
||||
else
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntTopEnd2.begin(), vPntTopEnd2.end()) ;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1793,36 +1848,74 @@ VolZmap::Comp_5AxisMilling( int nGrid, const Point3d& ptS, const Point3d& ptE, c
|
||||
if ( ! bTipIsPivot) {
|
||||
// inferiori
|
||||
if ( dSide > 0) {
|
||||
PNTVECTOR vPntTip01 = cBezTipStartB1->GetAllControlPoints();
|
||||
vvPtCtrl.emplace_back(vPntTip01.rbegin(), vPntTip01.rend());
|
||||
PNTVECTOR vPntTip1 = cBezTipEndB1->GetAllControlPoints();
|
||||
vvPtCtrl.back().insert(vvPtCtrl.back().end(), vPntTip1.rbegin(), vPntTip1.rend());
|
||||
PNTVECTOR vPntTip02 = cBezTipStartB2->GetAllControlPoints();
|
||||
vvPtCtrl.emplace_back(vPntTip02.rbegin(), vPntTip02.rend());
|
||||
PNTVECTOR vPntTip2 = cBezTipEndB2->GetAllControlPoints();
|
||||
vvPtCtrl.back().insert(vvPtCtrl.back().end(), vPntTip2.rbegin(), vPntTip2.rend());
|
||||
PNTVECTOR vPntTip01 = cBezTipStartB1->GetAllControlPoints() ;
|
||||
if ( ! bInverse)
|
||||
vvPtCtrl.emplace_back( vPntTip01.rbegin(), vPntTip01.rend()) ;
|
||||
else
|
||||
vvPtCtrl.emplace_back( vPntTip01.begin(), vPntTip01.end()) ;
|
||||
PNTVECTOR vPntTip1 = cBezTipEndB1->GetAllControlPoints() ;
|
||||
if ( ! bInverse)
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntTip1.rbegin(), vPntTip1.rend()) ;
|
||||
else
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntTip1.begin(), vPntTip1.end()) ;
|
||||
PNTVECTOR vPntTip02 = cBezTipStartB2->GetAllControlPoints() ;
|
||||
if ( ! bInverse)
|
||||
vvPtCtrl.emplace_back( vPntTip02.rbegin(), vPntTip02.rend()) ;
|
||||
else
|
||||
vvPtCtrl.emplace_back( vPntTip02.begin(), vPntTip02.end()) ;
|
||||
PNTVECTOR vPntTip2 = cBezTipEndB2->GetAllControlPoints() ;
|
||||
if ( ! bInverse)
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntTip2.rbegin(), vPntTip2.rend()) ;
|
||||
else
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntTip2.begin(), vPntTip2.end()) ;
|
||||
}
|
||||
else {
|
||||
vvPtCtrl.emplace_back(cBezTipStartF1->GetAllControlPoints());
|
||||
PNTVECTOR vPntTip1 = cBezTipEndF1->GetAllControlPoints();
|
||||
vvPtCtrl.back().insert(vvPtCtrl.back().end(), vPntTip1.begin(), vPntTip1.end());
|
||||
vvPtCtrl.emplace_back(cBezTipStartF2->GetAllControlPoints());
|
||||
PNTVECTOR vPntTip2 = cBezTipEndF2->GetAllControlPoints();
|
||||
vvPtCtrl.back().insert(vvPtCtrl.back().end(), vPntTip2.begin(), vPntTip2.end());
|
||||
PNTVECTOR vPntTip01 = cBezTipStartF1->GetAllControlPoints() ;
|
||||
if ( ! bInverse)
|
||||
vvPtCtrl.emplace_back( vPntTip01.begin(), vPntTip01.end()) ;
|
||||
else
|
||||
vvPtCtrl.emplace_back( vPntTip01.rbegin(), vPntTip01.rend()) ;
|
||||
PNTVECTOR vPntTip1 = cBezTipEndF1->GetAllControlPoints() ;
|
||||
if ( ! bInverse)
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntTip1.begin(), vPntTip1.end()) ;
|
||||
else
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntTip1.rbegin(), vPntTip1.rend()) ;
|
||||
PNTVECTOR vPntTip02 = cBezTipStartF2->GetAllControlPoints() ;
|
||||
if ( ! bInverse)
|
||||
vvPtCtrl.emplace_back( vPntTip02.begin(), vPntTip02.end()) ;
|
||||
else
|
||||
vvPtCtrl.emplace_back( vPntTip02.rbegin(), vPntTip02.rend()) ;
|
||||
PNTVECTOR vPntTip2 = cBezTipEndF2->GetAllControlPoints() ;
|
||||
if ( ! bInverse)
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntTip2.begin(), vPntTip2.end()) ;
|
||||
else
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntTip2.rbegin(), vPntTip2.rend()) ;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! bTopIsPivot) {
|
||||
// superiori
|
||||
if ( dSide > 0) {
|
||||
PNTVECTOR vPntTop01 = cBezTopStartF1->GetAllControlPoints();
|
||||
vvPtCtrl.emplace_back(vPntTop01.rbegin(), vPntTop01.rend());
|
||||
PNTVECTOR vPntTop1 = cBezTopEndF1->GetAllControlPoints();
|
||||
vvPtCtrl.back().insert(vvPtCtrl.back().end(), vPntTop1.rbegin(), vPntTop1.rend());
|
||||
PNTVECTOR vPntTop02 = cBezTopStartF2->GetAllControlPoints();
|
||||
vvPtCtrl.emplace_back(vPntTop02.rbegin(), vPntTop02.rend());
|
||||
PNTVECTOR vPntTop2 = cBezTopEndF2->GetAllControlPoints();
|
||||
vvPtCtrl.back().insert(vvPtCtrl.back().end(), vPntTop2.rbegin(), vPntTop2.rend());
|
||||
PNTVECTOR vPntTop01 = cBezTopStartF1->GetAllControlPoints() ;
|
||||
if ( ! bInverse)
|
||||
vvPtCtrl.emplace_back( vPntTop01.rbegin(), vPntTop01.rend()) ;
|
||||
else
|
||||
vvPtCtrl.emplace_back( vPntTop01.begin(), vPntTop01.end()) ;
|
||||
PNTVECTOR vPntTop1 = cBezTopEndF1->GetAllControlPoints() ;
|
||||
if ( ! bInverse)
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntTop1.rbegin(), vPntTop1.rend()) ;
|
||||
else
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntTop1.begin(), vPntTop1.end()) ;
|
||||
PNTVECTOR vPntTop02 = cBezTopStartF2->GetAllControlPoints() ;
|
||||
if ( ! bInverse)
|
||||
vvPtCtrl.emplace_back( vPntTop02.rbegin(), vPntTop02.rend()) ;
|
||||
else
|
||||
vvPtCtrl.emplace_back( vPntTop02.begin(), vPntTop02.end()) ;
|
||||
PNTVECTOR vPntTop2 = cBezTopEndF2->GetAllControlPoints() ;
|
||||
if ( ! bInverse)
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntTop2.rbegin(), vPntTop2.rend()) ;
|
||||
else
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntTop2.begin(), vPntTop2.end()) ;
|
||||
}
|
||||
else {
|
||||
vvPtCtrl.emplace_back(cBezTopStartB1->GetAllControlPoints());
|
||||
@@ -1838,23 +1931,43 @@ VolZmap::Comp_5AxisMilling( int nGrid, const Point3d& ptS, const Point3d& ptE, c
|
||||
|
||||
// chiudo il volume con le superfici verticali e le basi dei tool
|
||||
|
||||
// chiudo il volume con le superici verticali end 1
|
||||
// chiudo il volume con le superici verticali end front 1
|
||||
vvPtCtrl.emplace_back( cBezTipEndF1->GetAllControlPoints()) ;
|
||||
PNTVECTOR vPntEnd1 = cBezTopEndF1->GetAllControlPoints() ;
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntEnd1.begin(), vPntEnd1.end()) ;
|
||||
// chiudo il volume con le superici verticali end 2
|
||||
PNTVECTOR vPntEndF1 = cBezTopEndF1->GetAllControlPoints() ;
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntEndF1.begin(), vPntEndF1.end()) ;
|
||||
// chiudo il volume con le superici verticali end front 2
|
||||
vvPtCtrl.emplace_back( cBezTipEndF2->GetAllControlPoints()) ;
|
||||
PNTVECTOR vPntEnd2 = cBezTopEndF2->GetAllControlPoints() ;
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntEnd2.begin(), vPntEnd2.end()) ;
|
||||
PNTVECTOR vPntEndF2 = cBezTopEndF2->GetAllControlPoints() ;
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntEndF2.begin(), vPntEndF2.end()) ;
|
||||
if ( bInverse) {
|
||||
// chiudo il volume con le superici verticali end back 1
|
||||
vvPtCtrl.emplace_back( cBezTipEndB1->GetAllControlPoints()) ;
|
||||
PNTVECTOR vPntEndB1 = cBezTopEndB1->GetAllControlPoints() ;
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntEndB1.begin(), vPntEndB1.end()) ;
|
||||
// chiudo il volume con le superici verticali end back 2
|
||||
vvPtCtrl.emplace_back( cBezTipEndB2->GetAllControlPoints()) ;
|
||||
PNTVECTOR vPntEndB2 = cBezTopEndB2->GetAllControlPoints() ;
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntEndB2.begin(), vPntEndB2.end()) ;
|
||||
}
|
||||
|
||||
// chiudo il volume con le superici verticali start 1
|
||||
// chiudo il volume con le superici verticali start back 1
|
||||
vvPtCtrl.emplace_back( cBezTipStartB1->GetAllControlPoints()) ;
|
||||
PNTVECTOR vPntStart1 = cBezTopStartB1->GetAllControlPoints() ;
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntStart1.begin(), vPntStart1.end()) ;
|
||||
// chiudo il volume con le superfici verticali start 2
|
||||
PNTVECTOR vPntStartB1 = cBezTopStartB1->GetAllControlPoints() ;
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntStartB1.begin(), vPntStartB1.end()) ;
|
||||
// chiudo il volume con le superfici verticali start back 2
|
||||
vvPtCtrl.emplace_back( cBezTipStartB2->GetAllControlPoints()) ;
|
||||
PNTVECTOR vPntStart2 = cBezTopStartB2->GetAllControlPoints() ;
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntStart2.begin(), vPntStart2.end()) ;
|
||||
PNTVECTOR vPntStartB2 = cBezTopStartB2->GetAllControlPoints() ;
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntStartB2.begin(), vPntStartB2.end()) ;
|
||||
if ( bInverse) {
|
||||
// chiudo il volume con le superici verticali start front 1
|
||||
vvPtCtrl.emplace_back( cBezTipStartF1->GetAllControlPoints()) ;
|
||||
PNTVECTOR vPntStartF1 = cBezTopStartF1->GetAllControlPoints() ;
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntStartF1.begin(), vPntStartF1.end()) ;
|
||||
// chiudo il volume con le superfici verticali start front 2
|
||||
vvPtCtrl.emplace_back( cBezTipStartF2->GetAllControlPoints()) ;
|
||||
PNTVECTOR vPntStartF2 = cBezTopStartF2->GetAllControlPoints() ;
|
||||
vvPtCtrl.back().insert( vvPtCtrl.back().end(), vPntStartF2.begin(), vPntStartF2.end()) ;
|
||||
}
|
||||
|
||||
// superfici di base dei tool
|
||||
if ( ! ( n5AxisType == Move5Axis::NO_BASE_INTERS && dSide < 0)) {
|
||||
@@ -1936,6 +2049,11 @@ VolZmap::Comp_5AxisMilling( int nGrid, const Point3d& ptS, const Point3d& ptE, c
|
||||
vSurfBez[nSurfInd].sBez.SetControlPoint( 6, vvPtCtrl[z][6]) ;
|
||||
vSurfBez[nSurfInd].sBez.SetControlPoint( 7, vvPtCtrl[z][7]) ;
|
||||
|
||||
#if SAVETRIMMINGTOOL
|
||||
if ( nGrid == 0)
|
||||
vGeo.push_back( vSurfBez[nSurfInd].sBez.Clone()) ;
|
||||
#endif
|
||||
|
||||
Vector3d A = vvPtCtrl[z][4] - vvPtCtrl[z][0] ;
|
||||
Vector3d B = vvPtCtrl[z][5] - vvPtCtrl[z][1] ;
|
||||
Vector3d C = vvPtCtrl[z][6] - vvPtCtrl[z][2] ;
|
||||
@@ -1984,6 +2102,11 @@ VolZmap::Comp_5AxisMilling( int nGrid, const Point3d& ptS, const Point3d& ptE, c
|
||||
++ nSurfInd ;
|
||||
}
|
||||
|
||||
#if SAVETRIMMINGTOOL
|
||||
if ( nGrid == 0)
|
||||
SaveGeoObj( vGeo, "D:\\Temp\\VirtualMilling\\5axisAdvanced\\marmo sottosquadra\\volume.nge") ;
|
||||
#endif
|
||||
|
||||
// scorro tutti gli spilloni interessati
|
||||
int j = 0 ;
|
||||
int nLastForwardJ = -1 ;
|
||||
|
||||
Reference in New Issue
Block a user