Commit Graph

70 Commits

Author SHA1 Message Date
6cdb555e6e bmesh refactor - rename some of the BM_****_share_****_count() functions to BM_***_share_check()
some of these were only returning a boolean, others returned a count even though only a boolean was needed.

split some of the functions in two as well where check/count are both needed.
2012-11-09 14:52:05 +00:00
2bb174cfa4 style cleanup: indentation 2012-11-09 09:33:28 +00:00
5549904171 style cleanup 2012-10-29 02:11:40 +00:00
e5a31eff37 code cleanup: use squared length for comparisons and is_zero_v# rather then checking length == 0. 2012-10-25 23:04:33 +00:00
2de2acc681 add CDDM_from_bmesh(), avoids using BMEditMesh in modifiers. 2012-10-24 07:24:11 +00:00
f70d2c65d8 rename api functions...
- minf, maxf, mini, maxi --> min_ff, max_ff, min_ii, max_ii
2012-10-23 13:28:22 +00:00
248b2fc6d6 bmesh-decimator update
- update face normals when triangulating.
- avoid divide by zero when interpolating customdata on a zero length edge.
- replace zero float comparisons with fabsf() < FLT_EPSILON to avoid numeric error.

also renamed BLI_heap_empty() --> BLI_heap_is_empty() so its obviously readonly function.
2012-10-21 15:20:53 +00:00
a423f55ca9 Avoid recursion in skin modifier's edge matrix calculations
This is a potential fix for bug [#32263] Instant Crash with Skin
modifier.
2012-08-05 23:29:50 +00:00
c41e1e434a code cleanup: replace MIN2/MAX2 with minf/maxf 2012-07-29 16:59:51 +00:00
90d215535e add option so operators can be called with a flag, currently the only flag is to respect hidden geometry.
this is useful for bmesh tools that operate in object mode or for modifiers which would previously use hidden faces in some cases.
2012-07-21 00:58:02 +00:00
677876e429 Fix normals around root nodes of skin modifier output.
The direction for these are flipped from other end caps, so add a root
flag to indicate whether the cap polygon's vertex output order should be
reversed.

Fixes bug [#32079] Skin-modifier calculates root's normals wrong
projects.blender.org/tracker/index.php?func=detail&aid=32079&group_id=9&atid=498
2012-07-12 05:55:07 +00:00
69a7e0af02 rename bmesh ops since they are exposed in an api now. 2012-06-30 15:27:13 +00:00
405f6a7c77 code cleanup:
style and remove BM_face_find_longest/shortest_edge functions,
... instead use BM_face_find_longest/shortest_loop()->e
2012-05-27 11:10:27 +00:00
75a8de49fc Fix bug #31582, Crash with Skin modifier
Buffer overflow error in collecting split_face vertices.
2012-05-24 19:41:09 +00:00
da710b3e14 style cleanup: brace placement/newlines 2012-05-24 16:35:45 +00:00
f16f545c6e style cleanup
also fix example for mesh uv's
2012-05-22 16:24:09 +00:00
e1eeb81792 style cleanu: skin modifier 2012-05-22 15:57:42 +00:00
8801330c18 Add skin modifier: DNA, RNA, UI, and MOD_skin.c implementation.
Skin modifier documentation:
http://wiki.blender.org/index.php/User:Nicholasbishop/SkinModifier

Implementation based in part off the paper "B-Mesh: A Fast Modeling
System for Base Meshes of 3D Articulated Shapes" (Zhongping Ji,
Ligang Liu, Yigang Wang)

Note that to avoid confusion with Blender's BMesh data structure,
this tool is renamed as the Skin modifier.

The B-Mesh paper is current available here:
http://www.math.zju.edu.cn/ligangliu/CAGD/Projects/BMesh/

The main missing features in this code compared to the paper are:

* No mesh evolution. The paper suggests iteratively subsurfing the
  skin output and adapting the output to better conform with the
  spheres of influence surrounding each vertex.

* No mesh fairing. The paper suggests re-aligning output edges to
  follow principal mesh curvatures.

* No auxiliary balls. These would serve to influence mesh
  evolution, which as noted above is not implemented.

The code also adds some features not present in the paper:

* Loops in the input edge graph.

* Concave surfaces around branch nodes. The paper does not discuss
  how to handle non-convex regions; this code adds a number of
  cleanup operations to handle many (though not all) of these
  cases.
2012-05-22 15:29:01 +00:00
6c3bb8b903 EditMesh-based skin node drawing 2011-07-31 02:03:48 +00:00
cae05598b1 Added DNA and RNA for skin modifier, stubbed in skin modifier functions 2011-07-31 02:03:28 +00:00