Esempio n. 1
0
def solid(faces):
  sewing = BRepBuilderAPI_Sewing()
  for face in faces:
    pts = []
    for node in face:
      pts.append(Common.gp_Pnt(node[0], node[1], node[2]))
    try:
      sewing.Add(Construct.make_face(Construct.make_closed_polygon(pts)))
    except AssertionError:
      print pts
      exit(1)
  sewing.Perform()
  sewed_shape = sewing.SewedShape() 
  return sewed_shape
Esempio n. 2
0
def solid(faces):
    sewing = BRepBuilderAPI_Sewing()
    for face in faces:
        pts = []
        for node in face:
            pts.append(Common.gp_Pnt(node[0], node[1], node[2]))
        try:
            sewing.Add(Construct.make_face(Construct.make_closed_polygon(pts)))
        except AssertionError:
            print pts
            exit(1)
    sewing.Perform()
    sewed_shape = sewing.SewedShape()
    return sewed_shape