﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
1371	Geometry coming out incorrect on first attempt	Tristan Croll	Tom Goddard	"This is something new (code has been working perfectly for months). The applied code that is coming out wrong is my rotamer annotation (the whole drawing gets hidden inside the ""dot"" of the exclamation mark), but the below is a minimal example.

{{{
def exclamation_mark(radius = 0.1, height = 2, nc=8, color = [255,0,0,255]):
    '''
    An exclamation mark for annotating rotamer outliers
    '''
    from chimerax.surface.shapes import cone_geometry, sphere_geometry2
    from chimerax.core.geometry import translation, scale
    import numpy
    stem = cone_geometry(radius=radius, height=height, nc=nc, caps=True)
    spheres = list(sphere_geometry2(nc*4))
    spheres[0] = scale(radius*0.7).moved(spheres[0])

    v, n, t = stem


    vbottom = translation((0,0, height/2+radius*1.5)).moved(spheres[0])
    t = numpy.concatenate((t, spheres[2]+len(v)))
    v = numpy.concatenate((v, vbottom))
    n = numpy.concatenate((n, spheres[1]))

    return v, n, t

from chimerax.core.models import Model, Drawing
m = Model('test', session)
d = Drawing('test')
m.add_drawing(d)
d.set_geometry(*exclamation_mark())
session.models.add([m])
}}}

The sphere will be much too large (looks like it's still unit radius, as if the scale was not applied). 

{{{
d.set_geometry(*exclamation_mark())
}}}

... and the drawing now looks as expected. Similarly, if I repeat the whole of the above script (creating a new Model), then the geometry comes out correct this time around. Loading and displaying an AtomicStructure *first* (with atoms displayed - ribbon only isn't sufficient) also seems to correct it.

"	defect	closed	major		Graphics		fixed						all	ChimeraX
