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

Method transform

cadquery/occ_impl/geom.py:254–260  ·  view source on GitHub ↗
(self, T: "Matrix")

Source from the content-addressed store, hash-verified

252 return gp_Dir(self.wrapped.XYZ())
253
254 def transform(self, T: "Matrix") -> "Vector":
255
256 # to gp_Pnt to obey cq transformation convention (in OCP.vectors do not translate)
257 pnt = self.toPnt()
258 pnt_t = pnt.Transformed(T.wrapped.Trsf())
259
260 return Vector(gp_Vec(pnt_t.XYZ()))
261
262 def __getstate__(self) -> tuple[float, float, float]:
263

Callers 5

toWorldCoordsMethod · 0.95
multiplyMethod · 0.80
__init__Method · 0.80
toLocalCoordsMethod · 0.80
rotatedMethod · 0.80

Calls 2

toPntMethod · 0.95
VectorClass · 0.85

Tested by

no test coverage detected