Merge commit '7a62031eb4d7aed732c4c52b676533f831dfb197'

This commit is contained in:
Dario Sassi
2025-07-11 16:21:19 +02:00
2 changed files with 8 additions and 5 deletions
+7 -4
View File
@@ -1491,7 +1491,7 @@ SurfRoughing::ProcessPath( int nPathId, int nPvId, int nClId)
// costruisco una superficie di estrusione della curva (devo determinare parte della regione limite)
Vector3d vtLimitExtr = - vtTool * 1.5 * max( b3Raw.GetDimX(), max( b3Raw.GetDimY(), b3Raw.GetDimZ())) ;
PtrOwner<ISurfTriMesh> pStmLimit( GetStmOutSideSfr( pSfrSgro, pStmRaw, vtLimitExtr)) ;
PtrOwner<ISurfTriMesh> pStmLimit( GetStmOutSideSfr( pSfrSgro, dDepth, pStmRaw, vtLimitExtr)) ;
if ( IsNull( pStmLimit))
return false ;
@@ -2095,7 +2095,7 @@ SurfRoughing::GetRaw( void) const
//----------------------------------------------------------------------------
ISurfTriMesh*
SurfRoughing::GetStmOutSideSfr( const ISurfFlatRegion* pSfr, const ISurfTriMesh* pStmRaw, const Vector3d& vtExtr) const
SurfRoughing::GetStmOutSideSfr( const ISurfFlatRegion* pSfr, double dDepth, const ISurfTriMesh* pStmRaw, const Vector3d& vtExtr) const
{
// controllo dei parametri
if ( pSfr == nullptr || ! pSfr->IsValid() ||
@@ -2134,7 +2134,10 @@ SurfRoughing::GetStmOutSideSfr( const ISurfFlatRegion* pSfr, const ISurfTriMesh*
// box della superficie piana
BBox3d BBoxSfr ;
bOk = bOk && pSfrOffs->GetLocalBBox( BBoxSfr) ;
BBoxSfr.Expand( 0., 0., vtExtr.Len()) ;
double dExtraX = abs( dDepth * ( pSfrOffs->GetNormVersor() * X_AX)) ;
double dExtraY = abs( dDepth * ( pSfrOffs->GetNormVersor() * Y_AX)) ;
double dExtraZ = abs( dDepth * ( pSfrOffs->GetNormVersor() * Z_AX)) ;
BBoxSfr.Expand( dExtraX, dExtraY, dExtraZ) ;
// scorro le parts
for ( int nPart = 0 ; nPart < pStmLimit->GetPartCount() && bOk ; ++ nPart) {
// calcolo il box della part corrente
@@ -2142,7 +2145,7 @@ SurfRoughing::GetStmOutSideSfr( const ISurfFlatRegion* pSfr, const ISurfTriMesh*
bOk = bOk && pStmLimit->GetPartLocalBBox( nPart, BBoxPart) ;
// se non c'è intersezione con i Box, elimino la parte corrente
BBox3d BBoxInt ;
if ( BBoxSfr.FindIntersection( BBoxPart, BBoxInt)) {
if ( ! BBoxSfr.FindIntersection( BBoxPart, BBoxInt)) {
bOk = pStmLimit->RemovePart( nPart) ;
-- nPart ;
}
+1 -1
View File
@@ -130,7 +130,7 @@ class SurfRoughing : public Machining
bool AddLeadOut( const Point3d& ptEnd, const Vector3d& vtEnd, const Vector3d& vtN,
const ICurveComposite* pRCrv, bool bSplitArcs, bool bNoneForced, Point3d& ptP1) ;
ISurfTriMesh* GetRaw( void) const ;
ISurfTriMesh* GetStmOutSideSfr( const ISurfFlatRegion* pSfr, const ISurfTriMesh* pStmRaw, const Vector3d& vtExtr) const ;
ISurfTriMesh* GetStmOutSideSfr( const ISurfFlatRegion* pSfr, double dDepth, const ISurfTriMesh* pStmRaw, const Vector3d& vtExtr) const ;
ISurfFlatRegion* GetSfrByStmIntersection( const IntersParPlanesSurfTm& IPPStm, double dDist, double dSmallOffs = 0) const ;
ISurfFlatRegion* GetSfrSilhouette( ICAvParSilhouettesSurfTm* pCavParSilh, double dDepth, double Sil_tol, bool& bOk) const ;
bool GetActiveSurfaces( INTVECTOR& vSurfId, INTVECTOR& vSurfSuppId) const ;