MCPcopy
hub / github.com/CadQuery/cadquery / transformShape

Method transformShape

cadquery/occ_impl/shapes.py:1184–1198  ·  view source on GitHub ↗

Transforms this Shape by tMatrix. Also see :py:meth:`transformGeometry`. :param tMatrix: The transformation matrix :returns: a copy of the object, transformed by the provided matrix, with all objects keeping their type

(self, tMatrix: Matrix)

Source from the content-addressed store, hash-verified

1182 return self.__class__(BRepBuilderAPI_Copy(self.wrapped, True, mesh).Shape())
1183
1184 def transformShape(self, tMatrix: Matrix) -> Shape:
1185 """
1186 Transforms this Shape by tMatrix. Also see :py:meth:`transformGeometry`.
1187
1188 :param tMatrix: The transformation matrix
1189 :returns: a copy of the object, transformed by the provided matrix,
1190 with all objects keeping their type
1191 """
1192
1193 r = Shape.cast(
1194 BRepBuilderAPI_Transform(self.wrapped, tMatrix.wrapped.Trsf()).Shape()
1195 )
1196 r.forConstruction = self.forConstruction
1197
1198 return r
1199
1200 def transformGeometry(self, tMatrix: Matrix) -> Shape:
1201 """

Callers 10

makeTextMethod · 0.95
eachMethod · 0.80
toLocalCoordsMethod · 0.80
mirrorInPlaneMethod · 0.80
add_shapeMethod · 0.80
test_lineMethod · 0.80
test_circleMethod · 0.80
test_arcMethod · 0.80
test_ellipseMethod · 0.80
test_splineMethod · 0.80

Calls 1

castMethod · 0.80

Tested by 5

test_lineMethod · 0.64
test_circleMethod · 0.64
test_arcMethod · 0.64
test_ellipseMethod · 0.64
test_splineMethod · 0.64