
Thu, 05/13/2010 - 13:09
Forums:
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?
Fri, 05/14/2010 - 20:38
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