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

Method rotate

cadquery/cq.py:1087–1111  ·  view source on GitHub ↗

Returns a copy of all of the items on the stack rotated through and angle around the axis of rotation. :param axisStartPoint: The first point of the axis of rotation :type axisStartPoint: a 3-tuple of floats :param axisEndPoint: The second point of the axis

(
        self: T,
        axisStartPoint: VectorLike,
        axisEndPoint: VectorLike,
        angleDegrees: float,
    )

Source from the content-addressed store, hash-verified

1085 return self.each(_rot, False, False)
1086
1087 def rotate(
1088 self: T,
1089 axisStartPoint: VectorLike,
1090 axisEndPoint: VectorLike,
1091 angleDegrees: float,
1092 ) -> T:
1093 """
1094 Returns a copy of all of the items on the stack rotated through and angle around the axis
1095 of rotation.
1096
1097 :param axisStartPoint: The first point of the axis of rotation
1098 :type axisStartPoint: a 3-tuple of floats
1099 :param axisEndPoint: The second point of the axis of rotation
1100 :type axisEndPoint: a 3-tuple of floats
1101 :param angleDegrees: the rotation angle, in degrees
1102 :returns: a CQ object
1103 """
1104 return self.newObject(
1105 [
1106 o.rotate(Vector(axisStartPoint), Vector(axisEndPoint), angleDegrees)
1107 if isinstance(o, Shape)
1108 else o
1109 for o in self.objects
1110 ]
1111 )
1112
1113 def mirror(
1114 self: T,

Callers 14

rectMethod · 0.45
_rotMethod · 0.45
slot2DMethod · 0.45
ellipseArcMethod · 0.45
testRotateMethod · 0.45
vtk.jsFile · 0.45
XfFunction · 0.45
WgFunction · 0.45
uPFunction · 0.45
pPFunction · 0.45
APFunction · 0.45
aFunction · 0.45

Calls 2

newObjectMethod · 0.95
VectorClass · 0.85

Tested by 1

testRotateMethod · 0.36