From 1c157f323ed8d1fcac85345be372befa663cbcd5 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Thu, 16 May 2024 12:48:37 +0200 Subject: [PATCH] EgtGeomKernel : - correzione in GetSurfTriMeshRectSwept suggerita da Riccardo - aumentato step angolare del virtual milling 5assi. --- StmFromCurves.cpp | 13 ++++++++----- VolZmapVolume.cpp | 2 +- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/StmFromCurves.cpp b/StmFromCurves.cpp index 2d6d14e..2284574 100644 --- a/StmFromCurves.cpp +++ b/StmFromCurves.cpp @@ -330,9 +330,11 @@ GetSurfTriMeshSharpRectSwept( double dDimH, double dDimV, const ICurve* pGuide, { // verifico che la linea guida sia piana Plane3d plGuide ; - if ( ! pGuide->IsFlat( plGuide, false, 10 * EPS_SMALL)) + if ( ! pGuide->IsFlat( plGuide, true, 10 * EPS_SMALL)) return nullptr ; - Vector3d vtNorm = plGuide.GetVersN() ; + Vector3d vtNorm ; pGuide->GetExtrusion( vtNorm) ; + if ( vtNorm.IsSmall()) + vtNorm = Z_AX ; // determino se la guida รจ chiusa bool bGuideClosed = pGuide->IsClosed() ; // curve di offset @@ -509,10 +511,11 @@ GetSurfTriMeshBeveledRectSwept( double dDimH, double dDimV, double dBevelH, doub // verifico che la linea guida sia piana Plane3d plGuide ; - if ( ! pGuide->IsFlat( plGuide, false, 10 * EPS_SMALL)) + if ( ! pGuide->IsFlat( plGuide, true, 10 * EPS_SMALL)) return nullptr ; - // assegno la normale del piano - Vector3d vtNorm = plGuide.GetVersN() ; + Vector3d vtNorm ; pGuide->GetExtrusion( vtNorm) ; + if ( vtNorm.IsSmall()) + vtNorm = Z_AX ; // determino il punto centrale della sezione Point3d ptCen ; pGuide->GetStartPoint( ptCen) ; diff --git a/VolZmapVolume.cpp b/VolZmapVolume.cpp index 03f5561..e830143 100644 --- a/VolZmapVolume.cpp +++ b/VolZmapVolume.cpp @@ -679,7 +679,7 @@ VolZmap::MillingGeneralMotionStep( const Point3d& ptPs, const Vector3d& vtDs, co const Point3d& ptPe, const Vector3d& vtDe, const Vector3d& vtAe) { // Divido il movimento in tratti con direzione utensile costante - const double ANG_STEP = 0.02 ; + const double ANG_STEP = 0.04 ; double dAngDeg ; vtDs.GetAngle( vtDe, dAngDeg) ; int nStepCnt = int( abs( dAngDeg) / ANG_STEP) + 1 ; bool bOk = true ;