use of org.hwyl.sexytopo.model.survey.Leg in project sexytopo by richsmith.
the class ExtendedElevationProjectionTest method testProject1MNorth1MEast.
@Test
public void testProject1MNorth1MEast() {
Survey survey = BasicTestSurveyCreator.create5MEast();
Space<Coord2D> space = Projection2D.EXTENDED_ELEVATION.project(survey);
Map<Station, Coord2D> stationMap = space.getStationMap();
Map<Leg, Line<Coord2D>> legMap = space.getLegMap();
Station two = survey.getStationByName("2");
Coord2D twoCoord = stationMap.get(two);
Coord2D expected = new Coord2D(5, 0);
Assert.assertEquals(expected, twoCoord);
Leg splayLeft = two.getUnconnectedOnwardLegs().get(0);
Line<Coord2D> splayLeftLine = legMap.get(splayLeft);
expected = new Coord2D(5, 0);
assert splayLeftLine != null;
Assert.assertEquals(expected, splayLeftLine.getEnd());
Leg splayRight = two.getUnconnectedOnwardLegs().get(1);
Line<Coord2D> splayRightLine = legMap.get(splayRight);
expected = new Coord2D(5, 0);
assert splayRightLine != null;
Assert.assertEquals(expected, splayRightLine.getEnd());
}
use of org.hwyl.sexytopo.model.survey.Leg in project sexytopo by richsmith.
the class LrudTest method testStraightNorthCrossSectionLeftSplay.
@Test
public void testStraightNorthCrossSectionLeftSplay() {
Survey testSurvey = BasicTestSurveyCreator.createStraightNorth();
Station s2 = testSurvey.getStationByName("2");
double angle = CrossSectioner.getAngleOfSection(testSurvey, s2);
Leg splay = LRUD.LEFT.createSplay(testSurvey, s2, 5);
Assert.assertEquals(270.0, splay.getAzimuth(), SexyTopo.ALLOWED_DOUBLE_DELTA);
}
use of org.hwyl.sexytopo.model.survey.Leg in project sexytopo by richsmith.
the class BasicTestSurveyCreator method createRightRight.
public static Survey createRightRight() {
Survey survey = new Survey("Test n-shaped Survey");
Leg leg0 = new Leg(5, 0, 0);
SurveyUpdater.updateWithNewStation(survey, leg0);
Leg leg1 = new Leg(5, 90, 0);
SurveyUpdater.updateWithNewStation(survey, leg1);
Leg leg2 = new Leg(5, 180, 0);
SurveyUpdater.updateWithNewStation(survey, leg2);
return survey;
}
use of org.hwyl.sexytopo.model.survey.Leg in project sexytopo by richsmith.
the class BasicTestSurveyCreator method createStraightNorthThroughRepeats.
public static Survey createStraightNorthThroughRepeats() {
Survey survey = new Survey("Test Straight Survey North");
for (int i = 0; i < 3; i++) {
for (int j = 0; j < 3; j++) {
Leg leg = new Leg(5, 0, 0);
SurveyUpdater.update(survey, leg);
}
}
return survey;
}
use of org.hwyl.sexytopo.model.survey.Leg in project sexytopo by richsmith.
the class BasicTestSurveyCreator method createStraightNorth.
public static Survey createStraightNorth() {
Survey survey = new Survey("Test Straight Survey North");
Leg leg0 = new Leg(5, 0, 0);
SurveyUpdater.updateWithNewStation(survey, leg0);
Leg leg1 = new Leg(5, 0, 0);
SurveyUpdater.updateWithNewStation(survey, leg1);
Leg leg2 = new Leg(5, 0, 0);
SurveyUpdater.updateWithNewStation(survey, leg2);
return survey;
}
Aggregations