Skip to content

Commit

Permalink
Merge branch 'master' of ssh://git.code.sf.net/p/free-cad/code
Browse files Browse the repository at this point in the history
  • Loading branch information
wwmayer committed Oct 26, 2013
2 parents 6b7d185 + 286d940 commit 84cd18f
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion src/Mod/Draft/DraftTrackers.py
Expand Up @@ -320,7 +320,23 @@ def recompute(self):
ivin.setBuffer(buf)
ivob = coin.SoDB.readAll(ivin)
except:
print "Error retrieving coin node"
# workaround for pivy SoInput.setBuffer() bug
import re
buf = buf.replace("\n","")
pts = re.findall("point \[(.*?)\]",buf)[0]
pts = pts.split(",")
pc = []
for p in pts:
v = p.strip().split()
pc.append([float(v[0]),float(v[1]),float(v[2])])
coords = coin.SoCoordinate3()
coords.point.setValues(0,len(pc),pc)
line = coin.SoLineSet()
line.numVertices.setValue(-1)
self.bspline = coin.SoSeparator()
self.bspline.addChild(coords)
self.bspline.addChild(line)
self.sep.addChild(self.bspline)
else:
if ivob and ivob.getNumChildren() > 1:
self.bspline = ivob.getChild(1).getChild(0)
Expand Down

0 comments on commit 84cd18f

Please sign in to comment.