Skip to content

Commit 6761f50

Browse files
authored
Merge pull request #103 from Geode-solutions/fix_v15/rename_global_epsilon_to_GLOBAL_EPSILON
Fix_v15/rename_global_epsilon_to_GLOBAL_EPSILON
2 parents 48a7088 + e0e73f4 commit 6761f50

22 files changed

+96
-96
lines changed

bindings/python/tests/test-py-edgedcurve-colocation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ def check_colocation2D():
5656
builder.set_point(2, geode.Point2D([0., 0.]))
5757
builder.set_point(3, geode.Point2D([2., 0.]))
5858
builder.set_point(4, geode.Point2D([1., 4.]))
59-
builder.set_point(5, geode.Point2D([2., geode.global_epsilon / 2]))
60-
builder.set_point(6, geode.Point2D([geode.global_epsilon / 1.1, 2.]))
59+
builder.set_point(5, geode.Point2D([2., geode.GLOBAL_EPSILON / 2]))
60+
builder.set_point(6, geode.Point2D([geode.GLOBAL_EPSILON / 1.1, 2.]))
6161

6262
colocation_inspector = inspector.EdgedCurveColocation2D(curve)
6363
if not colocation_inspector.mesh_has_colocated_points():
@@ -103,8 +103,8 @@ def check_colocation3D():
103103
builder.set_point(3, geode.Point3D([2., 0., 0.]))
104104
builder.set_point(4, geode.Point3D([1., 4., 3.]))
105105
builder.set_point(
106-
5, geode.Point3D([2., geode.global_epsilon / 2, geode.global_epsilon / 2]))
107-
builder.set_point(6, geode.Point3D([geode.global_epsilon / 1.1, 2., 1.]))
106+
5, geode.Point3D([2., geode.GLOBAL_EPSILON / 2, geode.GLOBAL_EPSILON / 2]))
107+
builder.set_point(6, geode.Point3D([geode.GLOBAL_EPSILON / 1.1, 2., 1.]))
108108

109109
colocation_inspector = inspector.EdgedCurveColocation3D(curve)
110110
if not colocation_inspector.mesh_has_colocated_points():

bindings/python/tests/test-py-edgedcurve-degeneration.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def check_degeneration_by_colocalisation2D():
5656
builder.create_vertices(3)
5757
builder.set_point(0, geode.Point2D([0., 2.]))
5858
builder.set_point(1, geode.Point2D([2., 0.]))
59-
builder.set_point(2, geode.Point2D([2., geode.global_epsilon / 2]))
59+
builder.set_point(2, geode.Point2D([2., geode.GLOBAL_EPSILON / 2]))
6060

6161
builder.create_edge_with_vertices(0, 1)
6262
builder.create_edge_with_vertices(0, 2)
@@ -99,8 +99,8 @@ def check_degeneration_by_colocalisation3D():
9999
builder.create_vertices(3)
100100
builder.set_point(0, geode.Point3D([0., 2., 0.]))
101101
builder.set_point(1, geode.Point3D([2., 0., 0.5]))
102-
builder.set_point(2, geode.Point3D([2., geode.global_epsilon / 2,
103-
0.5 + geode.global_epsilon / 2]))
102+
builder.set_point(2, geode.Point3D([2., geode.GLOBAL_EPSILON / 2,
103+
0.5 + geode.GLOBAL_EPSILON / 2]))
104104

105105
builder.create_edge_with_vertices(0, 1)
106106
builder.create_edge_with_vertices(0, 2)

bindings/python/tests/test-py-pointset-colocation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ def check_colocation2D():
5757
builder.set_point(2, geode.Point2D([0., 0.]))
5858
builder.set_point(3, geode.Point2D([2., 0.]))
5959
builder.set_point(4, geode.Point2D([1., 4.]))
60-
builder.set_point(5, geode.Point2D([2., geode.global_epsilon / 2]))
61-
builder.set_point(6, geode.Point2D([geode.global_epsilon / 1.1, 2.]))
60+
builder.set_point(5, geode.Point2D([2., geode.GLOBAL_EPSILON / 2]))
61+
builder.set_point(6, geode.Point2D([geode.GLOBAL_EPSILON / 1.1, 2.]))
6262

6363
colocation_inspector = inspector.PointSetColocation2D(pointset)
6464
if not colocation_inspector.mesh_has_colocated_points():
@@ -104,8 +104,8 @@ def check_colocation3D():
104104
builder.set_point(3, geode.Point3D([2., 0., 0.]))
105105
builder.set_point(4, geode.Point3D([1., 4., 3.]))
106106
builder.set_point(
107-
5, geode.Point3D([2., geode.global_epsilon / 2, geode.global_epsilon / 2]))
108-
builder.set_point(6, geode.Point3D([geode.global_epsilon / 1.1, 2., 1.]))
107+
5, geode.Point3D([2., geode.GLOBAL_EPSILON / 2, geode.GLOBAL_EPSILON / 2]))
108+
builder.set_point(6, geode.Point3D([geode.GLOBAL_EPSILON / 1.1, 2., 1.]))
109109

