private void convertSlab(Building building, Room room, IfcSlab ifcSlab)
     throws SerializerException {
   if (!convertedObjects.containsKey(ifcSlab)) {
     if (ifcSlab.getPredefinedType() == IfcSlabTypeEnum.ROOF) {
       RoofSurface roofSurface = createRoof(building, ifcSlab);
       convertedObjects.put(ifcSlab, roofSurface);
     } else if (ifcSlab.getPredefinedType() == IfcSlabTypeEnum.FLOOR
         || ifcSlab.getPredefinedType() == IfcSlabTypeEnum.BASESLAB
         || ifcSlab.getPredefinedType() == IfcSlabTypeEnum.LANDING
         || ifcSlab.getPredefinedType() == IfcSlabTypeEnum.NULL) {
       FloorSurface floorSurface = createFloor(room, ifcSlab, ifcSlab);
       convertedObjects.put(ifcSlab, floorSurface);
     }
   }
 }
Example #2
0
 public Appearance getAppearance(IfcRoot ifcRootObject) {
   Appearance appearance = null;
   if (ifcRootObject instanceof IfcWall) {
     appearance = wallAppearance;
   } else if (ifcRootObject instanceof IfcWindow) {
     appearance = windowAppearance;
   } else if (ifcRootObject instanceof IfcColumn) {
     appearance = columnAppearance;
   } else if (ifcRootObject instanceof IfcSpace) {
     appearance = spaceAppearance;
   } else if (ifcRootObject instanceof IfcRoof) {
     appearance = roofAppearance;
   } else if (ifcRootObject instanceof IfcDoor) {
     appearance = doorAppearance;
   } else if (ifcRootObject instanceof IfcSlab) {
     IfcSlab ifcSlab = (IfcSlab) ifcRootObject;
     if (ifcSlab.getPredefinedType() == IfcSlabTypeEnum.ROOF) {
       appearance = roofAppearance;
     } else {
       appearance = slabAppearance;
     }
   } else if (ifcRootObject instanceof IfcRailing) {
     appearance = railingAppearance;
   } else if (ifcRootObject instanceof IfcFurnishingElement) {
     appearance = furnishingAppearance;
   } else if (ifcRootObject instanceof IfcStair) {
     appearance = stairAppearance;
   } else if (ifcRootObject instanceof IfcOpeningElement) {
     appearance = openingAppearance;
   } else if (ifcRootObject instanceof IfcBuildingElementProxy) {
     appearance = proxyAppearance;
   } else if (ifcRootObject instanceof IfcBeam) {
     appearance = beamAppearance;
   } else if (ifcRootObject instanceof IfcFlowTerminalType) {
     appearance = flowTerminalAppearance;
   } else if (ifcRootObject instanceof IfcDistributionFlowElement) {
     appearance = distributionFlowElementAppearance;
   } else if (ifcRootObject instanceof IfcSite) {
     appearance = siteAppearance;
   } else if (ifcRootObject instanceof IfcRelSpaceBoundary) {
   } else {
     System.out.println(ifcRootObject);
   }
   return appearance;
 }
 public void setAttribute() {
   if (attributeName.equals("PredefinedType")) {
     // 1NoEList
     // 1void
     // 1IfcSlabTypeEnum
   } else if (attributeName.equals("Tag")) {
     // 5NoEList
     ((IfcSlab) object).setTag(attributeNewValue);
     // 5void
     // 5String
   } else if (attributeName.equals("ObjectPlacement")) {
     // 5NoEList
     // 5void
     // 5IfcObjectPlacement
   } else if (attributeName.equals("Representation")) {
     // 5NoEList
     // 5void
     // 5IfcProductRepresentation
   } else if (attributeName.equals("ObjectType")) {
     // 5NoEList
     ((IfcSlab) object).setObjectType(attributeNewValue);
     // 5void
     // 5String
   } else if (attributeName.equals("GlobalId")) {
     // 5NoEList
     // 5void
     // 5IfcGloballyUniqueId
   } else if (attributeName.equals("OwnerHistory")) {
     // 5NoEList
     // 5void
     // 5IfcOwnerHistory
   } else if (attributeName.equals("Name")) {
     // 5NoEList
     ((IfcSlab) object).setName(attributeNewValue);
     // 5void
     // 5String
   } else if (attributeName.equals("Description")) {
     // 5NoEList
     ((IfcSlab) object).setDescription(attributeNewValue);
     // 5void
     // 5String
   } else {
   }
 }
 private FloorSurface createFloor(Room room, IfcProduct ifcRelating, IfcSlab ifcSlab)
     throws SerializerException {
   FloorSurface floorSurface = new FloorSurface();
   MultiSurfaceProperty floorMSP = new MultiSurfaceProperty();
   MultiSurface floorMs = new MultiSurface();
   floorMSP.setMultiSurface(floorMs);
   floorSurface.setLod4MultiSurface(floorMSP);
   setGeometry(floorMs, ifcRelating);
   BoundarySurfaceProperty boundarySurfaceProperty = new BoundarySurfaceProperty();
   boundarySurfaceProperty.setObject(floorSurface);
   room.addBoundedBySurface(boundarySurfaceProperty);
   setName(floorSurface.getName(), ifcSlab.getName());
   setGlobalId(floorSurface, ifcSlab);
   return floorSurface;
 }