Commit 0aa80f2e authored by sumpfralle's avatar sumpfralle

reverse direction of DXF arcs

increased GUI responsiveness when loading a DXF file


git-svn-id: https://pycam.svn.sourceforge.net/svnroot/pycam/trunk@963 bbaffbd6-741e-11dd-a85d-61de82d9cad9
parent 14cd69b1
......@@ -323,6 +323,9 @@ class DXFParser(object):
center = Point(center[0], center[1], center[2])
xy_point_coords = pycam.Geometry.get_points_of_arc(center, radius,
angle_start, angle_end)
# Somehow the order of points seems to be the opposite of the what
# is expected.
xy_point_coords.reverse()
if len(xy_point_coords) > 1:
for index in range(len(xy_point_coords) - 1):
p1 = xy_point_coords[index]
......@@ -364,8 +367,11 @@ def import_model(filename, program_locations=None, unit=None,
if lines:
model = pycam.Geometry.Model.ContourModel()
for l in lines:
for index, l in enumerate(lines):
model.append(l)
# keep the GUI smooth
if callback and (index % 50 == 0):
callback()
# z scaling is always targeted at the 0..1 range
if color_as_height and (model.minz != model.maxz):
# scale z to 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment