diff --git a/crates/fj-kernel/src/topology/edge.rs b/crates/fj-kernel/src/topology/edge.rs index 29fcd11efd..0f3289ead3 100644 --- a/crates/fj-kernel/src/topology/edge.rs +++ b/crates/fj-kernel/src/topology/edge.rs @@ -47,46 +47,6 @@ impl Edge<3> { Self { curve, vertices } } - /// Construct an instance of `Edge` - /// - /// # Implementation Note - /// - /// This method accepts two `Handle`, and projects them onto the - /// curve, to create the local representation that is stored in `Edge`. This - /// could lead to incorrect results, as the caller could provide vertices - /// that don't actually lie on `curve`. - /// - /// The good news is, that whole thing seems to be unnecessary. Or rather, - /// this whole method seems to be unnecessary. I reviewed all the call - /// sites, and in all cases, there seems to be a better way to construct the - /// `Edge`, without using this constructor. - /// - /// Ideally, we'd just fix all those call sites and remove this method, to - /// completely avoid the potential for any bugs to occur here. Problem is, - /// some of those call sites can't be fixed easily, without building further - /// infrastructure. Here's one such piece of infrastructure, for which an - /// issue already exists: - /// - pub fn new_obsolete( - curve: Handle>, - vertices: Option<[Handle; 2]>, - ) -> Self { - let curve = LocalForm::canonical_only(curve); - - let vertices = vertices.map(|vertices| { - vertices.map(|canonical| { - let local = curve - .canonical() - .get() - .point_to_curve_coords(canonical.get().point()) - .local(); - LocalForm::new(local, canonical) - }) - }); - - Self { curve, vertices } - } - /// Build an edge using the [`EdgeBuilder`] API pub fn builder(shape: &mut Shape) -> EdgeBuilder { EdgeBuilder::new(shape)