Wires and Surfaces

Hi,
i'm a bit stunned on how to use wires and surfaces correctly
to obtain a face. While i succeed on planes, i fail on e.g.
Spheres and Cylinders. Why doesn't the following snipped
create a hemisphere?
No errors occur, but the view doesn't display anything.
-------
Handle(Geom_Surface) sf = new Geom_SphericalSurface(ax, 3);
Handle(Geom_Circle) cr = new Geom_Circle(ax, 3);
TopoDS_Edge e = BRepBuilderAPI_MakeEdge(cr);
TopoDS_Wire w = BRepBuilderAPI_MakeWire(e);
TopoDS_Face f = BRepBuilderAPI_MakeFace(sf, w);
-------
Any hints are appreciated.

Gerhard Hofmann's picture

Hello David,
I never did it this way because I always start off with 2D curves in the u/v system of the surface to build a face. As I can see in my code I would have 4 edges in your case. These edges are made from 4 2D lines in the u/v space which build a rectangle: one line is the pole of the sphere (this is a singular edge), two lines are a seam (from the pole to the equator and same way back) and one line is the same edge as in your code.
Hope this helps.
Gerhard