feat(v3.3): B-Rep face splitting + fuzz testing (all 3 tasks)
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include "vde/brep/iges_export.h"
|
||||
#include "vde/brep/iges_import.h"
|
||||
#include "vde/brep/step_export.h"
|
||||
#include "vde/brep/step_import.h"
|
||||
#include "vde/brep/modeling.h"
|
||||
|
||||
using namespace vde::brep;
|
||||
|
||||
// ── Format fuzz: IGES round-trip ──
|
||||
|
||||
TEST(FuzzFormat, IgesRoundTrip) {
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
double s = 0.5 + i * 0.5;
|
||||
auto box = make_box(s, s, s);
|
||||
|
||||
std::string iges = export_iges({box});
|
||||
EXPECT_FALSE(iges.empty());
|
||||
|
||||
auto loaded = import_iges_from_string(iges);
|
||||
EXPECT_FALSE(loaded.empty());
|
||||
EXPECT_TRUE(loaded[0].is_valid());
|
||||
}
|
||||
}
|
||||
|
||||
// ── Format fuzz: STEP round-trip ──
|
||||
|
||||
TEST(FuzzFormat, StepRoundTrip) {
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
double s = 0.5 + i * 0.5;
|
||||
auto box = make_box(s, s, s);
|
||||
|
||||
std::string step = export_step({box});
|
||||
EXPECT_FALSE(step.empty());
|
||||
|
||||
auto loaded = import_step_from_string(step);
|
||||
EXPECT_FALSE(loaded.empty());
|
||||
EXPECT_TRUE(loaded[0].is_valid());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user