From 22cfda67defb281ccc707ed5c0b9e56584ec4982 Mon Sep 17 00:00:00 2001 From: wmayer Date: Tue, 11 Dec 2012 20:06:56 +0100 Subject: [PATCH] Fix bug in check for intersection of axis with sketch --- src/Mod/PartDesign/App/FeatureSketchBased.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Mod/PartDesign/App/FeatureSketchBased.cpp b/src/Mod/PartDesign/App/FeatureSketchBased.cpp index 4ccd562d9..9b01368fb 100644 --- a/src/Mod/PartDesign/App/FeatureSketchBased.cpp +++ b/src/Mod/PartDesign/App/FeatureSketchBased.cpp @@ -561,11 +561,15 @@ const bool SketchBased::checkLineCrossesFace(const gp_Lin &line, const TopoDS_Fa TopoDS_Wire wire = ShapeAnalysis::OuterWire(face); BRepExtrema_DistShapeShape distss(wire, mkEdge.Shape(), Precision::Confusion()); if (distss.IsDone()) { + if (distss.Value() > Precision::Confusion()) + return false; // build up map vertex->edge TopTools_IndexedDataMapOfShapeListOfShape vertex2Edge; TopExp::MapShapesAndAncestors(wire, TopAbs_VERTEX, TopAbs_EDGE, vertex2Edge); for (Standard_Integer i=1; i<= distss.NbSolution(); i++) { + if (distss.PointOnShape1(i).Distance(distss.PointOnShape2(i)) > Precision::Confusion()) + continue; BRepExtrema_SupportType type = distss.SupportTypeShape1(i); if (type == BRepExtrema_IsOnEdge) { //This further check is not really needed