Rendering a set of faces

Everything DG Kernel: Technical discussions and issues
Post Reply
Frank
Posts: 1
Joined: Mon Jul 08, 2024 3:49 am

Rendering a set of faces

Post 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
Prashant Kande
Posts: 65
Joined: Tue Jun 18, 2024 6:12 am

Re: Rendering a set of faces

Post 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>());
Post Reply