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

Method moveTo

cadquery/cq.py:1700–1716  ·  view source on GitHub ↗

Move to the specified point, without drawing. :param x: desired x location, in local coordinates :type x: float, or none for zero :param y: desired y location, in local coordinates :type y: float, or none for zero. Not to be confused with :meth:`cen

(self: T, x: float = 0, y: float = 0)

Source from the content-addressed store, hash-verified

1698
1699 # absolute move in current plane, not drawing
1700 def moveTo(self: T, x: float = 0, y: float = 0) -> T:
1701 """
1702 Move to the specified point, without drawing.
1703
1704 :param x: desired x location, in local coordinates
1705 :type x: float, or none for zero
1706 :param y: desired y location, in local coordinates
1707 :type y: float, or none for zero.
1708
1709 Not to be confused with :meth:`center`, which moves the center of the entire
1710 workplane, this method only moves the current point ( and therefore does not affect objects
1711 already drawn ).
1712
1713 See :meth:`move` to do the same thing but using relative dimensions
1714 """
1715 newCenter = Vector(x, y, 0)
1716 return self.newObject([self.plane.toWorldCoords(newCenter)])
1717
1718 # relative move in current plane, not drawing
1719 def move(self: T, xDist: float = 0, yDist: float = 0) -> T:

Callers 15

testRotatedEllipseMethod · 0.80
testMultisectionSweepMethod · 0.80
testBoundingBoxMethod · 0.80
test2DDrawingMethod · 0.80
testCleanMethod · 0.80
testNoCleanMethod · 0.80
testExplicitCleanMethod · 0.80
testCloseMethod · 0.80

Calls 3

newObjectMethod · 0.95
VectorClass · 0.85
toWorldCoordsMethod · 0.80

Tested by 15

testRotatedEllipseMethod · 0.64
testMultisectionSweepMethod · 0.64
testBoundingBoxMethod · 0.64
test2DDrawingMethod · 0.64
testCleanMethod · 0.64
testNoCleanMethod · 0.64
testExplicitCleanMethod · 0.64
testCloseMethod · 0.64