def Compute(self):
     self.myGeometry = Geom_SurfaceOfRevolution(self.myCurve, self.myRevolveAxis)
     face = BRepBuilderAPI_MakeFace()
     face.Init(self.myGeometry, True, 1.0e-6)
     face.Build()
     self.myAIS_InteractiveObject = AIS_Shape(face.Shape())
     self.myContext.Display(self.myAIS_InteractiveObject, True)
def beziercurve():

    # the first bezier curve
    array = TColgp_Array1OfPnt(1, 5)
    array.SetValue(1, gp_Pnt(0, 0,-5))
    array.SetValue(2, gp_Pnt(1, 2,1))
    array.SetValue(3, gp_Pnt(2, 3,2))
    array.SetValue(4, gp_Pnt(4, 3,-2))
    array.SetValue(5, gp_Pnt(5, 5,-2))
    beziercurve = Geom_BezierCurve(array)
    surface=Geom_SurfaceOfRevolution(beziercurve,gp_Ax1(gp_Pnt(0.0,0.0,0.0),gp_Dir(1.0,1.0,0.0)))
    print(surface.Bounds())
    poles=beziercurve.Poles()

    for j in range(array.Lower(), array.Upper()+1):
        p = array.Value(j)
        display.DisplayShape(p, update=False)
    display.DisplayShape(surface, update=True, color='Blue')
 def test_surfaces_from_revolution(self):
     '''Test: surfaces from revolution'''
     array = []
     array.append(gp_Pnt(0, 0, 1))
     array.append(gp_Pnt(1, 2, 2))
     array.append(gp_Pnt(2, 3, 3))
     array.append(gp_Pnt(4, 3, 4))
     array.append(gp_Pnt(5, 5, 5))
     aCurve = GeomAPI_PointsToBSpline(point_list_to_TColgp_Array1OfPnt(array)).Curve()
     SOR = Geom_SurfaceOfRevolution(aCurve, gp_OX())
     edge = make_edge(aCurve)
     self.assertFalse(edge is None)
     face = make_face(SOR)
     self.assertFalse(face is None)