DiscussionsIssue archiveOther usage issues

Archived discussion

Bug in ShapeAnalysis_Edge ?

Other usage issuesWed, 06/23/2010 - 16:561 reply

Browse this forum
QuestionAuthor

Hello everybody,
I think I have found a bug in ShapeAnalysis_Edge class but I want to know you opinion.
In ShapeAnalysis_Edge.cxx file, you have a function named CheckVertexTolerance that normally check tolerance of TopoDS_Vertex with curve extremtiy.
The problem is that when the distance is computed (ln 601), the SuqareDistance is used :
toler1 = pnt1.SquareDistance (c3d->Value (a));
toler2 = pnt2.SquareDistance (c3d->Value (b));
I just want to know if a simple Distance is not used here ? For exemple in BRepLib_MakeEdge::Init function, a simple Distance is computed between TopoDS_Vertex and curve extremity (to verify BRepLib_DifferentPointsOnClosedCurve).

Thanks by advance for your help.

Regards

Discussion

1 archived reply

Posts are displayed in their archived order.

01Commenter-1

There is no bug here: SquareDistance() is used instead of Distance() as it is assumed to be faster; anyway Sqrt() is used at the end.