Get info about a TopoDS_Edge:

Get points from TopoDS_Edge E:

Handle(Geom_Curve) C = BRep_Tool::Curve(E,loc,first,last);
for (Standard_Real j=first;j<=last;j=j+(last-first)/100) {
gp_Pnt pt = C->Value(j);
fprintf(outG,"G01 X%f Y%f Z%f (curve %i parm %f)\n",pt.X(),pt.Y(),pt.Z(),i,j);


A TopoDS_Wire contains zero or more TopoDS_Edges. I think there may be zero or one break in the loop (i.e. doesn't have to be closed, but only one discontinuity is allowed)?

Offset from a TopoDS_Wire: