Commit Graph

403 Commits

Author SHA1 Message Date
Howard Trickey
0f8f494d63 Fix T49296, assert failure in Bevel code.
The mesh interpolation function failed to fill a fractions-of-the-way
array properly when the distances are very small but nonzero.
2016-09-12 07:29:31 -04:00
Bastien Montagne
f4e4009afd Cleanup: some bad sizeof() usages. 2016-08-18 16:18:58 +02:00
Howard Trickey
e3b5aa9bb1 Fix Bevel crashes T49088 and T48858.
Was calling the fast path for finding edge order in cases
where it should not have been called.
2016-08-17 11:24:31 -04:00
Campbell Barton
3948f65686 Cleanup: style, spelling 2016-07-19 10:27:33 +10:00
Campbell Barton
9f5621bb4a Cleanup: comment blocks 2016-07-02 10:08:33 +10:00
Campbell Barton
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
Campbell Barton
e6d947f037 BMesh Intersect: use flags to keep track of verts
For simple cases bitmasks were OK, but didnt work for vert/edge, vert/edge tests.

Tag verts instead, makes logic easier to follow and gives minor speedup.
2016-06-29 16:09:58 +10:00
Campbell Barton
c7a6ff0981 Docs: arg names 2016-06-27 13:21:14 +10:00
Campbell Barton
d9a01a1d04 Fix T48707: Edit-mesh intersect crash
In rare cases intersect would attempt to add edges with the same vertex twice
from edge-vert / edge-edge intersections.

Solve by checking for duplicates when creating vertex-array for these types of intersections
(always under 3x comparisons, so not much overhead).
2016-06-23 22:20:40 +10:00
Campbell Barton
a8898d3105 Correct assert 2016-06-23 12:26:26 +10:00
Campbell Barton
8ae74ece9a Fix null-pointer free
Own error in recent decimeter commit
2016-06-22 05:34:04 +10:00
Dalai Felinto
72273b08cc Fix building for Windows after 57cff46v (booleans unitialized) 2016-06-20 13:02:53 -03:00
Campbell Barton
3f744a16c4 Correct error in recent commit 2016-06-16 22:18:59 +10:00
Campbell Barton
5ea27bec1f BMesh Decimate: use doubles to calculate optimized position
This allows the error threshold for calculating the optimized location to be much lower.

