Reverse the transformation

Hi,
I've TopoDS_Shape on which i've applied transformations (rotation & translation)
See the below code snippet:

TopoDS_Shape psolid;
gp_Trsf Trsf;
Trsf.SetValues(/* some parameters */)
BRepBuilderAPI_Transform BRepTransf(psolid, Trsf);
TopoDS_Shape TransfSolid = BRepTransf.Shape(); /*transformed shape*/

Is there any API available in OC to reverse these transformation or bring the shape back to model co-ordinate system from global co-ordinate system.... Any sample code snippet will also do?

Dennis G.'s picture

Can't you just use the inverse transformation?

[code -------------------------------]
gp_Trsf bckTrsf = Trsf.Inverted();
BRepBuilderAPI_Transform backTransform(TransfSolid, bckTrsf);
TopoDS_Shape reTrsfShp = backTransform.Shape();
[\code -------------------------------]

iff A.x = x'
and B.A = id
then B.x' = B.A.x = id.x = x

Haven't tried this. But I think it should work.

Good Luck,

Dennis