Home| IFCDocs|

What are Extensions?

Extensions are modules or classes methods written in Ruby.

They extend the basic functionality of IFC classes and the server.

The class methods can be used inside server scripts or inside any report.

IFC

method:getObjectByLineID(id)
Return an IFC object by its STEP ID

method:IFC_CLASS_NAME.nonInverseAttributes
Return a list of IFC class basic attributes

IFCCOLUMN.nonInverseAttributes: -->>>
"|globalId |ownerHistory |name |description |objectType |objectPlacement |representation |tag"

method:IFCObject.to_xml (obj)
Serialize any IFC object as XML

Example: "#61185".to_obj.to_xml -->>>

<IFCCOLUMN>
<line_id>61185</line_id>
<globalId>'0APvzagRfDa8S2CxmCLJFH'</globalId>
<ownerHistory>#13</ownerHistory>
<name>'St\S\|tze-001'</name>
<description>''</description>
<objectType>$</objectType>
<objectPlacement>#61239</objectPlacement>
<representation>#61228</representation>
<tag>$</tag>
</IFCCOLUMN>

method:IFCObject.to_csv(obj)
Serialize any IFC object as Comma-Separated Values (CSV)

method:IFCObject.to_html (obj)
Serialize any IFC object as row in HTML table

method:IFC_CLASS_NAME.list(cols="")
Return a list of all IFC class instances, the parameter 'cols' can be used to define a set of custom data fields to be reported

method:IFCObject.as_link
Return HTML hyperlink to any IFC object instance

method:IFC_CLASS_NAME.where (cond,output)
Return a hash of user defined output applied on IFCCLASS object's instances which meet the 'cond' expression, 'all' or true can be used to retrive all instances, 'cond' can be any valid Ruby expression applied on each object instance, the 'o' is used as place holder for object instances
IFCWINDOW.where("all","o.area > 2.00")


IfcAlignment2DHorizontalSegment

method: to_svg
method: polarToCartesian(centerX, centerY, radius, angleInDegrees)

IfcArbitraryClosedProfileDef

method: area
method: diameter
method: perimeter
method: to_svg
method: svg(scale=1,transformation="")
method: xyz_array
method: xy_array

IfcArbitraryOpenProfileDef

method: perimeter
method: xyz_array
method: xy_array
method: to_svg

IfcArbitraryProfileDefWithVoids

method: area
method: xyz_array

IfcAsymmetricIShapeProfileDef

method: to_svg
method: svg(scale=1,transformation="")

IfcAxis2Placement2D

method: xy
method: x
method: y
method: matrix
method: matrix2d

IfcAxis2Placement3D

method: x_axis
method: z_axis
method: xyz
method: matrix
method: matrix2d

IfcBoundingBox

method: to_dae(objectPlacement=nil,*args)
convert the geometry data of IfcBoundingBox object to COLLADA format

method: corner_xyz
method: x_min
method: x_max
method: y_min
method: y_max
method: z_min
method: z_max
method: volume
return the volume of the BoundingBox object

method: center *

IfcBuilding

method: getBuildingAddress *
method: getBuildingStoreys *
method: getGrossFloorArea *
method: getSpaces *
method: getGetPropertySet *
method: getContainedElements() *

IfcBuildingElement

method: hasCoverings *

IfcBuildingElementType_classes

method: attach_to_obj(obj)
method: attach_to_obj(obj)

IfcCShapeProfileDef


IfcCartesianPoint

method: to_xml( o=self)
method: to_xyz
method: xyz
method: min_max
return a list of Xmin,Xmax,Ymin,Ymax,Zmin,Zmax of all IfcCartesianPoint instances


IfcCartesianPointList

method: size
method: coordArray

IfcCircle

method: area
method: perimeter
method: xyz_array
method: to_svg
method: svg(scale=1,transformation="")

IfcCircleHollowProfileDef

method: area
method: perimeter
method: xyz_array *
method: to_svg
method: svg(scale=1,transformation="")

IfcCircleProfileDef

method: area
method: perimeter
method: xyz_array
method: xy_array
method: to_svg
method: svg(scale=1,transformation="")

IfcClassification

method: classificationForObjects *
method: hasReferences *
method: contains *

IfcClassificationReference

method: attach_to_obj(obj)
method: classificationRefForObjects *
method: hasReferences *

IfcClosedShell

method: area
method: to_dae(placement=nil, *args)
method: to_dae_geometry(mesh_id="")
method: to_dae_node(placement=nil)

IfcColourRgb

method: to_RGB
method: to_RGB_HEX
method: to_html_div

