@@ -2651,8 +2651,7 @@ def polyline(
26512651 """
26522652 Create a polyline from a list of points
26532653
2654- :param listOfXYTuple: a list of points in Workplane coordinates
2655- :type listOfXYTuple: list of 2-tuples
2654+ :param listOfXYTuple: a list of points in Workplane coordinates (2D or 3D)
26562655 :param forConstruction: whether or not the edges are used for reference
26572656 :type forConstruction: true if the edges are for reference, false if they are for creating geometry
26582657 part geometry
@@ -2688,15 +2687,15 @@ def polyline(
26882687
26892688 def close (self : T ) -> T :
26902689 """
2691- End 2D construction, and attempt to build a closed wire.
2690+ End construction, and attempt to build a closed wire.
26922691
26932692 :return: a CQ object with a completed wire on the stack, if possible.
26942693
2695- After 2D drafting with methods such as lineTo, threePointArc,
2694+ After 2D (or 3D) drafting with methods such as lineTo, threePointArc,
26962695 tangentArcPoint and polyline, it is necessary to convert the edges
26972696 produced by these into one or more wires.
26982697
2699- When a set of edges is closed, cadQuery assumes it is safe to build
2698+ When a set of edges is closed, CadQuery assumes it is safe to build
27002699 the group of edges into a wire. This example builds a simple triangular
27012700 prism::
27022701
@@ -2713,7 +2712,7 @@ def close(self: T) -> T:
27132712 # that is larger than what is considered a numerical error.
27142713 # If so; add a line segment between endPoint and startPoint
27152714 if endPoint .sub (startPoint ).Length > 1e-6 :
2716- self .lineTo ( self . ctx . firstPoint . x , self . ctx . firstPoint . y )
2715+ self .polyline ([ endPoint , startPoint ] )
27172716
27182717 # Need to reset the first point after closing a wire
27192718 self .ctx .firstPoint = None
0 commit comments