Commit Graph

322 Commits

Author SHA1 Message Date
a7d292394e Fix T43898, correct all uv layers in bevel, not only the active one 2015-03-05 18:50:44 +01:00
dce59530d0 Fix part 1 of T43239, multisegment vertex bevel on 2-edge vertices.
Implemented multisegment rounding of vertices with two edges.
Works both with wire edges and edges that have one or two faces
attached.
2015-02-12 06:55:30 -05:00
d4934f8f6d cleanup: style/indentation 2015-02-11 18:39:28 +11:00
9fadacfd0f cleanup: style 2015-01-08 19:57:50 +11:00
bf168f0600 Fix T43137: vertex bevel percent mode wasn't implemented. 2015-01-06 09:13:38 -05:00
25c5542fe7 Math Lib: add constant: M_SQRT1_3 1/sqrt(3) 2014-11-22 18:21:52 +01:00
133f79e449 Cleanup: warnings, typos 2014-10-29 14:15:21 +01:00
8d1d16bf0d Bevel modifier: Add weight support for vertices bevelling.
Nothing to say here, really, just a couple of lines to add to get it working...
2014-10-15 08:57:11 +02:00
eadfddd02a Cleanup: magic numbers 2014-08-12 15:58:53 +10:00
13a8f650df Cleanup 2014-07-21 10:53:07 +10:00
70453c578d Fix T34664: bevel face material can be set in tool and modifier.
Now the bevel tool, modifier, and internal operator have a material
slot # parameter that the user can set. If left at default of -1,
behavior is as current -- bevel face material is taken from the
closest original face (this may be ambiguous). If material slot
is >= 0, it gives the material slot index number for the material
to use.
2014-07-17 09:20:22 -04:00
3b81aae5c1 BMesh: avoid redundant normalize comparing angles 2014-07-14 14:22:15 +10:00
b5213b2dea Fix T40007 Bevel tool resets after getting to 1.
If the side of a beveled edge hit another vertex, the offset
amount reset to zero. This was the result of commit rB1582dd5e4d7c
which clamped the amount to zero to avoid creating spikes with
obtuse angles. Now we clamp the amount to the closest end of
the edge to where the amount wants to be.
Also fixes the first part of T40365.
2014-06-14 17:47:44 -04:00
d6287b213b BLI_gsqueue: use size_t for elem_size (was casting all over) 2014-06-15 03:49:25 +10:00
9f0466fb6b Quiet double promotion warning & ws edit 2014-06-13 02:22:40 +10:00
8c2b5ffb11 Fix Bevel bug T39746, small scale gives flat profile.
With very small meshes or very small bevel amounts, the bevel
profile would be flat even if a round one was requested.
Problem was that the code was checking the length of a cross
product for closeness to zero to test coplanarity. Needed
to normalize things before making that test to account for scale.
2014-06-12 10:22:10 -04:00
84767a29f1 Fix Bevel multisegment profile bugs T39184, T37502 and last part of T40365.
When doing a 'weld' type join where there are two non-beveled edges
in the same plane one beveled one but not the other, then there
should be a curved profile; bug was creating a straight one.
2014-06-10 11:21:52 -04:00
d504b325fb Fix T37618 Bevel mismatched offsets and bad profile plane.
Used a different technique to resolve "impossible" offset cases
that makes more consistency. Also changed the plane in which
the profile lies for the case with only one beveled edge and
more than 3 other edges.
2014-05-30 16:07:45 -04:00
6bde9a52f9 Fix T39174 Bevel didn't maintain edge attributes.
When rebuilding the polygons that touch bevel-involved vertices,
need to copy the edge attributes from corresponding original edges.
Special treatment of corner segments, to maintain continuity of
smooth and seam attributes.
Another fix: if have four meeting edges, two opposite ones beveled
and the other two not, propgate the non-beveled-edges attributes
across the line that joins them (perpendicular to the bevel).
2014-05-29 07:32:16 -04:00
d9dd29054f Style cleanup 2014-05-20 00:11:16 +10:00
758bdcd6c2 Fix Bevel bugs T39726 and T39108, bevels with wire edges.
This updates the fix in rB27db75363, which had to be undone
because it broke other bevels.
It also fixes cases where edges went away went doing vertex
bevel on vertices with some wire edges.
2014-05-16 10:28:15 -04:00
a197d02b03 Fix T39939: Undo change of rB27db75363e67, which broke bevel.
The test for wire edges when reattaching was wrong, because
some newly made edges are wire at the point of the test.
This made some duplicate edges.
Need to track the original wire edges a different way.
2014-04-28 18:41:33 -04:00
fdcb9fcb7e Bevel: Avoid sqrt comparing lengths 2014-04-29 00:35:32 +10:00
27db75363e Fix T39726: wire edges cause bevel artifacts.
Now code explicity excludes wire edges from beveling
and reattaches the wire edges to one of the newly
created vertices after beveling.
Also fixes a bug where vertex-beveling a wire-edge-only
vertex would not reattach the wire edges.
2014-04-28 09:07:47 -04:00
d7d2e71a03 Correct some errors in auto-cleanup 2014-04-27 22:02:59 +10:00
88a0fe5f1b Code cleanup: use 'const' for arrays (bmesh) 2014-04-27 00:25:16 +10:00
617557b08e Code cleanup: remove TRUE/FALSE & WITH_BOOL_COMPAT define 2014-04-01 15:22:28 +11:00
37ef7f3537 Fix T38936 Bevel strange flickering on big meshes.
Last change to bevel had a check for what was supposed
to be an "on edge" new vertex being off the edge.
The test tolerance was too small. This fixes that.
2014-03-04 09:31:20 -05:00
1582dd5e4d Partial fix for T38871, Bevel could create a far-out spike.
There needed to be a check that when a newly created point is
supposed to be on an edge, that it stays within the bounds
of either end of the edge.
This fixes the hole-in-cube example in the bug, but not
the boolean modifier one, which still needs more work.
2014-02-28 13:56:17 -05:00
d3b9457991 Code cleanup: style/warnings 2014-02-28 11:04:15 +11:00
6de3a8a4fe Bevel fix for T38675, bad bevel on slanted L.
The test for a reflex angle used the vertex normal,
which was not a good test for a saddle point vertex.
Switched to using the face normal, if available, for that test.
Also added test for this in svn bevel_regression.blend.
2014-02-17 11:43:31 -05:00
68521841a8 Bevel: remove unused assignments.
Caught by coverity.
2014-02-03 09:53:27 -05:00
d900f5be55 Code cleanup: use bools where possible 2014-02-03 19:35:44 +11:00
1dc1d92dab Code cleanup: white space and cmake was broken on all platforms 2014-02-03 13:56:34 +11:00
39202a53b5 Bevel: fix glitch in "pipe" case with square profile.
The "pipe" case -- where two beveled edges are in line
and there is at least one more beveled edge -- needed better
handling when profile parameter = 1.0 (square outward).
2014-01-28 13:20:42 -05:00
37f1b717eb Bevel code cleanup: get rid of old 'ADJ' code.
The new subdiv 'adj' pattern is working well, so removing the
old code and taking opportunity to remove 'subdiv' from a number
of names.
2014-01-28 07:03:25 -05:00
a5c35fb27f Code cleanup: use booleans where appropriate 2014-01-28 04:00:04 +11:00
1c29fd77d3 Code Cleanup: style and correct API class ref 2014-01-26 22:17:01 +11:00
01c1790a11 Make multisegment bevel profiles even for all parameters.
The method for calculating points on the profile for non-circles
and non-lines meant that the segments making up an edge had
uneven widths.
Use a numeric search technique to find superellipse evaluation
points that lead to equal-sized chords across the profile.
Also calculate the actual profile points sooner, so that they
don't have to be recalculated again and again.
This also sets up for a possible later feature of arbitrary
profile shapes, set by user.
2014-01-24 10:07:24 -05:00
45b9822259 Fix T38300: Bevel didn't always reconstruct faces properly.
With new subdivision method for making the vertex mesh, we always
subdivide the edges between the new vertices around a vertex
(we used to not subdivide edges between two non-beveled edges).
This fixes a bug related to this change.
2014-01-21 09:02:27 -05:00
37242e6b0b Code Cleanup: style 2014-01-21 12:05:27 +11:00
a502959e4b Bevel: fixed problems with vertex bevel and some 'weld' cases.
Vertex bevel was completely messed up after last change,
and this fixes.
'Weld' bevels, where there are exactly two beveled edges
meeting at a vertex, now look better in cases where one
of the beveled edges is on a flat plane.
2014-01-20 08:55:07 -05:00
621bf47e91 Docs: doxygen file descriptions for BLF, GPU and WM 2014-01-19 23:15:25 +11:00
af93ebcb50 Code Cleanup: style and redundant casts 2014-01-16 19:15:53 +11:00
e5c7535beb Code Cleanup: float/double promotions 2014-01-15 13:40:40 +11:00
c5d3abc863 Bevel fix to clamping for percent type.
The clamp code is still very crude and over-conservative,
but was totally wrong for the percent amount type.
2014-01-14 11:21:56 -05:00
c925b5bbb2 Bevel fixes for profiles: better way to calculate.
It is better to keep the profile as it is perpedicular
to the edge, and then project it onto a given plane
at the corners. Also fixed the interpolation to a
different number of segments when the profile is not
round.
2014-01-12 14:10:39 -05:00
62aa004c25 Style Cleanup: whitespace 2014-01-12 22:05:24 +11:00
e47a41e3fc Code Cleanup: style 2014-01-09 11:44:59 +11:00
8305fd8841 Code Cleanup: style edits to bevel and remove unneeded boundvert_rep_face call 2014-01-09 00:50:32 +11:00