﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
2797	Missing clip caps for models with non-rotation position matrices (instancing)	Tristan Croll	Tom Goddard	"{{{
The following bug report has been submitted:
Platform:        Linux-3.10.0-1062.9.1.el7.x86_64-x86_64-with-centos-7.7.1908-Core
ChimeraX Version: 0.92 (2020-02-03)
Description
Clip capping fails for `Drawing`s that are substantially stretched or scaled up by instancing. In `surface.cap.box_positions_intersecting_plane()`:

{{{
def box_positions_intersecting_plane(positions, b, origin, normal):
    c, r = b.center(), b.radius()
    pc = positions * c
    pc -= origin
    from numpy import dot, abs
    dist = abs(dot(pc,normal))
    bint = (dist <= r)
    ipos = positions.masked(bint)
    return ipos
}}}

... `b.radius()` (aka `Bounds.radius()`) is calculated before taking any transforms into account, so fails if the prototype geometry is much smaller than the final displayed image. 

Log:
UCSF ChimeraX version: 0.92 (2020-02-03)  
© 2016-2020 Regents of the University of California. All rights reserved.  
How to cite UCSF ChimeraX  

> open 6qiy format mmCIF fromDatabase pdb structureFactors true

Summary of feedback from opening 6qiy fetched from pdb  
---  
notes | Resolution: 1.5000893166901514  
Reflection data provided as intensities. Performing French & Wilson scaling to
convert to amplitudes...  
  
6qiy title:  
CI-2, conformation 1 [more info...]  
  
Chain information for 6qiy  
---  
Chain | Description  
1.1/A | Subtilisin-chymotrypsin inhibitor-2A  
  
6qiy mmCIF Assemblies  
---  
1| software_defined_assembly  
  
  

> toolshed show Shell

/opt/UCSF/ChimeraX-daily/lib/python3.7/site-
packages/IPython/core/history.py:226: UserWarning: IPython History requires
SQLite, your history will not be saved  
warn(""IPython History requires SQLite, your history will not be saved"")  
Drag select of  
Drag select of  

> select clear

Drag select of  




OpenGL version: 3.3.0 NVIDIA 440.33.01
OpenGL renderer: TITAN Xp/PCIe/SSE2
OpenGL vendor: NVIDIA Corporation

}}}
"	defect	assigned	minor		Graphics								all	ChimeraX
