NetLogo/NW-Extension

Resize world in 3D messes up distance calculations

Closed this issue · 2 comments

There's already a failing test for this:

after-world-resize_3D

From the console:

observer> crt 2 [ create-links-with other turtles ]
observer> show [ nw:distance-to one-of other turtles ] of turtles
observer: [1 1]
observer> resize-world -1 1 -1 1 -1 1
observer> crt 2 [ create-links-with other turtles ]
observer> show [ nw:distance-to one-of other turtles ] of turtles
observer: [false false]

Strangely:

observer> show [ nw:turtles-in-radius 1 ] of turtles
observer: [(agentset, 1 turtle) (agentset, 1 turtle)]

Looks like the context isn't get reset on the resize.

This happens in 2d as well.