コード例 #1
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");
   }
 }
コード例 #2
0
 private void step4(IfcDistributionPort distributionPort) {
   IfcPort relatingPort = distributionPort.getConnectedFrom().get(0).getRelatingPort();
   LOGGER.info("Step 4: RelatingDistributionPort = " + relatingPort.getName());
   step5((IfcDistributionPort) relatingPort);
 }