Skip to content

Commit

Permalink
Prepare code for follow-on change
Browse files Browse the repository at this point in the history
  • Loading branch information
hannobraun committed Feb 28, 2023
1 parent d2763cf commit 9d25887
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions crates/fj-kernel/src/partial/objects/edge.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
use std::array;

use fj_interop::ext::ArrayExt;
use fj_math::Point;

use crate::{
Expand Down Expand Up @@ -76,9 +73,10 @@ impl PartialObject for PartialHalfEdge {
impl Default for PartialHalfEdge {
fn default() -> Self {
let curve = None;
let surface_vertices = array::from_fn(|_| Partial::default());
let start_vertex = Partial::default();
let end_vertex = Partial::default();

let global_vertices = surface_vertices.each_ref_ext().map(
let global_vertices = [&start_vertex, &end_vertex].map(
|vertex: &Partial<SurfaceVertex>| {
let surface_vertex = vertex.clone();
let global_vertex = surface_vertex.read().global_form.clone();
Expand All @@ -90,8 +88,6 @@ impl Default for PartialHalfEdge {
vertices: global_vertices,
});

let [start_vertex, end_vertex] = surface_vertices;

Self {
curve,
boundary: [None; 2],
Expand Down

0 comments on commit 9d25887

Please sign in to comment.