diff --git a/src/bin/flat/tube/mod.rs b/src/bin/flat/tube/mod.rs index 0b8e523..4e7b144 100644 --- a/src/bin/flat/tube/mod.rs +++ b/src/bin/flat/tube/mod.rs @@ -236,16 +236,6 @@ mod coords { } } - impl Tube { - fn flat_to_global(&self, at: Vec2) -> Mat2 { - Mat2::from(self.sqrt_at(at).inverse()) - } - - fn global_to_flat(&self, at: Vec2) -> Mat2 { - Mat2::from(self.sqrt_at(at)) - } - } - impl MapperInner for Tube { fn inner_to_global(self, loc: Location) -> Location { todo!() @@ -255,7 +245,7 @@ mod coords { fn global_to_inner(self, loc: Location) -> Location { Location { pos: vec2(loc.pos.x, self.v(loc.pos.y)), // в плоской СК для Inner или её продолжении на Outer - rot: self.global_to_flat(loc.pos) * loc.rot, + rot: Mat2::from(self.sqrt_at(loc.pos)) * loc.rot, } } } @@ -273,7 +263,7 @@ mod coords { let v = self.v(y) + y.signum() * (self.external_halflength - self.internal_halflength); Location { pos: vec2(u, v), // в плоском продолжении СК Outer на область Inner - rot: self.global_to_flat(loc.pos) * loc.rot, + rot: Mat2::from(self.sqrt_at(loc.pos)) * loc.rot, } } else { loc