@@ -113,6 +113,10 @@ TEST( MRMesh, PrecisePredicates2More )
113
113
// intersection of 45 and 03 is closer to 4 than intersection of 45 and 12
114
114
EXPECT_TRUE ( segmentIntersectionOrder ( { vs[4 ], vs[5 ], vs[0 ], vs[3 ], vs[1 ], vs[2 ] } ) );
115
115
EXPECT_FALSE ( segmentIntersectionOrder ( { vs[5 ], vs[4 ], vs[0 ], vs[3 ], vs[1 ], vs[2 ] } ) );
116
+
117
+ // intersection of 45 and 03 is closer to 4 than intersection of 45 and 02
118
+ EXPECT_TRUE ( segmentIntersectionOrder ( { vs[4 ], vs[5 ], vs[0 ], vs[3 ], vs[0 ], vs[2 ] } ) );
119
+ EXPECT_FALSE ( segmentIntersectionOrder ( { vs[4 ], vs[5 ], vs[0 ], vs[2 ], vs[0 ], vs[3 ] } ) );
116
120
}
117
121
118
122
TEST ( MRMesh, PrecisePredicates2FullDegen )
@@ -221,6 +225,14 @@ TEST( MRMesh, PreciseSegmentIntersectionOrder2 )
221
225
EXPECT_FALSE ( segmentIntersectionOrder ( { vs[0 ], vs[1 ], vs[4 ], vs[5 ], vs[3 ], vs[2 ] } ) );
222
226
EXPECT_FALSE ( segmentIntersectionOrder ( { vs[0 ], vs[1 ], vs[5 ], vs[4 ], vs[3 ], vs[2 ] } ) );
223
227
EXPECT_TRUE ( segmentIntersectionOrder ( { vs[1 ], vs[0 ], vs[5 ], vs[4 ], vs[3 ], vs[2 ] } ) );
228
+
229
+ // shared point in sa and sb
230
+ EXPECT_TRUE ( segmentIntersectionOrder ( { vs[0 ], vs[1 ], vs[2 ], vs[3 ], vs[2 ], vs[5 ] } ) );
231
+ EXPECT_TRUE ( segmentIntersectionOrder ( { vs[0 ], vs[1 ], vs[3 ], vs[2 ], vs[2 ], vs[5 ] } ) );
232
+ EXPECT_TRUE ( segmentIntersectionOrder ( { vs[0 ], vs[1 ], vs[2 ], vs[3 ], vs[5 ], vs[2 ] } ) );
233
+ EXPECT_FALSE ( segmentIntersectionOrder ( { vs[0 ], vs[1 ], vs[4 ], vs[5 ], vs[2 ], vs[5 ] } ) );
234
+ EXPECT_FALSE ( segmentIntersectionOrder ( { vs[0 ], vs[1 ], vs[4 ], vs[5 ], vs[5 ], vs[2 ] } ) );
235
+ EXPECT_FALSE ( segmentIntersectionOrder ( { vs[0 ], vs[1 ], vs[5 ], vs[4 ], vs[5 ], vs[2 ] } ) );
224
236
}
225
237
226
238
TEST ( MRMesh, PrecisePredicates3 )
0 commit comments