110110
colocation_inspector = inspector.PointSetColocation3D(pointset)
111111
if not colocation_inspector.mesh_has_colocated_points():

bindings/python/tests/test-py-solid-colocation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ def check_colocation():
5858
builder.set_point(3, geode.Point3D([5., 2., 0.]))
5959
builder.set_point(4, geode.Point3D([1., 4., 3.]))
6060
builder.set_point(5,
61-
geode.Point3D([5., 2. + geode.global_epsilon / 2, geode.global_epsilon / 2]))
61+
geode.Point3D([5., 2. + geode.GLOBAL_EPSILON / 2, geode.GLOBAL_EPSILON / 2]))
6262
builder.set_point(6, geode.Point3D(
63-
[5. + geode.global_epsilon / 1.1, 2., 1.]))
63+
[5. + geode.GLOBAL_EPSILON / 1.1, 2., 1.]))
6464

6565
colocation_inspector = inspector.SolidMeshColocation3D(solid)
6666
if not colocation_inspector.mesh_has_colocated_points():

bindings/python/tests/test-py-solid-degeneration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def check_degeneration_by_colocalisation():
5959
builder.set_point(1, geode.Point3D([3., 3., 0.]))
6060
builder.set_point(2, geode.Point3D([-0.5, 4., -1.]))
6161
builder.set_point(3, geode.Point3D([1., 3., 3.]))
62-
builder.set_point(4, geode.Point3D([3., 3., -geode.global_epsilon / 2]))
62+
builder.set_point(4, geode.Point3D([3., 3., -geode.GLOBAL_EPSILON / 2]))
6363

6464
builder.create_tetrahedron([0, 1, 3, 2])
6565
builder.create_tetrahedron([0, 1, 4, 2])

bindings/python/tests/test-py-surface-colocation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ def check_colocation2D():
5656
builder.set_point(2, geode.Point2D([0., 0.]))
5757
builder.set_point(3, geode.Point2D([2., 0.]))
5858
builder.set_point(4, geode.Point2D([1., 4.]))
59-
builder.set_point(5, geode.Point2D([2., geode.global_epsilon / 2]))
60-
builder.set_point(6, geode.Point2D([geode.global_epsilon / 1.1, 2.]))
59+
builder.set_point(5, geode.Point2D([2., geode.GLOBAL_EPSILON / 2]))
60+
builder.set_point(6, geode.Point2D([geode.GLOBAL_EPSILON / 1.1, 2.]))
6161

6262
colocation_inspector = inspector.SurfaceMeshColocation2D(surface)
6363
if not colocation_inspector.mesh_has_colocated_points():
@@ -103,8 +103,8 @@ def check_colocation3D():
103103
builder.set_point(3, geode.Point3D([2., 0., 0.]))
104104
builder.set_point(4, geode.Point3D([1., 4., 3.]))
105105
builder.set_point(
106-
5, geode.Point3D([2., geode.global_epsilon / 2, geode.global_epsilon / 2]))
107-
builder.set_point(6, geode.Point3D([geode.global_epsilon / 1.1, 2., 1.]))
106+
5, geode.Point3D([2., geode.GLOBAL_EPSILON / 2, geode.GLOBAL_EPSILON / 2]))
107+
builder.set_point(6, geode.Point3D([geode.GLOBAL_EPSILON / 1.1, 2., 1.]))
108108

109109
colocation_inspector = inspector.SurfaceMeshColocation3D(surface)
110110
if not colocation_inspector.mesh_has_colocated_points():

bindings/python/tests/test-py-surface-degeneration.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def check_degeneration_by_colocalisation2D():
5757
builder.set_point(0, geode.Point2D([0., 2.]))
5858
builder.set_point(1, geode.Point2D([2., 0.]))
5959
builder.set_point(2, geode.Point2D([1., 4.]))
60-
builder.set_point(3, geode.Point2D([2., geode.global_epsilon / 2]))
60+
builder.set_point(3, geode.Point2D([2., geode.GLOBAL_EPSILON / 2]))
6161

6262
builder.create_triangle([0, 1, 2])
6363
builder.create_triangle([2, 1, 3])
@@ -124,8 +124,8 @@ def check_degeneration_by_colocalisation3D():
124124
builder.set_point(0, geode.Point3D([0., 2., 0.]))
125125
builder.set_point(1, geode.Point3D([2., 0., 0.5]))
126126
builder.set_point(2, geode.Point3D([1., 4., 1.]))
127-
builder.set_point(3, geode.Point3D([2., geode.global_epsilon / 2,
128-
0.5 + geode.global_epsilon / 2]))
127+
builder.set_point(3, geode.Point3D([2., geode.GLOBAL_EPSILON / 2,
128+
0.5 + geode.GLOBAL_EPSILON / 2]))
129129

