Fri, 12/28/2012 - 23:24
Forums:
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
Fri, 12/28/2012 - 23:35
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
Fri, 12/28/2012 - 23:57
Hi Mauro,
I've 6.5.4 and it's there, just added
#include
Maybe it's a recent addition... I don't know.
Mon, 12/31/2012 - 15:53
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
Thu, 01/03/2013 - 23:11
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
Wed, 01/09/2013 - 17:16
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."
Wed, 01/09/2013 - 17:28
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
Thu, 01/17/2013 - 01:04
Very useful comment Massimo, many thanks...