IfcComplexProperty

method: to_row
method: to_table

IfcCompositeCurve

method: xyz_array

IfcCompositeCurveSegment

method: xyz_array
method: usingCurves *

IfcCompositeProfileDef


IfcConnectedFaceSet

method: to_dae(objectPlacement=nil, *args)
method: to_dae_geometry(mesh_id="")
method: to_dae_node(placement=nil)

IfcConstraint

method: hasExternalReferences *
method: propertiesForConstraint *

IfcConversionBasedUnit


IfcDateTime

method: date_time

IfcDerivedProfileDef


IfcDimensionalExponents

method: unitExponent

IfcDirection

method: get_normal

IfcDistributionFlowElement

method: hasControlElements *

IfcDoor

method: area

IfcDoorLiningProperties

method: property_details
method: attach_to_obj(obj)

IfcDoorPanelProperties

method: property_details
method: attach_to_obj(obj)

IfcDoorStyle

method: property_details

IfcDraughtingPreDefinedColour

method: to_html_div
method: to_RGB
method: to_RGB_HEX

IfcEdge

method: length
method: to_dae
method: to_dae_geometry(mesh_id="")
method: to_dae_node(ifclocalplacemenet=nil)
method: to_xml( o=self)

IfcElement

method: get_inverse_attributes *
method: fillsVoids1
method: hasStructuralMember1 *
method: connectedTo1
return information (class, globalId, name) about the elements which are connected to this element through IfcRelConnectsEelement relationship

Example: List all connected IfcBuildingElements in the IFC model: __4D_IFC2x4.ifc

method: hasCoverings1
method: referencedInStructures1
List the spatial structure elements(site, building, buildingStorey, space) in which this IfcElement object is referenced (through IfcRelReferencedInSpatialStructure), but not primarily contained

method: hasPorts1 *
method: hasOpenings1
method: providesBoundaries1
return a table of spaces objects of space boundaries which are defined through IfcRelSpaceBoundary relation for this IfcElement instance

Example: List space boundaries of slabs and walls in the IFC model :AC10-Institute-Var-1.ifc

method: connectedFrom1
return information (class, globalId, name) about the elements which are connected with this element through IfcRelConnectsEelement relationship

method: containedInStructure1
return the parent object(container) of this element

TODO: hasProjections,isConnectionRealization

IfcElementQuantity

method: to_details(str="")
method: property_names_values_hash
method: property_details
method: property_details_xml
method: to_details_xml(str="")
method: attach_to_obj(obj)
method: names_values_hash(str="")

IfcEllipseProfileDef

method: area
method: perimeter

IfcExternalReference

method: externalReferenceForResources

IfcExternalSpatialElement

method: boundedBy

IfcExtrudedAreaSolid

method: area
method: perimeter
method: diameter
method: area_side
method: volume
method: height
method: to_dae(objectPlacement=nil,*args)
method: xyz_min_max(location=[0,0,0])
method: to_dae_geometry(mesh_id = "")
method: to_dae_node(ifclocalplacement=nil)
method: svg(scale=1,transformation="")
method: to_svg

IfcFace

method: to_mesh
method: get_normal
method: to_dae(objectPlacement=nil,*args)
method: to_dae_geometry(mesh_id="")
method: to_dae_node(ifclocalplacemenet=nil)
method: area

IfcFaceBound

method: get_normal
method: to_mesh
method: to_dae(objectPlacement=nil,*args)
method: to_dae_geometry(mesh_id="")
method: to_dae_node(localplacement=nil)
method: area

IfcFaceOuterBound

method: to_dae(objectPlacement=nil)
method: to_dae_geometry(mesh_id="")
method: to_dae_node(local=nil)
method: to_mesh
method: area

IfcFacetedBrep

method: to_dae(objectPlacement=nil,*args)
method: to_mesh
method: to_dae_geometry(mesh_id="")
method: to_dae_node(local=nil)
method: area

IfcFillAreaStyle

method: validate_rules
method: fillStyles_colour

IfcGeometricCurveSet

method: to_dae(objectPlacement=nil,*args)
method: to_dae_geometry(mesh_id="")
method: to_dae_node(local=nil)
method: svg(scale=1,transformation="")

IfcGrid


IfcGridAxis

method: to_dae
method: svg(scale=1,transformation="")

IfcIShapeProfileDef

method: area
method: perimeter
method: xyz_array *
method: xy_array *
method: to_svg
method: svg(scale=1,transformation="")

IfcLShapeProfileDef


IfcLibraryReference


