Determine a surface is inside another surface?

Hi Everybody!

i'm using OCC 5.2 and my problem is how to determine a surface is inside another surface? i tried Brep_Feat::IsInside() function but it only worked with two planar surfaces. Could someone help me to solve this problem?

LI's picture

I suppose that you have face0 and face1.You'd like to test if face0 is in face1. You can do this in the following steps:

1.Get the Geom2d_Curve of the edges of face0
Handle(Geom2d_Curve) aC2D = BRep_Tool::CurveOnSurface(edge,face0,aFirst,aLast);
2. Get the same edges in face1:
Handle(Geom_Surface) gsrf1=BRep_Tool::Surface(face1);
TopoDS_Edge edge1=BRepBuilderAPI_MakeEdge(aC2D,gsrf1,aC2D->FirstParameter(),aC2D->LastParameter());
BRepLib::BuildCurve3d(edge1);
3.If succeeded, test edge and edge1 are identical or not.
4. think it over yourself ... Millons of methods

ngoctn's picture

Yeah. Thank you very much - LI. I'll test your method. BR

LI's picture

The method that I proposed last time works only when face0 is a part of face1 and their geometric surface is the same.