Generate a Skin surface from a solid part

We wish to generate the skin surface from a sheet metal part with thickness, the thickness is known and can be input as a parameter, how can I get the skin surface in opencascade?

We try to do that as follow: erase the surface in the thickness then the part become to two layer (upper and down), then use the distance command to get the minimum distance of each surface, if the distance is Zero, then such two surface is connected, do that one by one. The problem is it is very very slow. If the surface more than 200, it cost more than 10 mintus.

Can who provide any good idea?

Zges

Sharjith Naramparambath's picture

Hi,
I sheet metal applications where you have to get the skin (generally refered as master surface) in interactive applications, the user is asked to select the face desired. If your application is interactive you can use this approach:-

First let user select the whole part
Then switch to a local context in TopoDS_FACE mode
Then ask user to select the required face.
Any one face from the master side selected face will give you an entry point to explore the topological data structure.
Next you can use your approach to eliminate the thickness surface.
Now you have a face which is from the group of surfaces from the master side.
Here you can iterate over all surfaces which have connectivity to the selected face and its adjacent surfaces. Instead of using the distance method use the connectivity method.

Hope this helps.

Regards
N. Sharjith

zgesi's picture

Dear N. Sharjith,

Thank your advise.
However, could you give some more detail on your idea 'Any one face from the master side selected face will give you an entry point to explore the topological data structure' and 'Now you have a face which is from the group of surfaces from the master side'? I believe it should be very useful to me.
Thanks!

Zges

Sharjith Naramparambath's picture

When you eliminate the thickness surface, you have two group of topological shells - one the skin and other the offset of the skin at the distance equal to thickness. When the user selects the skin he wants to retain, he will be actually selecting one of the TopoDS_FACE from the skin shell in a local context. (See the AIS_Select MFC Example where the edge of box can be selected in local context). Your algorithm should be such that taking the original part and the selected TopoDS_FACE, after eliminating the thickness surface from the data structure, start from the selected TopoDS_FACE and go on finding the next connected patch and so on.

You will have to do some R&D.

Regards
N. Sharjith