IfcLine

method: xyz_array(value=1)
method: xyz_min_max(value=1)

IfcLocalPlacement

method: location

IfcMappedItem

method: area
method: volume
method: area_side
method: height
method: to_dae(objectPlacement=nil)
method: to_dae_geometry(mesh_id="")
method: to_dae_node(local=nil)
method: check_transformation

IfcMaterial

method: attach_to_obj(obj)
This method links the name of the material object to the associated objects through the relation IfcRelAssociatesMaterial as a new attribute .
The new attribute to be used in reports or filters called:


IfcMaterialLayerSet

method: materials_list
method: materials_thickness_list

IfcMaterialLayerSetUsage

method: attach_to_obj(obj)
This method links the names, count and total thickness of the material layers (IfcMaterialLayerSetUsage) which are associated to objects through the relation IfcRelAssociatesMaterial as a new attributes .
The new attributes to be used in reports or filters called:


IfcMaterialList

method: getMaterials
method: attach_to_obj(obj)
This method links the names and count of the material objects which are associated to objects through the relation IfcRelAssociatesMaterial as a new attributes .
The new attributes to be used in reports or filters called:


IfcMeasureWithUnit


IfcMirroredProfileDef


IfcObject

method: isDefinedBy
method: db_pset
return a table with all object proeprties saved in the BIM-DB

method: db_select_pset(propertyname, psetName= "")
return a table with one or more object proeprties saved in the BIM-DB. The user can add filter by PSetName

method: db_get_property(propertyname, psetName= "")
return the value of object proeprty.


IfcObjectDefinition

method: hasAssignments
method: isNestedBy #
method: hasContext
method: decomposes
method: hasAssociations

IfcOpenShell

method: to_dae(objectPlacement=nil,*args)
convert the geometry data of this BoundingBox object to COLLADA format


IfcOpeningElement

method: area

IfcOwnerHistory

method: creationDate

IfcPhysicalQuantity


IfcPlanarExtent


IfcPolyLoop

method: get_normal_default
method: get_normal
method: to_xml(obj=self)
method: to_svg
method: to_xy_xml
method: perimeter
method: to_mesh
method: to_dae(objectPlacement=nil)
method: to_dae_geometry(mesh_id="")
method: to_dae_node(placement=nil)
method: area
method: dx_dy_dz
method: xyz_min
method: xyz_max
method: is_circle?(precision=0.01)
method: inXY?

IfcPolyline

method: to_a
method: xyz_array
method: xy_array
method: xy_min_max
method: to_xml1(obj=self)
method: to_xml(obj=self)
method: to_svg(scale=1)
method: svg(scale=1,transformation="")
method: area
method: perimeter
method: contains_point?(point)
method: outside_bounding_box?(point)
method: to_dae(placement=nil, *args)
method: to_dae_geometry(mesh_id="")
method: to_dae_node(placement=nil)
method: add_point(id)
method: self.new_from_points_array(xy_array=[])

IfcProduct

method: referencedBy
method: area
method: to_dae(placement=nil,*args)
method: volume
method: area_side
method: location

IfcProductDefinitionShape

method: to_dae(objectPlacement=nil,*args)
method: to_dae_geometry(mesh_id="")
method: to_dae_node(local=nil)
method: volume

IfcProductRepresentation

method: to_dae(objectPlacement=nil,*args)

IfcProfileDef

method: hasExternalReference *
method: hasProperties *

IfcPropertyBoundedValue


IfcPropertyDefinition

method: to_details(str="")
method: to_details_xml(str="")
method: property_names_values
method: valid_name(obj=self)
method: names_values(str="")
method: names_values_hash(str="")

IfcPropertyEnumeratedValue

method: to_row
method: to_xml(obj)
method: attach_to_obj(obj)

IfcPropertyEnumeration


IfcPropertySet

method: property_details
method: properties
Return an alphabitic sorted array of property names defined insinde the PropertySet object

method: hasProperty?(property)
Check if the PropertySet has a single Property with the name 'property', returns false or true

method: hasPropertyWithValue?(property,val)
Check if the PropertySet has a single Property with the name 'property' and the value 'value', returns false or true

method: property_value(name="")
method: property_details_xml
method: to_xml(obj=self)
method: property_names_values
method: property_names_values_hash
method: attach_to_obj(obj)

IfcPropertySetTemplate

method: propertyTemplates_html
method: propertyTemplates

IfcPropertySingleValue

