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

Method toTuple

cadquery/occ_impl/geom.py:1140–1150  ·  view source on GitHub ↗

Convert the location to a translation, rotation tuple.

(self)

Source from the content-addressed store, hash-verified

1138 return Location(self.wrapped.Powered(exponent))
1139
1140 def toTuple(self) -> Tuple[Tuple[float, float, float], Tuple[float, float, float]]:
1141 """Convert the location to a translation, rotation tuple."""
1142
1143 T = self.wrapped.Transformation()
1144 trans = T.TranslationPart()
1145 rot = T.GetRotation()
1146
1147 rv_trans = (trans.X(), trans.Y(), trans.Z())
1148 rx, ry, rz = rot.GetEulerAngles(gp_EulerSequence.gp_Extrinsic_XYZ)
1149
1150 return rv_trans, (degrees(rx), degrees(ry), degrees(rz))
1151
1152 @property
1153 def plane(self) -> "Plane":

Callers 2

_importDocFunction · 0.95
testLocationMethod · 0.95

Calls

no outgoing calls

Tested by 1

testLocationMethod · 0.76