[TechDraw] Fix bug in DrawUtil::isZeroEdge

Bug originating from b7a655f804fa11d3ec8d8a1ce2b36c75dbe48c2f
This commit is contained in:
Benjamin Bræstrup Sayoc
2022-09-07 15:14:39 +02:00
committed by WandererFan
parent ac0a8b6458
commit a1b8686627

View File

@@ -156,15 +156,18 @@ bool DrawUtil::isZeroEdge(TopoDS_Edge e, double tolerance)
{
TopoDS_Vertex vStart = TopExp::FirstVertex(e);
TopoDS_Vertex vEnd = TopExp::LastVertex(e);
if (isSamePoint(vStart, vEnd, tolerance)) {
//closed edge will have same V's but non-zero length
BRepAdaptor_Curve adapt(e);
double len = GCPnts_AbscissaPoint::Length(adapt, Precision::Confusion());
if (len > tolerance) {
return false;
}
if (!isSamePoint(vStart, vEnd, tolerance)) {
return false;
}
return false;
//closed edge will have same V's but non-zero length
BRepAdaptor_Curve adapt(e);
double len = GCPnts_AbscissaPoint::Length(adapt, Precision::Confusion());
if (len > tolerance) {
return false;
}
return true;
}
double DrawUtil::simpleMinDist(TopoDS_Shape s1, TopoDS_Shape s2)
{