Campbell Barton
39f40250ed
bmesh wireframe operator now adds crease customdata when the crease option is enabled.
2013-09-12 04:02:31 +00:00
Campbell Barton
92d94ccb08
misc minor changes
...
- make cmake osx use of -ftemplate-depth match scons.
- use array size within sizeof(), more compact.
- replace AT with __func__ where the function is unique enough.
- BLI_box_pack_2D -> 2d to match other functions.
- rename new mesh normal calculation to mesh.calc_normals_split()
2013-09-10 19:23:39 +00:00
Campbell Barton
00bd7da674
correct error in recent changes for building with openmp.
...
rename DM_OMP_LIMIT to BKE_MESH_OMP_LIMIT and set to 0 when in debug mode, same for BM_OMP_LIMIT.
2013-09-09 05:42:26 +00:00
Campbell Barton
108a4c41c4
code cleanup: warnings and redundant checks.
2013-09-08 20:25:31 +00:00
Campbell Barton
3527d2fb27
code cleanup: quiet warnings
2013-09-08 06:05:42 +00:00
Campbell Barton
4f369c1e2d
use strict flags for gridfill, use unsigned ints.
2013-09-07 08:41:29 +00:00
Campbell Barton
0423d2b252
changes to grid fill
...
- use 4 weights for vertex customdata blending (was previously only using 2)
- option for simple blending, which blends locations using weights too and doesn't attempt to maintain the shape,
useful for flat surfaces or times when keeping the shape gives odd results.
2013-09-07 08:13:39 +00:00
Campbell Barton
63ade11564
grid-fill support for customdata, so filled areas have UV's, vertex colors etc interpolated from the boundary.
...
also support cases where only some of the boundary edges have faces to interpolate from.
2013-09-06 06:48:17 +00:00
Campbell Barton
7a38fe97fd
sorting utility functions for simple cases - sorting pointers by float for example.
2013-09-05 22:24:12 +00:00
Campbell Barton
3b72f1824c
rename positive_mod to mod_i, make it work with nagative numbers (matching pythons modulo), and use in a few more places.
...
allow mesh-checker-deselect to have a negative offset.
2013-09-05 20:54:32 +00:00
Campbell Barton
2e0422b17f
add function for rotating linked list so at item is last.
2013-09-05 11:40:38 +00:00
Campbell Barton
96c668b1dd
add positive_mod() utility function.
2013-09-05 10:12:00 +00:00
Campbell Barton
0994e7f96f
move timeit macros into their own include, since they are only used for testing and unrelated to PIL_time.h typical use.
2013-09-03 21:22:43 +00:00
Campbell Barton
01a2634d61
fix [ #36412 ] Pivot of active element switches to last selected face after duplicating vertices.
2013-09-02 04:39:48 +00:00
Campbell Barton
54310b8086
bmesh: internal api change, remove BMOElemMapping, its not needed since the values can be stored in the ghash directly.
...
saves 24 bytes per element (per vertex/edge/face on a 64bit system), for bmesh operators.
2013-09-02 03:13:51 +00:00
Campbell Barton
75383a79f6
array modifier was adding vertices to the 'targetmap' multiple times.
...
this is supported by weldop but would prefer not to allow multiple keys in the map.
2013-08-27 23:32:11 +00:00
Campbell Barton
377475f979
remove doubles: source/target can be swapped, check both flags.
2013-08-27 23:23:19 +00:00
Campbell Barton
d5469dd5c2
mesh remove doubles was adding verts into the weld_verts.targetmap multiple times (new paranoid asserts find this stuff).
2013-08-27 22:38:55 +00:00
Campbell Barton
bbce51d116
replace hashes with sets where possible.
2013-08-25 20:03:45 +00:00
Campbell Barton
81096bab0c
correct error in recent commit triangle-fill-dissolve, need to check if the edges face is removed (happens in rare cases).
2013-08-23 11:28:33 +00:00
Campbell Barton
111b365c58
_another_ fix for recently added bisect operator, looping over mixed geometry could read freed memory when vertices were removed.
2013-08-23 11:11:59 +00:00
Campbell Barton
98bb2197a2
add dissolve option to triangle fill operator, running dissolve after scanfill isn't so simple because of errors if one edge can't merge.
2013-08-23 11:10:46 +00:00
Campbell Barton
59b082dc27
fix for error in recetly added bisect operator, in rare cases it could attempt to remove vertices twice.
2013-08-23 10:19:58 +00:00
Campbell Barton
5b5cae86b7
optiona for bmesh triangle fill operator to take a normal argument
2013-08-23 10:12:09 +00:00
Campbell Barton
6f4b79d5af
edits to new symmetrize tool
...
- snap axis-aligned verts to the center.
- expose the threshold for detecting if a vertex is on the axis.
2013-08-23 05:32:43 +00:00
Campbell Barton
6cba2b8d73
move bmesh tools into their own include,
...
changes to tool args would rebuild far too many files and these are mainly by modifiers outside of bmesh.
2013-08-23 04:22:07 +00:00
Campbell Barton
da7af1e271
correct own error in r59365, reported as [ #36536 ] Extrusion detaches faces
2013-08-22 18:52:34 +00:00
Campbell Barton
c4e1d40022
replace symmetrize code with calls to bmesh operators.
...
calls: bisect, duplicate, scale, flip, weld.
resolves report [#36475 ] Symmetrise does not keep uv/weight
also fixes issues with faces that cross the axis more then once.
2013-08-22 18:02:36 +00:00
Campbell Barton
e97f979f73
new bmesh operator bisect_plane, cuts a mesh in half, takes a user defined plane as an argument, handles concave ngons which need multiple cuts.
2013-08-22 17:56:08 +00:00
Campbell Barton
c1cc9f3376
bmesh duplicate operator: add vertmap output slot.
2013-08-22 17:32:41 +00:00
Campbell Barton
fca659252f
code cleanup: bmesh duplicate functions
...
- avoid using an iterator when stepping around an edges radial loop.
- use naming constant with the rest of the bmesh operators.
2013-08-21 14:35:51 +00:00
Campbell Barton
649743dfd6
mesh duplication was doing a loop & hash lookup for every loop corner, when there is no need since the faces are aligned.
...
was also initializing and stepping an iterator for no reason.
2013-08-21 11:27:18 +00:00
Campbell Barton
7d661839a6
correct error in recent commit (face customdata)
2013-08-21 11:09:50 +00:00
Campbell Barton
9470754fd3
bmesh api cleanup, face creation args now accept an example face (as with vertex and edge),
...
also replace BM_face_create_quad_tri_v with BM_face_create_verts
2013-08-21 07:51:47 +00:00
Campbell Barton
8937a8b839
use BM_CREATE_NOP arg rather then zero, with pointer and bool args in either side in some cases it gets a bit confusing.
...
also correct edge-rotate where bool->flag conversion worked by accident.
2013-08-21 05:39:46 +00:00
Campbell Barton
6f856777fe
bmesh api:
...
- use heap for BM_face_create_ngon_vcloud allocations.
- replace BM_face_create_ngon_verts with more efficient BM_face_create_verts
2013-08-21 05:20:57 +00:00
Campbell Barton
f48efbf464
inset depth wasn't working right with relative offset, also make it work for inset individual.
2013-08-20 17:38:29 +00:00
Campbell Barton
21ac0515e4
fix [ #36352 ] Inset individual, uncheck "select outer" selects zero faces
...
rewrite individual inset not to remove and re-create faces, makes re-selection simpler.
2013-08-20 16:59:04 +00:00
Campbell Barton
c5e14f62a6
bmesh improvements to face creation.
...
* fill-holes operator now takes advantage of new edge-net fill, works in many more cases then it did before.
* face-create that uses edge-net now initializes the normals based on surrounding geometry, only running normal calculation if there are no connected faces for a reference.
2013-08-18 15:14:55 +00:00
Campbell Barton
e2dc3313fe
correct recent commit
2013-08-18 14:35:53 +00:00
Campbell Barton
19d3e230e6
improved BM_face_copy_shared to copy from more possible connected loops and add filter function (not used yet).
2013-08-18 11:44:51 +00:00
Campbell Barton
0b00ba4ee0
remove unused function
2013-08-17 13:08:09 +00:00
Campbell Barton
0f07ca6809
remove unused args from edgenet fill (since rewrite, but they weren't used before either)
2013-08-17 09:25:12 +00:00
Campbell Barton
5fafc222f0
style cleanup
2013-08-17 08:21:40 +00:00
Campbell Barton
85b0315b3b
avoid double ghash lookups
2013-08-17 08:00:22 +00:00
Campbell Barton
d7cc2be2b7
add linklist stack macros, use where over allocating an array was previously done.
2013-08-17 05:33:55 +00:00
Campbell Barton
ef8ea14f45
rewrite edgenet fill bmesh operator.
...
previous code created faces with mixed face-flipping and could get very slow,
test with ~60,000 edges here hung my system for over 2min (didnt wait for it to finish), new code executes in about 1 second.
new code doesn't attempt to flip faces correctly, its quite involved to do so, especially when the new faces are not created adjacent to eachother.
so simpler to calculate normals afterwards.
2013-08-16 14:18:54 +00:00
Campbell Barton
5157eea977
bmesh edge-net: refactor out face creation into its own function, replace array reallocation with alloca.
...
fix for error increasing the face tag count when the face might not be created.
2013-08-13 23:48:48 +00:00
Campbell Barton
91f04bebf0
bmo_edgenet_fill_exec was building a vertex array when it didnt need to. also simplify for loops.
2013-08-13 22:28:16 +00:00
Campbell Barton
5a9c012d86
fix for bug in rip tool, isolated verts would remain selected after ripping.
2013-08-13 01:52:36 +00:00