diff options
author | Antonioya <blendergit@gmail.com> | 2016-10-02 21:13:59 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2016-10-02 21:13:59 +0300 |
commit | 63ec8445d1b320f8e26dd16bfff0798ffd6ee8cb (patch) | |
tree | d80cd3b596ea7420f7f0fd7627f197f8941a981c /archimesh/achm_gltools.py | |
parent | fd3566473daf0c72ff87268efddc42fadba6e07d (diff) |
Fix T49533: Archimesh does not display all dimensions when last wall closes room
When the end of the last wall was equal to the close wall, the
dimensions were not displayed.
The problem was related with the precision in the point calculation.
Some code cleanup was done too.
Diffstat (limited to 'archimesh/achm_gltools.py')
-rw-r--r-- | archimesh/achm_gltools.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/archimesh/achm_gltools.py b/archimesh/achm_gltools.py index aaddbeaf..89e29542 100644 --- a/archimesh/achm_gltools.py +++ b/archimesh/achm_gltools.py @@ -155,7 +155,7 @@ def draw_line(v1, v2): # ------------------------------------------------------------- def draw_room_data(myobj, op, region, rv3d, rgb, rgbw, fsize, wfsize, space, measure, dspname): - verts, activefaces, activenormals = get_wall_points(myobj) + verts, activefaces, activenormals = get_wall_points(myobj, op) # -------------------------- # Get line points and draw @@ -175,7 +175,7 @@ def draw_room_data(myobj, op, region, rv3d, rgb, rgbw, fsize, wfsize, space, mea # Top for e in face: if verts[e][2] != 0: - if verts[a1][0] == verts[e][0] and verts[a1][1] == verts[e][1]: + if round(verts[a1][0], 5) == round(verts[e][0], 5) and round(verts[a1][1], 5) == round(verts[e][1], 5): a2 = e else: b2 = e |