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.
This commit is contained in:
Mikolaj Wielgus 2025-06-25 20:11:49 +02:00
parent 868d05ab6f
commit 03ed35cbc4
1 changed files with 4 additions and 8 deletions

View File

@ -713,13 +713,13 @@ impl<CW: Clone, Cel: Copy, R: AccessRules> Drawing<CW, Cel, R> {
let from = self.head_around_bend_segment( let from = self.head_around_bend_segment(
&from_head, &from_head,
inner, inner,
RotationSense::Clockwise, RotationSense::Counterclockwise,
width, width,
)?; )?;
let to = self.head_around_bend_segment( let to = self.head_around_bend_segment(
&to_head, &to_head,
inner, inner,
RotationSense::Counterclockwise, RotationSense::Clockwise,
width, width,
)?; )?;
let offset = self.head_around_bend_offset(&from_head, inner, width); let offset = self.head_around_bend_offset(&from_head, inner, width);
@ -729,15 +729,11 @@ impl<CW: Clone, Cel: Copy, R: AccessRules> Drawing<CW, Cel, R> {
let from = self.head_around_dot_segment( let from = self.head_around_dot_segment(
&from_head, &from_head,
core, core,
RotationSense::Clockwise,
width,
)?;
let to = self.head_around_dot_segment(
&to_head,
core,
RotationSense::Counterclockwise, RotationSense::Counterclockwise,
width, 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); let offset = self.head_around_dot_offset(&from_head, core, width);
(from, to, offset) (from, to, offset)
}; };