FIX T42252: Arcs are scaled correctly now. The scale factor now also accepts comas, not only points (comas are being replaced by points internally).
This commit is contained in:
parent
68e4b7e6bf
commit
570b7d94b3
Notes:
blender-bot
2023-02-14 20:02:04 +01:00
Referenced by issue #42252, DXF Importer - custom scale - problem with arcs
|
@ -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':
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue