EgtGeomKernel :
- modifiche per più utensili in virtual milling (Zmap).
This commit is contained in:
@@ -41,8 +41,9 @@ Tool::~Tool( void)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Tool::Clear( void)
|
||||
Tool::Clear( bool bApproxWithLines)
|
||||
{
|
||||
m_bApproxWithLines = bApproxWithLines ;
|
||||
m_dLinTol = LIN_TOL_STD ;
|
||||
m_dAngTolDeg = ANG_TOL_APPROX_DEG ;
|
||||
m_nType = UNDEF ;
|
||||
|
||||
@@ -23,7 +23,7 @@ class Tool
|
||||
~Tool( void) ;
|
||||
|
||||
public :
|
||||
bool Clear( void) ;
|
||||
bool Clear( bool bApproxWithLines = false) ;
|
||||
bool SetTolerances( double dLinTol, double dAngTolDeg = 45) ;
|
||||
bool SetStdTool( const std::string& sToolName, double dH, double dR, double dCornR, double dCutterH, int nToolNum) ;
|
||||
bool SetAdvTool( const std::string& sToolName,
|
||||
@@ -37,7 +37,7 @@ class Tool
|
||||
{ m_nCurrentNum = nToolNum ; return true ; }
|
||||
int GetType() const
|
||||
{ return m_nType ; }
|
||||
int GetCurrentToolNum() const
|
||||
int GetToolNum() const
|
||||
{ return m_nCurrentNum ; }
|
||||
double GetHeigth() const
|
||||
{ return m_dHeight ; }
|
||||
|
||||
+119
-27
@@ -35,7 +35,8 @@ GEOOBJ_REGISTER( VOL_ZMAP, NGE_V_ZMP, VolZmap) ;
|
||||
//----------------------------------------------------------------------------
|
||||
VolZmap::VolZmap(void)
|
||||
: m_nStatus( TO_VERIFY), m_dStep( 10.0), m_nMapNum( 0), m_nShape( GENERIC), m_nVoxNumPerBlock( N_VOXBLOCK),
|
||||
m_nDexVoxRatio( 1), m_nNumBlock( 0), m_nConnectedCompoCount( 0), m_Tool( true)
|
||||
m_nDexVoxRatio( 1), m_nNumBlock( 0), m_nConnectedCompoCount( 0), m_nCurrTool( -1),
|
||||
m_dToolLinTol( LIN_TOL_STD), m_dToolAngTolDeg( ANG_TOL_APPROX_DEG)
|
||||
{
|
||||
for ( int i = 0 ; i < N_MAPS ; ++ i) {
|
||||
m_nNx[i] = 0 ;
|
||||
@@ -47,7 +48,8 @@ VolZmap::VolZmap(void)
|
||||
}
|
||||
m_nTempProp[0] = 0 ;
|
||||
m_nTempProp[1] = 0 ;
|
||||
m_Tool.SetTolerances( LIN_TOL_STD, ANG_TOL_APPROX_DEG) ;
|
||||
m_vTool.resize( 1) ;
|
||||
m_nCurrTool = 0 ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -76,7 +78,10 @@ VolZmap::Clear( void)
|
||||
m_dStep = EPS_SMALL ;
|
||||
m_nTempProp[0] = 0 ;
|
||||
m_nTempProp[1] = 0 ;
|
||||
m_Tool.Clear() ;
|
||||
m_vTool.resize( 1) ;
|
||||
m_nCurrTool = 0 ;
|
||||
m_dToolLinTol = LIN_TOL_STD ;
|
||||
m_dToolAngTolDeg = ANG_TOL_APPROX_DEG ;
|
||||
// imposto ricalcolo della grafica
|
||||
m_OGrMgr.Reset() ;
|
||||
|
||||
@@ -1679,9 +1684,6 @@ VolZmap::Cut( const Plane3d& plPlane)
|
||||
// Porto il piano nel riferimento intrinseco
|
||||
Plane3d plMyPlane = plPlane ;
|
||||
plMyPlane.ToLoc( m_MapFrame) ;
|
||||
// Imposto numero fittizio di utensile per avere il colore di sezione opportuno
|
||||
int nToolNumOld = m_Tool.GetCurrentToolNum() ;
|
||||
m_Tool.SetToolNum( 1) ;
|
||||
// Interseco lo Zmap col piano, ciclando sulle griglie
|
||||
bool bModified = false ;
|
||||
for ( int nMap = 0 ; nMap < int( m_nMapNum) ; ++ nMap) {
|
||||
@@ -1717,26 +1719,23 @@ VolZmap::Cut( const Plane3d& plPlane)
|
||||
// se altrimenti entrambi gli estremi sono oltre il piano
|
||||
else if ( dStDist > -EPS_SMALL && dEnDist > -EPS_SMALL) {
|
||||
// Si elimina tutto
|
||||
SubtractIntervals( nMap, nI, nJ, dMin, dMax, V_NULL, V_NULL) ;
|
||||
SubtractIntervals( nMap, nI, nJ, dMin, dMax, V_NULL, V_NULL, 1) ;
|
||||
}
|
||||
// se altrimenti è da tenere il punto iniziale
|
||||
else if ( dStDist < 0) {
|
||||
// Si elimina la parte tra intersezione e punto finale
|
||||
double dInt = dMin + ( dMax - dMin) * abs( dStDist) / ( abs( dStDist) + abs( dEnDist)) ;
|
||||
SubtractIntervals( nMap, nI, nJ, dInt, dMax, plMyPlane.GetVersN(), V_NULL) ;
|
||||
SubtractIntervals( nMap, nI, nJ, dInt, dMax, plMyPlane.GetVersN(), V_NULL, 1) ;
|
||||
}
|
||||
// se altrimenti è da tenere il punto finale
|
||||
else if (dEnDist < 0) {
|
||||
// Si elimina la parte tra punto iniziale e intersezione
|
||||
double dInt = dMin + ( dMax - dMin) * abs( dStDist) / ( abs( dStDist) + abs( dEnDist)) ;
|
||||
SubtractIntervals( nMap, nI, nJ, dMin, dInt, V_NULL, plMyPlane.GetVersN()) ;
|
||||
SubtractIntervals( nMap, nI, nJ, dMin, dInt, V_NULL, plMyPlane.GetVersN(), 1) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Ripristino numero utensile
|
||||
m_Tool.SetToolNum( nToolNumOld) ;
|
||||
|
||||
if ( bModified == true) {
|
||||
// Imposto forma generica
|
||||
m_nShape = GENERIC ;
|
||||
@@ -1970,56 +1969,149 @@ VolZmap::CalcBlockNum( void)
|
||||
bool
|
||||
VolZmap::SetToolTolerances( double dLinTol, double dAngTolDeg)
|
||||
{
|
||||
return m_Tool.SetTolerances( dLinTol, dAngTolDeg) ;
|
||||
m_dToolLinTol = max( dLinTol, LIN_TOL_MIN) ;
|
||||
m_dToolAngTolDeg = max( dAngTolDeg, ANG_TOL_MIN_DEG) ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
VolZmap::SetStdTool( const string& sToolName, double dH, double dR, double dCornR, double dCutterH, int nFlag)
|
||||
VolZmap::SetStdTool( const string& sToolName, double dH, double dR, double dCornR, double dCutterH, int nFlag, bool bFirst)
|
||||
{
|
||||
return m_Tool.SetStdTool( sToolName, dH, dR, dCornR, dCutterH, nFlag) ;
|
||||
if ( bFirst) {
|
||||
m_vTool.resize( 1) ;
|
||||
m_vTool[0].Clear( true) ;
|
||||
}
|
||||
else
|
||||
m_vTool.emplace_back( true) ;
|
||||
m_nCurrTool = int( m_vTool.size()) - 1 ;
|
||||
if ( m_nCurrTool < 0)
|
||||
return false ;
|
||||
m_vTool[m_nCurrTool].SetTolerances( m_dToolLinTol, m_dToolAngTolDeg) ;
|
||||
return m_vTool[m_nCurrTool].SetStdTool( sToolName, dH, dR, dCornR, dCutterH, nFlag) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
VolZmap::SetAdvTool( const string& sToolName,
|
||||
double dH, double dR, double dTipH, double dTipR, double dCornR, double dCutterH, int nFlag)
|
||||
double dH, double dR, double dTipH, double dTipR, double dCornR, double dCutterH, int nFlag, bool bFirst)
|
||||
{
|
||||
return m_Tool.SetAdvTool( sToolName, dH, dR, dTipH, dTipR, dCornR, dCutterH, nFlag) ;
|
||||
if ( bFirst) {
|
||||
m_vTool.resize( 1) ;
|
||||
m_vTool[0].Clear( true) ;
|
||||
}
|
||||
else
|
||||
m_vTool.emplace_back( true) ;
|
||||
m_nCurrTool = int( m_vTool.size()) - 1 ;
|
||||
if ( m_nCurrTool < 0)
|
||||
return false ;
|
||||
m_vTool[m_nCurrTool].SetTolerances( m_dToolLinTol, m_dToolAngTolDeg) ;
|
||||
return m_vTool[m_nCurrTool].SetAdvTool( sToolName, dH, dR, dTipH, dTipR, dCornR, dCutterH, nFlag) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
VolZmap::SetSawTool( const string& sToolName,
|
||||
double dH, double dR, double dThick, double dStemR, double dCornR, int nFlag)
|
||||
double dH, double dR, double dThick, double dStemR, double dCornR, int nFlag, bool bFirst)
|
||||
{
|
||||
return m_Tool.SetSawTool( sToolName, dH, dR, dThick, dStemR, dCornR, nFlag) ;
|
||||
if ( bFirst) {
|
||||
m_vTool.resize( 1) ;
|
||||
m_vTool[0].Clear( true) ;
|
||||
}
|
||||
else
|
||||
m_vTool.emplace_back( true) ;
|
||||
m_nCurrTool = int( m_vTool.size()) - 1 ;
|
||||
if ( m_nCurrTool < 0)
|
||||
return false ;
|
||||
m_vTool[m_nCurrTool].SetTolerances( m_dToolLinTol, m_dToolAngTolDeg) ;
|
||||
return m_vTool[m_nCurrTool].SetSawTool( sToolName, dH, dR, dThick, dStemR, dCornR, nFlag) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
VolZmap::SetGenTool( const string& sToolName, const ICurveComposite* pToolOutline, int nFlag)
|
||||
VolZmap::SetGenTool( const string& sToolName, const ICurveComposite* pToolOutline, int nFlag, bool bFirst)
|
||||
{
|
||||
return m_Tool.SetGenTool( sToolName, pToolOutline, nFlag) ;
|
||||
if ( bFirst) {
|
||||
m_vTool.resize( 1) ;
|
||||
m_vTool[0].Clear( true) ;
|
||||
}
|
||||
else
|
||||
m_vTool.emplace_back( true) ;
|
||||
m_nCurrTool = int( m_vTool.size()) - 1 ;
|
||||
if ( m_nCurrTool < 0)
|
||||
return false ;
|
||||
m_vTool[m_nCurrTool].SetTolerances( m_dToolLinTol, m_dToolAngTolDeg) ;
|
||||
return m_vTool[m_nCurrTool].SetGenTool( sToolName, pToolOutline, nFlag) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
VolZmap::SetMortiserTool( const string& sToolName, double dH, double dW, double dTh, double dRc, int nFlag)
|
||||
VolZmap::SetMortiserTool( const string& sToolName, double dH, double dW, double dTh, double dRc, int nFlag, bool bFirst)
|
||||
{
|
||||
return m_Tool.SetMortiserTool( sToolName, dH, dW, dTh, dRc, nFlag) ;
|
||||
if ( bFirst) {
|
||||
m_vTool.resize( 1) ;
|
||||
m_vTool[0].Clear( true) ;
|
||||
}
|
||||
else
|
||||
m_vTool.emplace_back( true) ;
|
||||
m_nCurrTool = int( m_vTool.size()) - 1 ;
|
||||
if ( m_nCurrTool < 0)
|
||||
return false ;
|
||||
m_vTool[m_nCurrTool].SetTolerances( m_dToolLinTol, m_dToolAngTolDeg) ;
|
||||
return m_vTool[m_nCurrTool].SetMortiserTool( sToolName, dH, dW, dTh, dRc, nFlag) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
VolZmap::SetChiselTool( const string& sToolName, double dH, double dW, double dTh, int nFlag)
|
||||
VolZmap::SetChiselTool( const string& sToolName, double dH, double dW, double dTh, int nFlag, bool bFirst)
|
||||
{
|
||||
return m_Tool.SetChiselTool( sToolName, dH, dW, dTh, nFlag) ;
|
||||
if ( bFirst) {
|
||||
m_vTool.resize( 1) ;
|
||||
m_vTool[0].Clear( true) ;
|
||||
}
|
||||
else
|
||||
m_vTool.emplace_back( true) ;
|
||||
m_nCurrTool = int( m_vTool.size()) - 1 ;
|
||||
if ( m_nCurrTool < 0)
|
||||
return false ;
|
||||
m_vTool[m_nCurrTool].SetTolerances( m_dToolLinTol, m_dToolAngTolDeg) ;
|
||||
return m_vTool[m_nCurrTool].SetChiselTool( sToolName, dH, dW, dTh, nFlag) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
VolZmap::GetToolCount( void) const
|
||||
{
|
||||
return m_vTool.size() ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
VolZmap::SetCurrTool( int nCurrTool)
|
||||
{
|
||||
if ( nCurrTool < 0 || nCurrTool >= int( m_vTool.size()))
|
||||
return false ;
|
||||
m_nCurrTool = nCurrTool ;
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
VolZmap::ResetTool( void)
|
||||
VolZmap::ResetTools( void)
|
||||
{
|
||||
return m_Tool.Clear() ;
|
||||
m_vTool.resize( 1) ;
|
||||
m_nCurrTool = 0 ;
|
||||
return m_vTool[0].Clear() ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const ICurveComposite&
|
||||
VolZmap::GetToolOutline( bool bApprox) const
|
||||
{
|
||||
if ( m_nCurrTool < 0 || m_nCurrTool >= int( m_vTool.size())) {
|
||||
static CurveComposite StatCrvCo ;
|
||||
return StatCrvCo ;
|
||||
}
|
||||
const Tool& CurrTool = m_vTool[m_nCurrTool] ;
|
||||
return ( bApprox ? CurrTool.GetApproxOutline() : CurrTool.GetOutline()) ;
|
||||
}
|
||||
|
||||
@@ -82,19 +82,27 @@ class VolZmap : public IVolZmap, public IGeoObjRW
|
||||
{ return m_nDexVoxRatio ; }
|
||||
bool ChangeResolution( int nDexVoxRatio) override ;
|
||||
bool SetToolTolerances( double dLinTol, double dAngTolDeg = 90) override ;
|
||||
bool SetStdTool( const std::string& sToolName, double dH, double dR, double dCornR, double dCutterH, int nFlag) override ;
|
||||
bool SetStdTool( const std::string& sToolName,
|
||||
double dH, double dR, double dCornR, double dCutterH, int nFlag, bool bFirst) override ;
|
||||
bool SetAdvTool( const std::string& sToolName,
|
||||
double dH, double dR, double dTipH, double dTipR, double dCornR, double dCutterH, int nFlag) override ;
|
||||
double dH, double dR, double dTipH, double dTipR, double dCornR, double dCutterH, int nFlag, bool bFirst) override ;
|
||||
bool SetSawTool( const std::string& sToolName,
|
||||
double dH, double dR, double dThick, double dStemR, double dCornR, int nFlag) override ;
|
||||
bool SetGenTool( const std::string& sToolName, const ICurveComposite* pToolOutline, int nFlag) override ;
|
||||
bool SetMortiserTool( const std::string& sToolName, double dH, double dW, double dTh, double dRc, int nFlag) override ;
|
||||
bool SetChiselTool( const std::string& sToolName, double dH, double dW, double dTh, int nFlag) override ;
|
||||
bool ResetTool( void) override ;
|
||||
const ICurveComposite& GetToolOutline( bool bApprox = false) const override
|
||||
{ return ( bApprox ? m_Tool.GetApproxOutline() : m_Tool.GetOutline()) ;}
|
||||
bool MillingStep( const Point3d& ptPs, const Vector3d& vtDs, const Point3d& ptPe, const Vector3d& vtDe) override ;
|
||||
bool MillingStep( const Point3d& ptPs, const Vector3d& vtDs, const Vector3d& vtAs,
|
||||
double dH, double dR, double dThick, double dStemR, double dCornR, int nFlag, bool bFirst) override ;
|
||||
bool SetGenTool( const std::string& sToolName,
|
||||
const ICurveComposite* pToolOutline, int nFlag, bool bFirst) override ;
|
||||
bool SetMortiserTool( const std::string& sToolName,
|
||||
double dH, double dW, double dTh, double dRc, int nFlag, bool bFirst) override ;
|
||||
bool SetChiselTool( const std::string& sToolName,
|
||||
double dH, double dW, double dTh, int nFlag, bool bFirst) override ;
|
||||
int GetToolCount( void) const override ;
|
||||
bool SetCurrTool( int nCurrTool) override ;
|
||||
bool ResetTools( void) override ;
|
||||
const ICurveComposite& GetToolOutline( bool bApprox = false) const override ;
|
||||
bool MillingStep( int nCurrTool,
|
||||
const Point3d& ptPs, const Vector3d& vtDs,
|
||||
const Point3d& ptPe, const Vector3d& vtDe) override ;
|
||||
bool MillingStep( int nCurrTool,
|
||||
const Point3d& ptPs, const Vector3d& vtDs, const Vector3d& vtAs,
|
||||
const Point3d& ptPe, const Vector3d& vtDe, const Vector3d& vtAe) override ;
|
||||
bool GetDepth( const Point3d& ptP, const Vector3d& vtD, double& dInLength, double& dOutLength, bool bExact) const override ;
|
||||
bool GetLineIntersection( const Point3d& ptP, const Vector3d& vtD, ILZIVECTOR& vIntersInfo) const override ;
|
||||
@@ -218,9 +226,9 @@ class VolZmap : public IVolZmap, public IGeoObjRW
|
||||
INTVECTOR& vAdjBlockVoxComp, INTVECTOR& vAdjBordBlockVoxComp) const ;
|
||||
// OPERAZIONI SU INTERVALLI
|
||||
bool SubtractIntervals( int nGrid, int nI, int nJ,
|
||||
double dMin, double dMax, const Vector3d& vtNMin, const Vector3d& vtNMax) ;
|
||||
double dMin, double dMax, const Vector3d& vtNMin, const Vector3d& vtNMax, int nToolNum) ;
|
||||
bool AddIntervals( int nGrid, int nI, int nJ,
|
||||
double dMin, double dMax, const Vector3d& vtNMin, const Vector3d& vtNMax) ;
|
||||
double dMin, double dMax, const Vector3d& vtNMin, const Vector3d& vtNMax, int nToolNum) ;
|
||||
// Spostamenti utensile
|
||||
bool MillingTranslationStep( const Point3d& ptPs, const Point3d& ptPe, const Vector3d& vtD, const Vector3d& vtA) ;
|
||||
bool MillingGeneralMotionStep( const Point3d& ptPs, const Vector3d& vtDs, const Vector3d& vtAs,
|
||||
@@ -264,36 +272,39 @@ class VolZmap : public IVolZmap, public IGeoObjRW
|
||||
// COMPONENTI
|
||||
// Asse di simmetria diretto come l'asse Z
|
||||
bool CompCyl_ZDrilling( int nGrid, const Point3d& ptLs, const Point3d& ptLe, const Vector3d& vtToolDir,
|
||||
double dHei, double dRad) ;
|
||||
bool CompConus_ZDrilling( int nGrid, const Point3d& ptLs, const Point3d& ptLe, const Vector3d& vtToolDir, double dHei, double dMaxRad, double dMinRad,
|
||||
const Vector3d& vtArcNormMaxR = Vector3d( 0, 0, 0), const Vector3d& vtArcNormMinR = Vector3d( 0, 0, 0)) ;
|
||||
double dHei, double dRad, int nToolNum) ;
|
||||
bool CompConus_ZDrilling( int nGrid, const Point3d& ptLs, const Point3d& ptLe, const Vector3d& vtToolDir,
|
||||
double dHei, double dMaxRad, double dMinRad,
|
||||
const Vector3d& vtArcNormMaxR, const Vector3d& vtArcNormMinR, int nToolNum) ;
|
||||
bool CompPar_ZDrilling( int nGrid, double dLenX, double dLenY, double dLenZ,
|
||||
const Point3d& ptS, const Point3d& ptE,
|
||||
const Vector3d& vtToolDir, const Vector3d& vtAux) ;
|
||||
bool CompCyl_ZMilling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir, double dHei, double dRad) ;
|
||||
bool CompConus_ZMilling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir, double dHei, double dMaxRad, double dMinRad,
|
||||
const Vector3d& vtArcNormMaxR = Vector3d( 0, 0, 0), const Vector3d& vtArcNormMinR = Vector3d( 0, 0, 0)) ;
|
||||
const Vector3d& vtToolDir, const Vector3d& vtAux, int nToolNum) ;
|
||||
bool CompCyl_ZMilling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir,
|
||||
double dHei, double dRad, int nToolNum) ;
|
||||
bool CompConus_ZMilling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir,
|
||||
double dHei, double dMaxRad, double dMinRad,
|
||||
const Vector3d& vtArcNormMaxR, const Vector3d& vtArcNormMinR, int nToolNum) ;
|
||||
bool CompPar_ZMilling( int nGrid, double dLenX, double dLenY, double dLenZ,
|
||||
const Point3d& ptS, const Point3d& ptE,
|
||||
const Vector3d& vtToolDir, const Vector3d& vtAux) ; // E' in realtà MillingPerp
|
||||
const Vector3d& vtToolDir, const Vector3d& vtAux, int nToolNum) ; // E' in realtà MillingPerp
|
||||
// Asse di simmetria con orientazione generica
|
||||
bool CompCyl_Drilling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir,
|
||||
double dHei, double dRad, bool bTapB, bool bTapT) ;
|
||||
double dHei, double dRad, bool bTapB, bool bTapT, int nToolNum) ;
|
||||
bool CompConus_Drilling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir,
|
||||
double dHei, double dMaxRad, double dMinRad, bool bTapB, bool bTapT,
|
||||
const Vector3d& vtArcNormMaxR = Vector3d( 0, 0, 0), const Vector3d& vtArcNormMinR = Vector3d( 0, 0, 0)) ;
|
||||
const Vector3d& vtArcNormMaxR, const Vector3d& vtArcNormMinR, int nToolNum) ;
|
||||
bool CompPar_Drilling( int nGrid, double dLenX, double dLenY, double dLenZ,
|
||||
const Point3d& ptS, const Point3d& ptE,
|
||||
const Vector3d& vtToolDir, const Vector3d& vtAux) ;
|
||||
const Vector3d& vtToolDir, const Vector3d& vtAux, int nToolNum) ;
|
||||
bool CompCyl_Milling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir,
|
||||
double dHei, double dRad, bool bTapB, bool bTapT) ;
|
||||
double dHei, double dRad, bool bTapB, bool bTapT, int nToolNum) ;
|
||||
bool CompConus_Milling( int nGrid, const Point3d& ptS, const Point3d& ptE, const Vector3d& vtToolDir, double dHei, double dMaxRad, double dMinRad, bool bTapB, bool bTapT,
|
||||
const Vector3d& vtArcNormMaxR = Vector3d( 0, 0, 0), const Vector3d& vtArcNormMinR = Vector3d( 0, 0, 0)) ;
|
||||
const Vector3d& vtArcNormMaxR, const Vector3d& vtArcNormMinR, int nToolNum) ;
|
||||
bool CompPar_Milling( int nGrid, double dLenX, double dLenY, double dLenZ,
|
||||
const Point3d& ptS, const Point3d& ptE,
|
||||
const Vector3d& vtToolDir, const Vector3d& vtAux) ; // E' in realtà MillingPerp
|
||||
const Vector3d& vtToolDir, const Vector3d& vtAux, int nToolNum) ; // E' in realtà MillingPerp
|
||||
// Generica traslazione sfera
|
||||
bool CompBall_Milling( int nGrid, const Point3d& ptS, const Point3d& ptE, double dRad) ;
|
||||
bool CompBall_Milling( int nGrid, const Point3d& ptS, const Point3d& ptE, double dRad, int nToolNum) ;
|
||||
// BBox per utensili e solidi semplici con movimenti di traslazione
|
||||
inline bool TestToolBBox( int nGrid, const Point3d& ptP1, const Point3d& ptP2, const Vector3d& vtV,
|
||||
int& nStI, int& nStJ, int& nEnI, int& nEnJ) ;
|
||||
@@ -444,12 +455,15 @@ class VolZmap : public IVolZmap, public IGeoObjRW
|
||||
mutable std::vector<InterVoxMatter> m_SliceXY ;
|
||||
mutable std::vector<InterVoxMatter> m_SliceXZ ;
|
||||
mutable std::vector<InterVoxMatter> m_SliceYZ ;
|
||||
mutable std::mutex SliceMutex ;
|
||||
mutable std::mutex m_SliceMutex ;
|
||||
|
||||
mutable std::atomic<bool> m_bBreak ;
|
||||
std::atomic<bool> m_bIsBox ;
|
||||
|
||||
Tool m_Tool ;
|
||||
int m_nCurrTool ;
|
||||
std::vector<Tool> m_vTool ;
|
||||
double m_dToolLinTol ;
|
||||
double m_dToolAngTolDeg ;
|
||||
} ;
|
||||
|
||||
|
||||
|
||||
+12
-12
@@ -1224,13 +1224,13 @@ VolZmap::ExtMarchingCubes( int nBlock, VoxelContainer& vVox) const
|
||||
bDefTopology = true ;
|
||||
}
|
||||
if ( GetBlockNFromIJK( nSlBlockIJK, nSlBlockN)) {
|
||||
SliceMutex.lock() ;
|
||||
m_SliceMutex.lock() ;
|
||||
auto it = m_SliceYZ[nSlBlockN].find( nSliceN) ;
|
||||
if ( it != m_SliceYZ[nSlBlockN].end()) {
|
||||
bMatOnSlice = it->second ;
|
||||
bDefTopology = true ;
|
||||
}
|
||||
SliceMutex.unlock() ;
|
||||
m_SliceMutex.unlock() ;
|
||||
}
|
||||
}
|
||||
else if ( abs( nAdjVox3[nCount]) == 2) {
|
||||
@@ -1240,13 +1240,13 @@ VolZmap::ExtMarchingCubes( int nBlock, VoxelContainer& vVox) const
|
||||
bDefTopology = true ;
|
||||
}
|
||||
if ( GetBlockNFromIJK( nSlBlockIJK, nSlBlockN)) {
|
||||
SliceMutex.lock() ;
|
||||
m_SliceMutex.lock() ;
|
||||
auto it = m_SliceXZ[nSlBlockN].find( nSliceN) ;
|
||||
if ( it != m_SliceXZ[nSlBlockN].end()) {
|
||||
bMatOnSlice = it->second ;
|
||||
bDefTopology = true ;
|
||||
}
|
||||
SliceMutex.unlock() ;
|
||||
m_SliceMutex.unlock() ;
|
||||
}
|
||||
}
|
||||
else if ( abs( nAdjVox3[nCount]) == 3) {
|
||||
@@ -1256,13 +1256,13 @@ VolZmap::ExtMarchingCubes( int nBlock, VoxelContainer& vVox) const
|
||||
bDefTopology = true ;
|
||||
}
|
||||
if ( GetBlockNFromIJK( nSlBlockIJK, nSlBlockN)) {
|
||||
SliceMutex.lock() ;
|
||||
m_SliceMutex.lock() ;
|
||||
auto it = m_SliceXY[nSlBlockN].find( nSliceN) ;
|
||||
if ( it != m_SliceXY[nSlBlockN].end()) {
|
||||
bMatOnSlice = it->second ;
|
||||
bDefTopology = true ;
|
||||
}
|
||||
SliceMutex.unlock() ;
|
||||
m_SliceMutex.unlock() ;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1327,27 +1327,27 @@ VolZmap::ExtMarchingCubes( int nBlock, VoxelContainer& vVox) const
|
||||
if ( nSlBlockN == nBlock)
|
||||
SliceYZ.emplace( nSliceN, bMatOnSlice) ;
|
||||
else {
|
||||
SliceMutex.lock() ;
|
||||
m_SliceMutex.lock() ;
|
||||
m_SliceYZ[nSlBlockN].emplace( nSliceN, bMatOnSlice) ;
|
||||
SliceMutex.unlock() ;
|
||||
m_SliceMutex.unlock() ;
|
||||
}
|
||||
}
|
||||
else if ( abs(nAdjVox3[nCount]) == 2) {
|
||||
if ( nSlBlockN == nBlock)
|
||||
SliceXZ.emplace( nSliceN, bMatOnSlice) ;
|
||||
else {
|
||||
SliceMutex.lock() ;
|
||||
m_SliceMutex.lock() ;
|
||||
m_SliceXZ[nSlBlockN].emplace( nSliceN, bMatOnSlice) ;
|
||||
SliceMutex.unlock() ;
|
||||
m_SliceMutex.unlock() ;
|
||||
}
|
||||
}
|
||||
else if ( abs(nAdjVox3[nCount]) == 3) {
|
||||
if ( nSlBlockN == nBlock)
|
||||
SliceXY.emplace(nSliceN, bMatOnSlice) ;
|
||||
else {
|
||||
SliceMutex.lock();
|
||||
m_SliceMutex.lock() ;
|
||||
m_SliceXY[nSlBlockN].emplace( nSliceN, bMatOnSlice) ;
|
||||
SliceMutex.unlock() ;
|
||||
m_SliceMutex.unlock() ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+500
-330
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user