*********************************************************************
File liegt in devParameterize/rsrc/comments.txt
Documents ongoing revision of devParameterize.
Authors: Konrad, ...
*********************************************************************


KONRAD (2013-05-15):

dev.covering.PgFrameField
	NOTE: its geometry and the geometry of its covering must be equal,
	as can be seen from PgFrameField#setGeometry.
	Therefore, one geometry should be sufficient.

dev.geom.PgAbstractGraph
	DISCUSS: muss extends PgPolygonSet
	damit Unterklassen wie PgGraphOnElementSet oder PgGraphOnTetraSet
	nicht jedesmal mit Methoden wie getVisualizingGeometry() etc.
	eine neue Realisierung fr das Display erzeugen mssen.
	
dev.vecmath.PuVectorGeom#angleWithNormals
	TODO: all methods in this class must be rewritten.
	
	Computation of angles between tangent vectors should NEVER
	make use of element normals BUT use intrinsic measurements
	in order to allows the element set to live say in R4.
	In this example, the angles with the common edge of the
	two triangles must be used.
	
	Similar misuse of normal vectors happen, when a tangent
	vector is rotated in the tangent plane. This must also
	be implemented without use of normal vectors. There
	are many situations all over our code where this needs improved.
	Good strategy: search for PdVector#cross to find such situations.
	
dev.covering.PnVecmath
	INFO: I deleted this class
	Only method
		#calcAngle(PgFrameField field, int e, int locNeighbInd)
	moved to dev.covering.PnFrameField where similar methods were already.

dev.covering,PnStiffMatrix
	INFO: I removed progress bar since unused instance variable.
	
dev.covering.PgFrameField#copy
	BUG: Method must assign this#geometry to own m_fields,
	otherwise m_fields would potentially refer to a different
	base geometry than frame field.
	
dev.covering.PgFrameField#copyNew
	TODO: such methods should all be rewritten as #clone(),
	see classes in our base system. copyNew appears in several
	classes in devCovering and devParameterization.
		
dev.covering.PgFrameField
	INFO: I changed superclass to PsObject instead of PgGeometry
	
jv.geom.PgVectorField
	DISCUSS: Change superclass to PsObject instead of PgGeometry.
	Only marginal modifications needed, but will it break
	backward compatibility too much?

dev.covering.PgFrameField
	IMPORTANT INFO: A frame field contains an instance of PgCovering m_covering
	which itself is used at many other locations, especially all
	over the modules, together with a base geometry geom.
	Now the surprising thing: when you call
	   PgFrameField#setGeometry(geom)
	then ALSO THE GEOMETRY of the covering is assigned, i.e.
	   PgFrameField.m_covering#setGeometry(geom)
  is called. SUMMARY: there is never a difference between
  the geometry and the covering#geometry in a module
  and one of them must be removed, I guess module#geometry.
	
	Especially obsolete since numerous methods starts like
		PgElementSet geom = field.getGeometry();
		PgCovering covering = field.getCovering();
  which should be replace by
		PgCovering covering = field.getCovering();
		PgElementSet geom = covering.getGeometry();

dev.covering.PgFrameField
	INFO: I removed from PgFrameField the instance variable
		/** Element set to work on. */
		protected PgElementSet m_geom;		
	and completely relied on PgFrameField.m_covering#geometry.

devParameterize.apps.parameterize.PwParameterizer
	DISCUSS: diese Klasse hat doch keine eigene Funktionalitt, schon gar nicht als Workshop.
	Ihr InfoPanel wird einfach in PjQuadCover eingebunden.
	VORSCHLAG: mit PjQuadCover mergen, ebenso die Infopanels, dann PwParameterizer/_IP lschen.
	
PjQuadCover_IP
	TODO: hier fehlt update-Methode, makeLayout() sollte in init()/setParent() stattfinden.
	
