Thanks Rob;
I really want to translate an object ( specially a surface) from it's location to another point...
the gp_Trsf Translation has as argument (Point1,point2)what I want is that the point1 is the location of the surface and point2 is the destination of the translation...How can I do this????????
I'm not sure I completely understand your question, but I'll tell you what I think will help and you can clarify if necessary...
If you have the two points, you can create your translation transform using SetTranslation on gp_Trsf. Then, if you have a Geom_Surface, you can call the Transform member function (passing your transformation) to translate the surface or Transformed to get a copy of the surface that has been translated, leaving the original in tact. If you have a face, rather than a surface, you should probably consider BRepBuilderAPI_Transform.
If you need no copy, just to transforme a TopoDS_Shape a; Use the a.Location(TopLoc_Location(atrsf)) function, where atrsf is the mentioned gp_Trsf. (Note gp_Trsf may contain only rotation, translation, and uniform scale, for nonuniform transformations
BRepBuilderAPI_GTransform shall be used as described above).
hi Ernest;
I don't have the two point i only have the destination point(the second point)...
the first point is the location of the surface......so that's why i want to get the TopLoc_Location, set it to a point which will be the first point of the transformation...
thanks for all Ernest I find the solution thanks to you...
i want you to take a look at http://www.opencascade.org/org/forum/thread_8078/
it's another mad probleme if you still have an idea please help me
thanks alot again..
Fri, 04/29/2005 - 17:31
I don't know if that makes sense to me. A TopLoc_Location is not a point, but a composite transformation. You may get what you are looking for by:
gp_Pnt pt = gp_Pnt(0.,0.,0.).Transformed(myLocation);
Note the automatic conversion from a location to a gp_Trsf. It may also work to convert the location to a gp_Trsf and call the TranslationPart member.
Sun, 05/01/2005 - 11:41
Thanks Rob;
I really want to translate an object ( specially a surface) from it's location to another point...
the gp_Trsf Translation has as argument (Point1,point2)what I want is that the point1 is the location of the surface and point2 is the destination of the translation...How can I do this????????
Mon, 05/02/2005 - 14:31
I'm not sure I completely understand your question, but I'll tell you what I think will help and you can clarify if necessary...
If you have the two points, you can create your translation transform using SetTranslation on gp_Trsf. Then, if you have a Geom_Surface, you can call the Transform member function (passing your transformation) to translate the surface or Transformed to get a copy of the surface that has been translated, leaving the original in tact. If you have a face, rather than a surface, you should probably consider BRepBuilderAPI_Transform.
Tue, 05/03/2005 - 13:26
If you need no copy, just to transforme a TopoDS_Shape a; Use the a.Location(TopLoc_Location(atrsf)) function, where atrsf is the mentioned gp_Trsf. (Note gp_Trsf may contain only rotation, translation, and uniform scale, for nonuniform transformations
BRepBuilderAPI_GTransform shall be used as described above).
Tue, 05/03/2005 - 15:07
hi Ernest;
I don't have the two point i only have the destination point(the second point)...
the first point is the location of the surface......so that's why i want to get the TopLoc_Location, set it to a point which will be the first point of the transformation...
Tue, 05/03/2005 - 15:15
thanks for all Ernest I find the solution thanks to you...
i want you to take a look at
http://www.opencascade.org/org/forum/thread_8078/
it's another mad probleme if you still have an idea please help me
thanks alot again..