Forum archiveIssue archiveOther usage issues

Archived discussion

BRepAlgoAPI_Fuse

Other usage issuesFri, 11/05/2010 - 22:533 replies

Browse this forum
QuestionAuthor

is it possible to make a 1 face from 2 faces fused!!
***code******
BRepAlgoAPI_Fuse Fused_face(F1,F2);
if(Fused_face.IsDone())
{
TopoDS_Shape aResult = Fused_face.Shape();
TopoDS_Face aFace=TopoDS::Face (aResult);///this is't possible?
Handle(AIS_Shape) ashape=new AIS_Shape(aFace);
myAISContext->Display(ashape,Standard_False);
}
********
///compling 0 error(s), 0 warning(s)
but error on displying (interrupt)!!!!!!!!!!
Does anybody have any idea?

Discussion

3 archived replies

Posts are displayed in their archived order.

01Commenter-1

I am not sure if OCC has an algorithm for it, but I implemented something like it. The general idea is to take the resulting Faces from the Fuse operation, then create a new Face using all non-shared Edges. For it to work the Faces must be connected (share Edges), otherwise you will end up trying to create a faulty Shape. Remember to handle holes as well.

The cast that you are trying to do will not work because the result of Fuse will most likely be a Shell or Compound.

Remember to play on the safe side by checking the surfaces are continuous where they connect (shared Edges). In case of planar Faces, it would be equivalent to checking the Faces are coplanar.

02Author

Thanks Commenter-1 for replay
if you can more explain by any exemple...
in my case the faces are 2 Bsplinesurfaces.
and you are right the result of fuse operation (by using BRepAlgoAPI_Fuse) is acompound surfaces(i think that is not possible to remove the edge between the 2 faces fused by use BRepAlgoAPI_Fuse !!).so how to resolve this kind of problems..

best regards

03Commenter-1

I cannot help you further. I have no experience dealing with surfaces other than planar in OCC.

Thing is: if removing the shared Edges would break the shape, you may actually need to keep them like separate Faces.