From 2885cd74e3b1f45cadad352a16c8a2588798f9f2 Mon Sep 17 00:00:00 2001 From: Thomas Krijnen Date: Mon, 28 Sep 2020 14:16:48 +0200 Subject: [PATCH] infinity as 1e9 --- src/ifcgeom/kernels/cgal/CgalKernel.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ifcgeom/kernels/cgal/CgalKernel.cpp b/src/ifcgeom/kernels/cgal/CgalKernel.cpp index 190b805bc9..4b0a550ce2 100644 --- a/src/ifcgeom/kernels/cgal/CgalKernel.cpp +++ b/src/ifcgeom/kernels/cgal/CgalKernel.cpp @@ -164,7 +164,7 @@ bool CgalKernel::convert(const taxonomy::shell* l, cgal_shape_t& shape) { auto faces = l->children_as(); if (faces.size() > 1000) { - static double inf = std::numeric_limits::infinity(); + static double inf = 1.e9; // std::numeric_limits::infinity(); std::pair minmax( Eigen::Vector3d(+inf, +inf, +inf), Eigen::Vector3d(-inf, -inf, -inf) @@ -701,7 +701,7 @@ bool CgalKernel::convert(const taxonomy::loop* loop, cgal_wire_t& result) { std::vector segments; loop_to_segments(polygon, segments); - auto inf = std::numeric_limits::infinity(); + auto inf = 1.e9; // std::numeric_limits::infinity(); double min_len = +inf; for (auto& s : segments) { auto l = std::sqrt(CGAL::to_double(s.squared_length())); @@ -1280,7 +1280,7 @@ bool CgalKernel::process_as_2d_polygon(const taxonomy::boolean_result* br, std:: namespace { bool orthogonal_edge_length(const cgal_shape_t& shape, const cgal_direction_t& face_normal, std::pair& distances) { - static double inf = std::numeric_limits::infinity(); + static double inf = 1.e9; // std::numeric_limits::infinity(); std::vector lengths; @@ -1506,7 +1506,7 @@ bool CgalKernel::convert_impl(const taxonomy::boolean_result* br, ifcopenshell:: return false; } - static double inf = std::numeric_limits::infinity(); + static double inf = 1.e9; // std::numeric_limits::infinity(); static double eps = 1.e-5; double uvw_min[3] = { +inf, +inf, +inf };