Skip to content

CGAL::intersection error #8809

@zzusunquan

Description

@zzusunquan

Issue Details

runtime error

The below code runs correctly. But if i change

typedef CGAL::Exact_predicates_inexact_constructions_kernel            K;

to

typedef CGAL::Simple_cartesian<float>              K;

The program crashes when calling Cgal::intersection.

Source Code

   typedef CGAL::Exact_predicates_inexact_constructions_kernel  K;
   typedef K::Point_2 Point_2;
   typedef CGAL::Polygon_2<K>  Polygon_2;
   typedef CGAL::Polygon_with_holes_2<K> Polygon_with_holes_2;

   Polygon_2 poly1;
   poly1.push_back(Point_2(36.5068358, -259.537109));
   poly1.push_back(Point_2(568.399414, 96.3984375));
   poly1.push_back(Point_2(180.207031, 676.494141));
   poly1.push_back(Point_2(-351.685547, 320.557617));

   Polygon_2 poly2;
   poly2.push_back(Point_2(-333.224609, -508.294922));
   poly2.push_back(Point_2(196.667969, -152.359375));
   poly2.push_back(Point_2(-191.524414, 427.736328));
   poly2.push_back(Point_2(-723.416992, 71.7998047));
   
   std::list<Polygon_with_holes_2>   intR;
   Cgal::intersection(poly1, poly2, std::back_inserter(intR)); 

Environment

  • Operating system (Windows 64 bits):
  • Compiler: visual studio 2022
  • Release or debug mode: release
  • Specific flags used (if any):
  • CGAL version: 5.6.2
  • Boost version: 1.78
  • Other libraries versions if used (Eigen, TBB, etc.):

Can you tell me why this happens and how I can avoid it? and i know typedef CGAL::Simpel_cartesian<float> K;
is faster, i want use it
`

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions