yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #10091
[Branch ~yade-pkg/yade/git-trunk] Rev 3701: fixed bug in export.VTKExporter from one previous commits
------------------------------------------------------------
revno: 3701
committer: Jan Stransky <jan.stransky@xxxxxxxxxxx>
timestamp: Mon 2013-10-07 16:56:14 +0200
message:
fixed bug in export.VTKExporter from one previous commits
modified:
py/export.py
--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'py/export.py'
--- py/export.py 2013-10-04 15:25:30 +0000
+++ py/export.py 2013-10-07 14:56:14 +0000
@@ -255,10 +255,7 @@
outFile = open(fName, 'w')
outFile.write("# vtk DataFile Version 3.0.\n%s\nASCII\n\nDATASET POLYDATA\nPOINTS %d double\n"%(comment,n))
for b in bodies:
- if O.periodic:
- pos = O.cell.wrap(O.cell.b.state.refPos if useRef else b.state.pos)
- else:
- pos = O.cell.b.state.refPos if useRef else b.state.pos
+ pos = b.state.refPos if useRef else b.state.pos if not O.periodic else O.cell.wrap(b.state.pos)
outFile.write("%g %g %g\n"%(pos[0],pos[1],pos[2]))
outFile.write("\nPOINT_DATA %d\nSCALARS radius double 1\nLOOKUP_TABLE default\n"%(n))
for b in bodies: