Ok, everybody, please ask. When I was in version 7.4, the uneven scaling of topds_shape by gp_GTrsf was all right, but when I upgraded to version 7.6, the same operation prompted an error.
Yes, I can understand the cause of the error through this prompt. However, in version 7.4.0, I can transform the model unevenly through gp_GTrsf without this error.
I have a similar problem, just using a non-uniform scaling on a shape with pythonocc-core==7.7.2:
scale_transform = gp_GTrsf()
scale_transform.SetVectorialPart(
gp_Mat(
1, 0, 0,
0, 0.1, 0,
0, 0, 1 )
)
brep_transform_builder = BRepBuilderAPI_GTransform(
shape, scale_transform, False # fails too if I use "True" here
)
which raises this runtime error
RuntimeError: Standard_ConstructionErrorgp_GTrsf::Trsf() - non-orthogonal GTrsf raised from method BRepBuilderAPI_GTransform of class BRepBuilderAPI_GTransform
How can I know what the detailed error is ? E.g. what does non-orthogonal GTrsf mean for the transformation matrix and/or the shape I try to transform ?
When looking at the shape ( it is basically a y-axis-stretched cube I want to revert back to a cube by applying the reversed-scale-along-y-axis ) with the built-in 3D viewer, I can see that the shape is not exactly axis aligned. I.e. some of the faces would not be scaled uniformly by the scale I want to apply along y-axis.
Could this be the issue, that the shape is not properly aligned to the non-uniform scaling I want to apply ?
Sat, 12/17/2022 - 08:14
Which error? Where is the code snippet?
Sun, 12/18/2022 - 14:23
it prompted an error: gp_GTrsf::Trsf() - non-orthogonal GTrsf。then i find the error in gp_GTrsf.lxx gp_GTrsf::Trsf()。
Sun, 12/18/2022 - 16:12
Method gp_GTrsf::Trsf() converts gp_GTrsf into gp_Trsf, and the latter supports only uniform scale factor.
Wed, 12/21/2022 - 02:55
Yes, I can understand the cause of the error through this prompt. However, in version 7.4.0, I can transform the model unevenly through gp_GTrsf without this error.
Wed, 12/21/2022 - 12:19
Could you put here a snippet of your code that calls cascade functions for transformation?
Mon, 12/26/2022 - 04:01
Here is the code I used to move, rotate and scale the model.
Mon, 11/27/2023 - 15:22
I have a similar problem, just using a non-uniform scaling on a shape with
pythonocc-core==7.7.2
:which raises this runtime error
How can I know what the detailed error is ? E.g. what does
non-orthogonal GTrsf
mean for the transformation matrix and/or the shape I try to transform ?When looking at the shape ( it is basically a y-axis-stretched cube I want to revert back to a cube by applying the reversed-scale-along-y-axis ) with the built-in 3D viewer, I can see that the shape is not exactly axis aligned. I.e. some of the faces would not be scaled uniformly by the scale I want to apply along y-axis. Could this be the issue, that the shape is not properly aligned to the non-uniform scaling I want to apply ?
Mon, 11/27/2023 - 15:37
Hello, BRepBuilderAPI_GTransform had some problem (on c++ side). That was fixed in 7.8.0 release.
Best regards, Dmitrii.