Skip to content

Commit

Permalink
Define surface geometry in geometry layer
Browse files Browse the repository at this point in the history
This is just one step towards storing surface geometry in the geometry
layer. It is not used anywhere yet.
  • Loading branch information
hannobraun committed Feb 28, 2024
1 parent 0e05227 commit fad8dee
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion crates/fj-core/src/operations/build/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ pub trait BuildSurface {
u: u.into(),
v: v.into(),
};
Surface::new(geometry).insert(core)
let surface = Surface::new(geometry).insert(core);

core.layers
.geometry
.define_surface(surface.clone(), geometry);

surface
}
}

Expand Down
8 changes: 7 additions & 1 deletion crates/fj-core/src/operations/transform/surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,13 @@ impl TransformObject for Handle<Surface> {
.entry(self)
.or_insert_with(|| {
let geometry = self.geometry().transform(transform);
Surface::new(geometry).insert(core)
let surface = Surface::new(geometry).insert(core);

core.layers
.geometry
.define_surface(surface.clone(), geometry);

surface
})
.clone()
}
Expand Down

0 comments on commit fad8dee

Please sign in to comment.