Merging 2 Wires

Hi folks,

I'm testing a trivial case, where I want to merge 2 adjacent 2D polygons.

TopTools_ListOfShape arguments;
arguments.Append(BRepBuilderAPI_MakePolygon(gp_Pnt(0, 0, 0), gp_Pnt(1, 0, 0), gp_Pnt(1, 1, 0), gp_Pnt(0, 1, 0), true));

TopTools_ListOfShape tools;
tools.Append(BRepBuilderAPI_MakePolygon(gp_Pnt(0, 1, 0), gp_Pnt(1, 1, 0), gp_Pnt(1, 2, 0), gp_Pnt(0, 2, 0), true));

BRepAlgoAPI_Fuse opbool;
opbool.SetArguments(arguments);
opbool.SetTools(tools);
opbool.Build();
opbool.SimplifyResult();
auto aResult = opbool.Shape();

At the end, "aResult" contains 2 Wires that share a common edge, but I was expecting a single Wire without the common edge ...

Any advice ?

Tks ;-)

BADI Hamid's picture

Got it : If I promote input wires to faces, merging is done as expected.