Merged changes in close()
This commit is contained in:
		@ -1874,7 +1874,14 @@ class Workplane(CQ):
 | 
			
		||||
 | 
			
		||||
            s = Workplane().lineTo(1,0).lineTo(1,1).close().extrude(0.2)
 | 
			
		||||
        """
 | 
			
		||||
        self.lineTo(self.ctx.firstPoint.x, self.ctx.firstPoint.y)
 | 
			
		||||
        endPoint = self._findFromPoint(True)
 | 
			
		||||
        startPoint = self.ctx.firstPoint
 | 
			
		||||
 | 
			
		||||
        # Check if there is a distance between startPoint and endPoint
 | 
			
		||||
        # that is larger than what is considered a numerical error.
 | 
			
		||||
        # If so; add a line segment between endPoint and startPoint
 | 
			
		||||
        if endPoint.sub(startPoint).Length > 1e-6:
 | 
			
		||||
            self.lineTo(self.ctx.firstPoint.x, self.ctx.firstPoint.y)
 | 
			
		||||
 | 
			
		||||
        # Need to reset the first point after closing a wire
 | 
			
		||||
        self.ctx.firstPoint = None
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user