Problems with BrepOffsetAPI_ThruSections
I face a problem when using BrepOffsetAPI_ThruSections.
I have two closed wires from which I want to create a solid by lofting, by applying BrepOffsetAPI_ThruSections(Standard_True). The first argument (isSolid) is set to true, forcing the algorithm to create a solid shape. However, the top and bottom surfaces are not generated and I get a shell.
Maybe the algorithm fails because in my case the two wires are 3D curves, not laying on primitive surfaces such as a plane or a Cylinder. ( on a cylinder it works, if you check the threading in the MakeBottle example)
A small test confirms this theory:
TopoDS_Edge L1 = BRepBuilderAPI_MakeEdge(gp_Pnt(0.0,0.0,0.0),gp_Pnt(1.0,0.0,0.5));
TopoDS_Edge L2 = BRepBuilderAPI_MakeEdge(gp_Pnt(1.0,0.0,0.5),gp_Pnt(1.0,1.0,0.0));
TopoDS_Edge L3 = BRepBuilderAPI_MakeEdge(gp_Pnt(1.0,1.0,0.0),gp_Pnt(0.0,1.0,0.5));
TopoDS_Edge L4 = BRepBuilderAPI_MakeEdge(gp_Pnt(0.0,1.0,0.5),gp_Pnt(0.0,0.0,0.0));
TopoDS_Wire Wire_L = mkWire_L.Wire();
TopoDS_Edge L11 = BRepBuilderAPI_MakeEdge(gp_Pnt(0.0,0.0,1.0),gp_Pnt(1.0,0.0,1.0));
TopoDS_Edge L12 = BRepBuilderAPI_MakeEdge(gp_Pnt(1.0,0.0,1.0),gp_Pnt(1.0,1.0,1.0));
TopoDS_Edge L13 = BRepBuilderAPI_MakeEdge(gp_Pnt(1.0,1.0,1.0),gp_Pnt(0.0,1.0,1.0));
TopoDS_Edge L14 = BRepBuilderAPI_MakeEdge(gp_Pnt(0.0,1.0,1.0),gp_Pnt(0.0,0.0,1.0));
TopoDS_Wire Wire_U = mkWire_U.Wire();
TopoDS_Shape Solid_Test = mk_solid.Shape();
in which 2 wires are created, Wire_L is not in a plane. The generated shape out of the two wires is a shell, without top and bottom surface... However, if you change all 0.5 to 0.0 (for the Z coordinates), a solid box is generated.
Why is this happening? And is there a way around? Could someone give me a hint or a general way to obtain a solid by lofting two (or more) closed wires, when only the wires are given?
Many thanks in advance