Skip to content

Commit

Permalink
Removed redundant geometry loading
Browse files Browse the repository at this point in the history
  • Loading branch information
rubendel committed Nov 23, 2016
1 parent 187fa03 commit 427f2a5
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions BimServerClientLib/src/org/bimserver/client/ClientIfcModel.java
Expand Up @@ -317,7 +317,7 @@ private void loadGeometry() throws QueryException, ServerException, UserExceptio

for (IfcProduct ifcProduct : getAllWithSubTypes(IfcProduct.class)) {
GeometryInfo geometry = ifcProduct.getGeometry();
if (geometry != null && ifcProduct.getGeometry().getData() == null) {
if (geometry != null) {
geometryInfoOidToOid.put(geometry.getOid(), ifcProduct.getOid());
queryPart.addOid(geometry.getOid());
}
Expand Down Expand Up @@ -498,27 +498,22 @@ public <T extends IdEObject> List<T> getAll(EClass eClass) {
}
List<T> result = super.getAll(eClass);
try {
loadGeometry();
if (modelState != ModelState.FULLY_LOADED) {
loadGeometry();
}
} catch (ServerException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (UserException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (PublicInterfaceNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (QueryException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (GeometryException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IfcModelInterfaceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return result;
Expand Down

0 comments on commit 427f2a5

Please sign in to comment.