Skip to main content

BimIfcClass

Represents an IFC class in the BIM system.

Index

Properties

publicreadonlyid

id: string

Identifier. While it might seem intuitive to use string equals operation against id, it is advised to use the is method for comparison. It’s also possible to do reference equality checks between instances of BimIfcClass directly. This is because there only ever exists one BimIfcClass instance for each unique IFC class.

const window = BimIfcClass.getOrAdd('ifcwiNdoW'); // The id is case insensitive in getOrAdd()
for(const p of api.ifc.products()) {
o.visible(o.class === window || o.class === BimIfcClass.predefined.wall)
}

publicreadonlyifcObjectCount

ifcObjectCount: number = 0

The number of BimIfcObject instances using this class.

publicreadonlyifcObjectsWithGeometryCount

ifcObjectsWithGeometryCount: number = 0

The number of instances where hasGeometry is true and using this class.

publicreadonlyreferencedDisciplinesSet

referencedDisciplinesSet: DeepImmutableObject<Set<Discipline>> = ...

The set of disciplines with ifcproducts that have references to this class.

publicreadonlytype

type: floor | other | annotations | beam | columns | covering | walls | doors | flow | furniture | reinforcement | roof | space | stairs | windows

This parameter represents the type of IFC class.

publicstaticreadonlyifcBuilding

ifcBuilding: BimIfcClass = BimIfcClass.predefined.building

Convinience property referencing the IfcBuilding class. Can be used with is to determine if a class is a building.

publicstaticreadonlyifcBuildingStorey

ifcBuildingStorey: BimIfcClass = BimIfcClass.predefined.buildingStorey

Convinience property referencing the IfcBuildingStorey class. Can be used with is to determine if a class is a building storey.

publicstaticreadonlyifcCovering

ifcCovering: BimIfcClass = BimIfcClass.predefined.covering

Convinience property referencing the IfcCovering class. Can be used with is to determine if a class is a covering.

publicstaticreadonlyifcProject

ifcProject: BimIfcClass = BimIfcClass.predefined.project

Convinience property referencing the IfcProject class. Can be used with is to determine if a class is a project.

publicstaticreadonlyifcSite

ifcSite: BimIfcClass = BimIfcClass.predefined.site

Convinience property referencing the IfcSite class. Can be used with is to determine if a class is a site.

publicstaticreadonlyifcSpace

ifcSpace: BimIfcClass = BimIfcClass.predefined.space

Convinience property referencing the IfcSpace class. Can be used with is to determine if a class is a space.

publicstaticreadonlypredefined

