Updating Geom_BSplineSurface on video

Hello,

I have a valid Geom_BSplineSurface object which has already been displayed correctly on the screen by the mean of an AIS_Shape object.

BRepBuilderAPI_MakeFace myFace;
BRep_Builder myBuild;

TopoDS_Compound compound;
myBuild.MakeCompound( compound);

myFace.Init(srf);

myBuild.Add(compound, myFace);

this->BSShape = new AIS_Shape(compound);
myAISContext->Display(BSShape);

I've made some code to select a control point and modify its weight
by using Geom_BSplineSurface::SetWeight(UIndex,VIndex,Weight)

Everything works well in memory: the point weight is updated.

Now how am I expected to update the visual content?

I've tried by using the same code as above again, with no results.

Thanks in advance.

Fabio Napodano's picture

if anyone would ever have the same problem, here it is how I've solved it:

void MyDoc::UpdateObject(Handle(AIS_InteractiveObject)& obj, Handle(Geom_BSplineSurface)& srf, Standard_Boolean UpdateViewer)
{

myAISContext->Erase(obj,Standard_False);
BRepBuilderAPI_MakeFace myFace(srf);
BSShape = new AIS_Shape(myFace);
myAISContext->Display(obj,UpdateViewer);

}

may not be the best solution, but works.