Commit Graph

92 Commits

Author SHA1 Message Date
Howard Trickey
4e5d5e0d84 Add 'vertex_only' option to bevel tool.
Right now, changing segments to > 1 doesn't do anything,
but intend to work on making that cause rounded corners.
2012-12-28 02:45:10 +00:00
Campbell Barton
9090049505 code cleanup 2012-12-23 16:09:26 +00:00
Campbell Barton
2cb39ea9da use BM_face_create() over BM_face_create_ngon() in bevel and extrude individual faces to get some speedup. 2012-12-19 09:45:56 +00:00
Campbell Barton
54787a8855 fix own error [#33529] Bevel on a certain edgeloop results in segmentation fault
relied on edges having a loop, now use overlap apiflag instead.
2012-12-16 14:17:15 +00:00
Campbell Barton
bee7c20a97 move edge split into its own function which can be called by the modifier without having to call a bmesh operator (gives some speedup). 2012-12-12 12:57:27 +00:00
Campbell Barton
c40030a36c replace BLI_array_declare with BLI_array_staticdeclare() and BLI_array_alloca() for smaller arrays. 2012-12-12 02:48:03 +00:00
Campbell Barton
71730f26d7 replace BLI_array_fixedstack_declare with() new macro BLI_array_alloca() which uses stack memory always and doesn't need to be freed explicitly. 2012-12-11 15:10:19 +00:00
Campbell Barton
e2f0a1e4db own cleanup commit in bmesh branch - removed last letters from ends of some comments. 2012-12-11 14:24:27 +00:00
Campbell Barton
a3ce9408a2 fix [#33438] Bevel modifier "angle" mode is broken
bevel modifier was making zero area faces & edges that made scanfill fail (since it no longer removes doubles when filling ngons)
2012-12-08 07:35:54 +00:00
Howard Trickey
0bca862e9c Bevel: fix 'causing artifacts' bug 33245.
Really was caused by a previous bevel making
a two-edged face, which caused other faces to
be dropped when copying a bmesh.
The quadstrip code needed to be more careful
to avoid creating two-edge faces.
2012-12-07 18:45:52 +00:00
Campbell Barton
576bc2e6e4 bevel - use tri-fan filling in the special case when a bevel edge meets a non bevel edge at a valence 2 vert.
this is the topology tri-fan was intended to be used.
2012-12-04 15:28:34 +00:00
Campbell Barton
41b6e700e0 bevel: re-order checks so angle checks are done after quick sanity checks. 2012-12-04 14:41:40 +00:00
Campbell Barton
0526fcf13f revert part of r52720, Id rather leave these as-is, even if they give warnings under some configurations. 2012-12-03 08:11:04 +00:00
Howard Trickey
11e87d118e Bevel: fix for bulging part of bug 33280.
Bulging still happens, but fixed the cases where it was obvious
because it destroys an otherwise straight 'pipe' by snapping
the vertex mesh points to that pipe.
2012-12-03 01:46:37 +00:00
Bastien Montagne
818a345be3 Silent a bunch of gcc warnings (usually dummy, but noisy!). 2012-12-02 16:01:06 +00:00
Howard Trickey
c324895136 Bevel: fix crash bug 33362, when beveling one edge at valence 2 vertex.
That special case should have been tested before - the code was wrong
in about three different ways.
2012-12-01 14:23:44 +00:00
Howard Trickey
eb490f3aae Bevel: fix spike in suzanne, bug 33354.
Non-planar faces made some of the meet point code not work well,
so now calculate local face norms.
2012-12-01 03:26:57 +00:00
Campbell Barton
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
Howard Trickey
fb27a69124 Bevel: partial fix for distortion (bug 33280).
Sometimes it is impossible to have same offset from
both edges that are on angled faces. The fix here
at least doesn't distort the non-beveled part of the
model, and looks much better than before on bug
example, but is still not perfect.
2012-11-29 13:54:39 +00:00
Campbell Barton
0b9be70591 typo's and some style cleanup, also added asserts into BLI_vsnprintf and BLI_sprintfN when invalid args are given. 2012-11-28 06:43:04 +00:00
Campbell Barton
e35b235925 fix [#33320] Decimate modifer in collapse is inconsistent when limiting to a vertex group 2012-11-28 02:49:06 +00:00
Campbell Barton
9982b283e6 fix for asserts added in own recent commit with more strict type-checking
- BMO_slot_copy now only copies compatible elements.

other minor changes
- don't use text.format(...), convention for UI scripts is C style string formatting.
- rename bmo_edgenet_prepare --> bmo_edgenet_prepare_exec
- float/double warning in bevel.
2012-11-27 02:34:40 +00:00
Howard Trickey
33c92a02e4 Bevel: better round profile code.
Easier to understand, no touchy intersect code, and works
even when arms aren't equal length.
Old code ifdef'd for now, will remove soon.
2012-11-27 01:07:22 +00:00
Campbell Barton
e1dc420193 use slightly more efficient BLI_array_fixedstack_declare() instead of BLI_array_staticdeclare() for bevel code since the array size is known. 2012-11-26 05:06:33 +00:00
Campbell Barton
7ef78723b7 code cleanup: doxy comment corrections and correct own typo animation player docs. 2012-11-26 00:59:11 +00:00
Howard Trickey
3a7d4d661f More fixes to parallel tests to make them less sensitive, prevents assert failures.
Also made bl_debug_draw_edge_add better (don't draw edges in one continuous line).
2012-11-25 13:52:13 +00:00
Campbell Barton
b688a79b30 skip some redundant looping in bevel code. 2012-11-23 06:09:03 +00:00
Campbell Barton
9682108113 minor speedup for bevel, avoid calling find_bevvert() when we know the edge isn't beveled. 2012-11-22 11:02:57 +00:00
Howard Trickey
0d27c16894 bevel: fix bug where constructed where parallel test
didn't work (angle check too sensitive). Caused some
(nan,nan,nan) results from offset_in_two_planes.
2012-11-21 13:07:03 +00:00
Campbell Barton
185cf6095e improvements to bevel
- the resulting selection is now correct

internal details
- bev_rebuild_polygon() now only rebuilds polygons that are attached to a bevel vertex (was rebuilding ALL).
  ... need to take care we don't leave faces pointing to removed geometry, so far this works fine.

-  bev_rebuild_polygon() uses stack memory for <32 size ngons to reduce allocs.

- skip hash lookup when removing bevel verts (use tag instead).
2012-11-19 02:26:59 +00:00
Campbell Barton
a9af563526 bmesh: lazy initialize bmesh tool flag pool, has the advantage that modifiers that dont use bmesh operators can skip allocating it. 2012-11-18 12:14:22 +00:00
Campbell Barton
42ebc9bc80 bmesh: move internal API flags out of BMFlagLayer, into BMHeader which was being padded up anyway, added static assert to make sure it stays <=16 bytes. 2012-11-18 10:17:07 +00:00
Campbell Barton
fd9dac77d1 bevel now only takes manifold edges (so it doesnt need to check for them) 2012-11-18 09:33:11 +00:00
Campbell Barton
b72c1ac33c bmesh function was still using bmesh operator flags, use edge tags instead. 2012-11-18 09:25:57 +00:00
Campbell Barton
4401ac8c9e finish moving bevel code out of the operator dir (it works again) 2012-11-18 08:35:27 +00:00
Campbell Barton
9a74fb5b05 moving bevel to tools dir as-is to keep svn history (breaks build, will fix next). 2012-11-18 08:20:02 +00:00
Campbell Barton
916039f520 move decimator into tools/ dir 2012-11-18 08:16:09 +00:00
Campbell Barton
2de2acc681 add CDDM_from_bmesh(), avoids using BMEditMesh in modifiers. 2012-10-24 07:24:11 +00:00
Campbell Barton
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
Campbell Barton
aaafa0c2fe code cleanup: move file string defines into BLI_path_utils.h, BKE_utildefines is now unused but keep incase we want to add defines there later. 2012-09-03 22:04:14 +00:00
Campbell Barton
ca7d1ec39d style cleanup: use <pre> for doxygen ascii art 2012-08-13 15:17:15 +00:00
Campbell Barton
32cf7fcdb1 code cleanup: spelling 2012-07-16 23:23:33 +00:00
Campbell Barton
af3e348430 code cleanup: use TRUE/FALSE rather then 1/0 for better readability, also replace do prefix with do_ for bool vars. 2012-05-19 13:28:19 +00:00
Nicholas Bishop
ed33320e3f Code cleanup: simplify standard GHash creation.
Added four new functions as shortcuts to creating GHashes that use the
standard ptr/str/int/pair hash and compare functions.

GHash *BLI_ghash_ptr_new(const char *info);
GHash *BLI_ghash_str_new(const char *info);
GHash *BLI_ghash_int_new(const char *info);
GHash *BLI_ghash_pair_new(const char *info);

Replaced almost all occurrences of BLI_ghash_new() with one of the
above functions.
2012-05-16 00:51:36 +00:00
Campbell Barton
145289ad95 code cleanup: minor improvements to float/vector usage. 2012-05-12 22:13:38 +00:00
Campbell Barton
2a1ba8c85b style cleanup: formatting and some float/double promotion 2012-05-03 19:57:24 +00:00
Campbell Barton
ef0a4c0ba9 fix for bevel modifier creating invalid geometry - simply tell BM_face_split() to check for doubles. 2012-04-26 15:38:16 +00:00
Campbell Barton
a667492d0e fix [#30997] Bevel angle option is broken (bevel vertex only) 2012-04-24 05:38:11 +00:00
Campbell Barton
f02694f5a4 workaround for vertex bevel modifier failing since the BMesh update. 2012-04-24 05:02:53 +00:00
Campbell Barton
077cbaddf0 - remove unneeded len_v3v3 in bevel code
- remove dead assignments from vgroup-blend
2012-04-24 04:44:51 +00:00