示例#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++;
       out.println("Step 3: Port= " + relevantPortsFound + "DistributionPort = " + name);
       step4((IfcDistributionPort) distributionPort);
     }
   }
   if (originalPortsFound != 1) {
     out.println("Step3: originalPortsFound != 1");
   }
   if (relevantPortsFound != 1) {
     out.println("Step3: relevantPortsFound != 1");
   }
 }
示例#2
0
 private void step4(IfcDistributionPort distributionPort) {
   IfcPort relatingPort = distributionPort.getConnectedFrom().get(0).getRelatingPort();
   out.println("Step 4: RelatingDistributionPort = " + relatingPort.getName());
   step5((IfcDistributionPort) relatingPort);
 }