Module viiaShapeOperations

The functions in this module are for the adjustments of the shapes in the model. This can be existing or newly added elements.

Openings

viiapackage.viiaShapeOperations.viia_add_openings(project: ViiaProject, opening_data_list: List)[source]

Function to easily add openings to viia walls or sloped roofs, based on the measurements commonly specified in the inspection data. A list is expected that contains the data for the openings. Each row in this list represents a surface object to which openings need to be added. This function can be used for walls and sloped roofs. It is possible to supply the object to which openings need to be added, but also a simple name like ‘wall_5’ can be used.

Input:
  • project: VIIA project object containing collections of fem objects and project variables.

  • opening_data_list: List that contains the data for the openings. Each row represents a wall or sloped roof. All measurements should be provided in [m]

Example:

An example for an opening_data_list is:

openings = [['wall_1', [[0.6, 2.1, 0.2, 2.1], [0.3, 1.2, 0, 2.3], [0.3, 2.1, 0.2, 2.1]]],
           [wall_object, [[0.7, 2.4, 0, 2.1]], True],
           ['roof_1', [[0.3, 1.2, 0, 2.3], [0.3, 2.1, 0.2, 2.1]]]]

For walls: Expected input is a list of either a simple wall name or the wall object itself, opening data for that wall, and an optional boolean to flip the direction of the openings. In the opening data, each sublists represents an opening. The four values in this sublistrepresent distance to opening, width of the opening, height from bottom of wall to opening (borstwering) and height of the opening (hoogte kozijn). The distance to the opening is the distance to the edge of the wall for the first opening in the list, and the distance to the previous opening for each subsequent opening. The optional boolean can be used to flip the direction in which the openings are added to the wall.

For roofs: Similar to wall openings, each sublist in the opening data represents an opening. Again, the first two values are distance to opening and width of the opening. Third value is the height from the floor to the bottom of the opening, measured in absolute z-coordinates. The fourth value is again the height of the opening, but measured in the plane of the sloped roof. Also here it is possible to flip the direction.

viiapackage.viiaShapeOperations.viia_add_roof_openings(project: ViiaProject, roof: Roof, opening_list: List[List], flip: bool = False)[source]

Function to easily add openings to roofs, based on measurements commonly specified in inspection data. This function is used by viia_add_openings, if a roof object is detected. Openings are specified by supplying a list of four values; distance to opening, width of opening, height of opening above floor level and a height of the opening in the plane of the roof.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • roof (obj): Object reference of roof on which the opening(s) are applied.

  • opening_list (list): List that contains the data for the openings. All measurements should be given in [m].

  • flip (bool): Select to flip the direction in which the openings are added to the shape. Default value False.

Output:
  • Opening(s) are added to the roof.

Example:

An example of an opening list is: opening_list = [[0.3, 1.2, 0, 2.3], [0.3, 2.1, 0.2, 2.1]]

This creates two openings. The first opening is at a distance 0.3m from the edge of the roof (the order of the edges is determined by the local axes of the roof), and has dimensions width x height = 1.2m x 2.3m, and starts from the bottom edge of the roof. The second opening is located at a distance 0.3m from the previous opening, has dimensions width x height = 2.1m x 2.1m in the plane of the roof and starts from 0.2m above the bottom edge of the roof in absolute z coordinates.

viiapackage.viiaShapeOperations.viia_add_wall_openings(wall: Wall, opening_list: List[List], flip: bool = False)[source]

Function to easily add openings to walls, based on measurements commonly specified in inspection data. This function is used by viia_add_openings, if a wall object is detected. Openings are specified by supplying a list of four values; distance to opening, width of opening, height of opening above bottom line of the wall and a height of the opening.

Input:
  • wall (obj): Object reference of wall, where to apply the opening(s) on.

  • opening_list (list): List that contains the data for the openings. All measurements should be given in [m].

  • flip (bool): Select to flip the direction of the openings. Default value False.

Output:
  • Openings are added to the wall.

Example:

An example of an opening list is: opening_list = [[0.6, 2.1, 0.2, 2.1], [0.3, 1.2, 0, 2.3]]

This creates two openings. The first opening is at a distance 0.6 from the edge of the wall, has dimensions width x height = 2.1 x 2.1, and is situated 0.2 above the bottom edge of the wall. The second opening is located at a distance 0.3 from the previous opening, has dimensions width x height = 1.2 x 2.3 and starts from the bottom of the wall.

viiapackage.shape_operations.viia_add_floor_openings.viia_add_floor_openings(project: ViiaProject, floor: Floor, opening_list: List[List], starting_point: Optional[Union[List[float], Node]] = None, direction: Optional[Union[List[float], Direction]] = None, flip: bool = False) Floor[source]

Function to easily add openings to floors, based on measurements commonly specified in inspection data. This function is used by viia_add_openings, if a floor object is detected. Openings are specified by supplying a list of four values; distance to opening in given direction, length of the opening, distance perpendicular to that line and width of opening. Any next opening is defined continuing along the given direction.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • floor (obj): Object reference of floor on which the opening(s) are applied.

  • opening_list (list): List that contains the data for the openings. All measurements should be given in [m].

  • starting_point (list of 2 floats): The starting point from which the measurements are taken. If not provided the first point of the floor definition is used. The z-coordinate of the point if given will be overwritten with the z-coordinate of the floor. Alternative input is providing a Node. It is not required that the starting point is on the floor, the opening points should.

  • direction (list of 2 floats): Direction from starting point that the dimensions are recorded in the inspection. If not provided the spanning direction of the floor is used for the direction of the dimension. Alternative input is providing a Direction. The direction is always only derived in the horizontal plane.

  • flip (bool): Select to flip the direction in which the openings are added to the shape. Default value False.

Output:
  • The opening(s) are added to the floor.

  • The floor shape is returned.

Example:

The following example shows a floor on which two openings are added. First one starting on x=0 and y=1.8 relative to the first point of the floor and in the direction of the local x-axis. The first opening has a width of 1.1m and length of 2.3m. The second opening starts at x=4.1 and y=0.8 and has dimensions 0.5m x 0.5m.

