Intersect surface with plane

Hi, I'am finding a function that intersect a set of surfaces with a plane. The surfaces to be intersect could be trimmed or untrimmed.
The result of course are the intersection curves between plane and surfaces.
On the documentation of Open Cascade I found 3 functions that could make this operation:

BRepAlgoAPI_Section (const TopoDS_Shape &S1, const TopoDS_Shape &S2, const Standard_Boolean PerformNow=Standard_True)

GeomAPI_IntSS (const Handle< Geom_Surface > &S1, const Handle< Geom_Surface > &S2, const Standard_Real Tol)

IntTools_FaceFace::Perform (const TopoDS_Face &F1, const TopoDS_Face &F2)

If I understand the documentation the GeomAPI_IntSS and IntTools_FaceFace with trimmed surfaces are not good.

Which is the best function to use?

 

Francois Lauzon's picture

you should use BRepAlgoAPI_Section.
Good luck, François

Francois Lauzon's picture

you should use BRepAlgoAPI_Section.
Good luck, François

Gabriele Cuccolini's picture

Hi Francois, thank you very much for your quick answer.

In fact I check just now that with GeomAPI_IntSS or IntTools_FaceFace in case of a trimmed surface I will obtain the intersection curves with the base surface of the trim and not the real intersections that I want.

With BRepAlgoAPI_Section function the results seems OK.

bye gabriele