Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed 0000708 - Draft DXF import

  • Loading branch information...
commit 1c1dbf0b2e6fb8f967e404b48f173b2ca782789b 1 parent 801196b
Yorik van Havre authored

Showing 1 changed file with 5 additions and 5 deletions. Show diff stats Hide diff stats

  1. +5 5 src/Mod/Draft/importDXF.py
10 src/Mod/Draft/importDXF.py
@@ -1232,7 +1232,9 @@ def getWire(wire,nospline=False):
1232 1232 points = []
1233 1233 for edge in edges:
1234 1234 v1 = edge.Vertexes[0].Point
1235   - if (isinstance(edge.Curve,Part.Circle)):
  1235 + if len(edge.Vertexes) < 2:
  1236 + points.append((v1.x,v1.y,v1.z,None,None,0.0))
  1237 + elif (isinstance(edge.Curve,Part.Circle)):
1236 1238 mp = fcgeo.findMidpoint(edge)
1237 1239 v2 = edge.Vertexes[-1].Point
1238 1240 c = edge.Curve.Center
@@ -1251,14 +1253,12 @@ def getWire(wire,nospline=False):
1251 1253 bul = -bul
1252 1254 points.append((v1.x,v1.y,v1.z,None,None,bul))
1253 1255 elif (isinstance(edge.Curve,Part.BSplineCurve)) and (not nospline):
1254   - bul = 0.0
1255 1256 spline = getSplineSegs(edge)
1256 1257 spline.pop()
1257 1258 for p in spline:
1258   - points.append((p.x,p.y,p.z,None,None,bul))
  1259 + points.append((p.x,p.y,p.z,None,None,0.0))
1259 1260 else:
1260   - bul = 0.0
1261   - points.append((v1.x,v1.y,v1.z,None,None,bul))
  1261 + points.append((v1.x,v1.y,v1.z,None,None,0.0))
1262 1262 if not fcgeo.isReallyClosed(wire):
1263 1263 v = edges[-1].Vertexes[-1].Point
1264 1264 points.append(fcvec.tup(v))

0 comments on commit 1c1dbf0

Please sign in to comment.
Something went wrong with that request. Please try again.