Permalink
Browse files

Fixed 0000708 - Draft DXF import

  • Loading branch information...
1 parent 801196b commit 1c1dbf0b2e6fb8f967e404b48f173b2ca782789b @yorikvanhavre committed May 18, 2012
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/Mod/Draft/importDXF.py
View
10 src/Mod/Draft/importDXF.py
@@ -1232,7 +1232,9 @@ def getWire(wire,nospline=False):
points = []
for edge in edges:
v1 = edge.Vertexes[0].Point
- if (isinstance(edge.Curve,Part.Circle)):
+ if len(edge.Vertexes) < 2:
+ points.append((v1.x,v1.y,v1.z,None,None,0.0))
+ elif (isinstance(edge.Curve,Part.Circle)):
mp = fcgeo.findMidpoint(edge)
v2 = edge.Vertexes[-1].Point
c = edge.Curve.Center
@@ -1251,14 +1253,12 @@ def getWire(wire,nospline=False):
bul = -bul
points.append((v1.x,v1.y,v1.z,None,None,bul))
elif (isinstance(edge.Curve,Part.BSplineCurve)) and (not nospline):
- bul = 0.0
spline = getSplineSegs(edge)
spline.pop()
for p in spline:
- points.append((p.x,p.y,p.z,None,None,bul))
+ points.append((p.x,p.y,p.z,None,None,0.0))
else:
- bul = 0.0
- points.append((v1.x,v1.y,v1.z,None,None,bul))
+ points.append((v1.x,v1.y,v1.z,None,None,0.0))
if not fcgeo.isReallyClosed(wire):
v = edges[-1].Vertexes[-1].Point
points.append(fcvec.tup(v))

0 comments on commit 1c1dbf0

Please sign in to comment.