Subject: CGAL users discussion list
List archive
- From: stzpz <>
- To:
- Subject: [cgal-discuss] Re: About Bezier curves in Arrangement
- Date: Sat, 12 Feb 2011 09:57:58 -0800 (PST)
Here is the code and data that made the assertion shown:
------------------------ CODE BEGIN --------------------------------
#include <CGAL/basic.h>
#include <CGAL/Cartesian.h>
#include <CGAL/CORE_algebraic_number_traits.h>
#include <CGAL/Arr_Bezier_curve_traits_2.h>
#include <CGAL/Arrangement_2.h>
#include <list>
using namespace std;
typedef CGAL::CORE_algebraic_number_traits Nt_traits;
typedef Nt_traits::Rational NT;
typedef Nt_traits::Rational Rational;
typedef Nt_traits::Algebraic Algebraic;
typedef CGAL::Cartesian<Rational> Rat_kernel;
typedef CGAL::Cartesian<Algebraic> Alg_kernel;
typedef CGAL::Arr_Bezier_curve_traits_2<Rat_kernel, Alg_kernel, Nt_traits> Traits_2;
typedef Traits_2::Curve_2 Bezier_curve_2;
typedef CGAL::Arrangement_2<Traits_2> Arrangement_2;
int main (int argc, char *argv[])
{
const char *filename = (argc > 1) ? argv[1] : "test7.dat";
std::ifstream in_file (filename);
int n_curves;
std::list<Bezier_curve_2> curves;
Bezier_curve_2 B;
int k;
in_file >> n_curves;
for (k = 0; k < n_curves; k++) {
in_file >> B;
curves.push_back (B);
}
Arrangement_2 arr;
// here comes the assertion
insert (arr, curves.begin(), curves.end());
return 0;
}
------------------------ CODE END -----------------------------------
test7.dat
------------------------ DATA BEGIN --------------------------------
2
3 0 0 10 20 10 20
4 1 6 30 50 40 70 40 70
------------------------ DATA END ------------------------------------
It seems that CGAL does not allow consecutive control points have the same value. But this program can be run in RELEASE mode.
For the second question, all my using of CGAL are limited to bezier segments because it is a project of converting bitmap line segments to beizer curves. So no other kinds of beizer curves are used except the bezier segment.
2011/2/12 Sebastien Loriot (GeometryFactory) [via cgal-discuss] <[hidden email]>
stzpz wrote:I guess it should not be hard to fix this but can you motivate it?
> Thanks so much, Sebastien. It's ok now.
>
> Besides, why CGAL does not allow inserting bezier curve to an
> arrangement which control poionts are continually identical, just like 3
> 0 0 20 30 20 30?
>
Just by curiosity, are you also using bezier which are not segments?
what is the application?
S.
> Thanks!
>
> Stzpz
>
>
>
> 2011/2/7 Sebastien Loriot (GeometryFactory) [via cgal-discuss] <[hidden
> email] </user/SendEmail.jtp?type=node&node=3301547&i=0>>>
> Hope the third try will be the good one.
>
> S.
>
>> ------------------------------------------------------------------------> <http://cgal-discuss.949826.n4.nabble.com/About-Bezier-curves-in-Arrangement-tp3238384p3301547.html>
> View this message in context: Re: About Bezier curves in Arrangement> Sent from the cgal-discuss mailing list archive> <http://cgal-discuss.949826.n4.nabble.com/> at Nabble.com.
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
http://cgal-discuss.949826.n4.nabble.com/About-Bezier-curves-in-Arrangement-tp3238384p3301570.htmlIf you reply to this email, your message will be added to the discussion below:To unsubscribe from About Bezier curves in Arrangement, click here.
View this message in context: Re: About Bezier curves in Arrangement
Sent from the cgal-discuss mailing list archive at Nabble.com.
- Re: [cgal-discuss] Re: About Bezier curves in Arrangement, Sebastien Loriot (GeometryFactory), 02/01/2011
- [cgal-discuss] Re: About Bezier curves in Arrangement, stzpz, 02/03/2011
- Re: [cgal-discuss] Re: About Bezier curves in Arrangement, Sebastien Loriot (GeometryFactory), 02/04/2011
- [cgal-discuss] Re: About Bezier curves in Arrangement, stzpz, 02/05/2011
- Re: [cgal-discuss] Re: About Bezier curves in Arrangement, Sebastien Loriot (GeometryFactory), 02/07/2011
- [cgal-discuss] Re: About Bezier curves in Arrangement, stzpz, 02/11/2011
- Re: [cgal-discuss] Re: About Bezier curves in Arrangement, Sebastien Loriot (GeometryFactory), 02/11/2011
- [cgal-discuss] Re: About Bezier curves in Arrangement, stzpz, 02/12/2011
- Re: [cgal-discuss] Re: About Bezier curves in Arrangement, Sebastien Loriot (GeometryFactory), 02/16/2011
- Re: [cgal-discuss] Re: About Bezier curves in Arrangement, Sebastien Loriot (GeometryFactory), 02/11/2011
- Re:Re: [cgal-discuss] Re: About Bezier curves in Arrangement, 碰碰, 02/12/2011
- Re:Re:Re: [cgal-discuss] Re: About Bezier curves in Arrangement, 碰碰, 02/12/2011
- Re:Re:Re:Re: [cgal-discuss] Re: About Bezier curves in Arrangement, 碰碰, 02/12/2011
- Re:Re:Re:Re:Re: [cgal-discuss] Re: About Bezier curves in Arrangement, 碰碰, 02/12/2011
- [cgal-discuss] Re: About Bezier curves in Arrangement, stzpz, 02/11/2011
- Re: [cgal-discuss] Re: About Bezier curves in Arrangement, Sebastien Loriot (GeometryFactory), 02/07/2011
- [cgal-discuss] Re: About Bezier curves in Arrangement, stzpz, 02/05/2011
- Re: [cgal-discuss] Re: About Bezier curves in Arrangement, Sebastien Loriot (GeometryFactory), 02/04/2011
- [cgal-discuss] Re: About Bezier curves in Arrangement, stzpz, 02/03/2011
Archive powered by MHonArc 2.6.16.