From 03ed35cbc438edda896a55358c9fb5ed4f1cb7d9 Mon Sep 17 00:00:00 2001 From: Mikolaj Wielgus Date: Wed, 25 Jun 2025 20:11:49 +0200 Subject: [PATCH] fix(drawing/drawing): Fix squeezing through under bends by flipping CW/CCW I don't know what was the original cause of this bug, but this seems to solve the problem. --- src/drawing/drawing.rs | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/drawing/drawing.rs b/src/drawing/drawing.rs index 3442dff..c47a18b 100644 --- a/src/drawing/drawing.rs +++ b/src/drawing/drawing.rs @@ -713,13 +713,13 @@ impl Drawing { let from = self.head_around_bend_segment( &from_head, inner, - RotationSense::Clockwise, + RotationSense::Counterclockwise, width, )?; let to = self.head_around_bend_segment( &to_head, inner, - RotationSense::Counterclockwise, + RotationSense::Clockwise, width, )?; let offset = self.head_around_bend_offset(&from_head, inner, width); @@ -729,15 +729,11 @@ impl Drawing { let from = self.head_around_dot_segment( &from_head, core, - RotationSense::Clockwise, - width, - )?; - let to = self.head_around_dot_segment( - &to_head, - core, RotationSense::Counterclockwise, width, )?; + let to = + self.head_around_dot_segment(&to_head, core, RotationSense::Clockwise, width)?; let offset = self.head_around_dot_offset(&from_head, core, width); (from, to, offset) };