confusing occt 7.4 mesh results with compound

I created a test here on debian buster with occt 7.4 that is confusing me. I think there is a bug when meshing through a compound. The relevant code is below. It consists of 2 tests that create a rectangular wire on the yz plan and then instance that wire along the xaxis twice. 'Test00' runs each wire through 'Incremental_Mesh' and then outputs vertex and polygon3D locations. 'Test01' builds the same topology but then adds the wires to a compound and that compound is run through 'Incremental_Mesh' and outputs locations. Shouldn't the output from these 2 tests be identical? Notice in Test01 the mesh locations x value do not match the topology value. I have attached the complete program and results.

void goTest00()
{
  std::cout << std::endl << "Test00:" << std::endl;
 
  TopoDS_Wire wire00 = buildTestWire();
  TopoDS_Wire wire01 = locateWire(wire00, gp_Vec(10.0, 0.0, 0.0));
  TopoDS_Wire wire02 = locateWire(wire00, gp_Vec(20.0, 0.0, 0.0));
 
  //adding mesh values trying to force a re-mesh.
  IMeshTools_Parameters mprms;
  mprms.Angle = 2.0;
  mprms.Deflection = 0.1;
  BRepMesh_IncrementalMesh(wire00, mprms);
  mprms.Angle = 1.0;
  mprms.Deflection = 0.01;
  BRepMesh_IncrementalMesh(wire01, mprms);
  mprms.Angle = 0.5;
  mprms.Deflection = 0.001;
  BRepMesh_IncrementalMesh(wire02, mprms);
 
  dumpWire(wire00, "wire00");
  dumpWire(wire01, "wire01");
  dumpWire(wire02, "wire02");
}

void goTest01()
{
  std::cout << std::endl << std::endl << std::endl << std::endl << "Test01:" << std::endl;
 
  TopoDS_Wire wire00 = buildTestWire();
  TopoDS_Wire wire01 = locateWire(wire00, gp_Vec(10.0, 0.0, 0.0));
  TopoDS_Wire wire02 = locateWire(wire00, gp_Vec(20.0, 0.0, 0.0));
 
  BRep_Builder builder;
  TopoDS_Compound compound;
  builder.MakeCompound(compound);
  builder.Add(compound, wire00);
  builder.Add(compound, wire01);
  builder.Add(compound, wire02);
 
  IMeshTools_Parameters mprms;
  BRepMesh_IncrementalMesh(compound, mprms);
 
  dumpWire(wire00, "wire00");
  dumpWire(wire01, "wire01");
  dumpWire(wire02, "wire02");
}

Results:

Test00:

wire00 vertex topology locations:
  "gp_XYZ": [0, 0, 0]"gp_XYZ": [0, 10, 0]"gp_XYZ": [0, 10, 10]"gp_XYZ": [0, 0, 10]
wire00 mesh locations:
  "gp_XYZ": [0, 0, 0]"gp_XYZ": [0, 10, 0]"gp_XYZ": [0, 10, 0]"gp_XYZ": [0, 10, 10]"gp_XYZ": [0, 10, 10]"gp_XYZ": [0, 0, 10]"gp_XYZ": [0, 0, 10]"gp_XYZ": [0, 0, 0]

wire01 vertex topology locations:
  "gp_XYZ": [10, 0, 0]"gp_XYZ": [10, 10, 0]"gp_XYZ": [10, 10, 10]"gp_XYZ": [10, 0, 10]
wire01 mesh locations:
  "gp_XYZ": [10, 0, 0]"gp_XYZ": [10, 10, 0]"gp_XYZ": [10, 10, 0]"gp_XYZ": [10, 10, 10]"gp_XYZ": [10, 10, 10]"gp_XYZ": [10, 0, 10]"gp_XYZ": [10, 0, 10]"gp_XYZ": [10, 0, 0]

wire02 vertex topology locations:
  "gp_XYZ": [20, 0, 0]"gp_XYZ": [20, 10, 0]"gp_XYZ": [20, 10, 10]"gp_XYZ": [20, 0, 10]
wire02 mesh locations:
  "gp_XYZ": [20, 0, 0]"gp_XYZ": [20, 10, 0]"gp_XYZ": [20, 10, 0]"gp_XYZ": [20, 10, 10]"gp_XYZ": [20, 10, 10]"gp_XYZ": [20, 0, 10]"gp_XYZ": [20, 0, 10]"gp_XYZ": [20, 0, 0]

Test01:

wire00 vertex topology locations:
  "gp_XYZ": [0, 0, 0]"gp_XYZ": [0, 10, 0]"gp_XYZ": [0, 10, 10]"gp_XYZ": [0, 0, 10]
wire00 mesh locations:
  "gp_XYZ": [20, 0, 0]"gp_XYZ": [20, 10, 0]"gp_XYZ": [20, 10, 0]"gp_XYZ": [20, 10, 10]"gp_XYZ": [20, 10, 10]"gp_XYZ": [20, 0, 10]"gp_XYZ": [20, 0, 10]"gp_XYZ": [20, 0, 0]

wire01 vertex topology locations:
  "gp_XYZ": [10, 0, 0]"gp_XYZ": [10, 10, 0]"gp_XYZ": [10, 10, 10]"gp_XYZ": [10, 0, 10]
wire01 mesh locations:
  "gp_XYZ": [30, 0, 0]"gp_XYZ": [30, 10, 0]"gp_XYZ": [30, 10, 0]"gp_XYZ": [30, 10, 10]"gp_XYZ": [30, 10, 10]"gp_XYZ": [30, 0, 10]"gp_XYZ": [30, 0, 10]"gp_XYZ": [30, 0, 0]

wire02 vertex topology locations:
  "gp_XYZ": [20, 0, 0]"gp_XYZ": [20, 10, 0]"gp_XYZ": [20, 10, 10]"gp_XYZ": [20, 0, 10]
wire02 mesh locations:
  "gp_XYZ": [40, 0, 0]"gp_XYZ": [40, 10, 0]"gp_XYZ": [40, 10, 0]"gp_XYZ": [40, 10, 10]"gp_XYZ": [40, 10, 10]"gp_XYZ": [40, 0, 10]"gp_XYZ": [40, 0, 10]"gp_XYZ": [40, 0, 0]

Program finished normally
 

Attachments: 
Kirill Gavrilov's picture

Probably a bug - I have created an issue:
https://tracker.dev.opencascade.org/view.php?id=31131