def _create_casing_points(self, anchors, C, F, targets_lengths): """Creates a list of points for the casing alongside with their connectivity Args: anchors ((float, float), (float, float)): xz coordinates of points at the top of vertical targets. C (float, float): coordinate of inner end of the dome F (float, float): coordinate of outer end of the dome targets_lengths (float, float): leg lengths of the vertical targets Returns: list: list of points with connectivity ([[x, z, 'connection_type'], [...]]) """ B, G = anchors h1, h2 = targets_lengths points = [] # I I_ = extend(C, F, distance_between_two_points(F, C) * 1.1) points.append([I_[0], I_[1], "straight"]) # J J = extend(G, F, h2 * 1.2) points.append([J[0], J[1], "straight"]) # K K = extend(B, C, h1 * 1.2) points.append([K[0], K[1], "straight"]) # L L = extend(F, C, distance_between_two_points(F, C) * 1.1) points.append([L[0], L[1], "straight"]) return points
def _create_dome_points( self, C, F, dome_length, dome_height, dome_thickness, dome_pos ): """Creates a list of points for the dome alongside with their connectivity Args: C (float, float): coordinate of inner end of the dome F (float, float): coordinate of outer end of the dome dome_length (float): dome length (cm) dome_height (float): dome height (cm) dome_thickness (float): dome thickness (cm) dome_pos (float): position of the dome between the two ends. Returns: list: list of points with connectivity ([[x, z, 'connection_type'], [...]]) """ points = [] dome_base = extend(C, F, dome_pos * distance_between_two_points(F, C)) dome_lower_point = extend( dome_base, rotate(dome_base, C, -math.pi / 2), dome_height ) D_prime = extend( dome_base, dome_lower_point, dome_height + dome_thickness) D = extend( dome_lower_point, rotate(dome_lower_point, D_prime, math.pi / 2), dome_length / 2, ) E = extend( dome_lower_point, rotate(dome_lower_point, D_prime, -math.pi / 2), dome_length / 2, ) # D points.append([D[0], D[1], "circle"]) # D' points.append([D_prime[0], D_prime[1], "circle"]) # E points.append([E[0], E[1], "straight"]) return points