Skip to content

Port MRFixSelfIntersections tests from MRTestC2 to MRTest#6145

Merged
Fedr merged 1 commit into
masterfrom
move-fix-self-intersections-tests
May 22, 2026
Merged

Port MRFixSelfIntersections tests from MRTestC2 to MRTest#6145
Fedr merged 1 commit into
masterfrom
move-fix-self-intersections-tests

Conversation

@Fedr
Copy link
Copy Markdown
Contributor

@Fedr Fedr commented May 22, 2026

Convert the testFixSelfIntersections test case from source/MRTestC2/MRFixSelfIntersections.c to a regular C++ gtest in a new file source/MRTest/MRFixSelfIntersectionsTests.cpp, following the pattern established for MRMeshBoolean in #6132.

The new test (MRMesh.FixSelfIntersections):

  • builds a torus with self-intersections via makeTorusWithSelfIntersections;
  • verifies the initial valid face count (1024) and that 128 self-intersecting faces are reported;
  • runs SelfIntersections::fix with CutAndFill and touchIsIntersection=false;
  • checks the post-fix face count (1194) and that no intersections remain.

MRTest.vcxproj / .vcxproj.filters are updated to include the new file; the CMake build picks it up via the existing *.cpp glob.

The original C test is left in place for now.

Convert the testFixSelfIntersections case from source/MRTestC2/MRFixSelfIntersections.c
into a new gtest source/MRTest/MRFixSelfIntersectionsTests.cpp using the regular
C++ API (makeTorusWithSelfIntersections, SelfIntersections::getFaces / fix).

Also register the new file in MRTest.vcxproj and MRTest.vcxproj.filters
(the CMake build uses a *.cpp glob and picks it up automatically).
@Fedr Fedr merged commit 0121630 into master May 22, 2026
39 checks passed
@Fedr Fedr deleted the move-fix-self-intersections-tests branch May 22, 2026 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants