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

Method move

cadquery/cq.py:1719–1736  ·  view source on GitHub ↗

Move the specified distance from the current point, without drawing. :param xDist: desired x distance, in local coordinates :type xDist: float, or none for zero :param yDist: desired y distance, in local coordinates :type yDist: float, or none for zero.

(self: T, xDist: float = 0, yDist: float = 0)

Source from the content-addressed store, hash-verified

1717
1718 # relative move in current plane, not drawing
1719 def move(self: T, xDist: float = 0, yDist: float = 0) -> T:
1720 """
1721 Move the specified distance from the current point, without drawing.
1722
1723 :param xDist: desired x distance, in local coordinates
1724 :type xDist: float, or none for zero
1725 :param yDist: desired y distance, in local coordinates
1726 :type yDist: float, or none for zero.
1727
1728 Not to be confused with :meth:`center`, which moves the center of the entire
1729 workplane, this method only moves the current point ( and therefore does not affect objects
1730 already drawn ).
1731
1732 See :meth:`moveTo` to do the same thing but using absolute coordinates
1733 """
1734 p = self._findFromPoint(True)
1735 newCenter = p + Vector(xDist, yDist, 0)
1736 return self.newObject([self.plane.toWorldCoords(newCenter)])
1737
1738 def slot2D(self: T, length: float, diameter: float, angle: float = 0) -> T:
1739 """

Callers 12

test2DDrawingMethod · 0.95
eachpointMethod · 0.45
testRectMethod · 0.45
testRevolveCutMethod · 0.45
testPolarLinesMethod · 0.45
testExtrudeUntilFaceMethod · 0.45
testLocatedMovedMethod · 0.45
testBaseDirSelectorMethod · 0.45
testCenterNthSelectorMethod · 0.45
test_movedFunction · 0.45
test_loftFunction · 0.45

Calls 4

_findFromPointMethod · 0.95
newObjectMethod · 0.95
VectorClass · 0.85
toWorldCoordsMethod · 0.80

Tested by 10

test2DDrawingMethod · 0.76
testRectMethod · 0.36
testRevolveCutMethod · 0.36
testPolarLinesMethod · 0.36
testExtrudeUntilFaceMethod · 0.36
testLocatedMovedMethod · 0.36
testBaseDirSelectorMethod · 0.36
testCenterNthSelectorMethod · 0.36
test_movedFunction · 0.36
test_loftFunction · 0.36