ModelProductClass
Index
Properties
readonlyid
readonlyobjectCount
The number of BimIfcObject instances using this class.
readonlyobjectsWithGeometryCount
The number of instances where BimIfcObject.hasGeometry is true and using this class.
readonlyreferencedDisciplinesSet
The set of disciplines with ifcproducts that have references to this class.
readonlyspatialRole
readonlytype
staticreadonlypredefined
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.
Accessors
referencedDisciplines
Gets an array of all disciplines with ifcproducts that have references to this class.
Returns DeepImmutableObject<Discipline>[]
Methods
addReferencedClass
Adds a referenced discipline to the set of referenced disciplines.
Parameters
discipline: Discipline
The discipline to add.
Returns void
is
Checks if the current instance is of the specified class (ModelProductClass, PredefinedIfcClassId) or type (ModelProductClassType).
Parameters
c: ModelProductClass | floor | beam | other | columns | covering | walls | doors | flow | furniture | reinforcement | roof | space | stairs | windows | annotations | 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 check against.
Returns boolean
trueif the current instance is of the specified class or type,falseotherwise.
staticclearCache
Clears the internal instance cache. After calling this, subsequent calls to getOrAdd will create new instances. Existing references to previously cached instances remain valid but will no longer be returned by getOrAdd.
Use this in server-side scenarios where multiple models are processed sequentially to prevent unbounded cache growth.
Returns void
staticgetOrAdd
Retrieves an instance of ModelProductClass 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.Parameters
id: string
The id of the ModelProductClass to retrieve or add to the cache. The id is case insensitive.
Returns ModelProductClass
The ModelProductClass instance associated with the provided
id.
staticisValidId
Strict predicate for the canonical IFC id format (
IfcXxx, orTwin).NOTE: this is not the rule parse / getOrAdd apply. Those deliberately accept non-
Ifc*ids (DWG-entity / container classes in mixed-content twins) as'other'-typed classes and reject only empty / whitespace / bare-Ifcids. Use this only when you specifically need to test for a well-formed IFC class id, not to predict whetherparsewill accept a string.Parameters
id: string
The string to check.
Returns boolean
trueif the string is a well-formed IFC class id,falseotherwise.
staticparse
Parse a id string and retrieves the corresponding ModelProductClass 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.
Parameters
id: string
The id of the ModelProductClass to retrieve or add to the cache. The id is case insensitive.
Returns ModelProductClass
The ModelProductClass instance associated with the provided
id.
staticreset
Resets to the original state. referencedDisciplinesSet is cleared. objectCount and objectsWithGeometryCount are set to 0.
Returns void
Represents class (IfcWindow, IfcWall etc) There is one instance of this class for each unique IFC class. Therefore reference equality can be used to compare instances.
```typescript` ModelProductClass.getOrAdd("IfcWindow") === ModelProductClass.predefined.window; // true ModelProductClass.ifcBuildingStorey === ModelProductClass.getOrAdd("IfcBuildingStorey"); // true ``