Unfortunately, BRepOffsetAPI_MakeFilling often creates strange surfaces in more complex cases. The surfaces have strong undulations. I would like to be able to detect such cases in order to try the surface generation with different parameters or boundaries.
Does somebody have an idea how to detect it?
When I used BRepOffsetAPI_MakeFilling::G0Error(), I think it sometimes returns incorrect values.
In order to reproduce the problem you can use the following Draw script:
restore Basis-wire.brep b
restore Basis-plane.brep p
filling r 4 0 0 p b_1 0 b_2 0 b_3 0 b_4 0
In Debug mode Draw returns:
dist. max = 0.01596344026784044 ; angle max = 0 ; diffcurv max = 0
*** FIN DE FILLING ***
Temps de calcul : 0.17160110000000017
dist. max is the result of BRepOffsetAPI_MakeFilling::G0Error(), but I think it is much too low. When I measure the maximum distance with FreeCAD I get 0.337 (a screen shot is appended).
Is this a bug?
Generally, I would be glad if BRepOffsetAPI_MakeFilling would be more stable, but probably this is a difficulat task.
If somebody has ideas or experiences how to get better results, e.g. by tuning parameters or adhering to some requirements regarding the definition of constraints, it is also welcome.