Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2007-11-29 17:41:33 +0300
committerCampbell Barton <ideasman42@gmail.com>2007-11-29 17:41:33 +0300
commit6649ba74d6186a6d8610ab3515494dd8854c3292 (patch)
treec09cbbf794745721346dc040aa0e4b1e4bf6a4e2 /release
parentfbadcf1c7bfe7658bc626be326ef4f7b7bbcc485 (diff)
- better weighting for fill twig placement
- curve direction isnt used anymore - just make the small end the last.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/wizard_curve2tree.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/release/scripts/wizard_curve2tree.py b/release/scripts/wizard_curve2tree.py
index fe1a8e427a5..6515e9c3762 100644
--- a/release/scripts/wizard_curve2tree.py
+++ b/release/scripts/wizard_curve2tree.py
@@ -251,6 +251,8 @@ class tree:
if brch.bpoints:
# if all points are in the same location, this is possible
self.branches_all.append(brch)
+ if brch.bpoints[0].radius < brch.bpoints[-1].radius: # This means we dont have to worry about curve direction.
+ brch.bpoints.reverse()
brch.calcData()
# Sort from big to small, so big branches get priority
@@ -1030,9 +1032,11 @@ class tree:
for pt in interior_points:
# line from the point to the seg endpoint
+
line_normal = seg.tailCo - pt.nextMidCo
l = line_normal.length
+
cross1 = CrossVecs( seg.no, line_normal )
cross2 = CrossVecs( pt.no, line_normal )
@@ -1043,7 +1047,7 @@ class tree:
# angle = 66.0 # min(AngleBetweenVecs(v2_co-v1_co, leaf.co-cc), AngleBetweenVecs(v1_co-v2_co, leaf.co-cc))
# print angle, angle2
# l = (l * ((1+abs(angle-BEST_ANG))**2 )) / (1+angle_line)
- l = angle_leaf_no_diff * angle_line * l
+ l = (1+(angle_leaf_no_diff/180)) * (1+(angle_line/180)) * l
if l < best_dist:
best_pt = pt