From 80850e176d60ea046b0e275a0fe3fe70df8c42dd Mon Sep 17 00:00:00 2001 From: "Zheng, Lei" Date: Fri, 10 Mar 2017 17:55:04 +0800 Subject: [PATCH] Path.Area: improved section plane tolerance issue --- src/Mod/Path/App/Area.cpp | 41 +++++++++++++++++++---------------- src/Mod/Path/App/Area.h | 5 +++-- src/Mod/Path/App/AreaParams.h | 4 ++-- 3 files changed, 27 insertions(+), 23 deletions(-) diff --git a/src/Mod/Path/App/Area.cpp b/src/Mod/Path/App/Area.cpp index 5017d8aed5..9f8c74f82a 100644 --- a/src/Mod/Path/App/Area.cpp +++ b/src/Mod/Path/App/Area.cpp @@ -557,6 +557,8 @@ std::vector > Area::makeSections( bounds.SetGap(0.0); Standard_Real xMin, yMin, zMin, xMax, yMax, zMax; bounds.Get(xMin, yMin, zMin, xMax, yMax, zMax); + AREA_TRACE("section bounds X("< heights; if(_heights.empty()) { @@ -587,31 +589,32 @@ std::vector > Area::makeSections( z = zMax; else if(z < zMin) z = zMin; - double dz; - if(myParams.Stepdown>0.0) + double dz,tolerance; + if(myParams.Stepdown>0.0) { dz = z - zMin; - else + tolerance = myParams.SectionTolerance; + }else{ dz = zMax - z; - + tolerance = -myParams.SectionTolerance; + } int count = myParams.SectionCount; if(count<0 || count*d > dz) count = floor(dz/d)+1; heights.reserve(count); for(int i=0;i0.0) { - if(z-zMin0.0) break; }else if(zMax-z > Area::makeSections( if(hitMin) continue; hitMin = true; double zNew = zMin+myParams.SectionTolerance; - AREA_TRACE("hit bottom " <