
Sat, 06/22/2019 - 01:59
Hello,
I have a propriertary 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:
NCollection_Sequence<TopoDS_Face> myFaces;
As I need a Handle for each of these faces I would like to put them together in a single Interactive_Object, which I can display but WITHOUT any algorithms running over it.
Thanks in advance and kindest regards
Mon, 06/24/2019 - 14:24
You can create TopoDS_Compound from your NCollection_Sequence<TopoDS_Face> (e.g. using BRep_Builder) and display it.
Mon, 06/24/2019 - 16:37
Thank you for your help - I tried this in the same manner with BRep_Builder to create a TopoDS_Shell - however this always encounters a segmentation fault. I think I'm doing something wrong there..
Following is the code I tried with your solution but it encounters a segmentation fault as well:
Am I using the builder incorrectly ? Would appreciate your help.
Mon, 06/24/2019 - 16:46
I can imagine this to crash only in case if some of TopoDS_Face in your sequence are NULL.
Mon, 06/24/2019 - 16:57
Oh wow!!! Thank you very much. This works like a charm.
Checked if the current face is NULL and skipped it if true.
Now the creation of the shape only takes 2ms instead of almost 6seconds. And it looks exactly the way I wanted it.
Thank you again!!
Mon, 06/24/2019 - 18:47
Sewing is a shape healing operation, which is expectedly consumes time, because it has to compare all faces in your sequence.
In case if your input geometry is really connected, then the proper solution is connected Edges of Faces at construction time.