How to change the AIS_SHAPE param?

for example,I crated an edge,I want to change the position of an endpoint,but I think more cpu will used if I delete it and the create new one,Is there a better way?
How about a more complicated shape?

Kirill Gavrilov's picture

Your description is too vague. If question how to set new shape (TopoDS_Shape) to AIS_Shape, then this interactive object has method AIS_Shape::SetShape().

Handle(AIS_InteractiveContext) theCtx;
Handle(AIS_Shape) theShapePrs;
TopoDS_Shape theNewShape;

theShapePrs->SetShape (theNewShape);
theCtx->Redisplay (theShapePrs, false);

zhang fan's picture

Thank you for helping me.