protected void calculateGeometryExtents() throws RenderEngineException, SerializerException { for (IfcProduct ifcProduct : model.getAllWithSubTypes(IfcProduct.class)) { try { calculateExtents(ifcProduct.getGlobalId(), ifcProduct); } catch (Exception e) { LoggerFactory.getLogger(AbstractGeometrySerializer.class).error("", e); } } }
public String getObjectIdentifier(IfcProduct ifcProduct) { if (ifcProduct == null) { return "No object"; } String name = ifcProduct.getName(); if (name != null && !name.trim().equals("")) { return name; } String guid = ifcProduct.getGlobalId(); if (guid != null && !guid.trim().equals("")) { return guid; } return ifcProduct.eClass().getName() + " " + ifcProduct.getOid(); }
private ObjectNode objectToJson(IdEObject idEObject) { ObjectNode objectNode = OBJECT_MAPPER.createObjectNode(); if (idEObject.getOid() != -1) { objectNode.put("oid", idEObject.getOid()); } if (idEObject instanceof IfcProduct) { IfcProduct ifcProduct = (IfcProduct)idEObject; if (ifcProduct.getName() != null) { objectNode.put("name", ifcProduct.getName()); } if (ifcProduct.getGlobalId() != null) { objectNode.put("guid", ifcProduct.getGlobalId()); } } return objectNode; }
public void setColor(IfcProduct product, double[] color, float transparency) throws IfcModelInterfaceException { if (!productToStyledItem.containsKey(product) || productToStyledItem.get(product).isEmpty()) { System.out.println("No style for " + product + " " + product.getGlobalId()); IfcProductRepresentation productRepresentation = product.getRepresentation(); if (product.getRepresentation() == null) {