predefined: Readonly<Record<beam | covering | furniture | roof | space | actuator | airTerminal | airTerminalBox | airToAirHeatRecovery | alarm | alignment | alignmentCant | alignmentHorizontal | alignmentSegment | alignmentVertical | annotation | audioVisualAppliance | beamStandardCase | bearing | boiler | borehole | bridge | bridgePart | building | buildingElementPart | buildingElementProxy | buildingStorey | builtElement | burner | cableCarrierFitting | cableCarrierSegment | cableFitting | cableSegment | caissonFoundation | chamferEdgeFeature | chiller | chimney | civilElement | coil | column | columnStandardCase | communicationsAppliance | compressor | condenser | controller | conveyorSegment | cooledBeam | coolingTower | course | curtainWall | damper | deepFoundation | discreteAccessory | distributionBoard | distributionChamberElement | distributionControlElement | distributionElement | distributionFlowElement | distributionPort | door | doorStandardCase | ductFitting | ductSegment | ductSilencer | earthworksCut | earthworksElement | earthworksFill | electricalElement | electricAppliance | electricDistributionBoard | electricDistributionPoint | electricFlowStorageDevice | electricFlowTreatmentDevice | electricGenerator | electricMotor | electricTimeControl | elementAssembly | energyConversionDevice | engine | equipmentElement | evaporativeCooler | evaporator | externalSpatialElement | facility | facilityPartCommon | fan | fastener | filter | fireSuppressionTerminal | flowController | flowFitting | flowInstrument | flowMeter | flowMovingDevice | flowSegment | flowStorageDevice | flowTerminal | flowTreatmentDevice | footing | furnishingElement | geographicElement | geomodel | geoslice | geotechnicalStratum | grid | heatExchanger | humidifier | impactProtectionDevice | interceptor | junctionBox | kerb | lamp | lightFixture | linearElement | linearPositioningElement | liquidTerminal | marineFacility | marinePart | mechanicalFastener | medicalDevice | member | memberStandardCase | mobileTelecommunicationsAppliance | mooringDevice | motorConnection | navigationElement | openingElement | openingStandardCase | outlet | pavement | pile | pipeFitting | pipeSegment | plate | plateStandardCase | project | projectionElement | protectiveDevice | protectiveDeviceTrippingUnit | proxy | pump | rail | railing | railway | railwayPart | ramp | rampFlight | referent | reinforcedSoil | reinforcingBar | reinforcingMesh | road | roadPart | roundedEdgeFeature | sanitaryTerminal | sensor | shadingDevice | sign | signal | site | slab | slabElementedCase | slabStandardCase | solarDevice | spaceHeater | spatialZone | stackTerminal | stair | stairFlight | structuralCurveAction | structuralCurveConnection | structuralCurveMember | structuralCurveMemberVarying | structuralCurveReaction | structuralLinearAction | structuralLinearActionVarying | structuralPlanarAction | structuralPlanarActionVarying | structuralPointAction | structuralPointConnection | structuralPointReaction | structuralSurfaceAction | structuralSurfaceConnection | structuralSurfaceMember | structuralSurfaceMemberVarying | structuralSurfaceReaction | surfaceFeature | switchingDevice | systemFurnitureElement | tank | tendon | tendonAnchor | tendonConduit | trackElement | transformer | transportElement | tubeBundle | unitaryControlElement | unitaryEquipment | unknown | valve | vehicle | vibrationDamper | vibrationIsolator | virtualElement | voidingFeature | wall | wallElementedCase | wallStandardCase | wasteTerminal | window | windowStandardCase, BimIfcClass>> = ...

Represents all known IFC classes. These classes can be used with the is operator to check if an object belongs to a specific IFC class. They can also be used to create user interface lists or perform other operations related to IFC classes. However, to determine the actual classes in use for the currently loaded IFC files, refer to BImCoreApi.ifc.classes.

@example
function checkIfBuildingStorey(o: BimIfcObject): boolean {
return o.class.is(BimIfcClass.predefined.buildingStorey);
}

Accessors

publicreferencedDisciplines

  • get referencedDisciplines(): DeepImmutableObject<Discipline>[]
  • Gets an array of all disciplines with ifcproducts that have references to this class.


    Returns DeepImmutableObject<Discipline>[]

Methods

publicaddReferencedClass

  • Adds a referenced discipline to the set of referenced disciplines.


    Parameters

    Returns void

