diff --git a/IFCProps2ExcelOnline/.settings/org.eclipse.wst.common.component b/IFCProps2ExcelOnline/.settings/org.eclipse.wst.common.component index 5cebd9fc..00aef487 100644 --- a/IFCProps2ExcelOnline/.settings/org.eclipse.wst.common.component +++ b/IFCProps2ExcelOnline/.settings/org.eclipse.wst.common.component @@ -1,5 +1,6 @@ - + + @@ -44,7 +45,8 @@ - + + @@ -89,7 +91,8 @@ - + + @@ -134,7 +137,8 @@ - + + @@ -179,7 +183,8 @@ - + + @@ -224,17 +229,10 @@ + - - uses - - - uses - - - uses - - + + @@ -279,7 +277,8 @@ - + + @@ -324,7 +323,8 @@ - + + @@ -361,7 +361,8 @@ - + + @@ -406,7 +407,8 @@ - + + diff --git a/IFCtoLBD/src/license/THIRD-PARTY.properties b/IFCtoLBD/src/license/THIRD-PARTY.properties index 6528ee5d..3694a0d2 100644 --- a/IFCtoLBD/src/license/THIRD-PARTY.properties +++ b/IFCtoLBD/src/license/THIRD-PARTY.properties @@ -55,5 +55,5 @@ # Please fill the missing licenses for dependencies : # # -#Mon Sep 02 11:05:05 CEST 2024 +#Wed Sep 18 18:43:14 CEST 2024 gnu.getopt--java-getopt--1.0.13= diff --git a/IFCtoLBD/src/main/java/examples/Example5.java b/IFCtoLBD/src/main/java/examples/Example5.java index cbed4728..b06dec88 100644 --- a/IFCtoLBD/src/main/java/examples/Example5.java +++ b/IFCtoLBD/src/main/java/examples/Example5.java @@ -43,7 +43,7 @@ public static void main(String[] args) { try (IFCtoLBDConverter converter = new IFCtoLBDConverter("https://example.com/", hasPropertiesBlankNodes, props_level);) { // Perform the initial conversion phase converter.convert_read_in_phase(ifc_file.getAbsolutePath(), null, hasGeometry, hasPerformanceBoost, - exportIfcOWL, hasBuildingElements, hasBuildingProperties, hasBoundingBoxWKT, hasUnits); + exportIfcOWL, hasBuildingElements, hasBuildingProperties, hasBoundingBoxWKT, hasUnits,false); // Filter only wall elements Set types = new HashSet<>(); @@ -53,7 +53,7 @@ public static void main(String[] args) { // Perform the LBD conversion phase with specified options Model m = converter.convert_LBD_phase(hasBuildingElements, hasSeparateBuildingElementsModel, hasBuildingProperties, hasSeparatePropertiesModel, hasGeolocation, hasGeometry, exportIfcOWL, - hasUnits, hasBoundingBoxWKT, true); + hasUnits, hasBoundingBoxWKT, true,false); if (m != null) { // Create a SPARQL query to select all elements of type bot:Element diff --git a/IFCtoLBD/src/main/java/examples/IPE240Tekla_L3_maped.java b/IFCtoLBD/src/main/java/examples/IPE240Tekla_L3_maped.java new file mode 100644 index 00000000..3036d6d1 --- /dev/null +++ b/IFCtoLBD/src/main/java/examples/IPE240Tekla_L3_maped.java @@ -0,0 +1,55 @@ +package examples; + +import java.io.File; +import java.net.URL; + +import org.apache.jena.rdf.model.Model; +import org.linkedbuildingdata.ifc2lbd.IFCtoLBDConverter; + +public class IPE240Tekla_L3_maped { + static final private int props_level = 3; + static final private boolean hasBuildingElements = true; + static final private boolean hasBuildingProperties = true; + + static final boolean hasSeparateBuildingElementsModel = false; + static final boolean hasPropertiesBlankNodes = false; + static final boolean hasSeparatePropertiesModel = false; + + static final boolean hasGeolocation = false; + + static final boolean hasGeometry = false; + static final boolean exportIfcOWL = false; + static final boolean hasUnits = false; + + static final boolean hasPerformanceBoost = false; + static final boolean hasBoundingBoxWKT = true; + + public static void main(String[] args) { + URL ifc_file_url = ClassLoader.getSystemResource("IPE240Tekla.ifc"); + try { + File ifc_file = new File(ifc_file_url.toURI()); + + try (IFCtoLBDConverter converter = new IFCtoLBDConverter("https://example.com/", hasPropertiesBlankNodes, + props_level);) { + + converter.convert_read_in_phase(ifc_file.getAbsolutePath(), null, hasGeometry, hasPerformanceBoost, + exportIfcOWL,hasBuildingElements,hasBuildingProperties,hasBoundingBoxWKT,hasUnits); + String map=""" + { + "http://lbd.arch.rwth-aachen.de/props#grossWeight": "http://lbd.arch.rwth-aachen.de/props#elementWeight" + } + """; + converter.setProperty_replace_map(map); + Model m =converter.convert_LBD_phase(hasBuildingElements, hasSeparateBuildingElementsModel, + hasBuildingProperties, hasSeparatePropertiesModel, hasGeolocation, hasGeometry, exportIfcOWL, + hasUnits, hasBoundingBoxWKT, true); + + m.write(System.out,"TTL"); + } + } catch (Exception e) { + e.printStackTrace(); + } + + } + +} \ No newline at end of file diff --git a/IFCtoLBD/src/main/java/examples/IPE240Tekla_L3_no_change.java b/IFCtoLBD/src/main/java/examples/IPE240Tekla_L3_no_change.java new file mode 100644 index 00000000..06afabba --- /dev/null +++ b/IFCtoLBD/src/main/java/examples/IPE240Tekla_L3_no_change.java @@ -0,0 +1,49 @@ +package examples; + +import java.io.File; +import java.net.URL; + +import org.apache.jena.rdf.model.Model; +import org.linkedbuildingdata.ifc2lbd.IFCtoLBDConverter; + +public class IPE240Tekla_L3_no_change { + static final private int props_level = 3; + static final private boolean hasBuildingElements = true; + static final private boolean hasBuildingProperties = true; + + static final boolean hasSeparateBuildingElementsModel = false; + static final boolean hasPropertiesBlankNodes = false; + static final boolean hasSeparatePropertiesModel = false; + + static final boolean hasGeolocation = false; + + static final boolean hasGeometry = false; + static final boolean exportIfcOWL = false; + static final boolean hasUnits = false; + + static final boolean hasPerformanceBoost = false; + static final boolean hasBoundingBoxWKT = true; + + public static void main(String[] args) { + URL ifc_file_url = ClassLoader.getSystemResource("IPE240Tekla.ifc"); + try { + File ifc_file = new File(ifc_file_url.toURI()); + + try (IFCtoLBDConverter converter = new IFCtoLBDConverter("https://example.com/", hasPropertiesBlankNodes, + props_level);) { + converter.convert_read_in_phase(ifc_file.getAbsolutePath(), null, hasGeometry, hasPerformanceBoost, + exportIfcOWL,hasBuildingElements,hasBuildingProperties,hasBoundingBoxWKT,hasUnits); + + Model m =converter.convert_LBD_phase(hasBuildingElements, hasSeparateBuildingElementsModel, + hasBuildingProperties, hasSeparatePropertiesModel, hasGeolocation, hasGeometry, exportIfcOWL, + hasUnits, hasBoundingBoxWKT, true); + + m.write(System.out,"TTL"); + } + } catch (Exception e) { + e.printStackTrace(); + } + + } + +} \ No newline at end of file diff --git a/IFCtoLBD/src/main/java/examples/IPE240_Custom_Revit_02_L3_mapped.java b/IFCtoLBD/src/main/java/examples/IPE240_Custom_Revit_02_L3_mapped.java new file mode 100644 index 00000000..2284ab8c --- /dev/null +++ b/IFCtoLBD/src/main/java/examples/IPE240_Custom_Revit_02_L3_mapped.java @@ -0,0 +1,50 @@ +package examples; + +import java.io.File; +import java.net.URL; + +import org.apache.jena.rdf.model.Model; +import org.linkedbuildingdata.ifc2lbd.IFCtoLBDConverter; + +public class IPE240_Custom_Revit_02_L3_mapped { + static final private int props_level = 3; + static final private boolean hasBuildingElements = true; + static final private boolean hasBuildingProperties = true; + + static final boolean hasSeparateBuildingElementsModel = false; + static final boolean hasPropertiesBlankNodes = false; + static final boolean hasSeparatePropertiesModel = false; + + static final boolean hasGeolocation = false; + + static final boolean hasGeometry = false; + static final boolean exportIfcOWL = false; + static final boolean hasUnits = false; + + static final boolean hasPerformanceBoost = false; + static final boolean hasBoundingBoxWKT = true; + + public static void main(String[] args) { + URL ifc_file_url = ClassLoader.getSystemResource("IPE240_Custom_Revit_02.ifc"); + try { + File ifc_file = new File(ifc_file_url.toURI()); + + try (IFCtoLBDConverter converter = new IFCtoLBDConverter("https://example.com/", hasPropertiesBlankNodes, + props_level);) { + converter.convert_read_in_phase(ifc_file.getAbsolutePath(), null, hasGeometry, hasPerformanceBoost, + exportIfcOWL,hasBuildingElements,hasBuildingProperties,hasBoundingBoxWKT,hasUnits); + + // No mapping needed + Model m =converter.convert_LBD_phase(hasBuildingElements, hasSeparateBuildingElementsModel, + hasBuildingProperties, hasSeparatePropertiesModel, hasGeolocation, hasGeometry, exportIfcOWL, + hasUnits, hasBoundingBoxWKT, true); + + m.write(System.out,"TTL"); + } + } catch (Exception e) { + e.printStackTrace(); + } + + } + +} \ No newline at end of file diff --git a/IFCtoLBD/src/main/java/examples/IPE240_Custom_Revit_02_L3_no_change.java b/IFCtoLBD/src/main/java/examples/IPE240_Custom_Revit_02_L3_no_change.java new file mode 100644 index 00000000..023d755e --- /dev/null +++ b/IFCtoLBD/src/main/java/examples/IPE240_Custom_Revit_02_L3_no_change.java @@ -0,0 +1,49 @@ +package examples; + +import java.io.File; +import java.net.URL; + +import org.apache.jena.rdf.model.Model; +import org.linkedbuildingdata.ifc2lbd.IFCtoLBDConverter; + +public class IPE240_Custom_Revit_02_L3_no_change { + static final private int props_level = 3; + static final private boolean hasBuildingElements = true; + static final private boolean hasBuildingProperties = true; + + static final boolean hasSeparateBuildingElementsModel = false; + static final boolean hasPropertiesBlankNodes = false; + static final boolean hasSeparatePropertiesModel = false; + + static final boolean hasGeolocation = false; + + static final boolean hasGeometry = false; + static final boolean exportIfcOWL = false; + static final boolean hasUnits = false; + + static final boolean hasPerformanceBoost = false; + static final boolean hasBoundingBoxWKT = true; + + public static void main(String[] args) { + URL ifc_file_url = ClassLoader.getSystemResource("IPE240_Custom_Revit_02.ifc"); + try { + File ifc_file = new File(ifc_file_url.toURI()); + + try (IFCtoLBDConverter converter = new IFCtoLBDConverter("https://example.com/", hasPropertiesBlankNodes, + props_level);) { + converter.convert_read_in_phase(ifc_file.getAbsolutePath(), null, hasGeometry, hasPerformanceBoost, + exportIfcOWL,hasBuildingElements,hasBuildingProperties,hasBoundingBoxWKT,hasUnits); + + Model m =converter.convert_LBD_phase(hasBuildingElements, hasSeparateBuildingElementsModel, + hasBuildingProperties, hasSeparatePropertiesModel, hasGeolocation, hasGeometry, exportIfcOWL, + hasUnits, hasBoundingBoxWKT, true); + + m.write(System.out,"TTL"); + } + } catch (Exception e) { + e.printStackTrace(); + } + + } + +} \ No newline at end of file diff --git a/IFCtoLBD/src/main/java/org/linkedbuildingdata/ifc2lbd/IFCtoLBDConverter.java b/IFCtoLBD/src/main/java/org/linkedbuildingdata/ifc2lbd/IFCtoLBDConverter.java index 8025d7a8..7bb8aeed 100644 --- a/IFCtoLBD/src/main/java/org/linkedbuildingdata/ifc2lbd/IFCtoLBDConverter.java +++ b/IFCtoLBD/src/main/java/org/linkedbuildingdata/ifc2lbd/IFCtoLBDConverter.java @@ -332,13 +332,13 @@ public Model convert(String ifc_filename, String target_file, boolean hasBuildin boolean hasPerformanceBoost, boolean hasBoundingBoxWKT) { if (convert_read_in_phase(ifc_filename, target_file, hasGeometry, hasPerformanceBoost, exportIfcOWL, - hasBuildingElements, hasBuildingProperties, hasBoundingBoxWKT, hasUnits)) { + hasBuildingElements, hasBuildingProperties, hasBoundingBoxWKT, hasUnits,false)) { if (this.hasSimplified_properties) setHasSimplified_properties(true); // for the read property sets return convert_LBD_phase(hasBuildingElements, hasSeparateBuildingElementsModel, hasBuildingProperties, hasSeparatePropertiesModel, hasGeolocation, hasGeometry, exportIfcOWL, hasUnits, hasBoundingBoxWKT, - false); + false,false); } return null; @@ -350,12 +350,12 @@ public Model convert(String ifc_filename, String target_file, boolean hasBuildin boolean hasPerformanceBoost, boolean hasBoundingBoxWKT, boolean hasHierarchicalNaming) { if (convert_read_in_phase(ifc_filename, target_file, hasGeometry, hasPerformanceBoost, exportIfcOWL, - hasBuildingElements, hasBuildingProperties, hasBoundingBoxWKT, hasUnits)) { + hasBuildingElements, hasBuildingProperties, hasBoundingBoxWKT, hasUnits,false)) { if (this.hasSimplified_properties) setHasSimplified_properties(true); // for the read property sets return convert_LBD_phase(hasBuildingElements, hasSeparateBuildingElementsModel, hasBuildingProperties, hasSeparatePropertiesModel, hasGeolocation, hasGeometry, exportIfcOWL, hasUnits, hasBoundingBoxWKT, - hasHierarchicalNaming); + hasHierarchicalNaming,false); } return null; @@ -365,7 +365,15 @@ public Model convert(String ifc_filename, String target_file, boolean hasBuildin public boolean convert_read_in_phase(String ifc_filename, String target_file, boolean hasGeometry, boolean hasPerformanceBoost, boolean exportIfcOWL, boolean hasBuildingElements, - boolean hasBuildingProperties, boolean hasBoundingBoxWKT, boolean hasUnits) { + boolean hasBuildingProperties, boolean hasBoundingBoxWKT, boolean hasUnits) + { + return convert_read_in_phase(ifc_filename, target_file, hasGeometry, + hasPerformanceBoost, exportIfcOWL, hasBuildingElements, + hasBuildingProperties, hasBoundingBoxWKT, hasUnits,false); + } + public boolean convert_read_in_phase(String ifc_filename, String target_file, boolean hasGeometry, + boolean hasPerformanceBoost, boolean exportIfcOWL, boolean hasBuildingElements, + boolean hasBuildingProperties, boolean hasBoundingBoxWKT, boolean hasUnits, boolean hasInterfaces) { this.target_file = target_file; @@ -435,11 +443,22 @@ public Model convert_LBD_phase(boolean hasBuildingElements, boolean hasSeparateB boolean hasGeometry, boolean exportIfcOWL, boolean hasUnits, boolean hasBoundingBoxWKT, boolean hasHierarchicalNaming) { + return convert_LBD_phase( hasBuildingElements, hasSeparateBuildingElementsModel, + hasBuildingProperties, hasSeparatePropertiesModel, hasGeolocation, + hasGeometry, exportIfcOWL, hasUnits, hasBoundingBoxWKT, + hasHierarchicalNaming,false); + } + + public Model convert_LBD_phase(boolean hasBuildingElements, boolean hasSeparateBuildingElementsModel, + boolean hasBuildingProperties, boolean hasSeparatePropertiesModel, boolean hasGeolocation, + boolean hasGeometry, boolean exportIfcOWL, boolean hasUnits, boolean hasBoundingBoxWKT, + boolean hasHierarchicalNaming,boolean hasInterfaces) { + boolean namedGraphs = false; try { conversion(this.target_file, hasBuildingElements, hasSeparateBuildingElementsModel, hasBuildingProperties, hasSeparatePropertiesModel, hasGeolocation, hasGeometry, exportIfcOWL, namedGraphs, - hasHierarchicalNaming); + hasHierarchicalNaming,hasInterfaces); } catch (Exception e) { e.printStackTrace(); eventBus.post(new IFCtoLBD_SystemErrorEvent(this.getClass().getSimpleName(), diff --git a/IFCtoLBD/src/main/java/org/linkedbuildingdata/ifc2lbd/core/IFCtoLBDConverterCore.java b/IFCtoLBD/src/main/java/org/linkedbuildingdata/ifc2lbd/core/IFCtoLBDConverterCore.java index 9c32a595..12f209f5 100644 --- a/IFCtoLBD/src/main/java/org/linkedbuildingdata/ifc2lbd/core/IFCtoLBDConverterCore.java +++ b/IFCtoLBD/src/main/java/org/linkedbuildingdata/ifc2lbd/core/IFCtoLBDConverterCore.java @@ -120,6 +120,7 @@ public abstract class IFCtoLBDConverterCore { private final Set has_geometry = new HashSet<>(); private RTree rtree; + private RTree rtree_walls; private final Map rtree_map = new HashMap<>(); private boolean exportIfcOWL_setting = false; @@ -143,14 +144,17 @@ public IFCtoLBDConverterCore() { protected void conversion(String target_file, boolean hasBuildingElements, boolean hasSeparateBuildingElementsModel, boolean hasBuildingProperties, boolean hasSeparatePropertiesModel, boolean hasGeolocation, boolean hasGeometry, boolean exportIfcOWL, @SuppressWarnings("unused") boolean namedGraphs, - boolean hasHierarchicalNaming) { + boolean hasHierarchicalNaming, boolean hasInterfaces) { this.handledAttributes4resource.clear(); // less performant but more dynamic this.eventBus.post(new IFCtoLBD_SystemStatusEvent("The LBD conversion starts")); this.exportIfcOWL_setting = exportIfcOWL; this.hasHierarchicalNaming_setting = hasHierarchicalNaming; this.included_elements.clear(); if (hasGeometry) + { this.rtree = RTree.dimensions(3).create(); + this.rtree_walls = RTree.dimensions(3).create(); + } List sites = IfcOWLUtils.listSites(this.ifcOWL, this.ifcowl_model); if (!sites.isEmpty()) { @@ -215,6 +219,11 @@ protected void conversion(String target_file, boolean hasBuildingElements, boole this.lbd_general_output_model.add(this.lbd_product_output_model); } + if (hasGeometry) + { + finnish_geometry(hasInterfaces); + } + this.eventBus.post(new IFCtoLBD_SystemStatusEvent("Writing out the results.")); if (hasBuildingProperties) { @@ -430,26 +439,70 @@ private void addGeometry(Resource lbd_resource, String guid) { Rectangle rectangle = Rectangle.create(bb.getMin().x, bb.getMin().y, bb.getMin().z, bb.getMax().x, bb.getMax().y, bb.getMax().z); - this.rtree = this.rtree.add(lbd_resource, rectangle); // rtree is // immutable + this.rtree = this.rtree.add(lbd_resource, rectangle); // rtree is this.rtree_map.put(rectangle, lbd_resource); + // TODO if not all is in place yet + if(lbd_resource.toString().toLowerCase().contains("furniture")) + return; + if(lbd_resource.toString().toLowerCase().contains("slab")) + return; + if(lbd_resource.toString().toLowerCase().contains("railing")) + return; + if(lbd_resource.toString().toLowerCase().contains("beam")) + return; + + if(lbd_resource.toString().toLowerCase().contains("stairflight")) + return; + if(lbd_resource.toString().toLowerCase().contains("member")) + return; + Iterable> results = this.rtree.search(rectangle); for (Entry e : results) { if (e.value() != lbd_resource) e.value().addProperty(LBD.containsInBoundingBox, lbd_resource); } + double x1 = bb.getMin().x, y1 = bb.getMin().y, z1 = bb.getMin().z; + double x2 = bb.getMax().x, y2 = bb.getMax().y, z2 = bb.getMax().z; + + // Front Face + Rectangle frontFace = Rectangle.create(x1, y1, z1, x2, y2, z1); + + // Back Face + Rectangle backFace = Rectangle.create(x1, y1, z2, x2, y2, z2); + + // Left Face + Rectangle leftFace = Rectangle.create(x1, y1, z1, x1, y2, z2); + + // Right Face + Rectangle rightFace = Rectangle.create(x2, y1, z1, x2, y2, z2); + + // Top Face + Rectangle topFace = Rectangle.create(x1, y2, z1, x2, y2, z2); + + // Bottom Face + Rectangle bottomFace = Rectangle.create(x1, y1, z1, x2, y1, z2); + + + this.rtree_walls = this.rtree_walls.add(lbd_resource, frontFace); + this.rtree_walls = this.rtree_walls.add(lbd_resource, backFace); + this.rtree_walls = this.rtree_walls.add(lbd_resource, leftFace); + this.rtree_walls = this.rtree_walls.add(lbd_resource, rightFace); + this.rtree_walls = this.rtree_walls.add(lbd_resource, topFace); + this.rtree_walls = this.rtree_walls.add(lbd_resource, bottomFace); + } - if (obj != null) { + /*if (obj != null) { if (this.fogasObj == null) this.fogasObj = this.lbd_general_output_model .createProperty("https://w3id.org/fog#asObj_v3.0-obj"); Literal base64 = this.lbd_general_output_model.createTypedLiteral(obj.toString(), "https://www.w3.org/2001/XMLSchema#base64Binary"); sp_geometry.addLiteral(this.fogasObj, base64); - } + }*/ } } catch (Exception e) { // Just in case IFCOpenShell does not function @@ -459,6 +512,56 @@ private void addGeometry(Resource lbd_resource, String guid) { } + private void finnish_geometry(boolean hasInterfaces) { + for (java.util.Map.Entry entry : rtree_map.entrySet()) { + Resource lbd_resource = entry.getValue(); + Rectangle rect_geometry = entry.getKey(); + + Iterable> results = this.rtree.search(rect_geometry); + for (Entry e : results) { + Resource e_uri=e.value(); + if (e_uri != lbd_resource) + lbd_resource.addProperty(LBD.containsInBoundingBox, e.value()); + } + + if(!hasInterfaces) + continue; + if(lbd_resource.toString().toLowerCase().contains("furniture")) + continue; + if(lbd_resource.toString().toLowerCase().contains("slab")) + continue; + if(lbd_resource.toString().toLowerCase().contains("railing")) + continue; + if(lbd_resource.toString().toLowerCase().contains("beam")) + continue; + + if(lbd_resource.toString().toLowerCase().contains("stairflight")) + continue; + if(lbd_resource.toString().toLowerCase().contains("member")) + continue; + // Interfaces for the bounding boxes + //TODO 0.05 use model scale + Iterable> w_results = this.rtree_walls.search(rect_geometry,0.05); + for (Entry e : w_results) { + Resource e_uri=e.value(); + + + if (e_uri != lbd_resource) + { + Resource bot_interface = this.lbd_general_output_model + .createResource(lbd_resource.getURI() + "_interface_"+e.geometry().hashCode()); + bot_interface.addProperty(RDF.type, BOT.bot_interface); + bot_interface.addProperty(BOT.bot_interfaceOf, e_uri); + bot_interface.addProperty(BOT.bot_interfaceOf, lbd_resource); // Duplicates does not matter + + } + } + + + + } + } + private final Map unitmap = new HashMap<>(); /** @@ -1481,7 +1584,7 @@ public void setProperty_replace_map(String property_replace_map_json) { try { Map mapping = new ObjectMapper().readValue(property_replace_map_json, HashMap.class); this.property_replace_map = mapping; - + for (PropertySet pset : this.propertysets.values()) { pset.setProperty_replace_map(mapping); } diff --git a/IFCtoLBD/src/main/java/org/linkedbuildingdata/ifc2lbd/namespace/BOT.java b/IFCtoLBD/src/main/java/org/linkedbuildingdata/ifc2lbd/namespace/BOT.java index 766783cd..0ef32a08 100644 --- a/IFCtoLBD/src/main/java/org/linkedbuildingdata/ifc2lbd/namespace/BOT.java +++ b/IFCtoLBD/src/main/java/org/linkedbuildingdata/ifc2lbd/namespace/BOT.java @@ -6,7 +6,6 @@ public final class BOT extends abstract_NS{ public static final String ns = "https://w3id.org/bot#"; - public static final Property hasBuilding =property(ns,"hasBuilding"); public static final Property hasStorey =property(ns,"hasStorey"); @@ -21,6 +20,11 @@ public final class BOT extends abstract_NS{ public static final Resource space =resource(ns,"Space"); public static final Resource storey =resource(ns,"Storey"); public static final Resource element =resource(ns,"Element"); + + // reserved word interface + public static final Resource bot_interface=resource(ns,"Interface"); + public static final Property bot_interfaceOf =property(ns,"interfaceOf"); + public static void addNameSpace(Model model) { model.setNsPrefix("bot", ns); diff --git a/IFCtoLBD/src/main/java/org/linkedbuildingdata/ifc2lbd/namespace/LBD.java b/IFCtoLBD/src/main/java/org/linkedbuildingdata/ifc2lbd/namespace/LBD.java index ea04b60f..cd336fa5 100644 --- a/IFCtoLBD/src/main/java/org/linkedbuildingdata/ifc2lbd/namespace/LBD.java +++ b/IFCtoLBD/src/main/java/org/linkedbuildingdata/ifc2lbd/namespace/LBD.java @@ -12,6 +12,7 @@ public class LBD extends abstract_NS { public static final String ns = "https://linkedbuildingdata.org/LBD#"; public static final Property containsInBoundingBox = property(ns, "containsInBoundingBox"); // contains, + // containsBoundingBox, // containsInVolume public static final Property hasBoundingBox = property(ns, "hasBoundingBox"); diff --git a/IFCtoLBD/src/main/resources/IPE240Tekla.ifc b/IFCtoLBD/src/main/resources/IPE240Tekla.ifc new file mode 100644 index 00000000..c6533c53 --- /dev/null +++ b/IFCtoLBD/src/main/resources/IPE240Tekla.ifc @@ -0,0 +1,194 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [ReferenceView_V1.2]', 'ExchangeRequirement [Structural]', 'Option[Flat wide beams as plates:Off]', 'Option[Location by:Global]', 'Option[Locations from Organizer:On]', 'Option[Layer:Name]', 'Option[Object coloring:ByObjectClass]', 'Option[Export All:On]', 'Option[Export Pours:Off]'),'2;1'); +FILE_NAME('IPE240Tekla.ifc','2024-02-13T13:44:45',('Lukas'),('Trimble'),'Tekla Structures 2023 Service Pack 8','IFC Export Version Jan 19 2024','IFC4 test model'); +FILE_SCHEMA(('IFC4')); +ENDSEC; + +DATA; +#1= IFCSIUNIT(*,.LENGTHUNIT.,.MILLI.,.METRE.); +#2= IFCMEASUREWITHUNIT(IFCRATIOMEASURE(304.8),#1); +#3= IFCDIMENSIONALEXPONENTS(1,0,0,0,0,0,0); +#4= IFCCONVERSIONBASEDUNIT(#3,.LENGTHUNIT.,'FOOT',#2); +#5= IFCSIUNIT(*,.AREAUNIT.,$,.SQUARE_METRE.); +#6= IFCMEASUREWITHUNIT(IFCRATIOMEASURE(0.09290304),#5); +#7= IFCDIMENSIONALEXPONENTS(2,0,0,0,0,0,0); +#8= IFCCONVERSIONBASEDUNIT(#7,.AREAUNIT.,'SQUARE FOOT',#6); +#9= IFCSIUNIT(*,.VOLUMEUNIT.,$,.CUBIC_METRE.); +#10= IFCMEASUREWITHUNIT(IFCRATIOMEASURE(0.028316846592),#9); +#11= IFCDIMENSIONALEXPONENTS(3,0,0,0,0,0,0); +#12= IFCCONVERSIONBASEDUNIT(#11,.VOLUMEUNIT.,'CUBIC FOOT',#10); +#13= IFCSIUNIT(*,.MASSUNIT.,.KILO.,.GRAM.); +#14= IFCSIUNIT(*,.TIMEUNIT.,$,.SECOND.); +#15= IFCSIUNIT(*,.PLANEANGLEUNIT.,$,.RADIAN.); +#16= IFCMEASUREWITHUNIT(IFCRATIOMEASURE(0.0174532925199433),#15); +#17= IFCDIMENSIONALEXPONENTS(0,0,0,0,0,0,0); +#18= IFCCONVERSIONBASEDUNIT(#17,.PLANEANGLEUNIT.,'DEGREE',#16); +#19= IFCSIUNIT(*,.SOLIDANGLEUNIT.,$,.STERADIAN.); +#20= IFCSIUNIT(*,.THERMODYNAMICTEMPERATUREUNIT.,$,.DEGREE_CELSIUS.); +#21= IFCSIUNIT(*,.LUMINOUSINTENSITYUNIT.,$,.LUMEN.); +#22= IFCUNITASSIGNMENT((#1,#5,#9,#13,#14,#15,#19,#20,#21)); +#23= IFCCARTESIANPOINT((0.,0.,0.)); +#24= IFCDIRECTION((1.,0.,0.)); +#25= IFCDIRECTION((0.,0.,1.)); +#26= IFCAXIS2PLACEMENT3D(#23,#25,#24); +#27= IFCDIRECTION((0.,1.)); +#28= IFCGEOMETRICREPRESENTATIONCONTEXT($,'Model',3,0.2,#26,#27); +#29= IFCPROJECT('1cDL5pw4159gCjVh_Xes_G',$,'Trimble',$,$,$,$,(#28),#22); +#30= IFCLOCALPLACEMENT($,#26); +#31= IFCSITE('2bd6oqkEX438uvNjAycBJY',$,'Unknown',$,$,#30,$,$,.ELEMENT.,$,$,$,$,$); +#32= IFCRELAGGREGATES('0qQplAtnP8Ywjn7FD75SjU',$,$,$,#29,(#31)); +#33= IFCLOCALPLACEMENT(#30,#26); +#34= IFCBUILDING('0sEjEJAvj8LPTfoUH6OWQ8',$,'Unknown',$,$,#33,$,$,.ELEMENT.,$,$,$); +#35= IFCRELAGGREGATES('1wqJv7uD99PPegbqyYNZ2d',$,$,$,#31,(#34)); +#36= IFCCARTESIANPOINTLIST2D(((0.,-2000.),(0.,32000.))); +#37= IFCINDEXEDPOLYCURVE(#36,(IFCLINEINDEX((1,2))),$); +#38= IFCCARTESIANPOINTLIST2D(((7200.,-2000.),(7200.,32000.))); +#39= IFCINDEXEDPOLYCURVE(#38,(IFCLINEINDEX((1,2))),$); +#40= IFCCARTESIANPOINTLIST2D(((14400.,-2000.),(14400.,32000.))); +#41= IFCINDEXEDPOLYCURVE(#40,(IFCLINEINDEX((1,2))),$); +#42= IFCCARTESIANPOINTLIST2D(((21600.,-2000.),(21600.,32000.))); +#43= IFCINDEXEDPOLYCURVE(#42,(IFCLINEINDEX((1,2))),$); +#44= IFCCARTESIANPOINTLIST2D(((28800.,-2000.),(28800.,32000.))); +#45= IFCINDEXEDPOLYCURVE(#44,(IFCLINEINDEX((1,2))),$); +#46= IFCCARTESIANPOINTLIST2D(((36000.,-2000.),(36000.,32000.))); +#47= IFCINDEXEDPOLYCURVE(#46,(IFCLINEINDEX((1,2))),$); +#48= IFCCARTESIANPOINTLIST2D(((-2000.,0.),(38000.,0.))); +#49= IFCINDEXEDPOLYCURVE(#48,(IFCLINEINDEX((1,2))),$); +#50= IFCCARTESIANPOINTLIST2D(((-2000.,6000.),(38000.,6000.))); +#51= IFCINDEXEDPOLYCURVE(#50,(IFCLINEINDEX((1,2))),$); +#52= IFCCARTESIANPOINTLIST2D(((-2000.,12000.),(38000.,12000.))); +#53= IFCINDEXEDPOLYCURVE(#52,(IFCLINEINDEX((1,2))),$); +#54= IFCCARTESIANPOINTLIST2D(((-2000.,18000.),(38000.,18000.))); +#55= IFCINDEXEDPOLYCURVE(#54,(IFCLINEINDEX((1,2))),$); +#56= IFCCARTESIANPOINTLIST2D(((-2000.,24000.),(38000.,24000.))); +#57= IFCINDEXEDPOLYCURVE(#56,(IFCLINEINDEX((1,2))),$); +#58= IFCCARTESIANPOINTLIST2D(((-2000.,30000.),(38000.,30000.))); +#59= IFCINDEXEDPOLYCURVE(#58,(IFCLINEINDEX((1,2))),$); +#60= IFCGRIDAXIS('1',#37,.T.); +#61= IFCGRIDAXIS('2',#39,.T.); +#62= IFCGRIDAXIS('3',#41,.T.); +#63= IFCGRIDAXIS('4',#43,.T.); +#64= IFCGRIDAXIS('5',#45,.T.); +#65= IFCGRIDAXIS('6',#47,.T.); +#66= IFCGRIDAXIS('A',#49,.T.); +#67= IFCGRIDAXIS('B',#51,.T.); +#68= IFCGRIDAXIS('C',#53,.T.); +#69= IFCGRIDAXIS('D',#55,.T.); +#70= IFCGRIDAXIS('E',#57,.T.); +#71= IFCGRIDAXIS('F',#59,.T.); +#72= IFCLOCALPLACEMENT(#33,#26); +#73= IFCGEOMETRICCURVESET((#37,#39,#41,#43,#45,#47,#49,#51,#53,#55,#57,#59)); +#74= IFCGEOMETRICREPRESENTATIONSUBCONTEXT('FootPrint','Model',*,*,*,*,#28,$,.MODEL_VIEW.,$); +#75= IFCSHAPEREPRESENTATION(#74,'FootPrint','GeometricCurveSet',(#73)); +#76= IFCPRODUCTDEFINITIONSHAPE($,$,(#75)); +#77= IFCGRID('3IBGUyg0v7CvrqVMEKPP3s',$,'+0',$,$,#72,#76,(#60,#61,#62,#63,#64,#65),(#66,#67,#68,#69,#70,#71),$,.RECTANGULAR.); +#78= IFCGRIDAXIS('1',#37,.T.); +#79= IFCGRIDAXIS('2',#39,.T.); +#80= IFCGRIDAXIS('3',#41,.T.); +#81= IFCGRIDAXIS('4',#43,.T.); +#82= IFCGRIDAXIS('5',#45,.T.); +#83= IFCGRIDAXIS('6',#47,.T.); +#84= IFCGRIDAXIS('A',#49,.T.); +#85= IFCGRIDAXIS('B',#51,.T.); +#86= IFCGRIDAXIS('C',#53,.T.); +#87= IFCGRIDAXIS('D',#55,.T.); +#88= IFCGRIDAXIS('E',#57,.T.); +#89= IFCGRIDAXIS('F',#59,.T.); +#90= IFCCARTESIANPOINT((0.,0.,3600.)); +#91= IFCAXIS2PLACEMENT3D(#90,#25,#24); +#92= IFCLOCALPLACEMENT(#33,#91); +#93= IFCGEOMETRICCURVESET((#37,#39,#41,#43,#45,#47,#49,#51,#53,#55,#57,#59)); +#94= IFCSHAPEREPRESENTATION(#74,'FootPrint','GeometricCurveSet',(#93)); +#95= IFCPRODUCTDEFINITIONSHAPE($,$,(#94)); +#96= IFCGRID('2AdFpnABX2FgOxGr8iL5Y1',$,'+3600',$,$,#92,#95,(#78,#79,#80,#81,#82,#83),(#84,#85,#86,#87,#88,#89),$,.RECTANGULAR.); +#97= IFCGRIDAXIS('1',#37,.T.); +#98= IFCGRIDAXIS('2',#39,.T.); +#99= IFCGRIDAXIS('3',#41,.T.); +#100= IFCGRIDAXIS('4',#43,.T.); +#101= IFCGRIDAXIS('5',#45,.T.); +#102= IFCGRIDAXIS('6',#47,.T.); +#103= IFCGRIDAXIS('A',#49,.T.); +#104= IFCGRIDAXIS('B',#51,.T.); +#105= IFCGRIDAXIS('C',#53,.T.); +#106= IFCGRIDAXIS('D',#55,.T.); +#107= IFCGRIDAXIS('E',#57,.T.); +#108= IFCGRIDAXIS('F',#59,.T.); +#109= IFCCARTESIANPOINT((0.,0.,7200.)); +#110= IFCAXIS2PLACEMENT3D(#109,#25,#24); +#111= IFCLOCALPLACEMENT(#33,#110); +#112= IFCGEOMETRICCURVESET((#37,#39,#41,#43,#45,#47,#49,#51,#53,#55,#57,#59)); +#113= IFCSHAPEREPRESENTATION(#74,'FootPrint','GeometricCurveSet',(#112)); +#114= IFCPRODUCTDEFINITIONSHAPE($,$,(#113)); +#115= IFCGRID('12vq8a8HjFjwi1O_dbHMXq',$,'+7200',$,$,#111,#114,(#97,#98,#99,#100,#101,#102),(#103,#104,#105,#106,#107,#108),$,.RECTANGULAR.); +#116= IFCBUILDINGSTOREY('1YH$YsZMP9AvLPCW48NSbS',$,'Unknown',$,$,#72,$,$,.ELEMENT.,0.); +#117= IFCCARTESIANPOINT((0.,0.,-120.)); +#118= IFCDIRECTION((0.,-1.,0.)); +#119= IFCAXIS2PLACEMENT3D(#117,#118,#24); +#120= IFCLOCALPLACEMENT(#72,#119); +#121= IFCELEMENTASSEMBLY('309q_rH8jBExg6zTqLm0_N',$,'BEAM',$,$,#120,$,$,$,.NOTDEFINED.); +#122= IFCPROPERTYENUMERATEDVALUE('Status',$,(IFCLABEL('NEW')),$); +#123= IFCPROPERTYSINGLEVALUE('Reference',$,IFCIDENTIFIER('B/0(?)'),$); +#124= IFCPROPERTYSET('3o1NABHH19vf36v81LjYw6',$,'Pset_ElementAssemblyCommon',$,(#122,#123)); +#125= IFCLOCALPLACEMENT(#120,#26); +#126= IFCCARTESIANPOINTLIST2D(((-60.,-120.),(60.,-120.),(60.,-110.2),(3.1,-110.2),(3.1,110.2),(60.,110.2),(60.,120.),(-60.,120.),(-60.,110.2),(-3.1,110.2),(-3.1,-110.2),(-60.,-110.2))); +#127= IFCINDEXEDPOLYCURVE(#126,(IFCLINEINDEX((1,2,3,4,5,6,7,8,9,10,11,12,1))),$); +#128= IFCARBITRARYCLOSEDPROFILEDEF(.AREA.,'IPE240',#127); +#129= IFCDIRECTION((-1.,0.,0.)); +#130= IFCAXIS2PLACEMENT3D(#23,#129,#25); +#131= IFCDIRECTION((0.,0.,-1.)); +#132= IFCCOLOURRGB($,0.356862745098039,0.592156862745098,0.137254901960784); +#133= IFCSURFACESTYLERENDERING(#132,0.,$,$,$,$,IFCNORMALISEDRATIOMEASURE(0.00390625),IFCSPECULAREXPONENT(10.),.NOTDEFINED.); +#134= IFCSURFACESTYLE('Steel_Undefined',.POSITIVE.,(#133)); +#135= IFCEXTRUDEDAREASOLID(#128,#130,#131,3600.); +#136= IFCGEOMETRICREPRESENTATIONSUBCONTEXT('Body','Model',*,*,*,*,#28,$,.MODEL_VIEW.,$); +#137= IFCSHAPEREPRESENTATION(#136,'Body','SolidModel',(#135)); +#138= IFCCARTESIANPOINTLIST3D(((0.,120.,0.),(3600.,120.,0.))); +#139= IFCINDEXEDPOLYCURVE(#138,(IFCLINEINDEX((1,2))),$); +#140= IFCGEOMETRICREPRESENTATIONSUBCONTEXT('Axis','Model',*,*,*,*,#28,$,.MODEL_VIEW.,$); +#141= IFCSHAPEREPRESENTATION(#140,'Axis','Curve3D',(#139)); +#142= IFCCARTESIANPOINT((1800.,0.,0.)); +#143= IFCGEOMETRICREPRESENTATIONSUBCONTEXT('CoG','Model',*,*,*,*,#28,$,.MODEL_VIEW.,$); +#144= IFCSHAPEREPRESENTATION(#143,'CoG','Point',(#142)); +#145= IFCPRODUCTDEFINITIONSHAPE($,$,(#137,#141,#144)); +#146= IFCBEAM('09lBYlecT7SORREq6i3ctF',$,'BEAM','IPE240',$,#125,#145,'Steel_Undefined',.NOTDEFINED.); +#147= IFCMATERIAL('Steel_Undefined',$,'STEEL'); +#148= IFCPROPERTYSINGLEVALUE('LENGTH',$,IFCLENGTHMEASURE(3600.),$); +#149= IFCPROPERTYSINGLEVALUE('NAME',$,IFCLABEL('BEAM'),$); +#150= IFCPROPERTYSINGLEVALUE('MAIN_PART',$,IFCINTEGER(4908),$); +#151= IFCPROPERTYSINGLEVALUE('PROFILE',$,IFCLABEL('IPE240'),$); +#152= IFCPROPERTYSINGLEVALUE('WIDTH',$,IFCLENGTHMEASURE(120.),$); +#153= IFCPROPERTYSINGLEVALUE('HEIGHT',$,IFCLENGTHMEASURE(240.),$); +#154= IFCPROPERTYSET('2$JJx9hYf8uwlMc46rZaWS',$,'Additional Properties',$,(#148,#149,#150,#151,#152,#153)); +#155= IFCPROPERTYSINGLEVALUE('IsExternal',$,IFCBOOLEAN(.F.),$); +#156= IFCPROPERTYSINGLEVALUE('LoadBearing',$,IFCBOOLEAN(.F.),$); +#157= IFCPROPERTYSINGLEVALUE('Slope',$,IFCPLANEANGLEMEASURE(0.),$); +#158= IFCPROPERTYSINGLEVALUE('Roll',$,IFCPLANEANGLEMEASURE(0.),$); +#159= IFCPROPERTYSET('1c_5FBMc9Ayvawjqu1Xjsj',$,'Pset_BeamCommon',$,(#122,#155,#156,#157,#158)); +#160= IFCQUANTITYLENGTH('Length',$,$,3600.,$); +#161= IFCQUANTITYAREA('CrossSectionArea',$,$,0.0039,$); +#162= IFCQUANTITYAREA('OuterSurfaceArea',$,$,3.32,$); +#163= IFCQUANTITYAREA('GrossSurfaceArea',$,$,3.32,$); +#164= IFCQUANTITYAREA('NetSurfaceArea',$,$,3.42,$); +#165= IFCQUANTITYVOLUME('GrossVolume',$,$,0.014,$); +#166= IFCQUANTITYVOLUME('NetVolume',$,$,0.013,$); +#167= IFCQUANTITYWEIGHT('GrossWeight',$,$,110.,$); +#168= IFCQUANTITYWEIGHT('NetWeight',$,$,105.,$); +#169= IFCELEMENTQUANTITY('36G4DoomPC6eMHCqPu9Jmo',$,'Qto_BeamBaseQuantities',$,$,(#160,#161,#162,#163,#164,#165,#166,#167,#168)); +#170= IFCRELAGGREGATES('3eGWapbED76Q6bjlOFNhTW',$,$,$,#121,(#146)); +#171= IFCRELCONTAINEDINSPATIALSTRUCTURE('36fRmhaSTDcubA0ab5MAXD',$,$,$,(#121),#116); +#172= IFCRELAGGREGATES('1AduRbnZ94CumUDNzT$ZFN',$,$,$,#34,(#116)); +#173= IFCRELCONTAINEDINSPATIALSTRUCTURE('1WZPOnc81FPRcMbe22sllN',$,$,$,(#77,#96,#115),#34); +#174= IFCRELASSOCIATESMATERIAL('35Fy2oXEfEhgtNcTM3RU9s',$,$,$,(#146),#147); +#175= IFCRELDEFINESBYPROPERTIES('1TwT1QB61DmR6YqW5QrRxf',$,$,$,(#121),#124); +#176= IFCRELDEFINESBYPROPERTIES('2GJAA1to10wvEjgDoD1IGM',$,$,$,(#146),#154); +#177= IFCRELDEFINESBYPROPERTIES('2nhFbBCIDFmPvEJYPLkose',$,$,$,(#146),#159); +#178= IFCRELDEFINESBYPROPERTIES('39N8yHN0DDQfuEtPnfnk3c',$,$,$,(#146),#169); +#179= IFCSTYLEDITEM(#135,(#134),$); +#180= IFCPRESENTATIONLAYERASSIGNMENT('BEAM',$,(#137),$); +#181= IFCPRESENTATIONLAYERASSIGNMENT('Grid +0',$,(#75),$); +#182= IFCPRESENTATIONLAYERASSIGNMENT('Grid +3600',$,(#94),$); +#183= IFCPRESENTATIONLAYERASSIGNMENT('Grid +7200',$,(#113),$); +ENDSEC; + +END-ISO-10303-21; diff --git a/IFCtoLBD/src/main/resources/IPE240_Custom_Revit_02.ifc b/IFCtoLBD/src/main/resources/IPE240_Custom_Revit_02.ifc new file mode 100644 index 00000000..8ce5554d --- /dev/null +++ b/IFCtoLBD/src/main/resources/IPE240_Custom_Revit_02.ifc @@ -0,0 +1,177 @@ +ISO-10303-21; +HEADER; +FILE_DESCRIPTION(('ViewDefinition [ReferenceView_V1.2]'),'2;1'); +FILE_NAME('2018_01','2024-02-13T21:32:36+01:00',(''),(''),'ODA SDAI 22.12','23.0.11.19 - Exporter 23.0.11.19 - Alternativ-UI 23.0.11.19',''); +FILE_SCHEMA(('IFC4')); +ENDSEC; + +DATA; +#1=IFCORGANIZATION($,'Autodesk Revit 2023 (DEU)',$,$,$); +#2=IFCAPPLICATION(#1,'2023','Autodesk Revit 2023 (DEU)','Revit'); +#3=IFCCARTESIANPOINT((0.,0.,0.)); +#4=IFCCARTESIANPOINT((0.,0.)); +#5=IFCDIRECTION((1.,0.,0.)); +#6=IFCDIRECTION((-1.,0.,0.)); +#7=IFCDIRECTION((0.,1.,0.)); +#8=IFCDIRECTION((0.,-1.,0.)); +#9=IFCDIRECTION((0.,0.,1.)); +#10=IFCDIRECTION((0.,0.,-1.)); +#11=IFCDIRECTION((1.,0.)); +#12=IFCDIRECTION((-1.,0.)); +#13=IFCDIRECTION((0.,1.)); +#14=IFCDIRECTION((0.,-1.)); +#15=IFCAXIS2PLACEMENT3D(#3,$,$); +#17=IFCPERSON($,'','kirnerZM79A',$,$,$,$,$); +#18=IFCORGANIZATION($,'','',$,$); +#19=IFCPERSONANDORGANIZATION(#17,#18,$); +#20=IFCOWNERHISTORY(#19,#2,$,.NOCHANGE.,$,$,$,1707855582); +#21=IFCSIUNIT(*,.LENGTHUNIT.,$,.METRE.); +#22=IFCSIUNIT(*,.AREAUNIT.,$,.SQUARE_METRE.); +#23=IFCSIUNIT(*,.VOLUMEUNIT.,$,.CUBIC_METRE.); +#24=IFCSIUNIT(*,.PLANEANGLEUNIT.,$,.RADIAN.); +#25=IFCDIMENSIONALEXPONENTS(0,0,0,0,0,0,0); +#26=IFCMEASUREWITHUNIT(IFCRATIOMEASURE(0.017453292519943278),#24); +#27=IFCCONVERSIONBASEDUNIT(#25,.PLANEANGLEUNIT.,'DEGREE',#26); +#28=IFCSIUNIT(*,.MASSUNIT.,.KILO.,.GRAM.); +#29=IFCDERIVEDUNITELEMENT(#28,1); +#30=IFCDERIVEDUNITELEMENT(#21,-3); +#31=IFCDERIVEDUNIT((#29,#30),.MASSDENSITYUNIT.,$); +#32=IFCDERIVEDUNITELEMENT(#21,4); +#33=IFCDERIVEDUNIT((#32),.MOMENTOFINERTIAUNIT.,$); +#34=IFCSIUNIT(*,.TIMEUNIT.,$,.SECOND.); +#35=IFCSIUNIT(*,.FREQUENCYUNIT.,$,.HERTZ.); +#36=IFCSIUNIT(*,.THERMODYNAMICTEMPERATUREUNIT.,$,.KELVIN.); +#37=IFCSIUNIT(*,.THERMODYNAMICTEMPERATUREUNIT.,$,.DEGREE_CELSIUS.); +#38=IFCDERIVEDUNITELEMENT(#28,1); +#39=IFCDERIVEDUNITELEMENT(#36,-1); +#40=IFCDERIVEDUNITELEMENT(#34,-3); +#41=IFCDERIVEDUNIT((#38,#39,#40),.THERMALTRANSMITTANCEUNIT.,$); +#42=IFCSIUNIT(*,.LENGTHUNIT.,.DECI.,.METRE.); +#43=IFCDERIVEDUNITELEMENT(#21,3); +#44=IFCDERIVEDUNITELEMENT(#34,-1); +#45=IFCDERIVEDUNIT((#43,#44),.VOLUMETRICFLOWRATEUNIT.,$); +#46=IFCDERIVEDUNITELEMENT(#28,1); +#47=IFCDERIVEDUNITELEMENT(#34,-1); +#48=IFCDERIVEDUNIT((#46,#47),.MASSFLOWRATEUNIT.,$); +#49=IFCDERIVEDUNITELEMENT(#34,-1); +#50=IFCDERIVEDUNIT((#49),.ROTATIONALFREQUENCYUNIT.,$); +#51=IFCSIUNIT(*,.ELECTRICCURRENTUNIT.,$,.AMPERE.); +#52=IFCSIUNIT(*,.ELECTRICVOLTAGEUNIT.,$,.VOLT.); +#53=IFCSIUNIT(*,.POWERUNIT.,$,.WATT.); +#54=IFCSIUNIT(*,.FORCEUNIT.,.KILO.,.NEWTON.); +#55=IFCSIUNIT(*,.ILLUMINANCEUNIT.,$,.LUX.); +#56=IFCSIUNIT(*,.LUMINOUSFLUXUNIT.,$,.LUMEN.); +#57=IFCSIUNIT(*,.LUMINOUSINTENSITYUNIT.,$,.CANDELA.); +#58=IFCDERIVEDUNITELEMENT(#28,-1); +#59=IFCDERIVEDUNITELEMENT(#21,-2); +#60=IFCDERIVEDUNITELEMENT(#34,3); +#61=IFCDERIVEDUNITELEMENT(#56,1); +#62=IFCDERIVEDUNIT((#58,#59,#60,#61),.USERDEFINED.,'Luminous Efficacy'); +#63=IFCDERIVEDUNITELEMENT(#28,1); +#64=IFCDERIVEDUNITELEMENT(#21,2); +#65=IFCDERIVEDUNITELEMENT(#34,-3); +#66=IFCDERIVEDUNIT((#63,#64,#65),.SOUNDPOWERUNIT.,$); +#67=IFCDERIVEDUNITELEMENT(#28,1); +#68=IFCDERIVEDUNITELEMENT(#21,-1); +#69=IFCDERIVEDUNITELEMENT(#34,-2); +#70=IFCDERIVEDUNIT((#67,#68,#69),.SOUNDPRESSUREUNIT.,$); +#71=IFCDERIVEDUNITELEMENT(#21,1); +#72=IFCDERIVEDUNITELEMENT(#34,-1); +#73=IFCDERIVEDUNIT((#71,#72),.LINEARVELOCITYUNIT.,$); +#74=IFCMONETARYUNIT('\X2\20AC\X0\'); +#75=IFCSIUNIT(*,.PRESSUREUNIT.,$,.PASCAL.); +#76=IFCDERIVEDUNITELEMENT(#21,-2); +#77=IFCDERIVEDUNITELEMENT(#28,1); +#78=IFCDERIVEDUNITELEMENT(#34,-2); +#79=IFCDERIVEDUNIT((#76,#77,#78),.USERDEFINED.,'Friction Loss'); +#80=IFCDERIVEDUNITELEMENT(#28,1); +#81=IFCDERIVEDUNITELEMENT(#21,1); +#82=IFCDERIVEDUNITELEMENT(#34,-2); +#83=IFCDERIVEDUNITELEMENT(#21,-1); +#84=IFCDERIVEDUNIT((#80,#81,#82,#83),.LINEARFORCEUNIT.,$); +#85=IFCDERIVEDUNITELEMENT(#28,1); +#86=IFCDERIVEDUNITELEMENT(#21,1); +#87=IFCDERIVEDUNITELEMENT(#34,-2); +#88=IFCDERIVEDUNITELEMENT(#21,-2); +#89=IFCDERIVEDUNIT((#85,#86,#87,#88),.PLANARFORCEUNIT.,$); +#90=IFCUNITASSIGNMENT((#21,#22,#23,#27,#28,#31,#33,#34,#35,#37,#41,#45,#48,#50,#51,#52,#53,#54,#55,#56,#57,#62,#66,#70,#73,#74,#75,#79,#84,#89)); +#91=IFCAXIS2PLACEMENT3D(#3,$,$); +#92=IFCDIRECTION((6.1230317691118863E-17,1.)); +#93=IFCGEOMETRICREPRESENTATIONCONTEXT($,'Model',3,1.0000000000000001E-05,#91,#92); +#94=IFCGEOMETRICREPRESENTATIONSUBCONTEXT('Axis','Model',*,*,*,*,#93,$,.GRAPH_VIEW.,$); +#95=IFCGEOMETRICREPRESENTATIONSUBCONTEXT('Body','Model',*,*,*,*,#93,$,.MODEL_VIEW.,$); +#96=IFCGEOMETRICREPRESENTATIONSUBCONTEXT('Box','Model',*,*,*,*,#93,$,.MODEL_VIEW.,$); +#97=IFCGEOMETRICREPRESENTATIONSUBCONTEXT('FootPrint','Model',*,*,*,*,#93,$,.MODEL_VIEW.,$); +#98=IFCPROJECT('1b$TUcs8f0zfyOlevfkQ4X',#20,'2018_01',$,$,'','Projekt Status',(#93),#90); +#99=IFCAXIS2PLACEMENT3D(#3,$,$); +#100=IFCLOCALPLACEMENT($,#99); +#101=IFCSITE('1b$TUcs8f0zfyOlevfkQ4Z',#20,'Default',$,$,#100,$,$,.ELEMENT.,(48,8,15,359802),(11,34,47,783432),0.,$,$); +#102=IFCPROPERTYSINGLEVALUE('Reference',$,IFCIDENTIFIER('Projektinformationen'),$); +#103=IFCPROPERTYSET('0tuLtzibLI1uOAWKS_Xsha',#20,'Pset_SiteCommon',$,(#102)); +#104=IFCRELDEFINESBYPROPERTIES('0hurV8ngH3ZfIYqmNqE7ZY',#20,$,$,(#101),#103); +#105=IFCAXIS2PLACEMENT3D(#3,$,$); +#107=IFCCARTESIANPOINTLIST2D(((-0.11999999999999937,-0.060000000000000067),(-0.1102000000000001,-0.060000000000000067),(-0.11020000000000009,-0.018099999999999995),(-0.10580660171779836,-0.0074933982822017776),(-0.095200000000000173,-0.0030999999999999617),(0.095199999999999646,-0.0030999999999999635),(0.10580660171779786,-0.0074933982822017117),(0.1101999999999997,-0.018099999999999977),(0.1101999999999997,-0.060000000000000067),(0.12000000000000054,-0.060000000000000067),(0.12000000000000054,0.060000000000000137),(0.1101999999999997,0.060000000000000137),(0.11019999999999971,0.018100000000000303),(0.10580660171779802,0.0074933982822020101),(0.095199999999999715,0.0031000000000001179),(-0.095199999999999868,0.0031000000000001161),(-0.10580660171779818,0.0074933982822017646),(-0.1102000000000001,0.018100000000000092),(-0.1102000000000001,0.059999999999999623),(-0.11999999999999937,0.059999999999999623))); +#108=IFCINDEXEDPOLYCURVE(#107,(IFCLINEINDEX((1,2,3)),IFCARCINDEX((3,4,5)),IFCLINEINDEX((5,6)),IFCARCINDEX((6,7,8)),IFCLINEINDEX((8,9,10,11,12,13)),IFCARCINDEX((13,14,15)),IFCLINEINDEX((15,16)),IFCARCINDEX((16,17,18)),IFCLINEINDEX((18,19,20,1))),.F.); +#109=IFCARBITRARYCLOSEDPROFILEDEF(.AREA.,'IPE 240',#108); +#110=IFCCARTESIANPOINT((-1.7999999999999996,0.,0.)); +#111=IFCAXIS2PLACEMENT3D(#110,#5,#10); +#112=IFCEXTRUDEDAREASOLID(#109,#111,#9,3.6000000000000001); +#113=IFCCOLOURRGB($,0.62352941176470589,0.62352941176470589,0.62352941176470589); +#114=IFCSURFACESTYLERENDERING(#113,0.,$,$,$,$,IFCNORMALISEDRATIOMEASURE(0.5),IFCSPECULAREXPONENT(64.),.NOTDEFINED.); +#115=IFCSURFACESTYLE('Metall - Baustahl S235',.BOTH.,(#114)); +#116=IFCSTYLEDITEM(#112,(#115),$); +#117=IFCSHAPEREPRESENTATION(#95,'Body','SweptSolid',(#112)); +#118=IFCCARTESIANPOINTLIST3D(((-1.8,0.,0.12000000000000367),(1.8,0.,0.12000000000000367))); +#119=IFCINDEXEDPOLYCURVE(#118,$,.F.); +#120=IFCSHAPEREPRESENTATION(#94,'Axis','Curve3D',(#119)); +#121=IFCAXIS2PLACEMENT3D(#3,$,$); +#122=IFCREPRESENTATIONMAP(#121,#117); +#123=IFCAXIS2PLACEMENT3D(#3,$,$); +#124=IFCREPRESENTATIONMAP(#123,#120); +#125=IFCBEAMTYPE('15DVlEIqP5GhHwjG8CHwA7',#20,'IPE Tr\X\E4ger:IPE 240',$,$,(#163),(#122,#124),'2497964',$,.BEAM.); +#126=IFCMATERIAL('Metall - Baustahl S235',$,'Metall'); +#127=IFCCLASSIFICATION('https://www.csiresources.org/standards/uniformat','1998',$,'Uniformat',$,$,$); +#128=IFCCARTESIANTRANSFORMATIONOPERATOR3D($,$,#3,1.,$); +#129=IFCMAPPEDITEM(#122,#128); +#130=IFCSHAPEREPRESENTATION(#95,'Body','MappedRepresentation',(#129)); +#131=IFCMAPPEDITEM(#124,#128); +#132=IFCSHAPEREPRESENTATION(#94,'Axis','MappedRepresentation',(#131)); +#133=IFCPRODUCTDEFINITIONSHAPE($,$,(#130,#132)); +#134=IFCCARTESIANPOINT((1.8,0.,-0.12000000000000367)); +#135=IFCAXIS2PLACEMENT3D(#134,$,$); +#136=IFCLOCALPLACEMENT(#100,#135); +#137=IFCBEAM('15DVlEIqP5GhHwjG8CHwBa',#20,'IPE Tr\X\E4ger:IPE 240:2497999',$,'IPE Tr\X\E4ger:IPE 240',#136,#133,'2497999',.BEAM.); +#138=IFCPROPERTYSINGLEVALUE('Reference',$,IFCIDENTIFIER('IPE 240'),$); +#139=IFCPROPERTYSINGLEVALUE('Span',$,IFCPOSITIVELENGTHMEASURE(3.6000000000000001),$); +#140=IFCPROPERTYSINGLEVALUE('Slope',$,IFCPLANEANGLEMEASURE(0.),$); +#141=IFCPROPERTYSINGLEVALUE('Roll',$,IFCPLANEANGLEMEASURE(0.),$); +#142=IFCPROPERTYSINGLEVALUE('IsExternal',$,IFCBOOLEAN(.F.),$); +#143=IFCPROPERTYSINGLEVALUE('LoadBearing',$,IFCBOOLEAN(.T.),$); +#144=IFCPROPERTYSET('2vPo0NAhjFIDqKaX41dEMs',#20,'Pset_BeamCommon',$,(#138,#139,#140,#141,#142,#143)); +#145=IFCPROPERTYSET('1I_hDM5tKCYvKYCBp7dVc2',#20,'Pset_EnvironmentalImpactIndicators',$,(#138)); +#146=IFCPROPERTYSINGLEVALUE('Reference',$,IFCLABEL('IPE 240'),$); +#147=IFCPROPERTYSET('1Cf0L78zSthL2kqbHF45V_',#20,'Pset_ReinforcementBarPitchOfBeam',$,(#146)); +#148=IFCPROPERTYSINGLEVALUE('ElementWeight',$,IFCREAL(110.),$); +#149=IFCPROPERTYSET('2SOC9OwOl$4ABTyNQLKMU$',#20,'PSet_RevitCustom','',(#148)); +#150=IFCRELDEFINESBYPROPERTIES('3MhcHeU4T5rRhFnEafl1$1',#20,$,$,(#137),#144); +#151=IFCRELDEFINESBYPROPERTIES('10EvFxUk94_RimhLxamPGv',#20,$,$,(#137),#145); +#152=IFCRELDEFINESBYPROPERTIES('3sZwqzFVHA$uiDOgLqUATS',#20,$,$,(#137),#147); +#153=IFCRELDEFINESBYPROPERTIES('0jtlqxGSL5QPWAOoMcoMe8',#20,$,$,(#137),#149); +#154=IFCQUANTITYLENGTH('Length','',$,3.6000000000000001,$); +#155=IFCQUANTITYAREA('CrossSectionArea','',$,0.0039117739946454974,$); +#156=IFCQUANTITYAREA('OuterSurfaceArea','',$,3.3186520065876963,$); +#157=IFCQUANTITYAREA('GrossSurfaceArea','',$,3.3264755545769873,$); +#158=IFCQUANTITYAREA('NetSurfaceArea','',$,3.3264755545769873,$); +#159=IFCQUANTITYVOLUME('GrossVolume','',$,0.014082386380723792,$); +#160=IFCQUANTITYVOLUME('NetVolume','',$,0.014081939531990184,$); +#161=IFCELEMENTQUANTITY('30NRxV051ABO_VihwsCtji',#20,'Qto_BeamBaseQuantities',$,$,(#154,#155,#156,#157,#158,#159,#160)); +#162=IFCRELDEFINESBYPROPERTIES('2SM4T6DQP8dOHcX2rJOntx',#20,$,$,(#137),#161); +#163=IFCPROPERTYSET('2RYG9exiNNCdTtma0U_vG2',#20,'Pset_BeamCommon',$,(#142,#143)); +#164=IFCRELCONTAINEDINSPATIALSTRUCTURE('3ArnKS23b6KfTZD99LuN09',#20,$,$,(#137),#101); +#165=IFCRELAGGREGATES('0Rz1s1qhf1AwJiBp4MEGbg',#20,$,$,#98,(#101)); +#166=IFCRELASSOCIATESMATERIAL('0HJNetB116Pwr9cdo6PTfC',#20,$,$,(#125,#137),#126); +#167=IFCRELDEFINESBYTYPE('3GbXoEe3HFgf2vbwYOqdMj',#20,$,$,(#137),#125); +#168=IFCPRESENTATIONLAYERASSIGNMENT('S-BEAM-____-OTLN',$,(#117,#120,#130,#132),$); +ENDSEC; + +END-ISO-10303-21; \ No newline at end of file diff --git a/IFCtoLBD/src/test/java/org/linkedbuildingdata/ifc2lbd/ConverterRunsUnitTests.java b/IFCtoLBD/src/test/java/org/linkedbuildingdata/ifc2lbd/ConverterRunsUnitTests.java index 80e3c999..b510982f 100644 --- a/IFCtoLBD/src/test/java/org/linkedbuildingdata/ifc2lbd/ConverterRunsUnitTests.java +++ b/IFCtoLBD/src/test/java/org/linkedbuildingdata/ifc2lbd/ConverterRunsUnitTests.java @@ -683,6 +683,7 @@ public void testConversionExample3() { static final boolean hasPerformanceBoost = false; static final boolean hasBoundingBoxWKT = true; + static final boolean hasInterfaces = false; @DisplayName("Test Example 4") @Test @@ -730,10 +731,10 @@ public void testTwoPhases() { try (IFCtoLBDConverter converter = new IFCtoLBDConverter("https://example.com/", hasPropertiesBlankNodes, props_level);) { converter.convert_read_in_phase(ifc_file.getAbsolutePath(), null, hasGeometry, hasPerformanceBoost, - exportIfcOWL, hasBuildingElements, hasBuildingProperties, hasBoundingBoxWKT, hasUnits); + exportIfcOWL, hasBuildingElements, hasBuildingProperties, hasBoundingBoxWKT, hasUnits,hasInterfaces); Model m3nb1 = converter.convert_LBD_phase(hasBuildingElements, hasSeparateBuildingElementsModel, hasBuildingProperties, hasSeparatePropertiesModel, hasGeolocation, hasGeometry, exportIfcOWL, - hasUnits, hasBoundingBoxWKT, true); + hasUnits, hasBoundingBoxWKT, true,hasInterfaces); ImmutableList subjectList51 = ImmutableList.copyOf(m3nb1.listSubjects()); @@ -746,13 +747,13 @@ public void testTwoPhases() { try (IFCtoLBDConverter converter = new IFCtoLBDConverter("https://example.com/", hasPropertiesBlankNodes, props_level);) { converter.convert_read_in_phase(ifc_file.getAbsolutePath(), null, hasGeometry, hasPerformanceBoost, - exportIfcOWL, hasBuildingElements, hasBuildingProperties, hasBoundingBoxWKT, hasUnits); + exportIfcOWL, hasBuildingElements, hasBuildingProperties, hasBoundingBoxWKT, hasUnits,hasInterfaces); converter.convert_read_in_phase(ifc_file.getAbsolutePath(), null, hasGeometry, hasPerformanceBoost, - exportIfcOWL, hasBuildingElements, hasBuildingProperties, hasBoundingBoxWKT, hasUnits); + exportIfcOWL, hasBuildingElements, hasBuildingProperties, hasBoundingBoxWKT, hasUnits,hasInterfaces); Model m3nb1 = converter.convert_LBD_phase(hasBuildingElements, hasSeparateBuildingElementsModel, hasBuildingProperties, hasSeparatePropertiesModel, hasGeolocation, hasGeometry, exportIfcOWL, - hasUnits, hasBoundingBoxWKT, true); + hasUnits, hasBoundingBoxWKT, true,hasInterfaces); ImmutableList subjectList51 = ImmutableList.copyOf(m3nb1.listSubjects()); @@ -782,7 +783,7 @@ public void testTwoPhasesTypes() { try (IFCtoLBDConverter converter = new IFCtoLBDConverter("https://example.com/", hasPropertiesBlankNodes, props_level);) { converter.convert_read_in_phase(ifc_file.getAbsolutePath(), null, hasGeometry, hasPerformanceBoost, - exportIfcOWL, hasBuildingElements, hasBuildingProperties, hasBoundingBoxWKT, hasUnits); + exportIfcOWL, hasBuildingElements, hasBuildingProperties, hasBoundingBoxWKT, hasUnits,hasInterfaces); Set element_types = converter.getElementTypes(); if (element_types.size() != 13) { System.out.println("Element type count should be 13. Was: " + element_types.size()); @@ -810,7 +811,7 @@ public void testTwoPhasesPsets() { try (IFCtoLBDConverter converter = new IFCtoLBDConverter("https://example.com/", hasPropertiesBlankNodes, props_level);) { converter.convert_read_in_phase(ifc_file.getAbsolutePath(), null, hasGeometry, hasPerformanceBoost, - exportIfcOWL, hasBuildingElements, hasBuildingProperties, hasBoundingBoxWKT, hasUnits); + exportIfcOWL, hasBuildingElements, hasBuildingProperties, hasBoundingBoxWKT, hasUnits,hasInterfaces); Map psets = converter.getPropertysets(); if (psets.size() != 1480) { @@ -846,10 +847,10 @@ public void testOntologicalValidity1() { try (IFCtoLBDConverter converter = new IFCtoLBDConverter("https://example.com/", hasPropertiesBlankNodes, props_level);) { converter.convert_read_in_phase(ifc_file.getAbsolutePath(), null, hasGeometry, hasPerformanceBoost, - exportIfcOWL, hasBuildingElements, hasBuildingProperties, hasBoundingBoxWKT, hasUnits); + exportIfcOWL, hasBuildingElements, hasBuildingProperties, hasBoundingBoxWKT, hasUnits,hasInterfaces); Model m3nb1 = converter.convert_LBD_phase(hasBuildingElements, hasSeparateBuildingElementsModel, hasBuildingProperties, hasSeparatePropertiesModel, hasGeolocation, hasGeometry, exportIfcOWL, - hasUnits, hasBoundingBoxWKT, true); + hasUnits, hasBoundingBoxWKT, true,hasInterfaces); OntModel infModel = ModelFactory.createOntologyModel(OntModelSpec.OWL_DL_MEM_RDFS_INF); infModel.add(converter.getOntology_model()); @@ -883,11 +884,11 @@ public void testOntologicalNSValidity() { try (IFCtoLBDConverter converter = new IFCtoLBDConverter("https://example.com/", hasPropertiesBlankNodes, props_level);) { converter.convert_read_in_phase(ifc_file.getAbsolutePath(), null, hasGeometry, hasPerformanceBoost, - exportIfcOWL, hasBuildingElements, hasBuildingProperties, hasBoundingBoxWKT, hasUnits); + exportIfcOWL, hasBuildingElements, hasBuildingProperties, hasBoundingBoxWKT, hasUnits,hasInterfaces); Model m = converter.convert_LBD_phase(hasBuildingElements, hasSeparateBuildingElementsModel, hasBuildingProperties, hasSeparatePropertiesModel, hasGeolocation, hasGeometry, exportIfcOWL, - hasUnits, hasBoundingBoxWKT, true); + hasUnits, hasBoundingBoxWKT, true,hasInterfaces); Set subs = m.listSubjects().toSet(); Set nss = m.listNameSpaces().toSet(); @@ -927,7 +928,7 @@ public void testTypeSelection() { try (IFCtoLBDConverter converter = new IFCtoLBDConverter("https://example.com/", hasPropertiesBlankNodes, props_level);) { converter.convert_read_in_phase(ifc_file.getAbsolutePath(), null, hasGeometry, hasPerformanceBoost, - exportIfcOWL, hasBuildingElements, hasBuildingProperties, hasBoundingBoxWKT, hasUnits); + exportIfcOWL, hasBuildingElements, hasBuildingProperties, hasBoundingBoxWKT, hasUnits,hasInterfaces); Set types = new HashSet<>(); types.add("Wall"); @@ -935,7 +936,7 @@ public void testTypeSelection() { Model m = converter.convert_LBD_phase(hasBuildingElements, hasSeparateBuildingElementsModel, hasBuildingProperties, hasSeparatePropertiesModel, hasGeolocation, hasGeometry, exportIfcOWL, - hasUnits, hasBoundingBoxWKT, true); + hasUnits, hasBoundingBoxWKT, true,hasInterfaces); ImmutableList subjectList1 = ImmutableList.copyOf(m.listSubjects()); if (subjectList1.size() == 581) { @@ -1058,7 +1059,7 @@ public void testTypesPsets() { try (IFCtoLBDConverter converter = new IFCtoLBDConverter("https://example.com/", hasPropertiesBlankNodes, props_level);) { converter.convert_read_in_phase(ifc_file.getAbsolutePath(), null, hasGeometry, hasPerformanceBoost, - exportIfcOWL, hasBuildingElements, hasBuildingProperties, hasBoundingBoxWKT, hasUnits); + exportIfcOWL, hasBuildingElements, hasBuildingProperties, hasBoundingBoxWKT, hasUnits,hasInterfaces); if (converter.getElementTypes().size() != 13) { System.out.println( @@ -1093,11 +1094,11 @@ public void testOntologyNSValidity2() { try (IFCtoLBDConverter converter = new IFCtoLBDConverter("https://example.com/", hasPropertiesBlankNodes, props_level);) { converter.convert_read_in_phase(ifc_file.getAbsolutePath(), null, hasGeometry, hasPerformanceBoost, - exportIfcOWL, hasBuildingElements, hasBuildingProperties, hasBoundingBoxWKT, hasUnits); + exportIfcOWL, hasBuildingElements, hasBuildingProperties, hasBoundingBoxWKT, hasUnits,hasInterfaces); Model m = converter.convert_LBD_phase(hasBuildingElements, hasSeparateBuildingElementsModel, hasBuildingProperties, hasSeparatePropertiesModel, hasGeolocation, hasGeometry, exportIfcOWL, - hasUnits, hasBoundingBoxWKT, true); + hasUnits, hasBoundingBoxWKT, true,hasInterfaces); Set nss = m.listNameSpaces().toSet(); for (String ns : nss) { @@ -1177,12 +1178,12 @@ public void testSimplifiedAttributes() { try (IFCtoLBDConverter converter1 = new IFCtoLBDConverter("https://lbd.org/", false, 1);) { converter1.convert_read_in_phase(ifc_file.getAbsolutePath(), null, local_hasGeometry, hasPerformanceBoost, - exportIfcOWL, hasBuildingElements, hasBuildingProperties, local_hasGeometry, hasUnits); + exportIfcOWL, hasBuildingElements, hasBuildingProperties, local_hasGeometry, hasUnits,hasInterfaces); converter1.setHasSimplified_properties(true); Model model_level1 = converter1.convert_LBD_phase(hasBuildingElements, hasSeparateBuildingElementsModel, hasBuildingProperties, hasSeparatePropertiesModel, - hasGeolocation, local_hasGeometry, exportIfcOWL, hasUnits, local_hasGeometry, true); + hasGeolocation, local_hasGeometry, exportIfcOWL, hasUnits, local_hasGeometry, true,hasInterfaces); ImmutableList subjectList1 = ImmutableList.copyOf(model_level1.listSubjects()); if (subjectList1.size() != 842) { diff --git a/IFCtoLBD_Desktop_2023/src/license/THIRD-PARTY.properties b/IFCtoLBD_Desktop_2023/src/license/THIRD-PARTY.properties index b2f8030d..ac9ab24b 100644 --- a/IFCtoLBD_Desktop_2023/src/license/THIRD-PARTY.properties +++ b/IFCtoLBD_Desktop_2023/src/license/THIRD-PARTY.properties @@ -54,5 +54,5 @@ # Please fill the missing licenses for dependencies : # # -#Wed Aug 28 19:16:56 CEST 2024 +#Wed Sep 18 18:44:11 CEST 2024 gnu.getopt--java-getopt--1.0.13= diff --git a/IFCtoLBD_Desktop_2023/src/main/java/org/linkedbuildingdata/ifc2lbd/desktop/ConversionThread.java b/IFCtoLBD_Desktop_2023/src/main/java/org/linkedbuildingdata/ifc2lbd/desktop/ConversionThread.java index 93248e59..c3246d95 100644 --- a/IFCtoLBD_Desktop_2023/src/main/java/org/linkedbuildingdata/ifc2lbd/desktop/ConversionThread.java +++ b/IFCtoLBD_Desktop_2023/src/main/java/org/linkedbuildingdata/ifc2lbd/desktop/ConversionThread.java @@ -63,9 +63,10 @@ public class ConversionThread implements Callable { final boolean hasHierarchicalNaming; final boolean hasIfc_based_elements; - + final boolean hasInterfaces; + //TODO Check this - public ConversionThread(IFCtoLBDConverter converter,Set selected_types,Set selected_psets, @SuppressWarnings("unused") String ifc_filename, @SuppressWarnings("unused") String uriBase, @SuppressWarnings("unused") String target_file,int props_level,boolean hasBuildingElements, boolean hasSeparateBuildingElementsModel, boolean hasBuildingProperties,boolean hasSeparatePropertiesModel,boolean hasPropertiesBlankNodes, boolean hasGeolocation,boolean hasGeometry,boolean exportIfcOWL,boolean hasUnits,boolean hasPerformanceBoost,boolean hasBoundingBoxWKT,boolean hasHierarchicalNaming,boolean hasIfc_based_elements) { + public ConversionThread(IFCtoLBDConverter converter,Set selected_types,Set selected_psets, @SuppressWarnings("unused") String ifc_filename, @SuppressWarnings("unused") String uriBase, @SuppressWarnings("unused") String target_file,int props_level,boolean hasBuildingElements, boolean hasSeparateBuildingElementsModel, boolean hasBuildingProperties,boolean hasSeparatePropertiesModel,boolean hasPropertiesBlankNodes, boolean hasGeolocation,boolean hasGeometry,boolean exportIfcOWL,boolean hasUnits,boolean hasPerformanceBoost,boolean hasBoundingBoxWKT,boolean hasHierarchicalNaming,boolean hasIfc_based_elements,boolean hasInterfaces) { super(); this.converter=converter; this.selected_types=selected_types; @@ -88,6 +89,7 @@ public ConversionThread(IFCtoLBDConverter converter,Set selected_types,S this.hasBoundingBoxWKT=hasBoundingBoxWKT; this.hasHierarchicalNaming=hasHierarchicalNaming; this.hasIfc_based_elements=hasIfc_based_elements; + this.hasInterfaces=hasInterfaces; } @Override @@ -99,7 +101,7 @@ public Integer call() throws Exception { converter.setHasNonLBDElement(hasIfc_based_elements); converter.convert_LBD_phase(hasBuildingElements, hasSeparateBuildingElementsModel, hasBuildingProperties, hasSeparatePropertiesModel, - hasGeolocation, hasGeometry, exportIfcOWL, hasUnits, hasBoundingBoxWKT, hasHierarchicalNaming); + hasGeolocation, hasGeometry, exportIfcOWL, hasUnits, hasBoundingBoxWKT, hasHierarchicalNaming,hasInterfaces); } catch (OutOfMemoryError e) { e.printStackTrace(); eventBus.post(new IFCtoLBD_SystemStatusEvent(e.getMessage())); diff --git a/IFCtoLBD_Desktop_2023/src/main/java/org/linkedbuildingdata/ifc2lbd/desktop/IFCtoLBD.fxml b/IFCtoLBD_Desktop_2023/src/main/java/org/linkedbuildingdata/ifc2lbd/desktop/IFCtoLBD.fxml index efabe464..6af0b88a 100644 --- a/IFCtoLBD_Desktop_2023/src/main/java/org/linkedbuildingdata/ifc2lbd/desktop/IFCtoLBD.fxml +++ b/IFCtoLBD_Desktop_2023/src/main/java/org/linkedbuildingdata/ifc2lbd/desktop/IFCtoLBD.fxml @@ -245,7 +245,7 @@ - + @@ -275,12 +275,17 @@ - + - + + + + + + diff --git a/IFCtoLBD_Desktop_2023/src/main/java/org/linkedbuildingdata/ifc2lbd/desktop/IFCtoLBDController.java b/IFCtoLBD_Desktop_2023/src/main/java/org/linkedbuildingdata/ifc2lbd/desktop/IFCtoLBDController.java index e88de4bf..bd4354e4 100644 --- a/IFCtoLBD_Desktop_2023/src/main/java/org/linkedbuildingdata/ifc2lbd/desktop/IFCtoLBDController.java +++ b/IFCtoLBD_Desktop_2023/src/main/java/org/linkedbuildingdata/ifc2lbd/desktop/IFCtoLBDController.java @@ -168,6 +168,10 @@ public class IFCtoLBDController implements Initializable, FxInterface { @FXML private ToggleSwitch geometry_elements; + @FXML + private ToggleSwitch geometry_interfaces; + + @FXML private ToggleSwitch hasBoundingBox_WKT; @@ -429,6 +433,8 @@ private void readInIFC_execute() { this.prefs.put("lbd_props_base_url", this.labelBaseURI.getText()); this.prefs.putBoolean("lbd_boundinbox_elements", this.geometry_elements.isSelected()); + this.prefs.putBoolean("lbd_boundinbox_interfaces", this.geometry_interfaces.isSelected()); + this.prefs.putBoolean("lbd_ifcOWL_elements", this.ifcOWL_elements.isSelected()); this.prefs.putBoolean("lbd_createUnits", this.createUnits.isSelected()); @@ -453,7 +459,7 @@ private void readInIFC_execute() { this.building_props_separate_file.isSelected(), this.building_props_blank_nodes.isSelected(), this.geolocation.isSelected(), this.geometry_elements.isSelected(), this.ifcOWL_elements.isSelected(), this.ifcOWL_elements.isSelected(), - this.hasPerformanceBoost.isSelected(), this.hasBoundingBox_WKT.isSelected())); + this.hasPerformanceBoost.isSelected(), this.hasBoundingBox_WKT.isSelected(),this.geometry_interfaces.isSelected())); } catch (Exception e) { Platform.runLater(() -> this.conversionTxt.appendText(e.getMessage())); } @@ -490,6 +496,7 @@ private void convertIFCToRDF() { this.prefs.put("lbd_props_base_url", this.labelBaseURI.getText()); this.prefs.putBoolean("lbd_boundinbox_elements", this.geometry_elements.isSelected()); + this.prefs.putBoolean("lbd_boundinbox_interfaces", this.geometry_interfaces.isSelected()); this.prefs.putBoolean("lbd_ifcOWL_elements", this.ifcOWL_elements.isSelected()); this.prefs.putBoolean("lbd_createUnits", this.createUnits.isSelected()); this.prefs.putBoolean("lbd_geolocation", this.geolocation.isSelected()); @@ -534,7 +541,7 @@ private void convertIFCToRDF() { this.building_props.isSelected(), this.building_props_separate_file.isSelected(), this.building_props_blank_nodes.isSelected(), this.geolocation.isSelected(), this.geometry_elements.isSelected(), this.ifcOWL_elements.isSelected(), this.ifcOWL_elements.isSelected(), this.hasPerformanceBoost.isSelected(), - this.hasBoundingBox_WKT.isSelected(), this.hasHierarchicalNaming.isSelected(),this.ifc_based_elements .isSelected())); + this.hasBoundingBox_WKT.isSelected(), this.hasHierarchicalNaming.isSelected(),this.ifc_based_elements .isSelected(),this.geometry_interfaces.isSelected())); } catch (Exception e) { Platform.runLater(() -> this.conversionTxt.appendText(e.getMessage())); } @@ -648,6 +655,7 @@ public void handle(DragEvent event) { this.building_props_separate_file.setSelected(this.prefs.getBoolean("lbd_building_props_separate_file", false)); this.geometry_elements.setSelected(this.prefs.getBoolean("lbd_boundinbox_elements", true)); + this.geometry_interfaces.setSelected(this.prefs.getBoolean("lbd_boundinbox_interfaces", false)); this.ifcOWL_elements.setSelected(this.prefs.getBoolean("lbd_ifcOWL_elements", false)); this.createUnits.setSelected(this.prefs.getBoolean("lbd_createUnits", false)); this.geolocation.setSelected(this.prefs.getBoolean("lbd_geolocation", true)); diff --git a/IFCtoLBD_Desktop_2023/src/main/java/org/linkedbuildingdata/ifc2lbd/desktop/ReadinInThread.java b/IFCtoLBD_Desktop_2023/src/main/java/org/linkedbuildingdata/ifc2lbd/desktop/ReadinInThread.java index d8f0f04f..8273dac3 100644 --- a/IFCtoLBD_Desktop_2023/src/main/java/org/linkedbuildingdata/ifc2lbd/desktop/ReadinInThread.java +++ b/IFCtoLBD_Desktop_2023/src/main/java/org/linkedbuildingdata/ifc2lbd/desktop/ReadinInThread.java @@ -55,10 +55,10 @@ public class ReadinInThread implements Callable { final boolean hasPerformanceBoost; final boolean hasBoundingBoxWKT; - + final boolean hasInterfaces; //TODO Check this - public ReadinInThread(String ifc_filename, String uriBase, String target_file,int props_level,@SuppressWarnings("unused") boolean hasBuildingElements, boolean hasSeparateBuildingElementsModel, @SuppressWarnings("unused") boolean hasBuildingProperties,boolean hasSeparatePropertiesModel,boolean hasPropertiesBlankNodes, boolean hasGeolocation,boolean hasGeometry,boolean exportIfcOWL,boolean hasUnits,boolean hasPerformanceBoost,boolean hasBoundingBoxWKT) { + public ReadinInThread(String ifc_filename, String uriBase, String target_file,int props_level,@SuppressWarnings("unused") boolean hasBuildingElements, boolean hasSeparateBuildingElementsModel, @SuppressWarnings("unused") boolean hasBuildingProperties,boolean hasSeparatePropertiesModel,boolean hasPropertiesBlankNodes, boolean hasGeolocation,boolean hasGeometry,boolean exportIfcOWL,boolean hasUnits,boolean hasPerformanceBoost,boolean hasBoundingBoxWKT,boolean hasInterfaces) { super(); this.ifc_filename = ifc_filename; this.uriBase = uriBase; @@ -76,7 +76,7 @@ public ReadinInThread(String ifc_filename, String uriBase, String target_file,in this.hasUnits=hasUnits; this.hasPerformanceBoost=hasPerformanceBoost; this.hasBoundingBoxWKT=hasBoundingBoxWKT; - + this.hasInterfaces=hasInterfaces; } @Override @@ -85,7 +85,7 @@ public IFCtoLBDConverter call() throws Exception { IFCtoLBDConverter c1nb; try { c1nb = new IFCtoLBDConverter(this.uriBase, false, this.props_level); - c1nb.convert_read_in_phase(this.ifc_filename,this.target_file, this.hasGeometry,this.hasPerformanceBoost,this.exportIfcOWL,this.hasBuildingElements,this.hasBuildingProperties,this.hasBoundingBoxWKT,this.hasUnits); + c1nb.convert_read_in_phase(this.ifc_filename,this.target_file, this.hasGeometry,this.hasPerformanceBoost,this.exportIfcOWL,this.hasBuildingElements,this.hasBuildingProperties,this.hasBoundingBoxWKT,this.hasUnits,this.hasInterfaces); } catch (OutOfMemoryError e) { e.printStackTrace(); diff --git a/IFCtoLBD_Desktop_2023/src/main/resources/org/linkedbuildingdata/ifc2lbd/desktop/IFCtoLBD.fxml b/IFCtoLBD_Desktop_2023/src/main/resources/org/linkedbuildingdata/ifc2lbd/desktop/IFCtoLBD.fxml index efabe464..6af0b88a 100644 --- a/IFCtoLBD_Desktop_2023/src/main/resources/org/linkedbuildingdata/ifc2lbd/desktop/IFCtoLBD.fxml +++ b/IFCtoLBD_Desktop_2023/src/main/resources/org/linkedbuildingdata/ifc2lbd/desktop/IFCtoLBD.fxml @@ -245,7 +245,7 @@ - + @@ -275,12 +275,17 @@ - + - + + + + + + diff --git a/IFCtoLBD_OpenAPI/.settings/org.eclipse.wst.common.component b/IFCtoLBD_OpenAPI/.settings/org.eclipse.wst.common.component index fdaeb62c..991bd39b 100644 --- a/IFCtoLBD_OpenAPI/.settings/org.eclipse.wst.common.component +++ b/IFCtoLBD_OpenAPI/.settings/org.eclipse.wst.common.component @@ -1,5 +1,6 @@ - + + @@ -42,7 +43,8 @@ - + + @@ -85,7 +87,8 @@ - + + @@ -128,7 +131,8 @@ - + + @@ -171,16 +175,8 @@ - - uses - - - uses - - - uses - - + + @@ -223,7 +219,8 @@ - + + @@ -266,7 +263,8 @@ - + + @@ -309,7 +307,8 @@ - + +