feat(v3.6): SSI-based boolean operations — face-face intersection splitting
This commit is contained in:
@@ -176,6 +176,42 @@ TEST(BrepBooleanTest, Intersection_Commutative) {
|
||||
EXPECT_TRUE(r2.is_valid());
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════
|
||||
// SSI-based boolean operations (v3.6)
|
||||
// ═══════════════════════════════════════════════════════════
|
||||
|
||||
TEST(BrepBooleanTest, Union_BoxAndSphere_UsesSSI) {
|
||||
auto box = make_box(3, 3, 3);
|
||||
auto sphere = make_sphere(1.5);
|
||||
auto result = brep_union(box, sphere);
|
||||
EXPECT_TRUE(result.is_valid());
|
||||
// SSI creates more fragments than simple box faces
|
||||
if (result.num_faces() > 0) {
|
||||
EXPECT_GT(result.num_faces(), 0u);
|
||||
}
|
||||
}
|
||||
|
||||
TEST(BrepBooleanTest, Union_CylinderAndBox_UsesSSI) {
|
||||
auto box = make_box(4, 4, 4);
|
||||
auto cyl = make_cylinder(1.5, 6.0);
|
||||
auto result = brep_union(box, cyl);
|
||||
EXPECT_TRUE(result.is_valid());
|
||||
}
|
||||
|
||||
TEST(BrepBooleanTest, Intersection_BoxAndSphere_UsesSSI) {
|
||||
auto box = make_box(3, 3, 3);
|
||||
auto sphere = make_sphere(1.5);
|
||||
auto result = brep_intersection(box, sphere);
|
||||
EXPECT_TRUE(result.is_valid());
|
||||
}
|
||||
|
||||
TEST(BrepBooleanTest, Difference_BoxAndCylinder_UsesSSI) {
|
||||
auto box = make_box(4, 4, 4);
|
||||
auto cyl = make_cylinder(1.0, 6.0);
|
||||
auto result = brep_difference(box, cyl);
|
||||
EXPECT_TRUE(result.is_valid());
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════
|
||||
// Performance (v3.5)
|
||||
// ═══════════════════════════════════════════════════════════
|
||||
|
||||
Reference in New Issue
Block a user