ifcopenshell.api.structural

Manage analytical properties for structural simulation

This only handles authoring the analytical model, and does not actually perform any structural simulation. To perform the simulation, see IFC2CA.

Submodules

Package Contents

ifcopenshell.api.structural.add_structural_activity(file: ifcopenshell.file, applied_load: ifcopenshell.entity_instance, structural_member: ifcopenshell.entity_instance, ifc_class: str = 'IfcStructuralPlanarAction', predefined_type: str = 'CONST', global_or_local: Literal['GLOBAL_COORDS', 'LOCAL_COORDS'] = 'GLOBAL_COORDS') None

Adds a new structural activity

A structural activity is either a structural action or a reaction. It may be applied to a point, a curve, or a planar surface, and may be a constant load, linear, etc.

The activity must be defined using an applied load, and associated with a structural member.

Parameters:
  • ifc_class (str) – Choose from any subtype of IfcStructuralActivity.

  • predefined_type (str) – View the IFC documentation for what valid predefined types may be chosen.

  • global_or_local (str) – The location coordinates of the load is always defined locally relative to the structural member the activity is assigned to. However, the directions of the applied load may either be specified globally or locally depending on how this argument is set. Choose from GLOBAL_COORDS or LOCAL_COORDS.

  • applied_load (ifcopenshell.entity_instance) – The IfcStructuralLoad that is applied in this activity.

  • structural_member (ifcopenshell.entity_instance) – The IfcStructuralMember that the load is applied to.

Returns:

The newly created entity based on the ifc_class

Return type:

ifcopenshell.entity_instance

ifcopenshell.api.structural.add_structural_analysis_model(file: ifcopenshell.file) ifcopenshell.entity_instance

Add a new structural analysis model

A structural analysis model is a group of all the loads, reactions, structural members, and structural connections required to describe a structural analysis model.

A 3D analytical model is assumed.

Returns:

The newly created IfcStructuralAnalysisModel

Return type:

ifcopenshell.entity_instance

Example:

# Create a fresh blank structural analysis
analysis = ifcopenshell.api.structural.add_structural_analysis_model(model)
ifcopenshell.api.structural.add_structural_boundary_condition(file: ifcopenshell.file, name: str | None = None, connection: ifcopenshell.entity_instance | None = None, ifc_class: str = 'IfcBoundaryNodeCondition') ifcopenshell.entity_instance

Adds a new structural boundary condition to a structural connection

The type of boundary condition depends on the connection. Point connections will have a node condition, curve connections will have an edge condition, and surface connections will have a face condition.

Parameters:
  • name (str,optional) – The name of the boundary condition.

  • connection (ifcopenshell.entity_instance,optional) – The IfcStructuralConnection to apply the boundary condition to. This will determine the type of condition that is created. If no connection is supplied, an orphan boundary condition will be created using the ifc_class that you specify.

  • ifc_class (str,optional) – The class of IfcBoundaryCondition to create, only relevant if you do not specify a connection and want to create an orphaned boundary condition.

Returns:

The newly created IfcBoundaryCondition

Return type:

ifcopenshell.entity_instance

Example:

ifcopenshell.api.structural.add_structural_boundary_condition(model, connection=connection)
ifcopenshell.api.structural.add_structural_load(file: ifcopenshell.file, name: str | None = None, ifc_class: str = 'IfcStructuralLoadLinearForce') ifcopenshell.entity_instance

Adds a new structural load

Structural loads may be actions or reactions. A simple load might be a static and be linear, planar, or a single point. Alternatively, loads may be defined as a configuration of multiple loads.

Parameters:
  • name (str,optional) – The name of the load

  • ifc_class (str) – The subtype of IfcStructuralLoad to create. Consult the IFC documentation to see all the types of loads.

Returns:

The newly created load entity, depending on the ifc_class specified.

Return type:

ifcopenshell.entity_instance

Example:

# Create a simple linear load
ifcopenshell.api.structural.add_structural_load(model)
ifcopenshell.api.structural.add_structural_load_case(file: ifcopenshell.file, name: str = 'Unnamed', action_type: str = 'NOTDEFINED', action_source: str = 'NOTDEFINED') ifcopenshell.entity_instance

Adds a new load case, which is a collection of related load groups

