Werner Almesberger
84f9d3c3b4
poly2d/p2d_attrib.c (p2d_no_intersect): don't test last vs. first segment
...
This one case slipped through. Surprisingly, it rarely produced a
complaint.
2015-01-18 09:09:43 -03:00
Werner Almesberger
5808a4001f
poly2d/ (p2d_write_gnuplot, p2d_write_gnuplot_all): use "bool" instead of "int"
2015-01-10 21:22:39 -03:00
Werner Almesberger
3cc284d9c1
poly2d (p2d_contains_point): use "bool" instead of "int"
2015-01-10 21:21:29 -03:00
Werner Almesberger
cba417fc37
poly2d (p2d_is_cw, p2d_is_closed, p2d_no_intersect, p2d_vertices): use better types
...
There's more to the world than just "int" ...
2015-01-10 21:16:47 -03:00
Werner Almesberger
ebb7d028ea
Revert "poly2d/p2d_hsort.c (p2d_hier_free): make freeing of polygons optional"
...
This reverts commit d758359791
.
2013-10-14 11:13:22 -03:00
Werner Almesberger
626dbe52e1
poly2d/: store actual values in struct f2d, not pointers
...
... since the data structures they point to have internal use only.
2013-10-14 11:11:27 -03:00
Werner Almesberger
ca271dd313
poly2d/f2d_tri.c (f2d_free_all): free list of faces
2013-10-13 22:09:49 -03:00
Werner Almesberger
d0b5696a07
poly2d/f2d_tri_holes.cpp (find_point): don't loop forever on closed polygons
2013-10-13 21:57:50 -03:00
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