MantisBT
Mantis Bug Tracker Workflow

View Revisions: Issue #7691 All Revisions ] Back to Issue ]
Summary 0007691: Wrong hidden lines computed by HLRBRep_PolyAlgo and HLRBRep_PolyHLRToShape in OCC 5.1
Revision 2011-09-06 13:37 by apl
Description This bug has been reported on OCC Forum by Paul Borowski, see thread 6628:
http://www.opencascade.org/org/forum/thread_6628 [^]

The fix is suggested by the same person, see below both description and fix:

--------------------

My application was written under OCC 50 and uses HLRBRep_PolyHLRToShape and
HLRBRep_PolyAlgo to compute hidden lines.
The code looks like this:
for (int i = 0; i < n; i++)
{
BRepMesh::Mesh(Shape(i), Deflection);
.....
m_HLR_Algo.Load (Shape(i));
}

m_HLR_Algo.Update();
m_aHLRToShape.Update(&m_HLR_Algo);
.....

// Create the result shape
TopoDS_Compound Shape;
BRep_Builder B;
B.MakeCompound(Shape);

TopoDS_Shape VCompound = m_aHLRToShape.VCompound(S);
if (!VCompound.IsNull())
{
B.Add(Shape, VCompound);
}

VCompound = m_aHLRToShape.OutLineVCompound(S);
if (!VCompound.IsNull())
{
B.Add(Shape, VCompound);
}
It works great under OCC50. Under OCC51, however, all shapes, which were added
to the HL algorithm seems to be transparent and all lines are returned as
visible! Any ideas, what can be a problem?

Regards,

Paul

----------

I spend a lot of time trying to fix the bug I have reported, but at last I had
success with it!

A solution for my problem:
Open ModellingAlgorithms project and take a look in the
OCC5.2\src\HLRBRep\HLRBRep_PolyAlgo.cxx file:

...
3654 // Tri1Flags &= ~FMskBack;
3655 Tri1Flags |= FMskBack;//OCC349
...

now comment out the line 3655 and restore the line 3654:

3654 Tri1Flags &= ~FMskBack;
3655 // Tri1Flags |= FMskBack;//OCC349

Recompile TKHLR.dll.

That's all.

-----------------

Note that according to information from VTN, this bug is likely a consequence of
fixing some other bug in HLR (probably OCC349?).
Revision 2011-09-01 15:54 by apl
Description This bug has been reported on OCC Forum by Paul Borowski, see thread 6628:
http://www.opencascade.org/org/forum/thread_6628 [^]

The fix is suggested by the same person, see below both description and fix:

--------------------

My application was written under OCC 50 and uses HLRBRep_PolyHLRToShape and
HLRBRep_PolyAlgo to compute hidden lines.
The code looks like this:
for (int i = 0; i < n; i++)
{
BRepMesh::Mesh(Shape(i), Deflection);
.....
m_HLR_Algo.Load (Shape(i));
}

m_HLR_Algo.Update();
m_aHLRToShape.Update(&m_HLR_Algo);
.....

// Create the result shape
TopoDS_Compound Shape;
BRep_Builder B;
B.MakeCompound(Shape);

TopoDS_Shape VCompound = m_aHLRToShape.VCompound(S);
if (!VCompound.IsNull())
{
B.Add(Shape, VCompound);
}

VCompound = m_aHLRToShape.OutLineVCompound(S);
if (!VCompound.IsNull())
{
B.Add(Shape, VCompound);
}
It works great under OCC50. Under OCC51, however, all shapes, which were added
to the HL algorithm seems to be transparent and all lines are returned as
visible! Any ideas, what can be a problem?

Regards,

Paul

----------

I spend a lot of time trying to fix the bug I have reported, but at last I had
success with it!

A solution for my problem:
Open ModellingAlgorithms project and take a look in the
OCC5.2\src\HLRBRep\HLRBRep_PolyAlgo.cxx file:

...
3654 // Tri1Flags &= ~FMskBack;
3655 Tri1Flags |= FMskBack;//OCC349
...

now comment out the line 3655 and restore the line 3654:

3654 Tri1Flags &= ~FMskBack;
3655 // Tri1Flags |= FMskBack;//OCC349

Recompile TKHLR.dll.

That's all.

-----------------

Note that according to information from VTN, this bug is likely a consequence of
fixing some other bug in HLR (probably OCC349?).


Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker