Transforms this shape by tMatrix. WARNING: transformGeometry will sometimes convert lines and circles to splines, but it also has the ability to handle skew and stretching transformations. If your transformation is only translation and rotation, it is safer
(self, tMatrix: Matrix)
| 1198 | return r |
| 1199 | |
| 1200 | def transformGeometry(self, tMatrix: Matrix) -> Shape: |
| 1201 | """ |
| 1202 | Transforms this shape by tMatrix. |
| 1203 | |
| 1204 | WARNING: transformGeometry will sometimes convert lines and circles to |
| 1205 | splines, but it also has the ability to handle skew and stretching |
| 1206 | transformations. |
| 1207 | |
| 1208 | If your transformation is only translation and rotation, it is safer to |
| 1209 | use :py:meth:`transformShape`, which doesn't change the underlying type |
| 1210 | of the geometry, but cannot handle skew transformations. |
| 1211 | |
| 1212 | :param tMatrix: The transformation matrix |
| 1213 | :returns: a copy of the object, but with geometry transformed instead |
| 1214 | of just rotated. |
| 1215 | """ |
| 1216 | r = Shape.cast( |
| 1217 | BRepBuilderAPI_GTransform(self.wrapped, tMatrix.wrapped, True).Shape() |
| 1218 | ) |
| 1219 | r.forConstruction = self.forConstruction |
| 1220 | |
| 1221 | return r |
| 1222 | |
| 1223 | def location(self) -> Location: |
| 1224 | """ |