Vertex Tolerance

I have a big problem

I intersect a TopoDS_Face with a Plane. I use BRepAlgo_Section for it.

after the build, i have 2 edges.

The second has a problem.
The length of the edge is 11.01
The tolerance of the edge is: 0.0000001
The tolerance of the FirstVertex and LastVertex is 15.07

If i want a gp_Pnt I use:
gp_Pnt P1 = BRep_Tool::Pnt(FirstVertex);
gp_Pnt P2 = BRep_Tool::Pnt(LastVertex);

P1 and P2 have the same coord.

I want change the Vertex tolerance:
BRepBuilder myBuilder;
myBuilder.UpdateVertex(FirstVertex, 0.2);
myBuilder.UpdateVertex(LastVertex, 0.2);
If i ask the vertices tolerance, i so have 15.07.

I change my methode, and i use:
ShapeFix_ShapeTolerance FTol;
FTol.SetTolerance(myEdge, 0.2, TopAbs_VERTEX);
If i ask the vertices tolerance, i have 0.2 OK

But if i compute the gp_Pnt, I so have the same coord.

The edge is not closed.

What is the problem?
Is it possible?

Evgeny Lodyzhehsky's picture

Hi!
Could you be more precise.
In order to help you with your big problem I need to have your arguments.
Please write your TopoDS_Face and Plane to the files and send
them to me.
bop603(at)yandex.ru (use @ instead of (at)).

Regards.
Evgeny.

Bearloga's picture

Probably your input face has big tolerance of some edge, and that tolerance covers the space to some opposite edge. It results to that in the section line there is some edge that goes through that space. But because the tolerance covers all the length of the section edge, the vertices of it are merged by intersection algorithm. You can check it, FirstVertex.IsSame(LastVertex) is true, doesn't it?
If you want to get the ends of the edge's curve you should use BRepAdaptor_Curve and get its end points.

akta3d's picture

Thanks,

I have check tolerance of my TopoDS_Face with ShapeAnalysis_ShapeTolerance

and the max tolerance is 15.07, the tolerance of my vertices.
Now, I understand, why I have this tolerance.

The probleme is that, i can't modify this TopoDS_Face, because it's a Face of an IGES Import.

Thanks