use of org.bimserver.models.ifc4.IfcNormalisedRatioMeasure in project BIMserver by opensourceBIM.
the class TestIfc4TwoDimensional method test.
@Test
public void test() throws Exception {
try (JsonBimServerClientFactory factory = new JsonBimServerClientFactory("http://localhost:8080")) {
try (BimServerClient client = factory.create(new UsernamePasswordAuthenticationInfo("admin@bimserver.org", "admin"))) {
SProject project = client.getServiceInterface().addProject(RandomStringUtils.randomAlphanumeric(10), "ifc4");
SDeserializerPluginConfiguration deserializer = client.getServiceInterface().getSuggestedDeserializerForExtension("ifc", project.getOid());
Path path = Paths.get("../../TestFiles/TestData/data/ifc4add2tc1/tessellation-with-individual-colors.ifc");
SLongCheckinActionState actionState = client.checkinSync(project.getOid(), "test", deserializer.getOid(), path, (title, progress) -> System.out.println(title + ": " + progress));
ClientIfcModel model = client.getModel(project, actionState.getRoid(), true, false);
List<IfcColourRgbList> colourRgbLists = model.getAll(IfcColourRgbList.class);
Assert.assertFalse(colourRgbLists.isEmpty());
for (IfcColourRgbList colourRgbList : colourRgbLists) {
Assert.assertEquals(3, colourRgbList.getColourList().size());
for (ListOfIfcNormalisedRatioMeasure rgbValues : colourRgbList.getColourList()) {
Assert.assertEquals(3, rgbValues.getList().size());
for (IfcNormalisedRatioMeasure ifcNormalisedRatioMeasure : rgbValues.getList()) {
Assert.assertNotNull(ifcNormalisedRatioMeasure);
}
}
}
}
Thread.sleep(500);
}
}
Aggregations