Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Inserting constraints in Constrained_triangulation_plus_2

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Inserting constraints in Constrained_triangulation_plus_2


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Inserting constraints in Constrained_triangulation_plus_2
  • Date: Wed, 7 Nov 2018 11:27:36 +0100
  • Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
  • Ironport-phdr: 9a23:S7i0GRQ5uz7kIm+r8VQPeFvA9dpsv+yvbD5Q0YIujvd0So/mwa6yYBON2/xhgRfzUJnB7Loc0qyK6/+mATRIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSizexfbF/IA+qoQnNq8IbnZZsJqEtxxXTv3BGYf5WxWRmJVKSmxbz+MK994N9/ipTpvws6ddOXb31cKokQ7NYCi8mM30u683wqRbDVwqP6WACXWgQjxFFHhLK7BD+Xpf2ryv6qu9w0zSUMMHqUbw5Xymp4qF2QxHqlSgHLSY0/nzJhMx+jKxVoxyvqBJwzIHWfI6bO+Fzfr/fcN4AWWZNQshcWi5HD4ihb4UPFe0BPeNAooXzulUBswCxChO3BOPzyz9HmHn21rA83eQmCwHG3QsgH84Tu3jQrdv6KqASUeWrw6nU1zXCb/NY1i3h54jUdRAhu/GNUbd+fcHMzkQvDAfFjlKKqYzkODOVyv4Bs22f7+d7WuKvjnQoqwB1ojS12sgsjYzJi5sTx1vZ+yt5x4M1Kse5SE59edOkFoFfuDqBOItyXMwuWX1nuCE/yrAApJW1fzAKxYw5yxLDb/GLaYuF7xL5WOqMPzt1h2hpdb29ihqq80WtyffwWte73VtLtCZJj93Bu34X2xHR6sWKTOZ28F271jaVzQ/T7/lJIUAqmqrfLJ4s2rswmYASsUTHByP3lkD2gLKPekUq9eWl6f7rYrrhpp+bOI90jh/xPr4ylcy4BOQ0KgkOX26F9uSgzLDv41H1TbFQgvA1kqTVqo3WKdoYq6KjDAJY0J4v6xOlADen1NQYk2MHLFVAeB+flIjpP1bOIOr5Dfe4n1SgijJrx/TdM73uB5XCNHnDkLP7cblh7E5czRI/zcpD6JJMFrEBPPXzV1ftu9zXFBA5NxW4zPvmCNVmyoweRHmPArSCPaPJsV6I4/ovLPOWaI8Uvjb9Mfkl6OT0gX83g19ONZWuiJAYYXT9EvV9KFiCelLthM0AGCEEpFkQVuvv3Re5XDRafGqzUqR0wjYhCYW6RcfsS4eojaCbzQmyFYFRfHEHQBjYCnPvbYSDR7EJbAqdJ8ZglnoPUr33GNxp7g2nqAKvk+kvFeHT4CBN7cuyhugw3PXakFQJzRIxCs2c12+XSGQtxzEHQjY32OZ0pkkvkw7fg5g9uORREJlo390MSh0zbMeOwOlzCtS0UQXELI/QFQSWB+6+CDR0deofht8DZ0EnRoenhxHHmjWvWvoby+PNC5sz/abRmXP2IpQlxg==

Please provide a small self-contained example showing the pb.
I just gave a try with inserting already inserted constraints
and it worked without issues with the Exact_predicates_tag tag.
Are you sure you are always using this tag?

Sebastien.

On 11/07/2018 10:39 AM, marin wrote:
Hello,

I have two questions about inserting constraints in
Constrained_triangulation_plus_2 triangulation.

I'm using triangulation defined like this
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Projection_traits_xy_3<K> Gt;
typedef CGAL::Triangulation_vertex_base_with_info_2<FaceInfo2, Gt>
Vbb;
typedef CGAL::Triangulation_hierarchy_vertex_base_2<Vbb> Vb;
typedef CGAL::Constrained_triangulation_face_base_2<Gt> Fb_base;
typedef CGAL::Triangulation_face_base_with_info_2<FaceInfo2, Gt,
Fb_base>
Fb;
typedef CGAL::Triangulation_data_structure_2<Vb, Fb> TDS;
typedef CGAL::Exact_predicates_tag Itag;
typedef CGAL::Constrained_Delaunay_triangulation_2<Gt, TDS, Itag>
Delaunay_base;
typedef CGAL::Triangulation_hierarchy_2<Delaunay_base> Triangulation;
typedef CGAL::Constrained_triangulation_plus_2<Triangulation>
Delaunay;

1. insert_constraint sometimes throws an exception
I am using function Constraint_id
CGAL::Constrained_triangulation_plus_2<
Tr >::insert_constraint( PointIterator first, PointIterator last, bool close
= false )

- it throws exception every time if I try to insert the same polyline
twice.
- sometimes it throws exception inserting not already inserted
constraints.

Since Constrained_triangulation_plus_2 should support any polylines
layout
as constraints including those intersecting each other, please I'm wondering
what are preconditions for the Insert_constraint function in order to work
without exception?

2. In reference manual I've found the function Insert_constraints (plural)
that allows inserting many polyline constraints at once using optimized
algorithm with spatial indexes but I haven't found any examples how to use
it. Please if there are some examples available I would be very grateful.
insert_constraints ( ConstraintIterator first, ConstraintIterator last )

Thank you very much for answers.

Best regards,
Marin



--
Sent from: http://cgal-discuss.949826.n4.nabble.com/




Archive powered by MHonArc 2.6.18.

Top of Page