Weitere Schritte:
	1. PgCovering bleibt erstmal mit Instanzenvariablen #m_geometry
			Grund: interpretieren PgCovering wie PgVectorField und PgFrameField
			als Zusatzstruktur auf der eigentlichen Geometrie. Viele
			Methoden arbeiten mit PgCovering und knnen darber
			auch auf die zugrundeliegende Geometrie von PgCovering zugreifen.
	2. PnModule: berlegen, ob in PnModule m_geom gelscht/bzw. privat gemacht wird
			und nur noch m_covering gesetzt wird, indem die geom ja drin ist.
	3. PgParamGeom: wird als Geometrieklasse interpretiert,
			sie leitet weiter von ElementSet ab und hat weiter einige Instanten in PnParamGeom.
			Aber berprfen, ob immer
			  PnParamGeom#m_geom == PnParamGeom#m_covering#m_geom == PgParamGeom ist,
			was ich vermute. Dann knnte PnParamGeom#m_geom gelscht werden.
	4. In PgParamGeom haben wir ein PgCovering als Instanz, via PnParamGeom.
	 		Umgekehrt haben wir oben gesehen, dass oftmals PgCovering mit Instanz m_geom
	 		verwendet wird. Hier sind zwei verschiedene Abhngigkeitsphilosophien,
	 		die voll zur Verwirrung ber die Abhngigkeiten fhren.
	 		Ich vermute, dass beidesmal dasselbe Paar (Geom+Covering) beschrieben wird.
	 		Auch wenn wir als jetzt das Paar PgCovering(+geom) wie oben gesagt temporr
	 		weiter verwenden, sollte mittelfristig das Paar PgParamGeom(+covering)
	 		berall verwendet werden, genauso wie Geom(+VectorField).
	5. Die Hauptgeometrie in PjQuadCover ist PgParamGeom, ich habe dementsprechend
			auch die Instanzenvariable PjQuadCover#m_geom nach PgParamGeom typisiert.
			Damit ist aber klar, dass die Display und Hilfsgeometrien aus PgParamGeom
			genau nach PjQuadCover heraus- und hochgezogen werden mssen, mache ich morgen.


----------------------------------------------------------------------------------------------------------------------

KONRAD (2013-05-18):

devParameterize.gui.PuNameBar
	INFO: Full revision of class, now independent of devParameterize and in sync with AWT.
	INFO: Moved to devObjectGui.

devParameterize.gui.PuHeadBar
	INFO: Revision started and made compatible with AWT layout.
	INFO: Renamed to PuHeaderBar and made independent of devParameterize.
	INFO: Moved to devObjectGui.

devParameterize.gui.PnFileDialogWithProperties
	INFO: I moved the class to devURMN.gui since class is not used in devParameterize.

devParameterize.apps.PwParameterizeIf (and _IP)
	INFO: renamed to PwParameterizeBase (and _IP) since class is not an interface.

devParameterize.apps.Properties
	INFO: Class deleted and instance flags moved to corresponding classes.
	For all instances there was an appropriate target class. Given the
	fact that a change of one of the flags would have had global effect
	to all quadcover applications of everyone there is no need for such as class.

devParameterize.apps.parameterize/qcDemo
	INFO: applets moved into common package devParameterize.apps.
	INFO: then empty sub-packages removed.

devParameterizer.apps.PwParameterizer (and _IP)
	INFO: renamed PwParameterizer to PwQuadCover (and _IP) for naming consistency.


----------------------------------------------------------------------------------------------------------------------

KONRAD (2013-05-20):

devParameterizer.geom.PgParamGeom
devParameterizer.apps.PwParameterizer
	INFO: utility geometries moved from PgParamGeom to PwParameterizerBase workshop.

devParameterizer.modules.editor.PmCoveringEditor
	INFO: most of the utility geometries are for display only, but
	PmCoveringEditor has heavy use of sharpConstraintsGeom geometry, so need to check if
	really everything is OK after moving the sharpConstraintsGeom geometry to PwParameterizerBase 

