Merge pull request #566 from teyrana/fix_finset_angle_units

[review-requested][fix] Adds explicit Angle Unit Conversion to/from FinSet cant and base angles.
This commit is contained in:
Daniel Williams 2020-03-28 18:13:36 -04:00 committed by GitHub
commit dee887479d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 113 additions and 166 deletions

View File

@ -20,9 +20,9 @@ class AnglePositionSetter implements Setter {
double pos; double pos;
try { try {
pos = Double.parseDouble(value) * Math.PI / 180.0 ; pos = Math.toRadians(Double.parseDouble(value));
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
warnings.add(String.format("Warning: invalid value radius position. value=%s class: %s", value, c.getClass().getCanonicalName() )); warnings.add(String.format("Warning: invalid angle position. value=%s (degrees) class: %s", value, c.getClass().getCanonicalName() ));
return; return;
} }

View File

@ -20,7 +20,7 @@ public class FinSetSaver extends ExternalComponentSaver {
elements.add("<thickness>" + fins.getThickness() + "</thickness>"); elements.add("<thickness>" + fins.getThickness() + "</thickness>");
elements.add("<crosssection>" + fins.getCrossSection().name().toLowerCase(Locale.ENGLISH) elements.add("<crosssection>" + fins.getCrossSection().name().toLowerCase(Locale.ENGLISH)
+ "</crosssection>"); + "</crosssection>");
elements.add("<cant>" + (fins.getCantAngle() * 180.0 / Math.PI) + "</cant>"); elements.add("<cant>" + Math.toDegrees(fins.getCantAngle()) + "</cant>");
// Save fin tabs only if they exist (compatibility with file version < 1.1) // Save fin tabs only if they exist (compatibility with file version < 1.1)
if (!MathUtil.equals(fins.getTabHeight(), 0) && if (!MathUtil.equals(fins.getTabHeight(), 0) &&

View File

@ -35,7 +35,7 @@ public abstract class FinSet extends ExternalComponent implements RingInstanceab
/** /**
* Maximum allowed cant of fins. * Maximum allowed cant of fins.
*/ */
public static final double MAX_CANT = (15.0 * Math.PI / 180); public static final double MAX_CANT_RADIANS = (15.0 * Math.PI / 180);
public enum CrossSection { public enum CrossSection {
//// Square //// Square
@ -71,20 +71,20 @@ public abstract class FinSet extends ExternalComponent implements RingInstanceab
/** /**
* Rotation about the x-axis by 2*PI/fins. * Rotation about the x-axis by 2*PI/fins.
*/ */
private Transformation finRotation = Transformation.IDENTITY; private Transformation finRotationIncrement = Transformation.IDENTITY;
/** /**
* Rotation angle of the first fin. Zero corresponds to the positive y-axis. * Rotation angle of the first fin. Zero corresponds to the positive y-axis.
*/ */
private AngleMethod angleMethod = AngleMethod.RELATIVE; private AngleMethod angleMethod = AngleMethod.RELATIVE;
private double firstFinOffset = 0; private double firstFinOffsetRadians = 0;
private Transformation baseRotation = Transformation.IDENTITY; // initially, rotate by 0 degrees. private Transformation baseRotation = Transformation.IDENTITY; // initially, rotate by 0 degrees.
/** /**
* Cant angle of fins. * Cant angle of fins.
*/ */
private double cantAngle = 0; private double cantRadians = 0;
/* Cached value: */ /* Cached value: */
private Transformation cantRotation = null; private Transformation cantRotation = null;
@ -164,13 +164,13 @@ public abstract class FinSet extends ExternalComponent implements RingInstanceab
n = 8; n = 8;
finCount = n; finCount = n;
finRotation = Transformation.rotate_x(2 * Math.PI / finCount); finRotationIncrement = Transformation.rotate_x(2 * Math.PI / finCount);
fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE); fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE);
} }
public Transformation getFinRotationTransformation() { public Transformation getFinRotationTransformation() {
return finRotation; return finRotationIncrement;
} }
@Override @Override
@ -194,28 +194,32 @@ public abstract class FinSet extends ExternalComponent implements RingInstanceab
setAngleOffset(r); setAngleOffset(r);
} }
/**
* @return angle current cant angle, in radians
*/
public double getCantAngle() { public double getCantAngle() {
return cantAngle; return cantRadians;
} }
public void setCantAngle(double cant) { /**
cant = MathUtil.clamp(cant, -MAX_CANT, MAX_CANT); *
if (MathUtil.equals(cant, cantAngle)) * @param cant -- new cant angle, in radians
*/
public void setCantAngle(final double newCantRadians) {
final double clampedCant = MathUtil.clamp(newCantRadians, -MAX_CANT_RADIANS, MAX_CANT_RADIANS);
if (MathUtil.equals(clampedCant, this.cantRadians))
return; return;
this.cantAngle = cant; this.cantRadians = clampedCant;
fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE); fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE);
} }
public Transformation getCantRotation() { public Transformation getCantRotation() {
if (cantRotation == null) { if( null == cantRotation ) {
if (MathUtil.equals(cantAngle, 0)) { if (MathUtil.equals(this.cantRadians, 0)) {
cantRotation = Transformation.IDENTITY; cantRotation = Transformation.IDENTITY;
} else { } else {
Transformation t = new Transformation(-length / 2, 0, 0); cantRotation = Transformation.rotate_y(cantRadians);
t = Transformation.rotate_y(cantAngle).applyTransformation(t);
t = new Transformation(length / 2, 0, 0).applyTransformation(t);
cantRotation = t;
} }
} }
return cantRotation; return cantRotation;
@ -928,16 +932,22 @@ public abstract class FinSet extends ExternalComponent implements RingInstanceab
@Override @Override
public double getAngleOffset() { public double getAngleOffset() {
return firstFinOffset; return firstFinOffsetRadians;
} }
@Override @Override
public void setAngleOffset(double angle) { public void setAngleOffset(final double angleRadians) {
angle = MathUtil.reduce180(angle); final double reducedAngle = MathUtil.reducePI(angleRadians);
if (MathUtil.equals(angle, firstFinOffset)) if (MathUtil.equals(reducedAngle, firstFinOffsetRadians))
return; return;
firstFinOffset = angle; firstFinOffsetRadians = reducedAngle;
if (MathUtil.equals(this.firstFinOffsetRadians, 0)) {
baseRotation = Transformation.IDENTITY;
} else {
baseRotation = Transformation.rotate_x(firstFinOffsetRadians);
}
fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE); fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE);
} }
@ -948,12 +958,11 @@ public abstract class FinSet extends ExternalComponent implements RingInstanceab
@Override @Override
public double[] getInstanceAngles() { public double[] getInstanceAngles() {
final double baseAngle = getAngleOffset(); final double angleIncrementRadians = getInstanceAngleIncrement();
final double incrAngle = getInstanceAngleIncrement();
double[] result = new double[ getFinCount()]; double[] result = new double[ getFinCount()];
for( int i=0; i<getFinCount(); ++i){ for( int finNumber=0; finNumber < getFinCount(); ++finNumber ){
result[i] = MathUtil.reduce360( baseAngle + incrAngle*i); result[finNumber] = MathUtil.reduce2PI( firstFinOffsetRadians + angleIncrementRadians*finNumber);
} }
return result; return result;
@ -1019,9 +1028,9 @@ public abstract class FinSet extends ExternalComponent implements RingInstanceab
protected List<RocketComponent> copyFrom(RocketComponent c) { protected List<RocketComponent> copyFrom(RocketComponent c) {
FinSet src = (FinSet) c; FinSet src = (FinSet) c;
this.finCount = src.finCount; this.finCount = src.finCount;
this.finRotation = src.finRotation; this.finRotationIncrement = src.finRotationIncrement;
this.firstFinOffset = src.firstFinOffset; this.firstFinOffsetRadians = src.firstFinOffsetRadians;
this.cantAngle = src.cantAngle; this.cantRadians = src.cantRadians;
this.cantRotation = src.cantRotation; this.cantRotation = src.cantRotation;
this.thickness = src.thickness; this.thickness = src.thickness;
this.crossSection = src.crossSection; this.crossSection = src.crossSection;
@ -1066,7 +1075,6 @@ public abstract class FinSet extends ExternalComponent implements RingInstanceab
} }
/** /**
<<<<<<< HEAD
* use this for calculating physical properties, and routine drawing * use this for calculating physical properties, and routine drawing
* *
* @return points representing the fin-root points, relative to ( x: fin-front, y: centerline ) i.e. relto: fin Component reference point * @return points representing the fin-root points, relative to ( x: fin-front, y: centerline ) i.e. relto: fin Component reference point
@ -1226,20 +1234,20 @@ public abstract class FinSet extends ExternalComponent implements RingInstanceab
checkState(); checkState();
final double bodyRadius = this.getBodyRadius(); final double bodyRadius = this.getBodyRadius();
// already includes the base rotation
final double[] angles = getInstanceAngles(); final double[] angles = getInstanceAngles();
final Transformation localCantRotation = getCantRotation(); final Transformation localCantRotation = new Transformation(length / 2, 0, 0)
.applyTransformation(getCantRotation())
.applyTransformation(new Transformation(-length / 2, 0, 0));
Coordinate[] toReturn = new Coordinate[finCount]; Coordinate[] toReturn = new Coordinate[finCount];
for (int instanceNumber = 0; instanceNumber < finCount; instanceNumber++) { for (int instanceNumber = 0; instanceNumber < finCount; instanceNumber++) {
final double curY = bodyRadius * Math.cos(angles[instanceNumber]); final Coordinate raw = new Coordinate( 0, bodyRadius, 0);
final double curZ = bodyRadius * Math.sin(angles[instanceNumber]); final Coordinate canted = localCantRotation.transform(raw);
final Coordinate rotated = Transformation.rotate_x(angles[instanceNumber]).transform(canted);
final Coordinate naiveLocation = new Coordinate(0, curY, curZ); toReturn[instanceNumber] = rotated;
final Coordinate adjustedLocation = baseRotation.transform(localCantRotation.transform( naiveLocation));
toReturn[instanceNumber] = adjustedLocation;
} }
return toReturn; return toReturn;

View File

@ -2,8 +2,14 @@ package net.sf.openrocket.rocketcomponent.position;
public interface AnglePositionable { public interface AnglePositionable {
/**
* @return angle to the first element, in radians
*/
public double getAngleOffset(); public double getAngleOffset();
/**
* @param new offset angle, in radians
*/
public void setAngleOffset(final double angle); public void setAngleOffset(final double angle);
public AngleMethod getAngleMethod( ); public AngleMethod getAngleMethod( );

View File

@ -211,9 +211,12 @@ public class MathUtil {
/** /**
* Reduce the angle x to the range 0 - 2*PI. * Reduce the angle x to the range 0 - 2*PI.
*
* @deprecated function refers to units:degrees, but operates in units:radians. Please use 'MathUtil.reduce2PI'
* @param x Original angle. * @param x Original angle.
* @return The equivalent angle in the range 0 ... 2*PI. * @return The equivalent angle in the range 0 ... 2*PI.
*/ */
@Deprecated
public static double reduce360(double x) { public static double reduce360(double x) {
double d = Math.floor(x / (2 * Math.PI)); double d = Math.floor(x / (2 * Math.PI));
return x - d * 2 * Math.PI; return x - d * 2 * Math.PI;
@ -224,9 +227,11 @@ public class MathUtil {
* *
* Either -PI and PI might be returned, depending on the rounding function. * Either -PI and PI might be returned, depending on the rounding function.
* *
* @deprecated function refers to units:degrees, but operates in units:radians. Please use 'MathUtil.reducePI'
* @param x Original angle. * @param x Original angle.
* @return The equivalent angle in the range -PI ... PI. * @return The equivalent angle in the range -PI ... PI.
*/ */
@Deprecated
public static double reduce180(double x) { public static double reduce180(double x) {
double d = Math.rint(x / (2 * Math.PI)); double d = Math.rint(x / (2 * Math.PI));
return x - d * 2 * Math.PI; return x - d * 2 * Math.PI;

View File

@ -50,9 +50,25 @@ public class FinSetTest extends BaseTestCase {
fins.setFilletRadius(0.0); fins.setFilletRadius(0.0);
fins.setAngleMethod(AngleMethod.FIXED);
fins.setAngleOffset(Math.toRadians(90.0));
fins.setCantAngle(Math.toRadians(3.0));
return fins; return fins;
} }
@Test
public void testAngleOffset() {
final FinSet fins = FinSetTest.createSimpleFin();
assertEquals("Angle Offset Doesn't match!", Math.PI/2, fins.getAngleOffset(), EPSILON);
assertEquals("Angle Offset Doesn't match!", 90.0, Math.toDegrees(fins.getAngleOffset()), EPSILON);
assertEquals("Cant angle doesn't match!", Math.PI/60, fins.getCantAngle(), EPSILON);
assertEquals("Cant angle doesn't match!", 3.0, Math.toDegrees(fins.getCantAngle()), EPSILON);
}
@Test @Test
public void testTabLocation() { public void testTabLocation() {
final FinSet fins = FinSetTest.createSimpleFin(); final FinSet fins = FinSetTest.createSimpleFin();

View File

@ -69,14 +69,14 @@ public class EllipticalFinSetConfig extends FinSetConfig {
panel.add(label); panel.add(label);
m = new DoubleModel(component, "CantAngle", UnitGroup.UNITS_ANGLE, m = new DoubleModel(component, "CantAngle", UnitGroup.UNITS_ANGLE,
-FinSet.MAX_CANT, FinSet.MAX_CANT); -FinSet.MAX_CANT_RADIANS, FinSet.MAX_CANT_RADIANS);
spin = new JSpinner(m.getSpinnerModel()); spin = new JSpinner(m.getSpinnerModel());
spin.setEditor(new SpinnerEditor(spin)); spin.setEditor(new SpinnerEditor(spin));
panel.add(spin, "growx"); panel.add(spin, "growx");
panel.add(new UnitSelector(m), "growx"); panel.add(new UnitSelector(m), "growx");
panel.add(new BasicSlider(m.getSliderModel(-FinSet.MAX_CANT, FinSet.MAX_CANT)), panel.add(new BasicSlider(m.getSliderModel(-FinSet.MAX_CANT_RADIANS, FinSet.MAX_CANT_RADIANS)),
"w 100lp, wrap"); "w 100lp, wrap");

View File

@ -134,14 +134,14 @@ public class FreeformFinSetConfig extends FinSetConfig {
label.setToolTipText(trans.get("FreeformFinSetCfg.lbl.ttip.Fincant")); label.setToolTipText(trans.get("FreeformFinSetCfg.lbl.ttip.Fincant"));
panel.add(label); panel.add(label);
m = new DoubleModel(component, "CantAngle", UnitGroup.UNITS_ANGLE, -FinSet.MAX_CANT, FinSet.MAX_CANT); m = new DoubleModel(component, "CantAngle", UnitGroup.UNITS_ANGLE, -FinSet.MAX_CANT_RADIANS, FinSet.MAX_CANT_RADIANS);
spin = new JSpinner(m.getSpinnerModel()); spin = new JSpinner(m.getSpinnerModel());
spin.setEditor(new SpinnerEditor(spin)); spin.setEditor(new SpinnerEditor(spin));
panel.add(spin, "growx"); panel.add(spin, "growx");
panel.add(new UnitSelector(m), "growx"); panel.add(new UnitSelector(m), "growx");
panel.add(new BasicSlider(m.getSliderModel(-FinSet.MAX_CANT, FinSet.MAX_CANT)), "w 100lp, wrap 40lp"); panel.add(new BasicSlider(m.getSliderModel(-FinSet.MAX_CANT_RADIANS, FinSet.MAX_CANT_RADIANS)), "w 100lp, wrap 40lp");

View File

@ -75,14 +75,14 @@ public class TrapezoidFinSetConfig extends FinSetConfig {
label.setToolTipText(trans.get("TrapezoidFinSetCfg.lbl.ttip.Fincant")); label.setToolTipText(trans.get("TrapezoidFinSetCfg.lbl.ttip.Fincant"));
panel.add(label); panel.add(label);
final DoubleModel cantModel = new DoubleModel(component, "CantAngle", UnitGroup.UNITS_ANGLE, -FinSet.MAX_CANT, FinSet.MAX_CANT); final DoubleModel cantModel = new DoubleModel(component, "CantAngle", UnitGroup.UNITS_ANGLE, -FinSet.MAX_CANT_RADIANS, FinSet.MAX_CANT_RADIANS);
final JSpinner cantSpinner = new JSpinner(cantModel.getSpinnerModel()); final JSpinner cantSpinner = new JSpinner(cantModel.getSpinnerModel());
cantSpinner.setEditor(new SpinnerEditor(cantSpinner)); cantSpinner.setEditor(new SpinnerEditor(cantSpinner));
panel.add(cantSpinner, "growx"); panel.add(cantSpinner, "growx");
panel.add(new UnitSelector(cantModel), "growx"); panel.add(new UnitSelector(cantModel), "growx");
panel.add(new BasicSlider(cantModel.getSliderModel(-FinSet.MAX_CANT, FinSet.MAX_CANT)), panel.add(new BasicSlider(cantModel.getSliderModel(-FinSet.MAX_CANT_RADIANS, FinSet.MAX_CANT_RADIANS)),
"w 100lp, wrap"); "w 100lp, wrap");
} }

View File

@ -30,7 +30,7 @@ public class FinSetShapes extends RocketComponentShape {
*/ */
final Transformation cantRotation = finset.getCantRotation(); final Transformation cantRotation = finset.getCantRotation();
final Transformation compositeTransform = cantRotation.applyTransformation( transformation); final Transformation compositeTransform = transformation.applyTransformation(cantRotation);
Coordinate finPoints[] = finset.getFinPoints(); Coordinate finPoints[] = finset.getFinPoints();
Coordinate tabPoints[] = finset.getTabPoints(); Coordinate tabPoints[] = finset.getTabPoints();
@ -117,47 +117,37 @@ public class FinSetShapes extends RocketComponentShape {
return new Shape[]{p}; return new Shape[]{p};
} }
// TODO: LOW: Jagged shapes from back draw incorrectly.
private static Shape[] cantedShapesBack(FinSet finset, private static Shape[] cantedShapesBack(FinSet finset,
Transformation transformation) { Transformation transformation) {
int i;
int fins = finset.getFinCount();
double thickness = finset.getThickness();
Transformation cantRotation = finset.getCantRotation(); double thickness = finset.getThickness();
Coordinate[] sidePoints; Coordinate[] sidePoints;
Coordinate[] backPoints; Coordinate[] backPoints;
int maxIndex; int maxIndex;
Coordinate[] points = finset.getFinPoints(); Coordinate[] points = finset.getFinPoints();
// this loop finds the index @ max-y, as visible from the back
for (maxIndex = points.length-1; maxIndex > 0; maxIndex--) { for (maxIndex = points.length-1; maxIndex > 0; maxIndex--) {
if (points[maxIndex-1].y < points[maxIndex].y) if (points[maxIndex-1].y < points[maxIndex].y)
break; break;
} }
points = cantRotation.transform( points ); Transformation cantTransform = finset.getCantRotation();
// transformPoints(points,new Transformation(0,radius,0)); final Transformation compositeTransform = transformation.applyTransformation(cantTransform);
points = transformation.transform( points );
sidePoints = new Coordinate[points.length]; sidePoints = new Coordinate[points.length];
backPoints = new Coordinate[2*(points.length-maxIndex)]; backPoints = new Coordinate[2*(points.length-maxIndex)];
double sign; double sign = Math.copySign(1.0, finset.getCantAngle());
if (finset.getCantAngle() > 0) {
sign = 1.0;
} else {
sign = -1.0;
}
// Calculate points for the side panel // Calculate points for the visible side panel
for (i=0; i < points.length; i++) { for (int i=0; i < points.length; i++) {
sidePoints[i] = points[i].add(0,0,sign*thickness/2); sidePoints[i] = points[i].add(0,0,sign*thickness/2);
} }
// Calculate points for the back portion // Calculate points for the back portion
i=0; int i=0;
for (int j=points.length-1; j >= maxIndex; j--, i++) { for (int j=points.length-1; j >= maxIndex; j--, i++) {
backPoints[i] = points[j].add(0,0,sign*thickness/2); backPoints[i] = points[j].add(0,0,sign*thickness/2);
} }
@ -168,35 +158,24 @@ public class FinSetShapes extends RocketComponentShape {
// Generate shapes // Generate shapes
Shape[] s; Shape[] s;
if (thickness > 0.0005) { if (thickness > 0.0005) {
s = new Shape[2];
s = new Shape[fins*2]; s[0] = makePolygonBack(sidePoints,compositeTransform);
for (int fin=0; fin<fins; fin++) { s[1] = makePolygonBack(backPoints,compositeTransform);
s[2*fin] = makePolygonBack(sidePoints,finset,transformation);
s[2*fin+1] = makePolygonBack(backPoints,finset,transformation);
}
} else { } else {
s = new Shape[1];
s = new Shape[fins]; s[0] = makePolygonBack(sidePoints,compositeTransform);
for (int fin=0; fin<fins; fin++) {
s[fin] = makePolygonBack(sidePoints,finset,transformation);
}
} }
return s; return s;
} }
private static Shape makePolygonBack(Coordinate[] array, FinSet finset, final Transformation t) { private static Shape makePolygonBack(Coordinate[] array, final Transformation t) {
Path2D.Float p; Path2D.Float p;
Coordinate compCenter = t.transform(Coordinate.ZERO);
// Make polygon // Make polygon
p = new Path2D.Float(); p = new Path2D.Float();
for (int i=0; i < array.length; i++) { for (int i=0; i < array.length; i++) {
Coordinate a = t.transform(compCenter.add( array[i]) ); Coordinate a = t.transform(array[i] );
if (i==0) if (i==0)
p.moveTo(a.z, a.y); p.moveTo(a.z, a.y);
else else
@ -206,71 +185,4 @@ public class FinSetShapes extends RocketComponentShape {
return p; return p;
} }
/* Side painting with thickness:
Coordinate c[] = new Coordinate[8];
c[0]=new Coordinate(0-position*rootChord,radius,thickness/2);
c[1]=new Coordinate(rootChord-position*rootChord,radius,thickness/2);
c[2]=new Coordinate(sweep+tipChord-position*rootChord,height+radius,thickness/2);
c[3]=new Coordinate(sweep-position*rootChord,height+radius,thickness/2);
c[4]=new Coordinate(0-position*rootChord,radius,-thickness/2);
c[5]=new Coordinate(rootChord-position*rootChord,radius,-thickness/2);
c[6]=new Coordinate(sweep+tipChord-position*rootChord,height+radius,-thickness/2);
c[7]=new Coordinate(sweep-position*rootChord,height+radius,-thickness/2);
if (rotation != 0) {
rot = Transformation.rotate_x(rotation);
for (int i=0; i<8; i++)
c[i] = rot.transform(c[i]);
}
Shape[] s = new Shape[fins*6];
rot = Transformation.rotate_x(2*Math.PI/fins);
for (int fin=0; fin<fins; fin++) {
Coordinate a,b;
Path2D.Float p;
// First polygon
p = new Path2D.Float();
a = finset.toAbsolute(c[0]);
p.moveTo(a.x(), a.y());
a = finset.toAbsolute(c[1]);
p.lineTo(a.x(), a.y());
a = finset.toAbsolute(c[2]);
p.lineTo(a.x(), a.y());
a = finset.toAbsolute(c[3]);
p.lineTo(a.x(), a.y());
p.closePath();
s[fin*6] = p;
// Second polygon
p = new Path2D.Float();
a = finset.toAbsolute(c[4]);
p.moveTo(a.x(), a.y());
a = finset.toAbsolute(c[5]);
p.lineTo(a.x(), a.y());
a = finset.toAbsolute(c[6]);
p.lineTo(a.x(), a.y());
a = finset.toAbsolute(c[7]);
p.lineTo(a.x(), a.y());
p.closePath();
s[fin*6+1] = p;
// Single lines
for (int i=0; i<4; i++) {
a = finset.toAbsolute(c[i]);
b = finset.toAbsolute(c[i+4]);
s[fin*6+2+i] = new Line2D.Float((float)a.x(),(float)a.y(),(float)b.x(),(float)b.y());
}
// Rotate fin coordinates
for (int i=0; i<8; i++)
c[i] = rot.transform(c[i]);
}
*/
} }