I found when the shape geometry has narrow gap, "BRepOffset_MakeOffset" may cause fault result.
For example, I create a box as base, place another two boxes with space of 0.2 onto the base and fuse the three shapes together.
Then if I set the "Offset" value smaller than 0.1, I can get correct result.
But if I set the "Offset" value larger than 0.1, some of the geometry may be lost and even totally disappeared.
I know a larger "Offset" value may cause the geometries penetrate each other. But I really want the default behavior is to "Fuse" the overlapped parts together instead of making them disappear.
Actually my issue comes from FreeCAD. But FreeCAD guys suggest me to seek help here.
I've installed OCE and PythonOCC under Ubuntu 14.04LTS but I don't know how to run OCC code in OCE through "Draw test harness" or something. Here is my code in PythonOCC, you can see the result by changing the "Offset" value in "build.Initialize" from 0.05 to 0.1,0.12,0.15... I think the result in original OCC will be the same.
Can you tell me if it is possible to "Fuse" the overlapped parts together instead of making them disappear?
display,start_display,add_menu,add_function_to_menu = init_display()
occbox1 = BRepPrimAPI_MakeBox(10.,10.,2.).Shape()
occbox2 = BRepPrimAPI_MakeBox(gp_Pnt(2.,2.5,2.),3.,5.,1.).Shape()
occbox3 = BRepPrimAPI_MakeBox(gp_Pnt(5.2,2.5,2.),3.,5.,1.).Shape()
occbox = BRepAlgoAPI_Fuse(occbox1,occbox2).Shape()
occbox = BRepAlgoAPI_Fuse(occbox,occbox3).Shape()
build = BRepOffset_MakeOffset()
offsetshape = build.Shape()