How to get other data than simple shapes from brep (extrusion e.g.)

Hi everyone,

I am trying to use OCCs (own?) BRep Format for data exchange. I found that when I store (for example) an extrusion made with "Geom_SurfaceOfLinearExtrusion", it is stored in a BRep file as extrusion (not like when I do it with makePrism but thats not the point). 

My question now is, how do I recover that extrusion from this BRep file when I load (read) it? I am using "BRepTools::Read" to get a TopoDS_Shape from the file but I am only able to access the shapes, how do I get the extrusion?

I am using the C# wrapper, if that's of interest.

Thanks for any help,

Luz

Forum supervisor's picture

Hello Luzius,

In Open CASCADE Technology, Geom_SurfaceOfLinearExtrusion is a type of geometrical surface.

Since BRep format is a native format of Open CASCADE Technology the types of objects are not modified when a shape model is storing to or retrieved from this format.

So, if originally a surface in your prism object was Geom_SurfaceOfLinearExtrusion it will remain this type after storing and retrieving.

You just need to extract this surface from your shape object using the dedicated API.

If you wish to learn more about working with BRep data we may recommend you our training courses.

Please, contact us for further information and pricing.

Best regards,

Forum supervisor

luzius.koelling_152465's picture

Hello,

thank you I found it. For anyone looking for the same: With BRep_Tool you can get the Geom_Surface of a Face and extract the type as well with all included data.

Cheers, Luz