Resolves visible artifacts w/ 1m-tri happy-buddha example.
2016-06-16 19:25:02 +10:00
Campbell Barton
57cff46cec BMesh Decimate: support ngons 2016-06-16 04:30:59 +10:00
Campbell Barton
51cb4ea2cf Fix T48154: Decimate topology changes with scale
This can't be avoided completely, however the threshold used can be much lower.
2016-06-14 17:12:29 +10:00
Howard Trickey
543c64ef74 Fix bug where corner boundary was straight when it should curve.
Some adjustments to how bevel edge 'profiles' are adjusted in some
cases. For the bug fix, wanted to handle cases of middle of three
coplanar beveled cases to make profile curve rather than linear
interpolate.
Also undid an earlier decision to make profile plane be perpendicular
to beveled edge i the non-coplanar case.
2016-06-01 08:51:08 -04:00
Howard Trickey
7928030eff Fix T47257: bevel crash when there are internal faces.
Bevel had assumed that when rebuilding a face that touches
a vertex with beveled edges, the edges of the face at that vertex
would be adjacent in internal order. That is not necessarily true
if there are edges with more than two faces attached.
We could just prohibit beveling any edges that touch a vertex
where this happens (we already don't bevel non-manifold edges)
but the use case in the model of T47257 seems reasonable.
Also had to fix the edge-ordering code, and the face reconstruction
code to take care of cases where the face normal may not be as expected.
2016-05-25 08:48:46 -04:00
Campbell Barton
86b509229f Fix T48413: editmesh intersect tool crash
Its important to add tri-edge intersections from both sides.
2016-05-12 21:00:08 +10:00
Campbell Barton
8d3f367c01 Correct debug prints 2016-05-12 20:59:48 +10:00
Campbell Barton
bc1a7d9283 Cleanup: warnings
Values set but not used
2016-05-06 16:49:25 +10:00
Campbell Barton
6e94ec623d BMesh: limited-dissolve, add check for wire edges
Recent degenerate check crashed on chains of wire edges
2016-04-28 12:50:12 +10:00
Campbell Barton
bde7439816 Minor optimization for limited-dissolve
Use dot product instead of angle.
2016-04-20 07:50:48 +10:00
Campbell Barton
7cc9f6b6f8 Minor edits to last commit
Avoid redundant tests
2016-04-19 13:07:01 +10:00
Campbell Barton
12b0c03e49 Fix T47998: Limited dissolve fails /w holes
Holes with flat surfaces could have their edges dissolved causing degenerate faces.
Now check that collapsing a vertices isn't creating self-overlapping faces.
2016-04-19 12:18:19 +10:00
Campbell Barton
5ddf6ca87a Quiet warning for release build 2016-04-06 18:26:39 +10:00
Campbell Barton
78d39cad8b Tweak fill-region method to produce fewer 'gaps' 2016-04-06 15:07:37 +10:00
Campbell Barton
c6b27dd4fa BMesh: improve path-select fill region w/ ngons
Rewrote to work with ngons and and more complex topology, now uses separate function.
Fixes T48009.
2016-04-01 23:36:06 +11:00
Campbell Barton
a55477d32a Shortest Path Select: option to select all paths between 2 elements
This option selects all paths between source/destination which are no longer than the path found.

Handy for selecting meshes with a grid-topology.
2016-03-31 04:25:19 +11:00
Bastien Montagne
c6c223ade6 Fix T47164: [Scene.raycast] - True result when it should be False.
We cannot use FLT_MAX as initi distance for raycast...

Renamed TRANSFORM_DIST_MAX_RAY to BVH_RAYCAST_DIST_MAX, moved it into BLI_kdopbvh,
and use in RNA raycast callbacks (and all other places using that API).
2016-01-12 10:09:00 +01:00
Campbell Barton
9ac83d499e Fix bisect flagging w/ multiple cuts on an ngon
Caused symmetrize to fail for concave ngons crossing the midpoint multiple times.
2016-01-09 02:06:45 +11:00
Campbell Barton
0a118317fc BMesh Path Select: Face Stepping Option
Supports diagonal paths for verts and faces,
Selects edge-rings with edges.
2015-12-27 22:39:25 +11:00
Campbell Barton
88191f7fa3 BMesh: support connecting single-edge island links
Handle these cases by temporarily disconnecting the single links to ensure isolated islands,
then link back up after.
2015-12-17 05:13:57 +11:00
Campbell Barton
fa3fe2ee10 Cleanup: math lib naming
Distinguish between line / line_segment
2015-12-15 18:16:41 +11:00
Campbell Barton
fa4a9c7ae6 BMesh: don't use total faces to detect edits
Possible a boolean operation edits the mesh while keeping the same number of faces.
2015-12-13 19:55:21 +11:00
Campbell Barton
e47397c7d2 BMesh: no need to tag edges created to fill holes
Was selecting these edges after applying boolean,
which isnt useful since selection is supposed to be along the cuts.
2015-12-13 19:55:21 +11:00
Campbell Barton
dc98a3b0a7 Cleanup: style/spelling 2015-12-12 15:10:03 +11:00
Campbell Barton
ebf9d315c4 BMesh: editmode booleans ignored when no faces cut
For the intersect tool this made sense, but booleans can use cuts which overlap edges exactly.
2015-12-12 13:58:03 +11:00
Campbell Barton
189032c724 Correct error in last boolean commit
Side was flipped
2015-12-12 13:15:09 +11:00
Campbell Barton
e301fcf8e7 Commend timing prints for boolean 2015-12-12 01:30:03 +11:00
Campbell Barton
fa32cde8a8 BMesh: boolean wasn't ignoring hidden faces
Needed for editmode use
2015-12-12 00:52:38 +11:00
Campbell Barton
d70e0b6654 BMesh: Boolean as an edit-mode tool
Works much the same as intersect operator,
expose as a new operator since for users its quite different.

Access from face menu.

Internally, this adds boolean args to BM_mesh_intersect function.
2015-12-11 17:54:42 +11:00
Campbell Barton
c593855b29 BMesh: hole support for intersect tool
Support cutting many outlines into a single face (creating edges between isolated regions).
2015-12-11 12:01:22 +11:00
Campbell Barton
2f57b1cece Fix for mistake in intersect duplicate list check
In practice this hardly ever happened.
2015-12-11 00:45:38 +11:00
Campbell Barton
5452df7984 BMesh: minor optimization for intersect
Avoid double lookup on insertion ghash
2015-12-10 23:42:52 +11:00
Campbell Barton
9bcd604e1d BMesh Decimate: don't collapse zero weighted edges 2015-12-03 00:21:08 +11:00
Campbell Barton
fc9505c9c5 Cleanup: warnings & spelling 2015-12-02 13:15:52 +11:00
Campbell Barton
6483575b35 Fix error with intersect handling split-wire edges 2015-11-26 13:16:45 +11:00
Campbell Barton
d47fbece51 BMesh: improve face-path-picking w/ tri-fans
Face paths including triangle-fans would often be avoided because
the face center and edge would 'zig-zag'.

Resolve using wighted face center and picking an edge-point between face centers.
2015-11-21 10:12:10 +11:00
Campbell Barton
22931f2f9f BMesh: symmetry aware decimate
Support for decimating while maintaining symmetry on a single axis.
2015-11-18 10:52:00 +11:00