Commit Graph

5 Commits

Author SHA1 Message Date
6076bedec0 Cleanup: remove scanfill define for polyfill code
also rename vars which were previously used for scanfill.
2014-12-09 12:19:26 +01:00
19b1da2b7b Polyfill2d: avoid calculating polygon winding (its known in all cases) 2014-06-14 08:21:52 +10:00
f0f45eea2e Polyfill2d: replace array with linklist, faster resizing
approx 4.0x speedup
2014-06-14 08:21:51 +10:00
83617d24d5 Rework carve integration into boolean modifier
Goal of this commit is to support NGons for boolean modifier
(currently mesh is being tessellated before performing boolean
operation) and also solve the limitation of loosing edge custom
data layers after boolean operation is performed.

Main idea is to make it so boolean modifier uses Carve library
directly via it's C-API, avoiding BSP intermediate level which
was doubling amount of memory needed for the operation and which
also used quite reasonable amount of overhead time.

Perhaps memory usage and CPU usage are the same after all the
features are implemented but we've got support now:

- ORIGINDEX for all the geometry
- Interpolation of edge custom data (seams, crease)
- NGons support

Triangulation rule is changed now as well, so now non-flat
polygons are not being merged back after Carve work. This is
so because it's not so trivial to support for NGons and
having different behavior for quads and NGons is even more
creepy.

Reviewers: lukastoenne, campbellbarton

Differential Revision: https://developer.blender.org/D274
2014-02-13 17:16:53 +06:00
b9445106b2 Geometry API: polyfill2d, ear clipping polygon filling functions.
Simple/predictable polygon filling functions (no hole support)
originally from libgdx which have some advantages over scanfill.

- always creates the same number of triangles (never any missing faces).
- gives same results for any affine transformation.
- doesn't give so many skinny faces by default.

made some changes for Blender.
- remove last ears first (less to memmove)
- step over the ears while clipping to avoid some verts becoming fans to most of the other.
2013-11-30 22:00:01 +11:00