diff options
author | Campbell Barton <ideasman42@gmail.com> | 2006-05-28 06:12:49 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2006-05-28 06:12:49 +0400 |
commit | e47719d253c3be3217816a8dc83c64e0d3d9828d (patch) | |
tree | 1f3b1582c8c73d88b1e851779df8c8356c3b9000 /release/scripts/bpymodules/BPyMesh_redux.py | |
parent | 83105911bf7041d94f2c2e652efc53352e6e61be (diff) |
comments on how edge weighting for collapsing works.
uv_auto_layout_tex now uses the recently fixed saveRenderedImage - I needed to make clean and make to get it working.
Diffstat (limited to 'release/scripts/bpymodules/BPyMesh_redux.py')
-rw-r--r-- | release/scripts/bpymodules/BPyMesh_redux.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/release/scripts/bpymodules/BPyMesh_redux.py b/release/scripts/bpymodules/BPyMesh_redux.py index caf3e17788a..6fc9e0f890f 100644 --- a/release/scripts/bpymodules/BPyMesh_redux.py +++ b/release/scripts/bpymodules/BPyMesh_redux.py @@ -386,6 +386,16 @@ def redux(ob, REDUX=0.5, BOUNDRY_WEIGHT=2.0, REMOVE_DOUBLES=False, FACE_AREA_WEI try: # can use perim, but area looks better. if FACE_AREA_WEIGHT: + # Psudo code for wrighting + # angle_diff= The before and after angle difference between the collapsed and un-collapsed face. + # ... devide by 180 so the value will be between 0 and 1.0 + # ... add 1 so we can use it as a multiplyer and not make the area have no eefect (below) + # area_weight= The faces original area * the area weight + # ... add 1.0 so a small area face dosent make the angle_diff have no effect. + # + # Now multiply - (angle_diff * area_weight) + # ... The weight will be a minimum of 1.0 - we need to subtract this so more faces done give the collapse an uneven weighting. + angle_diff+= ((1+(Ang(cfa.normal, new_nos[ii])/180)) * (1+(cfa.area * FACE_AREA_WEIGHT))) -1 # 4 is how much to influence area else: angle_diff+= (Ang(cfa.normal), new_nos[ii])/180 |