Hii I want to find the selected face is part of solid body or hollow body.But in the given model i have only single brep .
Yes @jeremy5 I have tried to get subbreps from getConnectedComponents() but that is showing null to this model. Is there any other approch to do that.
Create a mesh of your solid brep (for performance).
Then, for each surface you want to filter from solid/hollow, evaluate some random points, get also the normal. For each point+normal, move away the point a bit from the surface and then create a line (point + normal). Intersect the semi-infinite line with the mesh. If the collision events are even, the surface is a hollow one.
Note that this might often fails, you need to make up some logic that you find suitable.
A thorus is a single surface but is solid and hollow at the same time…
First of all, I think there is a definition problem with the terms “solid” and “hollow”. In Rhino, a closed BRep is considered “solid”, and “hollow” is not typically used as terminology (because if you intersect a Rhino solid with a plane you will get the outline curves, i.e. the solid object is always hollow). You can distinguish between solid/closed and non-solid/open, that is, a Brep having zero or non-zero naked edges.
So the example with the torus is IMHO not helpful: a torus is closed, therefore considered solid in Rhino.
I agree with @menno that “hollow” should be replaced by “open” and my guess is that is what @Supriya means.
The only way I see one could test if that particular face is part of a solid or non-solid body is to try to join it with its neighbor Breps/Surfaces and then check Brep.IsSolid for the joined Brep. Now, what and how you decide to join, that depends on the further details of your project…