publicis

  • is(c: BimIfcClass | floor | other | annotations | beam | columns | covering | walls | doors | flow | furniture | reinforcement | roof | space | stairs | windows | IfcActuator | IfcAirTerminal | IfcAirTerminalBox | IfcAirToAirHeatRecovery | IfcAlarm | IfcAlignment | IfcAlignmentCant | IfcAlignmentHorizontal | IfcAlignmentSegment | IfcAlignmentVertical | IfcAnnotation | IfcAudioVisualAppliance | IfcBeam | IfcBeamStandardCase | IfcBearing | IfcBoiler | IfcBorehole | IfcBridge | IfcBridgePart | IfcBuilding | IfcBuildingElementPart | IfcBuildingElementProxy | IfcBuildingStorey | IfcBuiltElement | IfcBurner | IfcCableCarrierFitting | IfcCableCarrierSegment | IfcCableFitting | IfcCableSegment | IfcCaissonFoundation | IfcChamferEdgeFeature | IfcChiller | IfcChimney | IfcCivilElement | IfcCoil | IfcColumn | IfcColumnStandardCase | IfcCommunicationsAppliance | IfcCompressor | IfcCondenser | IfcController | IfcConveyorSegment | IfcCooledBeam | IfcCoolingTower | IfcCourse | IfcCovering | IfcCurtainWall | IfcDamper | IfcDeepFoundation | IfcDiscreteAccessory | IfcDistributionBoard | IfcDistributionChamberElement | IfcDistributionControlElement | IfcDistributionElement | IfcDistributionFlowElement | IfcDistributionPort | IfcDoor | IfcDoorStandardCase | IfcDuctFitting | IfcDuctSegment | IfcDuctSilencer | IfcEarthworksCut | IfcEarthworksElement | IfcEarthworksFill | IfcElectricalElement | IfcElectricAppliance | IfcElectricDistributionBoard | IfcElectricDistributionPoint | IfcElectricFlowStorageDevice | IfcElectricFlowTreatmentDevice | IfcElectricGenerator | IfcElectricMotor | IfcElectricTimeControl | IfcElementAssembly | IfcEnergyConversionDevice | IfcEngine | IfcEquipmentElement | IfcEvaporativeCooler | IfcEvaporator | IfcExternalSpatialElement | IfcFacility | IfcFacilityPartCommon | IfcFan | IfcFastener | IfcFilter | IfcFireSuppressionTerminal | IfcFlowController | IfcFlowFitting | IfcFlowInstrument | IfcFlowMeter | IfcFlowMovingDevice | IfcFlowSegment | IfcFlowStorageDevice | IfcFlowTerminal | IfcFlowTreatmentDevice | IfcFooting | IfcFurnishingElement | IfcFurniture | IfcGeographicElement | IfcGeomodel | IfcGeoslice | IfcGeotechnicalStratum | IfcGrid | IfcHeatExchanger | IfcHumidifier | IfcImpactProtectionDevice | IfcInterceptor | IfcJunctionBox | IfcKerb | IfcLamp | IfcLightFixture | IfcLinearElement | IfcLinearPositioningElement | IfcLiquidTerminal | IfcMarineFacility | IfcMarinePart | IfcMechanicalFastener | IfcMedicalDevice | IfcMember | IfcMemberStandardCase | IfcMobileTelecommunicationsAppliance | IfcMooringDevice | IfcMotorConnection | IfcNavigationElement | IfcOpeningElement | IfcOpeningStandardCase | IfcOutlet | IfcPavement | IfcPile | IfcPipeFitting | IfcPipeSegment | IfcPlate | IfcPlateStandardCase | IfcProject | IfcProjectionElement | IfcProtectiveDevice | IfcProtectiveDeviceTrippingUnit | IfcProxy | IfcPump | IfcRail | IfcRailing | IfcRailway | IfcRailwayPart | IfcRamp | IfcRampFlight | IfcReferent | IfcReinforcedSoil | IfcReinforcingBar | IfcReinforcingMesh | IfcRoad | IfcRoadPart | IfcRoof | IfcRoundedEdgeFeature | IfcSanitaryTerminal | IfcSensor | IfcShadingDevice | IfcSign | IfcSignal | IfcSite | IfcSlab | IfcSlabElementedCase | IfcSlabStandardCase | IfcSolarDevice | IfcSpace | IfcSpaceHeater | IfcSpatialZone | IfcStackTerminal | IfcStair | IfcStairFlight | IfcStructuralCurveAction | IfcStructuralCurveConnection | IfcStructuralCurveMember | IfcStructuralCurveMemberVarying | IfcStructuralCurveReaction | IfcStructuralLinearAction | IfcStructuralLinearActionVarying | IfcStructuralPlanarAction | IfcStructuralPlanarActionVarying | IfcStructuralPointAction | IfcStructuralPointConnection | IfcStructuralPointReaction | IfcStructuralSurfaceAction | IfcStructuralSurfaceConnection | IfcStructuralSurfaceMember | IfcStructuralSurfaceMemberVarying | IfcStructuralSurfaceReaction | IfcSurfaceFeature | IfcSwitchingDevice | IfcSystemFurnitureElement | IfcTank | IfcTendon | IfcTendonAnchor | IfcTendonConduit | IfcTrackElement | IfcTransformer | IfcTransportElement | IfcTubeBundle | IfcUnitaryControlElement | IfcUnitaryEquipment | IfcUnknown | IfcValve | IfcVehicle | IfcVibrationDamper | IfcVibrationIsolator | IfcVirtualElement | IfcVoidingFeature | IfcWall | IfcWallElementedCase | IfcWallStandardCase | IfcWasteTerminal | IfcWindow | IfcWindowStandardCase): boolean
  • Checks if the current instance is of the specified class (BimIfcClass, PredefinedIfcClassId) or type (IfcClassType).

    @remarks

    If you wish to peform the check with a string and it might not be one of the PredefinedIfcClassId. Then you can always fall back to comparing against id directly. However remember that such a comparison is case sensitive.

    @example
    // Fastest
    function checkIfBuildingStorey(o: BimIfcObject): boolean {
    return o.class.is(BimIfcClass.predefined.buildingStorey);
    }
    // Fast. Check if type/category is 'walls' (IfcClassType)
    function checkIfWallsType(o: BimIfcObject): boolean {
    return o.class.is('walls');
    }

    // Slowest but still fast enough for many use cases
    function checkIfBuildingStorey(o: BimIfcObject): boolean {
    return o.class.is('IfcBuildingStorey'); // Compare using PredefinedIfcClassId
    }

    Parameters

    • c: BimIfcClass | floor | other | annotations | beam | columns | covering | walls | doors | flow | furniture | reinforcement | roof | space | stairs | windows | IfcActuator | IfcAirTerminal | IfcAirTerminalBox | IfcAirToAirHeatRecovery | IfcAlarm | IfcAlignment | IfcAlignmentCant | IfcAlignmentHorizontal | IfcAlignmentSegment | IfcAlignmentVertical | IfcAnnotation | IfcAudioVisualAppliance | IfcBeam | IfcBeamStandardCase | IfcBearing | IfcBoiler | IfcBorehole | IfcBridge | IfcBridgePart | IfcBuilding | IfcBuildingElementPart | IfcBuildingElementProxy | IfcBuildingStorey | IfcBuiltElement | IfcBurner | IfcCableCarrierFitting | IfcCableCarrierSegment | IfcCableFitting | IfcCableSegment | IfcCaissonFoundation | IfcChamferEdgeFeature | IfcChiller | IfcChimney | IfcCivilElement | IfcCoil | IfcColumn | IfcColumnStandardCase | IfcCommunicationsAppliance | IfcCompressor | IfcCondenser | IfcController | IfcConveyorSegment | IfcCooledBeam | IfcCoolingTower | IfcCourse | IfcCovering | IfcCurtainWall | IfcDamper | IfcDeepFoundation | IfcDiscreteAccessory | IfcDistributionBoard | IfcDistributionChamberElement | IfcDistributionControlElement | IfcDistributionElement | IfcDistributionFlowElement | IfcDistributionPort | IfcDoor | IfcDoorStandardCase | IfcDuctFitting | IfcDuctSegment | IfcDuctSilencer | IfcEarthworksCut | IfcEarthworksElement | IfcEarthworksFill | IfcElectricalElement | IfcElectricAppliance | IfcElectricDistributionBoard | IfcElectricDistributionPoint | IfcElectricFlowStorageDevice | IfcElectricFlowTreatmentDevice | IfcElectricGenerator | IfcElectricMotor | IfcElectricTimeControl | IfcElementAssembly | IfcEnergyConversionDevice | IfcEngine | IfcEquipmentElement | IfcEvaporativeCooler | IfcEvaporator | IfcExternalSpatialElement | IfcFacility | IfcFacilityPartCommon | IfcFan | IfcFastener | IfcFilter | IfcFireSuppressionTerminal | IfcFlowController | IfcFlowFitting | IfcFlowInstrument | IfcFlowMeter | IfcFlowMovingDevice | IfcFlowSegment | IfcFlowStorageDevice | IfcFlowTerminal | IfcFlowTreatmentDevice | IfcFooting | IfcFurnishingElement | IfcFurniture | IfcGeographicElement | IfcGeomodel | IfcGeoslice | IfcGeotechnicalStratum | IfcGrid | IfcHeatExchanger | IfcHumidifier | IfcImpactProtectionDevice | IfcInterceptor | IfcJunctionBox | IfcKerb | IfcLamp | IfcLightFixture | IfcLinearElement | IfcLinearPositioningElement | IfcLiquidTerminal | IfcMarineFacility | IfcMarinePart | IfcMechanicalFastener | IfcMedicalDevice | IfcMember | IfcMemberStandardCase | IfcMobileTelecommunicationsAppliance | IfcMooringDevice | IfcMotorConnection | IfcNavigationElement | IfcOpeningElement | IfcOpeningStandardCase | IfcOutlet | IfcPavement | IfcPile | IfcPipeFitting | IfcPipeSegment | IfcPlate | IfcPlateStandardCase | IfcProject | IfcProjectionElement | IfcProtectiveDevice | IfcProtectiveDeviceTrippingUnit | IfcProxy | IfcPump | IfcRail | IfcRailing | IfcRailway | IfcRailwayPart | IfcRamp | IfcRampFlight | IfcReferent | IfcReinforcedSoil | IfcReinforcingBar | IfcReinforcingMesh | IfcRoad | IfcRoadPart | IfcRoof | IfcRoundedEdgeFeature | IfcSanitaryTerminal | IfcSensor | IfcShadingDevice | IfcSign | IfcSignal | IfcSite | IfcSlab | IfcSlabElementedCase | IfcSlabStandardCase | IfcSolarDevice | IfcSpace | IfcSpaceHeater | IfcSpatialZone | IfcStackTerminal | IfcStair | IfcStairFlight | IfcStructuralCurveAction | IfcStructuralCurveConnection | IfcStructuralCurveMember | IfcStructuralCurveMemberVarying | IfcStructuralCurveReaction | IfcStructuralLinearAction | IfcStructuralLinearActionVarying | IfcStructuralPlanarAction | IfcStructuralPlanarActionVarying | IfcStructuralPointAction | IfcStructuralPointConnection | IfcStructuralPointReaction | IfcStructuralSurfaceAction | IfcStructuralSurfaceConnection | IfcStructuralSurfaceMember | IfcStructuralSurfaceMemberVarying | IfcStructuralSurfaceReaction | IfcSurfaceFeature | IfcSwitchingDevice | IfcSystemFurnitureElement | IfcTank | IfcTendon | IfcTendonAnchor | IfcTendonConduit | IfcTrackElement | IfcTransformer | IfcTransportElement | IfcTubeBundle | IfcUnitaryControlElement | IfcUnitaryEquipment | IfcUnknown | IfcValve | IfcVehicle | IfcVibrationDamper | IfcVibrationIsolator | IfcVirtualElement | IfcVoidingFeature | IfcWall | IfcWallElementedCase | IfcWallStandardCase | IfcWasteTerminal | IfcWindow | IfcWindowStandardCase

      The class or type to ch öeck against.

    Returns boolean

    true if the current instance is of the specified class or type, false otherwise.

