Commit Graph

64 Commits

Author SHA1 Message Date
0a026033ae BMesh: make toolflags optional
Saves 8 bytes per vert/edge/face.
Gives overall ~20-25% memory saving for dyntopo sculpting
and modifiers that use BMesh.
2016-07-01 19:29:22 +10:00
bcde045b32 Fix T48667: Bisect-fill crash
BMO iterator would loop over removed faces.

Recent changes to mempool FREEWORD size exposed this bug.
2016-06-17 21:45:56 +10:00
daa90de3fd Cleanup: shadowing (bmesh) 2015-11-23 17:40:10 +11:00
0f769afe07 Fix T46692: Triangulate creates duplicate faces
Caused a crash in dyntopo.
2015-11-06 01:13:23 +11:00
67ec0ef277 Editmesh: report a warning when fill fails
also prevent assert with zero normal
2014-11-05 14:21:18 +01:00
cb5ec7f743 Fix use-after free (own error) 2014-11-04 09:48:41 +01:00
afa6d4e21f Fix T41523: Mesh triangle fill creates flipped faces
Calculate projection normal using edge-pairs
2014-08-21 15:07:07 +10:00
1706182be4 Fix for BMesh fill using arbitrary face-flipping
Use winding of existing boundary edges.

Filling Suzzane's eyes gave different face winding.
2014-08-21 13:08:13 +10:00
eaf7d6b7c0 BMesh: fill - replace SmallHash with GHash 2014-08-21 13:08:13 +10:00
90e1746d89 BMesh: correct flag use
Allowed fill to make duplicate faces
2014-08-21 13:08:13 +10:00
ae8327dbf3 Mask: add option to detect self intersections 2014-02-13 19:12:28 +11:00
8b1731e13d Scanfill: skip checks for loose edges when they can't occur
Only editmesh needs this, text, curves, masks - can all skip this check
2014-02-04 02:57:27 +11:00
b4ae05e4db BMesh: optimize lookups for triangle fill 2014-02-02 17:09:38 +11:00
c4345a808c Smallhash: add reserve option to avoid resizing when size is known 2014-02-02 17:08:26 +11:00
Dalai Felinto
a7b44c82e5 Triangulate Modifier: using different ngon and quad methods
Quads: Beauty, Fixed, Fixed Alternate, Shortest Diagonal
Ngons: Beauty, Scanfill

* Shortest Diagonal is the default method in the modifier (popular
  elsewhere), but beauty is the default in Ctrl+T).

* Remove the need for output slot and beauty operator to be called
after Clt+T

