Error loading geometry with "two-point" columns

Issue #5 resolved
Angus Yeh repo owner created an issue
Traceback (most recent call last):
  File "\tim_scene.py", line 778, in reloadGeo
    self.addSceneLayer(i)
  File "\tim_scene.py", line 709, in addSceneLayer
    scene.setupGraphics(lay_i)
  File "\tim_scene.py", line 633, in setupGraphics
    itemArrow = mvFlowArrow(pf,pt,0.)
  File "\tim_graphics_items.py", line 91, in __init__
    path = self._makePath(length)
  File "\tim_graphics_items.py", line 97, in _makePath
    p2x = self._fromP.x() + self._dx * length / self._lengthFromTo
ZeroDivisionError: float division by zero

There are special columns consists of two points, means zero volume and connection distance. Error possibly cause by arrow path forming.

Comments (1)

  1. Angus Yeh reporter

    Fixed in commit 32b6d4f by plotting flow arrow as normal from centre of edge, instead of intersection of cola.cen and colb.cen with edge line towards cola.cen.

    The correct direction of normal is chosen by checking where is cola (left) in association with p1 and p2.

    Potential solution is to check the ordering of p1 and p2.

  2. Log in to comment