Archived issue #0026933
Section works unstably due to incorrect work of the method IsExistingPaveBlock
Description
This bug was born due to unstable work of the test case "boolean bsection N2". One of edges in the result section line appeared or disappeared from patch to patch.
I have isolated this problem to make section between only two faces.
Really the big planar face is situated nearly the boundary of b-spline face in such way that it has common part with the boundary edge that does not cover the whole edge. So, the expected section should look like in the attached picture Attachment 3 (PNG).
Sometimes, depending on the tolerance reached during computation of intersection curve, a small pave block is created on this curve somewhere in the middle in addition to the pave block corresponding to the actual common part. This pave block is compared for coincidence with existing ones and the following method:
Standard_Boolean BOPAlgo_PaveFiller::IsExistingPaveBlock
(const Handle(BOPDS_PaveBlock)& thePB,
const BOPDS_Curve& theNC,
const Standard_Real theTolR3D,
const BOPDS_IndexedMapOfPaveBlock& theMPBOnIn,
Handle(BOPDS_PaveBlock)& aPBOut)
tells that this small pave block is coincident with an existing quite big pave block. It occurs because it is not checked in the method if the found pave block has coinciding ends with the input pave block.
As a result, the whole edge is put in the section, even if it has distance to the opposite argument much greater than its tolerance. The picture Attachment 2 (PNG) shows such result.
I have isolated this problem to make section between only two faces.
Really the big planar face is situated nearly the boundary of b-spline face in such way that it has common part with the boundary edge that does not cover the whole edge. So, the expected section should look like in the attached picture Attachment 3 (PNG).
Sometimes, depending on the tolerance reached during computation of intersection curve, a small pave block is created on this curve somewhere in the middle in addition to the pave block corresponding to the actual common part. This pave block is compared for coincidence with existing ones and the following method:
Standard_Boolean BOPAlgo_PaveFiller::IsExistingPaveBlock
(const Handle(BOPDS_PaveBlock)& thePB,
const BOPDS_Curve& theNC,
const Standard_Real theTolR3D,
const BOPDS_IndexedMapOfPaveBlock& theMPBOnIn,
Handle(BOPDS_PaveBlock)& aPBOut)
tells that this small pave block is coincident with an existing quite big pave block. It occurs because it is not checked in the method if the found pave block has coinciding ends with the input pave block.
As a result, the whole edge is put in the section, even if it has distance to the opposite argument much greater than its tolerance. The picture Attachment 2 (PNG) shows such result.
Steps to reproduce
restore Attachment 1 (BREP) a
explode a
bclearobjects
bcleartools
baddobjects a_1
baddtools a_2
bfillds
bbop s 4
don a_1 s
explode a
bclearobjects
bcleartools
baddobjects a_1
baddtools a_2
bfillds
bbop s 4
don a_1 s
Public activity
2 archived notes
Participants are labeled by their role within this record.
Problem described in issue is reproduced on current state of OCCT.
The problem is not reproduced in current master. Master already contains a test case for the issue without any TODO statements. So, the issue can be just closed.