For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Operator precedence in Correct_Wire

Christian R. Krug's picture


I found some errors in Correct_Wire.cxx concerning operator precedence.

Instead of

if(ptr[i].State() | 32 ==0) { (line 342)
if(ptr[bef].State() | 32 ==0) { (lines 346 and 350)
if(ptr[i].State() | 16 == 0) return; (lines 874 and 988)

it should read

if((ptr[i].State() | 32) == 0)
if((ptr[bef].State() | 32) == 0) {
if((ptr[i].State() | 16) == 0) return;

With kind regards, Kris

Open CASCADE Support Team's picture

Dear Mr. Krug!

Thank you for reporting this problem in Open CASCADE Technology, and correction you suggested!

We are pleased to inform you that the problem you reported has been registered as bug with reference number OCC7723 "Operator precedence in Correct_Wire".

The correction you suggested will be tested for non-regression and integrated into one of the future releases of OCCT.

Please note that you will be able to track integration of fix on that bug consulting the Release Notes of Open CASCADE Technology. The Release Notes are regularly published on our web site at

Yours cincerely,
Open CASCADE Support Team

P.S. Please note that if you use class Correct_Wire to improve quaility of your shape, we advise you to have a look at classes provided in TKShHealing toolkit (such as ShapeFix_Wire) which provide more powerful fixing capabilities and probably could be more suitable for your task.