import rhinoscriptsyntax as rs # Parameters for the first dome arc1_center = (0, 0, 0) # Center for the outer arc arc2_center = (0, 1, 0) # Center for the inner arc arc1_radius = 23.5 / 2 # Radius of the outer arc arc2_radius = 22.5 / 2 # Radius of the inner arc # Define start and end points for the arcs of the first dome main_arc1_start = (arc1_radius, 0, 0) # Start of the outer arc main_arc1_end = (0, arc1_radius, 0) # End of the outer arc main_arc2_start = (arc2_radius, 0, 0) # Start of the inner arc main_arc2_end = (0, arc2_radius, 0) # End of the inner arc # Delete all objects in the document to start fresh rs.DeleteObjects(rs.AllObjects()) # Create arcs for the first dome arc1 = rs.AddArc3Pt(main_arc1_start, main_arc1_end, arc1_center) arc2 = rs.AddArc3Pt(main_arc2_start, main_arc2_end, arc2_center) # Create lines to connect the arcs of the first dome line1 = rs.AddLine(main_arc1_start, main_arc2_start) # Line connecting start points line2 = rs.AddLine(main_arc1_end, main_arc2_end) # Line connecting end points # Join all curves into a closed shape for the first dome curves = [arc1, arc2, line1, line2] closed_curve1 = rs.JoinCurves(curves, delete_input=True) # Select the closed curve of the first dome rs.SelectObject(closed_curve1) # Define the axis of revolution for the first dome axis_start1 = main_arc1_start # Start of the outer arc axis_end1 = main_arc1_end # End of the outer arc # Revolve the first dome rs.Command('_Revolve _Axis {} {} _StartAngle 0 _EndAngle 180'.format( ','.join(map(str, axis_start1)), ','.join(map(str, axis_end1)) )) ########################################################### ################################### Creating the second dome ########################################################### # Parameters for the second dome arc3_center = (arc1_radius, 0, 0) # Center for the outer arc of the second dome arc4_center = (arc1_radius, 1, 0) # Center for the inner arc of the second dome arc3_radius = 17 / 2 # Radius of the outer arc arc4_radius = 16 / 2 # Radius of the inner arc biggest_dome = rs.LastCreatedObjects() ########################################################### ####### Creating the dome on the right hand side of the biggest dome ########################################################### second_dome = rs.CopyObjects(biggest_dome) # Scale the second dome to half the size of the first dome scale_factor = 0.5 rs.ScaleObjects(second_dome, [0, 0, 0], [scale_factor, scale_factor, scale_factor]) # Move the second dome to align its center with the edge of the first dome big_dome_radius = arc1_radius small_dome_radius = big_dome_radius * scale_factor translation_vector = [arc1_radius-0.5,3,0] rs.MoveObjects(second_dome, translation_vector) big_dome_right = second_dome ########################################################### ####### Creating the dome on the left hand side of the biggest dome ########################################################### rdist=8.309 distance_left=(-(rdist*2)) big_dome_left = rs.CopyObjects(big_dome_right) negative_translation_vector = [arc1_radius-(arc1_radius+arc1_radius),arc1_radius,0] rs.MoveObjects(big_dome_left, [distance_left,0,0]) ########################################################### ####### Creating the dome on the upper side of the biggest dome ########################################################### distance_up=rdist big_dome_upper = rs.CopyObjects(big_dome_left) negative_translation_vector = [0,arc1_radius-(arc1_radius+arc1_radius),0] rs.MoveObjects(big_dome_left, [distance_up,distance_up,0]) ########################################################### ####### Creating the dome on the under the biggest dome ########################################################### distance_down=-(rdist) big_dome_down = rs.CopyObjects(big_dome_upper) negative_translation_vector = [0,arc1_radius-(arc1_radius+arc1_radius),0] rs.MoveObjects(big_dome_upper, [rdist,distance_down,0])