[Bf-extensions-cvs] [d791f42] blender-v2.78-release: bugfix for T49593: more secure checking for same points in bulgepoly_to_cubic

Lukas Treyer noreply at git.blender.org
Wed Oct 19 14:43:07 CEST 2016


Commit: d791f42c54bea18a0a528747153aa7162383bed5
Author: Lukas Treyer
Date:   Fri Oct 7 10:53:05 2016 +0200
Branches: blender-v2.78-release
https://developer.blender.org/rBAd791f42c54bea18a0a528747153aa7162383bed5

bugfix for T49593: more secure checking for same points in bulgepoly_to_cubic

===================================================================

M	io_import_dxf/dxfimport/convert.py

===================================================================

diff --git a/io_import_dxf/dxfimport/convert.py b/io_import_dxf/dxfimport/convert.py
index c21d274..824b195 100644
--- a/io_import_dxf/dxfimport/convert.py
+++ b/io_import_dxf/dxfimport/convert.py
@@ -175,7 +175,7 @@ def bulgepoly_to_cubic(do, lwpolyline):
     Reference: http://www.afralisp.net/archive/lisp/Bulges1.htm
     """
     def handle_segment(last, point, bulge):
-        if bulge != 0 and (point - last).length != 0:
+        if bulge != 0 and not ((point - last).length == 0 or point == last):
             arc = bulge_to_arc(last, point, bulge)
             cubic_bezier = do.arc(arc, None, aunits=1, angdir=arc.angdir,  angbase=0)
         else:



More information about the Bf-extensions-cvs mailing list