2016-05-03 07:44:10 +00:00
|
|
|
#include "harness.h"
|
|
|
|
|
|
|
|
TEST_CASE(normal_roundtrip) {
|
|
|
|
CHECK_LOAD("normal.slvs");
|
|
|
|
CHECK_RENDER_ISO("normal.png");
|
|
|
|
CHECK_SAVE("normal.slvs");
|
|
|
|
}
|
|
|
|
|
2016-11-02 02:33:31 +00:00
|
|
|
TEST_CASE(normal_migrate_from_v22) {
|
|
|
|
CHECK_LOAD("normal_v22.slvs");
|
|
|
|
CHECK_SAVE("normal.slvs");
|
|
|
|
}
|
|
|
|
|
2016-05-03 07:44:10 +00:00
|
|
|
TEST_CASE(normal_inters) {
|
|
|
|
CHECK_LOAD("normal.slvs");
|
|
|
|
|
|
|
|
Group *g = SK.GetGroup(SS.GW.activeGroup);
|
2018-07-12 19:29:44 +00:00
|
|
|
g->GenerateDisplayItems();
|
2016-05-03 07:44:10 +00:00
|
|
|
SMesh *m = &g->displayMesh;
|
|
|
|
|
|
|
|
SEdgeList el = {};
|
|
|
|
bool inters, leaks;
|
|
|
|
SKdNode::From(m)->MakeCertainEdgesInto(&el,
|
|
|
|
EdgeKind::SELF_INTER, /*coplanarIsInter=*/false, &inters, &leaks);
|
2016-10-13 23:22:08 +00:00
|
|
|
el.Clear();
|
2016-05-03 07:44:10 +00:00
|
|
|
|
|
|
|
// The assembly is supposed to interfere.
|
|
|
|
CHECK_TRUE(inters);
|
|
|
|
}
|