# References for functions and classes in the rhdhv_fem package
from rhdhv_fem.fem_status import Project
from viiapackage.viiaGeneral import viia_find_closest_mesh_node
[docs]def viia_find_reference_soil_nodes(project: Project):
"""This function is used to find SRA reference points for soilblock"""
reference_nod = []
target_points = \
[[project.project_specific['soilblock']['x min'], project.project_specific['soilblock']['y min'],
project.project_specific['soilblock']['top 3D part']],
[project.project_specific['soilblock']['x min'], project.project_specific['soilblock']['y min'],
project.project_specific['soilblock']['bottom 3D part']],
[project.project_specific['soilblock']['x min'], project.project_specific['soilblock']['y min'],
project.project_specific['soilblock']['bedrock level']],
[project.project_specific['soilblock']['x min'] + \
project.project_specific['soilblock']['dimension x'] / 2,
project.project_specific['soilblock']['y min'] + \
project.project_specific['soilblock']['distance edge'] * 1 / 5,
project.project_specific['soilblock']['top 3D part']],
[project.project_specific['soilblock']['x min'] + \
project.project_specific['soilblock']['dimension x'] / 2,
project.project_specific['soilblock']['y min'] + \
project.project_specific['soilblock']['distance edge'] * 2 / 5,
project.project_specific['soilblock']['top 3D part']],
[project.project_specific['soilblock']['x min'] + \
project.project_specific['soilblock']['dimension x'] / 2,
project.project_specific['soilblock']['y min'] + \
project.project_specific['soilblock']['distance edge'] * 3 / 5,
project.project_specific['soilblock']['top 3D part']],
[project.project_specific['soilblock']['x min'] + \
project.project_specific['soilblock']['dimension x'] / 2,
project.project_specific['soilblock']['y min'] + \
project.project_specific['soilblock']['distance edge'] * 4 / 5,
project.project_specific['soilblock']['top 3D part']],
[project.project_specific['soilblock']['x min'] + \
project.project_specific['soilblock']['dimension x'] / 2,
project.project_specific['soilblock']['y min'] + \
project.project_specific['soilblock']['distance edge'],
project.project_specific['soilblock']['top 3D part']],
[project.project_specific['soilblock']['x min'] + \
project.project_specific['soilblock']['dimension x'] / 2,
project.project_specific['soilblock']['y min'] + \
project.project_specific['soilblock']['dimension x'] / 2,
project.project_specific['soilblock']['top 3D part']]]
for target_point in target_points:
reference_nod.append(viia_find_closest_mesh_node(project=project, target_point=target_point, direction='Z'))
target_points = []
project.project_specific['pile_tip_levels'] = list(set(project.project_specific['pile_tip_levels']))
for piletip_level in project.project_specific['pile_tip_levels']:
target_points.append([project.project_specific['soilblock']['x min'],
project.project_specific['soilblock']['y min'], piletip_level])
for target_point in target_points:
reference_nod.append(viia_find_closest_mesh_node(project=project, target_point=target_point))
target_points = [[project.project_specific['soilblock']['x min'],
project.project_specific['soilblock']['y min'], 0]]
for target_point in target_points:
reference_nod.append(viia_find_closest_mesh_node(project=project, target_point=target_point))
return reference_nod