How to Create a right BSpline Face and show it?

I want to make a BSpline Face,then show it. My Codes like followed:

GeomFill_FillingStyle fillType = GeomFill_StretchStyle;
Handle(Geom_BSplineCurve) GL1 = BSpLine1;
Handle(Geom_BSplineCurve) GL2 = BSpLine2;
Handle(Geom_BSplineCurve) GL3 = BSpLine3;
Handle(Geom_BSplineCurve) GL4 = BSpLine4;
GeomFill_BSplineCurves aGeomFill(GL1, GL2, GL3, GL4, fillType);
Handle(Geom_BSplineSurface) aBSplineSurface = aGeomFill.Surface();

TopoDS_Wire BWire;
myBoxBuilder.MakeWire(BWire);
myBoxBuilder.Add(BWire, BSpline1Edge);
myBoxBuilder.Add(BWire, BSpline2Edge);
myBoxBuilder.Add(BWire, BSpline3Edge);
myBoxBuilder.Add(BWire, BSpline4Edge);
BRepTools::Update(BWire);

BRepBuilderAPI_MakeFace MF(aBSplineSurface, BWire);
TopoDS_Face aFace = MF.Face();

Quantity_Color CSFColor = Quantity_Color (R,G,B,Quantity_TOC_RGB);
Handle(AIS_Shape) showObj =  new AIS_Shape(aFace);
myAISContext()->SetColor(showObj, CSFColor);
myAISContext()->SetMaterial(showObj,Graphic3d_NOM_GOLD);
myAISContext()->SetDisplayMode(showObj,1,Standard_True);
myAISContext()->Display(showObj);

Everything seems to be ok, but it only show the face's wire, not the face. I am sure the BWire has the right Orientation.

Thanks for any suggestion.

 

 

X F's picture

The BSpline face's DUMP information is followed:

Shape : 10, FORWARD
Dump of 10 TShapes
-----------------

Flags : Free, Modified, Checked, Orientable, Closed, Infinite, Convex
TShape # 1 : FACE      0111000 000000001C92CD60
    -2
    Tolerance : 1e-007
    - Surface : 1

TShape # 2 : WIRE      0101000 000000001C836730
    -8 -6 -4 -3

TShape # 3 : EDGE      0101000 000000001C927D70
    +5 -10
    Tolerance : 1e-007
     same parametrisation of curves
     same range on curves
    - Curve 3D : 4, range : 0 5

TShape # 4 : EDGE      0101000 000000001C928070
    +7 -5
    Tolerance : 1e-007
     same parametrisation of curves
     same range on curves
    - Curve 3D : 3, range : 0 5

TShape # 5 : VERTEX    0101101 000000001C91D2F0
   
    Tolerance : 1e-007
    - Point 3D : 5, 5, 0

TShape # 6 : EDGE      0101000 000000001C927FB0
    +9 -7
    Tolerance : 1e-007
     same parametrisation of curves
     same range on curves
    - Curve 3D : 2, range : 0 5

TShape # 7 : VERTEX    0101101 000000001C8B9060
   
    Tolerance : 1e-007
    - Point 3D : 5, 0, 0

TShape # 8 : EDGE      0101000 000000001C927A70
    +10 -9
    Tolerance : 1e-007
     same parametrisation of curves
     same range on curves
    - Curve 3D : 1, range : 0 5

TShape # 9 : VERTEX    0101101 000000001C8B8D20
   
    Tolerance : 1e-007
    - Point 3D : 5, 0, 5

TShape # 10 : VERTEX    0101101 000000001C8B9AF0
   
    Tolerance : 1e-007
    - Point 3D : 5, 5, 5

 -------
Dump of 0 Curve2ds
 -------

 -------
Dump of 4 Curves
 -------

   1 : BSplineCurve
  Degree 1, 2 Poles, 2  Knots
Poles :

   1 : 5, 5, 5
   2 : 5, 0, 5
Knots :

   1 :  0 2
   2 :  5 2

   2 : BSplineCurve
  Degree 1, 2 Poles, 2  Knots
Poles :

   1 : 5, 0, 5
   2 : 5, 0, 0
Knots :

   1 :  0 2
   2 :  5 2

   3 : BSplineCurve
  Degree 1, 2 Poles, 2  Knots
Poles :

   1 : 5, 0, 0
   2 : 5, 5, 0
Knots :

   1 :  0 2
   2 :  5 2

   4 : BSplineCurve
  Degree 1, 2 Poles, 2  Knots
Poles :

   1 : 5, 5, 0
   2 : 5, 5, 5
Knots :

   1 :  0 2
   2 :  5 2

 -------
Dump of 0 Polygon3Ds
 -------
 -------
Dump of 0 PolygonOnTriangulations
 -------

 -------
Dump of 1 surfaces
 -------

   1 : BSplineSurface
  Degrees :1 1
  NbPoles :2 2
  NbKnots :2 2
 Poles :

   1,  1 : 5, 5, 5
   1,  2 : 5, 5, 1.10134e-013

   2,  1 : 5, 9.50351e-014, 5
   2,  2 : 5, 1.10134e-013, 9.50351e-014

 UKnots :

   1 : 0 2
   2 : 1 2

 VKnots :

   1 : 0 2
   2 : 1 2

 -------
Dump of 0 Triangulations
 -------

 -------
 Dump of 0 Locations
 -------

Could anyone help?Thx