use of eu.esdihumboldt.util.geometry.interpolation.model.impl.ArcByCenterPointImpl in project hale by halestudio.
the class SplitInterpolationTest method testOffsetBig.
@Test
public void testOffsetBig() throws IOException {
ArcByCenterPoint arc = new ArcByCenterPointImpl(new Coordinate(2, 2), 15.0, Angle.fromDegrees(45), Angle.fromDegrees(135), true);
splitInterpolationTest(arc, 0.1);
}
use of eu.esdihumboldt.util.geometry.interpolation.model.impl.ArcByCenterPointImpl in project hale by halestudio.
the class ArcGridSegment method getFirstPart.
@Override
public ArcSegment getFirstPart() {
ArcByCenterPoint byCenter = arc.toArcByCenterPoint();
Angle middleAngle = Angle.fromRadians(byCenter.getStartAngle().getRadians() + 0.5 * byCenter.getAngleBetween().getRadians());
Arc part = new ArcByCenterPointImpl(byCenter.getCenterPoint(), byCenter.getRadius(), byCenter.getStartAngle(), middleAngle, byCenter.isClockwise());
// match the parent segment's
return new FixedStartEndGridSegment(part, true, gridSize, getStartPoint(), getMiddlePoint());
}
use of eu.esdihumboldt.util.geometry.interpolation.model.impl.ArcByCenterPointImpl in project hale by halestudio.
the class ArcGridSegment method getSecondPart.
@Override
public ArcSegment getSecondPart() {
ArcByCenterPoint byCenter = arc.toArcByCenterPoint();
Angle middleAngle = Angle.fromRadians(byCenter.getStartAngle().getRadians() + 0.5 * byCenter.getAngleBetween().getRadians());
Arc part = new ArcByCenterPointImpl(byCenter.getCenterPoint(), byCenter.getRadius(), middleAngle, byCenter.getEndAngle(), byCenter.isClockwise());
// match the parent segment's
return new FixedStartEndGridSegment(part, true, gridSize, getMiddlePoint(), getEndPoint());
}
use of eu.esdihumboldt.util.geometry.interpolation.model.impl.ArcByCenterPointImpl in project hale by halestudio.
the class ArcSplitSegment method getSecondPart.
@Override
public ArcSegment getSecondPart() {
ArcByCenterPoint byCenter = arc.toArcByCenterPoint();
Angle middleAngle = Angle.fromRadians(byCenter.getStartAngle().getRadians() + 0.5 * byCenter.getAngleBetween().getRadians());
Arc part = new ArcByCenterPointImpl(byCenter.getCenterPoint(), byCenter.getRadius(), middleAngle, byCenter.getEndAngle(), byCenter.isClockwise());
return new FixedStartEndSplitSegment(part, maxPositionalError, getMiddlePoint(), getEndPoint());
}
use of eu.esdihumboldt.util.geometry.interpolation.model.impl.ArcByCenterPointImpl in project hale by halestudio.
the class ArcSplitSegment method getFirstPart.
@Override
public ArcSegment getFirstPart() {
ArcByCenterPoint byCenter = arc.toArcByCenterPoint();
Angle middleAngle = Angle.fromRadians(byCenter.getStartAngle().getRadians() + 0.5 * byCenter.getAngleBetween().getRadians());
Arc part = new ArcByCenterPointImpl(byCenter.getCenterPoint(), byCenter.getRadius(), byCenter.getStartAngle(), middleAngle, byCenter.isClockwise());
return new FixedStartEndSplitSegment(part, maxPositionalError, getStartPoint(), getMiddlePoint());
}
Aggregations