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

Function _loc2vtk

cadquery/occ_impl/assembly.py:606–620  ·  view source on GitHub ↗

Convert location to t,rot pair following vtk conventions

(
    loc: Location,
)

Source from the content-addressed store, hash-verified

604
605
606def _loc2vtk(
607 loc: Location,
608) -> Tuple[Tuple[float, float, float], Tuple[float, float, float]]:
609 """
610 Convert location to t,rot pair following vtk conventions
611 """
612
613 T = loc.wrapped.Transformation()
614
615 trans = T.TranslationPart().Coord()
616 rot = tuple(
617 map(degrees, T.GetRotation().GetEulerAngles(gp_EulerSequence.gp_Intrinsic_ZXY),)
618 )
619
620 return trans, (rot[1], rot[2], rot[0])
621
622
623def toVTKAssy(

Callers 3

_to_vtk_axsFunction · 0.85
toVTKAssyFunction · 0.85
toVTKFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected