Convert triangular mesh to BRep

Hi,

I am new to OpenCascade. I would like to know whether OCC provides any function to convert triangular mesh to Boundary representation object? If so how can I do it?

Thanks

Qr Qr's picture

Hello Rakesh,

What exactly do you want to achieve? Is it Ok to have a single B-Rep face for each individual triangle? Otherwise, the problem is extremely difficult to solve, and there is no open source solution for that on the earth (afaik).

Kind regards.

Rakesh Patil's picture

Hi,

Thanks for quick reply. Consider I have a cuboid with all its faces being triangulated. The final output I need is to have only 6 faces of cuboid without triangles. This is just an example. Similar thing should happen with cylinder or sphere. Is it possible to do that?

Thank you

qa qa's picture

Hi,

Unfortunately, such reconstruction is extremely difficult. Qr Qr is right. OCCT does not provide such a functionality.

qa qa

Rakesh Patil's picture

Hi,

Thanks. Then I have another question, which I will start as a new thread. Thanks again.

Rakesh Patil's picture

Hi,

Just for curiosity, will the piece of code mentioned here https://www.opencascade.com/content/extracting-boundary-topodsshape help me to solve my problem?

Thanks

qa qa's picture

No, resulting TopoDS_Shape will contain all triangles.

qaqa