Page 1 of 1

Rendering a set of faces

Posted: Mon Jul 08, 2024 3:55 am
by Frank
Hello,

I have a proprietary file format which stores a 3D object by its faces. Every face is its own section in the file and contains the edges displayed by the coordinates of its points which will construct the faces. I was able to extract all the vertices from the file, create the edges, wires and faces.

If I 'sew' the faces together I get a perfect object. As the objects are quite large this is horribly slow.
For my project I don't need a single 'sewed' object. I just want to display all the shapes I have created.

Is there a possibility to display a sequence of faces? My faces are all stored in:

List<IBRepFace_DG> faces; (C#)

I need a reference for each of these faces I would like to put them together in a single entity, which I can display but without any algorithms running over it.

Thanks

Re: Rendering a set of faces

Posted: Tue Jul 09, 2024 2:23 am
by Prashant Kande
Hi Frank

You could use IModel_DG.AddBRepShape() with querying IBRepShape_DG from each face.

A more efficient way would be using a compound

Code: Select all

IObjectGenerator_DG gen = iModel.Query<IObjectGenerator_DG>();
IBRepCompound_DG comp = gen.Create<IBRepCompound_DG>();
// for each face
comp.AddShape(face.As<IBRepShape_DG>());
iModel.AddBRepShape(comp.As<IBRepShape_DG>());