MCPcopy Index your code
hub / github.com/CadQuery/cadquery / Rotate

Function Rotate

cadquery/occ_impl/solver.py:319–323  ·  view source on GitHub ↗
(v, R)

Source from the content-addressed store, hash-verified

317
318
319def Rotate(v, R):
320
321 s, u = Quaternion(R)
322
323 return 2 * ca.dot(u, v) * u + (s ** 2 - ca.dot(u, u)) * v + 2 * s * ca.cross(u, v)
324
325
326def Transform(v, T, R):

Callers 5

TransformFunction · 0.85
axis_costFunction · 0.85
point_in_plane_costFunction · 0.85
point_on_line_costFunction · 0.85
fixed_axis_costFunction · 0.85

Calls 3

QuaternionFunction · 0.85
dotMethod · 0.80
crossMethod · 0.80

Tested by

no test coverage detected