QuestionAuthorHi !
gp_Trsf only support uniform scaling, can I do non uniform scaling of a TopoDS_Shape object ?
For example if I would like to make an ellipsoid out of a sphere or something like that ?
Mikael
01Commenter-1Mikael,
There are two key classes to define a non-uniform transformation on a shape. These are:
- Class gp_GTrsf to define the transformation by itself.
- Class BRepBuilderAPI_GTransform to modify your shape by applying the transformation.
Hoping this will help you, regards,
Commenter-1.
02Commenter-2As Arnaud Magnier told you, you can define a 3D transformation by itself (with a 4-by-4 matrix).
And for non uniform scaling, you just have to use this matrix:
M= fx 0 0 0
0 fy 0 0
0 0 fz 0
0 0 0 0
where fx, fy, fz define scaling factor for every axis.
Regards, Commenter-2