
Tue, 05/04/2004 - 11:42
Forums:
I'm trying to translate a face.
// code begins here
Standard_Real x, y, z;
gp_Vec v(x, y, z);
gp_Trsf t;
t.SetTranslation(v);
TopoDS_Face face;
BRepBuilderAPI_Transform T(t);
T.Perform(face);
// code ends here
But it seems above code doesn't work.
The coordinate of a point on the face doesn't change.
Please help me.
Tue, 05/04/2004 - 15:02
I don't know if this is the problem you are experiencing, but...
Note that BRepBuilderAPI_Transform will often only attach a transformation (Location) to the face after transforming. Depending
on the method you are using to query the point location, you may
need to retrieve the current location from the face and apply it to
the resulting point to get the true location. You may also want to
look at BRepBuilderAPI_GTransform. This will transform the actual
points in your shape, but can cause distortion depending on your
transform.
Thu, 07/29/2004 - 17:35
try this :
Standard_Real x, y, z;
gp_Vec v(x, y, z);
gp_Trsf t;
t.SetTranslation(v);
TopoDS_Face face;
face.Move(t);