예제 #1
0
 private void step5(IfcDistributionPort distributionPort) {
   IfcElement unknown = distributionPort.getContainedIn().getRelatedElement();
   String name = unknown.getName();
   if (unknown instanceof IfcFlowSegment) {
     LOGGER.info("Step 5: FlowSegment = " + name);
     step3(unknown, distributionPort);
   } else if (unknown instanceof IfcFlowFitting) {
     LOGGER.info("Step 5: FlowFitting = " + name);
     step6((IfcFlowFitting) unknown, distributionPort);
   } else if (unknown instanceof IfcFlowTerminal) {
     LOGGER.info("Step 5: Endpoint (terminal) = " + name);
   } else {
     LOGGER.info("Step5: Incorrect entity found");
   }
 }
예제 #2
0
 private Door createDoor(IfcElement ifcRelatedBuildingElement) throws SerializerException {
   IfcDoor ifcDoor = (IfcDoor) ifcRelatedBuildingElement;
   Door door = new Door();
   setName(door.getName(), ifcRelatedBuildingElement.getName());
   setGlobalId(door, ifcRelatedBuildingElement);
   MultiSurfaceProperty doorMSP = new MultiSurfaceProperty();
   MultiSurface doorMs = new MultiSurface();
   doorMSP.setMultiSurface(doorMs);
   door.setLod4MultiSurface(doorMSP);
   setGeometry(doorMs, ifcRelatedBuildingElement);
   DoubleAttribute genericAttributeWidth = new DoubleAttribute();
   genericAttributeWidth.setName("OverallWidth");
   genericAttributeWidth.setValue((double) ifcDoor.getOverallWidth());
   door.addGenericAttribute(genericAttributeWidth);
   DoubleAttribute genericAttributeHeight = new DoubleAttribute();
   genericAttributeHeight.setValue((double) ifcDoor.getOverallHeight());
   genericAttributeHeight.setName("OverallHeight");
   door.addGenericAttribute(genericAttributeHeight);
   return door;
 }
예제 #3
0
 private void step3(IfcElement relatedElement, IfcDistributionPort originaldistributionPort) {
   int originalPortsFound = 0;
   int relevantPortsFound = 0;
   for (IfcRelConnectsPortToElement ifcRelConnectsPortToElement : relatedElement.getHasPorts()) {
     IfcPort distributionPort = ifcRelConnectsPortToElement.getRelatingPort();
     if (distributionPort == originaldistributionPort) {
       originalPortsFound++;
     } else {
       String name = distributionPort.getName();
       relevantPortsFound++;
       LOGGER.info("Step 3: Port= " + relevantPortsFound + "DistributionPort = " + name);
       step4((IfcDistributionPort) distributionPort);
     }
   }
   if (originalPortsFound != 1) {
     LOGGER.info("Step3: originalPortsFound != 1");
   }
   if (relevantPortsFound != 1) {
     LOGGER.info("Step3: relevantPortsFound != 1");
   }
 }
예제 #4
0
 private void step2(IfcDistributionPort distributionPort) {
   IfcElement relatedElement = distributionPort.getContainedIn().getRelatedElement();
   LOGGER.info("Step 2: FlowSegment = " + relatedElement.getName());
   step3(relatedElement, distributionPort);
 }