vLineTo() is a method of the Workplane class in the CADQuery library of Python. This method is used to create a vertical line from the current point using the y component of the provided point as the vertical length.
The syntax of vLineTo() method is as follows:
Workplane.vLineTo(point)
The point parameter is a tuple or a list that contains the y coordinate of the point where the line will end.
vLineTo() method takes one parameter, which is described below:
pointThis parameter specifies the point where the line will end. It is a tuple or list containing the y coordinate of the point where the line will end.
vLineTo() method returns an instance of the Workplane class.
Here is an example that demonstrates the use of vLineTo() method:
import cadquery as cq
result = cq.Workplane("XY").lineTo(1, 1).vLineTo(2).lineTo(0, 0).close()
show_object(result)
In this example, we have created a rectangle using the lineTo() method, then we have drawn a vertical line from the current point to (0,2) using the vLineTo() method. Finally, we have closed the shape using the close() method. The object is displayed using the show_object() function.
vLineTo() method is a useful method for drawing vertical lines from the current point in the CADQuery library of Python.