Commit Graph

145 Commits

Author SHA1 Message Date
5e347c4f71 code cleanup: typos 2013-05-26 12:02:29 +00:00
7222d654b2 code cleanup: typo and stop manpage turning '$' into italic. 2013-05-25 02:21:50 +00:00
834c6ca316 Fix bug #35450, bevel make large spikes sometimes.
Needed special case for when beveled edge is
antiparallel to an adjacent edge.
2013-05-24 13:13:05 +00:00
e8d532f1dd style cleanup 2013-03-31 03:28:46 +00:00
e1a54214bb code cleanup:
- remove unused defines.
- quiet some shadow warnings.
- bevel, ifdef out some asserts that are too common.
- style
2013-03-25 02:41:30 +00:00
604bdb7f45 Fix bevel modifier bug #34611, limit bevel amount needed.
This is a quick fix that perhaps overestimates the point
of first geometry collision, but at least for now it should
allow models that used the old modifier and a too-big
bevel amount to not look awful.

The correct solution to this problem is much more involved
and I'll get to it later.
2013-03-13 14:08:12 +00:00
0a6e8a41b9 Enable new bevel tool code in bevel modifier.
Now modifier takes a segments parameter.
Bevel edge weights will multiply the overall amount.
For vertex-only, you can give a vertex group name,
and the weights in that will multiply the overall amount.
2013-02-21 17:29:35 +00:00
9d713688ba code cleanup: warnings 2013-02-04 16:20:39 +00:00
518bfbb1c9 style cleanup 2013-02-02 04:58:03 +00:00
7d3c6b2760 Fix bevel bug #33906, unwanted distortion with skewed meshes.
The code for making a rounded profile edge at a vertex needed
a special case for when that profile is on the third face
(the one not touched by the beveled edge) when only one edge
is beveled and the three faces are not orthogonal.
2013-01-31 12:54:06 +00:00
698aeec8b8 Vertex bevel: adjust vertex positions to make a more rounded pattern.
Also fixed debug quad drawing code to not join successive quads.
2013-01-21 18:19:34 +00:00
7d286d9a80 Bevel vertex: fix rebuild of faces so they are connected when seg > 1. 2013-01-21 13:31:16 +00:00
38cee985bb code cleanup: style & warnings. 2013-01-21 02:30:40 +00:00
add25e43ad Bevel vertex only (shortcut: control-shift-B) initial commit. 2013-01-21 01:52:23 +00:00
4d1d50ea8b Fix bevel crash #33801, when first edge of a vertex is wire. 2013-01-08 03:30:31 +00:00
835ebd576c Fix bevel crash bug #33714. Had to disable elem tag on new vertices. 2013-01-03 13:37:17 +00:00
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
9090049505 code cleanup 2012-12-23 16:09:26 +00:00
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
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
c40030a36c replace BLI_array_declare with BLI_array_staticdeclare() and BLI_array_alloca() for smaller arrays. 2012-12-12 02:48:03 +00:00
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
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
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
41b6e700e0 bevel: re-order checks so angle checks are done after quick sanity checks. 2012-12-04 14:41:40 +00:00
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
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
818a345be3 Silent a bunch of gcc warnings (usually dummy, but noisy!). 2012-12-02 16:01:06 +00:00
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
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
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
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
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
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
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
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
b688a79b30 skip some redundant looping in bevel code. 2012-11-23 06:09:03 +00:00
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
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
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
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
fd9dac77d1 bevel now only takes manifold edges (so it doesnt need to check for them) 2012-11-18 09:33:11 +00:00
b72c1ac33c bmesh function was still using bmesh operator flags, use edge tags instead. 2012-11-18 09:25:57 +00:00
4401ac8c9e finish moving bevel code out of the operator dir (it works again) 2012-11-18 08:35:27 +00:00
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