Jonathan,

On Thu, Jul 14, 2011 at 3:32 PM, Jonathan Gutow <gutow@uwosh.edu> wrote:
Based on what I can find in the code here are my options:

1) Modify getShapeProperty to include a getStateCmd option.  Sounds simple, but I find this access method strange as it duplicates methodologies built into the programming language.  Isn't it easier to define public getter functions within objects or make objects publicly readable? This has the additional advantage that if getters have javadoc attached to them it is much easier to figure out what the things you are looking for are called.

You can't access any shape that is not in org.jmol.shape directly. That would break the modular loading of Jmol. You would have to put a default method definition in org.jmol.Shape even if it is for something very specialized like this. So the design efficiency is to put any such specialized call into getShapeProperty. It's very efficient.
 

2) My present preference (lacking public getter functions) is to use the viewer.getShapeManager() function to grab the list of shapes and pick the data I want out of the data structure.  Of course, when the data structure is changed my functions will break.

I thought you were just interested in isosurfaces, so there's no problem there using getShapeProperty.
 

3) Add public getter functions to ShapeManager.  It looks like it might have to be abstract for both of the things I am most interested in (stateCmd and boundBoxCorners), because different shapes have different info.  A prime example is drawn polygons for which I will need to check all the vertices to define the boundbox as that does not appear in the data structure.

I think you are talking about way more than I am. Drawn polygons and what else? Are you thinking this would be applicable to all shapes? I'd like to see a clear description, then, of exactly what you are talking about before you go too far on this. We need to work out all the details then BEFORE we get going on the methods. Let's see what you have in mind...

Bob
 

I think options 2 & 3 are something Bob is trying to avoid.  Bob, can you explain why?

Any thoughts?

Jonathan
                        Dr. Jonathan H. Gutow
Chemistry Department                                gutow@uwosh.edu
UW-Oshkosh                                          Office: 920-424-1326
800 Algoma Boulevard                                FAX:920-424-2042
Oshkosh, WI 54901
               http://www.uwosh.edu/facstaff/gutow


------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric
Ries, the creator of the Lean Startup Methodology on "Lean Startup
Secrets Revealed." This video shows you how to validate your ideas,
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers



--
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107


If nature does not answer first what we want,
it is better to take what answer we get.

-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900