microcad_core/
boolean_op.rs1#[derive(Debug)]
7pub enum BooleanOp {
9 Union,
11 Subtract,
13 Complement,
15 Intersect,
17}
18
19use geo::OpType;
20
21impl From<BooleanOp> for OpType {
22 fn from(op: BooleanOp) -> Self {
23 Self::from(&op)
24 }
25}
26
27impl From<&BooleanOp> for OpType {
28 fn from(op: &BooleanOp) -> Self {
29 match op {
30 BooleanOp::Subtract => OpType::Difference,
31 BooleanOp::Union => OpType::Union,
32 BooleanOp::Intersect => OpType::Intersection,
33 BooleanOp::Complement => OpType::Xor,
34 }
35 }
36}