diff --git a/CHANGELOG.md b/CHANGELOG.md index 0c56b6429..ebd9edd5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm - Added continental geotherm from Chapman (1986) for the Temperature Model in Continental Plate \[Alan Yu; 2025-01-21; [#778](https://github.com/GeodynamicWorldBuilder/WorldBuilder/issues/778), [#797](https://github.com/GeodynamicWorldBuilder/WorldBuilder/pull/797)\] ### Changed +- Modify the implementation of the Bezier curve to account for the special case of colinear points. Also added functionality for determining the arclength of the bezier curve. \[Daniel Douglas; 2025-01-23; [#799](https://github.com/GeodynamicWorldBuilder/WorldBuilder/pull/799)\] - The tian2019 composition model now returns a mass fraction instead of a mass percentage. \[Daniel Douglas; 2024-11-12; [#767](https://github.com/GeodynamicWorldBuilder/WorldBuilder/pull/767)\] - Only link to MPI libraries if the cmake variable USE_MPI has been set. No longer automatically link to MPI if MPI is found. \[Rene Gassmoeller; 2025-01-20; [#792](https://github.com/GeodynamicWorldBuilder/WorldBuilder/pull/792)\] - Change the Doxygen documentation design using the Doxygen Awesome theme. Also fix the main README logo so it appears in the doxygen start page. \[Rene Gassmoeller; 2025-01-21; [#807](https://github.com/GeodynamicWorldBuilder/WorldBuilder/pull/807)\] diff --git a/include/world_builder/features/subducting_plate.h b/include/world_builder/features/subducting_plate.h index 6b1cfde97..6c933f54b 100644 --- a/include/world_builder/features/subducting_plate.h +++ b/include/world_builder/features/subducting_plate.h @@ -236,4 +236,4 @@ namespace WorldBuilder } // namespace Features } // namespace WorldBuilder -#endif +#endif \ No newline at end of file diff --git a/include/world_builder/objects/bezier_curve.h b/include/world_builder/objects/bezier_curve.h index 79401619b..fec4842e2 100644 --- a/include/world_builder/objects/bezier_curve.h +++ b/include/world_builder/objects/bezier_curve.h @@ -66,20 +66,31 @@ namespace WorldBuilder ClosestPointOnCurve closest_point_on_curve_segment(const Point<2> &p, const bool verbose = false) const; /** - * @brief + * @brief Returns a point that lies on the bezier curve at some interval x between coordinate i and coordinate + * i + 1. If x = 0, returns point i, if x = 1, returns point i + 1. * - * @param i - * @param x + * @param i The index of the coordinate that defines the bezier curve. + * @param x The value used to determine additional points that lie on the bezier curve between coordinates i + * and i + 1 * @return Point<2> */ Point<2> operator()(const size_t i, const double x) const; + /** + * @brief Returns the total arc length of the bezier curve from the first user-provided coordinate to the last + * user-provided coordinate. + */ + double get_total_arclength() const + { + return total_arclength; + } + private: std::vector > points; std::vector,2 > > control_points; std::vector lengths; std::vector angles; - + double total_arclength; // The total arc length of the bezier curve }; } diff --git a/source/world_builder/features/interface.cc b/source/world_builder/features/interface.cc index 0678ad063..4f79f6ab7 100644 --- a/source/world_builder/features/interface.cc +++ b/source/world_builder/features/interface.cc @@ -206,4 +206,3 @@ namespace WorldBuilder } // namespace Features } // namespace WorldBuilder - diff --git a/source/world_builder/features/subducting_plate.cc b/source/world_builder/features/subducting_plate.cc index 3e3a7a531..e39985f83 100644 --- a/source/world_builder/features/subducting_plate.cc +++ b/source/world_builder/features/subducting_plate.cc @@ -850,5 +850,4 @@ namespace WorldBuilder */ WB_REGISTER_FEATURE(SubductingPlate, subducting plate) } // namespace Features -} // namespace WorldBuilder - +} // namespace WorldBuilder \ No newline at end of file diff --git a/source/world_builder/features/subducting_plate_models/composition/interface.cc b/source/world_builder/features/subducting_plate_models/composition/interface.cc index 869091352..4ce944fae 100644 --- a/source/world_builder/features/subducting_plate_models/composition/interface.cc +++ b/source/world_builder/features/subducting_plate_models/composition/interface.cc @@ -78,5 +78,4 @@ namespace WorldBuilder } // namespace Composition } // namespace SubductingPlateModels } // namespace Features -} // namespace WorldBuilder - +} // namespace WorldBuilder \ No newline at end of file diff --git a/source/world_builder/objects/bezier_curve.cc b/source/world_builder/objects/bezier_curve.cc index 38c974970..781a0eca1 100644 --- a/source/world_builder/objects/bezier_curve.cc +++ b/source/world_builder/objects/bezier_curve.cc @@ -46,6 +46,14 @@ namespace WorldBuilder std::vector angle_constraints = angle_constraints_input; angle_constraints.resize(n_points,NaN::DQNAN); + // Whether points on the line are colinear. If they are, this is a special case for the bezier curve. + // We determine if the points are colinear by calculating the area of the triangle formed by the points. + // If the area is less than epsilon, the points are colinear. + bool points_are_colinear = false; + const unsigned int max_arclength_discretization = 10; + const double epsilon = 1e-9; + + // if no angle is provided, compute the angle as the average angle between the previous and next point. // The first angle points at the second point and the last angle points at the second to last point. // The check points are set at a distance of 1/10th the line length from the point in the direction of the angle. @@ -71,6 +79,13 @@ namespace WorldBuilder // Calculate the line between the current point and the following point const Point<2> P3P2 = points[p_i+1]-points[p_i]; + // Check if the points are colinear by determining the area of the triangle + // formed by the 3 points. This is a special case of the bezier curve. + if ( std::abs(points[p_i-1][0] * (points[p_i][1] - points[p_i+1][1]) + + points[p_i][0] * (points[p_i+1][1] - points[p_i-1][1]) + + points[p_i+1][0] * (points[p_i-1][1] - points[p_i][1])) < epsilon) + points_are_colinear = true; + // Calculate the angles of the two lines determined above const double angle_p1p2 = atan2(P1P2[1],P1P2[0]); const double angle_p3p1 = atan2(P3P2[1],P3P2[0]); @@ -115,6 +130,7 @@ namespace WorldBuilder control_points[0][0][1] = sin(angles[0])*length*fraction_of_length+p1[1]; control_points[0][1][0] = cos(angles[1])*length*fraction_of_length+p2[0]; control_points[0][1][1] = sin(angles[1])*length*fraction_of_length+p2[1]; + { // Determine which side of the line the control points lie on const bool side_of_line_1 = (p1[0] - p2[0]) * (control_points[0][1][1] - p1[1]) @@ -123,12 +139,43 @@ namespace WorldBuilder const bool side_of_line_2 = (p1[0] - p2[0]) * (p3[1] - p1[1]) - (p1[1] - p2[1]) * (p3[0] - p1[0]) < 0; - if (side_of_line_1 == side_of_line_2) + + // The points are colinear, so we need to check if the control points are within the line p1p2 + if (points_are_colinear) + { + const bool cp_1_within_p1p2 = (std::min(p1[0], p2[0]) - epsilon <= control_points[0][0][0] && control_points[0][0][0] <= std::max(p1[0], p2[0]) + epsilon) && + (std::min(p1[1], p2[1]) - epsilon <= control_points[0][0][1] && control_points[0][0][1] <= std::max(p1[1], p2[1]) + epsilon); + const bool cp_2_within_p1p2 = (std::min(p1[0], p2[0]) - epsilon <= control_points[0][1][0] && control_points[0][1][0] <= std::max(p1[0], p2[0]) + epsilon) && + (std::min(p1[1], p2[1]) - epsilon <= control_points[0][1][1] && control_points[0][1][1] <= std::max(p1[1], p2[1]) + epsilon); + // If the control points are not within the line p1p2, we need to move them within the line p1p2 + if (!cp_1_within_p1p2) + { + control_points[0][0][0] = cos(angles[0]+Consts::PI)*length*fraction_of_length+p1[0]; + control_points[0][0][1] = sin(angles[0]+Consts::PI)*length*fraction_of_length+p1[1]; + } + if (!cp_2_within_p1p2) + { + control_points[0][1][0] = cos(angles[0]+Consts::PI)*length*fraction_of_length+p1[0]; + control_points[0][1][1] = sin(angles[0]+Consts::PI)*length*fraction_of_length+p1[1]; + } + } + + else if (side_of_line_1 == side_of_line_2) { // use a 180 degree rotated angle to create this control_point control_points[0][1][0] = cos(angles[1]+Consts::PI)*length*fraction_of_length+p2[0]; control_points[0][1][1] = sin(angles[1]+Consts::PI)*length*fraction_of_length+p2[1]; } + + // There is no closed-form analytic way to express the arc-length of a cubic bezier curve. We approximate + // the arc-length by dividing the curve into 10 points and piecewise linearly connect them. We also store the + // length of the bezier curve within each of these intervals. We calculate the points that lie on the bezier + // curve using the operator function below. + for (unsigned int t_value = 1; t_value <= max_arclength_discretization; ++t_value) + { + lengths[0] = (operator()(0, static_cast (t_value)/max_arclength_discretization) - operator()(0, static_cast (t_value - 1)/max_arclength_discretization)).norm(); + total_arclength += lengths[0]; + } } } @@ -139,7 +186,6 @@ namespace WorldBuilder const double length = (points[p_i]-points[p_i+1]).norm(); // can be squared control_points[p_i][0][0] = cos(angles[p_i])*length*fraction_of_length+p1[0]; control_points[p_i][0][1] = sin(angles[p_i])*length*fraction_of_length+p1[1]; - { // Determine which side of the line the control points lie on const bool side_of_line_1 = (p1[0] - p2[0]) * (control_points[p_i-1][1][1] - p1[1]) @@ -148,7 +194,31 @@ namespace WorldBuilder const bool side_of_line_2 = (p1[0] - p2[0]) * (control_points[p_i][0][1] - p1[1]) - (p1[1] - p2[1]) * (control_points[p_i][0][0] - p1[0]) < 0; - if (side_of_line_1 == side_of_line_2) + + // The points are colinear, so we need to check if the control points are within the line p1p2 + if (points_are_colinear) + { + const bool cp_1_within_p1p2 = (std::min(p1[0], p2[0]) <= control_points[p_i][0][0] && control_points[p_i][0][0] <= std::max(p1[0], p2[0])) && + (std::min(p1[1], p2[1]) <= control_points[p_i][0][1] && control_points[p_i][0][1] <= std::max(p1[1], p2[1])); + const bool cp_2_within_p1p2 = (std::min(p1[0], p2[0]) <= control_points[p_i][1][0] && control_points[p_i][1][0] <= std::max(p1[0], p2[0])) && + (std::min(p1[1], p2[1]) <= control_points[p_i][1][1] && control_points[p_i][1][1] <= std::max(p1[1], p2[1])); + // If the control points are not within the line p1p2, we need to move them within the line p1p2 + if (!cp_1_within_p1p2) + { + control_points[p_i][0][0] = cos(angles[p_i]+Consts::PI)*length*fraction_of_length+p1[0]; + control_points[p_i][0][1] = sin(angles[p_i]+Consts::PI)*length*fraction_of_length+p1[1]; + } + if (!cp_2_within_p1p2) + { + control_points[p_i][1][0] = cos(angles[p_i]+Consts::PI)*length*fraction_of_length+p1[0]; + control_points[p_i][1][1] = sin(angles[p_i]+Consts::PI)*length*fraction_of_length+p1[1]; + } + } + + // Check to see if the angles are different. If the angles are the same, points p1, p2, and p3 + // are colinear, and therefore the control points will also be colinear with p1, p2 and p3. This + // makes determining which 'side' the control points lie meaningless. + else if (side_of_line_1 == side_of_line_2) { // use a 180 degree rotated angle to create this control_point control_points[p_i][0][0] = cos(angles[p_i]+Consts::PI)*length*fraction_of_length+p1[0]; @@ -156,8 +226,11 @@ namespace WorldBuilder } } - control_points[p_i][1][0] = cos(angles[p_i+1])*length*fraction_of_length+points[p_i+1][0]; - control_points[p_i][1][1] = sin(angles[p_i+1])*length*fraction_of_length+points[p_i+1][1]; + if (!points_are_colinear) + { + control_points[p_i][1][0] = cos(angles[p_i+1])*length*fraction_of_length+p2[0]; + control_points[p_i][1][1] = sin(angles[p_i+1])*length*fraction_of_length+p2[1]; + } if (p_i+1 < n_points-1) { @@ -168,15 +241,55 @@ namespace WorldBuilder const bool side_of_line_2 = (p1[0] - p2[0]) * (p3[1] - p1[1]) - (p1[1] - p2[1]) * (p3[0] - p1[0]) < 0; - if (side_of_line_1 == side_of_line_2) + // The points are colinear, so we need to check if the control points are within the line p1p2 + if (points_are_colinear) + { + const bool cp_1_within_p1p2 = (std::min(p1[0], p2[0]) <= control_points[p_i][0][0] && control_points[p_i][0][0] <= std::max(p1[0], p2[0])) && + (std::min(p1[1], p2[1]) <= control_points[p_i][0][1] && control_points[p_i][0][1] <= std::max(p1[1], p2[1])); + const bool cp_2_within_p1p2 = (std::min(p1[0], p2[0]) <= control_points[p_i][1][0] && control_points[p_i][1][0] <= std::max(p1[0], p2[0])) && + (std::min(p1[1], p2[1]) <= control_points[p_i][1][1] && control_points[p_i][1][1] <= std::max(p1[1], p2[1])); + // If the control points are not within the line p1p2, we need to move them within the line p1p2 + if (!cp_1_within_p1p2) + { + control_points[p_i][0][0] = cos(angles[p_i+1]+Consts::PI)*length*fraction_of_length+p1[0]; + control_points[p_i][0][1] = sin(angles[p_i+1]+Consts::PI)*length*fraction_of_length+p1[1]; + } + if (!cp_2_within_p1p2) + { + control_points[p_i][1][0] = cos(angles[p_i+1]+Consts::PI)*length*fraction_of_length+p1[0]; + control_points[p_i][1][1] = sin(angles[p_i+1]+Consts::PI)*length*fraction_of_length+p1[1]; + } + } + + // Check to see if the angles are different. If the angles are the same, points p1, p2, and p3 + // are colinear, and therefore the control points will also be colinear with p1, p2 and p3. This + // makes determining which 'side' the control points lie meaningless. + else if (side_of_line_1 == side_of_line_2) { // use a 180 degree rotated angle to create this control_point control_points[p_i][1][0] = cos(angles[p_i+1]+Consts::PI)*length*fraction_of_length+p2[0]; control_points[p_i][1][1] = sin(angles[p_i+1]+Consts::PI)*length*fraction_of_length+p2[1]; } } + + // There is no closed-form analytic way to express the arc-length of a cubic bezier curve. We approximate + // the arc-length by dividing the curve into 10 points and piecewise linearly connect them. We also store the + // length of the bezier curve within each of these intervals. We calculate the points that lie on the bezier + // curve using the operator function below. + for (unsigned int t_value = 1; t_value <= max_arclength_discretization; ++t_value) + { + lengths[p_i] = (operator()(p_i, static_cast (t_value)/max_arclength_discretization) - + operator()(p_i, static_cast ((t_value - 1))/max_arclength_discretization)).norm(); + total_arclength += lengths[p_i]; + } } } + + else + { + lengths[0] = (points[0]-points[1]).norm(); + total_arclength = lengths[0]; + } } @@ -188,7 +301,6 @@ namespace WorldBuilder return (1-t)*(1-t)*(1-t)*points[i] + 3*(1-t)*(1-t)*t*control_points[i][0] + 3.*(1-t)*t*t*control_points[i][1]+t*t*t*points[i+1]; } - ClosestPointOnCurve BezierCurve::closest_point_on_curve_segment(const Point<2> &check_point, const bool verbose) const @@ -560,5 +672,6 @@ namespace WorldBuilder } return closest_point_on_curve; } + } // namespace Objects } // namespace WorldBuilder diff --git a/tests/gwb-dat/cartesian_fault_x_and_y_direction/screen-output.log b/tests/gwb-dat/cartesian_fault_x_and_y_direction/screen-output.log index a93276004..32abf4969 100644 --- a/tests/gwb-dat/cartesian_fault_x_and_y_direction/screen-output.log +++ b/tests/gwb-dat/cartesian_fault_x_and_y_direction/screen-output.log @@ -1,5 +1,5 @@ # x y z d g T vx vy vz c0 c1 tag --20000 90000 990000 10000 20 6.44612 7.44612 8.44612 0 1 0 +-20000 90000 990000 10000 20 6.34463 7.34463 8.34463 0 1 0 -20000 580000 990000 10000 20 4 5 6 0 1 0 -20000 910000 990000 10000 20 4 5 6 0 1 0 70000 -30000 990000 10000 10 1 2 3 1 0 0 diff --git a/tests/gwb-dat/cartesian_slab_x_and_y_direction/screen-output.log b/tests/gwb-dat/cartesian_slab_x_and_y_direction/screen-output.log index a93276004..32abf4969 100644 --- a/tests/gwb-dat/cartesian_slab_x_and_y_direction/screen-output.log +++ b/tests/gwb-dat/cartesian_slab_x_and_y_direction/screen-output.log @@ -1,5 +1,5 @@ # x y z d g T vx vy vz c0 c1 tag --20000 90000 990000 10000 20 6.44612 7.44612 8.44612 0 1 0 +-20000 90000 990000 10000 20 6.34463 7.34463 8.34463 0 1 0 -20000 580000 990000 10000 20 4 5 6 0 1 0 -20000 910000 990000 10000 20 4 5 6 0 1 0 70000 -30000 990000 10000 10 1 2 3 1 0 0 diff --git a/tests/gwb-dat/slab_interpolation_simple_CMS/screen-output.log b/tests/gwb-dat/slab_interpolation_simple_CMS/screen-output.log index 85e525f00..f2b5c99f1 100644 --- a/tests/gwb-dat/slab_interpolation_simple_CMS/screen-output.log +++ b/tests/gwb-dat/slab_interpolation_simple_CMS/screen-output.log @@ -56,6 +56,6 @@ -104000 120000 150000 50e3 1622.56 0 0 0 -1 -14000 70000 150000 50e3 1622.56 0 0 0 -1 -163600 124000 -10 200010 1692.16 0 0 0 -1 -90000 200000 0 200000 1692.16 0 0 0 -1 +90000 200000 0 200000 600 0 0 2 0 90000 180000 0 200000 600 0 0 2 0 86000 0 0 200000 1692.16 0 0 0 -1 diff --git a/tests/gwb-dat/smooth_composition_fault/screen-output.log b/tests/gwb-dat/smooth_composition_fault/screen-output.log index 3dfe64611..ced1a66f4 100644 --- a/tests/gwb-dat/smooth_composition_fault/screen-output.log +++ b/tests/gwb-dat/smooth_composition_fault/screen-output.log @@ -1,9 +1,9 @@ # x y z d g T vx vy vz c0 c1 tag -6371000 -24.5 -1. 0 1600 0 0 2 0.145198 0 0 -6365000 -23. -1.3 6e3 1602.64 0 0 2 0.728204 0 0 +6371000 -24.5 -1. 0 1600 0 0 2 0.999675 0 0 +6365000 -23. -1.3 6e3 1602.64 0 0 2 0.728204 0 0 6361000 -23.3 -1.3 10e3 1604.4 0 0 2 0.879318 0 0 -6371000 -23. -1. 0 1600 0 0 2 0.999489 0 0 -6370000 -23.4 -1.66 1e3 1600.44 0 0 2 0.000138979 0 0 +6371000 -23. -1. 0 1600 0 0 2 0.999489 0 0 +6370000 -23.4 -1.66 1e3 1600.44 0 0 0 0 0 -1 6370000 -23.4 -1.45 1e3 1600.44 0 0 2 0.271888 0 0 6370000 -23.4 -1.25 1e3 1600.44 0 0 2 0.968088 0 0 6370000 -23.4 -1.0 1e3 1600.44 0 0 2 0.999865 0 0 diff --git a/tests/unit_tests/approval_tests/approved/unit_test_world_builder.GWB_Bezier_curve.txt b/tests/unit_tests/approval_tests/approved/unit_test_world_builder.GWB_Bezier_curve.txt index 9da046a88..c0d7c3df1 100644 --- a/tests/unit_tests/approval_tests/approved/unit_test_world_builder.GWB_Bezier_curve.txt +++ b/tests/unit_tests/approval_tests/approved/unit_test_world_builder.GWB_Bezier_curve.txt @@ -27,30 +27,31 @@ TITLE [23] = 29.3046 19.2632 [24] = 30 20 [25] = 30.4922 20.4417 -[26] = -0.944 10 -[27] = 0 10 -[28] = 1.424 10 -[29] = 3.232 10 -[30] = 5.328 10 -[31] = 7.616 10 -[32] = 10 10 -[33] = 12.384 10 -[34] = 14.672 10 -[35] = 16.768 10 -[36] = 18.576 10 -[37] = 20 10 -[38] = 20.944 10 -[39] = 19.3866 10.32 -[40] = 20 10 -[41] = 21.0437 10.28 -[42] = 22.3976 11.04 -[43] = 23.9419 12.16 -[44] = 25.5565 13.52 -[45] = 27.1213 15 -[46] = 28.5165 16.48 -[47] = 29.6219 17.84 -[48] = 30.3176 18.96 -[49] = 30.4837 19.72 -[50] = 30 20 -[51] = 28.7466 19.68 +[26] = 34.2854 34.2854 +[27] = -0.944 10 +[28] = 0 10 +[29] = 1.424 10 +[30] = 3.232 10 +[31] = 5.328 10 +[32] = 7.616 10 +[33] = 10 10 +[34] = 12.384 10 +[35] = 14.672 10 +[36] = 16.768 10 +[37] = 18.576 10 +[38] = 20 10 +[39] = 20.944 10 +[40] = 19.3866 10.32 +[41] = 20 10 +[42] = 21.0437 10.28 +[43] = 22.3976 11.04 +[44] = 23.9419 12.16 +[45] = 25.5565 13.52 +[46] = 27.1213 15 +[47] = 28.5165 16.48 +[48] = 29.6219 17.84 +[49] = 30.3176 18.96 +[50] = 30.4837 19.72 +[51] = 30 20 +[52] = 28.7466 19.68 diff --git a/tests/unit_tests/approval_tests/approved/unit_test_world_builder.WorldBuilder_Features__Distance_to_Feature_Plane.txt b/tests/unit_tests/approval_tests/approved/unit_test_world_builder.WorldBuilder_Features__Distance_to_Feature_Plane.txt index ebb7e5ae7..ca366e920 100644 --- a/tests/unit_tests/approval_tests/approved/unit_test_world_builder.WorldBuilder_Features__Distance_to_Feature_Plane.txt +++ b/tests/unit_tests/approval_tests/approved/unit_test_world_builder.WorldBuilder_Features__Distance_to_Feature_Plane.txt @@ -3,10 +3,10 @@ Test [0] = 7141.78 [1] = 70.7107 -[2] = 482.865 -[3] = 153.282 -[4] = 468.712 -[5] = 139.151 +[2] = 481.055 +[3] = 155.091 +[4] = 466.902 +[5] = 140.96 [6] = 1070.96 [7] = 6141.53 [8] = inf diff --git a/tests/unit_tests/approval_tests/approved/unit_test_world_builder.WorldBuilder_Features__Fault.txt b/tests/unit_tests/approval_tests/approved/unit_test_world_builder.WorldBuilder_Features__Fault.txt index 758d9e628..162048457 100644 --- a/tests/unit_tests/approval_tests/approved/unit_test_world_builder.WorldBuilder_Features__Fault.txt +++ b/tests/unit_tests/approval_tests/approved/unit_test_world_builder.WorldBuilder_Features__Fault.txt @@ -270,37 +270,37 @@ Test [266] = 0 [267] = 0 [268] = 0 -[269] = 4.38481 -[270] = 4.38481 -[271] = 4.38481 -[272] = 4.38481 -[273] = 4.38481 -[274] = 4.38481 +[269] = 4.74577 +[270] = 4.74577 +[271] = 4.74577 +[272] = 4.74577 +[273] = 4.74577 +[274] = 4.74577 [275] = 1668.63 [276] = 1692.16 [277] = 0 [278] = 0 [279] = 0 -[280] = 0.0962028 +[280] = 0.186442 [281] = 0 [282] = 0 [283] = 0 -[284] = 0.0962028 +[284] = 0.186442 [285] = 0 [286] = 0 [287] = 0 -[288] = 0.0962028 -[289] = 0.288608 +[288] = 0.186442 +[289] = 0.559327 [290] = 0 [291] = 0 [292] = 0 -[293] = 0.0962028 -[294] = 0.288608 +[293] = 0.186442 +[294] = 0.559327 [295] = 0 [296] = 0 [297] = 0 -[298] = 0.0962028 -[299] = 0.288608 +[298] = 0.186442 +[299] = 0.559327 [300] = 0 [301] = 0 [302] = 0 @@ -311,40 +311,40 @@ Test [307] = 0 [308] = 0 [309] = 0 -[310] = 0.288608 -[311] = 0.615189 +[310] = 0.559327 +[311] = 0.25423 [312] = 0 -[313] = 4.47068 -[314] = 4.47068 -[315] = 4.47068 -[316] = 4.47068 -[317] = 4.47068 -[318] = 4.47068 +[313] = 4.80151 +[314] = 4.80151 +[315] = 4.80151 +[316] = 4.80151 +[317] = 4.80151 +[318] = 4.80151 [319] = 1668.63 [320] = 1692.16 [321] = 0 [322] = 0 [323] = 0 -[324] = 0.11767 +[324] = 0.200377 [325] = 0 [326] = 0 [327] = 0 -[328] = 0.11767 +[328] = 0.200377 [329] = 0 [330] = 0 [331] = 0 -[332] = 0.11767 -[333] = 0.35301 +[332] = 0.200377 +[333] = 0.601132 [334] = 0 [335] = 0 [336] = 0 -[337] = 0.11767 -[338] = 0.35301 +[337] = 0.200377 +[338] = 0.601132 [339] = 0 [340] = 0 [341] = 0 -[342] = 0.11767 -[343] = 0.35301 +[342] = 0.200377 +[343] = 0.601132 [344] = 0 [345] = 0 [346] = 0 @@ -355,8 +355,8 @@ Test [351] = 0 [352] = 0 [353] = 0 -[354] = 0.35301 -[355] = 0.529321 +[354] = 0.601132 +[355] = 0.198491 [356] = 0 [357] = 12 [358] = 12 @@ -364,7 +364,7 @@ Test [360] = 12 [361] = 12 [362] = 12 -[363] = 12 +[363] = 11 [364] = 11 [365] = 11 [366] = 11 @@ -372,22 +372,22 @@ Test [368] = 11 [369] = 11 [370] = 11 -[371] = 11 -[372] = 10.4159 -[373] = 10.4159 -[374] = 10.4159 -[375] = 10.4159 -[376] = 10.4159 -[377] = 10.4159 -[378] = 10.4159 +[371] = 10.1755 +[372] = 10.1755 +[373] = 10.1755 +[374] = 10.1755 +[375] = 10.1755 +[376] = 10.1755 +[377] = 10.1755 +[378] = 10 [379] = 10 [380] = 10 [381] = 10 [382] = 10 -[383] = 10.4159 -[384] = 10.4159 -[385] = 10.4159 -[386] = 10.4159 +[383] = 1654.67 +[384] = 1656.99 +[385] = 1659.31 +[386] = 1661.64 [387] = 1668.63 [388] = 1673.31 [389] = 1678 @@ -432,8 +432,8 @@ Test [428] = 0: s=0, R=1 0 0 0 1 0 0 0 1 1: s=0, R=1 0 0 0 1 0 0 0 1 2: s=0, R=1 0 0 0 1 0 0 0 1 [429] = 0: s=0.4, R=-1 0 0 0 1 0 0 0 -1 1: s=0.4, R=-1 0 0 0 1 0 0 0 -1 2: s=0.4, R=-1 0 0 0 1 0 0 0 -1 [430] = 0: s=0.4, R=-1 0 0 0 1 0 0 0 -1 1: s=0.4, R=-1 0 0 0 1 0 0 0 -1 2: s=0.4, R=-1 0 0 0 1 0 0 0 -1 -[431] = 0: s=0.276962, R=-0.734163 0 0 0 1 0 0 0 -0.734163 1: s=0.276962, R=-0.734163 0 0 0 1 0 0 0 -0.734163 2: s=0.276962, R=-0.734163 0 0 0 1 0 0 0 -0.734163 -[432] = 0: s=0.5, R=-0.871652 -0.161063 -0.462905 -0.469023 0.548252 0.692414 0.142266 0.820657 -0.553428 1: s=0.5, R=-0.272306 -0.076158 0.959192 -0.659779 -0.71083 -0.243744 0.700386 -0.699228 0.143316 -[433] = 0: s=0.666867, R=0.656083 0.703199 0.273982 -0.631041 0.710284 -0.311903 -0.413935 0.0317407 0.909753 1: s=0.333133, R=-0.63199 0.515894 -0.57831 0.774573 0.444575 -0.449878 0.0250133 -0.732261 -0.680564 -[434] = 0: s=0.668947, R=-0.566111 0.787795 -0.242688 -0.350613 -0.496563 -0.794038 -0.746048 -0.364424 0.557321 1: s=0.331053, R=0.666391 0.665895 -0.335419 -0.694912 0.391651 -0.603081 -0.270222 0.634974 0.723732 +[431] = 0: s=0.349154, R=-0.952809 0 0 0 1 0 0 0 -0.952809 1: s=0.349154, R=-0.952809 0 0 0 1 0 0 0 -0.952809 2: s=0.349154, R=-0.952809 0 0 0 1 0 0 0 -0.952809 +[432] = 0: s=0.5, R=-0.847105 -0.257589 -0.464824 -0.381113 0.904039 0.193562 0.370359 0.341117 -0.863987 1: s=0.5, R=-0.32546 -0.111865 0.938915 -0.840886 -0.419864 -0.341503 0.432419 -0.900667 0.0425834 +[433] = 0: s=0.716291, R=0.442826 0.859235 -0.256164 -0.89572 0.436659 -0.0837572 0.0398892 0.266541 0.962998 1: s=0.283709, R=-0.281792 0.702162 -0.653882 0.885702 0.452424 0.104134 0.368951 -0.549801 -0.749396 +[434] = 0: s=0.668172, R=-0.421933 0.905853 0.0374546 -0.751694 -0.326433 -0.57306 -0.506882 -0.269947 0.818657 1: s=0.331828, R=0.664415 0.422105 -0.616749 -0.747268 0.388387 -0.539208 0.0119345 0.819136 0.573476 diff --git a/tests/unit_tests/approval_tests/approved/unit_test_world_builder.WorldBuilder_Features__Oceanic_Plate.txt b/tests/unit_tests/approval_tests/approved/unit_test_world_builder.WorldBuilder_Features__Oceanic_Plate.txt index 8bbda14d0..94056707c 100644 --- a/tests/unit_tests/approval_tests/approved/unit_test_world_builder.WorldBuilder_Features__Oceanic_Plate.txt +++ b/tests/unit_tests/approval_tests/approved/unit_test_world_builder.WorldBuilder_Features__Oceanic_Plate.txt @@ -231,7 +231,7 @@ Test [227] = 0 [228] = 0 [229] = 293.15 -[230] = 303.657 +[230] = 303.656 [231] = 1710.93 [232] = 1720.82 [233] = 0 diff --git a/tests/unit_tests/approval_tests/approved/unit_test_world_builder.WorldBuilder_Features__Subducting_Plate.txt b/tests/unit_tests/approval_tests/approved/unit_test_world_builder.WorldBuilder_Features__Subducting_Plate.txt index 302eaf271..547fc271f 100644 --- a/tests/unit_tests/approval_tests/approved/unit_test_world_builder.WorldBuilder_Features__Subducting_Plate.txt +++ b/tests/unit_tests/approval_tests/approved/unit_test_world_builder.WorldBuilder_Features__Subducting_Plate.txt @@ -65,13 +65,13 @@ Test [61] = 1600.45 [62] = 1602.24 [63] = 1604.49 -[64] = 10 +[64] = 1611.24 [65] = 10 [66] = 10 [67] = 11 [68] = 11 [69] = 1692.16 -[70] = 1 +[70] = 1600 [71] = 1.00008 [72] = 1.00042 [73] = 1.00085 @@ -87,7 +87,7 @@ Test [83] = 0 [84] = 0 [85] = 0 -[86] = 1 +[86] = 0 [87] = 0 [88] = 0 [89] = 0 @@ -187,11 +187,11 @@ Test [183] = 0 [184] = 1600 [185] = 1600 -[186] = 4.38481 -[187] = 4.38481 -[188] = 4.38481 -[189] = 4.38481 -[190] = 4.38481 +[186] = 4.74577 +[187] = 4.74577 +[188] = 4.74577 +[189] = 4.74577 +[190] = 4.74577 [191] = 1692.16 [192] = 0 [193] = 0 @@ -204,23 +204,23 @@ Test [200] = 0 [201] = 0 [202] = 0 -[203] = 0.0962028 -[204] = 0.288608 +[203] = 0.186442 +[204] = 0.559327 [205] = 0 [206] = 0 [207] = 0 -[208] = 0.0962028 -[209] = 0.288608 +[208] = 0.186442 +[209] = 0.559327 [210] = 0 [211] = 0 [212] = 0 -[213] = 0.0962028 -[214] = 0.288608 +[213] = 0.186442 +[214] = 0.559327 [215] = 0 [216] = 0 [217] = 0 -[218] = 0.0962028 -[219] = 0.288608 +[218] = 0.186442 +[219] = 0.559327 [220] = 0 [221] = 0 [222] = 0 @@ -231,11 +231,11 @@ Test [227] = 0 [228] = 1600 [229] = 1600 -[230] = 4.47068 -[231] = 4.47068 -[232] = 4.47068 -[233] = 4.47068 -[234] = 4.47068 +[230] = 4.80151 +[231] = 4.80151 +[232] = 4.80151 +[233] = 4.80151 +[234] = 4.80151 [235] = 1692.16 [236] = 0 [237] = 0 @@ -248,23 +248,23 @@ Test [244] = 0 [245] = 0 [246] = 0 -[247] = 0.11767 -[248] = 0.35301 +[247] = 0.200377 +[248] = 0.601132 [249] = 0 [250] = 0 [251] = 0 -[252] = 0.11767 -[253] = 0.35301 +[252] = 0.200377 +[253] = 0.601132 [254] = 0 [255] = 0 [256] = 0 -[257] = 0.11767 -[258] = 0.35301 +[257] = 0.200377 +[258] = 0.601132 [259] = 0 [260] = 0 [261] = 0 -[262] = 0.11767 -[263] = 0.35301 +[262] = 0.200377 +[263] = 0.601132 [264] = 0 [265] = 0 [266] = 0 @@ -278,7 +278,7 @@ Test [274] = 10 [275] = 11 [276] = 11 -[277] = 1716.01 +[277] = 12 [278] = 1740.21 [279] = 1600 [280] = 0 diff --git a/tests/unit_tests/approval_tests/approved/unit_test_world_builder.WorldBuilder_Parameters.txt b/tests/unit_tests/approval_tests/approved/unit_test_world_builder.WorldBuilder_Parameters.txt index dbae6f707..2e11b77e7 100644 --- a/tests/unit_tests/approval_tests/approved/unit_test_world_builder.WorldBuilder_Parameters.txt +++ b/tests/unit_tests/approval_tests/approved/unit_test_world_builder.WorldBuilder_Parameters.txt @@ -44,7 +44,7 @@ TITLE [40] = 110.526 [41] = 236.502 [42] = 240 -[43] = 246.543 +[43] = 246.542 [44] = 2 [45] = 1 [46] = 1 diff --git a/tests/unit_tests/approval_tests/approved/unit_test_world_builder.WorldBuilder_Utilities_function__distance_point_from_curved_planes_cartesian_part_1.txt b/tests/unit_tests/approval_tests/approved/unit_test_world_builder.WorldBuilder_Utilities_function__distance_point_from_curved_planes_cartesian_part_1.txt index b92fc1d9f..9a2503252 100644 --- a/tests/unit_tests/approval_tests/approved/unit_test_world_builder.WorldBuilder_Utilities_function__distance_point_from_curved_planes_cartesian_part_1.txt +++ b/tests/unit_tests/approval_tests/approved/unit_test_world_builder.WorldBuilder_Utilities_function__distance_point_from_curved_planes_cartesian_part_1.txt @@ -27,243 +27,244 @@ TITLE [23] = 10 [24] = 26.62 [25] = 10 -[26] = 0 -[27] = 14.1421 -[28] = 0.793701 -[29] = 0 -[30] = 1 -[31] = 0 -[32] = 10 +[26] = 20 +[27] = 0 +[28] = 14.1421 +[29] = 0.793701 +[30] = 0 +[31] = 1 +[32] = 0 [33] = 10 [34] = 10 [35] = 10 -[36] = 1 -[37] = 14.1421 -[38] = 0.793701 -[39] = 0 -[40] = 1 +[36] = 10 +[37] = 1 +[38] = 14.1421 +[39] = 0.793701 +[40] = 0 [41] = 1 -[42] = 10 +[42] = 1 [43] = 10 [44] = 10 [45] = 10 -[46] = 1 +[46] = 10 [47] = 1 -[48] = 0 +[48] = 1 [49] = 0 [50] = 0 -[51] = 1 -[52] = 0 -[53] = 10 +[51] = 0 +[52] = 1 +[53] = 0 [54] = 10 [55] = 10 -[56] = 0 -[57] = 14.1421 -[58] = 0.793701 -[59] = 0 -[60] = 1 -[61] = 0 -[62] = 10 +[56] = 10 +[57] = 0 +[58] = 14.1421 +[59] = 0.793701 +[60] = 0 +[61] = 1 +[62] = 0 [63] = 10 [64] = 10 [65] = 10 -[66] = 1 +[66] = 10 [67] = 1 -[68] = 0 +[68] = 1 [69] = 0 [70] = 0 -[71] = 1 -[72] = 0 -[73] = 10 +[71] = 0 +[72] = 1 +[73] = 0 [74] = 10 [75] = 10 -[76] = 0 -[77] = 28.2843 -[78] = 0.793701 -[79] = 0 -[80] = 1 -[81] = 0.0707107 -[82] = 20 -[83] = 10 +[76] = 10 +[77] = 0 +[78] = 28.2843 +[79] = 0.793701 +[80] = 0 +[81] = 1 +[82] = 0.0707107 +[83] = 20 [84] = 10 [85] = 10 -[86] = 1 +[86] = 10 [87] = 1 [88] = 1 -[89] = 0 +[89] = 1 [90] = 0 [91] = 0 [92] = 0 -[93] = nan +[93] = 0 [94] = nan -[95] = 10 -[96] = 0 -[97] = inf -[98] = 0 +[95] = nan +[96] = 10 +[97] = 0 +[98] = inf [99] = 0 [100] = 0 [101] = 0 [102] = 0 -[103] = nan +[103] = 0 [104] = nan -[105] = 10 -[106] = 1 +[105] = nan +[106] = 10 [107] = 1 -[108] = 0 +[108] = 1 [109] = 0 [110] = 0 -[111] = 1 -[112] = 0 -[113] = 1 +[111] = 0 +[112] = 1 +[113] = 0 [114] = 1 -[115] = 0 +[115] = 1 [116] = 0 [117] = 0 -[118] = 1 -[119] = 0 -[120] = nan +[118] = 0 +[119] = 1 +[120] = 0 [121] = nan -[122] = 10 -[123] = 1 +[122] = nan +[123] = 10 [124] = 1 -[125] = 0 +[125] = 1 [126] = 0 [127] = 0 -[128] = 1 -[129] = 0 -[130] = 1 +[128] = 0 +[129] = 1 +[130] = 0 [131] = 1 -[132] = 0 +[132] = 1 [133] = 0 [134] = 0 -[135] = 1 -[136] = 0 -[137] = nan +[135] = 0 +[136] = 1 +[137] = 0 [138] = nan -[139] = 10 -[140] = -3.53553 -[141] = 10.6066 -[142] = 0.793701 -[143] = 0 +[139] = nan +[140] = 10 +[141] = -3.53553 +[142] = 10.6066 +[143] = 0.793701 [144] = 0 -[145] = 0.75 -[146] = 7.5 -[147] = 10 +[145] = 0 +[146] = 0.75 +[147] = 7.5 [148] = 10 [149] = 10 -[150] = 3.53553 -[151] = 10.6066 -[152] = 0.793701 -[153] = 0 +[150] = 10 +[151] = 3.53553 +[152] = 10.6066 +[153] = 0.793701 [154] = 0 -[155] = 0.75 -[156] = 3.53553 -[157] = 17.6777 -[158] = 0.793701 -[159] = 0 -[160] = 1 -[161] = 0.0176777 -[162] = 3.53553 -[163] = 17.6777 -[164] = 0.793701 -[165] = 0 -[166] = 1 -[167] = 0.0176777 -[168] = 1 -[169] = 14.1421 -[170] = 0.597436 -[171] = 1 +[155] = 0 +[156] = 0.75 +[157] = 3.53553 +[158] = 17.6777 +[159] = 0.793701 +[160] = 0 +[161] = 1 +[162] = 0.0176777 +[163] = 3.53553 +[164] = 17.6777 +[165] = 0.793701 +[166] = 0 +[167] = 1 +[168] = 0.0176777 +[169] = 0 +[170] = inf +[171] = 0 [172] = 0 [173] = 0 [174] = 1 -[175] = 10.8239 -[176] = 0.5 -[177] = 0 +[175] = 1 +[176] = 10.8239 +[177] = 0.822535 [178] = 0 -[179] = 0.765367 -[180] = -0.460073 -[181] = 12.0181 -[182] = 0.597436 -[183] = 1 -[184] = 0 -[185] = 0.849808 -[186] = 0 -[187] = 14.1421 -[188] = 1 +[179] = 0 +[180] = 0.765367 +[181] = -1.51925 +[182] = 11.9306 +[183] = 0.822535 +[184] = 1 +[185] = 0 +[186] = 0.843618 +[187] = 0 +[188] = 14.1421 [189] = 1 -[190] = 0 -[191] = 1 -[192] = 0 -[193] = 100 -[194] = 0.5 -[195] = 0 +[190] = 1 +[191] = 0 +[192] = 1 +[193] = -9.49552e-11 +[194] = 100 +[195] = 0.822535 [196] = 0 -[197] = 1 -[198] = 0 -[199] = 101 -[200] = 0.5 -[201] = 0 -[202] = 1 -[203] = 0.01 -[204] = 0 -[205] = 200 -[206] = 0.5 -[207] = 0 -[208] = 1 +[197] = 0 +[198] = 1 +[199] = -9.49552e-11 +[200] = 101 +[201] = 0.822535 +[202] = 0 +[203] = 1 +[204] = 0.01 +[205] = -9.49552e-11 +[206] = 200 +[207] = 0.822535 +[208] = 0 [209] = 1 [210] = 1 [211] = 1 -[212] = 0 +[212] = 1 [213] = 0 [214] = 0 [215] = 0 [216] = 0 [217] = 0 -[218] = 75 -[219] = 0.597436 -[220] = 1 +[218] = 0 +[219] = 75 +[220] = 0.822535 [221] = 1 -[222] = 0.0694698 -[223] = 0 -[224] = 76 -[225] = 0.597436 -[226] = 1 +[222] = 1 +[223] = 0.273923 +[224] = 0 +[225] = 76 +[226] = 0.822535 [227] = 1 -[228] = 0.0837294 -[229] = 0 -[230] = inf -[231] = 0 +[228] = 1 +[229] = 0.290909 +[230] = 0 +[231] = inf [232] = 0 [233] = 0 [234] = 0 -[235] = inf +[235] = 0 [236] = inf -[237] = 0 +[237] = inf [238] = 0 [239] = 0 [240] = 0 -[241] = 1 -[242] = 50 -[243] = 1 +[241] = 0 +[242] = 1 +[243] = 50 [244] = 1 -[245] = 0 -[246] = 1 +[245] = 1 +[246] = 0 [247] = 1 -[248] = 51 -[249] = 1 +[248] = 1 +[249] = 51 [250] = 1 [251] = 1 -[252] = 0.02 -[253] = 1 -[254] = 100 -[255] = 1 +[252] = 1 +[253] = 0.02 +[254] = 1 +[255] = 100 [256] = 1 [257] = 1 [258] = 1 -[259] = inf +[259] = 1 [260] = inf -[261] = 0 +[261] = inf [262] = 0 [263] = 0 [264] = 0 +[265] = 0 diff --git a/tests/unit_tests/approval_tests/approved/unit_test_world_builder.WorldBuilder_Utilities_function__distance_point_from_curved_planes_cartesian_part_2.txt b/tests/unit_tests/approval_tests/approved/unit_test_world_builder.WorldBuilder_Utilities_function__distance_point_from_curved_planes_cartesian_part_2.txt index f419e1da2..6bf989391 100644 --- a/tests/unit_tests/approval_tests/approved/unit_test_world_builder.WorldBuilder_Utilities_function__distance_point_from_curved_planes_cartesian_part_2.txt +++ b/tests/unit_tests/approval_tests/approved/unit_test_world_builder.WorldBuilder_Utilities_function__distance_point_from_curved_planes_cartesian_part_2.txt @@ -3,46 +3,46 @@ TITLE [0] = 1 [1] = 15.708 -[2] = 0.5 +[2] = 0.822535 [3] = 0 [4] = 1 [5] = 1 [6] = 10 [7] = 5 [8] = 15.708 -[9] = 0.5 +[9] = 0.822535 [10] = 0 [11] = 1 [12] = 1 [13] = 10 [14] = -5 [15] = 15.708 -[16] = 0.5 +[16] = 0.822535 [17] = 0 [18] = 1 [19] = 1 [20] = 10 [21] = 0 [22] = 7.85398 -[23] = 0.5 +[23] = 0.822535 [24] = 0 [25] = 0 [26] = 1 [27] = 2.92893 [28] = -10 [29] = 7.85398 -[30] = 0.5 +[30] = 0.822535 [31] = 0 [32] = 0 [33] = 1 [34] = 2.92893 [35] = 0 [36] = 0 -[37] = 0.5 +[37] = 0.822535 [38] = 0 -[39] = 0 -[40] = 0 -[41] = 0 +[39] = 1 +[40] = 0.999997 +[41] = 9.99998 [42] = 1 [43] = 1 [44] = 0 @@ -52,111 +52,111 @@ TITLE [48] = 0 [49] = 0 [50] = 7.85398 -[51] = 0.5 +[51] = 0.822535 [52] = 0 [53] = 1 [54] = 1 [55] = 5 [56] = 0 [57] = 3.92699 -[58] = 0.5 +[58] = 0.822535 [59] = 0 [60] = 0 [61] = 1 [62] = 0 [63] = 15.708 -[64] = 0.5 +[64] = 0.822535 [65] = 0 [66] = 0 [67] = 1 [68] = 0 [69] = 7.85398 -[70] = 0.5 +[70] = 0.822535 [71] = 0 [72] = 0 [73] = 0.5 [74] = 0 [75] = 23.5619 -[76] = 0.5 +[76] = 0.822535 [77] = 0 [78] = 1 [79] = 0.5 [80] = 17.0711 [81] = 0 [82] = 0 -[83] = 0.5 +[83] = 0.822535 [84] = 0 [85] = 1 [86] = 1 [87] = 0 [88] = 15.708 -[89] = 0.5 +[89] = 0.822535 [90] = 0 [91] = 0 [92] = 0.5 [93] = 0 [94] = 31.4159 -[95] = 0.5 +[95] = 0.822535 [96] = 0 [97] = 0 [98] = 1 [99] = -1 [100] = 31.4159 -[101] = 0.5 +[101] = 0.822535 [102] = 0 [103] = 0 [104] = 1 [105] = 1 [106] = 31.4159 -[107] = 0.5 +[107] = 0.822535 [108] = 0 [109] = 0 [110] = 1 [111] = 0 [112] = 47.1239 -[113] = 0.5 +[113] = 0.822535 [114] = 0 [115] = 1 [116] = 1 [117] = -1 [118] = 47.1239 -[119] = 0.5 +[119] = 0.822535 [120] = 0 [121] = 1 [122] = 1 [123] = 1 [124] = 47.1239 -[125] = 0.5 +[125] = 0.822535 [126] = 0 [127] = 1 [128] = 1 [129] = 0 [130] = 15.708 -[131] = 0.5 +[131] = 0.822535 [132] = 0 [133] = 0 [134] = 0.333333 [135] = 0 [136] = 31.4159 -[137] = 0.5 +[137] = 0.822535 [138] = 0 [139] = 0 [140] = 0.666667 [141] = 0 [142] = 47.1239 -[143] = 0.5 +[143] = 0.822535 [144] = 0 [145] = 0 [146] = 1 [147] = 0 [148] = 54.9779 -[149] = 0.5 +[149] = 0.822535 [150] = 0 [151] = 1 [152] = 1 [153] = -7.32051 [154] = 9.55317 -[155] = 0.5 +[155] = 0.822535 [156] = 0 [157] = 1 [158] = 0.216347 @@ -168,103 +168,103 @@ TITLE [164] = 0 [165] = 2.34633 [166] = 11.781 -[167] = 0.5 +[167] = 0.822535 [168] = 0 [169] = 1 [170] = 0.5 -[171] = 0 -[172] = 15.708 -[173] = 0.5 +[171] = 2.37085 +[172] = 16.6047 +[173] = 0.822535 [174] = 0 [175] = 0 -[176] = 0.666667 +[176] = 0.704726 [177] = 0 [178] = 15.708 -[179] = 0.5 +[179] = 0.822535 [180] = 0 [181] = 0 [182] = 1 [183] = 0 [184] = 0 -[185] = 0.5 +[185] = 0.822535 [186] = 0 [187] = 1 [188] = 1 [189] = 0 [190] = 23.5619 -[191] = 0.5 +[191] = 0.822535 [192] = 0 [193] = 1 [194] = 0.5 [195] = 0 [196] = 15.7254 -[197] = 0.5 +[197] = 0.822535 [198] = 0 [199] = 1 [200] = 0.00111111 [201] = 0 [202] = 15.7081 -[203] = 0.5 +[203] = 0.822535 [204] = 0 [205] = 1 [206] = 1.11111e-05 [207] = 1 [208] = 7.85398 -[209] = 0.5 +[209] = 0.822535 [210] = 0 [211] = 0 [212] = 0 [213] = 1 [214] = 7.85398 -[215] = 0.5 +[215] = 0.822535 [216] = 0 [217] = 0 [218] = 0 [219] = 1 [220] = 7.85398 -[221] = 0.5 +[221] = 0.822535 [222] = 0 [223] = 0 [224] = 0 [225] = 1 [226] = 8.02851 -[227] = 0.5 +[227] = 0.822535 [228] = 0 [229] = 1 [230] = 0.0222222 [231] = 0.0697228 [232] = 7.95708 -[233] = 0.5 +[233] = 0.822535 [234] = 0 [235] = 1 [236] = 0.0131266 [237] = -0.0692053 [238] = 8.10095 -[239] = 0.5 +[239] = 0.822535 [240] = 0 [241] = 1 [242] = 0.031445 [243] = 0 [244] = 0 -[245] = 0.5 +[245] = 0.822535 [246] = 0 [247] = 1 [248] = 1 [249] = 0 [250] = 0 -[251] = 0.5 +[251] = 0.822535 [252] = 0 [253] = 0 [254] = 0 [255] = 0 [256] = 0 -[257] = 0.5 +[257] = 0.822535 [258] = 0 [259] = 0 [260] = 0 -[261] = 1 -[262] = 1 -[263] = 0.714955 +[261] = 0 +[262] = 0 +[263] = 0 [264] = 0 [265] = 0 [266] = 0 @@ -276,7 +276,7 @@ TITLE [272] = 0 [273] = 0 [274] = 0 -[275] = 0.597436 +[275] = 0.822535 [276] = 1 [277] = 0 [278] = 0 diff --git a/tests/unit_tests/unit_test_world_builder.cc b/tests/unit_tests/unit_test_world_builder.cc index dfd56e54f..79b71b657 100644 --- a/tests/unit_tests/unit_test_world_builder.cc +++ b/tests/unit_tests/unit_test_world_builder.cc @@ -4934,6 +4934,7 @@ TEST_CASE("GWB Bezier curve") approval_tests.emplace_back(bezier_curve(1,1.0)); approval_tests.emplace_back(bezier_curve(1,1.1)); + approval_tests.emplace_back(bezier_curve.get_total_arclength(), bezier_curve.get_total_arclength(), cartesian); const Objects::BezierCurve bezier_curve_defined(coordinates, { @@ -5038,6 +5039,7 @@ TEST_CASE("WorldBuilder Utilities function: distance_point_from_curved_planes ca approval_tests.emplace_back(bezier_curve(0,1.0)[1]); approval_tests.emplace_back(bezier_curve(0,1.1)[0]); approval_tests.emplace_back(bezier_curve(0,1.1)[1]); + approval_tests.emplace_back(bezier_curve.get_total_arclength()); WorldBuilder::Utilities::PointDistanceFromCurvedPlanes distance_from_planes =