project.viia_add_floor_openings(floor=floor, opening_list=[[0, 1.1, 1.8, 2.3], [3, 0.5, 0.8, 0.5]]

Cavity wall ties

viiapackage.viiaShapeOperations.viia_create_cavity_wall_ties_from_list(project: ViiaProject, cavity_wall_list: List[Union[List[Union[str, Wall, dict]], str, Wall]], **kwargs)[source]

This function creates cavity walls for a list of walls. Properties for each cavity wall are specified by an accompanying dictionary of keyword arguments. Cavity wall pairs of which their origin walls are connected at either ends, are automatically connected. Given walls should not cross one another and only connect at their ends. Among the given walls no more than two walls should connect in the same point.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • cavity_wall_list (list of lists of a string or object and dictionary): A list of lists containing data about the walls for which cavity walls are to be created. Examples of input can be found below.

  • cavity (float): Cavity distance between the walls.

  • outer_wall_thickness (float): Optional thickness of the outer wall in [m]. If nothing is provided, thickness will be equal to the inner leaf.

  • outer_wall_material (str): Optional material of the outer wall. If nothing is provided, material will be equal to the inner leaf.

  • flip (bool): Toggle to flip the direction of creation of the wall. By default the outer wall is created in the direction of the normal vector of the wall.

  • no_ties (bool): Toggle to prevent creation of cavity wall ties. Default is False.

  • connect_outer_leafs (bool): Toggle to connect edges of outer leafs. Default is True.

  • dummy_plates (bool): Toggle to create dummy plates under the walls. Default is True.

  • edge_distance (float): Distance from which to snap points to openings or contour, if desired. Default is 0.25m

  • ties_per_m2 (float): Number of ties per m2. Default value is 4 ties/m2.

  • wall_tie_distance (float): Distance between ties, in [m]. Default is 0.5m.

  • snap_to_openings (bool): Toggle for snapping of cavity ties to opening lines. Default is True.

  • snap_to_contour (bool): Toggle for snapping of cavity ties to contour lines. Default is True.

  • offset_base (float): Optional offset of the ties in the direction of the base of the wall in [m]. Default is 0

  • offset_vertical (float): Optional offset of the ties in the vertical direction in [m]. Default is 0.

  • complete_output (bool): Optional toggle to return all newly created shapes. Default is False.

  • lines_to_snap (list): List of Line object to snap the ties nearby

Output:
  • If complete_output argument is False (default), a list of the newly created outer leaf objects is returned. If complete_output is set to True, three lists are returned. First list has the outer leaf objects, second list the wall tie objects, and third list the dummy plates.

Examples:

Different types of input can be given to this function. The basic input is as follows:

project.viia_create_cavity_wall_ties_from_list(
    cavity_wall_list=['wall_1', 'wall_2', 'wall_3' .. etc.], cavity=0.1)

This will create outer leafs, cavity wall ties and dummy plates for all the walls in the cavity wall list, with a cavity of 0.1m. The rest of the arguments will have their default value.

It is also possible to provide different arguments to a specific wall. In this case a list should be provided that includes the wall and a dictionary of keyword arguments, like so:

project.viia_create_cavity_wall_ties_from_list(
    cavity_wall_list=['wall_1', ['wall_2', {'cavity': 0.2}], 'wall_3' .. etc.], cavity=0.1)

This will create all outer leafs, cavity wall ties and dummy plates with a cavity of 0.1m, except for wall with id 2 the cavity will be 0.2m. Note that this can be done for all keyword arguments described in the input parameters above. Input may therefore also look something like this:

project.viia_create_cavity_wall_ties_from_list(
    cavity_wall_list=[
        ['wall_1', {'cavity': 0.18, 'wall_tie_distance': 0.7, 'outer_wall_thickness': 0.15}],
        ['wall_2', {'flip': True, 'no_ties': True}],
        'wall_3', 'wall_4',
        ['wall_5', {'dummy_plates': True, 'edge_distance': 0.3, 'offset_vertical': 0.1, 'flip': True}]
    ],
    cavity = 0.3,
    dummy_plates=False,
    offset_base=0.25,
    snap_to_contour=False)

Helper-functions for cavity wall ties

viiapackage.geometry.viia_create_cavity_walls.viia_connect_cavity_walls(project: ViiaProject, cavity_wall_1: Wall, cavity_wall_2: Wall, adjust_second: bool = True)[source]

This function connects two vertical and rectangular (cavity) walls by adjusting the contours of both walls such that the intersection line of the wall planes is included in both wall contours. If parallel walls are given, their contours remain unchanged.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • cavity_wall_1 (obj): Wall to be connected to cavity_wall_2.

  • cavity_wall_2 (obj): Wall to be connected to cavity_wall_1.

  • adjust_second (bool): If is true cavity_wall_2 will also be changed. If false cavity_wall_2 will remain unchanged, this can be needed at specific T-sections.

Output:
  • The (cavity) walls are connected, nothing is returned.

viiapackage.geometry.viia_create_cavity_walls.viia_create_cavity_wall_ties(project: ViiaProject, inner_leaf: Wall, outer_leaf: Wall, edge_distance: float = 0.25, ties_per_m2: Optional[float] = None, wall_tie_distance: Optional[float] = None, snap_to_openings: bool = True, snap_to_contour: bool = True, offset_base: float = 0, offset_vertical: float = 0, lines_to_snap: Optional[List[Line]] = None)[source]

Function to create cavity wall ties between two walls. Function generates a grid of evenly distributed points over the inner leaf. Points in openings are disregarded. Points close to opening lines are snapped by default if they are within the given edge distance.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • inner_leaf (Wall): Wall object for the inner leaf.

  • outer_leaf (Wall): Wall object for the outer leaf.

  • edge_distance (float): Distance from which to snap points to openings or contour, if desired. Default is 0.25m

  • ties_per_m2 (float): Number of ties per m2. Default value is 4 ties/m2.

  • wall_tie_distance (float): Distance between ties, in [m].

  • snap_to_openings (bool): Toggle for snapping to opening lines.

  • snap_to_contour (bool): Toggle for snapping to contour lines.

  • offset_base (float): Optional offset of the ties in the direction of the base of the wall in [m]. Default value 0.

  • offset_vertical (float): Optional offset of the ties in the vertical direction in [m]. Default value 0.

  • lines_to_snap (list): List of Line object to snap the ties nearby.

Output:
  • list of wall tie objects, created in the Spring class

viiapackage.geometry.viia_create_cavity_walls.viia_create_dummy_plate_between_walls(project: ViiaProject, wall_1: Wall, wall_2: Wall, material: str = 'LIN-DUMMY-PLATE', geometry: float = 100, z_coordinate: Optional[float] = None) Wall[source]

Function to create a dummy plate between two walls. This can be used for cavity walls for instance. The local x-axis of the plate is set parallel to the wall. The dummy plate is created in the Floor class.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • wall_1 (Wall): Object reference of the first wall.

  • wall_2 (Wall): Object reference to the second wall.

  • material (str): Optional material to apply to the dummy plate, default is ‘LIN-DUMMY-PLATE’.

  • geometry (float): Optional geometry to apply to the plate, default is 100mm.

  • z-coordinate (float): Optional z-coordinate for the plate, default is bottom of the walls

Output:
  • Object reference to the newly created dummy plate in the Floor class.

viiapackage.geometry.viia_create_cavity_walls.viia_create_outer_leaf(project: ViiaProject, wall: Union[Wall, str], cavity: float, outer_wall_thickness: Optional[float] = None, outer_wall_material: Optional[str] = None, flip: bool = False) Wall[source]

Function to create an outer leaf for a specific wall. All points defining the wall object are translated outward so the gap between them, including thickness of the wall, will be equal to cavity.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • wall (Wall, str): Wall object or string describing the inner leaf. For instance ‘wall_18’.

  • cavity (float): Cavity distance between the walls.

  • outer_wall_thickness (float): Optional thickness of the outer wall in [m]. If nothing is provided, thickness will be equal to the given wall.

  • outer_wall_material (str): Optional material of the outer wall. If nothing is provided, material will be equal to the given wall.

  • flip (bool): Toggle to flip the direction of creation of the wall. By default, the outer wall is created in the direction of the normal vector of the wall.

Output:
  • Object reference to the newly created outer wall in the Wall class.

viiapackage.geometry.viia_create_cavity_walls.viia_create_wall_ties_on_line(project: ViiaProject, inner_leaf: Wall, outer_leaf: Wall, inner_line: List[List[float]], outer_line: List[List[Union[float, int]]], wall_tie_distance: Optional[float] = 0.5, snap_to_points: bool = True, minimum_distance: Optional[float] = 0.25)[source]

This function will create wall ties between the provided inner and outer leaf, along the required line.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • inner_leaf (obj): Object reference of the inner leaf of the cavity wall.

  • outer_leaf (obj): Object reference of the outer leaf of the cavity wall.

  • inner_line (list of list of float): Line on the inner leaf on which the wall ties are applied.

  • outer_line (list of list of float): Line on the outer leaf on which the wall ties are applied.

  • wall_tie_distance (float): Distance between ties, in [m]. Default value is 0.5 m.

  • snap_to_points (bool): Toggle for snapping to nearby points. Default value is True.

  • minimum_distance (float): Minimum distance to snap to nearby points. Default value is 0.25 m.

Output:
  • Returns list of newly created cavity wall ties.

viiapackage.geometry.viia_create_cavity_walls.viia_get_ctc_cavity_walls(project: ViiaProject, leaf_1: Wall, leaf_2: Wall) float[source]

This function calculates the center-to-center distance of the inner and outer leaf of the cavity wall in the model. This is half the thickness of the inner leaf plus the cavity plus half the thickness of the outer leaf.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • leaf_1 (Wall): One leaf of the cavity wall

  • leaf_2 (Wall): The other leaf of the cavity wall

Output:
  • Returns the total width of the cavity wall, in [m].

viiapackage.geometry.viia_create_cavity_walls.viia_get_outer_leaf(project: ViiaProject, inner_leaf: Wall) Optional[Wall][source]

This function will collect the outer leaf for a certain inner leaf. The cavity wall consists of an inner leaf with an ID, the corresponding outer lead has an ID + 9000.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • inner_leaf (obj): Object reference of the inner leaf of the cavity wall.

Output:
  • Returns the outer leaf of the cavity wall, if it could be found.

viiapackage.geometry.viia_create_cavity_walls.viia_get_total_cavity_wall_width(project: ViiaProject, leaf_1: Wall, leaf_2: Wall) float[source]

This function calculates the total width of the cavity wall. This is the thickness of the inner leaf plus the cavity plus the thickness of the outer leaf.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • leaf_1 (Wall): One leaf of the cavity wall

  • leaf_2 (Wall): The other leaf of the cavity wall

Output:
  • Returns the total width of the cavity wall, in [m].

viiapackage.geometry.viia_create_cavity_walls.viia_move_cavity_wall_tie(project: ViiaProject, cavity_wall_tie: Spring, new_coordinates: List[float]) Spring[source]

Function to move a cavity wall tie object to a new specified coordinate on the inner leaf. A vector is constructed from the old coordinates of the node on the source connecting shape to the new coordinates. The node on the target connecting shape is moved along this same vector.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • cavity_wall_tie (obj): Object reference to the cavity wall tie that needs to be moved.

  • new_coordinates (list of 3 floats): New coordinates of the wall tie object. The new position should be provided on the inner leaf.

Output:
  • Spring object and two internal points on the walls to which it connects are moved accordingly. The updated spring object is also returned.

viiapackage.geometry.viia_create_cavity_walls.viia_remove_cavity_wall_tie(project: ViiaProject, tie: Spring)[source]

This function removes a cavity wall tie from the project. The corresponding internal points on the inner and outer leaf will also be removed. If these nodes are not used by other shapes, they will also be removed.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • tie (obj): Object reference to the spring describing the wall tie.

Output:
  • Returns the spring object will be deleted from the project. The shape geometries to which it connects will also be removed if they are not used by other shapes.

viiapackage.geometry.viia_create_cavity_walls.viia_snap_coordinate_to_line(line: Line, coordinate: List[float], minimum_distance: float) List[float][source]

Function to snap a coordinate to a line. If the coordinate is closer to the line than the given minimum_distance, the coordinate is snapped to the closest point on the line.

Input:
  • line (Line): Object reference of Line shape-geometry.

  • coordinate (list): List of three floats describing the coordinate.

  • minimum_distance (float): Distance within snapping is performed, in [m].

Output:
  • Snapped coordinate as list of floats. If snapping is not required, nothing is returned.

viiapackage.geometry.viia_create_cavity_walls.viia_snap_coordinates_to_surface(surface: Surfaces, coordinates: List[List[float]], minimum_distance: float, snap_to_openings: bool = True, snap_to_contour: bool = True, lines_to_snap: List[Line] = None, snap_to_point: bool = True) List[List[float]][source]

This function can snap coordinates to contour lines or opening lines of a surface. This can be used while creating cavity wall ties. Coordinates within the prescribed minimum distance of lines are automatically snapped to the closest point on that line.

Input:
  • surface (Surfaces): Surface object to snap the coordinates for.

  • coordinates (list): List of 3D coordinate pairs to check for snapping.

  • minimum_distance (float): Coordinates within this distance are snapped, in [m].

  • snap_to_openings (bool): Select for snapping to openings. Default value True.

  • snap_to_contour (bool): Select for snapping to the contour. Default value True.

  • lines_to_snap (list): List of Line object to snap the ties nearby. Default value True.

  • snap_to_point (bool): Select for snapping to inner points. Default value True.

Output:
  • Returns list of coordinates as a list of floats. Coordinates within the minimum distance of the lines are snapped to that line. Coordinates that are not within the minimum distance remain unchanged.

Align with grid

viiapackage.viiaShapeOperations.viia_align_with_grid(project: ViiaProject, shapes: List[Shapes], margin: float, x_grid: List[float], y_grid: List[float], z_grid: List[float], merge_shapegeometries: bool = False)[source]

Function for aligning the nodes of shapes to a given grid. If this results in a out of plane displacement of a surface, the user will be notified.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • shapes (list of obj): List of object references of the shapes to be aligned.

  • margin (float): Distance between the nodes and the level to determine if the node needs to be moved, in [m].

  • x_grid (list with floats): List with grid in x-direction, in [m].

  • y_grid (list with floats): List with grid in y-direction, in [m].

  • z_grid (list with floats): List with grid in z-direction, in [m].

  • merge_shapegeometries (bool): Indicates if the shapegeometries should be merged after aligning them. When multiple shapes are aligned this boolean should only be True for the last function call out of speed reasons. Default value False.

Output:
  • The nodes within the set levels is translated in the given direction.

Beam operations

viiapackage.viiaShapeOperations.viia_create_lintel(project: ViiaProject, wall: Union[Wall, str, int], opening_number: int, lintel_material: str = 'LIN-BETON', lintel_type: str = '100x100', support_length: float = 0.1, lintel_slab: bool = False) Lintel[source]

This function creates a lintel for a given opening in a wall.

Note

The top side of the opening consists of at least two points on the same maximum height in z-direction.

Note

The lintel will be applied within the contour of the wall (if edge of wall is smaller than the support_length, the lintel will stop at the edge.

Note

When the lintel slab is needed for cavity walls, a dummy plate with 100mm thickness will be created as a Floor object.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • wall (obj): Object reference of the wall in which the opening is located for the lintel. Alternative the name of a wall can be provided.

  • opening_number (int): The number (>= 1) of the opening (first opening is number 1).

  • lintel_material (str): The material of the lintel, all VIIA materials available. Default is LIN-BETON.

  • lintel_type (str): The profile of the lintel, all profiles available as for beams. Use VIIA naming convention. Default is 100x100.

  • support_length (float): The length of the support in [m]. This is the distance from the corner of the opening to the end of the lintel. Default value is 0.1.

  • lintel_slab (boolean): By default is False. When set to True, a dummy plate will be created between outer leaf and inner leaf on the opening of the cavity wall

Output:
  • Lintel is created in PY memory.

  • If model is already created in DIANA, it will also add the lintel to the model and assign properties for material, geometry and data.

Warning

Lintels that lie on the same line (due to two adjacent windows on the same height) can theoretically overlap. For the default support length of 0.1m this is unlikely, but when higher support lengths are specified, this can occur.

viiapackage.viiaShapeOperations.viia_truss(project: ViiaProject, line_object: Union[Column, Beam]) bool[source]

Function to make a truss (‘STAAF’) of a beam (‘BALK’). A beam is able to bend, a truss is only able to transfer axial forces.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • line_object (obj): Beam or column that will be changed into a truss.

Output:
  • The name of the object is slightly changed; ‘BALK’ is replaced with ‘STAAF’

  • The attribute ‘elementclass_type’ of the object is set to ‘ENHTR3’ (enhanced 3d truss element).

  • If model is created it will be updated in DIANA.

Non linear concrete (discrete reinforcement)

viiapackage.viiaShapeOperations.viia_create_nonlinear_concrete_wall(project: ViiaProject, wall: Union[Wall, str], rebar_position='Center', concrete_material='BETON-C20/25', rebar_material='LIN-WAP-B500', horizontal_rebar='R12_150', vertical_rebar='R12_150', rebar_distance: float = 0.035)[source]

This function replaces a previously modelled linear concrete wall with a non-linear concrete wall. It adjusts the properties of the original wall to the specified concrete strength and applies grid reinforcement. It maintains existing openings and can be applied on walls in all directions. Optional is the inclusion of eccentricity.

Note

x-axis is expected to be horizontal.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • wall (obj): The wall that will be modelled with non-linear material properties and rebar added. Alternative (str): Name of the wall. The wall must have been created already in PY-memory.

  • rebar_position (str): Not obligatory, default value is ‘Center’. In that case no eccentricity is applied. If ‘Eccentric’ the grid reinforcement will be applied with corresponding eccentricity.

  • concrete_material (str): The name of the new non-linear concrete material.

  • rebar_material (str): The name of the material used for the reinforcement.

  • vertical_rebar (str): The definition of the vertical reinforcement that is used.

  • horizontal_rebar (str): The definition of the horizontal reinforcement that is used.

  • rebar_distance (float) in m: Distance from center of the reinforcement to the edge of the wall, i.e. coverage.

Output:
  • The linear concrete wall is replaced with a non-linear reinforced concrete wall and modelled in DIANA or SCIA.

For example:
>>> viia_create_nonlinear_concrete_wall(wall5)

This example will replace the linear concrete wall in the model with a non-linear concrete wall with a double grid reinforcement in the center.

>>> viia_create_nonlinear_concrete_wall(wall5, Type='Eccentric', horizontal_rebar='2R8_200')

In this example, the grid reinforcement has been applied with eccentricity, meaning that one reinforcement sheet is added at both sides of the wall. Also, different horizontal rebar is specified: 2Ø8-200.

Create foundations

viiapackage.geometry.viia_create_foundation._check_fstrips_connectivity(project: ViiaProject)[source]

Function to check if all foundation strips are properly connected to each other. This check is needed to avoid gaps between two foundation strips. The gap case may arise when the length of one of the fstrip is smaller than the width of adjacent foundation strips.

viiapackage.geometry.viia_create_foundation._determine_foundation_points_for_cavity_wall(inner_leaf: Wall, outer_leaf: Wall) List[List[float]][source]

This function determines the location of the foundation wall in case of a cavity wall. It should be placed in the middle of the cavity. This function constructs vectors from the bottom corner points of the inner leaf to the corresponding bottom point of the outer leaf. The points for placing the foundation are halfway along this vector.

Input:
  • inner_leaf (Wall): Object reference to the Wall object describing the inner leaf.

  • outer_leaf (Wall): Object reference to the Wall object describing the outer leaf.

Output:
  • Coordinates of the line under which to place the foundation wall and strip are returned as a list of lists of floats

viiapackage.geometry.viia_create_foundation._viia_create_foundation_column_and_strip(project: ViiaProject, foundation_column_top_point: List[float], foundation_depth: float, foundation_column_thickness: float, foundation_column_material: Material, strip_width: float, strip_thickness: float, strip_material: Material) Tuple[Column, Fstrip][source]

This function creates and returns the foundation column and strip.

viiapackage.geometry.viia_create_foundation._viia_create_foundation_column_and_strip_stepped_foundation(project: ViiaProject, foundation_column_top_point: List[float], foundation_depth: float, foundation_column_thickness: float, foundation_material: Material, strip_extensions: List[float], strip_heights: List[float], column_extends: bool) Tuple[Optional[Column], Column, Fstrip][source]

This function creates and returns the equivalent column and the strip of the stepped foundation.

viiapackage.geometry.viia_create_foundation._viia_create_foundation_strip(project: ViiaProject, thickness: float, width: float, level: float, material: Material, line_point_1: List[float], line_point_2: List[float], cut_off_line_1: Optional[List[List[float]]] = None, cut_off_line_2: Optional[List[List[float]]] = None) Fstrip[source]

This function creates the foundation strip.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • thickness (float): Thickness of foundation strip, in [m].

  • width (float): Width of foundation strip, in [m].

  • level (float): Depth of the foundation, in [m] (level of the foundation strip).

  • material (obj): Object reference for material of the strip.

  • line_point_1 (list of float): First corner point of the wall underneath which the foundation is made.

  • line_point_2 (list of float): Second corner point of the wall underneath which the foundation is made.

  • cut_off_line_1 (list of lists of float): List with two points that define a cut-off line for the foundation strip, defining the side of the strip. Line point 1 should be on this line.

  • cut_off_line_2 (list of lists of float): List with two points that define a cut-off line for the foundation strip, defining the side of the strip. Line point 2 should be on this line.

Output:
  • Creates and adds to project the newly created instance of Fstrip class.

viiapackage.geometry.viia_create_foundation._viia_create_foundation_wall_and_strip(project: ViiaProject, line_point_1: List[float], line_point_2: List[float], foundation_depth: float, foundation_wall_thickness: float, wall_material: Material, strip_width: float, strip_thickness: float, strip_material: Material) Tuple[Optional[Wall], Fstrip][source]

Function creates the wall and strip foundation.

viiapackage.geometry.viia_create_foundation._viia_create_foundation_wall_and_strip_stepped_foundation(project: ViiaProject, line_point_1: List[float], line_point_2: List[float], foundation_depth: float, foundation_wall_thickness: float, strip_extensions: List[float], strip_heights: List[float], material: Material, cavity_extension_wall_bottom: Optional[float] = 0, cavity_extension_wall_thickness: Optional[float] = None, strip_material: Optional[Material] = None) Tuple[Optional[Wall], Wall, Fstrip, Optional[Wall]][source]

Function creates the stepped foundation.

viiapackage.geometry.viia_create_foundation.viia_create_foundation_columns_and_strips(project: ViiaProject, columns: List[Union[Column, str]], foundation_depth: float, foundation_column_material: str, foundation_column_width: float, strip_material: Optional[str] = None, strip_width: Optional[float] = None, strip_thickness: Optional[int] = None, stepped_foundation_strip_extensions: Optional[List[float]] = None, stepped_foundation_strip_heights: Optional[List[float]] = None) Tuple[Optional[List[Column]], Optional[List[Fstrip]]][source]

This function creates the foundation underneath all columns in the list. Only square cross-sections can be created for foundation columns and strips.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • columns (list): List with all the columns underneath which the foundation has to be made. The columns may be provided as string or as object reference of Column.

  • foundation_depth (float): Depth of the foundation strip, in [m].

  • foundation_column_material (str): Name of the foundation column material.

  • foundation_column_width (float): Width of the foundation column, in [mm]. Only square cross-sections can be used for foundation columns. So, the width and the height of the column are the same. In case of stepped foundation the width of the foundation column exactly below the ground column should be given.

  • strip_material (str): Name of the strip material. Default value is None.

  • strip_width (int): Width of the strip, in [mm]. In case of stepped foundation this input parameter should not be provided. Default value None.

  • strip_thickness (int): Thickness of the strip, in [mm]. In case of stepped foundation this input parameter should not be provided. Default value None.

  • stepped_foundation_strip_extensions (list of float): List of extensions for stepped foundations, in [mm]. Input parameter should only be provided for stepped foundations. Default value None. The extensions are provided at each level of the stepped foundation going from top to bottom

    60 | | 60

    —- —-

    75 | | 75

    —- —-

    40 | | 40

    —- —- | | ———————–

    strip_extensions = [60, 75, 40]

  • stepped_foundation_strip_heights (list of float): List of extensions for stepped foundations, values in [mm]. Input parameter should only be provided for stepped foundations. Default value None. Height of the various levels of the stepped foundation going from top to bottom, in [mm].

    —- —-

    120 | |

    —- —-

    50 | |

    —- —-

    60 | |

    height_levels = [120, 50, 60]

Output:
  • Returns lists of object references of newly created foundation columns (Column) and foundation strips (Fstrip).

viiapackage.geometry.viia_create_foundation.viia_create_foundation_walls_and_strips(project: ViiaProject, walls: List[Union[Wall, str, Tuple[Wall, Line]]], foundation_depth: float, strip_material: Optional[str] = None, strip_width: Optional[float] = None, strip_thickness: Optional[int] = None, stepped_foundation_strip_extensions: Optional[List[float]] = None, stepped_foundation_strip_heights: Optional[List[float]] = None, adjust_strips: bool = True, allow_outer_leafs: bool = False, adjust_for_cavity: bool = True, foundation_wall_material: Optional[str] = None, cavity_extension: Optional[float] = 0) Tuple[Optional[List[Wall]], Optional[List[Fstrip]]][source]

Function creates the foundation underneath all walls in the list. The foundation strips are generated centered underneath the wall. In case of cavity walls, the foundation strip is generated underneath both leaves. The remaining strip width is equally distributed on both sides of the real wall including the cavity.

Note

The input cavity_extension should only be used when the cavity wall extends below the ground floor level, therefore, the default value is set to 0. When given value to cavity_extension, it should be the height (dimension in vertical direction) of the extension part in [mm]. In reality, it means the cavity was filled and foundation wall becomes solid below certain height of cavity extension.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • walls (list): List with all the walls underneath which the foundation has to be made. The walls may be provided as string or as object reference of Wall. If provided as tuple with a line shape-geometry, the foundation is applied only underneath that part of the wall. This last feature is not available for cavity walls.

  • foundation_depth (float): Depth of the foundation strip, in [m].

  • strip_material (str): Name of the strip material.

  • strip_width (int): Width of the strip, in [mm]. In case of stepped foundation this input parameter should not be provided. Default value None.

  • strip_thickness (int): Thickness of the strip, in [mm]. In case of stepped foundation this input parameter should not be provided. Default value None.

  • stepped_foundation_strip_extensions (list of float): List of extensions for stepped foundations, in [mm]. Input parameter should only be provided for stepped foundations. Default value None. The extensions are provided at each level of the stepped foundation going from top to bottom

    60 | | 60

    —- —-

    75 | | 75

    —- —-

    40 | | 40

    —- —- | | ———————–

    strip_extensions = [60, 75, 40]

  • stepped_foundation_strip_heights (list of float): List of extensions for stepped foundations, values in [mm]. Input parameter should only be provided for stepped foundations. Default value None. Height of the various levels of the stepped foundation going from top to bottom, in [mm].

    —- —-

    120 | |

    —- —-

    50 | |

    —- —-

    60 | |

    height_levels = [120, 50, 60]

  • adjust_strips (boolean): Switch to automatically adjust the fstrips so that they connect properly at intersections. This will remove overlapping parts, and add the missing area to connect the outer corners. Default value is True, performing the adjustment.

  • allow_outer_leafs (boolean): When set to true, foundations can be created below the outer leafs of cavity walls as well. Default value is False.

  • adjust_for_cavity (boolean): Toggle to place the foundation wall in the middle of the cavity. Default value is True. This input is not used and will be removed in future releases.

  • foundation_wall_material (str): Optional input to specify the material of the foundation wall. Default value is None, in which case the material of the wall is the same as that of the ground floor wall.

  • cavity_extension (float): The height of the ground floor cavity wall’s extension below ground floor level, in [mm]. Default is 0, which means ground floor cavity walls doesn’t extend into foundation

Output:
  • Returns lists of object references of newly created foundation walls (Wall) and foundation strips (Fstrip).

viiapackage.geometry.viia_create_foundation.viia_get_equivalent_properties_masonry_column_foundation(column_thickness_x: float, column_thickness_y: float, bottom_of_strip: float, heights_levels_strip: List[float], strip_extensions_x: List[float], strip_extensions_y: List[float], original_density: float, top_level: float = 0) Tuple[int, int, float, float][source]

This function calculates the equivalent properties for a foundation column.

Tool is based on version 3 of: VIIA_XXXX_Equiv_fundering.xlsx

Input:
  • column_thickness_x (float): Thickness of the original column for the x direction, in [mm].

  • column_thickness_x (float): Thickness of the original column for the y direction, in [mm].

  • bottom_of_strip (float): Bottom level of the strip foundation, relative to z=0, in [m].

  • heights_levels_strip (list of floats): Height of the various levels of the stepped foundation going from top to bottom, in [mm].

    —- —-

    120 | |

    —- —-

    50 | |

    —- —-

    60 | |

    height_levels = [120, 50, 60]

  • strip_extensions_x (list of floats): Extensions at each level for the x direction of the stepped foundation going from top to bottom. in [mm].

    60 | | 60

    —- —-

    75 | | 75

    —- —-

    40 | | 40

    —- —- | | ———————–

    strip_extensions_x = [60, 75, 40]

  • strip_extensions_y (list of floats): Extensions at each level for the y direction of the stepped foundation going from top to bottom, in [mm].

    70 | | 70

    —- —-

    80 | | 80

    —- —-

    60 | | 60

    —- —- | | ———————–

    strip_extensions_y = [70, 80, 60]

  • original_density: The density of the stepped foundation material, in [kg/m3].

  • top_level (float): Top level of the foundation column, relative to z=0, in [m].

Output:
  • Returns the equivalent width x, equivalent width y, depth and density of the modified foundation column for the stepped foundation. Returned values are in [mm] and the density is in [kg/m3].

viiapackage.geometry.viia_create_foundation.viia_get_equivalent_properties_masonry_wall_foundation(wall_thickness: float, bottom_of_strip: float, heights_levels_strip: List[float], strip_extensions: List[float], original_density: float, top_level: float = 0, cavity: float = 0) Tuple[int, float, float][source]

This function calculates the equivalent properties for a foundation wall.

Tool is based on version 3 of: VIIA_XXXX_Equiv_fundering.xlsx

Input:
  • wall_thickness (float): Thickness of the wall original wall, in [mm]. In case of a cavity wall the thickness is the total of the inner and outer leaf and the distance between the two.

  • bottom_of_strip (float): Bottom level of the strip foundation, relative to z=0, in [m].

  • heights_levels_strip (list of floats): Height of the various levels of the stepped foundation going from top to bottom, in [mm].

    —- —-

    120 | |

    —- —-

    50 | |

    —- —-

    60 | |

    height_levels = [120, 50, 60]

  • strip_extensions (list of floats): Extensions at each level of the stepped foundation going from top to bottom

    60 | | 60

    —- —-

    75 | | 75

    —- —-

    40 | | 40

    —- —- | | ———————–

    strip_extensions = [60, 75, 40]

  • original_density: The density of the stepped foundation material, in [kg/m3].

  • top_level (float): Top level of the foundation wall, relative to z=0, in [m].

  • cavity (float): In case of a cavity wall specify the distance between inner and outer leaf. Default value is 0, in which case no cavity wall is taken into account.

Output:
  • Returns the equivalent width, depth and density of the modified foundation wall for the stepped foundation. Returned values are in [mm] and the density is in [kg/m3].

Operations on surface-shapes

viiapackage.viiaShapeOperations.viia_split_surface(project: ViiaProject, target: Union[Surfaces, str], tool: Union[Surfaces, Polyline, List[List[float]], str], keep: Optional[str] = 'largest')[source]

Function to split (update the contour) a surface using the intersection with a tool object.

Input
  • target (obj): Object reference of ‘Surfaces’ that is the target of the splitting. Alt (str): Shapes can be inputted as a strings e.g. ‘roof_1’. Allowed shapes are floors, walls, roofs and fstrips. Also, the full name of the surface shape can be provided.

  • tool (obj): Object reference of ‘Surfaces’ containing the tool surface-shape used to split the other. Alt (obj): Object reference of ‘Polyline’ containing the contour of the tool surface. Alt (list of list of 3 float): List of points that represent the tool surface. Alt (str): Shapes can be inputted as a strings e.g. ‘floor_8’. Allowed shapes floors, walls, roofs and fstrips. Also, the full name of the surface shape can be provided.

  • keep (str): Indicate which surface(s) to keep. Options are ‘largest’, ‘smallest’, ‘top’, ‘bottom’. Default value is ‘largest’.

Output:
  • If splitting was performed correctly, the Surfaces object’s contour is updated.

Operations on wall geometry

viiapackage.viiaShapeOperations.viia_auto_resize_all_walls(project: ViiaProject)[source]

This function resizes all walls automatically. Pay attention when using, unwanted walls may be shortened.

Note

All walls must be defined in the viia Python Database.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

Output:
  • The points of the Auto resized walls will be updated in the python database.

viiapackage.viiaShapeOperations.viia_auto_wall_resize(wall)[source]

This function Resizes a wall automatically.

Input:
  • wall (obj): Object reference of wall to be resized.

Output:
  • The points of the resized walls will be updated. In case the Wall object is not orientated parallel to x=0 or y=0 this will be written to the log.

viiapackage.viiaShapeOperations.viia_connected_walls(wall: Wall) Tuple[dict, dict][source]

This function checks if at least two points of a wall lie inside the boundaries of another wall. Openings are neglected.

..note :: Do not apply this function on walls which are not parallel to x=0 or y=0.

Input:
  • WallObject: Name of the wall object e.g. Wall12 or Wall120 (names of the object must not be used)

Output:
  • Returns two dictionaries as tuple. The first dictionary contains connected walls at the minimum side of the wall with the thickness of the connected walls and the direction of the wall. The second dictionary contains connected walls at the maximum side of the wall with the thickness of the connected walls and the direction of the wall.

viiapackage.viiaShapeOperations.viia_convert_all_columns_to_walls(project: ViiaProject, reference_width: float = 1.0) List[Wall][source]

This function converts all columns with a width larger than the provided dimension to walls, with the same properties. The width of the wall is considered the height of the cross-section (local z-axis), the thickness is considered the width of the cross-section (local y-axis).

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • reference_width (float): Minimum height of the cross-section of the column that will be converted to wall, in [m]. Default value is 1m.

Output:
  • All columns with a cross-sectional height (z-axis) larger than the reference width, will be converted to walls.

  • Naming convention according VIIA project is applied.

  • Returns list of all newly created walls.

viiapackage.viiaShapeOperations.viia_manual_wall_resize(walls: List[Wall], side: str, resize: float, resize_direction: List[float])[source]

This function resize wall(s) manually.

Input:
  • walls (list of obj): List of object references of walls.

  • side (str): The side of the wall which needs to be resized. e.g. ‘min’ as for the side with the minimum x or y value or ‘both’ for both sides.

  • resize (str): Size, in [m], which needs to be cut off the wall. e.g. 0.05 to cut off 50 milimeters.

  • resize_direction (list of 3 float): The direction in which the resizing must take place: e.g. [1, 0, 0] for resizing in x-direction.

Output:
  • The points of the resized walls will be updated.

viiapackage.viiaShapeOperations.viia_split_all_walls(project: ViiaProject)[source]

Function to make all openings storey height and replace the weight with line loads.

Warning

Line loads are not yet being applied. But a message is displayed which shows the size of the load.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

Output:
  • All the openings of the wall are made storey height. By doing this the wall is split and a new object is made for the second wall. If one of the walls has no openings nothing happens.

viiapackage.viiaShapeOperations.viia_split_wall_horizontal(project, wall: Wall, splitting_height: Union[int, float], layer: Optional[str] = None, reference_point: Optional[List[float]] = None, precision: int = 9) Wall[source]

Function to split a wall horizontally based on a height (z-coordinate).

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • wall (obj): Object reference for Wall object that needs to be split.

  • splitting height (int, float): Height at which the wall will be split horizontally, the z-coordinate, in [m].

  • layer (str): Optional input if the newly created part of the original wall should be in another layer. For example when the original wall is in ‘N0’ you can specify ‘N1’ so the split part is added to layer N1. If not provided, the newly created wall is added to the same layer as the existing wall.

  • reference_point (list of 3 floats): Reference point that should be in the part of the wall that will be the original wall. The other part will be the new wall. If not specified, the new wall will be the upper part.

Output:
  • The wall is split in 2 parts, the original wall is adjusted and a new wall is created.

  • The new wall is generally the lowest of the 2 walls, except when the new wall belongs at a lower storey.

  • The new wall is returned.

viiapackage.viiaShapeOperations.viia_split_wall_vertical(wall: Wall, point: List[float], direction: List[float] = None, reference_point: List[float] = None)[source]

Function to split a wall vertically based on a given point and possibly direction. If no direction is specified, the normal vector of the wall is used. The point and direction essentially specify a vertical cutting plane that is used to split the wall in two parts.

Note

The direction specifies the direction parallel to the cutting plane, not perpendicular!

Input:
  • wall (obj): Wall object that needs to be split.

  • point (list of 3 floats): Point at which the wall must be split vertically. NOTE: This point doesn’t necessarily need to be in plane of the wall, because it’s projected to the wall.

  • direction (list of 3 floats): Direction in which the point is projected to the wall and parallel direction of the cutting plane that is used to split the wall. If no direction is specified, the normal vector of the wall is used.

  • reference_point (list of 3 floats): Reference point that should be in the part of the wall that will be the original wall. The other part will be the new wall. If not specified, the new wall will be the smaller part.

Output:
  • The wall is split in 2 parts, the original wall is adjusted and a new wall is created.

  • The new wall is part in which the reference point is not found, otherwise it will be the smaller of the 2 parts.

  • The new wall is returned.

viiapackage.viiaShapeOperations.viia_wall_resize(wall: Wall, side: str, resize: float, resize_direction: List[float])[source]

Functions which shortens a wall.

Input:
  • wall (obj): Object reference of wall to be resized.

side: the side which needs to be resized. e.g. ‘min’ as for the side with the minimum x or y value or ‘both’ for both sides. Resize: size in m which needs to be cut off the wall. e.g. 0.05 to cut off 50 milimeters ResizeDirection: the direction in which the resizing must take place: e.g. [1,0,0] for resizing in x-direction

Returns:

The wall will be resized in the viia Python database

Limitations:

Do not apply this function on walls which are not parallel to x=0 or y=0

viiapackage.viiaShapeOperations.viia_wall_split_floor_heights(Wall_main: Wall)[source]

Function to split a wall according to the levels of the floors.

Input:
  • Wall_main: The function will automatically loop over the wall object.

Output:

The wall is split at the heights of the floors.

Example:
>>> viia_wall_split_floor_heights(Wall1)
viiapackage.viiaShapeOperations.viia_wall_to_columns(project: ViiaProject, ref_width: float = 1.0)[source]

This function converts all walls with a width smaller than the reference width into columns.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • ref_width (float): Maximum width of wall that will be converted to column in [m]. Default value is 1m.

Output:
  • Walls with a width less than the reference width are deleted and replaced by columns of the same dimension.

viiapackage.viiaShapeOperations.viia_walls_split_floor_heights(project: ViiaProject)[source]

Function to split all walls according to the levels of the floors. The function will automatically loop over the wall objects.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

Output:

The walls are split at the heights of the floors.

Limitation:

This can only be used for rectangular walls

Example:
>>> viia_walls_split_floor_heights()

Walls with openings on contour

viiapackage.viiaShapeOperations.viia_openings_on_contour_wall(project: ViiaProject, wall: Union[Wall, str], margin: float = 0.005)[source]

In Dutch: ‘Kantelen wanden’. This function analyses a wall object for incorrectly defined openings which are part of the main element. The element is adapted such that an opening will be added to the element. These incorrectly defined openings are caused by the revit export having openings on the boundary of an element.

This script will add by default a 5 mm margin between the element boundary and the generated opening to prevent errors with openings laying outside of the element itself.

..warning:: this script will not work correctly if the wall geometry is non-rectangular

(for example if the wall has a slanted side).

..note:: this functions applies a projection to 2D and back. very small rounding errors might be introduced.

..note:: in previous versions nodal rounding to 1 mm was applied, this is now removed.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • wall (obj): Object refeence of the wall that needs to be checked and adapted for incorrect openings. Alternativa (str): Name of the wall. The wall must be available in the PY-memory.

  • margin (float): The margin in [m] between the element boundary and the generated opening to prevent errors with openings laying outside the element itself.

Output:
  • The wall passed to this function will have the geometry adapted with a new element geometry and added openings that have been found that were incorrectly part of the main element.

Operations on line-shapes

Operations on line masses

viiapackage.viiaShapeOperations.viia_change_linemass(project: ViiaProject)[source]

Conversion function to changes line-mass elements from enhanced trusses into 3D beams. Line masses should be modelled in DIANA. Properties are assigned to the elements in the model. No updates in PY memory.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

Output:
  • The line-masses are updated in DIANA

Check input from REVIT py-file

Timber frame floors

viiapackage.viiaShapeOperations.viia_wooden_beam_floors(project: ViiaProject, floor, start_wall_distance=None, material_beams='LIN-HOUT', material_sheeting='LIN-HOUT', only_beams: bool = False, offset: Optional[float] = None)[source]

This function removes the floor with wooden beams and planks modelled with equivalent properties and replaces it with a floor modelled with beams and a plane. The beams are placed in direction of the local x-axis. The center to center distance is taken from the floor name, also beam dimensions and thickness.

The offset around the slab is set to 0.1m. The material ‘LIN-HOUT’ is coupled to beams and slab.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • floor (obj): Object reference of the floor that needs to be replaced with beams and sheeting. Alternative (str): Name of the floor that needs to be replaced. The floor must be available in PY-memory.

  • start_wall_distance (float): Distance from start of floor to the first beam. Starting point is the outer point orthogonal to span. Default value is ‘None’.

  • material_beams (str): Name of the material model to be used for the beams. Default value is ‘LIN-HOUT’.

  • material_sheeting (str): Name of the material model to be used for the sheeting (planks or sheeting). Default value is ‘LIN-HOUT’.

  • only_beams (bool): Switch to only create beams and remove the surfaces.

  • offset (float): Value to offset the contour of the new floor, in [m].

Output:
  • The floor is replaced in the model with a floor of beams and a slab.

Warning

Material of slab needs to be adjusted (reduced shear stiffness).

Warning

Eccentricity of slab needs to be added.

Functionality for the foundation strips

Functionality for information and perform geometrical operations on foundation strips.

viiapackage.geometry.viia_fstrips._adjust_corner_connection(project: ViiaProject, surface: Fstrip, connecting_surface: Fstrip, inner_corner_point: List[float], outer_corner_point: List[float])[source]

Function that clips both surface shapes of a connection between two surfaces in a corner.

viiapackage.geometry.viia_fstrips._adjust_intermediate_connection(project: ViiaProject, surface: Fstrip, connecting_surface: Fstrip, intersection_1: List[float], intersection_2: List[float])[source]

Function that clips ‘connecting_surface’ at the given intersection points with another surface.

viiapackage.geometry.viia_fstrips._check_common_contour_line(project: ViiaProject, line: Line, surface_1: Surfaces, surface_2: Surfaces) bool[source]

Checks if a common contour line should be considered during making the new contour line for the merged surfaces. A contour line where there is at both sides a shape will not be considered and so False will be returned. If both shapes are at one side of the line True is returned.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • line (obj): Object reference of line (shape-geometry) which has to be checked.

  • surface_1 (obj): Object reference of first surface for which the check has to be performed.

  • surface_2 (obj): Object reference of second surface for which the check has to be performed.

Output:
  • Returns a boolean to indicate if line should be considered.

viiapackage.geometry.viia_fstrips._get_surfaces_to_merge(project: ViiaProject, surface_shape_names: List[str])[source]

Gets surfaces that should be merged out of a static name list.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • surface_shape_names (list with str): List of names of the shapes.

Output
  • Returns two surface shape object references that should be merged.

viiapackage.geometry.viia_fstrips._identify_surface_connections(surface: Fstrip, surface_objects: List[Fstrip])[source]

Function that returns a list of surface objects that intersect with the given surface.

viiapackage.geometry.viia_fstrips._viia_check_overlapping_surfaces(surface_objects: List[Surfaces])[source]

Function that returns True if any overlapping surfaces are present in the list of surface objects.

viiapackage.geometry.viia_fstrips._viia_get_non_selfintersection_point_list(project: ViiaProject, line_list: List[Line])[source]

Gets a list of points to create a contour and openings for two shapes to be merged based on a list of lines.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • line_list (List of lines): List of lines which should form the contour and openings of a shape

  • precision (int): Level of precision.

Output:
  • Returns a coordinate list which should be the new contour and a list of coordinates which should be the new openings of a shape. Both lists are a list of lists of coordinates.

viiapackage.geometry.viia_fstrips.get_fstrip_average_length(fstrip: Fstrip)[source]

In case of trapezoid fstrip, this method determines average length for correct area calculation by geo.

viiapackage.geometry.viia_fstrips.get_fstrip_direction(fstrip: Fstrip) List[float][source]

Determines the direction by either looking in the metadata for the supported wall, or by determining the direction in which the longest lines are.

viiapackage.geometry.viia_fstrips.get_fstrip_placement_point_for_geo(fstrip: Fstrip)[source]

Function to determine the 2D placement point of the fstrip. In general, this is the middle point of the bottom line of the supported wall. If no information about this wall is found in the meta-data of the strip, the average x- and y-coordinates are returned. The output is given as a list.

viiapackage.geometry.viia_fstrips.get_fstrip_width(fstrip: Fstrip)[source]

Function to obtain the width of a fstrip. If no direction is specified, it will be automatically determined.

viiapackage.geometry.viia_fstrips.identify_surface_common_nodes(surface: Fstrip, surface_objects: List[Fstrip])[source]

Function that return a list of surface objects that share nodes.

viiapackage.geometry.viia_fstrips.viia_adjust_fstrips(project: ViiaProject, fstrips: Optional[List[Fstrip]] = None, fstrip_directions: Optional[List[List[float]]] = None, fwalls: Optional[List[Wall]] = None) None[source]

Function to automatically adjust the geometry of the fstrip in relation to the adjacent strip. A list of fstrips should be provided, along with a list of corresponding directions. Multiple types of connections can be adjusted, for instance T-connections (in which the upper part of the “T” is continuous), perpendicular directions and corner connections with an arbitrary angle. More complex connections where multiple fstrips meet may raise errors, if no suitable adjustments can be made. The function ends with a check in which an error is raised if any overlaps still exist.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • fstrips (list of obj): List of object references of fstrips. Default value None, in which case all fstrips in the project are applied for the adjustment for the fstrips.

  • fstrip_directions (list of list of float): List of corresponding directions for each fstrip in fstrips. Should have same length as the number of fstrip objects. The directions are to be provided as list of 3 floats. Default value None, in which case it is tried to retrieve the direction from the supporting wall or foundation wall. If this fails an error is raised, in which case the directions should be provided manually.

  • fwalls (list of obj): List of wall objects that have been created for the foundation. These are used to connect to the foundation strips.

Output:
  • Function adjusts the geometry of the fstrips and connects them as requested for the implemented connection options. The function does not return anything.

Settings for the structural-type

Functionality for collecting, adding and updating the structural-type to shapes.

class viiapackage.geometry.viia_structural_type.StructuralType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, Enum

viiapackage.geometry.viia_structural_type.viia_get_nsce(project: ViiaProject, object_type: Optional[Type[Shapes]] = None) List[Shapes][source]

Gets all shapes from the collections that are NSCE. Optionally a type can be specified like Wall, Column, to only obtain shapes of that type.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • object_type (list of obj): Optional input for selecting type of shape.

Output:
  • Returns a list of shapes that are classified NSCE, filtered for the requested object-type.

viiapackage.geometry.viia_structural_type.viia_get_psse(project: ViiaProject, object_type: Optional[Type[Shapes]] = None) List[Shapes][source]

Gets all shapes from the collections that are PSSE. Optionally a type can be specified like Wall, Column, to only obtain shapes of that type.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • object_type (list of obj): Optional input for selecting type of shape.

Output:
  • Returns a list of shapes that are classified PSSE, filtered for the requested object-type.

viiapackage.geometry.viia_structural_type.viia_set_nsce(project: ViiaProject, shapes: List[Shapes]) None[source]

This method sets the structural type of all passed in objects to NSCE. This is done by adding an entry to the meta_data of the shape.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • shapes (list of obj): List of shapes which will be set to NSCE.

Output:
  • Meta-data of shapes is added or updated.

viiapackage.geometry.viia_structural_type.viia_set_psse(project: ViiaProject, shapes: List[Shapes]) None[source]

This function sets the structural-type of all passed in shapes to PSSE. This is done by adding an entry to the meta_data of the shape.

Input:
  • project (obj): VIIA project object containing collections of fem objects and project variables.

  • shapes (list of obj): List of shapes which will be set to PSSE.

Output:
  • Meta-data of shapes is added or updated.

Settings for the stepped foundation

Functionality for creating masonry stepped foundation geometries of walls.

class viiapackage.geometry.geometry_models.viia_stepped_foundation_wall.ViiaSteppedFoundationWall(wall_thickness: Union[int, float], top_level: Union[int, float], bottom_of_strip: Union[int, float], heights_levels_strip: List[Union[float, int]], strip_extensions: List[Union[float, int]], original_density: Union[int, float], cavity: Optional[float] = 0)[source]

Bases: object

This class is used to create the masonry stepped foundation geometry of walls.