﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
1378	Bounds calculation fails under certain conditions	Tristan Croll	Tom Goddard	"Root cause first: `Places.array()` returns a `float64` array, while `_geometry.point_copies_bounds requires `float32`. Changing `bounds.point_bounds()` as per below gets me working again.

Symptoms: only crops up for me under the following circumstances: (a) the effective position of a model is not the identity; (b) there is a drawing visible that is *not* using `shift_and_scale_array` for its positions; and (c) coordinates are continually updating (i.e. I have a simulation running). Under those circumstances the drawing bounds calculation returns extreme values, so `ZoomMouseMode` sends the model flying into +/- infinity.


{{{
def point_bounds(xyz, placements=None):
    '''
    Return :py:class:`.Bounds` for a set of points, optionally
    multiple positions given by a :py:class:`.Places` instance.
    '''
    if len(xyz) == 0:
        return None

    if placements:
        from ._geometry import point_copies_bounds
        from numpy import require, float32
        xyz_min, xyz_max = point_copies_bounds(xyz, require(placements.array(), dtype=float32))
    else:
        from ._geometry import point_bounds
        xyz_min, xyz_max = point_bounds(xyz)

    b = Bounds(xyz_min, xyz_max)
    return b
}}}"	defect	closed	critical		Graphics		fixed						all	ChimeraX
