Shape transformations .. negative mass


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;
TopLoc_Location loc(T);

/* Approach - 1

BRepBuilderAPI_Transform trf(T);
if (trf.IsDone()){
} else {
cout return 1;

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


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.


- 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 ?