TopoDS_Edge aEdge = TopoDS::Edge(myAISShape->Shape());
TopoDS_Wire S1_wire = static_cast(S1); // 只要你完全确定S1是一个线框。