Campbell Barton
0d7d317755
BMesh: add checks for duplicates in a face
...
These could go un-noticed, causing errors later on.
2015-12-26 15:34:55 +11:00
Campbell Barton
77c3ecf88c
BMesh: check at least 2 edges in each loops vert
...
Also no need to check twice
2015-12-26 15:34:55 +11:00
Campbell Barton
5cd1b530c8
Cleanup: use enum for bmesh_elem_check
2015-12-25 02:10:00 +11:00
Campbell Barton
4a356d767b
BMesh: BM_verts_from_edges utility function
2015-12-24 20:30:02 +11:00
Campbell Barton
6732da8340
Fix weld edges into faces - eternal loop
...
Would happen with complex edge-nets mixed with faces.
2015-12-24 03:36:00 +11:00
Campbell Barton
44b593ae2d
Add BM_vert_edge_pair utility function
2015-12-23 16:08:23 +11:00
Campbell Barton
b51f730b0c
Fix error in BM_vert_is_edge_pair
...
Returned true for verts with a single edge.
2015-12-23 16:08:20 +11:00
Campbell Barton
a9c881f6a3
BMesh: store stackdepth as an index
...
Avoids -1 all over.
2015-12-22 16:41:01 +11:00
Campbell Barton
b6a49eb949
BMesh: add BM_face_share_vert_check/count
2015-12-17 18:06:05 +11:00
Campbell Barton
d7723df846
BMesh: partial-connection could make duplicate edges
...
Avoiding to make duplicate edges is too involved, do a remove-duplicates pass at the end instead.
2015-12-17 18:03:46 +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
8b1b320c9f
BMesh: utility function to split off wire edges
2015-12-17 05:02:14 +11:00
Campbell Barton
189032c724
Correct error in last boolean commit
...
Side was flipped
2015-12-12 13:15:09 +11:00
Campbell Barton
8cd7b42877
BMesh: Add option to use BMesh boolean modifier
...
This uses a bmesh-intersection, BLI_kdtree and watertight intersections to perform boolean operations.
For now keep both BMesh and Carve booleans usable at once for testing & bug reports,
however we plan to phase out Carve by next release.
2015-12-11 20:24:39 +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
9f3ed82f35
Correct error in recent commit w/ hole-filling
...
edge-groups weren't being sorted with 2d-coords applied.
2015-12-11 16:18:24 +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
bb4bff3576
BMesh: Add BM_face_kill_loose
...
Removes edges/verts that become unused.
2015-12-11 12:01:22 +11:00
Campbell Barton
aaa56782d3
BMesh: move BM_face_split_edgenet to its own file
...
Isolate edge-net splitting in preparation for other functions to be added here.
2015-12-09 16:24:52 +11:00
Bastien Montagne
3c6709a63c
Fix T37879: Default UV generation for mesh primitives.
...
Adds default-generated UVs to mesh primitives (cone, cylinder, icosphere, uvsphere, cube, circle, grid)
when they are added to the scene, since some of them can be pretty awkward to unwrap manually.
Original patch: Liam Mitchell (CommanderCorianderSalamander).
Main review work: Campbell Barton (campbellbarton).
Finalization, fixes and cleanup: Bastien Montagne (mont29).
Reviewers: mont29, #mesh_modeling, campbellbarton
Reviewed By: mont29, campbellbarton
Subscribers: lkruel, campbellbarton, michaelknubben, kevindietrich
Maniphest Tasks: T37879
Differential Revision: https://developer.blender.org/D481
2015-12-04 23:49:55 +01:00
Campbell Barton
c5ac037c8e
BMesh: pass loops instead of edges/verts to filter funcs
...
This allows to check the source face we're walking over.
2015-11-28 13:40:18 +11:00
Campbell Barton
a12fa185f8
BMesh: use typed filter callbacks (const args too)
2015-11-28 13:37:02 +11:00
Campbell Barton
a28e014313
BMesh: Add API call BM_face_calc_point_in_face
...
Was local to knife code, but this is generally useful.
2015-11-27 22:08:16 +11:00
Campbell Barton
69cdddd4cf
Fix error in recent check for duplicate tris
2015-11-25 11:28:25 +11:00
Campbell Barton
daa90de3fd
Cleanup: shadowing (bmesh)
2015-11-23 17:40:10 +11:00
Campbell Barton
86cb772eb7
Cleanup: variable names, ascii diagram
2015-11-20 08:22:44 +11:00
Campbell Barton
410ca0ed92
Recent change to bmesh_jekv caused assert
...
Note that the mesh was valid, this just stops the radial check from failing.
2015-11-20 08:22:44 +11:00
Bastien Montagne
29d9140fce
Fix T46804: Crash using triangulate modifier on a specific mesh.
...
Issues was again the ugly hack of swapping last generated tri with original face
we use in BMesh triangulate code - here it could lead in some rare case to have
invalid face pointer in doubles list.
2015-11-19 22:02:22 +01:00
Bastien Montagne
8bdb884289
Fix related to T46804 - BMesh validate code would use invalid pointers after checking them!
...
Note that this does not fix the issue reported in T46804, juts makes it crash later down in code...
2015-11-19 20:42:46 +01:00
Campbell Barton
b1c4d21e2e
BMesh: support splitting edge-loops when expanding
2015-11-19 22:52:17 +11:00
Campbell Barton
9c044b4773
BMesh: new API call to collapse an edge
...
Existing collapse functions were strict regarding the number of verts sharing an edge.
BM_edge_collapse allows any edge to be passed in without first having to manipulate geometry.
2015-11-19 22:52:17 +11:00
Campbell Barton
93fb07fbd5
BMesh: bmesh_jekv check for degenerate faces
...
Move check for degenerate faces from BM_vert_collapse_faces into bmesh_jekv.
2015-11-19 22:52:17 +11:00
Campbell Barton
b8c40d47e0
Cleanup: remove unused bmesh iterator
2015-11-19 22:13:35 +11:00
Campbell Barton
7a09d15ade
Cleanup: comments/style
2015-11-06 05:34:05 +11:00
Campbell Barton
0f769afe07
Fix T46692: Triangulate creates duplicate faces
...
Caused a crash in dyntopo.
2015-11-06 01:13:23 +11:00
Campbell Barton
ebb2a78c7a
Error in last commit
2015-11-05 22:25:09 +11:00
Campbell Barton
3863660c37
Fix face creation using incorrect loop-custom-data
...
Custom-data on newly created face data was often rotated.
Now the API doesn't copy data from adjacent loops when creating faces.
Most functions were already overwriting this anyway.
Since such decisions are better made at a higher level, now it's the responsibility of the caller.
2015-11-05 20:19:09 +11:00
Campbell Barton
534c0af4d3
Fix BMesh memory leak w/ multires data
2015-11-05 19:07:22 +11:00
Campbell Barton
23344bca6c
BMesh: triangulate & poke - multires data support
2015-11-05 17:40:33 +11:00
Campbell Barton
ce49c70956
BMesh: generalize logic for quad/ngon triangulate
...
Avoid having 2 different code-paths for face triangulation.
2015-11-05 08:19:05 +11:00
Campbell Barton
3152419e7e
Add missing check for multires interpolation
2015-11-05 06:03:26 +11:00
Campbell Barton
020fdeb760
Cleanup: de-duplicate quad_coord & resolve_quad_uv_v2
2015-11-04 04:01:15 +11:00
Campbell Barton
268538853c
Correct error in recent commit
2015-11-04 00:01:41 +11:00
Campbell Barton
bed91b623f
Edge/Vert slide: improve multires interpolation
...
Need to re-interpolate the entire face, not just the connected loop.
Also add BM_face_interp_multires()
2015-11-03 20:38:23 +11:00
Campbell Barton
f75d6c4a8f
BMesh: add BM_loop_interp_multires_ex which takes cached vars
...
Avoid recalculating face centers (for each loop) when interpolating multires.
2015-11-03 18:28:13 +11:00
Campbell Barton
77e223ddd5
BMesh: inline vert-loop iteration for normal calc
...
Calculating normals is called often (sculpting for eg),
so avoid using high-level iterator here.
2015-11-03 17:46:09 +11:00
Campbell Barton
ac7abb55d7
Cleanup: use 'const' for BMesh checking funcs
2015-11-03 17:06:56 +11:00
Campbell Barton
073ae9c572
Fix flip normals w/ multires
...
Needs Z axis flip to maintain the shape.
2015-11-03 15:50:59 +11:00
Campbell Barton
5f0f861b1d
BMesh: avoid mdisp lookups (minor optimization)
2015-11-03 15:50:52 +11:00
Campbell Barton
56bcda8bc6
Fix BMesh selection flushing w/ mixed modes
...
Fix for T46494 wasn't working properly when de-selecting faces,
adjacent faces would remain selected but have unselected edges.
Logic here is admittedly rather fragile since it relies on both
selection functions and flushing afterwards.
2015-11-02 17:04:29 +11:00