From ac2f2dc20ee66da4df6b381819f6c202ad356438 Mon Sep 17 00:00:00 2001 From: jrheinlaender Date: Mon, 5 Nov 2012 20:36:59 +0430 Subject: [PATCH] Fixed bug where sketch support face was used for distance measuring instead of sketch face itself (doesn't resolve problem of false positives, though) --- src/Mod/PartDesign/App/FeatureSketchBased.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Mod/PartDesign/App/FeatureSketchBased.cpp b/src/Mod/PartDesign/App/FeatureSketchBased.cpp index a3e354d8c..ce96157de 100644 --- a/src/Mod/PartDesign/App/FeatureSketchBased.cpp +++ b/src/Mod/PartDesign/App/FeatureSketchBased.cpp @@ -452,7 +452,7 @@ void SketchBased::getUpToFace(TopoDS_Face& upToFace, } // Check that the upToFace does not intersect the sketch face and - // is not parallel to the extrusion direction + // is not parallel to the extrusion direction (for simplicity, supportface is used instead of sketchshape) BRepAdaptor_Surface adapt1(TopoDS::Face(supportface)); BRepAdaptor_Surface adapt2(TopoDS::Face(upToFace)); @@ -461,7 +461,9 @@ void SketchBased::getUpToFace(TopoDS_Face& upToFace, throw Base::Exception("SketchBased: Up to face: Must not be parallel to extrusion direction!"); } - BRepExtrema_DistShapeShape distSS(supportface, upToFace); + // We must measure from sketchshape, not supportface, here + // TODO: distSS() sometimes gives false positives for unlimited upToFaces! + BRepExtrema_DistShapeShape distSS(sketchshape, upToFace); if (distSS.Value() < Precision::Confusion()) throw Base::Exception("SketchBased: Up to face: Must not intersect sketch!");