Shape transformations .. negative mass

Hi

I have tried 2 different approaches in Transforming(mirroring) a solid
shape about a plane.
I will reproduce the peice of code written for test harness function.

====================================
TopoDS_Shape S = DBRep::Get(a[1]);
// use the base point and mirroing plane vector directions
gp_Trsf T;
T.SetMirror(gp_Ax2(gp_Pnt(atof(a[2]),atof(a[3]),atof(a[4])),
gp_Vec(atof(a[5]),atof(a[6]),atof(a[7]))));
TopLoc_Location loc(T);

/* Approach - 1

BRepBuilderAPI_Transform trf(T);
trf.Perform(S);
if (trf.IsDone()){
DBRep::Set(a[1],trf.Shape());
} else {
cout return 1;
}
*/

// Approach 2
TopoDS_Shape transShape = S.Moved(loc);

DBRep::Set(a[1],transShape);
======================================

If I use the BRepBuilderAPI_Transform class and its Perform function
( approach 1 -- commented portion) the mirroing of the shape is perfect.
In case of Approach 2 ( use the Moved function only for transforming
the shape) also the shape moves to the new location after mirroring.

But when I do mass calculation on the new shape ( mirrored postion),
approach 2 gives a NEGATIVE mass ( though the value is correct).

Why is it ?
Ha anybody used MOVED,MOVE functions for successful results ?

Which is right approach.

regards

- Prasad

PG's picture

To add on,
in approcah 2 when the NEGATIVE MASS occurs, I check the
ORIENTAION of the shape .. it was REVERSED.
Is it contributing to mass of the shape being calculated as (-ve).

Anybody encountered NEGATIVE MASS Calculations ?