devParameterizer.geom.PnParamData#m_threadPool
	ExecutorService m_threadPool
	INFO: moved instance m_threadPool and related variables from PgParamGeom to PwParameterizerBase workshop.
	NOTE: this was an easy move since thread pool is rarely used.

devParameterizer.geom.PnParamGeom#m_smoother
	PmVectorAngleSmoother	m_smoother
	INFO: moved instance m_smoother from PgParamGeom to PwParameterizerBase workshop.
	NOTE: the smoother has severe use in many modules.
	TODO: Conversion of not-yet-modules to modules needed in order to access workshop etc.
	      This includes PmRelaxEnergyXXX and others.

devParameterizer.geom.PnParamData
	INFO: Getter and setter methods added in PnParamData plus
	      restricted private access to all instance variables except m_geom.

devParameterizer.geom.PgParamGeom versus PnParamData
	INFO: Both classes nows have a strong relationship, access to PnParamData must go through PgParamGeom
	PLAN: Next step is merge of remaining body of PnParamData into PgParamGeom.

	TODO: Check if geometry instances such as m_elementTree and m_cutPaths must exist in PgParamGeom or
	      better stay in workshop.
	TODO: Check if all texture geometry instances are needed.
	TODO: Check where m_covering finds its home.

----------------------------------------------------------------------------------------------------------------------

KONRAD (2013-05-25)

dev.covering.PgPathOnCovering
	INFO: superclass changed to jv.geom.PgPolygon from java.lang.Object to allow easy display

dev.covering.PgCoveringVertexBased
	INFO: class removed since never used.

devParameterize.covering.PnTextureUtil
	INFO: class PnTextureUtil deleted,
	      its only method removeNegativeTriangles moved to PgIntTextureMapOnCovering from PnTextureUtil

dev.covering.PgMatching
	INFO: renamed to PgCoveringMatching
	
dev.geom.PnSharpConstraints
	INFO: renamed to PgSharpConstraints since it constitutes a geometric object.

----------------------------------------------------------------------------------------------------------------------

PHILIP (2013-05-27)

dev.covering.PgSparseFieldGenerator:
	INFO: in the method updateSparseFieldAndTrustweights now the curvature field is also computed,
	      if it is not existent (this was not checked before and caused null pointer exceptions).

----------------------------------------------------------------------------------------------------------------------

KONRAD (2013-05-25)

dev.covering.PgFrameField:
	NOTE on Cross-Referencing:
	To emphasize the problematic crossreferencing related to PgFrameField
	let me show the following sample code segment from PwExtenderParallel. Similar
	cross-referencing appears all over the code and must be avoided:

		if (m_geom.getFrameField() == null) {
			PgFrameField frameField	= new PgFrameField(m_geom.getCovering());
			frameField.assureFields();
			m_geom.setFrameField(frameField);
		}
		
   Observation:	
	a. There exists a valid geometry m_geom
	b. A new PgFrameField is created and it receives a covering from geometry
	c. The command PgFrameField#assureFields require both covering PLUS geometry.
	   That means, implicitly the frame field receives it geometry from the covering.
	d. Finally the frame field is assigned to the geometry.
	e. Summary: the implicit tunneling of the supervising geometry through the code
	            using frameField and covering must be avoided. But changing this habit
	            will be a longer activity.

dev.covering.PgCoveringSurface:
	INFO: new class PgCoveringSurface extends PgElementSet created
	      which will hold a pair (elementSet, covering) together. 

devParameterize.geom.PgParamGeom:
	INFO: superclass changed to PgCoveringSurface, instance m_covering moved to superclass

dev.covering.PgTextureMapOnCovering:
dev.covering.PgIntTextureMapOnCovering:
dev.covering.PnTextureQuantizer:
dev.covering.PwSmoothTexture:
	INFO: all texture classes in devParameterizer.covering made compatible with PgCoveringSurface,
			i.e. instance variable m_covering merged with m_geom.

