How to add a TopoDS_Edge objects to a TopoDS_Shape

As now i create a face to be a TopoDS_Shape objects;
and then i create a curve on the face ro be a TopoDS_Edge objects;
however the TopoDS_Shape face do not contain the TopoDS_Edge objects(the curve).
is there any way to insert TopoDS_Edge objects to a TopoDS_Shape;
Detail code is more welcome;

H Klene's picture

TopoDS_Builder BUILDER;
TopoDS_Compound shape;

BUILDER.Add(shape, BRepBuilderAPI_MakeEdge(gp_Pnt(0,1,2), gp_Pnt(3,4,5)));
BUILDER.Add(shape, BRepBuilderAPI_MakeEdge(gp_Pnt(2,1,0), gp_Pnt(5,4,3)));

Handle(AIS_Shape) anAISShape = new AIS_Shape(shape);

Instead of collecting otherwise unrelated edges you might want to join edges to a wire and ultimately get a surface contained within the wires loop or merge multiple faces into a solid volume.