Commit Graph

67 Commits

Author SHA1 Message Date
4e500101a7 Cleanup: quiet -Wcomma, cast to void where needed 2016-03-05 09:16:12 +11:00
9a1ea681e6 BMesh: remove doubles fix/optimization
Changes to remove doubles face creation,
Recent change to remove doubles broke when the new faces already existed (rare occurrence),
however theres no point to return an existing double face.

Now check if the face exists before creating it.

Other changes:

- avoid 2x hash lookups on all mapped verts.
- fill in the vert array instead of calculating from edges.
- remove inefficient search of entire edge-array before adding to it.
  (flag verts to ensure they're not used multiple times).
- move logic for transfusing edge-flags to edge creation.
2015-12-24 20:30:05 +11:00
6d10bf7c44 Fix bad selection after symmetrize
Weld verts now keeps original faces so callers don't need to keep track of newly created face data.
2015-12-22 16:41:01 +11:00
b2e36dcd7d Fix auto-merge loosing edge/faces selection 2015-12-01 22:12:12 +11:00
cdb0cf3ec7 BMesh: replace BLI_array -> BLI_stack
Also use more direct custom-data access.
2015-06-21 09:19:12 +10:00
ea5f9fee8d Cleanup: function arg wrapping 2015-05-05 16:34:38 +10:00
74d31279cd Fix T44560: Merge Collapse tool - UVs operator panel option ignored with Collapse but not with other merge types.
Was missing parameter for collapse bmesh operator...
2015-05-01 17:10:39 +02:00
9e9cd77b8d Compiler warning: double-promotion 2015-02-01 01:17:21 +11:00
aab4f2b762 cleanup: redundant casts & const cast correctness 2015-01-01 23:42:28 +11:00
55d3277d0c BMesh: use a smaller dist3 threshold
Matches array modifier remove-doubles
2014-08-14 12:49:02 +10:00
d9f39257f4 Math Lib: add compare_len_squared_v3v3 from paint branch 2014-07-14 11:55:38 +10:00
f32079d4b9 BLI_stackdefines
Bounds check the stack while debugging, also add STACK_PEEK
2014-06-29 05:57:48 +10:00
c5ccbacdaa move STACK_* macros into BLI_stackdefines.h 2014-06-25 00:01:33 +10:00
7e78322eef BMesh Walker: rename BMW_SHELL -> BMW_VERT_SHELL 2014-05-23 20:50:27 +10:00
e4c2a3c31c Various fixes/improvements regarding BMesh's elem_index_dirty and BM_LOOP handling.
Most notably, BM_LOOP and BM_FACE index recompute should now be fully decoupled.
2014-04-15 16:20:07 +02:00
933c2b0521 BMesh: collapse_uvs - avoid clearing and flagging for every cd-layer 2014-01-22 17:16:38 +11:00
477a84a738 BMesh: minor optimization for remove doubles
- replace heap allocation with stack for small arrays.
- remove edge-lookup when its already known.
2014-01-17 17:21:41 +11:00
7df8452d1a BMesh: add bmesh delete functions that dont depend on operator flags 2014-01-17 14:55:06 +11:00
3ffba79ac6 Fix for own recent commit 2013-12-24 18:56:07 +11:00
04a902965e BMesh optimize face splitting by taking loops rather then verts
- add BM_vert_pair_share_face
- add BM_loop_is_adjacent
- remove BM_verts_connect
2013-12-24 11:13:58 +11:00
0959482acb fix [#36913] GHASH_FLAG_ALLOW_DUPES assert and crash in Edge Collapse 2013-10-02 04:12:06 +00:00
75383a79f6 array modifier was adding vertices to the 'targetmap' multiple times.
this is supported by weldop but would prefer not to allow multiple keys in the map.
2013-08-27 23:32:11 +00:00
377475f979 remove doubles: source/target can be swapped, check both flags. 2013-08-27 23:23:19 +00:00
d5469dd5c2 mesh remove doubles was adding verts into the weld_verts.targetmap multiple times (new paranoid asserts find this stuff). 2013-08-27 22:38:55 +00:00
9470754fd3 bmesh api cleanup, face creation args now accept an example face (as with vertex and edge),
also replace BM_face_create_quad_tri_v with BM_face_create_verts
2013-08-21 07:51:47 +00:00
0b00ba4ee0 remove unused function 2013-08-17 13:08:09 +00:00
20376f3337 code cleanup: move beauty fill calculation into its own function and some style cleanup 2013-03-30 09:57:35 +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
347e2b6cb0 code cleanup: make bmesh var names more consistent 2013-03-09 17:12:24 +00:00
b27854bd47 use booleans for bmesh api. 2013-01-14 16:42:43 +00:00
9f2e845181 code cleanup: use BMW_begin insode for loops body. 2013-01-14 09:53:56 +00:00
07ccd3ee3f fix [#33029] Applying modifier leaks memory
Thanks for Sergey for finding the bug & patching, This fix works a bit differently.
Theres no need to allocate the customdata in the first place - since its written into. So add a flag for vert/edge/face/loop creation functions so they can skip customdata creation.
2012-11-29 16:26:39 +00:00
c00a1b7493 use clearer names for 'single' bmesh operator args & add '%e' to BMO_op_vinitf comments. 2012-11-27 09:41:08 +00:00
a9855c227e py/bmesh api - add support for single item buffers (odd feature but used quite a bit with bmesh operators).
also add utility functions BMO_slot_buffer_from_single(), BMO_slot_buffer_get_single()
2012-11-27 09:21:57 +00:00
3d64381e4d use more rigid type checking for bmesh slot subtypes. 2012-11-26 03:16:29 +00:00
55535b21fe fix own error - remove doubles slot name. 2012-11-22 01:00:40 +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
964f29797b avoid using BLI_array for remove double helper function - bmesh_find_doubles_common(), was growing and array one at a time (with re-allocs), when the size is known. 2012-11-05 14:39:49 +00:00
a1856a38f6 minor improvement to vector api use, replace add, multiply by 0.5 with mid_v3_v3v3 2012-10-30 14:22:49 +00:00
25c96bc9f3 code cleanup: remove unused macros, commet some which may be useful later - or good to keep for completeness. quieted some warnings and add flags -Wmissing-include-dirs and -Wno-div-by-zero to cmake/gcc 2012-09-20 01:02:39 +00:00
e75f5c8208 quiet -Wmissing-prototypes warnings, and enable this warning by default for C with gcc.
helps for finding unused functions and making functions static, also did some minor code cleanup.
2012-09-15 01:52:28 +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
69a7e0af02 rename bmesh ops since they are exposed in an api now. 2012-06-30 15:27:13 +00:00
3e305c1018 bmesh.ops module for bmesh operator access, only remove_doubles and convex_hull at the moment. 2012-06-26 21:40:01 +00:00
305d341ec2 code cleanup: use vector math function minmax_v3v3_v3() and other minor vector function edits. 2012-05-13 11:05:52 +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