Mirror not working

Hi,
I try to mirror the object by using following code.
But I cannot getting mirror .
can any body help.

gp_Trsf trsf;
// trsf.SetTranslation(oldPnt, newPnt);
// trsf.SetMirror(newPnt);
aShape=aisshape->Shape();
// BRepBuilderAPI_Transform myTrsf(aShape,trsf,Standard_False);
// aShape= myTrsf.Shape();
// aisshape->Set(aShape);
// myAISContext->Redisplay(aisshape);

Thanks
Atul

Cesar A. Rivas's picture

I do the following for mirroring TopoDS_Shapes:

gp_Pnt origin(0.0,0.0,0.0);
gp_Dir direction(1.0,0.0,0.0);
gp_Dir normal(0.0,1.0,0.0);
gp_Ax2 axis(origin, normal, direction);
gp_Trsf trsf;
trst.SetMirror(axis);
BRepBuilderAPI_Transform trsf1(trsf);
trsf1.Perform(shape);
TopoDS_Shape newShape;
newShape = trsf1.Shape();