fixed bug with zero area section modulus returning nans
This commit is contained in:
parent
2808e41238
commit
cdf68039f7
@ -638,6 +638,7 @@ public:
|
||||
|
||||
auto compute_elastic_section_modulus = [&line_dir](
|
||||
const Vec3f ¢roid_accumulator, const Vec2f &second_moment_of_area_accumulator, const float &area) {
|
||||
if (area < EPSILON) return 0.0f;
|
||||
Vec3f centroid = centroid_accumulator / area;
|
||||
Vec2f variance = (second_moment_of_area_accumulator / area
|
||||
- centroid.head<2>().cwiseProduct(centroid.head<2>()));
|
||||
|
@ -10,7 +10,7 @@ namespace SupportSpotsGenerator {
|
||||
struct Params {
|
||||
// the algorithm should use the following units for all computations: distance [mm], mass [g], time [s], force [N]
|
||||
const float bridge_distance = 12.0f; //mm
|
||||
const float bridge_distance_decrease_by_curvature_factor = 5.0f; // allowed bridge distance = bridge_distance / (this factor * (curvature / PI) )
|
||||
const float bridge_distance_decrease_by_curvature_factor = 3.0f; // allowed bridge distance = bridge_distance / (this factor * (curvature / PI) )
|
||||
|
||||
const float min_distance_between_support_points = 3.0f; //mm
|
||||
const float support_points_interface_radius = 0.6f; // mm
|
||||
|
Loading…
Reference in New Issue
Block a user