From 558465d2a6c610f224cc2ce5034fb1446b1c4698 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Thu, 1 Feb 2018 12:27:43 +0100 Subject: [PATCH] Fixed dxf circle reader (in .dxf, the radius is not squared) Removed dead link --- Circular_kernel_2/benchmark/dxf_to_bff/dxf_converter.h | 2 +- Circular_kernel_2/include/CGAL/IO/Dxf_reader.h | 9 ++++----- Circular_kernel_2/include/CGAL/IO/Dxf_reader_doubles.h | 5 ++--- Circular_kernel_2/include/CGAL/IO/Dxf_variant_reader.h | 3 +-- Straight_skeleton_2/include/CGAL/IO/Dxf_writer.h | 3 +-- 5 files changed, 9 insertions(+), 13 deletions(-) diff --git a/Circular_kernel_2/benchmark/dxf_to_bff/dxf_converter.h b/Circular_kernel_2/benchmark/dxf_to_bff/dxf_converter.h index 926664c2b50..7e9a65cfa75 100644 --- a/Circular_kernel_2/benchmark/dxf_to_bff/dxf_converter.h +++ b/Circular_kernel_2/benchmark/dxf_to_bff/dxf_converter.h @@ -122,7 +122,7 @@ private: is >> n; assert(n == 40); is >> r; - NT1 x(cx),y(cy),gr(r); + NT1 x(cx), y(cy), gr(r*r); os<<"Circle_2 ("<<"Point_2("<<"Rational(" <> n; CGAL_assertion(n == 40); is >> iformat(r); - FT rft(r); - circ = typename K::Construct_circle_2()(Point_2(cx,cy), rft); + FT sqr_ft(r*r); + circ = typename K::Construct_circle_2()(Point_2(cx,cy), sqr_ft); } void @@ -162,7 +161,7 @@ private: is >> iformat(r); center = typename K::Construct_point_2()(cx,cy); - rft = FT(r); + rft = FT(r); // intentionally not squared } diff --git a/Circular_kernel_2/include/CGAL/IO/Dxf_reader_doubles.h b/Circular_kernel_2/include/CGAL/IO/Dxf_reader_doubles.h index f091adc24e3..e512c2fee22 100644 --- a/Circular_kernel_2/include/CGAL/IO/Dxf_reader_doubles.h +++ b/Circular_kernel_2/include/CGAL/IO/Dxf_reader_doubles.h @@ -139,9 +139,8 @@ private: is >> n; CGAL_assertion(n == 40); is >> iformat(r); - FT rft(r); - - circ = CGAL::make_array(cx,cy,rft); + FT sqr_ft(r*r); + circ = CGAL::make_array(cx,cy,sqr_ft); } diff --git a/Circular_kernel_2/include/CGAL/IO/Dxf_variant_reader.h b/Circular_kernel_2/include/CGAL/IO/Dxf_variant_reader.h index 9d94eeb9e3b..33a5f369085 100644 --- a/Circular_kernel_2/include/CGAL/IO/Dxf_variant_reader.h +++ b/Circular_kernel_2/include/CGAL/IO/Dxf_variant_reader.h @@ -24,9 +24,8 @@ // and a STREP (FET Open) Project under Contract No IST-006413 // (ACS -- Algorithms for Complex Shapes) -// Descriptions of the file format can be found at +// Description of the file format can be found at the following address: // http://www.autodesk.com/techpubs/autocad/acad2000/dxf/ -// http://www.tnt.uni-hannover.de/soft/compgraph/fileformats/docs/DXF.ascii #ifndef CGAL_IO_DXF_VARIANT_READER_H #define CGAL_IO_DXF_VARIANT_READER_H diff --git a/Straight_skeleton_2/include/CGAL/IO/Dxf_writer.h b/Straight_skeleton_2/include/CGAL/IO/Dxf_writer.h index 74a0dfa2efa..02d27037b74 100644 --- a/Straight_skeleton_2/include/CGAL/IO/Dxf_writer.h +++ b/Straight_skeleton_2/include/CGAL/IO/Dxf_writer.h @@ -17,9 +17,8 @@ // // Author(s) : Fernando Cacciola // -// Descriptions of the file format can be found at +// Description of the file format can be found at the following address: // http://www.autodesk.com/techpubs/autocad/acad2000/dxf/ - #ifndef CGAL_IO_DXF_WRITER_H #define CGAL_IO_DXF_WRITER_H