Bug 498198

Summary: NaN in SpringLayoutAlgorithm.computeForces(...)
Product: [Tools] GEF Reporter: Andreas Mayer <anma-e>
Component: GEF-Legacy ZestAssignee: gef-inbox <gef-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 1.7.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows NT   
Whiteboard:
Attachments:
Description Flags
Patch to fix this bug none

Description Andreas Mayer CLA 2016-07-20 09:41:51 EDT
In computeForces(...), distance_sq can be 0 due to a wrong order of statements, which results in NaN forces in the following divisions by distance_sq. As a result, the algorithm sometimes places all nodes at (0, 0). 

This problem was fixed when the code was revised for GEF4 Zest, but is still present in GEF 3/Zest 1.
Comment 1 Andreas Mayer CLA 2016-07-20 09:51:31 EDT
Created attachment 263210 [details]
Patch to fix this bug