Parameters:
  • name (str) – The name of the load case

  • action_type (str) – Choose from EXTRAORDINARY_A, PERMANENT_G, or VARIABLE_Q, taken from the Eurocode standard.

  • action_source (str) – The source of the load case, such as DEAD_LOAD_G, LIVE_LOAD_Q, TRANSPORT, ICE, etc. For the full list consult IfcActionSourceTypeEnum in the IFC documentation.

Returns:

The new IfcStructuralLoadCase

Return type:

ifcopenshell.entity_instance

ifcopenshell.api.structural.add_structural_load_group(file: ifcopenshell.file, name: str = 'Unnamed', action_type: str = 'NOTDEFINED', action_source: str = 'NOTDEFINED') ifcopenshell.entity_instance

Adds a new load group, which is a collection of related loads

Parameters:
  • name (str) – The name of the load group

  • action_type (str) – Choose from EXTRAORDINARY_A, PERMANENT_G, or VARIABLE_Q, taken from the Eurocode standard.

  • action_source (str) – The source of the load case, such as DEAD_LOAD_G, LIVE_LOAD_Q, TRANSPORT, ICE, etc. For the full list consult IfcActionSourceTypeEnum in the IFC documentation.

Returns:

The new IfcStructuralLoadCase

Return type:

ifcopenshell.entity_instance

ifcopenshell.api.structural.add_structural_member_connection(file: ifcopenshell.file, relating_structural_member: ifcopenshell.entity_instance, related_structural_connection: ifcopenshell.entity_instance) ifcopenshell.entity_instance

Relates a structural member and a structural connection

Parameters:
  • relating_structural_member (ifcopenshell.entity_instance) – The IfcStructuralMember to have a connection added to it.

  • related_structural_connection (ifcopenshell.entity_instance) – The IfcStructuralConnection to add to the IfcStructuralMember.

Returns:

The IfcRelConnectsStructuralMember relationship

Return type:

ifcopenshell.entity_instance

ifcopenshell.api.structural.assign_structural_analysis_model(file: ifcopenshell.file, product: ifcopenshell.entity_instance, structural_analysis_model: ifcopenshell.entity_instance) ifcopenshell.entity_instance

Assigns a load or structural member to an analysis model

Parameters:
  • product (ifcopenshell.entity_instance) – The structural element that is part of the analysis.

  • structural_analysis_model (ifcopenshell.entity_instance) – The IfcStructuralAnalysisModel that the structural element is related to.

Returns:

The IfcRelAssignsToGroup relationship

Return type:

ifcopenshell.entity_instance

ifcopenshell.api.structural.edit_structural_analysis_model(file: ifcopenshell.file, structural_analysis_model: ifcopenshell.entity_instance, attributes: dict[str, Any]) None

Edits the attributes of an IfcStructuralAnalysisModel

For more information about the attributes and data types of an IfcStructuralAnalysisModel, consult the IFC documentation.

Parameters:
  • structural_analysis_model (ifcopenshell.entity_instance) – The IfcStructuralAnalysisModel entity you want to edit

  • attributes (dict) – a dictionary of attribute names and values.

Returns:

None

Return type:

None

ifcopenshell.api.structural.edit_structural_boundary_condition(file: ifcopenshell.file, condition: ifcopenshell.entity_instance, attributes: dict[str, Any]) None

Edits the attributes of an IfcBoundaryCondition

For more information about the attributes and data types of an IfcBoundaryCondition, consult the IFC documentation.

Parameters:
  • condition (ifcopenshell.entity_instance) – The IfcBoundaryCondition entity you want to edit

  • attributes (dict) – a dictionary of attribute names and values.

Returns:

None

Return type:

None

ifcopenshell.api.structural.edit_structural_connection_cs(file: ifcopenshell.file, structural_item: ifcopenshell.entity_instance, axis: tuple[float, float, float] = (0.0, 0.0, 1.0), ref_direction: tuple[float, float, float] = (1.0, 0.0, 0.0)) None

Edits the coordinate system of a structural connection

Parameters:
  • structural_item (ifcopenshell.entity_instance) – The IfcStructuralItem you want to modify.

  • axis (tuple[float, float, float]) – The unit Z axis vector defined as a list of 3 floats. Defaults to (0., 0., 1.).

  • ref_direction (tuple[float, float, float]) – The unit X axis vector defined as a list of 3 floats. Defaults to (1., 0., 0.).

Returns:

None

Return type:

None