----------------------------------------------------------------------------------------------------------------------

KONRAD (2013-05-25)

devParameterize._tmp
	INFO: new folder to store unused code and code fragments.
 
devParameterize.modules.PnBoundaryConstraints
	INFO: Unused class PnBoundaryConstraints moved to _tmp from devParameterize.modules
 
----------------------------------------------------------------------------------------------------------------------

KONRAD (2013-05-31)

devParameterize.geom.PgParamGeom
devParameterize.module.fieldGenerator.PmSparseFieldGenerator
devParameterize.module.*
	INFO: Local variable m_symmetryOrder replaced with m_covering#m_symmetryOrder.
	As a consequence several modules were adjusted.
	Especially geometry in PgSparseFieldGenerator immediately equipped with a covering.
 
----------------------------------------------------------------------------------------------------------------------

KONRAD (2013-06-01)

devParameterize.module.PnModule
devParameterize.module.*
	INFO: in all modules revised the two methods setGeometry and start. Both now
	have a boolean return and call super methods in order to better synchronize
	the check for existence neccessary instance variables such as covering, frame field etc.

	INFO: Handling of status messages of modules revised, there now
	exists get/setStatusMessage methods in PnModule only. Message is
	typically set once in the constructor of a module.
	
----------------------------------------------------------------------------------------------------------------------

KONRAD (2013-06-02)

devParameterize.module.parameterizer.PmGap*
devParameterize.module.parameterizer.PmPositiveOrienter*
	INFO: code and doc formatting adjusted according to our current code refactoring.

Felix:
	* PwParameterizeBase#threadPool:	verwendet?
	* PgSharpConstraints:			Status? einige auskommentierte Teils


----------------------------------------------------------------------------------------------------------------------

PHILIP (2013-06-04/05)

devParameterize.modules.fieldGenerator.PmAnisoFrameFieldScaler
devParameterize.modules.fieldGenerator.PmAnisoScalerByCurvature
devParameterize.modules.fieldGenerator.PmFieldScaler
devParameterize.modules.fieldGenerator.PmFrameFieldScaler
devParameterize.modules.parameterizer.PmDegenerationDetector
devParameterize.modules.parameterizer.PmGapRounder
	INFO: code and doc formatting adjusted according to our current code refactoring.

----------------------------------------------------------------------------------------------------------------------

PHILIP (2013-06-05)

devParameterize.modules.fieldGenerator.PmAnisoFrameFieldScaler
devParameterize.modules.fieldGenerator.PmAnisoScalerByCurvature
devParameterize.modules.fieldGenerator.PmFieldScaler
devParameterize.modules.fieldGenerator.PmFrameFieldScaler
	INFO: Since all of these scale the field somehow, I would suggest to put them in one file.
			This I have done with PmFrameFieldScalerPB and its info panel. If it is fine, I would
			suggest to put this in the pipeline as PmFrameFieldScaler instead of the four above
			mentioned.

----------------------------------------------------------------------------------------------------------------------

KONRAD/CHRISTOPHER (2013-05-25)

devParameterize.modules.fieldGenerator.PmSparseFieldGenerator
devParameterize.modules.fieldGenerator.PmFieldExtender
	NOTE/TODO:	If the framefield for the brezel_1920.byu model is generated using the standard
					parameters in the field generator, after extending there are a lot of unwanted
					singularities. This is due to the fact that at some parts of the brezel,
					instead of matching the frames in a way so that the directions corresponding
					to the principal curvature direction align, the matching aligns the directions
					with the closest angle, which are - in this case - not optimal, in the sense
					that there is no reason for singularities to be there.
					This can of course be resolved by enlarging the trustregion so that almost
					everywhere the frames correspond exactly to the principal curvature directions
					which then align nicely (at least for the high-res brezel).
					But this also leads to an idea by Konrad to create a matching which includes length
					information of the frames (for this to work, both the field generator, as well
					as the field extender, would have to be able to deal with two directions and
					different lengths). Then the matching would not only check for the closest angle
					but also take into a count the difference in their length, i.e
					|v - w|' = |v| * angle_dif + |v - w|

