Face boundary

I have a trimmed surface that I have read from an IGES file. I need to extract the boundaries of this face. I tried with the TopExp_Explorer looking for TopAbs_EDGE. It actually works but it gives a large amount of very short edges instead of 4 edges that I can see importing the original IGES file in different CAD system.

Thank you
Gianni

Marco Matt's picture

I found the same issue in some IGES file.
It seems to me that it depend on how the surface is built in the original CAD.
I think I will develop an algorithm to join "short edge".
Would you like to exchange opinion (may be in italian)?
Feel free to write me marco at benuzzi dot net.

Davide Canalia's picture

A solution could be rebuild the surface using a new wire.

The wire can be built using:
BRepAdaptor_CompCurve
Handle_BRepAdaptor_HCompCurve
BRepAdaptor_HCompCurve
Approx_Curve3d

when you have the new wire you can build the new surface using the face previous surface and the new trimming curve defined by the wire.

However the "quality" it's linked to the tollerance used to rebuild the wire's curve.

gianni's picture

Thanik you Davide, I will try this solution. Even though it should be interesting to understand why the boundary of a very simple surface trimmed by 4 lines is splitted in more than 100 pieces.

gianni