[Bf-extensions-cvs] [570b7d9] master: FIX T42252: Arcs are scaled correctly now. The scale factor now also accepts comas, not only points (comas are being replaced by points internally).
Lukas Treyer
noreply at git.blender.org
Tue Oct 21 18:21:53 CEST 2014
Commit: 570b7d94b3b2414e376d9eddd4f3a2df1e4dbb88
Author: Lukas Treyer
Date: Tue Oct 21 18:21:49 2014 +0200
Branches: master
https://developer.blender.org/rBA570b7d94b3b2414e376d9eddd4f3a2df1e4dbb88
FIX T42252: Arcs are scaled correctly now. The scale factor now also accepts comas, not only points (comas are being replaced by points internally).
===================================================================
M io_import_dxf/__init__.py
M io_import_dxf/dxfimport/do.py
===================================================================
diff --git a/io_import_dxf/__init__.py b/io_import_dxf/__init__.py
index fae5b17..d8385f8 100644
--- a/io_import_dxf/__init__.py
+++ b/io_import_dxf/__init__.py
@@ -496,7 +496,7 @@ class IMPORT_OT_dxf(bpy.types.Operator):
proj_scn = None
dxf_unit_scale = 1.0
if self.use_georeferencing:
- dxf_unit_scale = float(self.dxf_scale)
+ dxf_unit_scale = float(self.dxf_scale.replace(",", "."))
if PYPROJ:
if self.proj_dxf != 'NONE':
if self.proj_dxf == 'USER':
diff --git a/io_import_dxf/dxfimport/do.py b/io_import_dxf/dxfimport/do.py
index 82fea41..8112412 100644
--- a/io_import_dxf/dxfimport/do.py
+++ b/io_import_dxf/dxfimport/do.py
@@ -306,14 +306,7 @@ class Do:
e += 2 * pi
angle = e - s
- # curve == None means arc is called from bulge conversion
- # nothing should be projected at this stage, since the
- # lwpolyline (the only entity with bulges) will be projected
- # as a whole afterwars (small little error; took ages to debug)
- if curve is not None:
- vc = self.proj(en.center)
- else:
- vc = en.center
+ vc = Vector(en.center)
x_vec = Vector((1, 0, 0))
radius = en.radius
@@ -365,6 +358,10 @@ class Do:
if len(spline) % 3 != 1:
print("DXF-IMPORT: DO ARC: CHECK PLEASE: ", len(spline), spline)
+ # curve == None means arc is called from bulge conversion
+ # nothing should be projected at this stage, since the
+ # lwpolyline (the only entity with bulges) will be projected
+ # as a whole afterwards (small little error; took ages to debug)
if curve is not None:
self._cubic_bezier_open(spline, curve)
return spline
More information about the Bf-extensions-cvs
mailing list