Remove seams after Fuse

Hi,

after some trial and error, I found a way to have BrepAlgoAPI_Fuse to behave like good old BrepAlgo_Fuse
method, so joining all faces after fusion as normally expected.
It's enough, after fusion, to reprocess the resulting solid like this :

BRepAlgoAPI_Fuse fuser(s1, s2);
TopoDS_Shape fused = fuser.Shape();
ShapeUpgrade_UnifySameDomain unif(fused, false, true, false);
unif.Build();
TopoDS_Shape fixed = unif.Shape();

in 'fixed' you'll find the fused soids with all faces lying on same surfaces joined as expected
and with all unneeded edges removed.
Tested with complex solids and works quite well; the new api is quite more stable than older one
and, with this fix, it behaves as expected.

Ciao

Max

Mauro Mariotti's picture

Thank you, Max.

ShapeUpgrade_UnifySameDomain is very interesting (we called it face simplification in my old company), but I cannot find it in my OCC 6.5.3.

Is it in some extra package?

Mauro

Massimo Del Fedele's picture

Hi Mauro,

I've 6.5.4 and it's there, just added

#include

Maybe it's a recent addition... I don't know.

Mauro Mariotti's picture

Dear Forum Supervisor,

ShapeUpgrade_UnifySameDomain is not mentioned in http://www.opencascade.com/pub/doc/Release_Notes_6.5.4.pdf.

Is is in some special package?

Thanks and happy 2013.

Mauro

Pawel's picture

Hi Mauro,

the 'ShapeUpgrade_UnifySameDomain' files were added in course of the integration of the feature:

0023367: New functionality restoring the middle path of pipe-like shape

I agree, this functionality is very interesting and some documentation on that could be very useful ;)

Pawel

Forum supervisor's picture

Dear Mauro,
The specified class is a new one and unfortunately it is still is not documented.
Consider it as a documentation bug (you are welcome to register it in Mantis BugTracker).
In short:
"ShapeUpgrade_UnifySameDomain class
rebuilds the input shape according to the values of flags: , , . If and are set to "TRUE", first the same domain faces are unified, then the same domain edges are unified. If is set to "TRUE", a chain of edges based on BSpline curves and connecting the same couple of faces is being unified into one edge.

The class supports a history approach, i.e. it allows to extract new-built sub-shapes from the old ones."

Massimo Del Fedele's picture

Hi,

I could add a note :

if you cut a cone (or something with a closed curve as a base edge, I guess) and then refuse with the new api,
if you use UnifySameDomain with UnifyFaces ALONE it works as expected, restoring original cone;
if you use UnifyEdges flag too, it builds an INVALID solid, I guess it has something to do with
removing the needed seam closing the lateral surface, but not so sure.

So, for best results, I do
ShapeUpgrade_UnifySameDomain(shape, false, true, false)
and NOT
ShapeUpgrade_UnifySameDomain(shape, true, true, false)

Max

jelle's picture

Very useful comment Massimo, many thanks...