Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] Input (>>) Operator does not work using Circular Kernel and Line_Arc_2
Chronological Thread
- From:
- To: CGAL Mailinglist <>
- Subject: Re: [cgal-discuss] Input (>>) Operator does not work using Circular Kernel and Line_Arc_2
- Date: Wed, 13 Jun 2007 14:50:08 +0200
I'll have a look when I am back in my office.
Thomas Zangl wrote:
wrote:
Thomas Zangl - Home wrote:
Hi!
Why does the >> Operator not work using the Circual Kernel and
Line_Arc_2?
Frankly, I don't know.
Do you get the same problem with Circular_kernel_2 (it has no
geometric filtering) instead of Exact_circular_kernel (with geometric
filtering)?
This compiles but it does not yet work as expected :-) . This is the
contents of my testfile:
40.9288 52.7524 74.9288 100.752
40.9288 52.7524 3.3744 45.2415
40.9288 52.7524 38.8286 30.7
....
but no Arc's are created by the >> operator. I assume there are 2 points
missing per line.
Here's my code (which works now with the Circular Kernel 2 but not with
the Exact Circular Kernel):
#include <CGAL/basic.h>
#include <stdlib.h>
#include <iostream>
#include <fstream>
#include <math.h>
#include <CGAL/Simple_cartesian.h>
#include <CGAL/Exact_circular_kernel_2.h>
#include <CGAL/Circular_kernel_2.h>
#include <CGAL/Algebraic_kernel_for_circles_2_2.h>
//typedef CGAL::Exact_circular_kernel_2 Circular_k;
/*
* Try it with the circular kernel 2
*/
typedef CGAL::Quotient<CGAL::MP_Float> NT;
typedef CGAL::Cartesian<NT> Linear_k;
typedef CGAL::Algebraic_kernel_for_circles_2_2<NT> Algebraic_k;
typedef CGAL::Circular_kernel_2<Linear_k,Algebraic_k> Circular_k;
typedef Circular_k::Circular_arc_point_2 Point_2;
typedef Circular_k::Circle_2 Circle_2;
typedef Circular_k::Circular_arc_2 Circular_arc_2;
typedef Circular_k::Line_arc_2 Line_arc_2;
typedef Line_arc_2 Arc;
typedef std::vector< Arc> ArcContainer;
typedef std::vector< Point_2> PointContainer;
typedef std::pair<Circular_k::Circular_arc_point_2, unsigned>
IntersectionPoint;
typedef Circular_k::Circular_arc_2 IntersectionArc;
using std::cout;
using std::endl;
using std::string;
int main(int argc, char *argv[])
{
std::string file = "";
// command handling
if (argc == 1) {
std::cout << "Usage: circular_operator_bug.exe filename " << std::endl;
return 0;
}
if (argc > 1) {
file = argv[1];
cout << "Using file: " << file << endl;
}
ArcContainer ac;
PointContainer pc;
std::ifstream iFile(file.c_str(),std::ios::in);
if (!iFile) {
std::cout << "File not found" << std::endl;
return 1;
}
std::cout <<"Reading file..." << std::endl ;
Circular_k::Line_arc_2 l;
while ( iFile >> l ) {
cout << "Line_Arc_2: " << l << endl;
ac.push_back(l);
}
return 0;
};
- Input (>>) Operator does not work using Circular Kernel and Line_Arc_2, Thomas Zangl - Home, 06/05/2007
- Re:[cgal-discuss] Input (>>) Operator does not work using Circular Kernel and Line_Arc_2, Thomas Zangl - Home, 06/10/2007
- Message not available
- Re: [cgal-discuss] Input (>>) Operator does not work using Circular Kernel and Line_Arc_2, Thomas Zangl, 06/13/2007
- Re: [cgal-discuss] Input (>>) Operator does not work using Circular Kernel and Line_Arc_2, Monique . Teillaud, 06/13/2007
- Re: [cgal-discuss] Input (>>) Operator does not work using Circular Kernel and Line_Arc_2, Monique . Teillaud, 06/13/2007
- Re: [cgal-discuss] Input (>>) Operator does not work using Circular Kernel and Line_Arc_2, Monique . Teillaud, 06/20/2007
- Re: [cgal-discuss] Input (>>) Operator does not work using Circular Kernel and Line_Arc_2, Thomas Zangl, 06/13/2007
Archive powered by MHonArc 2.6.16.