OCC 6.5.2 TNaming bug

Hello,

I wrote a small program (see attachement) to exhibit a TNaming bug in OCC 6.5.2. Consider the following: build 3 boxes, fuse them and select (with TNaming_Selector) all result's faces. Call TNaming_Selector::Solve to update the selection and inspect the result (selected faces). The problem is that the TNaming_Selector::NamedShape returns, after calling TNaming_Selector::Solve, a shape of type TopAbs_COMPOUND although the selected shape is of type TopAbs_FACE.

The attached program ilustrates the bug. In order to run it, the user must provide a valid handle TDocStd_Document (see the beginning of function BOP_NamingTest).

Maybe someone can figure out what's happening.

Cheers,

V. Catina

Attachments: 
Forum supervisor's picture

Dear Valeriu,
I tested in Draw (OCCT6.5.2)the specified case: fuse of 3 boxes and Selection of each Face from result with following solving. The problem is not reproduced.
Very probably mistake is in your code as result of the Solver sufficiently depends on correctness of the built before Naming data structure used by the Solver.
If the problem problem is critical for you, you may contact us via the Contact Form http://www.opencascade.org/about/contacts/.
Training and e-learning courses are also at your disposal - http://www.opencascade.org/support/training/.
Regards

Valeriu Catina's picture

Dear Supervisor,
the problem does not show with any three boxes. You must use exactly the three boxes from the code and fuse them in this order (B1+B2)+B3. As you can see in the code, the naming is correct. Moreover,you can run the code attached to my previous post. Four of the faces cannot be selected.

Best regards,

Valeriu

Valeriu Catina's picture

P.S: As I'm not familiar with DRAW, can you please send me the cooresponding commands in DRAW?