aSegment = GC_MakeSegment(gp_Pnt(1, 1, 1), gp_Pnt(1, 10, 1))
anEdge = BRepBuilderAPI_MakeEdge(aSegment.Value())
bspline_Wrie1 = BRepBuilderAPI_MakeWire(anEdge.Edge()).Wire()
#轨迹用面
gp_Circ_c = gp_Circ(gp_Ax2(gp_Pnt(0, 0, 0), gp_Dir(0, 1, 0)), 0.5)
TopoDS_Edge_Ec = BRepBuilderAPI_MakeEdge(gp_Circ_c).Edge()
TopoDS_Wire_Wc = BRepBuilderAPI_MakeWire(TopoDS_Edge_Ec).Wire();
TopoDS_Face_F1 = BRepBuilderAPI_MakeFace(TopoDS_Wire_Wc).Face()
gp_Circ_c2 = gp_Circ(gp_Ax2(gp_Pnt(0, 0, 0), gp_Dir(0, 1, 0)), 0.2)
TopoDS_Edge_Ec2 = BRepBuilderAPI_MakeEdge(gp_Circ_c2).Edge()
TopoDS_Wire_Wc2 = BRepBuilderAPI_MakeWire(TopoDS_Edge_Ec2).Wire();
TopoDS_Face_F2 = BRepBuilderAPI_MakeFace(TopoDS_Wire_Wc2).Face()
TopoDS_Face_cut = BRepAlgoAPI_Cut(TopoDS_Face_F1, TopoDS_Face_F2).Shape()
# display.DisplayShape(TopoDS_Face_F, update=True)
TopoDS_Shape_S =BRepOffsetAPI_MakePipe(bspline_Wrie1, TopoDS_Face_cut).Shape()
# TopoDS_Shape_S = BRepOffsetAPI_MakePipe(bspline_Wrie, TopoDS_Face_F).Shape()
display.DisplayShape(TopoDS_Shape_S, update=True) # 显示
圆环
gp_Circ_c = gp_Circ(gp_Ax2(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1)),DN_radius_out)
TopoDS_Edge_Ec = BRepBuilderAPI_MakeEdge(gp_Circ_c).Edge()
TopoDS_Wire_Wc = BRepBuilderAPI_MakeWire(TopoDS_Edge_Ec).Wire();
TopoDS_Face_F1 = BRepBuilderAPI_MakeFace(TopoDS_Wire_Wc).Face()
# display.DisplayShape( TopoDS_Face_F1, update=True)
gp_Circ_c2 = gp_Circ(gp_Ax2(gp_Pnt(0, 0, 0), gp_Dir(0, 0, 1)),DN_radius)
TopoDS_Edge_Ec2 = BRepBuilderAPI_MakeEdge(gp_Circ_c2).Edge()
TopoDS_Wire_Wc2 = BRepBuilderAPI_MakeWire(TopoDS_Edge_Ec2).Wire();
TopoDS_Face_F2 = BRepBuilderAPI_MakeFace(TopoDS_Wire_Wc2).Face()
# display.DisplayShape( TopoDS_Face_F2, update=True)
TopoDS_Face_cut = BRepAlgoAPI_Cut(TopoDS_Face_F1, TopoDS_Face_F2).Shape()