Replace a face without using BRepTools_ReShape

I have a case where BRepTools_ReShape does not work properly. In my code, I'm identifying a set of common faces, edges and vertices between two solids, add them with the Replace method to a reshaper object, and then Apply the changes. Unfortunately, in some cases certain faces are not replaced at all in the object of the Apply method -- even if the two faces contain the same edges and vertices (same = same BRep objects, not two objects that happen to be in the same place). This may be a bug in BRepTools_ReShape, but I'm not entirely sure.

So, I'd like to write some code to replace these faces that are skipped over by ReShape. Is it possible to do this without using BRrepTools_ReShape?

Thanks.

Paul Jimenez's picture

Sure, just use BRep_Builder's methods Remove and Add to implement the replacing.

Tiberiu Chelcea's picture

Thanks for the tip -- I'll look into it.