method: to_row
method: valid_name(obj=self)
method: valid_value(obj=self)
method: to_xml(obj=self)
method: to_xml_full(obj=self)
method: #to_csv(obj=self)
method: attach_to_obj(obj)

IfcPropertyTableValue

method: to_row *

IfcQuantityArea

method: to_row
method: to_xml(obj)
method: attach_to_obj(obj)

IfcQuantityCount

method: to_row
method: to_xml(obj)
method: attach_to_obj(obj)

IfcQuantityLength

method: to_row
method: to_xml(obj)
method: attach_to_obj(obj)

IfcQuantityTime

method: to_row
method: to_xml(obj)
method: attach_to_obj(obj)

IfcQuantityVolume

method: to_row
method: to_xml(obj)
method: attach_to_obj(obj)

IfcQuantityWeight

method: to_row
method: to_xml(obj)
method: attach_to_obj(obj)

IfcRectangleHollowProfileDef

method: #area *
method: perimeter

IfcRectangleProfileDef

method: area
method: xyz_array
method: perimeter
method: svg(scale=1,transformation="")

IfcRelAggregates


IfcRelAssigns


IfcRelAssignsTasks

method: saveTimeForTask

IfcRelAssociatesClassification

method: attach_to_obj

IfcRelAssociatesMaterial

method: attach_to_obj
This method will be called automatically if this extension is loaded (the class IfcRelAssociatesMaterial is selected and the caching is disabled)
It links the material properties with the associated objects as new attributes to be used in reports and quires as fellow:


method: qto
This method can be used to create a QuantityTakeOff report.

Beside selecting IfcRelAssociatesMaterial class we have to select the IfcRelDefinedByProperties,IfcRelDefinesByType classes as well.
The fellowing attributes will be used for calculations:


IfcRelConnectsPortToElement

method: count()
method: add(instance_id)
method: count_by_class

IfcRelConnectsPorts

method: count()
method: add(instance_id)
method: count_by_class

IfcRelContainedInSpatialStructure

method: attach_to_obj
method: count()
method: add(instance_id)
method: count_by_class

IfcRelDecomposes

method: attach_to_obj

IfcRelDefinesByProperties

method: to_xml(obj=self)
method: cache *
method: attach

IfcRelDefinesByType

method: attach_to_obj

IfcRelFillsElement

method: count()
method: add(instance_id)
method: count_by_class

IfcRelSequence

method: count()
method: add(instance_id)
method: count_by_class

IfcRelVoidsElement

method: count()
method: add(instance_id)
method: count_by_class

IfcRelationship

method: count()
method: add(instance_id)
method: count_by_class

IfcRepresentation

method: ofProductRepresentation
method: layerAssignments
method: representationMap
method: area
method: area_side
method: volume
method: height
method: to_svg
method: to_dae(objectPlacement=nil,*args)

IfcRepresentationItem

method: layerAssignment
method: styledByItem *

IfcRepresentationMap

method: to_dae
method: to_dae_geometry(mesh_id=nil)
method: to_dae_node(local=nil)

IfcResource

method: resourceOf *

IfcRoundedRectangleProfileDef

method: area
method: perimeter

IfcScheduleTimeControl

method: detail

IfcShapeRepresentation

method: preview
method: to_dae_geometry(mesh_id="")
method: to_dae_node(local=nil)
method: to_dae(objectPlacement=nil,*args)
method: volume

IfcSimplePropertyTemplate


IfcSite

method: to_PSF21

IfcSlab


IfcSpace

method:getBoundedBy *
method:getElementQuantities *
method:getHeight *

IfcSpatialStructureElement

method: containsElements
method: containsElements_count

IfcStyledItem


IfcSurfaceStyle

method: to_dae_material

IfcSurfaceStyleRendering

method: surfaceColour_html
method: effect
method: material

IfcTShapeProfileDef


IfcTask


IfcTrapeziumProfileDef


IfcTrimmedCurve

method: xyz_array

IfcTypeProduct

method: attach_to_obj(obj)

This method links the "Type" properties with the associated objects(through IfcRelDefinesByType) as new attributes to be used in reports and quires as fellow:


IfcUShapeProfileDef


IfcVertexPoint

method: to_dae
method: to_dae_geometry(mesh_id="")
method: to_dae_node(ifclocalplacemenet=nil)

IfcWindow

method: area

IfcWindowLiningProperties

method: property_details

IfcWindowPanelProperties

method: property_details

IfcWindowStyle

method: property_details

IfcZShapeProfileDef


property_window_extension

method: format_property(obj,att)
method: property_table(obj=self)


Project website: https://github.com/ifcwebserver| Blog