Thu, 08/11/2022 - 06:10
Forums:
I am using the below code, but it is not doing the actual transformation. Please say how to use transform correctly:
```
gp_Trsf transformer = gp_Trsf();
transformer.SetValues(0.5, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0);
gp_Ax2 axis(gp_Pnt(0, 0, 0), gp::DZ());
TopoDS_Shape cone = BRepPrimAPI_MakeCone(axis, 1, 2, 3);
auto out = BRepBuilderAPI_Transform(cone, transformer);
out.Perform(hole);
```
Sat, 08/13/2022 - 07:47
This code from my library works exactly:
gp_Trsf t;
t.SetScale(pnt, coeff);
BRepBuilderAPI_Transform trsfm(s, t);
s = trsfm.Shape();
With respect, Eugene.
Wed, 11/08/2023 - 16:47
I also had a similar problem
Calling
auto new_shape = out.ModifiedShape(cone);
returns the transformed shape as new_shape.
I don't understand why the transformation alone is not changing the referenced shape (cone), as it is stated in the documentation.