Subject: CGAL users discussion list
List archive
RE: [cgal-discuss] Precondition Violations Using CGAL Bezier Curves Arrangement
Chronological Thread
- From: "Jeb Gaither" <>
- To: <>
- Subject: RE: [cgal-discuss] Precondition Violations Using CGAL Bezier Curves Arrangement
- Date: Fri, 3 Jul 2020 17:38:06 -0400
- Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None ; spf=None ; spf=None
- Ironport-phdr: 9a23:4J7Mbx+g0k+HnP9uRHKM819IXTAuvvDOBiVQ1KB+0+wWIJqq85mqBkHD//Il1AaPAdyFraoawLOI6eigATVGvc/c9ihaMdRlbFwssY0uhQsuAcqIWwXQDcXBSGgEJvlET0Jv5HqhMEJYS47UblzWpWCuv3ZJQk2sfQV6Kf7oFYHMks+5y/69+4HJYwVPmTGxfa5+IA+5oAnMt8Qam5duJ6c+xhfUo3ZEZfldyWd0KV6OhRrx6dq88Z55/yhMp/4t8tNLXLnncag/UbFWFiktPXov5M3suxnDTA+P6WUZX24LjBdGABXL4Q/jUJvpvST0quRy2C+BPc3rVr80Qiit771qSBDzligKMSMy/XzNhcxxiKJbpw+hpwB6zoXJboyZKOZyc6XAdt4cWGFPXNteVzZZD428cYUPAegOM/tWoYf+qFQBsRywBRW3Cez11jNIiWf70bMm3+kjFwzNwQwuH8gJsHTRtNj5OqMcXv6uw6LVzDvMdfJW2Sv96IfWaBAtr+yHULVyccXP0kYiDB/Ijk+MqYH4PzKYyucDv3KH4OpnUOKikmgqoBx+rTaz3MkjkJXJhp4LxVDe8yV02IU4KMGmREN5YNOoDYVduSGUOoZ3Qs4vXX1ltigmxrAJpJK3YCsHxpsoyhDQd/GKd4eF7g7tWuqMIjp0mW5oda65ih2v/0agzej8WdO10FZMtidKjtbMuWoJ1xDJ7ciHUPR98l+g2TaJzQDT6/tLLVo6larBLZMq370+loILvEjdAiP7nF/6gLKUe0k+5+Sk9uTqbq/7qpOBKYN5jBz1PL40lcylG+s4NxADX2iF9uS4073u5Vf2QKlOjvA5l6nZsJfaKt8GqqO9GQNVyJgs6xm+Dze9zNQXg2MHI0xYdxKcjojpJ0/BLOrkAve4hlSgiDZrx/bYMb39GpjBMGTPnbP7cbpg6UNQ0hc/wc1f6p5OF70NPez/Vlf0tNPCDx85NwK0w/zgCNV4zo4eW3yADbSCPazIq1+I+vkgIumWa48UojryN/8l5/v2gX8jhVAdZbWp3YcQaH2gAvtmLF+WYX71jtgcEGcKpRYxTPHxiF2ZSjNTfHazX6ck5j4hEo6mDIHDRpqsgLObxiu7EIdWNSh7DEuRGyLoa5mcQKVLLzmDJ9do1D0CT7moDYE7kgq/sRfzjLthIO2T8SIRsdfv1cN++vbIxiw07iF+L9iY1zSNU31shTFPACQn2bh250170FaKl6ZixOdJEMRaoPJPXAB9PpHVy6l2Csv5RxnaLeqPU0usfti2HWQxUs4p2I1JJF1sHs2ryBHFxSujRbEP0KeaAYQ9taPa0X+2LMl0zzPK1bIqkkI9EfdIYDmtiad7sgTSHIXUiF6xlqCwdK1a0jSbp0mZym/b9mNVWkZfWKTZXX0FLAOCr9nzzmrYU5W/IJVhOQxEn53RYpBWY8Hk2A0VDMzoP87TNjroyjWAQC2Qz7bJV7LEPmAU3SHTEk8ByltB9GyaPxk3B2GqpGeMVGUzR2KqWFvl9KxFkF3+TkIwyFrTPUR90+aw+hkf3K3aUf4c36kYtT0spy51AFv71NXTWYLZ+1hROZ5EaNZ4229pkHrDvlUmbLW6M4pzr39YeANy7Rvj
Hi Efi,
Thank you very much for your answer. I will keep you posted as I progress.
For your information, the Bezier Curves which have the issues are derived from self intersecting Bezier Splines. I suspect I may be losing some accuracy in the conversion process.
One other quick question. So far I have successfully used CGAL Arrangements for shapes composed of either Polylines or Beziers Curves. I would like to add mixed mode shapes with both types of edges. My plan is to covert lines to "straight" Cubic Bezier Curves. Do you have any alternatives suggestions?
Thank you again.
Jeb
From: [mailto:] On Behalf Of Efi Fogel ( via cgal-discuss Mailing List)
Hi Jeb,
You may know most or all of the facts below, but for the sake of other readers I repeat it.
Saving an arrangement instantiated with the Bezier geometry traits and reading back the saved information directly is impossible (without the risk of encountering problems caused by limited precision). The reason, in general, is because (intersection) points do not have exact representation; you can only obtain an approximation.
The solution is to save the curves that induced the arrangement in the first place. Observe that you need to save the original curves (before inserted into the arrangement) and not the curves that are the geometric embeddings of the edges of the arrangement. Then, to restore the arrangement, you need to read the curves and insert them into an arrangement (essentially re-constructing the arrangement).
Saving the curves must be done in an exact way, that is, the coordinates of the control points must be saved in an exact manner.
PS, you can write os << CGAL::exact(x) for any kernel object x. However you will need to provide your own (rather simple) implementation for exporting an object of the Curve_2 type of the Bezier traits. I think that I'll add it to some future release of CGAL, but it may take some time...
Cheers, Efi ____ _ ____ _
On Thu, 2 Jul 2020 at 00:41, Jeb Gaither <> wrote:
|
- [cgal-discuss] Precondition Violations Using CGAL Bezier Curves Arrangement, Jeb Gaither, 07/01/2020
- Re: [cgal-discuss] Precondition Violations Using CGAL Bezier Curves Arrangement, Efi Fogel, 07/02/2020
- RE: [cgal-discuss] Precondition Violations Using CGAL Bezier Curves Arrangement, Jeb Gaither, 07/03/2020
- Re: [cgal-discuss] Precondition Violations Using CGAL Bezier Curves Arrangement, Efi Fogel, 07/05/2020
- Re: [cgal-discuss] Precondition Violations Using CGAL Bezier Curves Arrangement, Carlos Rabelo, 07/05/2020
- Re: [cgal-discuss] Precondition Violations Using CGAL Bezier Curves Arrangement, Efi Fogel, 07/05/2020
- RE: [cgal-discuss] Precondition Violations Using CGAL Bezier Curves Arrangement, Jeb Gaither, 07/03/2020
- Re: [cgal-discuss] Precondition Violations Using CGAL Bezier Curves Arrangement, Efi Fogel, 07/02/2020
Archive powered by MHonArc 2.6.19+.