ifcopenshell.api.structural.edit_structural_item_axis(file: ifcopenshell.file, structural_item: ifcopenshell.entity_instance, axis: tuple[float, float, float] = (0.0, 0.0, 1.0)) None

Edits the coordinate system of a structural connection

Parameters:
  • structural_item (ifcopenshell.entity_instance) – The IfcStructuralItem you want to modify.

  • axis (tuple[float, float, float]) – The unit Z axis vector defined as a list of 3 floats. Defaults to (0., 0., 1.).

Returns:

None

Return type:

None

ifcopenshell.api.structural.edit_structural_load(file: ifcopenshell.file, structural_load: ifcopenshell.entity_instance, attributes: dict[str, Any]) None

Edits the attributes of an IfcStructuralLoad

For more information about the attributes and data types of an IfcStructuralLoad, consult the IFC documentation.

Parameters:
  • structural_load (ifcopenshell.entity_instance) – The IfcStructuralLoad entity you want to edit

  • attributes (dict) – a dictionary of attribute names and values.

Returns:

None

Return type:

None

ifcopenshell.api.structural.edit_structural_load_case(file: ifcopenshell.file, load_case: ifcopenshell.entity_instance, attributes: dict[str, Any]) None

Edits the attributes of an IfcStructuralLoadCase

For more information about the attributes and data types of an IfcStructuralLoadCase, consult the IFC documentation.

Parameters:
  • load_case (ifcopenshell.entity_instance) – The IfcStructuralLoadCase entity you want to edit

  • attributes (dict) – a dictionary of attribute names and values.

Returns:

None

Return type:

None

ifcopenshell.api.structural.remove_structural_analysis_model(file: ifcopenshell.file, structural_analysis_model: ifcopenshell.entity_instance) None

Removes an analysis model

Note that the contents of an analysis model are currently preserved.

Parameters:

structural_analysis_model (ifcopenshell.entity_instance) – The IfcStructuralAnalysisModel to remove.

Returns:

None

Return type:

None

ifcopenshell.api.structural.remove_structural_boundary_condition(file: ifcopenshell.file, connection: ifcopenshell.entity_instance | None = None, boundary_condition: ifcopenshell.entity_instance | None = None) None

Removes a condition from a connection, or an orphased boundary condition

Parameters:
  • connection (ifcopenshell.entity_instance,optional) – The IfcStructuralConnection to remove the condition from. If omitted, it is assumed to be an orphaned condition.

  • boundary_condition (ifcopenshell.entity_instance, optional.) – The IfcBoundaryCondition to remove.

Returns:

None

Return type:

None

ifcopenshell.api.structural.remove_structural_connection_condition(file: ifcopenshell.file, relation: ifcopenshell.entity_instance) None

Removes a relationship between a connection and a condition

The condition and the member itself is preserved.

Parameters:

relation (ifcopenshell.entity_instance) – The IfcRelConnectsStructuralMember to remove.

Returns:

None

Return type:

None

ifcopenshell.api.structural.remove_structural_load(file: ifcopenshell.file, structural_load: ifcopenshell.entity_instance) None

Removes a structural load

Parameters:

structural_load (ifcopenshell.entity_instance) – The IfcStructuralLoad to remove.

Returns:

None

Return type:

None

ifcopenshell.api.structural.remove_structural_load_case(file: ifcopenshell.file, load_case: ifcopenshell.entity_instance) None

Removes a structural load case

Parameters:

load_case (ifcopenshell.entity_instance) – The IfcStructuralLoadCase to remove.

Returns:

None

Return type:

None

ifcopenshell.api.structural.remove_structural_load_group(file: ifcopenshell.file, load_group: ifcopenshell.entity_instance) None

Removes a structural load group

Parameters:

load_group (ifcopenshell.entity_instance) – The IfcStructuralLoadGroup to remove.

Returns:

None

Return type:

None

ifcopenshell.api.structural.unassign_structural_analysis_model(file: ifcopenshell.file, product: ifcopenshell.entity_instance, structural_analysis_model: ifcopenshell.entity_instance) None

Removes a relationship between a structural element and the analysis model

Parameters:
  • product (ifcopenshell.entity_instance) – The structural element that is part of the analysis.

  • structural_analysis_model (ifcopenshell.entity_instance) – The IfcStructuralAnalysisModel that the structural element is related to.

Returns:

None

Return type:

None