----------------------------------------------------------------------------------------------------------------------

PHILIP (2013-06-20)

devParameterize.modules.fieldGenerator.PmAnisoFrameFieldScaler
devParameterize.modules.fieldGenerator.PmAnisoScalerByCurvature
devParameterize.modules.fieldGenerator.PmFieldScaler
devParameterize.modules.fieldGenerator.PmFrameFieldScaler
	INFO: Joined them (and their info panels) to the new class PmFrameFieldScaler
	
----------------------------------------------------------------------------------------------------------------------

PHILIP (2013-06-24)
devParameterize.apps.PwParameterizerBase
	INFO: as decided earlier, changed the internal names of the modules to fit to those shown in the
			info panel of QuadCover; exception: the relaxer modules.
			
----------------------------------------------------------------------------------------------------------------------

PHILIP (2013-07-09)
devParameterize.apps.PwParameterizerBase
devParameterize.modules.PmSparseFieldGenerator
devParameterize.modules.PmSparseFieldEditor
devParameterize.geom.PgParamGeom
	INFO: added m_sparseFieldOrtho, a sparse field orthogonal to the previously existent sparse field.
both fields are shown whenever the sparse field is shown.
This is how I interpret Konrads demand for a second sparse field.

----------------------------------------------------------------------------------------------------------------------

PHILIP (2013-08-01)
devParameterize.apps.PwParameterizerBase
devParameterize.modules.PmSparseFieldGenerator
devParameterize.modules.PmSparseFieldEditor
devParameterize.geom.PgParamGeom
INFO: deleted m_sparseFieldOrtho
added m_curvatureField and m_gradient field, which are added to the display together with the sparse field to
be able to see the differences. However, this is not linked to the frame angle module yet and the lengths are
not taken into account (if you delete the comment in PgParamGeom.setCurvatureField you'll see them).

----------------------------------------------------------------------------------------------------------------------

CHRISTOPHER (2013-08-13)
devParameterize.apps.PmAntiSpiraler
INFO: 		New module to generate automatic proposals for soft constraints. Propagates Voronoi-like cell growth around
		singularities and calculates the distance in parameter-coordinates of two singularities which share a border.
		Then the singularities are filtered by user-entered criterea (i.e. greatest distance in the coordinate which
		is close to each other, minimal ratio between smaller and larger coordinate distances) and sorts these proposals
		either by ratio or by length. These constraints get added as soft-constraints (which can be disabled) and
		the parameterization is started anew. This is repeated a fixed number of times (also user defined).

devParameterize.apps.PnModule
TODO/BUG: 	Correct loading of module descriptions, possibly just replace the .xml file with static descriptions
		in the modules.

devParameterize.???
BUG: 		The parameterization completely degenerates when doing the following: in the QCTest application run the
		"test all modules on current model" and then load any other model and parameterize this with arbitrary
		modules enabled. If you now add soft-constraints, something goes wrong.

-------------------------------------------------------------------------------------------------------------------------
PHILIP (2013-08-26)
devParameterize.modules.fieldGenerator.PmSingularityMover
devParameterize.modules.fieldGenerator.PmSingularityMover_IP

INFO:		added Singularity Mover; enables to drag singularities along the geometry.

-------------------------------------------------------------------------------------------------------------------------
PHILIP (2013-08-26)
devParameterize.modules.fieldGenerator.PmSingularityMover
devParameterize.apps.PwQuadCover
devParameterize.apps.PwQuadCover_IP
devParameterize.geom.PgParamGeom

INFO:		moved Singularity Mover to field optimizer; enables to drag singularities along the geometry and shows DiscoTexture and Frame Field.