130130
builder.create_triangle([0, 1, 2])
131131
builder.create_triangle([2, 1, 3])

src/geode/inspector/criterion/internal/colocation_impl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ namespace geode
110110
ColocationImpl< dimension, Mesh >::mesh_has_colocated_points() const
111111
{
112112
return mesh_points_colocated_info< dimension, Mesh >(
113-
mesh_, global_epsilon )
113+
mesh_, GLOBAL_EPSILON )
114114
.nb_colocated_points()
115115
> 0;
116116
}
@@ -121,7 +121,7 @@ namespace geode
121121
{
122122
const auto colocated_points_indices =
123123
::colocated_points_groups< dimension, Mesh >(
124-
mesh_, global_epsilon );
124+
mesh_, GLOBAL_EPSILON );
125125
return colocated_points_indices;
126126
}
127127

src/geode/inspector/criterion/internal/degeneration_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ namespace geode
9494
mesh_.edges().edge_vertices( edge_index );
9595
const auto p1 = mesh_.point( edge_vertices[0] );
9696
const auto p2 = mesh_.point( edge_vertices[1] );
97-
return point_point_distance( p1, p2 ) < global_epsilon;
97+
return point_point_distance( p1, p2 ) < GLOBAL_EPSILON;
9898
}
9999

100100
template < class MeshType >

src/geode/inspector/criterion/intersections/model_intersections.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,17 @@ namespace
5959
};
6060

6161
geode::local_index_t model_vertex_position_to_index(
62-
geode::Position position )
62+
geode::POSITION position )
6363
{
64-
if( position == geode::Position::vertex0 )
64+
if( position == geode::POSITION::vertex0 )
6565
{
6666
return 0;
6767
}
68-
if( position == geode::Position::vertex1 )
68+
if( position == geode::POSITION::vertex1 )
6969
{
7070
return 1;
7171
}
72-
if( position == geode::Position::vertex2 )
72+
if( position == geode::POSITION::vertex2 )
7373
{
7474
return 2;
7575
}
@@ -274,21 +274,21 @@ namespace
274274
if( geode::segment_segment_intersection_detection(
275275
{ common_pt0, t1_third_pt }, { common_pt1, t2_third_pt } )
276276
.first
277-
!= geode::Position::outside
277+
!= geode::POSITION::outside
278278
|| geode::segment_segment_intersection_detection(
279279
{ common_pt1, t1_third_pt },
280280
{ common_pt0, t2_third_pt } )
281281
.first
282-
!= geode::Position::outside )
282+
!= geode::POSITION::outside )
283283
{
284284
return true;
285285
}
286286
const auto t1 = mesh1_.triangle( t1_id );
287287
const auto t2 = mesh2_.triangle( t2_id );
288288
if( geode::point_triangle_position( t1_third_pt, t2 )
289-
!= geode::Position::outside
289+
!= geode::POSITION::outside
290290
|| geode::point_triangle_position( t2_third_pt, t1 )
291-
!= geode::Position::outside )
291+
!= geode::POSITION::outside )
292292
{
293293
return true;
294294
}
@@ -312,8 +312,8 @@ namespace
312312
geode::segment_segment_intersection_detection(
313313
t1_edge, { mesh2_.point( edge2_vertices[0] ),
314314
mesh2_.point( edge2_vertices[1] ) } );
315-
if( edge_edge_inter.first == geode::Position::outside
316-
|| edge_edge_inter.first == geode::Position::parallel )
315+
if( edge_edge_inter.first == geode::POSITION::outside
316+
|| edge_edge_inter.first == geode::POSITION::parallel )
317317
{
318318
continue;
319319
}
@@ -353,7 +353,7 @@ namespace
353353
const auto v2_id = v_id == 2 ? 0 : v_id + 1;
354354
const auto intersection = segment_triangle_intersection_detection(
355355
{ t1.vertices()[v_id], t1.vertices()[v2_id] }, t2 );
356-
if( intersection.first != geode::Position::outside )
356+
if( intersection.first != geode::POSITION::outside )
357357
{
358358
if( common_vertices.size() != 1 )
359359
{
@@ -397,12 +397,12 @@ namespace
397397
if( geode::segment_triangle_intersection_detection(
398398
{ mesh1_.point( common_vertices[0][0] ), t1_third_pt }, t2 )
399399
.first
400-
== geode::Position::parallel
400+
== geode::POSITION::parallel
401401
|| geode::segment_triangle_intersection_detection(
402402
{ mesh1_.point( common_vertices[1][0] ), t1_third_pt },
403403
t2 )
404404
.first
405-
== geode::Position::parallel )
405+
== geode::POSITION::parallel )
406406
{
407407
return true;
408408
}

0 commit comments

Comments
 (0)