Add a stack-based Boolean Operation layer node (#1813)

* Multiple boolean operation node

* Change boolean operation ordering

* Complete layer boolean operation node

* Automatically insert new boolean operation node

* Remove divide operation

* Fix subtract operations

* Remove stack data from boolean operation properties

* Fix images and custom vectors

* Code cleanup

* Use slice instead of iter to avoid infinite type recursion

---------

Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
adamgerhant
2024-07-10 02:12:55 -07:00
committed by GitHub
parent f4e3e5ab2a
commit 9d749c49fb
14 changed files with 319 additions and 153 deletions

View File

@@ -18,23 +18,21 @@ pub enum BooleanOperation {
SubtractBack,
Intersect,
Difference,
Divide,
}
impl BooleanOperation {
pub fn list() -> [BooleanOperation; 6] {
pub fn list() -> [BooleanOperation; 5] {
[
BooleanOperation::Union,
BooleanOperation::SubtractFront,
BooleanOperation::SubtractBack,
BooleanOperation::Intersect,
BooleanOperation::Difference,
BooleanOperation::Divide,
]
}
pub fn icons() -> [&'static str; 6] {
["BooleanUnion", "BooleanSubtractFront", "BooleanSubtractBack", "BooleanIntersect", "BooleanDifference", "BooleanDivide"]
pub fn icons() -> [&'static str; 5] {
["BooleanUnion", "BooleanSubtractFront", "BooleanSubtractBack", "BooleanIntersect", "BooleanDifference"]
}
}
@@ -46,7 +44,6 @@ impl core::fmt::Display for BooleanOperation {
BooleanOperation::SubtractBack => write!(f, "Subtract Back"),
BooleanOperation::Intersect => write!(f, "Intersect"),
BooleanOperation::Difference => write!(f, "Difference"),
BooleanOperation::Divide => write!(f, "Divide"),
}
}
}