Skip to content

Commit 6136549

Browse files
committed
remove BottomLeftConfig, add new Item functions (isFixed, isDisallowedArea, markAsFixedInBin, markAsDisallowedAreaInBin), and enhance priority handling.
1 parent b68e11d commit 6136549

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

libnest2d_js/libnest2d_js.cpp

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ using Box = _Box<Point>;
2121
using Circle = _Circle<Point>;
2222
using Item = _Item<PolygonImpl>;
2323
using NfpConfig = NfpPConfig<PolygonImpl>;
24-
using BottomLeftConfig = BLConfig<PolygonImpl>;
2524
using Polygon = PolygonImpl;
2625

2726
// Add aliases for angle types
@@ -166,13 +165,6 @@ EMSCRIPTEN_BINDINGS(libnest2d_js) {
166165
.field("parallel", &NfpConfig::parallel)
167166
;
168167

169-
// BottomLeftConfig class
170-
emscripten::value_object<BottomLeftConfig>("BottomLeftConfig")
171-
.field("min_obj_distance", &BottomLeftConfig::min_obj_distance)
172-
.field("epsilon", &BottomLeftConfig::epsilon)
173-
.field("allow_rotations", &BottomLeftConfig::allow_rotations)
174-
;
175-
176168

177169
// Item class
178170
class_<Item>("Item")
@@ -189,7 +181,13 @@ EMSCRIPTEN_BINDINGS(libnest2d_js) {
189181
.function("vertexCount", &Item::vertexCount)
190182
.function("boundingBox", &Item::boundingBox)
191183
.function("translate", &Item::translate)
192-
.function("rotate", &Item::rotate);
184+
.function("rotate", &Item::rotate)
185+
.function("isFixed", &Item::isFixed)
186+
.function("isDisallowedArea", &Item::isDisallowedArea)
187+
.function("markAsFixedInBin", &Item::markAsFixedInBin)
188+
.function("markAsDisallowedAreaInBin", &Item::markAsDisallowedAreaInBin)
189+
.function("priority", select_overload<int() const>(&Item::priority))
190+
.function("setPriority", select_overload<void(int)>(&Item::priority));
193191

194192
// Polygon class for internal type compatibility
195193
class_<Polygon>("Polygon");

0 commit comments

Comments
 (0)