pub struct Boolean;Expand description
Combines the solids named a and b into one solid named boolean(B)
for the operation B, consuming both.
Every face, edge and vertex that survives keeps its name. What the
boolean creates is named after what it was made from, see
geop_lib_booleans — for example boolean(B,E1,E2,i,n) for the
i-th of the n points where edges E1 and E2 cross.
An empty result — intersecting solids that don’t overlap, say — is an
answer, not an error: both operands are consumed and no solid is named
boolean(B).
Trait Implementations§
impl Copy for Boolean
Source§impl<'de> Deserialize<'de> for Boolean
impl<'de> Deserialize<'de> for Boolean
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Editable for Boolean
impl Editable for Boolean
const INFO: OperationInfo = <Boolean as ::geop_core_editor::part_operation::PartOperation>::INFO
Source§type EditingState = FormState<<Boolean as PartOperation>::Session>
type EditingState = FormState<<Boolean as PartOperation>::Session>
What the editor keeps about a step while it is edited, beyond its
arguments, starting from the default whenever a step is opened.
Source§fn new_args(context: &Context<'_>) -> Self::Args
fn new_args(context: &Context<'_>) -> Self::Args
The arguments of a new step: sensible defaults, taking the part it
is inserted into into account.
Source§fn presentation(
context: &Context<'_>,
args: &Self::Args,
editing: &Self::EditingState,
) -> Form
fn presentation( context: &Context<'_>, args: &Self::Args, editing: &Self::EditingState, ) -> Form
What the editor shows while the step is edited. Never fails: an
editor needs the form most exactly when the arguments do not build,
so whatever is wrong is said in it.
Source§fn process_user_event(
context: &Context<'_>,
args: &Self::Args,
editing: &Self::EditingState,
event: Event,
) -> (Self::Args, Self::EditingState)
fn process_user_event( context: &Context<'_>, args: &Self::Args, editing: &Self::EditingState, event: Event, ) -> (Self::Args, Self::EditingState)
The step’s arguments and editing state after
event.Source§impl ModelOperation for Boolean
impl ModelOperation for Boolean
Source§fn build(
model: &mut NamedModel,
_: &Reader<'_>,
step: &str,
args: &BooleanArgs,
) -> GeopResult<()>
fn build( model: &mut NamedModel, _: &Reader<'_>, step: &str, args: &BooleanArgs, ) -> GeopResult<()>
Builds the step
step — what everything it makes is named after —
into model, reading whatever else it builds on through reader,
so the step is rebuilt when that changes.Source§impl Operation for Boolean
impl Operation for Boolean
Source§const KIND: &'static str = <Boolean as ::geop_core_editor::part_operation::PartOperation>::KIND
const KIND: &'static str = <Boolean as ::geop_core_editor::part_operation::PartOperation>::KIND
The name programs store its steps under.
Source§type Args = <Boolean as PartOperation>::Args
type Args = <Boolean as PartOperation>::Args
What a step of the operation is given. It is saved with the program,
so it names targets and elements, never holds their internal ids.
Source§fn run(ctx: &mut StepContext<'_>, args: &Self::Args) -> __GeopResult<()>
fn run(ctx: &mut StepContext<'_>, args: &Self::Args) -> __GeopResult<()>
Declares what the step produces, through
ctx (see
StepContext::produce): cheap, since it runs in every run. What
takes work is done in the makes, which run only when what they read
changed.Source§impl PartOperation for Boolean
impl PartOperation for Boolean
Source§fn new_args(context: &Context<'_>) -> BooleanArgs
fn new_args(context: &Context<'_>) -> BooleanArgs
The difference of the two newest solids: the older cut by the one just built as a tool.
Source§fn form<'a>(
context: &'a Context<'a>,
args: &BooleanArgs,
_: &FormState<()>,
) -> EditForm<'a, BooleanArgs>
fn form<'a>( context: &'a Context<'a>, args: &BooleanArgs, _: &FormState<()>, ) -> EditForm<'a, BooleanArgs>
The two solids, picked, and how to combine them.
const INFO: OperationInfo
Source§type Args = BooleanArgs
type Args = BooleanArgs
What a step is given. It is saved with the program, so it names
targets and elements, never holds their internal ids.
Source§type Session = ()
type Session = ()
What the editor keeps while a step is edited besides its arguments
and the visuals selected:
() for most.Source§fn run(ctx: &mut StepContext<'_>, args: &BooleanArgs) -> GeopResult<()>
fn run(ctx: &mut StepContext<'_>, args: &BooleanArgs) -> GeopResult<()>
Declares what the step produces, through
ctx (see
StepContext::produce).Source§fn begin_event(session: &mut Self::Session)
fn begin_event(session: &mut Self::Session)
What the session forgets at the start of every event, before the
event is handled: nothing, by default.
impl StructuralPartialEq for Boolean
Auto Trait Implementations§
impl Freeze for Boolean
impl RefUnwindSafe for Boolean
impl Send for Boolean
impl Sync for Boolean
impl Unpin for Boolean
impl UnsafeUnpin for Boolean
impl UnwindSafe for Boolean
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more