publicstaticgetOrAdd

  • Retrieves an instance of BimIfcClass based on the provided id. Lookup is case insensitive. Given the same id then the same instance is always returned. The instance is cached and reused up until reset after that new instances are created, cached and reused, until the next call to reset etc. If the instance does not exist in the cache, a new instance is created and added to the cache.

    @throws

    Error if the provided id is not a valid ifc class id on the format (IfcXxx).


    Parameters

    • id: string

      The id of the BimIfcClass to retrieve or add to the cache. The id is case insensitive.

    Returns BimIfcClass

    The BimIfcClass instance associated with the provided id.

publicstaticisValidId

  • isValidId(id: string): boolean
  • Checks if the given string looks like valid ID for an IFC class (format is IfcXxx).


    Parameters

    • id: string

      The string to check.

    Returns boolean

    true if the string is a valid IFC class ID, false otherwise.

publicstaticparse

  • Parse a id string and retrieves the corresponding BimIfcClass instance. Parsing is case insensitive. Given the same id then the same instance is always returned. The instance is cached and reused up until reset after that new instances are created, cached and reused, until the next call to reset etc. If the instance does not exist in the cache, a new instance is created and added to the cache.

    @throws

    Error if the provided id is not a valid ifc class id on the format (IfcXxx).


    Parameters

    • id: string

      The id of the BimIfcClass to retrieve or add to the cache. The id is case insensitive.

    Returns BimIfcClass

    The BimIfcClass instance associated with the provided id.

publicstaticreset

  • reset(): void
  • Resets to the original state. referencedDisciplinesSet is cleared. ifcObjectCount and ifcObjectsWithGeometryCount are set to 0.


    Returns void