Commit 22cfda67 authored by wmayer's avatar wmayer
Browse files

Fix bug in check for intersection of axis with sketch

parent bd5359f5
......@@ -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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment