1
0
mirror of git://projects.qi-hardware.com/cae-tools.git synced 2024-12-23 05:31:10 +02:00
Commit Graph

10 Commits

Author SHA1 Message Date
Werner Almesberger
d758359791 poly2d/p2d_hsort.c (p2d_hier_free): make freeing of polygons optional 2013-10-13 21:29:48 -03:00
Werner Almesberger
3d8a8d04aa poly2d/f2d_tri_holes.cpp (tri_holes_append): rename to f2d_tri_holes_append 2013-10-13 21:29:13 -03:00
Werner Almesberger
f93e93ca89 poly2d/: add triangulation (untested) 2013-10-13 20:33:05 -03:00
Werner Almesberger
53fe70950d poly2d/: try to work around spurious aborts in CGAL::create_interior_skeleton_and_offset_polygons_with_holes_2
cameo encountered spurious aborts with the following message:

  terminate called after throwing an instance of 'CGAL::Precondition_exception
  what():  CGAL ERROR: precondition violation!
  Expr: is_simple_2(first, last, traits)
  File: /usr/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h
  Line: 420

These aborts come and go even if just the coordinate origin is slightly
changed. Setting CGAL_POLYGON_NO_PRECONDITIONS in p2d_area_holes.cpp
made them go away in some cases, but cameo could still run into an
assertion violation (in CGAL).

We now check all the polygons, outer boundary and holes, being sent to
CGAL::create_interior_skeleton_and_offset_polygons_with_holes_2 for
simplicity, and stop recursing if there is any hint of a problem.

This seems to avoid trouble for now, but the issue deserves further
investigation.
2012-08-22 13:50:19 -03:00
Werner Almesberger
3ee5b1aa31 poly2d/: add foreach_v2d* and foreach_edges looping constructs 2012-05-08 14:06:00 -03:00
Werner Almesberger
038667d0d8 poly2d/p2d_hsort.c (p2d_hier_free): use p2d_free, not p2d_free_all
This caused a double free.
2012-05-08 00:51:43 -03:00
Werner Almesberger
7f813b5254 poly2h/: auto-generate dependencies also for C++ code 2012-05-07 22:53:45 -03:00
Werner Almesberger
a950c5b13c poly2d/: simplify semantics of first/next offset in area fill 2012-05-07 22:45:39 -03:00
Werner Almesberger
46c8f8653c poly2d/: automatically switch between clockwise and counter-clockwise polygons
The only functions that care about this at the moment are from CGAL,
and there we can determine from context what to do.
2012-05-07 22:12:21 -03:00
Werner Almesberger
dfa85075e8 poly2d/: Yet another 2D polygon library (WIP) 2012-05-06 23:51:38 -03:00