Convert location to t,rot pair following vtk conventions
(
loc: Location,
)
| 604 | |
| 605 | |
| 606 | def _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 | |
| 623 | def toVTKAssy( |
no outgoing calls
no test coverage detected