Problem adding edges to a shape

Hi,

I am trying to add edges to a shape. The edges are positioned so that they are lying on the surface of the shape. I use BOPAlgo_Builder to fuse the edges and the shape together, it usually works fine except for this case, see the corresponding files: shape_1.brep contains the shape and seams_1.brep contains the edges.

The problem is that, using OCCT 7.5.0, the shape gets deformed, some of its vertices get fused together (see result_750.png).

Here is the DRAW code to reproduce:

pload ALL
restore /tmp/shape_1.brep s
restore /tmp/seams_1.brep p
bclearobjects
bcleartools
baddobjects s p
bnondestructive 1
bfillds
bbuild r
vdisplay r
vfit

I also tried in DRAW from OCCT 6.9.1 and the result seems good (see result_691.png).

Am I using the wrong method to do what I want to do? Or is this potentially a bug in OCCT 7.5.0?

jerome caucat's picture

I was able to solve my problem by setting the tolerance of the shape to 1.0e-6 (using ShapeFix_ShapeTolerance::SetTolerance) before performing the fusion.

How does one find the right tolerance value?

Mikhail Sazonov's picture

It is a good question. Indeed, when operands of BO have a gap it would be fine if we had a tool to measure it. Unfortunately, OCCT does not have such tool currently.

By the way, increasing tolerance of operands before BO is a bad thing. Instead, it is better to set Fuzzy value to BO.

jerome caucat's picture

Setting the Fuzzy value of the BO did not help my case, I tried several values.