From f3ef0042c235bd98bbb13eb9acbfc49655ad0193 Mon Sep 17 00:00:00 2001 From: Hanno Braun Date: Thu, 3 Nov 2022 15:00:56 +0100 Subject: [PATCH] Add `MaybePartial::surface` --- crates/fj-kernel/src/partial/maybe_partial.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/crates/fj-kernel/src/partial/maybe_partial.rs b/crates/fj-kernel/src/partial/maybe_partial.rs index e2a968719..5b5e43988 100644 --- a/crates/fj-kernel/src/partial/maybe_partial.rs +++ b/crates/fj-kernel/src/partial/maybe_partial.rs @@ -122,6 +122,14 @@ impl MaybePartial { } } + /// Access the surface + pub fn surface(&self) -> Option> { + match self { + MaybePartial::Full(full) => Some(full.surface().clone()), + MaybePartial::Partial(partial) => partial.surface(), + } + } + /// Access the global form pub fn global_form(&self) -> Option> { match self {