Patch with collaborations and reviewed by Campbell Barton
2013-10-29 02:42:51 +00:00
590f58d455 code cleanup: redundant includes and add minor comments. 2013-10-08 20:18:38 +00:00
81096bab0c correct error in recent commit triangle-fill-dissolve, need to check if the edges face is removed (happens in rare cases). 2013-08-23 11:28:33 +00:00
98bb2197a2 add dissolve option to triangle fill operator, running dissolve after scanfill isn't so simple because of errors if one edge can't merge. 2013-08-23 11:10:46 +00:00
5b5cae86b7 optiona for bmesh triangle fill operator to take a normal argument 2013-08-23 10:12:09 +00:00
6cba2b8d73 move bmesh tools into their own include,
changes to tool args would rebuild far too many files and these are mainly by modifiers outside of bmesh.
2013-08-23 04:22:07 +00:00
b1f4e2b4db code comments: bmesh operator doxy header descriptions. 2013-03-30 08:54:50 +00:00
6f9f1399a0 code cleanup: operator headers 2013-03-25 22:40:11 +00:00
be780cb4a6 code cleanup: move beautify into its own file (more changes coming) 2013-03-25 22:04:12 +00:00
1b4c9e1ad4 beautify fill: skip testing invalid cases (2 triangles that _don't_ have 4 unique verts between them). 2013-03-25 04:48:30 +00:00
b6a60fc6b8 revert own commit, caused regression - hanging on triangulation [#34214].
Postponing further changes for now, too risky before release when unexpected cases can cause eternal loop.
2013-02-13 03:20:30 +00:00
555bcc3298 add beauty option for triangle fill since you might want to use the initial scanfill result. 2013-02-09 15:49:20 +00:00
5e05d67436 improve beauty-fill tool for non-flat triangles.
Project the triangle pair into 2d coords before measuring.

before/after - http://www.graphicall.org/ftp/ideasman42/beauty_fill_fix.png
2013-02-09 08:16:13 +00:00
c30fb009cc problem with own changes to triabgulate: calling beauty fill directly would re-allocate the faces which mean't triangulates output slots pointers became invalid. (noticed when using from py api) 2013-02-06 15:57:12 +00:00
e7cead0994 own recent change to triangulate bmesh operator stopped filling in mapping slot 'face_map.out', not used by blender its self but useful for scripts, enable this again. 2013-02-05 11:30:50 +00:00
c649107499 when triangulating ngons, use beauty option to rotate edges. gives much nicer results and means you can preserve original edges without triangulating ngons one at a time 2013-02-03 08:07:14 +00:00
37489d71c7 Triangulate modifier no longer uses bmesh operator api call, instead add a BM_mesh_triangulate() function. Gives ~2x speedup in my tests on an optimized build. 2013-01-29 10:31:05 +00:00
b27854bd47 use booleans for bmesh api. 2013-01-14 16:42:43 +00:00
983e5fe5f1 fix for own mistake in recent changes to scanfill, bmo_triangle_fill_exec() (alt+f), was missing BLI_SCANFILL_CALC_HOLES argument.
reported as [#33819]
2013-01-10 14:28:06 +00:00
8ecce451ab bmesh operator naming - use clearer names for args eg: (mat -> matrix, use_singleedge -> use_single_edge)
also remove duplicate docs for operator arg formatting.
2012-11-28 00:16:06 +00:00
f9e339ef00 fix/workaround [#33281] script goes into not responding
scanfill remove-doubles pass assumes ordered edges (as with curves), otherwise it can hang.
workaround this problem by skipping removing-doubles for mesh ngons, since this isnt such a common case as it is with curves and we can just not support it.
2012-11-26 23:18:04 +00:00
3d64381e4d use more rigid type checking for bmesh slot subtypes. 2012-11-26 03:16:29 +00:00
ebaf1306b8 bmesh operator api:
avoid per vert/edge/face string lookups in BMO_slot_map_* functions --- used in array modifier, subdivide, remove doubles and other tools.
2012-11-20 13:29:27 +00:00
dbdc76c9d0 code cleanup: make bmesh operator names more consistant since python has access to these as input arguments and return values.
all output values currently have ".out" suffix, this may go in the future, but for now it makes it clear in C code what are inputs and outputs.
2012-11-20 05:50:19 +00:00
48639af5f8 use input and output slots for bmesh operators, needed for the python api to get return values. 2012-11-19 14:58:31 +00:00
90d215535e add option so operators can be called with a flag, currently the only flag is to respect hidden geometry.
this is useful for bmesh tools that operate in object mode or for modifiers which would previously use hidden faces in some cases.
2012-07-21 00:58:02 +00:00
56c5c63f57 code cleanup: doxy comment filename corrections 2012-06-08 23:43:11 +00:00
c8ebfe1d12 code cleanup:
- use bmesh iterator macros in more places
- rename scanfill variables (were using same names as mesh faces/verts which was confusing)
2012-05-13 14:47:53 +00:00
4c5502bfd6 code cleanup: function naming for BLI functions. 2012-05-05 00:23:55 +00:00
2a1ba8c85b style cleanup: formatting and some float/double promotion 2012-05-03 19:57:24 +00:00
ef054e165c style cleanup: format 'for' loop macros the same as for loops, some renaming to BLI_array macros. 2012-04-28 15:14:16 +00:00
792f536b36 code cleanup: better use of BLI_array_* (grow in larger steps where possible), include BMO_iter_new in for loops. 2012-04-23 02:17:57 +00:00
475ecbb0ce remove BM_ITER, BM_ITER_INDEX macros, use ELEM or MESH variants only (the maceros had unused args in both cases). 2012-04-19 13:47:58 +00:00
75b869e428 style cleanup: BM_ITER / BM_ITER_INDEX / BMO_ITER 2012-04-19 11:44:12 +00:00
1f01d62d15 more replacement for BM_edge_face_count() use. 2012-04-18 06:57:28 +00:00
0635f8101c make scanfill threadsafe (wasnt threadsafe before BMesh merge but before the merge it didn't need to be) - now rendering uses its better if its threadsafe. 2012-04-16 06:48:57 +00:00